]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
Daily bump.
[thirdparty/gcc.git] / gcc / configure
CommitLineData
005537df 1#! /bin/sh
861bb6c1 2# Guess values for system-dependent variables and create Makefiles.
a3bba767 3# Generated by GNU Autoconf 2.59.
861bb6c1 4#
a3bba767 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
a3bba767 12# Be Bourne compatible
ba479fd2
NN
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+"$@"}'='"$@"'
a3bba767
JJ
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
ba479fd2 21fi
a3bba767 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.
a3bba767 33$as_unset ENV MAIL MAILPATH
ba479fd2
NN
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
a3bba767 47 $as_unset $as_var
ba479fd2
NN
48 fi
49done
50
51# Required to use basename.
a3bba767 52if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
53 as_expr=expr
54else
55 as_expr=false
56fi
57
a3bba767 58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
ba479fd2
NN
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
a3bba767 66as_me=`$as_basename "$0" ||
ba479fd2
NN
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
a3bba767
JJ
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
ba479fd2 71echo X/"$0" |
a3bba767
JJ
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
ba479fd2 76
a6ccdbab 77
a3bba767
JJ
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
703d89ab 85
a3bba767
JJ
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
703d89ab
ZW
97fi
98
703d89ab 99
a3bba767
JJ
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
703d89ab 116
a3bba767
JJ
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 '')
ba479fd2 130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
dd7f7a6e 131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
ba479fd2
NN
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
a3bba767
JJ
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
ba479fd2 137 /*)
a3bba767 138 if ("$as_dir/$as_base" -c '
703d89ab
ZW
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
a3bba767 141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
703d89ab 142 test "x$as_lineno_1" != "x$as_lineno_2" &&
a3bba767
JJ
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
ba479fd2
NN
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
a3bba767
JJ
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.
ba479fd2 162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
a3bba767
JJ
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
ba479fd2
NN
165 sed '
166 N
a3bba767
JJ
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
ba479fd2 170 t loop
a3bba767
JJ
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
ba479fd2 173 ' >$as_me.lineno &&
a3bba767 174 chmod +x $as_me.lineno ||
ba479fd2
NN
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
a3bba767
JJ
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
ba479fd2
NN
182 # Exit status is that of the last command.
183 exit
184}
185
186
a3bba767
JJ
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= ;;
ba479fd2
NN
192esac
193
a3bba767 194if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
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
a3bba767
JJ
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
ba479fd2 207 as_ln_s='cp -p'
a3bba767
JJ
208 else
209 as_ln_s='ln -s'
210 fi
ba479fd2
NN
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
a3bba767 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
a3bba767 225as_executable_p="test -f"
ba479fd2
NN
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
a3bba767
JJ
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
ba479fd2
NN
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
a3bba767
JJ
249exec 6>&1
250
ba479fd2
NN
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
a3bba767
JJ
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
ba479fd2
NN
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>
a3bba767 278#if HAVE_SYS_TYPES_H
ba479fd2
NN
279# include <sys/types.h>
280#endif
a3bba767 281#if HAVE_SYS_STAT_H
ba479fd2
NN
282# include <sys/stat.h>
283#endif
a3bba767 284#if STDC_HEADERS
ba479fd2
NN
285# include <stdlib.h>
286# include <stddef.h>
287#else
a3bba767 288# if HAVE_STDLIB_H
ba479fd2
NN
289# include <stdlib.h>
290# endif
291#endif
a3bba767
JJ
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
ba479fd2
NN
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
a3bba767 298#if HAVE_STRINGS_H
ba479fd2
NN
299# include <strings.h>
300#endif
a3bba767 301#if HAVE_INTTYPES_H
ba479fd2 302# include <inttypes.h>
a3bba767
JJ
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
ba479fd2 307#endif
a3bba767 308#if HAVE_UNISTD_H
ba479fd2
NN
309# include <unistd.h>
310#endif"
311
a3bba767 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_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict_warn cxx_compat_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep datarootdir docdir htmldir 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 COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages 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 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 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'
a3bba767 343datadir='${prefix}/share'
861bb6c1
JL
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
a3bba767 347libdir='${exec_prefix}/lib'
861bb6c1
JL
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
a3bba767
JJ
350infodir='${prefix}/info'
351mandir='${prefix}/man'
861bb6c1 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
a3bba767 358 eval "$ac_prev=\$ac_option"
861bb6c1
JL
359 ac_prev=
360 continue
361 fi
362
a3bba767 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
861bb6c1
JL
364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
a3bba767 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 388
a3bba767 389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
861bb6c1 390 ac_prev=datadir ;;
a3bba767
JJ
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.
a3bba767 398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
a3bba767
JJ
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.
a3bba767 407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
a3bba767
JJ
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
413 *) ac_optarg=yes ;;
414 esac
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 \
a3bba767
JJ
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
861bb6c1
JL
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
a3bba767
JJ
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.
a3bba767 589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
a3bba767
JJ
592 ac_package=`echo $ac_package| sed 's/-/_/g'`
593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
595 *) ac_optarg=yes ;;
596 esac
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.
a3bba767 602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
a3bba767
JJ
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; }; }
a3bba767
JJ
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
ba479fd2
NN
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
a3bba767
JJ
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
861bb6c1 660do
a3bba767 661 eval ac_val=$`echo $ac_var`
ba479fd2 662 case $ac_val in
a3bba767
JJ
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
8b1f719a
PB
666 esac
667done
668
a3bba767
JJ
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671 localstatedir libdir includedir oldincludedir infodir mandir
672do
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; }; };;
678 esac
679done
680
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
ba479fd2
NN
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
a3bba767
JJ
708 # Try the directory containing this script, then its parent.
709 ac_confdir=`(dirname "$0") 2>/dev/null ||
ba479fd2 710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
a3bba767
JJ
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
ba479fd2 715echo X"$0" |
a3bba767
JJ
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 721 srcdir=$ac_confdir
a3bba767 722 if test ! -r $srcdir/$ac_unique_file; then
861bb6c1
JL
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
a3bba767
JJ
728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
732 else
733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
ba479fd2 734 { (exit 1); exit 1; }; }
a3bba767 735 fi
dd7f7a6e 736fi
a3bba767
JJ
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
dd7f7a6e 739 { (exit 1); exit 1; }; }
a3bba767
JJ
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
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
a3bba767
JJ
809_ACEOF
810
811 cat <<_ACEOF
ba479fd2
NN
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]
a3bba767 829 --datadir=DIR read-only architecture-independent data [PREFIX/share]
ba479fd2
NN
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]
a3bba767
JJ
836 --infodir=DIR info documentation [PREFIX/info]
837 --mandir=DIR man documentation [PREFIX/man]
ba479fd2 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-checking=LIST
867 enable expensive run-time checks. With LIST,
868 enable only specific categories of checks.
cdce5c16
NS
869 Categories are: yes,no,all,none,release.
870 Flags are: assert,fold,gc,gcac,misc,
871 rtlflag,rtl,runtime,tree,valgrind.
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++
79b87c74
MM
882 --enable-decimal-float={no,yes,bid,dpd}
883 enable decimal float extension to C. Selecting 'bid'
884 or 'dpd' choses which decimal floating point format
885 to use
ba479fd2
NN
886 --enable-threads enable thread usage for target GCC
887 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
888 --enable-tls enable or disable generation of tls code
889 overriding the assembler check for tls support
ba479fd2
NN
890 --enable-objc-gc enable the use of Boehm's garbage collector with
891 the GNU Objective-C runtime
892 --disable-shared don't provide a shared libgcc
893 --enable-intermodule build the compiler in one step
f3c9f174 894 --enable-languages=LIST specify which front-ends to build
dfb77e37 895 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
896 --enable-initfini-array use .init_array/.fini_array sections
897 --enable-sjlj-exceptions
898 arrange to use setjmp/longjmp exception handling
7f970b70 899 --enable-secureplt enable -msecure-plt by default for PowerPC
ba479fd2
NN
900 --disable-win32-registry
901 disable lookup of installation paths in the
902 Registry on Windows hosts
903 --enable-win32-registry enable registry lookup (default)
904 --enable-win32-registry=KEY
905 use KEY instead of GCC version as the last portion
906 of the registry key
907 --enable-maintainer-mode
908 enable make rules and dependencies not useful
909 (and sometimes confusing) to the casual installer
910 --enable-version-specific-runtime-libs
911 specify that runtime libraries should be
912 installed in a compiler-specific directory
093e61a6 913
ba479fd2
NN
914Optional Packages:
915 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
916 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1546bb64 917 --with-build-libsubdir=DIR Directory where to find libraries for build system
ba479fd2
NN
918 --with-local-prefix=DIR specifies directory to put local include
919 --with-gxx-include-dir=DIR
920 specifies directory to put g++ header files
921 --with-cpp-install-dir=DIR
922 install the user visible C preprocessor in DIR
923 (relative to PREFIX) as well as PREFIX/bin
924 --with-gnu-ld arrange to work with GNU ld.
925 --with-ld arrange to use the specified ld (full pathname)
d594623a 926 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
927 --with-gnu-as arrange to work with GNU as
928 --with-as arrange to use the specified as (full pathname)
929 --with-stabs arrange to use stabs instead of host debug format
930 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
931 --with-build-sysroot=sysroot
932 use sysroot as the system root during the build
ba479fd2 933 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
dfb77e37
KC
934 --with-gnu-ld assume the C compiler uses GNU ld default=no
935 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
936 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 937 --with-system-libunwind use installed libunwind
ed965309 938 --with-long-double-128 Use 128-bit long double by default.
59415997 939 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
940 with the compiler
941 --with-system-zlib use installed libz
22482f74
MS
942 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
943 --with-datarootdir=DIR Use DIR as the data root [PREFIX/share]
944 --with-docdir=DIR Install documentation in DIR [DATAROOTDIR]
945 --with-htmldir=DIR html documentation in in DIR [DOCDIR]
13c22933 946
ba479fd2
NN
947Some influential environment variables:
948 CC C compiler command
949 CFLAGS C compiler flags
950 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
951 nonstandard directory <lib dir>
a3bba767
JJ
952 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
953 headers in a nonstandard directory <include dir>
ba479fd2 954 CPP C preprocessor
6de9cd9a
DN
955 GMPLIBS How to link GMP
956 GMPINC How to find GMP include files
13c22933 957
ba479fd2
NN
958Use these variables to override the choices made by `configure' or to help
959it to find libraries and programs with nonstandard names/locations.
73458fb7 960
ba479fd2
NN
961_ACEOF
962fi
6e3f3080 963
ba479fd2
NN
964if test "$ac_init_help" = "recursive"; then
965 # If there are subdirs, report their specific --help.
a3bba767 966 ac_popdir=`pwd`
ba479fd2 967 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
a3bba767 968 test -d $ac_dir || continue
ba479fd2
NN
969 ac_builddir=.
970
a3bba767 971if test "$ac_dir" != .; then
ba479fd2 972 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
a3bba767
JJ
973 # A "../" for each directory in $ac_dir_suffix.
974 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
975else
976 ac_dir_suffix= ac_top_builddir=
977fi
ba479fd2
NN
978
979case $srcdir in
a3bba767 980 .) # No --srcdir option. We are building in place.
ba479fd2 981 ac_srcdir=.
a3bba767
JJ
982 if test -z "$ac_top_builddir"; then
983 ac_top_srcdir=.
984 else
985 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
986 fi ;;
987 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 988 ac_srcdir=$srcdir$ac_dir_suffix;
a3bba767
JJ
989 ac_top_srcdir=$srcdir ;;
990 *) # Relative path.
991 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
992 ac_top_srcdir=$ac_top_builddir$srcdir ;;
993esac
994
995# Do not use `cd foo && pwd` to compute absolute paths, because
996# the directories may not exist.
997case `pwd` in
998.) ac_abs_builddir="$ac_dir";;
999*)
1000 case "$ac_dir" in
1001 .) ac_abs_builddir=`pwd`;;
1002 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1003 *) ac_abs_builddir=`pwd`/"$ac_dir";;
1004 esac;;
1005esac
1006case $ac_abs_builddir in
1007.) ac_abs_top_builddir=${ac_top_builddir}.;;
1008*)
1009 case ${ac_top_builddir}. in
1010 .) ac_abs_top_builddir=$ac_abs_builddir;;
1011 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1012 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1013 esac;;
1014esac
1015case $ac_abs_builddir in
1016.) ac_abs_srcdir=$ac_srcdir;;
1017*)
1018 case $ac_srcdir in
1019 .) ac_abs_srcdir=$ac_abs_builddir;;
1020 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1021 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1022 esac;;
1023esac
1024case $ac_abs_builddir in
1025.) ac_abs_top_srcdir=$ac_top_srcdir;;
1026*)
1027 case $ac_top_srcdir in
1028 .) ac_abs_top_srcdir=$ac_abs_builddir;;
1029 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1030 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1031 esac;;
86da66b5 1032esac
a3bba767
JJ
1033
1034 cd $ac_dir
1035 # Check for guested configure; otherwise get Cygnus style configure.
1036 if test -f $ac_srcdir/configure.gnu; then
1037 echo
1038 $SHELL $ac_srcdir/configure.gnu --help=recursive
1039 elif test -f $ac_srcdir/configure; then
1040 echo
1041 $SHELL $ac_srcdir/configure --help=recursive
1042 elif test -f $ac_srcdir/configure.ac ||
1043 test -f $ac_srcdir/configure.in; then
1044 echo
1045 $ac_configure --help
ba479fd2
NN
1046 else
1047 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
a3bba767
JJ
1048 fi
1049 cd $ac_popdir
ba479fd2
NN
1050 done
1051fi
1052
a3bba767 1053test -n "$ac_init_help" && exit 0
ba479fd2
NN
1054if $ac_init_version; then
1055 cat <<\_ACEOF
1056
a3bba767 1057Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1058This configure script is free software; the Free Software Foundation
1059gives unlimited permission to copy, distribute and modify it.
1060_ACEOF
a3bba767 1061 exit 0
ba479fd2 1062fi
a3bba767
JJ
1063exec 5>config.log
1064cat >&5 <<_ACEOF
ba479fd2
NN
1065This file contains any messages produced by compilers while
1066running configure, to aid debugging if configure makes a mistake.
1067
1068It was created by $as_me, which was
a3bba767 1069generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1070
1071 $ $0 $@
1072
1073_ACEOF
1074{
1075cat <<_ASUNAME
1076## --------- ##
1077## Platform. ##
1078## --------- ##
1079
1080hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1081uname -m = `(uname -m) 2>/dev/null || echo unknown`
1082uname -r = `(uname -r) 2>/dev/null || echo unknown`
1083uname -s = `(uname -s) 2>/dev/null || echo unknown`
1084uname -v = `(uname -v) 2>/dev/null || echo unknown`
1085
1086/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1087/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1088
1089/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1090/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1091/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
a3bba767 1092hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
ba479fd2
NN
1093/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1094/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1095/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1096
1097_ASUNAME
1098
1099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1100for as_dir in $PATH
1101do
1102 IFS=$as_save_IFS
1103 test -z "$as_dir" && as_dir=.
1104 echo "PATH: $as_dir"
1105done
1106
1107} >&5
1108
1109cat >&5 <<_ACEOF
1110
1111
1112## ----------- ##
1113## Core tests. ##
1114## ----------- ##
1115
1116_ACEOF
1117
1118
1119# Keep a trace of the command line.
1120# Strip out --no-create and --no-recursion so they do not pile up.
1121# Strip out --silent because we don't want to record it for future runs.
1122# Also quote any args containing shell meta-characters.
1123# Make two passes to allow for proper duplicate-argument suppression.
1124ac_configure_args=
1125ac_configure_args0=
1126ac_configure_args1=
a3bba767 1127ac_sep=
ba479fd2
NN
1128ac_must_keep_next=false
1129for ac_pass in 1 2
1130do
1131 for ac_arg
1132 do
1133 case $ac_arg in
1134 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1135 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1136 | -silent | --silent | --silen | --sile | --sil)
1137 continue ;;
a3bba767 1138 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ba479fd2
NN
1139 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1140 esac
1141 case $ac_pass in
1142 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1143 2)
1144 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1145 if test $ac_must_keep_next = true; then
86da66b5 1146 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1147 else
86da66b5
HPN
1148 case $ac_arg in
1149 *=* | --config-cache | -C | -disable-* | --disable-* \
1150 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1151 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1152 | -with-* | --with-* | -without-* | --without-* | --x)
1153 case "$ac_configure_args0 " in
1154 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1155 esac
1156 ;;
1157 -* ) ac_must_keep_next=true ;;
1158 esac
ba479fd2 1159 fi
a3bba767
JJ
1160 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1161 # Get rid of the leading space.
1162 ac_sep=" "
ba479fd2
NN
1163 ;;
1164 esac
1165 done
1166done
1167$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1168$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1169
1170# When interrupted or exit'd, cleanup temporary files, and complete
1171# config.log. We remove comments because anyway the quotes in there
1172# would cause problems or look ugly.
a3bba767
JJ
1173# WARNING: Be sure not to use single quotes in there, as some shells,
1174# such as our DU 5.0 friend, will then `close' the trap.
ba479fd2
NN
1175trap 'exit_status=$?
1176 # Save into config.log some information that might help in debugging.
1177 {
1178 echo
1179
1180 cat <<\_ASBOX
1181## ---------------- ##
1182## Cache variables. ##
1183## ---------------- ##
1184_ASBOX
1185 echo
1186 # The following way of writing the cache mishandles newlines in values,
a3bba767 1187{
ba479fd2 1188 (set) 2>&1 |
a3bba767
JJ
1189 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1190 *ac_space=\ *)
ba479fd2 1191 sed -n \
a3bba767
JJ
1192 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1193 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1194 ;;
ba479fd2 1195 *)
a3bba767
JJ
1196 sed -n \
1197 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 1198 ;;
a3bba767
JJ
1199 esac;
1200}
ba479fd2
NN
1201 echo
1202
1203 cat <<\_ASBOX
1204## ----------------- ##
1205## Output variables. ##
1206## ----------------- ##
1207_ASBOX
1208 echo
1209 for ac_var in $ac_subst_vars
1210 do
a3bba767
JJ
1211 eval ac_val=$`echo $ac_var`
1212 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1213 done | sort
1214 echo
1215
1216 if test -n "$ac_subst_files"; then
1217 cat <<\_ASBOX
a3bba767
JJ
1218## ------------- ##
1219## Output files. ##
1220## ------------- ##
ba479fd2
NN
1221_ASBOX
1222 echo
1223 for ac_var in $ac_subst_files
1224 do
a3bba767
JJ
1225 eval ac_val=$`echo $ac_var`
1226 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1227 done | sort
1228 echo
1229 fi
1230
1231 if test -s confdefs.h; then
1232 cat <<\_ASBOX
1233## ----------- ##
1234## confdefs.h. ##
1235## ----------- ##
1236_ASBOX
1237 echo
a3bba767 1238 sed "/^$/d" confdefs.h | sort
ba479fd2
NN
1239 echo
1240 fi
1241 test "$ac_signal" != 0 &&
1242 echo "$as_me: caught signal $ac_signal"
1243 echo "$as_me: exit $exit_status"
1244 } >&5
a3bba767
JJ
1245 rm -f core *.core &&
1246 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
ba479fd2 1247 exit $exit_status
a3bba767 1248 ' 0
ba479fd2
NN
1249for ac_signal in 1 2 13 15; do
1250 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1251done
1252ac_signal=0
1253
1254# confdefs.h avoids OS command line length limits that DEFS can exceed.
a3bba767
JJ
1255rm -rf conftest* confdefs.h
1256# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1257echo >confdefs.h
ba479fd2
NN
1258
1259# Predefined preprocessor variables.
1260
1261cat >>confdefs.h <<_ACEOF
1262#define PACKAGE_NAME "$PACKAGE_NAME"
1263_ACEOF
1264
1265
1266cat >>confdefs.h <<_ACEOF
1267#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1268_ACEOF
1269
1270
1271cat >>confdefs.h <<_ACEOF
1272#define PACKAGE_VERSION "$PACKAGE_VERSION"
1273_ACEOF
1274
1275
1276cat >>confdefs.h <<_ACEOF
1277#define PACKAGE_STRING "$PACKAGE_STRING"
1278_ACEOF
1279
1280
1281cat >>confdefs.h <<_ACEOF
1282#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1283_ACEOF
1284
1285
1286# Let the site file select an alternate cache file if it wants to.
1287# Prefer explicitly selected file to automatically selected ones.
a3bba767
JJ
1288if test -z "$CONFIG_SITE"; then
1289 if test "x$prefix" != xNONE; then
1290 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1291 else
1292 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1293 fi
ba479fd2 1294fi
a3bba767 1295for ac_site_file in $CONFIG_SITE; do
ba479fd2
NN
1296 if test -r "$ac_site_file"; then
1297 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1298echo "$as_me: loading site script $ac_site_file" >&6;}
1299 sed 's/^/| /' "$ac_site_file" >&5
1300 . "$ac_site_file"
1301 fi
1302done
1303
1304if test -r "$cache_file"; then
1305 # Some versions of bash will fail to source /dev/null (special
1306 # files actually), so we avoid doing that.
1307 if test -f "$cache_file"; then
1308 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1309echo "$as_me: loading cache $cache_file" >&6;}
1310 case $cache_file in
a3bba767
JJ
1311 [\\/]* | ?:[\\/]* ) . $cache_file;;
1312 *) . ./$cache_file;;
ba479fd2
NN
1313 esac
1314 fi
1315else
1316 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1317echo "$as_me: creating cache $cache_file" >&6;}
1318 >$cache_file
1319fi
1320
1321# Check that the precious variables saved in the cache have kept the same
1322# value.
1323ac_cache_corrupted=false
a3bba767
JJ
1324for ac_var in `(set) 2>&1 |
1325 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1326 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1327 eval ac_new_set=\$ac_env_${ac_var}_set
a3bba767
JJ
1328 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1329 eval ac_new_val="\$ac_env_${ac_var}_value"
ba479fd2
NN
1330 case $ac_old_set,$ac_new_set in
1331 set,)
1332 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1333echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1334 ac_cache_corrupted=: ;;
1335 ,set)
1336 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1337echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1338 ac_cache_corrupted=: ;;
1339 ,);;
1340 *)
1341 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1342 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1343echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1344 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1345echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1346 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1347echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1348 ac_cache_corrupted=:
ba479fd2
NN
1349 fi;;
1350 esac
1351 # Pass precious variables to config.status.
1352 if test "$ac_new_set" = set; then
1353 case $ac_new_val in
a3bba767
JJ
1354 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1355 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
ba479fd2
NN
1356 *) ac_arg=$ac_var=$ac_new_val ;;
1357 esac
1358 case " $ac_configure_args " in
1359 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1360 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1361 esac
1362 fi
1363done
1364if $ac_cache_corrupted; then
1365 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1366echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1367 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1368echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1369 { (exit 1); exit 1; }; }
1370fi
1371
a3bba767
JJ
1372ac_ext=c
1373ac_cpp='$CPP $CPPFLAGS'
1374ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1375ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1376ac_compiler_gnu=$ac_cv_c_compiler_gnu
1377
ba479fd2
NN
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
914c5af7 1396
a3bba767 1397 ac_config_headers="$ac_config_headers auto-host.h:config.in"
ba479fd2
NN
1398
1399
9f18db39
PB
1400gcc_version=`cat $srcdir/BASE-VER`
1401
ba479fd2
NN
1402# Determine the host, build, and target systems
1403ac_aux_dir=
a3bba767
JJ
1404for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1405 if test -f $ac_dir/install-sh; then
ba479fd2
NN
1406 ac_aux_dir=$ac_dir
1407 ac_install_sh="$ac_aux_dir/install-sh -c"
1408 break
a3bba767 1409 elif test -f $ac_dir/install.sh; then
ba479fd2
NN
1410 ac_aux_dir=$ac_dir
1411 ac_install_sh="$ac_aux_dir/install.sh -c"
1412 break
a3bba767 1413 elif test -f $ac_dir/shtool; then
ba479fd2
NN
1414 ac_aux_dir=$ac_dir
1415 ac_install_sh="$ac_aux_dir/shtool install -c"
1416 break
1417 fi
1418done
1419if test -z "$ac_aux_dir"; then
a3bba767
JJ
1420 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1421echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
ba479fd2
NN
1422 { (exit 1); exit 1; }; }
1423fi
a3bba767
JJ
1424ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1425ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1426ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba479fd2
NN
1427
1428# Make sure we can run config.sub.
a3bba767
JJ
1429$ac_config_sub sun4 >/dev/null 2>&1 ||
1430 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1431echo "$as_me: error: cannot run $ac_config_sub" >&2;}
ba479fd2
NN
1432 { (exit 1); exit 1; }; }
1433
a3bba767
JJ
1434echo "$as_me:$LINENO: checking build system type" >&5
1435echo $ECHO_N "checking build system type... $ECHO_C" >&6
ba479fd2
NN
1436if test "${ac_cv_build+set}" = set; then
1437 echo $ECHO_N "(cached) $ECHO_C" >&6
1438else
a3bba767
JJ
1439 ac_cv_build_alias=$build_alias
1440test -z "$ac_cv_build_alias" &&
1441 ac_cv_build_alias=`$ac_config_guess`
1442test -z "$ac_cv_build_alias" &&
ba479fd2
NN
1443 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1444echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1445 { (exit 1); exit 1; }; }
a3bba767
JJ
1446ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1447 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1448echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
ba479fd2
NN
1449 { (exit 1); exit 1; }; }
1450
1451fi
a3bba767
JJ
1452echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1453echo "${ECHO_T}$ac_cv_build" >&6
ba479fd2 1454build=$ac_cv_build
a3bba767
JJ
1455build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1456build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1457build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1458
1459
1460echo "$as_me:$LINENO: checking host system type" >&5
1461echo $ECHO_N "checking host system type... $ECHO_C" >&6
ba479fd2
NN
1462if test "${ac_cv_host+set}" = set; then
1463 echo $ECHO_N "(cached) $ECHO_C" >&6
1464else
a3bba767
JJ
1465 ac_cv_host_alias=$host_alias
1466test -z "$ac_cv_host_alias" &&
1467 ac_cv_host_alias=$ac_cv_build_alias
1468ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1469 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1470echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
ba479fd2
NN
1471 { (exit 1); exit 1; }; }
1472
1473fi
a3bba767
JJ
1474echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1475echo "${ECHO_T}$ac_cv_host" >&6
ba479fd2 1476host=$ac_cv_host
a3bba767
JJ
1477host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1478host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1479host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1480
1481
1482echo "$as_me:$LINENO: checking target system type" >&5
1483echo $ECHO_N "checking target system type... $ECHO_C" >&6
ba479fd2
NN
1484if test "${ac_cv_target+set}" = set; then
1485 echo $ECHO_N "(cached) $ECHO_C" >&6
1486else
a3bba767
JJ
1487 ac_cv_target_alias=$target_alias
1488test "x$ac_cv_target_alias" = "x" &&
1489 ac_cv_target_alias=$ac_cv_host_alias
1490ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1491 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1492echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
ba479fd2
NN
1493 { (exit 1); exit 1; }; }
1494
1495fi
a3bba767
JJ
1496echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1497echo "${ECHO_T}$ac_cv_target" >&6
ba479fd2 1498target=$ac_cv_target
a3bba767
JJ
1499target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1500target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1501target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba479fd2
NN
1502
1503
1504# The aliases save the names the user supplied, while $host etc.
1505# will get canonicalized.
1506test -n "$target_alias" &&
1507 test "$program_prefix$program_suffix$program_transform_name" = \
1508 NONENONEs,x,x, &&
1509 program_prefix=${target_alias}-
1510
1511# Determine the noncanonical target name, for directory use.
18fc9bd4
RG
1512 case ${build_alias} in
1513 "") build_noncanonical=${build} ;;
1514 *) build_noncanonical=${build_alias} ;;
1515esac
1516
1517 case ${host_alias} in
1518 "") host_noncanonical=${build_noncanonical} ;;
1519 *) host_noncanonical=${host_alias} ;;
1520esac
1521
1522 case ${target_alias} in
1523 "") target_noncanonical=${host_noncanonical} ;;
1524 *) target_noncanonical=${target_alias} ;;
1525esac
1526
1527
1528
8f1529e6
L
1529
1530# Determine the target- and build-specific subdirectories
57255173
PB
1531
1532# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
1533# have matching libraries, they should use host libraries: Makefile.tpl
1534# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
1535# However, they still use the build modules, because the corresponding
1536# host modules (e.g. bison) are only built for the host when bootstrap
1537# finishes. So:
1538# - build_subdir is where we find build modules, and never changes.
1539# - build_libsubdir is where we find build libraries, and can be overridden.
1540
1541# Prefix 'build-' so this never conflicts with target_subdir.
18fc9bd4 1542build_subdir="build-${build_noncanonical}"
1546bb64 1543
a3bba767 1544# Check whether --with-build-libsubdir or --without-build-libsubdir was given.
1546bb64 1545if test "${with_build_libsubdir+set}" = set; then
a3bba767
JJ
1546 withval="$with_build_libsubdir"
1547 build_libsubdir="$withval"
1546bb64
PB
1548else
1549 build_libsubdir="$build_subdir"
a3bba767 1550fi;
18fc9bd4
RG
1551# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1552if ( test $srcdir = . && test -d gcc ) \
1553 || test -d $srcdir/../host-${host_noncanonical}; then
1554 host_subdir="host-${host_noncanonical}"
1555else
1556 host_subdir=.
1557fi
1558# No prefix.
1559target_subdir=${target_noncanonical}
1560
73458fb7 1561
093e61a6 1562# Set program_transform_name
13c22933 1563test "$program_prefix" != NONE &&
a3bba767 1564 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1565# Use a double $ so make ignores it.
1566test "$program_suffix" != NONE &&
a3bba767 1567 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
ba479fd2
NN
1568# Double any \ or $. echo might interpret backslashes.
1569# By default was `s,x,x', remove it if useless.
1570cat <<\_ACEOF >conftest.sed
1571s/[\\$]/&&/g;s/;s,x,x,$//
1572_ACEOF
1573program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
a3bba767 1574rm conftest.sed
13c22933
JJ
1575
1576
34a86c2b
NN
1577# Check for bogus environment variables.
1578# Test if LIBRARY_PATH contains the notation for the current directory
1579# since this would lead to problems installing/building glibc.
1580# LIBRARY_PATH contains the current directory if one of the following
1581# is true:
1582# - one of the terminals (":" and ";") is the first or last sign
1583# - two terminals occur directly after each other
1584# - the path contains an element with a dot in it
a3bba767
JJ
1585echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1586echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1587case ${LIBRARY_PATH} in
1588 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1589 library_path_setting="contains current directory"
1590 ;;
1591 *)
1592 library_path_setting="ok"
1593 ;;
1594esac
a3bba767
JJ
1595echo "$as_me:$LINENO: result: $library_path_setting" >&5
1596echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1597if test "$library_path_setting" != "ok"; then
ba479fd2 1598{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1599*** LIBRARY_PATH shouldn't contain the current directory when
1600*** building gcc. Please change the environment variable
ba479fd2
NN
1601*** and run configure again." >&5
1602echo "$as_me: error:
1603*** LIBRARY_PATH shouldn't contain the current directory when
1604*** building gcc. Please change the environment variable
1605*** and run configure again." >&2;}
1606 { (exit 1); exit 1; }; }
e9a25f70
JL
1607fi
1608
34a86c2b
NN
1609# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1610# since this would lead to problems installing/building glibc.
1611# GCC_EXEC_PREFIX contains the current directory if one of the following
1612# is true:
1613# - one of the terminals (":" and ";") is the first or last sign
1614# - two terminals occur directly after each other
1615# - the path contains an element with a dot in it
a3bba767
JJ
1616echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1617echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1618case ${GCC_EXEC_PREFIX} in
1619 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1620 gcc_exec_prefix_setting="contains current directory"
1621 ;;
1622 *)
1623 gcc_exec_prefix_setting="ok"
1624 ;;
1625esac
a3bba767
JJ
1626echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1627echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1628if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1629{ { echo "$as_me:$LINENO: error:
1630*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1631*** building gcc. Please change the environment variable
1632*** and run configure again." >&5
1633echo "$as_me: error:
cafe096b
EC
1634*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1635*** building gcc. Please change the environment variable
ba479fd2
NN
1636*** and run configure again." >&2;}
1637 { (exit 1); exit 1; }; }
34a86c2b
NN
1638fi
1639
1640# -----------
1641# Directories
1642# -----------
1643
1644# Specify the local prefix
1645local_prefix=
ba479fd2 1646
a3bba767 1647# Check whether --with-local-prefix or --without-local-prefix was given.
34a86c2b 1648if test "${with_local_prefix+set}" = set; then
a3bba767
JJ
1649 withval="$with_local_prefix"
1650 case "${withval}" in
ba479fd2
NN
1651yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1652echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1653 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1654no) ;;
1655*) local_prefix=$with_local_prefix ;;
1656esac
a3bba767 1657fi;
34a86c2b
NN
1658
1659# Default local prefix if it is empty
1660if test x$local_prefix = x; then
1661 local_prefix=/usr/local
1662fi
1663
1664# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1665# passed in by the toplevel make and thus we'd get different behavior
1666# depending on where we built the sources.
1667gcc_gxx_include_dir=
1668# Specify the g++ header file directory
ba479fd2 1669
a3bba767 1670# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
34a86c2b 1671if test "${with_gxx_include_dir+set}" = set; then
a3bba767
JJ
1672 withval="$with_gxx_include_dir"
1673 case "${withval}" in
ba479fd2
NN
1674yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1675echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1676 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1677no) ;;
1678*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1679esac
a3bba767 1680fi;
34a86c2b 1681
0f57bf40 1682# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
34a86c2b
NN
1683if test x${gcc_gxx_include_dir} = x; then
1684 if test x${enable_version_specific_runtime_libs} = xyes; then
1685 gcc_gxx_include_dir='${libsubdir}/include/c++'
1686 else
0f57bf40
MM
1687 libstdcxx_incdir='include/c++/$(version)'
1688 if test x$host != x$target; then
1689 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
1690 fi
1691 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/$libstdcxx_incdir"
34a86c2b
NN
1692 fi
1693fi
1694
ba479fd2 1695
a3bba767 1696# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
34a86c2b 1697if test "${with_cpp_install_dir+set}" = set; then
a3bba767
JJ
1698 withval="$with_cpp_install_dir"
1699 if test x$withval = xyes; then
ba479fd2
NN
1700 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1701echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1702 { (exit 1); exit 1; }; }
34a86c2b
NN
1703elif test x$withval != xno; then
1704 cpp_install_dir=$withval
1705fi
a3bba767 1706fi;
34a86c2b 1707
51b9ff45 1708# We would like to our source tree to be readonly. However when releases or
ba479fd2 1709# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1710# various formats of manuals need to be included along with the rest of the
ba479fd2 1711# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1712# just that.
1713
a3bba767
JJ
1714echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1715echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1716 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45 1717if test "${enable_generated_files_in_srcdir+set}" = set; then
a3bba767
JJ
1718 enableval="$enable_generated_files_in_srcdir"
1719 generated_files_in_srcdir=$enableval
51b9ff45 1720else
03787dfd 1721 generated_files_in_srcdir=no
a3bba767 1722fi;
703d89ab 1723
a3bba767
JJ
1724echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1725echo "${ECHO_T}$generated_files_in_srcdir" >&6
03787dfd
KC
1726
1727if test "$generated_files_in_srcdir" = "yes"; then
1728 GENINSRC=''
03787dfd
KC
1729else
1730 GENINSRC='#'
03787dfd
KC
1731fi
1732
1733
34a86c2b
NN
1734# -------------------
1735# Find default linker
1736# -------------------
1737
1738# With GNU ld
ba479fd2 1739
a3bba767 1740# Check whether --with-gnu-ld or --without-gnu-ld was given.
34a86c2b 1741if test "${with_gnu_ld+set}" = set; then
a3bba767
JJ
1742 withval="$with_gnu_ld"
1743 gnu_ld_flag="$with_gnu_ld"
34a86c2b
NN
1744else
1745 gnu_ld_flag=no
a3bba767 1746fi;
6e3f3080 1747
63cf211a 1748# With pre-defined ld
ba479fd2 1749
a3bba767 1750# Check whether --with-ld or --without-ld was given.
34a86c2b 1751if test "${with_ld+set}" = set; then
a3bba767
JJ
1752 withval="$with_ld"
1753 DEFAULT_LINKER="$with_ld"
1754fi;
34a86c2b
NN
1755if test x"${DEFAULT_LINKER+set}" = x"set"; then
1756 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1757 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1758echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1759 { (exit 1); exit 1; }; }
34a86c2b
NN
1760 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1761 gnu_ld_flag=yes
1762 fi
ba479fd2
NN
1763
1764cat >>confdefs.h <<_ACEOF
34a86c2b 1765#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1766_ACEOF
34a86c2b
NN
1767
1768fi
1769
a3bba767
JJ
1770echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1771echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1772if test x"${DEFAULT_LINKER+set}" = x"set"; then
1773 if test x"$gnu_ld_flag" = x"no"; then
a3bba767
JJ
1774 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1775echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1776 else
a3bba767
JJ
1777 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1778echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1779 fi
1780else
a3bba767
JJ
1781 echo "$as_me:$LINENO: result: no" >&5
1782echo "${ECHO_T}no" >&6
34a86c2b
NN
1783fi
1784
d594623a
L
1785# With demangler in GNU ld
1786
a3bba767 1787# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
d594623a 1788if test "${with_demangler_in_ld+set}" = set; then
a3bba767
JJ
1789 withval="$with_demangler_in_ld"
1790 demangler_in_ld="$with_demangler_in_ld"
d594623a
L
1791else
1792 demangler_in_ld=no
a3bba767 1793fi;
d594623a 1794
34a86c2b
NN
1795# ----------------------
1796# Find default assembler
1797# ----------------------
1798
1799# With GNU as
ba479fd2 1800
a3bba767 1801# Check whether --with-gnu-as or --without-gnu-as was given.
34a86c2b 1802if test "${with_gnu_as+set}" = set; then
a3bba767
JJ
1803 withval="$with_gnu_as"
1804 gas_flag="$with_gnu_as"
34a86c2b
NN
1805else
1806 gas_flag=no
a3bba767 1807fi;
a6ccdbab 1808
703d89ab 1809
a3bba767 1810# Check whether --with-as or --without-as was given.
34a86c2b 1811if test "${with_as+set}" = set; then
a3bba767
JJ
1812 withval="$with_as"
1813 DEFAULT_ASSEMBLER="$with_as"
1814fi;
34a86c2b
NN
1815if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1816 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1817 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1818echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1819 { (exit 1); exit 1; }; }
34a86c2b
NN
1820 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1821 gas_flag=yes
1822 fi
ba479fd2
NN
1823
1824cat >>confdefs.h <<_ACEOF
34a86c2b 1825#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1826_ACEOF
34a86c2b
NN
1827
1828fi
1829
a3bba767
JJ
1830echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1831echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1832if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1833 if test x"$gas_flag" = x"no"; then
a3bba767
JJ
1834 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1835echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1836 else
a3bba767
JJ
1837 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1838echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1839 fi
1840else
a3bba767
JJ
1841 echo "$as_me:$LINENO: result: no" >&5
1842echo "${ECHO_T}no" >&6
34a86c2b
NN
1843fi
1844
1845# ---------------
1846# Find C compiler
1847# ---------------
1848
426ca3ca
RO
1849# If a non-executable a.out is present (e.g. created by GNU as above even if
1850# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1851# file, even when creating an executable, so an execution test fails.
1852# Remove possible default executable files to avoid this.
1853#
1854# FIXME: This really belongs into AC_PROG_CC and can be removed once
1855# Autoconf includes it.
1856rm -f a.out a.exe b.out
1857
34a86c2b 1858# Find the native compiler
ba479fd2
NN
1859ac_ext=c
1860ac_cpp='$CPP $CPPFLAGS'
1861ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1862ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1863ac_compiler_gnu=$ac_cv_c_compiler_gnu
1864if test -n "$ac_tool_prefix"; then
1865 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1866set dummy ${ac_tool_prefix}gcc; ac_word=$2
a3bba767
JJ
1867echo "$as_me:$LINENO: checking for $ac_word" >&5
1868echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
1869if test "${ac_cv_prog_CC+set}" = set; then
1870 echo $ECHO_N "(cached) $ECHO_C" >&6
1871else
1872 if test -n "$CC"; then
1873 ac_cv_prog_CC="$CC" # Let the user override the test.
1874else
1875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1876for as_dir in $PATH
1877do
1878 IFS=$as_save_IFS
1879 test -z "$as_dir" && as_dir=.
1880 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 1881 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
1882 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1883 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1884 break 2
1885 fi
1886done
1887done
1888
1889fi
1890fi
1891CC=$ac_cv_prog_CC
1892if test -n "$CC"; then
a3bba767
JJ
1893 echo "$as_me:$LINENO: result: $CC" >&5
1894echo "${ECHO_T}$CC" >&6
ba479fd2 1895else
a3bba767
JJ
1896 echo "$as_me:$LINENO: result: no" >&5
1897echo "${ECHO_T}no" >&6
ba479fd2
NN
1898fi
1899
1900fi
1901if test -z "$ac_cv_prog_CC"; then
1902 ac_ct_CC=$CC
1903 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1904set dummy gcc; ac_word=$2
a3bba767
JJ
1905echo "$as_me:$LINENO: checking for $ac_word" >&5
1906echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
1907if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1908 echo $ECHO_N "(cached) $ECHO_C" >&6
1909else
1910 if test -n "$ac_ct_CC"; then
1911 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1912else
1913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1914for as_dir in $PATH
1915do
1916 IFS=$as_save_IFS
1917 test -z "$as_dir" && as_dir=.
1918 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 1919 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
1920 ac_cv_prog_ac_ct_CC="gcc"
1921 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1922 break 2
1923 fi
1924done
1925done
1926
1927fi
1928fi
1929ac_ct_CC=$ac_cv_prog_ac_ct_CC
1930if test -n "$ac_ct_CC"; then
a3bba767
JJ
1931 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1932echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 1933else
a3bba767
JJ
1934 echo "$as_me:$LINENO: result: no" >&5
1935echo "${ECHO_T}no" >&6
ba479fd2
NN
1936fi
1937
a3bba767 1938 CC=$ac_ct_CC
ba479fd2
NN
1939else
1940 CC="$ac_cv_prog_CC"
1941fi
1942
1943if test -z "$CC"; then
a3bba767
JJ
1944 if test -n "$ac_tool_prefix"; then
1945 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
ba479fd2 1946set dummy ${ac_tool_prefix}cc; ac_word=$2
a3bba767
JJ
1947echo "$as_me:$LINENO: checking for $ac_word" >&5
1948echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
1949if test "${ac_cv_prog_CC+set}" = set; then
1950 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1951else
1952 if test -n "$CC"; then
1953 ac_cv_prog_CC="$CC" # Let the user override the test.
1954else
ba479fd2
NN
1955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1956for as_dir in $PATH
1957do
1958 IFS=$as_save_IFS
1959 test -z "$as_dir" && as_dir=.
1960 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 1961 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
1962 ac_cv_prog_CC="${ac_tool_prefix}cc"
1963 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1964 break 2
1965 fi
1966done
1967done
1968
cd9e5e7c
MK
1969fi
1970fi
ba479fd2 1971CC=$ac_cv_prog_CC
cd9e5e7c 1972if test -n "$CC"; then
a3bba767
JJ
1973 echo "$as_me:$LINENO: result: $CC" >&5
1974echo "${ECHO_T}$CC" >&6
8b1f719a 1975else
a3bba767
JJ
1976 echo "$as_me:$LINENO: result: no" >&5
1977echo "${ECHO_T}no" >&6
8b1f719a
PB
1978fi
1979
a3bba767
JJ
1980fi
1981if test -z "$ac_cv_prog_CC"; then
1982 ac_ct_CC=$CC
1983 # Extract the first word of "cc", so it can be a program name with args.
1984set dummy cc; ac_word=$2
1985echo "$as_me:$LINENO: checking for $ac_word" >&5
1986echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1987if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1988 echo $ECHO_N "(cached) $ECHO_C" >&6
1989else
1990 if test -n "$ac_ct_CC"; then
1991 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1992else
1993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1994for as_dir in $PATH
1995do
1996 IFS=$as_save_IFS
1997 test -z "$as_dir" && as_dir=.
1998 for ac_exec_ext in '' $ac_executable_extensions; do
1999 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2000 ac_cv_prog_ac_ct_CC="cc"
2001 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2002 break 2
703d89ab 2003 fi
a3bba767
JJ
2004done
2005done
2006
2007fi
2008fi
2009ac_ct_CC=$ac_cv_prog_ac_ct_CC
2010if test -n "$ac_ct_CC"; then
2011 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2012echo "${ECHO_T}$ac_ct_CC" >&6
2013else
2014 echo "$as_me:$LINENO: result: no" >&5
2015echo "${ECHO_T}no" >&6
2016fi
2017
2018 CC=$ac_ct_CC
2019else
2020 CC="$ac_cv_prog_CC"
2021fi
2022
ba479fd2 2023fi
6e3f3080
NN
2024if test -z "$CC"; then
2025 # Extract the first word of "cc", so it can be a program name with args.
2026set dummy cc; ac_word=$2
a3bba767
JJ
2027echo "$as_me:$LINENO: checking for $ac_word" >&5
2028echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2029if test "${ac_cv_prog_CC+set}" = set; then
2030 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2031else
2032 if test -n "$CC"; then
2033 ac_cv_prog_CC="$CC" # Let the user override the test.
2034else
2035 ac_prog_rejected=no
ba479fd2
NN
2036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2037for as_dir in $PATH
2038do
2039 IFS=$as_save_IFS
2040 test -z "$as_dir" && as_dir=.
2041 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 2042 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2043 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2044 ac_prog_rejected=yes
2045 continue
2046 fi
2047 ac_cv_prog_CC="cc"
2048 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2049 break 2
2050 fi
2051done
2052done
2053
6e3f3080
NN
2054if test $ac_prog_rejected = yes; then
2055 # We found a bogon in the path, so make sure we never use it.
2056 set dummy $ac_cv_prog_CC
2057 shift
ba479fd2 2058 if test $# != 0; then
6e3f3080
NN
2059 # We chose a different compiler from the bogus one.
2060 # However, it has the same basename, so the bogon will be chosen
2061 # first if we set CC to just the basename; use the full file name.
2062 shift
ba479fd2 2063 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2064 fi
6e3f3080
NN
2065fi
2066fi
2067fi
ba479fd2 2068CC=$ac_cv_prog_CC
6e3f3080 2069if test -n "$CC"; then
a3bba767
JJ
2070 echo "$as_me:$LINENO: result: $CC" >&5
2071echo "${ECHO_T}$CC" >&6
e9a25f70 2072else
a3bba767
JJ
2073 echo "$as_me:$LINENO: result: no" >&5
2074echo "${ECHO_T}no" >&6
e9a25f70 2075fi
6e3f3080 2076
ba479fd2
NN
2077fi
2078if test -z "$CC"; then
2079 if test -n "$ac_tool_prefix"; then
a3bba767 2080 for ac_prog in cl
ba479fd2
NN
2081 do
2082 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2083set dummy $ac_tool_prefix$ac_prog; ac_word=$2
a3bba767
JJ
2084echo "$as_me:$LINENO: checking for $ac_word" >&5
2085echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2086if test "${ac_cv_prog_CC+set}" = set; then
2087 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2088else
6e3f3080
NN
2089 if test -n "$CC"; then
2090 ac_cv_prog_CC="$CC" # Let the user override the test.
2091else
ba479fd2
NN
2092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2093for as_dir in $PATH
2094do
2095 IFS=$as_save_IFS
2096 test -z "$as_dir" && as_dir=.
2097 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 2098 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2099 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2100 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2101 break 2
2102 fi
2103done
2104done
2105
093e61a6 2106fi
6e3f3080 2107fi
ba479fd2 2108CC=$ac_cv_prog_CC
6e3f3080 2109if test -n "$CC"; then
a3bba767
JJ
2110 echo "$as_me:$LINENO: result: $CC" >&5
2111echo "${ECHO_T}$CC" >&6
6e3f3080 2112else
a3bba767
JJ
2113 echo "$as_me:$LINENO: result: no" >&5
2114echo "${ECHO_T}no" >&6
093e61a6 2115fi
cafe096b 2116
ba479fd2
NN
2117 test -n "$CC" && break
2118 done
2119fi
2120if test -z "$CC"; then
2121 ac_ct_CC=$CC
a3bba767 2122 for ac_prog in cl
ba479fd2
NN
2123do
2124 # Extract the first word of "$ac_prog", so it can be a program name with args.
2125set dummy $ac_prog; ac_word=$2
a3bba767
JJ
2126echo "$as_me:$LINENO: checking for $ac_word" >&5
2127echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2128if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2129 echo $ECHO_N "(cached) $ECHO_C" >&6
2130else
2131 if test -n "$ac_ct_CC"; then
2132 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2133else
2134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2135for as_dir in $PATH
2136do
2137 IFS=$as_save_IFS
2138 test -z "$as_dir" && as_dir=.
2139 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 2140 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2141 ac_cv_prog_ac_ct_CC="$ac_prog"
2142 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2143 break 2
2144 fi
2145done
2146done
6e3f3080 2147
ba479fd2
NN
2148fi
2149fi
2150ac_ct_CC=$ac_cv_prog_ac_ct_CC
2151if test -n "$ac_ct_CC"; then
a3bba767
JJ
2152 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2153echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 2154else
a3bba767
JJ
2155 echo "$as_me:$LINENO: result: no" >&5
2156echo "${ECHO_T}no" >&6
ba479fd2 2157fi
6e3f3080 2158
ba479fd2
NN
2159 test -n "$ac_ct_CC" && break
2160done
63cf211a 2161
a3bba767 2162 CC=$ac_ct_CC
ba479fd2
NN
2163fi
2164
2165fi
2166
2167
2168test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2169See \`config.log' for more details." >&5
2170echo "$as_me: error: no acceptable C compiler found in \$PATH
2171See \`config.log' for more details." >&2;}
2172 { (exit 1); exit 1; }; }
2173
2174# Provide some information about the compiler.
a3bba767
JJ
2175echo "$as_me:$LINENO:" \
2176 "checking for C compiler version" >&5
ba479fd2 2177ac_compiler=`set X $ac_compile; echo $2`
a3bba767
JJ
2178{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2179 (eval $ac_compiler --version </dev/null >&5) 2>&5
ba479fd2
NN
2180 ac_status=$?
2181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182 (exit $ac_status); }
a3bba767
JJ
2183{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2184 (eval $ac_compiler -v </dev/null >&5) 2>&5
ba479fd2
NN
2185 ac_status=$?
2186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2187 (exit $ac_status); }
a3bba767
JJ
2188{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2189 (eval $ac_compiler -V </dev/null >&5) 2>&5
ba479fd2
NN
2190 ac_status=$?
2191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2192 (exit $ac_status); }
2193
2194cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2195/* confdefs.h. */
2196_ACEOF
2197cat confdefs.h >>conftest.$ac_ext
2198cat >>conftest.$ac_ext <<_ACEOF
2199/* end confdefs.h. */
2200
2201int
2202main ()
2203{
63cf211a 2204
ba479fd2
NN
2205 ;
2206 return 0;
2207}
2208_ACEOF
2209ac_clean_files_save=$ac_clean_files
2210ac_clean_files="$ac_clean_files a.out a.exe b.out"
2211# Try to create an executable without -o first, disregard a.out.
2212# It will help us diagnose broken compilers, and finding out an intuition
2213# of exeext.
a3bba767
JJ
2214echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2215echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2 2216ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
a3bba767
JJ
2217if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2218 (eval $ac_link_default) 2>&5
ba479fd2
NN
2219 ac_status=$?
2220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2221 (exit $ac_status); }; then
a3bba767
JJ
2222 # Find the output, starting from the most likely. This scheme is
2223# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2224# resort.
2225
2226# Be careful to initialize this variable, since it used to be cached.
2227# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2228ac_cv_exeext=
2229# b.out is created by i960 compilers.
2230for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
ba479fd2
NN
2231do
2232 test -f "$ac_file" || continue
2233 case $ac_file in
a3bba767
JJ
2234 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2235 ;;
2236 conftest.$ac_ext )
2237 # This is the source file.
86da66b5 2238 ;;
ba479fd2 2239 [ab].out )
86da66b5
HPN
2240 # We found the default executable, but exeext='' is most
2241 # certainly right.
2242 break;;
ba479fd2 2243 *.* )
a3bba767
JJ
2244 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2245 # FIXME: I believe we export ac_cv_exeext for Libtool,
2246 # but it would be cool to find out if it's true. Does anybody
2247 # maintain Libtool? --akim.
2248 export ac_cv_exeext
86da66b5 2249 break;;
ba479fd2 2250 * )
86da66b5 2251 break;;
ba479fd2
NN
2252 esac
2253done
2254else
2255 echo "$as_me: failed program was:" >&5
2256sed 's/^/| /' conftest.$ac_ext >&5
2257
2258{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2259See \`config.log' for more details." >&5
2260echo "$as_me: error: C compiler cannot create executables
2261See \`config.log' for more details." >&2;}
2262 { (exit 77); exit 77; }; }
2263fi
2264
2265ac_exeext=$ac_cv_exeext
a3bba767
JJ
2266echo "$as_me:$LINENO: result: $ac_file" >&5
2267echo "${ECHO_T}$ac_file" >&6
ba479fd2 2268
a3bba767 2269# Check the compiler produces executables we can run. If not, either
ba479fd2 2270# the compiler is broken, or we cross compile.
a3bba767
JJ
2271echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2272echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
ba479fd2
NN
2273# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2274# If not cross compiling, check that we can run a simple program.
2275if test "$cross_compiling" != yes; then
2276 if { ac_try='./$ac_file'
a3bba767
JJ
2277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2278 (eval $ac_try) 2>&5
ba479fd2
NN
2279 ac_status=$?
2280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2281 (exit $ac_status); }; }; then
2282 cross_compiling=no
6e3f3080 2283 else
ba479fd2
NN
2284 if test "$cross_compiling" = maybe; then
2285 cross_compiling=yes
2286 else
2287 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2288If you meant to cross compile, use \`--host'.
2289See \`config.log' for more details." >&5
2290echo "$as_me: error: cannot run C compiled programs.
2291If you meant to cross compile, use \`--host'.
2292See \`config.log' for more details." >&2;}
2293 { (exit 1); exit 1; }; }
2294 fi
6e3f3080
NN
2295 fi
2296fi
a3bba767
JJ
2297echo "$as_me:$LINENO: result: yes" >&5
2298echo "${ECHO_T}yes" >&6
ba479fd2
NN
2299
2300rm -f a.out a.exe conftest$ac_cv_exeext b.out
2301ac_clean_files=$ac_clean_files_save
a3bba767 2302# Check the compiler produces executables we can run. If not, either
ba479fd2 2303# the compiler is broken, or we cross compile.
a3bba767
JJ
2304echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2305echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2306echo "$as_me:$LINENO: result: $cross_compiling" >&5
2307echo "${ECHO_T}$cross_compiling" >&6
2308
2309echo "$as_me:$LINENO: checking for suffix of executables" >&5
2310echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2311if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2312 (eval $ac_link) 2>&5
ba479fd2
NN
2313 ac_status=$?
2314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2315 (exit $ac_status); }; then
2316 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2317# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2318# work properly (i.e., refer to `conftest.exe'), while it won't with
2319# `rm'.
2320for ac_file in conftest.exe conftest conftest.*; do
2321 test -f "$ac_file" || continue
2322 case $ac_file in
a3bba767 2323 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
ba479fd2 2324 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
a3bba767 2325 export ac_cv_exeext
86da66b5 2326 break;;
ba479fd2
NN
2327 * ) break;;
2328 esac
2329done
e9a25f70 2330else
ba479fd2
NN
2331 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2332See \`config.log' for more details." >&5
2333echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2334See \`config.log' for more details." >&2;}
2335 { (exit 1); exit 1; }; }
2336fi
2337
2338rm -f conftest$ac_cv_exeext
a3bba767
JJ
2339echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2340echo "${ECHO_T}$ac_cv_exeext" >&6
ba479fd2
NN
2341
2342rm -f conftest.$ac_ext
2343EXEEXT=$ac_cv_exeext
2344ac_exeext=$EXEEXT
a3bba767
JJ
2345echo "$as_me:$LINENO: checking for suffix of object files" >&5
2346echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
ba479fd2
NN
2347if test "${ac_cv_objext+set}" = set; then
2348 echo $ECHO_N "(cached) $ECHO_C" >&6
2349else
2350 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2351/* confdefs.h. */
2352_ACEOF
2353cat confdefs.h >>conftest.$ac_ext
2354cat >>conftest.$ac_ext <<_ACEOF
2355/* end confdefs.h. */
2356
2357int
2358main ()
2359{
6e3f3080 2360
ba479fd2
NN
2361 ;
2362 return 0;
2363}
2364_ACEOF
2365rm -f conftest.o conftest.obj
a3bba767
JJ
2366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2367 (eval $ac_compile) 2>&5
ba479fd2
NN
2368 ac_status=$?
2369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2370 (exit $ac_status); }; then
a3bba767 2371 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
ba479fd2 2372 case $ac_file in
a3bba767 2373 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
ba479fd2
NN
2374 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2375 break;;
2376 esac
2377done
63cf211a 2378else
ba479fd2
NN
2379 echo "$as_me: failed program was:" >&5
2380sed 's/^/| /' conftest.$ac_ext >&5
2381
2382{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2383See \`config.log' for more details." >&5
2384echo "$as_me: error: cannot compute suffix of object files: cannot compile
2385See \`config.log' for more details." >&2;}
2386 { (exit 1); exit 1; }; }
2387fi
2388
2389rm -f conftest.$ac_cv_objext conftest.$ac_ext
2390fi
a3bba767
JJ
2391echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2392echo "${ECHO_T}$ac_cv_objext" >&6
ba479fd2
NN
2393OBJEXT=$ac_cv_objext
2394ac_objext=$OBJEXT
a3bba767
JJ
2395echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2396echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
ba479fd2
NN
2397if test "${ac_cv_c_compiler_gnu+set}" = set; then
2398 echo $ECHO_N "(cached) $ECHO_C" >&6
2399else
2400 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2401/* confdefs.h. */
2402_ACEOF
2403cat confdefs.h >>conftest.$ac_ext
2404cat >>conftest.$ac_ext <<_ACEOF
2405/* end confdefs.h. */
2406
2407int
2408main ()
2409{
2410#ifndef __GNUC__
2411 choke me
2412#endif
6e3f3080 2413
ba479fd2
NN
2414 ;
2415 return 0;
2416}
2417_ACEOF
2418rm -f conftest.$ac_objext
a3bba767
JJ
2419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2420 (eval $ac_compile) 2>conftest.er1
ba479fd2 2421 ac_status=$?
86da66b5
HPN
2422 grep -v '^ *+' conftest.er1 >conftest.err
2423 rm -f conftest.er1
2424 cat conftest.err >&5
ba479fd2 2425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
2426 (exit $ac_status); } &&
2427 { ac_try='test -z "$ac_c_werror_flag"
2428 || test ! -s conftest.err'
2429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2430 (eval $ac_try) 2>&5
2431 ac_status=$?
2432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2433 (exit $ac_status); }; } &&
2434 { ac_try='test -s conftest.$ac_objext'
2435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2436 (eval $ac_try) 2>&5
2437 ac_status=$?
2438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2439 (exit $ac_status); }; }; then
ba479fd2
NN
2440 ac_compiler_gnu=yes
2441else
2442 echo "$as_me: failed program was:" >&5
2443sed 's/^/| /' conftest.$ac_ext >&5
2444
a3bba767 2445ac_compiler_gnu=no
ba479fd2 2446fi
a3bba767 2447rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2448ac_cv_c_compiler_gnu=$ac_compiler_gnu
2449
2450fi
a3bba767
JJ
2451echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2452echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
ba479fd2
NN
2453GCC=`test $ac_compiler_gnu = yes && echo yes`
2454ac_test_CFLAGS=${CFLAGS+set}
2455ac_save_CFLAGS=$CFLAGS
a3bba767
JJ
2456CFLAGS="-g"
2457echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2458echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
ba479fd2
NN
2459if test "${ac_cv_prog_cc_g+set}" = set; then
2460 echo $ECHO_N "(cached) $ECHO_C" >&6
2461else
a3bba767 2462 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2463/* confdefs.h. */
2464_ACEOF
2465cat confdefs.h >>conftest.$ac_ext
2466cat >>conftest.$ac_ext <<_ACEOF
2467/* end confdefs.h. */
2468
2469int
2470main ()
2471{
2472
2473 ;
2474 return 0;
2475}
2476_ACEOF
2477rm -f conftest.$ac_objext
a3bba767
JJ
2478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2479 (eval $ac_compile) 2>conftest.er1
ba479fd2 2480 ac_status=$?
86da66b5
HPN
2481 grep -v '^ *+' conftest.er1 >conftest.err
2482 rm -f conftest.er1
2483 cat conftest.err >&5
ba479fd2 2484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
2485 (exit $ac_status); } &&
2486 { ac_try='test -z "$ac_c_werror_flag"
2487 || test ! -s conftest.err'
2488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2489 (eval $ac_try) 2>&5
2490 ac_status=$?
2491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2492 (exit $ac_status); }; } &&
2493 { ac_try='test -s conftest.$ac_objext'
2494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2495 (eval $ac_try) 2>&5
2496 ac_status=$?
2497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2498 (exit $ac_status); }; }; then
703d89ab
ZW
2499 ac_cv_prog_cc_g=yes
2500else
2501 echo "$as_me: failed program was:" >&5
2502sed 's/^/| /' conftest.$ac_ext >&5
2503
a3bba767
JJ
2504ac_cv_prog_cc_g=no
2505fi
2506rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2507fi
2508echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2509echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2510if test "$ac_test_CFLAGS" = set; then
2511 CFLAGS=$ac_save_CFLAGS
2512elif test $ac_cv_prog_cc_g = yes; then
2513 if test "$GCC" = yes; then
2514 CFLAGS="-g -O2"
2515 else
2516 CFLAGS="-g"
2517 fi
2518else
2519 if test "$GCC" = yes; then
2520 CFLAGS="-O2"
2521 else
2522 CFLAGS=
2523 fi
2524fi
2525echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2526echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2527if test "${ac_cv_prog_cc_stdc+set}" = set; then
2528 echo $ECHO_N "(cached) $ECHO_C" >&6
2529else
2530 ac_cv_prog_cc_stdc=no
2531ac_save_CC=$CC
2532cat >conftest.$ac_ext <<_ACEOF
703d89ab
ZW
2533/* confdefs.h. */
2534_ACEOF
2535cat confdefs.h >>conftest.$ac_ext
2536cat >>conftest.$ac_ext <<_ACEOF
2537/* end confdefs.h. */
a3bba767
JJ
2538#include <stdarg.h>
2539#include <stdio.h>
2540#include <sys/types.h>
2541#include <sys/stat.h>
2542/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2543struct buf { int x; };
2544FILE * (*rcsopen) (struct buf *, struct stat *, int);
2545static char *e (p, i)
2546 char **p;
2547 int i;
703d89ab 2548{
a3bba767 2549 return p[i];
703d89ab 2550}
a3bba767
JJ
2551static char *f (char * (*g) (char **, int), char **p, ...)
2552{
2553 char *s;
2554 va_list v;
2555 va_start (v,p);
2556 s = g (p, va_arg (v,int));
2557 va_end (v);
2558 return s;
2559}
2560
2561/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2562 function prototypes and stuff, but not '\xHH' hex character constants.
2563 These don't provoke an error unfortunately, instead are silently treated
2564 as 'x'. The following induces an error, until -std1 is added to get
2565 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2566 array size at least. It's necessary to write '\x00'==0 to get something
2567 that's true only with -std1. */
2568int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2569
2570int test (int i, double x);
2571struct s1 {int (*f) (int a);};
2572struct s2 {int (*f) (double a);};
2573int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2574int argc;
2575char **argv;
2576int
2577main ()
2578{
2579return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2580 ;
2581 return 0;
2582}
2583_ACEOF
2584# Don't try gcc -ansi; that turns off useful extensions and
2585# breaks some systems' header files.
2586# AIX -qlanglvl=ansi
2587# Ultrix and OSF/1 -std1
2588# HP-UX 10.20 and later -Ae
2589# HP-UX older versions -Aa -D_HPUX_SOURCE
2590# SVR4 -Xc -D__EXTENSIONS__
2591for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2592do
2593 CC="$ac_save_CC $ac_arg"
2594 rm -f conftest.$ac_objext
2595if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2596 (eval $ac_compile) 2>conftest.er1
2597 ac_status=$?
703d89ab
ZW
2598 grep -v '^ *+' conftest.er1 >conftest.err
2599 rm -f conftest.er1
2600 cat conftest.err >&5
8b1f719a 2601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
2602 (exit $ac_status); } &&
2603 { ac_try='test -z "$ac_c_werror_flag"
2604 || test ! -s conftest.err'
2605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2606 (eval $ac_try) 2>&5
2607 ac_status=$?
2608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2609 (exit $ac_status); }; } &&
2610 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
2616 ac_cv_prog_cc_stdc=$ac_arg
2617break
703d89ab
ZW
2618else
2619 echo "$as_me: failed program was:" >&5
2620sed 's/^/| /' conftest.$ac_ext >&5
2621
a3bba767
JJ
2622fi
2623rm -f conftest.err conftest.$ac_objext
2624done
2625rm -f conftest.$ac_ext conftest.$ac_objext
2626CC=$ac_save_CC
2627
2628fi
2629
2630case "x$ac_cv_prog_cc_stdc" in
2631 x|xno)
2632 echo "$as_me:$LINENO: result: none needed" >&5
2633echo "${ECHO_T}none needed" >&6 ;;
2634 *)
2635 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2636echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2637 CC="$CC $ac_cv_prog_cc_stdc" ;;
2638esac
2639
2640# Some people use a C++ compiler to compile C. Since we use `exit',
2641# in C++ we need to declare it. In case someone uses the same compiler
2642# for both compiling C and C++ we need to have the C++ compiler decide
2643# the declaration of exit, since it's the most demanding environment.
2644cat >conftest.$ac_ext <<_ACEOF
2645#ifndef __cplusplus
2646 choke me
2647#endif
2648_ACEOF
2649rm -f conftest.$ac_objext
2650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2651 (eval $ac_compile) 2>conftest.er1
2652 ac_status=$?
2653 grep -v '^ *+' conftest.er1 >conftest.err
2654 rm -f conftest.er1
2655 cat conftest.err >&5
2656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2657 (exit $ac_status); } &&
2658 { ac_try='test -z "$ac_c_werror_flag"
2659 || test ! -s conftest.err'
2660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2661 (eval $ac_try) 2>&5
2662 ac_status=$?
2663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2664 (exit $ac_status); }; } &&
2665 { ac_try='test -s conftest.$ac_objext'
2666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2667 (eval $ac_try) 2>&5
2668 ac_status=$?
2669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2670 (exit $ac_status); }; }; then
2671 for ac_declaration in \
2672 '' \
2673 'extern "C" void std::exit (int) throw (); using std::exit;' \
2674 'extern "C" void std::exit (int); using std::exit;' \
2675 'extern "C" void exit (int) throw ();' \
2676 'extern "C" void exit (int);' \
2677 'void exit (int);'
2678do
2679 cat >conftest.$ac_ext <<_ACEOF
703d89ab
ZW
2680/* confdefs.h. */
2681_ACEOF
2682cat confdefs.h >>conftest.$ac_ext
2683cat >>conftest.$ac_ext <<_ACEOF
2684/* end confdefs.h. */
a3bba767
JJ
2685$ac_declaration
2686#include <stdlib.h>
703d89ab
ZW
2687int
2688main ()
2689{
a3bba767 2690exit (42);
703d89ab
ZW
2691 ;
2692 return 0;
2693}
2694_ACEOF
2695rm -f conftest.$ac_objext
a3bba767
JJ
2696if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2697 (eval $ac_compile) 2>conftest.er1
8b1f719a 2698 ac_status=$?
703d89ab
ZW
2699 grep -v '^ *+' conftest.er1 >conftest.err
2700 rm -f conftest.er1
2701 cat conftest.err >&5
8b1f719a 2702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
2703 (exit $ac_status); } &&
2704 { ac_try='test -z "$ac_c_werror_flag"
2705 || test ! -s conftest.err'
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); }; } &&
2711 { ac_try='test -s conftest.$ac_objext'
2712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2713 (eval $ac_try) 2>&5
2714 ac_status=$?
2715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2716 (exit $ac_status); }; }; then
2717 :
a6ccdbab
EC
2718else
2719 echo "$as_me: failed program was:" >&5
2720sed 's/^/| /' conftest.$ac_ext >&5
2721
a3bba767 2722continue
8b1f719a 2723fi
a3bba767
JJ
2724rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2725 cat >conftest.$ac_ext <<_ACEOF
a6ccdbab
EC
2726/* confdefs.h. */
2727_ACEOF
2728cat confdefs.h >>conftest.$ac_ext
2729cat >>conftest.$ac_ext <<_ACEOF
2730/* end confdefs.h. */
a3bba767 2731$ac_declaration
8b1f719a
PB
2732int
2733main ()
2734{
a3bba767 2735exit (42);
8b1f719a
PB
2736 ;
2737 return 0;
2738}
2739_ACEOF
a3bba767
JJ
2740rm -f conftest.$ac_objext
2741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2742 (eval $ac_compile) 2>conftest.er1
8b1f719a
PB
2743 ac_status=$?
2744 grep -v '^ *+' conftest.er1 >conftest.err
2745 rm -f conftest.er1
a6ccdbab 2746 cat conftest.err >&5
86da66b5 2747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
2748 (exit $ac_status); } &&
2749 { ac_try='test -z "$ac_c_werror_flag"
2750 || test ! -s conftest.err'
2751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2752 (eval $ac_try) 2>&5
2753 ac_status=$?
2754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2755 (exit $ac_status); }; } &&
2756 { ac_try='test -s conftest.$ac_objext'
2757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2758 (eval $ac_try) 2>&5
2759 ac_status=$?
2760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2761 (exit $ac_status); }; }; then
2762 break
a6ccdbab
EC
2763else
2764 echo "$as_me: failed program was:" >&5
2765sed 's/^/| /' conftest.$ac_ext >&5
2766
8b1f719a 2767fi
a3bba767 2768rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8b1f719a 2769done
a3bba767
JJ
2770rm -f conftest*
2771if test -n "$ac_declaration"; then
2772 echo '#ifdef __cplusplus' >>confdefs.h
2773 echo $ac_declaration >>confdefs.h
2774 echo '#endif' >>confdefs.h
8b1f719a 2775fi
8b1f719a 2776
a3bba767
JJ
2777else
2778 echo "$as_me: failed program was:" >&5
2779sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2780
a3bba767
JJ
2781fi
2782rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2783ac_ext=c
2784ac_cpp='$CPP $CPPFLAGS'
2785ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2786ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2787ac_compiler_gnu=$ac_cv_c_compiler_gnu
2788
2789if test "x$CC" != xcc; then
a3bba767
JJ
2790 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2791echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
ba479fd2 2792else
a3bba767
JJ
2793 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2794echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
ba479fd2
NN
2795fi
2796set dummy $CC; ac_cc=`echo $2 |
2797 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
a3bba767 2798if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
ba479fd2
NN
2799 echo $ECHO_N "(cached) $ECHO_C" >&6
2800else
2801 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2802/* confdefs.h. */
2803_ACEOF
2804cat confdefs.h >>conftest.$ac_ext
2805cat >>conftest.$ac_ext <<_ACEOF
2806/* end confdefs.h. */
2807
2808int
2809main ()
2810{
2811
2812 ;
2813 return 0;
2814}
2815_ACEOF
3ec83fc2
RH
2816# Make sure it works both with $CC and with simple cc.
2817# We do the test twice because some compilers refuse to overwrite an
2818# existing .o file with -o, though they will create one.
a3bba767
JJ
2819ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2820if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2821 (eval $ac_try) 2>&5
ba479fd2
NN
2822 ac_status=$?
2823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2824 (exit $ac_status); } &&
a3bba767
JJ
2825 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2826 (eval $ac_try) 2>&5
ba479fd2
NN
2827 ac_status=$?
2828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2829 (exit $ac_status); };
3ec83fc2
RH
2830then
2831 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2832 if test "x$CC" != xcc; then
2833 # Test first that cc exists at all.
ba479fd2 2834 if { ac_try='cc -c conftest.$ac_ext >&5'
a3bba767
JJ
2835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2836 (eval $ac_try) 2>&5
ba479fd2
NN
2837 ac_status=$?
2838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2839 (exit $ac_status); }; }; then
a3bba767
JJ
2840 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2841 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2842 (eval $ac_try) 2>&5
ba479fd2
NN
2843 ac_status=$?
2844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2845 (exit $ac_status); } &&
a3bba767
JJ
2846 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2847 (eval $ac_try) 2>&5
ba479fd2
NN
2848 ac_status=$?
2849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2850 (exit $ac_status); };
3ec83fc2 2851 then
86da66b5
HPN
2852 # cc works too.
2853 :
3ec83fc2 2854 else
86da66b5
HPN
2855 # cc exists but doesn't like -o.
2856 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2857 fi
2858 fi
2859 fi
2860else
2861 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2862fi
a3bba767 2863rm -f conftest*
3ec83fc2
RH
2864
2865fi
a3bba767
JJ
2866if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
2867 echo "$as_me:$LINENO: result: yes" >&5
2868echo "${ECHO_T}yes" >&6
3ec83fc2 2869else
a3bba767
JJ
2870 echo "$as_me:$LINENO: result: no" >&5
2871echo "${ECHO_T}no" >&6
ba479fd2
NN
2872
2873cat >>confdefs.h <<\_ACEOF
3ec83fc2 2874#define NO_MINUS_C_MINUS_O 1
ba479fd2 2875_ACEOF
3ec83fc2
RH
2876
2877fi
2878
3b620440
KC
2879# expand $ac_aux_dir to an absolute path
2880am_aux_dir=`cd $ac_aux_dir && pwd`
2881
2882# FIXME: we rely on the cache variable name because
2883# there is no other way.
2884set dummy $CC
2885ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2886if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2887 # Losing compiler, so override with the script.
2888 # FIXME: It is wrong to rewrite CC.
2889 # But if we don't then we get into trouble of one sort or another.
2890 # A longer-term fix would be to have automake use am__CC in this case,
2891 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2892 CC="$am_aux_dir/compile $CC"
2893fi
2894
414d23ae
HPN
2895# autoconf is lame and doesn't give us any substitution variable for this.
2896if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2897 NO_MINUS_C_MINUS_O=yes
2898else
2899 OUTPUT_OPTION='-o $@'
2900fi
2901
2902
2903
ec6c7392
PB
2904# Remove the -O2: for historical reasons, unless bootstrapping we prefer
2905# optimizations to be activated explicitly by the toplevel.
2906case "$CC" in
2907 */prev-gcc/xgcc*) ;;
2908 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
2909esac
2910
2911
73458fb7
NN
2912# -------------------------
2913# Check C compiler features
2914# -------------------------
2915
ba479fd2
NN
2916ac_ext=c
2917ac_cpp='$CPP $CPPFLAGS'
2918ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2919ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2920ac_compiler_gnu=$ac_cv_c_compiler_gnu
a3bba767
JJ
2921echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2922echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2923# On Suns, sometimes $CPP names a directory.
2924if test -n "$CPP" && test -d "$CPP"; then
2925 CPP=
2926fi
2927if test -z "$CPP"; then
ba479fd2
NN
2928 if test "${ac_cv_prog_CPP+set}" = set; then
2929 echo $ECHO_N "(cached) $ECHO_C" >&6
2930else
2931 # Double quotes because CPP needs to be expanded
2932 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2933 do
2934 ac_preproc_ok=false
2935for ac_c_preproc_warn_flag in '' yes
2936do
2937 # Use a header file that comes with gcc, so configuring glibc
2938 # with a fresh cross-compiler works.
2939 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2940 # <limits.h> exists even on freestanding compilers.
84c041a1 2941 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2942 # not just through cpp. "Syntax error" is here to catch this case.
2943 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2944/* confdefs.h. */
2945_ACEOF
2946cat confdefs.h >>conftest.$ac_ext
2947cat >>conftest.$ac_ext <<_ACEOF
2948/* end confdefs.h. */
2949#ifdef __STDC__
2950# include <limits.h>
2951#else
2952# include <assert.h>
2953#endif
86da66b5 2954 Syntax error
ba479fd2 2955_ACEOF
a3bba767
JJ
2956if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2957 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
2958 ac_status=$?
2959 grep -v '^ *+' conftest.er1 >conftest.err
2960 rm -f conftest.er1
2961 cat conftest.err >&5
2962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
2963 (exit $ac_status); } >/dev/null; then
2964 if test -s conftest.err; then
2965 ac_cpp_err=$ac_c_preproc_warn_flag
2966 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2967 else
2968 ac_cpp_err=
2969 fi
2970else
2971 ac_cpp_err=yes
2972fi
2973if test -z "$ac_cpp_err"; then
093e61a6 2974 :
cafe096b 2975else
ba479fd2
NN
2976 echo "$as_me: failed program was:" >&5
2977sed 's/^/| /' conftest.$ac_ext >&5
2978
2979 # Broken: fails on valid input.
2980continue
2981fi
2982rm -f conftest.err conftest.$ac_ext
2983
a3bba767 2984 # OK, works on sane cases. Now check whether non-existent headers
ba479fd2
NN
2985 # can be detected and how.
2986 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2987/* confdefs.h. */
2988_ACEOF
2989cat confdefs.h >>conftest.$ac_ext
2990cat >>conftest.$ac_ext <<_ACEOF
2991/* end confdefs.h. */
2992#include <ac_nonexistent.h>
2993_ACEOF
a3bba767
JJ
2994if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2995 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
2996 ac_status=$?
2997 grep -v '^ *+' conftest.er1 >conftest.err
2998 rm -f conftest.er1
2999 cat conftest.err >&5
3000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3001 (exit $ac_status); } >/dev/null; then
3002 if test -s conftest.err; then
3003 ac_cpp_err=$ac_c_preproc_warn_flag
3004 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3005 else
3006 ac_cpp_err=
3007 fi
3008else
3009 ac_cpp_err=yes
3010fi
3011if test -z "$ac_cpp_err"; then
ba479fd2
NN
3012 # Broken: success on invalid input.
3013continue
3014else
3015 echo "$as_me: failed program was:" >&5
3016sed 's/^/| /' conftest.$ac_ext >&5
3017
3018 # Passes both tests.
3019ac_preproc_ok=:
3020break
3021fi
3022rm -f conftest.err conftest.$ac_ext
3023
3024done
3025# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3026rm -f conftest.err conftest.$ac_ext
3027if $ac_preproc_ok; then
3028 break
3029fi
3030
3031 done
3032 ac_cv_prog_CPP=$CPP
3033
3034fi
3035 CPP=$ac_cv_prog_CPP
3036else
3037 ac_cv_prog_CPP=$CPP
3038fi
a3bba767
JJ
3039echo "$as_me:$LINENO: result: $CPP" >&5
3040echo "${ECHO_T}$CPP" >&6
ba479fd2
NN
3041ac_preproc_ok=false
3042for ac_c_preproc_warn_flag in '' yes
3043do
3044 # Use a header file that comes with gcc, so configuring glibc
3045 # with a fresh cross-compiler works.
3046 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3047 # <limits.h> exists even on freestanding compilers.
3048 # On the NeXT, cc -E runs the code through the compiler's parser,
3049 # not just through cpp. "Syntax error" is here to catch this case.
3050 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3051/* confdefs.h. */
3052_ACEOF
3053cat confdefs.h >>conftest.$ac_ext
3054cat >>conftest.$ac_ext <<_ACEOF
3055/* end confdefs.h. */
3056#ifdef __STDC__
3057# include <limits.h>
3058#else
3059# include <assert.h>
3060#endif
86da66b5 3061 Syntax error
ba479fd2 3062_ACEOF
a3bba767
JJ
3063if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3064 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3065 ac_status=$?
3066 grep -v '^ *+' conftest.er1 >conftest.err
3067 rm -f conftest.er1
3068 cat conftest.err >&5
3069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3070 (exit $ac_status); } >/dev/null; then
3071 if test -s conftest.err; then
3072 ac_cpp_err=$ac_c_preproc_warn_flag
3073 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3074 else
3075 ac_cpp_err=
3076 fi
3077else
3078 ac_cpp_err=yes
3079fi
3080if test -z "$ac_cpp_err"; then
6e3f3080 3081 :
414d23ae 3082else
ba479fd2
NN
3083 echo "$as_me: failed program was:" >&5
3084sed 's/^/| /' conftest.$ac_ext >&5
3085
3086 # Broken: fails on valid input.
3087continue
3088fi
3089rm -f conftest.err conftest.$ac_ext
3090
a3bba767 3091 # OK, works on sane cases. Now check whether non-existent headers
ba479fd2
NN
3092 # can be detected and how.
3093 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3094/* confdefs.h. */
3095_ACEOF
3096cat confdefs.h >>conftest.$ac_ext
3097cat >>conftest.$ac_ext <<_ACEOF
3098/* end confdefs.h. */
3099#include <ac_nonexistent.h>
3100_ACEOF
a3bba767
JJ
3101if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3102 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3103 ac_status=$?
3104 grep -v '^ *+' conftest.er1 >conftest.err
3105 rm -f conftest.er1
3106 cat conftest.err >&5
3107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3108 (exit $ac_status); } >/dev/null; then
3109 if test -s conftest.err; then
3110 ac_cpp_err=$ac_c_preproc_warn_flag
3111 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3112 else
3113 ac_cpp_err=
3114 fi
3115else
3116 ac_cpp_err=yes
3117fi
3118if test -z "$ac_cpp_err"; then
ba479fd2
NN
3119 # Broken: success on invalid input.
3120continue
3121else
3122 echo "$as_me: failed program was:" >&5
3123sed 's/^/| /' conftest.$ac_ext >&5
3124
3125 # Passes both tests.
3126ac_preproc_ok=:
3127break
63cf211a 3128fi
ba479fd2
NN
3129rm -f conftest.err conftest.$ac_ext
3130
3131done
3132# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3133rm -f conftest.err conftest.$ac_ext
3134if $ac_preproc_ok; then
3135 :
6e3f3080 3136else
ba479fd2
NN
3137 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3138See \`config.log' for more details." >&5
3139echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3140See \`config.log' for more details." >&2;}
3141 { (exit 1); exit 1; }; }
6e3f3080
NN
3142fi
3143
ba479fd2
NN
3144ac_ext=c
3145ac_cpp='$CPP $CPPFLAGS'
3146ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3147ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3148ac_compiler_gnu=$ac_cv_c_compiler_gnu
3149
b5472e1d 3150
a3bba767
JJ
3151echo "$as_me:$LINENO: checking for inline" >&5
3152echo $ECHO_N "checking for inline... $ECHO_C" >&6
ba479fd2
NN
3153if test "${ac_cv_c_inline+set}" = set; then
3154 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3155else
3156 ac_cv_c_inline=no
3157for ac_kw in inline __inline__ __inline; do
ba479fd2 3158 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3159/* confdefs.h. */
3160_ACEOF
3161cat confdefs.h >>conftest.$ac_ext
3162cat >>conftest.$ac_ext <<_ACEOF
3163/* end confdefs.h. */
3164#ifndef __cplusplus
3165typedef int foo_t;
3166static $ac_kw foo_t static_foo () {return 0; }
3167$ac_kw foo_t foo () {return 0; }
3168#endif
414d23ae 3169
ba479fd2
NN
3170_ACEOF
3171rm -f conftest.$ac_objext
a3bba767
JJ
3172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3173 (eval $ac_compile) 2>conftest.er1
ba479fd2 3174 ac_status=$?
86da66b5
HPN
3175 grep -v '^ *+' conftest.er1 >conftest.err
3176 rm -f conftest.er1
3177 cat conftest.err >&5
ba479fd2 3178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3179 (exit $ac_status); } &&
3180 { ac_try='test -z "$ac_c_werror_flag"
3181 || test ! -s conftest.err'
3182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3183 (eval $ac_try) 2>&5
3184 ac_status=$?
3185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3186 (exit $ac_status); }; } &&
3187 { ac_try='test -s conftest.$ac_objext'
3188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3189 (eval $ac_try) 2>&5
3190 ac_status=$?
3191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3192 (exit $ac_status); }; }; then
3193 ac_cv_c_inline=$ac_kw; break
414d23ae 3194else
ba479fd2
NN
3195 echo "$as_me: failed program was:" >&5
3196sed 's/^/| /' conftest.$ac_ext >&5
3197
414d23ae 3198fi
a3bba767 3199rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3200done
3201
3202fi
a3bba767
JJ
3203echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3204echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3205
3206
ba479fd2 3207case $ac_cv_c_inline in
414d23ae 3208 inline | yes) ;;
86da66b5
HPN
3209 *)
3210 case $ac_cv_c_inline in
3211 no) ac_val=;;
3212 *) ac_val=$ac_cv_c_inline;;
3213 esac
3214 cat >>confdefs.h <<_ACEOF
3215#ifndef __cplusplus
3216#define inline $ac_val
3217#endif
ba479fd2 3218_ACEOF
86da66b5 3219 ;;
414d23ae
HPN
3220esac
3221
414d23ae 3222
414d23ae 3223# sizeof(char) is 1 by definition.
bf3b7cd3 3224
a3bba767
JJ
3225echo "$as_me:$LINENO: checking for egrep" >&5
3226echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3227if test "${ac_cv_prog_egrep+set}" = set; then
703d89ab
ZW
3228 echo $ECHO_N "(cached) $ECHO_C" >&6
3229else
a3bba767
JJ
3230 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3231 then ac_cv_prog_egrep='grep -E'
3232 else ac_cv_prog_egrep='egrep'
703d89ab 3233 fi
a3bba767
JJ
3234fi
3235echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3236echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3237 EGREP=$ac_cv_prog_egrep
703d89ab
ZW
3238
3239
a3bba767
JJ
3240echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3241echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
bf3b7cd3
JD
3242if test "${ac_cv_header_stdc+set}" = set; then
3243 echo $ECHO_N "(cached) $ECHO_C" >&6
3244else
3245 cat >conftest.$ac_ext <<_ACEOF
3246/* confdefs.h. */
3247_ACEOF
3248cat confdefs.h >>conftest.$ac_ext
3249cat >>conftest.$ac_ext <<_ACEOF
3250/* end confdefs.h. */
3251#include <stdlib.h>
3252#include <stdarg.h>
3253#include <string.h>
3254#include <float.h>
3255
3256int
3257main ()
3258{
3259
3260 ;
3261 return 0;
3262}
3263_ACEOF
3264rm -f conftest.$ac_objext
a3bba767
JJ
3265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3266 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3267 ac_status=$?
3268 grep -v '^ *+' conftest.er1 >conftest.err
3269 rm -f conftest.er1
3270 cat conftest.err >&5
3271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3272 (exit $ac_status); } &&
3273 { ac_try='test -z "$ac_c_werror_flag"
3274 || test ! -s conftest.err'
3275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3276 (eval $ac_try) 2>&5
3277 ac_status=$?
3278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3279 (exit $ac_status); }; } &&
3280 { ac_try='test -s conftest.$ac_objext'
3281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3282 (eval $ac_try) 2>&5
3283 ac_status=$?
3284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3285 (exit $ac_status); }; }; then
bf3b7cd3
JD
3286 ac_cv_header_stdc=yes
3287else
3288 echo "$as_me: failed program was:" >&5
3289sed 's/^/| /' conftest.$ac_ext >&5
3290
a3bba767 3291ac_cv_header_stdc=no
bf3b7cd3 3292fi
a3bba767 3293rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3294
3295if test $ac_cv_header_stdc = yes; then
3296 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3297 cat >conftest.$ac_ext <<_ACEOF
3298/* confdefs.h. */
3299_ACEOF
3300cat confdefs.h >>conftest.$ac_ext
3301cat >>conftest.$ac_ext <<_ACEOF
3302/* end confdefs.h. */
3303#include <string.h>
3304
3305_ACEOF
3306if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3307 $EGREP "memchr" >/dev/null 2>&1; then
3308 :
3309else
3310 ac_cv_header_stdc=no
3311fi
3312rm -f conftest*
3313
3314fi
3315
3316if test $ac_cv_header_stdc = yes; then
3317 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3318 cat >conftest.$ac_ext <<_ACEOF
3319/* confdefs.h. */
3320_ACEOF
3321cat confdefs.h >>conftest.$ac_ext
3322cat >>conftest.$ac_ext <<_ACEOF
3323/* end confdefs.h. */
3324#include <stdlib.h>
3325
3326_ACEOF
3327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3328 $EGREP "free" >/dev/null 2>&1; then
3329 :
3330else
3331 ac_cv_header_stdc=no
3332fi
3333rm -f conftest*
3334
3335fi
3336
3337if test $ac_cv_header_stdc = yes; then
3338 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3339 if test "$cross_compiling" = yes; then
3340 :
3341else
3342 cat >conftest.$ac_ext <<_ACEOF
3343/* confdefs.h. */
3344_ACEOF
3345cat confdefs.h >>conftest.$ac_ext
3346cat >>conftest.$ac_ext <<_ACEOF
3347/* end confdefs.h. */
3348#include <ctype.h>
3349#if ((' ' & 0x0FF) == 0x020)
3350# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3351# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3352#else
3353# define ISLOWER(c) \
3354 (('a' <= (c) && (c) <= 'i') \
3355 || ('j' <= (c) && (c) <= 'r') \
3356 || ('s' <= (c) && (c) <= 'z'))
3357# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3358#endif
3359
3360#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3361int
3362main ()
3363{
3364 int i;
3365 for (i = 0; i < 256; i++)
3366 if (XOR (islower (i), ISLOWER (i))
3367 || toupper (i) != TOUPPER (i))
a3bba767
JJ
3368 exit(2);
3369 exit (0);
bf3b7cd3
JD
3370}
3371_ACEOF
3372rm -f conftest$ac_exeext
a3bba767
JJ
3373if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3374 (eval $ac_link) 2>&5
bf3b7cd3
JD
3375 ac_status=$?
3376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3377 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
3378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3379 (eval $ac_try) 2>&5
bf3b7cd3
JD
3380 ac_status=$?
3381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3382 (exit $ac_status); }; }; then
3383 :
3384else
3385 echo "$as_me: program exited with status $ac_status" >&5
3386echo "$as_me: failed program was:" >&5
3387sed 's/^/| /' conftest.$ac_ext >&5
3388
3389( exit $ac_status )
3390ac_cv_header_stdc=no
3391fi
a3bba767 3392rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3393fi
3394fi
703d89ab 3395fi
a3bba767
JJ
3396echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3397echo "${ECHO_T}$ac_cv_header_stdc" >&6
bf3b7cd3
JD
3398if test $ac_cv_header_stdc = yes; then
3399
3400cat >>confdefs.h <<\_ACEOF
3401#define STDC_HEADERS 1
3402_ACEOF
3403
3404fi
3405
3406# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3417 inttypes.h stdint.h unistd.h
3418do
3419as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a3bba767
JJ
3420echo "$as_me:$LINENO: checking for $ac_header" >&5
3421echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3422if eval "test \"\${$as_ac_Header+set}\" = set"; then
bf3b7cd3
JD
3423 echo $ECHO_N "(cached) $ECHO_C" >&6
3424else
3425 cat >conftest.$ac_ext <<_ACEOF
3426/* confdefs.h. */
3427_ACEOF
3428cat confdefs.h >>conftest.$ac_ext
3429cat >>conftest.$ac_ext <<_ACEOF
3430/* end confdefs.h. */
3431$ac_includes_default
3432
3433#include <$ac_header>
3434_ACEOF
3435rm -f conftest.$ac_objext
a3bba767
JJ
3436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3437 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3438 ac_status=$?
3439 grep -v '^ *+' conftest.er1 >conftest.err
3440 rm -f conftest.er1
3441 cat conftest.err >&5
3442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3443 (exit $ac_status); } &&
3444 { ac_try='test -z "$ac_c_werror_flag"
3445 || test ! -s conftest.err'
3446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3447 (eval $ac_try) 2>&5
3448 ac_status=$?
3449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3450 (exit $ac_status); }; } &&
3451 { ac_try='test -s conftest.$ac_objext'
3452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3453 (eval $ac_try) 2>&5
3454 ac_status=$?
3455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3456 (exit $ac_status); }; }; then
bf3b7cd3
JD
3457 eval "$as_ac_Header=yes"
3458else
3459 echo "$as_me: failed program was:" >&5
3460sed 's/^/| /' conftest.$ac_ext >&5
3461
a3bba767 3462eval "$as_ac_Header=no"
bf3b7cd3 3463fi
a3bba767 3464rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 3465fi
a3bba767
JJ
3466echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3467echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bf3b7cd3
JD
3468if test `eval echo '${'$as_ac_Header'}'` = yes; then
3469 cat >>confdefs.h <<_ACEOF
3470#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3471_ACEOF
3472
3473fi
3474
3475done
3476
3477
a3bba767
JJ
3478echo "$as_me:$LINENO: checking for void *" >&5
3479echo $ECHO_N "checking for void *... $ECHO_C" >&6
bf3b7cd3
JD
3480if test "${ac_cv_type_void_p+set}" = set; then
3481 echo $ECHO_N "(cached) $ECHO_C" >&6
3482else
3483 cat >conftest.$ac_ext <<_ACEOF
3484/* confdefs.h. */
3485_ACEOF
3486cat confdefs.h >>conftest.$ac_ext
3487cat >>conftest.$ac_ext <<_ACEOF
3488/* end confdefs.h. */
3489$ac_includes_default
3490int
3491main ()
3492{
a3bba767 3493if ((void * *) 0)
bf3b7cd3 3494 return 0;
a3bba767 3495if (sizeof (void *))
bf3b7cd3
JD
3496 return 0;
3497 ;
3498 return 0;
3499}
3500_ACEOF
3501rm -f conftest.$ac_objext
a3bba767
JJ
3502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3503 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3504 ac_status=$?
3505 grep -v '^ *+' conftest.er1 >conftest.err
3506 rm -f conftest.er1
3507 cat conftest.err >&5
3508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3509 (exit $ac_status); } &&
3510 { ac_try='test -z "$ac_c_werror_flag"
3511 || test ! -s conftest.err'
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'
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
bf3b7cd3
JD
3523 ac_cv_type_void_p=yes
3524else
3525 echo "$as_me: failed program was:" >&5
3526sed 's/^/| /' conftest.$ac_ext >&5
3527
a3bba767 3528ac_cv_type_void_p=no
bf3b7cd3 3529fi
a3bba767 3530rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 3531fi
a3bba767
JJ
3532echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3533echo "${ECHO_T}$ac_cv_type_void_p" >&6
bf3b7cd3 3534
a3bba767
JJ
3535echo "$as_me:$LINENO: checking size of void *" >&5
3536echo $ECHO_N "checking size of void *... $ECHO_C" >&6
ba479fd2
NN
3537if test "${ac_cv_sizeof_void_p+set}" = set; then
3538 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 3539else
a3bba767
JJ
3540 if test "$ac_cv_type_void_p" = yes; then
3541 # The cast to unsigned long works around a bug in the HP C Compiler
3542 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3543 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3544 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
3545 if test "$cross_compiling" = yes; then
3546 # Depending upon the size, compute the lo and hi bounds.
3547cat >conftest.$ac_ext <<_ACEOF
3548/* confdefs.h. */
3549_ACEOF
3550cat confdefs.h >>conftest.$ac_ext
3551cat >>conftest.$ac_ext <<_ACEOF
3552/* end confdefs.h. */
3553$ac_includes_default
3554int
3555main ()
3556{
a3bba767 3557static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
bf3b7cd3
JD
3558test_array [0] = 0
3559
3560 ;
3561 return 0;
3562}
3563_ACEOF
3564rm -f conftest.$ac_objext
a3bba767
JJ
3565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3566 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3567 ac_status=$?
3568 grep -v '^ *+' conftest.er1 >conftest.err
3569 rm -f conftest.er1
3570 cat conftest.err >&5
3571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3572 (exit $ac_status); } &&
3573 { ac_try='test -z "$ac_c_werror_flag"
3574 || test ! -s conftest.err'
3575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3576 (eval $ac_try) 2>&5
3577 ac_status=$?
3578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3579 (exit $ac_status); }; } &&
3580 { ac_try='test -s conftest.$ac_objext'
3581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3582 (eval $ac_try) 2>&5
3583 ac_status=$?
3584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3585 (exit $ac_status); }; }; then
bf3b7cd3
JD
3586 ac_lo=0 ac_mid=0
3587 while :; do
3588 cat >conftest.$ac_ext <<_ACEOF
3589/* confdefs.h. */
3590_ACEOF
3591cat confdefs.h >>conftest.$ac_ext
3592cat >>conftest.$ac_ext <<_ACEOF
3593/* end confdefs.h. */
3594$ac_includes_default
3595int
3596main ()
3597{
a3bba767 3598static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
3599test_array [0] = 0
3600
3601 ;
3602 return 0;
3603}
3604_ACEOF
3605rm -f conftest.$ac_objext
a3bba767
JJ
3606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3607 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3608 ac_status=$?
3609 grep -v '^ *+' conftest.er1 >conftest.err
3610 rm -f conftest.er1
3611 cat conftest.err >&5
3612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3613 (exit $ac_status); } &&
3614 { ac_try='test -z "$ac_c_werror_flag"
3615 || test ! -s conftest.err'
3616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3617 (eval $ac_try) 2>&5
3618 ac_status=$?
3619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3620 (exit $ac_status); }; } &&
3621 { ac_try='test -s conftest.$ac_objext'
3622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3623 (eval $ac_try) 2>&5
3624 ac_status=$?
3625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3626 (exit $ac_status); }; }; then
bf3b7cd3
JD
3627 ac_hi=$ac_mid; break
3628else
3629 echo "$as_me: failed program was:" >&5
3630sed 's/^/| /' conftest.$ac_ext >&5
3631
a3bba767
JJ
3632ac_lo=`expr $ac_mid + 1`
3633 if test $ac_lo -le $ac_mid; then
3634 ac_lo= ac_hi=
3635 break
3636 fi
3637 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 3638fi
a3bba767 3639rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3640 done
3641else
3642 echo "$as_me: failed program was:" >&5
3643sed 's/^/| /' conftest.$ac_ext >&5
3644
a3bba767 3645cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
3646/* confdefs.h. */
3647_ACEOF
3648cat confdefs.h >>conftest.$ac_ext
3649cat >>conftest.$ac_ext <<_ACEOF
3650/* end confdefs.h. */
3651$ac_includes_default
3652int
3653main ()
3654{
a3bba767 3655static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
bf3b7cd3
JD
3656test_array [0] = 0
3657
3658 ;
3659 return 0;
3660}
3661_ACEOF
3662rm -f conftest.$ac_objext
a3bba767
JJ
3663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3664 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3665 ac_status=$?
3666 grep -v '^ *+' conftest.er1 >conftest.err
3667 rm -f conftest.er1
3668 cat conftest.err >&5
3669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3670 (exit $ac_status); } &&
3671 { ac_try='test -z "$ac_c_werror_flag"
3672 || test ! -s conftest.err'
3673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3674 (eval $ac_try) 2>&5
3675 ac_status=$?
3676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3677 (exit $ac_status); }; } &&
3678 { ac_try='test -s conftest.$ac_objext'
3679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3680 (eval $ac_try) 2>&5
3681 ac_status=$?
3682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3683 (exit $ac_status); }; }; then
bf3b7cd3
JD
3684 ac_hi=-1 ac_mid=-1
3685 while :; do
3686 cat >conftest.$ac_ext <<_ACEOF
3687/* confdefs.h. */
3688_ACEOF
3689cat confdefs.h >>conftest.$ac_ext
3690cat >>conftest.$ac_ext <<_ACEOF
3691/* end confdefs.h. */
3692$ac_includes_default
3693int
3694main ()
3695{
a3bba767 3696static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
bf3b7cd3
JD
3697test_array [0] = 0
3698
3699 ;
3700 return 0;
3701}
3702_ACEOF
3703rm -f conftest.$ac_objext
a3bba767
JJ
3704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3705 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3706 ac_status=$?
3707 grep -v '^ *+' conftest.er1 >conftest.err
3708 rm -f conftest.er1
3709 cat conftest.err >&5
3710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3711 (exit $ac_status); } &&
3712 { ac_try='test -z "$ac_c_werror_flag"
3713 || test ! -s conftest.err'
3714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3715 (eval $ac_try) 2>&5
3716 ac_status=$?
3717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3718 (exit $ac_status); }; } &&
3719 { ac_try='test -s conftest.$ac_objext'
3720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3721 (eval $ac_try) 2>&5
3722 ac_status=$?
3723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3724 (exit $ac_status); }; }; then
bf3b7cd3
JD
3725 ac_lo=$ac_mid; break
3726else
3727 echo "$as_me: failed program was:" >&5
3728sed 's/^/| /' conftest.$ac_ext >&5
3729
a3bba767
JJ
3730ac_hi=`expr '(' $ac_mid ')' - 1`
3731 if test $ac_mid -le $ac_hi; then
3732 ac_lo= ac_hi=
3733 break
3734 fi
3735 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 3736fi
a3bba767 3737rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3738 done
3739else
3740 echo "$as_me: failed program was:" >&5
3741sed 's/^/| /' conftest.$ac_ext >&5
3742
a3bba767 3743ac_lo= ac_hi=
bf3b7cd3 3744fi
a3bba767 3745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 3746fi
a3bba767 3747rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3748# Binary search between lo and hi bounds.
3749while test "x$ac_lo" != "x$ac_hi"; do
3750 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3751 cat >conftest.$ac_ext <<_ACEOF
3752/* confdefs.h. */
3753_ACEOF
3754cat confdefs.h >>conftest.$ac_ext
3755cat >>conftest.$ac_ext <<_ACEOF
3756/* end confdefs.h. */
3757$ac_includes_default
3758int
3759main ()
3760{
a3bba767 3761static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
3762test_array [0] = 0
3763
3764 ;
3765 return 0;
3766}
3767_ACEOF
3768rm -f conftest.$ac_objext
a3bba767
JJ
3769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3770 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
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
a3bba767
JJ
3776 (exit $ac_status); } &&
3777 { ac_try='test -z "$ac_c_werror_flag"
3778 || test ! -s conftest.err'
3779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3780 (eval $ac_try) 2>&5
3781 ac_status=$?
3782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3783 (exit $ac_status); }; } &&
3784 { ac_try='test -s conftest.$ac_objext'
3785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3786 (eval $ac_try) 2>&5
3787 ac_status=$?
3788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3789 (exit $ac_status); }; }; then
bf3b7cd3
JD
3790 ac_hi=$ac_mid
3791else
3792 echo "$as_me: failed program was:" >&5
3793sed 's/^/| /' conftest.$ac_ext >&5
3794
a3bba767 3795ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 3796fi
a3bba767 3797rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3798done
3799case $ac_lo in
3800?*) ac_cv_sizeof_void_p=$ac_lo;;
a3bba767 3801'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 3802See \`config.log' for more details." >&5
a3bba767 3803echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 3804See \`config.log' for more details." >&2;}
a3bba767 3805 { (exit 1); exit 1; }; } ;;
bf3b7cd3 3806esac
a3bba767
JJ
3807else
3808 if test "$cross_compiling" = yes; then
3809 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
3810See \`config.log' for more details." >&5
3811echo "$as_me: error: cannot run test program while cross compiling
3812See \`config.log' for more details." >&2;}
3813 { (exit 1); exit 1; }; }
bf3b7cd3
JD
3814else
3815 cat >conftest.$ac_ext <<_ACEOF
3816/* confdefs.h. */
3817_ACEOF
3818cat confdefs.h >>conftest.$ac_ext
3819cat >>conftest.$ac_ext <<_ACEOF
3820/* end confdefs.h. */
3821$ac_includes_default
a3bba767
JJ
3822long longval () { return (long) (sizeof (void *)); }
3823unsigned long ulongval () { return (long) (sizeof (void *)); }
bf3b7cd3
JD
3824#include <stdio.h>
3825#include <stdlib.h>
3826int
3827main ()
3828{
3829
3830 FILE *f = fopen ("conftest.val", "w");
3831 if (! f)
a3bba767
JJ
3832 exit (1);
3833 if (((long) (sizeof (void *))) < 0)
bf3b7cd3 3834 {
a3bba767
JJ
3835 long i = longval ();
3836 if (i != ((long) (sizeof (void *))))
3837 exit (1);
bf3b7cd3
JD
3838 fprintf (f, "%ld\n", i);
3839 }
3840 else
3841 {
a3bba767
JJ
3842 unsigned long i = ulongval ();
3843 if (i != ((long) (sizeof (void *))))
3844 exit (1);
bf3b7cd3
JD
3845 fprintf (f, "%lu\n", i);
3846 }
a3bba767 3847 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
3848
3849 ;
3850 return 0;
3851}
3852_ACEOF
3853rm -f conftest$ac_exeext
a3bba767
JJ
3854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3855 (eval $ac_link) 2>&5
bf3b7cd3
JD
3856 ac_status=$?
3857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3858 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
3859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3860 (eval $ac_try) 2>&5
bf3b7cd3
JD
3861 ac_status=$?
3862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3863 (exit $ac_status); }; }; then
3864 ac_cv_sizeof_void_p=`cat conftest.val`
3865else
3866 echo "$as_me: program exited with status $ac_status" >&5
3867echo "$as_me: failed program was:" >&5
3868sed 's/^/| /' conftest.$ac_ext >&5
3869
3870( exit $ac_status )
a3bba767 3871{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 3872See \`config.log' for more details." >&5
a3bba767 3873echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 3874See \`config.log' for more details." >&2;}
a3bba767
JJ
3875 { (exit 1); exit 1; }; }
3876fi
3877rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3878fi
3879fi
3880rm -f conftest.val
a3bba767
JJ
3881else
3882 ac_cv_sizeof_void_p=0
bf3b7cd3 3883fi
a3bba767
JJ
3884fi
3885echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3886echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
bf3b7cd3
JD
3887cat >>confdefs.h <<_ACEOF
3888#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3889_ACEOF
3890
3891
a3bba767
JJ
3892echo "$as_me:$LINENO: checking for short" >&5
3893echo $ECHO_N "checking for short... $ECHO_C" >&6
bf3b7cd3
JD
3894if test "${ac_cv_type_short+set}" = set; then
3895 echo $ECHO_N "(cached) $ECHO_C" >&6
3896else
3897 cat >conftest.$ac_ext <<_ACEOF
3898/* confdefs.h. */
3899_ACEOF
3900cat confdefs.h >>conftest.$ac_ext
3901cat >>conftest.$ac_ext <<_ACEOF
3902/* end confdefs.h. */
3903$ac_includes_default
3904int
3905main ()
3906{
a3bba767 3907if ((short *) 0)
bf3b7cd3 3908 return 0;
a3bba767 3909if (sizeof (short))
bf3b7cd3
JD
3910 return 0;
3911 ;
3912 return 0;
3913}
3914_ACEOF
3915rm -f conftest.$ac_objext
a3bba767
JJ
3916if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3917 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3918 ac_status=$?
3919 grep -v '^ *+' conftest.er1 >conftest.err
3920 rm -f conftest.er1
3921 cat conftest.err >&5
3922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3923 (exit $ac_status); } &&
3924 { ac_try='test -z "$ac_c_werror_flag"
3925 || test ! -s conftest.err'
3926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3927 (eval $ac_try) 2>&5
3928 ac_status=$?
3929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3930 (exit $ac_status); }; } &&
3931 { ac_try='test -s conftest.$ac_objext'
3932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3933 (eval $ac_try) 2>&5
3934 ac_status=$?
3935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3936 (exit $ac_status); }; }; then
bf3b7cd3
JD
3937 ac_cv_type_short=yes
3938else
3939 echo "$as_me: failed program was:" >&5
3940sed 's/^/| /' conftest.$ac_ext >&5
3941
a3bba767 3942ac_cv_type_short=no
bf3b7cd3 3943fi
a3bba767 3944rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 3945fi
a3bba767
JJ
3946echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
3947echo "${ECHO_T}$ac_cv_type_short" >&6
bf3b7cd3 3948
a3bba767
JJ
3949echo "$as_me:$LINENO: checking size of short" >&5
3950echo $ECHO_N "checking size of short... $ECHO_C" >&6
bf3b7cd3
JD
3951if test "${ac_cv_sizeof_short+set}" = set; then
3952 echo $ECHO_N "(cached) $ECHO_C" >&6
3953else
a3bba767
JJ
3954 if test "$ac_cv_type_short" = yes; then
3955 # The cast to unsigned long works around a bug in the HP C Compiler
3956 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3957 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3958 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
3959 if test "$cross_compiling" = yes; then
3960 # Depending upon the size, compute the lo and hi bounds.
3961cat >conftest.$ac_ext <<_ACEOF
3962/* confdefs.h. */
3963_ACEOF
3964cat confdefs.h >>conftest.$ac_ext
3965cat >>conftest.$ac_ext <<_ACEOF
3966/* end confdefs.h. */
3967$ac_includes_default
3968int
3969main ()
3970{
a3bba767 3971static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
bf3b7cd3
JD
3972test_array [0] = 0
3973
3974 ;
3975 return 0;
3976}
3977_ACEOF
3978rm -f conftest.$ac_objext
a3bba767
JJ
3979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3980 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3981 ac_status=$?
3982 grep -v '^ *+' conftest.er1 >conftest.err
3983 rm -f conftest.er1
3984 cat conftest.err >&5
3985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3986 (exit $ac_status); } &&
3987 { ac_try='test -z "$ac_c_werror_flag"
3988 || test ! -s conftest.err'
3989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3990 (eval $ac_try) 2>&5
3991 ac_status=$?
3992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3993 (exit $ac_status); }; } &&
3994 { ac_try='test -s conftest.$ac_objext'
3995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3996 (eval $ac_try) 2>&5
3997 ac_status=$?
3998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3999 (exit $ac_status); }; }; then
bf3b7cd3
JD
4000 ac_lo=0 ac_mid=0
4001 while :; do
4002 cat >conftest.$ac_ext <<_ACEOF
4003/* confdefs.h. */
4004_ACEOF
4005cat confdefs.h >>conftest.$ac_ext
4006cat >>conftest.$ac_ext <<_ACEOF
4007/* end confdefs.h. */
4008$ac_includes_default
4009int
4010main ()
4011{
a3bba767 4012static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
4013test_array [0] = 0
4014
4015 ;
4016 return 0;
4017}
4018_ACEOF
4019rm -f conftest.$ac_objext
a3bba767
JJ
4020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4021 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4022 ac_status=$?
4023 grep -v '^ *+' conftest.er1 >conftest.err
4024 rm -f conftest.er1
4025 cat conftest.err >&5
4026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4027 (exit $ac_status); } &&
4028 { ac_try='test -z "$ac_c_werror_flag"
4029 || test ! -s conftest.err'
4030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4031 (eval $ac_try) 2>&5
4032 ac_status=$?
4033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4034 (exit $ac_status); }; } &&
4035 { ac_try='test -s conftest.$ac_objext'
4036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4037 (eval $ac_try) 2>&5
4038 ac_status=$?
4039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4040 (exit $ac_status); }; }; then
bf3b7cd3
JD
4041 ac_hi=$ac_mid; break
4042else
4043 echo "$as_me: failed program was:" >&5
4044sed 's/^/| /' conftest.$ac_ext >&5
4045
a3bba767
JJ
4046ac_lo=`expr $ac_mid + 1`
4047 if test $ac_lo -le $ac_mid; then
4048 ac_lo= ac_hi=
4049 break
4050 fi
4051 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4052fi
a3bba767 4053rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4054 done
4055else
4056 echo "$as_me: failed program was:" >&5
4057sed 's/^/| /' conftest.$ac_ext >&5
4058
a3bba767 4059cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4060/* confdefs.h. */
4061_ACEOF
4062cat confdefs.h >>conftest.$ac_ext
4063cat >>conftest.$ac_ext <<_ACEOF
4064/* end confdefs.h. */
4065$ac_includes_default
4066int
4067main ()
4068{
a3bba767 4069static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
bf3b7cd3
JD
4070test_array [0] = 0
4071
4072 ;
4073 return 0;
4074}
4075_ACEOF
4076rm -f conftest.$ac_objext
a3bba767
JJ
4077if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4078 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4079 ac_status=$?
4080 grep -v '^ *+' conftest.er1 >conftest.err
4081 rm -f conftest.er1
4082 cat conftest.err >&5
4083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4084 (exit $ac_status); } &&
4085 { ac_try='test -z "$ac_c_werror_flag"
4086 || test ! -s conftest.err'
4087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4088 (eval $ac_try) 2>&5
4089 ac_status=$?
4090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4091 (exit $ac_status); }; } &&
4092 { ac_try='test -s conftest.$ac_objext'
4093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4094 (eval $ac_try) 2>&5
4095 ac_status=$?
4096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4097 (exit $ac_status); }; }; then
bf3b7cd3
JD
4098 ac_hi=-1 ac_mid=-1
4099 while :; do
4100 cat >conftest.$ac_ext <<_ACEOF
4101/* confdefs.h. */
4102_ACEOF
4103cat confdefs.h >>conftest.$ac_ext
4104cat >>conftest.$ac_ext <<_ACEOF
4105/* end confdefs.h. */
4106$ac_includes_default
4107int
4108main ()
4109{
a3bba767 4110static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
bf3b7cd3
JD
4111test_array [0] = 0
4112
4113 ;
4114 return 0;
4115}
4116_ACEOF
4117rm -f conftest.$ac_objext
a3bba767
JJ
4118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4119 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4120 ac_status=$?
4121 grep -v '^ *+' conftest.er1 >conftest.err
4122 rm -f conftest.er1
4123 cat conftest.err >&5
4124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4125 (exit $ac_status); } &&
4126 { ac_try='test -z "$ac_c_werror_flag"
4127 || test ! -s conftest.err'
4128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4129 (eval $ac_try) 2>&5
4130 ac_status=$?
4131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4132 (exit $ac_status); }; } &&
4133 { ac_try='test -s conftest.$ac_objext'
4134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4135 (eval $ac_try) 2>&5
4136 ac_status=$?
4137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4138 (exit $ac_status); }; }; then
bf3b7cd3
JD
4139 ac_lo=$ac_mid; break
4140else
4141 echo "$as_me: failed program was:" >&5
4142sed 's/^/| /' conftest.$ac_ext >&5
4143
a3bba767
JJ
4144ac_hi=`expr '(' $ac_mid ')' - 1`
4145 if test $ac_mid -le $ac_hi; then
4146 ac_lo= ac_hi=
4147 break
4148 fi
4149 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4150fi
a3bba767 4151rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4152 done
4153else
4154 echo "$as_me: failed program was:" >&5
4155sed 's/^/| /' conftest.$ac_ext >&5
4156
a3bba767 4157ac_lo= ac_hi=
bf3b7cd3 4158fi
a3bba767 4159rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4160fi
a3bba767 4161rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4162# Binary search between lo and hi bounds.
4163while test "x$ac_lo" != "x$ac_hi"; do
4164 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4165 cat >conftest.$ac_ext <<_ACEOF
4166/* confdefs.h. */
4167_ACEOF
4168cat confdefs.h >>conftest.$ac_ext
4169cat >>conftest.$ac_ext <<_ACEOF
4170/* end confdefs.h. */
4171$ac_includes_default
4172int
4173main ()
4174{
a3bba767 4175static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
4176test_array [0] = 0
4177
4178 ;
4179 return 0;
4180}
4181_ACEOF
4182rm -f conftest.$ac_objext
a3bba767
JJ
4183if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4184 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4185 ac_status=$?
4186 grep -v '^ *+' conftest.er1 >conftest.err
4187 rm -f conftest.er1
4188 cat conftest.err >&5
4189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4190 (exit $ac_status); } &&
4191 { ac_try='test -z "$ac_c_werror_flag"
4192 || test ! -s conftest.err'
4193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4194 (eval $ac_try) 2>&5
4195 ac_status=$?
4196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4197 (exit $ac_status); }; } &&
4198 { ac_try='test -s conftest.$ac_objext'
4199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4200 (eval $ac_try) 2>&5
4201 ac_status=$?
4202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4203 (exit $ac_status); }; }; then
bf3b7cd3
JD
4204 ac_hi=$ac_mid
4205else
4206 echo "$as_me: failed program was:" >&5
4207sed 's/^/| /' conftest.$ac_ext >&5
4208
a3bba767 4209ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 4210fi
a3bba767 4211rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4212done
4213case $ac_lo in
4214?*) ac_cv_sizeof_short=$ac_lo;;
a3bba767 4215'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 4216See \`config.log' for more details." >&5
a3bba767 4217echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 4218See \`config.log' for more details." >&2;}
a3bba767 4219 { (exit 1); exit 1; }; } ;;
bf3b7cd3 4220esac
a3bba767
JJ
4221else
4222 if test "$cross_compiling" = yes; then
4223 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4224See \`config.log' for more details." >&5
4225echo "$as_me: error: cannot run test program while cross compiling
4226See \`config.log' for more details." >&2;}
4227 { (exit 1); exit 1; }; }
8b1f719a
PB
4228else
4229 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4230/* confdefs.h. */
4231_ACEOF
4232cat confdefs.h >>conftest.$ac_ext
4233cat >>conftest.$ac_ext <<_ACEOF
4234/* end confdefs.h. */
4235$ac_includes_default
a3bba767
JJ
4236long longval () { return (long) (sizeof (short)); }
4237unsigned long ulongval () { return (long) (sizeof (short)); }
bf3b7cd3
JD
4238#include <stdio.h>
4239#include <stdlib.h>
4240int
4241main ()
4242{
4243
4244 FILE *f = fopen ("conftest.val", "w");
4245 if (! f)
a3bba767
JJ
4246 exit (1);
4247 if (((long) (sizeof (short))) < 0)
bf3b7cd3 4248 {
a3bba767
JJ
4249 long i = longval ();
4250 if (i != ((long) (sizeof (short))))
4251 exit (1);
bf3b7cd3
JD
4252 fprintf (f, "%ld\n", i);
4253 }
4254 else
4255 {
a3bba767
JJ
4256 unsigned long i = ulongval ();
4257 if (i != ((long) (sizeof (short))))
4258 exit (1);
bf3b7cd3
JD
4259 fprintf (f, "%lu\n", i);
4260 }
a3bba767 4261 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
4262
4263 ;
4264 return 0;
4265}
4266_ACEOF
4267rm -f conftest$ac_exeext
a3bba767
JJ
4268if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4269 (eval $ac_link) 2>&5
bf3b7cd3
JD
4270 ac_status=$?
4271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4272 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
4273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4274 (eval $ac_try) 2>&5
bf3b7cd3
JD
4275 ac_status=$?
4276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4277 (exit $ac_status); }; }; then
4278 ac_cv_sizeof_short=`cat conftest.val`
4279else
4280 echo "$as_me: program exited with status $ac_status" >&5
4281echo "$as_me: failed program was:" >&5
4282sed 's/^/| /' conftest.$ac_ext >&5
4283
4284( exit $ac_status )
a3bba767 4285{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 4286See \`config.log' for more details." >&5
a3bba767 4287echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 4288See \`config.log' for more details." >&2;}
a3bba767
JJ
4289 { (exit 1); exit 1; }; }
4290fi
4291rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4292fi
4293fi
4294rm -f conftest.val
a3bba767
JJ
4295else
4296 ac_cv_sizeof_short=0
bf3b7cd3 4297fi
a3bba767
JJ
4298fi
4299echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4300echo "${ECHO_T}$ac_cv_sizeof_short" >&6
bf3b7cd3
JD
4301cat >>confdefs.h <<_ACEOF
4302#define SIZEOF_SHORT $ac_cv_sizeof_short
4303_ACEOF
4304
4305
a3bba767
JJ
4306echo "$as_me:$LINENO: checking for int" >&5
4307echo $ECHO_N "checking for int... $ECHO_C" >&6
bf3b7cd3
JD
4308if test "${ac_cv_type_int+set}" = set; then
4309 echo $ECHO_N "(cached) $ECHO_C" >&6
4310else
4311 cat >conftest.$ac_ext <<_ACEOF
4312/* confdefs.h. */
4313_ACEOF
4314cat confdefs.h >>conftest.$ac_ext
4315cat >>conftest.$ac_ext <<_ACEOF
4316/* end confdefs.h. */
4317$ac_includes_default
4318int
4319main ()
4320{
a3bba767 4321if ((int *) 0)
bf3b7cd3 4322 return 0;
a3bba767 4323if (sizeof (int))
bf3b7cd3
JD
4324 return 0;
4325 ;
4326 return 0;
4327}
4328_ACEOF
4329rm -f conftest.$ac_objext
a3bba767
JJ
4330if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4331 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4332 ac_status=$?
4333 grep -v '^ *+' conftest.er1 >conftest.err
4334 rm -f conftest.er1
4335 cat conftest.err >&5
4336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4337 (exit $ac_status); } &&
4338 { ac_try='test -z "$ac_c_werror_flag"
4339 || test ! -s conftest.err'
4340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4341 (eval $ac_try) 2>&5
4342 ac_status=$?
4343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4344 (exit $ac_status); }; } &&
4345 { ac_try='test -s conftest.$ac_objext'
4346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4347 (eval $ac_try) 2>&5
4348 ac_status=$?
4349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4350 (exit $ac_status); }; }; then
bf3b7cd3
JD
4351 ac_cv_type_int=yes
4352else
4353 echo "$as_me: failed program was:" >&5
4354sed 's/^/| /' conftest.$ac_ext >&5
4355
a3bba767 4356ac_cv_type_int=no
bf3b7cd3 4357fi
a3bba767 4358rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4359fi
a3bba767
JJ
4360echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4361echo "${ECHO_T}$ac_cv_type_int" >&6
bf3b7cd3 4362
a3bba767
JJ
4363echo "$as_me:$LINENO: checking size of int" >&5
4364echo $ECHO_N "checking size of int... $ECHO_C" >&6
bf3b7cd3
JD
4365if test "${ac_cv_sizeof_int+set}" = set; then
4366 echo $ECHO_N "(cached) $ECHO_C" >&6
4367else
a3bba767
JJ
4368 if test "$ac_cv_type_int" = yes; then
4369 # The cast to unsigned long works around a bug in the HP C Compiler
4370 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4371 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4372 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4373 if test "$cross_compiling" = yes; then
4374 # Depending upon the size, compute the lo and hi bounds.
4375cat >conftest.$ac_ext <<_ACEOF
4376/* confdefs.h. */
4377_ACEOF
4378cat confdefs.h >>conftest.$ac_ext
4379cat >>conftest.$ac_ext <<_ACEOF
4380/* end confdefs.h. */
4381$ac_includes_default
4382int
4383main ()
4384{
a3bba767 4385static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
bf3b7cd3
JD
4386test_array [0] = 0
4387
4388 ;
4389 return 0;
4390}
4391_ACEOF
4392rm -f conftest.$ac_objext
a3bba767
JJ
4393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4394 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4395 ac_status=$?
4396 grep -v '^ *+' conftest.er1 >conftest.err
4397 rm -f conftest.er1
4398 cat conftest.err >&5
4399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4400 (exit $ac_status); } &&
4401 { ac_try='test -z "$ac_c_werror_flag"
4402 || test ! -s conftest.err'
4403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4404 (eval $ac_try) 2>&5
4405 ac_status=$?
4406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4407 (exit $ac_status); }; } &&
4408 { ac_try='test -s conftest.$ac_objext'
4409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4410 (eval $ac_try) 2>&5
4411 ac_status=$?
4412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4413 (exit $ac_status); }; }; then
bf3b7cd3
JD
4414 ac_lo=0 ac_mid=0
4415 while :; do
4416 cat >conftest.$ac_ext <<_ACEOF
4417/* confdefs.h. */
4418_ACEOF
4419cat confdefs.h >>conftest.$ac_ext
4420cat >>conftest.$ac_ext <<_ACEOF
4421/* end confdefs.h. */
4422$ac_includes_default
4423int
4424main ()
4425{
a3bba767 4426static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
4427test_array [0] = 0
4428
4429 ;
4430 return 0;
4431}
4432_ACEOF
4433rm -f conftest.$ac_objext
a3bba767
JJ
4434if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4435 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4436 ac_status=$?
4437 grep -v '^ *+' conftest.er1 >conftest.err
4438 rm -f conftest.er1
4439 cat conftest.err >&5
4440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4441 (exit $ac_status); } &&
4442 { ac_try='test -z "$ac_c_werror_flag"
4443 || test ! -s conftest.err'
4444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4445 (eval $ac_try) 2>&5
4446 ac_status=$?
4447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4448 (exit $ac_status); }; } &&
4449 { ac_try='test -s conftest.$ac_objext'
4450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4451 (eval $ac_try) 2>&5
4452 ac_status=$?
4453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4454 (exit $ac_status); }; }; then
bf3b7cd3
JD
4455 ac_hi=$ac_mid; break
4456else
4457 echo "$as_me: failed program was:" >&5
4458sed 's/^/| /' conftest.$ac_ext >&5
4459
a3bba767
JJ
4460ac_lo=`expr $ac_mid + 1`
4461 if test $ac_lo -le $ac_mid; then
4462 ac_lo= ac_hi=
4463 break
4464 fi
4465 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4466fi
a3bba767 4467rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4468 done
4469else
4470 echo "$as_me: failed program was:" >&5
4471sed 's/^/| /' conftest.$ac_ext >&5
4472
a3bba767 4473cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4474/* confdefs.h. */
4475_ACEOF
4476cat confdefs.h >>conftest.$ac_ext
4477cat >>conftest.$ac_ext <<_ACEOF
4478/* end confdefs.h. */
4479$ac_includes_default
4480int
4481main ()
4482{
a3bba767 4483static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
bf3b7cd3
JD
4484test_array [0] = 0
4485
4486 ;
4487 return 0;
4488}
4489_ACEOF
4490rm -f conftest.$ac_objext
a3bba767
JJ
4491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4492 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4493 ac_status=$?
4494 grep -v '^ *+' conftest.er1 >conftest.err
4495 rm -f conftest.er1
4496 cat conftest.err >&5
4497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4498 (exit $ac_status); } &&
4499 { ac_try='test -z "$ac_c_werror_flag"
4500 || test ! -s conftest.err'
4501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4502 (eval $ac_try) 2>&5
4503 ac_status=$?
4504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4505 (exit $ac_status); }; } &&
4506 { ac_try='test -s conftest.$ac_objext'
4507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4508 (eval $ac_try) 2>&5
4509 ac_status=$?
4510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4511 (exit $ac_status); }; }; then
bf3b7cd3
JD
4512 ac_hi=-1 ac_mid=-1
4513 while :; do
4514 cat >conftest.$ac_ext <<_ACEOF
4515/* confdefs.h. */
4516_ACEOF
4517cat confdefs.h >>conftest.$ac_ext
4518cat >>conftest.$ac_ext <<_ACEOF
4519/* end confdefs.h. */
4520$ac_includes_default
4521int
4522main ()
4523{
a3bba767 4524static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
bf3b7cd3
JD
4525test_array [0] = 0
4526
4527 ;
4528 return 0;
4529}
4530_ACEOF
4531rm -f conftest.$ac_objext
a3bba767
JJ
4532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4533 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4534 ac_status=$?
4535 grep -v '^ *+' conftest.er1 >conftest.err
4536 rm -f conftest.er1
4537 cat conftest.err >&5
4538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4539 (exit $ac_status); } &&
4540 { ac_try='test -z "$ac_c_werror_flag"
4541 || test ! -s conftest.err'
4542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4543 (eval $ac_try) 2>&5
4544 ac_status=$?
4545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4546 (exit $ac_status); }; } &&
4547 { ac_try='test -s conftest.$ac_objext'
4548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4549 (eval $ac_try) 2>&5
4550 ac_status=$?
4551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4552 (exit $ac_status); }; }; then
bf3b7cd3
JD
4553 ac_lo=$ac_mid; break
4554else
4555 echo "$as_me: failed program was:" >&5
4556sed 's/^/| /' conftest.$ac_ext >&5
4557
a3bba767
JJ
4558ac_hi=`expr '(' $ac_mid ')' - 1`
4559 if test $ac_mid -le $ac_hi; then
4560 ac_lo= ac_hi=
4561 break
4562 fi
4563 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4564fi
a3bba767 4565rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4566 done
4567else
4568 echo "$as_me: failed program was:" >&5
4569sed 's/^/| /' conftest.$ac_ext >&5
4570
a3bba767 4571ac_lo= ac_hi=
bf3b7cd3 4572fi
a3bba767 4573rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4574fi
a3bba767 4575rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4576# Binary search between lo and hi bounds.
4577while test "x$ac_lo" != "x$ac_hi"; do
4578 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4579 cat >conftest.$ac_ext <<_ACEOF
4580/* confdefs.h. */
4581_ACEOF
4582cat confdefs.h >>conftest.$ac_ext
4583cat >>conftest.$ac_ext <<_ACEOF
4584/* end confdefs.h. */
4585$ac_includes_default
4586int
4587main ()
4588{
a3bba767 4589static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
4590test_array [0] = 0
4591
4592 ;
4593 return 0;
4594}
4595_ACEOF
4596rm -f conftest.$ac_objext
a3bba767
JJ
4597if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4598 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4599 ac_status=$?
4600 grep -v '^ *+' conftest.er1 >conftest.err
4601 rm -f conftest.er1
4602 cat conftest.err >&5
4603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4604 (exit $ac_status); } &&
4605 { ac_try='test -z "$ac_c_werror_flag"
4606 || test ! -s conftest.err'
4607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4608 (eval $ac_try) 2>&5
4609 ac_status=$?
4610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4611 (exit $ac_status); }; } &&
4612 { ac_try='test -s conftest.$ac_objext'
4613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4614 (eval $ac_try) 2>&5
4615 ac_status=$?
4616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4617 (exit $ac_status); }; }; then
bf3b7cd3
JD
4618 ac_hi=$ac_mid
4619else
4620 echo "$as_me: failed program was:" >&5
4621sed 's/^/| /' conftest.$ac_ext >&5
4622
a3bba767 4623ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 4624fi
a3bba767 4625rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4626done
4627case $ac_lo in
4628?*) ac_cv_sizeof_int=$ac_lo;;
a3bba767 4629'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 4630See \`config.log' for more details." >&5
a3bba767 4631echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 4632See \`config.log' for more details." >&2;}
a3bba767 4633 { (exit 1); exit 1; }; } ;;
bf3b7cd3 4634esac
a3bba767
JJ
4635else
4636 if test "$cross_compiling" = yes; then
4637 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4638See \`config.log' for more details." >&5
4639echo "$as_me: error: cannot run test program while cross compiling
4640See \`config.log' for more details." >&2;}
4641 { (exit 1); exit 1; }; }
bf3b7cd3
JD
4642else
4643 cat >conftest.$ac_ext <<_ACEOF
4644/* confdefs.h. */
4645_ACEOF
4646cat confdefs.h >>conftest.$ac_ext
4647cat >>conftest.$ac_ext <<_ACEOF
4648/* end confdefs.h. */
4649$ac_includes_default
a3bba767
JJ
4650long longval () { return (long) (sizeof (int)); }
4651unsigned long ulongval () { return (long) (sizeof (int)); }
bf3b7cd3
JD
4652#include <stdio.h>
4653#include <stdlib.h>
4654int
4655main ()
4656{
4657
4658 FILE *f = fopen ("conftest.val", "w");
4659 if (! f)
a3bba767
JJ
4660 exit (1);
4661 if (((long) (sizeof (int))) < 0)
bf3b7cd3 4662 {
a3bba767
JJ
4663 long i = longval ();
4664 if (i != ((long) (sizeof (int))))
4665 exit (1);
bf3b7cd3
JD
4666 fprintf (f, "%ld\n", i);
4667 }
4668 else
4669 {
a3bba767
JJ
4670 unsigned long i = ulongval ();
4671 if (i != ((long) (sizeof (int))))
4672 exit (1);
bf3b7cd3
JD
4673 fprintf (f, "%lu\n", i);
4674 }
a3bba767 4675 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
4676
4677 ;
4678 return 0;
4679}
4680_ACEOF
4681rm -f conftest$ac_exeext
a3bba767
JJ
4682if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4683 (eval $ac_link) 2>&5
bf3b7cd3
JD
4684 ac_status=$?
4685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4686 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
4687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4688 (eval $ac_try) 2>&5
bf3b7cd3
JD
4689 ac_status=$?
4690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4691 (exit $ac_status); }; }; then
4692 ac_cv_sizeof_int=`cat conftest.val`
4693else
4694 echo "$as_me: program exited with status $ac_status" >&5
4695echo "$as_me: failed program was:" >&5
4696sed 's/^/| /' conftest.$ac_ext >&5
4697
4698( exit $ac_status )
a3bba767 4699{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 4700See \`config.log' for more details." >&5
a3bba767 4701echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 4702See \`config.log' for more details." >&2;}
a3bba767
JJ
4703 { (exit 1); exit 1; }; }
4704fi
4705rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4706fi
4707fi
4708rm -f conftest.val
a3bba767
JJ
4709else
4710 ac_cv_sizeof_int=0
bf3b7cd3 4711fi
a3bba767
JJ
4712fi
4713echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4714echo "${ECHO_T}$ac_cv_sizeof_int" >&6
bf3b7cd3
JD
4715cat >>confdefs.h <<_ACEOF
4716#define SIZEOF_INT $ac_cv_sizeof_int
4717_ACEOF
4718
4719
a3bba767
JJ
4720echo "$as_me:$LINENO: checking for long" >&5
4721echo $ECHO_N "checking for long... $ECHO_C" >&6
bf3b7cd3
JD
4722if test "${ac_cv_type_long+set}" = set; then
4723 echo $ECHO_N "(cached) $ECHO_C" >&6
4724else
4725 cat >conftest.$ac_ext <<_ACEOF
4726/* confdefs.h. */
4727_ACEOF
4728cat confdefs.h >>conftest.$ac_ext
4729cat >>conftest.$ac_ext <<_ACEOF
4730/* end confdefs.h. */
4731$ac_includes_default
4732int
4733main ()
4734{
a3bba767 4735if ((long *) 0)
bf3b7cd3 4736 return 0;
a3bba767 4737if (sizeof (long))
bf3b7cd3
JD
4738 return 0;
4739 ;
4740 return 0;
4741}
4742_ACEOF
4743rm -f conftest.$ac_objext
a3bba767
JJ
4744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4745 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4746 ac_status=$?
4747 grep -v '^ *+' conftest.er1 >conftest.err
4748 rm -f conftest.er1
4749 cat conftest.err >&5
4750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4751 (exit $ac_status); } &&
4752 { ac_try='test -z "$ac_c_werror_flag"
4753 || test ! -s conftest.err'
4754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4755 (eval $ac_try) 2>&5
4756 ac_status=$?
4757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4758 (exit $ac_status); }; } &&
4759 { ac_try='test -s conftest.$ac_objext'
4760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4761 (eval $ac_try) 2>&5
4762 ac_status=$?
4763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4764 (exit $ac_status); }; }; then
bf3b7cd3
JD
4765 ac_cv_type_long=yes
4766else
4767 echo "$as_me: failed program was:" >&5
4768sed 's/^/| /' conftest.$ac_ext >&5
4769
a3bba767 4770ac_cv_type_long=no
bf3b7cd3 4771fi
a3bba767 4772rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4773fi
a3bba767
JJ
4774echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4775echo "${ECHO_T}$ac_cv_type_long" >&6
bf3b7cd3 4776
a3bba767
JJ
4777echo "$as_me:$LINENO: checking size of long" >&5
4778echo $ECHO_N "checking size of long... $ECHO_C" >&6
bf3b7cd3
JD
4779if test "${ac_cv_sizeof_long+set}" = set; then
4780 echo $ECHO_N "(cached) $ECHO_C" >&6
4781else
a3bba767
JJ
4782 if test "$ac_cv_type_long" = yes; then
4783 # The cast to unsigned long works around a bug in the HP C Compiler
4784 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4785 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4786 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4787 if test "$cross_compiling" = yes; then
4788 # Depending upon the size, compute the lo and hi bounds.
4789cat >conftest.$ac_ext <<_ACEOF
4790/* confdefs.h. */
4791_ACEOF
4792cat confdefs.h >>conftest.$ac_ext
4793cat >>conftest.$ac_ext <<_ACEOF
4794/* end confdefs.h. */
4795$ac_includes_default
4796int
4797main ()
4798{
a3bba767 4799static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
bf3b7cd3
JD
4800test_array [0] = 0
4801
4802 ;
4803 return 0;
4804}
4805_ACEOF
4806rm -f conftest.$ac_objext
a3bba767
JJ
4807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4808 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4809 ac_status=$?
4810 grep -v '^ *+' conftest.er1 >conftest.err
4811 rm -f conftest.er1
4812 cat conftest.err >&5
4813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4814 (exit $ac_status); } &&
4815 { ac_try='test -z "$ac_c_werror_flag"
4816 || test ! -s conftest.err'
4817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4818 (eval $ac_try) 2>&5
4819 ac_status=$?
4820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4821 (exit $ac_status); }; } &&
4822 { ac_try='test -s conftest.$ac_objext'
4823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4824 (eval $ac_try) 2>&5
4825 ac_status=$?
4826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4827 (exit $ac_status); }; }; then
bf3b7cd3
JD
4828 ac_lo=0 ac_mid=0
4829 while :; do
4830 cat >conftest.$ac_ext <<_ACEOF
4831/* confdefs.h. */
4832_ACEOF
4833cat confdefs.h >>conftest.$ac_ext
4834cat >>conftest.$ac_ext <<_ACEOF
4835/* end confdefs.h. */
4836$ac_includes_default
4837int
4838main ()
4839{
a3bba767 4840static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
4841test_array [0] = 0
4842
4843 ;
4844 return 0;
4845}
4846_ACEOF
4847rm -f conftest.$ac_objext
a3bba767
JJ
4848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4849 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4850 ac_status=$?
4851 grep -v '^ *+' conftest.er1 >conftest.err
4852 rm -f conftest.er1
4853 cat conftest.err >&5
4854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4855 (exit $ac_status); } &&
4856 { ac_try='test -z "$ac_c_werror_flag"
4857 || test ! -s conftest.err'
4858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4859 (eval $ac_try) 2>&5
4860 ac_status=$?
4861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862 (exit $ac_status); }; } &&
4863 { ac_try='test -s conftest.$ac_objext'
4864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4865 (eval $ac_try) 2>&5
4866 ac_status=$?
4867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4868 (exit $ac_status); }; }; then
bf3b7cd3
JD
4869 ac_hi=$ac_mid; break
4870else
4871 echo "$as_me: failed program was:" >&5
4872sed 's/^/| /' conftest.$ac_ext >&5
4873
a3bba767
JJ
4874ac_lo=`expr $ac_mid + 1`
4875 if test $ac_lo -le $ac_mid; then
4876 ac_lo= ac_hi=
4877 break
4878 fi
4879 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4880fi
a3bba767 4881rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4882 done
4883else
4884 echo "$as_me: failed program was:" >&5
4885sed 's/^/| /' conftest.$ac_ext >&5
4886
a3bba767 4887cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4888/* confdefs.h. */
4889_ACEOF
4890cat confdefs.h >>conftest.$ac_ext
4891cat >>conftest.$ac_ext <<_ACEOF
4892/* end confdefs.h. */
4893$ac_includes_default
4894int
4895main ()
4896{
a3bba767 4897static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
bf3b7cd3
JD
4898test_array [0] = 0
4899
4900 ;
4901 return 0;
4902}
4903_ACEOF
4904rm -f conftest.$ac_objext
a3bba767
JJ
4905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4906 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4907 ac_status=$?
4908 grep -v '^ *+' conftest.er1 >conftest.err
4909 rm -f conftest.er1
4910 cat conftest.err >&5
4911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4912 (exit $ac_status); } &&
4913 { ac_try='test -z "$ac_c_werror_flag"
4914 || test ! -s conftest.err'
4915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4916 (eval $ac_try) 2>&5
4917 ac_status=$?
4918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4919 (exit $ac_status); }; } &&
4920 { ac_try='test -s conftest.$ac_objext'
4921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4922 (eval $ac_try) 2>&5
4923 ac_status=$?
4924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4925 (exit $ac_status); }; }; then
bf3b7cd3
JD
4926 ac_hi=-1 ac_mid=-1
4927 while :; do
4928 cat >conftest.$ac_ext <<_ACEOF
4929/* confdefs.h. */
4930_ACEOF
4931cat confdefs.h >>conftest.$ac_ext
4932cat >>conftest.$ac_ext <<_ACEOF
4933/* end confdefs.h. */
4934$ac_includes_default
4935int
4936main ()
4937{
a3bba767 4938static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
bf3b7cd3
JD
4939test_array [0] = 0
4940
4941 ;
4942 return 0;
4943}
4944_ACEOF
4945rm -f conftest.$ac_objext
a3bba767
JJ
4946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4947 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4948 ac_status=$?
4949 grep -v '^ *+' conftest.er1 >conftest.err
4950 rm -f conftest.er1
4951 cat conftest.err >&5
4952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4953 (exit $ac_status); } &&
4954 { ac_try='test -z "$ac_c_werror_flag"
4955 || test ! -s conftest.err'
4956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4957 (eval $ac_try) 2>&5
4958 ac_status=$?
4959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4960 (exit $ac_status); }; } &&
4961 { ac_try='test -s conftest.$ac_objext'
4962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4963 (eval $ac_try) 2>&5
4964 ac_status=$?
4965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4966 (exit $ac_status); }; }; then
bf3b7cd3
JD
4967 ac_lo=$ac_mid; break
4968else
4969 echo "$as_me: failed program was:" >&5
4970sed 's/^/| /' conftest.$ac_ext >&5
4971
a3bba767
JJ
4972ac_hi=`expr '(' $ac_mid ')' - 1`
4973 if test $ac_mid -le $ac_hi; then
4974 ac_lo= ac_hi=
4975 break
4976 fi
4977 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4978fi
a3bba767 4979rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4980 done
4981else
4982 echo "$as_me: failed program was:" >&5
4983sed 's/^/| /' conftest.$ac_ext >&5
4984
a3bba767 4985ac_lo= ac_hi=
bf3b7cd3 4986fi
a3bba767 4987rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4988fi
a3bba767 4989rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4990# Binary search between lo and hi bounds.
4991while test "x$ac_lo" != "x$ac_hi"; do
4992 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4993 cat >conftest.$ac_ext <<_ACEOF
4994/* confdefs.h. */
4995_ACEOF
4996cat confdefs.h >>conftest.$ac_ext
4997cat >>conftest.$ac_ext <<_ACEOF
4998/* end confdefs.h. */
4999$ac_includes_default
5000int
5001main ()
5002{
a3bba767 5003static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
5004test_array [0] = 0
5005
5006 ;
5007 return 0;
5008}
5009_ACEOF
5010rm -f conftest.$ac_objext
a3bba767
JJ
5011if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5012 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5013 ac_status=$?
5014 grep -v '^ *+' conftest.er1 >conftest.err
5015 rm -f conftest.er1
5016 cat conftest.err >&5
5017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5018 (exit $ac_status); } &&
5019 { ac_try='test -z "$ac_c_werror_flag"
5020 || test ! -s conftest.err'
5021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5022 (eval $ac_try) 2>&5
5023 ac_status=$?
5024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5025 (exit $ac_status); }; } &&
5026 { ac_try='test -s conftest.$ac_objext'
5027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5028 (eval $ac_try) 2>&5
5029 ac_status=$?
5030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5031 (exit $ac_status); }; }; then
bf3b7cd3
JD
5032 ac_hi=$ac_mid
5033else
5034 echo "$as_me: failed program was:" >&5
5035sed 's/^/| /' conftest.$ac_ext >&5
5036
a3bba767 5037ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5038fi
a3bba767 5039rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5040done
5041case $ac_lo in
5042?*) ac_cv_sizeof_long=$ac_lo;;
a3bba767 5043'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 5044See \`config.log' for more details." >&5
a3bba767 5045echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 5046See \`config.log' for more details." >&2;}
a3bba767 5047 { (exit 1); exit 1; }; } ;;
bf3b7cd3 5048esac
a3bba767
JJ
5049else
5050 if test "$cross_compiling" = yes; then
5051 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5052See \`config.log' for more details." >&5
5053echo "$as_me: error: cannot run test program while cross compiling
5054See \`config.log' for more details." >&2;}
5055 { (exit 1); exit 1; }; }
bf3b7cd3
JD
5056else
5057 cat >conftest.$ac_ext <<_ACEOF
5058/* confdefs.h. */
5059_ACEOF
5060cat confdefs.h >>conftest.$ac_ext
5061cat >>conftest.$ac_ext <<_ACEOF
5062/* end confdefs.h. */
5063$ac_includes_default
a3bba767
JJ
5064long longval () { return (long) (sizeof (long)); }
5065unsigned long ulongval () { return (long) (sizeof (long)); }
bf3b7cd3
JD
5066#include <stdio.h>
5067#include <stdlib.h>
5068int
5069main ()
5070{
5071
5072 FILE *f = fopen ("conftest.val", "w");
5073 if (! f)
a3bba767
JJ
5074 exit (1);
5075 if (((long) (sizeof (long))) < 0)
bf3b7cd3 5076 {
a3bba767
JJ
5077 long i = longval ();
5078 if (i != ((long) (sizeof (long))))
5079 exit (1);
bf3b7cd3
JD
5080 fprintf (f, "%ld\n", i);
5081 }
5082 else
5083 {
a3bba767
JJ
5084 unsigned long i = ulongval ();
5085 if (i != ((long) (sizeof (long))))
5086 exit (1);
bf3b7cd3
JD
5087 fprintf (f, "%lu\n", i);
5088 }
a3bba767 5089 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5090
5091 ;
5092 return 0;
5093}
5094_ACEOF
5095rm -f conftest$ac_exeext
a3bba767
JJ
5096if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5097 (eval $ac_link) 2>&5
bf3b7cd3
JD
5098 ac_status=$?
5099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
5101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5102 (eval $ac_try) 2>&5
bf3b7cd3
JD
5103 ac_status=$?
5104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5105 (exit $ac_status); }; }; then
5106 ac_cv_sizeof_long=`cat conftest.val`
5107else
5108 echo "$as_me: program exited with status $ac_status" >&5
5109echo "$as_me: failed program was:" >&5
5110sed 's/^/| /' conftest.$ac_ext >&5
5111
5112( exit $ac_status )
a3bba767 5113{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 5114See \`config.log' for more details." >&5
a3bba767 5115echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 5116See \`config.log' for more details." >&2;}
a3bba767
JJ
5117 { (exit 1); exit 1; }; }
5118fi
5119rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5120fi
5121fi
5122rm -f conftest.val
a3bba767
JJ
5123else
5124 ac_cv_sizeof_long=0
bf3b7cd3 5125fi
a3bba767
JJ
5126fi
5127echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5128echo "${ECHO_T}$ac_cv_sizeof_long" >&6
bf3b7cd3
JD
5129cat >>confdefs.h <<_ACEOF
5130#define SIZEOF_LONG $ac_cv_sizeof_long
5131_ACEOF
5132
5133
a3bba767
JJ
5134echo "$as_me:$LINENO: checking for long long" >&5
5135echo $ECHO_N "checking for long long... $ECHO_C" >&6
5ec1c5e6
KC
5136if test "${ac_cv_type_long_long+set}" = set; then
5137 echo $ECHO_N "(cached) $ECHO_C" >&6
5138else
5139 cat >conftest.$ac_ext <<_ACEOF
5140/* confdefs.h. */
5141_ACEOF
5142cat confdefs.h >>conftest.$ac_ext
5143cat >>conftest.$ac_ext <<_ACEOF
5144/* end confdefs.h. */
5145$ac_includes_default
5146int
5147main ()
5148{
a3bba767 5149if ((long long *) 0)
5ec1c5e6 5150 return 0;
a3bba767 5151if (sizeof (long long))
5ec1c5e6
KC
5152 return 0;
5153 ;
5154 return 0;
5155}
5156_ACEOF
5157rm -f conftest.$ac_objext
a3bba767
JJ
5158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5159 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
5160 ac_status=$?
5161 grep -v '^ *+' conftest.er1 >conftest.err
5162 rm -f conftest.er1
5163 cat conftest.err >&5
5164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5165 (exit $ac_status); } &&
5166 { ac_try='test -z "$ac_c_werror_flag"
5167 || test ! -s conftest.err'
5168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5169 (eval $ac_try) 2>&5
5170 ac_status=$?
5171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5172 (exit $ac_status); }; } &&
5173 { ac_try='test -s conftest.$ac_objext'
5174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5175 (eval $ac_try) 2>&5
5176 ac_status=$?
5177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5178 (exit $ac_status); }; }; then
5ec1c5e6
KC
5179 ac_cv_type_long_long=yes
5180else
5181 echo "$as_me: failed program was:" >&5
5182sed 's/^/| /' conftest.$ac_ext >&5
5183
a3bba767 5184ac_cv_type_long_long=no
5ec1c5e6 5185fi
a3bba767 5186rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 5187fi
a3bba767
JJ
5188echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5189echo "${ECHO_T}$ac_cv_type_long_long" >&6
5ec1c5e6
KC
5190if test $ac_cv_type_long_long = yes; then
5191
5192cat >>confdefs.h <<_ACEOF
5193#define HAVE_LONG_LONG 1
5194_ACEOF
5195
a3bba767
JJ
5196echo "$as_me:$LINENO: checking for long long" >&5
5197echo $ECHO_N "checking for long long... $ECHO_C" >&6
bf3b7cd3
JD
5198if test "${ac_cv_type_long_long+set}" = set; then
5199 echo $ECHO_N "(cached) $ECHO_C" >&6
5200else
5201 cat >conftest.$ac_ext <<_ACEOF
5202/* confdefs.h. */
5203_ACEOF
5204cat confdefs.h >>conftest.$ac_ext
5205cat >>conftest.$ac_ext <<_ACEOF
5206/* end confdefs.h. */
5207$ac_includes_default
5208int
5209main ()
5210{
a3bba767 5211if ((long long *) 0)
bf3b7cd3 5212 return 0;
a3bba767 5213if (sizeof (long long))
bf3b7cd3
JD
5214 return 0;
5215 ;
5216 return 0;
5217}
5218_ACEOF
5219rm -f conftest.$ac_objext
a3bba767
JJ
5220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5221 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5222 ac_status=$?
5223 grep -v '^ *+' conftest.er1 >conftest.err
5224 rm -f conftest.er1
5225 cat conftest.err >&5
5226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5227 (exit $ac_status); } &&
5228 { ac_try='test -z "$ac_c_werror_flag"
5229 || test ! -s conftest.err'
5230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5231 (eval $ac_try) 2>&5
5232 ac_status=$?
5233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5234 (exit $ac_status); }; } &&
5235 { ac_try='test -s conftest.$ac_objext'
5236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5237 (eval $ac_try) 2>&5
5238 ac_status=$?
5239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5240 (exit $ac_status); }; }; then
5241 ac_cv_type_long_long=yes
5242else
bf3b7cd3
JD
5243 echo "$as_me: failed program was:" >&5
5244sed 's/^/| /' conftest.$ac_ext >&5
5245
a3bba767 5246ac_cv_type_long_long=no
bf3b7cd3 5247fi
a3bba767 5248rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5249fi
a3bba767
JJ
5250echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5251echo "${ECHO_T}$ac_cv_type_long_long" >&6
bf3b7cd3 5252
a3bba767
JJ
5253echo "$as_me:$LINENO: checking size of long long" >&5
5254echo $ECHO_N "checking size of long long... $ECHO_C" >&6
bf3b7cd3
JD
5255if test "${ac_cv_sizeof_long_long+set}" = set; then
5256 echo $ECHO_N "(cached) $ECHO_C" >&6
5257else
a3bba767
JJ
5258 if test "$ac_cv_type_long_long" = yes; then
5259 # The cast to unsigned long works around a bug in the HP C Compiler
5260 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5261 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5262 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5263 if test "$cross_compiling" = yes; then
5264 # Depending upon the size, compute the lo and hi bounds.
5265cat >conftest.$ac_ext <<_ACEOF
5266/* confdefs.h. */
5267_ACEOF
5268cat confdefs.h >>conftest.$ac_ext
5269cat >>conftest.$ac_ext <<_ACEOF
5270/* end confdefs.h. */
5271$ac_includes_default
5272int
5273main ()
5274{
a3bba767 5275static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
bf3b7cd3
JD
5276test_array [0] = 0
5277
5278 ;
5279 return 0;
5280}
5281_ACEOF
5282rm -f conftest.$ac_objext
a3bba767
JJ
5283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5284 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5285 ac_status=$?
5286 grep -v '^ *+' conftest.er1 >conftest.err
5287 rm -f conftest.er1
5288 cat conftest.err >&5
5289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5290 (exit $ac_status); } &&
5291 { ac_try='test -z "$ac_c_werror_flag"
5292 || test ! -s conftest.err'
5293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5294 (eval $ac_try) 2>&5
5295 ac_status=$?
5296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5297 (exit $ac_status); }; } &&
5298 { ac_try='test -s conftest.$ac_objext'
5299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5300 (eval $ac_try) 2>&5
5301 ac_status=$?
5302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5303 (exit $ac_status); }; }; then
bf3b7cd3
JD
5304 ac_lo=0 ac_mid=0
5305 while :; do
5306 cat >conftest.$ac_ext <<_ACEOF
5307/* confdefs.h. */
5308_ACEOF
5309cat confdefs.h >>conftest.$ac_ext
5310cat >>conftest.$ac_ext <<_ACEOF
5311/* end confdefs.h. */
5312$ac_includes_default
5313int
5314main ()
5315{
a3bba767 5316static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
5317test_array [0] = 0
5318
5319 ;
5320 return 0;
5321}
5322_ACEOF
5323rm -f conftest.$ac_objext
a3bba767
JJ
5324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5325 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5326 ac_status=$?
5327 grep -v '^ *+' conftest.er1 >conftest.err
5328 rm -f conftest.er1
5329 cat conftest.err >&5
5330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5331 (exit $ac_status); } &&
5332 { ac_try='test -z "$ac_c_werror_flag"
5333 || test ! -s conftest.err'
5334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5335 (eval $ac_try) 2>&5
5336 ac_status=$?
5337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338 (exit $ac_status); }; } &&
5339 { ac_try='test -s conftest.$ac_objext'
5340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5341 (eval $ac_try) 2>&5
5342 ac_status=$?
5343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5344 (exit $ac_status); }; }; then
8b1f719a 5345 ac_hi=$ac_mid; break
bf3b7cd3
JD
5346else
5347 echo "$as_me: failed program was:" >&5
5348sed 's/^/| /' conftest.$ac_ext >&5
5349
a3bba767
JJ
5350ac_lo=`expr $ac_mid + 1`
5351 if test $ac_lo -le $ac_mid; then
5352 ac_lo= ac_hi=
5353 break
5354 fi
5355 ac_mid=`expr 2 '*' $ac_mid + 1`
8b1f719a 5356fi
a3bba767 5357rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8b1f719a
PB
5358 done
5359else
5360 echo "$as_me: failed program was:" >&5
5361sed 's/^/| /' conftest.$ac_ext >&5
5362
a3bba767 5363cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5364/* confdefs.h. */
5365_ACEOF
5366cat confdefs.h >>conftest.$ac_ext
5367cat >>conftest.$ac_ext <<_ACEOF
5368/* end confdefs.h. */
5369$ac_includes_default
5370int
5371main ()
5372{
a3bba767 5373static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
bf3b7cd3
JD
5374test_array [0] = 0
5375
5376 ;
5377 return 0;
5378}
5379_ACEOF
5380rm -f conftest.$ac_objext
a3bba767
JJ
5381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5382 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5383 ac_status=$?
5384 grep -v '^ *+' conftest.er1 >conftest.err
5385 rm -f conftest.er1
5386 cat conftest.err >&5
5387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5388 (exit $ac_status); } &&
5389 { ac_try='test -z "$ac_c_werror_flag"
5390 || test ! -s conftest.err'
5391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5392 (eval $ac_try) 2>&5
5393 ac_status=$?
5394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5395 (exit $ac_status); }; } &&
5396 { ac_try='test -s conftest.$ac_objext'
5397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5398 (eval $ac_try) 2>&5
5399 ac_status=$?
5400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5401 (exit $ac_status); }; }; then
bf3b7cd3
JD
5402 ac_hi=-1 ac_mid=-1
5403 while :; do
5404 cat >conftest.$ac_ext <<_ACEOF
5405/* confdefs.h. */
5406_ACEOF
5407cat confdefs.h >>conftest.$ac_ext
5408cat >>conftest.$ac_ext <<_ACEOF
5409/* end confdefs.h. */
5410$ac_includes_default
5411int
5412main ()
5413{
a3bba767 5414static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
bf3b7cd3
JD
5415test_array [0] = 0
5416
5417 ;
5418 return 0;
5419}
5420_ACEOF
5421rm -f conftest.$ac_objext
a3bba767
JJ
5422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5423 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5424 ac_status=$?
5425 grep -v '^ *+' conftest.er1 >conftest.err
5426 rm -f conftest.er1
5427 cat conftest.err >&5
5428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5429 (exit $ac_status); } &&
5430 { ac_try='test -z "$ac_c_werror_flag"
5431 || test ! -s conftest.err'
5432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5433 (eval $ac_try) 2>&5
5434 ac_status=$?
5435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436 (exit $ac_status); }; } &&
5437 { ac_try='test -s conftest.$ac_objext'
5438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5439 (eval $ac_try) 2>&5
5440 ac_status=$?
5441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5442 (exit $ac_status); }; }; then
bf3b7cd3
JD
5443 ac_lo=$ac_mid; break
5444else
5445 echo "$as_me: failed program was:" >&5
5446sed 's/^/| /' conftest.$ac_ext >&5
5447
a3bba767
JJ
5448ac_hi=`expr '(' $ac_mid ')' - 1`
5449 if test $ac_mid -le $ac_hi; then
5450 ac_lo= ac_hi=
5451 break
5452 fi
5453 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5454fi
a3bba767 5455rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5456 done
5457else
5458 echo "$as_me: failed program was:" >&5
5459sed 's/^/| /' conftest.$ac_ext >&5
5460
a3bba767 5461ac_lo= ac_hi=
bf3b7cd3 5462fi
a3bba767 5463rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5464fi
a3bba767 5465rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5466# Binary search between lo and hi bounds.
5467while test "x$ac_lo" != "x$ac_hi"; do
5468 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5469 cat >conftest.$ac_ext <<_ACEOF
5470/* confdefs.h. */
5471_ACEOF
5472cat confdefs.h >>conftest.$ac_ext
5473cat >>conftest.$ac_ext <<_ACEOF
5474/* end confdefs.h. */
5475$ac_includes_default
5476int
5477main ()
5478{
a3bba767 5479static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
5480test_array [0] = 0
5481
5482 ;
5483 return 0;
5484}
5485_ACEOF
5486rm -f conftest.$ac_objext
a3bba767
JJ
5487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5488 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5489 ac_status=$?
5490 grep -v '^ *+' conftest.er1 >conftest.err
5491 rm -f conftest.er1
5492 cat conftest.err >&5
5493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5494 (exit $ac_status); } &&
5495 { ac_try='test -z "$ac_c_werror_flag"
5496 || test ! -s conftest.err'
5497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5498 (eval $ac_try) 2>&5
5499 ac_status=$?
5500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5501 (exit $ac_status); }; } &&
5502 { ac_try='test -s conftest.$ac_objext'
5503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5504 (eval $ac_try) 2>&5
5505 ac_status=$?
5506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5507 (exit $ac_status); }; }; then
bf3b7cd3
JD
5508 ac_hi=$ac_mid
5509else
5510 echo "$as_me: failed program was:" >&5
5511sed 's/^/| /' conftest.$ac_ext >&5
5512
a3bba767 5513ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5514fi
a3bba767 5515rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5516done
5517case $ac_lo in
5518?*) ac_cv_sizeof_long_long=$ac_lo;;
a3bba767 5519'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 5520See \`config.log' for more details." >&5
a3bba767 5521echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 5522See \`config.log' for more details." >&2;}
a3bba767 5523 { (exit 1); exit 1; }; } ;;
bf3b7cd3 5524esac
a3bba767
JJ
5525else
5526 if test "$cross_compiling" = yes; then
5527 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5528See \`config.log' for more details." >&5
5529echo "$as_me: error: cannot run test program while cross compiling
5530See \`config.log' for more details." >&2;}
5531 { (exit 1); exit 1; }; }
bf3b7cd3
JD
5532else
5533 cat >conftest.$ac_ext <<_ACEOF
5534/* confdefs.h. */
5535_ACEOF
5536cat confdefs.h >>conftest.$ac_ext
5537cat >>conftest.$ac_ext <<_ACEOF
5538/* end confdefs.h. */
5539$ac_includes_default
a3bba767
JJ
5540long longval () { return (long) (sizeof (long long)); }
5541unsigned long ulongval () { return (long) (sizeof (long long)); }
bf3b7cd3
JD
5542#include <stdio.h>
5543#include <stdlib.h>
5544int
5545main ()
5546{
5547
5548 FILE *f = fopen ("conftest.val", "w");
5549 if (! f)
a3bba767
JJ
5550 exit (1);
5551 if (((long) (sizeof (long long))) < 0)
bf3b7cd3 5552 {
a3bba767
JJ
5553 long i = longval ();
5554 if (i != ((long) (sizeof (long long))))
5555 exit (1);
bf3b7cd3
JD
5556 fprintf (f, "%ld\n", i);
5557 }
5558 else
5559 {
a3bba767
JJ
5560 unsigned long i = ulongval ();
5561 if (i != ((long) (sizeof (long long))))
5562 exit (1);
bf3b7cd3
JD
5563 fprintf (f, "%lu\n", i);
5564 }
a3bba767 5565 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5566
5567 ;
5568 return 0;
5569}
5570_ACEOF
5571rm -f conftest$ac_exeext
a3bba767
JJ
5572if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5573 (eval $ac_link) 2>&5
bf3b7cd3
JD
5574 ac_status=$?
5575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5576 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
5577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5578 (eval $ac_try) 2>&5
bf3b7cd3
JD
5579 ac_status=$?
5580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581 (exit $ac_status); }; }; then
5582 ac_cv_sizeof_long_long=`cat conftest.val`
5583else
5584 echo "$as_me: program exited with status $ac_status" >&5
5585echo "$as_me: failed program was:" >&5
5586sed 's/^/| /' conftest.$ac_ext >&5
5587
5588( exit $ac_status )
a3bba767 5589{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 5590See \`config.log' for more details." >&5
a3bba767 5591echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 5592See \`config.log' for more details." >&2;}
a3bba767
JJ
5593 { (exit 1); exit 1; }; }
5594fi
5595rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5596fi
5597fi
5598rm -f conftest.val
a3bba767
JJ
5599else
5600 ac_cv_sizeof_long_long=0
8b1f719a 5601fi
a3bba767
JJ
5602fi
5603echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5604echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
bf3b7cd3
JD
5605cat >>confdefs.h <<_ACEOF
5606#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5607_ACEOF
5608
5609
5610fi
5ec1c5e6 5611
a3bba767
JJ
5612echo "$as_me:$LINENO: checking for __int64" >&5
5613echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5ec1c5e6
KC
5614if test "${ac_cv_type___int64+set}" = set; then
5615 echo $ECHO_N "(cached) $ECHO_C" >&6
5616else
5617 cat >conftest.$ac_ext <<_ACEOF
5618/* confdefs.h. */
5619_ACEOF
5620cat confdefs.h >>conftest.$ac_ext
5621cat >>conftest.$ac_ext <<_ACEOF
5622/* end confdefs.h. */
5623$ac_includes_default
5624int
5625main ()
5626{
a3bba767 5627if ((__int64 *) 0)
5ec1c5e6 5628 return 0;
a3bba767 5629if (sizeof (__int64))
5ec1c5e6
KC
5630 return 0;
5631 ;
5632 return 0;
5633}
5634_ACEOF
5635rm -f conftest.$ac_objext
a3bba767
JJ
5636if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5637 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
5638 ac_status=$?
5639 grep -v '^ *+' conftest.er1 >conftest.err
5640 rm -f conftest.er1
5641 cat conftest.err >&5
5642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5643 (exit $ac_status); } &&
5644 { ac_try='test -z "$ac_c_werror_flag"
5645 || test ! -s conftest.err'
5646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5647 (eval $ac_try) 2>&5
5648 ac_status=$?
5649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5650 (exit $ac_status); }; } &&
5651 { ac_try='test -s conftest.$ac_objext'
5652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5653 (eval $ac_try) 2>&5
5654 ac_status=$?
5655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5656 (exit $ac_status); }; }; then
5ec1c5e6
KC
5657 ac_cv_type___int64=yes
5658else
5659 echo "$as_me: failed program was:" >&5
5660sed 's/^/| /' conftest.$ac_ext >&5
5661
a3bba767 5662ac_cv_type___int64=no
5ec1c5e6 5663fi
a3bba767 5664rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 5665fi
a3bba767
JJ
5666echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5667echo "${ECHO_T}$ac_cv_type___int64" >&6
5ec1c5e6
KC
5668if test $ac_cv_type___int64 = yes; then
5669
5670cat >>confdefs.h <<_ACEOF
5671#define HAVE___INT64 1
5672_ACEOF
5673
a3bba767
JJ
5674echo "$as_me:$LINENO: checking for __int64" >&5
5675echo $ECHO_N "checking for __int64... $ECHO_C" >&6
bf3b7cd3
JD
5676if test "${ac_cv_type___int64+set}" = set; then
5677 echo $ECHO_N "(cached) $ECHO_C" >&6
5678else
ba479fd2 5679 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5680/* confdefs.h. */
5681_ACEOF
5682cat confdefs.h >>conftest.$ac_ext
5683cat >>conftest.$ac_ext <<_ACEOF
5684/* end confdefs.h. */
bf3b7cd3 5685$ac_includes_default
ba479fd2
NN
5686int
5687main ()
5688{
a3bba767 5689if ((__int64 *) 0)
bf3b7cd3 5690 return 0;
a3bba767 5691if (sizeof (__int64))
bf3b7cd3 5692 return 0;
ba479fd2
NN
5693 ;
5694 return 0;
5695}
5696_ACEOF
5697rm -f conftest.$ac_objext
a3bba767
JJ
5698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5699 (eval $ac_compile) 2>conftest.er1
ba479fd2 5700 ac_status=$?
86da66b5
HPN
5701 grep -v '^ *+' conftest.er1 >conftest.err
5702 rm -f conftest.er1
5703 cat conftest.err >&5
ba479fd2 5704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5705 (exit $ac_status); } &&
5706 { ac_try='test -z "$ac_c_werror_flag"
5707 || test ! -s conftest.err'
5708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5709 (eval $ac_try) 2>&5
5710 ac_status=$?
5711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5712 (exit $ac_status); }; } &&
5713 { ac_try='test -s conftest.$ac_objext'
5714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5715 (eval $ac_try) 2>&5
5716 ac_status=$?
5717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5718 (exit $ac_status); }; }; then
bf3b7cd3 5719 ac_cv_type___int64=yes
75b6f3fd 5720else
ba479fd2
NN
5721 echo "$as_me: failed program was:" >&5
5722sed 's/^/| /' conftest.$ac_ext >&5
5723
a3bba767 5724ac_cv_type___int64=no
75b6f3fd 5725fi
a3bba767 5726rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5727fi
a3bba767
JJ
5728echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5729echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 5730
a3bba767
JJ
5731echo "$as_me:$LINENO: checking size of __int64" >&5
5732echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
bf3b7cd3 5733if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 5734 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 5735else
a3bba767
JJ
5736 if test "$ac_cv_type___int64" = yes; then
5737 # The cast to unsigned long works around a bug in the HP C Compiler
5738 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5739 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5740 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5741 if test "$cross_compiling" = yes; then
5742 # Depending upon the size, compute the lo and hi bounds.
5743cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5744/* confdefs.h. */
5745_ACEOF
5746cat confdefs.h >>conftest.$ac_ext
5747cat >>conftest.$ac_ext <<_ACEOF
5748/* end confdefs.h. */
bf3b7cd3 5749$ac_includes_default
ba479fd2
NN
5750int
5751main ()
5752{
a3bba767 5753static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
bf3b7cd3
JD
5754test_array [0] = 0
5755
ba479fd2
NN
5756 ;
5757 return 0;
5758}
5759_ACEOF
5760rm -f conftest.$ac_objext
a3bba767
JJ
5761if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5762 (eval $ac_compile) 2>conftest.er1
ba479fd2 5763 ac_status=$?
86da66b5
HPN
5764 grep -v '^ *+' conftest.er1 >conftest.err
5765 rm -f conftest.er1
5766 cat conftest.err >&5
ba479fd2 5767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5768 (exit $ac_status); } &&
5769 { ac_try='test -z "$ac_c_werror_flag"
5770 || test ! -s conftest.err'
5771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5772 (eval $ac_try) 2>&5
5773 ac_status=$?
5774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5775 (exit $ac_status); }; } &&
5776 { ac_try='test -s conftest.$ac_objext'
5777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5778 (eval $ac_try) 2>&5
5779 ac_status=$?
5780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5781 (exit $ac_status); }; }; then
bf3b7cd3
JD
5782 ac_lo=0 ac_mid=0
5783 while :; do
5784 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5785/* confdefs.h. */
5786_ACEOF
5787cat confdefs.h >>conftest.$ac_ext
5788cat >>conftest.$ac_ext <<_ACEOF
5789/* end confdefs.h. */
bf3b7cd3 5790$ac_includes_default
ba479fd2
NN
5791int
5792main ()
5793{
a3bba767 5794static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
bf3b7cd3
JD
5795test_array [0] = 0
5796
ba479fd2
NN
5797 ;
5798 return 0;
5799}
5800_ACEOF
5801rm -f conftest.$ac_objext
a3bba767
JJ
5802if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5803 (eval $ac_compile) 2>conftest.er1
ba479fd2 5804 ac_status=$?
86da66b5
HPN
5805 grep -v '^ *+' conftest.er1 >conftest.err
5806 rm -f conftest.er1
5807 cat conftest.err >&5
ba479fd2 5808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5809 (exit $ac_status); } &&
5810 { ac_try='test -z "$ac_c_werror_flag"
5811 || test ! -s conftest.err'
5812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5813 (eval $ac_try) 2>&5
5814 ac_status=$?
5815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5816 (exit $ac_status); }; } &&
5817 { ac_try='test -s conftest.$ac_objext'
5818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5819 (eval $ac_try) 2>&5
5820 ac_status=$?
5821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5822 (exit $ac_status); }; }; then
bf3b7cd3 5823 ac_hi=$ac_mid; break
75e93faa 5824else
ba479fd2
NN
5825 echo "$as_me: failed program was:" >&5
5826sed 's/^/| /' conftest.$ac_ext >&5
5827
a3bba767
JJ
5828ac_lo=`expr $ac_mid + 1`
5829 if test $ac_lo -le $ac_mid; then
5830 ac_lo= ac_hi=
5831 break
5832 fi
5833 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 5834fi
a3bba767 5835rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5836 done
75e93faa 5837else
bf3b7cd3
JD
5838 echo "$as_me: failed program was:" >&5
5839sed 's/^/| /' conftest.$ac_ext >&5
5840
a3bba767 5841cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5842/* confdefs.h. */
5843_ACEOF
5844cat confdefs.h >>conftest.$ac_ext
5845cat >>conftest.$ac_ext <<_ACEOF
5846/* end confdefs.h. */
bf3b7cd3 5847$ac_includes_default
ba479fd2
NN
5848int
5849main ()
5850{
a3bba767 5851static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
bf3b7cd3
JD
5852test_array [0] = 0
5853
ba479fd2
NN
5854 ;
5855 return 0;
5856}
5857_ACEOF
5858rm -f conftest.$ac_objext
a3bba767
JJ
5859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5860 (eval $ac_compile) 2>conftest.er1
ba479fd2 5861 ac_status=$?
86da66b5
HPN
5862 grep -v '^ *+' conftest.er1 >conftest.err
5863 rm -f conftest.er1
5864 cat conftest.err >&5
ba479fd2 5865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5866 (exit $ac_status); } &&
5867 { ac_try='test -z "$ac_c_werror_flag"
5868 || test ! -s conftest.err'
5869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5870 (eval $ac_try) 2>&5
5871 ac_status=$?
5872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5873 (exit $ac_status); }; } &&
5874 { ac_try='test -s conftest.$ac_objext'
5875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5876 (eval $ac_try) 2>&5
5877 ac_status=$?
5878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5879 (exit $ac_status); }; }; then
bf3b7cd3
JD
5880 ac_hi=-1 ac_mid=-1
5881 while :; do
5882 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5883/* confdefs.h. */
5884_ACEOF
5885cat confdefs.h >>conftest.$ac_ext
5886cat >>conftest.$ac_ext <<_ACEOF
5887/* end confdefs.h. */
bf3b7cd3 5888$ac_includes_default
ba479fd2
NN
5889int
5890main ()
5891{
a3bba767 5892static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
bf3b7cd3
JD
5893test_array [0] = 0
5894
ba479fd2
NN
5895 ;
5896 return 0;
5897}
5898_ACEOF
5899rm -f conftest.$ac_objext
a3bba767
JJ
5900if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5901 (eval $ac_compile) 2>conftest.er1
ba479fd2 5902 ac_status=$?
86da66b5
HPN
5903 grep -v '^ *+' conftest.er1 >conftest.err
5904 rm -f conftest.er1
5905 cat conftest.err >&5
ba479fd2 5906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5907 (exit $ac_status); } &&
5908 { ac_try='test -z "$ac_c_werror_flag"
5909 || test ! -s conftest.err'
5910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5911 (eval $ac_try) 2>&5
5912 ac_status=$?
5913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5914 (exit $ac_status); }; } &&
5915 { ac_try='test -s conftest.$ac_objext'
5916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5917 (eval $ac_try) 2>&5
5918 ac_status=$?
5919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5920 (exit $ac_status); }; }; then
bf3b7cd3 5921 ac_lo=$ac_mid; break
04cabffc 5922else
ba479fd2
NN
5923 echo "$as_me: failed program was:" >&5
5924sed 's/^/| /' conftest.$ac_ext >&5
5925
a3bba767
JJ
5926ac_hi=`expr '(' $ac_mid ')' - 1`
5927 if test $ac_mid -le $ac_hi; then
5928 ac_lo= ac_hi=
5929 break
5930 fi
5931 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 5932fi
a3bba767 5933rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5934 done
5935else
5936 echo "$as_me: failed program was:" >&5
5937sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 5938
a3bba767 5939ac_lo= ac_hi=
414d23ae 5940fi
a3bba767 5941rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5942fi
a3bba767 5943rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5944# Binary search between lo and hi bounds.
5945while test "x$ac_lo" != "x$ac_hi"; do
5946 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 5947 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5948/* confdefs.h. */
5949_ACEOF
5950cat confdefs.h >>conftest.$ac_ext
5951cat >>conftest.$ac_ext <<_ACEOF
5952/* end confdefs.h. */
bf3b7cd3 5953$ac_includes_default
ba479fd2
NN
5954int
5955main ()
5956{
a3bba767 5957static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
bf3b7cd3
JD
5958test_array [0] = 0
5959
ba479fd2
NN
5960 ;
5961 return 0;
5962}
5963_ACEOF
5964rm -f conftest.$ac_objext
a3bba767
JJ
5965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5966 (eval $ac_compile) 2>conftest.er1
ba479fd2 5967 ac_status=$?
86da66b5
HPN
5968 grep -v '^ *+' conftest.er1 >conftest.err
5969 rm -f conftest.er1
5970 cat conftest.err >&5
ba479fd2 5971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5972 (exit $ac_status); } &&
5973 { ac_try='test -z "$ac_c_werror_flag"
5974 || test ! -s conftest.err'
5975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5976 (eval $ac_try) 2>&5
5977 ac_status=$?
5978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5979 (exit $ac_status); }; } &&
5980 { ac_try='test -s conftest.$ac_objext'
5981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5982 (eval $ac_try) 2>&5
5983 ac_status=$?
5984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5985 (exit $ac_status); }; }; then
bf3b7cd3 5986 ac_hi=$ac_mid
75e93faa 5987else
ba479fd2
NN
5988 echo "$as_me: failed program was:" >&5
5989sed 's/^/| /' conftest.$ac_ext >&5
5990
a3bba767 5991ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 5992fi
a3bba767 5993rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5994done
bf3b7cd3
JD
5995case $ac_lo in
5996?*) ac_cv_sizeof___int64=$ac_lo;;
a3bba767 5997'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
bf3b7cd3 5998See \`config.log' for more details." >&5
a3bba767 5999echo "$as_me: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6000See \`config.log' for more details." >&2;}
a3bba767 6001 { (exit 1); exit 1; }; } ;;
bf3b7cd3 6002esac
a3bba767
JJ
6003else
6004 if test "$cross_compiling" = yes; then
6005 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6006See \`config.log' for more details." >&5
6007echo "$as_me: error: cannot run test program while cross compiling
6008See \`config.log' for more details." >&2;}
6009 { (exit 1); exit 1; }; }
bf3b7cd3
JD
6010else
6011 cat >conftest.$ac_ext <<_ACEOF
6012/* confdefs.h. */
6013_ACEOF
6014cat confdefs.h >>conftest.$ac_ext
6015cat >>conftest.$ac_ext <<_ACEOF
6016/* end confdefs.h. */
6017$ac_includes_default
a3bba767
JJ
6018long longval () { return (long) (sizeof (__int64)); }
6019unsigned long ulongval () { return (long) (sizeof (__int64)); }
bf3b7cd3
JD
6020#include <stdio.h>
6021#include <stdlib.h>
6022int
6023main ()
6024{
414d23ae 6025
bf3b7cd3
JD
6026 FILE *f = fopen ("conftest.val", "w");
6027 if (! f)
a3bba767
JJ
6028 exit (1);
6029 if (((long) (sizeof (__int64))) < 0)
bf3b7cd3 6030 {
a3bba767
JJ
6031 long i = longval ();
6032 if (i != ((long) (sizeof (__int64))))
6033 exit (1);
bf3b7cd3
JD
6034 fprintf (f, "%ld\n", i);
6035 }
6036 else
6037 {
a3bba767
JJ
6038 unsigned long i = ulongval ();
6039 if (i != ((long) (sizeof (__int64))))
6040 exit (1);
bf3b7cd3
JD
6041 fprintf (f, "%lu\n", i);
6042 }
a3bba767 6043 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6044
6045 ;
6046 return 0;
6047}
6048_ACEOF
6049rm -f conftest$ac_exeext
a3bba767
JJ
6050if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6051 (eval $ac_link) 2>&5
bf3b7cd3
JD
6052 ac_status=$?
6053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6054 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
6055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6056 (eval $ac_try) 2>&5
bf3b7cd3
JD
6057 ac_status=$?
6058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6059 (exit $ac_status); }; }; then
6060 ac_cv_sizeof___int64=`cat conftest.val`
6061else
6062 echo "$as_me: program exited with status $ac_status" >&5
6063echo "$as_me: failed program was:" >&5
6064sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6065
bf3b7cd3 6066( exit $ac_status )
a3bba767 6067{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6068See \`config.log' for more details." >&5
a3bba767 6069echo "$as_me: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6070See \`config.log' for more details." >&2;}
a3bba767
JJ
6071 { (exit 1); exit 1; }; }
6072fi
6073rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6074fi
6075fi
6076rm -f conftest.val
a3bba767
JJ
6077else
6078 ac_cv_sizeof___int64=0
bf3b7cd3 6079fi
a3bba767
JJ
6080fi
6081echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6082echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 6083cat >>confdefs.h <<_ACEOF
414d23ae 6084#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6085_ACEOF
414d23ae 6086
cafe096b 6087
414d23ae
HPN
6088fi
6089
5ec1c5e6 6090
34a86c2b
NN
6091# ---------------------
6092# Warnings and checking
6093# ---------------------
6094
b5472e1d
NN
6095# Check $CC warning features (if it's GCC).
6096# We want to use -pedantic, but we don't want warnings about
6097# * 'long long'
6098# * variadic macros
89a42ac8 6099# * overlong strings
b5472e1d
NN
6100# So, we only use -pedantic if we can disable those warnings.
6101
a3bba767
JJ
6102echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6103echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
b5472e1d
NN
6104if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6105 echo $ECHO_N "(cached) $ECHO_C" >&6
6106else
6107 save_CFLAGS="$CFLAGS"
6108 CFLAGS="-Wno-long-long"
6109 cat >conftest.$ac_ext <<_ACEOF
6110/* confdefs.h. */
6111_ACEOF
6112cat confdefs.h >>conftest.$ac_ext
6113cat >>conftest.$ac_ext <<_ACEOF
6114/* end confdefs.h. */
6115
6116_ACEOF
6117rm -f conftest.$ac_objext
a3bba767
JJ
6118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6119 (eval $ac_compile) 2>conftest.er1
b5472e1d
NN
6120 ac_status=$?
6121 grep -v '^ *+' conftest.er1 >conftest.err
6122 rm -f conftest.er1
6123 cat conftest.err >&5
6124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6125 (exit $ac_status); } &&
6126 { ac_try='test -z "$ac_c_werror_flag"
6127 || test ! -s conftest.err'
6128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6129 (eval $ac_try) 2>&5
6130 ac_status=$?
6131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6132 (exit $ac_status); }; } &&
6133 { ac_try='test -s conftest.$ac_objext'
6134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6135 (eval $ac_try) 2>&5
6136 ac_status=$?
6137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6138 (exit $ac_status); }; }; then
b5472e1d
NN
6139 ac_cv_prog_cc_w_no_long_long=yes
6140else
6141 echo "$as_me: failed program was:" >&5
6142sed 's/^/| /' conftest.$ac_ext >&5
6143
a3bba767 6144ac_cv_prog_cc_w_no_long_long=no
b5472e1d 6145fi
a3bba767 6146rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
6147 CFLAGS="$save_CFLAGS"
6148
6149fi
a3bba767
JJ
6150echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6151echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
b5472e1d 6152
a3bba767
JJ
6153echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6154echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
b5472e1d
NN
6155if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6156 echo $ECHO_N "(cached) $ECHO_C" >&6
6157else
6158 save_CFLAGS="$CFLAGS"
6159 CFLAGS="-Wno-variadic-macros"
6160 cat >conftest.$ac_ext <<_ACEOF
6161/* confdefs.h. */
6162_ACEOF
6163cat confdefs.h >>conftest.$ac_ext
6164cat >>conftest.$ac_ext <<_ACEOF
6165/* end confdefs.h. */
6166
6167_ACEOF
6168rm -f conftest.$ac_objext
a3bba767
JJ
6169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6170 (eval $ac_compile) 2>conftest.er1
b5472e1d
NN
6171 ac_status=$?
6172 grep -v '^ *+' conftest.er1 >conftest.err
6173 rm -f conftest.er1
6174 cat conftest.err >&5
6175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6176 (exit $ac_status); } &&
6177 { ac_try='test -z "$ac_c_werror_flag"
6178 || test ! -s conftest.err'
6179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6180 (eval $ac_try) 2>&5
6181 ac_status=$?
6182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6183 (exit $ac_status); }; } &&
6184 { ac_try='test -s conftest.$ac_objext'
6185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6186 (eval $ac_try) 2>&5
6187 ac_status=$?
6188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6189 (exit $ac_status); }; }; then
b5472e1d
NN
6190 ac_cv_prog_cc_w_no_variadic_macros=yes
6191else
6192 echo "$as_me: failed program was:" >&5
6193sed 's/^/| /' conftest.$ac_ext >&5
6194
a3bba767 6195ac_cv_prog_cc_w_no_variadic_macros=no
b5472e1d 6196fi
a3bba767 6197rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
6198 CFLAGS="$save_CFLAGS"
6199
6200fi
a3bba767
JJ
6201echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6202echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
b5472e1d 6203
a3bba767
JJ
6204echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5
6205echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6
89a42ac8
ZW
6206if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then
6207 echo $ECHO_N "(cached) $ECHO_C" >&6
6208else
6209 save_CFLAGS="$CFLAGS"
6210 CFLAGS="-Wno-overlength-strings"
6211 cat >conftest.$ac_ext <<_ACEOF
6212/* confdefs.h. */
6213_ACEOF
6214cat confdefs.h >>conftest.$ac_ext
6215cat >>conftest.$ac_ext <<_ACEOF
6216/* end confdefs.h. */
6217
6218_ACEOF
6219rm -f conftest.$ac_objext
a3bba767
JJ
6220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6221 (eval $ac_compile) 2>conftest.er1
89a42ac8
ZW
6222 ac_status=$?
6223 grep -v '^ *+' conftest.er1 >conftest.err
6224 rm -f conftest.er1
6225 cat conftest.err >&5
6226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6227 (exit $ac_status); } &&
6228 { ac_try='test -z "$ac_c_werror_flag"
6229 || test ! -s conftest.err'
6230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6231 (eval $ac_try) 2>&5
6232 ac_status=$?
6233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6234 (exit $ac_status); }; } &&
6235 { ac_try='test -s conftest.$ac_objext'
6236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6237 (eval $ac_try) 2>&5
6238 ac_status=$?
6239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6240 (exit $ac_status); }; }; then
89a42ac8
ZW
6241 ac_cv_prog_cc_w_no_overlength_strings=yes
6242else
6243 echo "$as_me: failed program was:" >&5
6244sed 's/^/| /' conftest.$ac_ext >&5
6245
a3bba767 6246ac_cv_prog_cc_w_no_overlength_strings=no
89a42ac8 6247fi
a3bba767 6248rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
89a42ac8
ZW
6249 CFLAGS="$save_CFLAGS"
6250
6251fi
a3bba767
JJ
6252echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5
6253echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6
89a42ac8 6254
8b1f719a 6255strict_warn=
b5472e1d 6256if test $ac_cv_prog_cc_w_no_long_long = yes \
89a42ac8
ZW
6257 && test $ac_cv_prog_cc_w_no_variadic_macros = yes \
6258 && test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then
8b1f719a 6259 strict_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
34a86c2b
NN
6260fi
6261
643d3bd2 6262# Add -Wold-style-definition if it's accepted
a3bba767
JJ
6263echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6264echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
643d3bd2
NN
6265if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6266 echo $ECHO_N "(cached) $ECHO_C" >&6
6267else
6268 save_CFLAGS="$CFLAGS"
6269 CFLAGS="-Wold-style-definition"
6270 cat >conftest.$ac_ext <<_ACEOF
6271/* confdefs.h. */
6272_ACEOF
6273cat confdefs.h >>conftest.$ac_ext
6274cat >>conftest.$ac_ext <<_ACEOF
6275/* end confdefs.h. */
6276
6277_ACEOF
6278rm -f conftest.$ac_objext
a3bba767
JJ
6279if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6280 (eval $ac_compile) 2>conftest.er1
643d3bd2
NN
6281 ac_status=$?
6282 grep -v '^ *+' conftest.er1 >conftest.err
6283 rm -f conftest.er1
6284 cat conftest.err >&5
6285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6286 (exit $ac_status); } &&
6287 { ac_try='test -z "$ac_c_werror_flag"
6288 || test ! -s conftest.err'
6289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6290 (eval $ac_try) 2>&5
6291 ac_status=$?
6292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6293 (exit $ac_status); }; } &&
6294 { ac_try='test -s conftest.$ac_objext'
6295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6296 (eval $ac_try) 2>&5
6297 ac_status=$?
6298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6299 (exit $ac_status); }; }; then
643d3bd2
NN
6300 ac_cv_prog_cc_w_old_style_definition=yes
6301else
6302 echo "$as_me: failed program was:" >&5
6303sed 's/^/| /' conftest.$ac_ext >&5
6304
a3bba767 6305ac_cv_prog_cc_w_old_style_definition=no
643d3bd2 6306fi
a3bba767 6307rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
643d3bd2
NN
6308 CFLAGS="$save_CFLAGS"
6309
6310fi
a3bba767
JJ
6311echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
6312echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
643d3bd2 6313if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
8b1f719a 6314 strict_warn="${strict_warn} -Wold-style-definition"
643d3bd2
NN
6315fi
6316
ac0f3f39 6317# Add -Wmissing-format-attribute if it's accepted
a3bba767
JJ
6318echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5
6319echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6
ac0f3f39
KG
6320if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then
6321 echo $ECHO_N "(cached) $ECHO_C" >&6
6322else
6323 save_CFLAGS="$CFLAGS"
6324 CFLAGS="-Wmissing-format-attribute"
6325 cat >conftest.$ac_ext <<_ACEOF
6326/* confdefs.h. */
6327_ACEOF
6328cat confdefs.h >>conftest.$ac_ext
6329cat >>conftest.$ac_ext <<_ACEOF
6330/* end confdefs.h. */
6331
6332_ACEOF
6333rm -f conftest.$ac_objext
a3bba767
JJ
6334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6335 (eval $ac_compile) 2>conftest.er1
ac0f3f39
KG
6336 ac_status=$?
6337 grep -v '^ *+' conftest.er1 >conftest.err
6338 rm -f conftest.er1
6339 cat conftest.err >&5
6340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6341 (exit $ac_status); } &&
6342 { ac_try='test -z "$ac_c_werror_flag"
6343 || test ! -s conftest.err'
6344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6345 (eval $ac_try) 2>&5
6346 ac_status=$?
6347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6348 (exit $ac_status); }; } &&
6349 { ac_try='test -s conftest.$ac_objext'
6350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6351 (eval $ac_try) 2>&5
6352 ac_status=$?
6353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354 (exit $ac_status); }; }; then
ac0f3f39
KG
6355 ac_cv_prog_cc_w_missing_format_attribute=yes
6356else
6357 echo "$as_me: failed program was:" >&5
6358sed 's/^/| /' conftest.$ac_ext >&5
6359
a3bba767 6360ac_cv_prog_cc_w_missing_format_attribute=no
ac0f3f39 6361fi
a3bba767 6362rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac0f3f39
KG
6363 CFLAGS="$save_CFLAGS"
6364
6365fi
a3bba767
JJ
6366echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5
6367echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6
ac0f3f39 6368if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then
8b1f719a 6369 strict_warn="${strict_warn} -Wmissing-format-attribute"
ac0f3f39
KG
6370fi
6371
09a9c095 6372# Enable -Werror, period.
a3bba767 6373# Check whether --enable-werror_always or --disable-werror_always was given.
09a9c095 6374if test "${enable_werror_always+set}" = set; then
a3bba767
JJ
6375 enableval="$enable_werror_always"
6376
09a9c095
NN
6377else
6378 enable_werror_always=no
a3bba767 6379fi;
09a9c095 6380if test x${enable_werror_always} = xyes ; then
8b1f719a 6381 strict_warn="${strict_warn} -Werror"
09a9c095
NN
6382fi
6383
ac0f3f39 6384
373477bb 6385# Get C++ compatibility warning flag, if supported.
a3bba767
JJ
6386echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5
6387echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6
373477bb
GDR
6388if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then
6389 echo $ECHO_N "(cached) $ECHO_C" >&6
6390else
6391 save_CFLAGS="$CFLAGS"
6392 CFLAGS="-Wc++-compat"
6393 cat >conftest.$ac_ext <<_ACEOF
6394/* confdefs.h. */
6395_ACEOF
6396cat confdefs.h >>conftest.$ac_ext
6397cat >>conftest.$ac_ext <<_ACEOF
6398/* end confdefs.h. */
6399
6400_ACEOF
6401rm -f conftest.$ac_objext
a3bba767
JJ
6402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6403 (eval $ac_compile) 2>conftest.er1
373477bb
GDR
6404 ac_status=$?
6405 grep -v '^ *+' conftest.er1 >conftest.err
6406 rm -f conftest.er1
6407 cat conftest.err >&5
6408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6409 (exit $ac_status); } &&
6410 { ac_try='test -z "$ac_c_werror_flag"
6411 || test ! -s conftest.err'
6412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6413 (eval $ac_try) 2>&5
6414 ac_status=$?
6415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6416 (exit $ac_status); }; } &&
6417 { ac_try='test -s conftest.$ac_objext'
6418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6419 (eval $ac_try) 2>&5
6420 ac_status=$?
6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6422 (exit $ac_status); }; }; then
8b1f719a
PB
6423 ac_cv_prog_cc_w_cxx_compat=yes
6424else
6425 echo "$as_me: failed program was:" >&5
6426sed 's/^/| /' conftest.$ac_ext >&5
373477bb 6427
a3bba767 6428ac_cv_prog_cc_w_cxx_compat=no
373477bb 6429fi
a3bba767 6430rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
373477bb
GDR
6431 CFLAGS="$save_CFLAGS"
6432
6433fi
a3bba767
JJ
6434echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5
6435echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6
373477bb
GDR
6436if test x${ac_cv_prog_cc_w_cxx_compat} = xyes; then
6437 cxx_compat_warn="-Wc++-compat"
6438fi
6439
6440
6441
ba479fd2 6442# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
6443# That's useful for people building cross-compilers, or just running a
6444# quick `make'.
6445warn_cflags=
6446if test "x$GCC" = "xyes"; then
6447 warn_cflags='$(GCC_WARN_CFLAGS)'
6448fi
6449
6450
8b1f719a 6451# Enable expensive internal checks
a1286ef5
ZW
6452is_release=
6453if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6454 is_release=yes
6455fi
a6ccdbab 6456
a3bba767 6457# Check whether --enable-checking or --disable-checking was given.
414d23ae 6458if test "${enable_checking+set}" = set; then
a3bba767
JJ
6459 enableval="$enable_checking"
6460 ac_checking_flags="${enableval}"
e1bbfc5c
NS
6461else
6462
6463# Determine the default checks.
6464if test x$is_release = x ; then
6465 ac_checking_flags=yes
6466else
6467 ac_checking_flags=release
6468fi
a3bba767 6469fi;
e1bbfc5c
NS
6470ac_assert_checking=1
6471ac_checking=
cdce5c16
NS
6472ac_fold_checking=
6473ac_gc_checking=
6474ac_gc_always_collect=
414d23ae
HPN
6475ac_rtl_checking=
6476ac_rtlflag_checking=
b53ef395 6477ac_runtime_checking=1
cdce5c16
NS
6478ac_tree_checking=
6479ac_valgrind_checking=
e1bbfc5c
NS
6480IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6481for check in $ac_checking_flags
6482do
6483 case $check in
cdce5c16 6484 # these set all the flags to specific states
e1bbfc5c 6485 yes) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6486 ac_fold_checking= ; ac_gc_checking=1 ;
6487 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6488 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
cdce5c16
NS
6489 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6490 no|none) ac_assert_checking= ; ac_checking= ;
6491 ac_fold_checking= ; ac_gc_checking= ;
6492 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6493 ac_rtlflag_checking= ; ac_runtime_checking= ;
cdce5c16 6494 ac_tree_checking= ; ac_valgrind_checking= ;;
e1bbfc5c 6495 all) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6496 ac_fold_checking=1 ; ac_gc_checking=1 ;
6497 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
6498 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6499 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6500 release) ac_assert_checking=1 ; ac_checking= ;
6501 ac_fold_checking= ; ac_gc_checking= ;
6502 ac_gc_always_collect= ; ac_rtl_checking= ;
6503 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6504 ac_tree_checking= ; ac_valgrind_checking= ;;
6505 # these enable particular checks
e1bbfc5c
NS
6506 assert) ac_assert_checking=1 ;;
6507 fold) ac_fold_checking=1 ;;
6508 gc) ac_gc_checking=1 ;;
6509 gcac) ac_gc_always_collect=1 ;;
6510 misc) ac_checking=1 ;;
e1bbfc5c 6511 rtl) ac_rtl_checking=1 ;;
cdce5c16 6512 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 6513 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 6514 tree) ac_tree_checking=1 ;;
cdce5c16 6515 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 6516 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
6517echo "$as_me: error: unknown check category $check" >&2;}
6518 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
6519 esac
6520done
6521IFS="$ac_save_IFS"
06c37c96 6522
ba479fd2
NN
6523nocommon_flag=""
6524if test x$ac_checking != x ; then
6525
6526cat >>confdefs.h <<\_ACEOF
6527#define ENABLE_CHECKING 1
6528_ACEOF
6529
6530 nocommon_flag=-fno-common
6531fi
6532
06c37c96
NS
6533if test x$ac_assert_checking != x ; then
6534
6535cat >>confdefs.h <<\_ACEOF
6536#define ENABLE_ASSERT_CHECKING 1
6537_ACEOF
6538
b53ef395 6539fi
232b67d9 6540
b53ef395
NS
6541if test x$ac_runtime_checking != x ; then
6542
6543cat >>confdefs.h <<\_ACEOF
6544#define ENABLE_RUNTIME_CHECKING 1
6545_ACEOF
6546
06c37c96 6547fi
ba479fd2
NN
6548if test x$ac_tree_checking != x ; then
6549
6550cat >>confdefs.h <<\_ACEOF
6551#define ENABLE_TREE_CHECKING 1
6552_ACEOF
6553
13f05fd0 6554 TREEBROWSER=tree-browser.o
ba479fd2 6555fi
13f05fd0 6556
ba479fd2
NN
6557if test x$ac_rtl_checking != x ; then
6558
6559cat >>confdefs.h <<\_ACEOF
6560#define ENABLE_RTL_CHECKING 1
6561_ACEOF
6562
6563fi
6564if test x$ac_rtlflag_checking != x ; then
6565
6566cat >>confdefs.h <<\_ACEOF
6567#define ENABLE_RTL_FLAG_CHECKING 1
6568_ACEOF
6569
6570fi
6571if test x$ac_gc_checking != x ; then
6572
6573cat >>confdefs.h <<\_ACEOF
6574#define ENABLE_GC_CHECKING 1
6575_ACEOF
6576
6577fi
6578if test x$ac_gc_always_collect != x ; then
6579
6580cat >>confdefs.h <<\_ACEOF
6581#define ENABLE_GC_ALWAYS_COLLECT 1
6582_ACEOF
6583
6584fi
6585if test x$ac_fold_checking != x ; then
6586
6587cat >>confdefs.h <<\_ACEOF
6588#define ENABLE_FOLD_CHECKING 1
6589_ACEOF
6590
6591fi
6592valgrind_path_defines=
6593valgrind_command=
6594
ba479fd2 6595if test "${ac_cv_header_valgrind_h+set}" = set; then
a3bba767
JJ
6596 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6597echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
ba479fd2
NN
6598if test "${ac_cv_header_valgrind_h+set}" = set; then
6599 echo $ECHO_N "(cached) $ECHO_C" >&6
6600fi
a3bba767
JJ
6601echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6602echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
ba479fd2
NN
6603else
6604 # Is the header compilable?
a3bba767
JJ
6605echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6606echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
ba479fd2 6607cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6608/* confdefs.h. */
6609_ACEOF
6610cat confdefs.h >>conftest.$ac_ext
6611cat >>conftest.$ac_ext <<_ACEOF
6612/* end confdefs.h. */
6613$ac_includes_default
63cf211a 6614#include <valgrind.h>
ba479fd2
NN
6615_ACEOF
6616rm -f conftest.$ac_objext
a3bba767
JJ
6617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6618 (eval $ac_compile) 2>conftest.er1
ba479fd2 6619 ac_status=$?
86da66b5
HPN
6620 grep -v '^ *+' conftest.er1 >conftest.err
6621 rm -f conftest.er1
6622 cat conftest.err >&5
ba479fd2 6623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6624 (exit $ac_status); } &&
6625 { ac_try='test -z "$ac_c_werror_flag"
6626 || test ! -s conftest.err'
6627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6628 (eval $ac_try) 2>&5
6629 ac_status=$?
6630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6631 (exit $ac_status); }; } &&
6632 { ac_try='test -s conftest.$ac_objext'
6633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6634 (eval $ac_try) 2>&5
6635 ac_status=$?
6636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6637 (exit $ac_status); }; }; then
ba479fd2
NN
6638 ac_header_compiler=yes
6639else
6640 echo "$as_me: failed program was:" >&5
6641sed 's/^/| /' conftest.$ac_ext >&5
6642
a3bba767 6643ac_header_compiler=no
ba479fd2 6644fi
a3bba767
JJ
6645rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6646echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6647echo "${ECHO_T}$ac_header_compiler" >&6
ba479fd2
NN
6648
6649# Is the header present?
a3bba767
JJ
6650echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6651echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
ba479fd2 6652cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6653/* confdefs.h. */
6654_ACEOF
6655cat confdefs.h >>conftest.$ac_ext
6656cat >>conftest.$ac_ext <<_ACEOF
6657/* end confdefs.h. */
6658#include <valgrind.h>
6659_ACEOF
a3bba767
JJ
6660if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6661 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
6662 ac_status=$?
6663 grep -v '^ *+' conftest.er1 >conftest.err
6664 rm -f conftest.er1
6665 cat conftest.err >&5
6666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6667 (exit $ac_status); } >/dev/null; then
6668 if test -s conftest.err; then
6669 ac_cpp_err=$ac_c_preproc_warn_flag
6670 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6671 else
6672 ac_cpp_err=
6673 fi
6674else
6675 ac_cpp_err=yes
6676fi
6677if test -z "$ac_cpp_err"; then
ba479fd2
NN
6678 ac_header_preproc=yes
6679else
6680 echo "$as_me: failed program was:" >&5
6681sed 's/^/| /' conftest.$ac_ext >&5
6682
6683 ac_header_preproc=no
6684fi
6685rm -f conftest.err conftest.$ac_ext
a3bba767
JJ
6686echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6687echo "${ECHO_T}$ac_header_preproc" >&6
ba479fd2
NN
6688
6689# So? What about this header?
86da66b5
HPN
6690case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6691 yes:no: )
ba479fd2
NN
6692 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6693echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
6694 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6695echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6696 ac_header_preproc=yes
ba479fd2 6697 ;;
86da66b5 6698 no:yes:* )
ba479fd2
NN
6699 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6700echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
6701 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6702echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6703 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6704echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6705 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6706echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
6707 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6708echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
6709 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6710echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
a3bba767
JJ
6711 (
6712 cat <<\_ASBOX
6713## ------------------------------------------ ##
6714## Report this to the AC_PACKAGE_NAME lists. ##
6715## ------------------------------------------ ##
6716_ASBOX
6717 ) |
6718 sed "s/^/$as_me: WARNING: /" >&2
ba479fd2
NN
6719 ;;
6720esac
a3bba767
JJ
6721echo "$as_me:$LINENO: checking for valgrind.h" >&5
6722echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
ba479fd2
NN
6723if test "${ac_cv_header_valgrind_h+set}" = set; then
6724 echo $ECHO_N "(cached) $ECHO_C" >&6
6725else
6726 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 6727fi
a3bba767
JJ
6728echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6729echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
ba479fd2 6730
6e3f3080 6731fi
ba479fd2 6732if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
6733 have_valgrind_h=yes
6734else
ba479fd2 6735 have_valgrind_h=no
6938ec6c
NN
6736fi
6737
6738
ba479fd2 6739
cdce5c16 6740if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
6741 # It is certainly possible that there's valgrind but no valgrind.h.
6742 # GCC relies on making annotations so we must have both.
a3bba767
JJ
6743 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6744echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
ba479fd2 6745 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6746/* confdefs.h. */
6747_ACEOF
6748cat confdefs.h >>conftest.$ac_ext
6749cat >>conftest.$ac_ext <<_ACEOF
6750/* end confdefs.h. */
a207b594 6751#include <valgrind/memcheck.h>
14011ca4
AJ
6752#ifndef VALGRIND_DISCARD
6753#error VALGRIND_DISCARD not defined
6754#endif
ba479fd2 6755_ACEOF
a3bba767
JJ
6756if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6757 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
6758 ac_status=$?
6759 grep -v '^ *+' conftest.er1 >conftest.err
6760 rm -f conftest.er1
6761 cat conftest.err >&5
6762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6763 (exit $ac_status); } >/dev/null; then
6764 if test -s conftest.err; then
6765 ac_cpp_err=$ac_c_preproc_warn_flag
6766 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6767 else
6768 ac_cpp_err=
6769 fi
6770else
6771 ac_cpp_err=yes
6772fi
6773if test -z "$ac_cpp_err"; then
a207b594
HPN
6774 gcc_cv_header_valgrind_memcheck_h=yes
6775else
ba479fd2
NN
6776 echo "$as_me: failed program was:" >&5
6777sed 's/^/| /' conftest.$ac_ext >&5
6778
a207b594
HPN
6779 gcc_cv_header_valgrind_memcheck_h=no
6780fi
ba479fd2 6781rm -f conftest.err conftest.$ac_ext
a3bba767
JJ
6782 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6783echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6784 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6785echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
ba479fd2 6786 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6787/* confdefs.h. */
6788_ACEOF
6789cat confdefs.h >>conftest.$ac_ext
6790cat >>conftest.$ac_ext <<_ACEOF
6791/* end confdefs.h. */
a207b594
HPN
6792#include <memcheck.h>
6793#ifndef VALGRIND_DISCARD
6794#error VALGRIND_DISCARD not defined
6795#endif
ba479fd2 6796_ACEOF
a3bba767
JJ
6797if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6798 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
6799 ac_status=$?
6800 grep -v '^ *+' conftest.er1 >conftest.err
6801 rm -f conftest.er1
6802 cat conftest.err >&5
6803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6804 (exit $ac_status); } >/dev/null; then
6805 if test -s conftest.err; then
6806 ac_cpp_err=$ac_c_preproc_warn_flag
6807 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6808 else
6809 ac_cpp_err=
6810 fi
6811else
6812 ac_cpp_err=yes
6813fi
6814if test -z "$ac_cpp_err"; then
14011ca4
AJ
6815 gcc_cv_header_memcheck_h=yes
6816else
ba479fd2
NN
6817 echo "$as_me: failed program was:" >&5
6818sed 's/^/| /' conftest.$ac_ext >&5
6819
cafe096b
EC
6820 gcc_cv_header_memcheck_h=no
6821fi
ba479fd2 6822rm -f conftest.err conftest.$ac_ext
a3bba767
JJ
6823 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6824echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
ba479fd2 6825
56694dd9
ZW
6826# Prepare PATH_SEPARATOR.
6827# The user is always right.
6828if test "${PATH_SEPARATOR+set}" != set; then
6829 echo "#! /bin/sh" >conf$$.sh
6830 echo "exit 0" >>conf$$.sh
6831 chmod +x conf$$.sh
6832 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6833 PATH_SEPARATOR=';'
6834 else
6835 PATH_SEPARATOR=:
6836 fi
6837 rm -f conf$$.sh
6838fi
6839
6840# Find out how to test for executable files. Don't use a zero-byte file,
6841# as systems may use methods other than mode bits to determine executability.
6842cat >conf$$.file <<_ASEOF
6843#! /bin/sh
6844exit 0
6845_ASEOF
6846chmod +x conf$$.file
6847if test -x conf$$.file >/dev/null 2>&1; then
6848 ac_executable_p="test -x"
6849else
6850 ac_executable_p="test -f"
6851fi
6852rm -f conf$$.file
6853
6854# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 6855set dummy valgrind; ac_word=$2
a3bba767
JJ
6856echo "$as_me:$LINENO: checking for $ac_word" >&5
6857echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
6858if test "${ac_cv_path_valgrind_path+set}" = set; then
6859 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
6860else
6861 case "$valgrind_path" in
56694dd9
ZW
6862 [\\/]* | ?:[\\/]*)
6863 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6864 ;;
414d23ae 6865 *)
56694dd9
ZW
6866 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6867 for ac_dir in $PATH; do
6868 IFS="$ac_save_IFS"
6869 test -z "$ac_dir" && ac_dir=.
6870 for ac_exec_ext in '' $ac_executable_extensions; do
6871 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6872 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6873 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6874 break 2
6875 fi
6876 fi
6877 done
6878 done
6879 IFS="$ac_save_IFS"
6880 ;;
414d23ae 6881esac
75e93faa 6882fi
414d23ae
HPN
6883valgrind_path="$ac_cv_path_valgrind_path"
6884if test -n "$valgrind_path"; then
a3bba767
JJ
6885 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6886echo "${ECHO_T}$valgrind_path" >&6
414d23ae 6887else
a3bba767
JJ
6888 echo "$as_me:$LINENO: result: no" >&5
6889echo "${ECHO_T}no" >&6
414d23ae
HPN
6890fi
6891
a207b594
HPN
6892 if test "x$valgrind_path" = "x" \
6893 || (test $have_valgrind_h = no \
6894 && test $gcc_cv_header_memcheck_h = no \
6895 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
6896 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6897echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6898 { (exit 1); exit 1; }; }
414d23ae
HPN
6899 fi
6900 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6901 valgrind_command="$valgrind_path -q"
ba479fd2
NN
6902
6903cat >>confdefs.h <<\_ACEOF
414d23ae 6904#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 6905_ACEOF
75e93faa 6906
a207b594 6907 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
6908
6909cat >>confdefs.h <<\_ACEOF
a207b594 6910#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 6911_ACEOF
a207b594
HPN
6912
6913 fi
14011ca4 6914 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
6915
6916cat >>confdefs.h <<\_ACEOF
14011ca4 6917#define HAVE_MEMCHECK_H 1
ba479fd2 6918_ACEOF
14011ca4
AJ
6919
6920 fi
414d23ae 6921fi
75e93faa 6922
75e93faa
ZW
6923
6924
a3bba767 6925# Check whether --enable-mapped-location or --disable-mapped-location was given.
74ee1642 6926if test "${enable_mapped_location+set}" = set; then
a3bba767
JJ
6927 enableval="$enable_mapped_location"
6928
74ee1642
PB
6929else
6930 enable_mapped_location=no
a3bba767 6931fi;
74ee1642
PB
6932
6933if test "$enable_mapped_location" = yes ; then
6934
6935cat >>confdefs.h <<\_ACEOF
6936#define USE_MAPPED_LOCATION 1
6937_ACEOF
6938
6939fi
6940
414d23ae 6941# Enable code coverage collection
a3bba767 6942# Check whether --enable-coverage or --disable-coverage was given.
414d23ae 6943if test "${enable_coverage+set}" = set; then
a3bba767
JJ
6944 enableval="$enable_coverage"
6945 case "${enableval}" in
6dd297da
NN
6946 yes|noopt)
6947 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6948 ;;
6949 opt)
6950 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6951 ;;
6952 no)
6953 # a.k.a. --disable-coverage
6954 coverage_flags=""
6955 ;;
6956 *)
6957 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
6958echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6959 { (exit 1); exit 1; }; }
6dd297da 6960 ;;
414d23ae 6961esac
75e93faa 6962else
414d23ae 6963 coverage_flags=""
a3bba767 6964fi;
dd7f7a6e 6965
8b1f719a 6966
a3bba767 6967# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
703d89ab 6968if test "${enable_gather_detailed_mem_stats+set}" = set; then
a3bba767
JJ
6969 enableval="$enable_gather_detailed_mem_stats"
6970
439a7e54
DN
6971else
6972 enable_gather_detailed_mem_stats=no
a3bba767 6973fi;
439a7e54 6974if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
6975
6976cat >>confdefs.h <<\_ACEOF
439a7e54 6977#define GATHER_STATISTICS 1
ba479fd2 6978_ACEOF
439a7e54
DN
6979
6980fi
6981
73458fb7
NN
6982# -------------------------------
6983# Miscenalleous configure options
6984# -------------------------------
34a86c2b
NN
6985
6986# With stabs
ba479fd2 6987
a3bba767 6988# Check whether --with-stabs or --without-stabs was given.
34a86c2b 6989if test "${with_stabs+set}" = set; then
a3bba767
JJ
6990 withval="$with_stabs"
6991 stabs="$with_stabs"
34a86c2b
NN
6992else
6993 stabs=no
a3bba767 6994fi;
cafe096b 6995
34a86c2b 6996# Determine whether or not multilibs are enabled.
a3bba767 6997# Check whether --enable-multilib or --disable-multilib was given.
34a86c2b 6998if test "${enable_multilib+set}" = set; then
a3bba767
JJ
6999 enableval="$enable_multilib"
7000
34a86c2b
NN
7001else
7002 enable_multilib=yes
a3bba767 7003fi;
75e93faa 7004
34a86c2b 7005
414d23ae 7006# Enable __cxa_atexit for C++.
a3bba767 7007# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
414d23ae 7008if test "${enable___cxa_atexit+set}" = set; then
a3bba767 7009 enableval="$enable___cxa_atexit"
75e93faa 7010
a3bba767 7011fi;
75e93faa 7012
486aa804 7013# Enable C extension for decimal float if target supports it.
a3bba767 7014# Check whether --enable-decimal-float or --disable-decimal-float was given.
486aa804 7015if test "${enable_decimal_float+set}" = set; then
a3bba767
JJ
7016 enableval="$enable_decimal_float"
7017
79b87c74
MM
7018 case $enable_decimal_float in
7019 yes | no | bid | dpd) ;;
7020 *) { { echo "$as_me:$LINENO: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
7021Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&5
7022echo "$as_me: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
7023Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&2;}
7024 { (exit 1); exit 1; }; } ;;
7025 esac
7026
7027else
7028
7029 case $target in
7030 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
a4a9df5f 7031 enable_decimal_float=yes
486aa804
BE
7032 ;;
7033 *)
7034 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
7035echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
7036 enable_decimal_float=no
7037 ;;
79b87c74 7038 esac
486aa804 7039
a3bba767 7040fi;
486aa804 7041
79b87c74
MM
7042dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
7043
7044cat >>confdefs.h <<_ACEOF
7045#define ENABLE_DECIMAL_FLOAT $dfp
7046_ACEOF
7047
7048
7049# x86's use BID format instead of DPD
7050case x$enable_decimal_float in
7051 xyes)
7052 case $target in
7053 i?86*-*-linux* | x86_64*-*-linux*)
7054 enable_decimal_float=bid
7055 ;;
7056 *)
7057 enable_decimal_float=dpd
7058 ;;
7059 esac
7060 ;;
7061 xno)
7062 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
7063 # dependency on libdecnumber.
7064 enable_decimal_float=dpd
7065 ;;
7066esac
486aa804
BE
7067
7068
79b87c74 7069bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
486aa804
BE
7070
7071cat >>confdefs.h <<_ACEOF
79b87c74 7072#define ENABLE_DECIMAL_BID_FORMAT $bid
486aa804
BE
7073_ACEOF
7074
7075
414d23ae
HPN
7076# Enable threads
7077# Pass with no value to take the default
7078# Pass with a value to specify a thread package
a3bba767 7079# Check whether --enable-threads or --disable-threads was given.
414d23ae 7080if test "${enable_threads+set}" = set; then
a3bba767
JJ
7081 enableval="$enable_threads"
7082
414d23ae
HPN
7083else
7084 enable_threads=''
a3bba767 7085fi;
8b1f719a 7086
a3bba767 7087# Check whether --enable-tls or --disable-tls was given.
703d89ab 7088if test "${enable_tls+set}" = set; then
a3bba767
JJ
7089 enableval="$enable_tls"
7090
8dea1cca
DD
7091 case $enable_tls in
7092 yes | no) ;;
7093 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
7094Valid choices are 'yes' and 'no'." >&5
7095echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
7096Valid choices are 'yes' and 'no'." >&2;}
7097 { (exit 1); exit 1; }; } ;;
7098 esac
7099
7100else
7101 enable_tls=''
a3bba767 7102fi;
703d89ab 7103
a3bba767 7104# Check whether --enable-objc-gc or --disable-objc-gc was given.
414d23ae 7105if test "${enable_objc_gc+set}" = set; then
a3bba767
JJ
7106 enableval="$enable_objc_gc"
7107 if test x$enable_objc_gc = xno; then
414d23ae
HPN
7108 objc_boehm_gc=''
7109else
7110 objc_boehm_gc=1
7111fi
7112else
7113 objc_boehm_gc=''
a3bba767 7114fi;
75e93faa 7115
a6ccdbab 7116
a3bba767 7117# Check whether --with-dwarf2 or --without-dwarf2 was given.
414d23ae 7118if test "${with_dwarf2+set}" = set; then
a3bba767
JJ
7119 withval="$with_dwarf2"
7120 dwarf2="$with_dwarf2"
75e93faa 7121else
414d23ae 7122 dwarf2=no
a3bba767 7123fi;
8b1f719a 7124
a3bba767 7125# Check whether --enable-shared or --disable-shared was given.
703d89ab 7126if test "${enable_shared+set}" = set; then
a3bba767
JJ
7127 enableval="$enable_shared"
7128
414d23ae
HPN
7129 case $enable_shared in
7130 yes | no) ;;
7131 *)
7132 enable_shared=no
7133 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
7134 for pkg in $enableval; do
7135 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
7136 enable_shared=yes
7137 fi
7138 done
7139 IFS="$ac_save_ifs"
7140 ;;
7141 esac
7142
75e93faa 7143else
414d23ae 7144 enable_shared=yes
a3bba767 7145fi;
75e93faa 7146
b8ec3cc8 7147
703d89ab 7148
a3bba767 7149# Check whether --with-build-sysroot or --without-build-sysroot was given.
160633c6 7150if test "${with_build_sysroot+set}" = set; then
a3bba767 7151 withval="$with_build_sysroot"
160633c6 7152
a3bba767 7153fi;
160633c6
MM
7154
7155
a3bba767 7156# Check whether --with-sysroot or --without-sysroot was given.
4977bab6 7157if test "${with_sysroot+set}" = set; then
a3bba767
JJ
7158 withval="$with_sysroot"
7159
4977bab6 7160 case ${with_sysroot} in
caa55b1e 7161 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
7162 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
7163 esac
ba479fd2 7164
4977bab6 7165 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14da6073 7166 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
4977bab6 7167
047d636f
DJ
7168 if test "x$exec_prefix" = xNONE; then
7169 if test "x$prefix" = xNONE; then
7170 test_prefix=/usr/local
7171 else
7172 test_prefix=$prefix
7173 fi
7174 else
7175 test_prefix=$exec_prefix
7176 fi
7177 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
7178 "${test_prefix}"|"${test_prefix}/"*|\
7179 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
7180 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
7181 TARGET_SYSTEM_ROOT_DEFINE="$t"
7182 ;;
7183 esac
7184
4977bab6 7185else
ba479fd2 7186
4977bab6 7187 TARGET_SYSTEM_ROOT=
db720d9a 7188 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
7189 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
7190
a3bba767 7191fi;
4977bab6
ZW
7192
7193
7194
7195
d1bd0ded 7196# Build with intermodule optimisations
a3bba767 7197# Check whether --enable-intermodule or --disable-intermodule was given.
d1bd0ded 7198if test "${enable_intermodule+set}" = set; then
a3bba767
JJ
7199 enableval="$enable_intermodule"
7200 case ${enable_intermodule} in
0c46c5c7
KC
7201 yes) onestep="-onestep";;
7202 *) onestep="";;
d1bd0ded 7203esac
0c46c5c7
KC
7204else
7205 onestep=""
a3bba767 7206fi;
d1bd0ded
GK
7207
7208
f3c9f174
NN
7209# Sanity check enable_languages in case someone does not run the toplevel
7210# configure # script.
a3bba767 7211# Check whether --enable-languages or --disable-languages was given.
f3c9f174 7212if test "${enable_languages+set}" = set; then
a3bba767
JJ
7213 enableval="$enable_languages"
7214 case ,${enable_languages}, in
f3c9f174
NN
7215 ,,|,yes,)
7216 # go safe -- we cannot be much sure without the toplevel
7217 # configure's
7218 # analysis of which target libs are present and usable
7219 enable_languages=c
7220 ;;
7221 *,all,*)
7222 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
7223echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
7224 { (exit 1); exit 1; }; }
7225 ;;
7226 *,c,*)
7227 ;;
7228 *)
7229 enable_languages=c,${enable_languages}
7230 ;;
7231esac
7232else
7233 enable_languages=c
a3bba767 7234fi;
f3c9f174 7235
9288b845
CD
7236# Used by documentation targets
7237
7238
7239
f3c9f174 7240
73458fb7
NN
7241# -------------------------
7242# Checks for other programs
7243# -------------------------
5b67ad6f 7244
a3bba767
JJ
7245echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7246echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
7247set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
7248if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
ba479fd2 7249 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 7250else
ba479fd2 7251 cat >conftest.make <<\_ACEOF
e9a25f70 7252all:
a3bba767 7253 @echo 'ac_maketemp="$(MAKE)"'
ba479fd2 7254_ACEOF
e9a25f70 7255# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
a3bba767
JJ
7256eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
7257if test -n "$ac_maketemp"; then
7258 eval ac_cv_prog_make_${ac_make}_set=yes
7259else
7260 eval ac_cv_prog_make_${ac_make}_set=no
7261fi
ba479fd2 7262rm -f conftest.make
e9a25f70 7263fi
a3bba767
JJ
7264if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
7265 echo "$as_me:$LINENO: result: yes" >&5
7266echo "${ECHO_T}yes" >&6
e9a25f70
JL
7267 SET_MAKE=
7268else
a3bba767
JJ
7269 echo "$as_me:$LINENO: result: no" >&5
7270echo "${ECHO_T}no" >&6
e9a25f70
JL
7271 SET_MAKE="MAKE=${MAKE-make}"
7272fi
7273
7274
861bb6c1 7275# Find some useful tools
ba479fd2 7276for ac_prog in gawk mawk nawk awk
861bb6c1 7277do
ba479fd2 7278 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 7279set dummy $ac_prog; ac_word=$2
a3bba767
JJ
7280echo "$as_me:$LINENO: checking for $ac_word" >&5
7281echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7282if test "${ac_cv_prog_AWK+set}" = set; then
7283 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7284else
7285 if test -n "$AWK"; then
7286 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7287else
ba479fd2
NN
7288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7289for as_dir in $PATH
7290do
7291 IFS=$as_save_IFS
7292 test -z "$as_dir" && as_dir=.
7293 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7294 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7295 ac_cv_prog_AWK="$ac_prog"
7296 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7297 break 2
7298 fi
7299done
7300done
7301
861bb6c1
JL
7302fi
7303fi
ba479fd2 7304AWK=$ac_cv_prog_AWK
861bb6c1 7305if test -n "$AWK"; then
a3bba767
JJ
7306 echo "$as_me:$LINENO: result: $AWK" >&5
7307echo "${ECHO_T}$AWK" >&6
861bb6c1 7308else
a3bba767
JJ
7309 echo "$as_me:$LINENO: result: no" >&5
7310echo "${ECHO_T}no" >&6
861bb6c1
JL
7311fi
7312
ba479fd2 7313 test -n "$AWK" && break
861bb6c1
JL
7314done
7315
776dc15d 7316# We need awk to create options.c and options.h.
2c4902b9
NN
7317# Bail out if it's missing.
7318case ${AWK} in
ba479fd2
NN
7319 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7320echo "$as_me: error: can't build without awk, bailing out" >&2;}
7321 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
7322esac
7323
a3bba767
JJ
7324echo "$as_me:$LINENO: checking whether ln -s works" >&5
7325echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
ba479fd2
NN
7326if test "${gcc_cv_prog_LN_S+set}" = set; then
7327 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7328else
7329 rm -f conftestdata_t
7330echo >conftestdata_f
7331if ln -s conftestdata_f conftestdata_t 2>/dev/null
7332then
7333 gcc_cv_prog_LN_S="ln -s"
7334else
7335 if ln conftestdata_f conftestdata_t 2>/dev/null
7336 then
7337 gcc_cv_prog_LN_S=ln
7338 else
35f06ae4
PB
7339 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7340 then
06c3418c 7341 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
7342 else
7343 gcc_cv_prog_LN_S=cp
7344 fi
0a4b6309
RL
7345 fi
7346fi
7347rm -f conftestdata_f conftestdata_t
7348
7349fi
7350LN_S="$gcc_cv_prog_LN_S"
7351if test "$gcc_cv_prog_LN_S" = "ln -s"; then
a3bba767
JJ
7352 echo "$as_me:$LINENO: result: yes" >&5
7353echo "${ECHO_T}yes" >&6
0a4b6309
RL
7354else
7355 if test "$gcc_cv_prog_LN_S" = "ln"; then
a3bba767
JJ
7356 echo "$as_me:$LINENO: result: no, using ln" >&5
7357echo "${ECHO_T}no, using ln" >&6
0a4b6309 7358 else
a3bba767
JJ
7359 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7360echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
7361 fi
7362fi
7363
a3bba767
JJ
7364echo "$as_me:$LINENO: checking whether ln works" >&5
7365echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
18fc9bd4
RG
7366if test "${acx_cv_prog_LN+set}" = set; then
7367 echo $ECHO_N "(cached) $ECHO_C" >&6
7368else
7369 rm -f conftestdata_t
7370echo >conftestdata_f
7371if ln conftestdata_f conftestdata_t 2>/dev/null
7372then
7373 acx_cv_prog_LN=ln
7374else
7375 acx_cv_prog_LN=no
7376fi
7377rm -f conftestdata_f conftestdata_t
7378
7379fi
7380if test $acx_cv_prog_LN = no; then
7381 LN="$LN_S"
a3bba767
JJ
7382 echo "$as_me:$LINENO: result: no, using $LN" >&5
7383echo "${ECHO_T}no, using $LN" >&6
18fc9bd4
RG
7384else
7385 LN="$acx_cv_prog_LN"
a3bba767
JJ
7386 echo "$as_me:$LINENO: result: yes" >&5
7387echo "${ECHO_T}yes" >&6
18fc9bd4
RG
7388fi
7389
ba479fd2
NN
7390if test -n "$ac_tool_prefix"; then
7391 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7392set dummy ${ac_tool_prefix}ranlib; ac_word=$2
a3bba767
JJ
7393echo "$as_me:$LINENO: checking for $ac_word" >&5
7394echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7395if test "${ac_cv_prog_RANLIB+set}" = set; then
7396 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7397else
7398 if test -n "$RANLIB"; then
7399 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7400else
ba479fd2
NN
7401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7402for as_dir in $PATH
7403do
7404 IFS=$as_save_IFS
7405 test -z "$as_dir" && as_dir=.
7406 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7407 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7408 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7409 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7410 break 2
7411 fi
7412done
7413done
7414
6e3f3080
NN
7415fi
7416fi
ba479fd2 7417RANLIB=$ac_cv_prog_RANLIB
6e3f3080 7418if test -n "$RANLIB"; then
a3bba767
JJ
7419 echo "$as_me:$LINENO: result: $RANLIB" >&5
7420echo "${ECHO_T}$RANLIB" >&6
ba479fd2 7421else
a3bba767
JJ
7422 echo "$as_me:$LINENO: result: no" >&5
7423echo "${ECHO_T}no" >&6
ba479fd2
NN
7424fi
7425
7426fi
7427if test -z "$ac_cv_prog_RANLIB"; then
7428 ac_ct_RANLIB=$RANLIB
7429 # Extract the first word of "ranlib", so it can be a program name with args.
7430set dummy ranlib; ac_word=$2
a3bba767
JJ
7431echo "$as_me:$LINENO: checking for $ac_word" >&5
7432echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7433if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7434 echo $ECHO_N "(cached) $ECHO_C" >&6
7435else
7436 if test -n "$ac_ct_RANLIB"; then
7437 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7438else
7439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7440for as_dir in $PATH
7441do
7442 IFS=$as_save_IFS
7443 test -z "$as_dir" && as_dir=.
7444 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7445 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7446 ac_cv_prog_ac_ct_RANLIB="ranlib"
7447 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7448 break 2
7449 fi
7450done
7451done
7452
a3bba767 7453 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
ba479fd2
NN
7454fi
7455fi
7456ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7457if test -n "$ac_ct_RANLIB"; then
a3bba767
JJ
7458 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7459echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 7460else
a3bba767
JJ
7461 echo "$as_me:$LINENO: result: no" >&5
7462echo "${ECHO_T}no" >&6
ba479fd2
NN
7463fi
7464
a3bba767 7465 RANLIB=$ac_ct_RANLIB
ba479fd2
NN
7466else
7467 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
7468fi
7469
343a6100
MM
7470case "${host}" in
7471*-*-darwin*)
7472 # By default, the Darwin ranlib will not treat common symbols as
7473 # definitions when building the archive table of contents. Other
7474 # ranlibs do that; pass an option to the Darwin ranlib that makes
7475 # it behave similarly.
7476 ranlib_flags="-c"
7477 ;;
7478*)
7479 ranlib_flags=""
7480esac
7481
7482
0a4b6309
RL
7483# Find a good install program. We prefer a C program (faster),
7484# so one script is as good as another. But avoid the broken or
7485# incompatible versions:
7486# SysV /etc/install, /usr/sbin/install
7487# SunOS /usr/etc/install
7488# IRIX /sbin/install
7489# AIX /bin/install
7490# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7491# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7492# ./install, which can be erroneously created by make from ./install.sh.
a3bba767
JJ
7493echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7494echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 7495if test -z "$INSTALL"; then
ba479fd2
NN
7496if test "${ac_cv_path_install+set}" = set; then
7497 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7498else
7499 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7500 for ac_dir in $PATH; do
7501 # Account for people who put trailing slashes in PATH elements.
7502 case "$ac_dir/" in
7503 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7504 *)
7505 # OSF1 and SCO ODT 3.0 have their own names for install.
7506 for ac_prog in ginstall scoinst install; do
7507 if test -f $ac_dir/$ac_prog; then
7508 if test $ac_prog = install &&
7509 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7510 # AIX install. It has an incompatible calling convention.
7511 # OSF/1 installbsd also uses dspmsg, but is usable.
7512 :
7513 else
7514 ac_cv_path_install="$ac_dir/$ac_prog -c"
7515 break 2
7516 fi
7517 fi
7518 done
7519 ;;
7520 esac
7521 done
7522 IFS="$ac_save_IFS"
7523
7524fi
7525 if test "${ac_cv_path_install+set}" = set; then
7526 INSTALL="$ac_cv_path_install"
7527 else
7528 # As a last resort, use the slow shell script. We don't cache a
7529 # path for INSTALL within a source directory, because that will
7530 # break other packages using the cache if that directory is
7531 # removed, or if the path is relative.
7532 INSTALL="$ac_install_sh"
7533 fi
7534fi
a3bba767
JJ
7535echo "$as_me:$LINENO: result: $INSTALL" >&5
7536echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
7537
7538# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7539# It thinks the first close brace ends the variable substitution.
7540test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7541
7542test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7543
861bb6c1 7544
3a000df0 7545# See if cmp has --ignore-initial.
a3bba767
JJ
7546echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7547echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
ba479fd2
NN
7548if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7549 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
7550else
7551 echo abfoo >t1
7552 echo cdfoo >t2
269a7343 7553 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
7554 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7555 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 7556 :
3a000df0
KC
7557 else
7558 gcc_cv_prog_cmp_skip=gnucompare
7559 fi
269a7343
KG
7560 fi
7561 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7562 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7563 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7564 :
7565 else
7566 gcc_cv_prog_cmp_skip=fastcompare
7567 fi
7568 fi
3a000df0
KC
7569 fi
7570 rm t1 t2
7571
7572fi
a3bba767
JJ
7573echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7574echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
7575make_compare_target=$gcc_cv_prog_cmp_skip
7576
7577
7578
73458fb7
NN
7579# See if we have the mktemp command.
7580# Extract the first word of "mktemp", so it can be a program name with args.
7581set dummy mktemp; ac_word=$2
a3bba767
JJ
7582echo "$as_me:$LINENO: checking for $ac_word" >&5
7583echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7584if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7585 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7586else
7587 if test -n "$have_mktemp_command"; then
7588 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7589else
ba479fd2
NN
7590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7591for as_dir in $PATH
7592do
7593 IFS=$as_save_IFS
7594 test -z "$as_dir" && as_dir=.
7595 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7596 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7597 ac_cv_prog_have_mktemp_command="yes"
7598 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7599 break 2
7600 fi
7601done
7602done
7603
73458fb7
NN
7604 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7605fi
7606fi
ba479fd2 7607have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 7608if test -n "$have_mktemp_command"; then
a3bba767
JJ
7609 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7610echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 7611else
a3bba767
JJ
7612 echo "$as_me:$LINENO: result: no" >&5
7613echo "${ECHO_T}no" >&6
73458fb7
NN
7614fi
7615
7616
7c27e184
PB
7617MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
7618
7619# See if makeinfo has been installed and is modern enough
7620# that we can use it.
9f18db39
PB
7621
7622ac_executable_extensions="$build_exeext"
7623
7c27e184 7624# Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 7625set dummy makeinfo; ac_word=$2
a3bba767
JJ
7626echo "$as_me:$LINENO: checking for $ac_word" >&5
7627echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7628if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7629 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7630else
7631 if test -n "$MAKEINFO"; then
7632 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7633else
ba479fd2
NN
7634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7635for as_dir in $PATH
7636do
7637 IFS=$as_save_IFS
7638 test -z "$as_dir" && as_dir=.
7639 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7640 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7641 ac_cv_prog_MAKEINFO="makeinfo"
7642 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7643 break 2
7644 fi
7645done
7646done
7647
73458fb7
NN
7648fi
7649fi
ba479fd2 7650MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 7651if test -n "$MAKEINFO"; then
a3bba767
JJ
7652 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7653echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 7654else
a3bba767
JJ
7655 echo "$as_me:$LINENO: result: no" >&5
7656echo "${ECHO_T}no" >&6
73458fb7
NN
7657fi
7658
7659if test -n "$MAKEINFO"; then
7660 # Found it, now check the version.
a3bba767
JJ
7661 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7662echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
ba479fd2
NN
7663if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7664 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7665else
7666 ac_prog_version=`$MAKEINFO --version 2>&1 |
7667 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
a3bba767 7668 echo "configure:7668: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
7669 case $ac_prog_version in
7670 '') gcc_cv_prog_makeinfo_modern=no;;
1a598a97 7671 4.[4-9]*)
73458fb7
NN
7672 gcc_cv_prog_makeinfo_modern=yes;;
7673 *) gcc_cv_prog_makeinfo_modern=no;;
7674 esac
7675
7676fi
a3bba767
JJ
7677echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7678echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
7679else
7680 gcc_cv_prog_makeinfo_modern=no
7681fi
7682
73458fb7 7683if test $gcc_cv_prog_makeinfo_modern = no; then
7c27e184 7684 MAKEINFO="$MISSING makeinfo"
ba479fd2
NN
7685 { echo "$as_me:$LINENO: WARNING:
7686*** Makeinfo is missing or too old.
7687*** Info documentation will not be built." >&5
7688echo "$as_me: WARNING:
cafe096b 7689*** Makeinfo is missing or too old.
ba479fd2 7690*** Info documentation will not be built." >&2;}
73458fb7
NN
7691 BUILD_INFO=
7692else
ba479fd2 7693 BUILD_INFO=info
73458fb7
NN
7694fi
7695
7c27e184 7696
73458fb7 7697# Is pod2man recent enough to regenerate manpages?
a3bba767
JJ
7698echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7699echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 7700if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
a3bba767
JJ
7701 echo "$as_me:$LINENO: result: yes" >&5
7702echo "${ECHO_T}yes" >&6
ba479fd2 7703 GENERATED_MANPAGES=generated-manpages
73458fb7 7704else
a3bba767
JJ
7705 echo "$as_me:$LINENO: result: no" >&5
7706echo "${ECHO_T}no" >&6
73458fb7
NN
7707 GENERATED_MANPAGES=
7708fi
7709
7c27e184 7710
73458fb7 7711# How about lex?
7c27e184
PB
7712for ac_prog in flex
7713do
7714 # Extract the first word of "$ac_prog", so it can be a program name with args.
7715set dummy $ac_prog; ac_word=$2
a3bba767
JJ
7716echo "$as_me:$LINENO: checking for $ac_word" >&5
7717echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7718if test "${ac_cv_prog_FLEX+set}" = set; then
7719 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7720else
7721 if test -n "$FLEX"; then
7722 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7723else
ba479fd2
NN
7724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7725for as_dir in $PATH
7726do
7727 IFS=$as_save_IFS
7728 test -z "$as_dir" && as_dir=.
7729 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7730 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7731 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
7732 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7733 break 2
7734 fi
7735done
7736done
7737
73458fb7
NN
7738fi
7739fi
ba479fd2 7740FLEX=$ac_cv_prog_FLEX
73458fb7 7741if test -n "$FLEX"; then
a3bba767
JJ
7742 echo "$as_me:$LINENO: result: $FLEX" >&5
7743echo "${ECHO_T}$FLEX" >&6
73458fb7 7744else
a3bba767
JJ
7745 echo "$as_me:$LINENO: result: no" >&5
7746echo "${ECHO_T}no" >&6
73458fb7
NN
7747fi
7748
7c27e184
PB
7749 test -n "$FLEX" && break
7750done
7751test -n "$FLEX" || FLEX="$MISSING flex"
7752
73458fb7
NN
7753
7754# Bison?
7c27e184
PB
7755for ac_prog in bison
7756do
7757 # Extract the first word of "$ac_prog", so it can be a program name with args.
7758set dummy $ac_prog; ac_word=$2
a3bba767
JJ
7759echo "$as_me:$LINENO: checking for $ac_word" >&5
7760echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7761if test "${ac_cv_prog_BISON+set}" = set; then
7762 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7763else
7764 if test -n "$BISON"; then
7765 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7766else
ba479fd2
NN
7767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7768for as_dir in $PATH
7769do
7770 IFS=$as_save_IFS
7771 test -z "$as_dir" && as_dir=.
7772 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7773 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7774 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
7775 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7776 break 2
7777 fi
7778done
7779done
7780
73458fb7
NN
7781fi
7782fi
ba479fd2 7783BISON=$ac_cv_prog_BISON
73458fb7 7784if test -n "$BISON"; then
a3bba767
JJ
7785 echo "$as_me:$LINENO: result: $BISON" >&5
7786echo "${ECHO_T}$BISON" >&6
73458fb7 7787else
a3bba767
JJ
7788 echo "$as_me:$LINENO: result: no" >&5
7789echo "${ECHO_T}no" >&6
73458fb7
NN
7790fi
7791
7c27e184
PB
7792 test -n "$BISON" && break
7793done
7794test -n "$BISON" || BISON="$MISSING bison"
7795
7796
7797# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7798# check for build == host before using them.
73458fb7 7799
f6a874ac 7800# NM
414adbdd
GK
7801if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7802 && test -d ../binutils ; then
f6a874ac
JW
7803 NM='$(objdir)/../binutils/nm-new'
7804else
7805 # Extract the first word of "nm", so it can be a program name with args.
7806set dummy nm; ac_word=$2
a3bba767
JJ
7807echo "$as_me:$LINENO: checking for $ac_word" >&5
7808echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
f6a874ac
JW
7809if test "${ac_cv_prog_NM+set}" = set; then
7810 echo $ECHO_N "(cached) $ECHO_C" >&6
7811else
7812 if test -n "$NM"; then
7813 ac_cv_prog_NM="$NM" # Let the user override the test.
7814else
7815as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7816for as_dir in $PATH
7817do
7818 IFS=$as_save_IFS
7819 test -z "$as_dir" && as_dir=.
7820 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7821 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f6a874ac
JW
7822 ac_cv_prog_NM="nm"
7823 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7824 break 2
7825 fi
7826done
7827done
7828
7829 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7830fi
7831fi
7832NM=$ac_cv_prog_NM
7833if test -n "$NM"; then
a3bba767
JJ
7834 echo "$as_me:$LINENO: result: $NM" >&5
7835echo "${ECHO_T}$NM" >&6
f6a874ac 7836else
a3bba767
JJ
7837 echo "$as_me:$LINENO: result: no" >&5
7838echo "${ECHO_T}no" >&6
f6a874ac
JW
7839fi
7840
7841fi
7842
7843# AR
414adbdd
GK
7844if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7845 && test -d ../binutils ; then
f6a874ac
JW
7846 AR='$(objdir)/../binutils/ar'
7847else
7848 # Extract the first word of "ar", so it can be a program name with args.
7849set dummy ar; ac_word=$2
a3bba767
JJ
7850echo "$as_me:$LINENO: checking for $ac_word" >&5
7851echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
f6a874ac
JW
7852if test "${ac_cv_prog_AR+set}" = set; then
7853 echo $ECHO_N "(cached) $ECHO_C" >&6
7854else
7855 if test -n "$AR"; then
7856 ac_cv_prog_AR="$AR" # Let the user override the test.
7857else
7858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7859for as_dir in $PATH
7860do
7861 IFS=$as_save_IFS
7862 test -z "$as_dir" && as_dir=.
7863 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7864 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f6a874ac
JW
7865 ac_cv_prog_AR="ar"
7866 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7867 break 2
7868 fi
7869done
7870done
7871
7872 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7873fi
7874fi
7875AR=$ac_cv_prog_AR
7876if test -n "$AR"; then
a3bba767
JJ
7877 echo "$as_me:$LINENO: result: $AR" >&5
7878echo "${ECHO_T}$AR" >&6
f6a874ac 7879else
a3bba767
JJ
7880 echo "$as_me:$LINENO: result: no" >&5
7881echo "${ECHO_T}no" >&6
f6a874ac
JW
7882fi
7883
7884fi
7885
7886
73458fb7
NN
7887# --------------------
7888# Checks for C headers
7889# --------------------
7890
a3bba767
JJ
7891echo "$as_me:$LINENO: checking for GNU C library" >&5
7892echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
ba479fd2
NN
7893if test "${gcc_cv_glibc+set}" = set; then
7894 echo $ECHO_N "(cached) $ECHO_C" >&6
7895else
7896 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7897/* confdefs.h. */
7898_ACEOF
7899cat confdefs.h >>conftest.$ac_ext
7900cat >>conftest.$ac_ext <<_ACEOF
7901/* end confdefs.h. */
73458fb7 7902#include <features.h>
ba479fd2
NN
7903int
7904main ()
7905{
73458fb7
NN
7906
7907#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7908#error Not a GNU C library system
7909#endif
ba479fd2
NN
7910 ;
7911 return 0;
7912}
7913_ACEOF
7914rm -f conftest.$ac_objext
a3bba767
JJ
7915if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7916 (eval $ac_compile) 2>conftest.er1
ba479fd2 7917 ac_status=$?
86da66b5
HPN
7918 grep -v '^ *+' conftest.er1 >conftest.err
7919 rm -f conftest.er1
7920 cat conftest.err >&5
ba479fd2 7921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
7922 (exit $ac_status); } &&
7923 { ac_try='test -z "$ac_c_werror_flag"
7924 || test ! -s conftest.err'
7925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7926 (eval $ac_try) 2>&5
7927 ac_status=$?
7928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7929 (exit $ac_status); }; } &&
7930 { ac_try='test -s conftest.$ac_objext'
7931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7932 (eval $ac_try) 2>&5
7933 ac_status=$?
7934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7935 (exit $ac_status); }; }; then
73458fb7
NN
7936 gcc_cv_glibc=yes
7937else
ba479fd2
NN
7938 echo "$as_me: failed program was:" >&5
7939sed 's/^/| /' conftest.$ac_ext >&5
7940
a3bba767 7941gcc_cv_glibc=no
73458fb7 7942fi
a3bba767 7943rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
7944fi
7945
a3bba767
JJ
7946echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7947echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 7948if test $gcc_cv_glibc = yes; then
ba479fd2
NN
7949
7950cat >>confdefs.h <<\_ACEOF
73458fb7 7951#define _GNU_SOURCE 1
ba479fd2 7952_ACEOF
73458fb7
NN
7953
7954fi
7955
ca9bc441
NN
7956# Need to reject headers which give warnings, so that the -Werror bootstrap
7957# works later. *sigh* This needs to come before all header checks.
18fc9bd4 7958
ca9bc441
NN
7959ac_c_preproc_warn_flag=yes
7960
a3bba767
JJ
7961echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7962echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
ba479fd2
NN
7963if test "${ac_cv_header_stdc+set}" = set; then
7964 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7965else
ba479fd2 7966 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7967/* confdefs.h. */
7968_ACEOF
7969cat confdefs.h >>conftest.$ac_ext
7970cat >>conftest.$ac_ext <<_ACEOF
7971/* end confdefs.h. */
956d6950
JL
7972#include <stdlib.h>
7973#include <stdarg.h>
7974#include <string.h>
7975#include <float.h>
ba479fd2
NN
7976
7977int
7978main ()
7979{
7980
7981 ;
7982 return 0;
7983}
7984_ACEOF
7985rm -f conftest.$ac_objext
a3bba767
JJ
7986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7987 (eval $ac_compile) 2>conftest.er1
ba479fd2 7988 ac_status=$?
86da66b5
HPN
7989 grep -v '^ *+' conftest.er1 >conftest.err
7990 rm -f conftest.er1
7991 cat conftest.err >&5
ba479fd2 7992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
7993 (exit $ac_status); } &&
7994 { ac_try='test -z "$ac_c_werror_flag"
7995 || test ! -s conftest.err'
7996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7997 (eval $ac_try) 2>&5
7998 ac_status=$?
7999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8000 (exit $ac_status); }; } &&
8001 { ac_try='test -s conftest.$ac_objext'
8002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8003 (eval $ac_try) 2>&5
8004 ac_status=$?
8005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8006 (exit $ac_status); }; }; then
956d6950
JL
8007 ac_cv_header_stdc=yes
8008else
ba479fd2
NN
8009 echo "$as_me: failed program was:" >&5
8010sed 's/^/| /' conftest.$ac_ext >&5
8011
a3bba767 8012ac_cv_header_stdc=no
956d6950 8013fi
a3bba767 8014rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
8015
8016if test $ac_cv_header_stdc = yes; then
8017 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 8018 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8019/* confdefs.h. */
8020_ACEOF
8021cat confdefs.h >>conftest.$ac_ext
8022cat >>conftest.$ac_ext <<_ACEOF
8023/* end confdefs.h. */
956d6950 8024#include <string.h>
ba479fd2
NN
8025
8026_ACEOF
956d6950 8027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8028 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
8029 :
8030else
956d6950
JL
8031 ac_cv_header_stdc=no
8032fi
8033rm -f conftest*
8034
8035fi
8036
8037if test $ac_cv_header_stdc = yes; then
8038 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 8039 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8040/* confdefs.h. */
8041_ACEOF
8042cat confdefs.h >>conftest.$ac_ext
8043cat >>conftest.$ac_ext <<_ACEOF
8044/* end confdefs.h. */
956d6950 8045#include <stdlib.h>
ba479fd2
NN
8046
8047_ACEOF
956d6950 8048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8049 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
8050 :
8051else
956d6950
JL
8052 ac_cv_header_stdc=no
8053fi
8054rm -f conftest*
8055
8056fi
8057
8058if test $ac_cv_header_stdc = yes; then
8059 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 8060 if test "$cross_compiling" = yes; then
956d6950
JL
8061 :
8062else
ba479fd2 8063 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8064/* confdefs.h. */
8065_ACEOF
8066cat confdefs.h >>conftest.$ac_ext
8067cat >>conftest.$ac_ext <<_ACEOF
8068/* end confdefs.h. */
956d6950 8069#include <ctype.h>
ba479fd2
NN
8070#if ((' ' & 0x0FF) == 0x020)
8071# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8072# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8073#else
8074# define ISLOWER(c) \
86da66b5
HPN
8075 (('a' <= (c) && (c) <= 'i') \
8076 || ('j' <= (c) && (c) <= 'r') \
8077 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
8078# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8079#endif
63cf211a 8080
ba479fd2
NN
8081#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8082int
8083main ()
8084{
8085 int i;
8086 for (i = 0; i < 256; i++)
8087 if (XOR (islower (i), ISLOWER (i))
86da66b5 8088 || toupper (i) != TOUPPER (i))
a3bba767
JJ
8089 exit(2);
8090 exit (0);
ba479fd2
NN
8091}
8092_ACEOF
8093rm -f conftest$ac_exeext
a3bba767
JJ
8094if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8095 (eval $ac_link) 2>&5
ba479fd2
NN
8096 ac_status=$?
8097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8098 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
8099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8100 (eval $ac_try) 2>&5
ba479fd2
NN
8101 ac_status=$?
8102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8103 (exit $ac_status); }; }; then
956d6950
JL
8104 :
8105else
ba479fd2
NN
8106 echo "$as_me: program exited with status $ac_status" >&5
8107echo "$as_me: failed program was:" >&5
8108sed 's/^/| /' conftest.$ac_ext >&5
8109
8110( exit $ac_status )
8111ac_cv_header_stdc=no
956d6950 8112fi
a3bba767 8113rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 8114fi
956d6950
JL
8115fi
8116fi
a3bba767
JJ
8117echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8118echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 8119if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
8120
8121cat >>confdefs.h <<\_ACEOF
956d6950 8122#define STDC_HEADERS 1
ba479fd2 8123_ACEOF
956d6950
JL
8124
8125fi
8126
a3bba767
JJ
8127echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
8128echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
ba479fd2
NN
8129if test "${ac_cv_header_time+set}" = set; then
8130 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8131else
ba479fd2 8132 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8133/* confdefs.h. */
8134_ACEOF
8135cat confdefs.h >>conftest.$ac_ext
8136cat >>conftest.$ac_ext <<_ACEOF
8137/* end confdefs.h. */
956d6950
JL
8138#include <sys/types.h>
8139#include <sys/time.h>
8140#include <time.h>
ba479fd2
NN
8141
8142int
8143main ()
8144{
8145if ((struct tm *) 0)
8146return 0;
8147 ;
8148 return 0;
8149}
8150_ACEOF
8151rm -f conftest.$ac_objext
a3bba767
JJ
8152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8153 (eval $ac_compile) 2>conftest.er1
ba479fd2 8154 ac_status=$?
86da66b5
HPN
8155 grep -v '^ *+' conftest.er1 >conftest.err
8156 rm -f conftest.er1
8157 cat conftest.err >&5
ba479fd2 8158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8159 (exit $ac_status); } &&
8160 { ac_try='test -z "$ac_c_werror_flag"
8161 || test ! -s conftest.err'
8162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8163 (eval $ac_try) 2>&5
8164 ac_status=$?
8165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8166 (exit $ac_status); }; } &&
8167 { ac_try='test -s conftest.$ac_objext'
8168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8169 (eval $ac_try) 2>&5
8170 ac_status=$?
8171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8172 (exit $ac_status); }; }; then
956d6950
JL
8173 ac_cv_header_time=yes
8174else
ba479fd2
NN
8175 echo "$as_me: failed program was:" >&5
8176sed 's/^/| /' conftest.$ac_ext >&5
8177
a3bba767 8178ac_cv_header_time=no
956d6950 8179fi
a3bba767 8180rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 8181fi
a3bba767
JJ
8182echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
8183echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 8184if test $ac_cv_header_time = yes; then
ba479fd2
NN
8185
8186cat >>confdefs.h <<\_ACEOF
956d6950 8187#define TIME_WITH_SYS_TIME 1
ba479fd2 8188_ACEOF
956d6950
JL
8189
8190fi
8191
a3bba767
JJ
8192echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
8193echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
18fc9bd4
RG
8194if test "${gcc_cv_header_string+set}" = set; then
8195 echo $ECHO_N "(cached) $ECHO_C" >&6
8196else
8197 cat >conftest.$ac_ext <<_ACEOF
8198/* confdefs.h. */
8199_ACEOF
8200cat confdefs.h >>conftest.$ac_ext
8201cat >>conftest.$ac_ext <<_ACEOF
8202/* end confdefs.h. */
8203#include <string.h>
8204#include <strings.h>
8205int
8206main ()
8207{
8208
8209 ;
8210 return 0;
8211}
8212_ACEOF
8213rm -f conftest.$ac_objext
a3bba767
JJ
8214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8215 (eval $ac_compile) 2>conftest.er1
18fc9bd4
RG
8216 ac_status=$?
8217 grep -v '^ *+' conftest.er1 >conftest.err
8218 rm -f conftest.er1
8219 cat conftest.err >&5
8220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8221 (exit $ac_status); } &&
8222 { ac_try='test -z "$ac_c_werror_flag"
8223 || test ! -s conftest.err'
8224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8225 (eval $ac_try) 2>&5
8226 ac_status=$?
8227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8228 (exit $ac_status); }; } &&
8229 { ac_try='test -s conftest.$ac_objext'
8230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8231 (eval $ac_try) 2>&5
8232 ac_status=$?
8233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8234 (exit $ac_status); }; }; then
18fc9bd4
RG
8235 gcc_cv_header_string=yes
8236else
8237 echo "$as_me: failed program was:" >&5
8238sed 's/^/| /' conftest.$ac_ext >&5
8239
a3bba767 8240gcc_cv_header_string=no
18fc9bd4 8241fi
a3bba767 8242rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18fc9bd4 8243fi
a3bba767
JJ
8244echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
8245echo "${ECHO_T}$gcc_cv_header_string" >&6
18fc9bd4
RG
8246if test $gcc_cv_header_string = yes; then
8247
8248cat >>confdefs.h <<\_ACEOF
8249#define STRING_WITH_STRINGS 1
8250_ACEOF
8251
8252fi
8253
a3bba767
JJ
8254echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
8255echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
ba479fd2
NN
8256if test "${ac_cv_header_sys_wait_h+set}" = set; then
8257 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 8258else
ba479fd2 8259 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8260/* confdefs.h. */
8261_ACEOF
8262cat confdefs.h >>conftest.$ac_ext
8263cat >>conftest.$ac_ext <<_ACEOF
8264/* end confdefs.h. */
e9831ca0
KG
8265#include <sys/types.h>
8266#include <sys/wait.h>
8267#ifndef WEXITSTATUS
a3bba767 8268# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
8269#endif
8270#ifndef WIFEXITED
ba479fd2 8271# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 8272#endif
ba479fd2
NN
8273
8274int
8275main ()
8276{
8277 int s;
8278 wait (&s);
8279 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8280 ;
8281 return 0;
8282}
8283_ACEOF
8284rm -f conftest.$ac_objext
a3bba767
JJ
8285if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8286 (eval $ac_compile) 2>conftest.er1
ba479fd2 8287 ac_status=$?
86da66b5
HPN
8288 grep -v '^ *+' conftest.er1 >conftest.err
8289 rm -f conftest.er1
8290 cat conftest.err >&5
ba479fd2 8291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8292 (exit $ac_status); } &&
8293 { ac_try='test -z "$ac_c_werror_flag"
8294 || test ! -s conftest.err'
8295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8296 (eval $ac_try) 2>&5
8297 ac_status=$?
8298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8299 (exit $ac_status); }; } &&
8300 { ac_try='test -s conftest.$ac_objext'
8301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8302 (eval $ac_try) 2>&5
8303 ac_status=$?
8304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8305 (exit $ac_status); }; }; then
e9831ca0
KG
8306 ac_cv_header_sys_wait_h=yes
8307else
ba479fd2
NN
8308 echo "$as_me: failed program was:" >&5
8309sed 's/^/| /' conftest.$ac_ext >&5
8310
a3bba767 8311ac_cv_header_sys_wait_h=no
e9831ca0 8312fi
a3bba767 8313rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 8314fi
a3bba767
JJ
8315echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8316echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 8317if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
8318
8319cat >>confdefs.h <<\_ACEOF
e9831ca0 8320#define HAVE_SYS_WAIT_H 1
ba479fd2 8321_ACEOF
6e3f3080 8322
63cf211a 8323fi
6e3f3080 8324
ba479fd2
NN
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
dfb77e37
KC
8346
8347for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 8348 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 8349 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 8350 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 8351do
ba479fd2 8352as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a3bba767
JJ
8353echo "$as_me:$LINENO: checking for $ac_header" >&5
8354echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8355if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 8356 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8357else
18fc9bd4 8358 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8359/* confdefs.h. */
8360_ACEOF
8361cat confdefs.h >>conftest.$ac_ext
8362cat >>conftest.$ac_ext <<_ACEOF
8363/* end confdefs.h. */
8364#include <$ac_header>
8365_ACEOF
a3bba767
JJ
8366if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8367 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
8368 ac_status=$?
8369 grep -v '^ *+' conftest.er1 >conftest.err
8370 rm -f conftest.er1
8371 cat conftest.err >&5
8372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8373 (exit $ac_status); } >/dev/null; then
8374 if test -s conftest.err; then
8375 ac_cpp_err=$ac_c_preproc_warn_flag
8376 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8377 else
8378 ac_cpp_err=
8379 fi
8380else
8381 ac_cpp_err=yes
8382fi
8383if test -z "$ac_cpp_err"; then
18fc9bd4 8384 eval "$as_ac_Header=yes"
ba479fd2
NN
8385else
8386 echo "$as_me: failed program was:" >&5
8387sed 's/^/| /' conftest.$ac_ext >&5
8388
18fc9bd4 8389 eval "$as_ac_Header=no"
ba479fd2
NN
8390fi
8391rm -f conftest.err conftest.$ac_ext
6e3f3080 8392fi
a3bba767
JJ
8393echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8394echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
8395if test `eval echo '${'$as_ac_Header'}'` = yes; then
8396 cat >>confdefs.h <<_ACEOF
8397#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8398_ACEOF
8399
956d6950
JL
8400fi
8401done
8402
8403
f24af81b 8404# Check for thread headers.
a3bba767
JJ
8405echo "$as_me:$LINENO: checking for thread.h" >&5
8406echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
ba479fd2
NN
8407if test "${ac_cv_header_thread_h+set}" = set; then
8408 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8409else
18fc9bd4 8410 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8411/* confdefs.h. */
8412_ACEOF
8413cat confdefs.h >>conftest.$ac_ext
8414cat >>conftest.$ac_ext <<_ACEOF
8415/* end confdefs.h. */
8416#include <thread.h>
8417_ACEOF
a3bba767
JJ
8418if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8419 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
8420 ac_status=$?
8421 grep -v '^ *+' conftest.er1 >conftest.err
8422 rm -f conftest.er1
8423 cat conftest.err >&5
8424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8425 (exit $ac_status); } >/dev/null; then
8426 if test -s conftest.err; then
8427 ac_cpp_err=$ac_c_preproc_warn_flag
8428 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8429 else
8430 ac_cpp_err=
8431 fi
8432else
8433 ac_cpp_err=yes
8434fi
8435if test -z "$ac_cpp_err"; then
18fc9bd4 8436 ac_cv_header_thread_h=yes
ba479fd2
NN
8437else
8438 echo "$as_me: failed program was:" >&5
8439sed 's/^/| /' conftest.$ac_ext >&5
8440
18fc9bd4 8441 ac_cv_header_thread_h=no
ba479fd2
NN
8442fi
8443rm -f conftest.err conftest.$ac_ext
6e3f3080 8444fi
a3bba767
JJ
8445echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8446echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 8447if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
8448 have_thread_h=yes
8449else
ba479fd2 8450 have_thread_h=
f24af81b
TT
8451fi
8452
a3bba767
JJ
8453echo "$as_me:$LINENO: checking for pthread.h" >&5
8454echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
ba479fd2
NN
8455if test "${ac_cv_header_pthread_h+set}" = set; then
8456 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 8457else
18fc9bd4 8458 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8459/* confdefs.h. */
8460_ACEOF
8461cat confdefs.h >>conftest.$ac_ext
8462cat >>conftest.$ac_ext <<_ACEOF
8463/* end confdefs.h. */
8464#include <pthread.h>
8465_ACEOF
a3bba767
JJ
8466if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8467 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
8468 ac_status=$?
8469 grep -v '^ *+' conftest.er1 >conftest.err
8470 rm -f conftest.er1
8471 cat conftest.err >&5
8472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8473 (exit $ac_status); } >/dev/null; then
8474 if test -s conftest.err; then
8475 ac_cpp_err=$ac_c_preproc_warn_flag
8476 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8477 else
8478 ac_cpp_err=
8479 fi
8480else
8481 ac_cpp_err=yes
8482fi
8483if test -z "$ac_cpp_err"; then
18fc9bd4 8484 ac_cv_header_pthread_h=yes
ba479fd2 8485else
18fc9bd4
RG
8486 echo "$as_me: failed program was:" >&5
8487sed 's/^/| /' conftest.$ac_ext >&5
8488
8489 ac_cv_header_pthread_h=no
8490fi
8491rm -f conftest.err conftest.$ac_ext
6e3f3080 8492fi
a3bba767
JJ
8493echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8494echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 8495if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
8496 have_pthread_h=yes
8497else
ba479fd2 8498 have_pthread_h=
f24af81b
TT
8499fi
8500
8501
84c041a1 8502# These tests can't be done till we know if we have limits.h.
a3bba767
JJ
8503echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8504echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
ba479fd2
NN
8505if test "${gcc_cv_decl_char_bit+set}" = set; then
8506 echo $ECHO_N "(cached) $ECHO_C" >&6
8507else
8508 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8509/* confdefs.h. */
8510_ACEOF
8511cat confdefs.h >>conftest.$ac_ext
8512cat >>conftest.$ac_ext <<_ACEOF
8513/* end confdefs.h. */
75e93faa
ZW
8514#ifdef HAVE_LIMITS_H
8515#include <limits.h>
8516#endif
8517#ifdef CHAR_BIT
8518found
8519#endif
ba479fd2 8520_ACEOF
75e93faa 8521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8522 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
8523 gcc_cv_decl_char_bit=yes
8524else
75e93faa
ZW
8525 gcc_cv_decl_char_bit=no
8526fi
8527rm -f conftest*
8528
8529
8530fi
a3bba767
JJ
8531echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8532echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 8533if test $gcc_cv_decl_char_bit = no; then
a3bba767
JJ
8534 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8535echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
ba479fd2
NN
8536if test "${gcc_cv_c_nbby+set}" = set; then
8537 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
8538else
8539 i=8
8540 gcc_cv_c_nbby=
8541 while test $i -lt 65; do
ba479fd2 8542 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8543/* confdefs.h. */
8544_ACEOF
8545cat confdefs.h >>conftest.$ac_ext
8546cat >>conftest.$ac_ext <<_ACEOF
8547/* end confdefs.h. */
8548
8549int
8550main ()
8551{
4e70264f
ZW
8552switch(0) {
8553 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8554 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8555 ; }
ba479fd2
NN
8556 ;
8557 return 0;
8558}
8559_ACEOF
8560rm -f conftest.$ac_objext
a3bba767
JJ
8561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8562 (eval $ac_compile) 2>conftest.er1
ba479fd2 8563 ac_status=$?
86da66b5
HPN
8564 grep -v '^ *+' conftest.er1 >conftest.err
8565 rm -f conftest.er1
8566 cat conftest.err >&5
ba479fd2 8567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8568 (exit $ac_status); } &&
8569 { ac_try='test -z "$ac_c_werror_flag"
8570 || test ! -s conftest.err'
8571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8572 (eval $ac_try) 2>&5
8573 ac_status=$?
8574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8575 (exit $ac_status); }; } &&
8576 { ac_try='test -s conftest.$ac_objext'
8577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8578 (eval $ac_try) 2>&5
8579 ac_status=$?
8580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8581 (exit $ac_status); }; }; then
4e70264f 8582 gcc_cv_c_nbby=$i; break
75e93faa 8583else
ba479fd2
NN
8584 echo "$as_me: failed program was:" >&5
8585sed 's/^/| /' conftest.$ac_ext >&5
8586
75e93faa 8587fi
a3bba767 8588rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
8589 i=`expr $i + 1`
8590 done
8591 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8592
8593fi
a3bba767
JJ
8594echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8595echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 8596if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
8597 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8598echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8599 { (exit 1); exit 1; }; }
75e93faa 8600else
ba479fd2
NN
8601
8602cat >>confdefs.h <<_ACEOF
75e93faa 8603#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 8604_ACEOF
75e93faa
ZW
8605
8606fi
8607fi
a3bba767
JJ
8608echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8609echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
ba479fd2
NN
8610if test "${ac_cv_c_bigendian+set}" = set; then
8611 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 8612else
9791c75c 8613 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 8614cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8615/* confdefs.h. */
8616_ACEOF
8617cat confdefs.h >>conftest.$ac_ext
8618cat >>conftest.$ac_ext <<_ACEOF
8619/* end confdefs.h. */
4977bab6
ZW
8620#include <sys/types.h>
8621#include <sys/param.h>
9791c75c 8622
ba479fd2
NN
8623int
8624main ()
8625{
a3bba767 8626#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4977bab6 8627 bogus endian macros
84c041a1 8628#endif
9791c75c 8629
ba479fd2
NN
8630 ;
8631 return 0;
8632}
8633_ACEOF
8634rm -f conftest.$ac_objext
a3bba767
JJ
8635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8636 (eval $ac_compile) 2>conftest.er1
ba479fd2 8637 ac_status=$?
86da66b5
HPN
8638 grep -v '^ *+' conftest.er1 >conftest.err
8639 rm -f conftest.er1
8640 cat conftest.err >&5
ba479fd2 8641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8642 (exit $ac_status); } &&
8643 { ac_try='test -z "$ac_c_werror_flag"
8644 || test ! -s conftest.err'
8645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8646 (eval $ac_try) 2>&5
8647 ac_status=$?
8648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8649 (exit $ac_status); }; } &&
8650 { ac_try='test -s conftest.$ac_objext'
8651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8652 (eval $ac_try) 2>&5
8653 ac_status=$?
8654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8655 (exit $ac_status); }; }; then
4977bab6 8656 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 8657cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8658/* confdefs.h. */
8659_ACEOF
8660cat confdefs.h >>conftest.$ac_ext
8661cat >>conftest.$ac_ext <<_ACEOF
8662/* end confdefs.h. */
4977bab6
ZW
8663#include <sys/types.h>
8664#include <sys/param.h>
9791c75c 8665
ba479fd2
NN
8666int
8667main ()
8668{
4977bab6
ZW
8669#if BYTE_ORDER != BIG_ENDIAN
8670 not big endian
84c041a1 8671#endif
9791c75c 8672
ba479fd2
NN
8673 ;
8674 return 0;
8675}
8676_ACEOF
8677rm -f conftest.$ac_objext
a3bba767
JJ
8678if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8679 (eval $ac_compile) 2>conftest.er1
ba479fd2 8680 ac_status=$?
86da66b5
HPN
8681 grep -v '^ *+' conftest.er1 >conftest.err
8682 rm -f conftest.er1
8683 cat conftest.err >&5
ba479fd2 8684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8685 (exit $ac_status); } &&
8686 { ac_try='test -z "$ac_c_werror_flag"
8687 || test ! -s conftest.err'
8688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8689 (eval $ac_try) 2>&5
8690 ac_status=$?
8691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8692 (exit $ac_status); }; } &&
8693 { ac_try='test -s conftest.$ac_objext'
8694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8695 (eval $ac_try) 2>&5
8696 ac_status=$?
8697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8698 (exit $ac_status); }; }; then
4977bab6
ZW
8699 ac_cv_c_bigendian=yes
8700else
ba479fd2
NN
8701 echo "$as_me: failed program was:" >&5
8702sed 's/^/| /' conftest.$ac_ext >&5
8703
a3bba767 8704ac_cv_c_bigendian=no
4977bab6 8705fi
a3bba767 8706rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8707else
ba479fd2
NN
8708 echo "$as_me: failed program was:" >&5
8709sed 's/^/| /' conftest.$ac_ext >&5
8710
a3bba767 8711# It does not; compile a test program.
9791c75c
KC
8712if test "$cross_compiling" = yes; then
8713 # try to guess the endianness by grepping values into an object file
8714 ac_cv_c_bigendian=unknown
8715 cat >conftest.$ac_ext <<_ACEOF
8716/* confdefs.h. */
8717_ACEOF
8718cat confdefs.h >>conftest.$ac_ext
8719cat >>conftest.$ac_ext <<_ACEOF
8720/* end confdefs.h. */
a3bba767
JJ
8721short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8722short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9791c75c 8723void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
a3bba767
JJ
8724short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8725short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9791c75c
KC
8726void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
8727int
8728main ()
8729{
8730 _ascii (); _ebcdic ();
8731 ;
8732 return 0;
8733}
8734_ACEOF
8735rm -f conftest.$ac_objext
a3bba767
JJ
8736if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8737 (eval $ac_compile) 2>conftest.er1
9791c75c
KC
8738 ac_status=$?
8739 grep -v '^ *+' conftest.er1 >conftest.err
8740 rm -f conftest.er1
8741 cat conftest.err >&5
8742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8743 (exit $ac_status); } &&
8744 { ac_try='test -z "$ac_c_werror_flag"
8745 || test ! -s conftest.err'
8746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8747 (eval $ac_try) 2>&5
8748 ac_status=$?
8749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8750 (exit $ac_status); }; } &&
8751 { ac_try='test -s conftest.$ac_objext'
8752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8753 (eval $ac_try) 2>&5
8754 ac_status=$?
8755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8756 (exit $ac_status); }; }; then
8b1f719a
PB
8757 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
8758 ac_cv_c_bigendian=yes
8759fi
9791c75c
KC
8760if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8761 if test "$ac_cv_c_bigendian" = unknown; then
8762 ac_cv_c_bigendian=no
8763 else
8764 # finding both strings is unlikely to happen, but who knows?
8765 ac_cv_c_bigendian=unknown
8766 fi
8767fi
8768else
8769 echo "$as_me: failed program was:" >&5
8770sed 's/^/| /' conftest.$ac_ext >&5
8771
4977bab6 8772fi
a3bba767 8773rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
8774else
8775 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8776/* confdefs.h. */
8777_ACEOF
8778cat confdefs.h >>conftest.$ac_ext
8779cat >>conftest.$ac_ext <<_ACEOF
8780/* end confdefs.h. */
9791c75c
KC
8781int
8782main ()
8783{
4977bab6
ZW
8784 /* Are we little or big endian? From Harbison&Steele. */
8785 union
8786 {
a3bba767
JJ
8787 long l;
8788 char c[sizeof (long)];
4977bab6
ZW
8789 } u;
8790 u.l = 1;
a3bba767 8791 exit (u.c[sizeof (long) - 1] == 1);
4977bab6 8792}
ba479fd2
NN
8793_ACEOF
8794rm -f conftest$ac_exeext
a3bba767
JJ
8795if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8796 (eval $ac_link) 2>&5
ba479fd2
NN
8797 ac_status=$?
8798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
8800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8801 (eval $ac_try) 2>&5
ba479fd2
NN
8802 ac_status=$?
8803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8804 (exit $ac_status); }; }; then
4977bab6
ZW
8805 ac_cv_c_bigendian=no
8806else
ba479fd2
NN
8807 echo "$as_me: program exited with status $ac_status" >&5
8808echo "$as_me: failed program was:" >&5
8809sed 's/^/| /' conftest.$ac_ext >&5
8810
8811( exit $ac_status )
8812ac_cv_c_bigendian=yes
4977bab6 8813fi
a3bba767 8814rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 8815fi
4977bab6 8816fi
a3bba767 8817rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8818fi
a3bba767
JJ
8819echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8820echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
8821case $ac_cv_c_bigendian in
8822 yes)
ba479fd2
NN
8823
8824cat >>confdefs.h <<\_ACEOF
4977bab6 8825#define WORDS_BIGENDIAN 1
ba479fd2 8826_ACEOF
9791c75c
KC
8827 ;;
8828 no)
8829 ;;
8830 *)
8831 { { echo "$as_me:$LINENO: error: unknown endianness
8832presetting ac_cv_c_bigendian=no (or yes) will help" >&5
8833echo "$as_me: error: unknown endianness
8834presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
8835 { (exit 1); exit 1; }; } ;;
8836esac
84c041a1 8837
75e93faa 8838
73458fb7
NN
8839# --------
8840# UNSORTED
8841# --------
1e608388 8842
1e608388 8843
4e70264f
ZW
8844# These libraries may be used by collect2.
8845# We may need a special search path to get them linked.
a3bba767
JJ
8846echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8847echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
ba479fd2
NN
8848if test "${gcc_cv_collect2_libs+set}" = set; then
8849 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
8850else
8851 save_LIBS="$LIBS"
7f2749d4 8852for libs in '' -lld -lmld \
4e70264f
ZW
8853 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8854 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8855do
8856 LIBS="$libs"
ba479fd2 8857 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8858/* confdefs.h. */
8859_ACEOF
8860cat confdefs.h >>conftest.$ac_ext
8861cat >>conftest.$ac_ext <<_ACEOF
8862/* end confdefs.h. */
8863
a3bba767 8864/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8865#ifdef __cplusplus
8866extern "C"
8867#endif
a3bba767
JJ
8868/* We use char because int might match the return type of a gcc2
8869 builtin and then its argument prototype would still apply. */
ba479fd2
NN
8870char ldopen ();
8871int
8872main ()
8873{
a3bba767 8874ldopen ();
ba479fd2
NN
8875 ;
8876 return 0;
8877}
8878_ACEOF
8879rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
8880if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8881 (eval $ac_link) 2>conftest.er1
ba479fd2 8882 ac_status=$?
86da66b5
HPN
8883 grep -v '^ *+' conftest.er1 >conftest.err
8884 rm -f conftest.er1
8885 cat conftest.err >&5
ba479fd2 8886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8887 (exit $ac_status); } &&
8888 { ac_try='test -z "$ac_c_werror_flag"
8889 || test ! -s conftest.err'
8890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8891 (eval $ac_try) 2>&5
8892 ac_status=$?
8893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8894 (exit $ac_status); }; } &&
8895 { ac_try='test -s conftest$ac_exeext'
8896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8897 (eval $ac_try) 2>&5
8898 ac_status=$?
8899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8900 (exit $ac_status); }; }; then
4e70264f
ZW
8901 gcc_cv_collect2_libs="$libs"; break
8902else
ba479fd2
NN
8903 echo "$as_me: failed program was:" >&5
8904sed 's/^/| /' conftest.$ac_ext >&5
8905
4e70264f 8906fi
a3bba767 8907rm -f conftest.err conftest.$ac_objext \
86da66b5 8908 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8909done
8910LIBS="$save_LIBS"
8911test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8912fi
a3bba767
JJ
8913echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8914echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
8915case $gcc_cv_collect2_libs in
8916 "none required") ;;
8917 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8918esac
8919
8920
7f2749d4
RK
8921# When building Ada code on Alpha, we need exc_resume which is usually in
8922# -lexc. So test for it.
8923save_LIBS="$LIBS"
8924LIBS=
a3bba767
JJ
8925echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8926echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
ba479fd2
NN
8927if test "${ac_cv_search_exc_resume+set}" = set; then
8928 echo $ECHO_N "(cached) $ECHO_C" >&6
8929else
8930 ac_func_search_save_LIBS=$LIBS
a3bba767 8931ac_cv_search_exc_resume=no
ba479fd2 8932cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8933/* confdefs.h. */
8934_ACEOF
8935cat confdefs.h >>conftest.$ac_ext
8936cat >>conftest.$ac_ext <<_ACEOF
8937/* end confdefs.h. */
7f2749d4 8938
a3bba767 8939/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8940#ifdef __cplusplus
8941extern "C"
8942#endif
a3bba767
JJ
8943/* We use char because int might match the return type of a gcc2
8944 builtin and then its argument prototype would still apply. */
ba479fd2
NN
8945char exc_resume ();
8946int
8947main ()
8948{
a3bba767 8949exc_resume ();
ba479fd2
NN
8950 ;
8951 return 0;
8952}
8953_ACEOF
a3bba767
JJ
8954rm -f conftest.$ac_objext conftest$ac_exeext
8955if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8956 (eval $ac_link) 2>conftest.er1
ba479fd2 8957 ac_status=$?
86da66b5
HPN
8958 grep -v '^ *+' conftest.er1 >conftest.err
8959 rm -f conftest.er1
8960 cat conftest.err >&5
ba479fd2 8961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8962 (exit $ac_status); } &&
8963 { ac_try='test -z "$ac_c_werror_flag"
8964 || test ! -s conftest.err'
8965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8966 (eval $ac_try) 2>&5
8967 ac_status=$?
8968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8969 (exit $ac_status); }; } &&
8970 { ac_try='test -s conftest$ac_exeext'
8971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8972 (eval $ac_try) 2>&5
8973 ac_status=$?
8974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8975 (exit $ac_status); }; }; then
8976 ac_cv_search_exc_resume="none required"
7f2749d4 8977else
ba479fd2
NN
8978 echo "$as_me: failed program was:" >&5
8979sed 's/^/| /' conftest.$ac_ext >&5
8980
703d89ab 8981fi
a3bba767
JJ
8982rm -f conftest.err conftest.$ac_objext \
8983 conftest$ac_exeext conftest.$ac_ext
8984if test "$ac_cv_search_exc_resume" = no; then
8985 for ac_lib in exc; do
8986 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8987 cat >conftest.$ac_ext <<_ACEOF
8988/* confdefs.h. */
8989_ACEOF
8990cat confdefs.h >>conftest.$ac_ext
8991cat >>conftest.$ac_ext <<_ACEOF
8992/* end confdefs.h. */
8b1f719a 8993
a3bba767
JJ
8994/* Override any gcc2 internal prototype to avoid an error. */
8995#ifdef __cplusplus
8996extern "C"
8997#endif
8998/* We use char because int might match the return type of a gcc2
8999 builtin and then its argument prototype would still apply. */
9000char exc_resume ();
9001int
9002main ()
9003{
9004exc_resume ();
9005 ;
9006 return 0;
9007}
9008_ACEOF
9009rm -f conftest.$ac_objext conftest$ac_exeext
9010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9011 (eval $ac_link) 2>conftest.er1
9012 ac_status=$?
9013 grep -v '^ *+' conftest.er1 >conftest.err
9014 rm -f conftest.er1
9015 cat conftest.err >&5
9016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9017 (exit $ac_status); } &&
9018 { ac_try='test -z "$ac_c_werror_flag"
9019 || test ! -s conftest.err'
9020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9021 (eval $ac_try) 2>&5
9022 ac_status=$?
9023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9024 (exit $ac_status); }; } &&
9025 { ac_try='test -s conftest$ac_exeext'
9026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9027 (eval $ac_try) 2>&5
9028 ac_status=$?
9029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9030 (exit $ac_status); }; }; then
9031 ac_cv_search_exc_resume="-l$ac_lib"
9032break
703d89ab 9033else
a3bba767
JJ
9034 echo "$as_me: failed program was:" >&5
9035sed 's/^/| /' conftest.$ac_ext >&5
9036
9037fi
9038rm -f conftest.err conftest.$ac_objext \
9039 conftest$ac_exeext conftest.$ac_ext
9040 done
b8ec3cc8 9041fi
b8ec3cc8
EC
9042LIBS=$ac_func_search_save_LIBS
9043fi
a3bba767
JJ
9044echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
9045echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
9046if test "$ac_cv_search_exc_resume" != no; then
9047 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
b8ec3cc8
EC
9048
9049fi
9050
dd7f7a6e 9051GNAT_LIBEXC="$LIBS"
b8ec3cc8
EC
9052LIBS="$save_LIBS"
9053
9054
dd7f7a6e
EC
9055# Some systems put ldexp and frexp in libm instead of libc; assume
9056# they're both in the same place. jcf-dump needs them.
9057save_LIBS="$LIBS"
9058LIBS=
a3bba767
JJ
9059echo "$as_me:$LINENO: checking for library containing ldexp" >&5
9060echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
dd7f7a6e 9061if test "${ac_cv_search_ldexp+set}" = set; then
b8ec3cc8
EC
9062 echo $ECHO_N "(cached) $ECHO_C" >&6
9063else
dd7f7a6e 9064 ac_func_search_save_LIBS=$LIBS
a3bba767 9065ac_cv_search_ldexp=no
dd7f7a6e 9066cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9067/* confdefs.h. */
9068_ACEOF
9069cat confdefs.h >>conftest.$ac_ext
9070cat >>conftest.$ac_ext <<_ACEOF
9071/* end confdefs.h. */
dd7f7a6e 9072
a3bba767 9073/* Override any gcc2 internal prototype to avoid an error. */
dd7f7a6e
EC
9074#ifdef __cplusplus
9075extern "C"
9076#endif
a3bba767
JJ
9077/* We use char because int might match the return type of a gcc2
9078 builtin and then its argument prototype would still apply. */
dd7f7a6e 9079char ldexp ();
ba479fd2
NN
9080int
9081main ()
9082{
a3bba767 9083ldexp ();
ba479fd2
NN
9084 ;
9085 return 0;
9086}
9087_ACEOF
a3bba767
JJ
9088rm -f conftest.$ac_objext conftest$ac_exeext
9089if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9090 (eval $ac_link) 2>conftest.er1
dd7f7a6e
EC
9091 ac_status=$?
9092 grep -v '^ *+' conftest.er1 >conftest.err
9093 rm -f conftest.er1
9094 cat conftest.err >&5
9095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9096 (exit $ac_status); } &&
9097 { ac_try='test -z "$ac_c_werror_flag"
9098 || test ! -s conftest.err'
9099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9100 (eval $ac_try) 2>&5
9101 ac_status=$?
9102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9103 (exit $ac_status); }; } &&
9104 { ac_try='test -s conftest$ac_exeext'
9105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9106 (eval $ac_try) 2>&5
9107 ac_status=$?
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); }; }; then
9110 ac_cv_search_ldexp="none required"
dd7f7a6e
EC
9111else
9112 echo "$as_me: failed program was:" >&5
9113sed 's/^/| /' conftest.$ac_ext >&5
9114
703d89ab 9115fi
a3bba767
JJ
9116rm -f conftest.err conftest.$ac_objext \
9117 conftest$ac_exeext conftest.$ac_ext
9118if test "$ac_cv_search_ldexp" = no; then
9119 for ac_lib in m; do
9120 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9121 cat >conftest.$ac_ext <<_ACEOF
9122/* confdefs.h. */
9123_ACEOF
9124cat confdefs.h >>conftest.$ac_ext
9125cat >>conftest.$ac_ext <<_ACEOF
9126/* end confdefs.h. */
8b1f719a 9127
a3bba767
JJ
9128/* Override any gcc2 internal prototype to avoid an error. */
9129#ifdef __cplusplus
9130extern "C"
9131#endif
9132/* We use char because int might match the return type of a gcc2
9133 builtin and then its argument prototype would still apply. */
9134char ldexp ();
9135int
9136main ()
9137{
9138ldexp ();
9139 ;
9140 return 0;
9141}
9142_ACEOF
9143rm -f conftest.$ac_objext conftest$ac_exeext
9144if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9145 (eval $ac_link) 2>conftest.er1
9146 ac_status=$?
9147 grep -v '^ *+' conftest.er1 >conftest.err
9148 rm -f conftest.er1
9149 cat conftest.err >&5
9150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9151 (exit $ac_status); } &&
9152 { ac_try='test -z "$ac_c_werror_flag"
9153 || test ! -s conftest.err'
9154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9155 (eval $ac_try) 2>&5
9156 ac_status=$?
9157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9158 (exit $ac_status); }; } &&
9159 { ac_try='test -s conftest$ac_exeext'
9160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9161 (eval $ac_try) 2>&5
9162 ac_status=$?
9163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9164 (exit $ac_status); }; }; then
9165 ac_cv_search_ldexp="-l$ac_lib"
9166break
703d89ab 9167else
a3bba767
JJ
9168 echo "$as_me: failed program was:" >&5
9169sed 's/^/| /' conftest.$ac_ext >&5
9170
9171fi
9172rm -f conftest.err conftest.$ac_objext \
9173 conftest$ac_exeext conftest.$ac_ext
9174 done
dd7f7a6e
EC
9175fi
9176LIBS=$ac_func_search_save_LIBS
9177fi
a3bba767
JJ
9178echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
9179echo "${ECHO_T}$ac_cv_search_ldexp" >&6
9180if test "$ac_cv_search_ldexp" != no; then
9181 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
dd7f7a6e
EC
9182
9183fi
9184
9185LDEXP_LIB="$LIBS"
9186LIBS="$save_LIBS"
9187
9188
9189# Use <inttypes.h> only if it exists,
9190# doesn't clash with <sys/types.h>, and declares intmax_t.
a3bba767
JJ
9191echo "$as_me:$LINENO: checking for inttypes.h" >&5
9192echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
dd7f7a6e
EC
9193if test "${gcc_cv_header_inttypes_h+set}" = set; then
9194 echo $ECHO_N "(cached) $ECHO_C" >&6
9195else
9196 cat >conftest.$ac_ext <<_ACEOF
9197/* confdefs.h. */
9198_ACEOF
9199cat confdefs.h >>conftest.$ac_ext
9200cat >>conftest.$ac_ext <<_ACEOF
9201/* end confdefs.h. */
9202#include <sys/types.h>
9203#include <inttypes.h>
9204int
9205main ()
9206{
9207intmax_t i = -1;
9208 ;
9209 return 0;
9210}
9211_ACEOF
9212rm -f conftest.$ac_objext
a3bba767
JJ
9213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9214 (eval $ac_compile) 2>conftest.er1
dd7f7a6e
EC
9215 ac_status=$?
9216 grep -v '^ *+' conftest.er1 >conftest.err
9217 rm -f conftest.er1
9218 cat conftest.err >&5
9219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9220 (exit $ac_status); } &&
9221 { ac_try='test -z "$ac_c_werror_flag"
9222 || test ! -s conftest.err'
9223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9224 (eval $ac_try) 2>&5
9225 ac_status=$?
9226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9227 (exit $ac_status); }; } &&
9228 { ac_try='test -s conftest.$ac_objext'
9229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9230 (eval $ac_try) 2>&5
9231 ac_status=$?
9232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9233 (exit $ac_status); }; }; then
dd7f7a6e
EC
9234 gcc_cv_header_inttypes_h=yes
9235else
9236 echo "$as_me: failed program was:" >&5
9237sed 's/^/| /' conftest.$ac_ext >&5
9238
a3bba767 9239gcc_cv_header_inttypes_h=no
dd7f7a6e 9240fi
a3bba767 9241rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e
EC
9242fi
9243
a3bba767
JJ
9244echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
9245echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
dd7f7a6e
EC
9246if test $gcc_cv_header_inttypes_h = yes; then
9247
9248cat >>confdefs.h <<\_ACEOF
9249#define HAVE_INTTYPES_H 1
9250_ACEOF
9251
0056a9b5 9252fi
956d6950 9253
c149cc37 9254
ba479fd2
NN
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
0d667716
KG
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
ba479fd2
NN
9283
9284
9285
9286
9287
9288
9289
9290
52a6edcc 9291for ac_func in times clock kill getrlimit setrlimit atoll atoq \
0d667716
KG
9292 sysconf strsignal getrusage nl_langinfo scandir alphasort \
9293 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9294 clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
956d6950 9295do
ba479fd2 9296as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
a3bba767
JJ
9297echo "$as_me:$LINENO: checking for $ac_func" >&5
9298echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9299if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
9300 echo $ECHO_N "(cached) $ECHO_C" >&6
9301else
9302 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9303/* confdefs.h. */
9304_ACEOF
9305cat confdefs.h >>conftest.$ac_ext
9306cat >>conftest.$ac_ext <<_ACEOF
9307/* end confdefs.h. */
86da66b5
HPN
9308/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9309 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9310#define $ac_func innocuous_$ac_func
9311
956d6950 9312/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9313 which can conflict with char $ac_func (); below.
9314 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9315 <limits.h> exists even on freestanding compilers. */
86da66b5 9316
ba479fd2
NN
9317#ifdef __STDC__
9318# include <limits.h>
9319#else
9320# include <assert.h>
9321#endif
86da66b5
HPN
9322
9323#undef $ac_func
9324
a3bba767 9325/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9326#ifdef __cplusplus
9327extern "C"
a3bba767 9328{
ba479fd2 9329#endif
a3bba767
JJ
9330/* We use char because int might match the return type of a gcc2
9331 builtin and then its argument prototype would still apply. */
ba479fd2 9332char $ac_func ();
956d6950
JL
9333/* The GNU C library defines this for functions which it implements
9334 to always fail with ENOSYS. Some functions are actually named
9335 something starting with __ and the normal name is an alias. */
a3bba767 9336#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
956d6950 9337choke me
a3bba767
JJ
9338#else
9339char (*f) () = $ac_func;
9340#endif
9341#ifdef __cplusplus
9342}
956d6950
JL
9343#endif
9344
ba479fd2
NN
9345int
9346main ()
9347{
a3bba767 9348return f != $ac_func;
ba479fd2
NN
9349 ;
9350 return 0;
9351}
9352_ACEOF
9353rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
9354if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9355 (eval $ac_link) 2>conftest.er1
ba479fd2 9356 ac_status=$?
86da66b5
HPN
9357 grep -v '^ *+' conftest.er1 >conftest.err
9358 rm -f conftest.er1
9359 cat conftest.err >&5
ba479fd2 9360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9361 (exit $ac_status); } &&
9362 { ac_try='test -z "$ac_c_werror_flag"
9363 || test ! -s conftest.err'
9364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9365 (eval $ac_try) 2>&5
9366 ac_status=$?
9367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9368 (exit $ac_status); }; } &&
9369 { ac_try='test -s conftest$ac_exeext'
9370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9371 (eval $ac_try) 2>&5
9372 ac_status=$?
9373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9374 (exit $ac_status); }; }; then
ba479fd2
NN
9375 eval "$as_ac_var=yes"
9376else
9377 echo "$as_me: failed program was:" >&5
9378sed 's/^/| /' conftest.$ac_ext >&5
9379
a3bba767 9380eval "$as_ac_var=no"
ba479fd2 9381fi
a3bba767 9382rm -f conftest.err conftest.$ac_objext \
86da66b5 9383 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9384fi
a3bba767
JJ
9385echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9386echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
9387if test `eval echo '${'$as_ac_var'}'` = yes; then
9388 cat >>confdefs.h <<_ACEOF
9389#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9390_ACEOF
956d6950 9391
956d6950
JL
9392fi
9393done
9394
6885fc87 9395
39f6c4c8 9396if test x$ac_cv_func_mbstowcs = xyes; then
a3bba767
JJ
9397 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9398echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
ba479fd2
NN
9399if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9400 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9401else
9402 if test "$cross_compiling" = yes; then
9403 gcc_cv_func_mbstowcs_works=yes
9404else
ba479fd2 9405 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9406/* confdefs.h. */
9407_ACEOF
9408cat confdefs.h >>conftest.$ac_ext
9409cat >>conftest.$ac_ext <<_ACEOF
9410/* end confdefs.h. */
39f6c4c8
KW
9411#include <stdlib.h>
9412int main()
9413{
9414 mbstowcs(0, "", 0);
9415 return 0;
9416}
ba479fd2
NN
9417_ACEOF
9418rm -f conftest$ac_exeext
a3bba767
JJ
9419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9420 (eval $ac_link) 2>&5
ba479fd2
NN
9421 ac_status=$?
9422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9423 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
9424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9425 (eval $ac_try) 2>&5
ba479fd2
NN
9426 ac_status=$?
9427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9428 (exit $ac_status); }; }; then
39f6c4c8
KW
9429 gcc_cv_func_mbstowcs_works=yes
9430else
ba479fd2
NN
9431 echo "$as_me: program exited with status $ac_status" >&5
9432echo "$as_me: failed program was:" >&5
9433sed 's/^/| /' conftest.$ac_ext >&5
9434
9435( exit $ac_status )
9436gcc_cv_func_mbstowcs_works=no
39f6c4c8 9437fi
a3bba767 9438rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 9439fi
39f6c4c8 9440fi
a3bba767
JJ
9441echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9442echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 9443 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
9444
9445cat >>confdefs.h <<\_ACEOF
39f6c4c8 9446#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 9447_ACEOF
39f6c4c8
KW
9448
9449 fi
9450fi
9451
a3bba767
JJ
9452echo "$as_me:$LINENO: checking for ssize_t" >&5
9453echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
ba479fd2
NN
9454if test "${ac_cv_type_ssize_t+set}" = set; then
9455 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 9456else
ba479fd2 9457 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9458/* confdefs.h. */
9459_ACEOF
9460cat confdefs.h >>conftest.$ac_ext
9461cat >>conftest.$ac_ext <<_ACEOF
9462/* end confdefs.h. */
8b4fc07a
NN
9463$ac_includes_default
9464int
9465main ()
9466{
a3bba767 9467if ((ssize_t *) 0)
8b4fc07a 9468 return 0;
a3bba767 9469if (sizeof (ssize_t))
8b4fc07a
NN
9470 return 0;
9471 ;
9472 return 0;
9473}
ba479fd2 9474_ACEOF
8b4fc07a 9475rm -f conftest.$ac_objext
a3bba767
JJ
9476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9477 (eval $ac_compile) 2>conftest.er1
8b4fc07a 9478 ac_status=$?
86da66b5
HPN
9479 grep -v '^ *+' conftest.er1 >conftest.err
9480 rm -f conftest.er1
9481 cat conftest.err >&5
8b4fc07a 9482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9483 (exit $ac_status); } &&
9484 { ac_try='test -z "$ac_c_werror_flag"
9485 || test ! -s conftest.err'
9486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9487 (eval $ac_try) 2>&5
9488 ac_status=$?
9489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9490 (exit $ac_status); }; } &&
9491 { ac_try='test -s conftest.$ac_objext'
9492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9493 (eval $ac_try) 2>&5
9494 ac_status=$?
9495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9496 (exit $ac_status); }; }; then
cb65112a 9497 ac_cv_type_ssize_t=yes
f12bc141 9498else
8b4fc07a
NN
9499 echo "$as_me: failed program was:" >&5
9500sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9501
a3bba767 9502ac_cv_type_ssize_t=no
8b4fc07a 9503fi
a3bba767 9504rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9505fi
a3bba767
JJ
9506echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9507echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
9508if test $ac_cv_type_ssize_t = yes; then
9509 :
9510else
ba479fd2 9511
8b4fc07a 9512cat >>confdefs.h <<_ACEOF
f12bc141 9513#define ssize_t int
ba479fd2 9514_ACEOF
f12bc141
ZW
9515
9516fi
9517
0b9d02c6 9518
e256b8b6
DA
9519# Try to determine the array type of the second argument of getgroups
9520# for the target system (int or gid_t).
a3bba767
JJ
9521echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9522echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
ba479fd2
NN
9523if test "${ac_cv_type_uid_t+set}" = set; then
9524 echo $ECHO_N "(cached) $ECHO_C" >&6
9525else
9526 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9527/* confdefs.h. */
9528_ACEOF
9529cat confdefs.h >>conftest.$ac_ext
9530cat >>conftest.$ac_ext <<_ACEOF
9531/* end confdefs.h. */
e256b8b6 9532#include <sys/types.h>
ba479fd2
NN
9533
9534_ACEOF
e256b8b6 9535if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9536 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
9537 ac_cv_type_uid_t=yes
9538else
e256b8b6
DA
9539 ac_cv_type_uid_t=no
9540fi
9541rm -f conftest*
9542
9543fi
a3bba767
JJ
9544echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9545echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 9546if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
9547
9548cat >>confdefs.h <<\_ACEOF
e256b8b6 9549#define uid_t int
ba479fd2 9550_ACEOF
cafe096b 9551
ba479fd2
NN
9552
9553cat >>confdefs.h <<\_ACEOF
e256b8b6 9554#define gid_t int
ba479fd2 9555_ACEOF
e256b8b6
DA
9556
9557fi
9558
a3bba767
JJ
9559echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9560echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
ba479fd2
NN
9561if test "${ac_cv_type_getgroups+set}" = set; then
9562 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
9563else
9564 if test "$cross_compiling" = yes; then
9565 ac_cv_type_getgroups=cross
9566else
ba479fd2 9567 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9568/* confdefs.h. */
9569_ACEOF
9570cat confdefs.h >>conftest.$ac_ext
9571cat >>conftest.$ac_ext <<_ACEOF
9572/* end confdefs.h. */
e256b8b6 9573/* Thanks to Mike Rendell for this test. */
a3bba767 9574#include <sys/types.h>
e256b8b6
DA
9575#define NGID 256
9576#undef MAX
9577#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
9578
9579int
9580main ()
e256b8b6
DA
9581{
9582 gid_t gidset[NGID];
9583 int i, n;
a3bba767 9584 union { gid_t gval; long lval; } val;
e256b8b6
DA
9585
9586 val.lval = -1;
9587 for (i = 0; i < NGID; i++)
9588 gidset[i] = val.gval;
9589 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 9590 gidset);
e256b8b6 9591 /* Exit non-zero if getgroups seems to require an array of ints. This
a3bba767
JJ
9592 happens when gid_t is short but getgroups modifies an array of ints. */
9593 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 9594}
ba479fd2
NN
9595_ACEOF
9596rm -f conftest$ac_exeext
a3bba767
JJ
9597if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9598 (eval $ac_link) 2>&5
ba479fd2
NN
9599 ac_status=$?
9600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9601 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
9602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9603 (eval $ac_try) 2>&5
ba479fd2
NN
9604 ac_status=$?
9605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9606 (exit $ac_status); }; }; then
9607 ac_cv_type_getgroups=gid_t
63cf211a 9608else
ba479fd2
NN
9609 echo "$as_me: program exited with status $ac_status" >&5
9610echo "$as_me: failed program was:" >&5
9611sed 's/^/| /' conftest.$ac_ext >&5
9612
9613( exit $ac_status )
9614ac_cv_type_getgroups=int
e256b8b6 9615fi
a3bba767 9616rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 9617fi
e256b8b6 9618if test $ac_cv_type_getgroups = cross; then
ba479fd2 9619 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9620/* confdefs.h. */
9621_ACEOF
9622cat confdefs.h >>conftest.$ac_ext
9623cat >>conftest.$ac_ext <<_ACEOF
9624/* end confdefs.h. */
e256b8b6 9625#include <unistd.h>
ba479fd2
NN
9626
9627_ACEOF
e256b8b6 9628if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9629 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
9630 ac_cv_type_getgroups=gid_t
9631else
e256b8b6
DA
9632 ac_cv_type_getgroups=int
9633fi
9634rm -f conftest*
9635
9636fi
9637fi
a3bba767
JJ
9638echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9639echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 9640
ba479fd2 9641cat >>confdefs.h <<_ACEOF
e256b8b6 9642#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 9643_ACEOF
e256b8b6
DA
9644
9645
9646if test "${target}" = "${build}"; then
9647 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9648else
9649 case "${target}" in
9650 # This condition may need some tweaking. It should include all
9651 # targets where the array type of the second argument of getgroups
9652 # is int and the type of gid_t is not equivalent to int.
9653 *-*-sunos* | *-*-ultrix*)
9654 TARGET_GETGROUPS_T=int
9655 ;;
9656 *)
9657 TARGET_GETGROUPS_T=gid_t
9658 ;;
9659 esac
9660fi
9661
9662
3b0727a0 9663
a3bba767
JJ
9664echo "$as_me:$LINENO: checking for sys/mman.h" >&5
9665echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
3b0727a0
MR
9666if test "${ac_cv_header_sys_mman_h+set}" = set; then
9667 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 9668else
18fc9bd4 9669 cat >conftest.$ac_ext <<_ACEOF
3b0727a0
MR
9670/* confdefs.h. */
9671_ACEOF
9672cat confdefs.h >>conftest.$ac_ext
9673cat >>conftest.$ac_ext <<_ACEOF
9674/* end confdefs.h. */
9675#include <sys/mman.h>
9676_ACEOF
a3bba767
JJ
9677if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9678 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3b0727a0
MR
9679 ac_status=$?
9680 grep -v '^ *+' conftest.er1 >conftest.err
9681 rm -f conftest.er1
9682 cat conftest.err >&5
9683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9684 (exit $ac_status); } >/dev/null; then
9685 if test -s conftest.err; then
9686 ac_cpp_err=$ac_c_preproc_warn_flag
9687 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9688 else
9689 ac_cpp_err=
9690 fi
9691else
9692 ac_cpp_err=yes
9693fi
9694if test -z "$ac_cpp_err"; then
18fc9bd4 9695 ac_cv_header_sys_mman_h=yes
3b0727a0
MR
9696else
9697 echo "$as_me: failed program was:" >&5
9698sed 's/^/| /' conftest.$ac_ext >&5
9699
18fc9bd4 9700 ac_cv_header_sys_mman_h=no
3b0727a0
MR
9701fi
9702rm -f conftest.err conftest.$ac_ext
9703fi
a3bba767
JJ
9704echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9705echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
3b0727a0
MR
9706if test $ac_cv_header_sys_mman_h = yes; then
9707 gcc_header_sys_mman_h=yes
9708else
9709 gcc_header_sys_mman_h=no
9710fi
9711
a3bba767
JJ
9712echo "$as_me:$LINENO: checking for mmap" >&5
9713echo $ECHO_N "checking for mmap... $ECHO_C" >&6
3b0727a0
MR
9714if test "${ac_cv_func_mmap+set}" = set; then
9715 echo $ECHO_N "(cached) $ECHO_C" >&6
9716else
9717 cat >conftest.$ac_ext <<_ACEOF
9718/* confdefs.h. */
9719_ACEOF
9720cat confdefs.h >>conftest.$ac_ext
9721cat >>conftest.$ac_ext <<_ACEOF
9722/* end confdefs.h. */
9723/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9724 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9725#define mmap innocuous_mmap
9726
9727/* System header to define __stub macros and hopefully few prototypes,
9728 which can conflict with char mmap (); below.
9729 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9730 <limits.h> exists even on freestanding compilers. */
9731
9732#ifdef __STDC__
9733# include <limits.h>
9734#else
9735# include <assert.h>
9736#endif
9737
9738#undef mmap
9739
a3bba767 9740/* Override any gcc2 internal prototype to avoid an error. */
3b0727a0
MR
9741#ifdef __cplusplus
9742extern "C"
a3bba767 9743{
3b0727a0 9744#endif
a3bba767
JJ
9745/* We use char because int might match the return type of a gcc2
9746 builtin and then its argument prototype would still apply. */
3b0727a0
MR
9747char mmap ();
9748/* The GNU C library defines this for functions which it implements
9749 to always fail with ENOSYS. Some functions are actually named
9750 something starting with __ and the normal name is an alias. */
a3bba767 9751#if defined (__stub_mmap) || defined (__stub___mmap)
3b0727a0 9752choke me
a3bba767
JJ
9753#else
9754char (*f) () = mmap;
9755#endif
9756#ifdef __cplusplus
9757}
3b0727a0
MR
9758#endif
9759
9760int
9761main ()
9762{
a3bba767 9763return f != mmap;
3b0727a0
MR
9764 ;
9765 return 0;
9766}
9767_ACEOF
9768rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
9769if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9770 (eval $ac_link) 2>conftest.er1
3b0727a0
MR
9771 ac_status=$?
9772 grep -v '^ *+' conftest.er1 >conftest.err
9773 rm -f conftest.er1
9774 cat conftest.err >&5
9775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9776 (exit $ac_status); } &&
9777 { ac_try='test -z "$ac_c_werror_flag"
9778 || test ! -s conftest.err'
9779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9780 (eval $ac_try) 2>&5
9781 ac_status=$?
9782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9783 (exit $ac_status); }; } &&
9784 { ac_try='test -s conftest$ac_exeext'
9785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9786 (eval $ac_try) 2>&5
9787 ac_status=$?
9788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9789 (exit $ac_status); }; }; then
8b1f719a
PB
9790 ac_cv_func_mmap=yes
9791else
9792 echo "$as_me: failed program was:" >&5
9793sed 's/^/| /' conftest.$ac_ext >&5
a6ccdbab 9794
a3bba767 9795ac_cv_func_mmap=no
8b1f719a 9796fi
a3bba767 9797rm -f conftest.err conftest.$ac_objext \
3b0727a0
MR
9798 conftest$ac_exeext conftest.$ac_ext
9799fi
a3bba767
JJ
9800echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9801echo "${ECHO_T}$ac_cv_func_mmap" >&6
3b0727a0
MR
9802if test $ac_cv_func_mmap = yes; then
9803 gcc_func_mmap=yes
9804else
9805 gcc_func_mmap=no
9806fi
9807
9808if test "$gcc_header_sys_mman_h" != yes \
9809 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
9810 gcc_cv_func_mmap_file=no
9811 gcc_cv_func_mmap_dev_zero=no
9812 gcc_cv_func_mmap_anon=no
9813else
a3bba767
JJ
9814 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9815echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
ba479fd2
NN
9816if test "${gcc_cv_func_mmap_file+set}" = set; then
9817 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 9818else
ba479fd2 9819 # Add a system to this blacklist if
1072ec3f
ZW
9820 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9821 # memory area containing the same data that you'd get if you applied
9822 # read() to the same fd. The only system known to have a problem here
9823 # is VMS, where text files have record structure.
9824 case "$host_os" in
ba479fd2 9825 vms* | ultrix*)
1072ec3f
ZW
9826 gcc_cv_func_mmap_file=no ;;
9827 *)
9828 gcc_cv_func_mmap_file=yes;;
9829 esac
9830fi
a3bba767
JJ
9831echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9832echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9833 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9834echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
ba479fd2
NN
9835if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9836 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9837else
9838 # Add a system to this blacklist if it has mmap() but /dev/zero
9839 # does not exist, or if mmapping /dev/zero does not give anonymous
9840 # zeroed pages with both the following properties:
9841 # 1. If you map N consecutive pages in with one call, and then
9842 # unmap any subset of those pages, the pages that were not
9843 # explicitly unmapped remain accessible.
9844 # 2. If you map two adjacent blocks of memory and then unmap them
9845 # both at once, they must both go away.
9846 # Systems known to be in this category are Windows (all variants),
9847 # VMS, and Darwin.
9848 case "$host_os" in
2ce240d3 9849 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
9850 gcc_cv_func_mmap_dev_zero=no ;;
9851 *)
9852 gcc_cv_func_mmap_dev_zero=yes;;
9853 esac
9854fi
a3bba767
JJ
9855echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9856echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
9857
9858 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
a3bba767
JJ
9859 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9860echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
ba479fd2
NN
9861if test "${gcc_cv_decl_map_anon+set}" = set; then
9862 echo $ECHO_N "(cached) $ECHO_C" >&6
9863else
9864 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9865/* confdefs.h. */
9866_ACEOF
9867cat confdefs.h >>conftest.$ac_ext
9868cat >>conftest.$ac_ext <<_ACEOF
9869/* end confdefs.h. */
1072ec3f
ZW
9870#include <sys/types.h>
9871#include <sys/mman.h>
9872#include <unistd.h>
9873
9874#ifndef MAP_ANONYMOUS
9875#define MAP_ANONYMOUS MAP_ANON
9876#endif
9877
ba479fd2
NN
9878int
9879main ()
9880{
1072ec3f 9881int n = MAP_ANONYMOUS;
ba479fd2
NN
9882 ;
9883 return 0;
9884}
9885_ACEOF
9886rm -f conftest.$ac_objext
a3bba767
JJ
9887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9888 (eval $ac_compile) 2>conftest.er1
ba479fd2 9889 ac_status=$?
86da66b5
HPN
9890 grep -v '^ *+' conftest.er1 >conftest.err
9891 rm -f conftest.er1
9892 cat conftest.err >&5
ba479fd2 9893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9894 (exit $ac_status); } &&
9895 { ac_try='test -z "$ac_c_werror_flag"
9896 || test ! -s conftest.err'
9897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9898 (eval $ac_try) 2>&5
9899 ac_status=$?
9900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9901 (exit $ac_status); }; } &&
9902 { ac_try='test -s conftest.$ac_objext'
9903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9904 (eval $ac_try) 2>&5
9905 ac_status=$?
9906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9907 (exit $ac_status); }; }; then
1072ec3f
ZW
9908 gcc_cv_decl_map_anon=yes
9909else
ba479fd2
NN
9910 echo "$as_me: failed program was:" >&5
9911sed 's/^/| /' conftest.$ac_ext >&5
9912
a3bba767 9913gcc_cv_decl_map_anon=no
1072ec3f 9914fi
a3bba767 9915rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 9916fi
a3bba767
JJ
9917echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9918echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
9919
9920 if test $gcc_cv_decl_map_anon = no; then
9921 gcc_cv_func_mmap_anon=no
9922 else
a3bba767
JJ
9923 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9924echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
ba479fd2
NN
9925if test "${gcc_cv_func_mmap_anon+set}" = set; then
9926 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9927else
9928 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9929 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9930 # doesn't give anonymous zeroed pages with the same properties listed
9931 # above for use of /dev/zero.
9932 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9933 case "$host_os" in
9934 vms* | cygwin* | pe | mingw* | sco* | udk* )
9935 gcc_cv_func_mmap_anon=no ;;
9936 *)
9937 gcc_cv_func_mmap_anon=yes;;
9938 esac
9939fi
a3bba767
JJ
9940echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9941echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
9942 fi
9943fi
9944
9945if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
9946
9947cat >>confdefs.h <<\_ACEOF
1072ec3f 9948#define HAVE_MMAP_FILE 1
ba479fd2 9949_ACEOF
1072ec3f
ZW
9950
9951fi
9952if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
9953
9954cat >>confdefs.h <<\_ACEOF
1072ec3f 9955#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 9956_ACEOF
1072ec3f
ZW
9957
9958fi
9959if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
9960
9961cat >>confdefs.h <<\_ACEOF
1072ec3f 9962#define HAVE_MMAP_ANON 1
ba479fd2 9963_ACEOF
1072ec3f
ZW
9964
9965fi
9966
b27d2bd5
MK
9967
9968case "${host}" in
ee262b6f 9969*-*-*vms*)
ba479fd2 9970 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
9971 # won't work, and it isn't easily adaptable. It makes more sense to
9972 # just force it.
9973 ac_cv_func_vfork_works=yes
9974 ;;
b27d2bd5 9975esac
a3bba767
JJ
9976echo "$as_me:$LINENO: checking for pid_t" >&5
9977echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
ba479fd2
NN
9978if test "${ac_cv_type_pid_t+set}" = set; then
9979 echo $ECHO_N "(cached) $ECHO_C" >&6
9980else
9981 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9982/* confdefs.h. */
9983_ACEOF
9984cat confdefs.h >>conftest.$ac_ext
9985cat >>conftest.$ac_ext <<_ACEOF
9986/* end confdefs.h. */
9987$ac_includes_default
9988int
9989main ()
9990{
a3bba767 9991if ((pid_t *) 0)
ba479fd2 9992 return 0;
a3bba767 9993if (sizeof (pid_t))
ba479fd2
NN
9994 return 0;
9995 ;
9996 return 0;
9997}
9998_ACEOF
9999rm -f conftest.$ac_objext
a3bba767
JJ
10000if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10001 (eval $ac_compile) 2>conftest.er1
ba479fd2 10002 ac_status=$?
86da66b5
HPN
10003 grep -v '^ *+' conftest.er1 >conftest.err
10004 rm -f conftest.er1
10005 cat conftest.err >&5
ba479fd2 10006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
10007 (exit $ac_status); } &&
10008 { ac_try='test -z "$ac_c_werror_flag"
10009 || test ! -s conftest.err'
10010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10011 (eval $ac_try) 2>&5
10012 ac_status=$?
10013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10014 (exit $ac_status); }; } &&
10015 { ac_try='test -s conftest.$ac_objext'
10016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10017 (eval $ac_try) 2>&5
10018 ac_status=$?
10019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10020 (exit $ac_status); }; }; then
cb65112a 10021 ac_cv_type_pid_t=yes
c375c43b 10022else
ba479fd2
NN
10023 echo "$as_me: failed program was:" >&5
10024sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10025
a3bba767 10026ac_cv_type_pid_t=no
ba479fd2 10027fi
a3bba767 10028rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10029fi
a3bba767
JJ
10030echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10031echo "${ECHO_T}$ac_cv_type_pid_t" >&6
ba479fd2
NN
10032if test $ac_cv_type_pid_t = yes; then
10033 :
10034else
10035
10036cat >>confdefs.h <<_ACEOF
c375c43b 10037#define pid_t int
ba479fd2 10038_ACEOF
c375c43b
KG
10039
10040fi
10041
ba479fd2 10042
a3bba767
JJ
10043
10044for ac_header in unistd.h vfork.h
ba479fd2
NN
10045do
10046as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a3bba767
JJ
10047echo "$as_me:$LINENO: checking for $ac_header" >&5
10048echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10049if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 10050 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10051else
18fc9bd4 10052 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10053/* confdefs.h. */
10054_ACEOF
10055cat confdefs.h >>conftest.$ac_ext
10056cat >>conftest.$ac_ext <<_ACEOF
10057/* end confdefs.h. */
10058#include <$ac_header>
10059_ACEOF
a3bba767
JJ
10060if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10061 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
10062 ac_status=$?
10063 grep -v '^ *+' conftest.er1 >conftest.err
10064 rm -f conftest.er1
10065 cat conftest.err >&5
10066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
10067 (exit $ac_status); } >/dev/null; then
10068 if test -s conftest.err; then
10069 ac_cpp_err=$ac_c_preproc_warn_flag
10070 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10071 else
10072 ac_cpp_err=
10073 fi
10074else
10075 ac_cpp_err=yes
10076fi
10077if test -z "$ac_cpp_err"; then
18fc9bd4 10078 eval "$as_ac_Header=yes"
ba479fd2
NN
10079else
10080 echo "$as_me: failed program was:" >&5
10081sed 's/^/| /' conftest.$ac_ext >&5
10082
18fc9bd4 10083 eval "$as_ac_Header=no"
ba479fd2
NN
10084fi
10085rm -f conftest.err conftest.$ac_ext
c375c43b 10086fi
a3bba767
JJ
10087echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10088echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
10089if test `eval echo '${'$as_ac_Header'}'` = yes; then
10090 cat >>confdefs.h <<_ACEOF
10091#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10092_ACEOF
6e3f3080
NN
10093
10094fi
ba479fd2
NN
10095done
10096
10097
10098
10099for ac_func in fork vfork
10100do
10101as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
a3bba767
JJ
10102echo "$as_me:$LINENO: checking for $ac_func" >&5
10103echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10104if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
10105 echo $ECHO_N "(cached) $ECHO_C" >&6
10106else
10107 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10108/* confdefs.h. */
10109_ACEOF
10110cat confdefs.h >>conftest.$ac_ext
10111cat >>conftest.$ac_ext <<_ACEOF
10112/* end confdefs.h. */
86da66b5
HPN
10113/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10114 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10115#define $ac_func innocuous_$ac_func
10116
c375c43b 10117/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10118 which can conflict with char $ac_func (); below.
10119 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10120 <limits.h> exists even on freestanding compilers. */
86da66b5 10121
ba479fd2
NN
10122#ifdef __STDC__
10123# include <limits.h>
10124#else
10125# include <assert.h>
10126#endif
86da66b5
HPN
10127
10128#undef $ac_func
10129
a3bba767 10130/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10131#ifdef __cplusplus
10132extern "C"
a3bba767 10133{
ba479fd2 10134#endif
a3bba767
JJ
10135/* We use char because int might match the return type of a gcc2
10136 builtin and then its argument prototype would still apply. */
ba479fd2 10137char $ac_func ();
c375c43b
KG
10138/* The GNU C library defines this for functions which it implements
10139 to always fail with ENOSYS. Some functions are actually named
10140 something starting with __ and the normal name is an alias. */
a3bba767 10141#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b 10142choke me
a3bba767
JJ
10143#else
10144char (*f) () = $ac_func;
10145#endif
10146#ifdef __cplusplus
10147}
c375c43b
KG
10148#endif
10149
ba479fd2
NN
10150int
10151main ()
10152{
a3bba767 10153return f != $ac_func;
ba479fd2
NN
10154 ;
10155 return 0;
10156}
10157_ACEOF
10158rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
10159if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10160 (eval $ac_link) 2>conftest.er1
ba479fd2 10161 ac_status=$?
86da66b5
HPN
10162 grep -v '^ *+' conftest.er1 >conftest.err
10163 rm -f conftest.er1
10164 cat conftest.err >&5
ba479fd2 10165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
10166 (exit $ac_status); } &&
10167 { ac_try='test -z "$ac_c_werror_flag"
10168 || test ! -s conftest.err'
10169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10170 (eval $ac_try) 2>&5
10171 ac_status=$?
10172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10173 (exit $ac_status); }; } &&
10174 { ac_try='test -s conftest$ac_exeext'
10175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10176 (eval $ac_try) 2>&5
10177 ac_status=$?
10178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10179 (exit $ac_status); }; }; then
ba479fd2
NN
10180 eval "$as_ac_var=yes"
10181else
10182 echo "$as_me: failed program was:" >&5
10183sed 's/^/| /' conftest.$ac_ext >&5
10184
a3bba767 10185eval "$as_ac_var=no"
ba479fd2 10186fi
a3bba767 10187rm -f conftest.err conftest.$ac_objext \
86da66b5 10188 conftest$ac_exeext conftest.$ac_ext
ba479fd2 10189fi
a3bba767
JJ
10190echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10191echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
10192if test `eval echo '${'$as_ac_var'}'` = yes; then
10193 cat >>confdefs.h <<_ACEOF
10194#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10195_ACEOF
10196
c375c43b 10197fi
ba479fd2 10198done
c375c43b 10199
ba479fd2 10200if test "x$ac_cv_func_fork" = xyes; then
a3bba767
JJ
10201 echo "$as_me:$LINENO: checking for working fork" >&5
10202echo $ECHO_N "checking for working fork... $ECHO_C" >&6
ba479fd2
NN
10203if test "${ac_cv_func_fork_works+set}" = set; then
10204 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10205else
ba479fd2
NN
10206 if test "$cross_compiling" = yes; then
10207 ac_cv_func_fork_works=cross
10208else
10209 cat >conftest.$ac_ext <<_ACEOF
a3bba767
JJ
10210/* By Ruediger Kuhlmann. */
10211 #include <sys/types.h>
10212 #if HAVE_UNISTD_H
10213 # include <unistd.h>
10214 #endif
10215 /* Some systems only have a dummy stub for fork() */
10216 int main ()
10217 {
10218 if (fork() < 0)
10219 exit (1);
10220 exit (0);
10221 }
ba479fd2
NN
10222_ACEOF
10223rm -f conftest$ac_exeext
a3bba767
JJ
10224if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10225 (eval $ac_link) 2>&5
ba479fd2
NN
10226 ac_status=$?
10227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10228 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
10229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10230 (eval $ac_try) 2>&5
ba479fd2
NN
10231 ac_status=$?
10232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10233 (exit $ac_status); }; }; then
10234 ac_cv_func_fork_works=yes
10235else
10236 echo "$as_me: program exited with status $ac_status" >&5
10237echo "$as_me: failed program was:" >&5
10238sed 's/^/| /' conftest.$ac_ext >&5
10239
10240( exit $ac_status )
10241ac_cv_func_fork_works=no
10242fi
a3bba767 10243rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
10244fi
10245fi
a3bba767
JJ
10246echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10247echo "${ECHO_T}$ac_cv_func_fork_works" >&6
ba479fd2
NN
10248
10249else
10250 ac_cv_func_fork_works=$ac_cv_func_fork
10251fi
10252if test "x$ac_cv_func_fork_works" = xcross; then
10253 case $host in
10254 *-*-amigaos* | *-*-msdosdjgpp*)
10255 # Override, as these systems have only a dummy fork() stub
10256 ac_cv_func_fork_works=no
10257 ;;
10258 *)
10259 ac_cv_func_fork_works=yes
10260 ;;
10261 esac
10262 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10263echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 10264fi
c375c43b 10265ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2 10266if test "x$ac_cv_func_vfork" = xyes; then
a3bba767
JJ
10267 echo "$as_me:$LINENO: checking for working vfork" >&5
10268echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
ba479fd2
NN
10269if test "${ac_cv_func_vfork_works+set}" = set; then
10270 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10271else
ba479fd2
NN
10272 if test "$cross_compiling" = yes; then
10273 ac_cv_func_vfork_works=cross
10274else
10275 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10276/* confdefs.h. */
10277_ACEOF
10278cat confdefs.h >>conftest.$ac_ext
10279cat >>conftest.$ac_ext <<_ACEOF
10280/* end confdefs.h. */
c375c43b 10281/* Thanks to Paul Eggert for this test. */
a3bba767
JJ
10282#include <stdio.h>
10283#include <stdlib.h>
10284#include <sys/types.h>
10285#include <sys/stat.h>
ba479fd2 10286#include <sys/wait.h>
a3bba767
JJ
10287#if HAVE_UNISTD_H
10288# include <unistd.h>
10289#endif
10290#if HAVE_VFORK_H
ba479fd2 10291# include <vfork.h>
c375c43b
KG
10292#endif
10293/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
10294 argument registers are propagated back to the parent. The compiler
10295 is told about this with #include <vfork.h>, but some compilers
10296 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10297 static variable whose address is put into a register that is
10298 clobbered by the vfork. */
10299static void
c375c43b
KG
10300#ifdef __cplusplus
10301sparc_address_test (int arg)
ba479fd2 10302# else
c375c43b
KG
10303sparc_address_test (arg) int arg;
10304#endif
10305{
10306 static pid_t child;
10307 if (!child) {
10308 child = vfork ();
10309 if (child < 0) {
10310 perror ("vfork");
10311 _exit(2);
10312 }
10313 if (!child) {
10314 arg = getpid();
10315 write(-1, "", 0);
10316 _exit (arg);
10317 }
10318 }
10319}
ba479fd2
NN
10320
10321int
10322main ()
10323{
c375c43b
KG
10324 pid_t parent = getpid ();
10325 pid_t child;
10326
ba479fd2 10327 sparc_address_test (0);
c375c43b
KG
10328
10329 child = vfork ();
10330
10331 if (child == 0) {
ba479fd2
NN
10332 /* Here is another test for sparc vfork register problems. This
10333 test uses lots of local variables, at least as many local
10334 variables as main has allocated so far including compiler
10335 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10336 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10337 reuse the register of parent for one of the local variables,
10338 since it will think that parent can't possibly be used any more
10339 in this routine. Assigning to the local variable will thus
10340 munge parent in the parent process. */
c375c43b
KG
10341 pid_t
10342 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10343 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10344 /* Convince the compiler that p..p7 are live; otherwise, it might
10345 use the same hardware register for all 8 local variables. */
10346 if (p != p1 || p != p2 || p != p3 || p != p4
10347 || p != p5 || p != p6 || p != p7)
10348 _exit(1);
10349
ba479fd2
NN
10350 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10351 from child file descriptors. If the child closes a descriptor
10352 before it execs or exits, this munges the parent's descriptor
10353 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10354 _exit(close(fileno(stdout)) != 0);
10355 } else {
10356 int status;
10357 struct stat st;
10358
10359 while (wait(&status) != child)
10360 ;
a3bba767 10361 exit(
c375c43b
KG
10362 /* Was there some problem with vforking? */
10363 child < 0
10364
10365 /* Did the child fail? (This shouldn't happen.) */
10366 || status
10367
10368 /* Did the vfork/compiler bug occur? */
10369 || parent != getpid()
10370
10371 /* Did the file descriptor bug occur? */
10372 || fstat(fileno(stdout), &st) != 0
10373 );
10374 }
10375}
ba479fd2
NN
10376_ACEOF
10377rm -f conftest$ac_exeext
a3bba767
JJ
10378if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10379 (eval $ac_link) 2>&5
ba479fd2
NN
10380 ac_status=$?
10381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10382 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
10383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10384 (eval $ac_try) 2>&5
ba479fd2
NN
10385 ac_status=$?
10386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10387 (exit $ac_status); }; }; then
c375c43b
KG
10388 ac_cv_func_vfork_works=yes
10389else
ba479fd2
NN
10390 echo "$as_me: program exited with status $ac_status" >&5
10391echo "$as_me: failed program was:" >&5
10392sed 's/^/| /' conftest.$ac_ext >&5
10393
10394( exit $ac_status )
10395ac_cv_func_vfork_works=no
cafe096b 10396fi
a3bba767 10397rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10398fi
ba479fd2 10399fi
a3bba767
JJ
10400echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10401echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 10402
ba479fd2
NN
10403fi;
10404if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 10405 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10406 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10407echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
10408fi
10409
ba479fd2
NN
10410if test "x$ac_cv_func_vfork_works" = xyes; then
10411
10412cat >>confdefs.h <<\_ACEOF
10413#define HAVE_WORKING_VFORK 1
10414_ACEOF
10415
10416else
10417
10418cat >>confdefs.h <<\_ACEOF
c375c43b 10419#define vfork fork
ba479fd2 10420_ACEOF
c375c43b
KG
10421
10422fi
ba479fd2
NN
10423if test "x$ac_cv_func_fork_works" = xyes; then
10424
10425cat >>confdefs.h <<\_ACEOF
10426#define HAVE_WORKING_FORK 1
10427_ACEOF
10428
10429fi
10430
c375c43b 10431
81bf3d9e 10432
dfb77e37
KC
10433 if test "X$prefix" = "XNONE"; then
10434 acl_final_prefix="$ac_default_prefix"
10435 else
10436 acl_final_prefix="$prefix"
10437 fi
10438 if test "X$exec_prefix" = "XNONE"; then
10439 acl_final_exec_prefix='${prefix}'
10440 else
10441 acl_final_exec_prefix="$exec_prefix"
10442 fi
10443 acl_save_prefix="$prefix"
10444 prefix="$acl_final_prefix"
10445 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10446 prefix="$acl_save_prefix"
f91abfce
TT
10447
10448
a3bba767 10449# Check whether --with-gnu-ld or --without-gnu-ld was given.
dfb77e37 10450if test "${with_gnu_ld+set}" = set; then
a3bba767
JJ
10451 withval="$with_gnu_ld"
10452 test "$withval" = no || with_gnu_ld=yes
ba479fd2 10453else
dfb77e37 10454 with_gnu_ld=no
a3bba767 10455fi;
dfb77e37
KC
10456# Prepare PATH_SEPARATOR.
10457# The user is always right.
10458if test "${PATH_SEPARATOR+set}" != set; then
10459 echo "#! /bin/sh" >conf$$.sh
10460 echo "exit 0" >>conf$$.sh
10461 chmod +x conf$$.sh
10462 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10463 PATH_SEPARATOR=';'
ba479fd2 10464 else
dfb77e37 10465 PATH_SEPARATOR=:
ba479fd2 10466 fi
dfb77e37
KC
10467 rm -f conf$$.sh
10468fi
10469ac_prog=ld
10470if test "$GCC" = yes; then
10471 # Check if gcc -print-prog-name=ld gives a path.
a3bba767
JJ
10472 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10473echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
dfb77e37
KC
10474 case $host in
10475 *-*-mingw*)
10476 # gcc leaves a trailing carriage return which upsets mingw
10477 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10478 *)
10479 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10480 esac
10481 case $ac_prog in
10482 # Accept absolute paths.
10483 [\\/]* | [A-Za-z]:[\\/]*)
10484 re_direlt='/[^/][^/]*/\.\./'
10485 # Canonicalize the path of ld
10486 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10487 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10488 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10489 done
10490 test -z "$LD" && LD="$ac_prog"
10491 ;;
10492 "")
10493 # If it fails, then pretend we aren't using GCC.
10494 ac_prog=ld
10495 ;;
10496 *)
10497 # If it is relative, then search for the first ld in PATH.
10498 with_gnu_ld=unknown
10499 ;;
10500 esac
10501elif test "$with_gnu_ld" = yes; then
a3bba767
JJ
10502 echo "$as_me:$LINENO: checking for GNU ld" >&5
10503echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 10504else
a3bba767
JJ
10505 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10506echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 10507fi
dfb77e37
KC
10508if test "${acl_cv_path_LD+set}" = set; then
10509 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 10510else
dfb77e37
KC
10511 if test -z "$LD"; then
10512 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10513 for ac_dir in $PATH; do
10514 test -z "$ac_dir" && ac_dir=.
10515 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10516 acl_cv_path_LD="$ac_dir/$ac_prog"
10517 # Check to see if the program is GNU ld. I'd rather use --version,
10518 # but apparently some GNU ld's only accept -v.
10519 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
10520 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10521 test "$with_gnu_ld" != no && break
10522 else
10523 test "$with_gnu_ld" != yes && break
10524 fi
dfb77e37
KC
10525 fi
10526 done
10527 IFS="$ac_save_ifs"
10528else
10529 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10530fi
10531fi
ba479fd2 10532
dfb77e37
KC
10533LD="$acl_cv_path_LD"
10534if test -n "$LD"; then
a3bba767
JJ
10535 echo "$as_me:$LINENO: result: $LD" >&5
10536echo "${ECHO_T}$LD" >&6
dfb77e37 10537else
a3bba767
JJ
10538 echo "$as_me:$LINENO: result: no" >&5
10539echo "${ECHO_T}no" >&6
ba479fd2 10540fi
dfb77e37
KC
10541test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10542echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10543 { (exit 1); exit 1; }; }
a3bba767
JJ
10544echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10545echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
dfb77e37
KC
10546if test "${acl_cv_prog_gnu_ld+set}" = set; then
10547 echo $ECHO_N "(cached) $ECHO_C" >&6
10548else
10549 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
10550if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10551 acl_cv_prog_gnu_ld=yes
10552else
10553 acl_cv_prog_gnu_ld=no
10554fi
dfb77e37 10555fi
a3bba767
JJ
10556echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10557echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
dfb77e37
KC
10558with_gnu_ld=$acl_cv_prog_gnu_ld
10559
10560
10561
a3bba767
JJ
10562 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10563echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
dfb77e37
KC
10564if test "${acl_cv_rpath+set}" = set; then
10565 echo $ECHO_N "(cached) $ECHO_C" >&6
10566else
10567
10568 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10569 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10570 . ./conftest.sh
10571 rm -f ./conftest.sh
10572 acl_cv_rpath=done
ba479fd2 10573
eb158727 10574fi
a3bba767
JJ
10575echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10576echo "${ECHO_T}$acl_cv_rpath" >&6
dfb77e37
KC
10577 wl="$acl_cv_wl"
10578 libext="$acl_cv_libext"
10579 shlibext="$acl_cv_shlibext"
10580 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10581 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10582 hardcode_direct="$acl_cv_hardcode_direct"
10583 hardcode_minus_L="$acl_cv_hardcode_minus_L"
a3bba767 10584 # Check whether --enable-rpath or --disable-rpath was given.
dfb77e37 10585if test "${enable_rpath+set}" = set; then
a3bba767
JJ
10586 enableval="$enable_rpath"
10587 :
dfb77e37
KC
10588else
10589 enable_rpath=yes
a3bba767 10590fi;
8b1f719a 10591
a6ccdbab 10592
dfb77e37
KC
10593
10594
10595
10596
10597
b639c3c2
JJ
10598 use_additional=yes
10599
10600 acl_save_prefix="$prefix"
10601 prefix="$acl_final_prefix"
10602 acl_save_exec_prefix="$exec_prefix"
10603 exec_prefix="$acl_final_exec_prefix"
10604
10605 eval additional_includedir=\"$includedir\"
10606 eval additional_libdir=\"$libdir\"
10607
10608 exec_prefix="$acl_save_exec_prefix"
10609 prefix="$acl_save_prefix"
dfb77e37
KC
10610
10611
a3bba767 10612# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
8b1f719a 10613if test "${with_libiconv_prefix+set}" = set; then
a3bba767
JJ
10614 withval="$with_libiconv_prefix"
10615
8b1f719a 10616 if test "X$withval" = "Xno"; then
b639c3c2 10617 use_additional=no
8b1f719a
PB
10618 else
10619 if test "X$withval" = "X"; then
dfb77e37
KC
10620
10621 acl_save_prefix="$prefix"
10622 prefix="$acl_final_prefix"
10623 acl_save_exec_prefix="$exec_prefix"
10624 exec_prefix="$acl_final_exec_prefix"
10625
b639c3c2
JJ
10626 eval additional_includedir=\"$includedir\"
10627 eval additional_libdir=\"$libdir\"
dfb77e37
KC
10628
10629 exec_prefix="$acl_save_exec_prefix"
10630 prefix="$acl_save_prefix"
10631
8b1f719a 10632 else
b639c3c2
JJ
10633 additional_includedir="$withval/include"
10634 additional_libdir="$withval/lib"
8b1f719a
PB
10635 fi
10636 fi
10637
a3bba767 10638fi;
dfb77e37
KC
10639 LIBICONV=
10640 LTLIBICONV=
10641 INCICONV=
10642 rpathdirs=
10643 ltrpathdirs=
10644 names_already_handled=
10645 names_next_round='iconv '
10646 while test -n "$names_next_round"; do
10647 names_this_round="$names_next_round"
10648 names_next_round=
10649 for name in $names_this_round; do
10650 already_handled=
10651 for n in $names_already_handled; do
10652 if test "$n" = "$name"; then
10653 already_handled=yes
10654 break
10655 fi
10656 done
10657 if test -z "$already_handled"; then
10658 names_already_handled="$names_already_handled $name"
10659 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10660 eval value=\"\$HAVE_LIB$uppername\"
10661 if test -n "$value"; then
10662 if test "$value" = yes; then
10663 eval value=\"\$LIB$uppername\"
10664 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10665 eval value=\"\$LTLIB$uppername\"
10666 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10667 else
10668 :
10669 fi
10670 else
10671 found_dir=
10672 found_la=
10673 found_so=
10674 found_a=
b639c3c2
JJ
10675 if test $use_additional = yes; then
10676 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10677 found_dir="$additional_libdir"
10678 found_so="$additional_libdir/lib$name.$shlibext"
10679 if test -f "$additional_libdir/lib$name.la"; then
10680 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
10681 fi
10682 else
b639c3c2
JJ
10683 if test -f "$additional_libdir/lib$name.$libext"; then
10684 found_dir="$additional_libdir"
10685 found_a="$additional_libdir/lib$name.$libext"
10686 if test -f "$additional_libdir/lib$name.la"; then
10687 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
10688 fi
10689 fi
10690 fi
10691 fi
10692 if test "X$found_dir" = "X"; then
10693 for x in $LDFLAGS $LTLIBICONV; do
10694
10695 acl_save_prefix="$prefix"
10696 prefix="$acl_final_prefix"
10697 acl_save_exec_prefix="$exec_prefix"
10698 exec_prefix="$acl_final_exec_prefix"
10699 eval x=\"$x\"
10700 exec_prefix="$acl_save_exec_prefix"
10701 prefix="$acl_save_prefix"
10702
10703 case "$x" in
10704 -L*)
10705 dir=`echo "X$x" | sed -e 's/^X-L//'`
10706 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10707 found_dir="$dir"
10708 found_so="$dir/lib$name.$shlibext"
10709 if test -f "$dir/lib$name.la"; then
10710 found_la="$dir/lib$name.la"
10711 fi
10712 else
10713 if test -f "$dir/lib$name.$libext"; then
10714 found_dir="$dir"
10715 found_a="$dir/lib$name.$libext"
10716 if test -f "$dir/lib$name.la"; then
10717 found_la="$dir/lib$name.la"
10718 fi
10719 fi
10720 fi
10721 ;;
10722 esac
10723 if test "X$found_dir" != "X"; then
10724 break
10725 fi
10726 done
10727 fi
10728 if test "X$found_dir" != "X"; then
10729 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10730 if test "X$found_so" != "X"; then
10731 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10732 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10733 else
10734 haveit=
10735 for x in $ltrpathdirs; do
10736 if test "X$x" = "X$found_dir"; then
10737 haveit=yes
10738 break
10739 fi
10740 done
10741 if test -z "$haveit"; then
10742 ltrpathdirs="$ltrpathdirs $found_dir"
10743 fi
10744 if test "$hardcode_direct" = yes; then
10745 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10746 else
10747 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10748 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10749 haveit=
10750 for x in $rpathdirs; do
10751 if test "X$x" = "X$found_dir"; then
10752 haveit=yes
10753 break
10754 fi
10755 done
10756 if test -z "$haveit"; then
10757 rpathdirs="$rpathdirs $found_dir"
10758 fi
10759 else
10760 haveit=
10761 for x in $LDFLAGS $LIBICONV; do
10762
10763 acl_save_prefix="$prefix"
10764 prefix="$acl_final_prefix"
10765 acl_save_exec_prefix="$exec_prefix"
10766 exec_prefix="$acl_final_exec_prefix"
10767 eval x=\"$x\"
10768 exec_prefix="$acl_save_exec_prefix"
10769 prefix="$acl_save_prefix"
10770
10771 if test "X$x" = "X-L$found_dir"; then
10772 haveit=yes
10773 break
10774 fi
10775 done
10776 if test -z "$haveit"; then
10777 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10778 fi
10779 if test "$hardcode_minus_L" != no; then
10780 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10781 else
10782 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10783 fi
10784 fi
10785 fi
10786 fi
10787 else
10788 if test "X$found_a" != "X"; then
10789 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10790 else
10791 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10792 fi
10793 fi
10794 additional_includedir=
10795 case "$found_dir" in
10796 */lib | */lib/)
10797 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10798 additional_includedir="$basedir/include"
10799 ;;
10800 esac
10801 if test "X$additional_includedir" != "X"; then
10802 if test "X$additional_includedir" != "X/usr/include"; then
10803 haveit=
10804 if test "X$additional_includedir" = "X/usr/local/include"; then
10805 if test -n "$GCC"; then
10806 case $host_os in
18fc9bd4 10807 linux*) haveit=yes;;
dfb77e37
KC
10808 esac
10809 fi
10810 fi
10811 if test -z "$haveit"; then
10812 for x in $CPPFLAGS $INCICONV; do
10813
10814 acl_save_prefix="$prefix"
10815 prefix="$acl_final_prefix"
10816 acl_save_exec_prefix="$exec_prefix"
10817 exec_prefix="$acl_final_exec_prefix"
10818 eval x=\"$x\"
10819 exec_prefix="$acl_save_exec_prefix"
10820 prefix="$acl_save_prefix"
10821
10822 if test "X$x" = "X-I$additional_includedir"; then
10823 haveit=yes
10824 break
10825 fi
10826 done
10827 if test -z "$haveit"; then
10828 if test -d "$additional_includedir"; then
10829 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10830 fi
10831 fi
10832 fi
10833 fi
10834 fi
10835 if test -n "$found_la"; then
10836 save_libdir="$libdir"
10837 case "$found_la" in
10838 */* | *\\*) . "$found_la" ;;
10839 *) . "./$found_la" ;;
10840 esac
10841 libdir="$save_libdir"
10842 for dep in $dependency_libs; do
10843 case "$dep" in
10844 -L*)
10845 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10846 if test "X$additional_libdir" != "X/usr/lib"; then
10847 haveit=
10848 if test "X$additional_libdir" = "X/usr/local/lib"; then
10849 if test -n "$GCC"; then
10850 case $host_os in
18fc9bd4 10851 linux*) haveit=yes;;
dfb77e37
KC
10852 esac
10853 fi
10854 fi
10855 if test -z "$haveit"; then
10856 haveit=
10857 for x in $LDFLAGS $LIBICONV; do
10858
10859 acl_save_prefix="$prefix"
10860 prefix="$acl_final_prefix"
10861 acl_save_exec_prefix="$exec_prefix"
10862 exec_prefix="$acl_final_exec_prefix"
10863 eval x=\"$x\"
10864 exec_prefix="$acl_save_exec_prefix"
10865 prefix="$acl_save_prefix"
10866
10867 if test "X$x" = "X-L$additional_libdir"; then
10868 haveit=yes
10869 break
10870 fi
10871 done
10872 if test -z "$haveit"; then
10873 if test -d "$additional_libdir"; then
10874 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10875 fi
10876 fi
10877 haveit=
10878 for x in $LDFLAGS $LTLIBICONV; do
10879
10880 acl_save_prefix="$prefix"
10881 prefix="$acl_final_prefix"
10882 acl_save_exec_prefix="$exec_prefix"
10883 exec_prefix="$acl_final_exec_prefix"
10884 eval x=\"$x\"
10885 exec_prefix="$acl_save_exec_prefix"
10886 prefix="$acl_save_prefix"
10887
10888 if test "X$x" = "X-L$additional_libdir"; then
10889 haveit=yes
10890 break
10891 fi
10892 done
10893 if test -z "$haveit"; then
10894 if test -d "$additional_libdir"; then
10895 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10896 fi
10897 fi
10898 fi
10899 fi
10900 ;;
10901 -R*)
10902 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10903 if test "$enable_rpath" != no; then
10904 haveit=
10905 for x in $rpathdirs; do
10906 if test "X$x" = "X$dir"; then
10907 haveit=yes
10908 break
10909 fi
10910 done
10911 if test -z "$haveit"; then
10912 rpathdirs="$rpathdirs $dir"
10913 fi
10914 haveit=
10915 for x in $ltrpathdirs; do
10916 if test "X$x" = "X$dir"; then
10917 haveit=yes
10918 break
10919 fi
10920 done
10921 if test -z "$haveit"; then
10922 ltrpathdirs="$ltrpathdirs $dir"
10923 fi
10924 fi
10925 ;;
10926 -l*)
10927 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10928 ;;
10929 *.la)
10930 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10931 ;;
10932 *)
10933 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10934 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10935 ;;
10936 esac
10937 done
10938 fi
10939 else
10940 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10941 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10942 fi
10943 fi
10944 fi
10945 done
10946 done
10947 if test "X$rpathdirs" != "X"; then
10948 if test -n "$hardcode_libdir_separator"; then
10949 alldirs=
10950 for found_dir in $rpathdirs; do
10951 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10952 done
10953 acl_save_libdir="$libdir"
10954 libdir="$alldirs"
10955 eval flag=\"$hardcode_libdir_flag_spec\"
10956 libdir="$acl_save_libdir"
10957 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10958 else
10959 for found_dir in $rpathdirs; do
10960 acl_save_libdir="$libdir"
10961 libdir="$found_dir"
10962 eval flag=\"$hardcode_libdir_flag_spec\"
10963 libdir="$acl_save_libdir"
10964 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10965 done
10966 fi
10967 fi
10968 if test "X$ltrpathdirs" != "X"; then
10969 for found_dir in $ltrpathdirs; do
10970 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10971 done
10972 fi
10973
10974
10975
10976
10977
10978
10979
10980 am_save_CPPFLAGS="$CPPFLAGS"
10981
10982 for element in $INCICONV; do
10983 haveit=
10984 for x in $CPPFLAGS; do
10985
10986 acl_save_prefix="$prefix"
10987 prefix="$acl_final_prefix"
10988 acl_save_exec_prefix="$exec_prefix"
10989 exec_prefix="$acl_final_exec_prefix"
10990 eval x=\"$x\"
10991 exec_prefix="$acl_save_exec_prefix"
10992 prefix="$acl_save_prefix"
10993
10994 if test "X$x" = "X$element"; then
10995 haveit=yes
10996 break
10997 fi
10998 done
10999 if test -z "$haveit"; then
11000 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11001 fi
11002 done
eb158727
ZW
11003
11004
a3bba767
JJ
11005 echo "$as_me:$LINENO: checking for iconv" >&5
11006echo $ECHO_N "checking for iconv... $ECHO_C" >&6
ba479fd2
NN
11007if test "${am_cv_func_iconv+set}" = set; then
11008 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11009else
ba479fd2 11010
f91abfce
TT
11011 am_cv_func_iconv="no, consider installing GNU libiconv"
11012 am_cv_lib_iconv=no
ba479fd2 11013 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11014/* confdefs.h. */
11015_ACEOF
11016cat confdefs.h >>conftest.$ac_ext
11017cat >>conftest.$ac_ext <<_ACEOF
11018/* end confdefs.h. */
f91abfce
TT
11019#include <stdlib.h>
11020#include <iconv.h>
ba479fd2
NN
11021int
11022main ()
11023{
f91abfce
TT
11024iconv_t cd = iconv_open("","");
11025 iconv(cd,NULL,NULL,NULL,NULL);
11026 iconv_close(cd);
ba479fd2
NN
11027 ;
11028 return 0;
11029}
11030_ACEOF
11031rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
11032if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11033 (eval $ac_link) 2>conftest.er1
ba479fd2 11034 ac_status=$?
86da66b5
HPN
11035 grep -v '^ *+' conftest.er1 >conftest.err
11036 rm -f conftest.er1
11037 cat conftest.err >&5
ba479fd2 11038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11039 (exit $ac_status); } &&
11040 { ac_try='test -z "$ac_c_werror_flag"
11041 || test ! -s conftest.err'
11042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11043 (eval $ac_try) 2>&5
11044 ac_status=$?
11045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11046 (exit $ac_status); }; } &&
11047 { ac_try='test -s conftest$ac_exeext'
11048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11049 (eval $ac_try) 2>&5
11050 ac_status=$?
11051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11052 (exit $ac_status); }; }; then
f91abfce
TT
11053 am_cv_func_iconv=yes
11054else
ba479fd2
NN
11055 echo "$as_me: failed program was:" >&5
11056sed 's/^/| /' conftest.$ac_ext >&5
11057
f91abfce 11058fi
a3bba767 11059rm -f conftest.err conftest.$ac_objext \
86da66b5 11060 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11061 if test "$am_cv_func_iconv" != yes; then
11062 am_save_LIBS="$LIBS"
dfb77e37 11063 LIBS="$LIBS $LIBICONV"
ba479fd2 11064 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11065/* confdefs.h. */
11066_ACEOF
11067cat confdefs.h >>conftest.$ac_ext
11068cat >>conftest.$ac_ext <<_ACEOF
11069/* end confdefs.h. */
f91abfce
TT
11070#include <stdlib.h>
11071#include <iconv.h>
ba479fd2
NN
11072int
11073main ()
11074{
f91abfce
TT
11075iconv_t cd = iconv_open("","");
11076 iconv(cd,NULL,NULL,NULL,NULL);
11077 iconv_close(cd);
ba479fd2
NN
11078 ;
11079 return 0;
11080}
11081_ACEOF
11082rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
11083if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11084 (eval $ac_link) 2>conftest.er1
ba479fd2 11085 ac_status=$?
86da66b5
HPN
11086 grep -v '^ *+' conftest.er1 >conftest.err
11087 rm -f conftest.er1
11088 cat conftest.err >&5
ba479fd2 11089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11090 (exit $ac_status); } &&
11091 { ac_try='test -z "$ac_c_werror_flag"
11092 || test ! -s conftest.err'
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); }; } &&
11098 { ac_try='test -s conftest$ac_exeext'
11099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11100 (eval $ac_try) 2>&5
11101 ac_status=$?
11102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11103 (exit $ac_status); }; }; then
f91abfce
TT
11104 am_cv_lib_iconv=yes
11105 am_cv_func_iconv=yes
11106else
ba479fd2
NN
11107 echo "$as_me: failed program was:" >&5
11108sed 's/^/| /' conftest.$ac_ext >&5
11109
f91abfce 11110fi
a3bba767 11111rm -f conftest.err conftest.$ac_objext \
86da66b5 11112 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11113 LIBS="$am_save_LIBS"
11114 fi
6e3f3080 11115
ba479fd2 11116fi
a3bba767
JJ
11117echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
11118echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 11119 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11120
11121cat >>confdefs.h <<\_ACEOF
f91abfce 11122#define HAVE_ICONV 1
ba479fd2 11123_ACEOF
f91abfce 11124
dfb77e37
KC
11125 fi
11126 if test "$am_cv_lib_iconv" = yes; then
a3bba767
JJ
11127 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
11128echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
11129 echo "$as_me:$LINENO: result: $LIBICONV" >&5
11130echo "${ECHO_T}$LIBICONV" >&6
dfb77e37
KC
11131 else
11132 CPPFLAGS="$am_save_CPPFLAGS"
11133 LIBICONV=
11134 LTLIBICONV=
11135 fi
11136
11137
11138
11139 if test "$am_cv_func_iconv" = yes; then
a3bba767
JJ
11140 echo "$as_me:$LINENO: checking for iconv declaration" >&5
11141echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
ba479fd2
NN
11142 if test "${am_cv_proto_iconv+set}" = set; then
11143 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11144else
ba479fd2
NN
11145
11146 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11147/* confdefs.h. */
11148_ACEOF
11149cat confdefs.h >>conftest.$ac_ext
11150cat >>conftest.$ac_ext <<_ACEOF
11151/* end confdefs.h. */
f91abfce
TT
11152
11153#include <stdlib.h>
11154#include <iconv.h>
11155extern
11156#ifdef __cplusplus
11157"C"
11158#endif
11159#if defined(__STDC__) || defined(__cplusplus)
11160size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11161#else
11162size_t iconv();
11163#endif
11164
ba479fd2
NN
11165int
11166main ()
11167{
f91abfce 11168
ba479fd2
NN
11169 ;
11170 return 0;
11171}
11172_ACEOF
11173rm -f conftest.$ac_objext
a3bba767
JJ
11174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11175 (eval $ac_compile) 2>conftest.er1
ba479fd2 11176 ac_status=$?
86da66b5
HPN
11177 grep -v '^ *+' conftest.er1 >conftest.err
11178 rm -f conftest.er1
11179 cat conftest.err >&5
ba479fd2 11180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11181 (exit $ac_status); } &&
11182 { ac_try='test -z "$ac_c_werror_flag"
11183 || test ! -s conftest.err'
11184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11185 (eval $ac_try) 2>&5
11186 ac_status=$?
11187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11188 (exit $ac_status); }; } &&
11189 { ac_try='test -s conftest.$ac_objext'
11190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11191 (eval $ac_try) 2>&5
11192 ac_status=$?
11193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194 (exit $ac_status); }; }; then
f91abfce
TT
11195 am_cv_proto_iconv_arg1=""
11196else
ba479fd2
NN
11197 echo "$as_me: failed program was:" >&5
11198sed 's/^/| /' conftest.$ac_ext >&5
11199
a3bba767 11200am_cv_proto_iconv_arg1="const"
f91abfce 11201fi
a3bba767 11202rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
11203 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);"
11204fi
11205
11206 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
a3bba767 11207 echo "$as_me:$LINENO: result: ${ac_t:-
ba479fd2
NN
11208 }$am_cv_proto_iconv" >&5
11209echo "${ECHO_T}${ac_t:-
a3bba767 11210 }$am_cv_proto_iconv" >&6
ba479fd2
NN
11211
11212cat >>confdefs.h <<_ACEOF
f91abfce 11213#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 11214_ACEOF
f91abfce
TT
11215
11216 fi
f91abfce 11217
56694dd9
ZW
11218# Until we have in-tree GNU iconv:
11219LIBICONV_DEP=
11220
11221
18fc9bd4 11222
a3bba767
JJ
11223 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11224echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
18fc9bd4
RG
11225if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11226 echo $ECHO_N "(cached) $ECHO_C" >&6
11227else
11228 cat >conftest.$ac_ext <<_ACEOF
11229/* confdefs.h. */
11230_ACEOF
11231cat confdefs.h >>conftest.$ac_ext
11232cat >>conftest.$ac_ext <<_ACEOF
11233/* end confdefs.h. */
11234#include <locale.h>
11235int
11236main ()
11237{
11238return LC_MESSAGES
11239 ;
11240 return 0;
11241}
11242_ACEOF
11243rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
11244if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11245 (eval $ac_link) 2>conftest.er1
18fc9bd4
RG
11246 ac_status=$?
11247 grep -v '^ *+' conftest.er1 >conftest.err
11248 rm -f conftest.er1
11249 cat conftest.err >&5
11250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11251 (exit $ac_status); } &&
11252 { ac_try='test -z "$ac_c_werror_flag"
11253 || test ! -s conftest.err'
11254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11255 (eval $ac_try) 2>&5
11256 ac_status=$?
11257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11258 (exit $ac_status); }; } &&
11259 { ac_try='test -s conftest$ac_exeext'
11260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11261 (eval $ac_try) 2>&5
11262 ac_status=$?
11263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11264 (exit $ac_status); }; }; then
18fc9bd4
RG
11265 am_cv_val_LC_MESSAGES=yes
11266else
11267 echo "$as_me: failed program was:" >&5
11268sed 's/^/| /' conftest.$ac_ext >&5
11269
a3bba767 11270am_cv_val_LC_MESSAGES=no
18fc9bd4 11271fi
a3bba767 11272rm -f conftest.err conftest.$ac_objext \
18fc9bd4
RG
11273 conftest$ac_exeext conftest.$ac_ext
11274fi
a3bba767
JJ
11275echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11276echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
18fc9bd4
RG
11277 if test $am_cv_val_LC_MESSAGES = yes; then
11278
11279cat >>confdefs.h <<\_ACEOF
11280#define HAVE_LC_MESSAGES 1
11281_ACEOF
11282
11283 fi
11284
f91abfce 11285
a03ea89b 11286
a3bba767
JJ
11287 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11288echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
a03ea89b
BM
11289if test "${am_cv_langinfo_codeset+set}" = set; then
11290 echo $ECHO_N "(cached) $ECHO_C" >&6
11291else
11292 cat >conftest.$ac_ext <<_ACEOF
11293/* confdefs.h. */
11294_ACEOF
11295cat confdefs.h >>conftest.$ac_ext
11296cat >>conftest.$ac_ext <<_ACEOF
11297/* end confdefs.h. */
11298#include <langinfo.h>
11299int
11300main ()
11301{
11302char* cs = nl_langinfo(CODESET);
11303 ;
11304 return 0;
11305}
11306_ACEOF
11307rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
11308if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11309 (eval $ac_link) 2>conftest.er1
a03ea89b
BM
11310 ac_status=$?
11311 grep -v '^ *+' conftest.er1 >conftest.err
11312 rm -f conftest.er1
11313 cat conftest.err >&5
11314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11315 (exit $ac_status); } &&
11316 { ac_try='test -z "$ac_c_werror_flag"
11317 || test ! -s conftest.err'
11318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11319 (eval $ac_try) 2>&5
11320 ac_status=$?
11321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11322 (exit $ac_status); }; } &&
11323 { ac_try='test -s conftest$ac_exeext'
11324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11325 (eval $ac_try) 2>&5
11326 ac_status=$?
11327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11328 (exit $ac_status); }; }; then
a03ea89b
BM
11329 am_cv_langinfo_codeset=yes
11330else
11331 echo "$as_me: failed program was:" >&5
11332sed 's/^/| /' conftest.$ac_ext >&5
11333
a3bba767 11334am_cv_langinfo_codeset=no
a03ea89b 11335fi
a3bba767 11336rm -f conftest.err conftest.$ac_objext \
a03ea89b
BM
11337 conftest$ac_exeext conftest.$ac_ext
11338
11339fi
a3bba767
JJ
11340echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11341echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
a03ea89b
BM
11342 if test $am_cv_langinfo_codeset = yes; then
11343
11344cat >>confdefs.h <<\_ACEOF
11345#define HAVE_LANGINFO_CODESET 1
11346_ACEOF
11347
11348 fi
11349
11350
86cf1cbd
KG
11351# We will need to find libiberty.h and ansidecl.h
11352saved_CFLAGS="$CFLAGS"
11353CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
6a257778 11375
ad6717df
PB
11376
11377
0d667716
KG
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
367e8319 11388
0d667716
KG
11389
11390
7391b66c 11391
ed5b9f96
GK
11392
11393for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
11394 strsignal strstr strverscmp \
11395 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 11396 free basename getopt clock getpagesize clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
81bf3d9e 11397do
ad6717df 11398 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a3bba767
JJ
11399echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11400echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11401if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
11402 echo $ECHO_N "(cached) $ECHO_C" >&6
11403else
11404 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11405/* confdefs.h. */
11406_ACEOF
11407cat confdefs.h >>conftest.$ac_ext
11408cat >>conftest.$ac_ext <<_ACEOF
11409/* end confdefs.h. */
7afe8c41
KG
11410#undef $ac_tr_decl
11411#define $ac_tr_decl 1
ba479fd2 11412
d02af173 11413#include "ansidecl.h"
86cf1cbd 11414#include "system.h"
f31e826b 11415
ba479fd2
NN
11416int
11417main ()
11418{
86cf1cbd
KG
11419#ifndef $ac_func
11420char *(*pfn) = (char *(*)) $ac_func ;
11421#endif
ba479fd2
NN
11422 ;
11423 return 0;
11424}
11425_ACEOF
11426rm -f conftest.$ac_objext
a3bba767
JJ
11427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11428 (eval $ac_compile) 2>conftest.er1
ba479fd2 11429 ac_status=$?
86da66b5
HPN
11430 grep -v '^ *+' conftest.er1 >conftest.err
11431 rm -f conftest.er1
11432 cat conftest.err >&5
ba479fd2 11433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11434 (exit $ac_status); } &&
11435 { ac_try='test -z "$ac_c_werror_flag"
11436 || test ! -s conftest.err'
11437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11438 (eval $ac_try) 2>&5
11439 ac_status=$?
11440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11441 (exit $ac_status); }; } &&
11442 { ac_try='test -s conftest.$ac_objext'
11443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11444 (eval $ac_try) 2>&5
11445 ac_status=$?
11446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11447 (exit $ac_status); }; }; then
f31e826b 11448 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11449else
ba479fd2
NN
11450 echo "$as_me: failed program was:" >&5
11451sed 's/^/| /' conftest.$ac_ext >&5
11452
a3bba767 11453eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11454fi
a3bba767 11455rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11456fi
11457
f31e826b 11458if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a3bba767
JJ
11459 echo "$as_me:$LINENO: result: yes" >&5
11460echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11461#define $ac_tr_decl 1
ba479fd2
NN
11462_ACEOF
11463
81bf3d9e 11464else
a3bba767
JJ
11465 echo "$as_me:$LINENO: result: no" >&5
11466echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11467#define $ac_tr_decl 0
ba479fd2
NN
11468_ACEOF
11469
81bf3d9e
RH
11470fi
11471
11472done
ba479fd2 11473
ba479fd2 11474
ba479fd2 11475
81bf3d9e 11476
81bf3d9e
RH
11477
11478for ac_func in getrlimit setrlimit getrusage
11479do
ad6717df 11480 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a3bba767
JJ
11481echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11482echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11483if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
11484 echo $ECHO_N "(cached) $ECHO_C" >&6
11485else
11486 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11487/* confdefs.h. */
11488_ACEOF
11489cat confdefs.h >>conftest.$ac_ext
11490cat >>conftest.$ac_ext <<_ACEOF
11491/* end confdefs.h. */
7afe8c41
KG
11492#undef $ac_tr_decl
11493#define $ac_tr_decl 1
ba479fd2 11494
d02af173 11495#include "ansidecl.h"
86cf1cbd 11496#include "system.h"
81bf3d9e
RH
11497#ifdef HAVE_SYS_RESOURCE_H
11498#include <sys/resource.h>
11499#endif
11500
f31e826b 11501
ba479fd2
NN
11502int
11503main ()
11504{
86cf1cbd
KG
11505#ifndef $ac_func
11506char *(*pfn) = (char *(*)) $ac_func ;
11507#endif
ba479fd2
NN
11508 ;
11509 return 0;
11510}
11511_ACEOF
11512rm -f conftest.$ac_objext
a3bba767
JJ
11513if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11514 (eval $ac_compile) 2>conftest.er1
ba479fd2 11515 ac_status=$?
86da66b5
HPN
11516 grep -v '^ *+' conftest.er1 >conftest.err
11517 rm -f conftest.er1
11518 cat conftest.err >&5
ba479fd2 11519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11520 (exit $ac_status); } &&
11521 { ac_try='test -z "$ac_c_werror_flag"
11522 || test ! -s conftest.err'
11523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11524 (eval $ac_try) 2>&5
11525 ac_status=$?
11526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11527 (exit $ac_status); }; } &&
11528 { ac_try='test -s conftest.$ac_objext'
11529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11530 (eval $ac_try) 2>&5
11531 ac_status=$?
11532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11533 (exit $ac_status); }; }; then
f31e826b 11534 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11535else
ba479fd2
NN
11536 echo "$as_me: failed program was:" >&5
11537sed 's/^/| /' conftest.$ac_ext >&5
11538
a3bba767 11539eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11540fi
a3bba767 11541rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11542fi
11543
f31e826b 11544if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a3bba767
JJ
11545 echo "$as_me:$LINENO: result: yes" >&5
11546echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11547#define $ac_tr_decl 1
ba479fd2
NN
11548_ACEOF
11549
81bf3d9e 11550else
a3bba767
JJ
11551 echo "$as_me:$LINENO: result: no" >&5
11552echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11553#define $ac_tr_decl 0
ba479fd2
NN
11554_ACEOF
11555
81bf3d9e
RH
11556fi
11557
11558done
86cf1cbd 11559
81bf3d9e 11560
ba479fd2 11561cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11562/* confdefs.h. */
11563_ACEOF
11564cat confdefs.h >>conftest.$ac_ext
11565cat >>conftest.$ac_ext <<_ACEOF
11566/* end confdefs.h. */
b2522d2b
HPN
11567
11568#include "ansidecl.h"
11569#include "system.h"
11570#ifdef HAVE_SYS_RESOURCE_H
11571#include <sys/resource.h>
11572#endif
11573
ba479fd2
NN
11574int
11575main ()
11576{
b2522d2b 11577rlim_t l = 0;
ba479fd2
NN
11578 ;
11579 return 0;
11580}
11581_ACEOF
11582rm -f conftest.$ac_objext
a3bba767
JJ
11583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11584 (eval $ac_compile) 2>conftest.er1
ba479fd2 11585 ac_status=$?
86da66b5
HPN
11586 grep -v '^ *+' conftest.er1 >conftest.err
11587 rm -f conftest.er1
11588 cat conftest.err >&5
ba479fd2 11589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11590 (exit $ac_status); } &&
11591 { ac_try='test -z "$ac_c_werror_flag"
11592 || test ! -s conftest.err'
11593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11594 (eval $ac_try) 2>&5
11595 ac_status=$?
11596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11597 (exit $ac_status); }; } &&
11598 { ac_try='test -s conftest.$ac_objext'
11599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11600 (eval $ac_try) 2>&5
11601 ac_status=$?
11602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11603 (exit $ac_status); }; }; then
b2522d2b
HPN
11604 :
11605else
ba479fd2
NN
11606 echo "$as_me: failed program was:" >&5
11607sed 's/^/| /' conftest.$ac_ext >&5
11608
11609
11610cat >>confdefs.h <<\_ACEOF
b2522d2b 11611#define rlim_t long
ba479fd2 11612_ACEOF
b2522d2b
HPN
11613
11614fi
a3bba767 11615rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 11616
2102b2fe
RS
11617# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11618# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11619# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11620# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 11621
351df804 11622for ac_func in ldgetname
c1800ec8 11623do
ad6717df 11624 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a3bba767
JJ
11625echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11626echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11627if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
11628 echo $ECHO_N "(cached) $ECHO_C" >&6
11629else
11630 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11631/* confdefs.h. */
11632_ACEOF
11633cat confdefs.h >>conftest.$ac_ext
11634cat >>conftest.$ac_ext <<_ACEOF
11635/* end confdefs.h. */
c1800ec8
ZW
11636#undef $ac_tr_decl
11637#define $ac_tr_decl 1
ba479fd2 11638
351df804
KG
11639#include "ansidecl.h"
11640#include "system.h"
11641#ifdef HAVE_LDFCN_H
2102b2fe
RS
11642#undef FREAD
11643#undef FWRITE
351df804
KG
11644#include <ldfcn.h>
11645#endif
11646
11647
ba479fd2
NN
11648int
11649main ()
11650{
351df804
KG
11651#ifndef $ac_func
11652char *(*pfn) = (char *(*)) $ac_func ;
11653#endif
ba479fd2
NN
11654 ;
11655 return 0;
11656}
11657_ACEOF
11658rm -f conftest.$ac_objext
a3bba767
JJ
11659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11660 (eval $ac_compile) 2>conftest.er1
ba479fd2 11661 ac_status=$?
86da66b5
HPN
11662 grep -v '^ *+' conftest.er1 >conftest.err
11663 rm -f conftest.er1
11664 cat conftest.err >&5
ba479fd2 11665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11666 (exit $ac_status); } &&
11667 { ac_try='test -z "$ac_c_werror_flag"
11668 || test ! -s conftest.err'
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); }; } &&
11674 { ac_try='test -s conftest.$ac_objext'
11675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11676 (eval $ac_try) 2>&5
11677 ac_status=$?
11678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11679 (exit $ac_status); }; }; then
351df804
KG
11680 eval "gcc_cv_have_decl_$ac_func=yes"
11681else
ba479fd2
NN
11682 echo "$as_me: failed program was:" >&5
11683sed 's/^/| /' conftest.$ac_ext >&5
11684
a3bba767 11685eval "gcc_cv_have_decl_$ac_func=no"
351df804 11686fi
a3bba767 11687rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
11688fi
11689
11690if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a3bba767
JJ
11691 echo "$as_me:$LINENO: result: yes" >&5
11692echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11693#define $ac_tr_decl 1
ba479fd2
NN
11694_ACEOF
11695
351df804 11696else
a3bba767
JJ
11697 echo "$as_me:$LINENO: result: no" >&5
11698echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11699#define $ac_tr_decl 0
ba479fd2
NN
11700_ACEOF
11701
351df804
KG
11702fi
11703
11704done
ba479fd2 11705
351df804
KG
11706
11707
11708for ac_func in times
11709do
ad6717df 11710 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a3bba767
JJ
11711echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11712echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11713if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
11714 echo $ECHO_N "(cached) $ECHO_C" >&6
11715else
11716 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11717/* confdefs.h. */
11718_ACEOF
11719cat confdefs.h >>conftest.$ac_ext
11720cat >>conftest.$ac_ext <<_ACEOF
11721/* end confdefs.h. */
351df804
KG
11722#undef $ac_tr_decl
11723#define $ac_tr_decl 1
ba479fd2 11724
c1800ec8
ZW
11725#include "ansidecl.h"
11726#include "system.h"
11727#ifdef HAVE_SYS_TIMES_H
11728#include <sys/times.h>
11729#endif
11730
11731
ba479fd2
NN
11732int
11733main ()
11734{
c1800ec8
ZW
11735#ifndef $ac_func
11736char *(*pfn) = (char *(*)) $ac_func ;
11737#endif
ba479fd2
NN
11738 ;
11739 return 0;
11740}
11741_ACEOF
11742rm -f conftest.$ac_objext
a3bba767
JJ
11743if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11744 (eval $ac_compile) 2>conftest.er1
ba479fd2 11745 ac_status=$?
86da66b5
HPN
11746 grep -v '^ *+' conftest.er1 >conftest.err
11747 rm -f conftest.er1
11748 cat conftest.err >&5
ba479fd2 11749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11750 (exit $ac_status); } &&
11751 { ac_try='test -z "$ac_c_werror_flag"
11752 || test ! -s conftest.err'
11753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11754 (eval $ac_try) 2>&5
11755 ac_status=$?
11756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11757 (exit $ac_status); }; } &&
11758 { ac_try='test -s conftest.$ac_objext'
11759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11760 (eval $ac_try) 2>&5
11761 ac_status=$?
11762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11763 (exit $ac_status); }; }; then
11764 eval "gcc_cv_have_decl_$ac_func=yes"
11765else
11766 echo "$as_me: failed program was:" >&5
11767sed 's/^/| /' conftest.$ac_ext >&5
703d89ab 11768
a3bba767
JJ
11769eval "gcc_cv_have_decl_$ac_func=no"
11770fi
11771rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
11772fi
11773
11774if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a3bba767
JJ
11775 echo "$as_me:$LINENO: result: yes" >&5
11776echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11777#define $ac_tr_decl 1
ba479fd2
NN
11778_ACEOF
11779
c1800ec8 11780else
a3bba767
JJ
11781 echo "$as_me:$LINENO: result: no" >&5
11782echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11783#define $ac_tr_decl 0
ba479fd2
NN
11784_ACEOF
11785
c1800ec8
ZW
11786fi
11787
11788done
c1800ec8
ZW
11789
11790
4f6d8cc8
GK
11791
11792for ac_func in sigaltstack
11793do
11794 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a3bba767
JJ
11795echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11796echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11797if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
4f6d8cc8
GK
11798 echo $ECHO_N "(cached) $ECHO_C" >&6
11799else
11800 cat >conftest.$ac_ext <<_ACEOF
11801/* confdefs.h. */
11802_ACEOF
11803cat confdefs.h >>conftest.$ac_ext
11804cat >>conftest.$ac_ext <<_ACEOF
11805/* end confdefs.h. */
11806#undef $ac_tr_decl
11807#define $ac_tr_decl 1
11808
11809#include "ansidecl.h"
11810#include "system.h"
11811#include <signal.h>
11812
11813
11814int
11815main ()
11816{
11817#ifndef $ac_func
11818char *(*pfn) = (char *(*)) $ac_func ;
11819#endif
11820 ;
11821 return 0;
11822}
11823_ACEOF
11824rm -f conftest.$ac_objext
a3bba767
JJ
11825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11826 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
11827 ac_status=$?
11828 grep -v '^ *+' conftest.er1 >conftest.err
11829 rm -f conftest.er1
11830 cat conftest.err >&5
11831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11832 (exit $ac_status); } &&
11833 { ac_try='test -z "$ac_c_werror_flag"
11834 || test ! -s conftest.err'
11835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11836 (eval $ac_try) 2>&5
11837 ac_status=$?
11838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11839 (exit $ac_status); }; } &&
11840 { ac_try='test -s conftest.$ac_objext'
11841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11842 (eval $ac_try) 2>&5
11843 ac_status=$?
11844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11845 (exit $ac_status); }; }; then
8b1f719a
PB
11846 eval "gcc_cv_have_decl_$ac_func=yes"
11847else
11848 echo "$as_me: failed program was:" >&5
11849sed 's/^/| /' conftest.$ac_ext >&5
4f6d8cc8 11850
a3bba767 11851eval "gcc_cv_have_decl_$ac_func=no"
4f6d8cc8 11852fi
a3bba767 11853rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8
GK
11854fi
11855
11856if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a3bba767
JJ
11857 echo "$as_me:$LINENO: result: yes" >&5
11858echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
11859#define $ac_tr_decl 1
11860_ACEOF
11861
11862else
a3bba767
JJ
11863 echo "$as_me:$LINENO: result: no" >&5
11864echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
11865#define $ac_tr_decl 0
11866_ACEOF
11867
11868fi
11869
11870done
11871
11872
c1800ec8 11873# More time-related stuff.
a3bba767
JJ
11874echo "$as_me:$LINENO: checking for struct tms" >&5
11875echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
ba479fd2
NN
11876if test "${ac_cv_struct_tms+set}" = set; then
11877 echo $ECHO_N "(cached) $ECHO_C" >&6
11878else
11879
11880cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11881/* confdefs.h. */
11882_ACEOF
11883cat confdefs.h >>conftest.$ac_ext
11884cat >>conftest.$ac_ext <<_ACEOF
11885/* end confdefs.h. */
c1800ec8
ZW
11886
11887#include "ansidecl.h"
11888#include "system.h"
11889#ifdef HAVE_SYS_TIMES_H
11890#include <sys/times.h>
11891#endif
11892
ba479fd2
NN
11893int
11894main ()
11895{
c1800ec8 11896struct tms tms;
ba479fd2
NN
11897 ;
11898 return 0;
11899}
11900_ACEOF
11901rm -f conftest.$ac_objext
a3bba767
JJ
11902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11903 (eval $ac_compile) 2>conftest.er1
ba479fd2 11904 ac_status=$?
86da66b5
HPN
11905 grep -v '^ *+' conftest.er1 >conftest.err
11906 rm -f conftest.er1
11907 cat conftest.err >&5
ba479fd2 11908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11909 (exit $ac_status); } &&
11910 { ac_try='test -z "$ac_c_werror_flag"
11911 || test ! -s conftest.err'
11912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11913 (eval $ac_try) 2>&5
11914 ac_status=$?
11915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11916 (exit $ac_status); }; } &&
11917 { ac_try='test -s conftest.$ac_objext'
11918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11919 (eval $ac_try) 2>&5
11920 ac_status=$?
11921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11922 (exit $ac_status); }; }; then
c1800ec8
ZW
11923 ac_cv_struct_tms=yes
11924else
ba479fd2
NN
11925 echo "$as_me: failed program was:" >&5
11926sed 's/^/| /' conftest.$ac_ext >&5
11927
a3bba767 11928ac_cv_struct_tms=no
c1800ec8 11929fi
a3bba767 11930rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11931fi
a3bba767
JJ
11932echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11933echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 11934if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
11935
11936cat >>confdefs.h <<\_ACEOF
c1800ec8 11937#define HAVE_STRUCT_TMS 1
ba479fd2 11938_ACEOF
c1800ec8
ZW
11939
11940fi
11941
11942# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11943# revisit after autoconf 2.50.
a3bba767
JJ
11944echo "$as_me:$LINENO: checking for clock_t" >&5
11945echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
ba479fd2
NN
11946if test "${gcc_cv_type_clock_t+set}" = set; then
11947 echo $ECHO_N "(cached) $ECHO_C" >&6
11948else
11949
11950cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11951/* confdefs.h. */
11952_ACEOF
11953cat confdefs.h >>conftest.$ac_ext
11954cat >>conftest.$ac_ext <<_ACEOF
11955/* end confdefs.h. */
c1800ec8
ZW
11956
11957#include "ansidecl.h"
11958#include "system.h"
11959
ba479fd2
NN
11960int
11961main ()
11962{
c1800ec8 11963clock_t x;
ba479fd2
NN
11964 ;
11965 return 0;
11966}
11967_ACEOF
11968rm -f conftest.$ac_objext
a3bba767
JJ
11969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11970 (eval $ac_compile) 2>conftest.er1
ba479fd2 11971 ac_status=$?
86da66b5
HPN
11972 grep -v '^ *+' conftest.er1 >conftest.err
11973 rm -f conftest.er1
11974 cat conftest.err >&5
ba479fd2 11975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11976 (exit $ac_status); } &&
11977 { ac_try='test -z "$ac_c_werror_flag"
11978 || test ! -s conftest.err'
11979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11980 (eval $ac_try) 2>&5
11981 ac_status=$?
11982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11983 (exit $ac_status); }; } &&
11984 { ac_try='test -s conftest.$ac_objext'
11985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11986 (eval $ac_try) 2>&5
11987 ac_status=$?
11988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11989 (exit $ac_status); }; }; then
c1800ec8
ZW
11990 gcc_cv_type_clock_t=yes
11991else
ba479fd2
NN
11992 echo "$as_me: failed program was:" >&5
11993sed 's/^/| /' conftest.$ac_ext >&5
11994
a3bba767 11995gcc_cv_type_clock_t=no
c1800ec8 11996fi
a3bba767 11997rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11998fi
a3bba767
JJ
11999echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
12000echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 12001if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
12002
12003cat >>confdefs.h <<\_ACEOF
c1800ec8 12004#define HAVE_CLOCK_T 1
ba479fd2 12005_ACEOF
c1800ec8
ZW
12006
12007fi
12008
eb70d86d
AS
12009# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
12010CFLAGS="$saved_CFLAGS"
12011
a3bba767 12012# Check whether --enable-initfini-array or --disable-initfini-array was given.
07cf4226 12013if test "${enable_initfini_array+set}" = set; then
a3bba767
JJ
12014 enableval="$enable_initfini_array"
12015
07cf4226 12016else
ba479fd2 12017
a3bba767
JJ
12018echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
12019echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
ba479fd2
NN
12020if test "${gcc_cv_initfini_array+set}" = set; then
12021 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 12022else
eb70d86d 12023 if test "$cross_compiling" = yes; then
918c4fe4 12024 gcc_cv_initfini_array=no
eb70d86d 12025else
ba479fd2 12026 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12027/* confdefs.h. */
12028_ACEOF
12029cat confdefs.h >>conftest.$ac_ext
12030cat >>conftest.$ac_ext <<_ACEOF
12031/* end confdefs.h. */
eb70d86d 12032
07cf4226
DM
12033static int x = -1;
12034int main (void) { return x; }
12035int foo (void) { x = 0; }
12036int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
12037_ACEOF
12038rm -f conftest$ac_exeext
a3bba767
JJ
12039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12040 (eval $ac_link) 2>&5
ba479fd2
NN
12041 ac_status=$?
12042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
12044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12045 (eval $ac_try) 2>&5
ba479fd2
NN
12046 ac_status=$?
12047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12048 (exit $ac_status); }; }; then
918c4fe4 12049 gcc_cv_initfini_array=yes
eb70d86d 12050else
ba479fd2
NN
12051 echo "$as_me: program exited with status $ac_status" >&5
12052echo "$as_me: failed program was:" >&5
12053sed 's/^/| /' conftest.$ac_ext >&5
12054
12055( exit $ac_status )
12056gcc_cv_initfini_array=no
eb70d86d 12057fi
a3bba767 12058rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 12059fi
07cf4226 12060fi
a3bba767
JJ
12061echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
12062echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 12063 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 12064
a3bba767 12065fi;
63cf211a 12066if test $enable_initfini_array = yes; then
ba479fd2
NN
12067
12068cat >>confdefs.h <<\_ACEOF
eb70d86d 12069#define HAVE_INITFINI_ARRAY 1
ba479fd2 12070_ACEOF
07cf4226 12071
eb70d86d 12072fi
81bf3d9e 12073
ba479fd2 12074# mkdir takes a single argument on some systems.
a3bba767
JJ
12075echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
12076echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
ba479fd2
NN
12077if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
12078 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 12079else
ba479fd2 12080 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12081/* confdefs.h. */
12082_ACEOF
12083cat confdefs.h >>conftest.$ac_ext
12084cat >>conftest.$ac_ext <<_ACEOF
12085/* end confdefs.h. */
75923b2f
MK
12086
12087#include <sys/types.h>
12088#ifdef HAVE_SYS_STAT_H
12089# include <sys/stat.h>
12090#endif
12091#ifdef HAVE_UNISTD_H
12092# include <unistd.h>
12093#endif
12094#ifdef HAVE_DIRECT_H
12095# include <direct.h>
12096#endif
ba479fd2
NN
12097int
12098main ()
12099{
75923b2f 12100mkdir ("foo", 0);
ba479fd2
NN
12101 ;
12102 return 0;
12103}
12104_ACEOF
12105rm -f conftest.$ac_objext
a3bba767
JJ
12106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12107 (eval $ac_compile) 2>conftest.er1
ba479fd2 12108 ac_status=$?
86da66b5
HPN
12109 grep -v '^ *+' conftest.er1 >conftest.err
12110 rm -f conftest.er1
12111 cat conftest.err >&5
ba479fd2 12112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
12113 (exit $ac_status); } &&
12114 { ac_try='test -z "$ac_c_werror_flag"
12115 || test ! -s conftest.err'
12116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12117 (eval $ac_try) 2>&5
12118 ac_status=$?
12119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12120 (exit $ac_status); }; } &&
12121 { ac_try='test -s conftest.$ac_objext'
12122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12123 (eval $ac_try) 2>&5
12124 ac_status=$?
12125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12126 (exit $ac_status); }; }; then
75923b2f
MK
12127 gcc_cv_mkdir_takes_one_arg=no
12128else
ba479fd2
NN
12129 echo "$as_me: failed program was:" >&5
12130sed 's/^/| /' conftest.$ac_ext >&5
12131
a3bba767 12132gcc_cv_mkdir_takes_one_arg=yes
75923b2f 12133fi
a3bba767 12134rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 12135fi
a3bba767
JJ
12136echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
12137echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 12138if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
12139
12140cat >>confdefs.h <<\_ACEOF
75923b2f 12141#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 12142_ACEOF
75923b2f
MK
12143
12144fi
12145
12146
861bb6c1
JL
12147# File extensions
12148manext='.1'
12149objext='.o'
12150
12151
12152
4977bab6 12153# With Setjmp/Longjmp based exception handling.
a3bba767 12154# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
4977bab6 12155if test "${enable_sjlj_exceptions+set}" = set; then
a3bba767
JJ
12156 enableval="$enable_sjlj_exceptions"
12157 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 12158
ba479fd2
NN
12159cat >>confdefs.h <<_ACEOF
12160#define CONFIG_SJLJ_EXCEPTIONS $sjlj
12161_ACEOF
4977bab6 12162
a3bba767 12163fi;
4977bab6 12164
443728bb
L
12165# For platforms with the unwind ABI which includes an unwind library,
12166# libunwind, we can choose to use the system libunwind.
4977bab6 12167
a3bba767 12168# Check whether --with-system-libunwind or --without-system-libunwind was given.
443728bb 12169if test "${with_system_libunwind+set}" = set; then
a3bba767 12170 withval="$with_system_libunwind"
4977bab6 12171
a3bba767 12172fi;
4977bab6 12173
e64f5acf
SE
12174# config.gcc also contains tests of with_system_libunwind.
12175if test x$with_system_libunwind = xyes; then
12176
12177cat >>confdefs.h <<\_ACEOF
12178#define HAVE_GETIPINFO 1
12179_ACEOF
12180
12181fi
12182
34a86c2b
NN
12183# --------------------------------------------------------
12184# Build, host, and target specific configuration fragments
12185# --------------------------------------------------------
12186
5b28c537
NN
12187# Collect build-machine-specific information.
12188. ${srcdir}/config.build
12189
a89ea0df
NN
12190# Collect host-machine-specific information.
12191. ${srcdir}/config.host
12192
ef69da62 12193target_gtfiles=
a89ea0df
NN
12194
12195# Collect target-machine-specific information.
8ad9fb33 12196. ${srcdir}/config.gcc
861bb6c1
JL
12197
12198extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 12199extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
12200
12201# Default the target-machine variables that were not explicitly set.
75bffa71 12202if test x"$tm_file" = x
861bb6c1
JL
12203then tm_file=$cpu_type/$cpu_type.h; fi
12204
6b2adea9 12205if test x"$extra_headers" = x
861bb6c1
JL
12206then extra_headers=; fi
12207
75bffa71 12208if test x$md_file = x
e98e406f 12209then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 12210
75bffa71 12211if test x$out_file = x
861bb6c1
JL
12212then out_file=$cpu_type/$cpu_type.c; fi
12213
75bffa71 12214if test x"$tmake_file" = x
861bb6c1
JL
12215then tmake_file=$cpu_type/t-$cpu_type
12216fi
12217
90e6a802 12218if test x"$dwarf2" = xyes
756ee602 12219then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
12220fi
12221
861bb6c1 12222# Say what files are being used for the output code and MD file.
11642c3a 12223echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
12224echo "Using \`$srcdir/config/$md_file' as machine description file."
12225
11642c3a 12226# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
12227# about them and drop them.
12228
11642c3a
ZW
12229bx=
12230for x in $build_xm_file; do
12231 if test -f $srcdir/config/$x
12232 then bx="$bx $x"
ba479fd2
NN
12233 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12234echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12235 fi
12236done
12237build_xm_file="$bx"
12238
12239hx=
12240for x in $host_xm_file; do
12241 if test -f $srcdir/config/$x
12242 then hx="$hx $x"
ba479fd2
NN
12243 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12244echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12245 fi
12246done
12247host_xm_file="$hx"
12248
12249tx=
12250for x in $xm_file; do
12251 if test -f $srcdir/config/$x
12252 then tx="$tx $x"
ba479fd2
NN
12253 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12254echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12255 fi
12256done
12257xm_file="$tx"
12258
861bb6c1
JL
12259count=a
12260for f in $tm_file; do
12261 count=${count}x
12262done
75bffa71 12263if test $count = ax; then
861bb6c1
JL
12264 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
12265else
12266 echo "Using the following target machine macro files:"
12267 for f in $tm_file; do
12268 echo " $srcdir/config/$f"
12269 done
12270fi
12271
4977bab6 12272if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
12273
12274cat >>confdefs.h <<\_ACEOF
4977bab6 12275#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 12276_ACEOF
4977bab6
ZW
12277
12278fi
12279
99fa8911
AP
12280if test x$use_long_long_for_widest_fast_int = xyes; then
12281
12282cat >>confdefs.h <<\_ACEOF
12283#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12284_ACEOF
12285
12286fi
12287
861bb6c1
JL
12288count=a
12289for f in $host_xm_file; do
12290 count=${count}x
12291done
11642c3a
ZW
12292if test $count = a; then
12293 :
12294elif test $count = ax; then
861bb6c1
JL
12295 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12296else
12297 echo "Using the following host machine macro files:"
12298 for f in $host_xm_file; do
12299 echo " $srcdir/config/$f"
12300 done
12301fi
476d9098 12302echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 12303
75bffa71 12304if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
12305 count=a
12306 for f in $build_xm_file; do
12307 count=${count}x
12308 done
11642c3a
ZW
12309 if test $count = a; then
12310 :
12311 elif test $count = ax; then
861bb6c1
JL
12312 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12313 else
12314 echo "Using the following build machine macro files:"
12315 for f in $build_xm_file; do
12316 echo " $srcdir/config/$f"
12317 done
12318 fi
12319fi
12320
4f6d8cc8 12321case ${host} in
b8ec3cc8 12322 powerpc*-*-darwin*)
a3bba767
JJ
12323 echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
12324echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6
4f6d8cc8
GK
12325if test "${gcc_cv_mcontext_underscores+set}" = set; then
12326 echo $ECHO_N "(cached) $ECHO_C" >&6
12327else
12328 cat >conftest.$ac_ext <<_ACEOF
12329
ba7da42a 12330#include <sys/cdefs.h>
de4fb767 12331#include <sys/signal.h>
4f6d8cc8
GK
12332#include <ucontext.h>
12333int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
12334
12335_ACEOF
12336rm -f conftest.$ac_objext
a3bba767
JJ
12337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12338 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
12339 ac_status=$?
12340 grep -v '^ *+' conftest.er1 >conftest.err
12341 rm -f conftest.er1
12342 cat conftest.err >&5
12343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
12344 (exit $ac_status); } &&
12345 { ac_try='test -z "$ac_c_werror_flag"
12346 || test ! -s conftest.err'
12347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12348 (eval $ac_try) 2>&5
12349 ac_status=$?
12350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12351 (exit $ac_status); }; } &&
12352 { ac_try='test -s conftest.$ac_objext'
12353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12354 (eval $ac_try) 2>&5
12355 ac_status=$?
12356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12357 (exit $ac_status); }; }; then
4f6d8cc8
GK
12358 gcc_cv_mcontext_underscores=no
12359else
12360 echo "$as_me: failed program was:" >&5
12361sed 's/^/| /' conftest.$ac_ext >&5
12362
a3bba767 12363gcc_cv_mcontext_underscores=yes
4f6d8cc8 12364fi
a3bba767 12365rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8 12366fi
a3bba767
JJ
12367echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
12368echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6
4f6d8cc8
GK
12369 if test $gcc_cv_mcontext_underscores = yes; then
12370
12371cat >>confdefs.h <<\_ACEOF
12372#define HAS_MCONTEXT_T_UNDERSCORES
12373_ACEOF
12374
12375 fi
12376 ;;
12377esac
12378
8bb915b6
NN
12379# ---------
12380# Threading
12381# ---------
12382
c2e494a8 12383# Check if a valid thread package
615be2cf 12384case ${enable_threads} in
c2e494a8
NN
12385 "" | no)
12386 # No threads
12387 target_thread_file='single'
12388 ;;
12389 yes)
12390 # default
12391 target_thread_file='single'
12392 ;;
18167442 12393 aix | dce | gnat | irix | posix | posix95 | rtems | \
769e49eb 12394 single | solaris | vxworks | win32 )
615be2cf 12395 target_thread_file=${enable_threads}
c2e494a8
NN
12396 ;;
12397 *)
615be2cf 12398 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
12399 exit 1
12400 ;;
12401esac
12402
12403if test x${thread_file} = x; then
12404 # No thread file set by target-specific clauses in config.gcc,
12405 # so use file chosen by default logic above
12406 thread_file=${target_thread_file}
861bb6c1
JL
12407fi
12408
8bb915b6
NN
12409# Make gthr-default.h if we have a thread file.
12410gthread_flags=
12411if test $thread_file != single; then
12412 rm -f gthr-default.h
12413 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12414 gthread_flags=-DHAVE_GTHR_DEFAULT
12415fi
12416
12417
12418# --------
12419# UNSORTED
12420# --------
12421
18fbf599 12422use_cxa_atexit=no
2121a768
JT
12423if test x$enable___cxa_atexit = xyes || \
12424 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599 12425 if test x$host = x$target; then
97388150
DS
12426 case $host in
12427 # mingw32 doesn't have __cxa_atexit but uses atexit registration
12428 # keyed to flag_use_cxa_atexit
12429 *-*-mingw32*)
12430 use_cxa_atexit=yes
12431 ;;
12432 *)
a3bba767
JJ
12433 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
12434echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
354b7da5
DH
12435if test "${ac_cv_func___cxa_atexit+set}" = set; then
12436 echo $ECHO_N "(cached) $ECHO_C" >&6
12437else
12438 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
12439/* confdefs.h. */
12440_ACEOF
12441cat confdefs.h >>conftest.$ac_ext
12442cat >>conftest.$ac_ext <<_ACEOF
12443/* end confdefs.h. */
86da66b5
HPN
12444/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12445 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12446#define __cxa_atexit innocuous___cxa_atexit
12447
354b7da5
DH
12448/* System header to define __stub macros and hopefully few prototypes,
12449 which can conflict with char __cxa_atexit (); below.
12450 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12451 <limits.h> exists even on freestanding compilers. */
86da66b5 12452
354b7da5
DH
12453#ifdef __STDC__
12454# include <limits.h>
12455#else
12456# include <assert.h>
12457#endif
86da66b5
HPN
12458
12459#undef __cxa_atexit
12460
a3bba767 12461/* Override any gcc2 internal prototype to avoid an error. */
354b7da5
DH
12462#ifdef __cplusplus
12463extern "C"
a3bba767 12464{
354b7da5 12465#endif
a3bba767
JJ
12466/* We use char because int might match the return type of a gcc2
12467 builtin and then its argument prototype would still apply. */
354b7da5
DH
12468char __cxa_atexit ();
12469/* The GNU C library defines this for functions which it implements
12470 to always fail with ENOSYS. Some functions are actually named
12471 something starting with __ and the normal name is an alias. */
a3bba767 12472#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
354b7da5 12473choke me
a3bba767
JJ
12474#else
12475char (*f) () = __cxa_atexit;
12476#endif
12477#ifdef __cplusplus
12478}
354b7da5
DH
12479#endif
12480
12481int
12482main ()
12483{
a3bba767 12484return f != __cxa_atexit;
354b7da5
DH
12485 ;
12486 return 0;
12487}
12488_ACEOF
12489rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
12490if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12491 (eval $ac_link) 2>conftest.er1
354b7da5 12492 ac_status=$?
86da66b5
HPN
12493 grep -v '^ *+' conftest.er1 >conftest.err
12494 rm -f conftest.er1
12495 cat conftest.err >&5
354b7da5 12496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
12497 (exit $ac_status); } &&
12498 { ac_try='test -z "$ac_c_werror_flag"
12499 || test ! -s conftest.err'
12500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12501 (eval $ac_try) 2>&5
12502 ac_status=$?
12503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12504 (exit $ac_status); }; } &&
12505 { ac_try='test -s conftest$ac_exeext'
12506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12507 (eval $ac_try) 2>&5
12508 ac_status=$?
12509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12510 (exit $ac_status); }; }; then
354b7da5
DH
12511 ac_cv_func___cxa_atexit=yes
12512else
12513 echo "$as_me: failed program was:" >&5
12514sed 's/^/| /' conftest.$ac_ext >&5
12515
a3bba767 12516ac_cv_func___cxa_atexit=no
354b7da5 12517fi
a3bba767 12518rm -f conftest.err conftest.$ac_objext \
86da66b5 12519 conftest$ac_exeext conftest.$ac_ext
354b7da5 12520fi
a3bba767
JJ
12521echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12522echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
354b7da5 12523if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
12524 use_cxa_atexit=yes
12525else
12526 echo "__cxa_atexit can't be enabled on this target"
12527fi
12528
5f60e48f 12529 ;;
97388150 12530 esac
18fbf599
PB
12531 else
12532 # We can't check for __cxa_atexit when building a cross, so assume
12533 # it is available
12534 use_cxa_atexit=yes
12535 fi
12536 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
12537
12538cat >>confdefs.h <<\_ACEOF
c7b5e395 12539#define DEFAULT_USE_CXA_ATEXIT 2
ba479fd2 12540_ACEOF
2121a768 12541
18fbf599 12542 fi
2121a768
JT
12543fi
12544
e64f5acf
SE
12545use_getipinfo=yes
12546if test x$with_system_libunwind = xyes; then
12547 if test x$host = x$target; then
a3bba767
JJ
12548 echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5
12549echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6
e64f5acf
SE
12550if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
12551 echo $ECHO_N "(cached) $ECHO_C" >&6
12552else
12553 ac_func_search_save_LIBS=$LIBS
a3bba767 12554ac_cv_search__Unwind_GetIPInfo=no
e64f5acf
SE
12555cat >conftest.$ac_ext <<_ACEOF
12556/* confdefs.h. */
12557_ACEOF
12558cat confdefs.h >>conftest.$ac_ext
12559cat >>conftest.$ac_ext <<_ACEOF
12560/* end confdefs.h. */
12561
a3bba767 12562/* Override any gcc2 internal prototype to avoid an error. */
e64f5acf
SE
12563#ifdef __cplusplus
12564extern "C"
12565#endif
a3bba767
JJ
12566/* We use char because int might match the return type of a gcc2
12567 builtin and then its argument prototype would still apply. */
e64f5acf
SE
12568char _Unwind_GetIPInfo ();
12569int
12570main ()
12571{
a3bba767 12572_Unwind_GetIPInfo ();
e64f5acf
SE
12573 ;
12574 return 0;
12575}
12576_ACEOF
a3bba767
JJ
12577rm -f conftest.$ac_objext conftest$ac_exeext
12578if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12579 (eval $ac_link) 2>conftest.er1
e64f5acf
SE
12580 ac_status=$?
12581 grep -v '^ *+' conftest.er1 >conftest.err
12582 rm -f conftest.er1
12583 cat conftest.err >&5
12584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
12585 (exit $ac_status); } &&
12586 { ac_try='test -z "$ac_c_werror_flag"
12587 || test ! -s conftest.err'
12588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12589 (eval $ac_try) 2>&5
12590 ac_status=$?
12591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12592 (exit $ac_status); }; } &&
12593 { ac_try='test -s conftest$ac_exeext'
12594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12595 (eval $ac_try) 2>&5
12596 ac_status=$?
12597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12598 (exit $ac_status); }; }; then
12599 ac_cv_search__Unwind_GetIPInfo="none required"
e64f5acf
SE
12600else
12601 echo "$as_me: failed program was:" >&5
12602sed 's/^/| /' conftest.$ac_ext >&5
12603
703d89ab 12604fi
a3bba767
JJ
12605rm -f conftest.err conftest.$ac_objext \
12606 conftest$ac_exeext conftest.$ac_ext
12607if test "$ac_cv_search__Unwind_GetIPInfo" = no; then
12608 for ac_lib in unwind; do
12609 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12610 cat >conftest.$ac_ext <<_ACEOF
12611/* confdefs.h. */
12612_ACEOF
12613cat confdefs.h >>conftest.$ac_ext
12614cat >>conftest.$ac_ext <<_ACEOF
12615/* end confdefs.h. */
8b1f719a 12616
a3bba767
JJ
12617/* Override any gcc2 internal prototype to avoid an error. */
12618#ifdef __cplusplus
12619extern "C"
12620#endif
12621/* We use char because int might match the return type of a gcc2
12622 builtin and then its argument prototype would still apply. */
12623char _Unwind_GetIPInfo ();
12624int
12625main ()
12626{
12627_Unwind_GetIPInfo ();
12628 ;
12629 return 0;
12630}
12631_ACEOF
12632rm -f conftest.$ac_objext conftest$ac_exeext
12633if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12634 (eval $ac_link) 2>conftest.er1
12635 ac_status=$?
12636 grep -v '^ *+' conftest.er1 >conftest.err
12637 rm -f conftest.er1
12638 cat conftest.err >&5
12639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12640 (exit $ac_status); } &&
12641 { ac_try='test -z "$ac_c_werror_flag"
12642 || test ! -s conftest.err'
12643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12644 (eval $ac_try) 2>&5
12645 ac_status=$?
12646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12647 (exit $ac_status); }; } &&
12648 { ac_try='test -s conftest$ac_exeext'
12649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12650 (eval $ac_try) 2>&5
12651 ac_status=$?
12652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12653 (exit $ac_status); }; }; then
12654 ac_cv_search__Unwind_GetIPInfo="-l$ac_lib"
12655break
703d89ab 12656else
a3bba767
JJ
12657 echo "$as_me: failed program was:" >&5
12658sed 's/^/| /' conftest.$ac_ext >&5
12659
12660fi
12661rm -f conftest.err conftest.$ac_objext \
12662 conftest$ac_exeext conftest.$ac_ext
12663 done
a6ccdbab 12664fi
a6ccdbab
EC
12665LIBS=$ac_func_search_save_LIBS
12666fi
a3bba767
JJ
12667echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5
12668echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6
12669if test "$ac_cv_search__Unwind_GetIPInfo" != no; then
12670 test "$ac_cv_search__Unwind_GetIPInfo" = "none required" || LIBS="$ac_cv_search__Unwind_GetIPInfo $LIBS"
a6ccdbab
EC
12671
12672else
12673 use_getipinfo=no
12674fi
12675
12676 fi
12677fi
12678
12679if test x$use_getipinfo = xyes; then
12680
12681cat >>confdefs.h <<\_ACEOF
12682#define HAVE_GETIPINFO 1
e64f5acf
SE
12683_ACEOF
12684
12685else
12686 echo "The system unwind library does not support _Unwind_GetIPInfo."
12687fi
12688
a5381466 12689# Look for a file containing extra machine modes.
1c0ca89d
ZW
12690if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12691 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
12692
12693
12694cat >>confdefs.h <<_ACEOF
e22340b0 12695#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 12696_ACEOF
a5381466
ZW
12697
12698fi
12699
75685792
RS
12700# Convert extra_options into a form suitable for Makefile use.
12701extra_opt_files=
12702for f in $extra_options; do
12703 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12704done
12705
12706
b7cb92ad 12707# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 12708# the first file included by config.h.
4977bab6 12709# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 12710# as well. If host!=build, we are in error and need to do more
db81d74a 12711# work to find out the build config parameters.
75bffa71 12712if test x$host = x$build
db81d74a 12713then
eaf4e618 12714 build_auto=auto-host.h
b7cb92ad
JL
12715else
12716 # We create a subdir, then run autoconf in the subdir.
12717 # To prevent recursion we set host and build for the new
12718 # invocation of configure to the build for this invocation
ba479fd2 12719 # of configure.
b7cb92ad
JL
12720 tempdir=build.$$
12721 rm -rf $tempdir
12722 mkdir $tempdir
12723 cd $tempdir
12724 case ${srcdir} in
255b8a49 12725 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
12726 *) realsrcdir=../${srcdir};;
12727 esac
d920e825
L
12728 saved_CFLAGS="${CFLAGS}"
12729 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12730 ${realsrcdir}/configure \
33e70558 12731 --enable-languages=${enable_languages-all} \
534d0cc0 12732 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 12733 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
12734
12735 # We just finished tests for the build machine, so rename
12736 # the file auto-build.h in the gcc directory.
12737 mv auto-host.h ../auto-build.h
12738 cd ..
12739 rm -rf $tempdir
eaf4e618 12740 build_auto=auto-build.h
db81d74a
RH
12741fi
12742
06f0b04c 12743
eaf4e618 12744tm_file="${tm_file} defaults.h"
4977bab6
ZW
12745tm_p_file="${tm_p_file} tm-preds.h"
12746host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12747build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 12748# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 12749# put this back in temporarily.
232b67d9 12750xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 12751
34a86c2b
NN
12752# --------
12753# UNSORTED
12754# --------
12755
cc1e60ea 12756# Compile in configure arguments.
8105825d 12757if test -f configargs.h ; then
cc1e60ea 12758 # Being re-configured.
022dae81 12759 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
12760 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12761else
12762 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12763fi
eeae7b41
DJ
12764
12765# Double all backslashes and backslash all quotes to turn
12766# gcc_config_arguments into a C string.
12767sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12768$gcc_config_arguments
12769EOF
12770gcc_config_arguments_str=`cat conftest.out`
12771rm -f conftest.out
12772
cc1e60ea
JM
12773cat > configargs.h <<EOF
12774/* Generated automatically. */
eeae7b41 12775static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 12776static const char thread_model[] = "$thread_file";
7816bea0
DJ
12777
12778static const struct {
12779 const char *name, *value;
12780} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
12781EOF
12782
ab87f8c8 12783# Internationalization
18fc9bd4
RG
12784# If we haven't got the data from the intl directory,
12785# assume NLS is disabled.
12786USE_NLS=no
12787LIBINTL=
12788LIBINTL_DEP=
12789INCINTL=
12790XGETTEXT=
12791GMSGFMT=
12792POSUB=
12793
12794if test -f ../intl/config.intl; then
12795 . ../intl/config.intl
12796fi
a3bba767
JJ
12797echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12798echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
18fc9bd4 12799if test x"$USE_NLS" != xyes; then
a3bba767
JJ
12800 echo "$as_me:$LINENO: result: no" >&5
12801echo "${ECHO_T}no" >&6
18fc9bd4 12802else
a3bba767
JJ
12803 echo "$as_me:$LINENO: result: yes" >&5
12804echo "${ECHO_T}yes" >&6
18fc9bd4
RG
12805
12806cat >>confdefs.h <<\_ACEOF
12807#define ENABLE_NLS 1
12808_ACEOF
12809
12810
a3bba767
JJ
12811 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12812echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
18fc9bd4
RG
12813 # Look for .po and .gmo files in the source directory.
12814 CATALOGS=
12815 XLINGUAS=
12816 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12817 # If there aren't any .gmo files the shell will give us the
12818 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12819 # weeded out.
12820 case "$cat" in *\**)
12821 continue;;
12822 esac
12823 # The quadruple backslash is collapsed to a double backslash
12824 # by the backticks, then collapsed again by the double quotes,
12825 # leaving us with one backslash in the sed expression (right
12826 # before the dot that mustn't act as a wildcard).
12827 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
12828 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
12829 # The user is allowed to set LINGUAS to a list of languages to
12830 # install catalogs for. If it's empty that means "all of them."
12831 if test "x$LINGUAS" = x; then
12832 CATALOGS="$CATALOGS $cat"
12833 XLINGUAS="$XLINGUAS $lang"
12834 else
12835 case "$LINGUAS" in *$lang*)
12836 CATALOGS="$CATALOGS $cat"
12837 XLINGUAS="$XLINGUAS $lang"
12838 ;;
12839 esac
12840 fi
12841 done
12842 LINGUAS="$XLINGUAS"
a3bba767
JJ
12843 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12844echo "${ECHO_T}$LINGUAS" >&6
18fc9bd4
RG
12845
12846
12847 DATADIRNAME=share
12848
12849 INSTOBJEXT=.mo
12850
12851 GENCAT=gencat
12852
12853 CATOBJEXT=.gmo
12854
12855fi
861bb6c1 12856
56694dd9
ZW
12857# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12858# -liconv on the link line twice.
12859case "$LIBINTL" in *$LIBICONV*)
12860 LIBICONV= ;;
12861esac
dc6746e7 12862
a3bba767 12863# Check whether --enable-secureplt or --disable-secureplt was given.
7f970b70 12864if test "${enable_secureplt+set}" = set; then
a3bba767 12865 enableval="$enable_secureplt"
7f970b70 12866
a3bba767 12867fi;
7f970b70 12868
56694dd9 12869# Windows32 Registry support for specifying GCC installation paths.
a3bba767 12870# Check whether --enable-win32-registry or --disable-win32-registry was given.
56694dd9 12871if test "${enable_win32_registry+set}" = set; then
a3bba767 12872 enableval="$enable_win32_registry"
dc6746e7 12873
a3bba767 12874fi;
ba479fd2 12875
a1286ef5
ZW
12876case $host_os in
12877 win32 | pe | cygwin* | mingw32* | uwin*)
12878 if test "x$enable_win32_registry" != xno; then
a3bba767
JJ
12879 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
12880echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
ba479fd2
NN
12881if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12882 echo $ECHO_N "(cached) $ECHO_C" >&6
12883else
12884 ac_func_search_save_LIBS=$LIBS
a3bba767 12885ac_cv_search_RegOpenKeyExA=no
ba479fd2 12886cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12887/* confdefs.h. */
12888_ACEOF
12889cat confdefs.h >>conftest.$ac_ext
12890cat >>conftest.$ac_ext <<_ACEOF
12891/* end confdefs.h. */
861bb6c1 12892
a3bba767 12893/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12894#ifdef __cplusplus
12895extern "C"
12896#endif
a3bba767
JJ
12897/* We use char because int might match the return type of a gcc2
12898 builtin and then its argument prototype would still apply. */
ba479fd2
NN
12899char RegOpenKeyExA ();
12900int
12901main ()
12902{
a3bba767 12903RegOpenKeyExA ();
ba479fd2
NN
12904 ;
12905 return 0;
12906}
12907_ACEOF
a3bba767
JJ
12908rm -f conftest.$ac_objext conftest$ac_exeext
12909if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12910 (eval $ac_link) 2>conftest.er1
ba479fd2 12911 ac_status=$?
86da66b5
HPN
12912 grep -v '^ *+' conftest.er1 >conftest.err
12913 rm -f conftest.er1
12914 cat conftest.err >&5
ba479fd2 12915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
12916 (exit $ac_status); } &&
12917 { ac_try='test -z "$ac_c_werror_flag"
12918 || test ! -s conftest.err'
12919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12920 (eval $ac_try) 2>&5
12921 ac_status=$?
12922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12923 (exit $ac_status); }; } &&
12924 { ac_try='test -s conftest$ac_exeext'
12925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12926 (eval $ac_try) 2>&5
12927 ac_status=$?
12928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12929 (exit $ac_status); }; }; then
12930 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 12931else
ba479fd2
NN
12932 echo "$as_me: failed program was:" >&5
12933sed 's/^/| /' conftest.$ac_ext >&5
12934
703d89ab 12935fi
a3bba767
JJ
12936rm -f conftest.err conftest.$ac_objext \
12937 conftest$ac_exeext conftest.$ac_ext
12938if test "$ac_cv_search_RegOpenKeyExA" = no; then
12939 for ac_lib in advapi32; do
12940 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12941 cat >conftest.$ac_ext <<_ACEOF
12942/* confdefs.h. */
12943_ACEOF
12944cat confdefs.h >>conftest.$ac_ext
12945cat >>conftest.$ac_ext <<_ACEOF
12946/* end confdefs.h. */
8b1f719a 12947
a3bba767
JJ
12948/* Override any gcc2 internal prototype to avoid an error. */
12949#ifdef __cplusplus
12950extern "C"
12951#endif
12952/* We use char because int might match the return type of a gcc2
12953 builtin and then its argument prototype would still apply. */
12954char RegOpenKeyExA ();
12955int
12956main ()
12957{
12958RegOpenKeyExA ();
12959 ;
12960 return 0;
12961}
12962_ACEOF
12963rm -f conftest.$ac_objext conftest$ac_exeext
12964if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12965 (eval $ac_link) 2>conftest.er1
12966 ac_status=$?
12967 grep -v '^ *+' conftest.er1 >conftest.err
12968 rm -f conftest.er1
12969 cat conftest.err >&5
12970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12971 (exit $ac_status); } &&
12972 { ac_try='test -z "$ac_c_werror_flag"
12973 || test ! -s conftest.err'
12974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12975 (eval $ac_try) 2>&5
12976 ac_status=$?
12977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12978 (exit $ac_status); }; } &&
12979 { ac_try='test -s conftest$ac_exeext'
12980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12981 (eval $ac_try) 2>&5
12982 ac_status=$?
12983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12984 (exit $ac_status); }; }; then
12985 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
12986break
703d89ab 12987else
a3bba767
JJ
12988 echo "$as_me: failed program was:" >&5
12989sed 's/^/| /' conftest.$ac_ext >&5
12990
12991fi
12992rm -f conftest.err conftest.$ac_objext \
12993 conftest$ac_exeext conftest.$ac_ext
12994 done
dd7f7a6e
EC
12995fi
12996LIBS=$ac_func_search_save_LIBS
12997fi
a3bba767
JJ
12998echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
12999echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
13000if test "$ac_cv_search_RegOpenKeyExA" != no; then
13001 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
dd7f7a6e
EC
13002
13003else
13004 enable_win32_registry=no
13005fi
13006
13007 fi
13008
13009 if test "x$enable_win32_registry" != xno; then
13010
13011cat >>confdefs.h <<\_ACEOF
13012#define ENABLE_WIN32_REGISTRY 1
13013_ACEOF
13014
13015
13016 if test "x$enable_win32_registry" != xyes \
13017 && test "x$enable_win32_registry" != x; then
13018
13019cat >>confdefs.h <<_ACEOF
13020#define WIN32_REGISTRY_KEY "$enable_win32_registry"
13021_ACEOF
13022
13023 fi
13024 fi
13025 ;;
13026esac
ab87f8c8 13027
56694dd9
ZW
13028# Get an absolute path to the GCC top-level source directory
13029holddir=`${PWDCMD-pwd}`
13030cd $srcdir
13031topdir=`${PWDCMD-pwd}`
13032cd $holddir
ab87f8c8 13033
56694dd9 13034# Conditionalize the makefile for this host machine.
2ed26f6b 13035xmake_file=
c406e779 13036for f in ${host_xmake_file}
56694dd9
ZW
13037do
13038 if test -f ${srcdir}/config/$f
13039 then
2ed26f6b 13040 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
13041 fi
13042done
093e61a6 13043
56694dd9 13044# Conditionalize the makefile for this target machine.
2ed26f6b 13045tmake_file_=
c406e779 13046for f in ${tmake_file}
56694dd9
ZW
13047do
13048 if test -f ${srcdir}/config/$f
13049 then
2ed26f6b 13050 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
13051 fi
13052done
2ed26f6b 13053tmake_file="${tmake_file_}"
71a94577 13054
5395b47b
NN
13055# This is a terrible hack which will go away some day.
13056host_cc_for_libada=${CC}
1e3fad21
NN
13057
13058
ab87f8c8
JL
13059out_object_file=`basename $out_file .c`.o
13060
75685792
RS
13061tm_file_list="options.h"
13062tm_include_list="options.h"
ab87f8c8 13063for f in $tm_file; do
64ccbc99 13064 case $f in
3ca43df7
RS
13065 ./* )
13066 f=`echo $f | sed 's/^..//'`
13067 tm_file_list="${tm_file_list} $f"
13068 tm_include_list="${tm_include_list} $f"
13069 ;;
d02af173 13070 defaults.h )
e22340b0
ZW
13071 tm_file_list="${tm_file_list} \$(srcdir)/$f"
13072 tm_include_list="${tm_include_list} $f"
13073 ;;
13074 * )
13075 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
13076 tm_include_list="${tm_include_list} config/$f"
13077 ;;
64ccbc99 13078 esac
ab87f8c8
JL
13079done
13080
11642c3a 13081tm_p_file_list=
e22340b0 13082tm_p_include_list=
11642c3a 13083for f in $tm_p_file; do
4977bab6
ZW
13084 case $f in
13085 tm-preds.h )
e22340b0
ZW
13086 tm_p_file_list="${tm_p_file_list} $f"
13087 tm_p_include_list="${tm_p_include_list} $f"
13088 ;;
13089 * )
13090 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
13091 tm_p_include_list="${tm_p_include_list} config/$f"
13092 esac
13093done
13094
13095xm_file_list=
13096xm_include_list=
13097for f in $xm_file; do
13098 case $f in
13099 ansidecl.h )
13100 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
13101 xm_include_list="${xm_include_list} $f"
13102 ;;
13103 auto-host.h )
13104 xm_file_list="${xm_file_list} $f"
13105 xm_include_list="${xm_include_list} $f"
13106 ;;
13107 * )
13108 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
13109 xm_include_list="${xm_include_list} config/$f"
13110 ;;
4977bab6 13111 esac
11642c3a
ZW
13112done
13113
ab87f8c8 13114host_xm_file_list=
e22340b0 13115host_xm_include_list=
ab87f8c8 13116for f in $host_xm_file; do
64ccbc99 13117 case $f in
d02af173 13118 ansidecl.h )
e22340b0
ZW
13119 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
13120 host_xm_include_list="${host_xm_include_list} $f"
13121 ;;
e2500fed 13122 auto-host.h )
e22340b0
ZW
13123 host_xm_file_list="${host_xm_file_list} $f"
13124 host_xm_include_list="${host_xm_include_list} $f"
13125 ;;
13126 * )
13127 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
13128 host_xm_include_list="${host_xm_include_list} config/$f"
13129 ;;
64ccbc99 13130 esac
ab87f8c8
JL
13131done
13132
13133build_xm_file_list=
13134for f in $build_xm_file; do
64ccbc99 13135 case $f in
d02af173 13136 ansidecl.h )
e22340b0
ZW
13137 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
13138 build_xm_include_list="${build_xm_include_list} $f"
13139 ;;
e2500fed 13140 auto-build.h | auto-host.h )
e22340b0
ZW
13141 build_xm_file_list="${build_xm_file_list} $f"
13142 build_xm_include_list="${build_xm_include_list} $f"
13143 ;;
13144 * )
13145 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
13146 build_xm_include_list="${build_xm_include_list} config/$f"
13147 ;;
64ccbc99 13148 esac
ab87f8c8
JL
13149done
13150
2989d30c
GK
13151# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
13152# cross-compiler which does not use the native headers and libraries.
a078a589 13153# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
13154CROSS=
13155ALL=all.internal
13156SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
13157
13158if test "x$with_build_sysroot" != x; then
14da6073 13159 build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
13160else
13161 # This value is used, even on a native system, because
13162 # CROSS_SYSTEM_HEADER_DIR is just
13163 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
13164 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
13165fi
13166
ab87f8c8
JL
13167if test x$host != x$target
13168then
2989d30c 13169 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
a078a589 13170 ALL=all.cross
160633c6 13171 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 13172 case "$host","$target" in
3a7e8b87
GK
13173 # Darwin crosses can use the host system's libraries and headers,
13174 # because of the fat library support. Of course, it must be the
13175 # same version of Darwin on both sides. Allow the user to
13176 # just say --target=foo-darwin without a version number to mean
13177 # "the version on this system".
13178 *-*-darwin*,*-*-darwin*)
13179 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
13180 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
13181 if test $hostos = $targetos -o $targetos = darwin ; then
13182 CROSS=
13183 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
13184 with_headers=yes
13185 fi
13186 ;;
13187
343f59d9
AM
13188 i?86-*-*,x86_64-*-* \
13189 | powerpc*-*-*,powerpc64*-*-*)
13190 CROSS="$CROSS -DNATIVE_CROSS" ;;
13191 esac
7a615b25 13192elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 13193 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
13194fi
13195
b39d221a
EC
13196# If this is a cross-compiler that does not
13197# have its own set of headers then define
13198# inhibit_libc
13199
dc06db20
R
13200# If this is using newlib, without having the headers available now,
13201# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
13202# This prevents libgcc2 from containing any code which requires libc
13203# support.
160633c6 13204inhibit_libc=false
dc06db20
R
13205if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
13206 test x$with_newlib = xyes ; } &&
e50084fa 13207 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 13208 inhibit_libc=true
b39d221a
EC
13209fi
13210
13211
a078a589
ZW
13212# When building gcc with a cross-compiler, we need to adjust things so
13213# that the generator programs are still built with the native compiler.
13214# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
13215
13216# These are the normal (build=host) settings:
ba479fd2
NN
13217CC_FOR_BUILD='$(CC)'
13218BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 13219STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
13220
13221# Possibly disable fixproto, on a per-target basis.
13222case ${use_fixproto} in
13223 no)
13224 STMP_FIXPROTO=
13225 ;;
13226 yes)
13227 STMP_FIXPROTO=stmp-fixproto
13228 ;;
13229esac
13230
a078a589 13231
83599948
NS
13232# And these apply if build != host, or we are generating coverage data
13233if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 13234then
b11e4747 13235 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 13236
7a615b25 13237 if test "x$TARGET_SYSTEM_ROOT" = x; then
d8e5117d 13238 if test "x$STMP_FIXPROTO" != x; then
de253ca4
GK
13239 STMP_FIXPROTO=stmp-install-fixproto
13240 fi
7a615b25 13241 fi
ab87f8c8
JL
13242fi
13243
13244# Expand extra_headers to include complete path.
13245# This substitutes for lots of t-* files.
13246extra_headers_list=
b1ef58c8
NN
13247# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
13248for file in ${extra_headers} ; do
13249 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
13250done
ab87f8c8 13251
c38f02df
ILT
13252# Define collect2 in Makefile.
13253case $host_can_use_collect2 in
13254 no) collect2= ;;
13255 *) collect2='collect2$(exeext)' ;;
13256esac
13257
13258
ab87f8c8 13259# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
13260case $use_collect2 in
13261 no) use_collect2= ;;
13262 "") ;;
ba479fd2 13263 *)
34a86c2b
NN
13264 host_xm_defines="${host_xm_defines} USE_COLLECT2"
13265 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
13266 case $host_can_use_collect2 in
13267 no)
13268 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
13269echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
13270 { (exit 1); exit 1; }; }
13271 ;;
13272 esac
34a86c2b
NN
13273 ;;
13274esac
ab87f8c8 13275
8bb915b6
NN
13276# ---------------------------
13277# Assembler & linker features
13278# ---------------------------
13279
d869a8c4
NN
13280# Identify the assembler which will work hand-in-glove with the newly
13281# built GCC, so that we can examine its features. This is the assembler
13282# which will be driven by the driver program.
13283#
13284# If build != host, and we aren't building gas in-tree, we identify a
13285# build->target assembler and hope that it will have the same features
13286# as the host->target assembler we'll be using.
981d4858
JM
13287gcc_cv_gas_major_version=
13288gcc_cv_gas_minor_version=
ab87f8c8 13289gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
e8b05380
PB
13290
13291if test "${gcc_cv_as+set}" = set; then
13292 :
13293else
13294
ab87f8c8
JL
13295if test -x "$DEFAULT_ASSEMBLER"; then
13296 gcc_cv_as="$DEFAULT_ASSEMBLER"
34a86c2b 13297elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
13298 && test -f ../gas/Makefile \
13299 && test x$build = x$host; then
e8b05380
PB
13300 gcc_cv_as=../gas/as-new$build_exeext
13301elif test -x as$build_exeext; then
13302 # Build using assembler in the current directory.
13303 gcc_cv_as=./as$build_exeext
13304elif test -x $AS_FOR_TARGET; then
13305 gcc_cv_as="$AS_FOR_TARGET"
13306else
13307 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
13308set dummy $AS_FOR_TARGET; ac_word=$2
a3bba767
JJ
13309echo "$as_me:$LINENO: checking for $ac_word" >&5
13310echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380
PB
13311if test "${ac_cv_path_gcc_cv_as+set}" = set; then
13312 echo $ECHO_N "(cached) $ECHO_C" >&6
13313else
13314 case $gcc_cv_as in
13315 [\\/]* | ?:[\\/]*)
13316 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
13317 ;;
13318 *)
13319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13320for as_dir in $PATH
13321do
13322 IFS=$as_save_IFS
13323 test -z "$as_dir" && as_dir=.
13324 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 13325 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380
PB
13326 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
13327 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13328 break 2
13329 fi
13330done
13331done
13332
13333 ;;
13334esac
13335fi
13336gcc_cv_as=$ac_cv_path_gcc_cv_as
a3bba767 13337
e8b05380 13338if test -n "$gcc_cv_as"; then
a3bba767
JJ
13339 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13340echo "${ECHO_T}$gcc_cv_as" >&6
e8b05380 13341else
a3bba767
JJ
13342 echo "$as_me:$LINENO: result: no" >&5
13343echo "${ECHO_T}no" >&6
e8b05380
PB
13344fi
13345
13346fi
13347fi
13348
13349
13350ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
13351
13352
a3bba767
JJ
13353echo "$as_me:$LINENO: checking what assembler to use" >&5
13354echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
e8b05380 13355if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
08d105fa
AO
13356 # Single tree build which includes gas. We want to prefer it
13357 # over whatever linker top-level may have detected, since
13358 # we'll use what we're building after installation anyway.
a3bba767
JJ
13359 echo "$as_me:$LINENO: result: newly built gas" >&5
13360echo "${ECHO_T}newly built gas" >&6
ad9c4d9f
NN
13361 in_tree_gas=yes
13362 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
13363for f in $gcc_cv_as_bfd_srcdir/configure \
13364 $gcc_cv_as_gas_srcdir/configure \
13365 $gcc_cv_as_gas_srcdir/configure.in \
13366 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 13367 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
13368 if test x$gcc_cv_gas_version != x; then
13369 break
13370 fi
13371done
13372gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
13373gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13374gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
13375case $gcc_cv_gas_patch_version in
13376 "") gcc_cv_gas_patch_version="0" ;;
13377esac
8ada417f
ZW
13378gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
13379 + $gcc_cv_gas_minor_version \) \* 1000 \
13380 + $gcc_cv_gas_patch_version`
ad9c4d9f 13381
5408ac6c
HPN
13382 in_tree_gas_is_elf=no
13383 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
13384 || (grep 'obj_format = multi' ../gas/Makefile \
13385 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
13386 then
13387 in_tree_gas_is_elf=yes
13388 fi
e8b05380 13389else
a3bba767
JJ
13390 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13391echo "${ECHO_T}$gcc_cv_as" >&6
e8b05380 13392 in_tree_gas=no
981d4858 13393fi
9e423e6d 13394
e8b05380
PB
13395# Identify the linker which will work hand-in-glove with the newly
13396# built GCC, so that we can examine its features. This is the linker
13397# which will be driven by the driver program.
9f18db39 13398#
e8b05380
PB
13399# If build != host, and we aren't building gas in-tree, we identify a
13400# build->target linker and hope that it will have the same features
13401# as the host->target linker we'll be using.
13402gcc_cv_gld_major_version=
13403gcc_cv_gld_minor_version=
13404gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
13405gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9f18db39 13406
e8b05380
PB
13407if test "${gcc_cv_ld+set}" = set; then
13408 :
9f18db39 13409else
9f18db39 13410
e8b05380
PB
13411if test -x "$DEFAULT_LINKER"; then
13412 gcc_cv_ld="$DEFAULT_LINKER"
13413elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
13414 && test -f ../ld/Makefile \
13415 && test x$build = x$host; then
13416 gcc_cv_ld=../ld/ld-new$build_exeext
13417elif test -x collect-ld$build_exeext; then
13418 # Build using linker in the current directory.
13419 gcc_cv_ld=./collect-ld$build_exeext
13420elif test -x $LD_FOR_TARGET; then
13421 gcc_cv_ld="$LD_FOR_TARGET"
13422else
13423 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
13424set dummy $LD_FOR_TARGET; ac_word=$2
a3bba767
JJ
13425echo "$as_me:$LINENO: checking for $ac_word" >&5
13426echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13427if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
d739199a
DJ
13428 echo $ECHO_N "(cached) $ECHO_C" >&6
13429else
e8b05380 13430 case $gcc_cv_ld in
d739199a 13431 [\\/]* | ?:[\\/]*)
e8b05380 13432 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
13433 ;;
13434 *)
13435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13436for as_dir in $PATH
13437do
13438 IFS=$as_save_IFS
13439 test -z "$as_dir" && as_dir=.
13440 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 13441 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13442 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13443 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13444 break 2
13445 fi
13446done
13447done
13448
13449 ;;
13450esac
13451fi
e8b05380 13452gcc_cv_ld=$ac_cv_path_gcc_cv_ld
a3bba767 13453
e8b05380 13454if test -n "$gcc_cv_ld"; then
a3bba767
JJ
13455 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13456echo "${ECHO_T}$gcc_cv_ld" >&6
d739199a 13457else
a3bba767
JJ
13458 echo "$as_me:$LINENO: result: no" >&5
13459echo "${ECHO_T}no" >&6
d739199a
DJ
13460fi
13461
13462fi
e8b05380
PB
13463fi
13464
13465
13466ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
13467
13468
a3bba767
JJ
13469echo "$as_me:$LINENO: checking what linker to use" >&5
13470echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
e8b05380
PB
13471if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
13472 # Single tree build which includes ld. We want to prefer it
13473 # over whatever linker top-level may have detected, since
13474 # we'll use what we're building after installation anyway.
a3bba767
JJ
13475 echo "$as_me:$LINENO: result: newly built ld" >&5
13476echo "${ECHO_T}newly built ld" >&6
e8b05380
PB
13477 in_tree_ld=yes
13478 in_tree_ld_is_elf=no
13479 if (grep 'EMUL = .*elf' ../ld/Makefile \
13480 || grep 'EMUL = .*linux' ../ld/Makefile \
13481 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
13482 in_tree_ld_is_elf=yes
13483 fi
13484 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
13485 do
13486 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
13487 if test x$gcc_cv_gld_version != x; then
13488 break
13489 fi
13490 done
13491 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
13492 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13493else
a3bba767
JJ
13494 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13495echo "${ECHO_T}$gcc_cv_ld" >&6
e8b05380
PB
13496 in_tree_ld=no
13497fi
13498
13499# Figure out what nm we will be using.
13500gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
13501if test "${gcc_cv_nm+set}" = set; then
13502 :
13503else
13504
13505if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
13506 && test -f ../binutils/Makefile \
13507 && test x$build = x$host; then
e8b05380
PB
13508 gcc_cv_nm=../binutils/nm-new$build_exeext
13509elif test -x nm$build_exeext; then
13510 gcc_cv_nm=./nm$build_exeext
13511elif test -x $NM_FOR_TARGET; then
13512 gcc_cv_nm="$NM_FOR_TARGET"
13513else
13514 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
13515set dummy $NM_FOR_TARGET; ac_word=$2
a3bba767
JJ
13516echo "$as_me:$LINENO: checking for $ac_word" >&5
13517echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13518if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
d739199a
DJ
13519 echo $ECHO_N "(cached) $ECHO_C" >&6
13520else
e8b05380 13521 case $gcc_cv_nm in
d739199a 13522 [\\/]* | ?:[\\/]*)
e8b05380 13523 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
13524 ;;
13525 *)
13526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13527for as_dir in $PATH
13528do
13529 IFS=$as_save_IFS
13530 test -z "$as_dir" && as_dir=.
13531 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 13532 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13533 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13534 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13535 break 2
13536 fi
13537done
13538done
13539
13540 ;;
13541esac
13542fi
e8b05380 13543gcc_cv_nm=$ac_cv_path_gcc_cv_nm
a3bba767 13544
e8b05380 13545if test -n "$gcc_cv_nm"; then
a3bba767
JJ
13546 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13547echo "${ECHO_T}$gcc_cv_nm" >&6
d739199a 13548else
a3bba767
JJ
13549 echo "$as_me:$LINENO: result: no" >&5
13550echo "${ECHO_T}no" >&6
d739199a
DJ
13551fi
13552
13553fi
e8b05380 13554fi
d739199a 13555
e8b05380 13556
a3bba767
JJ
13557echo "$as_me:$LINENO: checking what nm to use" >&5
13558echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
e8b05380
PB
13559if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
13560 # Single tree build which includes binutils.
a3bba767
JJ
13561 echo "$as_me:$LINENO: result: newly built nm" >&5
13562echo "${ECHO_T}newly built nm" >&6
e8b05380
PB
13563 in_tree_nm=yes
13564else
a3bba767
JJ
13565 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13566echo "${ECHO_T}$gcc_cv_nm" >&6
e8b05380
PB
13567 in_tree_nm=no
13568fi
13569
13570ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
13571
13572
13573# Figure out what objdump we will be using.
13574if test "${gcc_cv_objdump+set}" = set; then
13575 :
13576else
13577
13578if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
13579 && test -f ../binutils/Makefile \
13580 && test x$build = x$host; then
e8b05380
PB
13581 # Single tree build which includes binutils.
13582 gcc_cv_objdump=../binutils/objdump$build_exeext
13583elif test -x objdump$build_exeext; then
13584 gcc_cv_objdump=./objdump$build_exeext
13585elif test -x $OBJDUMP_FOR_TARGET; then
13586 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
13587else
13588 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
13589set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
a3bba767
JJ
13590echo "$as_me:$LINENO: checking for $ac_word" >&5
13591echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13592if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
9f18db39
PB
13593 echo $ECHO_N "(cached) $ECHO_C" >&6
13594else
e8b05380 13595 case $gcc_cv_objdump in
9f18db39 13596 [\\/]* | ?:[\\/]*)
e8b05380 13597 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
13598 ;;
13599 *)
13600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 13601for as_dir in $PATH
9f18db39
PB
13602do
13603 IFS=$as_save_IFS
13604 test -z "$as_dir" && as_dir=.
13605 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 13606 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13607 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
9f18db39
PB
13608 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13609 break 2
13610 fi
13611done
13612done
779243f7 13613
9f18db39
PB
13614 ;;
13615esac
13616fi
e8b05380 13617gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
a3bba767 13618
e8b05380 13619if test -n "$gcc_cv_objdump"; then
a3bba767
JJ
13620 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13621echo "${ECHO_T}$gcc_cv_objdump" >&6
9f18db39 13622else
a3bba767
JJ
13623 echo "$as_me:$LINENO: result: no" >&5
13624echo "${ECHO_T}no" >&6
9f18db39
PB
13625fi
13626
e8b05380
PB
13627fi
13628fi
9f18db39 13629
e8b05380 13630
a3bba767
JJ
13631echo "$as_me:$LINENO: checking what objdump to use" >&5
13632echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
e8b05380
PB
13633if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
13634 # Single tree build which includes binutils.
a3bba767
JJ
13635 echo "$as_me:$LINENO: result: newly built objdump" >&5
13636echo "${ECHO_T}newly built objdump" >&6
e8b05380 13637elif test x$gcc_cv_objdump = x; then
a3bba767
JJ
13638 echo "$as_me:$LINENO: result: not found" >&5
13639echo "${ECHO_T}not found" >&6
e8b05380 13640else
a3bba767
JJ
13641 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13642echo "${ECHO_T}$gcc_cv_objdump" >&6
a2eafc76 13643fi
3cae5780 13644
981d4858 13645# Figure out what assembler alignment features are present.
a3bba767
JJ
13646echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13647echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
ba479fd2
NN
13648if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13649 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13650else
13651 gcc_cv_as_balign_and_p2align=no
13652 if test $in_tree_gas = yes; then
13653 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13654 then gcc_cv_as_balign_and_p2align=yes
13655fi
13656 elif test x$gcc_cv_as != x; then
6e3f3080 13657 echo '.balign 4
8ada417f 13658.p2align 2' > conftest.s
ba479fd2
NN
13659 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13661 (eval $ac_try) 2>&5
13662 ac_status=$?
13663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13664 (exit $ac_status); }; }
8ada417f
ZW
13665 then
13666 gcc_cv_as_balign_and_p2align=yes
13667 else
13668 echo "configure: failed program was" >&5
13669 cat conftest.s >&5
13670 fi
13671 rm -f conftest.o conftest.s
13672 fi
13673fi
a3bba767
JJ
13674echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13675echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 13676if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
13677
13678cat >>confdefs.h <<\_ACEOF
981d4858 13679#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 13680_ACEOF
981d4858 13681
ad9c4d9f
NN
13682fi
13683
a3bba767
JJ
13684echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13685echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
ba479fd2
NN
13686if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13687 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13688else
13689 gcc_cv_as_max_skip_p2align=no
13690 if test $in_tree_gas = yes; then
13691 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13692 then gcc_cv_as_max_skip_p2align=yes
13693fi
13694 elif test x$gcc_cv_as != x; then
6e3f3080 13695 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
13696 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13698 (eval $ac_try) 2>&5
13699 ac_status=$?
13700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13701 (exit $ac_status); }; }
8ada417f
ZW
13702 then
13703 gcc_cv_as_max_skip_p2align=yes
13704 else
13705 echo "configure: failed program was" >&5
13706 cat conftest.s >&5
13707 fi
13708 rm -f conftest.o conftest.s
13709 fi
ad9c4d9f 13710fi
a3bba767
JJ
13711echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13712echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 13713if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
13714
13715cat >>confdefs.h <<\_ACEOF
9e423e6d 13716#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 13717_ACEOF
9e423e6d 13718
9e423e6d 13719fi
ad9c4d9f 13720
a3bba767
JJ
13721echo "$as_me:$LINENO: checking assembler for .literal16" >&5
13722echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6
5708d18d
MS
13723if test "${gcc_cv_as_literal16+set}" = set; then
13724 echo $ECHO_N "(cached) $ECHO_C" >&6
13725else
13726 gcc_cv_as_literal16=no
13727 if test $in_tree_gas = yes; then
13728 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13729 then gcc_cv_as_literal16=yes
13730fi
13731 elif test x$gcc_cv_as != x; then
13732 echo '.literal16' > conftest.s
13733 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13735 (eval $ac_try) 2>&5
13736 ac_status=$?
13737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13738 (exit $ac_status); }; }
13739 then
13740 gcc_cv_as_literal16=yes
13741 else
13742 echo "configure: failed program was" >&5
13743 cat conftest.s >&5
13744 fi
13745 rm -f conftest.o conftest.s
13746 fi
13747fi
a3bba767
JJ
13748echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5
13749echo "${ECHO_T}$gcc_cv_as_literal16" >&6
5708d18d
MS
13750if test $gcc_cv_as_literal16 = yes; then
13751
13752cat >>confdefs.h <<\_ACEOF
13753#define HAVE_GAS_LITERAL16 1
13754_ACEOF
13755
13756fi
13757
a3bba767
JJ
13758echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13759echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
ba479fd2
NN
13760if test "${gcc_cv_as_subsection_m1+set}" = set; then
13761 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13762else
13763 gcc_cv_as_subsection_m1=no
13764 if test $in_tree_gas = yes; then
13765 if test $in_tree_gas_is_elf = yes \
13766 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13767 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 13768fi
8ada417f 13769 elif test x$gcc_cv_as != x; then
6e3f3080 13770 echo 'conftest_label1: .word 0
d1accaa3
JJ
13771.subsection -1
13772conftest_label2: .word 0
8ada417f 13773.previous' > conftest.s
ba479fd2
NN
13774 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13776 (eval $ac_try) 2>&5
13777 ac_status=$?
13778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13779 (exit $ac_status); }; }
8ada417f
ZW
13780 then
13781 if test x$gcc_cv_nm != x; then
13782 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13783 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13784 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13785 then :
13786 else gcc_cv_as_subsection_m1=yes
13787 fi
13788 rm -f conftest.nm1 conftest.nm2
13789 fi
13790 else
13791 echo "configure: failed program was" >&5
13792 cat conftest.s >&5
13793 fi
13794 rm -f conftest.o conftest.s
13795 fi
981d4858 13796fi
a3bba767
JJ
13797echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13798echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 13799if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
13800
13801cat >>confdefs.h <<\_ACEOF
981d4858 13802#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 13803_ACEOF
981d4858 13804
d1accaa3 13805fi
ad9c4d9f 13806
a3bba767
JJ
13807echo "$as_me:$LINENO: checking assembler for .weak" >&5
13808echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
ba479fd2
NN
13809if test "${gcc_cv_as_weak+set}" = set; then
13810 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13811else
13812 gcc_cv_as_weak=no
13813 if test $in_tree_gas = yes; then
13814 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13815 then gcc_cv_as_weak=yes
ad9c4d9f 13816fi
8ada417f 13817 elif test x$gcc_cv_as != x; then
6e3f3080 13818 echo ' .weak foobar' > conftest.s
ba479fd2
NN
13819 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13821 (eval $ac_try) 2>&5
13822 ac_status=$?
13823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13824 (exit $ac_status); }; }
8ada417f
ZW
13825 then
13826 gcc_cv_as_weak=yes
13827 else
13828 echo "configure: failed program was" >&5
13829 cat conftest.s >&5
13830 fi
13831 rm -f conftest.o conftest.s
13832 fi
981d4858 13833fi
a3bba767
JJ
13834echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13835echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 13836if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
13837
13838cat >>confdefs.h <<\_ACEOF
981d4858 13839#define HAVE_GAS_WEAK 1
ba479fd2 13840_ACEOF
981d4858 13841
12822146 13842fi
ad9c4d9f 13843
a3bba767
JJ
13844echo "$as_me:$LINENO: checking assembler for .weakref" >&5
13845echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
a0203ca7
AO
13846if test "${gcc_cv_as_weakref+set}" = set; then
13847 echo $ECHO_N "(cached) $ECHO_C" >&6
13848else
13849 gcc_cv_as_weakref=no
13850 if test $in_tree_gas = yes; then
13851 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
13852 then gcc_cv_as_weakref=yes
13853fi
13854 elif test x$gcc_cv_as != x; then
13855 echo ' .weakref foobar, barfnot' > conftest.s
13856 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13858 (eval $ac_try) 2>&5
13859 ac_status=$?
13860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13861 (exit $ac_status); }; }
13862 then
13863 gcc_cv_as_weakref=yes
13864 else
13865 echo "configure: failed program was" >&5
13866 cat conftest.s >&5
13867 fi
13868 rm -f conftest.o conftest.s
13869 fi
13870fi
a3bba767
JJ
13871echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
13872echo "${ECHO_T}$gcc_cv_as_weakref" >&6
a0203ca7
AO
13873if test $gcc_cv_as_weakref = yes; then
13874
13875cat >>confdefs.h <<\_ACEOF
13876#define HAVE_GAS_WEAKREF 1
13877_ACEOF
13878
13879fi
13880
a3bba767
JJ
13881echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13882echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
e41f3691
JDA
13883if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13884 echo $ECHO_N "(cached) $ECHO_C" >&6
13885else
13886 gcc_cv_as_nsubspa_comdat=no
13887 if test $in_tree_gas = yes; then
13888 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13889 then gcc_cv_as_nsubspa_comdat=yes
13890fi
13891 elif test x$gcc_cv_as != x; then
13892 echo ' .SPACE $TEXT$
13893 .NSUBSPA $CODE$,COMDAT' > conftest.s
13894 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13896 (eval $ac_try) 2>&5
13897 ac_status=$?
13898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13899 (exit $ac_status); }; }
13900 then
13901 gcc_cv_as_nsubspa_comdat=yes
13902 else
13903 echo "configure: failed program was" >&5
13904 cat conftest.s >&5
13905 fi
13906 rm -f conftest.o conftest.s
13907 fi
13908fi
a3bba767
JJ
13909echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13910echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
e41f3691
JDA
13911if test $gcc_cv_as_nsubspa_comdat = yes; then
13912
13913cat >>confdefs.h <<\_ACEOF
13914#define HAVE_GAS_NSUBSPA_COMDAT 1
13915_ACEOF
13916
13917fi
13918
8ada417f
ZW
13919# .hidden needs to be supported in both the assembler and the linker,
13920# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13921# This is irritatingly difficult to feature test for; we have to check the
13922# date string after the version number. If we've got an in-tree
13923# ld, we don't know its patchlevel version, so we set the baseline at 2.13
13924# to be safe.
13925# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
a3bba767
JJ
13926echo "$as_me:$LINENO: checking assembler for .hidden" >&5
13927echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
ba479fd2
NN
13928if test "${gcc_cv_as_hidden+set}" = set; then
13929 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13930else
13931 gcc_cv_as_hidden=no
13932 if test $in_tree_gas = yes; then
13933 if test $in_tree_gas_is_elf = yes \
13934 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
13935 then gcc_cv_as_hidden=yes
13936fi
13937 elif test x$gcc_cv_as != x; then
6e3f3080 13938 echo ' .hidden foobar
8ada417f 13939foobar:' > conftest.s
ba479fd2
NN
13940 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13942 (eval $ac_try) 2>&5
13943 ac_status=$?
13944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13945 (exit $ac_status); }; }
8ada417f
ZW
13946 then
13947 gcc_cv_as_hidden=yes
13948 else
13949 echo "configure: failed program was" >&5
13950 cat conftest.s >&5
13951 fi
13952 rm -f conftest.o conftest.s
13953 fi
13954fi
a3bba767
JJ
13955echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
13956echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 13957
ad9c4d9f 13958
a3bba767
JJ
13959echo "$as_me:$LINENO: checking linker for .hidden support" >&5
13960echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
ba479fd2
NN
13961if test "${gcc_cv_ld_hidden+set}" = set; then
13962 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13963else
13964 if test $in_tree_ld = yes ; then
13965 gcc_cv_ld_hidden=no
13966 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 \
13967 && test $in_tree_ld_is_elf = yes; then
13968 gcc_cv_ld_hidden=yes
13969 fi
13970else
13971 gcc_cv_ld_hidden=yes
bace148a 13972 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
13973 if echo "$ld_ver" | grep GNU > /dev/null; then
13974 ld_vers=`echo $ld_ver | sed -n \
13975 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13976 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13977 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13978 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13979 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
11176d2a 13980 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
e8116f40 13981 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ -].*$,\1,p'`
8ada417f 13982 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'`
11176d2a
JB
13983 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
13984 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
13985 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
13986 if test 0"$ld_date" -lt 20020404; then
13987 if test -n "$ld_date"; then
13988 # If there was date string, but was earlier than 2002-04-04, fail
13989 gcc_cv_ld_hidden=no
13990 elif test -z "$ld_vers"; then
13991 # If there was no date string nor ld version number, something is wrong
13992 gcc_cv_ld_hidden=no
13993 else
8ada417f
ZW
13994 test -z "$ld_vers_patch" && ld_vers_patch=0
13995 if test "$ld_vers_major" -lt 2; then
13996 gcc_cv_ld_hidden=no
13997 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
13998 gcc_cv_ld_hidden="no"
13999 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
14000 gcc_cv_ld_hidden=no
c72931a6 14001 fi
8ada417f 14002 fi
789b7de5 14003 fi
8ada417f 14004 else
28690784 14005 case "${target}" in
b0fd7d27 14006 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
14007 gcc_cv_ld_hidden=yes
14008 ;;
14009 *)
14010 gcc_cv_ld_hidden=no
14011 ;;
14012 esac
8ada417f
ZW
14013 fi
14014fi
6d07784a 14015fi
a3bba767
JJ
14016echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
14017echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 14018libgcc_visibility=no
ad9c4d9f 14019
232b67d9 14020
8e3940b2 14021if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 14022 libgcc_visibility=yes
ba479fd2
NN
14023
14024cat >>confdefs.h <<\_ACEOF
8ada417f 14025#define HAVE_GAS_HIDDEN 1
ba479fd2 14026_ACEOF
ad9c4d9f
NN
14027
14028fi
14029
8ada417f 14030# Check if we have .[us]leb128, and support symbol arithmetic with it.
a3bba767
JJ
14031echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
14032echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
ba479fd2
NN
14033if test "${gcc_cv_as_leb128+set}" = set; then
14034 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14035else
14036 gcc_cv_as_leb128=no
14037 if test $in_tree_gas = yes; then
14038 if test $in_tree_gas_is_elf = yes \
14039 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14040 then gcc_cv_as_leb128=yes
14041fi
14042 elif test x$gcc_cv_as != x; then
6e3f3080 14043 echo ' .data
b7460f24
RH
14044 .uleb128 L2 - L1
14045L1:
14046 .uleb128 1280
14047 .sleb128 -1010
8ada417f 14048L2:' > conftest.s
ba479fd2
NN
14049 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14051 (eval $ac_try) 2>&5
14052 ac_status=$?
14053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14054 (exit $ac_status); }; }
8ada417f
ZW
14055 then
14056 # GAS versions before 2.11 do not support uleb128,
14057 # despite appearing to.
14058 # ??? There exists an elf-specific test that will crash
14059 # the assembler. Perhaps it's better to figure out whether
14060 # arbitrary sections are supported and try the test.
bace148a 14061 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
14062 if echo "$as_ver" | grep GNU > /dev/null; then
14063 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
14064 as_major=`echo $as_ver | sed 's/\..*//'`
14065 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
14066 if test $as_major -eq 2 && test $as_minor -lt 11
14067 then :
14068 else gcc_cv_as_leb128=yes
14069 fi
14070 fi
14071 else
14072 echo "configure: failed program was" >&5
14073 cat conftest.s >&5
14074 fi
14075 rm -f conftest.o conftest.s
14076 fi
b7460f24 14077fi
a3bba767
JJ
14078echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
14079echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 14080if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
14081
14082cat >>confdefs.h <<\_ACEOF
b7460f24 14083#define HAVE_AS_LEB128 1
ba479fd2 14084_ACEOF
b7460f24
RH
14085
14086fi
ad9c4d9f 14087
8ada417f
ZW
14088# GAS versions up to and including 2.11.0 may mis-optimize
14089# .eh_frame data.
a3bba767
JJ
14090echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
14091echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
ba479fd2
NN
14092if test "${gcc_cv_as_eh_frame+set}" = set; then
14093 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14094else
14095 gcc_cv_as_eh_frame=no
14096 if test $in_tree_gas = yes; then
14097 if test $in_tree_gas_is_elf = yes \
14098 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14099 then gcc_cv_as_eh_frame=yes
ad9c4d9f 14100fi
8ada417f 14101 elif test x$gcc_cv_as != x; then
6e3f3080 14102 echo ' .text
c64688ae
RH
14103.LFB1:
14104 .4byte 0
14105.L1:
14106 .4byte 0
14107.LFE1:
14108 .section .eh_frame,"aw",@progbits
14109__FRAME_BEGIN__:
14110 .4byte .LECIE1-.LSCIE1
14111.LSCIE1:
14112 .4byte 0x0
14113 .byte 0x1
14114 .ascii "z\0"
14115 .byte 0x1
14116 .byte 0x78
14117 .byte 0x1a
14118 .byte 0x0
14119 .byte 0x4
14120 .4byte 1
14121 .p2align 1
14122.LECIE1:
14123.LSFDE1:
14124 .4byte .LEFDE1-.LASFDE1
14125.LASFDE1:
14126 .4byte .LASFDE1-__FRAME_BEGIN__
14127 .4byte .LFB1
14128 .4byte .LFE1-.LFB1
14129 .byte 0x4
14130 .4byte .LFE1-.LFB1
14131 .byte 0x4
14132 .4byte .L1-.LFB1
8ada417f 14133.LEFDE1:' > conftest.s
ba479fd2
NN
14134 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14136 (eval $ac_try) 2>&5
14137 ac_status=$?
14138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14139 (exit $ac_status); }; }
8ada417f
ZW
14140 then
14141 cat > conftest.lit <<EOF
c64688ae
RH
14142 0000 10000000 00000000 017a0001 781a0004 .........z..x...
14143 0010 01000000 12000000 18000000 00000000 ................
093e61a6 14144 0020 08000000 04080000 0044 .........D
01efb963 14145EOF
ba479fd2 14146cat > conftest.big <<EOF
01efb963
AS
14147 0000 00000010 00000000 017a0001 781a0004 .........z..x...
14148 0010 00000001 00000012 00000018 00000000 ................
093e61a6 14149 0020 00000008 04000000 0844 .........D
c64688ae 14150EOF
8ada417f
ZW
14151 # If the assembler didn't choke, and we can objdump,
14152 # and we got the correct data, then succeed.
dbc02e7f
AS
14153 # The text in the here-document typically retains its unix-style line
14154 # endings, while the output of objdump will use host line endings.
14155 # Therefore, use diff -b for the comparisons.
8ada417f
ZW
14156 if test x$gcc_cv_objdump != x \
14157 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
14158 | tail -3 > conftest.got \
dbc02e7f
AS
14159 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
14160 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
8ada417f
ZW
14161 then
14162 gcc_cv_as_eh_frame=yes
ba479fd2
NN
14163 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
14164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14165 (eval $ac_try) 2>&5
14166 ac_status=$?
14167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14168 (exit $ac_status); }; }; then
8ada417f
ZW
14169 gcc_cv_as_eh_frame=buggy
14170 else
14171 # Uh oh, what do we do now?
14172 gcc_cv_as_eh_frame=no
14173 fi
14174 else
14175 echo "configure: failed program was" >&5
14176 cat conftest.s >&5
14177 fi
14178 rm -f conftest.o conftest.s
14179 fi
c64688ae 14180fi
a3bba767
JJ
14181echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
14182echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 14183
6e3f3080 14184
63cf211a 14185if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
14186
14187cat >>confdefs.h <<\_ACEOF
8ada417f 14188#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 14189_ACEOF
ad9c4d9f
NN
14190
14191fi
14192
a3bba767
JJ
14193echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14194echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
ba479fd2
NN
14195if test "${gcc_cv_as_shf_merge+set}" = set; then
14196 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14197else
14198 gcc_cv_as_shf_merge=no
14199 if test $in_tree_gas = yes; then
14200 if test $in_tree_gas_is_elf = yes \
14201 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14202 then gcc_cv_as_shf_merge=yes
14203fi
14204 elif test x$gcc_cv_as != x; then
6e3f3080 14205 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
14206 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14208 (eval $ac_try) 2>&5
14209 ac_status=$?
14210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14211 (exit $ac_status); }; }
8ada417f
ZW
14212 then
14213 gcc_cv_as_shf_merge=yes
14214 else
14215 echo "configure: failed program was" >&5
14216 cat conftest.s >&5
14217 fi
14218 rm -f conftest.o conftest.s
14219 fi
201556f0 14220fi
a3bba767
JJ
14221echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14222echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 14223
c18a5b6c 14224if test $gcc_cv_as_shf_merge = no; then
a3bba767
JJ
14225 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14226echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
c18a5b6c
MM
14227if test "${gcc_cv_as_shf_merge+set}" = set; then
14228 echo $ECHO_N "(cached) $ECHO_C" >&6
14229else
14230 gcc_cv_as_shf_merge=no
14231 if test $in_tree_gas = yes; then
14232 if test $in_tree_gas_is_elf = yes \
14233 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14234 then gcc_cv_as_shf_merge=yes
14235fi
14236 elif test x$gcc_cv_as != x; then
14237 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
14238 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14240 (eval $ac_try) 2>&5
14241 ac_status=$?
14242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14243 (exit $ac_status); }; }
14244 then
14245 gcc_cv_as_shf_merge=yes
14246 else
14247 echo "configure: failed program was" >&5
14248 cat conftest.s >&5
14249 fi
14250 rm -f conftest.o conftest.s
14251 fi
14252fi
a3bba767
JJ
14253echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14254echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
c18a5b6c
MM
14255
14256fi
8ad9fb33 14257
ba479fd2 14258cat >>confdefs.h <<_ACEOF
8ad9fb33 14259#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 14260_ACEOF
201556f0 14261
201556f0 14262
a3bba767
JJ
14263echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14264echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
14265if test "${gcc_cv_as_comdat_group+set}" = set; then
14266 echo $ECHO_N "(cached) $ECHO_C" >&6
14267else
14268 gcc_cv_as_comdat_group=no
14269 if test $in_tree_gas = yes; then
14270 if test $in_tree_gas_is_elf = yes \
11176d2a 14271 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14272 then gcc_cv_as_comdat_group=yes
14273fi
14274 elif test x$gcc_cv_as != x; then
14275 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
14276 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14278 (eval $ac_try) 2>&5
14279 ac_status=$?
14280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14281 (exit $ac_status); }; }
14282 then
14283 gcc_cv_as_comdat_group=yes
14284 else
14285 echo "configure: failed program was" >&5
14286 cat conftest.s >&5
14287 fi
14288 rm -f conftest.o conftest.s
14289 fi
14290fi
a3bba767
JJ
14291echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
14292echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
c18a5b6c
MM
14293
14294if test $gcc_cv_as_comdat_group = yes; then
14295 gcc_cv_as_comdat_group_percent=no
14296else
a3bba767
JJ
14297 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14298echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
14299if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
14300 echo $ECHO_N "(cached) $ECHO_C" >&6
14301else
14302 gcc_cv_as_comdat_group_percent=no
14303 if test $in_tree_gas = yes; then
14304 if test $in_tree_gas_is_elf = yes \
11176d2a 14305 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14306 then gcc_cv_as_comdat_group_percent=yes
14307fi
14308 elif test x$gcc_cv_as != x; then
14309 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
14310 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14312 (eval $ac_try) 2>&5
14313 ac_status=$?
14314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14315 (exit $ac_status); }; }
14316 then
14317 gcc_cv_as_comdat_group_percent=yes
14318 else
14319 echo "configure: failed program was" >&5
14320 cat conftest.s >&5
14321 fi
14322 rm -f conftest.o conftest.s
14323 fi
14324fi
a3bba767
JJ
14325echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
14326echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
c18a5b6c
MM
14327
14328fi
11176d2a
JB
14329if test $in_tree_ld != yes && test x"$ld_vers" != x; then
14330 comdat_group=yes
14331 if test 0"$ld_date" -lt 20050308; then
14332 if test -n "$ld_date"; then
14333 # If there was date string, but was earlier than 2005-03-08, fail
14334 comdat_group=no
14335 elif test "$ld_vers_major" -lt 2; then
14336 comdat_group=no
14337 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
14338 comdat_group=no
14339 fi
14340 fi
1cf0118d
RO
14341else
14342 # assume linkers other than GNU ld don't support COMDAT group
14343 comdat_group=no
14344fi
14345if test $comdat_group = no; then
14346 gcc_cv_as_comdat_group=no
14347 gcc_cv_as_comdat_group_percent=no
11176d2a 14348fi
c18a5b6c
MM
14349
14350cat >>confdefs.h <<_ACEOF
11176d2a 14351#define HAVE_COMDAT_GROUP `if test $gcc_cv_as_comdat_group = yes || test $gcc_cv_as_comdat_group_percent = yes; then echo 1; else echo 0; fi`
c18a5b6c
MM
14352_ACEOF
14353
14354
8ada417f 14355# Thread-local storage - the check is heavily parametrized.
f996902d
RH
14356conftest_s=
14357tls_first_major=
14358tls_first_minor=
9739c90c 14359tls_as_opt=
f996902d 14360case "$target" in
6f9b006d
RH
14361 alpha*-*-*)
14362 conftest_s='
14363 .section ".tdata","awT",@progbits
14364foo: .long 25
14365 .text
14366 ldq $27,__tls_get_addr($29) !literal!1
14367 lda $16,foo($29) !tlsgd!1
14368 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
14369 ldq $27,__tls_get_addr($29) !literal!2
14370 lda $16,foo($29) !tlsldm!2
14371 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
14372 ldq $1,foo($29) !gotdtprel
14373 ldah $2,foo($29) !dtprelhi
14374 lda $3,foo($2) !dtprello
14375 lda $4,foo($29) !dtprel
14376 ldq $1,foo($29) !gottprel
14377 ldah $2,foo($29) !tprelhi
14378 lda $3,foo($2) !tprello
14379 lda $4,foo($29) !tprel'
14380 tls_first_major=2
14381 tls_first_minor=13
2f3321ca 14382 tls_as_opt=--fatal-warnings
6f9b006d 14383 ;;
e4dd71de
AH
14384 frv*-*-*)
14385 conftest_s='
14386 .section ".tdata","awT",@progbits
14387x: .long 25
14388 .text
14389 call #gettlsoff(x)'
14390 tls_first_major=2
14391 tls_first_minor=14
14392 ;;
51076f96
RC
14393 hppa*-*-linux*)
14394 conftest_s='
14395t1: .reg %r20
14396t2: .reg %r21
14397gp: .reg %r19
14398 .section ".tdata","awT",@progbits
14399foo: .long 25
14400 .text
14401 .align 4
14402 addil LT%foo-$tls_gdidx$,gp
14403 ldo RT%foo-$tls_gdidx$(%r1),%arg0
14404 b __tls_get_addr
14405 nop
14406 addil LT%foo-$tls_ldidx$,gp
14407 b __tls_get_addr
14408 ldo RT%foo-$tls_ldidx$(%r1),%arg0
14409 addil LR%foo-$tls_dtpoff$,%ret0
14410 ldo RR%foo-$tls_dtpoff$(%r1),%t1
14411 mfctl %cr27,%t1
14412 addil LT%foo-$tls_ieoff$,gp
14413 ldw RT%foo-$tls_ieoff$(%r1),%t2
14414 add %t1,%t2,%t3
14415 mfctl %cr27,%t1
14416 addil LR%foo-$tls_leoff$,%t1
14417 ldo RR%foo-$tls_leoff$(%r1),%t2'
14418 tls_first_major=2
14419 tls_first_minor=15
14420 tls_as_opt=--fatal-warnings
14421 ;;
d3585b76
DJ
14422 arm*-*-*)
14423 conftest_s='
14424 .section ".tdata","awT",%progbits
14425foo: .long 25
14426 .text
14427.word foo(gottpoff)
14428.word foo(tpoff)
14429.word foo(tlsgd)
14430.word foo(tlsldm)
14431.word foo(tlsldo)'
14432 tls_first_major=2
14433 tls_first_minor=17
14434 ;;
f996902d
RH
14435 i[34567]86-*-*)
14436 conftest_s='
14437 .section ".tdata","awT",@progbits
14438foo: .long 25
14439 .text
14440 movl %gs:0, %eax
14441 leal foo@TLSGD(,%ebx,1), %eax
14442 leal foo@TLSLDM(%ebx), %eax
14443 leal foo@DTPOFF(%eax), %edx
14444 movl foo@GOTTPOFF(%ebx), %eax
14445 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
14446 addl foo@GOTNTPOFF(%ebx), %eax
14447 movl foo@INDNTPOFF, %eax
f996902d
RH
14448 movl $foo@TPOFF, %eax
14449 subl $foo@TPOFF, %eax
14450 leal foo@NTPOFF(%ecx), %eax'
14451 tls_first_major=2
75d38379 14452 tls_first_minor=14
2f3321ca 14453 tls_as_opt=--fatal-warnings
75d38379
JJ
14454 ;;
14455 x86_64-*-*)
14456 conftest_s='
14457 .section ".tdata","awT",@progbits
14458foo: .long 25
14459 .text
14460 movq %fs:0, %rax
14461 leaq foo@TLSGD(%rip), %rdi
14462 leaq foo@TLSLD(%rip), %rdi
14463 leaq foo@DTPOFF(%rax), %rdx
14464 movq foo@GOTTPOFF(%rip), %rax
14465 movq $foo@TPOFF, %rax'
14466 tls_first_major=2
14467 tls_first_minor=14
2f3321ca 14468 tls_as_opt=--fatal-warnings
f996902d 14469 ;;
7b6e506e
RH
14470 ia64-*-*)
14471 conftest_s='
14472 .section ".tdata","awT",@progbits
14473foo: data8 25
14474 .text
14475 addl r16 = @ltoff(@dtpmod(foo#)), gp
14476 addl r17 = @ltoff(@dtprel(foo#)), gp
14477 addl r18 = @ltoff(@tprel(foo#)), gp
14478 addl r19 = @dtprel(foo#), gp
14479 adds r21 = @dtprel(foo#), r13
14480 movl r23 = @dtprel(foo#)
14481 addl r20 = @tprel(foo#), gp
14482 adds r22 = @tprel(foo#), r13
14483 movl r24 = @tprel(foo#)'
14484 tls_first_major=2
14485 tls_first_minor=13
2f3321ca 14486 tls_as_opt=--fatal-warnings
7b6e506e 14487 ;;
69229b81
DJ
14488 mips*-*-*)
14489 conftest_s='
14490 .section .tdata,"awT",@progbits
14491x:
14492 .word 2
14493 .text
14494 addiu $4, $28, %tlsgd(x)
14495 addiu $4, $28, %tlsldm(x)
14496 lui $4, %dtprel_hi(x)
14497 addiu $4, $4, %dtprel_lo(x)
14498 lw $4, %gottprel(x)($28)
14499 lui $4, %tprel_hi(x)
14500 addiu $4, $4, %tprel_lo(x)'
14501 tls_first_major=2
14502 tls_first_minor=16
14503 tls_as_opt='-32 --fatal-warnings'
14504 ;;
c4501e62
JJ
14505 powerpc-*-*)
14506 conftest_s='
14507 .section ".tdata","awT",@progbits
14508 .align 2
14509ld0: .space 4
14510ld1: .space 4
14511x1: .space 4
14512x2: .space 4
14513x3: .space 4
14514 .text
14515 addi 3,31,ld0@got@tlsgd
14516 bl __tls_get_addr
14517 addi 3,31,x1@got@tlsld
14518 bl __tls_get_addr
14519 addi 9,3,x1@dtprel
14520 addis 9,3,x2@dtprel@ha
14521 addi 9,9,x2@dtprel@l
14522 lwz 9,x3@got@tprel(31)
14523 add 9,9,x@tls
14524 addi 9,2,x1@tprel
14525 addis 9,2,x2@tprel@ha
14526 addi 9,9,x2@tprel@l'
14527 tls_first_major=2
14528 tls_first_minor=14
2f3321ca 14529 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
14530 ;;
14531 powerpc64-*-*)
14532 conftest_s='
14533 .section ".tdata","awT",@progbits
14534 .align 3
14535ld0: .space 8
14536ld1: .space 8
14537x1: .space 8
14538x2: .space 8
14539x3: .space 8
14540 .text
14541 addi 3,2,ld0@got@tlsgd
14542 bl .__tls_get_addr
14543 nop
14544 addi 3,2,ld1@toc
14545 bl .__tls_get_addr
14546 nop
14547 addi 3,2,x1@got@tlsld
14548 bl .__tls_get_addr
14549 nop
14550 addi 9,3,x1@dtprel
14551 bl .__tls_get_addr
14552 nop
14553 addis 9,3,x2@dtprel@ha
14554 addi 9,9,x2@dtprel@l
14555 bl .__tls_get_addr
14556 nop
14557 ld 9,x3@got@dtprel(2)
14558 add 9,9,3
14559 bl .__tls_get_addr
14560 nop'
14561 tls_first_major=2
14562 tls_first_minor=14
2f3321ca 14563 tls_as_opt="-a64 --fatal-warnings"
c4501e62 14564 ;;
fd3cd001
UW
14565 s390-*-*)
14566 conftest_s='
14567 .section ".tdata","awT",@progbits
14568foo: .long 25
14569 .text
14570 .long foo@TLSGD
14571 .long foo@TLSLDM
14572 .long foo@DTPOFF
14573 .long foo@NTPOFF
14574 .long foo@GOTNTPOFF
14575 .long foo@INDNTPOFF
14576 l %r1,foo@GOTNTPOFF(%r12)
14577 l %r1,0(%r1):tls_load:foo
14578 bas %r14,0(%r1,%r13):tls_gdcall:foo
14579 bas %r14,0(%r1,%r13):tls_ldcall:foo'
14580 tls_first_major=2
14581 tls_first_minor=14
2f3321ca 14582 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
14583 ;;
14584 s390x-*-*)
14585 conftest_s='
14586 .section ".tdata","awT",@progbits
14587foo: .long 25
14588 .text
14589 .quad foo@TLSGD
14590 .quad foo@TLSLDM
14591 .quad foo@DTPOFF
14592 .quad foo@NTPOFF
14593 .quad foo@GOTNTPOFF
14594 lg %r1,foo@GOTNTPOFF(%r12)
14595 larl %r1,foo@INDNTPOFF
14596 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
14597 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
14598 tls_first_major=2
14599 tls_first_minor=14
2f3321ca 14600 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 14601 ;;
9ff13962
KK
14602 sh-*-* | sh[34]-*-*)
14603 conftest_s='
14604 .section ".tdata","awT",@progbits
14605foo: .long 25
14606 .text
14607 .long foo@TLSGD
14608 .long foo@TLSLDM
14609 .long foo@DTPOFF
14610 .long foo@GOTTPOFF
14611 .long foo@TPOFF'
14612 tls_first_major=2
14613 tls_first_minor=13
2f3321ca 14614 tls_as_opt=--fatal-warnings
9ff13962 14615 ;;
5751a10b 14616 sparc*-*-*)
2f3321ca 14617 case "$target" in
7935dc1b
EB
14618 sparc*-sun-solaris2.[56789]*)
14619 # TLS was introduced in the Solaris 9 4/04 release but
14620 # we do not enable it by default on Solaris 9 either.
14621 if test "x$enable_tls" = xyes ; then
14622 on_solaris=yes
14623 else
14624 enable_tls=no;
14625 fi
14626 ;;
2f3321ca
EB
14627 sparc*-sun-solaris2.*)
14628 on_solaris=yes
14629 ;;
14630 *)
14631 on_solaris=no
14632 ;;
14633 esac
14634 if test x$on_solaris = xyes && test x$gas_flag = xno; then
14635 conftest_s='
14636 .section ".tdata",#alloc,#write,#tls
14637foo: .long 25
14638 .text
14639 sethi %tgd_hi22(foo), %o0
14640 add %o0, %tgd_lo10(foo), %o1
14641 add %l7, %o1, %o0, %tgd_add(foo)
14642 call __tls_get_addr, %tgd_call(foo)
14643 sethi %tldm_hi22(foo), %l1
14644 add %l1, %tldm_lo10(foo), %l2
14645 add %l7, %l2, %o0, %tldm_add(foo)
14646 call __tls_get_addr, %tldm_call(foo)
14647 sethi %tldo_hix22(foo), %l3
14648 xor %l3, %tldo_lox10(foo), %l4
14649 add %o0, %l4, %l5, %tldo_add(foo)
14650 sethi %tie_hi22(foo), %o3
14651 add %o3, %tie_lo10(foo), %o3
14652 ld [%l7 + %o3], %o2, %tie_ld(foo)
14653 add %g7, %o2, %o4, %tie_add(foo)
14654 sethi %tle_hix22(foo), %l1
14655 xor %l1, %tle_lox10(foo), %o5
14656 ld [%g7 + %o5], %o1'
14657 tls_first_major=0
14658 tls_first_minor=0
14659 else
14660 conftest_s='
5751a10b
JJ
14661 .section ".tdata","awT",@progbits
14662foo: .long 25
14663 .text
14664 sethi %tgd_hi22(foo), %o0
14665 add %o0, %tgd_lo10(foo), %o1
14666 add %l7, %o1, %o0, %tgd_add(foo)
14667 call __tls_get_addr, %tgd_call(foo)
14668 sethi %tldm_hi22(foo), %l1
14669 add %l1, %tldm_lo10(foo), %l2
14670 add %l7, %l2, %o0, %tldm_add(foo)
14671 call __tls_get_addr, %tldm_call(foo)
14672 sethi %tldo_hix22(foo), %l3
14673 xor %l3, %tldo_lox10(foo), %l4
14674 add %o0, %l4, %l5, %tldo_add(foo)
14675 sethi %tie_hi22(foo), %o3
14676 add %o3, %tie_lo10(foo), %o3
14677 ld [%l7 + %o3], %o2, %tie_ld(foo)
14678 add %g7, %o2, %o4, %tie_add(foo)
14679 sethi %tle_hix22(foo), %l1
14680 xor %l1, %tle_lox10(foo), %o5
14681 ld [%g7 + %o5], %o1'
14682 tls_first_major=2
14683 tls_first_minor=14
2f3321ca
EB
14684 tls_as_opt="-32 --fatal-warnings"
14685 fi
5751a10b 14686 ;;
f996902d 14687esac
8dea1cca
DD
14688set_have_as_tls=no
14689if test "x$enable_tls" = xno ; then
14690 : # TLS explicitly disabled.
14691elif test "x$enable_tls" = xyes ; then
14692 set_have_as_tls=yes # TLS explicitly enabled.
14693elif test -z "$tls_first_major"; then
8ada417f
ZW
14694 : # If we don't have a check, assume no support.
14695else
a3bba767
JJ
14696 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
14697echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
ba479fd2
NN
14698if test "${gcc_cv_as_tls+set}" = set; then
14699 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14700else
14701 gcc_cv_as_tls=no
14702 if test $in_tree_gas = yes; then
14703 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
14704 then gcc_cv_as_tls=yes
ad9c4d9f 14705fi
8ada417f 14706 elif test x$gcc_cv_as != x; then
6e3f3080 14707 echo "$conftest_s" > conftest.s
2f3321ca 14708 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
14709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14710 (eval $ac_try) 2>&5
14711 ac_status=$?
14712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14713 (exit $ac_status); }; }
8ada417f
ZW
14714 then
14715 gcc_cv_as_tls=yes
14716 else
14717 echo "configure: failed program was" >&5
14718 cat conftest.s >&5
14719 fi
14720 rm -f conftest.o conftest.s
f996902d 14721 fi
f996902d 14722fi
a3bba767
JJ
14723echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
14724echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 14725if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
14726 set_have_as_tls=yes
14727fi
14728fi
14729if test $set_have_as_tls = yes ; then
ba479fd2
NN
14730
14731cat >>confdefs.h <<\_ACEOF
f996902d 14732#define HAVE_AS_TLS 1
ba479fd2 14733_ACEOF
f996902d 14734
8ada417f
ZW
14735fi
14736
14737# Target-specific assembler checks.
f996902d 14738
a3bba767
JJ
14739echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
14740echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
7e9d8517
L
14741gcc_cv_ld_static_dynamic=no
14742if test $in_tree_ld = yes ; then
14743 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
14744 gcc_cv_ld_static_dynamic=yes
14745 fi
14746elif test x$gcc_cv_ld != x; then
14747 # Check if linker supports -Bstatic/-Bdynamic option
14748 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
14749 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
14750 gcc_cv_ld_static_dynamic=yes
14751 fi
14752fi
14753if test x"$gcc_cv_ld_static_dynamic" = xyes; then
14754
14755cat >>confdefs.h <<\_ACEOF
14756#define HAVE_LD_STATIC_DYNAMIC 1
14757_ACEOF
14758
14759fi
a3bba767
JJ
14760echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14761echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
7e9d8517 14762
d594623a 14763if test x"$demangler_in_ld" = xyes; then
a3bba767
JJ
14764 echo "$as_me:$LINENO: checking linker --demangle support" >&5
14765echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
d594623a
L
14766 gcc_cv_ld_demangle=no
14767 if test $in_tree_ld = yes; then
14768 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 \
14769 gcc_cv_ld_demangle=yes
14770 fi
14771 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14772 # Check if the GNU linker supports --demangle option
14773 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14774 gcc_cv_ld_demangle=yes
14775 fi
14776 fi
14777 if test x"$gcc_cv_ld_demangle" = xyes; then
14778
14779cat >>confdefs.h <<\_ACEOF
14780#define HAVE_LD_DEMANGLE 1
14781_ACEOF
14782
14783 fi
a3bba767
JJ
14784 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14785echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
d594623a
L
14786fi
14787
3a37b08e
RH
14788case "$target" in
14789 # All TARGET_ABI_OSF targets.
14790 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
a3bba767
JJ
14791 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14792echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
14793if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14794 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 14795else
8ada417f
ZW
14796 gcc_cv_as_alpha_explicit_relocs=no
14797 if test $in_tree_gas = yes; then
14798 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14799 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 14800fi
8ada417f 14801 elif test x$gcc_cv_as != x; then
6e3f3080 14802 echo ' .set nomacro
3a37b08e
RH
14803 .text
14804 extbl $3, $2, $3 !lituse_bytoff!1
14805 ldq $2, a($29) !literal!1
14806 ldq $4, b($29) !literal!2
14807 ldq_u $3, 0($2) !lituse_base!1
14808 ldq $27, f($29) !literal!5
14809 jsr $26, ($27), f !lituse_jsr!5
14810 ldah $29, 0($26) !gpdisp!3
14811 lda $0, c($29) !gprel
14812 ldah $1, d($29) !gprelhigh
14813 lda $1, d($1) !gprellow
8ada417f 14814 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
14815 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14817 (eval $ac_try) 2>&5
14818 ac_status=$?
14819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14820 (exit $ac_status); }; }
8ada417f
ZW
14821 then
14822 gcc_cv_as_alpha_explicit_relocs=yes
14823 else
14824 echo "configure: failed program was" >&5
14825 cat conftest.s >&5
14826 fi
14827 rm -f conftest.o conftest.s
14828 fi
cafe096b 14829fi
a3bba767
JJ
14830echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14831echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 14832if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
14833
14834cat >>confdefs.h <<\_ACEOF
3a37b08e 14835#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 14836_ACEOF
3a37b08e 14837
d006f5eb 14838fi
a3bba767
JJ
14839 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
14840echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
d006f5eb
RH
14841if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
14842 echo $ECHO_N "(cached) $ECHO_C" >&6
14843else
14844 gcc_cv_as_alpha_jsrdirect_relocs=no
14845 if test $in_tree_gas = yes; then
14846 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
14847 then gcc_cv_as_alpha_jsrdirect_relocs=yes
14848fi
14849 elif test x$gcc_cv_as != x; then
14850 echo ' .set nomacro
14851 .text
14852 ldq $27, a($29) !literal!1
14853 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
14854 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14856 (eval $ac_try) 2>&5
14857 ac_status=$?
14858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14859 (exit $ac_status); }; }
14860 then
14861 gcc_cv_as_alpha_jsrdirect_relocs=yes
14862 else
14863 echo "configure: failed program was" >&5
14864 cat conftest.s >&5
14865 fi
14866 rm -f conftest.o conftest.s
14867 fi
14868fi
a3bba767
JJ
14869echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
14870echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
d006f5eb
RH
14871if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
14872
14873cat >>confdefs.h <<\_ACEOF
14874#define HAVE_AS_JSRDIRECT_RELOCS 1
14875_ACEOF
14876
86da66b5
HPN
14877fi
14878 ;;
14879
14880 cris-*-*)
a3bba767
JJ
14881 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14882echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
86da66b5
HPN
14883if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14884 echo $ECHO_N "(cached) $ECHO_C" >&6
14885else
14886 gcc_cv_as_cris_no_mul_bug=no
14887 if test $in_tree_gas = yes; then
14888 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14889 then gcc_cv_as_cris_no_mul_bug=yes
14890fi
14891 elif test x$gcc_cv_as != x; then
14892 echo '.text' > conftest.s
14893 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14895 (eval $ac_try) 2>&5
14896 ac_status=$?
14897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14898 (exit $ac_status); }; }
14899 then
14900 gcc_cv_as_cris_no_mul_bug=yes
14901 else
14902 echo "configure: failed program was" >&5
14903 cat conftest.s >&5
14904 fi
14905 rm -f conftest.o conftest.s
14906 fi
14907fi
a3bba767
JJ
14908echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14909echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
86da66b5
HPN
14910if test $gcc_cv_as_cris_no_mul_bug = yes; then
14911
14912cat >>confdefs.h <<\_ACEOF
14913#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14914_ACEOF
14915
8ada417f 14916fi
3a37b08e 14917 ;;
8ada417f 14918
1cb36a98 14919 sparc*-*-*)
a3bba767
JJ
14920 echo "$as_me:$LINENO: checking assembler for .register" >&5
14921echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
ba479fd2
NN
14922if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14923 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14924else
8ada417f
ZW
14925 gcc_cv_as_sparc_register_op=no
14926 if test x$gcc_cv_as != x; then
6e3f3080 14927 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
14928 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14930 (eval $ac_try) 2>&5
14931 ac_status=$?
14932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14933 (exit $ac_status); }; }
8ada417f
ZW
14934 then
14935 gcc_cv_as_sparc_register_op=yes
14936 else
14937 echo "configure: failed program was" >&5
14938 cat conftest.s >&5
14939 fi
14940 rm -f conftest.o conftest.s
14941 fi
cafe096b 14942fi
a3bba767
JJ
14943echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
14944echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 14945if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
14946
14947cat >>confdefs.h <<\_ACEOF
1cb36a98 14948#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 14949_ACEOF
1cb36a98 14950
8ada417f 14951fi
1cb36a98 14952
a3bba767
JJ
14953 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
14954echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
ba479fd2
NN
14955if test "${gcc_cv_as_sparc_relax+set}" = set; then
14956 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 14957else
8ada417f
ZW
14958 gcc_cv_as_sparc_relax=no
14959 if test x$gcc_cv_as != x; then
6e3f3080 14960 echo '.text' > conftest.s
ba479fd2
NN
14961 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
14962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14963 (eval $ac_try) 2>&5
14964 ac_status=$?
14965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14966 (exit $ac_status); }; }
8ada417f
ZW
14967 then
14968 gcc_cv_as_sparc_relax=yes
14969 else
14970 echo "configure: failed program was" >&5
14971 cat conftest.s >&5
14972 fi
14973 rm -f conftest.o conftest.s
14974 fi
cafe096b 14975fi
a3bba767
JJ
14976echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
14977echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 14978if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
14979
14980cat >>confdefs.h <<\_ACEOF
e95b1e6a 14981#define HAVE_AS_RELAX_OPTION 1
ba479fd2 14982_ACEOF
e95b1e6a 14983
8ada417f 14984fi
e95b1e6a 14985
a3bba767
JJ
14986 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
14987echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
ba479fd2
NN
14988if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
14989 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 14990else
8ada417f
ZW
14991 gcc_cv_as_sparc_ua_pcrel=no
14992 if test x$gcc_cv_as != x; then
6e3f3080 14993 echo '.text
8ada417f
ZW
14994foo:
14995 nop
14996.data
14997.align 4
14998.byte 0
14999.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
15000 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
15001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15002 (eval $ac_try) 2>&5
15003 ac_status=$?
15004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15005 (exit $ac_status); }; }
8ada417f
ZW
15006 then
15007 if test x$gcc_cv_ld != x \
15008 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
15009 gcc_cv_as_sparc_ua_pcrel=yes
15010 fi
15011 rm -f conftest
15012 else
15013 echo "configure: failed program was" >&5
15014 cat conftest.s >&5
15015 fi
15016 rm -f conftest.o conftest.s
15017 fi
cafe096b 15018fi
a3bba767
JJ
15019echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
15020echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 15021if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
15022
15023cat >>confdefs.h <<\_ACEOF
17e9e88c 15024#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 15025_ACEOF
17e9e88c 15026
17e9e88c 15027
a3bba767
JJ
15028 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
15029echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
ba479fd2
NN
15030if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
15031 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 15032else
8ada417f
ZW
15033 gcc_cv_as_sparc_ua_pcrel_hidden=no
15034 if test x$gcc_cv_as != x; then
6e3f3080 15035 echo '.data
8ada417f
ZW
15036.align 4
15037.byte 0x31
15038.uaword %r_disp32(foo)
15039.byte 0x32, 0x33, 0x34
15040.global foo
15041.hidden foo
15042foo:
15043.skip 4' > conftest.s
ba479fd2
NN
15044 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
15045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15046 (eval $ac_try) 2>&5
15047 ac_status=$?
15048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15049 (exit $ac_status); }; }
8ada417f
ZW
15050 then
15051 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
15052 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
15053 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
15054 | grep ' 31000000 07323334' > /dev/null 2>&1; then
15055 if $gcc_cv_objdump -R conftest 2> /dev/null \
15056 | grep 'DISP32' > /dev/null 2>&1; then
15057 :
15058 else
15059 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 15060 fi
8ada417f
ZW
15061 fi
15062 rm -f conftest
15063 else
15064 echo "configure: failed program was" >&5
15065 cat conftest.s >&5
15066 fi
15067 rm -f conftest.o conftest.s
15068 fi
cafe096b 15069fi
a3bba767
JJ
15070echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
15071echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 15072if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
15073
15074cat >>confdefs.h <<\_ACEOF
cf7b8b0d 15075#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 15076_ACEOF
cf7b8b0d 15077
8ada417f 15078fi
ba479fd2 15079
8ada417f 15080fi # unaligned pcrel relocs
cf7b8b0d 15081
a3bba767
JJ
15082 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
15083echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
ba479fd2
NN
15084if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
15085 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 15086else
8ada417f
ZW
15087 gcc_cv_as_sparc_offsetable_lo10=no
15088 if test x$gcc_cv_as != x; then
6e3f3080 15089 echo '.text
8ada417f
ZW
15090 or %g1, %lo(ab) + 12, %g1
15091 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
15092 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
15093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15094 (eval $ac_try) 2>&5
15095 ac_status=$?
15096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15097 (exit $ac_status); }; }
8ada417f
ZW
15098 then
15099 if test x$gcc_cv_objdump != x \
ecb0ccbc 15100 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 15101 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 15102 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
15103 fi
15104 else
15105 echo "configure: failed program was" >&5
15106 cat conftest.s >&5
15107 fi
15108 rm -f conftest.o conftest.s
15109 fi
cafe096b 15110fi
a3bba767
JJ
15111echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
15112echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 15113if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
15114
15115cat >>confdefs.h <<\_ACEOF
1cb36a98 15116#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 15117_ACEOF
1cb36a98 15118
8ada417f 15119fi
1cb36a98
RH
15120 ;;
15121
c307e6dd 15122 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
15123 case $target_os in
15124 cygwin* | pe | mingw32*)
15125 # Used for DWARF 2 in PE
a3bba767
JJ
15126 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
15127echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
d38bc601
BF
15128if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
15129 echo $ECHO_N "(cached) $ECHO_C" >&6
15130else
15131 gcc_cv_as_ix86_pe_secrel32=no
15132 if test $in_tree_gas = yes; then
15133 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
15134 then gcc_cv_as_ix86_pe_secrel32=yes
15135fi
15136 elif test x$gcc_cv_as != x; then
15137 echo '.text
15138foo: nop
15139.data
15140 .secrel32 foo' > conftest.s
15141 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15143 (eval $ac_try) 2>&5
15144 ac_status=$?
15145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15146 (exit $ac_status); }; }
15147 then
15148 if test x$gcc_cv_ld != x \
15149 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
15150 gcc_cv_as_ix86_pe_secrel32=yes
15151 fi
15152 rm -f conftest
15153 else
15154 echo "configure: failed program was" >&5
15155 cat conftest.s >&5
15156 fi
15157 rm -f conftest.o conftest.s
15158 fi
15159fi
a3bba767
JJ
15160echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
15161echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
d38bc601
BF
15162if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
15163
15164cat >>confdefs.h <<\_ACEOF
15165#define HAVE_GAS_PE_SECREL32_RELOC 1
15166_ACEOF
15167
15168fi
15169 ;;
15170 esac
15171
a3bba767
JJ
15172 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
15173echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
ba479fd2
NN
15174if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
15175 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15176else
15177 gcc_cv_as_ix86_filds_fists=no
15178 if test $in_tree_gas = yes; then
15179 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
15180 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 15181fi
8ada417f 15182 elif test x$gcc_cv_as != x; then
6e3f3080 15183 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
15184 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15186 (eval $ac_try) 2>&5
15187 ac_status=$?
15188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15189 (exit $ac_status); }; }
8ada417f
ZW
15190 then
15191 gcc_cv_as_ix86_filds_fists=yes
15192 else
15193 echo "configure: failed program was" >&5
15194 cat conftest.s >&5
981d4858 15195 fi
8ada417f
ZW
15196 rm -f conftest.o conftest.s
15197 fi
15198fi
a3bba767
JJ
15199echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
15200echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 15201if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
15202
15203cat >>confdefs.h <<\_ACEOF
8ada417f 15204#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 15205_ACEOF
ad9c4d9f 15206
f6f5dff2
RO
15207fi
15208
a3bba767
JJ
15209 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
15210echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
ba479fd2
NN
15211if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
15212 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
15213else
15214 gcc_cv_as_ix86_cmov_sun_syntax=no
15215 if test x$gcc_cv_as != x; then
6e3f3080 15216 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
15217 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15219 (eval $ac_try) 2>&5
15220 ac_status=$?
15221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15222 (exit $ac_status); }; }
f6f5dff2
RO
15223 then
15224 gcc_cv_as_ix86_cmov_sun_syntax=yes
15225 else
15226 echo "configure: failed program was" >&5
15227 cat conftest.s >&5
15228 fi
15229 rm -f conftest.o conftest.s
15230 fi
15231fi
a3bba767
JJ
15232echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
15233echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 15234if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
15235
15236cat >>confdefs.h <<\_ACEOF
f6f5dff2 15237#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 15238_ACEOF
f6f5dff2 15239
b6c03bcd
RS
15240fi
15241
a3bba767
JJ
15242 echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5
15243echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6
b6c03bcd
RS
15244if test "${gcc_cv_as_ix86_ffreep+set}" = set; then
15245 echo $ECHO_N "(cached) $ECHO_C" >&6
15246else
15247 gcc_cv_as_ix86_ffreep=no
15248 if test x$gcc_cv_as != x; then
15249 echo 'ffreep %st(1)' > conftest.s
15250 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15252 (eval $ac_try) 2>&5
15253 ac_status=$?
15254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15255 (exit $ac_status); }; }
15256 then
15257 gcc_cv_as_ix86_ffreep=yes
15258 else
15259 echo "configure: failed program was" >&5
15260 cat conftest.s >&5
15261 fi
15262 rm -f conftest.o conftest.s
15263 fi
15264fi
a3bba767
JJ
15265echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5
15266echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6
b6c03bcd
RS
15267if test $gcc_cv_as_ix86_ffreep = yes; then
15268
15269cat >>confdefs.h <<\_ACEOF
15270#define HAVE_AS_IX86_FFREEP 1
15271_ACEOF
15272
38ca3765
UB
15273fi
15274
a3bba767
JJ
15275 echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5
15276echo $ECHO_N "checking assembler for sahf mnemonic... $ECHO_C" >&6
38ca3765
UB
15277if test "${gcc_cv_as_ix86_sahf+set}" = set; then
15278 echo $ECHO_N "(cached) $ECHO_C" >&6
15279else
15280 gcc_cv_as_ix86_sahf=no
15281 if test x$gcc_cv_as != x; then
15282 echo 'sahf' > conftest.s
15283 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15285 (eval $ac_try) 2>&5
15286 ac_status=$?
15287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15288 (exit $ac_status); }; }
15289 then
15290 gcc_cv_as_ix86_sahf=yes
15291 else
15292 echo "configure: failed program was" >&5
15293 cat conftest.s >&5
15294 fi
15295 rm -f conftest.o conftest.s
15296 fi
15297fi
a3bba767
JJ
15298echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_sahf" >&5
15299echo "${ECHO_T}$gcc_cv_as_ix86_sahf" >&6
38ca3765
UB
15300if test $gcc_cv_as_ix86_sahf = yes; then
15301
15302cat >>confdefs.h <<\_ACEOF
15303#define HAVE_AS_IX86_SAHF 1
15304_ACEOF
15305
68b92f78
RS
15306fi
15307
a3bba767
JJ
15308 echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5
15309echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6
68b92f78
RS
15310if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then
15311 echo $ECHO_N "(cached) $ECHO_C" >&6
15312else
15313 gcc_cv_as_ix86_diff_sect_delta=no
15314 if test x$gcc_cv_as != x; then
15315 echo '.section .rodata
15316.L1:
15317 .long .L2-.L1
15318 .long .L3-.L1
15319 .text
15320.L3: nop
15321.L2: nop' > conftest.s
15322 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15324 (eval $ac_try) 2>&5
15325 ac_status=$?
15326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15327 (exit $ac_status); }; }
15328 then
15329 gcc_cv_as_ix86_diff_sect_delta=yes
15330 else
15331 echo "configure: failed program was" >&5
15332 cat conftest.s >&5
15333 fi
15334 rm -f conftest.o conftest.s
15335 fi
15336fi
a3bba767
JJ
15337echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
15338echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6
68b92f78
RS
15339if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
15340
15341cat >>confdefs.h <<\_ACEOF
15342#define HAVE_AS_IX86_DIFF_SECT_DELTA 1
15343_ACEOF
15344
ad9c4d9f
NN
15345fi
15346
6f3ca281
ZW
15347 # This one is used unconditionally by i386.[ch]; it is to be defined
15348 # to 1 if the feature is present, 0 otherwise.
a3bba767
JJ
15349 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
15350echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
ba479fd2
NN
15351if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
15352 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15353else
15354 gcc_cv_as_ix86_gotoff_in_data=no
15355 if test $in_tree_gas = yes; then
15356 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15357 then gcc_cv_as_ix86_gotoff_in_data=yes
15358fi
15359 elif test x$gcc_cv_as != x; then
6e3f3080 15360 echo ' .text
f88c65f7
RH
15361.L0:
15362 nop
15363 .data
8ada417f 15364 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
15365 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15367 (eval $ac_try) 2>&5
15368 ac_status=$?
15369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15370 (exit $ac_status); }; }
8ada417f
ZW
15371 then
15372 gcc_cv_as_ix86_gotoff_in_data=yes
15373 else
15374 echo "configure: failed program was" >&5
15375 cat conftest.s >&5
f88c65f7 15376 fi
8ada417f
ZW
15377 rm -f conftest.o conftest.s
15378 fi
15379fi
a3bba767
JJ
15380echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
15381echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 15382
6f3ca281 15383
ba479fd2 15384cat >>confdefs.h <<_ACEOF
6f3ca281 15385#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 15386_ACEOF
f88c65f7 15387
1cb36a98 15388 ;;
ef1ecf87
RH
15389
15390 ia64*-*-*)
a3bba767
JJ
15391 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
15392echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
ba479fd2
NN
15393if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
15394 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 15395else
8ada417f
ZW
15396 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
15397 if test $in_tree_gas = yes; then
15398 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15399 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 15400fi
8ada417f 15401 elif test x$gcc_cv_as != x; then
6e3f3080 15402 echo ' .text
ef1ecf87
RH
15403 addl r15 = @ltoffx(x#), gp
15404 ;;
cfa9ee99 15405 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
15406 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15408 (eval $ac_try) 2>&5
15409 ac_status=$?
15410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15411 (exit $ac_status); }; }
8ada417f 15412 then
cfa9ee99 15413 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
15414 else
15415 echo "configure: failed program was" >&5
15416 cat conftest.s >&5
2c4a9cff 15417 fi
8ada417f
ZW
15418 rm -f conftest.o conftest.s
15419 fi
15420fi
a3bba767
JJ
15421echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
15422echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 15423if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
15424
15425cat >>confdefs.h <<\_ACEOF
cfa9ee99 15426#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 15427_ACEOF
8ada417f 15428
cfa9ee99 15429fi
8ada417f 15430
2c4a9cff 15431 ;;
8ada417f 15432
2c4a9cff 15433 powerpc*-*-*)
8ada417f 15434 case $target in
432218ba
DE
15435 *-*-aix*) conftest_s=' .machine "pwr5"
15436 .csect .text[PR]
6b37db3c 15437 mfcr 3,128';;
8af4d362 15438 *-*-darwin*)
a3bba767
JJ
15439 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
15440echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
8af4d362
PB
15441if test "${gcc_cv_as_machine_directive+set}" = set; then
15442 echo $ECHO_N "(cached) $ECHO_C" >&6
15443else
15444 gcc_cv_as_machine_directive=no
15445 if test x$gcc_cv_as != x; then
15446 echo ' .machine ppc7400' > conftest.s
15447 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15449 (eval $ac_try) 2>&5
15450 ac_status=$?
15451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15452 (exit $ac_status); }; }
15453 then
15454 gcc_cv_as_machine_directive=yes
15455 else
15456 echo "configure: failed program was" >&5
15457 cat conftest.s >&5
15458 fi
15459 rm -f conftest.o conftest.s
15460 fi
15461fi
a3bba767
JJ
15462echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
15463echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
8af4d362
PB
15464
15465 if test x$gcc_cv_as_machine_directive != xyes; then
15466 echo "*** This target requires an assembler supporting \".machine\"" >&2
15467 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
15468 test x$build = x$target && exit 1
15469 fi
15470 conftest_s=' .text
6b37db3c 15471 mfcr r3,128';;
4c67db14 15472 *) conftest_s=' .machine power4
d2ab3e37 15473 .text
6b37db3c 15474 mfcr 3,128';;
8ada417f 15475 esac
8ada417f 15476
a3bba767
JJ
15477 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
15478echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
ba479fd2
NN
15479if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
15480 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 15481else
8ada417f
ZW
15482 gcc_cv_as_powerpc_mfcrf=no
15483 if test $in_tree_gas = yes; then
15484 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15485 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 15486fi
8ada417f 15487 elif test x$gcc_cv_as != x; then
6e3f3080 15488 echo "$conftest_s" > conftest.s
ba479fd2
NN
15489 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15491 (eval $ac_try) 2>&5
15492 ac_status=$?
15493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15494 (exit $ac_status); }; }
8ada417f
ZW
15495 then
15496 gcc_cv_as_powerpc_mfcrf=yes
15497 else
15498 echo "configure: failed program was" >&5
15499 cat conftest.s >&5
15500 fi
15501 rm -f conftest.o conftest.s
15502 fi
2c4a9cff 15503fi
a3bba767
JJ
15504echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
15505echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 15506if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
15507
15508cat >>confdefs.h <<\_ACEOF
2c4a9cff 15509#define HAVE_AS_MFCRF 1
ba479fd2 15510_ACEOF
ef1ecf87 15511
8ada417f 15512fi
432218ba
DE
15513
15514 case $target in
15515 *-*-aix*) conftest_s=' .machine "pwr5"
15516 .csect .text[PR]
15517 popcntb 3,3';;
15518 *) conftest_s=' .machine power5
15519 .text
15520 popcntb 3,3';;
15521 esac
15522
a3bba767
JJ
15523 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
15524echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
432218ba
DE
15525if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
15526 echo $ECHO_N "(cached) $ECHO_C" >&6
15527else
15528 gcc_cv_as_powerpc_popcntb=no
15529 if test $in_tree_gas = yes; then
15530 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15531 then gcc_cv_as_powerpc_popcntb=yes
15532fi
15533 elif test x$gcc_cv_as != x; then
15534 echo "$conftest_s" > conftest.s
15535 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15537 (eval $ac_try) 2>&5
15538 ac_status=$?
15539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15540 (exit $ac_status); }; }
15541 then
15542 gcc_cv_as_powerpc_popcntb=yes
15543 else
15544 echo "configure: failed program was" >&5
15545 cat conftest.s >&5
15546 fi
15547 rm -f conftest.o conftest.s
15548 fi
15549fi
a3bba767
JJ
15550echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
15551echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
432218ba
DE
15552if test $gcc_cv_as_powerpc_popcntb = yes; then
15553
15554cat >>confdefs.h <<\_ACEOF
15555#define HAVE_AS_POPCNTB 1
15556_ACEOF
15557
9719f3b7
DE
15558fi
15559
15560 case $target in
15561 *-*-aix*) conftest_s=' .machine "pwr5x"
15562 .csect .text[PR]
15563 frin 1,1';;
1e04bfdc 15564 *) conftest_s=' .machine power5
9719f3b7
DE
15565 .text
15566 frin 1,1';;
15567 esac
15568
a3bba767
JJ
15569 echo "$as_me:$LINENO: checking assembler for fp round support" >&5
15570echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
9719f3b7
DE
15571if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
15572 echo $ECHO_N "(cached) $ECHO_C" >&6
15573else
15574 gcc_cv_as_powerpc_fprnd=no
15575 if test $in_tree_gas = yes; then
15576 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15577 then gcc_cv_as_powerpc_fprnd=yes
15578fi
15579 elif test x$gcc_cv_as != x; then
15580 echo "$conftest_s" > conftest.s
15581 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15583 (eval $ac_try) 2>&5
15584 ac_status=$?
15585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15586 (exit $ac_status); }; }
15587 then
15588 gcc_cv_as_powerpc_fprnd=yes
15589 else
15590 echo "configure: failed program was" >&5
15591 cat conftest.s >&5
15592 fi
15593 rm -f conftest.o conftest.s
15594 fi
15595fi
a3bba767
JJ
15596echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
15597echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
9719f3b7
DE
15598if test $gcc_cv_as_powerpc_fprnd = yes; then
15599
15600cat >>confdefs.h <<\_ACEOF
15601#define HAVE_AS_FPRND 1
15602_ACEOF
15603
44cd321e
PS
15604fi
15605
15606 case $target in
15607 *-*-aix*) conftest_s=' .machine "pwr6"
15608 .csect .text[PR]
15609 mffgpr 1,3';;
15610 *) conftest_s=' .machine power6
15611 .text
15612 mffgpr 1,3';;
15613 esac
15614
a3bba767
JJ
15615 echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5
15616echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6
44cd321e
PS
15617if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then
15618 echo $ECHO_N "(cached) $ECHO_C" >&6
15619else
15620 gcc_cv_as_powerpc_mfpgpr=no
15621 if test $in_tree_gas = yes; then
15622 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
15623 then gcc_cv_as_powerpc_mfpgpr=yes
15624fi
15625 elif test x$gcc_cv_as != x; then
15626 echo "$conftest_s" > conftest.s
15627 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15629 (eval $ac_try) 2>&5
15630 ac_status=$?
15631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15632 (exit $ac_status); }; }
15633 then
15634 gcc_cv_as_powerpc_mfpgpr=yes
15635 else
15636 echo "configure: failed program was" >&5
15637 cat conftest.s >&5
15638 fi
15639 rm -f conftest.o conftest.s
15640 fi
15641fi
a3bba767
JJ
15642echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5
15643echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6
44cd321e
PS
15644if test $gcc_cv_as_powerpc_mfpgpr = yes; then
15645
15646cat >>confdefs.h <<\_ACEOF
15647#define HAVE_AS_MFPGPR 1
15648_ACEOF
15649
432218ba
DE
15650fi
15651
7f970b70
AM
15652 case $target in
15653 *-*-aix*) conftest_s=' .csect .text[PR]
15654LCF..0:
15655 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
15656 *-*-darwin*)
15657 conftest_s=' .text
15658LCF0:
15659 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
15660 *) conftest_s=' .text
15661.LCF0:
15662 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
15663 esac
15664
a3bba767
JJ
15665 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
15666echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
695d8830
AS
15667if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
15668 echo $ECHO_N "(cached) $ECHO_C" >&6
15669else
15670 gcc_cv_as_powerpc_rel16=no
15671 if test $in_tree_gas = yes; then
15672 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15673 then gcc_cv_as_powerpc_rel16=yes
15674fi
15675 elif test x$gcc_cv_as != x; then
15676 echo "$conftest_s" > conftest.s
15677 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15679 (eval $ac_try) 2>&5
15680 ac_status=$?
15681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15682 (exit $ac_status); }; }
15683 then
15684 gcc_cv_as_powerpc_rel16=yes
15685 else
15686 echo "configure: failed program was" >&5
15687 cat conftest.s >&5
15688 fi
15689 rm -f conftest.o conftest.s
15690 fi
15691fi
a3bba767
JJ
15692echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
15693echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
695d8830
AS
15694if test $gcc_cv_as_powerpc_rel16 = yes; then
15695
15696cat >>confdefs.h <<\_ACEOF
15697#define HAVE_AS_REL16 1
15698_ACEOF
15699
15700fi
15701
b639c3c2
JJ
15702 case $target in
15703 *-*-aix*) conftest_s=' .machine "pwr6"
15704 .csect .text[PR]
15705 cmpb 3,4,5';;
15706 *) conftest_s=' .machine power6
15707 .text
15708 cmpb 3,4,5';;
15709 esac
15710
a3bba767
JJ
15711 echo "$as_me:$LINENO: checking assembler for compare bytes support" >&5
15712echo $ECHO_N "checking assembler for compare bytes support... $ECHO_C" >&6
b639c3c2
JJ
15713if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then
15714 echo $ECHO_N "(cached) $ECHO_C" >&6
15715else
15716 gcc_cv_as_powerpc_cmpb=no
15717 if test $in_tree_gas = yes; then
15718 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
15719 then gcc_cv_as_powerpc_cmpb=yes
15720fi
15721 elif test x$gcc_cv_as != x; then
15722 echo "$conftest_s" > conftest.s
15723 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15725 (eval $ac_try) 2>&5
15726 ac_status=$?
15727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15728 (exit $ac_status); }; }
15729 then
15730 gcc_cv_as_powerpc_cmpb=yes
15731 else
15732 echo "configure: failed program was" >&5
15733 cat conftest.s >&5
15734 fi
15735 rm -f conftest.o conftest.s
15736 fi
15737fi
a3bba767
JJ
15738echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_cmpb" >&5
15739echo "${ECHO_T}$gcc_cv_as_powerpc_cmpb" >&6
b639c3c2
JJ
15740if test $gcc_cv_as_powerpc_cmpb = yes; then
15741
15742cat >>confdefs.h <<\_ACEOF
15743#define HAVE_AS_CMPB 1
15744_ACEOF
15745
15746fi
15747
15748 case $target in
15749 *-*-aix*) conftest_s=' .machine "pwr6"
15750 .csect .text[PR]
0d74c0ee 15751 dadd 1,2,3';;
b639c3c2
JJ
15752 *) conftest_s=' .machine power6
15753 .text
0d74c0ee 15754 dadd 1,2,3';;
b639c3c2
JJ
15755 esac
15756
a3bba767
JJ
15757 echo "$as_me:$LINENO: checking assembler for decimal float support" >&5
15758echo $ECHO_N "checking assembler for decimal float support... $ECHO_C" >&6
b639c3c2
JJ
15759if test "${gcc_cv_as_powerpc_dfp+set}" = set; then
15760 echo $ECHO_N "(cached) $ECHO_C" >&6
15761else
15762 gcc_cv_as_powerpc_dfp=no
15763 if test $in_tree_gas = yes; then
15764 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
15765 then gcc_cv_as_powerpc_dfp=yes
15766fi
15767 elif test x$gcc_cv_as != x; then
15768 echo "$conftest_s" > conftest.s
15769 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15771 (eval $ac_try) 2>&5
15772 ac_status=$?
15773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15774 (exit $ac_status); }; }
15775 then
15776 gcc_cv_as_powerpc_dfp=yes
15777 else
15778 echo "configure: failed program was" >&5
15779 cat conftest.s >&5
15780 fi
15781 rm -f conftest.o conftest.s
15782 fi
15783fi
a3bba767
JJ
15784echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_dfp" >&5
15785echo "${ECHO_T}$gcc_cv_as_powerpc_dfp" >&6
b639c3c2
JJ
15786if test $gcc_cv_as_powerpc_dfp = yes; then
15787
15788cat >>confdefs.h <<\_ACEOF
15789#define HAVE_AS_DFP 1
15790_ACEOF
15791
7f970b70 15792fi
8ada417f
ZW
15793 ;;
15794
15795 mips*-*-*)
a3bba767
JJ
15796 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
15797echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
15798if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
15799 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15800else
15801 gcc_cv_as_mips_explicit_relocs=no
15802 if test $in_tree_gas = yes; then
15803 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15804 then gcc_cv_as_mips_explicit_relocs=yes
15805fi
15806 elif test x$gcc_cv_as != x; then
6e3f3080 15807 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
15808 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15810 (eval $ac_try) 2>&5
15811 ac_status=$?
15812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15813 (exit $ac_status); }; }
8ada417f
ZW
15814 then
15815 gcc_cv_as_mips_explicit_relocs=yes
15816 else
15817 echo "configure: failed program was" >&5
15818 cat conftest.s >&5
ef1ecf87 15819 fi
8ada417f
ZW
15820 rm -f conftest.o conftest.s
15821 fi
15822fi
a3bba767
JJ
15823echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
15824echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
15825if test $gcc_cv_as_mips_explicit_relocs = yes; then
15826 if test x$target_cpu_default = x
15827 then target_cpu_default=MASK_EXPLICIT_RELOCS
15828 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
15829 fi
4551169f 15830fi
a3bba767
JJ
15831 echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5
15832echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6
4551169f
RS
15833if test "${gcc_cv_as_mips_no_shared+set}" = set; then
15834 echo $ECHO_N "(cached) $ECHO_C" >&6
15835else
15836 gcc_cv_as_mips_no_shared=no
15837 if test $in_tree_gas = yes; then
15838 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
15839 then gcc_cv_as_mips_no_shared=yes
15840fi
15841 elif test x$gcc_cv_as != x; then
15842 echo 'nop' > conftest.s
15843 if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5'
15844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15845 (eval $ac_try) 2>&5
15846 ac_status=$?
15847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15848 (exit $ac_status); }; }
15849 then
15850 gcc_cv_as_mips_no_shared=yes
15851 else
15852 echo "configure: failed program was" >&5
15853 cat conftest.s >&5
15854 fi
15855 rm -f conftest.o conftest.s
15856 fi
15857fi
a3bba767
JJ
15858echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5
15859echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6
4551169f
RS
15860if test $gcc_cv_as_mips_no_shared = yes; then
15861
15862cat >>confdefs.h <<\_ACEOF
15863#define HAVE_AS_NO_SHARED 1
15864_ACEOF
15865
8ada417f 15866fi
dbad5e72
SE
15867 ;;
15868esac
8ada417f 15869
dbad5e72
SE
15870# Mips and HP-UX need the GNU assembler.
15871# Linux on IA64 might be able to use the Intel assembler.
15872
15873case "$target" in
15874 mips*-*-* | *-*-hpux* )
82563d35
RS
15875 if test x$gas_flag = xyes \
15876 || test x"$host" != x"$build" \
15877 || test ! -x "$gcc_cv_as" \
15878 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
15879 :
15880 else
15881 echo "*** This configuration requires the GNU assembler" >&2
15882 exit 1
15883 fi
ef1ecf87 15884 ;;
1cb36a98 15885esac
dbad5e72 15886
9d147085
RH
15887# ??? Not all targets support dwarf2 debug_line, even within a version
15888# of gas. Moreover, we need to emit a valid instruction to trigger any
15889# info to the output file. So, as supported targets are added to gas 2.11,
15890# add some instruction here to (also) show we expect this might work.
15891# ??? Once 2.11 is released, probably need to add first known working
15892# version to the per-target configury.
15893case "$target" in
80486e06 15894 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 15895 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
714f737f 15896 | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* | spu-*-*)
9d147085
RH
15897 insn="nop"
15898 ;;
57116d8d 15899 ia64*-*-* | s390*-*-*)
9d147085
RH
15900 insn="nop 0"
15901 ;;
2853bc5a
HPN
15902 mmix-*-*)
15903 insn="swym 0"
15904 ;;
8ada417f
ZW
15905esac
15906if test x"$insn" != x; then
15907 conftest_s="\
15908 .file 1 \"conftest.s\"
15909 .loc 1 3 0
15910 $insn"
a3bba767
JJ
15911 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
15912echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
ba479fd2
NN
15913if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
15914 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15915else
15916 gcc_cv_as_dwarf2_debug_line=no
15917 if test $in_tree_gas = yes; then
15918 if test $in_tree_gas_is_elf = yes \
15919 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15920 then gcc_cv_as_dwarf2_debug_line=yes
15921fi
15922 elif test x$gcc_cv_as != x; then
6e3f3080 15923 echo "$conftest_s" > conftest.s
ba479fd2
NN
15924 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15926 (eval $ac_try) 2>&5
15927 ac_status=$?
15928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15929 (exit $ac_status); }; }
8ada417f 15930 then
080a5bb0
EB
15931 if test x$gcc_cv_objdump != x \
15932 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
15933 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
15934 gcc_cv_as_dwarf2_debug_line=yes
15935 fi
15936 else
15937 echo "configure: failed program was" >&5
15938 cat conftest.s >&5
15939 fi
15940 rm -f conftest.o conftest.s
15941 fi
15942fi
a3bba767
JJ
15943echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
15944echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 15945
ad9c4d9f 15946
8ada417f
ZW
15947# The .debug_line file table must be in the exact order that
15948# we specified the files, since these indices are also used
15949# by DW_AT_decl_file. Approximate this test by testing if
15950# the assembler bitches if the same index is assigned twice.
a3bba767
JJ
15951 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
15952echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
ba479fd2
NN
15953if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
15954 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15955else
15956 gcc_cv_as_dwarf2_file_buggy=no
15957 if test x$gcc_cv_as != x; then
6e3f3080 15958 echo ' .file 1 "foo.s"
8ada417f 15959 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
15960 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15962 (eval $ac_try) 2>&5
15963 ac_status=$?
15964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15965 (exit $ac_status); }; }
8ada417f
ZW
15966 then
15967 gcc_cv_as_dwarf2_file_buggy=yes
15968 else
15969 echo "configure: failed program was" >&5
15970 cat conftest.s >&5
15971 fi
15972 rm -f conftest.o conftest.s
15973 fi
ad9c4d9f 15974fi
a3bba767
JJ
15975echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
15976echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
15977
15978
15979 if test $gcc_cv_as_dwarf2_debug_line = yes \
15980 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
15981
15982cat >>confdefs.h <<\_ACEOF
9d147085 15983#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 15984_ACEOF
9d147085 15985
8ada417f 15986 fi
ad9c4d9f 15987
a3bba767
JJ
15988 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
15989echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
ba479fd2
NN
15990if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
15991 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15992else
15993 gcc_cv_as_gdwarf2_flag=no
15994 if test $in_tree_gas = yes; then
15995 if test $in_tree_gas_is_elf = yes \
15996 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15997 then gcc_cv_as_gdwarf2_flag=yes
15998fi
15999 elif test x$gcc_cv_as != x; then
6e3f3080 16000 echo "$insn" > conftest.s
ba479fd2
NN
16001 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
16002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16003 (eval $ac_try) 2>&5
16004 ac_status=$?
16005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16006 (exit $ac_status); }; }
8ada417f
ZW
16007 then
16008 gcc_cv_as_gdwarf2_flag=yes
16009 else
16010 echo "configure: failed program was" >&5
16011 cat conftest.s >&5
16012 fi
16013 rm -f conftest.o conftest.s
16014 fi
ad9c4d9f 16015fi
a3bba767
JJ
16016echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
16017echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 16018if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
16019
16020cat >>confdefs.h <<\_ACEOF
5f0e9ea2 16021#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 16022_ACEOF
5f0e9ea2
GK
16023
16024fi
ad9c4d9f 16025
a3bba767
JJ
16026 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
16027echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
ba479fd2
NN
16028if test "${gcc_cv_as_gstabs_flag+set}" = set; then
16029 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16030else
16031 gcc_cv_as_gstabs_flag=no
16032 if test $in_tree_gas = yes; then
16033 if test $in_tree_gas_is_elf = yes \
16034 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
16035 then gcc_cv_as_gstabs_flag=yes
16036fi
16037 elif test x$gcc_cv_as != x; then
6e3f3080 16038 echo "$insn" > conftest.s
ba479fd2
NN
16039 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
16040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16041 (eval $ac_try) 2>&5
16042 ac_status=$?
16043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16044 (exit $ac_status); }; }
8ada417f
ZW
16045 then
16046 # The native Solaris 9/Intel assembler doesn't understand --gstabs
16047 # and warns about it, but still exits successfully. So check for
16048 # this.
ba479fd2
NN
16049 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
16050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16051 (eval $ac_try) 2>&5
16052 ac_status=$?
16053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16054 (exit $ac_status); }; }
8ada417f
ZW
16055 then :
16056 else gcc_cv_as_gstabs_flag=yes
16057 fi
16058 else
16059 echo "configure: failed program was" >&5
16060 cat conftest.s >&5
16061 fi
16062 rm -f conftest.o conftest.s
16063 fi
ad9c4d9f 16064fi
a3bba767
JJ
16065echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
16066echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 16067if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
16068
16069cat >>confdefs.h <<\_ACEOF
5f0e9ea2 16070#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 16071_ACEOF
5f0e9ea2
GK
16072
16073fi
8ada417f 16074fi
5f0e9ea2 16075
a3bba767
JJ
16076echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5
16077echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6
03943c05
AO
16078if test "${gcc_cv_as_line_zero+set}" = set; then
16079 echo $ECHO_N "(cached) $ECHO_C" >&6
16080else
16081 gcc_cv_as_line_zero=no
16082 if test $in_tree_gas = yes; then
cf0eb7a1
AO
16083 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
16084 then gcc_cv_as_line_zero=yes
03943c05
AO
16085fi
16086 elif test "x$gcc_cv_as" != x; then
16087 { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
16088 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
16089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16090 (eval $ac_try) 2>&5
16091 ac_status=$?
16092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16093 (exit $ac_status); }; } &&
16094 test "x`cat conftest.out`" = x
16095 then
16096 gcc_cv_as_line_zero=yes
16097 else
16098 echo "configure: failed program was" >&5
16099 cat conftest.s >&5
16100 echo "configure: error output was" >&5
16101 cat conftest.out >&5
16102 fi
16103 rm -f conftest.o conftest.s conftest.out
16104 fi
16105fi
a3bba767
JJ
16106echo "$as_me:$LINENO: result: $gcc_cv_as_line_zero" >&5
16107echo "${ECHO_T}$gcc_cv_as_line_zero" >&6
03943c05
AO
16108if test "x$gcc_cv_as_line_zero" = xyes; then
16109
16110cat >>confdefs.h <<\_ACEOF
16111#define HAVE_AS_LINE_ZERO 1
16112_ACEOF
16113
16114fi
16115
a3bba767
JJ
16116echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
16117echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 16118gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 16119if test $in_tree_ld = yes ; then
5408ac6c
HPN
16120 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 \
16121 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
16122 gcc_cv_ld_ro_rw_mix=read-write
16123 fi
16124elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
16125 echo '.section myfoosect, "a"' > conftest1.s
16126 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 16127 echo '.byte 1' >> conftest2.s
90e145da 16128 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 16129 echo '.byte 0' >> conftest3.s
6cd656d0
KC
16130 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
16131 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
16132 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 16133 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 16134 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 16135 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 16136 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
16137 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
16138 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
16139 gcc_cv_ld_ro_rw_mix=read-only
16140 else
16141 gcc_cv_ld_ro_rw_mix=read-write
16142 fi
16143 fi
16144 fi
16145 rm -f conftest.* conftest[123].*
16146fi
16147if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
16148
16149cat >>confdefs.h <<\_ACEOF
96d0f4dc 16150#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 16151_ACEOF
96d0f4dc
JJ
16152
16153fi
a3bba767
JJ
16154echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
16155echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 16156
a3bba767
JJ
16157echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
16158echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 16159gcc_cv_ld_eh_frame_hdr=no
34a86c2b 16160if test $in_tree_ld = yes ; then
5408ac6c
HPN
16161 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 \
16162 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
16163 gcc_cv_ld_eh_frame_hdr=yes
16164 fi
16165elif test x$gcc_cv_ld != x; then
16166 # Check if linker supports --eh-frame-hdr option
16167 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
16168 gcc_cv_ld_eh_frame_hdr=yes
16169 fi
16170fi
232b67d9 16171
275b60d6 16172if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
16173
16174cat >>confdefs.h <<\_ACEOF
275b60d6 16175#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 16176_ACEOF
275b60d6
JJ
16177
16178fi
a3bba767
JJ
16179echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
16180echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 16181
a3bba767
JJ
16182echo "$as_me:$LINENO: checking linker position independent executable support" >&5
16183echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
16184gcc_cv_ld_pie=no
16185if test $in_tree_ld = yes ; then
5408ac6c
HPN
16186 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 \
16187 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
16188 gcc_cv_ld_pie=yes
16189 fi
16190elif test x$gcc_cv_ld != x; then
16191 # Check if linker supports -pie option
16192 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
16193 gcc_cv_ld_pie=yes
16194 fi
16195fi
16196if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
16197
16198cat >>confdefs.h <<\_ACEOF
24a4dd31 16199#define HAVE_LD_PIE 1
ba479fd2 16200_ACEOF
24a4dd31
JJ
16201
16202fi
a3bba767
JJ
16203echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
16204echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 16205
a3bba767
JJ
16206echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5
16207echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6
22ba88ef 16208gcc_cv_ld_eh_gc_sections=no
b639c3c2
JJ
16209if test $in_tree_ld = yes ; then
16210 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 17 -o "$gcc_cv_gld_major_version" -gt 2 \
16211 && test $in_tree_ld_is_elf = yes; then
16212 gcc_cv_ld_eh_gc_sections=yes
16213 fi
16214elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
16215 cat > conftest.s <<EOF
16216 .section .text
16217.globl _start
16218 .type _start, @function
16219_start:
16220 .long foo
16221 .size _start, .-_start
16222 .section .text.foo,"ax",@progbits
16223 .type foo, @function
16224foo:
16225 .long 0
16226 .size foo, .-foo
16227 .section .gcc_except_table.foo,"a",@progbits
16228.L0:
16229 .long 0
16230 .section .eh_frame,"a",@progbits
16231 .long .L0
16232EOF
16233 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
16234 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
16235 | grep "gc-sections option ignored" > /dev/null; then
16236 gcc_cv_ld_eh_gc_sections=no
16237 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
16238 gcc_cv_ld_eh_gc_sections=yes
16239 # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
16240 if test x$gcc_cv_as_comdat_group != xyes; then
16241 gcc_cv_ld_eh_gc_sections=no
16242 cat > conftest.s <<EOF
16243 .section .text
16244.globl _start
16245 .type _start, @function
16246_start:
16247 .long foo
16248 .size _start, .-_start
16249 .section .gnu.linkonce.t.foo,"ax",@progbits
16250 .type foo, @function
16251foo:
16252 .long 0
16253 .size foo, .-foo
16254 .section .gcc_except_table.foo,"a",@progbits
16255.L0:
16256 .long 0
16257 .section .eh_frame,"a",@progbits
16258 .long .L0
16259EOF
16260 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
16261 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
16262 | grep "gc-sections option ignored" > /dev/null; then
16263 gcc_cv_ld_eh_gc_sections=no
16264 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
16265 gcc_cv_ld_eh_gc_sections=yes
16266 fi
16267 fi
16268 fi
16269 fi
16270 fi
16271 rm -f conftest.s conftest.o conftest
16272fi
e9d207d9
EB
16273case "$target" in
16274 hppa*-*-linux*)
16275 # ??? This apparently exposes a binutils bug with PC-relative relocations.
16276 gcc_cv_ld_eh_gc_sections=no
16277 ;;
16278esac
22ba88ef
EB
16279if test x$gcc_cv_ld_eh_gc_sections = xyes; then
16280
16281cat >>confdefs.h <<\_ACEOF
16282#define HAVE_LD_EH_GC_SECTIONS 1
16283_ACEOF
16284
16285fi
a3bba767
JJ
16286echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5
16287echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6
22ba88ef 16288
8bb915b6
NN
16289# --------
16290# UNSORTED
16291# --------
16292
a3bba767
JJ
16293echo "$as_me:$LINENO: checking linker --as-needed support" >&5
16294echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
16295if test "${gcc_cv_ld_as_needed+set}" = set; then
16296 echo $ECHO_N "(cached) $ECHO_C" >&6
16297else
16298 gcc_cv_ld_as_needed=no
765f1bf9
AM
16299if test $in_tree_ld = yes ; then
16300 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 \
16301 && test $in_tree_ld_is_elf = yes; then
16302 gcc_cv_ld_as_needed=yes
16303 fi
16304elif test x$gcc_cv_ld != x; then
16305 # Check if linker supports --as-needed and --no-as-needed options
16306 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
16307 gcc_cv_ld_as_needed=yes
16308 fi
16309fi
82e923f6
RS
16310
16311fi
a3bba767
JJ
16312echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
16313echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
16314if test x"$gcc_cv_ld_as_needed" = xyes; then
16315
16316cat >>confdefs.h <<\_ACEOF
16317#define HAVE_LD_AS_NEEDED 1
16318_ACEOF
16319
16320fi
765f1bf9 16321
d82bf747
AM
16322case "$target:$tm_file" in
16323 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
a3bba767
JJ
16324 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
16325echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
85b776df
AM
16326if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
16327 echo $ECHO_N "(cached) $ECHO_C" >&6
16328else
16329 gcc_cv_ld_no_dot_syms=no
16330 if test $in_tree_ld = yes ; then
16331 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; then
16332 gcc_cv_ld_no_dot_syms=yes
16333 fi
16334 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
16335 cat > conftest1.s <<EOF
16336 .text
16337 bl .foo
16338EOF
16339 cat > conftest2.s <<EOF
16340 .section ".opd","aw"
16341 .align 3
16342 .globl foo
16343 .type foo,@function
16344foo:
16345 .quad .LEfoo,.TOC.@tocbase,0
16346 .text
16347.LEfoo:
16348 blr
16349 .size foo,.-.LEfoo
16350EOF
16351 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
16352 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
16353 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
16354 gcc_cv_ld_no_dot_syms=yes
16355 fi
16356 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
16357 fi
16358
16359fi
a3bba767
JJ
16360echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
16361echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
85b776df
AM
16362 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
16363
16364cat >>confdefs.h <<\_ACEOF
16365#define HAVE_LD_NO_DOT_SYMS 1
16366_ACEOF
16367
16368 fi
16369 ;;
16370esac
16371
a3bba767
JJ
16372echo "$as_me:$LINENO: checking linker --sysroot support" >&5
16373echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
380e5ca4
MM
16374if test "${gcc_cv_ld_sysroot+set}" = set; then
16375 echo $ECHO_N "(cached) $ECHO_C" >&6
16376else
16377 gcc_cv_ld_sysroot=no
16378 if test $in_tree_ld = yes ; then
16379 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 ; then
7032df40 16380 gcc_cv_ld_sysroot=yes
380e5ca4
MM
16381 fi
16382 elif test x$gcc_cv_ld != x; then
16383 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
16384 gcc_cv_ld_sysroot=yes
16385 fi
16386 fi
16387fi
a3bba767
JJ
16388echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
16389echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
380e5ca4
MM
16390if test x"$gcc_cv_ld_sysroot" = xyes; then
16391
16392cat >>confdefs.h <<\_ACEOF
16393#define HAVE_LD_SYSROOT 1
16394_ACEOF
16395
16396fi
16397
9fb28a67 16398if test x$with_sysroot = x && test x$host = x$target \
c794c06f
CD
16399 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
16400 && test "$prefix" != "NONE"; then
ba479fd2
NN
16401
16402cat >>confdefs.h <<_ACEOF
793e9558 16403#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 16404_ACEOF
793e9558
PB
16405
16406fi
16407
77008252 16408# Test for stack protector support in target C library.
a3bba767
JJ
16409echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5
16410echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6
77008252
JJ
16411if test "${gcc_cv_libc_provides_ssp+set}" = set; then
16412 echo $ECHO_N "(cached) $ECHO_C" >&6
16413else
16414 gcc_cv_libc_provides_ssp=no
a6ccdbab
EC
16415 case "$target" in
16416 *-*-linux*)
77008252
JJ
16417 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
16418 if test "x$with_sysroot" = x; then
16419 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
16420 elif test "x$with_build_sysroot" != "x"; then
16421 glibc_header_dir="${with_build_sysroot}/usr/include"
77008252
JJ
16422 elif test "x$with_sysroot" = xyes; then
16423 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
16424 else
16425 glibc_header_dir="${with_sysroot}/usr/include"
16426 fi
16427 else
16428 glibc_header_dir=/usr/include
16429 fi
16430 # glibc 2.4 and later provides __stack_chk_fail and
16431 # either __stack_chk_guard, or TLS access to stack guard canary.
16432 if test -f $glibc_header_dir/features.h \
16433 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
16434 $glibc_header_dir/features.h > /dev/null; then
16435 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
16436 $glibc_header_dir/features.h > /dev/null; then
16437 gcc_cv_libc_provides_ssp=yes
16438 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
16439 $glibc_header_dir/features.h > /dev/null \
16440 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
16441 $glibc_header_dir/features.h > /dev/null; then
16442 gcc_cv_libc_provides_ssp=yes
16443 fi
a6ccdbab
EC
16444 fi
16445 ;;
16446 *-*-darwin*)
a3bba767
JJ
16447 echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5
16448echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6
a6ccdbab
EC
16449if test "${ac_cv_func___stack_chk_fail+set}" = set; then
16450 echo $ECHO_N "(cached) $ECHO_C" >&6
16451else
16452 cat >conftest.$ac_ext <<_ACEOF
16453/* confdefs.h. */
16454_ACEOF
16455cat confdefs.h >>conftest.$ac_ext
16456cat >>conftest.$ac_ext <<_ACEOF
16457/* end confdefs.h. */
16458/* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail.
16459 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16460#define __stack_chk_fail innocuous___stack_chk_fail
16461
16462/* System header to define __stub macros and hopefully few prototypes,
16463 which can conflict with char __stack_chk_fail (); below.
16464 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16465 <limits.h> exists even on freestanding compilers. */
16466
16467#ifdef __STDC__
16468# include <limits.h>
16469#else
16470# include <assert.h>
16471#endif
16472
16473#undef __stack_chk_fail
16474
a3bba767 16475/* Override any gcc2 internal prototype to avoid an error. */
a6ccdbab
EC
16476#ifdef __cplusplus
16477extern "C"
a3bba767 16478{
a6ccdbab 16479#endif
a3bba767
JJ
16480/* We use char because int might match the return type of a gcc2
16481 builtin and then its argument prototype would still apply. */
a6ccdbab
EC
16482char __stack_chk_fail ();
16483/* The GNU C library defines this for functions which it implements
16484 to always fail with ENOSYS. Some functions are actually named
16485 something starting with __ and the normal name is an alias. */
a3bba767 16486#if defined (__stub___stack_chk_fail) || defined (__stub_____stack_chk_fail)
a6ccdbab 16487choke me
a3bba767
JJ
16488#else
16489char (*f) () = __stack_chk_fail;
16490#endif
16491#ifdef __cplusplus
16492}
a6ccdbab
EC
16493#endif
16494
16495int
16496main ()
16497{
a3bba767 16498return f != __stack_chk_fail;
a6ccdbab
EC
16499 ;
16500 return 0;
16501}
16502_ACEOF
16503rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
16504if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16505 (eval $ac_link) 2>conftest.er1
a6ccdbab
EC
16506 ac_status=$?
16507 grep -v '^ *+' conftest.er1 >conftest.err
16508 rm -f conftest.er1
16509 cat conftest.err >&5
16510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
16511 (exit $ac_status); } &&
16512 { ac_try='test -z "$ac_c_werror_flag"
16513 || test ! -s conftest.err'
16514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16515 (eval $ac_try) 2>&5
16516 ac_status=$?
16517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16518 (exit $ac_status); }; } &&
16519 { ac_try='test -s conftest$ac_exeext'
16520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16521 (eval $ac_try) 2>&5
16522 ac_status=$?
16523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16524 (exit $ac_status); }; }; then
8b1f719a
PB
16525 ac_cv_func___stack_chk_fail=yes
16526else
a6ccdbab
EC
16527 echo "$as_me: failed program was:" >&5
16528sed 's/^/| /' conftest.$ac_ext >&5
16529
a3bba767 16530ac_cv_func___stack_chk_fail=no
a6ccdbab 16531fi
a3bba767 16532rm -f conftest.err conftest.$ac_objext \
a6ccdbab
EC
16533 conftest$ac_exeext conftest.$ac_ext
16534fi
a3bba767
JJ
16535echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5
16536echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6
a6ccdbab
EC
16537if test $ac_cv_func___stack_chk_fail = yes; then
16538 gcc_cv_libc_provides_ssp=yes
16539else
16540 echo "no __stack_chk_fail on this target"
77008252 16541fi
a6ccdbab
EC
16542
16543 ;;
77008252 16544 *) gcc_cv_libc_provides_ssp=no ;;
a6ccdbab
EC
16545 esac
16546fi
a3bba767
JJ
16547echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
16548echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6
a6ccdbab 16549
77008252
JJ
16550if test x$gcc_cv_libc_provides_ssp = xyes; then
16551
16552cat >>confdefs.h <<\_ACEOF
16553#define TARGET_LIBC_PROVIDES_SSP 1
16554_ACEOF
16555
16556fi
16557
ed965309
JJ
16558# Check if TFmode long double should be used by default or not.
16559# Some glibc targets used DFmode long double, but with glibc 2.4
16560# and later they can use TFmode.
16561case "$target" in
16562 powerpc*-*-*gnu* | \
16563 sparc*-*-linux* | \
16564 s390*-*-linux* | \
16565 alpha*-*-linux*)
16566
a3bba767 16567# Check whether --with-long-double-128 or --without-long-double-128 was given.
ed965309 16568if test "${with_long_double_128+set}" = set; then
a3bba767
JJ
16569 withval="$with_long_double_128"
16570 gcc_cv_target_ldbl128="$with_long_double_128"
ed965309
JJ
16571else
16572 gcc_cv_target_ldbl128=no
16573 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
16574 if test "x$with_sysroot" = x; then
16575 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
16576 elif test "x$with_build_sysroot" != "x"; then
16577 glibc_header_dir="${with_build_sysroot}/usr/include"
ed965309
JJ
16578 elif test "x$with_sysroot" = xyes; then
16579 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
16580 else
16581 glibc_header_dir="${with_sysroot}/usr/include"
16582 fi
16583 else
16584 glibc_header_dir=/usr/include
16585 fi
65280f6c 16586 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
ed965309
JJ
16587 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
16588 && gcc_cv_target_ldbl128=yes
65280f6c 16589
a3bba767 16590fi;
ed965309
JJ
16591 ;;
16592esac
16593if test x$gcc_cv_target_ldbl128 = xyes; then
16594
16595cat >>confdefs.h <<\_ACEOF
16596#define TARGET_DEFAULT_LONG_DOUBLE_128 1
16597_ACEOF
16598
16599fi
16600
81bf3d9e 16601# Find out what GC implementation we want, or may, use.
ba479fd2 16602
a3bba767 16603# Check whether --with-gc or --without-gc was given.
81bf3d9e 16604if test "${with_gc+set}" = set; then
a3bba767
JJ
16605 withval="$with_gc"
16606 case "$withval" in
08cee789 16607 page)
81bf3d9e 16608 GGC=ggc-$withval
08cee789
DJ
16609 ;;
16610 zone)
16611 GGC=ggc-$withval
16612
16613cat >>confdefs.h <<\_ACEOF
16614#define GGC_ZONE 1
16615_ACEOF
16616
81bf3d9e
RH
16617 ;;
16618 *)
ba479fd2
NN
16619 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
16620echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
16621 { (exit 1); exit 1; }; }
81bf3d9e
RH
16622 ;;
16623esac
16624else
005537df 16625 GGC=ggc-page
a3bba767 16626fi;
81bf3d9e
RH
16627
16628echo "Using $GGC for garbage collection."
16629
3c809ba4 16630# Use the system's zlib library.
b8dad04b
ZW
16631zlibdir=-L../zlib
16632zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 16633
a3bba767 16634# Check whether --with-system-zlib or --without-system-zlib was given.
3c809ba4 16635if test "${with_system_zlib+set}" = set; then
a3bba767
JJ
16636 withval="$with_system_zlib"
16637 zlibdir=
3c809ba4
AG
16638zlibinc=
16639
a3bba767 16640fi;
3c809ba4 16641
dc6746e7 16642
b8ec3cc8 16643
703d89ab 16644
a3bba767
JJ
16645echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
16646echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
16647 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
dc6746e7 16648if test "${enable_maintainer_mode+set}" = set; then
a3bba767
JJ
16649 enableval="$enable_maintainer_mode"
16650 maintainer_mode=$enableval
dc6746e7
PT
16651else
16652 maintainer_mode=no
a3bba767 16653fi;
a6ccdbab 16654
a3bba767
JJ
16655echo "$as_me:$LINENO: result: $maintainer_mode" >&5
16656echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
16657
16658if test "$maintainer_mode" = "yes"; then
16659 MAINT=''
16660else
16661 MAINT='#'
16662fi
16663
8bb915b6
NN
16664# --------------
16665# Language hooks
16666# --------------
16667
861bb6c1
JL
16668# Make empty files to contain the specs and options for each language.
16669# Then add #include lines to for a compiler that has specs and/or options.
16670
cc11cc9b 16671subdirs=
d7b42618 16672lang_opt_files=
861bb6c1 16673lang_specs_files=
3103b7db 16674lang_tree_files=
861bb6c1
JL
16675# These (without "all_") are set in each config-lang.in.
16676# `language' must be a single word so is spelled singularly.
16677all_languages=
861bb6c1 16678all_compilers=
fa958513 16679all_outputs='Makefile gccbug libada-mk'
861bb6c1 16680# List of language makefile fragments.
2ed26f6b
ZW
16681all_lang_makefrags=
16682# List of language subdirectory makefiles. Deprecated.
861bb6c1 16683all_lang_makefiles=
703d89ab 16684# Additional files for gengtype
ef69da62 16685all_gtfiles="$target_gtfiles"
861bb6c1 16686
cc11cc9b
PB
16687# These are the languages that are set in --enable-languages,
16688# and are available in the GCC tree.
16689all_selected_languages=
16690
861bb6c1
JL
16691# Add the language fragments.
16692# Languages are added via two mechanisms. Some information must be
16693# recorded in makefile variables, these are defined in config-lang.in.
16694# We accumulate them and plug them into the main Makefile.
16695# The other mechanism is a set of hooks for each of the main targets
16696# like `clean', `install', etc.
16697
861bb6c1 16698language_hooks="Make-hooks"
861bb6c1 16699
cc11cc9b 16700for lang in ${srcdir}/*/config-lang.in
861bb6c1 16701do
1546bb64
PB
16702 test "$lang" = "${srcdir}/*/config-lang.in" && continue
16703
cc11cc9b
PB
16704 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
16705 if test "x$lang_alias" = x
16706 then
16707 echo "$lang doesn't set \$language." 1>&2
16708 exit 1
16709 fi
16710 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
16711 subdirs="$subdirs $subdir"
16712 case ",$enable_languages," in
16713 *,$lang_alias,*)
16714 all_selected_languages="$all_selected_languages $lang_alias"
16715 if test -f $srcdir/$subdir/lang-specs.h; then
16716 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
16717 fi
16718 ;;
16719 esac
16720
cc11cc9b
PB
16721 language=
16722 boot_language=
16723 compilers=
cc11cc9b
PB
16724 outputs=
16725 gtfiles=
1546bb64 16726 subdir_requires=
cc11cc9b
PB
16727 . ${srcdir}/$subdir/config-lang.in
16728 if test "x$language" = x
16729 then
16730 echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2
16731 exit 1
16732 fi
1546bb64
PB
16733
16734 ok=:
16735 case ",$enable_languages," in
16736 *,$lang_alias,*) ;;
16737 *)
16738 for i in $subdir_requires; do
b6348cb3 16739 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
16740 ok=false
16741 break
16742 done
16743 ;;
16744 esac
16745 $ok || continue
16746
cc11cc9b 16747 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in"
1546bb64
PB
16748 if test -f $srcdir/$subdir/lang.opt; then
16749 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
16750 fi
16751 if test -f $srcdir/$subdir/$subdir-tree.def; then
16752 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
16753 fi
cc11cc9b
PB
16754 if test -f ${srcdir}/$subdir/Makefile.in
16755 then all_lang_makefiles="$subdir/Makefile"
16756 fi
16757 all_languages="$all_languages $language"
cc11cc9b 16758 all_compilers="$all_compilers $compilers"
cc11cc9b 16759 all_outputs="$all_outputs $outputs"
703d89ab 16760 all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
861bb6c1
JL
16761done
16762
8ac9d31f
TJ
16763# Pick up gtfiles for c
16764gtfiles=
8ac9d31f 16765. ${srcdir}/c-config-lang.in
703d89ab 16766all_gtfiles="$all_gtfiles [c] $gtfiles"
8ac9d31f 16767
cbc59f01 16768check_languages=
cc11cc9b 16769for language in $all_selected_languages
cbc59f01 16770do
cc11cc9b 16771 check_languages="$check_languages check-$language"
cbc59f01
DD
16772done
16773
62b81e45 16774# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 16775# lang.${target}. Only do so for selected languages.
861bb6c1
JL
16776
16777rm -f Make-hooks
16778touch Make-hooks
bd97af06 16779target_list="all.cross start.encap rest.encap tags \
bcc3d150
BM
16780 install-common install-man install-info install-pdf dvi pdf \
16781 html uninstall info man srcextra srcman srcinfo \
8b1f719a 16782 mostlyclean clean distclean maintainer-clean"
cc11cc9b 16783
861bb6c1
JL
16784for t in $target_list
16785do
16786 x=
cc11cc9b 16787 for lang in $all_selected_languages
861bb6c1 16788 do
cc11cc9b 16789 x="$x $lang.$t"
861bb6c1
JL
16790 done
16791 echo "lang.$t: $x" >> Make-hooks
16792done
16793
8bb915b6
NN
16794# --------
16795# UNSORTED
16796# --------
16797
cc06d68c 16798# Create .gdbinit.
861bb6c1 16799
cc06d68c
GP
16800echo "dir ." > .gdbinit
16801echo "dir ${srcdir}" >> .gdbinit
16802if test x$gdb_needs_out_file_path = xyes
16803then
16804 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
16805fi
16806if test "x$subdirs" != x; then
16807 for s in $subdirs
16808 do
16809 echo "dir ${srcdir}/$s" >> .gdbinit
16810 done
861bb6c1 16811fi
cc06d68c 16812echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 16813
8f8d3278
NC
16814# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
16815# absolute path for gcc_tooldir based on inserting the number of up-directory
16816# movements required to get from $(exec_prefix) to $(prefix) into the basic
16817# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
16818# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
16819# make and thus we'd get different behavior depending on where we built the
16820# sources.
5949a9fc 16821if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 16822 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 16823else
8f8d3278
NC
16824# An explanation of the sed strings:
16825# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
16826# -e 's|/$||' match a trailing forward slash and eliminates it
16827# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 16828# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
16829#
16830# (*) Note this pattern overwrites the first character of the string
16831# with a forward slash if one is not already present. This is not a
16832# problem because the exact names of the sub-directories concerned is
16833# unimportant, just the number of them matters.
16834#
16835# The practical upshot of these patterns is like this:
16836#
16837# prefix exec_prefix result
16838# ------ ----------- ------
16839# /foo /foo/bar ../
16840# /foo/ /foo/bar ../
16841# /foo /foo/bar/ ../
16842# /foo/ /foo/bar/ ../
16843# /foo /foo/bar/ugg ../../
16844#
4c112cda 16845 dollar='$$'
caa55b1e 16846 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
16847fi
16848
16849
2ce3c6c6 16850
2bbea3a6
RH
16851# Find a directory in which to install a shared libgcc.
16852
a3bba767 16853# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
2bbea3a6 16854if test "${enable_version_specific_runtime_libs+set}" = set; then
a3bba767 16855 enableval="$enable_version_specific_runtime_libs"
ba479fd2 16856
a3bba767 16857fi;
2bbea3a6
RH
16858
16859
a3bba767 16860# Check whether --with-slibdir or --without-slibdir was given.
5b15f277 16861if test "${with_slibdir+set}" = set; then
a3bba767
JJ
16862 withval="$with_slibdir"
16863 slibdir="$with_slibdir"
5b15f277
RH
16864else
16865 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 16866 slibdir='$(libsubdir)'
5b15f277 16867elif test "$host" != "$target"; then
2bbea3a6
RH
16868 slibdir='$(build_tooldir)/lib'
16869else
5b15f277 16870 slibdir='$(libdir)'
2bbea3a6 16871fi
a3bba767 16872fi;
2bbea3a6
RH
16873
16874
1e6347d8 16875objdir=`${PWDCMD-pwd}`
7e717196
JL
16876
16877
22482f74 16878
a3bba767 16879# Check whether --with-datarootdir or --without-datarootdir was given.
22482f74 16880if test "${with_datarootdir+set}" = set; then
a3bba767
JJ
16881 withval="$with_datarootdir"
16882 datarootdir="\${prefix}/$with_datarootdir"
22482f74
MS
16883else
16884 datarootdir='$(prefix)/share'
a3bba767 16885fi;
22482f74
MS
16886
16887
a6ccdbab 16888
a3bba767 16889# Check whether --with-docdir or --without-docdir was given.
22482f74 16890if test "${with_docdir+set}" = set; then
a3bba767
JJ
16891 withval="$with_docdir"
16892 docdir="\${prefix}/$with_docdir"
22482f74
MS
16893else
16894 docdir='$(datarootdir)'
a3bba767 16895fi;
22482f74 16896
b8ec3cc8 16897
703d89ab 16898
a3bba767 16899# Check whether --with-htmldir or --without-htmldir was given.
22482f74 16900if test "${with_htmldir+set}" = set; then
a3bba767
JJ
16901 withval="$with_htmldir"
16902 htmldir="\${prefix}/$with_htmldir"
22482f74
MS
16903else
16904 htmldir='$(docdir)'
a3bba767 16905fi;
861bb6c1
JL
16906
16907
703d89ab 16908# Substitute configuration variables
861bb6c1
JL
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
9b16d2c4 16953
e9a25f70 16954
6e26218f 16955
c8724862 16956
11642c3a
ZW
16957
16958
16959
3d9d2476 16960
e2500fed 16961
51b9ff45 16962
861bb6c1 16963
6e3f3080
NN
16964# Echo link setup.
16965if test x${build} = x${host} ; then
16966 if test x${host} = x${target} ; then
16967 echo "Links are now set up to build a native compiler for ${target}." 1>&2
16968 else
16969 echo "Links are now set up to build a cross-compiler" 1>&2
16970 echo " from ${host} to ${target}." 1>&2
16971 fi
16972else
16973 if test x${host} = x${target} ; then
16974 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
16975 echo " for ${target}." 1>&2
16976 else
16977 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
16978 echo " from ${host} to ${target}." 1>&2
16979 fi
16980fi
16981
6de9cd9a
DN
16982
16983
16984
6e3f3080
NN
16985# Configure the subdirectories
16986# AC_CONFIG_SUBDIRS($subdirs)
16987
16988# Create the Makefile
16989# and configure language subdirectories
a3bba767 16990 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
16991
16992
a3bba767 16993 ac_config_commands="$ac_config_commands default"
914c5af7 16994
ba479fd2 16995cat >confcache <<\_ACEOF
6e3f3080
NN
16996# This file is a shell script that caches the results of configure
16997# tests run on this system so they can be shared between configure
ba479fd2
NN
16998# scripts and configure runs, see configure's option --config-cache.
16999# It is not useful on other systems. If it contains results you don't
17000# want to keep, you may remove or edit it.
6e3f3080 17001#
ba479fd2
NN
17002# config.status only pays attention to the cache file if you give it
17003# the --recheck option to rerun configure.
6e3f3080 17004#
ba479fd2
NN
17005# `ac_cv_env_foo' variables (set or unset) will be overridden when
17006# loading this file, other *unset* `ac_cv_foo' will be assigned the
17007# following values.
17008
17009_ACEOF
17010
6e3f3080
NN
17011# The following way of writing the cache mishandles newlines in values,
17012# but we know of no workaround that is simple, portable, and efficient.
a3bba767 17013# So, don't put newlines in cache variables' values.
6e3f3080
NN
17014# Ultrix sh set writes to stderr and can't be redirected directly,
17015# and sets the high bit in the cache file unless we assign to the vars.
a3bba767 17016{
ba479fd2 17017 (set) 2>&1 |
a3bba767
JJ
17018 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17019 *ac_space=\ *)
ba479fd2
NN
17020 # `set' does not quote correctly, so add quotes (double-quote
17021 # substitution turns \\\\ into \\, and sed turns \\ into \).
17022 sed -n \
86da66b5
HPN
17023 "s/'/'\\\\''/g;
17024 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
a3bba767 17025 ;;
ba479fd2
NN
17026 *)
17027 # `set' quotes correctly as required by POSIX, so do not add quotes.
a3bba767
JJ
17028 sed -n \
17029 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 17030 ;;
a3bba767
JJ
17031 esac;
17032} |
ba479fd2
NN
17033 sed '
17034 t clear
a3bba767 17035 : clear
ba479fd2
NN
17036 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17037 t end
a3bba767
JJ
17038 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17039 : end' >>confcache
17040if diff $cache_file confcache >/dev/null 2>&1; then :; else
17041 if test -w $cache_file; then
17042 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
ba479fd2 17043 cat confcache >$cache_file
6e3f3080 17044 else
a3bba767 17045 echo "not updating unwritable cache $cache_file"
6e3f3080
NN
17046 fi
17047fi
17048rm -f confcache
17049
17050test "x$prefix" = xNONE && prefix=$ac_default_prefix
17051# Let make expand exec_prefix.
17052test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17053
a3bba767
JJ
17054# VPATH may cause trouble with some makes, so we remove $(srcdir),
17055# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17056# trailing colons and then remove the whole line if VPATH becomes empty
17057# (actually we leave an empty line to preserve line numbers).
17058if test "x$srcdir" = x.; then
17059 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17060s/:*\$(srcdir):*/:/;
17061s/:*\${srcdir}:*/:/;
17062s/:*@srcdir@:*/:/;
17063s/^\([^=]*=[ ]*\):*/\1/;
17064s/:*$//;
17065s/^[^=]*=[ ]*$//;
17066}'
17067fi
17068
63cf211a 17069DEFS=-DHAVE_CONFIG_H
6e3f3080 17070
ba479fd2
NN
17071ac_libobjs=
17072ac_ltlibobjs=
17073for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17074 # 1. Remove the extension, and $U if already installed.
a3bba767
JJ
17075 ac_i=`echo "$ac_i" |
17076 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
17077 # 2. Add them.
17078 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
17079 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
ba479fd2
NN
17080done
17081LIBOBJS=$ac_libobjs
63cf211a 17082
ba479fd2
NN
17083LTLIBOBJS=$ac_ltlibobjs
17084
17085
17086
17087: ${CONFIG_STATUS=./config.status}
17088ac_clean_files_save=$ac_clean_files
17089ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17090{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17091echo "$as_me: creating $CONFIG_STATUS" >&6;}
17092cat >$CONFIG_STATUS <<_ACEOF
17093#! $SHELL
17094# Generated by $as_me.
6e3f3080
NN
17095# Run this file to recreate the current configuration.
17096# Compiler output produced by configure, useful for debugging
ba479fd2 17097# configure, is in config.log if it exists.
6e3f3080 17098
ba479fd2
NN
17099debug=false
17100ac_cs_recheck=false
17101ac_cs_silent=false
17102SHELL=\${CONFIG_SHELL-$SHELL}
17103_ACEOF
17104
17105cat >>$CONFIG_STATUS <<\_ACEOF
17106## --------------------- ##
17107## M4sh Initialization. ##
17108## --------------------- ##
17109
a3bba767 17110# Be Bourne compatible
ba479fd2
NN
17111if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17112 emulate sh
17113 NULLCMD=:
17114 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17115 # is contrary to our usage. Disable this feature.
17116 alias -g '${1+"$@"}'='"$@"'
a3bba767
JJ
17117elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17118 set -o posix
703d89ab 17119fi
a3bba767 17120DUALCASE=1; export DUALCASE # for MKS sh
703d89ab
ZW
17121
17122# Support unset when possible.
17123if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
17124 as_unset=unset
17125else
17126 as_unset=false
17127fi
17128
17129
a6ccdbab 17130# Work around bugs in pre-3.0 UWIN ksh.
a3bba767 17131$as_unset ENV MAIL MAILPATH
a6ccdbab
EC
17132PS1='$ '
17133PS2='> '
ba479fd2
NN
17134PS4='+ '
17135
17136# NLS nuisances.
17137for as_var in \
17138 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
17139 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
17140 LC_TELEPHONE LC_TIME
6e3f3080 17141do
86da66b5 17142 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
17143 eval $as_var=C; export $as_var
17144 else
a3bba767 17145 $as_unset $as_var
ba479fd2 17146 fi
6e3f3080
NN
17147done
17148
ba479fd2 17149# Required to use basename.
a3bba767 17150if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
17151 as_expr=expr
17152else
17153 as_expr=false
17154fi
6e3f3080 17155
a3bba767 17156if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
ba479fd2
NN
17157 as_basename=basename
17158else
17159 as_basename=false
17160fi
6e3f3080
NN
17161
17162
ba479fd2 17163# Name of the executable.
a3bba767 17164as_me=`$as_basename "$0" ||
ba479fd2
NN
17165$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17166 X"$0" : 'X\(//\)$' \| \
a3bba767
JJ
17167 X"$0" : 'X\(/\)$' \| \
17168 . : '\(.\)' 2>/dev/null ||
ba479fd2 17169echo X/"$0" |
a3bba767
JJ
17170 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17171 /^X\/\(\/\/\)$/{ s//\1/; q; }
17172 /^X\/\(\/\).*/{ s//\1/; q; }
17173 s/.*/./; q'`
6e3f3080 17174
a3bba767
JJ
17175
17176# PATH needs CR, and LINENO needs CR and PATH.
17177# Avoid depending upon Character Ranges.
17178as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17179as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17180as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17181as_cr_digits='0123456789'
17182as_cr_alnum=$as_cr_Letters$as_cr_digits
17183
17184# The user is always right.
17185if test "${PATH_SEPARATOR+set}" != set; then
17186 echo "#! /bin/sh" >conf$$.sh
17187 echo "exit 0" >>conf$$.sh
17188 chmod +x conf$$.sh
17189 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
17190 PATH_SEPARATOR=';'
17191 else
17192 PATH_SEPARATOR=:
17193 fi
17194 rm -f conf$$.sh
17195fi
dd7f7a6e 17196
8b1f719a 17197
a3bba767
JJ
17198 as_lineno_1=$LINENO
17199 as_lineno_2=$LINENO
17200 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17201 test "x$as_lineno_1" != "x$as_lineno_2" &&
17202 test "x$as_lineno_3" = "x$as_lineno_2" || {
17203 # Find who we are. Look in the path if we contain no path at all
17204 # relative or not.
17205 case $0 in
17206 *[\\/]* ) as_myself=$0 ;;
17207 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17208for as_dir in $PATH
17209do
17210 IFS=$as_save_IFS
17211 test -z "$as_dir" && as_dir=.
17212 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17213done
8b1f719a 17214
a3bba767
JJ
17215 ;;
17216 esac
17217 # We did not find ourselves, most probably we were run as `sh COMMAND'
17218 # in which case we are not to be found in the path.
17219 if test "x$as_myself" = x; then
17220 as_myself=$0
17221 fi
17222 if test ! -f "$as_myself"; then
17223 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17224echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17225 { (exit 1); exit 1; }; }
17226 fi
17227 case $CONFIG_SHELL in
17228 '')
17229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17230for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17231do
17232 IFS=$as_save_IFS
17233 test -z "$as_dir" && as_dir=.
17234 for as_base in sh bash ksh sh5; do
17235 case $as_dir in
17236 /*)
17237 if ("$as_dir/$as_base" -c '
8b1f719a
PB
17238 as_lineno_1=$LINENO
17239 as_lineno_2=$LINENO
a3bba767 17240 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
8b1f719a 17241 test "x$as_lineno_1" != "x$as_lineno_2" &&
a3bba767
JJ
17242 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17243 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
17244 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
17245 CONFIG_SHELL=$as_dir/$as_base
17246 export CONFIG_SHELL
17247 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17248 fi;;
17249 esac
17250 done
17251done
17252;;
17253 esac
ba479fd2
NN
17254
17255 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17256 # uniformly replaced by the line number. The first 'sed' inserts a
a3bba767
JJ
17257 # line-number line before each line; the second 'sed' does the real
17258 # work. The second script uses 'N' to pair each line-number line
17259 # with the numbered line, and appends trailing '-' during
17260 # substitution so that $LINENO is not a special case at line end.
ba479fd2 17261 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
a3bba767
JJ
17262 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17263 sed '=' <$as_myself |
ba479fd2
NN
17264 sed '
17265 N
a3bba767
JJ
17266 s,$,-,
17267 : loop
17268 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
ba479fd2 17269 t loop
a3bba767
JJ
17270 s,-$,,
17271 s,^['$as_cr_digits']*\n,,
ba479fd2 17272 ' >$as_me.lineno &&
a3bba767
JJ
17273 chmod +x $as_me.lineno ||
17274 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17275echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
ba479fd2
NN
17276 { (exit 1); exit 1; }; }
17277
17278 # Don't try to exec as it changes $[0], causing all sort of problems
17279 # (the dirname of $[0] is not the place where we might find the
a3bba767
JJ
17280 # original and so on. Autoconf is especially sensible to this).
17281 . ./$as_me.lineno
ba479fd2
NN
17282 # Exit status is that of the last command.
17283 exit
17284}
17285
17286
a3bba767
JJ
17287case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17288 *c*,-n*) ECHO_N= ECHO_C='
17289' ECHO_T=' ' ;;
17290 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17291 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
ba479fd2
NN
17292esac
17293
a3bba767 17294if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
17295 as_expr=expr
17296else
17297 as_expr=false
17298fi
17299
17300rm -f conf$$ conf$$.exe conf$$.file
17301echo >conf$$.file
17302if ln -s conf$$.file conf$$ 2>/dev/null; then
a3bba767
JJ
17303 # We could just check for DJGPP; but this test a) works b) is more generic
17304 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17305 if test -f conf$$.exe; then
17306 # Don't use ln at all; we don't have any links
ba479fd2 17307 as_ln_s='cp -p'
a3bba767
JJ
17308 else
17309 as_ln_s='ln -s'
17310 fi
ba479fd2
NN
17311elif ln conf$$.file conf$$ 2>/dev/null; then
17312 as_ln_s=ln
17313else
17314 as_ln_s='cp -p'
17315fi
a3bba767 17316rm -f conf$$ conf$$.exe conf$$.file
ba479fd2
NN
17317
17318if mkdir -p . 2>/dev/null; then
17319 as_mkdir_p=:
17320else
86da66b5 17321 test -d ./-p && rmdir ./-p
ba479fd2
NN
17322 as_mkdir_p=false
17323fi
17324
a3bba767 17325as_executable_p="test -f"
ba479fd2
NN
17326
17327# Sed expression to map a string onto a valid CPP name.
86da66b5 17328as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
17329
17330# Sed expression to map a string onto a valid variable name.
86da66b5 17331as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
17332
17333
a3bba767
JJ
17334# IFS
17335# We need space, tab and new line, in precisely that order.
17336as_nl='
17337'
17338IFS=" $as_nl"
17339
17340# CDPATH.
17341$as_unset CDPATH
17342
ba479fd2
NN
17343exec 6>&1
17344
a3bba767 17345# Open the log real soon, to keep \$[0] and so on meaningful, and to
ba479fd2 17346# report actual input values of CONFIG_FILES etc. instead of their
a3bba767
JJ
17347# values after options handling. Logging --version etc. is OK.
17348exec 5>>config.log
17349{
17350 echo
17351 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17352## Running $as_me. ##
17353_ASBOX
17354} >&5
17355cat >&5 <<_CSEOF
17356
ba479fd2 17357This file was extended by $as_me, which was
a3bba767 17358generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
17359
17360 CONFIG_FILES = $CONFIG_FILES
17361 CONFIG_HEADERS = $CONFIG_HEADERS
17362 CONFIG_LINKS = $CONFIG_LINKS
17363 CONFIG_COMMANDS = $CONFIG_COMMANDS
17364 $ $0 $@
17365
a3bba767
JJ
17366_CSEOF
17367echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17368echo >&5
ba479fd2
NN
17369_ACEOF
17370
17371# Files that config.status was made for.
a3bba767
JJ
17372if test -n "$ac_config_files"; then
17373 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17374fi
dd7f7a6e 17375
a3bba767
JJ
17376if test -n "$ac_config_headers"; then
17377 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17378fi
17379
17380if test -n "$ac_config_links"; then
17381 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17382fi
17383
17384if test -n "$ac_config_commands"; then
17385 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17386fi
ba479fd2
NN
17387
17388cat >>$CONFIG_STATUS <<\_ACEOF
a3bba767 17389
ba479fd2
NN
17390ac_cs_usage="\
17391\`$as_me' instantiates files from templates according to the
17392current configuration.
17393
17394Usage: $0 [OPTIONS] [FILE]...
17395
17396 -h, --help print this help, then exit
a3bba767 17397 -V, --version print version number, then exit
ba479fd2
NN
17398 -q, --quiet do not print progress messages
17399 -d, --debug don't remove temporary files
17400 --recheck update $as_me by reconfiguring in the same conditions
17401 --file=FILE[:TEMPLATE]
86da66b5 17402 instantiate the configuration file FILE
ba479fd2 17403 --header=FILE[:TEMPLATE]
86da66b5 17404 instantiate the configuration header FILE
ba479fd2
NN
17405
17406Configuration files:
17407$config_files
17408
17409Configuration headers:
17410$config_headers
17411
17412Configuration commands:
17413$config_commands
17414
17415Report bugs to <bug-autoconf@gnu.org>."
703d89ab 17416_ACEOF
a3bba767 17417
ba479fd2
NN
17418cat >>$CONFIG_STATUS <<_ACEOF
17419ac_cs_version="\\
17420config.status
a3bba767
JJ
17421configured by $0, generated by GNU Autoconf 2.59,
17422 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
ba479fd2 17423
a3bba767 17424Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
17425This config.status script is free software; the Free Software Foundation
17426gives unlimited permission to copy, distribute and modify it."
a3bba767 17427srcdir=$srcdir
ba479fd2
NN
17428_ACEOF
17429
17430cat >>$CONFIG_STATUS <<\_ACEOF
17431# If no file are specified by the user, then we need to provide default
17432# value. By we need to know if files were specified by the user.
17433ac_need_defaults=:
17434while test $# != 0
17435do
17436 case $1 in
17437 --*=*)
a3bba767
JJ
17438 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17439 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
ba479fd2
NN
17440 ac_shift=:
17441 ;;
a3bba767 17442 -*)
ba479fd2
NN
17443 ac_option=$1
17444 ac_optarg=$2
17445 ac_shift=shift
17446 ;;
a3bba767
JJ
17447 *) # This is not an option, so the user has probably given explicit
17448 # arguments.
17449 ac_option=$1
17450 ac_need_defaults=false;;
ba479fd2
NN
17451 esac
17452
17453 case $ac_option in
17454 # Handling of the options.
a3bba767
JJ
17455_ACEOF
17456cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
17457 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17458 ac_cs_recheck=: ;;
a3bba767
JJ
17459 --version | --vers* | -V )
17460 echo "$ac_cs_version"; exit 0 ;;
17461 --he | --h)
17462 # Conflict between --help and --header
17463 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17464Try \`$0 --help' for more information." >&5
17465echo "$as_me: error: ambiguous option: $1
17466Try \`$0 --help' for more information." >&2;}
17467 { (exit 1); exit 1; }; };;
17468 --help | --hel | -h )
17469 echo "$ac_cs_usage"; exit 0 ;;
17470 --debug | --d* | -d )
ba479fd2
NN
17471 debug=: ;;
17472 --file | --fil | --fi | --f )
17473 $ac_shift
17474 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
17475 ac_need_defaults=false;;
17476 --header | --heade | --head | --hea )
17477 $ac_shift
17478 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
17479 ac_need_defaults=false;;
17480 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17481 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17482 ac_cs_silent=: ;;
17483
17484 # This is an error.
a3bba767
JJ
17485 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17486Try \`$0 --help' for more information." >&5
17487echo "$as_me: error: unrecognized option: $1
17488Try \`$0 --help' for more information." >&2;}
ba479fd2
NN
17489 { (exit 1); exit 1; }; } ;;
17490
a3bba767 17491 *) ac_config_targets="$ac_config_targets $1" ;;
ba479fd2
NN
17492
17493 esac
17494 shift
6e3f3080 17495done
ba479fd2
NN
17496
17497ac_configure_extra_args=
17498
17499if $ac_cs_silent; then
17500 exec 6>/dev/null
17501 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
17502fi
17503
ba479fd2
NN
17504_ACEOF
17505cat >>$CONFIG_STATUS <<_ACEOF
17506if \$ac_cs_recheck; then
a3bba767
JJ
17507 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
17508 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
ba479fd2 17509fi
861bb6c1 17510
ba479fd2
NN
17511_ACEOF
17512
17513cat >>$CONFIG_STATUS <<_ACEOF
17514#
a3bba767 17515# INIT-COMMANDS section.
ba479fd2 17516#
a3bba767 17517
ba479fd2 17518subdirs='$subdirs'
ba479fd2
NN
17519
17520_ACEOF
17521
703d89ab 17522
a3bba767
JJ
17523
17524cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
17525for ac_config_target in $ac_config_targets
17526do
a3bba767
JJ
17527 case "$ac_config_target" in
17528 # Handling of arguments.
17529 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
17530 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17531 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
ba479fd2
NN
17532 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17533echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17534 { (exit 1); exit 1; }; };;
861bb6c1 17535 esac
ba479fd2
NN
17536done
17537
17538# If the user did not use the arguments to specify the items to instantiate,
17539# then the envvar interface is used. Set only those that are not.
17540# We use the long form for the default assignment because of an extremely
17541# bizarre bug on SunOS 4.1.3.
17542if $ac_need_defaults; then
17543 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17544 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17545 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17546fi
17547
17548# Have a temporary directory for convenience. Make it in the build tree
a3bba767 17549# simply because there is no reason to put it here, and in addition,
ba479fd2 17550# creating and moving files from /tmp can sometimes cause problems.
a3bba767 17551# Create a temporary directory, and hook for its removal unless debugging.
ba479fd2
NN
17552$debug ||
17553{
a3bba767 17554 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
ba479fd2
NN
17555 trap '{ (exit 1); exit 1; }' 1 2 13 15
17556}
a3bba767 17557
ba479fd2 17558# Create a (secure) tmp directory for tmp files.
6e3f3080 17559
ba479fd2 17560{
a3bba767 17561 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
ba479fd2
NN
17562 test -n "$tmp" && test -d "$tmp"
17563} ||
17564{
a3bba767
JJ
17565 tmp=./confstat$$-$RANDOM
17566 (umask 077 && mkdir $tmp)
ba479fd2
NN
17567} ||
17568{
17569 echo "$me: cannot create a temporary directory in ." >&2
17570 { (exit 1); exit 1; }
17571}
17572
a3bba767
JJ
17573_ACEOF
17574
17575cat >>$CONFIG_STATUS <<_ACEOF
17576
ba479fd2 17577#
a3bba767 17578# CONFIG_FILES section.
ba479fd2
NN
17579#
17580
17581# No need to generate the scripts if there are no CONFIG_FILES.
17582# This happens for instance when ./config.status config.h
a3bba767
JJ
17583if test -n "\$CONFIG_FILES"; then
17584 # Protect against being on the right side of a sed subst in config.status.
17585 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17586 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17587s,@SHELL@,$SHELL,;t t
17588s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17589s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17590s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17591s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17592s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17593s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17594s,@exec_prefix@,$exec_prefix,;t t
17595s,@prefix@,$prefix,;t t
17596s,@program_transform_name@,$program_transform_name,;t t
17597s,@bindir@,$bindir,;t t
17598s,@sbindir@,$sbindir,;t t
17599s,@libexecdir@,$libexecdir,;t t
17600s,@datadir@,$datadir,;t t
17601s,@sysconfdir@,$sysconfdir,;t t
17602s,@sharedstatedir@,$sharedstatedir,;t t
17603s,@localstatedir@,$localstatedir,;t t
17604s,@libdir@,$libdir,;t t
17605s,@includedir@,$includedir,;t t
17606s,@oldincludedir@,$oldincludedir,;t t
17607s,@infodir@,$infodir,;t t
17608s,@mandir@,$mandir,;t t
17609s,@build_alias@,$build_alias,;t t
17610s,@host_alias@,$host_alias,;t t
17611s,@target_alias@,$target_alias,;t t
17612s,@DEFS@,$DEFS,;t t
17613s,@ECHO_C@,$ECHO_C,;t t
17614s,@ECHO_N@,$ECHO_N,;t t
17615s,@ECHO_T@,$ECHO_T,;t t
17616s,@LIBS@,$LIBS,;t t
17617s,@build@,$build,;t t
17618s,@build_cpu@,$build_cpu,;t t
17619s,@build_vendor@,$build_vendor,;t t
17620s,@build_os@,$build_os,;t t
17621s,@host@,$host,;t t
17622s,@host_cpu@,$host_cpu,;t t
17623s,@host_vendor@,$host_vendor,;t t
17624s,@host_os@,$host_os,;t t
17625s,@target@,$target,;t t
17626s,@target_cpu@,$target_cpu,;t t
17627s,@target_vendor@,$target_vendor,;t t
17628s,@target_os@,$target_os,;t t
17629s,@target_noncanonical@,$target_noncanonical,;t t
17630s,@build_libsubdir@,$build_libsubdir,;t t
17631s,@build_subdir@,$build_subdir,;t t
17632s,@host_subdir@,$host_subdir,;t t
17633s,@target_subdir@,$target_subdir,;t t
17634s,@GENINSRC@,$GENINSRC,;t t
17635s,@CC@,$CC,;t t
17636s,@CFLAGS@,$CFLAGS,;t t
17637s,@LDFLAGS@,$LDFLAGS,;t t
17638s,@CPPFLAGS@,$CPPFLAGS,;t t
17639s,@ac_ct_CC@,$ac_ct_CC,;t t
17640s,@EXEEXT@,$EXEEXT,;t t
17641s,@OBJEXT@,$OBJEXT,;t t
17642s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
17643s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
17644s,@CPP@,$CPP,;t t
17645s,@EGREP@,$EGREP,;t t
17646s,@strict_warn@,$strict_warn,;t t
17647s,@cxx_compat_warn@,$cxx_compat_warn,;t t
17648s,@warn_cflags@,$warn_cflags,;t t
17649s,@nocommon_flag@,$nocommon_flag,;t t
17650s,@TREEBROWSER@,$TREEBROWSER,;t t
17651s,@valgrind_path@,$valgrind_path,;t t
17652s,@valgrind_path_defines@,$valgrind_path_defines,;t t
17653s,@valgrind_command@,$valgrind_command,;t t
17654s,@coverage_flags@,$coverage_flags,;t t
17655s,@enable_multilib@,$enable_multilib,;t t
17656s,@enable_decimal_float@,$enable_decimal_float,;t t
17657s,@enable_shared@,$enable_shared,;t t
17658s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
17659s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
17660s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
17661s,@onestep@,$onestep,;t t
17662s,@datarootdir@,$datarootdir,;t t
17663s,@docdir@,$docdir,;t t
17664s,@htmldir@,$htmldir,;t t
17665s,@SET_MAKE@,$SET_MAKE,;t t
17666s,@AWK@,$AWK,;t t
17667s,@LN_S@,$LN_S,;t t
17668s,@LN@,$LN,;t t
17669s,@RANLIB@,$RANLIB,;t t
17670s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17671s,@ranlib_flags@,$ranlib_flags,;t t
17672s,@INSTALL@,$INSTALL,;t t
17673s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17674s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17675s,@make_compare_target@,$make_compare_target,;t t
17676s,@have_mktemp_command@,$have_mktemp_command,;t t
17677s,@MAKEINFO@,$MAKEINFO,;t t
17678s,@BUILD_INFO@,$BUILD_INFO,;t t
17679s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
17680s,@FLEX@,$FLEX,;t t
17681s,@BISON@,$BISON,;t t
17682s,@NM@,$NM,;t t
17683s,@AR@,$AR,;t t
17684s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
17685s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
17686s,@LDEXP_LIB@,$LDEXP_LIB,;t t
17687s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
17688s,@LIBICONV@,$LIBICONV,;t t
17689s,@LTLIBICONV@,$LTLIBICONV,;t t
17690s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
17691s,@manext@,$manext,;t t
17692s,@objext@,$objext,;t t
17693s,@gthread_flags@,$gthread_flags,;t t
17694s,@extra_modes_file@,$extra_modes_file,;t t
17695s,@extra_opt_files@,$extra_opt_files,;t t
17696s,@USE_NLS@,$USE_NLS,;t t
17697s,@LIBINTL@,$LIBINTL,;t t
17698s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
17699s,@INCINTL@,$INCINTL,;t t
17700s,@XGETTEXT@,$XGETTEXT,;t t
17701s,@GMSGFMT@,$GMSGFMT,;t t
17702s,@POSUB@,$POSUB,;t t
17703s,@CATALOGS@,$CATALOGS,;t t
17704s,@DATADIRNAME@,$DATADIRNAME,;t t
17705s,@INSTOBJEXT@,$INSTOBJEXT,;t t
17706s,@GENCAT@,$GENCAT,;t t
17707s,@CATOBJEXT@,$CATOBJEXT,;t t
17708s,@host_cc_for_libada@,$host_cc_for_libada,;t t
17709s,@CROSS@,$CROSS,;t t
17710s,@ALL@,$ALL,;t t
17711s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
17712s,@inhibit_libc@,$inhibit_libc,;t t
17713s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
17714s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17715s,@STMP_FIXINC@,$STMP_FIXINC,;t t
17716s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
17717s,@collect2@,$collect2,;t t
17718s,@gcc_cv_as@,$gcc_cv_as,;t t
17719s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
17720s,@gcc_cv_ld@,$gcc_cv_ld,;t t
17721s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
17722s,@gcc_cv_nm@,$gcc_cv_nm,;t t
17723s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
17724s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
17725s,@libgcc_visibility@,$libgcc_visibility,;t t
17726s,@GGC@,$GGC,;t t
17727s,@zlibdir@,$zlibdir,;t t
17728s,@zlibinc@,$zlibinc,;t t
17729s,@MAINT@,$MAINT,;t t
17730s,@gcc_tooldir@,$gcc_tooldir,;t t
17731s,@dollar@,$dollar,;t t
17732s,@slibdir@,$slibdir,;t t
17733s,@objdir@,$objdir,;t t
17734s,@subdirs@,$subdirs,;t t
17735s,@srcdir@,$srcdir,;t t
17736s,@all_compilers@,$all_compilers,;t t
17737s,@all_gtfiles@,$all_gtfiles,;t t
17738s,@all_lang_makefrags@,$all_lang_makefrags,;t t
17739s,@all_lang_makefiles@,$all_lang_makefiles,;t t
17740s,@all_languages@,$all_languages,;t t
17741s,@all_selected_languages@,$all_selected_languages,;t t
17742s,@build_exeext@,$build_exeext,;t t
17743s,@build_install_headers_dir@,$build_install_headers_dir,;t t
17744s,@build_xm_file_list@,$build_xm_file_list,;t t
17745s,@build_xm_include_list@,$build_xm_include_list,;t t
17746s,@build_xm_defines@,$build_xm_defines,;t t
17747s,@check_languages@,$check_languages,;t t
17748s,@cpp_install_dir@,$cpp_install_dir,;t t
17749s,@xmake_file@,$xmake_file,;t t
17750s,@tmake_file@,$tmake_file,;t t
17751s,@extra_gcc_objs@,$extra_gcc_objs,;t t
17752s,@extra_headers_list@,$extra_headers_list,;t t
17753s,@extra_objs@,$extra_objs,;t t
17754s,@extra_parts@,$extra_parts,;t t
17755s,@extra_passes@,$extra_passes,;t t
17756s,@extra_programs@,$extra_programs,;t t
17757s,@float_h_file@,$float_h_file,;t t
17758s,@gcc_config_arguments@,$gcc_config_arguments,;t t
17759s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
17760s,@host_exeext@,$host_exeext,;t t
17761s,@host_xm_file_list@,$host_xm_file_list,;t t
17762s,@host_xm_include_list@,$host_xm_include_list,;t t
17763s,@host_xm_defines@,$host_xm_defines,;t t
17764s,@out_host_hook_obj@,$out_host_hook_obj,;t t
17765s,@install@,$install,;t t
17766s,@lang_opt_files@,$lang_opt_files,;t t
17767s,@lang_specs_files@,$lang_specs_files,;t t
17768s,@lang_tree_files@,$lang_tree_files,;t t
17769s,@local_prefix@,$local_prefix,;t t
17770s,@md_file@,$md_file,;t t
17771s,@objc_boehm_gc@,$objc_boehm_gc,;t t
17772s,@out_file@,$out_file,;t t
17773s,@out_object_file@,$out_object_file,;t t
17774s,@thread_file@,$thread_file,;t t
17775s,@tm_file_list@,$tm_file_list,;t t
17776s,@tm_include_list@,$tm_include_list,;t t
17777s,@tm_defines@,$tm_defines,;t t
17778s,@tm_p_file_list@,$tm_p_file_list,;t t
17779s,@tm_p_include_list@,$tm_p_include_list,;t t
17780s,@xm_file_list@,$xm_file_list,;t t
17781s,@xm_include_list@,$xm_include_list,;t t
17782s,@xm_defines@,$xm_defines,;t t
17783s,@c_target_objs@,$c_target_objs,;t t
17784s,@cxx_target_objs@,$cxx_target_objs,;t t
17785s,@target_cpu_default@,$target_cpu_default,;t t
17786s,@GMPLIBS@,$GMPLIBS,;t t
17787s,@GMPINC@,$GMPINC,;t t
17788s,@LIBOBJS@,$LIBOBJS,;t t
17789s,@LTLIBOBJS@,$LTLIBOBJS,;t t
17790/@language_hooks@/r $language_hooks
17791s,@language_hooks@,,;t t
17792CEOF
17793
17794_ACEOF
17795
17796 cat >>$CONFIG_STATUS <<\_ACEOF
17797 # Split the substitutions into bite-sized pieces for seds with
17798 # small command number limits, like on Digital OSF/1 and HP-UX.
17799 ac_max_sed_lines=48
17800 ac_sed_frag=1 # Number of current file.
17801 ac_beg=1 # First line for current file.
17802 ac_end=$ac_max_sed_lines # Line after last line for current file.
17803 ac_more_lines=:
17804 ac_sed_cmds=
17805 while $ac_more_lines; do
17806 if test $ac_beg -gt 1; then
17807 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17808 else
17809 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17810 fi
17811 if test ! -s $tmp/subs.frag; then
17812 ac_more_lines=false
17813 else
17814 # The purpose of the label and of the branching condition is to
17815 # speed up the sed processing (if there are no `@' at all, there
17816 # is no need to browse any of the substitutions).
17817 # These are the two extra sed commands mentioned above.
17818 (echo ':t
17819 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17820 if test -z "$ac_sed_cmds"; then
17821 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17822 else
17823 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17824 fi
17825 ac_sed_frag=`expr $ac_sed_frag + 1`
17826 ac_beg=$ac_end
17827 ac_end=`expr $ac_end + $ac_max_sed_lines`
17828 fi
17829 done
17830 if test -z "$ac_sed_cmds"; then
17831 ac_sed_cmds=cat
703d89ab 17832 fi
a3bba767 17833fi # test -n "$CONFIG_FILES"
703d89ab 17834
b8ec3cc8 17835_ACEOF
ba479fd2 17836cat >>$CONFIG_STATUS <<\_ACEOF
a3bba767
JJ
17837for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17838 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17839 case $ac_file in
17840 - | *:- | *:-:* ) # input from stdin
17841 cat >$tmp/stdin
17842 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17843 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17844 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17845 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17846 * ) ac_file_in=$ac_file.in ;;
703d89ab
ZW
17847 esac
17848
a3bba767
JJ
17849 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17850 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
ba479fd2 17851$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17852 X"$ac_file" : 'X\(//\)[^/]' \| \
17853 X"$ac_file" : 'X\(//\)$' \| \
a3bba767
JJ
17854 X"$ac_file" : 'X\(/\)' \| \
17855 . : '\(.\)' 2>/dev/null ||
ba479fd2 17856echo X"$ac_file" |
a3bba767
JJ
17857 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17858 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17859 /^X\(\/\/\)$/{ s//\1/; q; }
17860 /^X\(\/\).*/{ s//\1/; q; }
17861 s/.*/./; q'`
17862 { if $as_mkdir_p; then
17863 mkdir -p "$ac_dir"
17864 else
17865 as_dir="$ac_dir"
ba479fd2 17866 as_dirs=
a3bba767
JJ
17867 while test ! -d "$as_dir"; do
17868 as_dirs="$as_dir $as_dirs"
17869 as_dir=`(dirname "$as_dir") 2>/dev/null ||
ba479fd2 17870$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17871 X"$as_dir" : 'X\(//\)[^/]' \| \
17872 X"$as_dir" : 'X\(//\)$' \| \
a3bba767
JJ
17873 X"$as_dir" : 'X\(/\)' \| \
17874 . : '\(.\)' 2>/dev/null ||
ba479fd2 17875echo X"$as_dir" |
a3bba767
JJ
17876 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17877 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17878 /^X\(\/\/\)$/{ s//\1/; q; }
17879 /^X\(\/\).*/{ s//\1/; q; }
17880 s/.*/./; q'`
ba479fd2 17881 done
a3bba767
JJ
17882 test ! -n "$as_dirs" || mkdir $as_dirs
17883 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17884echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
ba479fd2 17885 { (exit 1); exit 1; }; }; }
a3bba767 17886
ba479fd2
NN
17887 ac_builddir=.
17888
a3bba767 17889if test "$ac_dir" != .; then
ba479fd2 17890 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
a3bba767
JJ
17891 # A "../" for each directory in $ac_dir_suffix.
17892 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17893else
17894 ac_dir_suffix= ac_top_builddir=
17895fi
ba479fd2
NN
17896
17897case $srcdir in
a3bba767 17898 .) # No --srcdir option. We are building in place.
ba479fd2 17899 ac_srcdir=.
a3bba767
JJ
17900 if test -z "$ac_top_builddir"; then
17901 ac_top_srcdir=.
17902 else
17903 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17904 fi ;;
17905 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 17906 ac_srcdir=$srcdir$ac_dir_suffix;
a3bba767
JJ
17907 ac_top_srcdir=$srcdir ;;
17908 *) # Relative path.
17909 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17910 ac_top_srcdir=$ac_top_builddir$srcdir ;;
ba479fd2 17911esac
ba479fd2 17912
a3bba767
JJ
17913# Do not use `cd foo && pwd` to compute absolute paths, because
17914# the directories may not exist.
17915case `pwd` in
17916.) ac_abs_builddir="$ac_dir";;
17917*)
17918 case "$ac_dir" in
17919 .) ac_abs_builddir=`pwd`;;
17920 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17921 *) ac_abs_builddir=`pwd`/"$ac_dir";;
17922 esac;;
17923esac
17924case $ac_abs_builddir in
17925.) ac_abs_top_builddir=${ac_top_builddir}.;;
17926*)
17927 case ${ac_top_builddir}. in
17928 .) ac_abs_top_builddir=$ac_abs_builddir;;
17929 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
17930 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
17931 esac;;
17932esac
17933case $ac_abs_builddir in
17934.) ac_abs_srcdir=$ac_srcdir;;
17935*)
17936 case $ac_srcdir in
17937 .) ac_abs_srcdir=$ac_abs_builddir;;
17938 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
17939 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
17940 esac;;
17941esac
17942case $ac_abs_builddir in
17943.) ac_abs_top_srcdir=$ac_top_srcdir;;
17944*)
17945 case $ac_top_srcdir in
17946 .) ac_abs_top_srcdir=$ac_abs_builddir;;
17947 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
17948 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
17949 esac;;
17950esac
ba479fd2 17951
a6ccdbab 17952
703d89ab 17953
a3bba767
JJ
17954 if test x"$ac_file" != x-; then
17955 { echo "$as_me:$LINENO: creating $ac_file" >&5
17956echo "$as_me: creating $ac_file" >&6;}
17957 rm -f "$ac_file"
17958 fi
17959 # Let's still pretend it is `configure' which instantiates (i.e., don't
17960 # use $as_me), people would be surprised to read:
17961 # /* config.h. Generated by config.status. */
17962 if test x"$ac_file" = x-; then
17963 configure_input=
17964 else
17965 configure_input="$ac_file. "
17966 fi
17967 configure_input=$configure_input"Generated from `echo $ac_file_in |
17968 sed 's,.*/,,'` by configure."
17969
17970 # First look for the input files in the build tree, otherwise in the
17971 # src tree.
17972 ac_file_inputs=`IFS=:
17973 for f in $ac_file_in; do
17974 case $f in
17975 -) echo $tmp/stdin ;;
17976 [\\/$]*)
17977 # Absolute (can't be DOS-style, as IFS=:)
17978 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17979echo "$as_me: error: cannot find input file: $f" >&2;}
17980 { (exit 1); exit 1; }; }
17981 echo "$f";;
17982 *) # Relative
17983 if test -f "$f"; then
17984 # Build tree
17985 echo "$f"
17986 elif test -f "$srcdir/$f"; then
17987 # Source tree
17988 echo "$srcdir/$f"
17989 else
17990 # /dev/null tree
17991 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17992echo "$as_me: error: cannot find input file: $f" >&2;}
17993 { (exit 1); exit 1; }; }
17994 fi;;
17995 esac
17996 done` || { (exit 1); exit 1; }
a6ccdbab 17997_ACEOF
ba479fd2
NN
17998cat >>$CONFIG_STATUS <<_ACEOF
17999 sed "$ac_vpsub
18000$extrasub
18001_ACEOF
18002cat >>$CONFIG_STATUS <<\_ACEOF
18003:t
18004/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
a3bba767
JJ
18005s,@configure_input@,$configure_input,;t t
18006s,@srcdir@,$ac_srcdir,;t t
18007s,@abs_srcdir@,$ac_abs_srcdir,;t t
18008s,@top_srcdir@,$ac_top_srcdir,;t t
18009s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18010s,@builddir@,$ac_builddir,;t t
18011s,@abs_builddir@,$ac_abs_builddir,;t t
18012s,@top_builddir@,$ac_top_builddir,;t t
18013s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18014" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18015 rm -f $tmp/stdin
18016 if test x"$ac_file" != x-; then
18017 mv $tmp/out $ac_file
18018 else
18019 cat $tmp/out
18020 rm -f $tmp/out
18021 fi
18022
18023done
18024_ACEOF
18025cat >>$CONFIG_STATUS <<\_ACEOF
18026
18027#
18028# CONFIG_HEADER section.
18029#
18030
18031# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18032# NAME is the cpp macro being defined and VALUE is the value it is being given.
18033#
18034# ac_d sets the value in "#define NAME VALUE" lines.
18035ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18036ac_dB='[ ].*$,\1#\2'
18037ac_dC=' '
18038ac_dD=',;t'
18039# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18040ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18041ac_uB='$,\1#\2define\3'
18042ac_uC=' '
18043ac_uD=',;t'
18044
18045for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18046 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2 18047 case $ac_file in
a3bba767
JJ
18048 - | *:- | *:-:* ) # input from stdin
18049 cat >$tmp/stdin
18050 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18051 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18052 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18053 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18054 * ) ac_file_in=$ac_file.in ;;
861bb6c1 18055 esac
a3bba767
JJ
18056
18057 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18058echo "$as_me: creating $ac_file" >&6;}
18059
18060 # First look for the input files in the build tree, otherwise in the
18061 # src tree.
18062 ac_file_inputs=`IFS=:
18063 for f in $ac_file_in; do
18064 case $f in
18065 -) echo $tmp/stdin ;;
18066 [\\/$]*)
18067 # Absolute (can't be DOS-style, as IFS=:)
18068 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18069echo "$as_me: error: cannot find input file: $f" >&2;}
18070 { (exit 1); exit 1; }; }
18071 # Do quote $f, to prevent DOS paths from being IFS'd.
18072 echo "$f";;
18073 *) # Relative
18074 if test -f "$f"; then
18075 # Build tree
18076 echo "$f"
18077 elif test -f "$srcdir/$f"; then
18078 # Source tree
18079 echo "$srcdir/$f"
18080 else
18081 # /dev/null tree
18082 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18083echo "$as_me: error: cannot find input file: $f" >&2;}
18084 { (exit 1); exit 1; }; }
18085 fi;;
18086 esac
18087 done` || { (exit 1); exit 1; }
18088 # Remove the trailing spaces.
18089 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18090
18091_ACEOF
18092
18093# Transform confdefs.h into two sed scripts, `conftest.defines' and
18094# `conftest.undefs', that substitutes the proper values into
18095# config.h.in to produce config.h. The first handles `#define'
18096# templates, and the second `#undef' templates.
18097# And first: Protect against being on the right side of a sed subst in
18098# config.status. Protect against being in an unquoted here document
18099# in config.status.
18100rm -f conftest.defines conftest.undefs
18101# Using a here document instead of a string reduces the quoting nightmare.
18102# Putting comments in sed scripts is not portable.
18103#
18104# `end' is used to avoid that the second main sed command (meant for
18105# 0-ary CPP macros) applies to n-ary macro definitions.
18106# See the Autoconf documentation for `clear'.
18107cat >confdef2sed.sed <<\_ACEOF
18108s/[\\&,]/\\&/g
18109s,[\\$`],\\&,g
18110t clear
18111: clear
18112s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18113t end
18114s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18115: end
18116_ACEOF
18117# If some macros were called several times there might be several times
18118# the same #defines, which is useless. Nevertheless, we may not want to
18119# sort them, since we want the *last* AC-DEFINE to be honored.
18120uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18121sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18122rm -f confdef2sed.sed
18123
18124# This sed command replaces #undef with comments. This is necessary, for
861bb6c1
JL
18125# example, in the case of _POSIX_SOURCE, which is predefined and required
18126# on some systems where configure will not decide to define it.
a3bba767
JJ
18127cat >>conftest.undefs <<\_ACEOF
18128s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18129_ACEOF
18130
18131# Break up conftest.defines because some shells have a limit on the size
18132# of here documents, and old seds have small limits too (100 cmds).
18133echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
18134echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
18135echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18136echo ' :' >>$CONFIG_STATUS
18137rm -f conftest.tail
18138while grep . conftest.defines >/dev/null
ba479fd2 18139do
a3bba767
JJ
18140 # Write a limited-size here document to $tmp/defines.sed.
18141 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18142 # Speed up: don't consider the non `#define' lines.
18143 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18144 # Work around the forget-to-reset-the-flag bug.
18145 echo 't clr' >>$CONFIG_STATUS
18146 echo ': clr' >>$CONFIG_STATUS
18147 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
ba479fd2 18148 echo 'CEOF
a3bba767
JJ
18149 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18150 rm -f $tmp/in
18151 mv $tmp/out $tmp/in
18152' >>$CONFIG_STATUS
18153 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
ba479fd2
NN
18154 rm -f conftest.defines
18155 mv conftest.tail conftest.defines
18156done
a3bba767
JJ
18157rm -f conftest.defines
18158echo ' fi # grep' >>$CONFIG_STATUS
18159echo >>$CONFIG_STATUS
18160
18161# Break up conftest.undefs because some shells have a limit on the size
18162# of here documents, and old seds have small limits too (100 cmds).
18163echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18164rm -f conftest.tail
18165while grep . conftest.undefs >/dev/null
18166do
18167 # Write a limited-size here document to $tmp/undefs.sed.
18168 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18169 # Speed up: don't consider the non `#undef'
18170 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18171 # Work around the forget-to-reset-the-flag bug.
18172 echo 't clr' >>$CONFIG_STATUS
18173 echo ': clr' >>$CONFIG_STATUS
18174 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18175 echo 'CEOF
18176 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18177 rm -f $tmp/in
18178 mv $tmp/out $tmp/in
18179' >>$CONFIG_STATUS
18180 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18181 rm -f conftest.undefs
18182 mv conftest.tail conftest.undefs
18183done
18184rm -f conftest.undefs
ba479fd2
NN
18185
18186cat >>$CONFIG_STATUS <<\_ACEOF
a3bba767
JJ
18187 # Let's still pretend it is `configure' which instantiates (i.e., don't
18188 # use $as_me), people would be surprised to read:
18189 # /* config.h. Generated by config.status. */
18190 if test x"$ac_file" = x-; then
18191 echo "/* Generated by configure. */" >$tmp/config.h
18192 else
18193 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
18194 fi
18195 cat $tmp/in >>$tmp/config.h
18196 rm -f $tmp/in
ba479fd2 18197 if test x"$ac_file" != x-; then
a3bba767 18198 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
ba479fd2
NN
18199 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18200echo "$as_me: $ac_file is unchanged" >&6;}
18201 else
a3bba767
JJ
18202 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18203$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18204 X"$ac_file" : 'X\(//\)[^/]' \| \
18205 X"$ac_file" : 'X\(//\)$' \| \
18206 X"$ac_file" : 'X\(/\)' \| \
18207 . : '\(.\)' 2>/dev/null ||
18208echo X"$ac_file" |
18209 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18210 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18211 /^X\(\/\/\)$/{ s//\1/; q; }
18212 /^X\(\/\).*/{ s//\1/; q; }
18213 s/.*/./; q'`
18214 { if $as_mkdir_p; then
18215 mkdir -p "$ac_dir"
18216 else
18217 as_dir="$ac_dir"
18218 as_dirs=
18219 while test ! -d "$as_dir"; do
18220 as_dirs="$as_dir $as_dirs"
18221 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18222$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18223 X"$as_dir" : 'X\(//\)[^/]' \| \
18224 X"$as_dir" : 'X\(//\)$' \| \
18225 X"$as_dir" : 'X\(/\)' \| \
18226 . : '\(.\)' 2>/dev/null ||
18227echo X"$as_dir" |
18228 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18229 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18230 /^X\(\/\/\)$/{ s//\1/; q; }
18231 /^X\(\/\).*/{ s//\1/; q; }
18232 s/.*/./; q'`
18233 done
18234 test ! -n "$as_dirs" || mkdir $as_dirs
18235 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18236echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18237 { (exit 1); exit 1; }; }; }
18238
ba479fd2 18239 rm -f $ac_file
a3bba767 18240 mv $tmp/config.h $ac_file
ba479fd2
NN
18241 fi
18242 else
a3bba767
JJ
18243 cat $tmp/config.h
18244 rm -f $tmp/config.h
ba479fd2 18245 fi
a3bba767
JJ
18246done
18247_ACEOF
18248cat >>$CONFIG_STATUS <<\_ACEOF
8b1f719a 18249
a3bba767
JJ
18250#
18251# CONFIG_COMMANDS section.
18252#
18253for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18254 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18255 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18256 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
18257$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18258 X"$ac_dest" : 'X\(//\)[^/]' \| \
18259 X"$ac_dest" : 'X\(//\)$' \| \
18260 X"$ac_dest" : 'X\(/\)' \| \
18261 . : '\(.\)' 2>/dev/null ||
18262echo X"$ac_dest" |
18263 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18264 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18265 /^X\(\/\/\)$/{ s//\1/; q; }
18266 /^X\(\/\).*/{ s//\1/; q; }
18267 s/.*/./; q'`
18268 { if $as_mkdir_p; then
18269 mkdir -p "$ac_dir"
18270 else
18271 as_dir="$ac_dir"
18272 as_dirs=
18273 while test ! -d "$as_dir"; do
18274 as_dirs="$as_dir $as_dirs"
18275 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18276$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18277 X"$as_dir" : 'X\(//\)[^/]' \| \
18278 X"$as_dir" : 'X\(//\)$' \| \
18279 X"$as_dir" : 'X\(/\)' \| \
18280 . : '\(.\)' 2>/dev/null ||
18281echo X"$as_dir" |
18282 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18283 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18284 /^X\(\/\/\)$/{ s//\1/; q; }
18285 /^X\(\/\).*/{ s//\1/; q; }
18286 s/.*/./; q'`
18287 done
18288 test ! -n "$as_dirs" || mkdir $as_dirs
18289 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18290echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18291 { (exit 1); exit 1; }; }; }
8b1f719a 18292
a3bba767 18293 ac_builddir=.
8b1f719a 18294
a3bba767
JJ
18295if test "$ac_dir" != .; then
18296 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18297 # A "../" for each directory in $ac_dir_suffix.
18298 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18299else
18300 ac_dir_suffix= ac_top_builddir=
18301fi
18302
18303case $srcdir in
18304 .) # No --srcdir option. We are building in place.
18305 ac_srcdir=.
18306 if test -z "$ac_top_builddir"; then
18307 ac_top_srcdir=.
18308 else
18309 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18310 fi ;;
18311 [\\/]* | ?:[\\/]* ) # Absolute path.
18312 ac_srcdir=$srcdir$ac_dir_suffix;
18313 ac_top_srcdir=$srcdir ;;
18314 *) # Relative path.
18315 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18316 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18317esac
18318
18319# Do not use `cd foo && pwd` to compute absolute paths, because
18320# the directories may not exist.
18321case `pwd` in
18322.) ac_abs_builddir="$ac_dir";;
18323*)
18324 case "$ac_dir" in
18325 .) ac_abs_builddir=`pwd`;;
18326 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
18327 *) ac_abs_builddir=`pwd`/"$ac_dir";;
18328 esac;;
18329esac
18330case $ac_abs_builddir in
18331.) ac_abs_top_builddir=${ac_top_builddir}.;;
18332*)
18333 case ${ac_top_builddir}. in
18334 .) ac_abs_top_builddir=$ac_abs_builddir;;
18335 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
18336 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
18337 esac;;
18338esac
18339case $ac_abs_builddir in
18340.) ac_abs_srcdir=$ac_srcdir;;
18341*)
18342 case $ac_srcdir in
18343 .) ac_abs_srcdir=$ac_abs_builddir;;
18344 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
18345 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
18346 esac;;
18347esac
18348case $ac_abs_builddir in
18349.) ac_abs_top_srcdir=$ac_top_srcdir;;
18350*)
18351 case $ac_top_srcdir in
18352 .) ac_abs_top_srcdir=$ac_abs_builddir;;
18353 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
18354 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
18355 esac;;
18356esac
18357
18358
18359 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
18360echo "$as_me: executing $ac_dest commands" >&6;}
18361 case $ac_dest in
18362 default )
f1faaabd
NN
18363case ${CONFIG_HEADERS} in
18364 *auto-host.h:config.in*)
18365 echo > cstamp-h ;;
861bb6c1 18366esac
2ed26f6b 18367# Make sure all the subdirs exist.
3b620440 18368for d in $subdirs doc build
2ed26f6b 18369do
2ed26f6b 18370 test -d $d || mkdir $d
2ed26f6b 18371done
ba479fd2
NN
18372 ;;
18373 esac
a3bba767
JJ
18374done
18375_ACEOF
cafe096b 18376
a3bba767 18377cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
18378
18379{ (exit 0); exit 0; }
18380_ACEOF
861bb6c1 18381chmod +x $CONFIG_STATUS
ba479fd2
NN
18382ac_clean_files=$ac_clean_files_save
18383
18384
18385# configure is writing to config.log, and then calls config.status.
18386# config.status does its own redirection, appending to config.log.
18387# Unfortunately, on DOS this fails, as config.log is still kept open
18388# by configure, so config.status won't be able to write to it; its
18389# output is simply discarded. So we exec the FD to /dev/null,
18390# effectively closing config.log, so it can be properly (re)opened and
18391# appended to by config.status. When coming back to configure, we
18392# need to make the FD available again.
18393if test "$no_create" != yes; then
18394 ac_cs_success=:
18395 ac_config_status_args=
18396 test "$silent" = yes &&
18397 ac_config_status_args="$ac_config_status_args --quiet"
18398 exec 5>/dev/null
18399 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18400 exec 5>>config.log
18401 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18402 # would make configure fail if this is the last instruction.
18403 $ac_cs_success || { (exit 1); exit 1; }
18404fi
861bb6c1 18405