]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
re PR c++/17121 (Link problem with function-local classes)
[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
45c8116d 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 target_noncanonical 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 NM AR 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 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 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.
d2640b91
PE
870 Categories are: fold,gc,gcac,misc,rtlflag,rtl,
871 tree,valgrind; default is gc,misc,rtlflag,tree
74ee1642 872 --enable-mapped-location location_t is fileline integer cookie
ba479fd2 873 --enable-coverage=LEVEL
fb38008e 874 enable compiler's code coverage collection.
ba479fd2
NN
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)
d594623a 918 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
919 --with-gnu-as arrange to work with GNU as
920 --with-as arrange to use the specified as (full pathname)
921 --with-stabs arrange to use stabs instead of host debug format
922 --with-dwarf2 force the default debug format to be DWARF 2
923 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
924 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
59415997 925 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
926 with the compiler
927 --with-system-zlib use installed libz
6de9cd9a 928 --with-libbanshee enable libbanshee
ba479fd2 929 --with-slibdir=DIR shared libraries in DIR LIBDIR
13c22933 930
ba479fd2
NN
931Some influential environment variables:
932 CC C compiler command
933 CFLAGS C compiler flags
934 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
935 nonstandard directory <lib dir>
936 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
937 headers in a nonstandard directory <include dir>
938 CPP C preprocessor
6de9cd9a
DN
939 GMPLIBS How to link GMP
940 GMPINC How to find GMP include files
13c22933 941
ba479fd2
NN
942Use these variables to override the choices made by `configure' or to help
943it to find libraries and programs with nonstandard names/locations.
73458fb7 944
ba479fd2
NN
945_ACEOF
946fi
6e3f3080 947
ba479fd2
NN
948if test "$ac_init_help" = "recursive"; then
949 # If there are subdirs, report their specific --help.
950 ac_popdir=`pwd`
951 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
952 test -d $ac_dir || continue
953 ac_builddir=.
954
955if test "$ac_dir" != .; then
956 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
957 # A "../" for each directory in $ac_dir_suffix.
958 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
959else
960 ac_dir_suffix= ac_top_builddir=
961fi
962
963case $srcdir in
964 .) # No --srcdir option. We are building in place.
965 ac_srcdir=.
966 if test -z "$ac_top_builddir"; then
967 ac_top_srcdir=.
968 else
969 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
970 fi ;;
971 [\\/]* | ?:[\\/]* ) # Absolute path.
972 ac_srcdir=$srcdir$ac_dir_suffix;
973 ac_top_srcdir=$srcdir ;;
974 *) # Relative path.
975 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
976 ac_top_srcdir=$ac_top_builddir$srcdir ;;
977esac
8ab705be
KC
978
979# Do not use `cd foo && pwd` to compute absolute paths, because
980# the directories may not exist.
981case `pwd` in
982.) ac_abs_builddir="$ac_dir";;
86da66b5 983*)
8ab705be
KC
984 case "$ac_dir" in
985 .) ac_abs_builddir=`pwd`;;
986 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
987 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
988 esac;;
989esac
8ab705be 990case $ac_abs_builddir in
86da66b5
HPN
991.) ac_abs_top_builddir=${ac_top_builddir}.;;
992*)
993 case ${ac_top_builddir}. in
8ab705be 994 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 995 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 996 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
997 esac;;
998esac
8ab705be 999case $ac_abs_builddir in
86da66b5
HPN
1000.) ac_abs_srcdir=$ac_srcdir;;
1001*)
1002 case $ac_srcdir in
8ab705be 1003 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 1004 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 1005 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
1006 esac;;
1007esac
8ab705be 1008case $ac_abs_builddir in
86da66b5
HPN
1009.) ac_abs_top_srcdir=$ac_top_srcdir;;
1010*)
1011 case $ac_top_srcdir in
8ab705be 1012 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 1013 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 1014 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
1015 esac;;
1016esac
ba479fd2
NN
1017
1018 cd $ac_dir
1019 # Check for guested configure; otherwise get Cygnus style configure.
1020 if test -f $ac_srcdir/configure.gnu; then
1021 echo
1022 $SHELL $ac_srcdir/configure.gnu --help=recursive
1023 elif test -f $ac_srcdir/configure; then
1024 echo
1025 $SHELL $ac_srcdir/configure --help=recursive
1026 elif test -f $ac_srcdir/configure.ac ||
86da66b5 1027 test -f $ac_srcdir/configure.in; then
ba479fd2
NN
1028 echo
1029 $ac_configure --help
1030 else
1031 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1032 fi
fb38008e 1033 cd "$ac_popdir"
ba479fd2
NN
1034 done
1035fi
1036
1037test -n "$ac_init_help" && exit 0
1038if $ac_init_version; then
1039 cat <<\_ACEOF
1040
86da66b5 1041Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1042This configure script is free software; the Free Software Foundation
1043gives unlimited permission to copy, distribute and modify it.
1044_ACEOF
1045 exit 0
1046fi
1047exec 5>config.log
1048cat >&5 <<_ACEOF
1049This file contains any messages produced by compilers while
1050running configure, to aid debugging if configure makes a mistake.
1051
1052It was created by $as_me, which was
8ab705be 1053generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1054
1055 $ $0 $@
1056
1057_ACEOF
1058{
1059cat <<_ASUNAME
1060## --------- ##
1061## Platform. ##
1062## --------- ##
1063
1064hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1065uname -m = `(uname -m) 2>/dev/null || echo unknown`
1066uname -r = `(uname -r) 2>/dev/null || echo unknown`
1067uname -s = `(uname -s) 2>/dev/null || echo unknown`
1068uname -v = `(uname -v) 2>/dev/null || echo unknown`
1069
1070/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1071/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1072
1073/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1074/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1075/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1076hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1077/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1078/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1079/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1080
1081_ASUNAME
1082
1083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1084for as_dir in $PATH
1085do
1086 IFS=$as_save_IFS
1087 test -z "$as_dir" && as_dir=.
1088 echo "PATH: $as_dir"
1089done
1090
1091} >&5
1092
1093cat >&5 <<_ACEOF
1094
1095
1096## ----------- ##
1097## Core tests. ##
1098## ----------- ##
1099
1100_ACEOF
1101
1102
1103# Keep a trace of the command line.
1104# Strip out --no-create and --no-recursion so they do not pile up.
1105# Strip out --silent because we don't want to record it for future runs.
1106# Also quote any args containing shell meta-characters.
1107# Make two passes to allow for proper duplicate-argument suppression.
1108ac_configure_args=
1109ac_configure_args0=
1110ac_configure_args1=
1111ac_sep=
1112ac_must_keep_next=false
1113for ac_pass in 1 2
1114do
1115 for ac_arg
1116 do
1117 case $ac_arg in
1118 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1119 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1120 | -silent | --silent | --silen | --sile | --sil)
1121 continue ;;
1122 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1123 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1124 esac
1125 case $ac_pass in
1126 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1127 2)
1128 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1129 if test $ac_must_keep_next = true; then
86da66b5 1130 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1131 else
86da66b5
HPN
1132 case $ac_arg in
1133 *=* | --config-cache | -C | -disable-* | --disable-* \
1134 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1135 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1136 | -with-* | --with-* | -without-* | --without-* | --x)
1137 case "$ac_configure_args0 " in
1138 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1139 esac
1140 ;;
1141 -* ) ac_must_keep_next=true ;;
1142 esac
ba479fd2
NN
1143 fi
1144 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1145 # Get rid of the leading space.
1146 ac_sep=" "
1147 ;;
1148 esac
1149 done
1150done
1151$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1152$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1153
1154# When interrupted or exit'd, cleanup temporary files, and complete
1155# config.log. We remove comments because anyway the quotes in there
1156# would cause problems or look ugly.
1157# WARNING: Be sure not to use single quotes in there, as some shells,
1158# such as our DU 5.0 friend, will then `close' the trap.
1159trap 'exit_status=$?
1160 # Save into config.log some information that might help in debugging.
1161 {
1162 echo
1163
1164 cat <<\_ASBOX
1165## ---------------- ##
1166## Cache variables. ##
1167## ---------------- ##
1168_ASBOX
1169 echo
1170 # The following way of writing the cache mishandles newlines in values,
1171{
1172 (set) 2>&1 |
1173 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1174 *ac_space=\ *)
1175 sed -n \
86da66b5
HPN
1176 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1177 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
ba479fd2
NN
1178 ;;
1179 *)
1180 sed -n \
86da66b5 1181 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
1182 ;;
1183 esac;
1184}
1185 echo
1186
1187 cat <<\_ASBOX
1188## ----------------- ##
1189## Output variables. ##
1190## ----------------- ##
1191_ASBOX
1192 echo
1193 for ac_var in $ac_subst_vars
1194 do
1195 eval ac_val=$`echo $ac_var`
1196 echo "$ac_var='"'"'$ac_val'"'"'"
1197 done | sort
1198 echo
1199
1200 if test -n "$ac_subst_files"; then
1201 cat <<\_ASBOX
1202## ------------- ##
1203## Output files. ##
1204## ------------- ##
1205_ASBOX
1206 echo
1207 for ac_var in $ac_subst_files
1208 do
1209 eval ac_val=$`echo $ac_var`
86da66b5 1210 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1211 done | sort
1212 echo
1213 fi
1214
1215 if test -s confdefs.h; then
1216 cat <<\_ASBOX
1217## ----------- ##
1218## confdefs.h. ##
1219## ----------- ##
1220_ASBOX
1221 echo
1222 sed "/^$/d" confdefs.h | sort
1223 echo
1224 fi
1225 test "$ac_signal" != 0 &&
1226 echo "$as_me: caught signal $ac_signal"
1227 echo "$as_me: exit $exit_status"
1228 } >&5
86da66b5 1229 rm -f core *.core &&
ba479fd2
NN
1230 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1231 exit $exit_status
1232 ' 0
1233for ac_signal in 1 2 13 15; do
1234 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1235done
1236ac_signal=0
1237
1238# confdefs.h avoids OS command line length limits that DEFS can exceed.
1239rm -rf conftest* confdefs.h
1240# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1241echo >confdefs.h
1242
1243# Predefined preprocessor variables.
1244
1245cat >>confdefs.h <<_ACEOF
1246#define PACKAGE_NAME "$PACKAGE_NAME"
1247_ACEOF
1248
1249
1250cat >>confdefs.h <<_ACEOF
1251#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1252_ACEOF
1253
1254
1255cat >>confdefs.h <<_ACEOF
1256#define PACKAGE_VERSION "$PACKAGE_VERSION"
1257_ACEOF
1258
1259
1260cat >>confdefs.h <<_ACEOF
1261#define PACKAGE_STRING "$PACKAGE_STRING"
1262_ACEOF
1263
1264
1265cat >>confdefs.h <<_ACEOF
1266#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1267_ACEOF
1268
1269
1270# Let the site file select an alternate cache file if it wants to.
1271# Prefer explicitly selected file to automatically selected ones.
1272if test -z "$CONFIG_SITE"; then
1273 if test "x$prefix" != xNONE; then
1274 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1275 else
1276 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1277 fi
1278fi
1279for ac_site_file in $CONFIG_SITE; do
1280 if test -r "$ac_site_file"; then
1281 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1282echo "$as_me: loading site script $ac_site_file" >&6;}
1283 sed 's/^/| /' "$ac_site_file" >&5
1284 . "$ac_site_file"
1285 fi
1286done
1287
1288if test -r "$cache_file"; then
1289 # Some versions of bash will fail to source /dev/null (special
1290 # files actually), so we avoid doing that.
1291 if test -f "$cache_file"; then
1292 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1293echo "$as_me: loading cache $cache_file" >&6;}
1294 case $cache_file in
1295 [\\/]* | ?:[\\/]* ) . $cache_file;;
1296 *) . ./$cache_file;;
1297 esac
1298 fi
1299else
1300 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1301echo "$as_me: creating cache $cache_file" >&6;}
1302 >$cache_file
1303fi
1304
1305# Check that the precious variables saved in the cache have kept the same
1306# value.
1307ac_cache_corrupted=false
1308for ac_var in `(set) 2>&1 |
86da66b5 1309 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1310 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1311 eval ac_new_set=\$ac_env_${ac_var}_set
1312 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1313 eval ac_new_val="\$ac_env_${ac_var}_value"
1314 case $ac_old_set,$ac_new_set in
1315 set,)
1316 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1317echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1318 ac_cache_corrupted=: ;;
1319 ,set)
1320 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1321echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1322 ac_cache_corrupted=: ;;
1323 ,);;
1324 *)
1325 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1326 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1327echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1328 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1329echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1330 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1331echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1332 ac_cache_corrupted=:
ba479fd2
NN
1333 fi;;
1334 esac
1335 # Pass precious variables to config.status.
1336 if test "$ac_new_set" = set; then
1337 case $ac_new_val in
1338 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1339 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1340 *) ac_arg=$ac_var=$ac_new_val ;;
1341 esac
1342 case " $ac_configure_args " in
1343 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1344 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1345 esac
1346 fi
1347done
1348if $ac_cache_corrupted; then
1349 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1350echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1351 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1352echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1353 { (exit 1); exit 1; }; }
1354fi
1355
1356ac_ext=c
1357ac_cpp='$CPP $CPPFLAGS'
1358ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1359ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1360ac_compiler_gnu=$ac_cv_c_compiler_gnu
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
914c5af7 1380
ba479fd2
NN
1381 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1382
1383
1384# Determine the host, build, and target systems
1385ac_aux_dir=
1386for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1387 if test -f $ac_dir/install-sh; then
1388 ac_aux_dir=$ac_dir
1389 ac_install_sh="$ac_aux_dir/install-sh -c"
1390 break
1391 elif test -f $ac_dir/install.sh; then
1392 ac_aux_dir=$ac_dir
1393 ac_install_sh="$ac_aux_dir/install.sh -c"
1394 break
1395 elif test -f $ac_dir/shtool; then
1396 ac_aux_dir=$ac_dir
1397 ac_install_sh="$ac_aux_dir/shtool install -c"
1398 break
1399 fi
1400done
1401if test -z "$ac_aux_dir"; then
1402 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1403echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1404 { (exit 1); exit 1; }; }
1405fi
1406ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1407ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1408ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1409
1410# Make sure we can run config.sub.
1411$ac_config_sub sun4 >/dev/null 2>&1 ||
1412 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1413echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1414 { (exit 1); exit 1; }; }
1415
1416echo "$as_me:$LINENO: checking build system type" >&5
1417echo $ECHO_N "checking build system type... $ECHO_C" >&6
1418if test "${ac_cv_build+set}" = set; then
1419 echo $ECHO_N "(cached) $ECHO_C" >&6
1420else
1421 ac_cv_build_alias=$build_alias
1422test -z "$ac_cv_build_alias" &&
1423 ac_cv_build_alias=`$ac_config_guess`
1424test -z "$ac_cv_build_alias" &&
1425 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1426echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1427 { (exit 1); exit 1; }; }
1428ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1429 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1430echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1431 { (exit 1); exit 1; }; }
1432
1433fi
1434echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1435echo "${ECHO_T}$ac_cv_build" >&6
1436build=$ac_cv_build
1437build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1438build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1439build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1440
1441
1442echo "$as_me:$LINENO: checking host system type" >&5
1443echo $ECHO_N "checking host system type... $ECHO_C" >&6
1444if test "${ac_cv_host+set}" = set; then
1445 echo $ECHO_N "(cached) $ECHO_C" >&6
1446else
1447 ac_cv_host_alias=$host_alias
1448test -z "$ac_cv_host_alias" &&
1449 ac_cv_host_alias=$ac_cv_build_alias
1450ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1451 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1452echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1453 { (exit 1); exit 1; }; }
1454
1455fi
1456echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1457echo "${ECHO_T}$ac_cv_host" >&6
1458host=$ac_cv_host
1459host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1460host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1461host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1462
1463
1464echo "$as_me:$LINENO: checking target system type" >&5
1465echo $ECHO_N "checking target system type... $ECHO_C" >&6
1466if test "${ac_cv_target+set}" = set; then
1467 echo $ECHO_N "(cached) $ECHO_C" >&6
1468else
1469 ac_cv_target_alias=$target_alias
1470test "x$ac_cv_target_alias" = "x" &&
1471 ac_cv_target_alias=$ac_cv_host_alias
1472ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1473 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1474echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1475 { (exit 1); exit 1; }; }
1476
1477fi
1478echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1479echo "${ECHO_T}$ac_cv_target" >&6
1480target=$ac_cv_target
1481target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1482target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1483target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1484
1485
1486# The aliases save the names the user supplied, while $host etc.
1487# will get canonicalized.
1488test -n "$target_alias" &&
1489 test "$program_prefix$program_suffix$program_transform_name" = \
1490 NONENONEs,x,x, &&
1491 program_prefix=${target_alias}-
1492
1493# Determine the noncanonical target name, for directory use.
1494 case ${build_alias} in
1495 "") build_noncanonical=${build} ;;
6e3f3080
NN
1496 *) build_noncanonical=${build_alias} ;;
1497esac
73458fb7 1498
4665e56c
NN
1499 case ${host_alias} in
1500 "") host_noncanonical=${build_noncanonical} ;;
1501 *) host_noncanonical=${host_alias} ;;
1502esac
73458fb7 1503
4665e56c
NN
1504 case ${target_alias} in
1505 "") target_noncanonical=${host_noncanonical} ;;
1506 *) target_noncanonical=${target_alias} ;;
1507esac
093e61a6 1508
caa55b1e 1509
392765bf
NN
1510
1511
caa55b1e 1512# Determine the target- and build-specific subdirectories
4665e56c
NN
1513 # Prefix 'build-' so this never conflicts with target_subdir.
1514build_subdir="build-${build_noncanonical}"
1515# Not really a subdirectory, but here for completeness.
1516host_subdir=.
1517# No prefix.
1518target_subdir=${target_noncanonical}
ba479fd2 1519
73458fb7 1520
093e61a6 1521# Set program_transform_name
13c22933 1522test "$program_prefix" != NONE &&
ba479fd2 1523 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1524# Use a double $ so make ignores it.
1525test "$program_suffix" != NONE &&
ba479fd2
NN
1526 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1527# Double any \ or $. echo might interpret backslashes.
1528# By default was `s,x,x', remove it if useless.
1529cat <<\_ACEOF >conftest.sed
1530s/[\\$]/&&/g;s/;s,x,x,$//
1531_ACEOF
1532program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1533rm conftest.sed
13c22933
JJ
1534
1535
34a86c2b
NN
1536# Check for bogus environment variables.
1537# Test if LIBRARY_PATH contains the notation for the current directory
1538# since this would lead to problems installing/building glibc.
1539# LIBRARY_PATH contains the current directory if one of the following
1540# is true:
1541# - one of the terminals (":" and ";") is the first or last sign
1542# - two terminals occur directly after each other
1543# - the path contains an element with a dot in it
ba479fd2
NN
1544echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1545echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1546case ${LIBRARY_PATH} in
1547 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1548 library_path_setting="contains current directory"
1549 ;;
1550 *)
1551 library_path_setting="ok"
1552 ;;
1553esac
ba479fd2
NN
1554echo "$as_me:$LINENO: result: $library_path_setting" >&5
1555echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1556if test "$library_path_setting" != "ok"; then
ba479fd2 1557{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1558*** LIBRARY_PATH shouldn't contain the current directory when
1559*** building gcc. Please change the environment variable
ba479fd2
NN
1560*** and run configure again." >&5
1561echo "$as_me: error:
1562*** LIBRARY_PATH shouldn't contain the current directory when
1563*** building gcc. Please change the environment variable
1564*** and run configure again." >&2;}
1565 { (exit 1); exit 1; }; }
e9a25f70
JL
1566fi
1567
34a86c2b
NN
1568# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1569# since this would lead to problems installing/building glibc.
1570# GCC_EXEC_PREFIX contains the current directory if one of the following
1571# is true:
1572# - one of the terminals (":" and ";") is the first or last sign
1573# - two terminals occur directly after each other
1574# - the path contains an element with a dot in it
ba479fd2
NN
1575echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1576echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1577case ${GCC_EXEC_PREFIX} in
1578 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1579 gcc_exec_prefix_setting="contains current directory"
1580 ;;
1581 *)
1582 gcc_exec_prefix_setting="ok"
1583 ;;
1584esac
ba479fd2
NN
1585echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1586echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1587if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1588{ { echo "$as_me:$LINENO: error:
1589*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1590*** building gcc. Please change the environment variable
1591*** and run configure again." >&5
1592echo "$as_me: error:
cafe096b
EC
1593*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1594*** building gcc. Please change the environment variable
ba479fd2
NN
1595*** and run configure again." >&2;}
1596 { (exit 1); exit 1; }; }
34a86c2b
NN
1597fi
1598
1599# -----------
1600# Directories
1601# -----------
1602
1603# Specify the local prefix
1604local_prefix=
ba479fd2 1605
34a86c2b
NN
1606# Check whether --with-local-prefix or --without-local-prefix was given.
1607if test "${with_local_prefix+set}" = set; then
1608 withval="$with_local_prefix"
1609 case "${withval}" in
ba479fd2
NN
1610yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1611echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1612 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1613no) ;;
1614*) local_prefix=$with_local_prefix ;;
1615esac
ba479fd2 1616fi;
34a86c2b
NN
1617
1618# Default local prefix if it is empty
1619if test x$local_prefix = x; then
1620 local_prefix=/usr/local
1621fi
1622
1623# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1624# passed in by the toplevel make and thus we'd get different behavior
1625# depending on where we built the sources.
1626gcc_gxx_include_dir=
1627# Specify the g++ header file directory
ba479fd2 1628
34a86c2b
NN
1629# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1630if test "${with_gxx_include_dir+set}" = set; then
1631 withval="$with_gxx_include_dir"
1632 case "${withval}" in
ba479fd2
NN
1633yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1634echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1635 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1636no) ;;
1637*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1638esac
ba479fd2 1639fi;
34a86c2b
NN
1640
1641if test x${gcc_gxx_include_dir} = x; then
1642 if test x${enable_version_specific_runtime_libs} = xyes; then
1643 gcc_gxx_include_dir='${libsubdir}/include/c++'
1644 else
1645 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
1646 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
1647 fi
1648fi
1649
ba479fd2 1650
34a86c2b
NN
1651# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1652if test "${with_cpp_install_dir+set}" = set; then
1653 withval="$with_cpp_install_dir"
1654 if test x$withval = xyes; then
ba479fd2
NN
1655 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1656echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1657 { (exit 1); exit 1; }; }
34a86c2b
NN
1658elif test x$withval != xno; then
1659 cpp_install_dir=$withval
1660fi
ba479fd2 1661fi;
34a86c2b 1662
51b9ff45 1663# We would like to our source tree to be readonly. However when releases or
ba479fd2 1664# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1665# various formats of manuals need to be included along with the rest of the
ba479fd2 1666# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1667# just that.
1668
03787dfd
KC
1669echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1670echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1671 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45
KC
1672if test "${enable_generated_files_in_srcdir+set}" = set; then
1673 enableval="$enable_generated_files_in_srcdir"
03787dfd 1674 generated_files_in_srcdir=$enableval
51b9ff45 1675else
03787dfd 1676 generated_files_in_srcdir=no
ba479fd2 1677fi;
51b9ff45 1678
03787dfd
KC
1679echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1680echo "${ECHO_T}$generated_files_in_srcdir" >&6
1681
1682if test "$generated_files_in_srcdir" = "yes"; then
1683 GENINSRC=''
03787dfd
KC
1684else
1685 GENINSRC='#'
03787dfd
KC
1686fi
1687
1688
34a86c2b
NN
1689# -------------------
1690# Find default linker
1691# -------------------
1692
1693# With GNU ld
ba479fd2 1694
34a86c2b
NN
1695# Check whether --with-gnu-ld or --without-gnu-ld was given.
1696if test "${with_gnu_ld+set}" = set; then
1697 withval="$with_gnu_ld"
1698 gnu_ld_flag="$with_gnu_ld"
1699else
1700 gnu_ld_flag=no
ba479fd2 1701fi;
6e3f3080 1702
63cf211a 1703# With pre-defined ld
ba479fd2 1704
34a86c2b
NN
1705# Check whether --with-ld or --without-ld was given.
1706if test "${with_ld+set}" = set; then
1707 withval="$with_ld"
1708 DEFAULT_LINKER="$with_ld"
ba479fd2 1709fi;
34a86c2b
NN
1710if test x"${DEFAULT_LINKER+set}" = x"set"; then
1711 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1712 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1713echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1714 { (exit 1); exit 1; }; }
34a86c2b
NN
1715 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1716 gnu_ld_flag=yes
1717 fi
ba479fd2
NN
1718
1719cat >>confdefs.h <<_ACEOF
34a86c2b 1720#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1721_ACEOF
34a86c2b
NN
1722
1723fi
1724
ba479fd2
NN
1725echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1726echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1727if test x"${DEFAULT_LINKER+set}" = x"set"; then
1728 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1729 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1730echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1731 else
ba479fd2
NN
1732 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1733echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1734 fi
1735else
ba479fd2
NN
1736 echo "$as_me:$LINENO: result: no" >&5
1737echo "${ECHO_T}no" >&6
34a86c2b
NN
1738fi
1739
d594623a
L
1740# With demangler in GNU ld
1741
1742# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
1743if test "${with_demangler_in_ld+set}" = set; then
1744 withval="$with_demangler_in_ld"
1745 demangler_in_ld="$with_demangler_in_ld"
1746else
1747 demangler_in_ld=no
1748fi;
1749
34a86c2b
NN
1750# ----------------------
1751# Find default assembler
1752# ----------------------
1753
1754# With GNU as
ba479fd2 1755
34a86c2b
NN
1756# Check whether --with-gnu-as or --without-gnu-as was given.
1757if test "${with_gnu_as+set}" = set; then
1758 withval="$with_gnu_as"
1759 gas_flag="$with_gnu_as"
1760else
1761 gas_flag=no
ba479fd2 1762fi;
34a86c2b
NN
1763
1764
1765# Check whether --with-as or --without-as was given.
1766if test "${with_as+set}" = set; then
1767 withval="$with_as"
1768 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1769fi;
34a86c2b
NN
1770if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1771 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1772 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1773echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1774 { (exit 1); exit 1; }; }
34a86c2b
NN
1775 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1776 gas_flag=yes
1777 fi
ba479fd2
NN
1778
1779cat >>confdefs.h <<_ACEOF
34a86c2b 1780#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1781_ACEOF
34a86c2b
NN
1782
1783fi
1784
ba479fd2
NN
1785echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1786echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1787if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1788 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1789 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1790echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1791 else
ba479fd2
NN
1792 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1793echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1794 fi
1795else
ba479fd2
NN
1796 echo "$as_me:$LINENO: result: no" >&5
1797echo "${ECHO_T}no" >&6
34a86c2b
NN
1798fi
1799
1800# ---------------
1801# Find C compiler
1802# ---------------
1803
426ca3ca
RO
1804# If a non-executable a.out is present (e.g. created by GNU as above even if
1805# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1806# file, even when creating an executable, so an execution test fails.
1807# Remove possible default executable files to avoid this.
1808#
1809# FIXME: This really belongs into AC_PROG_CC and can be removed once
1810# Autoconf includes it.
1811rm -f a.out a.exe b.out
1812
34a86c2b 1813# Find the native compiler
ba479fd2
NN
1814ac_ext=c
1815ac_cpp='$CPP $CPPFLAGS'
1816ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1817ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1818ac_compiler_gnu=$ac_cv_c_compiler_gnu
1819if test -n "$ac_tool_prefix"; then
1820 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1821set dummy ${ac_tool_prefix}gcc; ac_word=$2
1822echo "$as_me:$LINENO: checking for $ac_word" >&5
1823echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1824if test "${ac_cv_prog_CC+set}" = set; then
1825 echo $ECHO_N "(cached) $ECHO_C" >&6
1826else
1827 if test -n "$CC"; then
1828 ac_cv_prog_CC="$CC" # Let the user override the test.
1829else
1830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1831for as_dir in $PATH
1832do
1833 IFS=$as_save_IFS
1834 test -z "$as_dir" && as_dir=.
1835 for ac_exec_ext in '' $ac_executable_extensions; do
1836 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1837 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1838 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1839 break 2
1840 fi
1841done
1842done
1843
1844fi
1845fi
1846CC=$ac_cv_prog_CC
1847if test -n "$CC"; then
1848 echo "$as_me:$LINENO: result: $CC" >&5
1849echo "${ECHO_T}$CC" >&6
1850else
1851 echo "$as_me:$LINENO: result: no" >&5
1852echo "${ECHO_T}no" >&6
1853fi
1854
1855fi
1856if test -z "$ac_cv_prog_CC"; then
1857 ac_ct_CC=$CC
1858 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1859set dummy gcc; ac_word=$2
ba479fd2
NN
1860echo "$as_me:$LINENO: checking for $ac_word" >&5
1861echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1862if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1863 echo $ECHO_N "(cached) $ECHO_C" >&6
1864else
1865 if test -n "$ac_ct_CC"; then
1866 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1867else
1868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1869for as_dir in $PATH
1870do
1871 IFS=$as_save_IFS
1872 test -z "$as_dir" && as_dir=.
1873 for ac_exec_ext in '' $ac_executable_extensions; do
1874 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1875 ac_cv_prog_ac_ct_CC="gcc"
1876 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1877 break 2
1878 fi
1879done
1880done
1881
1882fi
1883fi
1884ac_ct_CC=$ac_cv_prog_ac_ct_CC
1885if test -n "$ac_ct_CC"; then
1886 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1887echo "${ECHO_T}$ac_ct_CC" >&6
1888else
1889 echo "$as_me:$LINENO: result: no" >&5
1890echo "${ECHO_T}no" >&6
1891fi
1892
1893 CC=$ac_ct_CC
1894else
1895 CC="$ac_cv_prog_CC"
1896fi
1897
1898if test -z "$CC"; then
1899 if test -n "$ac_tool_prefix"; then
1900 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1901set dummy ${ac_tool_prefix}cc; ac_word=$2
1902echo "$as_me:$LINENO: checking for $ac_word" >&5
1903echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1904if test "${ac_cv_prog_CC+set}" = set; then
1905 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1906else
1907 if test -n "$CC"; then
1908 ac_cv_prog_CC="$CC" # Let the user override the test.
1909else
ba479fd2
NN
1910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1911for as_dir in $PATH
1912do
1913 IFS=$as_save_IFS
1914 test -z "$as_dir" && as_dir=.
1915 for ac_exec_ext in '' $ac_executable_extensions; do
1916 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1917 ac_cv_prog_CC="${ac_tool_prefix}cc"
1918 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1919 break 2
1920 fi
1921done
1922done
1923
cd9e5e7c
MK
1924fi
1925fi
ba479fd2 1926CC=$ac_cv_prog_CC
cd9e5e7c 1927if test -n "$CC"; then
ba479fd2
NN
1928 echo "$as_me:$LINENO: result: $CC" >&5
1929echo "${ECHO_T}$CC" >&6
1930else
1931 echo "$as_me:$LINENO: result: no" >&5
1932echo "${ECHO_T}no" >&6
1933fi
1934
1935fi
1936if test -z "$ac_cv_prog_CC"; then
1937 ac_ct_CC=$CC
1938 # Extract the first word of "cc", so it can be a program name with args.
1939set dummy cc; ac_word=$2
1940echo "$as_me:$LINENO: checking for $ac_word" >&5
1941echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1942if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1943 echo $ECHO_N "(cached) $ECHO_C" >&6
1944else
1945 if test -n "$ac_ct_CC"; then
1946 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1947else
1948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1949for as_dir in $PATH
1950do
1951 IFS=$as_save_IFS
1952 test -z "$as_dir" && as_dir=.
1953 for ac_exec_ext in '' $ac_executable_extensions; do
1954 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1955 ac_cv_prog_ac_ct_CC="cc"
1956 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1957 break 2
1958 fi
1959done
1960done
1961
1962fi
1963fi
1964ac_ct_CC=$ac_cv_prog_ac_ct_CC
1965if test -n "$ac_ct_CC"; then
1966 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1967echo "${ECHO_T}$ac_ct_CC" >&6
1968else
1969 echo "$as_me:$LINENO: result: no" >&5
1970echo "${ECHO_T}no" >&6
1971fi
1972
1973 CC=$ac_ct_CC
cd9e5e7c 1974else
ba479fd2 1975 CC="$ac_cv_prog_CC"
e9a25f70 1976fi
6e3f3080 1977
ba479fd2 1978fi
6e3f3080
NN
1979if test -z "$CC"; then
1980 # Extract the first word of "cc", so it can be a program name with args.
1981set dummy cc; ac_word=$2
ba479fd2
NN
1982echo "$as_me:$LINENO: checking for $ac_word" >&5
1983echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1984if test "${ac_cv_prog_CC+set}" = set; then
1985 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
1986else
1987 if test -n "$CC"; then
1988 ac_cv_prog_CC="$CC" # Let the user override the test.
1989else
1990 ac_prog_rejected=no
ba479fd2
NN
1991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1992for as_dir in $PATH
1993do
1994 IFS=$as_save_IFS
1995 test -z "$as_dir" && as_dir=.
1996 for ac_exec_ext in '' $ac_executable_extensions; do
1997 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1998 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1999 ac_prog_rejected=yes
2000 continue
2001 fi
2002 ac_cv_prog_CC="cc"
2003 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2004 break 2
2005 fi
2006done
2007done
2008
6e3f3080
NN
2009if test $ac_prog_rejected = yes; then
2010 # We found a bogon in the path, so make sure we never use it.
2011 set dummy $ac_cv_prog_CC
2012 shift
ba479fd2 2013 if test $# != 0; then
6e3f3080
NN
2014 # We chose a different compiler from the bogus one.
2015 # However, it has the same basename, so the bogon will be chosen
2016 # first if we set CC to just the basename; use the full file name.
2017 shift
ba479fd2 2018 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2019 fi
6e3f3080
NN
2020fi
2021fi
2022fi
ba479fd2 2023CC=$ac_cv_prog_CC
6e3f3080 2024if test -n "$CC"; then
ba479fd2
NN
2025 echo "$as_me:$LINENO: result: $CC" >&5
2026echo "${ECHO_T}$CC" >&6
e9a25f70 2027else
ba479fd2
NN
2028 echo "$as_me:$LINENO: result: no" >&5
2029echo "${ECHO_T}no" >&6
e9a25f70 2030fi
6e3f3080 2031
ba479fd2
NN
2032fi
2033if test -z "$CC"; then
2034 if test -n "$ac_tool_prefix"; then
2035 for ac_prog in cl
2036 do
2037 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2038set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2039echo "$as_me:$LINENO: checking for $ac_word" >&5
2040echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2041if test "${ac_cv_prog_CC+set}" = set; then
2042 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2043else
6e3f3080
NN
2044 if test -n "$CC"; then
2045 ac_cv_prog_CC="$CC" # Let the user override the test.
2046else
ba479fd2
NN
2047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2048for as_dir in $PATH
2049do
2050 IFS=$as_save_IFS
2051 test -z "$as_dir" && as_dir=.
2052 for ac_exec_ext in '' $ac_executable_extensions; do
2053 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2054 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2055 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2056 break 2
2057 fi
2058done
2059done
2060
093e61a6 2061fi
6e3f3080 2062fi
ba479fd2 2063CC=$ac_cv_prog_CC
6e3f3080 2064if test -n "$CC"; then
ba479fd2
NN
2065 echo "$as_me:$LINENO: result: $CC" >&5
2066echo "${ECHO_T}$CC" >&6
6e3f3080 2067else
ba479fd2
NN
2068 echo "$as_me:$LINENO: result: no" >&5
2069echo "${ECHO_T}no" >&6
093e61a6 2070fi
cafe096b 2071
ba479fd2
NN
2072 test -n "$CC" && break
2073 done
2074fi
2075if test -z "$CC"; then
2076 ac_ct_CC=$CC
2077 for ac_prog in cl
2078do
2079 # Extract the first word of "$ac_prog", so it can be a program name with args.
2080set dummy $ac_prog; ac_word=$2
2081echo "$as_me:$LINENO: checking for $ac_word" >&5
2082echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2083if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2084 echo $ECHO_N "(cached) $ECHO_C" >&6
2085else
2086 if test -n "$ac_ct_CC"; then
2087 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2088else
2089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2090for as_dir in $PATH
2091do
2092 IFS=$as_save_IFS
2093 test -z "$as_dir" && as_dir=.
2094 for ac_exec_ext in '' $ac_executable_extensions; do
2095 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2096 ac_cv_prog_ac_ct_CC="$ac_prog"
2097 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2098 break 2
2099 fi
2100done
2101done
6e3f3080 2102
ba479fd2
NN
2103fi
2104fi
2105ac_ct_CC=$ac_cv_prog_ac_ct_CC
2106if test -n "$ac_ct_CC"; then
2107 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2108echo "${ECHO_T}$ac_ct_CC" >&6
2109else
2110 echo "$as_me:$LINENO: result: no" >&5
2111echo "${ECHO_T}no" >&6
2112fi
6e3f3080 2113
ba479fd2
NN
2114 test -n "$ac_ct_CC" && break
2115done
63cf211a 2116
ba479fd2
NN
2117 CC=$ac_ct_CC
2118fi
2119
2120fi
2121
2122
2123test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2124See \`config.log' for more details." >&5
2125echo "$as_me: error: no acceptable C compiler found in \$PATH
2126See \`config.log' for more details." >&2;}
2127 { (exit 1); exit 1; }; }
2128
2129# Provide some information about the compiler.
2130echo "$as_me:$LINENO:" \
2131 "checking for C compiler version" >&5
2132ac_compiler=`set X $ac_compile; echo $2`
2133{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2134 (eval $ac_compiler --version </dev/null >&5) 2>&5
2135 ac_status=$?
2136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2137 (exit $ac_status); }
2138{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2139 (eval $ac_compiler -v </dev/null >&5) 2>&5
2140 ac_status=$?
2141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2142 (exit $ac_status); }
2143{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2144 (eval $ac_compiler -V </dev/null >&5) 2>&5
2145 ac_status=$?
2146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2147 (exit $ac_status); }
2148
2149cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2150/* confdefs.h. */
2151_ACEOF
2152cat confdefs.h >>conftest.$ac_ext
2153cat >>conftest.$ac_ext <<_ACEOF
2154/* end confdefs.h. */
2155
2156int
2157main ()
2158{
63cf211a 2159
ba479fd2
NN
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164ac_clean_files_save=$ac_clean_files
2165ac_clean_files="$ac_clean_files a.out a.exe b.out"
2166# Try to create an executable without -o first, disregard a.out.
2167# It will help us diagnose broken compilers, and finding out an intuition
2168# of exeext.
86da66b5
HPN
2169echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2170echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2
NN
2171ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2172if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2173 (eval $ac_link_default) 2>&5
2174 ac_status=$?
2175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2176 (exit $ac_status); }; then
2177 # Find the output, starting from the most likely. This scheme is
2178# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2179# resort.
2180
2181# Be careful to initialize this variable, since it used to be cached.
2182# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2183ac_cv_exeext=
2184# b.out is created by i960 compilers.
2185for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2186do
2187 test -f "$ac_file" || continue
2188 case $ac_file in
2189 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
86da66b5 2190 ;;
ba479fd2 2191 conftest.$ac_ext )
86da66b5
HPN
2192 # This is the source file.
2193 ;;
ba479fd2 2194 [ab].out )
86da66b5
HPN
2195 # We found the default executable, but exeext='' is most
2196 # certainly right.
2197 break;;
ba479fd2 2198 *.* )
86da66b5
HPN
2199 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2200 # FIXME: I believe we export ac_cv_exeext for Libtool,
2201 # but it would be cool to find out if it's true. Does anybody
2202 # maintain Libtool? --akim.
2203 export ac_cv_exeext
2204 break;;
ba479fd2 2205 * )
86da66b5 2206 break;;
ba479fd2
NN
2207 esac
2208done
2209else
2210 echo "$as_me: failed program was:" >&5
2211sed 's/^/| /' conftest.$ac_ext >&5
2212
2213{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2214See \`config.log' for more details." >&5
2215echo "$as_me: error: C compiler cannot create executables
2216See \`config.log' for more details." >&2;}
2217 { (exit 77); exit 77; }; }
2218fi
2219
2220ac_exeext=$ac_cv_exeext
2221echo "$as_me:$LINENO: result: $ac_file" >&5
2222echo "${ECHO_T}$ac_file" >&6
2223
2224# Check the compiler produces executables we can run. If not, either
2225# the compiler is broken, or we cross compile.
2226echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2227echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2228# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2229# If not cross compiling, check that we can run a simple program.
2230if test "$cross_compiling" != yes; then
2231 if { ac_try='./$ac_file'
2232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2233 (eval $ac_try) 2>&5
2234 ac_status=$?
2235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2236 (exit $ac_status); }; }; then
2237 cross_compiling=no
6e3f3080 2238 else
ba479fd2
NN
2239 if test "$cross_compiling" = maybe; then
2240 cross_compiling=yes
2241 else
2242 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2243If you meant to cross compile, use \`--host'.
2244See \`config.log' for more details." >&5
2245echo "$as_me: error: cannot run C compiled programs.
2246If you meant to cross compile, use \`--host'.
2247See \`config.log' for more details." >&2;}
2248 { (exit 1); exit 1; }; }
2249 fi
6e3f3080
NN
2250 fi
2251fi
ba479fd2
NN
2252echo "$as_me:$LINENO: result: yes" >&5
2253echo "${ECHO_T}yes" >&6
2254
2255rm -f a.out a.exe conftest$ac_cv_exeext b.out
2256ac_clean_files=$ac_clean_files_save
2257# Check the compiler produces executables we can run. If not, either
2258# the compiler is broken, or we cross compile.
2259echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2260echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2261echo "$as_me:$LINENO: result: $cross_compiling" >&5
2262echo "${ECHO_T}$cross_compiling" >&6
2263
2264echo "$as_me:$LINENO: checking for suffix of executables" >&5
2265echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2267 (eval $ac_link) 2>&5
2268 ac_status=$?
2269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2270 (exit $ac_status); }; then
2271 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2272# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2273# work properly (i.e., refer to `conftest.exe'), while it won't with
2274# `rm'.
2275for ac_file in conftest.exe conftest conftest.*; do
2276 test -f "$ac_file" || continue
2277 case $ac_file in
2278 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2279 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
86da66b5
HPN
2280 export ac_cv_exeext
2281 break;;
ba479fd2
NN
2282 * ) break;;
2283 esac
2284done
e9a25f70 2285else
ba479fd2
NN
2286 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2287See \`config.log' for more details." >&5
2288echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2289See \`config.log' for more details." >&2;}
2290 { (exit 1); exit 1; }; }
2291fi
2292
2293rm -f conftest$ac_cv_exeext
2294echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2295echo "${ECHO_T}$ac_cv_exeext" >&6
2296
2297rm -f conftest.$ac_ext
2298EXEEXT=$ac_cv_exeext
2299ac_exeext=$EXEEXT
2300echo "$as_me:$LINENO: checking for suffix of object files" >&5
2301echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2302if test "${ac_cv_objext+set}" = set; then
2303 echo $ECHO_N "(cached) $ECHO_C" >&6
2304else
2305 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2306/* confdefs.h. */
2307_ACEOF
2308cat confdefs.h >>conftest.$ac_ext
2309cat >>conftest.$ac_ext <<_ACEOF
2310/* end confdefs.h. */
2311
2312int
2313main ()
2314{
6e3f3080 2315
ba479fd2
NN
2316 ;
2317 return 0;
2318}
2319_ACEOF
2320rm -f conftest.o conftest.obj
2321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2322 (eval $ac_compile) 2>&5
2323 ac_status=$?
2324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2325 (exit $ac_status); }; then
2326 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2327 case $ac_file in
2328 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2329 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2330 break;;
2331 esac
2332done
63cf211a 2333else
ba479fd2
NN
2334 echo "$as_me: failed program was:" >&5
2335sed 's/^/| /' conftest.$ac_ext >&5
2336
2337{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2338See \`config.log' for more details." >&5
2339echo "$as_me: error: cannot compute suffix of object files: cannot compile
2340See \`config.log' for more details." >&2;}
2341 { (exit 1); exit 1; }; }
2342fi
2343
2344rm -f conftest.$ac_cv_objext conftest.$ac_ext
2345fi
2346echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2347echo "${ECHO_T}$ac_cv_objext" >&6
2348OBJEXT=$ac_cv_objext
2349ac_objext=$OBJEXT
2350echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2351echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2352if test "${ac_cv_c_compiler_gnu+set}" = set; then
2353 echo $ECHO_N "(cached) $ECHO_C" >&6
2354else
2355 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2356/* confdefs.h. */
2357_ACEOF
2358cat confdefs.h >>conftest.$ac_ext
2359cat >>conftest.$ac_ext <<_ACEOF
2360/* end confdefs.h. */
2361
2362int
2363main ()
2364{
2365#ifndef __GNUC__
2366 choke me
2367#endif
6e3f3080 2368
ba479fd2
NN
2369 ;
2370 return 0;
2371}
2372_ACEOF
2373rm -f conftest.$ac_objext
2374if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2375 (eval $ac_compile) 2>conftest.er1
ba479fd2 2376 ac_status=$?
86da66b5
HPN
2377 grep -v '^ *+' conftest.er1 >conftest.err
2378 rm -f conftest.er1
2379 cat conftest.err >&5
ba479fd2
NN
2380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2381 (exit $ac_status); } &&
fb38008e 2382 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2384 (eval $ac_try) 2>&5
2385 ac_status=$?
2386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2387 (exit $ac_status); }; } &&
2388 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2390 (eval $ac_try) 2>&5
2391 ac_status=$?
2392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2393 (exit $ac_status); }; }; then
2394 ac_compiler_gnu=yes
2395else
2396 echo "$as_me: failed program was:" >&5
2397sed 's/^/| /' conftest.$ac_ext >&5
2398
2399ac_compiler_gnu=no
2400fi
86da66b5 2401rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2402ac_cv_c_compiler_gnu=$ac_compiler_gnu
2403
2404fi
2405echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2406echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2407GCC=`test $ac_compiler_gnu = yes && echo yes`
2408ac_test_CFLAGS=${CFLAGS+set}
2409ac_save_CFLAGS=$CFLAGS
2410CFLAGS="-g"
2411echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2412echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2413if test "${ac_cv_prog_cc_g+set}" = set; then
2414 echo $ECHO_N "(cached) $ECHO_C" >&6
2415else
2416 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2417/* confdefs.h. */
2418_ACEOF
2419cat confdefs.h >>conftest.$ac_ext
2420cat >>conftest.$ac_ext <<_ACEOF
2421/* end confdefs.h. */
2422
2423int
2424main ()
2425{
2426
2427 ;
2428 return 0;
2429}
2430_ACEOF
2431rm -f conftest.$ac_objext
2432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2433 (eval $ac_compile) 2>conftest.er1
ba479fd2 2434 ac_status=$?
86da66b5
HPN
2435 grep -v '^ *+' conftest.er1 >conftest.err
2436 rm -f conftest.er1
2437 cat conftest.err >&5
ba479fd2
NN
2438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2439 (exit $ac_status); } &&
fb38008e 2440 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2442 (eval $ac_try) 2>&5
2443 ac_status=$?
2444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2445 (exit $ac_status); }; } &&
2446 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2448 (eval $ac_try) 2>&5
2449 ac_status=$?
2450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2451 (exit $ac_status); }; }; then
6e3f3080
NN
2452 ac_cv_prog_cc_g=yes
2453else
ba479fd2
NN
2454 echo "$as_me: failed program was:" >&5
2455sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2456
ba479fd2 2457ac_cv_prog_cc_g=no
6e3f3080 2458fi
86da66b5 2459rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2460fi
2461echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2462echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2463if test "$ac_test_CFLAGS" = set; then
ba479fd2 2464 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2465elif test $ac_cv_prog_cc_g = yes; then
2466 if test "$GCC" = yes; then
e9a25f70
JL
2467 CFLAGS="-g -O2"
2468 else
cd9e5e7c 2469 CFLAGS="-g"
81814e35 2470 fi
3723cad9 2471else
cd9e5e7c
MK
2472 if test "$GCC" = yes; then
2473 CFLAGS="-O2"
2474 else
2475 CFLAGS=
2476 fi
e9a25f70 2477fi
ba479fd2
NN
2478echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2479echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2480if test "${ac_cv_prog_cc_stdc+set}" = set; then
2481 echo $ECHO_N "(cached) $ECHO_C" >&6
2482else
2483 ac_cv_prog_cc_stdc=no
2484ac_save_CC=$CC
2485cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2486/* confdefs.h. */
2487_ACEOF
2488cat confdefs.h >>conftest.$ac_ext
2489cat >>conftest.$ac_ext <<_ACEOF
2490/* end confdefs.h. */
2491#include <stdarg.h>
2492#include <stdio.h>
2493#include <sys/types.h>
2494#include <sys/stat.h>
2495/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2496struct buf { int x; };
2497FILE * (*rcsopen) (struct buf *, struct stat *, int);
2498static char *e (p, i)
2499 char **p;
2500 int i;
2501{
2502 return p[i];
2503}
2504static char *f (char * (*g) (char **, int), char **p, ...)
2505{
2506 char *s;
2507 va_list v;
2508 va_start (v,p);
2509 s = g (p, va_arg (v,int));
2510 va_end (v);
2511 return s;
2512}
86da66b5
HPN
2513
2514/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2515 function prototypes and stuff, but not '\xHH' hex character constants.
2516 These don't provoke an error unfortunately, instead are silently treated
2517 as 'x'. The following induces an error, until -std1 is added to get
2518 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2519 array size at least. It's necessary to write '\x00'==0 to get something
2520 that's true only with -std1. */
2521int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2522
ba479fd2
NN
2523int test (int i, double x);
2524struct s1 {int (*f) (int a);};
2525struct s2 {int (*f) (double a);};
2526int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2527int argc;
2528char **argv;
2529int
2530main ()
2531{
2532return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2533 ;
2534 return 0;
2535}
2536_ACEOF
2537# Don't try gcc -ansi; that turns off useful extensions and
2538# breaks some systems' header files.
2539# AIX -qlanglvl=ansi
2540# Ultrix and OSF/1 -std1
2541# HP-UX 10.20 and later -Ae
2542# HP-UX older versions -Aa -D_HPUX_SOURCE
2543# SVR4 -Xc -D__EXTENSIONS__
2544for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2545do
2546 CC="$ac_save_CC $ac_arg"
2547 rm -f conftest.$ac_objext
2548if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2549 (eval $ac_compile) 2>conftest.er1
ba479fd2 2550 ac_status=$?
86da66b5
HPN
2551 grep -v '^ *+' conftest.er1 >conftest.err
2552 rm -f conftest.er1
2553 cat conftest.err >&5
ba479fd2
NN
2554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2555 (exit $ac_status); } &&
fb38008e 2556 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2558 (eval $ac_try) 2>&5
2559 ac_status=$?
2560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2561 (exit $ac_status); }; } &&
2562 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2564 (eval $ac_try) 2>&5
2565 ac_status=$?
2566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2567 (exit $ac_status); }; }; then
2568 ac_cv_prog_cc_stdc=$ac_arg
2569break
2570else
2571 echo "$as_me: failed program was:" >&5
2572sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2573
ba479fd2 2574fi
86da66b5 2575rm -f conftest.err conftest.$ac_objext
ba479fd2
NN
2576done
2577rm -f conftest.$ac_ext conftest.$ac_objext
2578CC=$ac_save_CC
2579
2580fi
2581
2582case "x$ac_cv_prog_cc_stdc" in
2583 x|xno)
2584 echo "$as_me:$LINENO: result: none needed" >&5
2585echo "${ECHO_T}none needed" >&6 ;;
2586 *)
2587 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2588echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2589 CC="$CC $ac_cv_prog_cc_stdc" ;;
2590esac
2591
2592# Some people use a C++ compiler to compile C. Since we use `exit',
2593# in C++ we need to declare it. In case someone uses the same compiler
2594# for both compiling C and C++ we need to have the C++ compiler decide
2595# the declaration of exit, since it's the most demanding environment.
2596cat >conftest.$ac_ext <<_ACEOF
2597#ifndef __cplusplus
2598 choke me
2599#endif
2600_ACEOF
2601rm -f conftest.$ac_objext
2602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2603 (eval $ac_compile) 2>conftest.er1
ba479fd2 2604 ac_status=$?
86da66b5
HPN
2605 grep -v '^ *+' conftest.er1 >conftest.err
2606 rm -f conftest.er1
2607 cat conftest.err >&5
ba479fd2
NN
2608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2609 (exit $ac_status); } &&
fb38008e 2610 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2612 (eval $ac_try) 2>&5
2613 ac_status=$?
2614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2615 (exit $ac_status); }; } &&
2616 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2618 (eval $ac_try) 2>&5
2619 ac_status=$?
2620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2621 (exit $ac_status); }; }; then
2622 for ac_declaration in \
86da66b5 2623 '' \
ba479fd2
NN
2624 'extern "C" void std::exit (int) throw (); using std::exit;' \
2625 'extern "C" void std::exit (int); using std::exit;' \
2626 'extern "C" void exit (int) throw ();' \
2627 'extern "C" void exit (int);' \
2628 'void exit (int);'
2629do
2630 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2631/* confdefs.h. */
2632_ACEOF
2633cat confdefs.h >>conftest.$ac_ext
2634cat >>conftest.$ac_ext <<_ACEOF
2635/* end confdefs.h. */
33e70558 2636$ac_declaration
86da66b5 2637#include <stdlib.h>
ba479fd2
NN
2638int
2639main ()
2640{
2641exit (42);
2642 ;
2643 return 0;
2644}
2645_ACEOF
2646rm -f conftest.$ac_objext
2647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2648 (eval $ac_compile) 2>conftest.er1
ba479fd2 2649 ac_status=$?
86da66b5
HPN
2650 grep -v '^ *+' conftest.er1 >conftest.err
2651 rm -f conftest.er1
2652 cat conftest.err >&5
ba479fd2
NN
2653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2654 (exit $ac_status); } &&
fb38008e 2655 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2657 (eval $ac_try) 2>&5
2658 ac_status=$?
2659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2660 (exit $ac_status); }; } &&
2661 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2663 (eval $ac_try) 2>&5
2664 ac_status=$?
2665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2666 (exit $ac_status); }; }; then
2667 :
2668else
2669 echo "$as_me: failed program was:" >&5
2670sed 's/^/| /' conftest.$ac_ext >&5
2671
2672continue
2673fi
86da66b5 2674rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 2675 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2676/* confdefs.h. */
2677_ACEOF
2678cat confdefs.h >>conftest.$ac_ext
2679cat >>conftest.$ac_ext <<_ACEOF
2680/* end confdefs.h. */
2681$ac_declaration
2682int
2683main ()
2684{
2685exit (42);
2686 ;
2687 return 0;
2688}
2689_ACEOF
2690rm -f conftest.$ac_objext
2691if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2692 (eval $ac_compile) 2>conftest.er1
ba479fd2 2693 ac_status=$?
86da66b5
HPN
2694 grep -v '^ *+' conftest.er1 >conftest.err
2695 rm -f conftest.er1
2696 cat conftest.err >&5
ba479fd2
NN
2697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2698 (exit $ac_status); } &&
fb38008e 2699 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2701 (eval $ac_try) 2>&5
2702 ac_status=$?
2703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2704 (exit $ac_status); }; } &&
2705 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2707 (eval $ac_try) 2>&5
2708 ac_status=$?
2709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2710 (exit $ac_status); }; }; then
2711 break
3ec83fc2 2712else
ba479fd2
NN
2713 echo "$as_me: failed program was:" >&5
2714sed 's/^/| /' conftest.$ac_ext >&5
2715
6e3f3080 2716fi
86da66b5 2717rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2718done
2719rm -f conftest*
2720if test -n "$ac_declaration"; then
2721 echo '#ifdef __cplusplus' >>confdefs.h
2722 echo $ac_declaration >>confdefs.h
2723 echo '#endif' >>confdefs.h
2724fi
2725
3ec83fc2 2726else
ba479fd2
NN
2727 echo "$as_me: failed program was:" >&5
2728sed 's/^/| /' conftest.$ac_ext >&5
2729
2730fi
86da66b5 2731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2732ac_ext=c
2733ac_cpp='$CPP $CPPFLAGS'
2734ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2735ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2736ac_compiler_gnu=$ac_cv_c_compiler_gnu
2737
2738if test "x$CC" != xcc; then
2739 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2740echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2741else
2742 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2743echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2744fi
2745set dummy $CC; ac_cc=`echo $2 |
2746 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2747if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2748 echo $ECHO_N "(cached) $ECHO_C" >&6
2749else
2750 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2751/* confdefs.h. */
2752_ACEOF
2753cat confdefs.h >>conftest.$ac_ext
2754cat >>conftest.$ac_ext <<_ACEOF
2755/* end confdefs.h. */
2756
2757int
2758main ()
2759{
2760
2761 ;
2762 return 0;
2763}
2764_ACEOF
3ec83fc2
RH
2765# Make sure it works both with $CC and with simple cc.
2766# We do the test twice because some compilers refuse to overwrite an
2767# existing .o file with -o, though they will create one.
ba479fd2
NN
2768ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2769if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2770 (eval $ac_try) 2>&5
2771 ac_status=$?
2772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2773 (exit $ac_status); } &&
2774 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2775 (eval $ac_try) 2>&5
2776 ac_status=$?
2777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2778 (exit $ac_status); };
3ec83fc2
RH
2779then
2780 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2781 if test "x$CC" != xcc; then
2782 # Test first that cc exists at all.
ba479fd2
NN
2783 if { ac_try='cc -c conftest.$ac_ext >&5'
2784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2785 (eval $ac_try) 2>&5
2786 ac_status=$?
2787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2788 (exit $ac_status); }; }; then
2789 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2790 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2791 (eval $ac_try) 2>&5
2792 ac_status=$?
2793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2794 (exit $ac_status); } &&
2795 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2796 (eval $ac_try) 2>&5
2797 ac_status=$?
2798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2799 (exit $ac_status); };
3ec83fc2 2800 then
86da66b5
HPN
2801 # cc works too.
2802 :
3ec83fc2 2803 else
86da66b5
HPN
2804 # cc exists but doesn't like -o.
2805 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2806 fi
2807 fi
2808 fi
2809else
2810 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2811fi
2812rm -f conftest*
2813
2814fi
2815if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2816 echo "$as_me:$LINENO: result: yes" >&5
2817echo "${ECHO_T}yes" >&6
3ec83fc2 2818else
ba479fd2
NN
2819 echo "$as_me:$LINENO: result: no" >&5
2820echo "${ECHO_T}no" >&6
2821
2822cat >>confdefs.h <<\_ACEOF
3ec83fc2 2823#define NO_MINUS_C_MINUS_O 1
ba479fd2 2824_ACEOF
3ec83fc2
RH
2825
2826fi
2827
414d23ae
HPN
2828# autoconf is lame and doesn't give us any substitution variable for this.
2829if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2830 NO_MINUS_C_MINUS_O=yes
2831else
2832 OUTPUT_OPTION='-o $@'
2833fi
2834
2835
2836
73458fb7
NN
2837# -------------------------
2838# Check C compiler features
2839# -------------------------
2840
ba479fd2
NN
2841ac_ext=c
2842ac_cpp='$CPP $CPPFLAGS'
2843ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2844ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2845ac_compiler_gnu=$ac_cv_c_compiler_gnu
2846echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2847echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2848# On Suns, sometimes $CPP names a directory.
2849if test -n "$CPP" && test -d "$CPP"; then
2850 CPP=
2851fi
2852if test -z "$CPP"; then
ba479fd2
NN
2853 if test "${ac_cv_prog_CPP+set}" = set; then
2854 echo $ECHO_N "(cached) $ECHO_C" >&6
2855else
2856 # Double quotes because CPP needs to be expanded
2857 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2858 do
2859 ac_preproc_ok=false
2860for ac_c_preproc_warn_flag in '' yes
2861do
2862 # Use a header file that comes with gcc, so configuring glibc
2863 # with a fresh cross-compiler works.
2864 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2865 # <limits.h> exists even on freestanding compilers.
84c041a1 2866 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2867 # not just through cpp. "Syntax error" is here to catch this case.
2868 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2869/* confdefs.h. */
2870_ACEOF
2871cat confdefs.h >>conftest.$ac_ext
2872cat >>conftest.$ac_ext <<_ACEOF
2873/* end confdefs.h. */
2874#ifdef __STDC__
2875# include <limits.h>
2876#else
2877# include <assert.h>
2878#endif
86da66b5 2879 Syntax error
ba479fd2
NN
2880_ACEOF
2881if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2882 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2883 ac_status=$?
2884 grep -v '^ *+' conftest.er1 >conftest.err
2885 rm -f conftest.er1
2886 cat conftest.err >&5
2887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2888 (exit $ac_status); } >/dev/null; then
2889 if test -s conftest.err; then
2890 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2891 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2892 else
2893 ac_cpp_err=
2894 fi
2895else
2896 ac_cpp_err=yes
2897fi
2898if test -z "$ac_cpp_err"; then
093e61a6 2899 :
cafe096b 2900else
ba479fd2
NN
2901 echo "$as_me: failed program was:" >&5
2902sed 's/^/| /' conftest.$ac_ext >&5
2903
2904 # Broken: fails on valid input.
2905continue
2906fi
2907rm -f conftest.err conftest.$ac_ext
2908
2909 # OK, works on sane cases. Now check whether non-existent headers
2910 # can be detected and how.
2911 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2912/* confdefs.h. */
2913_ACEOF
2914cat confdefs.h >>conftest.$ac_ext
2915cat >>conftest.$ac_ext <<_ACEOF
2916/* end confdefs.h. */
2917#include <ac_nonexistent.h>
2918_ACEOF
2919if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2920 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2921 ac_status=$?
2922 grep -v '^ *+' conftest.er1 >conftest.err
2923 rm -f conftest.er1
2924 cat conftest.err >&5
2925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2926 (exit $ac_status); } >/dev/null; then
2927 if test -s conftest.err; then
2928 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2929 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2930 else
2931 ac_cpp_err=
2932 fi
2933else
2934 ac_cpp_err=yes
2935fi
2936if test -z "$ac_cpp_err"; then
2937 # Broken: success on invalid input.
2938continue
2939else
2940 echo "$as_me: failed program was:" >&5
2941sed 's/^/| /' conftest.$ac_ext >&5
2942
2943 # Passes both tests.
2944ac_preproc_ok=:
2945break
2946fi
2947rm -f conftest.err conftest.$ac_ext
2948
2949done
2950# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2951rm -f conftest.err conftest.$ac_ext
2952if $ac_preproc_ok; then
2953 break
2954fi
2955
2956 done
2957 ac_cv_prog_CPP=$CPP
2958
2959fi
2960 CPP=$ac_cv_prog_CPP
2961else
2962 ac_cv_prog_CPP=$CPP
2963fi
2964echo "$as_me:$LINENO: result: $CPP" >&5
2965echo "${ECHO_T}$CPP" >&6
2966ac_preproc_ok=false
2967for ac_c_preproc_warn_flag in '' yes
2968do
2969 # Use a header file that comes with gcc, so configuring glibc
2970 # with a fresh cross-compiler works.
2971 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2972 # <limits.h> exists even on freestanding compilers.
2973 # On the NeXT, cc -E runs the code through the compiler's parser,
2974 # not just through cpp. "Syntax error" is here to catch this case.
2975 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2976/* confdefs.h. */
2977_ACEOF
2978cat confdefs.h >>conftest.$ac_ext
2979cat >>conftest.$ac_ext <<_ACEOF
2980/* end confdefs.h. */
2981#ifdef __STDC__
2982# include <limits.h>
2983#else
2984# include <assert.h>
2985#endif
86da66b5 2986 Syntax error
ba479fd2
NN
2987_ACEOF
2988if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2989 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2990 ac_status=$?
2991 grep -v '^ *+' conftest.er1 >conftest.err
2992 rm -f conftest.er1
2993 cat conftest.err >&5
2994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2995 (exit $ac_status); } >/dev/null; then
2996 if test -s conftest.err; then
2997 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2998 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2999 else
3000 ac_cpp_err=
3001 fi
3002else
3003 ac_cpp_err=yes
3004fi
3005if test -z "$ac_cpp_err"; then
6e3f3080 3006 :
414d23ae 3007else
ba479fd2
NN
3008 echo "$as_me: failed program was:" >&5
3009sed 's/^/| /' conftest.$ac_ext >&5
3010
3011 # Broken: fails on valid input.
3012continue
3013fi
3014rm -f conftest.err conftest.$ac_ext
3015
3016 # OK, works on sane cases. Now check whether non-existent headers
3017 # can be detected and how.
3018 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3019/* confdefs.h. */
3020_ACEOF
3021cat confdefs.h >>conftest.$ac_ext
3022cat >>conftest.$ac_ext <<_ACEOF
3023/* end confdefs.h. */
3024#include <ac_nonexistent.h>
3025_ACEOF
3026if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3027 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3028 ac_status=$?
3029 grep -v '^ *+' conftest.er1 >conftest.err
3030 rm -f conftest.er1
3031 cat conftest.err >&5
3032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3033 (exit $ac_status); } >/dev/null; then
3034 if test -s conftest.err; then
3035 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3036 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3037 else
3038 ac_cpp_err=
3039 fi
6e3f3080 3040else
ba479fd2 3041 ac_cpp_err=yes
63cf211a 3042fi
ba479fd2
NN
3043if test -z "$ac_cpp_err"; then
3044 # Broken: success on invalid input.
3045continue
3046else
3047 echo "$as_me: failed program was:" >&5
3048sed 's/^/| /' conftest.$ac_ext >&5
3049
3050 # Passes both tests.
3051ac_preproc_ok=:
3052break
63cf211a 3053fi
ba479fd2
NN
3054rm -f conftest.err conftest.$ac_ext
3055
3056done
3057# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3058rm -f conftest.err conftest.$ac_ext
3059if $ac_preproc_ok; then
3060 :
6e3f3080 3061else
ba479fd2
NN
3062 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3063See \`config.log' for more details." >&5
3064echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3065See \`config.log' for more details." >&2;}
3066 { (exit 1); exit 1; }; }
6e3f3080
NN
3067fi
3068
ba479fd2
NN
3069ac_ext=c
3070ac_cpp='$CPP $CPPFLAGS'
3071ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3072ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3073ac_compiler_gnu=$ac_cv_c_compiler_gnu
3074
b5472e1d 3075
ba479fd2
NN
3076echo "$as_me:$LINENO: checking for inline" >&5
3077echo $ECHO_N "checking for inline... $ECHO_C" >&6
3078if test "${ac_cv_c_inline+set}" = set; then
3079 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3080else
3081 ac_cv_c_inline=no
3082for ac_kw in inline __inline__ __inline; do
ba479fd2 3083 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3084/* confdefs.h. */
3085_ACEOF
3086cat confdefs.h >>conftest.$ac_ext
3087cat >>conftest.$ac_ext <<_ACEOF
3088/* end confdefs.h. */
3089#ifndef __cplusplus
3090typedef int foo_t;
3091static $ac_kw foo_t static_foo () {return 0; }
3092$ac_kw foo_t foo () {return 0; }
3093#endif
414d23ae 3094
ba479fd2
NN
3095_ACEOF
3096rm -f conftest.$ac_objext
3097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3098 (eval $ac_compile) 2>conftest.er1
ba479fd2 3099 ac_status=$?
86da66b5
HPN
3100 grep -v '^ *+' conftest.er1 >conftest.err
3101 rm -f conftest.er1
3102 cat conftest.err >&5
ba479fd2
NN
3103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3104 (exit $ac_status); } &&
fb38008e 3105 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
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); }; } &&
3111 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3113 (eval $ac_try) 2>&5
3114 ac_status=$?
3115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3116 (exit $ac_status); }; }; then
414d23ae
HPN
3117 ac_cv_c_inline=$ac_kw; break
3118else
ba479fd2
NN
3119 echo "$as_me: failed program was:" >&5
3120sed 's/^/| /' conftest.$ac_ext >&5
3121
414d23ae 3122fi
86da66b5 3123rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3124done
3125
3126fi
ba479fd2
NN
3127echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3128echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3129
3130
ba479fd2 3131case $ac_cv_c_inline in
414d23ae 3132 inline | yes) ;;
86da66b5
HPN
3133 *)
3134 case $ac_cv_c_inline in
3135 no) ac_val=;;
3136 *) ac_val=$ac_cv_c_inline;;
3137 esac
3138 cat >>confdefs.h <<_ACEOF
3139#ifndef __cplusplus
3140#define inline $ac_val
3141#endif
ba479fd2 3142_ACEOF
86da66b5 3143 ;;
414d23ae
HPN
3144esac
3145
414d23ae 3146
ba479fd2
NN
3147echo "$as_me:$LINENO: checking for long long int" >&5
3148echo $ECHO_N "checking for long long int... $ECHO_C" >&6
3149if test "${ac_cv_c_long_long+set}" = set; then
3150 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3151else
ba479fd2 3152 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3153/* confdefs.h. */
3154_ACEOF
3155cat confdefs.h >>conftest.$ac_ext
3156cat >>conftest.$ac_ext <<_ACEOF
3157/* end confdefs.h. */
414d23ae 3158
ba479fd2
NN
3159int
3160main ()
3161{
414d23ae 3162long long int i;
ba479fd2
NN
3163 ;
3164 return 0;
3165}
3166_ACEOF
3167rm -f conftest.$ac_objext
3168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3169 (eval $ac_compile) 2>conftest.er1
ba479fd2 3170 ac_status=$?
86da66b5
HPN
3171 grep -v '^ *+' conftest.er1 >conftest.err
3172 rm -f conftest.er1
3173 cat conftest.err >&5
ba479fd2
NN
3174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3175 (exit $ac_status); } &&
fb38008e 3176 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
3177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3178 (eval $ac_try) 2>&5
3179 ac_status=$?
3180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3181 (exit $ac_status); }; } &&
3182 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3184 (eval $ac_try) 2>&5
3185 ac_status=$?
3186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3187 (exit $ac_status); }; }; then
414d23ae
HPN
3188 ac_cv_c_long_long=yes
3189else
ba479fd2
NN
3190 echo "$as_me: failed program was:" >&5
3191sed 's/^/| /' conftest.$ac_ext >&5
3192
3193ac_cv_c_long_long=no
414d23ae 3194fi
86da66b5 3195rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3196fi
ba479fd2
NN
3197echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5
3198echo "${ECHO_T}$ac_cv_c_long_long" >&6
63cf211a 3199 if test $ac_cv_c_long_long = yes; then
ba479fd2
NN
3200
3201cat >>confdefs.h <<\_ACEOF
414d23ae 3202#define HAVE_LONG_LONG 1
ba479fd2 3203_ACEOF
414d23ae
HPN
3204
3205 fi
ba479fd2
NN
3206echo "$as_me:$LINENO: checking for __int64" >&5
3207echo $ECHO_N "checking for __int64... $ECHO_C" >&6
3208if test "${ac_cv_c___int64+set}" = set; then
3209 echo $ECHO_N "(cached) $ECHO_C" >&6
3210else
3211 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3212/* confdefs.h. */
3213_ACEOF
3214cat confdefs.h >>conftest.$ac_ext
3215cat >>conftest.$ac_ext <<_ACEOF
3216/* end confdefs.h. */
3217
3218int
3219main ()
3220{
414d23ae 3221__int64 i;
ba479fd2
NN
3222 ;
3223 return 0;
3224}
3225_ACEOF
3226rm -f conftest.$ac_objext
3227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3228 (eval $ac_compile) 2>conftest.er1
ba479fd2 3229 ac_status=$?
86da66b5
HPN
3230 grep -v '^ *+' conftest.er1 >conftest.err
3231 rm -f conftest.er1
3232 cat conftest.err >&5
ba479fd2
NN
3233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3234 (exit $ac_status); } &&
fb38008e 3235 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
3236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3237 (eval $ac_try) 2>&5
3238 ac_status=$?
3239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3240 (exit $ac_status); }; } &&
3241 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3243 (eval $ac_try) 2>&5
3244 ac_status=$?
3245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3246 (exit $ac_status); }; }; then
414d23ae
HPN
3247 ac_cv_c___int64=yes
3248else
ba479fd2
NN
3249 echo "$as_me: failed program was:" >&5
3250sed 's/^/| /' conftest.$ac_ext >&5
3251
3252ac_cv_c___int64=no
414d23ae 3253fi
86da66b5 3254rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3255fi
ba479fd2
NN
3256echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5
3257echo "${ECHO_T}$ac_cv_c___int64" >&6
63cf211a 3258 if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3259
3260cat >>confdefs.h <<\_ACEOF
414d23ae 3261#define HAVE___INT64 1
ba479fd2 3262_ACEOF
414d23ae
HPN
3263
3264 fi
3265
414d23ae
HPN
3266
3267# sizeof(char) is 1 by definition.
ba479fd2
NN
3268echo "$as_me:$LINENO: checking size of void *" >&5
3269echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3270if test "${ac_cv_sizeof_void_p+set}" = set; then
3271 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd
KG
3272else
3273 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2 3274 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3275/* confdefs.h. */
3276_ACEOF
3277cat confdefs.h >>conftest.$ac_ext
3278cat >>conftest.$ac_ext <<_ACEOF
3279/* end confdefs.h. */
75b6f3fd
KG
3280#include "confdefs.h"
3281#include <sys/types.h>
3282
3283
ba479fd2
NN
3284int
3285main ()
3286{
75b6f3fd 3287switch (0) case 0: case (sizeof (void *) == $ac_size):;
ba479fd2
NN
3288 ;
3289 return 0;
3290}
3291_ACEOF
3292rm -f conftest.$ac_objext
3293if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3294 (eval $ac_compile) 2>conftest.er1
ba479fd2 3295 ac_status=$?
86da66b5
HPN
3296 grep -v '^ *+' conftest.er1 >conftest.err
3297 rm -f conftest.er1
3298 cat conftest.err >&5
ba479fd2
NN
3299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3300 (exit $ac_status); } &&
fb38008e 3301 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
3302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3303 (eval $ac_try) 2>&5
3304 ac_status=$?
3305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3306 (exit $ac_status); }; } &&
3307 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3309 (eval $ac_try) 2>&5
3310 ac_status=$?
3311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3312 (exit $ac_status); }; }; then
75b6f3fd
KG
3313 ac_cv_sizeof_void_p=$ac_size
3314else
ba479fd2
NN
3315 echo "$as_me: failed program was:" >&5
3316sed 's/^/| /' conftest.$ac_ext >&5
3317
75b6f3fd 3318fi
86da66b5 3319rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd
KG
3320 if test x$ac_cv_sizeof_void_p != x ; then break; fi
3321done
3322
3323fi
3324
3325if test x$ac_cv_sizeof_void_p = x ; then
ba479fd2
NN
3326 { { echo "$as_me:$LINENO: error: cannot determine a size for void *" >&5
3327echo "$as_me: error: cannot determine a size for void *" >&2;}
3328 { (exit 1); exit 1; }; }
75b6f3fd 3329fi
ba479fd2
NN
3330echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3331echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3332
3333cat >>confdefs.h <<_ACEOF
75b6f3fd 3334#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
ba479fd2 3335_ACEOF
75b6f3fd
KG
3336
3337
ba479fd2
NN
3338echo "$as_me:$LINENO: checking size of short" >&5
3339echo $ECHO_N "checking size of short... $ECHO_C" >&6
3340if test "${ac_cv_sizeof_short+set}" = set; then
3341 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3342else
4977bab6 3343 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2 3344 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3345/* confdefs.h. */
3346_ACEOF
3347cat confdefs.h >>conftest.$ac_ext
3348cat >>conftest.$ac_ext <<_ACEOF
3349/* end confdefs.h. */
414d23ae
HPN
3350#include "confdefs.h"
3351#include <sys/types.h>
3352
3353
ba479fd2
NN
3354int
3355main ()
3356{
414d23ae 3357switch (0) case 0: case (sizeof (short) == $ac_size):;
ba479fd2
NN
3358 ;
3359 return 0;
3360}
3361_ACEOF
3362rm -f conftest.$ac_objext
3363if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3364 (eval $ac_compile) 2>conftest.er1
ba479fd2 3365 ac_status=$?
86da66b5
HPN
3366 grep -v '^ *+' conftest.er1 >conftest.err
3367 rm -f conftest.er1
3368 cat conftest.err >&5
ba479fd2
NN
3369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3370 (exit $ac_status); } &&
fb38008e 3371 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
3372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3373 (eval $ac_try) 2>&5
3374 ac_status=$?
3375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3376 (exit $ac_status); }; } &&
3377 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3379 (eval $ac_try) 2>&5
3380 ac_status=$?
3381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3382 (exit $ac_status); }; }; then
414d23ae
HPN
3383 ac_cv_sizeof_short=$ac_size
3384else
ba479fd2
NN
3385 echo "$as_me: failed program was:" >&5
3386sed 's/^/| /' conftest.$ac_ext >&5
3387
84c041a1 3388fi
86da66b5 3389rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3390 if test x$ac_cv_sizeof_short != x ; then break; fi
3391done
3392
84c041a1 3393fi
414d23ae
HPN
3394
3395if test x$ac_cv_sizeof_short = x ; then
ba479fd2
NN
3396 { { echo "$as_me:$LINENO: error: cannot determine a size for short" >&5
3397echo "$as_me: error: cannot determine a size for short" >&2;}
3398 { (exit 1); exit 1; }; }
84c041a1 3399fi
ba479fd2
NN
3400echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
3401echo "${ECHO_T}$ac_cv_sizeof_short" >&6
3402
3403cat >>confdefs.h <<_ACEOF
414d23ae 3404#define SIZEOF_SHORT $ac_cv_sizeof_short
ba479fd2 3405_ACEOF
84c041a1 3406
414d23ae 3407
ba479fd2
NN
3408echo "$as_me:$LINENO: checking size of int" >&5
3409echo $ECHO_N "checking size of int... $ECHO_C" >&6
3410if test "${ac_cv_sizeof_int+set}" = set; then
3411 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3412else
4977bab6 3413 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2 3414 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3415/* confdefs.h. */
3416_ACEOF
3417cat confdefs.h >>conftest.$ac_ext
3418cat >>conftest.$ac_ext <<_ACEOF
3419/* end confdefs.h. */
414d23ae
HPN
3420#include "confdefs.h"
3421#include <sys/types.h>
3422
75e93faa 3423
ba479fd2
NN
3424int
3425main ()
3426{
414d23ae 3427switch (0) case 0: case (sizeof (int) == $ac_size):;
ba479fd2
NN
3428 ;
3429 return 0;
3430}
3431_ACEOF
3432rm -f conftest.$ac_objext
3433if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3434 (eval $ac_compile) 2>conftest.er1
ba479fd2 3435 ac_status=$?
86da66b5
HPN
3436 grep -v '^ *+' conftest.er1 >conftest.err
3437 rm -f conftest.er1
3438 cat conftest.err >&5
ba479fd2
NN
3439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3440 (exit $ac_status); } &&
fb38008e 3441 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
3442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3443 (eval $ac_try) 2>&5
3444 ac_status=$?
3445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3446 (exit $ac_status); }; } &&
3447 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3449 (eval $ac_try) 2>&5
3450 ac_status=$?
3451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3452 (exit $ac_status); }; }; then
414d23ae 3453 ac_cv_sizeof_int=$ac_size
75e93faa 3454else
ba479fd2
NN
3455 echo "$as_me: failed program was:" >&5
3456sed 's/^/| /' conftest.$ac_ext >&5
3457
75e93faa 3458fi
86da66b5 3459rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3460 if test x$ac_cv_sizeof_int != x ; then break; fi
75e93faa
ZW
3461done
3462
3463fi
3464
414d23ae 3465if test x$ac_cv_sizeof_int = x ; then
ba479fd2
NN
3466 { { echo "$as_me:$LINENO: error: cannot determine a size for int" >&5
3467echo "$as_me: error: cannot determine a size for int" >&2;}
3468 { (exit 1); exit 1; }; }
414d23ae 3469fi
ba479fd2
NN
3470echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
3471echo "${ECHO_T}$ac_cv_sizeof_int" >&6
3472
3473cat >>confdefs.h <<_ACEOF
414d23ae 3474#define SIZEOF_INT $ac_cv_sizeof_int
ba479fd2 3475_ACEOF
75e93faa 3476
414d23ae 3477
ba479fd2
NN
3478echo "$as_me:$LINENO: checking size of long" >&5
3479echo $ECHO_N "checking size of long... $ECHO_C" >&6
3480if test "${ac_cv_sizeof_long+set}" = set; then
3481 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3482else
4977bab6 3483 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2 3484 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3485/* confdefs.h. */
3486_ACEOF
3487cat confdefs.h >>conftest.$ac_ext
3488cat >>conftest.$ac_ext <<_ACEOF
3489/* end confdefs.h. */
75e93faa 3490#include "confdefs.h"
414d23ae
HPN
3491#include <sys/types.h>
3492
75e93faa 3493
ba479fd2
NN
3494int
3495main ()
3496{
414d23ae 3497switch (0) case 0: case (sizeof (long) == $ac_size):;
ba479fd2
NN
3498 ;
3499 return 0;
3500}
3501_ACEOF
3502rm -f conftest.$ac_objext
3503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3504 (eval $ac_compile) 2>conftest.er1
ba479fd2 3505 ac_status=$?
86da66b5
HPN
3506 grep -v '^ *+' conftest.er1 >conftest.err
3507 rm -f conftest.er1
3508 cat conftest.err >&5
ba479fd2
NN
3509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3510 (exit $ac_status); } &&
fb38008e 3511 { ac_try='test -z "$ac_c_werror_flag" || 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); } &&
fb38008e 3582 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
3583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3584 (eval $ac_try) 2>&5
3585 ac_status=$?
3586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3587 (exit $ac_status); }; } &&
3588 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3590 (eval $ac_try) 2>&5
3591 ac_status=$?
3592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3593 (exit $ac_status); }; }; then
414d23ae 3594 ac_cv_sizeof_long_long=$ac_size
04cabffc 3595else
ba479fd2
NN
3596 echo "$as_me: failed program was:" >&5
3597sed 's/^/| /' conftest.$ac_ext >&5
3598
04cabffc 3599fi
86da66b5 3600rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3601 if test x$ac_cv_sizeof_long_long != x ; then break; fi
3602done
3603
04cabffc
KG
3604fi
3605
414d23ae 3606if test x$ac_cv_sizeof_long_long = x ; then
ba479fd2
NN
3607 { { echo "$as_me:$LINENO: error: cannot determine a size for long long" >&5
3608echo "$as_me: error: cannot determine a size for long long" >&2;}
3609 { (exit 1); exit 1; }; }
414d23ae 3610fi
ba479fd2
NN
3611echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
3612echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
3613
3614cat >>confdefs.h <<_ACEOF
414d23ae 3615#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
ba479fd2 3616_ACEOF
04cabffc 3617
04cabffc 3618
414d23ae
HPN
3619fi
3620if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3621 echo "$as_me:$LINENO: checking size of __int64" >&5
3622echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
3623if test "${ac_cv_sizeof___int64+set}" = set; then
3624 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3625else
4977bab6 3626 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2 3627 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3628/* confdefs.h. */
3629_ACEOF
3630cat confdefs.h >>conftest.$ac_ext
3631cat >>conftest.$ac_ext <<_ACEOF
3632/* end confdefs.h. */
414d23ae
HPN
3633#include "confdefs.h"
3634#include <sys/types.h>
3635
61842080 3636
ba479fd2
NN
3637int
3638main ()
3639{
414d23ae 3640switch (0) case 0: case (sizeof (__int64) == $ac_size):;
ba479fd2
NN
3641 ;
3642 return 0;
3643}
3644_ACEOF
3645rm -f conftest.$ac_objext
3646if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3647 (eval $ac_compile) 2>conftest.er1
ba479fd2 3648 ac_status=$?
86da66b5
HPN
3649 grep -v '^ *+' conftest.er1 >conftest.err
3650 rm -f conftest.er1
3651 cat conftest.err >&5
ba479fd2
NN
3652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3653 (exit $ac_status); } &&
fb38008e 3654 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
3655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3656 (eval $ac_try) 2>&5
3657 ac_status=$?
3658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3659 (exit $ac_status); }; } &&
3660 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3662 (eval $ac_try) 2>&5
3663 ac_status=$?
3664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3665 (exit $ac_status); }; }; then
414d23ae 3666 ac_cv_sizeof___int64=$ac_size
75e93faa 3667else
ba479fd2
NN
3668 echo "$as_me: failed program was:" >&5
3669sed 's/^/| /' conftest.$ac_ext >&5
3670
75e93faa 3671fi
86da66b5 3672rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3673 if test x$ac_cv_sizeof___int64 != x ; then break; fi
3674done
3675
75e93faa
ZW
3676fi
3677
414d23ae 3678if test x$ac_cv_sizeof___int64 = x ; then
ba479fd2
NN
3679 { { echo "$as_me:$LINENO: error: cannot determine a size for __int64" >&5
3680echo "$as_me: error: cannot determine a size for __int64" >&2;}
3681 { (exit 1); exit 1; }; }
414d23ae 3682fi
ba479fd2
NN
3683echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
3684echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
3685
3686cat >>confdefs.h <<_ACEOF
414d23ae 3687#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 3688_ACEOF
414d23ae 3689
cafe096b 3690
414d23ae
HPN
3691fi
3692
34a86c2b
NN
3693# ---------------------
3694# Warnings and checking
3695# ---------------------
3696
b5472e1d
NN
3697# Check $CC warning features (if it's GCC).
3698# We want to use -pedantic, but we don't want warnings about
3699# * 'long long'
3700# * variadic macros
3701# So, we only use -pedantic if we can disable those warnings.
3702
3703echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
3704echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
3705if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
3706 echo $ECHO_N "(cached) $ECHO_C" >&6
3707else
3708 save_CFLAGS="$CFLAGS"
3709 CFLAGS="-Wno-long-long"
3710 cat >conftest.$ac_ext <<_ACEOF
3711/* confdefs.h. */
3712_ACEOF
3713cat confdefs.h >>conftest.$ac_ext
3714cat >>conftest.$ac_ext <<_ACEOF
3715/* end confdefs.h. */
3716
3717_ACEOF
3718rm -f conftest.$ac_objext
3719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3720 (eval $ac_compile) 2>conftest.er1
3721 ac_status=$?
3722 grep -v '^ *+' conftest.er1 >conftest.err
3723 rm -f conftest.er1
3724 cat conftest.err >&5
3725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3726 (exit $ac_status); } &&
fb38008e 3727 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
b5472e1d
NN
3728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3729 (eval $ac_try) 2>&5
3730 ac_status=$?
3731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3732 (exit $ac_status); }; } &&
3733 { ac_try='test -s conftest.$ac_objext'
3734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3735 (eval $ac_try) 2>&5
3736 ac_status=$?
3737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3738 (exit $ac_status); }; }; then
3739 ac_cv_prog_cc_w_no_long_long=yes
3740else
3741 echo "$as_me: failed program was:" >&5
3742sed 's/^/| /' conftest.$ac_ext >&5
3743
3744ac_cv_prog_cc_w_no_long_long=no
3745fi
3746rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3747 CFLAGS="$save_CFLAGS"
3748
3749fi
3750echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
3751echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
3752
3753echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
3754echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
3755if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
3756 echo $ECHO_N "(cached) $ECHO_C" >&6
3757else
3758 save_CFLAGS="$CFLAGS"
3759 CFLAGS="-Wno-variadic-macros"
3760 cat >conftest.$ac_ext <<_ACEOF
3761/* confdefs.h. */
3762_ACEOF
3763cat confdefs.h >>conftest.$ac_ext
3764cat >>conftest.$ac_ext <<_ACEOF
3765/* end confdefs.h. */
3766
3767_ACEOF
3768rm -f conftest.$ac_objext
3769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3770 (eval $ac_compile) 2>conftest.er1
3771 ac_status=$?
3772 grep -v '^ *+' conftest.er1 >conftest.err
3773 rm -f conftest.er1
3774 cat conftest.err >&5
3775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3776 (exit $ac_status); } &&
fb38008e 3777 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
b5472e1d
NN
3778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3779 (eval $ac_try) 2>&5
3780 ac_status=$?
3781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3782 (exit $ac_status); }; } &&
3783 { ac_try='test -s conftest.$ac_objext'
3784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3785 (eval $ac_try) 2>&5
3786 ac_status=$?
3787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3788 (exit $ac_status); }; }; then
3789 ac_cv_prog_cc_w_no_variadic_macros=yes
3790else
3791 echo "$as_me: failed program was:" >&5
3792sed 's/^/| /' conftest.$ac_ext >&5
3793
3794ac_cv_prog_cc_w_no_variadic_macros=no
3795fi
3796rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3797 CFLAGS="$save_CFLAGS"
3798
3799fi
3800echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
3801echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
3802
34a86c2b 3803strict1_warn=
b5472e1d
NN
3804if test $ac_cv_prog_cc_w_no_long_long = yes \
3805 && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then
3806 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros"
34a86c2b
NN
3807fi
3808
3809
643d3bd2
NN
3810# Add -Wold-style-definition if it's accepted
3811echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
3812echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
3813if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
3814 echo $ECHO_N "(cached) $ECHO_C" >&6
3815else
3816 save_CFLAGS="$CFLAGS"
3817 CFLAGS="-Wold-style-definition"
3818 cat >conftest.$ac_ext <<_ACEOF
3819/* confdefs.h. */
3820_ACEOF
3821cat confdefs.h >>conftest.$ac_ext
3822cat >>conftest.$ac_ext <<_ACEOF
3823/* end confdefs.h. */
3824
3825_ACEOF
3826rm -f conftest.$ac_objext
3827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3828 (eval $ac_compile) 2>conftest.er1
3829 ac_status=$?
3830 grep -v '^ *+' conftest.er1 >conftest.err
3831 rm -f conftest.er1
3832 cat conftest.err >&5
3833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3834 (exit $ac_status); } &&
fb38008e 3835 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
643d3bd2
NN
3836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3837 (eval $ac_try) 2>&5
3838 ac_status=$?
3839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3840 (exit $ac_status); }; } &&
3841 { ac_try='test -s conftest.$ac_objext'
3842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3843 (eval $ac_try) 2>&5
3844 ac_status=$?
3845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3846 (exit $ac_status); }; }; then
3847 ac_cv_prog_cc_w_old_style_definition=yes
3848else
3849 echo "$as_me: failed program was:" >&5
3850sed 's/^/| /' conftest.$ac_ext >&5
3851
3852ac_cv_prog_cc_w_old_style_definition=no
3853fi
3854rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3855 CFLAGS="$save_CFLAGS"
3856
3857fi
3858echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
3859echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
3860if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
3861 strict1_warn="${strict1_warn} -Wold-style-definition"
3862fi
3863
09a9c095
NN
3864# Enable -Werror, period.
3865# Check whether --enable-werror_always or --disable-werror_always was given.
3866if test "${enable_werror_always+set}" = set; then
3867 enableval="$enable_werror_always"
3868
3869else
3870 enable_werror_always=no
3871fi;
3872if test x${enable_werror_always} = xyes ; then
3873 strict1_warn="${strict1_warn} -Werror"
3874 WERROR=-Werror
3875fi
3876
ba479fd2 3877# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
3878# That's useful for people building cross-compilers, or just running a
3879# quick `make'.
3880warn_cflags=
3881if test "x$GCC" = "xyes"; then
3882 warn_cflags='$(GCC_WARN_CFLAGS)'
3883fi
3884
3885
dd859b8a
KG
3886# Enable -Werror in bootstrap stage2 and later.
3887# Change the default to "no" on release branches.
3888# Check whether --enable-werror or --disable-werror was given.
3889if test "${enable_werror+set}" = set; then
3890 enableval="$enable_werror"
ba479fd2 3891
dd859b8a
KG
3892else
3893 enable_werror=yes
ba479fd2 3894fi;
dd859b8a
KG
3895if test x$enable_werror = xyes ; then
3896 WERROR=-Werror
3897fi
3898
3899
414d23ae
HPN
3900# Enable expensive internal checks
3901# Check whether --enable-checking or --disable-checking was given.
3902if test "${enable_checking+set}" = set; then
3903 enableval="$enable_checking"
3904 ac_checking=
3905ac_tree_checking=
3906ac_rtl_checking=
3907ac_rtlflag_checking=
3908ac_gc_checking=
3909ac_gc_always_collect=
5dfa45d0 3910ac_fold_checking=
414d23ae
HPN
3911case "${enableval}" in
3912yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
3913 ac_rtlflag_checking=1 ;;
3914no) ;;
3915*) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
3916 set fnord $enableval; shift
3917 IFS="$ac_save_IFS"
3918 for check
3919 do
3920 case $check in
d2640b91
PE
3921 fold) ac_fold_checking=1 ;;
3922 gc) ac_gc_checking=1 ;;
3923 gcac) ac_gc_always_collect=1 ;;
414d23ae 3924 misc) ac_checking=1 ;;
414d23ae
HPN
3925 rtlflag) ac_rtlflag_checking=1 ;;
3926 rtl) ac_rtl_checking=1 ;;
d2640b91 3927 tree) ac_tree_checking=1 ;;
414d23ae 3928 valgrind) ac_checking_valgrind=1 ;;
ba479fd2
NN
3929 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
3930echo "$as_me: error: unknown check category $check" >&2;}
3931 { (exit 1); exit 1; }; } ;;
414d23ae
HPN
3932 esac
3933 done
3934 ;;
3935esac
3936
75e93faa 3937else
414d23ae
HPN
3938 # Enable some checks by default for development versions of GCC
3939ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
ba479fd2
NN
3940fi;
3941nocommon_flag=""
3942if test x$ac_checking != x ; then
3943
3944cat >>confdefs.h <<\_ACEOF
3945#define ENABLE_CHECKING 1
3946_ACEOF
3947
3948 nocommon_flag=-fno-common
3949fi
3950
3951if test x$ac_tree_checking != x ; then
3952
3953cat >>confdefs.h <<\_ACEOF
3954#define ENABLE_TREE_CHECKING 1
3955_ACEOF
3956
13f05fd0 3957 TREEBROWSER=tree-browser.o
ba479fd2 3958fi
13f05fd0 3959
ba479fd2
NN
3960if test x$ac_rtl_checking != x ; then
3961
3962cat >>confdefs.h <<\_ACEOF
3963#define ENABLE_RTL_CHECKING 1
3964_ACEOF
3965
3966fi
3967if test x$ac_rtlflag_checking != x ; then
3968
3969cat >>confdefs.h <<\_ACEOF
3970#define ENABLE_RTL_FLAG_CHECKING 1
3971_ACEOF
3972
3973fi
3974if test x$ac_gc_checking != x ; then
3975
3976cat >>confdefs.h <<\_ACEOF
3977#define ENABLE_GC_CHECKING 1
3978_ACEOF
3979
3980fi
3981if test x$ac_gc_always_collect != x ; then
3982
3983cat >>confdefs.h <<\_ACEOF
3984#define ENABLE_GC_ALWAYS_COLLECT 1
3985_ACEOF
3986
3987fi
3988if test x$ac_fold_checking != x ; then
3989
3990cat >>confdefs.h <<\_ACEOF
3991#define ENABLE_FOLD_CHECKING 1
3992_ACEOF
3993
3994fi
3995valgrind_path_defines=
3996valgrind_command=
3997
3998
3999echo "$as_me:$LINENO: checking for egrep" >&5
4000echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4001if test "${ac_cv_prog_egrep+set}" = set; then
4002 echo $ECHO_N "(cached) $ECHO_C" >&6
4003else
4004 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4005 then ac_cv_prog_egrep='grep -E'
4006 else ac_cv_prog_egrep='egrep'
4007 fi
4008fi
4009echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4010echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4011 EGREP=$ac_cv_prog_egrep
4012
4013
4014echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4015echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4016if test "${ac_cv_header_stdc+set}" = set; then
4017 echo $ECHO_N "(cached) $ECHO_C" >&6
4018else
4019 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4020/* confdefs.h. */
4021_ACEOF
4022cat confdefs.h >>conftest.$ac_ext
4023cat >>conftest.$ac_ext <<_ACEOF
4024/* end confdefs.h. */
4025#include <stdlib.h>
4026#include <stdarg.h>
4027#include <string.h>
4028#include <float.h>
4029
4030int
4031main ()
4032{
4033
4034 ;
4035 return 0;
4036}
4037_ACEOF
4038rm -f conftest.$ac_objext
4039if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 4040 (eval $ac_compile) 2>conftest.er1
ba479fd2 4041 ac_status=$?
86da66b5
HPN
4042 grep -v '^ *+' conftest.er1 >conftest.err
4043 rm -f conftest.er1
4044 cat conftest.err >&5
ba479fd2
NN
4045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4046 (exit $ac_status); } &&
fb38008e 4047 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
4048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4049 (eval $ac_try) 2>&5
4050 ac_status=$?
4051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4052 (exit $ac_status); }; } &&
4053 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
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); }; }; then
4059 ac_cv_header_stdc=yes
4060else
4061 echo "$as_me: failed program was:" >&5
4062sed 's/^/| /' conftest.$ac_ext >&5
4063
4064ac_cv_header_stdc=no
4065fi
86da66b5 4066rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
4067
4068if test $ac_cv_header_stdc = yes; then
4069 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4070 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4071/* confdefs.h. */
4072_ACEOF
4073cat confdefs.h >>conftest.$ac_ext
4074cat >>conftest.$ac_ext <<_ACEOF
4075/* end confdefs.h. */
4076#include <string.h>
4077
4078_ACEOF
4079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4080 $EGREP "memchr" >/dev/null 2>&1; then
4081 :
4082else
4083 ac_cv_header_stdc=no
4084fi
4085rm -f conftest*
4086
4087fi
4088
4089if test $ac_cv_header_stdc = yes; then
4090 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4091 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4092/* confdefs.h. */
4093_ACEOF
4094cat confdefs.h >>conftest.$ac_ext
4095cat >>conftest.$ac_ext <<_ACEOF
4096/* end confdefs.h. */
4097#include <stdlib.h>
4098
4099_ACEOF
4100if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4101 $EGREP "free" >/dev/null 2>&1; then
4102 :
4103else
4104 ac_cv_header_stdc=no
4105fi
4106rm -f conftest*
4107
4108fi
4109
4110if test $ac_cv_header_stdc = yes; then
4111 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4112 if test "$cross_compiling" = yes; then
4113 :
4114else
4115 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4116/* confdefs.h. */
4117_ACEOF
4118cat confdefs.h >>conftest.$ac_ext
4119cat >>conftest.$ac_ext <<_ACEOF
4120/* end confdefs.h. */
4121#include <ctype.h>
4122#if ((' ' & 0x0FF) == 0x020)
4123# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4124# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4125#else
4126# define ISLOWER(c) \
86da66b5
HPN
4127 (('a' <= (c) && (c) <= 'i') \
4128 || ('j' <= (c) && (c) <= 'r') \
4129 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
4130# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4131#endif
4132
4133#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4134int
4135main ()
4136{
4137 int i;
4138 for (i = 0; i < 256; i++)
4139 if (XOR (islower (i), ISLOWER (i))
86da66b5 4140 || toupper (i) != TOUPPER (i))
ba479fd2
NN
4141 exit(2);
4142 exit (0);
4143}
4144_ACEOF
4145rm -f conftest$ac_exeext
4146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4147 (eval $ac_link) 2>&5
4148 ac_status=$?
4149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4150 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4152 (eval $ac_try) 2>&5
4153 ac_status=$?
4154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4155 (exit $ac_status); }; }; then
4156 :
4157else
4158 echo "$as_me: program exited with status $ac_status" >&5
4159echo "$as_me: failed program was:" >&5
4160sed 's/^/| /' conftest.$ac_ext >&5
4161
4162( exit $ac_status )
4163ac_cv_header_stdc=no
63cf211a 4164fi
86da66b5 4165rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
4166fi
4167fi
4168fi
4169echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4170echo "${ECHO_T}$ac_cv_header_stdc" >&6
4171if test $ac_cv_header_stdc = yes; then
63cf211a 4172
ba479fd2
NN
4173cat >>confdefs.h <<\_ACEOF
4174#define STDC_HEADERS 1
4175_ACEOF
75e93faa 4176
414d23ae 4177fi
827ae6cf 4178
ba479fd2
NN
4179# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4180
4181
4182
827ae6cf 4183
6e3f3080
NN
4184
4185
6e3f3080 4186
6e3f3080 4187
ba479fd2
NN
4188
4189for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
86da66b5 4190 inttypes.h stdint.h unistd.h
ba479fd2
NN
4191do
4192as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4193echo "$as_me:$LINENO: checking for $ac_header" >&5
4194echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4195if eval "test \"\${$as_ac_Header+set}\" = set"; then
4196 echo $ECHO_N "(cached) $ECHO_C" >&6
4197else
4198 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4199/* confdefs.h. */
4200_ACEOF
4201cat confdefs.h >>conftest.$ac_ext
4202cat >>conftest.$ac_ext <<_ACEOF
4203/* end confdefs.h. */
4204$ac_includes_default
4205
4206#include <$ac_header>
4207_ACEOF
4208rm -f conftest.$ac_objext
4209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 4210 (eval $ac_compile) 2>conftest.er1
ba479fd2 4211 ac_status=$?
86da66b5
HPN
4212 grep -v '^ *+' conftest.er1 >conftest.err
4213 rm -f conftest.er1
4214 cat conftest.err >&5
ba479fd2
NN
4215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4216 (exit $ac_status); } &&
fb38008e 4217 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
4218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4219 (eval $ac_try) 2>&5
4220 ac_status=$?
4221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4222 (exit $ac_status); }; } &&
4223 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
4224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4225 (eval $ac_try) 2>&5
4226 ac_status=$?
4227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4228 (exit $ac_status); }; }; then
4229 eval "$as_ac_Header=yes"
4230else
4231 echo "$as_me: failed program was:" >&5
4232sed 's/^/| /' conftest.$ac_ext >&5
4233
4234eval "$as_ac_Header=no"
4235fi
86da66b5 4236rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
4237fi
4238echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4239echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4240if test `eval echo '${'$as_ac_Header'}'` = yes; then
4241 cat >>confdefs.h <<_ACEOF
4242#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4243_ACEOF
6e3f3080 4244
63cf211a 4245fi
6e3f3080 4246
ba479fd2
NN
4247done
4248
4249
4250if test "${ac_cv_header_valgrind_h+set}" = set; then
4251 echo "$as_me:$LINENO: checking for valgrind.h" >&5
4252echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
4253if test "${ac_cv_header_valgrind_h+set}" = set; then
4254 echo $ECHO_N "(cached) $ECHO_C" >&6
4255fi
4256echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
4257echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
4258else
4259 # Is the header compilable?
4260echo "$as_me:$LINENO: checking valgrind.h usability" >&5
4261echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
4262cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4263/* confdefs.h. */
4264_ACEOF
4265cat confdefs.h >>conftest.$ac_ext
4266cat >>conftest.$ac_ext <<_ACEOF
4267/* end confdefs.h. */
4268$ac_includes_default
63cf211a 4269#include <valgrind.h>
ba479fd2
NN
4270_ACEOF
4271rm -f conftest.$ac_objext
4272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 4273 (eval $ac_compile) 2>conftest.er1
ba479fd2 4274 ac_status=$?
86da66b5
HPN
4275 grep -v '^ *+' conftest.er1 >conftest.err
4276 rm -f conftest.er1
4277 cat conftest.err >&5
ba479fd2
NN
4278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4279 (exit $ac_status); } &&
fb38008e 4280 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
4281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4282 (eval $ac_try) 2>&5
4283 ac_status=$?
4284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4285 (exit $ac_status); }; } &&
4286 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
4287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4288 (eval $ac_try) 2>&5
4289 ac_status=$?
4290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4291 (exit $ac_status); }; }; then
4292 ac_header_compiler=yes
4293else
4294 echo "$as_me: failed program was:" >&5
4295sed 's/^/| /' conftest.$ac_ext >&5
4296
4297ac_header_compiler=no
4298fi
86da66b5 4299rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
4300echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4301echo "${ECHO_T}$ac_header_compiler" >&6
4302
4303# Is the header present?
4304echo "$as_me:$LINENO: checking valgrind.h presence" >&5
4305echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
4306cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4307/* confdefs.h. */
4308_ACEOF
4309cat confdefs.h >>conftest.$ac_ext
4310cat >>conftest.$ac_ext <<_ACEOF
4311/* end confdefs.h. */
4312#include <valgrind.h>
4313_ACEOF
4314if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4315 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4316 ac_status=$?
4317 grep -v '^ *+' conftest.er1 >conftest.err
4318 rm -f conftest.er1
4319 cat conftest.err >&5
4320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4321 (exit $ac_status); } >/dev/null; then
4322 if test -s conftest.err; then
4323 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 4324 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
4325 else
4326 ac_cpp_err=
4327 fi
4328else
4329 ac_cpp_err=yes
4330fi
4331if test -z "$ac_cpp_err"; then
4332 ac_header_preproc=yes
4333else
4334 echo "$as_me: failed program was:" >&5
4335sed 's/^/| /' conftest.$ac_ext >&5
4336
4337 ac_header_preproc=no
4338fi
4339rm -f conftest.err conftest.$ac_ext
4340echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4341echo "${ECHO_T}$ac_header_preproc" >&6
4342
4343# So? What about this header?
86da66b5
HPN
4344case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4345 yes:no: )
ba479fd2
NN
4346 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
4347echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
4348 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
4349echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
4350 ac_header_preproc=yes
ba479fd2 4351 ;;
86da66b5 4352 no:yes:* )
ba479fd2
NN
4353 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
4354echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
4355 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
4356echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
4357 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
4358echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
4359 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
4360echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
4361 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
4362echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
4363 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
4364echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
ba479fd2
NN
4365 (
4366 cat <<\_ASBOX
86da66b5
HPN
4367## ------------------------------------------ ##
4368## Report this to the AC_PACKAGE_NAME lists. ##
4369## ------------------------------------------ ##
ba479fd2
NN
4370_ASBOX
4371 ) |
4372 sed "s/^/$as_me: WARNING: /" >&2
4373 ;;
4374esac
4375echo "$as_me:$LINENO: checking for valgrind.h" >&5
4376echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
4377if test "${ac_cv_header_valgrind_h+set}" = set; then
4378 echo $ECHO_N "(cached) $ECHO_C" >&6
4379else
4380 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 4381fi
ba479fd2
NN
4382echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
4383echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
4384
6e3f3080 4385fi
ba479fd2 4386if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
4387 have_valgrind_h=yes
4388else
ba479fd2 4389 have_valgrind_h=no
6938ec6c
NN
4390fi
4391
4392
ba479fd2 4393
414d23ae
HPN
4394if test x$ac_checking_valgrind != x ; then
4395 # It is certainly possible that there's valgrind but no valgrind.h.
4396 # GCC relies on making annotations so we must have both.
ba479fd2
NN
4397 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
4398echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
4399 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4400/* confdefs.h. */
4401_ACEOF
4402cat confdefs.h >>conftest.$ac_ext
4403cat >>conftest.$ac_ext <<_ACEOF
4404/* end confdefs.h. */
a207b594 4405#include <valgrind/memcheck.h>
14011ca4
AJ
4406#ifndef VALGRIND_DISCARD
4407#error VALGRIND_DISCARD not defined
4408#endif
ba479fd2
NN
4409_ACEOF
4410if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4411 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4412 ac_status=$?
4413 grep -v '^ *+' conftest.er1 >conftest.err
4414 rm -f conftest.er1
4415 cat conftest.err >&5
4416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4417 (exit $ac_status); } >/dev/null; then
4418 if test -s conftest.err; then
4419 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 4420 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
4421 else
4422 ac_cpp_err=
4423 fi
4424else
4425 ac_cpp_err=yes
4426fi
4427if test -z "$ac_cpp_err"; then
a207b594
HPN
4428 gcc_cv_header_valgrind_memcheck_h=yes
4429else
ba479fd2
NN
4430 echo "$as_me: failed program was:" >&5
4431sed 's/^/| /' conftest.$ac_ext >&5
4432
a207b594
HPN
4433 gcc_cv_header_valgrind_memcheck_h=no
4434fi
ba479fd2
NN
4435rm -f conftest.err conftest.$ac_ext
4436 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
4437echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
4438 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
4439echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
4440 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4441/* confdefs.h. */
4442_ACEOF
4443cat confdefs.h >>conftest.$ac_ext
4444cat >>conftest.$ac_ext <<_ACEOF
4445/* end confdefs.h. */
a207b594
HPN
4446#include <memcheck.h>
4447#ifndef VALGRIND_DISCARD
4448#error VALGRIND_DISCARD not defined
4449#endif
ba479fd2
NN
4450_ACEOF
4451if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4452 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4453 ac_status=$?
4454 grep -v '^ *+' conftest.er1 >conftest.err
4455 rm -f conftest.er1
4456 cat conftest.err >&5
4457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4458 (exit $ac_status); } >/dev/null; then
4459 if test -s conftest.err; then
4460 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 4461 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
4462 else
4463 ac_cpp_err=
4464 fi
4465else
4466 ac_cpp_err=yes
4467fi
4468if test -z "$ac_cpp_err"; then
14011ca4
AJ
4469 gcc_cv_header_memcheck_h=yes
4470else
ba479fd2
NN
4471 echo "$as_me: failed program was:" >&5
4472sed 's/^/| /' conftest.$ac_ext >&5
4473
cafe096b
EC
4474 gcc_cv_header_memcheck_h=no
4475fi
ba479fd2
NN
4476rm -f conftest.err conftest.$ac_ext
4477 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
4478echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
4479
56694dd9
ZW
4480# Prepare PATH_SEPARATOR.
4481# The user is always right.
4482if test "${PATH_SEPARATOR+set}" != set; then
4483 echo "#! /bin/sh" >conf$$.sh
4484 echo "exit 0" >>conf$$.sh
4485 chmod +x conf$$.sh
4486 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
4487 PATH_SEPARATOR=';'
4488 else
4489 PATH_SEPARATOR=:
4490 fi
4491 rm -f conf$$.sh
4492fi
4493
4494# Find out how to test for executable files. Don't use a zero-byte file,
4495# as systems may use methods other than mode bits to determine executability.
4496cat >conf$$.file <<_ASEOF
4497#! /bin/sh
4498exit 0
4499_ASEOF
4500chmod +x conf$$.file
4501if test -x conf$$.file >/dev/null 2>&1; then
4502 ac_executable_p="test -x"
4503else
4504 ac_executable_p="test -f"
4505fi
4506rm -f conf$$.file
4507
4508# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 4509set dummy valgrind; ac_word=$2
ba479fd2
NN
4510echo "$as_me:$LINENO: checking for $ac_word" >&5
4511echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4512if test "${ac_cv_path_valgrind_path+set}" = set; then
4513 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
4514else
4515 case "$valgrind_path" in
56694dd9
ZW
4516 [\\/]* | ?:[\\/]*)
4517 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
4518 ;;
414d23ae 4519 *)
56694dd9
ZW
4520 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
4521 for ac_dir in $PATH; do
4522 IFS="$ac_save_IFS"
4523 test -z "$ac_dir" && ac_dir=.
4524 for ac_exec_ext in '' $ac_executable_extensions; do
4525 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
4526 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
4527 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
4528 break 2
4529 fi
4530 fi
4531 done
4532 done
4533 IFS="$ac_save_IFS"
4534 ;;
414d23ae 4535esac
75e93faa 4536fi
414d23ae
HPN
4537valgrind_path="$ac_cv_path_valgrind_path"
4538if test -n "$valgrind_path"; then
ba479fd2
NN
4539 echo "$as_me:$LINENO: result: $valgrind_path" >&5
4540echo "${ECHO_T}$valgrind_path" >&6
414d23ae 4541else
ba479fd2
NN
4542 echo "$as_me:$LINENO: result: no" >&5
4543echo "${ECHO_T}no" >&6
414d23ae
HPN
4544fi
4545
a207b594
HPN
4546 if test "x$valgrind_path" = "x" \
4547 || (test $have_valgrind_h = no \
4548 && test $gcc_cv_header_memcheck_h = no \
4549 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
4550 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
4551echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
4552 { (exit 1); exit 1; }; }
414d23ae
HPN
4553 fi
4554 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
4555 valgrind_command="$valgrind_path -q"
ba479fd2
NN
4556
4557cat >>confdefs.h <<\_ACEOF
414d23ae 4558#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 4559_ACEOF
75e93faa 4560
a207b594 4561 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
4562
4563cat >>confdefs.h <<\_ACEOF
a207b594 4564#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 4565_ACEOF
a207b594
HPN
4566
4567 fi
14011ca4 4568 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
4569
4570cat >>confdefs.h <<\_ACEOF
14011ca4 4571#define HAVE_MEMCHECK_H 1
ba479fd2 4572_ACEOF
14011ca4
AJ
4573
4574 fi
414d23ae 4575fi
75e93faa 4576
75e93faa
ZW
4577
4578
74ee1642
PB
4579# Check whether --enable-mapped-location or --disable-mapped-location was given.
4580if test "${enable_mapped_location+set}" = set; then
4581 enableval="$enable_mapped_location"
4582
4583else
4584 enable_mapped_location=no
4585fi;
4586
4587if test "$enable_mapped_location" = yes ; then
4588
4589cat >>confdefs.h <<\_ACEOF
4590#define USE_MAPPED_LOCATION 1
4591_ACEOF
4592
4593fi
4594
414d23ae
HPN
4595# Enable code coverage collection
4596# Check whether --enable-coverage or --disable-coverage was given.
4597if test "${enable_coverage+set}" = set; then
4598 enableval="$enable_coverage"
4599 case "${enableval}" in
6dd297da
NN
4600 yes|noopt)
4601 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
4602 ;;
4603 opt)
4604 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
4605 ;;
4606 no)
4607 # a.k.a. --disable-coverage
4608 coverage_flags=""
4609 ;;
4610 *)
4611 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
4612echo "$as_me: error: unknown coverage setting $enableval" >&2;}
4613 { (exit 1); exit 1; }; }
6dd297da 4614 ;;
414d23ae 4615esac
75e93faa 4616else
414d23ae 4617 coverage_flags=""
ba479fd2 4618fi;
5c3bc9fb 4619
414d23ae 4620
439a7e54
DN
4621# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
4622if test "${enable_gather_detailed_mem_stats+set}" = set; then
4623 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 4624
439a7e54
DN
4625else
4626 enable_gather_detailed_mem_stats=no
ba479fd2 4627fi;
439a7e54 4628if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
4629
4630cat >>confdefs.h <<\_ACEOF
439a7e54 4631#define GATHER_STATISTICS 1
ba479fd2 4632_ACEOF
439a7e54
DN
4633
4634fi
4635
73458fb7
NN
4636# -------------------------------
4637# Miscenalleous configure options
4638# -------------------------------
34a86c2b
NN
4639
4640# With stabs
ba479fd2 4641
34a86c2b
NN
4642# Check whether --with-stabs or --without-stabs was given.
4643if test "${with_stabs+set}" = set; then
4644 withval="$with_stabs"
4645 stabs="$with_stabs"
4646else
4647 stabs=no
ba479fd2 4648fi;
cafe096b 4649
34a86c2b
NN
4650# Determine whether or not multilibs are enabled.
4651# Check whether --enable-multilib or --disable-multilib was given.
4652if test "${enable_multilib+set}" = set; then
4653 enableval="$enable_multilib"
ba479fd2 4654
34a86c2b
NN
4655else
4656 enable_multilib=yes
ba479fd2 4657fi;
75e93faa 4658
34a86c2b 4659
414d23ae
HPN
4660# Enable __cxa_atexit for C++.
4661# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
4662if test "${enable___cxa_atexit+set}" = set; then
4663 enableval="$enable___cxa_atexit"
75e93faa 4664
ba479fd2 4665fi;
75e93faa 4666
414d23ae
HPN
4667# Enable threads
4668# Pass with no value to take the default
4669# Pass with a value to specify a thread package
4670# Check whether --enable-threads or --disable-threads was given.
4671if test "${enable_threads+set}" = set; then
4672 enableval="$enable_threads"
ba479fd2 4673
414d23ae
HPN
4674else
4675 enable_threads=''
ba479fd2 4676fi;
414d23ae
HPN
4677
4678# Check whether --enable-objc-gc or --disable-objc-gc was given.
4679if test "${enable_objc_gc+set}" = set; then
4680 enableval="$enable_objc_gc"
4681 if test x$enable_objc_gc = xno; then
4682 objc_boehm_gc=''
4683else
4684 objc_boehm_gc=1
4685fi
4686else
4687 objc_boehm_gc=''
ba479fd2 4688fi;
75e93faa
ZW
4689
4690
414d23ae
HPN
4691# Check whether --with-dwarf2 or --without-dwarf2 was given.
4692if test "${with_dwarf2+set}" = set; then
4693 withval="$with_dwarf2"
4694 dwarf2="$with_dwarf2"
75e93faa 4695else
414d23ae 4696 dwarf2=no
ba479fd2 4697fi;
75e93faa 4698
414d23ae
HPN
4699# Check whether --enable-shared or --disable-shared was given.
4700if test "${enable_shared+set}" = set; then
4701 enableval="$enable_shared"
ba479fd2 4702
414d23ae
HPN
4703 case $enable_shared in
4704 yes | no) ;;
4705 *)
4706 enable_shared=no
4707 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4708 for pkg in $enableval; do
4709 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
4710 enable_shared=yes
4711 fi
4712 done
4713 IFS="$ac_save_ifs"
4714 ;;
4715 esac
4716
75e93faa 4717else
414d23ae 4718 enable_shared=yes
ba479fd2 4719fi;
75e93faa 4720
75e93faa 4721
75e93faa 4722
4977bab6
ZW
4723# Check whether --with-sysroot or --without-sysroot was given.
4724if test "${with_sysroot+set}" = set; then
4725 withval="$with_sysroot"
ba479fd2 4726
4977bab6 4727 case ${with_sysroot} in
caa55b1e 4728 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
4729 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
4730 esac
ba479fd2 4731
4977bab6
ZW
4732 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
4733 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
4734
047d636f
DJ
4735 if test "x$exec_prefix" = xNONE; then
4736 if test "x$prefix" = xNONE; then
4737 test_prefix=/usr/local
4738 else
4739 test_prefix=$prefix
4740 fi
4741 else
4742 test_prefix=$exec_prefix
4743 fi
4744 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
4745 "${test_prefix}"|"${test_prefix}/"*|\
4746 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
4747 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
4748 TARGET_SYSTEM_ROOT_DEFINE="$t"
4749 ;;
4750 esac
4751
4977bab6 4752else
ba479fd2 4753
4977bab6 4754 TARGET_SYSTEM_ROOT=
db720d9a 4755 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
4756 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
4757
ba479fd2 4758fi;
4977bab6
ZW
4759
4760
4761
4762
d1bd0ded 4763# Build with intermodule optimisations
d1bd0ded
GK
4764# Check whether --enable-intermodule or --disable-intermodule was given.
4765if test "${enable_intermodule+set}" = set; then
4766 enableval="$enable_intermodule"
0c46c5c7
KC
4767 case ${enable_intermodule} in
4768 yes) onestep="-onestep";;
4769 *) onestep="";;
d1bd0ded 4770esac
0c46c5c7
KC
4771else
4772 onestep=""
ba479fd2 4773fi;
d1bd0ded
GK
4774
4775
f3c9f174
NN
4776# Sanity check enable_languages in case someone does not run the toplevel
4777# configure # script.
4778# Check whether --enable-languages or --disable-languages was given.
4779if test "${enable_languages+set}" = set; then
4780 enableval="$enable_languages"
4781 case ,${enable_languages}, in
4782 ,,|,yes,)
4783 # go safe -- we cannot be much sure without the toplevel
4784 # configure's
4785 # analysis of which target libs are present and usable
4786 enable_languages=c
4787 ;;
4788 *,all,*)
4789 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
4790echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
4791 { (exit 1); exit 1; }; }
4792 ;;
4793 *,c,*)
4794 ;;
4795 *)
4796 enable_languages=c,${enable_languages}
4797 ;;
4798esac
4799else
4800 enable_languages=c
4801fi;
4802
4803subdirs=
4804for lang in ${srcdir}/*/config-lang.in
4805do
4806 case $lang in
4807 # The odd quoting in the next line works around
4808 # an apparent bug in bash 1.12 on linux.
4809 ${srcdir}/[*]/config-lang.in) ;;
4810 *)
4811 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
4812 if test "x$lang_alias" = x
4813 then
4814 echo "$lang doesn't set \$language." 1>&2
4815 exit 1
4816 fi
4817 case ",$enable_languages," in
4818 *,$lang_alias,*)
4819 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
4820 esac
4821 ;;
4822 esac
4823done
4824
4825
73458fb7
NN
4826# -------------------------
4827# Checks for other programs
4828# -------------------------
5b67ad6f 4829
ba479fd2
NN
4830echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4831echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
86da66b5 4832set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
ba479fd2
NN
4833if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4834 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 4835else
ba479fd2 4836 cat >conftest.make <<\_ACEOF
e9a25f70 4837all:
ba479fd2
NN
4838 @echo 'ac_maketemp="$(MAKE)"'
4839_ACEOF
e9a25f70 4840# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 4841eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
4842if test -n "$ac_maketemp"; then
4843 eval ac_cv_prog_make_${ac_make}_set=yes
4844else
4845 eval ac_cv_prog_make_${ac_make}_set=no
4846fi
ba479fd2 4847rm -f conftest.make
e9a25f70
JL
4848fi
4849if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
4850 echo "$as_me:$LINENO: result: yes" >&5
4851echo "${ECHO_T}yes" >&6
e9a25f70
JL
4852 SET_MAKE=
4853else
ba479fd2
NN
4854 echo "$as_me:$LINENO: result: no" >&5
4855echo "${ECHO_T}no" >&6
e9a25f70
JL
4856 SET_MAKE="MAKE=${MAKE-make}"
4857fi
4858
4859
861bb6c1 4860# Find some useful tools
ba479fd2 4861for ac_prog in gawk mawk nawk awk
861bb6c1 4862do
ba479fd2 4863 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 4864set dummy $ac_prog; ac_word=$2
ba479fd2
NN
4865echo "$as_me:$LINENO: checking for $ac_word" >&5
4866echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4867if test "${ac_cv_prog_AWK+set}" = set; then
4868 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
4869else
4870 if test -n "$AWK"; then
4871 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4872else
ba479fd2
NN
4873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4874for as_dir in $PATH
4875do
4876 IFS=$as_save_IFS
4877 test -z "$as_dir" && as_dir=.
4878 for ac_exec_ext in '' $ac_executable_extensions; do
4879 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4880 ac_cv_prog_AWK="$ac_prog"
4881 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4882 break 2
4883 fi
4884done
4885done
4886
861bb6c1
JL
4887fi
4888fi
ba479fd2 4889AWK=$ac_cv_prog_AWK
861bb6c1 4890if test -n "$AWK"; then
ba479fd2
NN
4891 echo "$as_me:$LINENO: result: $AWK" >&5
4892echo "${ECHO_T}$AWK" >&6
861bb6c1 4893else
ba479fd2
NN
4894 echo "$as_me:$LINENO: result: no" >&5
4895echo "${ECHO_T}no" >&6
861bb6c1
JL
4896fi
4897
ba479fd2 4898 test -n "$AWK" && break
861bb6c1
JL
4899done
4900
776dc15d 4901# We need awk to create options.c and options.h.
2c4902b9
NN
4902# Bail out if it's missing.
4903case ${AWK} in
ba479fd2
NN
4904 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
4905echo "$as_me: error: can't build without awk, bailing out" >&2;}
4906 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
4907esac
4908
ba479fd2
NN
4909echo "$as_me:$LINENO: checking whether ln -s works" >&5
4910echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4911if test "${gcc_cv_prog_LN_S+set}" = set; then
4912 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
4913else
4914 rm -f conftestdata_t
4915echo >conftestdata_f
4916if ln -s conftestdata_f conftestdata_t 2>/dev/null
4917then
4918 gcc_cv_prog_LN_S="ln -s"
4919else
4920 if ln conftestdata_f conftestdata_t 2>/dev/null
4921 then
4922 gcc_cv_prog_LN_S=ln
4923 else
4924 gcc_cv_prog_LN_S=cp
4925 fi
4926fi
4927rm -f conftestdata_f conftestdata_t
4928
4929fi
4930LN_S="$gcc_cv_prog_LN_S"
4931if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
4932 echo "$as_me:$LINENO: result: yes" >&5
4933echo "${ECHO_T}yes" >&6
0a4b6309
RL
4934else
4935 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
4936 echo "$as_me:$LINENO: result: no, using ln" >&5
4937echo "${ECHO_T}no, using ln" >&6
0a4b6309 4938 else
ba479fd2
NN
4939 echo "$as_me:$LINENO: result: no, and neither does ln, so using cp" >&5
4940echo "${ECHO_T}no, and neither does ln, so using cp" >&6
0a4b6309
RL
4941 fi
4942fi
4943
41e622a8
AP
4944echo "$as_me:$LINENO: checking whether ln works" >&5
4945echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
4946if test "${acx_cv_prog_LN+set}" = set; then
4947 echo $ECHO_N "(cached) $ECHO_C" >&6
4948else
4949 rm -f conftestdata_t
4950echo >conftestdata_f
4951if ln conftestdata_f conftestdata_t 2>/dev/null
4952then
4953 acx_cv_prog_LN=ln
4954else
4955 acx_cv_prog_LN=no
4956fi
4957rm -f conftestdata_f conftestdata_t
4958
4959fi
4960if test $acx_cv_prog_LN = no; then
4961 LN="$LN_S"
4962 echo "$as_me:$LINENO: result: no, using $LN" >&5
4963echo "${ECHO_T}no, using $LN" >&6
4964else
4965 LN="$acx_cv_prog_LN"
4966 echo "$as_me:$LINENO: result: yes" >&5
4967echo "${ECHO_T}yes" >&6
4968fi
4969
ba479fd2
NN
4970if test -n "$ac_tool_prefix"; then
4971 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4972set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4973echo "$as_me:$LINENO: checking for $ac_word" >&5
4974echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4975if test "${ac_cv_prog_RANLIB+set}" = set; then
4976 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
4977else
4978 if test -n "$RANLIB"; then
4979 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4980else
ba479fd2
NN
4981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982for as_dir in $PATH
4983do
4984 IFS=$as_save_IFS
4985 test -z "$as_dir" && as_dir=.
4986 for ac_exec_ext in '' $ac_executable_extensions; do
4987 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4988 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4989 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4990 break 2
4991 fi
4992done
4993done
4994
6e3f3080
NN
4995fi
4996fi
ba479fd2 4997RANLIB=$ac_cv_prog_RANLIB
6e3f3080 4998if test -n "$RANLIB"; then
ba479fd2
NN
4999 echo "$as_me:$LINENO: result: $RANLIB" >&5
5000echo "${ECHO_T}$RANLIB" >&6
5001else
5002 echo "$as_me:$LINENO: result: no" >&5
5003echo "${ECHO_T}no" >&6
5004fi
5005
5006fi
5007if test -z "$ac_cv_prog_RANLIB"; then
5008 ac_ct_RANLIB=$RANLIB
5009 # Extract the first word of "ranlib", so it can be a program name with args.
5010set dummy ranlib; ac_word=$2
5011echo "$as_me:$LINENO: checking for $ac_word" >&5
5012echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5013if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5014 echo $ECHO_N "(cached) $ECHO_C" >&6
5015else
5016 if test -n "$ac_ct_RANLIB"; then
5017 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5018else
5019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022 IFS=$as_save_IFS
5023 test -z "$as_dir" && as_dir=.
5024 for ac_exec_ext in '' $ac_executable_extensions; do
5025 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5026 ac_cv_prog_ac_ct_RANLIB="ranlib"
5027 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5028 break 2
5029 fi
5030done
5031done
5032
5033 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
5034fi
5035fi
5036ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5037if test -n "$ac_ct_RANLIB"; then
5038 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5039echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 5040else
ba479fd2
NN
5041 echo "$as_me:$LINENO: result: no" >&5
5042echo "${ECHO_T}no" >&6
5043fi
5044
5045 RANLIB=$ac_ct_RANLIB
5046else
5047 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
5048fi
5049
343a6100
MM
5050case "${host}" in
5051*-*-darwin*)
5052 # By default, the Darwin ranlib will not treat common symbols as
5053 # definitions when building the archive table of contents. Other
5054 # ranlibs do that; pass an option to the Darwin ranlib that makes
5055 # it behave similarly.
5056 ranlib_flags="-c"
5057 ;;
5058*)
5059 ranlib_flags=""
5060esac
5061
5062
0a4b6309
RL
5063# Find a good install program. We prefer a C program (faster),
5064# so one script is as good as another. But avoid the broken or
5065# incompatible versions:
5066# SysV /etc/install, /usr/sbin/install
5067# SunOS /usr/etc/install
5068# IRIX /sbin/install
5069# AIX /bin/install
5070# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5071# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5072# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
5073echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
5074echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 5075if test -z "$INSTALL"; then
ba479fd2
NN
5076if test "${ac_cv_path_install+set}" = set; then
5077 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
5078else
5079 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
5080 for ac_dir in $PATH; do
5081 # Account for people who put trailing slashes in PATH elements.
5082 case "$ac_dir/" in
5083 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
5084 *)
5085 # OSF1 and SCO ODT 3.0 have their own names for install.
5086 for ac_prog in ginstall scoinst install; do
5087 if test -f $ac_dir/$ac_prog; then
5088 if test $ac_prog = install &&
5089 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
5090 # AIX install. It has an incompatible calling convention.
5091 # OSF/1 installbsd also uses dspmsg, but is usable.
5092 :
5093 else
5094 ac_cv_path_install="$ac_dir/$ac_prog -c"
5095 break 2
5096 fi
5097 fi
5098 done
5099 ;;
5100 esac
5101 done
5102 IFS="$ac_save_IFS"
5103
5104fi
5105 if test "${ac_cv_path_install+set}" = set; then
5106 INSTALL="$ac_cv_path_install"
5107 else
5108 # As a last resort, use the slow shell script. We don't cache a
5109 # path for INSTALL within a source directory, because that will
5110 # break other packages using the cache if that directory is
5111 # removed, or if the path is relative.
5112 INSTALL="$ac_install_sh"
5113 fi
5114fi
ba479fd2
NN
5115echo "$as_me:$LINENO: result: $INSTALL" >&5
5116echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
5117
5118# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5119# It thinks the first close brace ends the variable substitution.
5120test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5121
5122test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5123
861bb6c1 5124
3a000df0 5125# See if cmp has --ignore-initial.
ba479fd2
NN
5126echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
5127echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
5128if test "${gcc_cv_prog_cmp_skip+set}" = set; then
5129 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
5130else
5131 echo abfoo >t1
5132 echo cdfoo >t2
269a7343 5133 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
5134 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
5135 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 5136 :
3a000df0
KC
5137 else
5138 gcc_cv_prog_cmp_skip=gnucompare
5139 fi
269a7343
KG
5140 fi
5141 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
5142 if cmp t1 t2 2 2 > /dev/null 2>&1; then
5143 if cmp t1 t2 1 1 > /dev/null 2>&1; then
5144 :
5145 else
5146 gcc_cv_prog_cmp_skip=fastcompare
5147 fi
5148 fi
3a000df0
KC
5149 fi
5150 rm t1 t2
5151
5152fi
ba479fd2
NN
5153echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
5154echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
5155make_compare_target=$gcc_cv_prog_cmp_skip
5156
5157
5158
73458fb7
NN
5159# See if we have the mktemp command.
5160# Extract the first word of "mktemp", so it can be a program name with args.
5161set dummy mktemp; ac_word=$2
ba479fd2
NN
5162echo "$as_me:$LINENO: checking for $ac_word" >&5
5163echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5164if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
5165 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5166else
5167 if test -n "$have_mktemp_command"; then
5168 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
5169else
ba479fd2
NN
5170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5171for as_dir in $PATH
5172do
5173 IFS=$as_save_IFS
5174 test -z "$as_dir" && as_dir=.
5175 for ac_exec_ext in '' $ac_executable_extensions; do
5176 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5177 ac_cv_prog_have_mktemp_command="yes"
5178 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5179 break 2
5180 fi
5181done
5182done
5183
73458fb7
NN
5184 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
5185fi
5186fi
ba479fd2 5187have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 5188if test -n "$have_mktemp_command"; then
ba479fd2
NN
5189 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
5190echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 5191else
ba479fd2
NN
5192 echo "$as_me:$LINENO: result: no" >&5
5193echo "${ECHO_T}no" >&6
73458fb7
NN
5194fi
5195
5196
7c27e184
PB
5197MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
5198
5199# See if makeinfo has been installed and is modern enough
5200# that we can use it.
5201# Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 5202set dummy makeinfo; ac_word=$2
ba479fd2
NN
5203echo "$as_me:$LINENO: checking for $ac_word" >&5
5204echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5205if test "${ac_cv_prog_MAKEINFO+set}" = set; then
5206 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5207else
5208 if test -n "$MAKEINFO"; then
5209 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
5210else
ba479fd2
NN
5211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5212for as_dir in $PATH
5213do
5214 IFS=$as_save_IFS
5215 test -z "$as_dir" && as_dir=.
5216 for ac_exec_ext in '' $ac_executable_extensions; do
5217 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5218 ac_cv_prog_MAKEINFO="makeinfo"
5219 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5220 break 2
5221 fi
5222done
5223done
5224
73458fb7
NN
5225fi
5226fi
ba479fd2 5227MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 5228if test -n "$MAKEINFO"; then
ba479fd2
NN
5229 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5230echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 5231else
ba479fd2
NN
5232 echo "$as_me:$LINENO: result: no" >&5
5233echo "${ECHO_T}no" >&6
73458fb7
NN
5234fi
5235
5236if test -n "$MAKEINFO"; then
5237 # Found it, now check the version.
ba479fd2
NN
5238 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
5239echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
5240if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
5241 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5242else
5243 ac_prog_version=`$MAKEINFO --version 2>&1 |
5244 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
fb38008e 5245 echo "configure:5245: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
5246 case $ac_prog_version in
5247 '') gcc_cv_prog_makeinfo_modern=no;;
5248 4.[2-9]*)
5249 gcc_cv_prog_makeinfo_modern=yes;;
5250 *) gcc_cv_prog_makeinfo_modern=no;;
5251 esac
5252
5253fi
ba479fd2
NN
5254echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
5255echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
5256else
5257 gcc_cv_prog_makeinfo_modern=no
5258fi
5259
73458fb7 5260if test $gcc_cv_prog_makeinfo_modern = no; then
7c27e184 5261 MAKEINFO="$MISSING makeinfo"
ba479fd2
NN
5262 { echo "$as_me:$LINENO: WARNING:
5263*** Makeinfo is missing or too old.
5264*** Info documentation will not be built." >&5
5265echo "$as_me: WARNING:
cafe096b 5266*** Makeinfo is missing or too old.
ba479fd2 5267*** Info documentation will not be built." >&2;}
73458fb7
NN
5268 BUILD_INFO=
5269else
ba479fd2 5270 BUILD_INFO=info
73458fb7
NN
5271fi
5272
7c27e184 5273
73458fb7 5274# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
5275echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
5276echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 5277if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
5278 echo "$as_me:$LINENO: result: yes" >&5
5279echo "${ECHO_T}yes" >&6
5280 GENERATED_MANPAGES=generated-manpages
73458fb7 5281else
ba479fd2
NN
5282 echo "$as_me:$LINENO: result: no" >&5
5283echo "${ECHO_T}no" >&6
73458fb7
NN
5284 GENERATED_MANPAGES=
5285fi
5286
7c27e184 5287
73458fb7 5288# How about lex?
7c27e184
PB
5289for ac_prog in flex
5290do
5291 # Extract the first word of "$ac_prog", so it can be a program name with args.
5292set dummy $ac_prog; ac_word=$2
ba479fd2
NN
5293echo "$as_me:$LINENO: checking for $ac_word" >&5
5294echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5295if test "${ac_cv_prog_FLEX+set}" = set; then
5296 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5297else
5298 if test -n "$FLEX"; then
5299 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
5300else
ba479fd2
NN
5301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5302for as_dir in $PATH
5303do
5304 IFS=$as_save_IFS
5305 test -z "$as_dir" && as_dir=.
5306 for ac_exec_ext in '' $ac_executable_extensions; do
5307 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 5308 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
5309 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5310 break 2
5311 fi
5312done
5313done
5314
73458fb7
NN
5315fi
5316fi
ba479fd2 5317FLEX=$ac_cv_prog_FLEX
73458fb7 5318if test -n "$FLEX"; then
ba479fd2
NN
5319 echo "$as_me:$LINENO: result: $FLEX" >&5
5320echo "${ECHO_T}$FLEX" >&6
73458fb7 5321else
ba479fd2
NN
5322 echo "$as_me:$LINENO: result: no" >&5
5323echo "${ECHO_T}no" >&6
73458fb7
NN
5324fi
5325
7c27e184
PB
5326 test -n "$FLEX" && break
5327done
5328test -n "$FLEX" || FLEX="$MISSING flex"
5329
73458fb7
NN
5330
5331# Bison?
7c27e184
PB
5332for ac_prog in bison
5333do
5334 # Extract the first word of "$ac_prog", so it can be a program name with args.
5335set dummy $ac_prog; ac_word=$2
ba479fd2
NN
5336echo "$as_me:$LINENO: checking for $ac_word" >&5
5337echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5338if test "${ac_cv_prog_BISON+set}" = set; then
5339 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5340else
5341 if test -n "$BISON"; then
5342 ac_cv_prog_BISON="$BISON" # Let the user override the test.
5343else
ba479fd2
NN
5344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5345for as_dir in $PATH
5346do
5347 IFS=$as_save_IFS
5348 test -z "$as_dir" && as_dir=.
5349 for ac_exec_ext in '' $ac_executable_extensions; do
5350 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 5351 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
5352 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5353 break 2
5354 fi
5355done
5356done
5357
73458fb7
NN
5358fi
5359fi
ba479fd2 5360BISON=$ac_cv_prog_BISON
73458fb7 5361if test -n "$BISON"; then
ba479fd2
NN
5362 echo "$as_me:$LINENO: result: $BISON" >&5
5363echo "${ECHO_T}$BISON" >&6
73458fb7 5364else
ba479fd2
NN
5365 echo "$as_me:$LINENO: result: no" >&5
5366echo "${ECHO_T}no" >&6
73458fb7
NN
5367fi
5368
7c27e184
PB
5369 test -n "$BISON" && break
5370done
5371test -n "$BISON" || BISON="$MISSING bison"
5372
5373
5374# Binutils are not build modules, unlike bison/flex/makeinfo. So we
5375# check for build == host before using them.
73458fb7 5376
f6a874ac 5377# NM
414adbdd
GK
5378if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
5379 && test -d ../binutils ; then
f6a874ac
JW
5380 NM='$(objdir)/../binutils/nm-new'
5381else
5382 # Extract the first word of "nm", so it can be a program name with args.
5383set dummy nm; ac_word=$2
5384echo "$as_me:$LINENO: checking for $ac_word" >&5
5385echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5386if test "${ac_cv_prog_NM+set}" = set; then
5387 echo $ECHO_N "(cached) $ECHO_C" >&6
5388else
5389 if test -n "$NM"; then
5390 ac_cv_prog_NM="$NM" # Let the user override the test.
5391else
5392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5393for as_dir in $PATH
5394do
5395 IFS=$as_save_IFS
5396 test -z "$as_dir" && as_dir=.
5397 for ac_exec_ext in '' $ac_executable_extensions; do
5398 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5399 ac_cv_prog_NM="nm"
5400 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5401 break 2
5402 fi
5403done
5404done
5405
5406 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
5407fi
5408fi
5409NM=$ac_cv_prog_NM
5410if test -n "$NM"; then
5411 echo "$as_me:$LINENO: result: $NM" >&5
5412echo "${ECHO_T}$NM" >&6
5413else
5414 echo "$as_me:$LINENO: result: no" >&5
5415echo "${ECHO_T}no" >&6
5416fi
5417
5418fi
5419
5420# AR
414adbdd
GK
5421if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
5422 && test -d ../binutils ; then
f6a874ac
JW
5423 AR='$(objdir)/../binutils/ar'
5424else
5425 # Extract the first word of "ar", so it can be a program name with args.
5426set dummy ar; ac_word=$2
5427echo "$as_me:$LINENO: checking for $ac_word" >&5
5428echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5429if test "${ac_cv_prog_AR+set}" = set; then
5430 echo $ECHO_N "(cached) $ECHO_C" >&6
5431else
5432 if test -n "$AR"; then
5433 ac_cv_prog_AR="$AR" # Let the user override the test.
5434else
5435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5436for as_dir in $PATH
5437do
5438 IFS=$as_save_IFS
5439 test -z "$as_dir" && as_dir=.
5440 for ac_exec_ext in '' $ac_executable_extensions; do
5441 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5442 ac_cv_prog_AR="ar"
5443 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5444 break 2
5445 fi
5446done
5447done
5448
5449 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
5450fi
5451fi
5452AR=$ac_cv_prog_AR
5453if test -n "$AR"; then
5454 echo "$as_me:$LINENO: result: $AR" >&5
5455echo "${ECHO_T}$AR" >&6
5456else
5457 echo "$as_me:$LINENO: result: no" >&5
5458echo "${ECHO_T}no" >&6
5459fi
5460
5461fi
5462
5463
73458fb7
NN
5464# --------------------
5465# Checks for C headers
5466# --------------------
5467
ba479fd2
NN
5468echo "$as_me:$LINENO: checking for GNU C library" >&5
5469echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
5470if test "${gcc_cv_glibc+set}" = set; then
5471 echo $ECHO_N "(cached) $ECHO_C" >&6
5472else
5473 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5474/* confdefs.h. */
5475_ACEOF
5476cat confdefs.h >>conftest.$ac_ext
5477cat >>conftest.$ac_ext <<_ACEOF
5478/* end confdefs.h. */
73458fb7 5479#include <features.h>
ba479fd2
NN
5480int
5481main ()
5482{
73458fb7
NN
5483
5484#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
5485#error Not a GNU C library system
5486#endif
ba479fd2
NN
5487 ;
5488 return 0;
5489}
5490_ACEOF
5491rm -f conftest.$ac_objext
5492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5493 (eval $ac_compile) 2>conftest.er1
ba479fd2 5494 ac_status=$?
86da66b5
HPN
5495 grep -v '^ *+' conftest.er1 >conftest.err
5496 rm -f conftest.er1
5497 cat conftest.err >&5
ba479fd2
NN
5498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5499 (exit $ac_status); } &&
fb38008e 5500 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5502 (eval $ac_try) 2>&5
5503 ac_status=$?
5504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5505 (exit $ac_status); }; } &&
5506 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5508 (eval $ac_try) 2>&5
5509 ac_status=$?
5510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5511 (exit $ac_status); }; }; then
73458fb7
NN
5512 gcc_cv_glibc=yes
5513else
ba479fd2
NN
5514 echo "$as_me: failed program was:" >&5
5515sed 's/^/| /' conftest.$ac_ext >&5
5516
5517gcc_cv_glibc=no
73458fb7 5518fi
86da66b5 5519rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
5520fi
5521
ba479fd2
NN
5522echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
5523echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 5524if test $gcc_cv_glibc = yes; then
ba479fd2
NN
5525
5526cat >>confdefs.h <<\_ACEOF
73458fb7 5527#define _GNU_SOURCE 1
ba479fd2 5528_ACEOF
73458fb7
NN
5529
5530fi
5531
ca9bc441
NN
5532# Need to reject headers which give warnings, so that the -Werror bootstrap
5533# works later. *sigh* This needs to come before all header checks.
5534
5535ac_c_preproc_warn_flag=yes
5536
ba479fd2
NN
5537echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5538echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5539if test "${ac_cv_header_stdc+set}" = set; then
5540 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 5541else
ba479fd2 5542 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5543/* confdefs.h. */
5544_ACEOF
5545cat confdefs.h >>conftest.$ac_ext
5546cat >>conftest.$ac_ext <<_ACEOF
5547/* end confdefs.h. */
956d6950
JL
5548#include <stdlib.h>
5549#include <stdarg.h>
5550#include <string.h>
5551#include <float.h>
ba479fd2
NN
5552
5553int
5554main ()
5555{
5556
5557 ;
5558 return 0;
5559}
5560_ACEOF
5561rm -f conftest.$ac_objext
5562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5563 (eval $ac_compile) 2>conftest.er1
ba479fd2 5564 ac_status=$?
86da66b5
HPN
5565 grep -v '^ *+' conftest.er1 >conftest.err
5566 rm -f conftest.er1
5567 cat conftest.err >&5
ba479fd2
NN
5568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5569 (exit $ac_status); } &&
fb38008e 5570 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5572 (eval $ac_try) 2>&5
5573 ac_status=$?
5574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5575 (exit $ac_status); }; } &&
5576 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5578 (eval $ac_try) 2>&5
5579 ac_status=$?
5580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581 (exit $ac_status); }; }; then
956d6950
JL
5582 ac_cv_header_stdc=yes
5583else
ba479fd2
NN
5584 echo "$as_me: failed program was:" >&5
5585sed 's/^/| /' conftest.$ac_ext >&5
5586
5587ac_cv_header_stdc=no
956d6950 5588fi
86da66b5 5589rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
5590
5591if test $ac_cv_header_stdc = yes; then
5592 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 5593 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5594/* confdefs.h. */
5595_ACEOF
5596cat confdefs.h >>conftest.$ac_ext
5597cat >>conftest.$ac_ext <<_ACEOF
5598/* end confdefs.h. */
956d6950 5599#include <string.h>
ba479fd2
NN
5600
5601_ACEOF
956d6950 5602if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 5603 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
5604 :
5605else
956d6950
JL
5606 ac_cv_header_stdc=no
5607fi
5608rm -f conftest*
5609
5610fi
5611
5612if test $ac_cv_header_stdc = yes; then
5613 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 5614 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5615/* confdefs.h. */
5616_ACEOF
5617cat confdefs.h >>conftest.$ac_ext
5618cat >>conftest.$ac_ext <<_ACEOF
5619/* end confdefs.h. */
956d6950 5620#include <stdlib.h>
ba479fd2
NN
5621
5622_ACEOF
956d6950 5623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 5624 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
5625 :
5626else
956d6950
JL
5627 ac_cv_header_stdc=no
5628fi
5629rm -f conftest*
5630
5631fi
5632
5633if test $ac_cv_header_stdc = yes; then
5634 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 5635 if test "$cross_compiling" = yes; then
956d6950
JL
5636 :
5637else
ba479fd2 5638 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5639/* confdefs.h. */
5640_ACEOF
5641cat confdefs.h >>conftest.$ac_ext
5642cat >>conftest.$ac_ext <<_ACEOF
5643/* end confdefs.h. */
956d6950 5644#include <ctype.h>
ba479fd2
NN
5645#if ((' ' & 0x0FF) == 0x020)
5646# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5647# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5648#else
5649# define ISLOWER(c) \
86da66b5
HPN
5650 (('a' <= (c) && (c) <= 'i') \
5651 || ('j' <= (c) && (c) <= 'r') \
5652 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
5653# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5654#endif
63cf211a 5655
ba479fd2
NN
5656#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5657int
5658main ()
5659{
5660 int i;
5661 for (i = 0; i < 256; i++)
5662 if (XOR (islower (i), ISLOWER (i))
86da66b5 5663 || toupper (i) != TOUPPER (i))
ba479fd2
NN
5664 exit(2);
5665 exit (0);
5666}
5667_ACEOF
5668rm -f conftest$ac_exeext
5669if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5670 (eval $ac_link) 2>&5
5671 ac_status=$?
5672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5675 (eval $ac_try) 2>&5
5676 ac_status=$?
5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678 (exit $ac_status); }; }; then
956d6950
JL
5679 :
5680else
ba479fd2
NN
5681 echo "$as_me: program exited with status $ac_status" >&5
5682echo "$as_me: failed program was:" >&5
5683sed 's/^/| /' conftest.$ac_ext >&5
5684
5685( exit $ac_status )
5686ac_cv_header_stdc=no
956d6950 5687fi
86da66b5 5688rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 5689fi
956d6950
JL
5690fi
5691fi
ba479fd2
NN
5692echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5693echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 5694if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
5695
5696cat >>confdefs.h <<\_ACEOF
956d6950 5697#define STDC_HEADERS 1
ba479fd2 5698_ACEOF
956d6950
JL
5699
5700fi
5701
ba479fd2
NN
5702echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
5703echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5704if test "${ac_cv_header_time+set}" = set; then
5705 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 5706else
ba479fd2 5707 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5708/* confdefs.h. */
5709_ACEOF
5710cat confdefs.h >>conftest.$ac_ext
5711cat >>conftest.$ac_ext <<_ACEOF
5712/* end confdefs.h. */
956d6950
JL
5713#include <sys/types.h>
5714#include <sys/time.h>
5715#include <time.h>
ba479fd2
NN
5716
5717int
5718main ()
5719{
5720if ((struct tm *) 0)
5721return 0;
5722 ;
5723 return 0;
5724}
5725_ACEOF
5726rm -f conftest.$ac_objext
5727if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5728 (eval $ac_compile) 2>conftest.er1
ba479fd2 5729 ac_status=$?
86da66b5
HPN
5730 grep -v '^ *+' conftest.er1 >conftest.err
5731 rm -f conftest.er1
5732 cat conftest.err >&5
ba479fd2
NN
5733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5734 (exit $ac_status); } &&
fb38008e 5735 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5737 (eval $ac_try) 2>&5
5738 ac_status=$?
5739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5740 (exit $ac_status); }; } &&
5741 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5743 (eval $ac_try) 2>&5
5744 ac_status=$?
5745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5746 (exit $ac_status); }; }; then
956d6950
JL
5747 ac_cv_header_time=yes
5748else
ba479fd2
NN
5749 echo "$as_me: failed program was:" >&5
5750sed 's/^/| /' conftest.$ac_ext >&5
5751
5752ac_cv_header_time=no
956d6950 5753fi
86da66b5 5754rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 5755fi
ba479fd2
NN
5756echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5757echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 5758if test $ac_cv_header_time = yes; then
ba479fd2
NN
5759
5760cat >>confdefs.h <<\_ACEOF
956d6950 5761#define TIME_WITH_SYS_TIME 1
ba479fd2 5762_ACEOF
956d6950
JL
5763
5764fi
5765
41e622a8
AP
5766echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
5767echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
5768if test "${gcc_cv_header_string+set}" = set; then
5769 echo $ECHO_N "(cached) $ECHO_C" >&6
5770else
5771 cat >conftest.$ac_ext <<_ACEOF
5772/* confdefs.h. */
5773_ACEOF
5774cat confdefs.h >>conftest.$ac_ext
5775cat >>conftest.$ac_ext <<_ACEOF
5776/* end confdefs.h. */
5777#include <string.h>
5778#include <strings.h>
5779int
5780main ()
5781{
5782
5783 ;
5784 return 0;
5785}
5786_ACEOF
5787rm -f conftest.$ac_objext
5788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5789 (eval $ac_compile) 2>conftest.er1
5790 ac_status=$?
5791 grep -v '^ *+' conftest.er1 >conftest.err
5792 rm -f conftest.er1
5793 cat conftest.err >&5
5794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5795 (exit $ac_status); } &&
fb38008e 5796 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
41e622a8
AP
5797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5798 (eval $ac_try) 2>&5
5799 ac_status=$?
5800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5801 (exit $ac_status); }; } &&
5802 { ac_try='test -s conftest.$ac_objext'
5803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5804 (eval $ac_try) 2>&5
5805 ac_status=$?
5806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5807 (exit $ac_status); }; }; then
5808 gcc_cv_header_string=yes
5809else
5810 echo "$as_me: failed program was:" >&5
5811sed 's/^/| /' conftest.$ac_ext >&5
5812
5813gcc_cv_header_string=no
5814fi
5815rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5816fi
5817echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
5818echo "${ECHO_T}$gcc_cv_header_string" >&6
5819if test $gcc_cv_header_string = yes; then
5820
5821cat >>confdefs.h <<\_ACEOF
5822#define STRING_WITH_STRINGS 1
5823_ACEOF
5824
5825fi
5826
ba479fd2
NN
5827echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5828echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5829if test "${ac_cv_header_sys_wait_h+set}" = set; then
5830 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 5831else
ba479fd2 5832 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5833/* confdefs.h. */
5834_ACEOF
5835cat confdefs.h >>conftest.$ac_ext
5836cat >>conftest.$ac_ext <<_ACEOF
5837/* end confdefs.h. */
e9831ca0
KG
5838#include <sys/types.h>
5839#include <sys/wait.h>
5840#ifndef WEXITSTATUS
ba479fd2 5841# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
5842#endif
5843#ifndef WIFEXITED
ba479fd2 5844# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 5845#endif
ba479fd2
NN
5846
5847int
5848main ()
5849{
5850 int s;
5851 wait (&s);
5852 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5853 ;
5854 return 0;
5855}
5856_ACEOF
5857rm -f conftest.$ac_objext
5858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5859 (eval $ac_compile) 2>conftest.er1
ba479fd2 5860 ac_status=$?
86da66b5
HPN
5861 grep -v '^ *+' conftest.er1 >conftest.err
5862 rm -f conftest.er1
5863 cat conftest.err >&5
ba479fd2
NN
5864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5865 (exit $ac_status); } &&
fb38008e 5866 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5868 (eval $ac_try) 2>&5
5869 ac_status=$?
5870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5871 (exit $ac_status); }; } &&
5872 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5874 (eval $ac_try) 2>&5
5875 ac_status=$?
5876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5877 (exit $ac_status); }; }; then
e9831ca0
KG
5878 ac_cv_header_sys_wait_h=yes
5879else
ba479fd2
NN
5880 echo "$as_me: failed program was:" >&5
5881sed 's/^/| /' conftest.$ac_ext >&5
5882
5883ac_cv_header_sys_wait_h=no
e9831ca0 5884fi
86da66b5 5885rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 5886fi
ba479fd2
NN
5887echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5888echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 5889if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
5890
5891cat >>confdefs.h <<\_ACEOF
e9831ca0 5892#define HAVE_SYS_WAIT_H 1
ba479fd2 5893_ACEOF
6e3f3080 5894
63cf211a 5895fi
6e3f3080 5896
ba479fd2
NN
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h \
1072ec3f 5919 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 5920 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 5921 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 5922do
ba479fd2 5923as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 5924echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
5925echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5926if eval "test \"\${$as_ac_Header+set}\" = set"; then
5927 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 5928else
ca9bc441 5929 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5930/* confdefs.h. */
5931_ACEOF
5932cat confdefs.h >>conftest.$ac_ext
5933cat >>conftest.$ac_ext <<_ACEOF
5934/* end confdefs.h. */
5935#include <$ac_header>
5936_ACEOF
5937if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5938 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5939 ac_status=$?
5940 grep -v '^ *+' conftest.er1 >conftest.err
5941 rm -f conftest.er1
5942 cat conftest.err >&5
5943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5944 (exit $ac_status); } >/dev/null; then
5945 if test -s conftest.err; then
5946 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 5947 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
5948 else
5949 ac_cpp_err=
5950 fi
5951else
5952 ac_cpp_err=yes
5953fi
5954if test -z "$ac_cpp_err"; then
ca9bc441 5955 eval "$as_ac_Header=yes"
ba479fd2
NN
5956else
5957 echo "$as_me: failed program was:" >&5
5958sed 's/^/| /' conftest.$ac_ext >&5
5959
ca9bc441 5960 eval "$as_ac_Header=no"
ba479fd2
NN
5961fi
5962rm -f conftest.err conftest.$ac_ext
6e3f3080 5963fi
ba479fd2
NN
5964echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5965echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
5966if test `eval echo '${'$as_ac_Header'}'` = yes; then
5967 cat >>confdefs.h <<_ACEOF
5968#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5969_ACEOF
5970
956d6950
JL
5971fi
5972done
5973
5974
f24af81b 5975# Check for thread headers.
ca9bc441 5976echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
5977echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
5978if test "${ac_cv_header_thread_h+set}" = set; then
5979 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 5980else
ca9bc441 5981 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5982/* confdefs.h. */
5983_ACEOF
5984cat confdefs.h >>conftest.$ac_ext
5985cat >>conftest.$ac_ext <<_ACEOF
5986/* end confdefs.h. */
5987#include <thread.h>
5988_ACEOF
5989if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5990 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5991 ac_status=$?
5992 grep -v '^ *+' conftest.er1 >conftest.err
5993 rm -f conftest.er1
5994 cat conftest.err >&5
5995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5996 (exit $ac_status); } >/dev/null; then
5997 if test -s conftest.err; then
5998 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 5999 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6000 else
6001 ac_cpp_err=
6002 fi
6003else
6004 ac_cpp_err=yes
6005fi
6006if test -z "$ac_cpp_err"; then
ca9bc441 6007 ac_cv_header_thread_h=yes
ba479fd2
NN
6008else
6009 echo "$as_me: failed program was:" >&5
6010sed 's/^/| /' conftest.$ac_ext >&5
6011
ca9bc441 6012 ac_cv_header_thread_h=no
ba479fd2
NN
6013fi
6014rm -f conftest.err conftest.$ac_ext
6e3f3080 6015fi
ba479fd2
NN
6016echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
6017echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 6018if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
6019 have_thread_h=yes
6020else
ba479fd2 6021 have_thread_h=
f24af81b
TT
6022fi
6023
ca9bc441 6024echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
6025echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
6026if test "${ac_cv_header_pthread_h+set}" = set; then
6027 echo $ECHO_N "(cached) $ECHO_C" >&6
f24af81b 6028else
ca9bc441 6029 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6030/* confdefs.h. */
6031_ACEOF
6032cat confdefs.h >>conftest.$ac_ext
6033cat >>conftest.$ac_ext <<_ACEOF
6034/* end confdefs.h. */
6035#include <pthread.h>
6036_ACEOF
6037if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6038 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6039 ac_status=$?
6040 grep -v '^ *+' conftest.er1 >conftest.err
6041 rm -f conftest.er1
6042 cat conftest.err >&5
6043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6044 (exit $ac_status); } >/dev/null; then
6045 if test -s conftest.err; then
6046 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6047 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6048 else
6049 ac_cpp_err=
6050 fi
6051else
6052 ac_cpp_err=yes
6053fi
6054if test -z "$ac_cpp_err"; then
ca9bc441 6055 ac_cv_header_pthread_h=yes
ba479fd2
NN
6056else
6057 echo "$as_me: failed program was:" >&5
6058sed 's/^/| /' conftest.$ac_ext >&5
6059
ca9bc441 6060 ac_cv_header_pthread_h=no
ba479fd2
NN
6061fi
6062rm -f conftest.err conftest.$ac_ext
6e3f3080 6063fi
ba479fd2
NN
6064echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
6065echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 6066if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
6067 have_pthread_h=yes
6068else
ba479fd2 6069 have_pthread_h=
f24af81b
TT
6070fi
6071
6072
84c041a1 6073# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
6074echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
6075echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
6076if test "${gcc_cv_decl_char_bit+set}" = set; then
6077 echo $ECHO_N "(cached) $ECHO_C" >&6
6078else
6079 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6080/* confdefs.h. */
6081_ACEOF
6082cat confdefs.h >>conftest.$ac_ext
6083cat >>conftest.$ac_ext <<_ACEOF
6084/* end confdefs.h. */
75e93faa
ZW
6085#ifdef HAVE_LIMITS_H
6086#include <limits.h>
6087#endif
6088#ifdef CHAR_BIT
6089found
6090#endif
ba479fd2 6091_ACEOF
75e93faa 6092if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 6093 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
6094 gcc_cv_decl_char_bit=yes
6095else
75e93faa
ZW
6096 gcc_cv_decl_char_bit=no
6097fi
6098rm -f conftest*
6099
6100
6101fi
ba479fd2
NN
6102echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
6103echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 6104if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
6105 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
6106echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
6107if test "${gcc_cv_c_nbby+set}" = set; then
6108 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
6109else
6110 i=8
6111 gcc_cv_c_nbby=
6112 while test $i -lt 65; do
ba479fd2 6113 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6114/* confdefs.h. */
6115_ACEOF
6116cat confdefs.h >>conftest.$ac_ext
6117cat >>conftest.$ac_ext <<_ACEOF
6118/* end confdefs.h. */
6119
6120int
6121main ()
6122{
4e70264f
ZW
6123switch(0) {
6124 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
6125 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
6126 ; }
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); } &&
fb38008e 6140 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
6141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6142 (eval $ac_try) 2>&5
6143 ac_status=$?
6144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6145 (exit $ac_status); }; } &&
6146 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6148 (eval $ac_try) 2>&5
6149 ac_status=$?
6150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6151 (exit $ac_status); }; }; then
4e70264f 6152 gcc_cv_c_nbby=$i; break
75e93faa 6153else
ba479fd2
NN
6154 echo "$as_me: failed program was:" >&5
6155sed 's/^/| /' conftest.$ac_ext >&5
6156
75e93faa 6157fi
86da66b5 6158rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
6159 i=`expr $i + 1`
6160 done
6161 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
6162
6163fi
ba479fd2
NN
6164echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
6165echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 6166if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
6167 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
6168echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
6169 { (exit 1); exit 1; }; }
75e93faa 6170else
ba479fd2
NN
6171
6172cat >>confdefs.h <<_ACEOF
75e93faa 6173#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 6174_ACEOF
75e93faa
ZW
6175
6176fi
6177fi
ba479fd2
NN
6178echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
6179echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
6180if test "${ac_cv_c_bigendian+set}" = set; then
6181 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 6182else
4977bab6
ZW
6183 ac_cv_c_bigendian=unknown
6184# See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 6185cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6186/* confdefs.h. */
6187_ACEOF
6188cat confdefs.h >>conftest.$ac_ext
6189cat >>conftest.$ac_ext <<_ACEOF
6190/* end confdefs.h. */
4977bab6
ZW
6191#include <sys/types.h>
6192#include <sys/param.h>
ba479fd2
NN
6193int
6194main ()
6195{
2d6eb5bf 6196
4977bab6
ZW
6197#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6198 bogus endian macros
84c041a1 6199#endif
ba479fd2
NN
6200 ;
6201 return 0;
6202}
6203_ACEOF
6204rm -f conftest.$ac_objext
6205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6206 (eval $ac_compile) 2>conftest.er1
ba479fd2 6207 ac_status=$?
86da66b5
HPN
6208 grep -v '^ *+' conftest.er1 >conftest.err
6209 rm -f conftest.er1
6210 cat conftest.err >&5
ba479fd2
NN
6211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6212 (exit $ac_status); } &&
fb38008e 6213 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
6214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6215 (eval $ac_try) 2>&5
6216 ac_status=$?
6217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6218 (exit $ac_status); }; } &&
6219 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6221 (eval $ac_try) 2>&5
6222 ac_status=$?
6223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6224 (exit $ac_status); }; }; then
4977bab6 6225 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 6226cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6227/* confdefs.h. */
6228_ACEOF
6229cat confdefs.h >>conftest.$ac_ext
6230cat >>conftest.$ac_ext <<_ACEOF
6231/* end confdefs.h. */
4977bab6
ZW
6232#include <sys/types.h>
6233#include <sys/param.h>
ba479fd2
NN
6234int
6235main ()
6236{
4977bab6
ZW
6237
6238#if BYTE_ORDER != BIG_ENDIAN
6239 not big endian
84c041a1 6240#endif
ba479fd2
NN
6241 ;
6242 return 0;
6243}
6244_ACEOF
6245rm -f conftest.$ac_objext
6246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6247 (eval $ac_compile) 2>conftest.er1
ba479fd2 6248 ac_status=$?
86da66b5
HPN
6249 grep -v '^ *+' conftest.er1 >conftest.err
6250 rm -f conftest.er1
6251 cat conftest.err >&5
ba479fd2
NN
6252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6253 (exit $ac_status); } &&
fb38008e 6254 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
6255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6256 (eval $ac_try) 2>&5
6257 ac_status=$?
6258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6259 (exit $ac_status); }; } &&
6260 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6262 (eval $ac_try) 2>&5
6263 ac_status=$?
6264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6265 (exit $ac_status); }; }; then
4977bab6
ZW
6266 ac_cv_c_bigendian=yes
6267else
ba479fd2
NN
6268 echo "$as_me: failed program was:" >&5
6269sed 's/^/| /' conftest.$ac_ext >&5
6270
6271ac_cv_c_bigendian=no
4977bab6 6272fi
86da66b5 6273rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 6274else
ba479fd2
NN
6275 echo "$as_me: failed program was:" >&5
6276sed 's/^/| /' conftest.$ac_ext >&5
6277
4977bab6 6278fi
86da66b5 6279rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6
ZW
6280if test $ac_cv_c_bigendian = unknown; then
6281if test "$cross_compiling" = yes; then
ba479fd2
NN
6282 echo $ac_n "cross-compiling... " 2>&6
6283else
6284 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6285/* confdefs.h. */
6286_ACEOF
6287cat confdefs.h >>conftest.$ac_ext
6288cat >>conftest.$ac_ext <<_ACEOF
6289/* end confdefs.h. */
4977bab6
ZW
6290main () {
6291 /* Are we little or big endian? From Harbison&Steele. */
6292 union
6293 {
6294 long l;
6295 char c[sizeof (long)];
6296 } u;
6297 u.l = 1;
6298 exit (u.c[sizeof (long) - 1] == 1);
6299}
ba479fd2
NN
6300_ACEOF
6301rm -f conftest$ac_exeext
6302if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6303 (eval $ac_link) 2>&5
6304 ac_status=$?
6305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6306 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6308 (eval $ac_try) 2>&5
6309 ac_status=$?
6310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6311 (exit $ac_status); }; }; then
4977bab6
ZW
6312 ac_cv_c_bigendian=no
6313else
ba479fd2
NN
6314 echo "$as_me: program exited with status $ac_status" >&5
6315echo "$as_me: failed program was:" >&5
6316sed 's/^/| /' conftest.$ac_ext >&5
6317
6318( exit $ac_status )
6319ac_cv_c_bigendian=yes
4977bab6 6320fi
86da66b5 6321rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 6322fi
4977bab6
ZW
6323fi
6324fi
ba479fd2
NN
6325echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
6326echo "${ECHO_T}$ac_cv_c_bigendian" >&6
4977bab6 6327if test $ac_cv_c_bigendian = unknown; then
ba479fd2
NN
6328echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
6329echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
2d6eb5bf 6330
4977bab6
ZW
6331cat >conftest.c <<EOF
6332short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6333short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6334void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
6335short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6336short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6337void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
6338int main() { _ascii (); _ebcdic (); return 0; }
6339EOF
6340 if test -f conftest.c ; then
3beb1315 6341 if ${CC-cc} ${CFLAGS} -c conftest.c -o conftest.o && test -f conftest.o ; then
4977bab6
ZW
6342 if test `grep -l BIGenDianSyS conftest.o` ; then
6343 echo $ac_n ' big endian probe OK, ' 1>&6
6344 ac_cv_c_bigendian=yes
6345 fi
6346 if test `grep -l LiTTleEnDian conftest.o` ; then
6347 echo $ac_n ' little endian probe OK, ' 1>&6
6348 if test $ac_cv_c_bigendian = yes ; then
6349 ac_cv_c_bigendian=unknown;
6350 else
6351 ac_cv_c_bigendian=no
6352 fi
6353 fi
6354 echo $ac_n 'guessing bigendian ... ' >&6
6355 fi
6356 fi
ba479fd2
NN
6357echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
6358echo "${ECHO_T}$ac_cv_c_bigendian" >&6
84c041a1 6359fi
4977bab6 6360if test $ac_cv_c_bigendian = yes; then
ba479fd2
NN
6361
6362cat >>confdefs.h <<\_ACEOF
4977bab6 6363#define WORDS_BIGENDIAN 1
ba479fd2 6364_ACEOF
cafe096b 6365
ba479fd2
NN
6366
6367cat >>confdefs.h <<\_ACEOF
84c041a1 6368#define HOST_WORDS_BIG_ENDIAN 1
ba479fd2 6369_ACEOF
84c041a1 6370
4977bab6
ZW
6371 BYTEORDER=4321
6372else
6373 BYTEORDER=1234
6374fi
ba479fd2
NN
6375
6376cat >>confdefs.h <<_ACEOF
4977bab6 6377#define BYTEORDER $BYTEORDER
ba479fd2 6378_ACEOF
4977bab6
ZW
6379
6380if test $ac_cv_c_bigendian = unknown; then
3beb1315
HPN
6381 { { echo "$as_me:$LINENO: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&5
6382echo "$as_me: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&2;}
6383 { (exit 1); exit 1; }; }
84c041a1
ZW
6384fi
6385
75e93faa 6386
73458fb7
NN
6387# --------
6388# UNSORTED
6389# --------
1e608388 6390
73458fb7
NN
6391# Stage specific cflags for build.
6392stage1_cflags=
6393case $build in
6394vax-*-*)
6395 if test x$GCC = xyes
6396 then
6397 stage1_cflags="-Wa,-J"
6398 else
6399 stage1_cflags="-J"
6400 fi
6401 ;;
6402powerpc-*-darwin*)
6403 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
6404 # sources; use -no-cpp-precomp to get to GNU cpp.
6405 # Apple's GCC has bugs in designated initializer handling, so disable
6406 # that too.
6407 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
6408 ;;
6409esac
1e608388 6410
1e608388 6411
4e70264f
ZW
6412# These libraries may be used by collect2.
6413# We may need a special search path to get them linked.
ba479fd2
NN
6414echo "$as_me:$LINENO: checking for collect2 libraries" >&5
6415echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
6416if test "${gcc_cv_collect2_libs+set}" = set; then
6417 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
6418else
6419 save_LIBS="$LIBS"
7f2749d4 6420for libs in '' -lld -lmld \
4e70264f
ZW
6421 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
6422 '-L/usr/lib/cmplrs/cc3.11 -lmld'
6423do
6424 LIBS="$libs"
ba479fd2 6425 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6426/* confdefs.h. */
6427_ACEOF
6428cat confdefs.h >>conftest.$ac_ext
6429cat >>conftest.$ac_ext <<_ACEOF
6430/* end confdefs.h. */
6431
4e70264f 6432/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6433#ifdef __cplusplus
6434extern "C"
6435#endif
4e70264f 6436/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6437 builtin and then its argument prototype would still apply. */
6438char ldopen ();
6439int
6440main ()
6441{
6442ldopen ();
6443 ;
6444 return 0;
6445}
6446_ACEOF
6447rm -f conftest.$ac_objext conftest$ac_exeext
6448if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 6449 (eval $ac_link) 2>conftest.er1
ba479fd2 6450 ac_status=$?
86da66b5
HPN
6451 grep -v '^ *+' conftest.er1 >conftest.err
6452 rm -f conftest.er1
6453 cat conftest.err >&5
ba479fd2
NN
6454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6455 (exit $ac_status); } &&
fb38008e 6456 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
6457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6458 (eval $ac_try) 2>&5
6459 ac_status=$?
6460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6461 (exit $ac_status); }; } &&
6462 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
6463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6464 (eval $ac_try) 2>&5
6465 ac_status=$?
6466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6467 (exit $ac_status); }; }; then
4e70264f
ZW
6468 gcc_cv_collect2_libs="$libs"; break
6469else
ba479fd2
NN
6470 echo "$as_me: failed program was:" >&5
6471sed 's/^/| /' conftest.$ac_ext >&5
6472
4e70264f 6473fi
86da66b5
HPN
6474rm -f conftest.err conftest.$ac_objext \
6475 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
6476done
6477LIBS="$save_LIBS"
6478test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
6479fi
ba479fd2
NN
6480echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
6481echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
6482case $gcc_cv_collect2_libs in
6483 "none required") ;;
6484 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
6485esac
6486
6487
7f2749d4
RK
6488# When building Ada code on Alpha, we need exc_resume which is usually in
6489# -lexc. So test for it.
6490save_LIBS="$LIBS"
6491LIBS=
ba479fd2
NN
6492echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
6493echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
6494if test "${ac_cv_search_exc_resume+set}" = set; then
6495 echo $ECHO_N "(cached) $ECHO_C" >&6
6496else
6497 ac_func_search_save_LIBS=$LIBS
6498ac_cv_search_exc_resume=no
6499cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6500/* confdefs.h. */
6501_ACEOF
6502cat confdefs.h >>conftest.$ac_ext
6503cat >>conftest.$ac_ext <<_ACEOF
6504/* end confdefs.h. */
7f2749d4 6505
7f2749d4 6506/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6507#ifdef __cplusplus
6508extern "C"
6509#endif
7f2749d4 6510/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6511 builtin and then its argument prototype would still apply. */
6512char exc_resume ();
6513int
6514main ()
6515{
6516exc_resume ();
6517 ;
6518 return 0;
6519}
6520_ACEOF
6521rm -f conftest.$ac_objext conftest$ac_exeext
6522if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 6523 (eval $ac_link) 2>conftest.er1
ba479fd2 6524 ac_status=$?
86da66b5
HPN
6525 grep -v '^ *+' conftest.er1 >conftest.err
6526 rm -f conftest.er1
6527 cat conftest.err >&5
ba479fd2
NN
6528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6529 (exit $ac_status); } &&
fb38008e 6530 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
6531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6532 (eval $ac_try) 2>&5
6533 ac_status=$?
6534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6535 (exit $ac_status); }; } &&
6536 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
6537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6538 (eval $ac_try) 2>&5
6539 ac_status=$?
6540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6541 (exit $ac_status); }; }; then
7f2749d4
RK
6542 ac_cv_search_exc_resume="none required"
6543else
ba479fd2
NN
6544 echo "$as_me: failed program was:" >&5
6545sed 's/^/| /' conftest.$ac_ext >&5
6546
7f2749d4 6547fi
86da66b5
HPN
6548rm -f conftest.err conftest.$ac_objext \
6549 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
6550if test "$ac_cv_search_exc_resume" = no; then
6551 for ac_lib in exc; do
6552 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6553 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6554/* confdefs.h. */
6555_ACEOF
6556cat confdefs.h >>conftest.$ac_ext
6557cat >>conftest.$ac_ext <<_ACEOF
6558/* end confdefs.h. */
6559
7f2749d4 6560/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6561#ifdef __cplusplus
6562extern "C"
6563#endif
7f2749d4 6564/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6565 builtin and then its argument prototype would still apply. */
6566char exc_resume ();
6567int
6568main ()
6569{
6570exc_resume ();
6571 ;
6572 return 0;
6573}
6574_ACEOF
6575rm -f conftest.$ac_objext conftest$ac_exeext
6576if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 6577 (eval $ac_link) 2>conftest.er1
ba479fd2 6578 ac_status=$?
86da66b5
HPN
6579 grep -v '^ *+' conftest.er1 >conftest.err
6580 rm -f conftest.er1
6581 cat conftest.err >&5
ba479fd2
NN
6582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6583 (exit $ac_status); } &&
fb38008e 6584 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
6585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6586 (eval $ac_try) 2>&5
6587 ac_status=$?
6588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6589 (exit $ac_status); }; } &&
6590 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
6591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6592 (eval $ac_try) 2>&5
6593 ac_status=$?
6594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6595 (exit $ac_status); }; }; then
6596 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
6597break
6598else
ba479fd2
NN
6599 echo "$as_me: failed program was:" >&5
6600sed 's/^/| /' conftest.$ac_ext >&5
6601
cafe096b 6602fi
86da66b5
HPN
6603rm -f conftest.err conftest.$ac_objext \
6604 conftest$ac_exeext conftest.$ac_ext
ba479fd2 6605 done
6e3f3080 6606fi
ba479fd2
NN
6607LIBS=$ac_func_search_save_LIBS
6608fi
6609echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
6610echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
6611if test "$ac_cv_search_exc_resume" != no; then
63cf211a 6612 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 6613
7f2749d4 6614fi
ba479fd2 6615
7f2749d4
RK
6616GNAT_LIBEXC="$LIBS"
6617LIBS="$save_LIBS"
6618
6619
62c9aa5f
ZW
6620# Some systems put ldexp and frexp in libm instead of libc; assume
6621# they're both in the same place. jcf-dump needs them.
6622save_LIBS="$LIBS"
6623LIBS=
ba479fd2
NN
6624echo "$as_me:$LINENO: checking for library containing ldexp" >&5
6625echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
6626if test "${ac_cv_search_ldexp+set}" = set; then
6627 echo $ECHO_N "(cached) $ECHO_C" >&6
6628else
6629 ac_func_search_save_LIBS=$LIBS
6630ac_cv_search_ldexp=no
6631cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6632/* confdefs.h. */
6633_ACEOF
6634cat confdefs.h >>conftest.$ac_ext
6635cat >>conftest.$ac_ext <<_ACEOF
6636/* end confdefs.h. */
62c9aa5f 6637
62c9aa5f 6638/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6639#ifdef __cplusplus
6640extern "C"
6641#endif
62c9aa5f 6642/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6643 builtin and then its argument prototype would still apply. */
6644char ldexp ();
6645int
6646main ()
6647{
6648ldexp ();
6649 ;
6650 return 0;
6651}
6652_ACEOF
6653rm -f conftest.$ac_objext conftest$ac_exeext
6654if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 6655 (eval $ac_link) 2>conftest.er1
ba479fd2 6656 ac_status=$?
86da66b5
HPN
6657 grep -v '^ *+' conftest.er1 >conftest.err
6658 rm -f conftest.er1
6659 cat conftest.err >&5
ba479fd2
NN
6660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6661 (exit $ac_status); } &&
fb38008e 6662 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
6663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6664 (eval $ac_try) 2>&5
6665 ac_status=$?
6666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6667 (exit $ac_status); }; } &&
6668 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
6669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6670 (eval $ac_try) 2>&5
6671 ac_status=$?
6672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6673 (exit $ac_status); }; }; then
62c9aa5f
ZW
6674 ac_cv_search_ldexp="none required"
6675else
ba479fd2
NN
6676 echo "$as_me: failed program was:" >&5
6677sed 's/^/| /' conftest.$ac_ext >&5
6678
62c9aa5f 6679fi
86da66b5
HPN
6680rm -f conftest.err conftest.$ac_objext \
6681 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
6682if test "$ac_cv_search_ldexp" = no; then
6683 for ac_lib in m; do
6684 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6685 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6686/* confdefs.h. */
6687_ACEOF
6688cat confdefs.h >>conftest.$ac_ext
6689cat >>conftest.$ac_ext <<_ACEOF
6690/* end confdefs.h. */
6691
62c9aa5f 6692/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6693#ifdef __cplusplus
6694extern "C"
6695#endif
62c9aa5f 6696/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6697 builtin and then its argument prototype would still apply. */
6698char ldexp ();
6699int
6700main ()
6701{
6702ldexp ();
6703 ;
6704 return 0;
6705}
6706_ACEOF
6707rm -f conftest.$ac_objext conftest$ac_exeext
6708if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 6709 (eval $ac_link) 2>conftest.er1
ba479fd2 6710 ac_status=$?
86da66b5
HPN
6711 grep -v '^ *+' conftest.er1 >conftest.err
6712 rm -f conftest.er1
6713 cat conftest.err >&5
ba479fd2
NN
6714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715 (exit $ac_status); } &&
fb38008e 6716 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
6717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6718 (eval $ac_try) 2>&5
6719 ac_status=$?
6720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6721 (exit $ac_status); }; } &&
6722 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
6723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6724 (eval $ac_try) 2>&5
6725 ac_status=$?
6726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6727 (exit $ac_status); }; }; then
6728 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
6729break
6730else
ba479fd2
NN
6731 echo "$as_me: failed program was:" >&5
6732sed 's/^/| /' conftest.$ac_ext >&5
6733
cafe096b 6734fi
86da66b5
HPN
6735rm -f conftest.err conftest.$ac_objext \
6736 conftest$ac_exeext conftest.$ac_ext
ba479fd2 6737 done
6e3f3080 6738fi
ba479fd2
NN
6739LIBS=$ac_func_search_save_LIBS
6740fi
6741echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
6742echo "${ECHO_T}$ac_cv_search_ldexp" >&6
6743if test "$ac_cv_search_ldexp" != no; then
63cf211a 6744 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 6745
62c9aa5f 6746fi
ba479fd2 6747
62c9aa5f
ZW
6748LDEXP_LIB="$LIBS"
6749LIBS="$save_LIBS"
6750
6751
956d6950
JL
6752# Use <inttypes.h> only if it exists,
6753# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
6754echo "$as_me:$LINENO: checking for inttypes.h" >&5
6755echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
6756if test "${gcc_cv_header_inttypes_h+set}" = set; then
6757 echo $ECHO_N "(cached) $ECHO_C" >&6
6758else
6759 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6760/* confdefs.h. */
6761_ACEOF
6762cat confdefs.h >>conftest.$ac_ext
6763cat >>conftest.$ac_ext <<_ACEOF
6764/* end confdefs.h. */
956d6950
JL
6765#include <sys/types.h>
6766#include <inttypes.h>
ba479fd2
NN
6767int
6768main ()
6769{
956d6950 6770intmax_t i = -1;
ba479fd2
NN
6771 ;
6772 return 0;
6773}
6774_ACEOF
6775rm -f conftest.$ac_objext
6776if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6777 (eval $ac_compile) 2>conftest.er1
ba479fd2 6778 ac_status=$?
86da66b5
HPN
6779 grep -v '^ *+' conftest.er1 >conftest.err
6780 rm -f conftest.er1
6781 cat conftest.err >&5
ba479fd2
NN
6782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6783 (exit $ac_status); } &&
fb38008e 6784 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
6785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6786 (eval $ac_try) 2>&5
6787 ac_status=$?
6788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6789 (exit $ac_status); }; } &&
6790 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6792 (eval $ac_try) 2>&5
6793 ac_status=$?
6794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6795 (exit $ac_status); }; }; then
0056a9b5 6796 gcc_cv_header_inttypes_h=yes
956d6950 6797else
ba479fd2
NN
6798 echo "$as_me: failed program was:" >&5
6799sed 's/^/| /' conftest.$ac_ext >&5
6800
6801gcc_cv_header_inttypes_h=no
956d6950 6802fi
86da66b5 6803rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
6804fi
6805
ba479fd2
NN
6806echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
6807echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 6808if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
6809
6810cat >>confdefs.h <<\_ACEOF
0056a9b5 6811#define HAVE_INTTYPES_H 1
ba479fd2 6812_ACEOF
0056a9b5
KG
6813
6814fi
956d6950 6815
c149cc37 6816
ba479fd2
NN
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6af8c740
KG
6842for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
6843 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
4e87a651 6844 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
56694dd9
ZW
6845 scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \
6846 setlocale
956d6950 6847do
ba479fd2
NN
6848as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6849echo "$as_me:$LINENO: checking for $ac_func" >&5
6850echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6851if eval "test \"\${$as_ac_var+set}\" = set"; then
6852 echo $ECHO_N "(cached) $ECHO_C" >&6
6853else
6854 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6855/* confdefs.h. */
6856_ACEOF
6857cat confdefs.h >>conftest.$ac_ext
6858cat >>conftest.$ac_ext <<_ACEOF
6859/* end confdefs.h. */
86da66b5
HPN
6860/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
6861 For example, HP-UX 11i <limits.h> declares gettimeofday. */
6862#define $ac_func innocuous_$ac_func
6863
956d6950 6864/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
6865 which can conflict with char $ac_func (); below.
6866 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6867 <limits.h> exists even on freestanding compilers. */
86da66b5 6868
ba479fd2
NN
6869#ifdef __STDC__
6870# include <limits.h>
6871#else
6872# include <assert.h>
6873#endif
86da66b5
HPN
6874
6875#undef $ac_func
6876
6e3f3080 6877/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6878#ifdef __cplusplus
6879extern "C"
6880{
6881#endif
6e3f3080 6882/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6883 builtin and then its argument prototype would still apply. */
6884char $ac_func ();
956d6950
JL
6885/* The GNU C library defines this for functions which it implements
6886 to always fail with ENOSYS. Some functions are actually named
6887 something starting with __ and the normal name is an alias. */
6888#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6889choke me
6890#else
ba479fd2
NN
6891char (*f) () = $ac_func;
6892#endif
6893#ifdef __cplusplus
6894}
956d6950
JL
6895#endif
6896
ba479fd2
NN
6897int
6898main ()
6899{
6900return f != $ac_func;
6901 ;
6902 return 0;
6903}
6904_ACEOF
6905rm -f conftest.$ac_objext conftest$ac_exeext
6906if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 6907 (eval $ac_link) 2>conftest.er1
ba479fd2 6908 ac_status=$?
86da66b5
HPN
6909 grep -v '^ *+' conftest.er1 >conftest.err
6910 rm -f conftest.er1
6911 cat conftest.err >&5
ba479fd2
NN
6912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6913 (exit $ac_status); } &&
fb38008e 6914 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
6915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6916 (eval $ac_try) 2>&5
6917 ac_status=$?
6918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6919 (exit $ac_status); }; } &&
6920 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
6921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6922 (eval $ac_try) 2>&5
6923 ac_status=$?
6924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6925 (exit $ac_status); }; }; then
6926 eval "$as_ac_var=yes"
6927else
6928 echo "$as_me: failed program was:" >&5
6929sed 's/^/| /' conftest.$ac_ext >&5
6930
6931eval "$as_ac_var=no"
6932fi
86da66b5
HPN
6933rm -f conftest.err conftest.$ac_objext \
6934 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
6935fi
6936echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6937echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6938if test `eval echo '${'$as_ac_var'}'` = yes; then
6939 cat >>confdefs.h <<_ACEOF
6940#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6941_ACEOF
956d6950 6942
956d6950
JL
6943fi
6944done
6945
6885fc87 6946
39f6c4c8 6947if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
6948 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
6949echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
6950if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
6951 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
6952else
6953 if test "$cross_compiling" = yes; then
6954 gcc_cv_func_mbstowcs_works=yes
6955else
ba479fd2 6956 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6957/* confdefs.h. */
6958_ACEOF
6959cat confdefs.h >>conftest.$ac_ext
6960cat >>conftest.$ac_ext <<_ACEOF
6961/* end confdefs.h. */
39f6c4c8
KW
6962#include <stdlib.h>
6963int main()
6964{
6965 mbstowcs(0, "", 0);
6966 return 0;
6967}
ba479fd2
NN
6968_ACEOF
6969rm -f conftest$ac_exeext
6970if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6971 (eval $ac_link) 2>&5
6972 ac_status=$?
6973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6974 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6976 (eval $ac_try) 2>&5
6977 ac_status=$?
6978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6979 (exit $ac_status); }; }; then
39f6c4c8
KW
6980 gcc_cv_func_mbstowcs_works=yes
6981else
ba479fd2
NN
6982 echo "$as_me: program exited with status $ac_status" >&5
6983echo "$as_me: failed program was:" >&5
6984sed 's/^/| /' conftest.$ac_ext >&5
6985
6986( exit $ac_status )
6987gcc_cv_func_mbstowcs_works=no
39f6c4c8 6988fi
86da66b5 6989rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 6990fi
39f6c4c8 6991fi
ba479fd2
NN
6992echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
6993echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 6994 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
6995
6996cat >>confdefs.h <<\_ACEOF
39f6c4c8 6997#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 6998_ACEOF
39f6c4c8
KW
6999
7000 fi
7001fi
7002
ba479fd2
NN
7003echo "$as_me:$LINENO: checking for ssize_t" >&5
7004echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
7005if test "${ac_cv_type_ssize_t+set}" = set; then
7006 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 7007else
ba479fd2 7008 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7009/* confdefs.h. */
7010_ACEOF
7011cat confdefs.h >>conftest.$ac_ext
7012cat >>conftest.$ac_ext <<_ACEOF
7013/* end confdefs.h. */
8b4fc07a
NN
7014$ac_includes_default
7015int
7016main ()
7017{
7018if ((ssize_t *) 0)
7019 return 0;
7020if (sizeof (ssize_t))
7021 return 0;
7022 ;
7023 return 0;
7024}
ba479fd2 7025_ACEOF
8b4fc07a
NN
7026rm -f conftest.$ac_objext
7027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7028 (eval $ac_compile) 2>conftest.er1
8b4fc07a 7029 ac_status=$?
86da66b5
HPN
7030 grep -v '^ *+' conftest.er1 >conftest.err
7031 rm -f conftest.er1
7032 cat conftest.err >&5
8b4fc07a
NN
7033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7034 (exit $ac_status); } &&
fb38008e 7035 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
7036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7037 (eval $ac_try) 2>&5
7038 ac_status=$?
7039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7040 (exit $ac_status); }; } &&
7041 { ac_try='test -s conftest.$ac_objext'
8b4fc07a
NN
7042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7043 (eval $ac_try) 2>&5
7044 ac_status=$?
7045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7046 (exit $ac_status); }; }; then
cb65112a 7047 ac_cv_type_ssize_t=yes
f12bc141 7048else
8b4fc07a
NN
7049 echo "$as_me: failed program was:" >&5
7050sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 7051
8b4fc07a
NN
7052ac_cv_type_ssize_t=no
7053fi
86da66b5 7054rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 7055fi
ba479fd2
NN
7056echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7057echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
7058if test $ac_cv_type_ssize_t = yes; then
7059 :
7060else
ba479fd2 7061
8b4fc07a 7062cat >>confdefs.h <<_ACEOF
f12bc141 7063#define ssize_t int
ba479fd2 7064_ACEOF
f12bc141
ZW
7065
7066fi
7067
0b9d02c6 7068
e256b8b6
DA
7069# Try to determine the array type of the second argument of getgroups
7070# for the target system (int or gid_t).
ba479fd2
NN
7071echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7072echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
7073if test "${ac_cv_type_uid_t+set}" = set; then
7074 echo $ECHO_N "(cached) $ECHO_C" >&6
7075else
7076 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7077/* confdefs.h. */
7078_ACEOF
7079cat confdefs.h >>conftest.$ac_ext
7080cat >>conftest.$ac_ext <<_ACEOF
7081/* end confdefs.h. */
e256b8b6 7082#include <sys/types.h>
ba479fd2
NN
7083
7084_ACEOF
e256b8b6 7085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7086 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
7087 ac_cv_type_uid_t=yes
7088else
e256b8b6
DA
7089 ac_cv_type_uid_t=no
7090fi
7091rm -f conftest*
7092
7093fi
ba479fd2
NN
7094echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7095echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 7096if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
7097
7098cat >>confdefs.h <<\_ACEOF
e256b8b6 7099#define uid_t int
ba479fd2 7100_ACEOF
cafe096b 7101
ba479fd2
NN
7102
7103cat >>confdefs.h <<\_ACEOF
e256b8b6 7104#define gid_t int
ba479fd2 7105_ACEOF
e256b8b6
DA
7106
7107fi
7108
ba479fd2
NN
7109echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
7110echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
7111if test "${ac_cv_type_getgroups+set}" = set; then
7112 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
7113else
7114 if test "$cross_compiling" = yes; then
7115 ac_cv_type_getgroups=cross
7116else
ba479fd2 7117 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7118/* confdefs.h. */
7119_ACEOF
7120cat confdefs.h >>conftest.$ac_ext
7121cat >>conftest.$ac_ext <<_ACEOF
7122/* end confdefs.h. */
e256b8b6
DA
7123/* Thanks to Mike Rendell for this test. */
7124#include <sys/types.h>
7125#define NGID 256
7126#undef MAX
7127#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
7128
7129int
7130main ()
e256b8b6
DA
7131{
7132 gid_t gidset[NGID];
7133 int i, n;
7134 union { gid_t gval; long lval; } val;
7135
7136 val.lval = -1;
7137 for (i = 0; i < NGID; i++)
7138 gidset[i] = val.gval;
7139 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 7140 gidset);
e256b8b6
DA
7141 /* Exit non-zero if getgroups seems to require an array of ints. This
7142 happens when gid_t is short but getgroups modifies an array of ints. */
7143 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 7144}
ba479fd2
NN
7145_ACEOF
7146rm -f conftest$ac_exeext
7147if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7148 (eval $ac_link) 2>&5
7149 ac_status=$?
7150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7151 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7153 (eval $ac_try) 2>&5
7154 ac_status=$?
7155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7156 (exit $ac_status); }; }; then
7157 ac_cv_type_getgroups=gid_t
63cf211a 7158else
ba479fd2
NN
7159 echo "$as_me: program exited with status $ac_status" >&5
7160echo "$as_me: failed program was:" >&5
7161sed 's/^/| /' conftest.$ac_ext >&5
7162
7163( exit $ac_status )
7164ac_cv_type_getgroups=int
e256b8b6 7165fi
86da66b5 7166rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 7167fi
e256b8b6 7168if test $ac_cv_type_getgroups = cross; then
ba479fd2 7169 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7170/* confdefs.h. */
7171_ACEOF
7172cat confdefs.h >>conftest.$ac_ext
7173cat >>conftest.$ac_ext <<_ACEOF
7174/* end confdefs.h. */
e256b8b6 7175#include <unistd.h>
ba479fd2
NN
7176
7177_ACEOF
e256b8b6 7178if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7179 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
7180 ac_cv_type_getgroups=gid_t
7181else
e256b8b6
DA
7182 ac_cv_type_getgroups=int
7183fi
7184rm -f conftest*
7185
7186fi
7187fi
ba479fd2
NN
7188echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
7189echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 7190
ba479fd2 7191cat >>confdefs.h <<_ACEOF
e256b8b6 7192#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 7193_ACEOF
e256b8b6
DA
7194
7195
7196if test "${target}" = "${build}"; then
7197 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
7198else
7199 case "${target}" in
7200 # This condition may need some tweaking. It should include all
7201 # targets where the array type of the second argument of getgroups
7202 # is int and the type of gid_t is not equivalent to int.
7203 *-*-sunos* | *-*-ultrix*)
7204 TARGET_GETGROUPS_T=int
7205 ;;
7206 *)
7207 TARGET_GETGROUPS_T=gid_t
7208 ;;
7209 esac
7210fi
7211
7212
ba479fd2
NN
7213echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5
7214echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6
7215if test "${gcc_cv_func_printf_ptr+set}" = set; then
7216 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7217else
7218 if test "$cross_compiling" = yes; then
7219 gcc_cv_func_printf_ptr=no
7220else
ba479fd2 7221 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7222/* confdefs.h. */
7223_ACEOF
7224cat confdefs.h >>conftest.$ac_ext
7225cat >>conftest.$ac_ext <<_ACEOF
7226/* end confdefs.h. */
0a4b6309
RL
7227#include <stdio.h>
7228
86cf1cbd 7229int main()
0a4b6309
RL
7230{
7231 char buf[64];
7232 char *p = buf, *q = NULL;
7233 sprintf(buf, "%p", p);
7234 sscanf(buf, "%p", &q);
86cf1cbd 7235 return (p != q);
0a4b6309 7236}
ba479fd2
NN
7237_ACEOF
7238rm -f conftest$ac_exeext
7239if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7240 (eval $ac_link) 2>&5
7241 ac_status=$?
7242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7243 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7245 (eval $ac_try) 2>&5
7246 ac_status=$?
7247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7248 (exit $ac_status); }; }; then
0a4b6309
RL
7249 gcc_cv_func_printf_ptr=yes
7250else
ba479fd2
NN
7251 echo "$as_me: program exited with status $ac_status" >&5
7252echo "$as_me: failed program was:" >&5
7253sed 's/^/| /' conftest.$ac_ext >&5
7254
7255( exit $ac_status )
7256gcc_cv_func_printf_ptr=no
0a4b6309 7257fi
86da66b5 7258rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0a4b6309 7259fi
0a4b6309
RL
7260rm -f core core.* *.core
7261fi
ba479fd2
NN
7262echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5
7263echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6
63cf211a 7264if test $gcc_cv_func_printf_ptr = yes ; then
ba479fd2
NN
7265
7266cat >>confdefs.h <<\_ACEOF
0a4b6309 7267#define HAVE_PRINTF_PTR 1
ba479fd2 7268_ACEOF
0a4b6309
RL
7269
7270fi
7271
3b0727a0
MR
7272
7273echo "$as_me:$LINENO: checking for sys/mman.h" >&5
7274echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
7275if test "${ac_cv_header_sys_mman_h+set}" = set; then
7276 echo $ECHO_N "(cached) $ECHO_C" >&6
7277else
7278 cat >conftest.$ac_ext <<_ACEOF
7279/* confdefs.h. */
7280_ACEOF
7281cat confdefs.h >>conftest.$ac_ext
7282cat >>conftest.$ac_ext <<_ACEOF
7283/* end confdefs.h. */
7284#include <sys/mman.h>
7285_ACEOF
7286if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7287 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7288 ac_status=$?
7289 grep -v '^ *+' conftest.er1 >conftest.err
7290 rm -f conftest.er1
7291 cat conftest.err >&5
7292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7293 (exit $ac_status); } >/dev/null; then
7294 if test -s conftest.err; then
7295 ac_cpp_err=$ac_c_preproc_warn_flag
7296 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7297 else
7298 ac_cpp_err=
7299 fi
7300else
7301 ac_cpp_err=yes
7302fi
7303if test -z "$ac_cpp_err"; then
7304 ac_cv_header_sys_mman_h=yes
7305else
7306 echo "$as_me: failed program was:" >&5
7307sed 's/^/| /' conftest.$ac_ext >&5
7308
7309 ac_cv_header_sys_mman_h=no
7310fi
7311rm -f conftest.err conftest.$ac_ext
7312fi
7313echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
7314echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
7315if test $ac_cv_header_sys_mman_h = yes; then
7316 gcc_header_sys_mman_h=yes
7317else
7318 gcc_header_sys_mman_h=no
7319fi
7320
7321echo "$as_me:$LINENO: checking for mmap" >&5
7322echo $ECHO_N "checking for mmap... $ECHO_C" >&6
7323if test "${ac_cv_func_mmap+set}" = set; then
7324 echo $ECHO_N "(cached) $ECHO_C" >&6
7325else
7326 cat >conftest.$ac_ext <<_ACEOF
7327/* confdefs.h. */
7328_ACEOF
7329cat confdefs.h >>conftest.$ac_ext
7330cat >>conftest.$ac_ext <<_ACEOF
7331/* end confdefs.h. */
7332/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
7333 For example, HP-UX 11i <limits.h> declares gettimeofday. */
7334#define mmap innocuous_mmap
7335
7336/* System header to define __stub macros and hopefully few prototypes,
7337 which can conflict with char mmap (); below.
7338 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7339 <limits.h> exists even on freestanding compilers. */
7340
7341#ifdef __STDC__
7342# include <limits.h>
7343#else
7344# include <assert.h>
7345#endif
7346
7347#undef mmap
7348
7349/* Override any gcc2 internal prototype to avoid an error. */
7350#ifdef __cplusplus
7351extern "C"
7352{
7353#endif
7354/* We use char because int might match the return type of a gcc2
7355 builtin and then its argument prototype would still apply. */
7356char mmap ();
7357/* The GNU C library defines this for functions which it implements
7358 to always fail with ENOSYS. Some functions are actually named
7359 something starting with __ and the normal name is an alias. */
7360#if defined (__stub_mmap) || defined (__stub___mmap)
7361choke me
7362#else
7363char (*f) () = mmap;
7364#endif
7365#ifdef __cplusplus
7366}
7367#endif
7368
7369int
7370main ()
7371{
7372return f != mmap;
7373 ;
7374 return 0;
7375}
7376_ACEOF
7377rm -f conftest.$ac_objext conftest$ac_exeext
7378if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7379 (eval $ac_link) 2>conftest.er1
7380 ac_status=$?
7381 grep -v '^ *+' conftest.er1 >conftest.err
7382 rm -f conftest.er1
7383 cat conftest.err >&5
7384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7385 (exit $ac_status); } &&
fb38008e 7386 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3b0727a0
MR
7387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7388 (eval $ac_try) 2>&5
7389 ac_status=$?
7390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7391 (exit $ac_status); }; } &&
7392 { ac_try='test -s conftest$ac_exeext'
7393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7394 (eval $ac_try) 2>&5
7395 ac_status=$?
7396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7397 (exit $ac_status); }; }; then
7398 ac_cv_func_mmap=yes
7399else
7400 echo "$as_me: failed program was:" >&5
7401sed 's/^/| /' conftest.$ac_ext >&5
7402
7403ac_cv_func_mmap=no
7404fi
7405rm -f conftest.err conftest.$ac_objext \
7406 conftest$ac_exeext conftest.$ac_ext
7407fi
7408echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
7409echo "${ECHO_T}$ac_cv_func_mmap" >&6
7410if test $ac_cv_func_mmap = yes; then
7411 gcc_func_mmap=yes
7412else
7413 gcc_func_mmap=no
7414fi
7415
7416if test "$gcc_header_sys_mman_h" != yes \
7417 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
7418 gcc_cv_func_mmap_file=no
7419 gcc_cv_func_mmap_dev_zero=no
7420 gcc_cv_func_mmap_anon=no
7421else
ba479fd2
NN
7422 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
7423echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
7424if test "${gcc_cv_func_mmap_file+set}" = set; then
7425 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 7426else
ba479fd2 7427 # Add a system to this blacklist if
1072ec3f
ZW
7428 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
7429 # memory area containing the same data that you'd get if you applied
7430 # read() to the same fd. The only system known to have a problem here
7431 # is VMS, where text files have record structure.
7432 case "$host_os" in
ba479fd2 7433 vms* | ultrix*)
1072ec3f
ZW
7434 gcc_cv_func_mmap_file=no ;;
7435 *)
7436 gcc_cv_func_mmap_file=yes;;
7437 esac
7438fi
ba479fd2
NN
7439echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
7440echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
7441 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
7442echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
7443if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
7444 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
7445else
7446 # Add a system to this blacklist if it has mmap() but /dev/zero
7447 # does not exist, or if mmapping /dev/zero does not give anonymous
7448 # zeroed pages with both the following properties:
7449 # 1. If you map N consecutive pages in with one call, and then
7450 # unmap any subset of those pages, the pages that were not
7451 # explicitly unmapped remain accessible.
7452 # 2. If you map two adjacent blocks of memory and then unmap them
7453 # both at once, they must both go away.
7454 # Systems known to be in this category are Windows (all variants),
7455 # VMS, and Darwin.
7456 case "$host_os" in
2ce240d3 7457 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
7458 gcc_cv_func_mmap_dev_zero=no ;;
7459 *)
7460 gcc_cv_func_mmap_dev_zero=yes;;
7461 esac
7462fi
ba479fd2
NN
7463echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
7464echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
7465
7466 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
7467 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
7468echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
7469if test "${gcc_cv_decl_map_anon+set}" = set; then
7470 echo $ECHO_N "(cached) $ECHO_C" >&6
7471else
7472 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7473/* confdefs.h. */
7474_ACEOF
7475cat confdefs.h >>conftest.$ac_ext
7476cat >>conftest.$ac_ext <<_ACEOF
7477/* end confdefs.h. */
1072ec3f
ZW
7478#include <sys/types.h>
7479#include <sys/mman.h>
7480#include <unistd.h>
7481
7482#ifndef MAP_ANONYMOUS
7483#define MAP_ANONYMOUS MAP_ANON
7484#endif
7485
ba479fd2
NN
7486int
7487main ()
7488{
1072ec3f 7489int n = MAP_ANONYMOUS;
ba479fd2
NN
7490 ;
7491 return 0;
7492}
7493_ACEOF
7494rm -f conftest.$ac_objext
7495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7496 (eval $ac_compile) 2>conftest.er1
ba479fd2 7497 ac_status=$?
86da66b5
HPN
7498 grep -v '^ *+' conftest.er1 >conftest.err
7499 rm -f conftest.er1
7500 cat conftest.err >&5
ba479fd2
NN
7501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7502 (exit $ac_status); } &&
fb38008e 7503 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
7504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7505 (eval $ac_try) 2>&5
7506 ac_status=$?
7507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7508 (exit $ac_status); }; } &&
7509 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7511 (eval $ac_try) 2>&5
7512 ac_status=$?
7513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7514 (exit $ac_status); }; }; then
1072ec3f
ZW
7515 gcc_cv_decl_map_anon=yes
7516else
ba479fd2
NN
7517 echo "$as_me: failed program was:" >&5
7518sed 's/^/| /' conftest.$ac_ext >&5
7519
7520gcc_cv_decl_map_anon=no
1072ec3f 7521fi
86da66b5 7522rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 7523fi
ba479fd2
NN
7524echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
7525echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
7526
7527 if test $gcc_cv_decl_map_anon = no; then
7528 gcc_cv_func_mmap_anon=no
7529 else
ba479fd2
NN
7530 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
7531echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
7532if test "${gcc_cv_func_mmap_anon+set}" = set; then
7533 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
7534else
7535 # Add a system to this blacklist if it has mmap() and MAP_ANON or
7536 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
7537 # doesn't give anonymous zeroed pages with the same properties listed
7538 # above for use of /dev/zero.
7539 # Systems known to be in this category are Windows, VMS, and SCO Unix.
7540 case "$host_os" in
7541 vms* | cygwin* | pe | mingw* | sco* | udk* )
7542 gcc_cv_func_mmap_anon=no ;;
7543 *)
7544 gcc_cv_func_mmap_anon=yes;;
7545 esac
7546fi
ba479fd2
NN
7547echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
7548echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
7549 fi
7550fi
7551
7552if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
7553
7554cat >>confdefs.h <<\_ACEOF
1072ec3f 7555#define HAVE_MMAP_FILE 1
ba479fd2 7556_ACEOF
1072ec3f
ZW
7557
7558fi
7559if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
7560
7561cat >>confdefs.h <<\_ACEOF
1072ec3f 7562#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 7563_ACEOF
1072ec3f
ZW
7564
7565fi
7566if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
7567
7568cat >>confdefs.h <<\_ACEOF
1072ec3f 7569#define HAVE_MMAP_ANON 1
ba479fd2 7570_ACEOF
1072ec3f
ZW
7571
7572fi
7573
b27d2bd5
MK
7574
7575case "${host}" in
ee262b6f 7576*-*-*vms*)
ba479fd2 7577 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
7578 # won't work, and it isn't easily adaptable. It makes more sense to
7579 # just force it.
7580 ac_cv_func_vfork_works=yes
7581 ;;
b27d2bd5 7582esac
ba479fd2
NN
7583echo "$as_me:$LINENO: checking for pid_t" >&5
7584echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
7585if test "${ac_cv_type_pid_t+set}" = set; then
7586 echo $ECHO_N "(cached) $ECHO_C" >&6
7587else
7588 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7589/* confdefs.h. */
7590_ACEOF
7591cat confdefs.h >>conftest.$ac_ext
7592cat >>conftest.$ac_ext <<_ACEOF
7593/* end confdefs.h. */
7594$ac_includes_default
7595int
7596main ()
7597{
7598if ((pid_t *) 0)
7599 return 0;
7600if (sizeof (pid_t))
7601 return 0;
7602 ;
7603 return 0;
7604}
7605_ACEOF
7606rm -f conftest.$ac_objext
7607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7608 (eval $ac_compile) 2>conftest.er1
ba479fd2 7609 ac_status=$?
86da66b5
HPN
7610 grep -v '^ *+' conftest.er1 >conftest.err
7611 rm -f conftest.er1
7612 cat conftest.err >&5
ba479fd2
NN
7613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7614 (exit $ac_status); } &&
fb38008e 7615 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
7616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7617 (eval $ac_try) 2>&5
7618 ac_status=$?
7619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7620 (exit $ac_status); }; } &&
7621 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7623 (eval $ac_try) 2>&5
7624 ac_status=$?
7625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7626 (exit $ac_status); }; }; then
cb65112a 7627 ac_cv_type_pid_t=yes
c375c43b 7628else
ba479fd2
NN
7629 echo "$as_me: failed program was:" >&5
7630sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 7631
ba479fd2
NN
7632ac_cv_type_pid_t=no
7633fi
86da66b5 7634rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 7635fi
ba479fd2
NN
7636echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7637echo "${ECHO_T}$ac_cv_type_pid_t" >&6
7638if test $ac_cv_type_pid_t = yes; then
7639 :
7640else
7641
7642cat >>confdefs.h <<_ACEOF
c375c43b 7643#define pid_t int
ba479fd2 7644_ACEOF
c375c43b
KG
7645
7646fi
7647
ba479fd2
NN
7648
7649
7650for ac_header in unistd.h vfork.h
7651do
7652as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 7653echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
7654echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7655if eval "test \"\${$as_ac_Header+set}\" = set"; then
7656 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 7657else
ca9bc441 7658 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7659/* confdefs.h. */
7660_ACEOF
7661cat confdefs.h >>conftest.$ac_ext
7662cat >>conftest.$ac_ext <<_ACEOF
7663/* end confdefs.h. */
7664#include <$ac_header>
7665_ACEOF
7666if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7667 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7668 ac_status=$?
7669 grep -v '^ *+' conftest.er1 >conftest.err
7670 rm -f conftest.er1
7671 cat conftest.err >&5
7672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7673 (exit $ac_status); } >/dev/null; then
7674 if test -s conftest.err; then
7675 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 7676 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
7677 else
7678 ac_cpp_err=
7679 fi
093e61a6 7680else
ba479fd2
NN
7681 ac_cpp_err=yes
7682fi
7683if test -z "$ac_cpp_err"; then
ca9bc441 7684 eval "$as_ac_Header=yes"
ba479fd2
NN
7685else
7686 echo "$as_me: failed program was:" >&5
7687sed 's/^/| /' conftest.$ac_ext >&5
7688
ca9bc441 7689 eval "$as_ac_Header=no"
ba479fd2
NN
7690fi
7691rm -f conftest.err conftest.$ac_ext
c375c43b 7692fi
ba479fd2
NN
7693echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7694echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
7695if test `eval echo '${'$as_ac_Header'}'` = yes; then
7696 cat >>confdefs.h <<_ACEOF
7697#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7698_ACEOF
6e3f3080
NN
7699
7700fi
ba479fd2
NN
7701done
7702
7703
7704
7705for ac_func in fork vfork
7706do
7707as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7708echo "$as_me:$LINENO: checking for $ac_func" >&5
7709echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7710if eval "test \"\${$as_ac_var+set}\" = set"; then
7711 echo $ECHO_N "(cached) $ECHO_C" >&6
7712else
7713 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7714/* confdefs.h. */
7715_ACEOF
7716cat confdefs.h >>conftest.$ac_ext
7717cat >>conftest.$ac_ext <<_ACEOF
7718/* end confdefs.h. */
86da66b5
HPN
7719/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7720 For example, HP-UX 11i <limits.h> declares gettimeofday. */
7721#define $ac_func innocuous_$ac_func
7722
c375c43b 7723/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
7724 which can conflict with char $ac_func (); below.
7725 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7726 <limits.h> exists even on freestanding compilers. */
86da66b5 7727
ba479fd2
NN
7728#ifdef __STDC__
7729# include <limits.h>
7730#else
7731# include <assert.h>
7732#endif
86da66b5
HPN
7733
7734#undef $ac_func
7735
6e3f3080 7736/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
7737#ifdef __cplusplus
7738extern "C"
7739{
7740#endif
6e3f3080 7741/* We use char because int might match the return type of a gcc2
ba479fd2
NN
7742 builtin and then its argument prototype would still apply. */
7743char $ac_func ();
c375c43b
KG
7744/* The GNU C library defines this for functions which it implements
7745 to always fail with ENOSYS. Some functions are actually named
7746 something starting with __ and the normal name is an alias. */
ba479fd2 7747#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
7748choke me
7749#else
ba479fd2
NN
7750char (*f) () = $ac_func;
7751#endif
7752#ifdef __cplusplus
7753}
c375c43b
KG
7754#endif
7755
ba479fd2
NN
7756int
7757main ()
7758{
7759return f != $ac_func;
7760 ;
7761 return 0;
7762}
7763_ACEOF
7764rm -f conftest.$ac_objext conftest$ac_exeext
7765if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 7766 (eval $ac_link) 2>conftest.er1
ba479fd2 7767 ac_status=$?
86da66b5
HPN
7768 grep -v '^ *+' conftest.er1 >conftest.err
7769 rm -f conftest.er1
7770 cat conftest.err >&5
ba479fd2
NN
7771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7772 (exit $ac_status); } &&
fb38008e 7773 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
7774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7775 (eval $ac_try) 2>&5
7776 ac_status=$?
7777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7778 (exit $ac_status); }; } &&
7779 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
7780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7781 (eval $ac_try) 2>&5
7782 ac_status=$?
7783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7784 (exit $ac_status); }; }; then
7785 eval "$as_ac_var=yes"
7786else
7787 echo "$as_me: failed program was:" >&5
7788sed 's/^/| /' conftest.$ac_ext >&5
7789
7790eval "$as_ac_var=no"
7791fi
86da66b5
HPN
7792rm -f conftest.err conftest.$ac_objext \
7793 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
7794fi
7795echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7796echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7797if test `eval echo '${'$as_ac_var'}'` = yes; then
7798 cat >>confdefs.h <<_ACEOF
7799#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7800_ACEOF
7801
c375c43b 7802fi
ba479fd2 7803done
c375c43b 7804
ba479fd2
NN
7805if test "x$ac_cv_func_fork" = xyes; then
7806 echo "$as_me:$LINENO: checking for working fork" >&5
7807echo $ECHO_N "checking for working fork... $ECHO_C" >&6
7808if test "${ac_cv_func_fork_works+set}" = set; then
7809 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 7810else
ba479fd2
NN
7811 if test "$cross_compiling" = yes; then
7812 ac_cv_func_fork_works=cross
7813else
7814 cat >conftest.$ac_ext <<_ACEOF
7815/* By Ruediger Kuhlmann. */
7816 #include <sys/types.h>
7817 #if HAVE_UNISTD_H
7818 # include <unistd.h>
7819 #endif
7820 /* Some systems only have a dummy stub for fork() */
7821 int main ()
7822 {
86da66b5
HPN
7823 if (fork() < 0)
7824 exit (1);
7825 exit (0);
ba479fd2
NN
7826 }
7827_ACEOF
7828rm -f conftest$ac_exeext
7829if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7830 (eval $ac_link) 2>&5
7831 ac_status=$?
7832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7833 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7835 (eval $ac_try) 2>&5
7836 ac_status=$?
7837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7838 (exit $ac_status); }; }; then
7839 ac_cv_func_fork_works=yes
7840else
7841 echo "$as_me: program exited with status $ac_status" >&5
7842echo "$as_me: failed program was:" >&5
7843sed 's/^/| /' conftest.$ac_ext >&5
7844
7845( exit $ac_status )
7846ac_cv_func_fork_works=no
7847fi
86da66b5 7848rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
7849fi
7850fi
7851echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
7852echo "${ECHO_T}$ac_cv_func_fork_works" >&6
7853
7854else
7855 ac_cv_func_fork_works=$ac_cv_func_fork
7856fi
7857if test "x$ac_cv_func_fork_works" = xcross; then
7858 case $host in
7859 *-*-amigaos* | *-*-msdosdjgpp*)
7860 # Override, as these systems have only a dummy fork() stub
7861 ac_cv_func_fork_works=no
7862 ;;
7863 *)
7864 ac_cv_func_fork_works=yes
7865 ;;
7866 esac
7867 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
7868echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 7869fi
c375c43b 7870ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
7871if test "x$ac_cv_func_vfork" = xyes; then
7872 echo "$as_me:$LINENO: checking for working vfork" >&5
7873echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
7874if test "${ac_cv_func_vfork_works+set}" = set; then
7875 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 7876else
ba479fd2
NN
7877 if test "$cross_compiling" = yes; then
7878 ac_cv_func_vfork_works=cross
7879else
7880 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7881/* confdefs.h. */
7882_ACEOF
7883cat confdefs.h >>conftest.$ac_ext
7884cat >>conftest.$ac_ext <<_ACEOF
7885/* end confdefs.h. */
c375c43b
KG
7886/* Thanks to Paul Eggert for this test. */
7887#include <stdio.h>
ba479fd2 7888#include <stdlib.h>
c375c43b
KG
7889#include <sys/types.h>
7890#include <sys/stat.h>
ba479fd2
NN
7891#include <sys/wait.h>
7892#if HAVE_UNISTD_H
7893# include <unistd.h>
c375c43b 7894#endif
ba479fd2
NN
7895#if HAVE_VFORK_H
7896# include <vfork.h>
c375c43b
KG
7897#endif
7898/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
7899 argument registers are propagated back to the parent. The compiler
7900 is told about this with #include <vfork.h>, but some compilers
7901 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
7902 static variable whose address is put into a register that is
7903 clobbered by the vfork. */
7904static void
c375c43b
KG
7905#ifdef __cplusplus
7906sparc_address_test (int arg)
ba479fd2 7907# else
c375c43b
KG
7908sparc_address_test (arg) int arg;
7909#endif
7910{
7911 static pid_t child;
7912 if (!child) {
7913 child = vfork ();
7914 if (child < 0) {
7915 perror ("vfork");
7916 _exit(2);
7917 }
7918 if (!child) {
7919 arg = getpid();
7920 write(-1, "", 0);
7921 _exit (arg);
7922 }
7923 }
7924}
ba479fd2
NN
7925
7926int
7927main ()
7928{
c375c43b
KG
7929 pid_t parent = getpid ();
7930 pid_t child;
7931
ba479fd2 7932 sparc_address_test (0);
c375c43b
KG
7933
7934 child = vfork ();
7935
7936 if (child == 0) {
ba479fd2
NN
7937 /* Here is another test for sparc vfork register problems. This
7938 test uses lots of local variables, at least as many local
7939 variables as main has allocated so far including compiler
7940 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
7941 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
7942 reuse the register of parent for one of the local variables,
7943 since it will think that parent can't possibly be used any more
7944 in this routine. Assigning to the local variable will thus
7945 munge parent in the parent process. */
c375c43b
KG
7946 pid_t
7947 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
7948 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
7949 /* Convince the compiler that p..p7 are live; otherwise, it might
7950 use the same hardware register for all 8 local variables. */
7951 if (p != p1 || p != p2 || p != p3 || p != p4
7952 || p != p5 || p != p6 || p != p7)
7953 _exit(1);
7954
ba479fd2
NN
7955 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
7956 from child file descriptors. If the child closes a descriptor
7957 before it execs or exits, this munges the parent's descriptor
7958 as well. Test for this by closing stdout in the child. */
c375c43b
KG
7959 _exit(close(fileno(stdout)) != 0);
7960 } else {
7961 int status;
7962 struct stat st;
7963
7964 while (wait(&status) != child)
7965 ;
7966 exit(
7967 /* Was there some problem with vforking? */
7968 child < 0
7969
7970 /* Did the child fail? (This shouldn't happen.) */
7971 || status
7972
7973 /* Did the vfork/compiler bug occur? */
7974 || parent != getpid()
7975
7976 /* Did the file descriptor bug occur? */
7977 || fstat(fileno(stdout), &st) != 0
7978 );
7979 }
7980}
ba479fd2
NN
7981_ACEOF
7982rm -f conftest$ac_exeext
7983if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7984 (eval $ac_link) 2>&5
7985 ac_status=$?
7986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7987 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7989 (eval $ac_try) 2>&5
7990 ac_status=$?
7991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7992 (exit $ac_status); }; }; then
c375c43b
KG
7993 ac_cv_func_vfork_works=yes
7994else
ba479fd2
NN
7995 echo "$as_me: program exited with status $ac_status" >&5
7996echo "$as_me: failed program was:" >&5
7997sed 's/^/| /' conftest.$ac_ext >&5
7998
7999( exit $ac_status )
8000ac_cv_func_vfork_works=no
cafe096b 8001fi
86da66b5 8002rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 8003fi
ba479fd2
NN
8004fi
8005echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
8006echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 8007
ba479fd2
NN
8008fi;
8009if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 8010 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
8011 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
8012echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
8013fi
8014
ba479fd2
NN
8015if test "x$ac_cv_func_vfork_works" = xyes; then
8016
8017cat >>confdefs.h <<\_ACEOF
8018#define HAVE_WORKING_VFORK 1
8019_ACEOF
8020
8021else
8022
8023cat >>confdefs.h <<\_ACEOF
c375c43b 8024#define vfork fork
ba479fd2 8025_ACEOF
c375c43b
KG
8026
8027fi
ba479fd2
NN
8028if test "x$ac_cv_func_fork_works" = xyes; then
8029
8030cat >>confdefs.h <<\_ACEOF
8031#define HAVE_WORKING_FORK 1
8032_ACEOF
8033
8034fi
8035
c375c43b 8036
81bf3d9e 8037
f91abfce 8038
b7f2fb96 8039 am_cv_lib_iconv_ldpath=
ba479fd2
NN
8040
8041# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
f91abfce
TT
8042if test "${with_libiconv_prefix+set}" = set; then
8043 withval="$with_libiconv_prefix"
ba479fd2 8044
f91abfce
TT
8045 for dir in `echo "$withval" | tr : ' '`; do
8046 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
b7f2fb96 8047 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
f91abfce 8048 done
ba479fd2
NN
8049
8050fi;
f91abfce
TT
8051
8052
ba479fd2 8053for ac_header in iconv.h
eb158727 8054do
ba479fd2 8055as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 8056echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
8057echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8058if eval "test \"\${$as_ac_Header+set}\" = set"; then
8059 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8060else
ca9bc441 8061 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8062/* confdefs.h. */
8063_ACEOF
8064cat confdefs.h >>conftest.$ac_ext
8065cat >>conftest.$ac_ext <<_ACEOF
8066/* end confdefs.h. */
8067#include <$ac_header>
8068_ACEOF
8069if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8070 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8071 ac_status=$?
8072 grep -v '^ *+' conftest.er1 >conftest.err
8073 rm -f conftest.er1
8074 cat conftest.err >&5
8075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8076 (exit $ac_status); } >/dev/null; then
8077 if test -s conftest.err; then
8078 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8079 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8080 else
8081 ac_cpp_err=
8082 fi
8083else
8084 ac_cpp_err=yes
8085fi
8086if test -z "$ac_cpp_err"; then
ca9bc441 8087 eval "$as_ac_Header=yes"
ba479fd2
NN
8088else
8089 echo "$as_me: failed program was:" >&5
8090sed 's/^/| /' conftest.$ac_ext >&5
8091
ca9bc441 8092 eval "$as_ac_Header=no"
ba479fd2
NN
8093fi
8094rm -f conftest.err conftest.$ac_ext
6e3f3080 8095fi
ba479fd2
NN
8096echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8097echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
8098if test `eval echo '${'$as_ac_Header'}'` = yes; then
8099 cat >>confdefs.h <<_ACEOF
8100#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8101_ACEOF
8102
eb158727
ZW
8103fi
8104done
8105
8106
ba479fd2
NN
8107 echo "$as_me:$LINENO: checking for iconv" >&5
8108echo $ECHO_N "checking for iconv... $ECHO_C" >&6
8109if test "${am_cv_func_iconv+set}" = set; then
8110 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 8111else
ba479fd2 8112
f91abfce
TT
8113 am_cv_func_iconv="no, consider installing GNU libiconv"
8114 am_cv_lib_iconv=no
ba479fd2 8115 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8116/* confdefs.h. */
8117_ACEOF
8118cat confdefs.h >>conftest.$ac_ext
8119cat >>conftest.$ac_ext <<_ACEOF
8120/* end confdefs.h. */
f91abfce
TT
8121#include <stdlib.h>
8122#include <iconv.h>
ba479fd2
NN
8123int
8124main ()
8125{
f91abfce
TT
8126iconv_t cd = iconv_open("","");
8127 iconv(cd,NULL,NULL,NULL,NULL);
8128 iconv_close(cd);
ba479fd2
NN
8129 ;
8130 return 0;
8131}
8132_ACEOF
8133rm -f conftest.$ac_objext conftest$ac_exeext
8134if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8135 (eval $ac_link) 2>conftest.er1
ba479fd2 8136 ac_status=$?
86da66b5
HPN
8137 grep -v '^ *+' conftest.er1 >conftest.err
8138 rm -f conftest.er1
8139 cat conftest.err >&5
ba479fd2
NN
8140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8141 (exit $ac_status); } &&
fb38008e 8142 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8144 (eval $ac_try) 2>&5
8145 ac_status=$?
8146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8147 (exit $ac_status); }; } &&
8148 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8150 (eval $ac_try) 2>&5
8151 ac_status=$?
8152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8153 (exit $ac_status); }; }; then
f91abfce
TT
8154 am_cv_func_iconv=yes
8155else
ba479fd2
NN
8156 echo "$as_me: failed program was:" >&5
8157sed 's/^/| /' conftest.$ac_ext >&5
8158
f91abfce 8159fi
86da66b5
HPN
8160rm -f conftest.err conftest.$ac_objext \
8161 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
8162 if test "$am_cv_func_iconv" != yes; then
8163 am_save_LIBS="$LIBS"
b7f2fb96 8164 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
ba479fd2 8165 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8166/* confdefs.h. */
8167_ACEOF
8168cat confdefs.h >>conftest.$ac_ext
8169cat >>conftest.$ac_ext <<_ACEOF
8170/* end confdefs.h. */
f91abfce
TT
8171#include <stdlib.h>
8172#include <iconv.h>
ba479fd2
NN
8173int
8174main ()
8175{
f91abfce
TT
8176iconv_t cd = iconv_open("","");
8177 iconv(cd,NULL,NULL,NULL,NULL);
8178 iconv_close(cd);
ba479fd2
NN
8179 ;
8180 return 0;
8181}
8182_ACEOF
8183rm -f conftest.$ac_objext conftest$ac_exeext
8184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8185 (eval $ac_link) 2>conftest.er1
ba479fd2 8186 ac_status=$?
86da66b5
HPN
8187 grep -v '^ *+' conftest.er1 >conftest.err
8188 rm -f conftest.er1
8189 cat conftest.err >&5
ba479fd2
NN
8190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8191 (exit $ac_status); } &&
fb38008e 8192 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8194 (eval $ac_try) 2>&5
8195 ac_status=$?
8196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8197 (exit $ac_status); }; } &&
8198 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8200 (eval $ac_try) 2>&5
8201 ac_status=$?
8202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8203 (exit $ac_status); }; }; then
f91abfce
TT
8204 am_cv_lib_iconv=yes
8205 am_cv_func_iconv=yes
8206else
ba479fd2
NN
8207 echo "$as_me: failed program was:" >&5
8208sed 's/^/| /' conftest.$ac_ext >&5
8209
f91abfce 8210fi
86da66b5
HPN
8211rm -f conftest.err conftest.$ac_objext \
8212 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
8213 LIBS="$am_save_LIBS"
8214 fi
6e3f3080 8215
ba479fd2
NN
8216fi
8217echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
8218echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 8219 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
8220
8221cat >>confdefs.h <<\_ACEOF
f91abfce 8222#define HAVE_ICONV 1
ba479fd2 8223_ACEOF
f91abfce 8224
ba479fd2
NN
8225 echo "$as_me:$LINENO: checking for iconv declaration" >&5
8226echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
8227 if test "${am_cv_proto_iconv+set}" = set; then
8228 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 8229else
ba479fd2
NN
8230
8231 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8232/* confdefs.h. */
8233_ACEOF
8234cat confdefs.h >>conftest.$ac_ext
8235cat >>conftest.$ac_ext <<_ACEOF
8236/* end confdefs.h. */
f91abfce
TT
8237
8238#include <stdlib.h>
8239#include <iconv.h>
8240extern
8241#ifdef __cplusplus
8242"C"
8243#endif
8244#if defined(__STDC__) || defined(__cplusplus)
8245size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8246#else
8247size_t iconv();
8248#endif
8249
ba479fd2
NN
8250int
8251main ()
8252{
f91abfce 8253
ba479fd2
NN
8254 ;
8255 return 0;
8256}
8257_ACEOF
8258rm -f conftest.$ac_objext
8259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8260 (eval $ac_compile) 2>conftest.er1
ba479fd2 8261 ac_status=$?
86da66b5
HPN
8262 grep -v '^ *+' conftest.er1 >conftest.err
8263 rm -f conftest.er1
8264 cat conftest.err >&5
ba479fd2
NN
8265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8266 (exit $ac_status); } &&
fb38008e 8267 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8269 (eval $ac_try) 2>&5
8270 ac_status=$?
8271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8272 (exit $ac_status); }; } &&
8273 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8275 (eval $ac_try) 2>&5
8276 ac_status=$?
8277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8278 (exit $ac_status); }; }; then
f91abfce
TT
8279 am_cv_proto_iconv_arg1=""
8280else
ba479fd2
NN
8281 echo "$as_me: failed program was:" >&5
8282sed 's/^/| /' conftest.$ac_ext >&5
8283
8284am_cv_proto_iconv_arg1="const"
f91abfce 8285fi
86da66b5 8286rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
8287 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);"
8288fi
8289
8290 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
8291 echo "$as_me:$LINENO: result: ${ac_t:-
8292 }$am_cv_proto_iconv" >&5
8293echo "${ECHO_T}${ac_t:-
8294 }$am_cv_proto_iconv" >&6
8295
8296cat >>confdefs.h <<_ACEOF
f91abfce 8297#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 8298_ACEOF
f91abfce
TT
8299
8300 fi
8301 LIBICONV=
8302 if test "$am_cv_lib_iconv" = yes; then
b7f2fb96 8303 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
f91abfce 8304 fi
ba479fd2 8305
f91abfce 8306
56694dd9
ZW
8307# Until we have in-tree GNU iconv:
8308LIBICONV_DEP=
8309
8310
8311
ba479fd2
NN
8312 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
8313echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
8314if test "${am_cv_val_LC_MESSAGES+set}" = set; then
8315 echo $ECHO_N "(cached) $ECHO_C" >&6
56694dd9 8316else
ba479fd2 8317 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8318/* confdefs.h. */
8319_ACEOF
8320cat confdefs.h >>conftest.$ac_ext
8321cat >>conftest.$ac_ext <<_ACEOF
8322/* end confdefs.h. */
56694dd9 8323#include <locale.h>
ba479fd2
NN
8324int
8325main ()
8326{
56694dd9 8327return LC_MESSAGES
ba479fd2
NN
8328 ;
8329 return 0;
8330}
8331_ACEOF
8332rm -f conftest.$ac_objext conftest$ac_exeext
8333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8334 (eval $ac_link) 2>conftest.er1
ba479fd2 8335 ac_status=$?
86da66b5
HPN
8336 grep -v '^ *+' conftest.er1 >conftest.err
8337 rm -f conftest.er1
8338 cat conftest.err >&5
ba479fd2
NN
8339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8340 (exit $ac_status); } &&
fb38008e 8341 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8343 (eval $ac_try) 2>&5
8344 ac_status=$?
8345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8346 (exit $ac_status); }; } &&
8347 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8349 (eval $ac_try) 2>&5
8350 ac_status=$?
8351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8352 (exit $ac_status); }; }; then
56694dd9
ZW
8353 am_cv_val_LC_MESSAGES=yes
8354else
ba479fd2
NN
8355 echo "$as_me: failed program was:" >&5
8356sed 's/^/| /' conftest.$ac_ext >&5
8357
8358am_cv_val_LC_MESSAGES=no
56694dd9 8359fi
86da66b5
HPN
8360rm -f conftest.err conftest.$ac_objext \
8361 conftest$ac_exeext conftest.$ac_ext
56694dd9 8362fi
ba479fd2
NN
8363echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
8364echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
63cf211a 8365 if test $am_cv_val_LC_MESSAGES = yes; then
ba479fd2
NN
8366
8367cat >>confdefs.h <<\_ACEOF
56694dd9 8368#define HAVE_LC_MESSAGES 1
ba479fd2 8369_ACEOF
56694dd9
ZW
8370
8371 fi
8372
f91abfce 8373
86cf1cbd
KG
8374# We will need to find libiberty.h and ansidecl.h
8375saved_CFLAGS="$CFLAGS"
8376CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
6a257778 8398
ad6717df
PB
8399
8400
8e944909 8401for ac_func in getenv atol sbrk abort atof getcwd getwd \
3b681e9d 8402 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
236ce4b2 8403 fprintf_unlocked strstr errno snprintf vasprintf \
6a257778 8404 malloc realloc calloc free basename getopt clock getpagesize
81bf3d9e 8405do
ad6717df 8406 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
8407echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
8408echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
8409if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
8410 echo $ECHO_N "(cached) $ECHO_C" >&6
8411else
8412 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8413/* confdefs.h. */
8414_ACEOF
8415cat confdefs.h >>conftest.$ac_ext
8416cat >>conftest.$ac_ext <<_ACEOF
8417/* end confdefs.h. */
7afe8c41
KG
8418#undef $ac_tr_decl
8419#define $ac_tr_decl 1
ba479fd2 8420
d02af173 8421#include "ansidecl.h"
86cf1cbd 8422#include "system.h"
f31e826b 8423
ba479fd2
NN
8424int
8425main ()
8426{
86cf1cbd
KG
8427#ifndef $ac_func
8428char *(*pfn) = (char *(*)) $ac_func ;
8429#endif
ba479fd2
NN
8430 ;
8431 return 0;
8432}
8433_ACEOF
8434rm -f conftest.$ac_objext
8435if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8436 (eval $ac_compile) 2>conftest.er1
ba479fd2 8437 ac_status=$?
86da66b5
HPN
8438 grep -v '^ *+' conftest.er1 >conftest.err
8439 rm -f conftest.er1
8440 cat conftest.err >&5
ba479fd2
NN
8441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8442 (exit $ac_status); } &&
fb38008e 8443 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8445 (eval $ac_try) 2>&5
8446 ac_status=$?
8447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8448 (exit $ac_status); }; } &&
8449 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8451 (eval $ac_try) 2>&5
8452 ac_status=$?
8453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8454 (exit $ac_status); }; }; then
f31e826b 8455 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 8456else
ba479fd2
NN
8457 echo "$as_me: failed program was:" >&5
8458sed 's/^/| /' conftest.$ac_ext >&5
8459
8460eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 8461fi
86da66b5 8462rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
8463fi
8464
f31e826b 8465if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
8466 echo "$as_me:$LINENO: result: yes" >&5
8467echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 8468#define $ac_tr_decl 1
ba479fd2
NN
8469_ACEOF
8470
81bf3d9e 8471else
ba479fd2
NN
8472 echo "$as_me:$LINENO: result: no" >&5
8473echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 8474#define $ac_tr_decl 0
ba479fd2
NN
8475_ACEOF
8476
81bf3d9e
RH
8477fi
8478
8479done
ba479fd2 8480
ba479fd2 8481
ba479fd2 8482
81bf3d9e 8483
81bf3d9e
RH
8484
8485for ac_func in getrlimit setrlimit getrusage
8486do
ad6717df 8487 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
8488echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
8489echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
8490if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
8491 echo $ECHO_N "(cached) $ECHO_C" >&6
8492else
8493 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8494/* confdefs.h. */
8495_ACEOF
8496cat confdefs.h >>conftest.$ac_ext
8497cat >>conftest.$ac_ext <<_ACEOF
8498/* end confdefs.h. */
7afe8c41
KG
8499#undef $ac_tr_decl
8500#define $ac_tr_decl 1
ba479fd2 8501
d02af173 8502#include "ansidecl.h"
86cf1cbd 8503#include "system.h"
81bf3d9e
RH
8504#ifdef HAVE_SYS_RESOURCE_H
8505#include <sys/resource.h>
8506#endif
8507
f31e826b 8508
ba479fd2
NN
8509int
8510main ()
8511{
86cf1cbd
KG
8512#ifndef $ac_func
8513char *(*pfn) = (char *(*)) $ac_func ;
8514#endif
ba479fd2
NN
8515 ;
8516 return 0;
8517}
8518_ACEOF
8519rm -f conftest.$ac_objext
8520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8521 (eval $ac_compile) 2>conftest.er1
ba479fd2 8522 ac_status=$?
86da66b5
HPN
8523 grep -v '^ *+' conftest.er1 >conftest.err
8524 rm -f conftest.er1
8525 cat conftest.err >&5
ba479fd2
NN
8526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8527 (exit $ac_status); } &&
fb38008e 8528 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8530 (eval $ac_try) 2>&5
8531 ac_status=$?
8532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8533 (exit $ac_status); }; } &&
8534 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8536 (eval $ac_try) 2>&5
8537 ac_status=$?
8538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539 (exit $ac_status); }; }; then
f31e826b 8540 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 8541else
ba479fd2
NN
8542 echo "$as_me: failed program was:" >&5
8543sed 's/^/| /' conftest.$ac_ext >&5
8544
8545eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 8546fi
86da66b5 8547rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
8548fi
8549
f31e826b 8550if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
8551 echo "$as_me:$LINENO: result: yes" >&5
8552echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 8553#define $ac_tr_decl 1
ba479fd2
NN
8554_ACEOF
8555
81bf3d9e 8556else
ba479fd2
NN
8557 echo "$as_me:$LINENO: result: no" >&5
8558echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 8559#define $ac_tr_decl 0
ba479fd2
NN
8560_ACEOF
8561
81bf3d9e
RH
8562fi
8563
8564done
86cf1cbd 8565
81bf3d9e 8566
ba479fd2 8567cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8568/* confdefs.h. */
8569_ACEOF
8570cat confdefs.h >>conftest.$ac_ext
8571cat >>conftest.$ac_ext <<_ACEOF
8572/* end confdefs.h. */
b2522d2b
HPN
8573
8574#include "ansidecl.h"
8575#include "system.h"
8576#ifdef HAVE_SYS_RESOURCE_H
8577#include <sys/resource.h>
8578#endif
8579
ba479fd2
NN
8580int
8581main ()
8582{
b2522d2b 8583rlim_t l = 0;
ba479fd2
NN
8584 ;
8585 return 0;
8586}
8587_ACEOF
8588rm -f conftest.$ac_objext
8589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8590 (eval $ac_compile) 2>conftest.er1
ba479fd2 8591 ac_status=$?
86da66b5
HPN
8592 grep -v '^ *+' conftest.er1 >conftest.err
8593 rm -f conftest.er1
8594 cat conftest.err >&5
ba479fd2
NN
8595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8596 (exit $ac_status); } &&
fb38008e 8597 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8599 (eval $ac_try) 2>&5
8600 ac_status=$?
8601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8602 (exit $ac_status); }; } &&
8603 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8605 (eval $ac_try) 2>&5
8606 ac_status=$?
8607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8608 (exit $ac_status); }; }; then
b2522d2b
HPN
8609 :
8610else
ba479fd2
NN
8611 echo "$as_me: failed program was:" >&5
8612sed 's/^/| /' conftest.$ac_ext >&5
8613
8614
8615cat >>confdefs.h <<\_ACEOF
b2522d2b 8616#define rlim_t long
ba479fd2 8617_ACEOF
b2522d2b
HPN
8618
8619fi
86da66b5 8620rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 8621
ad6717df 8622
351df804 8623for ac_func in ldgetname
c1800ec8 8624do
ad6717df 8625 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
8626echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
8627echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
8628if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
8629 echo $ECHO_N "(cached) $ECHO_C" >&6
8630else
8631 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8632/* confdefs.h. */
8633_ACEOF
8634cat confdefs.h >>conftest.$ac_ext
8635cat >>conftest.$ac_ext <<_ACEOF
8636/* end confdefs.h. */
c1800ec8
ZW
8637#undef $ac_tr_decl
8638#define $ac_tr_decl 1
ba479fd2 8639
351df804
KG
8640#include "ansidecl.h"
8641#include "system.h"
8642#ifdef HAVE_LDFCN_H
8643#include <ldfcn.h>
8644#endif
8645
8646
ba479fd2
NN
8647int
8648main ()
8649{
351df804
KG
8650#ifndef $ac_func
8651char *(*pfn) = (char *(*)) $ac_func ;
8652#endif
ba479fd2
NN
8653 ;
8654 return 0;
8655}
8656_ACEOF
8657rm -f conftest.$ac_objext
8658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8659 (eval $ac_compile) 2>conftest.er1
ba479fd2 8660 ac_status=$?
86da66b5
HPN
8661 grep -v '^ *+' conftest.er1 >conftest.err
8662 rm -f conftest.er1
8663 cat conftest.err >&5
ba479fd2
NN
8664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8665 (exit $ac_status); } &&
fb38008e 8666 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8668 (eval $ac_try) 2>&5
8669 ac_status=$?
8670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8671 (exit $ac_status); }; } &&
8672 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8674 (eval $ac_try) 2>&5
8675 ac_status=$?
8676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8677 (exit $ac_status); }; }; then
351df804
KG
8678 eval "gcc_cv_have_decl_$ac_func=yes"
8679else
ba479fd2
NN
8680 echo "$as_me: failed program was:" >&5
8681sed 's/^/| /' conftest.$ac_ext >&5
8682
8683eval "gcc_cv_have_decl_$ac_func=no"
351df804 8684fi
86da66b5 8685rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
8686fi
8687
8688if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
8689 echo "$as_me:$LINENO: result: yes" >&5
8690echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 8691#define $ac_tr_decl 1
ba479fd2
NN
8692_ACEOF
8693
351df804 8694else
ba479fd2
NN
8695 echo "$as_me:$LINENO: result: no" >&5
8696echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 8697#define $ac_tr_decl 0
ba479fd2
NN
8698_ACEOF
8699
351df804
KG
8700fi
8701
8702done
ba479fd2 8703
351df804
KG
8704
8705
8706for ac_func in times
8707do
ad6717df 8708 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
8709echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
8710echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
8711if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
8712 echo $ECHO_N "(cached) $ECHO_C" >&6
8713else
8714 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8715/* confdefs.h. */
8716_ACEOF
8717cat confdefs.h >>conftest.$ac_ext
8718cat >>conftest.$ac_ext <<_ACEOF
8719/* end confdefs.h. */
351df804
KG
8720#undef $ac_tr_decl
8721#define $ac_tr_decl 1
ba479fd2 8722
c1800ec8
ZW
8723#include "ansidecl.h"
8724#include "system.h"
8725#ifdef HAVE_SYS_TIMES_H
8726#include <sys/times.h>
8727#endif
8728
8729
ba479fd2
NN
8730int
8731main ()
8732{
c1800ec8
ZW
8733#ifndef $ac_func
8734char *(*pfn) = (char *(*)) $ac_func ;
8735#endif
ba479fd2
NN
8736 ;
8737 return 0;
8738}
8739_ACEOF
8740rm -f conftest.$ac_objext
8741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8742 (eval $ac_compile) 2>conftest.er1
ba479fd2 8743 ac_status=$?
86da66b5
HPN
8744 grep -v '^ *+' conftest.er1 >conftest.err
8745 rm -f conftest.er1
8746 cat conftest.err >&5
ba479fd2
NN
8747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8748 (exit $ac_status); } &&
fb38008e 8749 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8751 (eval $ac_try) 2>&5
8752 ac_status=$?
8753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8754 (exit $ac_status); }; } &&
8755 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8757 (eval $ac_try) 2>&5
8758 ac_status=$?
8759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8760 (exit $ac_status); }; }; then
c1800ec8
ZW
8761 eval "gcc_cv_have_decl_$ac_func=yes"
8762else
ba479fd2
NN
8763 echo "$as_me: failed program was:" >&5
8764sed 's/^/| /' conftest.$ac_ext >&5
8765
8766eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 8767fi
86da66b5 8768rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
8769fi
8770
8771if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
8772 echo "$as_me:$LINENO: result: yes" >&5
8773echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 8774#define $ac_tr_decl 1
ba479fd2
NN
8775_ACEOF
8776
c1800ec8 8777else
ba479fd2
NN
8778 echo "$as_me:$LINENO: result: no" >&5
8779echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 8780#define $ac_tr_decl 0
ba479fd2
NN
8781_ACEOF
8782
c1800ec8
ZW
8783fi
8784
8785done
c1800ec8
ZW
8786
8787
8788# More time-related stuff.
ba479fd2
NN
8789echo "$as_me:$LINENO: checking for struct tms" >&5
8790echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
8791if test "${ac_cv_struct_tms+set}" = set; then
8792 echo $ECHO_N "(cached) $ECHO_C" >&6
8793else
8794
8795cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8796/* confdefs.h. */
8797_ACEOF
8798cat confdefs.h >>conftest.$ac_ext
8799cat >>conftest.$ac_ext <<_ACEOF
8800/* end confdefs.h. */
c1800ec8
ZW
8801
8802#include "ansidecl.h"
8803#include "system.h"
8804#ifdef HAVE_SYS_TIMES_H
8805#include <sys/times.h>
8806#endif
8807
ba479fd2
NN
8808int
8809main ()
8810{
c1800ec8 8811struct tms tms;
ba479fd2
NN
8812 ;
8813 return 0;
8814}
8815_ACEOF
8816rm -f conftest.$ac_objext
8817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8818 (eval $ac_compile) 2>conftest.er1
ba479fd2 8819 ac_status=$?
86da66b5
HPN
8820 grep -v '^ *+' conftest.er1 >conftest.err
8821 rm -f conftest.er1
8822 cat conftest.err >&5
ba479fd2
NN
8823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8824 (exit $ac_status); } &&
fb38008e 8825 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8827 (eval $ac_try) 2>&5
8828 ac_status=$?
8829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8830 (exit $ac_status); }; } &&
8831 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8833 (eval $ac_try) 2>&5
8834 ac_status=$?
8835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8836 (exit $ac_status); }; }; then
c1800ec8
ZW
8837 ac_cv_struct_tms=yes
8838else
ba479fd2
NN
8839 echo "$as_me: failed program was:" >&5
8840sed 's/^/| /' conftest.$ac_ext >&5
8841
8842ac_cv_struct_tms=no
c1800ec8 8843fi
86da66b5 8844rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 8845fi
ba479fd2
NN
8846echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
8847echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 8848if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
8849
8850cat >>confdefs.h <<\_ACEOF
c1800ec8 8851#define HAVE_STRUCT_TMS 1
ba479fd2 8852_ACEOF
c1800ec8
ZW
8853
8854fi
8855
8856# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
8857# revisit after autoconf 2.50.
ba479fd2
NN
8858echo "$as_me:$LINENO: checking for clock_t" >&5
8859echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
8860if test "${gcc_cv_type_clock_t+set}" = set; then
8861 echo $ECHO_N "(cached) $ECHO_C" >&6
8862else
8863
8864cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8865/* confdefs.h. */
8866_ACEOF
8867cat confdefs.h >>conftest.$ac_ext
8868cat >>conftest.$ac_ext <<_ACEOF
8869/* end confdefs.h. */
c1800ec8
ZW
8870
8871#include "ansidecl.h"
8872#include "system.h"
8873
ba479fd2
NN
8874int
8875main ()
8876{
c1800ec8 8877clock_t x;
ba479fd2
NN
8878 ;
8879 return 0;
8880}
8881_ACEOF
8882rm -f conftest.$ac_objext
8883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8884 (eval $ac_compile) 2>conftest.er1
ba479fd2 8885 ac_status=$?
86da66b5
HPN
8886 grep -v '^ *+' conftest.er1 >conftest.err
8887 rm -f conftest.er1
8888 cat conftest.err >&5
ba479fd2
NN
8889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8890 (exit $ac_status); } &&
fb38008e 8891 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8893 (eval $ac_try) 2>&5
8894 ac_status=$?
8895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8896 (exit $ac_status); }; } &&
8897 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8899 (eval $ac_try) 2>&5
8900 ac_status=$?
8901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8902 (exit $ac_status); }; }; then
c1800ec8
ZW
8903 gcc_cv_type_clock_t=yes
8904else
ba479fd2
NN
8905 echo "$as_me: failed program was:" >&5
8906sed 's/^/| /' conftest.$ac_ext >&5
8907
8908gcc_cv_type_clock_t=no
c1800ec8 8909fi
86da66b5 8910rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 8911fi
ba479fd2
NN
8912echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
8913echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 8914if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
8915
8916cat >>confdefs.h <<\_ACEOF
c1800ec8 8917#define HAVE_CLOCK_T 1
ba479fd2 8918_ACEOF
c1800ec8
ZW
8919
8920fi
8921
eb70d86d
AS
8922# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
8923CFLAGS="$saved_CFLAGS"
8924
07cf4226
DM
8925# Check whether --enable-initfini-array or --disable-initfini-array was given.
8926if test "${enable_initfini_array+set}" = set; then
8927 enableval="$enable_initfini_array"
ba479fd2 8928
07cf4226 8929else
ba479fd2
NN
8930
8931echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
8932echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
8933if test "${gcc_cv_initfini_array+set}" = set; then
8934 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 8935else
eb70d86d 8936 if test "$cross_compiling" = yes; then
918c4fe4 8937 gcc_cv_initfini_array=no
eb70d86d 8938else
ba479fd2 8939 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8940/* confdefs.h. */
8941_ACEOF
8942cat confdefs.h >>conftest.$ac_ext
8943cat >>conftest.$ac_ext <<_ACEOF
8944/* end confdefs.h. */
eb70d86d 8945
07cf4226
DM
8946static int x = -1;
8947int main (void) { return x; }
8948int foo (void) { x = 0; }
8949int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
8950_ACEOF
8951rm -f conftest$ac_exeext
8952if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8953 (eval $ac_link) 2>&5
8954 ac_status=$?
8955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8956 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8958 (eval $ac_try) 2>&5
8959 ac_status=$?
8960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8961 (exit $ac_status); }; }; then
918c4fe4 8962 gcc_cv_initfini_array=yes
eb70d86d 8963else
ba479fd2
NN
8964 echo "$as_me: program exited with status $ac_status" >&5
8965echo "$as_me: failed program was:" >&5
8966sed 's/^/| /' conftest.$ac_ext >&5
8967
8968( exit $ac_status )
8969gcc_cv_initfini_array=no
eb70d86d 8970fi
86da66b5 8971rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 8972fi
07cf4226 8973fi
ba479fd2
NN
8974echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
8975echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 8976 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 8977
ba479fd2 8978fi;
63cf211a 8979if test $enable_initfini_array = yes; then
ba479fd2
NN
8980
8981cat >>confdefs.h <<\_ACEOF
eb70d86d 8982#define HAVE_INITFINI_ARRAY 1
ba479fd2 8983_ACEOF
07cf4226 8984
eb70d86d 8985fi
81bf3d9e 8986
ba479fd2
NN
8987# mkdir takes a single argument on some systems.
8988echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
8989echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
8990if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
8991 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 8992else
ba479fd2 8993 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8994/* confdefs.h. */
8995_ACEOF
8996cat confdefs.h >>conftest.$ac_ext
8997cat >>conftest.$ac_ext <<_ACEOF
8998/* end confdefs.h. */
75923b2f
MK
8999
9000#include <sys/types.h>
9001#ifdef HAVE_SYS_STAT_H
9002# include <sys/stat.h>
9003#endif
9004#ifdef HAVE_UNISTD_H
9005# include <unistd.h>
9006#endif
9007#ifdef HAVE_DIRECT_H
9008# include <direct.h>
9009#endif
ba479fd2
NN
9010int
9011main ()
9012{
75923b2f 9013mkdir ("foo", 0);
ba479fd2
NN
9014 ;
9015 return 0;
9016}
9017_ACEOF
9018rm -f conftest.$ac_objext
9019if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9020 (eval $ac_compile) 2>conftest.er1
ba479fd2 9021 ac_status=$?
86da66b5
HPN
9022 grep -v '^ *+' conftest.er1 >conftest.err
9023 rm -f conftest.er1
9024 cat conftest.err >&5
ba479fd2
NN
9025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9026 (exit $ac_status); } &&
fb38008e 9027 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9029 (eval $ac_try) 2>&5
9030 ac_status=$?
9031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9032 (exit $ac_status); }; } &&
9033 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9035 (eval $ac_try) 2>&5
9036 ac_status=$?
9037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9038 (exit $ac_status); }; }; then
75923b2f
MK
9039 gcc_cv_mkdir_takes_one_arg=no
9040else
ba479fd2
NN
9041 echo "$as_me: failed program was:" >&5
9042sed 's/^/| /' conftest.$ac_ext >&5
9043
9044gcc_cv_mkdir_takes_one_arg=yes
75923b2f 9045fi
86da66b5 9046rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 9047fi
ba479fd2
NN
9048echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
9049echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 9050if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
9051
9052cat >>confdefs.h <<\_ACEOF
75923b2f 9053#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 9054_ACEOF
75923b2f
MK
9055
9056fi
9057
9058
861bb6c1
JL
9059# File extensions
9060manext='.1'
9061objext='.o'
9062
9063
9064
4977bab6
ZW
9065# With Setjmp/Longjmp based exception handling.
9066# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
9067if test "${enable_sjlj_exceptions+set}" = set; then
9068 enableval="$enable_sjlj_exceptions"
9069 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 9070
ba479fd2
NN
9071cat >>confdefs.h <<_ACEOF
9072#define CONFIG_SJLJ_EXCEPTIONS $sjlj
9073_ACEOF
4977bab6 9074
ba479fd2 9075fi;
4977bab6 9076
c6c51600 9077if test x$host = x$target; then
ba479fd2
NN
9078 echo "$as_me:$LINENO: checking for main in -lunwind" >&5
9079echo $ECHO_N "checking for main in -lunwind... $ECHO_C" >&6
9080if test "${ac_cv_lib_unwind_main+set}" = set; then
9081 echo $ECHO_N "(cached) $ECHO_C" >&6
4977bab6 9082else
ba479fd2 9083 ac_check_lib_save_LIBS=$LIBS
4977bab6 9084LIBS="-lunwind $LIBS"
ba479fd2 9085cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9086/* confdefs.h. */
9087_ACEOF
9088cat confdefs.h >>conftest.$ac_ext
9089cat >>conftest.$ac_ext <<_ACEOF
9090/* end confdefs.h. */
4977bab6 9091
4977bab6 9092
ba479fd2
NN
9093int
9094main ()
9095{
9096main ();
9097 ;
9098 return 0;
9099}
9100_ACEOF
9101rm -f conftest.$ac_objext conftest$ac_exeext
9102if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9103 (eval $ac_link) 2>conftest.er1
ba479fd2 9104 ac_status=$?
86da66b5
HPN
9105 grep -v '^ *+' conftest.er1 >conftest.err
9106 rm -f conftest.er1
9107 cat conftest.err >&5
ba479fd2
NN
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); } &&
fb38008e 9110 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9112 (eval $ac_try) 2>&5
9113 ac_status=$?
9114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9115 (exit $ac_status); }; } &&
9116 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9118 (eval $ac_try) 2>&5
9119 ac_status=$?
9120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9121 (exit $ac_status); }; }; then
9122 ac_cv_lib_unwind_main=yes
9123else
9124 echo "$as_me: failed program was:" >&5
9125sed 's/^/| /' conftest.$ac_ext >&5
9126
9127ac_cv_lib_unwind_main=no
9128fi
86da66b5
HPN
9129rm -f conftest.err conftest.$ac_objext \
9130 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9131LIBS=$ac_check_lib_save_LIBS
9132fi
9133echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_main" >&5
9134echo "${ECHO_T}$ac_cv_lib_unwind_main" >&6
9135if test $ac_cv_lib_unwind_main = yes; then
4977bab6
ZW
9136 use_libunwind_default=yes
9137else
ba479fd2 9138 use_libunwind_default=no
4977bab6
ZW
9139fi
9140
c6c51600
AS
9141else
9142 use_libunwind_default=no
9143fi
4977bab6
ZW
9144# Use libunwind based exception handling.
9145# Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
9146if test "${enable_libunwind_exceptions+set}" = set; then
9147 enableval="$enable_libunwind_exceptions"
9148 use_libunwind_exceptions=$enableval
9149else
9150 use_libunwind_exceptions=$use_libunwind_default
ba479fd2 9151fi;
63cf211a 9152if test x"$use_libunwind_exceptions" = xyes; then
ba479fd2
NN
9153
9154cat >>confdefs.h <<\_ACEOF
4977bab6 9155#define USE_LIBUNWIND_EXCEPTIONS 1
ba479fd2 9156_ACEOF
4977bab6
ZW
9157
9158fi
9159
34a86c2b
NN
9160# --------------------------------------------------------
9161# Build, host, and target specific configuration fragments
9162# --------------------------------------------------------
9163
5b28c537
NN
9164# Collect build-machine-specific information.
9165. ${srcdir}/config.build
9166
a89ea0df
NN
9167# Collect host-machine-specific information.
9168. ${srcdir}/config.host
9169
ef69da62 9170target_gtfiles=
a89ea0df
NN
9171
9172# Collect target-machine-specific information.
8ad9fb33 9173. ${srcdir}/config.gcc
861bb6c1
JL
9174
9175extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 9176extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
9177
9178# Default the target-machine variables that were not explicitly set.
75bffa71 9179if test x"$tm_file" = x
861bb6c1
JL
9180then tm_file=$cpu_type/$cpu_type.h; fi
9181
6b2adea9 9182if test x"$extra_headers" = x
861bb6c1
JL
9183then extra_headers=; fi
9184
75bffa71 9185if test x$md_file = x
e98e406f 9186then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 9187
75bffa71 9188if test x$out_file = x
861bb6c1
JL
9189then out_file=$cpu_type/$cpu_type.c; fi
9190
75bffa71 9191if test x"$tmake_file" = x
861bb6c1
JL
9192then tmake_file=$cpu_type/t-$cpu_type
9193fi
9194
90e6a802 9195if test x"$dwarf2" = xyes
756ee602 9196then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
9197fi
9198
861bb6c1 9199# Say what files are being used for the output code and MD file.
11642c3a 9200echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
9201echo "Using \`$srcdir/config/$md_file' as machine description file."
9202
11642c3a 9203# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
9204# about them and drop them.
9205
11642c3a
ZW
9206bx=
9207for x in $build_xm_file; do
9208 if test -f $srcdir/config/$x
9209 then bx="$bx $x"
ba479fd2
NN
9210 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
9211echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
9212 fi
9213done
9214build_xm_file="$bx"
9215
9216hx=
9217for x in $host_xm_file; do
9218 if test -f $srcdir/config/$x
9219 then hx="$hx $x"
ba479fd2
NN
9220 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
9221echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
9222 fi
9223done
9224host_xm_file="$hx"
9225
9226tx=
9227for x in $xm_file; do
9228 if test -f $srcdir/config/$x
9229 then tx="$tx $x"
ba479fd2
NN
9230 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
9231echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
9232 fi
9233done
9234xm_file="$tx"
9235
861bb6c1
JL
9236count=a
9237for f in $tm_file; do
9238 count=${count}x
9239done
75bffa71 9240if test $count = ax; then
861bb6c1
JL
9241 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
9242else
9243 echo "Using the following target machine macro files:"
9244 for f in $tm_file; do
9245 echo " $srcdir/config/$f"
9246 done
9247fi
9248
4977bab6 9249if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
9250
9251cat >>confdefs.h <<\_ACEOF
4977bab6 9252#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 9253_ACEOF
4977bab6
ZW
9254
9255fi
9256
861bb6c1
JL
9257count=a
9258for f in $host_xm_file; do
9259 count=${count}x
9260done
11642c3a
ZW
9261if test $count = a; then
9262 :
9263elif test $count = ax; then
861bb6c1
JL
9264 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
9265else
9266 echo "Using the following host machine macro files:"
9267 for f in $host_xm_file; do
9268 echo " $srcdir/config/$f"
9269 done
9270fi
476d9098 9271echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 9272
75bffa71 9273if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
9274 count=a
9275 for f in $build_xm_file; do
9276 count=${count}x
9277 done
11642c3a
ZW
9278 if test $count = a; then
9279 :
9280 elif test $count = ax; then
861bb6c1
JL
9281 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
9282 else
9283 echo "Using the following build machine macro files:"
9284 for f in $build_xm_file; do
9285 echo " $srcdir/config/$f"
9286 done
9287 fi
9288fi
9289
8bb915b6
NN
9290# ---------
9291# Threading
9292# ---------
9293
c2e494a8 9294# Check if a valid thread package
615be2cf 9295case ${enable_threads} in
c2e494a8
NN
9296 "" | no)
9297 # No threads
9298 target_thread_file='single'
9299 ;;
9300 yes)
9301 # default
9302 target_thread_file='single'
9303 ;;
769e49eb
NN
9304 aix | dce | gnat | irix | posix | rtems | \
9305 single | solaris | vxworks | win32 )
615be2cf 9306 target_thread_file=${enable_threads}
c2e494a8
NN
9307 ;;
9308 *)
615be2cf 9309 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
9310 exit 1
9311 ;;
9312esac
9313
9314if test x${thread_file} = x; then
9315 # No thread file set by target-specific clauses in config.gcc,
9316 # so use file chosen by default logic above
9317 thread_file=${target_thread_file}
861bb6c1
JL
9318fi
9319
8bb915b6
NN
9320# Make gthr-default.h if we have a thread file.
9321gthread_flags=
9322if test $thread_file != single; then
9323 rm -f gthr-default.h
9324 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
9325 gthread_flags=-DHAVE_GTHR_DEFAULT
9326fi
9327
9328
9329# --------
9330# UNSORTED
9331# --------
9332
2121a768
JT
9333if test x$enable___cxa_atexit = xyes || \
9334 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
354b7da5
DH
9335 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
9336echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
9337if test "${ac_cv_func___cxa_atexit+set}" = set; then
9338 echo $ECHO_N "(cached) $ECHO_C" >&6
9339else
9340 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
9341/* confdefs.h. */
9342_ACEOF
9343cat confdefs.h >>conftest.$ac_ext
9344cat >>conftest.$ac_ext <<_ACEOF
9345/* end confdefs.h. */
86da66b5
HPN
9346/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
9347 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9348#define __cxa_atexit innocuous___cxa_atexit
9349
354b7da5
DH
9350/* System header to define __stub macros and hopefully few prototypes,
9351 which can conflict with char __cxa_atexit (); below.
9352 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9353 <limits.h> exists even on freestanding compilers. */
86da66b5 9354
354b7da5
DH
9355#ifdef __STDC__
9356# include <limits.h>
9357#else
9358# include <assert.h>
9359#endif
86da66b5
HPN
9360
9361#undef __cxa_atexit
9362
354b7da5
DH
9363/* Override any gcc2 internal prototype to avoid an error. */
9364#ifdef __cplusplus
9365extern "C"
9366{
9367#endif
9368/* We use char because int might match the return type of a gcc2
9369 builtin and then its argument prototype would still apply. */
9370char __cxa_atexit ();
9371/* The GNU C library defines this for functions which it implements
9372 to always fail with ENOSYS. Some functions are actually named
9373 something starting with __ and the normal name is an alias. */
9374#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
9375choke me
9376#else
9377char (*f) () = __cxa_atexit;
9378#endif
9379#ifdef __cplusplus
9380}
9381#endif
9382
9383int
9384main ()
9385{
9386return f != __cxa_atexit;
9387 ;
9388 return 0;
9389}
9390_ACEOF
9391rm -f conftest.$ac_objext conftest$ac_exeext
9392if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9393 (eval $ac_link) 2>conftest.er1
354b7da5 9394 ac_status=$?
86da66b5
HPN
9395 grep -v '^ *+' conftest.er1 >conftest.err
9396 rm -f conftest.er1
9397 cat conftest.err >&5
354b7da5
DH
9398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9399 (exit $ac_status); } &&
fb38008e 9400 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9402 (eval $ac_try) 2>&5
9403 ac_status=$?
9404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9405 (exit $ac_status); }; } &&
9406 { ac_try='test -s conftest$ac_exeext'
354b7da5
DH
9407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9408 (eval $ac_try) 2>&5
9409 ac_status=$?
9410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9411 (exit $ac_status); }; }; then
9412 ac_cv_func___cxa_atexit=yes
9413else
9414 echo "$as_me: failed program was:" >&5
9415sed 's/^/| /' conftest.$ac_ext >&5
9416
9417ac_cv_func___cxa_atexit=no
9418fi
86da66b5
HPN
9419rm -f conftest.err conftest.$ac_objext \
9420 conftest$ac_exeext conftest.$ac_ext
354b7da5
DH
9421fi
9422echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
9423echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
9424if test $ac_cv_func___cxa_atexit = yes; then
ba479fd2
NN
9425
9426cat >>confdefs.h <<\_ACEOF
2121a768 9427#define DEFAULT_USE_CXA_ATEXIT 1
ba479fd2 9428_ACEOF
2121a768 9429
354b7da5
DH
9430else
9431 echo "__cxa_atexit can't be enabled on this target"
9432fi
9433
2121a768
JT
9434fi
9435
a5381466 9436# Look for a file containing extra machine modes.
1c0ca89d
ZW
9437if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
9438 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
9439
9440
9441cat >>confdefs.h <<_ACEOF
e22340b0 9442#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 9443_ACEOF
a5381466
ZW
9444
9445fi
9446
b7cb92ad 9447# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 9448# the first file included by config.h.
4977bab6 9449# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 9450# as well. If host!=build, we are in error and need to do more
db81d74a 9451# work to find out the build config parameters.
75bffa71 9452if test x$host = x$build
db81d74a 9453then
eaf4e618 9454 build_auto=auto-host.h
06f0b04c 9455 FORBUILD=..
b7cb92ad
JL
9456else
9457 # We create a subdir, then run autoconf in the subdir.
9458 # To prevent recursion we set host and build for the new
9459 # invocation of configure to the build for this invocation
ba479fd2 9460 # of configure.
b7cb92ad
JL
9461 tempdir=build.$$
9462 rm -rf $tempdir
9463 mkdir $tempdir
9464 cd $tempdir
9465 case ${srcdir} in
255b8a49 9466 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
9467 *) realsrcdir=../${srcdir};;
9468 esac
d920e825
L
9469 saved_CFLAGS="${CFLAGS}"
9470 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
9471 ${realsrcdir}/configure \
33e70558 9472 --enable-languages=${enable_languages-all} \
534d0cc0 9473 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 9474 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
9475
9476 # We just finished tests for the build machine, so rename
9477 # the file auto-build.h in the gcc directory.
9478 mv auto-host.h ../auto-build.h
9479 cd ..
9480 rm -rf $tempdir
eaf4e618 9481 build_auto=auto-build.h
3b1b059c 9482 FORBUILD=../${build_subdir}
db81d74a
RH
9483fi
9484
06f0b04c 9485
eaf4e618 9486tm_file="${tm_file} defaults.h"
4977bab6
ZW
9487tm_p_file="${tm_p_file} tm-preds.h"
9488host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
9489build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 9490# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477
KG
9491# put this back in temporarily.
9492xm_file="ansidecl.h ${xm_file}"
0056a9b5 9493
34a86c2b
NN
9494# --------
9495# UNSORTED
9496# --------
9497
f1943b77 9498# Get the version trigger filename from the toplevel
75bffa71 9499if test "${with_gcc_version_trigger+set}" = set; then
f1943b77
MH
9500 gcc_version_trigger=$with_gcc_version_trigger
9501else
9502 gcc_version_trigger=${srcdir}/version.c
9503fi
022dae81 9504gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
8763704d 9505gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
861bb6c1 9506
cc1e60ea 9507# Compile in configure arguments.
8105825d 9508if test -f configargs.h ; then
cc1e60ea 9509 # Being re-configured.
022dae81 9510 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
9511 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
9512else
9513 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
9514fi
eeae7b41
DJ
9515
9516# Double all backslashes and backslash all quotes to turn
9517# gcc_config_arguments into a C string.
9518sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
9519$gcc_config_arguments
9520EOF
9521gcc_config_arguments_str=`cat conftest.out`
9522rm -f conftest.out
9523
cc1e60ea
JM
9524cat > configargs.h <<EOF
9525/* Generated automatically. */
eeae7b41 9526static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 9527static const char thread_model[] = "$thread_file";
7816bea0
DJ
9528
9529static const struct {
9530 const char *name, *value;
9531} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
9532EOF
9533
ab87f8c8
JL
9534# Internationalization
9535PACKAGE=gcc
9536VERSION="$gcc_version"
861bb6c1 9537
c2c36d38
MK
9538cat >>confdefs.h <<_ACEOF
9539#define PACKAGE "$PACKAGE"
9540_ACEOF
9541
9542
ab87f8c8
JL
9543
9544
56694dd9
ZW
9545# If we haven't got the data from the intl directory,
9546# assume NLS is disabled.
ba479fd2
NN
9547USE_NLS=no
9548LIBINTL=
9549LIBINTL_DEP=
9550INCINTL=
9551XGETTEXT=
9552GMSGFMT=
9553POSUB=
56694dd9
ZW
9554if test -f ../intl/config.intl; then
9555 . ../intl/config.intl
093e61a6 9556fi
ba479fd2
NN
9557echo "$as_me:$LINENO: checking whether NLS is requested" >&5
9558echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
56694dd9 9559if test x"$USE_NLS" != xyes; then
ba479fd2
NN
9560 echo "$as_me:$LINENO: result: no" >&5
9561echo "${ECHO_T}no" >&6
56694dd9 9562else
ba479fd2
NN
9563 echo "$as_me:$LINENO: result: yes" >&5
9564echo "${ECHO_T}yes" >&6
9565
9566cat >>confdefs.h <<\_ACEOF
56694dd9 9567#define ENABLE_NLS 1
ba479fd2 9568_ACEOF
56694dd9 9569
093e61a6 9570
ba479fd2
NN
9571 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9572echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
56694dd9 9573 # Look for .po and .gmo files in the source directory.
ba479fd2 9574 CATALOGS=
56694dd9
ZW
9575 XLINGUAS=
9576 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
9577 # If there aren't any .gmo files the shell will give us the
9578 # literal string "../path/to/srcdir/po/*.gmo" which has to be
9579 # weeded out.
9580 case "$cat" in *\**)
9581 continue;;
9582 esac
9583 # The quadruple backslash is collapsed to a double backslash
9584 # by the backticks, then collapsed again by the double quotes,
9585 # leaving us with one backslash in the sed expression (right
9586 # before the dot that mustn't act as a wildcard).
9587 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
9588 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
9589 # The user is allowed to set LINGUAS to a list of languages to
9590 # install catalogs for. If it's empty that means "all of them."
9591 if test "x$LINGUAS" = x; then
9592 CATALOGS="$CATALOGS $cat"
9593 XLINGUAS="$XLINGUAS $lang"
9594 else
9595 case "$LINGUAS" in *$lang*)
9596 CATALOGS="$CATALOGS $cat"
9597 XLINGUAS="$XLINGUAS $lang"
9598 ;;
9599 esac
9600 fi
9601 done
9602 LINGUAS="$XLINGUAS"
ba479fd2
NN
9603 echo "$as_me:$LINENO: result: $LINGUAS" >&5
9604echo "${ECHO_T}$LINGUAS" >&6
56694dd9 9605fi
861bb6c1 9606
56694dd9
ZW
9607# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
9608# -liconv on the link line twice.
9609case "$LIBINTL" in *$LIBICONV*)
9610 LIBICONV= ;;
9611esac
dc6746e7 9612
56694dd9
ZW
9613# Windows32 Registry support for specifying GCC installation paths.
9614# Check whether --enable-win32-registry or --disable-win32-registry was given.
9615if test "${enable_win32_registry+set}" = set; then
9616 enableval="$enable_win32_registry"
dc6746e7 9617
ba479fd2 9618fi;
56694dd9
ZW
9619case $host_os in
9620 win32 | pe | cygwin* | mingw32* | uwin*)
ba479fd2
NN
9621echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5
9622echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6
56694dd9 9623if test "x$enable_win32_registry" != xno; then
ba479fd2
NN
9624
9625cat >>confdefs.h <<\_ACEOF
56694dd9 9626#define ENABLE_WIN32_REGISTRY 1
ba479fd2
NN
9627_ACEOF
9628
9629 echo "$as_me:$LINENO: result: yes" >&5
9630echo "${ECHO_T}yes" >&6
9631 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
9632echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
9633if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
9634 echo $ECHO_N "(cached) $ECHO_C" >&6
9635else
9636 ac_func_search_save_LIBS=$LIBS
9637ac_cv_search_RegOpenKeyExA=no
9638cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9639/* confdefs.h. */
9640_ACEOF
9641cat confdefs.h >>conftest.$ac_ext
9642cat >>conftest.$ac_ext <<_ACEOF
9643/* end confdefs.h. */
861bb6c1 9644
ab87f8c8 9645/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9646#ifdef __cplusplus
9647extern "C"
9648#endif
ab87f8c8 9649/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9650 builtin and then its argument prototype would still apply. */
9651char RegOpenKeyExA ();
9652int
9653main ()
9654{
9655RegOpenKeyExA ();
9656 ;
9657 return 0;
9658}
9659_ACEOF
9660rm -f conftest.$ac_objext conftest$ac_exeext
9661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9662 (eval $ac_link) 2>conftest.er1
ba479fd2 9663 ac_status=$?
86da66b5
HPN
9664 grep -v '^ *+' conftest.er1 >conftest.err
9665 rm -f conftest.er1
9666 cat conftest.err >&5
ba479fd2
NN
9667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9668 (exit $ac_status); } &&
fb38008e 9669 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9671 (eval $ac_try) 2>&5
9672 ac_status=$?
9673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9674 (exit $ac_status); }; } &&
9675 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9677 (eval $ac_try) 2>&5
9678 ac_status=$?
9679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9680 (exit $ac_status); }; }; then
56694dd9 9681 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 9682else
ba479fd2
NN
9683 echo "$as_me: failed program was:" >&5
9684sed 's/^/| /' conftest.$ac_ext >&5
9685
861bb6c1 9686fi
86da66b5
HPN
9687rm -f conftest.err conftest.$ac_objext \
9688 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9689if test "$ac_cv_search_RegOpenKeyExA" = no; then
9690 for ac_lib in advapi32; do
9691 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9692 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9693/* confdefs.h. */
9694_ACEOF
9695cat confdefs.h >>conftest.$ac_ext
9696cat >>conftest.$ac_ext <<_ACEOF
9697/* end confdefs.h. */
9698
56694dd9 9699/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9700#ifdef __cplusplus
9701extern "C"
9702#endif
56694dd9 9703/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9704 builtin and then its argument prototype would still apply. */
9705char RegOpenKeyExA ();
9706int
9707main ()
9708{
9709RegOpenKeyExA ();
9710 ;
9711 return 0;
9712}
9713_ACEOF
9714rm -f conftest.$ac_objext conftest$ac_exeext
9715if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9716 (eval $ac_link) 2>conftest.er1
ba479fd2 9717 ac_status=$?
86da66b5
HPN
9718 grep -v '^ *+' conftest.er1 >conftest.err
9719 rm -f conftest.er1
9720 cat conftest.err >&5
ba479fd2
NN
9721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9722 (exit $ac_status); } &&
fb38008e 9723 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9725 (eval $ac_try) 2>&5
9726 ac_status=$?
9727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9728 (exit $ac_status); }; } &&
9729 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9731 (eval $ac_try) 2>&5
9732 ac_status=$?
9733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9734 (exit $ac_status); }; }; then
9735 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 9736break
861bb6c1 9737else
ba479fd2
NN
9738 echo "$as_me: failed program was:" >&5
9739sed 's/^/| /' conftest.$ac_ext >&5
9740
861bb6c1 9741fi
86da66b5
HPN
9742rm -f conftest.err conftest.$ac_objext \
9743 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9744 done
6e3f3080 9745fi
ba479fd2
NN
9746LIBS=$ac_func_search_save_LIBS
9747fi
9748echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
9749echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
9750if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 9751 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 9752
ab87f8c8 9753fi
ba479fd2 9754
cafe096b 9755else
ba479fd2
NN
9756 echo "$as_me:$LINENO: result: no" >&5
9757echo "${ECHO_T}no" >&6
093e61a6 9758fi
ab87f8c8 9759
56694dd9
ZW
9760# Check if user specified a different registry key.
9761case "x${enable_win32_registry}" in
9762x | xyes)
9763 # default.
9764 gcc_cv_win32_registry_key="$VERSION"
9765 ;;
9766xno)
9767 # no registry lookup.
9768 gcc_cv_win32_registry_key=''
9769 ;;
9770*)
9771 # user-specified key.
9772 gcc_cv_win32_registry_key="$enable_win32_registry"
9773 ;;
9774esac
ab87f8c8 9775
56694dd9 9776if test "x$enable_win32_registry" != xno; then
ba479fd2
NN
9777 echo "$as_me:$LINENO: checking registry key on windows hosts" >&5
9778echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6
9779
9780cat >>confdefs.h <<_ACEOF
56694dd9 9781#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
ba479fd2 9782_ACEOF
cafe096b 9783
ba479fd2
NN
9784 echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5
9785echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6
093e61a6 9786fi
56694dd9
ZW
9787;;
9788esac
ab87f8c8 9789
56694dd9
ZW
9790# Get an absolute path to the GCC top-level source directory
9791holddir=`${PWDCMD-pwd}`
9792cd $srcdir
9793topdir=`${PWDCMD-pwd}`
9794cd $holddir
ab87f8c8 9795
56694dd9 9796# Conditionalize the makefile for this host machine.
2ed26f6b 9797xmake_file=
c406e779 9798for f in ${host_xmake_file}
56694dd9
ZW
9799do
9800 if test -f ${srcdir}/config/$f
9801 then
2ed26f6b 9802 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
9803 fi
9804done
093e61a6 9805
56694dd9 9806# Conditionalize the makefile for this target machine.
2ed26f6b 9807tmake_file_=
c406e779 9808for f in ${tmake_file}
56694dd9
ZW
9809do
9810 if test -f ${srcdir}/config/$f
9811 then
2ed26f6b 9812 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
9813 fi
9814done
2ed26f6b 9815tmake_file="${tmake_file_}"
71a94577 9816
56694dd9 9817symbolic_link='ln -s'
34a86c2b 9818
ab87f8c8
JL
9819# If the host doesn't support symlinks, modify CC in
9820# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
9821# Otherwise, we can use "CC=$(CC)".
9822rm -f symtest.tem
9823if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
9824then
9825 cc_set_by_configure="\$(CC)"
5aa82ace 9826 quoted_cc_set_by_configure="\$(CC)"
ab87f8c8 9827 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
596151e1 9828 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
ab87f8c8
JL
9829else
9830 rm -f symtest.tem
9831 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
9832 then
9833 symbolic_link="cp -p"
9834 else
9835 symbolic_link="cp"
9836 fi
9837 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5aa82ace 9838 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
ab87f8c8 9839 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
596151e1 9840 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
9841fi
9842rm -f symtest.tem
9843
9844out_object_file=`basename $out_file .c`.o
9845
9846tm_file_list=
e22340b0 9847tm_include_list=
ab87f8c8 9848for f in $tm_file; do
64ccbc99 9849 case $f in
d02af173 9850 defaults.h )
e22340b0
ZW
9851 tm_file_list="${tm_file_list} \$(srcdir)/$f"
9852 tm_include_list="${tm_include_list} $f"
9853 ;;
9854 * )
9855 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
9856 tm_include_list="${tm_include_list} config/$f"
9857 ;;
64ccbc99 9858 esac
ab87f8c8
JL
9859done
9860
11642c3a 9861tm_p_file_list=
e22340b0 9862tm_p_include_list=
11642c3a 9863for f in $tm_p_file; do
4977bab6
ZW
9864 case $f in
9865 tm-preds.h )
e22340b0
ZW
9866 tm_p_file_list="${tm_p_file_list} $f"
9867 tm_p_include_list="${tm_p_include_list} $f"
9868 ;;
9869 * )
9870 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
9871 tm_p_include_list="${tm_p_include_list} config/$f"
9872 esac
9873done
9874
9875xm_file_list=
9876xm_include_list=
9877for f in $xm_file; do
9878 case $f in
9879 ansidecl.h )
9880 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
9881 xm_include_list="${xm_include_list} $f"
9882 ;;
9883 auto-host.h )
9884 xm_file_list="${xm_file_list} $f"
9885 xm_include_list="${xm_include_list} $f"
9886 ;;
9887 * )
9888 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
9889 xm_include_list="${xm_include_list} config/$f"
9890 ;;
4977bab6 9891 esac
11642c3a
ZW
9892done
9893
ab87f8c8 9894host_xm_file_list=
e22340b0 9895host_xm_include_list=
ab87f8c8 9896for f in $host_xm_file; do
64ccbc99 9897 case $f in
d02af173 9898 ansidecl.h )
e22340b0
ZW
9899 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
9900 host_xm_include_list="${host_xm_include_list} $f"
9901 ;;
e2500fed 9902 auto-host.h )
e22340b0
ZW
9903 host_xm_file_list="${host_xm_file_list} $f"
9904 host_xm_include_list="${host_xm_include_list} $f"
9905 ;;
9906 * )
9907 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
9908 host_xm_include_list="${host_xm_include_list} config/$f"
9909 ;;
64ccbc99 9910 esac
ab87f8c8
JL
9911done
9912
9913build_xm_file_list=
9914for f in $build_xm_file; do
64ccbc99 9915 case $f in
d02af173 9916 ansidecl.h )
e22340b0
ZW
9917 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
9918 build_xm_include_list="${build_xm_include_list} $f"
9919 ;;
e2500fed 9920 auto-build.h | auto-host.h )
e22340b0
ZW
9921 build_xm_file_list="${build_xm_file_list} $f"
9922 build_xm_include_list="${build_xm_include_list} $f"
9923 ;;
9924 * )
9925 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
9926 build_xm_include_list="${build_xm_include_list} config/$f"
9927 ;;
64ccbc99 9928 esac
ab87f8c8
JL
9929done
9930
a078a589
ZW
9931# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
9932# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
9933CROSS=
9934ALL=all.internal
9935SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
9936if test x$host != x$target
9937then
a078a589
ZW
9938 CROSS="-DCROSS_COMPILE"
9939 ALL=all.cross
9940 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
343f59d9 9941 case "$host","$target" in
3a7e8b87
GK
9942 # Darwin crosses can use the host system's libraries and headers,
9943 # because of the fat library support. Of course, it must be the
9944 # same version of Darwin on both sides. Allow the user to
9945 # just say --target=foo-darwin without a version number to mean
9946 # "the version on this system".
9947 *-*-darwin*,*-*-darwin*)
9948 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
9949 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
9950 if test $hostos = $targetos -o $targetos = darwin ; then
9951 CROSS=
9952 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
9953 with_headers=yes
9954 fi
9955 ;;
9956
343f59d9
AM
9957 i?86-*-*,x86_64-*-* \
9958 | powerpc*-*-*,powerpc64*-*-*)
9959 CROSS="$CROSS -DNATIVE_CROSS" ;;
9960 esac
7a615b25
AO
9961elif test "x$TARGET_SYSTEM_ROOT" != x; then
9962 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
9963 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
9964fi
9965
b39d221a
EC
9966# If this is a cross-compiler that does not
9967# have its own set of headers then define
9968# inhibit_libc
9969
dc06db20
R
9970# If this is using newlib, without having the headers available now,
9971# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
9972# This prevents libgcc2 from containing any code which requires libc
9973# support.
b39d221a 9974inhibit_libc=
dc06db20
R
9975if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
9976 test x$with_newlib = xyes ; } &&
e50084fa 9977 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
b39d221a 9978 inhibit_libc=-Dinhibit_libc
b39d221a
EC
9979fi
9980
9981
a078a589
ZW
9982# When building gcc with a cross-compiler, we need to adjust things so
9983# that the generator programs are still built with the native compiler.
9984# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
9985
9986# These are the normal (build=host) settings:
ba479fd2
NN
9987CC_FOR_BUILD='$(CC)'
9988BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 9989STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
9990
9991# Possibly disable fixproto, on a per-target basis.
9992case ${use_fixproto} in
9993 no)
9994 STMP_FIXPROTO=
9995 ;;
9996 yes)
9997 STMP_FIXPROTO=stmp-fixproto
9998 ;;
9999esac
10000
a078a589 10001
83599948
NS
10002# And these apply if build != host, or we are generating coverage data
10003if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 10004then
b11e4747 10005 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 10006
7a615b25
AO
10007 if test "x$TARGET_SYSTEM_ROOT" = x; then
10008 STMP_FIXINC=
10009 STMP_FIXPROTO=
10010 fi
ab87f8c8
JL
10011fi
10012
10013# Expand extra_headers to include complete path.
10014# This substitutes for lots of t-* files.
10015extra_headers_list=
b1ef58c8
NN
10016# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
10017for file in ${extra_headers} ; do
10018 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
10019done
ab87f8c8 10020
c38f02df
ILT
10021# Define collect2 in Makefile.
10022case $host_can_use_collect2 in
10023 no) collect2= ;;
10024 *) collect2='collect2$(exeext)' ;;
10025esac
10026
10027
ab87f8c8 10028# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
10029case $use_collect2 in
10030 no) use_collect2= ;;
10031 "") ;;
ba479fd2 10032 *)
34a86c2b
NN
10033 host_xm_defines="${host_xm_defines} USE_COLLECT2"
10034 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
10035 case $host_can_use_collect2 in
10036 no)
10037 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
10038echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
10039 { (exit 1); exit 1; }; }
10040 ;;
10041 esac
34a86c2b
NN
10042 ;;
10043esac
ab87f8c8 10044
8bb915b6
NN
10045# ---------------------------
10046# Assembler & linker features
10047# ---------------------------
10048
d869a8c4
NN
10049# Identify the assembler which will work hand-in-glove with the newly
10050# built GCC, so that we can examine its features. This is the assembler
10051# which will be driven by the driver program.
10052#
10053# If build != host, and we aren't building gas in-tree, we identify a
10054# build->target assembler and hope that it will have the same features
10055# as the host->target assembler we'll be using.
ba479fd2
NN
10056echo "$as_me:$LINENO: checking what assembler to use" >&5
10057echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
34a86c2b 10058in_tree_gas=no
ab87f8c8 10059gcc_cv_as=
981d4858
JM
10060gcc_cv_gas_major_version=
10061gcc_cv_gas_minor_version=
ab87f8c8
JL
10062gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
10063if test -x "$DEFAULT_ASSEMBLER"; then
10064 gcc_cv_as="$DEFAULT_ASSEMBLER"
ab87f8c8
JL
10065elif test -x as$host_exeext; then
10066 # Build using assembler in the current directory.
10067 gcc_cv_as=./as$host_exeext
34a86c2b 10068elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
10069 && test -f ../gas/Makefile \
10070 && test x$build = x$host; then
10071 # Single tree build which includes gas. We want to prefer it
10072 # over whatever linker top-level may have detected, since
10073 # we'll use what we're building after installation anyway.
ad9c4d9f
NN
10074 in_tree_gas=yes
10075 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
10076for f in $gcc_cv_as_bfd_srcdir/configure \
10077 $gcc_cv_as_gas_srcdir/configure \
10078 $gcc_cv_as_gas_srcdir/configure.in \
10079 $gcc_cv_as_gas_srcdir/Makefile.in ; do
10080 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
10081 if test x$gcc_cv_gas_version != x; then
10082 break
10083 fi
10084done
10085gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
10086gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
10087gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
10088case $gcc_cv_gas_patch_version in
10089 "") gcc_cv_gas_patch_version="0" ;;
10090esac
8ada417f
ZW
10091gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
10092 + $gcc_cv_gas_minor_version \) \* 1000 \
10093 + $gcc_cv_gas_patch_version`
ad9c4d9f 10094
f9c1196a
ZW
10095 rm -f as$host_exeext
10096 $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
5408ac6c
HPN
10097 in_tree_gas_is_elf=no
10098 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
10099 || (grep 'obj_format = multi' ../gas/Makefile \
10100 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
10101 then
10102 in_tree_gas_is_elf=yes
10103 fi
08d105fa
AO
10104elif test -x "$AS_FOR_TARGET"; then
10105 gcc_cv_as="$AS_FOR_TARGET"
10106elif test -x "$AS" && test x$host = x$target; then
10107 gcc_cv_as="$AS"
981d4858 10108fi
9e423e6d 10109
534d0cc0 10110if test "x$gcc_cv_as" = x; then
779243f7
JL
10111 # Search the same directories that the installed compiler will
10112 # search. Else we may find the wrong assembler and lose. If we
10113 # do not find a suitable assembler binary, then try the user's
10114 # path.
10115 #
10116 # Also note we have to check MD_EXEC_PREFIX before checking the
10117 # user's path. Unfortunately, there is no good way to get at the
10118 # value of MD_EXEC_PREFIX here. So we do a brute force search
10119 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
10120 # to be fixed as part of the make/configure rewrite too.
10121
10122 if test "x$exec_prefix" = xNONE; then
10123 if test "x$prefix" = xNONE; then
10124 test_prefix=/usr/local
10125 else
10126 test_prefix=$prefix
10127 fi
10128 else
10129 test_prefix=$exec_prefix
10130 fi
10131
10132 # If the loop below does not find an assembler, then use whatever
10133 # one we can find in the users's path.
10134 # user's path.
55a2ea2a
AM
10135 if test "x$program_prefix" != xNONE; then
10136 gcc_cv_as=${program_prefix}as$host_exeext
10137 else
9c56033f 10138 gcc_cv_as=`echo as | sed "${program_transform_name}"`$host_exeext
55a2ea2a
AM
10139 fi
10140
19baba0b
RO
10141 test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
10142 $test_prefix/libexec/gcc/$target_noncanonical \
caa55b1e
NN
10143 /usr/lib/gcc/$target_noncanonical/$gcc_version \
10144 /usr/lib/gcc/$target_noncanonical \
10145 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
10146 $test_prefix/$target_noncanonical/bin"
55a2ea2a
AM
10147
10148 if test x$host = x$target; then
10149 test_dirs="$test_dirs \
779243f7
JL
10150 /usr/libexec \
10151 /usr/ccs/gcc \
10152 /usr/ccs/bin \
10153 /udk/usr/ccs/bin \
10154 /bsd43/usr/lib/cmplrs/cc \
10155 /usr/cross64/usr/bin \
10156 /usr/lib/cmplrs/cc \
10157 /sysv/usr/lib/cmplrs/cc \
10158 /svr4/usr/lib/cmplrs/cc \
10159 /usr/bin"
55a2ea2a 10160 fi
779243f7
JL
10161
10162 for dir in $test_dirs; do
55a2ea2a 10163 if test -x $dir/as$host_exeext; then
779243f7
JL
10164 gcc_cv_as=$dir/as$host_exeext
10165 break;
10166 fi
10167 done
9e423e6d 10168fi
34a86c2b
NN
10169case $in_tree_gas in
10170 yes)
ba479fd2
NN
10171 echo "$as_me:$LINENO: result: \"newly built gas\"" >&5
10172echo "${ECHO_T}\"newly built gas\"" >&6
34a86c2b
NN
10173 ;;
10174 no)
ba479fd2
NN
10175 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
10176echo "${ECHO_T}$gcc_cv_as" >&6
34a86c2b
NN
10177 ;;
10178esac
981d4858 10179
d869a8c4
NN
10180# Identify the linker which will work hand-in-glove with the newly
10181# built GCC, so that we can examine its features. This is the linker
10182# which will be driven by the driver program.
10183#
10184# If build != host, and we aren't building gas in-tree, we identify a
10185# build->target linker and hope that it will have the same features
10186# as the host->target linker we'll be using.
ba479fd2
NN
10187echo "$as_me:$LINENO: checking what linker to use" >&5
10188echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
34a86c2b 10189in_tree_ld=no
275b60d6
JJ
10190gcc_cv_ld=
10191gcc_cv_gld_major_version=
10192gcc_cv_gld_minor_version=
10193gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
10194gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
10195if test -x "$DEFAULT_LINKER"; then
10196 gcc_cv_ld="$DEFAULT_LINKER"
f9c1196a 10197elif test -x collect-ld$host_exeext; then
275b60d6 10198 # Build using linker in the current directory.
f9c1196a 10199 gcc_cv_ld=./collect-ld$host_exeext
34a86c2b 10200elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
08d105fa
AO
10201 && test -f ../ld/Makefile \
10202 && test x$build = x$host; then
10203 # Single tree build which includes ld. We want to prefer it
10204 # over whatever linker top-level may have detected, since
10205 # we'll use what we're building after installation anyway.
34a86c2b 10206 in_tree_ld=yes
5408ac6c
HPN
10207 in_tree_ld_is_elf=no
10208 if (grep 'EMUL = .*elf' ../ld/Makefile \
10209 || grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then
10210 in_tree_ld_is_elf=yes
10211 fi
275b60d6
JJ
10212 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
10213 do
10214 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
10215 if test x$gcc_cv_gld_version != x; then
10216 break
10217 fi
10218 done
10219 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
10220 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
f9c1196a
ZW
10221 rm -f collect-ld$host_exeext
10222 $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \
10223 2>/dev/null
08d105fa
AO
10224elif test -x "$LD_FOR_TARGET"; then
10225 gcc_cv_ld="$LD_FOR_TARGET"
10226elif test -x "$LD" && test x$host = x$target; then
10227 gcc_cv_ld="$LD"
275b60d6
JJ
10228fi
10229
534d0cc0 10230if test "x$gcc_cv_ld" = x; then
275b60d6
JJ
10231 # Search the same directories that the installed compiler will
10232 # search. Else we may find the wrong linker and lose. If we
10233 # do not find a suitable linker binary, then try the user's
10234 # path.
10235 #
10236 # Also note we have to check MD_EXEC_PREFIX before checking the
10237 # user's path. Unfortunately, there is no good way to get at the
10238 # value of MD_EXEC_PREFIX here. So we do a brute force search
10239 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
10240 # to be fixed as part of the make/configure rewrite too.
10241
10242 if test "x$exec_prefix" = xNONE; then
10243 if test "x$prefix" = xNONE; then
10244 test_prefix=/usr/local
10245 else
10246 test_prefix=$prefix
10247 fi
10248 else
10249 test_prefix=$exec_prefix
10250 fi
10251
10252 # If the loop below does not find an linker, then use whatever
10253 # one we can find in the users's path.
10254 # user's path.
55a2ea2a
AM
10255 if test "x$program_prefix" != xNONE; then
10256 gcc_cv_ld=${program_prefix}ld$host_exeext
10257 else
9c56033f 10258 gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$host_exeext
55a2ea2a
AM
10259 fi
10260
19baba0b
RO
10261 test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
10262 $test_prefix/libexec/gcc/$target_noncanonical \
caa55b1e
NN
10263 /usr/lib/gcc/$target_noncanonical/$gcc_version \
10264 /usr/lib/gcc/$target_noncanonical \
10265 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
10266 $test_prefix/$target_noncanonical/bin"
55a2ea2a
AM
10267
10268 if test x$host = x$target; then
10269 test_dirs="$test_dirs \
275b60d6
JJ
10270 /usr/libexec \
10271 /usr/ccs/gcc \
10272 /usr/ccs/bin \
10273 /udk/usr/ccs/bin \
10274 /bsd43/usr/lib/cmplrs/cc \
10275 /usr/cross64/usr/bin \
10276 /usr/lib/cmplrs/cc \
10277 /sysv/usr/lib/cmplrs/cc \
10278 /svr4/usr/lib/cmplrs/cc \
10279 /usr/bin"
55a2ea2a 10280 fi
275b60d6
JJ
10281
10282 for dir in $test_dirs; do
55a2ea2a 10283 if test -x $dir/ld$host_exeext; then
275b60d6
JJ
10284 gcc_cv_ld=$dir/ld$host_exeext
10285 break;
10286 fi
10287 done
10288fi
34a86c2b
NN
10289case $in_tree_ld in
10290 yes)
ba479fd2
NN
10291 echo "$as_me:$LINENO: result: \"newly built ld\"" >&5
10292echo "${ECHO_T}\"newly built ld\"" >&6
34a86c2b
NN
10293 ;;
10294 no)
ba479fd2
NN
10295 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
10296echo "${ECHO_T}$gcc_cv_ld" >&6
34a86c2b
NN
10297 ;;
10298esac
275b60d6 10299
981d4858 10300# Figure out what nm we will be using.
f9c1196a 10301gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
ba479fd2
NN
10302echo "$as_me:$LINENO: checking what nm to use" >&5
10303echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
f9c1196a 10304in_tree_nm=no
981d4858
JM
10305if test -x nm$host_exeext; then
10306 gcc_cv_nm=./nm$host_exeext
f9c1196a
ZW
10307elif test -f $gcc_cv_binutils_srcdir/configure.in \
10308 && test -f ../binutils/Makefile; then
10309 # Single tree build which includes binutils.
10310 in_tree_nm=yes
10311 gcc_cv_nm=./nm$host_exeext
10312 rm -f nm$host_exeext
10313 $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
534d0cc0
AM
10314elif test "x$program_prefix" != xNONE; then
10315 gcc_cv_nm=${program_prefix}nm$host_exeext
10316else
9c56033f 10317 gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$host_exeext
981d4858 10318fi
f9c1196a 10319case $in_tree_nm in
ba479fd2
NN
10320 yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5
10321echo "${ECHO_T}\"newly built nm\"" >&6 ;;
10322 no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
10323echo "${ECHO_T}$gcc_cv_nm" >&6 ;;
f9c1196a 10324esac
981d4858 10325
3cae5780 10326# Figure out what objdump we will be using.
ba479fd2
NN
10327echo "$as_me:$LINENO: checking what objdump to use" >&5
10328echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
f9c1196a 10329in_tree_objdump=no
3cae5780
AS
10330if test -x objdump$host_exeext; then
10331 gcc_cv_objdump=./objdump$host_exeext
f9c1196a
ZW
10332elif test -f $gcc_cv_binutils_srcdir/configure.in \
10333 && test -f ../binutils/Makefile; then
10334 # Single tree build which includes binutils.
10335 in_tree_objdump=yes
10336 gcc_cv_objdump=./objdump$host_exeext
10337 rm -f objdump$host_exeext
10338 $symbolic_link ../binutils/objdump$host_exeext \
10339 objdump$host_exeext 2>/dev/null
534d0cc0
AM
10340elif test "x$program_prefix" != xNONE; then
10341 gcc_cv_objdump=${program_prefix}objdump$host_exeext
10342else
f9c1196a 10343 gcc_cv_objdump=`echo objdump | \
9c56033f 10344 sed "${program_transform_name}"`$host_exeext
3cae5780 10345fi
f9c1196a 10346case $in_tree_objdump in
ba479fd2
NN
10347 yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5
10348echo "${ECHO_T}\"newly built objdump\"" >&6 ;;
10349 no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
10350echo "${ECHO_T}$gcc_cv_objdump" >&6 ;;
f9c1196a 10351esac
3cae5780 10352
981d4858 10353# Figure out what assembler alignment features are present.
ba479fd2
NN
10354echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
10355echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
10356if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
10357 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10358else
10359 gcc_cv_as_balign_and_p2align=no
10360 if test $in_tree_gas = yes; then
10361 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
10362 then gcc_cv_as_balign_and_p2align=yes
10363fi
10364 elif test x$gcc_cv_as != x; then
6e3f3080 10365 echo '.balign 4
8ada417f 10366.p2align 2' > conftest.s
ba479fd2
NN
10367 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10369 (eval $ac_try) 2>&5
10370 ac_status=$?
10371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10372 (exit $ac_status); }; }
8ada417f
ZW
10373 then
10374 gcc_cv_as_balign_and_p2align=yes
10375 else
10376 echo "configure: failed program was" >&5
10377 cat conftest.s >&5
10378 fi
10379 rm -f conftest.o conftest.s
10380 fi
10381fi
ba479fd2
NN
10382echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
10383echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 10384if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
10385
10386cat >>confdefs.h <<\_ACEOF
981d4858 10387#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 10388_ACEOF
981d4858 10389
ad9c4d9f
NN
10390fi
10391
ba479fd2
NN
10392echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
10393echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
10394if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
10395 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10396else
10397 gcc_cv_as_max_skip_p2align=no
10398 if test $in_tree_gas = yes; then
10399 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
10400 then gcc_cv_as_max_skip_p2align=yes
10401fi
10402 elif test x$gcc_cv_as != x; then
6e3f3080 10403 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
10404 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10406 (eval $ac_try) 2>&5
10407 ac_status=$?
10408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10409 (exit $ac_status); }; }
8ada417f
ZW
10410 then
10411 gcc_cv_as_max_skip_p2align=yes
10412 else
10413 echo "configure: failed program was" >&5
10414 cat conftest.s >&5
10415 fi
10416 rm -f conftest.o conftest.s
10417 fi
ad9c4d9f 10418fi
ba479fd2
NN
10419echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
10420echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 10421if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
10422
10423cat >>confdefs.h <<\_ACEOF
9e423e6d 10424#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 10425_ACEOF
9e423e6d 10426
9e423e6d 10427fi
ad9c4d9f 10428
ba479fd2
NN
10429echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
10430echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
10431if test "${gcc_cv_as_subsection_m1+set}" = set; then
10432 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10433else
10434 gcc_cv_as_subsection_m1=no
10435 if test $in_tree_gas = yes; then
10436 if test $in_tree_gas_is_elf = yes \
10437 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
10438 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 10439fi
8ada417f 10440 elif test x$gcc_cv_as != x; then
6e3f3080 10441 echo 'conftest_label1: .word 0
d1accaa3
JJ
10442.subsection -1
10443conftest_label2: .word 0
8ada417f 10444.previous' > conftest.s
ba479fd2
NN
10445 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10447 (eval $ac_try) 2>&5
10448 ac_status=$?
10449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10450 (exit $ac_status); }; }
8ada417f
ZW
10451 then
10452 if test x$gcc_cv_nm != x; then
10453 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
10454 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
10455 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
10456 then :
10457 else gcc_cv_as_subsection_m1=yes
10458 fi
10459 rm -f conftest.nm1 conftest.nm2
10460 fi
10461 else
10462 echo "configure: failed program was" >&5
10463 cat conftest.s >&5
10464 fi
10465 rm -f conftest.o conftest.s
10466 fi
981d4858 10467fi
ba479fd2
NN
10468echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
10469echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 10470if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
10471
10472cat >>confdefs.h <<\_ACEOF
981d4858 10473#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 10474_ACEOF
981d4858 10475
d1accaa3 10476fi
ad9c4d9f 10477
ba479fd2
NN
10478echo "$as_me:$LINENO: checking assembler for .weak" >&5
10479echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
10480if test "${gcc_cv_as_weak+set}" = set; then
10481 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10482else
10483 gcc_cv_as_weak=no
10484 if test $in_tree_gas = yes; then
10485 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
10486 then gcc_cv_as_weak=yes
ad9c4d9f 10487fi
8ada417f 10488 elif test x$gcc_cv_as != x; then
6e3f3080 10489 echo ' .weak foobar' > conftest.s
ba479fd2
NN
10490 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10492 (eval $ac_try) 2>&5
10493 ac_status=$?
10494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10495 (exit $ac_status); }; }
8ada417f
ZW
10496 then
10497 gcc_cv_as_weak=yes
10498 else
10499 echo "configure: failed program was" >&5
10500 cat conftest.s >&5
10501 fi
10502 rm -f conftest.o conftest.s
10503 fi
981d4858 10504fi
ba479fd2
NN
10505echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
10506echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 10507if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
10508
10509cat >>confdefs.h <<\_ACEOF
981d4858 10510#define HAVE_GAS_WEAK 1
ba479fd2 10511_ACEOF
981d4858 10512
12822146 10513fi
ad9c4d9f 10514
8ada417f
ZW
10515# .hidden needs to be supported in both the assembler and the linker,
10516# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
10517# This is irritatingly difficult to feature test for; we have to check the
10518# date string after the version number. If we've got an in-tree
10519# ld, we don't know its patchlevel version, so we set the baseline at 2.13
10520# to be safe.
10521# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
10522echo "$as_me:$LINENO: checking assembler for .hidden" >&5
10523echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
10524if test "${gcc_cv_as_hidden+set}" = set; then
10525 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10526else
10527 gcc_cv_as_hidden=no
10528 if test $in_tree_gas = yes; then
10529 if test $in_tree_gas_is_elf = yes \
10530 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
10531 then gcc_cv_as_hidden=yes
10532fi
10533 elif test x$gcc_cv_as != x; then
6e3f3080 10534 echo ' .hidden foobar
8ada417f 10535foobar:' > conftest.s
ba479fd2
NN
10536 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10538 (eval $ac_try) 2>&5
10539 ac_status=$?
10540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10541 (exit $ac_status); }; }
8ada417f
ZW
10542 then
10543 gcc_cv_as_hidden=yes
10544 else
10545 echo "configure: failed program was" >&5
10546 cat conftest.s >&5
10547 fi
10548 rm -f conftest.o conftest.s
10549 fi
10550fi
ba479fd2
NN
10551echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
10552echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 10553
ad9c4d9f 10554
ba479fd2
NN
10555echo "$as_me:$LINENO: checking linker for .hidden support" >&5
10556echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
10557if test "${gcc_cv_ld_hidden+set}" = set; then
10558 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10559else
10560 if test $in_tree_ld = yes ; then
10561 gcc_cv_ld_hidden=no
10562 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 \
10563 && test $in_tree_ld_is_elf = yes; then
10564 gcc_cv_ld_hidden=yes
10565 fi
10566else
10567 gcc_cv_ld_hidden=yes
bace148a 10568 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
10569 if echo "$ld_ver" | grep GNU > /dev/null; then
10570 ld_vers=`echo $ld_ver | sed -n \
10571 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
10572 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
10573 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
10574 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
10575 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
10576 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
10577 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'`
10578 if test 0"$ld_date" -lt 20020404; then
10579 if test -n "$ld_date"; then
10580 # If there was date string, but was earlier than 2002-04-04, fail
10581 gcc_cv_ld_hidden=no
10582 elif test -z "$ld_vers"; then
10583 # If there was no date string nor ld version number, something is wrong
10584 gcc_cv_ld_hidden=no
10585 else
10586 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
10587 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
10588 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
10589 test -z "$ld_vers_patch" && ld_vers_patch=0
10590 if test "$ld_vers_major" -lt 2; then
10591 gcc_cv_ld_hidden=no
10592 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
10593 gcc_cv_ld_hidden="no"
10594 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
10595 gcc_cv_ld_hidden=no
c72931a6 10596 fi
8ada417f 10597 fi
789b7de5 10598 fi
8ada417f 10599 else
28690784 10600 case "${target}" in
b0fd7d27 10601 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
10602 gcc_cv_ld_hidden=yes
10603 ;;
10604 *)
10605 gcc_cv_ld_hidden=no
10606 ;;
10607 esac
8ada417f
ZW
10608 fi
10609fi
6d07784a 10610fi
ba479fd2
NN
10611echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
10612echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 10613libgcc_visibility=no
ad9c4d9f 10614
8e3940b2 10615if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 10616 libgcc_visibility=yes
ba479fd2
NN
10617
10618cat >>confdefs.h <<\_ACEOF
8ada417f 10619#define HAVE_GAS_HIDDEN 1
ba479fd2 10620_ACEOF
ad9c4d9f
NN
10621
10622fi
10623
8ada417f 10624# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
10625echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
10626echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
10627if test "${gcc_cv_as_leb128+set}" = set; then
10628 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10629else
10630 gcc_cv_as_leb128=no
10631 if test $in_tree_gas = yes; then
10632 if test $in_tree_gas_is_elf = yes \
10633 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
10634 then gcc_cv_as_leb128=yes
10635fi
10636 elif test x$gcc_cv_as != x; then
6e3f3080 10637 echo ' .data
b7460f24
RH
10638 .uleb128 L2 - L1
10639L1:
10640 .uleb128 1280
10641 .sleb128 -1010
8ada417f 10642L2:' > conftest.s
ba479fd2
NN
10643 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10645 (eval $ac_try) 2>&5
10646 ac_status=$?
10647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10648 (exit $ac_status); }; }
8ada417f
ZW
10649 then
10650 # GAS versions before 2.11 do not support uleb128,
10651 # despite appearing to.
10652 # ??? There exists an elf-specific test that will crash
10653 # the assembler. Perhaps it's better to figure out whether
10654 # arbitrary sections are supported and try the test.
bace148a 10655 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
10656 if echo "$as_ver" | grep GNU > /dev/null; then
10657 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
10658 as_major=`echo $as_ver | sed 's/\..*//'`
10659 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
10660 if test $as_major -eq 2 && test $as_minor -lt 11
10661 then :
10662 else gcc_cv_as_leb128=yes
10663 fi
10664 fi
10665 else
10666 echo "configure: failed program was" >&5
10667 cat conftest.s >&5
10668 fi
10669 rm -f conftest.o conftest.s
10670 fi
b7460f24 10671fi
ba479fd2
NN
10672echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
10673echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 10674if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
10675
10676cat >>confdefs.h <<\_ACEOF
b7460f24 10677#define HAVE_AS_LEB128 1
ba479fd2 10678_ACEOF
b7460f24
RH
10679
10680fi
ad9c4d9f 10681
8ada417f
ZW
10682# GAS versions up to and including 2.11.0 may mis-optimize
10683# .eh_frame data.
ba479fd2
NN
10684echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
10685echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
10686if test "${gcc_cv_as_eh_frame+set}" = set; then
10687 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10688else
10689 gcc_cv_as_eh_frame=no
10690 if test $in_tree_gas = yes; then
10691 if test $in_tree_gas_is_elf = yes \
10692 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
10693 then gcc_cv_as_eh_frame=yes
ad9c4d9f 10694fi
8ada417f 10695 elif test x$gcc_cv_as != x; then
6e3f3080 10696 echo ' .text
c64688ae
RH
10697.LFB1:
10698 .4byte 0
10699.L1:
10700 .4byte 0
10701.LFE1:
10702 .section .eh_frame,"aw",@progbits
10703__FRAME_BEGIN__:
10704 .4byte .LECIE1-.LSCIE1
10705.LSCIE1:
10706 .4byte 0x0
10707 .byte 0x1
10708 .ascii "z\0"
10709 .byte 0x1
10710 .byte 0x78
10711 .byte 0x1a
10712 .byte 0x0
10713 .byte 0x4
10714 .4byte 1
10715 .p2align 1
10716.LECIE1:
10717.LSFDE1:
10718 .4byte .LEFDE1-.LASFDE1
10719.LASFDE1:
10720 .4byte .LASFDE1-__FRAME_BEGIN__
10721 .4byte .LFB1
10722 .4byte .LFE1-.LFB1
10723 .byte 0x4
10724 .4byte .LFE1-.LFB1
10725 .byte 0x4
10726 .4byte .L1-.LFB1
8ada417f 10727.LEFDE1:' > conftest.s
ba479fd2
NN
10728 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10730 (eval $ac_try) 2>&5
10731 ac_status=$?
10732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10733 (exit $ac_status); }; }
8ada417f
ZW
10734 then
10735 cat > conftest.lit <<EOF
c64688ae
RH
10736 0000 10000000 00000000 017a0001 781a0004 .........z..x...
10737 0010 01000000 12000000 18000000 00000000 ................
093e61a6 10738 0020 08000000 04080000 0044 .........D
01efb963 10739EOF
ba479fd2 10740cat > conftest.big <<EOF
01efb963
AS
10741 0000 00000010 00000000 017a0001 781a0004 .........z..x...
10742 0010 00000001 00000012 00000018 00000000 ................
093e61a6 10743 0020 00000008 04000000 0844 .........D
c64688ae 10744EOF
8ada417f
ZW
10745 # If the assembler didn't choke, and we can objdump,
10746 # and we got the correct data, then succeed.
10747 if test x$gcc_cv_objdump != x \
10748 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
10749 | tail -3 > conftest.got \
10750 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
10751 || cmp conftest.big conftest.got > /dev/null 2>&1; }
10752 then
10753 gcc_cv_as_eh_frame=yes
ba479fd2
NN
10754 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
10755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10756 (eval $ac_try) 2>&5
10757 ac_status=$?
10758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10759 (exit $ac_status); }; }; then
8ada417f
ZW
10760 gcc_cv_as_eh_frame=buggy
10761 else
10762 # Uh oh, what do we do now?
10763 gcc_cv_as_eh_frame=no
10764 fi
10765 else
10766 echo "configure: failed program was" >&5
10767 cat conftest.s >&5
10768 fi
10769 rm -f conftest.o conftest.s
10770 fi
c64688ae 10771fi
ba479fd2
NN
10772echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
10773echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 10774
6e3f3080 10775
63cf211a 10776if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
10777
10778cat >>confdefs.h <<\_ACEOF
8ada417f 10779#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 10780_ACEOF
ad9c4d9f
NN
10781
10782fi
10783
ba479fd2
NN
10784echo "$as_me:$LINENO: checking assembler for section merging support" >&5
10785echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
10786if test "${gcc_cv_as_shf_merge+set}" = set; then
10787 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10788else
10789 gcc_cv_as_shf_merge=no
10790 if test $in_tree_gas = yes; then
10791 if test $in_tree_gas_is_elf = yes \
10792 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
10793 then gcc_cv_as_shf_merge=yes
10794fi
10795 elif test x$gcc_cv_as != x; then
6e3f3080 10796 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
10797 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
10798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10799 (eval $ac_try) 2>&5
10800 ac_status=$?
10801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10802 (exit $ac_status); }; }
8ada417f
ZW
10803 then
10804 gcc_cv_as_shf_merge=yes
10805 else
10806 echo "configure: failed program was" >&5
10807 cat conftest.s >&5
10808 fi
10809 rm -f conftest.o conftest.s
10810 fi
201556f0 10811fi
ba479fd2
NN
10812echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
10813echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 10814
8ad9fb33 10815
ba479fd2 10816cat >>confdefs.h <<_ACEOF
8ad9fb33 10817#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 10818_ACEOF
201556f0 10819
201556f0 10820
8ada417f 10821# Thread-local storage - the check is heavily parametrized.
f996902d
RH
10822conftest_s=
10823tls_first_major=
10824tls_first_minor=
9739c90c 10825tls_as_opt=
f996902d 10826case "$target" in
6f9b006d
RH
10827 alpha*-*-*)
10828 conftest_s='
10829 .section ".tdata","awT",@progbits
10830foo: .long 25
10831 .text
10832 ldq $27,__tls_get_addr($29) !literal!1
10833 lda $16,foo($29) !tlsgd!1
10834 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
10835 ldq $27,__tls_get_addr($29) !literal!2
10836 lda $16,foo($29) !tlsldm!2
10837 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
10838 ldq $1,foo($29) !gotdtprel
10839 ldah $2,foo($29) !dtprelhi
10840 lda $3,foo($2) !dtprello
10841 lda $4,foo($29) !dtprel
10842 ldq $1,foo($29) !gottprel
10843 ldah $2,foo($29) !tprelhi
10844 lda $3,foo($2) !tprello
10845 lda $4,foo($29) !tprel'
10846 tls_first_major=2
10847 tls_first_minor=13
2f3321ca 10848 tls_as_opt=--fatal-warnings
6f9b006d 10849 ;;
f996902d
RH
10850 i[34567]86-*-*)
10851 conftest_s='
10852 .section ".tdata","awT",@progbits
10853foo: .long 25
10854 .text
10855 movl %gs:0, %eax
10856 leal foo@TLSGD(,%ebx,1), %eax
10857 leal foo@TLSLDM(%ebx), %eax
10858 leal foo@DTPOFF(%eax), %edx
10859 movl foo@GOTTPOFF(%ebx), %eax
10860 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
10861 addl foo@GOTNTPOFF(%ebx), %eax
10862 movl foo@INDNTPOFF, %eax
f996902d
RH
10863 movl $foo@TPOFF, %eax
10864 subl $foo@TPOFF, %eax
10865 leal foo@NTPOFF(%ecx), %eax'
10866 tls_first_major=2
75d38379 10867 tls_first_minor=14
2f3321ca 10868 tls_as_opt=--fatal-warnings
75d38379
JJ
10869 ;;
10870 x86_64-*-*)
10871 conftest_s='
10872 .section ".tdata","awT",@progbits
10873foo: .long 25
10874 .text
10875 movq %fs:0, %rax
10876 leaq foo@TLSGD(%rip), %rdi
10877 leaq foo@TLSLD(%rip), %rdi
10878 leaq foo@DTPOFF(%rax), %rdx
10879 movq foo@GOTTPOFF(%rip), %rax
10880 movq $foo@TPOFF, %rax'
10881 tls_first_major=2
10882 tls_first_minor=14
2f3321ca 10883 tls_as_opt=--fatal-warnings
f996902d 10884 ;;
7b6e506e
RH
10885 ia64-*-*)
10886 conftest_s='
10887 .section ".tdata","awT",@progbits
10888foo: data8 25
10889 .text
10890 addl r16 = @ltoff(@dtpmod(foo#)), gp
10891 addl r17 = @ltoff(@dtprel(foo#)), gp
10892 addl r18 = @ltoff(@tprel(foo#)), gp
10893 addl r19 = @dtprel(foo#), gp
10894 adds r21 = @dtprel(foo#), r13
10895 movl r23 = @dtprel(foo#)
10896 addl r20 = @tprel(foo#), gp
10897 adds r22 = @tprel(foo#), r13
10898 movl r24 = @tprel(foo#)'
10899 tls_first_major=2
10900 tls_first_minor=13
2f3321ca 10901 tls_as_opt=--fatal-warnings
7b6e506e 10902 ;;
c4501e62
JJ
10903 powerpc-*-*)
10904 conftest_s='
10905 .section ".tdata","awT",@progbits
10906 .align 2
10907ld0: .space 4
10908ld1: .space 4
10909x1: .space 4
10910x2: .space 4
10911x3: .space 4
10912 .text
10913 addi 3,31,ld0@got@tlsgd
10914 bl __tls_get_addr
10915 addi 3,31,x1@got@tlsld
10916 bl __tls_get_addr
10917 addi 9,3,x1@dtprel
10918 addis 9,3,x2@dtprel@ha
10919 addi 9,9,x2@dtprel@l
10920 lwz 9,x3@got@tprel(31)
10921 add 9,9,x@tls
10922 addi 9,2,x1@tprel
10923 addis 9,2,x2@tprel@ha
10924 addi 9,9,x2@tprel@l'
10925 tls_first_major=2
10926 tls_first_minor=14
2f3321ca 10927 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
10928 ;;
10929 powerpc64-*-*)
10930 conftest_s='
10931 .section ".tdata","awT",@progbits
10932 .align 3
10933ld0: .space 8
10934ld1: .space 8
10935x1: .space 8
10936x2: .space 8
10937x3: .space 8
10938 .text
10939 addi 3,2,ld0@got@tlsgd
10940 bl .__tls_get_addr
10941 nop
10942 addi 3,2,ld1@toc
10943 bl .__tls_get_addr
10944 nop
10945 addi 3,2,x1@got@tlsld
10946 bl .__tls_get_addr
10947 nop
10948 addi 9,3,x1@dtprel
10949 bl .__tls_get_addr
10950 nop
10951 addis 9,3,x2@dtprel@ha
10952 addi 9,9,x2@dtprel@l
10953 bl .__tls_get_addr
10954 nop
10955 ld 9,x3@got@dtprel(2)
10956 add 9,9,3
10957 bl .__tls_get_addr
10958 nop'
10959 tls_first_major=2
10960 tls_first_minor=14
2f3321ca 10961 tls_as_opt="-a64 --fatal-warnings"
c4501e62 10962 ;;
fd3cd001
UW
10963 s390-*-*)
10964 conftest_s='
10965 .section ".tdata","awT",@progbits
10966foo: .long 25
10967 .text
10968 .long foo@TLSGD
10969 .long foo@TLSLDM
10970 .long foo@DTPOFF
10971 .long foo@NTPOFF
10972 .long foo@GOTNTPOFF
10973 .long foo@INDNTPOFF
10974 l %r1,foo@GOTNTPOFF(%r12)
10975 l %r1,0(%r1):tls_load:foo
10976 bas %r14,0(%r1,%r13):tls_gdcall:foo
10977 bas %r14,0(%r1,%r13):tls_ldcall:foo'
10978 tls_first_major=2
10979 tls_first_minor=14
2f3321ca 10980 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
10981 ;;
10982 s390x-*-*)
10983 conftest_s='
10984 .section ".tdata","awT",@progbits
10985foo: .long 25
10986 .text
10987 .quad foo@TLSGD
10988 .quad foo@TLSLDM
10989 .quad foo@DTPOFF
10990 .quad foo@NTPOFF
10991 .quad foo@GOTNTPOFF
10992 lg %r1,foo@GOTNTPOFF(%r12)
10993 larl %r1,foo@INDNTPOFF
10994 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
10995 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
10996 tls_first_major=2
10997 tls_first_minor=14
2f3321ca 10998 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 10999 ;;
9ff13962
KK
11000 sh-*-* | sh[34]-*-*)
11001 conftest_s='
11002 .section ".tdata","awT",@progbits
11003foo: .long 25
11004 .text
11005 .long foo@TLSGD
11006 .long foo@TLSLDM
11007 .long foo@DTPOFF
11008 .long foo@GOTTPOFF
11009 .long foo@TPOFF'
11010 tls_first_major=2
11011 tls_first_minor=13
2f3321ca 11012 tls_as_opt=--fatal-warnings
9ff13962 11013 ;;
5751a10b 11014 sparc*-*-*)
2f3321ca
EB
11015 case "$target" in
11016 sparc*-sun-solaris2.*)
11017 on_solaris=yes
11018 ;;
11019 *)
11020 on_solaris=no
11021 ;;
11022 esac
11023 if test x$on_solaris = xyes && test x$gas_flag = xno; then
11024 conftest_s='
11025 .section ".tdata",#alloc,#write,#tls
11026foo: .long 25
11027 .text
11028 sethi %tgd_hi22(foo), %o0
11029 add %o0, %tgd_lo10(foo), %o1
11030 add %l7, %o1, %o0, %tgd_add(foo)
11031 call __tls_get_addr, %tgd_call(foo)
11032 sethi %tldm_hi22(foo), %l1
11033 add %l1, %tldm_lo10(foo), %l2
11034 add %l7, %l2, %o0, %tldm_add(foo)
11035 call __tls_get_addr, %tldm_call(foo)
11036 sethi %tldo_hix22(foo), %l3
11037 xor %l3, %tldo_lox10(foo), %l4
11038 add %o0, %l4, %l5, %tldo_add(foo)
11039 sethi %tie_hi22(foo), %o3
11040 add %o3, %tie_lo10(foo), %o3
11041 ld [%l7 + %o3], %o2, %tie_ld(foo)
11042 add %g7, %o2, %o4, %tie_add(foo)
11043 sethi %tle_hix22(foo), %l1
11044 xor %l1, %tle_lox10(foo), %o5
11045 ld [%g7 + %o5], %o1'
11046 tls_first_major=0
11047 tls_first_minor=0
11048 else
11049 conftest_s='
5751a10b
JJ
11050 .section ".tdata","awT",@progbits
11051foo: .long 25
11052 .text
11053 sethi %tgd_hi22(foo), %o0
11054 add %o0, %tgd_lo10(foo), %o1
11055 add %l7, %o1, %o0, %tgd_add(foo)
11056 call __tls_get_addr, %tgd_call(foo)
11057 sethi %tldm_hi22(foo), %l1
11058 add %l1, %tldm_lo10(foo), %l2
11059 add %l7, %l2, %o0, %tldm_add(foo)
11060 call __tls_get_addr, %tldm_call(foo)
11061 sethi %tldo_hix22(foo), %l3
11062 xor %l3, %tldo_lox10(foo), %l4
11063 add %o0, %l4, %l5, %tldo_add(foo)
11064 sethi %tie_hi22(foo), %o3
11065 add %o3, %tie_lo10(foo), %o3
11066 ld [%l7 + %o3], %o2, %tie_ld(foo)
11067 add %g7, %o2, %o4, %tie_add(foo)
11068 sethi %tle_hix22(foo), %l1
11069 xor %l1, %tle_lox10(foo), %o5
11070 ld [%g7 + %o5], %o1'
11071 tls_first_major=2
11072 tls_first_minor=14
2f3321ca
EB
11073 tls_as_opt="-32 --fatal-warnings"
11074 fi
5751a10b 11075 ;;
f996902d
RH
11076esac
11077if test -z "$tls_first_major"; then
8ada417f
ZW
11078 : # If we don't have a check, assume no support.
11079else
ba479fd2
NN
11080 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
11081echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
11082if test "${gcc_cv_as_tls+set}" = set; then
11083 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11084else
11085 gcc_cv_as_tls=no
11086 if test $in_tree_gas = yes; then
11087 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
11088 then gcc_cv_as_tls=yes
ad9c4d9f 11089fi
8ada417f 11090 elif test x$gcc_cv_as != x; then
6e3f3080 11091 echo "$conftest_s" > conftest.s
2f3321ca 11092 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
11093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11094 (eval $ac_try) 2>&5
11095 ac_status=$?
11096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11097 (exit $ac_status); }; }
8ada417f
ZW
11098 then
11099 gcc_cv_as_tls=yes
11100 else
11101 echo "configure: failed program was" >&5
11102 cat conftest.s >&5
11103 fi
11104 rm -f conftest.o conftest.s
f996902d 11105 fi
f996902d 11106fi
ba479fd2
NN
11107echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
11108echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 11109if test $gcc_cv_as_tls = yes; then
ba479fd2
NN
11110
11111cat >>confdefs.h <<\_ACEOF
f996902d 11112#define HAVE_AS_TLS 1
ba479fd2 11113_ACEOF
f996902d
RH
11114
11115fi
8ada417f
ZW
11116fi
11117
11118# Target-specific assembler checks.
f996902d 11119
d594623a
L
11120if test x"$demangler_in_ld" = xyes; then
11121 echo "$as_me:$LINENO: checking linker --demangle support" >&5
11122echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
11123 gcc_cv_ld_demangle=no
11124 if test $in_tree_ld = yes; then
11125 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 14 -o "$gcc_cv_gld_major_version" -gt 2; then \
11126 gcc_cv_ld_demangle=yes
11127 fi
11128 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
11129 # Check if the GNU linker supports --demangle option
11130 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
11131 gcc_cv_ld_demangle=yes
11132 fi
11133 fi
11134 if test x"$gcc_cv_ld_demangle" = xyes; then
11135
11136cat >>confdefs.h <<\_ACEOF
11137#define HAVE_LD_DEMANGLE 1
11138_ACEOF
11139
11140 fi
11141 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
11142echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
11143fi
11144
3a37b08e
RH
11145case "$target" in
11146 # All TARGET_ABI_OSF targets.
11147 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
11148 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
11149echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
11150if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
11151 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 11152else
8ada417f
ZW
11153 gcc_cv_as_alpha_explicit_relocs=no
11154 if test $in_tree_gas = yes; then
11155 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
11156 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 11157fi
8ada417f 11158 elif test x$gcc_cv_as != x; then
6e3f3080 11159 echo ' .set nomacro
3a37b08e
RH
11160 .text
11161 extbl $3, $2, $3 !lituse_bytoff!1
11162 ldq $2, a($29) !literal!1
11163 ldq $4, b($29) !literal!2
11164 ldq_u $3, 0($2) !lituse_base!1
11165 ldq $27, f($29) !literal!5
11166 jsr $26, ($27), f !lituse_jsr!5
11167 ldah $29, 0($26) !gpdisp!3
11168 lda $0, c($29) !gprel
11169 ldah $1, d($29) !gprelhigh
11170 lda $1, d($1) !gprellow
8ada417f 11171 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
11172 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11174 (eval $ac_try) 2>&5
11175 ac_status=$?
11176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11177 (exit $ac_status); }; }
8ada417f
ZW
11178 then
11179 gcc_cv_as_alpha_explicit_relocs=yes
11180 else
11181 echo "configure: failed program was" >&5
11182 cat conftest.s >&5
11183 fi
11184 rm -f conftest.o conftest.s
11185 fi
cafe096b 11186fi
ba479fd2
NN
11187echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
11188echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 11189if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
11190
11191cat >>confdefs.h <<\_ACEOF
3a37b08e 11192#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 11193_ACEOF
3a37b08e 11194
86da66b5
HPN
11195fi
11196 ;;
11197
11198 cris-*-*)
11199 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
11200echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
11201if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
11202 echo $ECHO_N "(cached) $ECHO_C" >&6
11203else
11204 gcc_cv_as_cris_no_mul_bug=no
11205 if test $in_tree_gas = yes; then
11206 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
11207 then gcc_cv_as_cris_no_mul_bug=yes
11208fi
11209 elif test x$gcc_cv_as != x; then
11210 echo '.text' > conftest.s
11211 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
11212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11213 (eval $ac_try) 2>&5
11214 ac_status=$?
11215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11216 (exit $ac_status); }; }
11217 then
11218 gcc_cv_as_cris_no_mul_bug=yes
11219 else
11220 echo "configure: failed program was" >&5
11221 cat conftest.s >&5
11222 fi
11223 rm -f conftest.o conftest.s
11224 fi
11225fi
11226echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
11227echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
11228if test $gcc_cv_as_cris_no_mul_bug = yes; then
11229
11230cat >>confdefs.h <<\_ACEOF
11231#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
11232_ACEOF
11233
8ada417f 11234fi
3a37b08e 11235 ;;
8ada417f 11236
1cb36a98 11237 sparc*-*-*)
ba479fd2
NN
11238 echo "$as_me:$LINENO: checking assembler for .register" >&5
11239echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
11240if test "${gcc_cv_as_sparc_register_op+set}" = set; then
11241 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 11242else
8ada417f
ZW
11243 gcc_cv_as_sparc_register_op=no
11244 if test x$gcc_cv_as != x; then
6e3f3080 11245 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
11246 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11248 (eval $ac_try) 2>&5
11249 ac_status=$?
11250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11251 (exit $ac_status); }; }
8ada417f
ZW
11252 then
11253 gcc_cv_as_sparc_register_op=yes
11254 else
11255 echo "configure: failed program was" >&5
11256 cat conftest.s >&5
11257 fi
11258 rm -f conftest.o conftest.s
11259 fi
cafe096b 11260fi
ba479fd2
NN
11261echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
11262echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 11263if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
11264
11265cat >>confdefs.h <<\_ACEOF
1cb36a98 11266#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 11267_ACEOF
1cb36a98 11268
8ada417f 11269fi
1cb36a98 11270
ba479fd2
NN
11271 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
11272echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
11273if test "${gcc_cv_as_sparc_relax+set}" = set; then
11274 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 11275else
8ada417f
ZW
11276 gcc_cv_as_sparc_relax=no
11277 if test x$gcc_cv_as != x; then
6e3f3080 11278 echo '.text' > conftest.s
ba479fd2
NN
11279 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
11280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11281 (eval $ac_try) 2>&5
11282 ac_status=$?
11283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11284 (exit $ac_status); }; }
8ada417f
ZW
11285 then
11286 gcc_cv_as_sparc_relax=yes
11287 else
11288 echo "configure: failed program was" >&5
11289 cat conftest.s >&5
11290 fi
11291 rm -f conftest.o conftest.s
11292 fi
cafe096b 11293fi
ba479fd2
NN
11294echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
11295echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 11296if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
11297
11298cat >>confdefs.h <<\_ACEOF
e95b1e6a 11299#define HAVE_AS_RELAX_OPTION 1
ba479fd2 11300_ACEOF
e95b1e6a 11301
8ada417f 11302fi
e95b1e6a 11303
ba479fd2
NN
11304 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
11305echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
11306if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
11307 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 11308else
8ada417f
ZW
11309 gcc_cv_as_sparc_ua_pcrel=no
11310 if test x$gcc_cv_as != x; then
6e3f3080 11311 echo '.text
8ada417f
ZW
11312foo:
11313 nop
11314.data
11315.align 4
11316.byte 0
11317.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
11318 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
11319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11320 (eval $ac_try) 2>&5
11321 ac_status=$?
11322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11323 (exit $ac_status); }; }
8ada417f
ZW
11324 then
11325 if test x$gcc_cv_ld != x \
11326 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
11327 gcc_cv_as_sparc_ua_pcrel=yes
11328 fi
11329 rm -f conftest
11330 else
11331 echo "configure: failed program was" >&5
11332 cat conftest.s >&5
11333 fi
11334 rm -f conftest.o conftest.s
11335 fi
cafe096b 11336fi
ba479fd2
NN
11337echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
11338echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 11339if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
11340
11341cat >>confdefs.h <<\_ACEOF
17e9e88c 11342#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 11343_ACEOF
17e9e88c 11344
17e9e88c 11345
ba479fd2
NN
11346 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
11347echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
11348if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
11349 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 11350else
8ada417f
ZW
11351 gcc_cv_as_sparc_ua_pcrel_hidden=no
11352 if test x$gcc_cv_as != x; then
6e3f3080 11353 echo '.data
8ada417f
ZW
11354.align 4
11355.byte 0x31
11356.uaword %r_disp32(foo)
11357.byte 0x32, 0x33, 0x34
11358.global foo
11359.hidden foo
11360foo:
11361.skip 4' > conftest.s
ba479fd2
NN
11362 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
11363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11364 (eval $ac_try) 2>&5
11365 ac_status=$?
11366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11367 (exit $ac_status); }; }
8ada417f
ZW
11368 then
11369 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
11370 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
11371 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
11372 | grep ' 31000000 07323334' > /dev/null 2>&1; then
11373 if $gcc_cv_objdump -R conftest 2> /dev/null \
11374 | grep 'DISP32' > /dev/null 2>&1; then
11375 :
11376 else
11377 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 11378 fi
8ada417f
ZW
11379 fi
11380 rm -f conftest
11381 else
11382 echo "configure: failed program was" >&5
11383 cat conftest.s >&5
11384 fi
11385 rm -f conftest.o conftest.s
11386 fi
cafe096b 11387fi
ba479fd2
NN
11388echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
11389echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 11390if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
11391
11392cat >>confdefs.h <<\_ACEOF
cf7b8b0d 11393#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 11394_ACEOF
cf7b8b0d 11395
8ada417f 11396fi
ba479fd2 11397
8ada417f 11398fi # unaligned pcrel relocs
cf7b8b0d 11399
ba479fd2
NN
11400 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
11401echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
11402if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
11403 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 11404else
8ada417f
ZW
11405 gcc_cv_as_sparc_offsetable_lo10=no
11406 if test x$gcc_cv_as != x; then
6e3f3080 11407 echo '.text
8ada417f
ZW
11408 or %g1, %lo(ab) + 12, %g1
11409 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
11410 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
11411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11412 (eval $ac_try) 2>&5
11413 ac_status=$?
11414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11415 (exit $ac_status); }; }
8ada417f
ZW
11416 then
11417 if test x$gcc_cv_objdump != x \
ecb0ccbc 11418 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f
ZW
11419 | grep ' 82106000 82106000' > /dev/null 2>&1; then
11420 gcc_cv_as_offsetable_lo10=yes
11421 fi
11422 else
11423 echo "configure: failed program was" >&5
11424 cat conftest.s >&5
11425 fi
11426 rm -f conftest.o conftest.s
11427 fi
cafe096b 11428fi
ba479fd2
NN
11429echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
11430echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 11431if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
11432
11433cat >>confdefs.h <<\_ACEOF
1cb36a98 11434#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 11435_ACEOF
1cb36a98 11436
8ada417f 11437fi
1cb36a98
RH
11438 ;;
11439
c307e6dd 11440 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
11441 case $target_os in
11442 cygwin* | pe | mingw32*)
11443 # Used for DWARF 2 in PE
11444 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
11445echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
11446if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
11447 echo $ECHO_N "(cached) $ECHO_C" >&6
11448else
11449 gcc_cv_as_ix86_pe_secrel32=no
11450 if test $in_tree_gas = yes; then
11451 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
11452 then gcc_cv_as_ix86_pe_secrel32=yes
11453fi
11454 elif test x$gcc_cv_as != x; then
11455 echo '.text
11456foo: nop
11457.data
11458 .secrel32 foo' > conftest.s
11459 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11461 (eval $ac_try) 2>&5
11462 ac_status=$?
11463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11464 (exit $ac_status); }; }
11465 then
11466 if test x$gcc_cv_ld != x \
11467 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
11468 gcc_cv_as_ix86_pe_secrel32=yes
11469 fi
11470 rm -f conftest
11471 else
11472 echo "configure: failed program was" >&5
11473 cat conftest.s >&5
11474 fi
11475 rm -f conftest.o conftest.s
11476 fi
11477fi
11478echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
11479echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
11480if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
11481
11482cat >>confdefs.h <<\_ACEOF
11483#define HAVE_GAS_PE_SECREL32_RELOC 1
11484_ACEOF
11485
11486fi
11487 ;;
11488 esac
11489
ba479fd2
NN
11490 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
11491echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
11492if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
11493 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11494else
11495 gcc_cv_as_ix86_filds_fists=no
11496 if test $in_tree_gas = yes; then
11497 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
11498 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 11499fi
8ada417f 11500 elif test x$gcc_cv_as != x; then
6e3f3080 11501 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
11502 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11504 (eval $ac_try) 2>&5
11505 ac_status=$?
11506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11507 (exit $ac_status); }; }
8ada417f
ZW
11508 then
11509 gcc_cv_as_ix86_filds_fists=yes
11510 else
11511 echo "configure: failed program was" >&5
11512 cat conftest.s >&5
981d4858 11513 fi
8ada417f
ZW
11514 rm -f conftest.o conftest.s
11515 fi
11516fi
ba479fd2
NN
11517echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
11518echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 11519if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
11520
11521cat >>confdefs.h <<\_ACEOF
8ada417f 11522#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 11523_ACEOF
ad9c4d9f 11524
f6f5dff2
RO
11525fi
11526
ba479fd2
NN
11527 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
11528echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
11529if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
11530 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
11531else
11532 gcc_cv_as_ix86_cmov_sun_syntax=no
11533 if test x$gcc_cv_as != x; then
6e3f3080 11534 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
11535 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11537 (eval $ac_try) 2>&5
11538 ac_status=$?
11539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11540 (exit $ac_status); }; }
f6f5dff2
RO
11541 then
11542 gcc_cv_as_ix86_cmov_sun_syntax=yes
11543 else
11544 echo "configure: failed program was" >&5
11545 cat conftest.s >&5
11546 fi
11547 rm -f conftest.o conftest.s
11548 fi
11549fi
ba479fd2
NN
11550echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
11551echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 11552if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
11553
11554cat >>confdefs.h <<\_ACEOF
f6f5dff2 11555#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 11556_ACEOF
f6f5dff2 11557
ad9c4d9f
NN
11558fi
11559
6f3ca281
ZW
11560 # This one is used unconditionally by i386.[ch]; it is to be defined
11561 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
11562 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
11563echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
11564if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
11565 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11566else
11567 gcc_cv_as_ix86_gotoff_in_data=no
11568 if test $in_tree_gas = yes; then
11569 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
11570 then gcc_cv_as_ix86_gotoff_in_data=yes
11571fi
11572 elif test x$gcc_cv_as != x; then
6e3f3080 11573 echo ' .text
f88c65f7
RH
11574.L0:
11575 nop
11576 .data
8ada417f 11577 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
11578 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11580 (eval $ac_try) 2>&5
11581 ac_status=$?
11582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11583 (exit $ac_status); }; }
8ada417f
ZW
11584 then
11585 gcc_cv_as_ix86_gotoff_in_data=yes
11586 else
11587 echo "configure: failed program was" >&5
11588 cat conftest.s >&5
f88c65f7 11589 fi
8ada417f
ZW
11590 rm -f conftest.o conftest.s
11591 fi
11592fi
ba479fd2
NN
11593echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
11594echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 11595
6f3ca281 11596
ba479fd2 11597cat >>confdefs.h <<_ACEOF
6f3ca281 11598#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 11599_ACEOF
f88c65f7 11600
1cb36a98 11601 ;;
ef1ecf87
RH
11602
11603 ia64*-*-*)
ba479fd2
NN
11604 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
11605echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
11606if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
11607 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 11608else
8ada417f
ZW
11609 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
11610 if test $in_tree_gas = yes; then
11611 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
11612 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 11613fi
8ada417f 11614 elif test x$gcc_cv_as != x; then
6e3f3080 11615 echo ' .text
ef1ecf87
RH
11616 addl r15 = @ltoffx(x#), gp
11617 ;;
cfa9ee99 11618 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
11619 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11621 (eval $ac_try) 2>&5
11622 ac_status=$?
11623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11624 (exit $ac_status); }; }
8ada417f 11625 then
cfa9ee99 11626 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
11627 else
11628 echo "configure: failed program was" >&5
11629 cat conftest.s >&5
2c4a9cff 11630 fi
8ada417f
ZW
11631 rm -f conftest.o conftest.s
11632 fi
11633fi
ba479fd2
NN
11634echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
11635echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 11636if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
11637
11638cat >>confdefs.h <<\_ACEOF
cfa9ee99 11639#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 11640_ACEOF
8ada417f 11641
cfa9ee99 11642fi
8ada417f 11643
2c4a9cff 11644 ;;
8ada417f 11645
2c4a9cff 11646 powerpc*-*-*)
8ada417f 11647 case $target in
6b37db3c
DE
11648 *-*-aix*) conftest_s=' .csect .text[PR]
11649 mfcr 3,128';;
11650 *-*-darwin*) conftest_s=' .text
11651 mfcr r3,128';;
11652 *) conftest_s=' .text
11653 mfcr 3,128';;
8ada417f 11654 esac
8ada417f 11655
ba479fd2
NN
11656 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
11657echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
11658if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
11659 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 11660else
8ada417f
ZW
11661 gcc_cv_as_powerpc_mfcrf=no
11662 if test $in_tree_gas = yes; then
11663 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
11664 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 11665fi
8ada417f 11666 elif test x$gcc_cv_as != x; then
6e3f3080 11667 echo "$conftest_s" > conftest.s
ba479fd2
NN
11668 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11670 (eval $ac_try) 2>&5
11671 ac_status=$?
11672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11673 (exit $ac_status); }; }
8ada417f
ZW
11674 then
11675 gcc_cv_as_powerpc_mfcrf=yes
11676 else
11677 echo "configure: failed program was" >&5
11678 cat conftest.s >&5
11679 fi
11680 rm -f conftest.o conftest.s
11681 fi
2c4a9cff 11682fi
ba479fd2
NN
11683echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
11684echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 11685if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
11686
11687cat >>confdefs.h <<\_ACEOF
2c4a9cff 11688#define HAVE_AS_MFCRF 1
ba479fd2 11689_ACEOF
ef1ecf87 11690
8ada417f
ZW
11691fi
11692 ;;
11693
11694 mips*-*-*)
ba479fd2
NN
11695 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
11696echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
11697if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
11698 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11699else
11700 gcc_cv_as_mips_explicit_relocs=no
11701 if test $in_tree_gas = yes; then
11702 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
11703 then gcc_cv_as_mips_explicit_relocs=yes
11704fi
11705 elif test x$gcc_cv_as != x; then
6e3f3080 11706 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
11707 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11709 (eval $ac_try) 2>&5
11710 ac_status=$?
11711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11712 (exit $ac_status); }; }
8ada417f
ZW
11713 then
11714 gcc_cv_as_mips_explicit_relocs=yes
11715 else
11716 echo "configure: failed program was" >&5
11717 cat conftest.s >&5
ef1ecf87 11718 fi
8ada417f
ZW
11719 rm -f conftest.o conftest.s
11720 fi
11721fi
ba479fd2
NN
11722echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
11723echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
11724if test $gcc_cv_as_mips_explicit_relocs = yes; then
11725 if test x$target_cpu_default = x
11726 then target_cpu_default=MASK_EXPLICIT_RELOCS
11727 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
11728 fi
11729fi
11730
82563d35
RS
11731 if test x$gas_flag = xyes \
11732 || test x"$host" != x"$build" \
11733 || test ! -x "$gcc_cv_as" \
11734 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
11735 :
11736 else
11737 echo "*** This configuration requires the GNU assembler" >&2
11738 exit 1
11739 fi
ef1ecf87 11740 ;;
1cb36a98 11741esac
9d147085
RH
11742# ??? Not all targets support dwarf2 debug_line, even within a version
11743# of gas. Moreover, we need to emit a valid instruction to trigger any
11744# info to the output file. So, as supported targets are added to gas 2.11,
11745# add some instruction here to (also) show we expect this might work.
11746# ??? Once 2.11 is released, probably need to add first known working
11747# version to the per-target configury.
11748case "$target" in
80486e06 11749 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 11750 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
d116bdf8 11751 | xstormy16*-*-* | cris-*-* | xtensa-*-*)
9d147085
RH
11752 insn="nop"
11753 ;;
57116d8d 11754 ia64*-*-* | s390*-*-*)
9d147085
RH
11755 insn="nop 0"
11756 ;;
2853bc5a
HPN
11757 mmix-*-*)
11758 insn="swym 0"
11759 ;;
8ada417f
ZW
11760esac
11761if test x"$insn" != x; then
11762 conftest_s="\
11763 .file 1 \"conftest.s\"
11764 .loc 1 3 0
11765 $insn"
ba479fd2
NN
11766 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
11767echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
11768if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
11769 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11770else
11771 gcc_cv_as_dwarf2_debug_line=no
11772 if test $in_tree_gas = yes; then
11773 if test $in_tree_gas_is_elf = yes \
11774 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
11775 then gcc_cv_as_dwarf2_debug_line=yes
11776fi
11777 elif test x$gcc_cv_as != x; then
6e3f3080 11778 echo "$conftest_s" > conftest.s
ba479fd2
NN
11779 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11781 (eval $ac_try) 2>&5
11782 ac_status=$?
11783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11784 (exit $ac_status); }; }
8ada417f
ZW
11785 then
11786 # ??? This fails with non-gnu grep. Maybe use objdump?
11787 if grep debug_line conftest.o > /dev/null 2>&1; then
11788 gcc_cv_as_dwarf2_debug_line=yes
11789 fi
11790 else
11791 echo "configure: failed program was" >&5
11792 cat conftest.s >&5
11793 fi
11794 rm -f conftest.o conftest.s
11795 fi
11796fi
ba479fd2
NN
11797echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
11798echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 11799
ad9c4d9f 11800
8ada417f
ZW
11801# The .debug_line file table must be in the exact order that
11802# we specified the files, since these indices are also used
11803# by DW_AT_decl_file. Approximate this test by testing if
11804# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
11805 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
11806echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
11807if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
11808 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11809else
11810 gcc_cv_as_dwarf2_file_buggy=no
11811 if test x$gcc_cv_as != x; then
6e3f3080 11812 echo ' .file 1 "foo.s"
8ada417f 11813 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
11814 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11816 (eval $ac_try) 2>&5
11817 ac_status=$?
11818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11819 (exit $ac_status); }; }
8ada417f
ZW
11820 then
11821 gcc_cv_as_dwarf2_file_buggy=yes
11822 else
11823 echo "configure: failed program was" >&5
11824 cat conftest.s >&5
11825 fi
11826 rm -f conftest.o conftest.s
11827 fi
ad9c4d9f 11828fi
ba479fd2
NN
11829echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
11830echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
11831
11832
11833 if test $gcc_cv_as_dwarf2_debug_line = yes \
11834 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
11835
11836cat >>confdefs.h <<\_ACEOF
9d147085 11837#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 11838_ACEOF
9d147085 11839
8ada417f 11840 fi
ad9c4d9f 11841
ba479fd2
NN
11842 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
11843echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
11844if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
11845 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11846else
11847 gcc_cv_as_gdwarf2_flag=no
11848 if test $in_tree_gas = yes; then
11849 if test $in_tree_gas_is_elf = yes \
11850 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
11851 then gcc_cv_as_gdwarf2_flag=yes
11852fi
11853 elif test x$gcc_cv_as != x; then
6e3f3080 11854 echo "$insn" > conftest.s
ba479fd2
NN
11855 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
11856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11857 (eval $ac_try) 2>&5
11858 ac_status=$?
11859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11860 (exit $ac_status); }; }
8ada417f
ZW
11861 then
11862 gcc_cv_as_gdwarf2_flag=yes
11863 else
11864 echo "configure: failed program was" >&5
11865 cat conftest.s >&5
11866 fi
11867 rm -f conftest.o conftest.s
11868 fi
ad9c4d9f 11869fi
ba479fd2
NN
11870echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
11871echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 11872if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
11873
11874cat >>confdefs.h <<\_ACEOF
5f0e9ea2 11875#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 11876_ACEOF
5f0e9ea2
GK
11877
11878fi
ad9c4d9f 11879
ba479fd2
NN
11880 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
11881echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
11882if test "${gcc_cv_as_gstabs_flag+set}" = set; then
11883 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11884else
11885 gcc_cv_as_gstabs_flag=no
11886 if test $in_tree_gas = yes; then
11887 if test $in_tree_gas_is_elf = yes \
11888 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
11889 then gcc_cv_as_gstabs_flag=yes
11890fi
11891 elif test x$gcc_cv_as != x; then
6e3f3080 11892 echo "$insn" > conftest.s
ba479fd2
NN
11893 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
11894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11895 (eval $ac_try) 2>&5
11896 ac_status=$?
11897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11898 (exit $ac_status); }; }
8ada417f
ZW
11899 then
11900 # The native Solaris 9/Intel assembler doesn't understand --gstabs
11901 # and warns about it, but still exits successfully. So check for
11902 # this.
ba479fd2
NN
11903 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
11904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11905 (eval $ac_try) 2>&5
11906 ac_status=$?
11907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11908 (exit $ac_status); }; }
8ada417f
ZW
11909 then :
11910 else gcc_cv_as_gstabs_flag=yes
11911 fi
11912 else
11913 echo "configure: failed program was" >&5
11914 cat conftest.s >&5
11915 fi
11916 rm -f conftest.o conftest.s
11917 fi
ad9c4d9f 11918fi
ba479fd2
NN
11919echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
11920echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 11921if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
11922
11923cat >>confdefs.h <<\_ACEOF
5f0e9ea2 11924#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 11925_ACEOF
5f0e9ea2
GK
11926
11927fi
8ada417f 11928fi
5f0e9ea2 11929
ba479fd2
NN
11930echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
11931echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 11932gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 11933if test $in_tree_ld = yes ; then
5408ac6c
HPN
11934 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 \
11935 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
11936 gcc_cv_ld_ro_rw_mix=read-write
11937 fi
11938elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
11939 echo '.section myfoosect, "a"' > conftest1.s
11940 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 11941 echo '.byte 1' >> conftest2.s
90e145da 11942 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 11943 echo '.byte 0' >> conftest3.s
6cd656d0
KC
11944 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
11945 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
11946 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 11947 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 11948 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 11949 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 11950 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
11951 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
11952 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
11953 gcc_cv_ld_ro_rw_mix=read-only
11954 else
11955 gcc_cv_ld_ro_rw_mix=read-write
11956 fi
11957 fi
11958 fi
11959 rm -f conftest.* conftest[123].*
11960fi
11961if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
11962
11963cat >>confdefs.h <<\_ACEOF
96d0f4dc 11964#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 11965_ACEOF
96d0f4dc
JJ
11966
11967fi
ba479fd2
NN
11968echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
11969echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 11970
ba479fd2
NN
11971echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
11972echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 11973gcc_cv_ld_eh_frame_hdr=no
34a86c2b 11974if test $in_tree_ld = yes ; then
5408ac6c
HPN
11975 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 \
11976 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
11977 gcc_cv_ld_eh_frame_hdr=yes
11978 fi
11979elif test x$gcc_cv_ld != x; then
11980 # Check if linker supports --eh-frame-hdr option
11981 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
11982 gcc_cv_ld_eh_frame_hdr=yes
11983 fi
11984fi
11985if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
11986
11987cat >>confdefs.h <<\_ACEOF
275b60d6 11988#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 11989_ACEOF
275b60d6
JJ
11990
11991fi
ba479fd2
NN
11992echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
11993echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 11994
ba479fd2
NN
11995echo "$as_me:$LINENO: checking linker position independent executable support" >&5
11996echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
11997gcc_cv_ld_pie=no
11998if test $in_tree_ld = yes ; then
5408ac6c
HPN
11999 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 \
12000 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
12001 gcc_cv_ld_pie=yes
12002 fi
12003elif test x$gcc_cv_ld != x; then
12004 # Check if linker supports -pie option
12005 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
12006 gcc_cv_ld_pie=yes
12007 fi
12008fi
12009if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
12010
12011cat >>confdefs.h <<\_ACEOF
24a4dd31 12012#define HAVE_LD_PIE 1
ba479fd2 12013_ACEOF
24a4dd31
JJ
12014
12015fi
ba479fd2
NN
12016echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
12017echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 12018
8bb915b6
NN
12019# --------
12020# UNSORTED
12021# --------
12022
765f1bf9
AM
12023echo "$as_me:$LINENO: checking linker --as-needed support" >&5
12024echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
12025if test "${gcc_cv_ld_as_needed+set}" = set; then
12026 echo $ECHO_N "(cached) $ECHO_C" >&6
12027else
12028 gcc_cv_ld_as_needed=no
765f1bf9
AM
12029if test $in_tree_ld = yes ; then
12030 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 \
12031 && test $in_tree_ld_is_elf = yes; then
12032 gcc_cv_ld_as_needed=yes
12033 fi
12034elif test x$gcc_cv_ld != x; then
12035 # Check if linker supports --as-needed and --no-as-needed options
12036 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
12037 gcc_cv_ld_as_needed=yes
12038 fi
12039fi
82e923f6
RS
12040
12041fi
12042echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
12043echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
12044if test x"$gcc_cv_ld_as_needed" = xyes; then
12045
12046cat >>confdefs.h <<\_ACEOF
12047#define HAVE_LD_AS_NEEDED 1
12048_ACEOF
12049
12050fi
765f1bf9 12051
9fb28a67 12052if test x$with_sysroot = x && test x$host = x$target \
047d636f 12053 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
12054
12055cat >>confdefs.h <<_ACEOF
793e9558 12056#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 12057_ACEOF
793e9558
PB
12058
12059fi
12060
81bf3d9e 12061# Find out what GC implementation we want, or may, use.
ba479fd2 12062
81bf3d9e
RH
12063# Check whether --with-gc or --without-gc was given.
12064if test "${with_gc+set}" = set; then
12065 withval="$with_gc"
12066 case "$withval" in
59415997 12067 page | zone)
81bf3d9e
RH
12068 GGC=ggc-$withval
12069 ;;
12070 *)
ba479fd2
NN
12071 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
12072echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
12073 { (exit 1); exit 1; }; }
81bf3d9e
RH
12074 ;;
12075esac
12076else
005537df 12077 GGC=ggc-page
ba479fd2 12078fi;
81bf3d9e
RH
12079
12080echo "Using $GGC for garbage collection."
12081
3c809ba4 12082# Use the system's zlib library.
b8dad04b
ZW
12083zlibdir=-L../zlib
12084zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 12085
3c809ba4
AG
12086# Check whether --with-system-zlib or --without-system-zlib was given.
12087if test "${with_system_zlib+set}" = set; then
12088 withval="$with_system_zlib"
12089 zlibdir=
12090zlibinc=
12091
ba479fd2 12092fi;
3c809ba4
AG
12093
12094
12095
dc6746e7 12096
ba479fd2
NN
12097echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
12098echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
12099 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
12100if test "${enable_maintainer_mode+set}" = set; then
12101 enableval="$enable_maintainer_mode"
12102 maintainer_mode=$enableval
12103else
12104 maintainer_mode=no
ba479fd2 12105fi;
63cf211a 12106
ba479fd2
NN
12107echo "$as_me:$LINENO: result: $maintainer_mode" >&5
12108echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
12109
12110if test "$maintainer_mode" = "yes"; then
12111 MAINT=''
12112else
12113 MAINT='#'
12114fi
12115
6de9cd9a
DN
12116echo "$as_me:$LINENO: checking whether to use libbanshee for points-to alias analysis" >&5
12117echo $ECHO_N "checking whether to use libbanshee for points-to alias analysis... $ECHO_C" >&6
12118
12119# Check whether --with-libbanshee or --without-libbanshee was given.
12120if test "${with_libbanshee+set}" = set; then
12121 withval="$with_libbanshee"
12122 libbanshee="$with_libbanshee"
12123else
12124 libbanshee=no
12125fi;
12126
12127if test x"$libbanshee" = xyes; then
12128 BANSHEELIB="../libbanshee/points-to/libandersen.a ../libbanshee/engine/libbansheeengine.a ../libbanshee/libcompat/libbansheecompat.a "
12129 BANSHEEINC="-I\$(srcdir)/../libbanshee/libcompat -I\$(srcdir)/../libbanshee -I\$(srcdir)/../libbanshee/points-to"
12130 ANDER="tree-alias-ander.o"
12131
12132cat >>confdefs.h <<\_ACEOF
12133#define HAVE_BANSHEE 1
12134_ACEOF
12135
12136else
12137 BANSHEELIB=""
12138 BANSHEEINC=""
12139 ANDER=""
12140fi
12141echo "$as_me:$LINENO: result: $with_libbanshee" >&5
12142echo "${ECHO_T}$with_libbanshee" >&6
12143
12144
12145
12146
12147
8bb915b6
NN
12148# --------------
12149# Language hooks
12150# --------------
12151
861bb6c1
JL
12152# Make empty files to contain the specs and options for each language.
12153# Then add #include lines to for a compiler that has specs and/or options.
12154
d7b42618 12155lang_opt_files=
861bb6c1 12156lang_specs_files=
3103b7db 12157lang_tree_files=
861bb6c1
JL
12158for subdir in . $subdirs
12159do
d7b42618
NB
12160 if test -f $srcdir/$subdir/lang.opt; then
12161 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
12162 fi
75bffa71 12163 if test -f $srcdir/$subdir/lang-specs.h; then
0d24f4d1 12164 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
861bb6c1 12165 fi
3103b7db 12166 if test -f $srcdir/$subdir/$subdir-tree.def; then
0d24f4d1 12167 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
3103b7db 12168 fi
861bb6c1
JL
12169done
12170
12171# These (without "all_") are set in each config-lang.in.
12172# `language' must be a single word so is spelled singularly.
12173all_languages=
12174all_boot_languages=
12175all_compilers=
12176all_stagestuff=
69f9a345 12177all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders libada-mk'
861bb6c1 12178# List of language makefile fragments.
2ed26f6b
ZW
12179all_lang_makefrags=
12180# List of language subdirectory makefiles. Deprecated.
861bb6c1 12181all_lang_makefiles=
e2500fed 12182# Files for gengtype
ef69da62 12183all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
12184# Files for gengtype with language
12185all_gtfiles_files_langs=
12186all_gtfiles_files_files=
861bb6c1
JL
12187
12188# Add the language fragments.
12189# Languages are added via two mechanisms. Some information must be
12190# recorded in makefile variables, these are defined in config-lang.in.
12191# We accumulate them and plug them into the main Makefile.
12192# The other mechanism is a set of hooks for each of the main targets
12193# like `clean', `install', etc.
12194
861bb6c1 12195language_hooks="Make-hooks"
861bb6c1 12196
c406e779 12197for s in $subdirs
861bb6c1 12198do
861bb6c1
JL
12199 language=
12200 boot_language=
12201 compilers=
12202 stagestuff=
861bb6c1 12203 outputs=
e2500fed 12204 gtfiles=
861bb6c1 12205 . ${srcdir}/$s/config-lang.in
75bffa71 12206 if test "x$language" = x
861bb6c1
JL
12207 then
12208 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
12209 exit 1
12210 fi
2ed26f6b 12211 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
72aaffbd 12212 if test -f ${srcdir}/$s/Makefile.in
2ed26f6b 12213 then all_lang_makefiles="$s/Makefile"
72aaffbd 12214 fi
861bb6c1 12215 all_languages="$all_languages $language"
75bffa71 12216 if test "x$boot_language" = xyes
861bb6c1
JL
12217 then
12218 all_boot_languages="$all_boot_languages $language"
12219 fi
12220 all_compilers="$all_compilers $compilers"
12221 all_stagestuff="$all_stagestuff $stagestuff"
861bb6c1 12222 all_outputs="$all_outputs $outputs"
e2500fed 12223 all_gtfiles="$all_gtfiles $gtfiles"
c406e779 12224 for f in $gtfiles
8ac9d31f 12225 do
8ac9d31f
TJ
12226 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
12227 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f 12228 done
861bb6c1
JL
12229done
12230
8ac9d31f
TJ
12231# Pick up gtfiles for c
12232gtfiles=
12233s="c"
12234. ${srcdir}/c-config-lang.in
12235all_gtfiles="$all_gtfiles $gtfiles"
c406e779 12236for f in $gtfiles
8ac9d31f 12237do
8ac9d31f
TJ
12238 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
12239 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
12240done
12241
cbc59f01 12242check_languages=
c406e779 12243for language in $all_languages
cbc59f01 12244do
cbc59f01 12245 check_languages="$check_languages check-$language"
cbc59f01
DD
12246done
12247
62b81e45
MM
12248# We link each language in with a set of hooks, reached indirectly via
12249# lang.${target}.
861bb6c1
JL
12250
12251rm -f Make-hooks
12252touch Make-hooks
65ebbf81 12253target_list="all.build all.cross start.encap rest.encap tags \
a207b594 12254 install-normal install-common install-man \
a541f69d 12255 uninstall info man srcextra srcman srcinfo \
a03ad584 12256 mostlyclean clean distclean maintainer-clean \
8f231b5d 12257 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
861bb6c1
JL
12258for t in $target_list
12259do
12260 x=
c406e779 12261 for lang in $all_languages
861bb6c1 12262 do
ab87f8c8 12263 x="$x $lang.$t"
861bb6c1
JL
12264 done
12265 echo "lang.$t: $x" >> Make-hooks
12266done
12267
8bb915b6
NN
12268# --------
12269# UNSORTED
12270# --------
12271
cc06d68c 12272# Create .gdbinit.
861bb6c1 12273
cc06d68c
GP
12274echo "dir ." > .gdbinit
12275echo "dir ${srcdir}" >> .gdbinit
12276if test x$gdb_needs_out_file_path = xyes
12277then
12278 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
12279fi
12280if test "x$subdirs" != x; then
12281 for s in $subdirs
12282 do
12283 echo "dir ${srcdir}/$s" >> .gdbinit
12284 done
861bb6c1 12285fi
cc06d68c 12286echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 12287
8f8d3278
NC
12288# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
12289# absolute path for gcc_tooldir based on inserting the number of up-directory
12290# movements required to get from $(exec_prefix) to $(prefix) into the basic
12291# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
12292# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
12293# make and thus we'd get different behavior depending on where we built the
12294# sources.
5949a9fc 12295if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 12296 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 12297else
8f8d3278
NC
12298# An explanation of the sed strings:
12299# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
12300# -e 's|/$||' match a trailing forward slash and eliminates it
12301# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 12302# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
12303#
12304# (*) Note this pattern overwrites the first character of the string
12305# with a forward slash if one is not already present. This is not a
12306# problem because the exact names of the sub-directories concerned is
12307# unimportant, just the number of them matters.
12308#
12309# The practical upshot of these patterns is like this:
12310#
12311# prefix exec_prefix result
12312# ------ ----------- ------
12313# /foo /foo/bar ../
12314# /foo/ /foo/bar ../
12315# /foo /foo/bar/ ../
12316# /foo/ /foo/bar/ ../
12317# /foo /foo/bar/ugg ../../
12318#
4c112cda 12319 dollar='$$'
caa55b1e 12320 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
12321fi
12322
12323
2ce3c6c6 12324
2bbea3a6
RH
12325# Find a directory in which to install a shared libgcc.
12326
12327# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
12328if test "${enable_version_specific_runtime_libs+set}" = set; then
12329 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
12330
12331fi;
2bbea3a6
RH
12332
12333
5b15f277
RH
12334# Check whether --with-slibdir or --without-slibdir was given.
12335if test "${with_slibdir+set}" = set; then
12336 withval="$with_slibdir"
12337 slibdir="$with_slibdir"
12338else
12339 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 12340 slibdir='$(libsubdir)'
5b15f277 12341elif test "$host" != "$target"; then
2bbea3a6
RH
12342 slibdir='$(build_tooldir)/lib'
12343else
5b15f277 12344 slibdir='$(libdir)'
2bbea3a6 12345fi
ba479fd2 12346fi;
2bbea3a6
RH
12347
12348
1e6347d8 12349objdir=`${PWDCMD-pwd}`
7e717196
JL
12350
12351
861bb6c1
JL
12352# Substitute configuration variables
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
9b16d2c4 12399
e9a25f70 12400
6e26218f 12401
c8724862 12402
e061d1ce 12403
d8bb17c8 12404
11642c3a
ZW
12405
12406
12407
12408
12409
12410
12411
3d9d2476 12412
596151e1 12413
8ac9d31f
TJ
12414
12415
12416
e2500fed 12417
51b9ff45 12418
861bb6c1 12419
a541f69d
KC
12420# If it doesn't already exist, create document directory
12421echo "checking for the document directory." 1>&2
12422if test -d doc ; then
12423 true
12424else
12425 mkdir doc
12426fi
861bb6c1 12427
6e3f3080
NN
12428# Echo link setup.
12429if test x${build} = x${host} ; then
12430 if test x${host} = x${target} ; then
12431 echo "Links are now set up to build a native compiler for ${target}." 1>&2
12432 else
12433 echo "Links are now set up to build a cross-compiler" 1>&2
12434 echo " from ${host} to ${target}." 1>&2
12435 fi
12436else
12437 if test x${host} = x${target} ; then
12438 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
12439 echo " for ${target}." 1>&2
12440 else
12441 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
12442 echo " from ${host} to ${target}." 1>&2
12443 fi
12444fi
12445
6de9cd9a
DN
12446
12447
12448
6e3f3080
NN
12449# Configure the subdirectories
12450# AC_CONFIG_SUBDIRS($subdirs)
12451
12452# Create the Makefile
12453# and configure language subdirectories
ba479fd2 12454 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
12455
12456
ba479fd2 12457 ac_config_commands="$ac_config_commands default"
914c5af7 12458
ba479fd2 12459cat >confcache <<\_ACEOF
6e3f3080
NN
12460# This file is a shell script that caches the results of configure
12461# tests run on this system so they can be shared between configure
ba479fd2
NN
12462# scripts and configure runs, see configure's option --config-cache.
12463# It is not useful on other systems. If it contains results you don't
12464# want to keep, you may remove or edit it.
6e3f3080 12465#
ba479fd2
NN
12466# config.status only pays attention to the cache file if you give it
12467# the --recheck option to rerun configure.
6e3f3080 12468#
ba479fd2
NN
12469# `ac_cv_env_foo' variables (set or unset) will be overridden when
12470# loading this file, other *unset* `ac_cv_foo' will be assigned the
12471# following values.
12472
12473_ACEOF
12474
6e3f3080
NN
12475# The following way of writing the cache mishandles newlines in values,
12476# but we know of no workaround that is simple, portable, and efficient.
12477# So, don't put newlines in cache variables' values.
12478# Ultrix sh set writes to stderr and can't be redirected directly,
12479# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
12480{
12481 (set) 2>&1 |
12482 case `(ac_space=' '; set | grep ac_space) 2>&1` in
12483 *ac_space=\ *)
12484 # `set' does not quote correctly, so add quotes (double-quote
12485 # substitution turns \\\\ into \\, and sed turns \\ into \).
12486 sed -n \
86da66b5
HPN
12487 "s/'/'\\\\''/g;
12488 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ba479fd2
NN
12489 ;;
12490 *)
12491 # `set' quotes correctly as required by POSIX, so do not add quotes.
12492 sed -n \
86da66b5 12493 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
12494 ;;
12495 esac;
12496} |
12497 sed '
12498 t clear
12499 : clear
12500 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12501 t end
12502 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12503 : end' >>confcache
12504if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 12505 if test -w $cache_file; then
ba479fd2
NN
12506 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
12507 cat confcache >$cache_file
6e3f3080
NN
12508 else
12509 echo "not updating unwritable cache $cache_file"
12510 fi
12511fi
12512rm -f confcache
12513
12514test "x$prefix" = xNONE && prefix=$ac_default_prefix
12515# Let make expand exec_prefix.
12516test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12517
ba479fd2
NN
12518# VPATH may cause trouble with some makes, so we remove $(srcdir),
12519# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12520# trailing colons and then remove the whole line if VPATH becomes empty
12521# (actually we leave an empty line to preserve line numbers).
6e3f3080 12522if test "x$srcdir" = x.; then
86da66b5 12523 ac_vpsub='/^[ ]*VPATH[ ]*=/{
ba479fd2
NN
12524s/:*\$(srcdir):*/:/;
12525s/:*\${srcdir}:*/:/;
12526s/:*@srcdir@:*/:/;
86da66b5 12527s/^\([^=]*=[ ]*\):*/\1/;
ba479fd2 12528s/:*$//;
86da66b5 12529s/^[^=]*=[ ]*$//;
ba479fd2 12530}'
6e3f3080
NN
12531fi
12532
63cf211a 12533DEFS=-DHAVE_CONFIG_H
6e3f3080 12534
ba479fd2
NN
12535ac_libobjs=
12536ac_ltlibobjs=
12537for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
12538 # 1. Remove the extension, and $U if already installed.
12539 ac_i=`echo "$ac_i" |
86da66b5 12540 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
ba479fd2
NN
12541 # 2. Add them.
12542 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
12543 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
12544done
12545LIBOBJS=$ac_libobjs
63cf211a 12546
ba479fd2
NN
12547LTLIBOBJS=$ac_ltlibobjs
12548
12549
12550
12551: ${CONFIG_STATUS=./config.status}
12552ac_clean_files_save=$ac_clean_files
12553ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12554{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
12555echo "$as_me: creating $CONFIG_STATUS" >&6;}
12556cat >$CONFIG_STATUS <<_ACEOF
12557#! $SHELL
12558# Generated by $as_me.
6e3f3080
NN
12559# Run this file to recreate the current configuration.
12560# Compiler output produced by configure, useful for debugging
ba479fd2 12561# configure, is in config.log if it exists.
6e3f3080 12562
ba479fd2
NN
12563debug=false
12564ac_cs_recheck=false
12565ac_cs_silent=false
12566SHELL=\${CONFIG_SHELL-$SHELL}
12567_ACEOF
12568
12569cat >>$CONFIG_STATUS <<\_ACEOF
12570## --------------------- ##
12571## M4sh Initialization. ##
12572## --------------------- ##
12573
12574# Be Bourne compatible
12575if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12576 emulate sh
12577 NULLCMD=:
12578 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
12579 # is contrary to our usage. Disable this feature.
12580 alias -g '${1+"$@"}'='"$@"'
12581elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
12582 set -o posix
12583fi
86da66b5 12584DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
12585
12586# Support unset when possible.
86da66b5 12587if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
12588 as_unset=unset
12589else
12590 as_unset=false
12591fi
12592
12593
12594# Work around bugs in pre-3.0 UWIN ksh.
12595$as_unset ENV MAIL MAILPATH
12596PS1='$ '
12597PS2='> '
12598PS4='+ '
12599
12600# NLS nuisances.
12601for as_var in \
12602 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
12603 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
12604 LC_TELEPHONE LC_TIME
6e3f3080 12605do
86da66b5 12606 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
12607 eval $as_var=C; export $as_var
12608 else
12609 $as_unset $as_var
12610 fi
6e3f3080
NN
12611done
12612
ba479fd2
NN
12613# Required to use basename.
12614if expr a : '\(a\)' >/dev/null 2>&1; then
12615 as_expr=expr
12616else
12617 as_expr=false
12618fi
6e3f3080 12619
ba479fd2
NN
12620if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
12621 as_basename=basename
12622else
12623 as_basename=false
12624fi
6e3f3080
NN
12625
12626
ba479fd2
NN
12627# Name of the executable.
12628as_me=`$as_basename "$0" ||
12629$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
12630 X"$0" : 'X\(//\)$' \| \
12631 X"$0" : 'X\(/\)$' \| \
12632 . : '\(.\)' 2>/dev/null ||
12633echo X/"$0" |
12634 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
12635 /^X\/\(\/\/\)$/{ s//\1/; q; }
12636 /^X\/\(\/\).*/{ s//\1/; q; }
12637 s/.*/./; q'`
12638
6e3f3080 12639
ba479fd2
NN
12640# PATH needs CR, and LINENO needs CR and PATH.
12641# Avoid depending upon Character Ranges.
12642as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12643as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
12644as_cr_Letters=$as_cr_letters$as_cr_LETTERS
12645as_cr_digits='0123456789'
12646as_cr_alnum=$as_cr_Letters$as_cr_digits
12647
12648# The user is always right.
12649if test "${PATH_SEPARATOR+set}" != set; then
12650 echo "#! /bin/sh" >conf$$.sh
12651 echo "exit 0" >>conf$$.sh
12652 chmod +x conf$$.sh
12653 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
12654 PATH_SEPARATOR=';'
6e3f3080 12655 else
ba479fd2
NN
12656 PATH_SEPARATOR=:
12657 fi
12658 rm -f conf$$.sh
12659fi
12660
12661
12662 as_lineno_1=$LINENO
12663 as_lineno_2=$LINENO
12664 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
12665 test "x$as_lineno_1" != "x$as_lineno_2" &&
12666 test "x$as_lineno_3" = "x$as_lineno_2" || {
12667 # Find who we are. Look in the path if we contain no path at all
12668 # relative or not.
12669 case $0 in
12670 *[\\/]* ) as_myself=$0 ;;
12671 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12672for as_dir in $PATH
12673do
12674 IFS=$as_save_IFS
12675 test -z "$as_dir" && as_dir=.
12676 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12677done
12678
12679 ;;
12680 esac
12681 # We did not find ourselves, most probably we were run as `sh COMMAND'
12682 # in which case we are not to be found in the path.
12683 if test "x$as_myself" = x; then
12684 as_myself=$0
12685 fi
12686 if test ! -f "$as_myself"; then
12687 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
12688echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
12689 { (exit 1); exit 1; }; }
6e3f3080 12690 fi
ba479fd2
NN
12691 case $CONFIG_SHELL in
12692 '')
12693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12694for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
12695do
12696 IFS=$as_save_IFS
12697 test -z "$as_dir" && as_dir=.
12698 for as_base in sh bash ksh sh5; do
12699 case $as_dir in
12700 /*)
12701 if ("$as_dir/$as_base" -c '
12702 as_lineno_1=$LINENO
12703 as_lineno_2=$LINENO
12704 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
12705 test "x$as_lineno_1" != "x$as_lineno_2" &&
12706 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
12707 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
12708 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
12709 CONFIG_SHELL=$as_dir/$as_base
12710 export CONFIG_SHELL
12711 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
12712 fi;;
12713 esac
12714 done
12715done
12716;;
12717 esac
12718
12719 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
12720 # uniformly replaced by the line number. The first 'sed' inserts a
12721 # line-number line before each line; the second 'sed' does the real
12722 # work. The second script uses 'N' to pair each line-number line
12723 # with the numbered line, and appends trailing '-' during
12724 # substitution so that $LINENO is not a special case at line end.
12725 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
12726 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
12727 sed '=' <$as_myself |
12728 sed '
12729 N
12730 s,$,-,
12731 : loop
12732 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
12733 t loop
12734 s,-$,,
12735 s,^['$as_cr_digits']*\n,,
12736 ' >$as_me.lineno &&
12737 chmod +x $as_me.lineno ||
12738 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
12739echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
12740 { (exit 1); exit 1; }; }
12741
12742 # Don't try to exec as it changes $[0], causing all sort of problems
12743 # (the dirname of $[0] is not the place where we might find the
12744 # original and so on. Autoconf is especially sensible to this).
12745 . ./$as_me.lineno
12746 # Exit status is that of the last command.
12747 exit
12748}
12749
12750
12751case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
12752 *c*,-n*) ECHO_N= ECHO_C='
12753' ECHO_T=' ' ;;
12754 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
12755 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
12756esac
12757
12758if expr a : '\(a\)' >/dev/null 2>&1; then
12759 as_expr=expr
12760else
12761 as_expr=false
12762fi
12763
12764rm -f conf$$ conf$$.exe conf$$.file
12765echo >conf$$.file
12766if ln -s conf$$.file conf$$ 2>/dev/null; then
12767 # We could just check for DJGPP; but this test a) works b) is more generic
12768 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
12769 if test -f conf$$.exe; then
12770 # Don't use ln at all; we don't have any links
12771 as_ln_s='cp -p'
6e3f3080 12772 else
ba479fd2 12773 as_ln_s='ln -s'
6e3f3080 12774 fi
ba479fd2
NN
12775elif ln conf$$.file conf$$ 2>/dev/null; then
12776 as_ln_s=ln
12777else
12778 as_ln_s='cp -p'
12779fi
12780rm -f conf$$ conf$$.exe conf$$.file
12781
12782if mkdir -p . 2>/dev/null; then
12783 as_mkdir_p=:
12784else
86da66b5 12785 test -d ./-p && rmdir ./-p
ba479fd2
NN
12786 as_mkdir_p=false
12787fi
12788
12789as_executable_p="test -f"
12790
12791# Sed expression to map a string onto a valid CPP name.
86da66b5 12792as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
12793
12794# Sed expression to map a string onto a valid variable name.
86da66b5 12795as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
12796
12797
12798# IFS
12799# We need space, tab and new line, in precisely that order.
12800as_nl='
12801'
12802IFS=" $as_nl"
12803
12804# CDPATH.
12805$as_unset CDPATH
12806
12807exec 6>&1
12808
12809# Open the log real soon, to keep \$[0] and so on meaningful, and to
12810# report actual input values of CONFIG_FILES etc. instead of their
12811# values after options handling. Logging --version etc. is OK.
12812exec 5>>config.log
12813{
12814 echo
12815 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
12816## Running $as_me. ##
12817_ASBOX
12818} >&5
12819cat >&5 <<_CSEOF
12820
12821This file was extended by $as_me, which was
8ab705be 12822generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
12823
12824 CONFIG_FILES = $CONFIG_FILES
12825 CONFIG_HEADERS = $CONFIG_HEADERS
12826 CONFIG_LINKS = $CONFIG_LINKS
12827 CONFIG_COMMANDS = $CONFIG_COMMANDS
12828 $ $0 $@
12829
12830_CSEOF
12831echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
12832echo >&5
12833_ACEOF
12834
12835# Files that config.status was made for.
12836if test -n "$ac_config_files"; then
12837 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12838fi
12839
12840if test -n "$ac_config_headers"; then
12841 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12842fi
12843
12844if test -n "$ac_config_links"; then
12845 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12846fi
12847
12848if test -n "$ac_config_commands"; then
12849 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12850fi
12851
12852cat >>$CONFIG_STATUS <<\_ACEOF
12853
12854ac_cs_usage="\
12855\`$as_me' instantiates files from templates according to the
12856current configuration.
12857
12858Usage: $0 [OPTIONS] [FILE]...
12859
12860 -h, --help print this help, then exit
12861 -V, --version print version number, then exit
12862 -q, --quiet do not print progress messages
12863 -d, --debug don't remove temporary files
12864 --recheck update $as_me by reconfiguring in the same conditions
12865 --file=FILE[:TEMPLATE]
86da66b5 12866 instantiate the configuration file FILE
ba479fd2 12867 --header=FILE[:TEMPLATE]
86da66b5 12868 instantiate the configuration header FILE
ba479fd2
NN
12869
12870Configuration files:
12871$config_files
12872
12873Configuration headers:
12874$config_headers
12875
12876Configuration commands:
12877$config_commands
12878
12879Report bugs to <bug-autoconf@gnu.org>."
12880_ACEOF
12881
12882cat >>$CONFIG_STATUS <<_ACEOF
12883ac_cs_version="\\
12884config.status
8ab705be 12885configured by $0, generated by GNU Autoconf 2.59,
ba479fd2
NN
12886 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12887
86da66b5 12888Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
12889This config.status script is free software; the Free Software Foundation
12890gives unlimited permission to copy, distribute and modify it."
12891srcdir=$srcdir
12892_ACEOF
12893
12894cat >>$CONFIG_STATUS <<\_ACEOF
12895# If no file are specified by the user, then we need to provide default
12896# value. By we need to know if files were specified by the user.
12897ac_need_defaults=:
12898while test $# != 0
12899do
12900 case $1 in
12901 --*=*)
12902 ac_option=`expr "x$1" : 'x\([^=]*\)='`
12903 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12904 ac_shift=:
12905 ;;
12906 -*)
12907 ac_option=$1
12908 ac_optarg=$2
12909 ac_shift=shift
12910 ;;
12911 *) # This is not an option, so the user has probably given explicit
12912 # arguments.
12913 ac_option=$1
12914 ac_need_defaults=false;;
12915 esac
12916
12917 case $ac_option in
12918 # Handling of the options.
12919_ACEOF
12920cat >>$CONFIG_STATUS <<\_ACEOF
12921 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12922 ac_cs_recheck=: ;;
12923 --version | --vers* | -V )
12924 echo "$ac_cs_version"; exit 0 ;;
12925 --he | --h)
12926 # Conflict between --help and --header
12927 { { echo "$as_me:$LINENO: error: ambiguous option: $1
12928Try \`$0 --help' for more information." >&5
12929echo "$as_me: error: ambiguous option: $1
12930Try \`$0 --help' for more information." >&2;}
12931 { (exit 1); exit 1; }; };;
12932 --help | --hel | -h )
12933 echo "$ac_cs_usage"; exit 0 ;;
12934 --debug | --d* | -d )
12935 debug=: ;;
12936 --file | --fil | --fi | --f )
12937 $ac_shift
12938 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
12939 ac_need_defaults=false;;
12940 --header | --heade | --head | --hea )
12941 $ac_shift
12942 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
12943 ac_need_defaults=false;;
12944 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12945 | -silent | --silent | --silen | --sile | --sil | --si | --s)
12946 ac_cs_silent=: ;;
12947
12948 # This is an error.
12949 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
12950Try \`$0 --help' for more information." >&5
12951echo "$as_me: error: unrecognized option: $1
12952Try \`$0 --help' for more information." >&2;}
12953 { (exit 1); exit 1; }; } ;;
12954
12955 *) ac_config_targets="$ac_config_targets $1" ;;
12956
12957 esac
12958 shift
6e3f3080 12959done
ba479fd2
NN
12960
12961ac_configure_extra_args=
12962
12963if $ac_cs_silent; then
12964 exec 6>/dev/null
12965 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
12966fi
12967
ba479fd2
NN
12968_ACEOF
12969cat >>$CONFIG_STATUS <<_ACEOF
12970if \$ac_cs_recheck; then
12971 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
12972 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12973fi
861bb6c1 12974
ba479fd2
NN
12975_ACEOF
12976
12977cat >>$CONFIG_STATUS <<_ACEOF
12978#
12979# INIT-COMMANDS section.
12980#
12981
12982subdirs='$subdirs'
12983symbolic_link='$symbolic_link'
12984
12985
12986_ACEOF
12987
12988
12989
12990cat >>$CONFIG_STATUS <<\_ACEOF
12991for ac_config_target in $ac_config_targets
12992do
12993 case "$ac_config_target" in
12994 # Handling of arguments.
12995 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
12996 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12997 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
12998 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
12999echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
13000 { (exit 1); exit 1; }; };;
861bb6c1 13001 esac
ba479fd2
NN
13002done
13003
13004# If the user did not use the arguments to specify the items to instantiate,
13005# then the envvar interface is used. Set only those that are not.
13006# We use the long form for the default assignment because of an extremely
13007# bizarre bug on SunOS 4.1.3.
13008if $ac_need_defaults; then
13009 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
13010 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
13011 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
13012fi
13013
13014# Have a temporary directory for convenience. Make it in the build tree
13015# simply because there is no reason to put it here, and in addition,
13016# creating and moving files from /tmp can sometimes cause problems.
13017# Create a temporary directory, and hook for its removal unless debugging.
13018$debug ||
13019{
13020 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
13021 trap '{ (exit 1); exit 1; }' 1 2 13 15
13022}
861bb6c1 13023
ba479fd2 13024# Create a (secure) tmp directory for tmp files.
6e3f3080 13025
ba479fd2
NN
13026{
13027 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
13028 test -n "$tmp" && test -d "$tmp"
13029} ||
13030{
13031 tmp=./confstat$$-$RANDOM
13032 (umask 077 && mkdir $tmp)
13033} ||
13034{
13035 echo "$me: cannot create a temporary directory in ." >&2
13036 { (exit 1); exit 1; }
13037}
13038
13039_ACEOF
13040
13041cat >>$CONFIG_STATUS <<_ACEOF
13042
13043#
13044# CONFIG_FILES section.
13045#
13046
13047# No need to generate the scripts if there are no CONFIG_FILES.
13048# This happens for instance when ./config.status config.h
13049if test -n "\$CONFIG_FILES"; then
13050 # Protect against being on the right side of a sed subst in config.status.
13051 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
13052 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
13053s,@SHELL@,$SHELL,;t t
13054s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
13055s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
13056s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
13057s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
13058s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
13059s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
13060s,@exec_prefix@,$exec_prefix,;t t
13061s,@prefix@,$prefix,;t t
13062s,@program_transform_name@,$program_transform_name,;t t
13063s,@bindir@,$bindir,;t t
13064s,@sbindir@,$sbindir,;t t
13065s,@libexecdir@,$libexecdir,;t t
13066s,@datadir@,$datadir,;t t
13067s,@sysconfdir@,$sysconfdir,;t t
13068s,@sharedstatedir@,$sharedstatedir,;t t
13069s,@localstatedir@,$localstatedir,;t t
13070s,@libdir@,$libdir,;t t
13071s,@includedir@,$includedir,;t t
13072s,@oldincludedir@,$oldincludedir,;t t
13073s,@infodir@,$infodir,;t t
13074s,@mandir@,$mandir,;t t
13075s,@build_alias@,$build_alias,;t t
13076s,@host_alias@,$host_alias,;t t
13077s,@target_alias@,$target_alias,;t t
13078s,@DEFS@,$DEFS,;t t
13079s,@ECHO_C@,$ECHO_C,;t t
13080s,@ECHO_N@,$ECHO_N,;t t
13081s,@ECHO_T@,$ECHO_T,;t t
13082s,@LIBS@,$LIBS,;t t
13083s,@build@,$build,;t t
13084s,@build_cpu@,$build_cpu,;t t
13085s,@build_vendor@,$build_vendor,;t t
13086s,@build_os@,$build_os,;t t
13087s,@host@,$host,;t t
13088s,@host_cpu@,$host_cpu,;t t
13089s,@host_vendor@,$host_vendor,;t t
13090s,@host_os@,$host_os,;t t
13091s,@target@,$target,;t t
13092s,@target_cpu@,$target_cpu,;t t
13093s,@target_vendor@,$target_vendor,;t t
13094s,@target_os@,$target_os,;t t
392765bf 13095s,@target_noncanonical@,$target_noncanonical,;t t
ba479fd2
NN
13096s,@build_subdir@,$build_subdir,;t t
13097s,@host_subdir@,$host_subdir,;t t
13098s,@target_subdir@,$target_subdir,;t t
03787dfd 13099s,@GENINSRC@,$GENINSRC,;t t
ba479fd2
NN
13100s,@CC@,$CC,;t t
13101s,@CFLAGS@,$CFLAGS,;t t
13102s,@LDFLAGS@,$LDFLAGS,;t t
13103s,@CPPFLAGS@,$CPPFLAGS,;t t
13104s,@ac_ct_CC@,$ac_ct_CC,;t t
13105s,@EXEEXT@,$EXEEXT,;t t
13106s,@OBJEXT@,$OBJEXT,;t t
13107s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
13108s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
13109s,@CPP@,$CPP,;t t
ba479fd2
NN
13110s,@strict1_warn@,$strict1_warn,;t t
13111s,@warn_cflags@,$warn_cflags,;t t
13112s,@WERROR@,$WERROR,;t t
13113s,@nocommon_flag@,$nocommon_flag,;t t
13f05fd0 13114s,@TREEBROWSER@,$TREEBROWSER,;t t
ba479fd2
NN
13115s,@EGREP@,$EGREP,;t t
13116s,@valgrind_path@,$valgrind_path,;t t
13117s,@valgrind_path_defines@,$valgrind_path_defines,;t t
13118s,@valgrind_command@,$valgrind_command,;t t
13119s,@coverage_flags@,$coverage_flags,;t t
13120s,@enable_multilib@,$enable_multilib,;t t
13121s,@enable_shared@,$enable_shared,;t t
13122s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
13123s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
13124s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
13125s,@onestep@,$onestep,;t t
13126s,@SET_MAKE@,$SET_MAKE,;t t
13127s,@AWK@,$AWK,;t t
ba479fd2 13128s,@LN_S@,$LN_S,;t t
41e622a8 13129s,@LN@,$LN,;t t
ba479fd2
NN
13130s,@RANLIB@,$RANLIB,;t t
13131s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
343a6100 13132s,@ranlib_flags@,$ranlib_flags,;t t
ba479fd2
NN
13133s,@INSTALL@,$INSTALL,;t t
13134s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
13135s,@INSTALL_DATA@,$INSTALL_DATA,;t t
13136s,@make_compare_target@,$make_compare_target,;t t
13137s,@have_mktemp_command@,$have_mktemp_command,;t t
13138s,@MAKEINFO@,$MAKEINFO,;t t
13139s,@BUILD_INFO@,$BUILD_INFO,;t t
13140s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
13141s,@FLEX@,$FLEX,;t t
13142s,@BISON@,$BISON,;t t
f6a874ac
JW
13143s,@NM@,$NM,;t t
13144s,@AR@,$AR,;t t
ba479fd2
NN
13145s,@stage1_cflags@,$stage1_cflags,;t t
13146s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
13147s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
13148s,@LDEXP_LIB@,$LDEXP_LIB,;t t
13149s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
13150s,@LIBICONV@,$LIBICONV,;t t
13151s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
13152s,@manext@,$manext,;t t
13153s,@objext@,$objext,;t t
8bb915b6 13154s,@gthread_flags@,$gthread_flags,;t t
ba479fd2
NN
13155s,@extra_modes_file@,$extra_modes_file,;t t
13156s,@FORBUILD@,$FORBUILD,;t t
13157s,@PACKAGE@,$PACKAGE,;t t
13158s,@VERSION@,$VERSION,;t t
13159s,@USE_NLS@,$USE_NLS,;t t
13160s,@LIBINTL@,$LIBINTL,;t t
13161s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
13162s,@INCINTL@,$INCINTL,;t t
13163s,@XGETTEXT@,$XGETTEXT,;t t
13164s,@GMSGFMT@,$GMSGFMT,;t t
13165s,@POSUB@,$POSUB,;t t
13166s,@CATALOGS@,$CATALOGS,;t t
13167s,@CROSS@,$CROSS,;t t
13168s,@ALL@,$ALL,;t t
13169s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
13170s,@inhibit_libc@,$inhibit_libc,;t t
ba479fd2
NN
13171s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
13172s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
13173s,@STMP_FIXINC@,$STMP_FIXINC,;t t
13174s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
c38f02df 13175s,@collect2@,$collect2,;t t
ba479fd2 13176s,@libgcc_visibility@,$libgcc_visibility,;t t
ba479fd2
NN
13177s,@GGC@,$GGC,;t t
13178s,@zlibdir@,$zlibdir,;t t
13179s,@zlibinc@,$zlibinc,;t t
13180s,@MAINT@,$MAINT,;t t
6de9cd9a
DN
13181s,@ANDER@,$ANDER,;t t
13182s,@BANSHEEINC@,$BANSHEEINC,;t t
13183s,@BANSHEELIB@,$BANSHEELIB,;t t
ba479fd2
NN
13184s,@gcc_tooldir@,$gcc_tooldir,;t t
13185s,@dollar@,$dollar,;t t
13186s,@slibdir@,$slibdir,;t t
13187s,@objdir@,$objdir,;t t
13188s,@subdirs@,$subdirs,;t t
13189s,@srcdir@,$srcdir,;t t
ba479fd2
NN
13190s,@all_boot_languages@,$all_boot_languages,;t t
13191s,@all_compilers@,$all_compilers,;t t
13192s,@all_gtfiles@,$all_gtfiles,;t t
13193s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
13194s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
13195s,@all_lang_makefrags@,$all_lang_makefrags,;t t
13196s,@all_lang_makefiles@,$all_lang_makefiles,;t t
13197s,@all_languages@,$all_languages,;t t
13198s,@all_stagestuff@,$all_stagestuff,;t t
13199s,@build_exeext@,$build_exeext,;t t
13200s,@build_install_headers_dir@,$build_install_headers_dir,;t t
13201s,@build_xm_file_list@,$build_xm_file_list,;t t
13202s,@build_xm_include_list@,$build_xm_include_list,;t t
13203s,@build_xm_defines@,$build_xm_defines,;t t
13204s,@check_languages@,$check_languages,;t t
13205s,@cc_set_by_configure@,$cc_set_by_configure,;t t
13206s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
13207s,@cpp_install_dir@,$cpp_install_dir,;t t
13208s,@xmake_file@,$xmake_file,;t t
13209s,@tmake_file@,$tmake_file,;t t
30500d84 13210s,@extra_gcc_objs@,$extra_gcc_objs,;t t
ba479fd2
NN
13211s,@extra_headers_list@,$extra_headers_list,;t t
13212s,@extra_objs@,$extra_objs,;t t
13213s,@extra_parts@,$extra_parts,;t t
13214s,@extra_passes@,$extra_passes,;t t
13215s,@extra_programs@,$extra_programs,;t t
13216s,@float_h_file@,$float_h_file,;t t
13217s,@gcc_config_arguments@,$gcc_config_arguments,;t t
13218s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
13219s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
13220s,@gcc_version@,$gcc_version,;t t
13221s,@gcc_version_full@,$gcc_version_full,;t t
13222s,@gcc_version_trigger@,$gcc_version_trigger,;t t
13223s,@host_exeext@,$host_exeext,;t t
ba479fd2
NN
13224s,@host_xm_file_list@,$host_xm_file_list,;t t
13225s,@host_xm_include_list@,$host_xm_include_list,;t t
13226s,@host_xm_defines@,$host_xm_defines,;t t
13227s,@out_host_hook_obj@,$out_host_hook_obj,;t t
13228s,@install@,$install,;t t
13229s,@lang_opt_files@,$lang_opt_files,;t t
13230s,@lang_specs_files@,$lang_specs_files,;t t
13231s,@lang_tree_files@,$lang_tree_files,;t t
13232s,@local_prefix@,$local_prefix,;t t
13233s,@md_file@,$md_file,;t t
13234s,@objc_boehm_gc@,$objc_boehm_gc,;t t
13235s,@out_file@,$out_file,;t t
13236s,@out_object_file@,$out_object_file,;t t
13237s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
13238s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
13239s,@symbolic_link@,$symbolic_link,;t t
13240s,@thread_file@,$thread_file,;t t
13241s,@tm_file_list@,$tm_file_list,;t t
13242s,@tm_include_list@,$tm_include_list,;t t
13243s,@tm_defines@,$tm_defines,;t t
13244s,@tm_p_file_list@,$tm_p_file_list,;t t
13245s,@tm_p_include_list@,$tm_p_include_list,;t t
13246s,@xm_file_list@,$xm_file_list,;t t
13247s,@xm_include_list@,$xm_include_list,;t t
13248s,@xm_defines@,$xm_defines,;t t
ba479fd2
NN
13249s,@c_target_objs@,$c_target_objs,;t t
13250s,@cxx_target_objs@,$cxx_target_objs,;t t
13251s,@target_cpu_default@,$target_cpu_default,;t t
6de9cd9a
DN
13252s,@GMPLIBS@,$GMPLIBS,;t t
13253s,@GMPINC@,$GMPINC,;t t
ba479fd2
NN
13254s,@LIBOBJS@,$LIBOBJS,;t t
13255s,@LTLIBOBJS@,$LTLIBOBJS,;t t
13256/@language_hooks@/r $language_hooks
13257s,@language_hooks@,,;t t
13258CEOF
13259
13260_ACEOF
13261
13262 cat >>$CONFIG_STATUS <<\_ACEOF
13263 # Split the substitutions into bite-sized pieces for seds with
13264 # small command number limits, like on Digital OSF/1 and HP-UX.
13265 ac_max_sed_lines=48
13266 ac_sed_frag=1 # Number of current file.
13267 ac_beg=1 # First line for current file.
13268 ac_end=$ac_max_sed_lines # Line after last line for current file.
13269 ac_more_lines=:
13270 ac_sed_cmds=
13271 while $ac_more_lines; do
13272 if test $ac_beg -gt 1; then
13273 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
13274 else
13275 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
13276 fi
13277 if test ! -s $tmp/subs.frag; then
13278 ac_more_lines=false
13279 else
13280 # The purpose of the label and of the branching condition is to
13281 # speed up the sed processing (if there are no `@' at all, there
13282 # is no need to browse any of the substitutions).
13283 # These are the two extra sed commands mentioned above.
13284 (echo ':t
13285 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
13286 if test -z "$ac_sed_cmds"; then
86da66b5 13287 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2 13288 else
86da66b5 13289 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2
NN
13290 fi
13291 ac_sed_frag=`expr $ac_sed_frag + 1`
13292 ac_beg=$ac_end
13293 ac_end=`expr $ac_end + $ac_max_sed_lines`
13294 fi
13295 done
13296 if test -z "$ac_sed_cmds"; then
13297 ac_sed_cmds=cat
63cf211a 13298 fi
ba479fd2 13299fi # test -n "$CONFIG_FILES"
cafe096b 13300
ba479fd2
NN
13301_ACEOF
13302cat >>$CONFIG_STATUS <<\_ACEOF
13303for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
13304 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13305 case $ac_file in
13306 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
13307 cat >$tmp/stdin
13308 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13309 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 13310 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 13311 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 13312 * ) ac_file_in=$ac_file.in ;;
63cf211a 13313 esac
cafe096b 13314
ba479fd2
NN
13315 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
13316 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
13317$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
13318 X"$ac_file" : 'X\(//\)[^/]' \| \
13319 X"$ac_file" : 'X\(//\)$' \| \
13320 X"$ac_file" : 'X\(/\)' \| \
13321 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
13322echo X"$ac_file" |
13323 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13324 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13325 /^X\(\/\/\)$/{ s//\1/; q; }
13326 /^X\(\/\).*/{ s//\1/; q; }
13327 s/.*/./; q'`
13328 { if $as_mkdir_p; then
13329 mkdir -p "$ac_dir"
13330 else
13331 as_dir="$ac_dir"
13332 as_dirs=
13333 while test ! -d "$as_dir"; do
13334 as_dirs="$as_dir $as_dirs"
13335 as_dir=`(dirname "$as_dir") 2>/dev/null ||
13336$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
13337 X"$as_dir" : 'X\(//\)[^/]' \| \
13338 X"$as_dir" : 'X\(//\)$' \| \
13339 X"$as_dir" : 'X\(/\)' \| \
13340 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
13341echo X"$as_dir" |
13342 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13343 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13344 /^X\(\/\/\)$/{ s//\1/; q; }
13345 /^X\(\/\).*/{ s//\1/; q; }
13346 s/.*/./; q'`
13347 done
13348 test ! -n "$as_dirs" || mkdir $as_dirs
13349 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
13350echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
13351 { (exit 1); exit 1; }; }; }
6e3f3080 13352
ba479fd2
NN
13353 ac_builddir=.
13354
13355if test "$ac_dir" != .; then
13356 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
13357 # A "../" for each directory in $ac_dir_suffix.
13358 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
13359else
13360 ac_dir_suffix= ac_top_builddir=
13361fi
13362
13363case $srcdir in
13364 .) # No --srcdir option. We are building in place.
13365 ac_srcdir=.
13366 if test -z "$ac_top_builddir"; then
13367 ac_top_srcdir=.
13368 else
13369 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
13370 fi ;;
13371 [\\/]* | ?:[\\/]* ) # Absolute path.
13372 ac_srcdir=$srcdir$ac_dir_suffix;
13373 ac_top_srcdir=$srcdir ;;
13374 *) # Relative path.
13375 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
13376 ac_top_srcdir=$ac_top_builddir$srcdir ;;
13377esac
8ab705be
KC
13378
13379# Do not use `cd foo && pwd` to compute absolute paths, because
13380# the directories may not exist.
13381case `pwd` in
13382.) ac_abs_builddir="$ac_dir";;
86da66b5 13383*)
8ab705be
KC
13384 case "$ac_dir" in
13385 .) ac_abs_builddir=`pwd`;;
13386 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
13387 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
13388 esac;;
13389esac
8ab705be 13390case $ac_abs_builddir in
86da66b5
HPN
13391.) ac_abs_top_builddir=${ac_top_builddir}.;;
13392*)
13393 case ${ac_top_builddir}. in
8ab705be 13394 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 13395 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 13396 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
13397 esac;;
13398esac
8ab705be 13399case $ac_abs_builddir in
86da66b5
HPN
13400.) ac_abs_srcdir=$ac_srcdir;;
13401*)
13402 case $ac_srcdir in
8ab705be 13403 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 13404 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 13405 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
13406 esac;;
13407esac
8ab705be 13408case $ac_abs_builddir in
86da66b5
HPN
13409.) ac_abs_top_srcdir=$ac_top_srcdir;;
13410*)
13411 case $ac_top_srcdir in
8ab705be 13412 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 13413 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 13414 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
13415 esac;;
13416esac
ba479fd2
NN
13417
13418
13419
ba479fd2
NN
13420 # Let's still pretend it is `configure' which instantiates (i.e., don't
13421 # use $as_me), people would be surprised to read:
13422 # /* config.h. Generated by config.status. */
13423 if test x"$ac_file" = x-; then
13424 configure_input=
13425 else
13426 configure_input="$ac_file. "
13427 fi
13428 configure_input=$configure_input"Generated from `echo $ac_file_in |
86da66b5 13429 sed 's,.*/,,'` by configure."
ba479fd2
NN
13430
13431 # First look for the input files in the build tree, otherwise in the
13432 # src tree.
13433 ac_file_inputs=`IFS=:
13434 for f in $ac_file_in; do
13435 case $f in
13436 -) echo $tmp/stdin ;;
13437 [\\/$]*)
86da66b5
HPN
13438 # Absolute (can't be DOS-style, as IFS=:)
13439 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
13440echo "$as_me: error: cannot find input file: $f" >&2;}
13441 { (exit 1); exit 1; }; }
86da66b5 13442 echo "$f";;
ba479fd2 13443 *) # Relative
86da66b5
HPN
13444 if test -f "$f"; then
13445 # Build tree
13446 echo "$f"
13447 elif test -f "$srcdir/$f"; then
13448 # Source tree
13449 echo "$srcdir/$f"
13450 else
13451 # /dev/null tree
13452 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
13453echo "$as_me: error: cannot find input file: $f" >&2;}
13454 { (exit 1); exit 1; }; }
86da66b5 13455 fi;;
ba479fd2
NN
13456 esac
13457 done` || { (exit 1); exit 1; }
fb38008e
BE
13458
13459 if test x"$ac_file" != x-; then
13460 { echo "$as_me:$LINENO: creating $ac_file" >&5
13461echo "$as_me: creating $ac_file" >&6;}
13462 rm -f "$ac_file"
13463 fi
ba479fd2
NN
13464_ACEOF
13465cat >>$CONFIG_STATUS <<_ACEOF
13466 sed "$ac_vpsub
13467$extrasub
13468_ACEOF
13469cat >>$CONFIG_STATUS <<\_ACEOF
13470:t
13471/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13472s,@configure_input@,$configure_input,;t t
13473s,@srcdir@,$ac_srcdir,;t t
13474s,@abs_srcdir@,$ac_abs_srcdir,;t t
13475s,@top_srcdir@,$ac_top_srcdir,;t t
13476s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
13477s,@builddir@,$ac_builddir,;t t
13478s,@abs_builddir@,$ac_abs_builddir,;t t
13479s,@top_builddir@,$ac_top_builddir,;t t
13480s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
13481" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
13482 rm -f $tmp/stdin
13483 if test x"$ac_file" != x-; then
13484 mv $tmp/out $ac_file
13485 else
13486 cat $tmp/out
13487 rm -f $tmp/out
13488 fi
13489
13490done
13491_ACEOF
13492cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 13493
ba479fd2
NN
13494#
13495# CONFIG_HEADER section.
13496#
861bb6c1
JL
13497
13498# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13499# NAME is the cpp macro being defined and VALUE is the value it is being given.
13500#
13501# ac_d sets the value in "#define NAME VALUE" lines.
86da66b5
HPN
13502ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
13503ac_dB='[ ].*$,\1#\2'
ba479fd2
NN
13504ac_dC=' '
13505ac_dD=',;t'
13506# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
86da66b5 13507ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ba479fd2 13508ac_uB='$,\1#\2define\3'
861bb6c1 13509ac_uC=' '
ba479fd2
NN
13510ac_uD=',;t'
13511
13512for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 13513 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
13514 case $ac_file in
13515 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
13516 cat >$tmp/stdin
13517 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13518 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 13519 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 13520 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 13521 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
13522 esac
13523
ba479fd2
NN
13524 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
13525echo "$as_me: creating $ac_file" >&6;}
13526
13527 # First look for the input files in the build tree, otherwise in the
13528 # src tree.
13529 ac_file_inputs=`IFS=:
13530 for f in $ac_file_in; do
13531 case $f in
13532 -) echo $tmp/stdin ;;
13533 [\\/$]*)
86da66b5
HPN
13534 # Absolute (can't be DOS-style, as IFS=:)
13535 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
13536echo "$as_me: error: cannot find input file: $f" >&2;}
13537 { (exit 1); exit 1; }; }
86da66b5
HPN
13538 # Do quote $f, to prevent DOS paths from being IFS'd.
13539 echo "$f";;
ba479fd2 13540 *) # Relative
86da66b5
HPN
13541 if test -f "$f"; then
13542 # Build tree
13543 echo "$f"
13544 elif test -f "$srcdir/$f"; then
13545 # Source tree
13546 echo "$srcdir/$f"
13547 else
13548 # /dev/null tree
13549 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
13550echo "$as_me: error: cannot find input file: $f" >&2;}
13551 { (exit 1); exit 1; }; }
86da66b5 13552 fi;;
ba479fd2
NN
13553 esac
13554 done` || { (exit 1); exit 1; }
13555 # Remove the trailing spaces.
86da66b5 13556 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
ba479fd2
NN
13557
13558_ACEOF
13559
13560# Transform confdefs.h into two sed scripts, `conftest.defines' and
13561# `conftest.undefs', that substitutes the proper values into
13562# config.h.in to produce config.h. The first handles `#define'
13563# templates, and the second `#undef' templates.
13564# And first: Protect against being on the right side of a sed subst in
13565# config.status. Protect against being in an unquoted here document
13566# in config.status.
13567rm -f conftest.defines conftest.undefs
13568# Using a here document instead of a string reduces the quoting nightmare.
13569# Putting comments in sed scripts is not portable.
13570#
13571# `end' is used to avoid that the second main sed command (meant for
13572# 0-ary CPP macros) applies to n-ary macro definitions.
13573# See the Autoconf documentation for `clear'.
13574cat >confdef2sed.sed <<\_ACEOF
13575s/[\\&,]/\\&/g
13576s,[\\$`],\\&,g
13577t clear
13578: clear
86da66b5 13579s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
ba479fd2 13580t end
86da66b5 13581s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
ba479fd2
NN
13582: end
13583_ACEOF
13584# If some macros were called several times there might be several times
13585# the same #defines, which is useless. Nevertheless, we may not want to
13586# sort them, since we want the *last* AC-DEFINE to be honored.
13587uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
13588sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
13589rm -f confdef2sed.sed
861bb6c1
JL
13590
13591# This sed command replaces #undef with comments. This is necessary, for
13592# example, in the case of _POSIX_SOURCE, which is predefined and required
13593# on some systems where configure will not decide to define it.
ba479fd2 13594cat >>conftest.undefs <<\_ACEOF
86da66b5 13595s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
ba479fd2
NN
13596_ACEOF
13597
13598# Break up conftest.defines because some shells have a limit on the size
13599# of here documents, and old seds have small limits too (100 cmds).
13600echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
86da66b5 13601echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
ba479fd2
NN
13602echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
13603echo ' :' >>$CONFIG_STATUS
13604rm -f conftest.tail
13605while grep . conftest.defines >/dev/null
13606do
13607 # Write a limited-size here document to $tmp/defines.sed.
13608 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
13609 # Speed up: don't consider the non `#define' lines.
86da66b5 13610 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
ba479fd2
NN
13611 # Work around the forget-to-reset-the-flag bug.
13612 echo 't clr' >>$CONFIG_STATUS
13613 echo ': clr' >>$CONFIG_STATUS
13614 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
13615 echo 'CEOF
13616 sed -f $tmp/defines.sed $tmp/in >$tmp/out
13617 rm -f $tmp/in
13618 mv $tmp/out $tmp/in
13619' >>$CONFIG_STATUS
13620 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
13621 rm -f conftest.defines
13622 mv conftest.tail conftest.defines
13623done
13624rm -f conftest.defines
13625echo ' fi # grep' >>$CONFIG_STATUS
13626echo >>$CONFIG_STATUS
861bb6c1 13627
ba479fd2
NN
13628# Break up conftest.undefs because some shells have a limit on the size
13629# of here documents, and old seds have small limits too (100 cmds).
13630echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 13631rm -f conftest.tail
ba479fd2 13632while grep . conftest.undefs >/dev/null
861bb6c1 13633do
ba479fd2
NN
13634 # Write a limited-size here document to $tmp/undefs.sed.
13635 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
13636 # Speed up: don't consider the non `#undef'
86da66b5 13637 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
ba479fd2
NN
13638 # Work around the forget-to-reset-the-flag bug.
13639 echo 't clr' >>$CONFIG_STATUS
13640 echo ': clr' >>$CONFIG_STATUS
13641 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 13642 echo 'CEOF
ba479fd2
NN
13643 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
13644 rm -f $tmp/in
13645 mv $tmp/out $tmp/in
13646' >>$CONFIG_STATUS
13647 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
13648 rm -f conftest.undefs
13649 mv conftest.tail conftest.undefs
861bb6c1 13650done
ba479fd2
NN
13651rm -f conftest.undefs
13652
13653cat >>$CONFIG_STATUS <<\_ACEOF
13654 # Let's still pretend it is `configure' which instantiates (i.e., don't
13655 # use $as_me), people would be surprised to read:
13656 # /* config.h. Generated by config.status. */
13657 if test x"$ac_file" = x-; then
13658 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 13659 else
ba479fd2 13660 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 13661 fi
ba479fd2
NN
13662 cat $tmp/in >>$tmp/config.h
13663 rm -f $tmp/in
13664 if test x"$ac_file" != x-; then
13665 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
13666 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
13667echo "$as_me: $ac_file is unchanged" >&6;}
13668 else
13669 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
13670$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
13671 X"$ac_file" : 'X\(//\)[^/]' \| \
13672 X"$ac_file" : 'X\(//\)$' \| \
13673 X"$ac_file" : 'X\(/\)' \| \
13674 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
13675echo X"$ac_file" |
13676 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13677 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13678 /^X\(\/\/\)$/{ s//\1/; q; }
13679 /^X\(\/\).*/{ s//\1/; q; }
13680 s/.*/./; q'`
13681 { if $as_mkdir_p; then
13682 mkdir -p "$ac_dir"
13683 else
13684 as_dir="$ac_dir"
13685 as_dirs=
13686 while test ! -d "$as_dir"; do
13687 as_dirs="$as_dir $as_dirs"
13688 as_dir=`(dirname "$as_dir") 2>/dev/null ||
13689$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
13690 X"$as_dir" : 'X\(//\)[^/]' \| \
13691 X"$as_dir" : 'X\(//\)$' \| \
13692 X"$as_dir" : 'X\(/\)' \| \
13693 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
13694echo X"$as_dir" |
13695 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13696 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13697 /^X\(\/\/\)$/{ s//\1/; q; }
13698 /^X\(\/\).*/{ s//\1/; q; }
13699 s/.*/./; q'`
13700 done
13701 test ! -n "$as_dirs" || mkdir $as_dirs
13702 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
13703echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
13704 { (exit 1); exit 1; }; }; }
63cf211a 13705
ba479fd2
NN
13706 rm -f $ac_file
13707 mv $tmp/config.h $ac_file
13708 fi
13709 else
13710 cat $tmp/config.h
13711 rm -f $tmp/config.h
13712 fi
13713done
13714_ACEOF
13715cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 13716
ba479fd2
NN
13717#
13718# CONFIG_COMMANDS section.
13719#
13720for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
13721 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
13722 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
13723 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
13724$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
13725 X"$ac_dest" : 'X\(//\)[^/]' \| \
13726 X"$ac_dest" : 'X\(//\)$' \| \
13727 X"$ac_dest" : 'X\(/\)' \| \
13728 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
13729echo X"$ac_dest" |
13730 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13731 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13732 /^X\(\/\/\)$/{ s//\1/; q; }
13733 /^X\(\/\).*/{ s//\1/; q; }
13734 s/.*/./; q'`
86da66b5
HPN
13735 { if $as_mkdir_p; then
13736 mkdir -p "$ac_dir"
13737 else
13738 as_dir="$ac_dir"
13739 as_dirs=
13740 while test ! -d "$as_dir"; do
13741 as_dirs="$as_dir $as_dirs"
13742 as_dir=`(dirname "$as_dir") 2>/dev/null ||
13743$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13744 X"$as_dir" : 'X\(//\)[^/]' \| \
13745 X"$as_dir" : 'X\(//\)$' \| \
13746 X"$as_dir" : 'X\(/\)' \| \
13747 . : '\(.\)' 2>/dev/null ||
13748echo X"$as_dir" |
13749 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13750 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13751 /^X\(\/\/\)$/{ s//\1/; q; }
13752 /^X\(\/\).*/{ s//\1/; q; }
13753 s/.*/./; q'`
13754 done
13755 test ! -n "$as_dirs" || mkdir $as_dirs
13756 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
13757echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
13758 { (exit 1); exit 1; }; }; }
13759
ba479fd2
NN
13760 ac_builddir=.
13761
13762if test "$ac_dir" != .; then
13763 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
13764 # A "../" for each directory in $ac_dir_suffix.
13765 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
13766else
13767 ac_dir_suffix= ac_top_builddir=
13768fi
13769
13770case $srcdir in
13771 .) # No --srcdir option. We are building in place.
13772 ac_srcdir=.
13773 if test -z "$ac_top_builddir"; then
13774 ac_top_srcdir=.
13775 else
13776 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
13777 fi ;;
13778 [\\/]* | ?:[\\/]* ) # Absolute path.
13779 ac_srcdir=$srcdir$ac_dir_suffix;
13780 ac_top_srcdir=$srcdir ;;
13781 *) # Relative path.
13782 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
13783 ac_top_srcdir=$ac_top_builddir$srcdir ;;
13784esac
8ab705be
KC
13785
13786# Do not use `cd foo && pwd` to compute absolute paths, because
13787# the directories may not exist.
13788case `pwd` in
13789.) ac_abs_builddir="$ac_dir";;
86da66b5 13790*)
8ab705be
KC
13791 case "$ac_dir" in
13792 .) ac_abs_builddir=`pwd`;;
13793 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
13794 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
13795 esac;;
13796esac
8ab705be 13797case $ac_abs_builddir in
86da66b5
HPN
13798.) ac_abs_top_builddir=${ac_top_builddir}.;;
13799*)
13800 case ${ac_top_builddir}. in
8ab705be 13801 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 13802 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 13803 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
13804 esac;;
13805esac
8ab705be 13806case $ac_abs_builddir in
86da66b5
HPN
13807.) ac_abs_srcdir=$ac_srcdir;;
13808*)
13809 case $ac_srcdir in
8ab705be 13810 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 13811 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 13812 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
13813 esac;;
13814esac
8ab705be 13815case $ac_abs_builddir in
86da66b5
HPN
13816.) ac_abs_top_srcdir=$ac_top_srcdir;;
13817*)
13818 case $ac_top_srcdir in
8ab705be 13819 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 13820 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 13821 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
13822 esac;;
13823esac
ba479fd2
NN
13824
13825
13826 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
13827echo "$as_me: executing $ac_dest commands" >&6;}
13828 case $ac_dest in
13829 default )
f1faaabd
NN
13830case ${CONFIG_HEADERS} in
13831 *auto-host.h:config.in*)
13832 echo > cstamp-h ;;
861bb6c1 13833esac
2ed26f6b 13834# Make sure all the subdirs exist.
c406e779 13835for d in $subdirs
2ed26f6b 13836do
2ed26f6b 13837 test -d $d || mkdir $d
2ed26f6b 13838done
93cf819d
BK
13839# If the host supports symlinks, point stage[1234] at ../stage[1234] so
13840# bootstrapping and the installation procedure can still use
13841# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
13842# FLAGS_TO_PASS has been modified to solve the problem there.
13843# This is virtually a duplicate of what happens in configure.lang; we do
13844# an extra check to make sure this only happens if ln -s can be used.
75bffa71 13845if test "$symbolic_link" = "ln -s"; then
c406e779 13846 for d in ${subdirs} fixinc ; do
1e6347d8 13847 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 13848 cd $d
6a1b7268 13849 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
13850 do
13851 rm -f $t
13852 $symbolic_link ../$t $t 2>/dev/null
13853 done
13854 cd $STARTDIR
93cf819d
BK
13855 done
13856else true ; fi
ba479fd2
NN
13857 ;;
13858 esac
13859done
13860_ACEOF
cafe096b 13861
ba479fd2
NN
13862cat >>$CONFIG_STATUS <<\_ACEOF
13863
13864{ (exit 0); exit 0; }
13865_ACEOF
861bb6c1 13866chmod +x $CONFIG_STATUS
ba479fd2
NN
13867ac_clean_files=$ac_clean_files_save
13868
13869
13870# configure is writing to config.log, and then calls config.status.
13871# config.status does its own redirection, appending to config.log.
13872# Unfortunately, on DOS this fails, as config.log is still kept open
13873# by configure, so config.status won't be able to write to it; its
13874# output is simply discarded. So we exec the FD to /dev/null,
13875# effectively closing config.log, so it can be properly (re)opened and
13876# appended to by config.status. When coming back to configure, we
13877# need to make the FD available again.
13878if test "$no_create" != yes; then
13879 ac_cs_success=:
13880 ac_config_status_args=
13881 test "$silent" = yes &&
13882 ac_config_status_args="$ac_config_status_args --quiet"
13883 exec 5>/dev/null
13884 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13885 exec 5>>config.log
13886 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13887 # would make configure fail if this is the last instruction.
13888 $ac_cs_success || { (exit 1); exit 1; }
13889fi
861bb6c1 13890