]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
re PR libgomp/32468 (number of threads in a parallel region depends on number of...
[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
3bbd5a19 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 loose_warn cxx_compat_warn strict_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.
3bbd5a19 865 --enable-werror-always enable -Werror despite compiler version
ba479fd2
NN
866 --enable-checking=LIST
867 enable expensive run-time checks. With LIST,
868 enable only specific categories of checks.
cdce5c16 869 Categories are: yes,no,all,none,release.
3089f8b5 870 Flags are: assert,df,fold,gc,gcac,misc,
cdce5c16 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
4ef2b6ed 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
2091ff66
NF
1770gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
1771
1772cat >>confdefs.h <<_ACEOF
1773#define HAVE_GNU_LD $gnu_ld
1774_ACEOF
1775
1776
a3bba767
JJ
1777echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1778echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1779if test x"${DEFAULT_LINKER+set}" = x"set"; then
1780 if test x"$gnu_ld_flag" = x"no"; then
a3bba767
JJ
1781 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1782echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1783 else
a3bba767
JJ
1784 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1785echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1786 fi
1787else
a3bba767
JJ
1788 echo "$as_me:$LINENO: result: no" >&5
1789echo "${ECHO_T}no" >&6
34a86c2b
NN
1790fi
1791
d594623a
L
1792# With demangler in GNU ld
1793
a3bba767 1794# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
d594623a 1795if test "${with_demangler_in_ld+set}" = set; then
a3bba767
JJ
1796 withval="$with_demangler_in_ld"
1797 demangler_in_ld="$with_demangler_in_ld"
d594623a
L
1798else
1799 demangler_in_ld=no
a3bba767 1800fi;
d594623a 1801
34a86c2b
NN
1802# ----------------------
1803# Find default assembler
1804# ----------------------
1805
1806# With GNU as
ba479fd2 1807
a3bba767 1808# Check whether --with-gnu-as or --without-gnu-as was given.
34a86c2b 1809if test "${with_gnu_as+set}" = set; then
a3bba767
JJ
1810 withval="$with_gnu_as"
1811 gas_flag="$with_gnu_as"
34a86c2b
NN
1812else
1813 gas_flag=no
a3bba767 1814fi;
a6ccdbab 1815
703d89ab 1816
a3bba767 1817# Check whether --with-as or --without-as was given.
34a86c2b 1818if test "${with_as+set}" = set; then
a3bba767
JJ
1819 withval="$with_as"
1820 DEFAULT_ASSEMBLER="$with_as"
1821fi;
34a86c2b
NN
1822if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1823 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1824 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1825echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1826 { (exit 1); exit 1; }; }
34a86c2b
NN
1827 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1828 gas_flag=yes
1829 fi
ba479fd2
NN
1830
1831cat >>confdefs.h <<_ACEOF
34a86c2b 1832#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1833_ACEOF
34a86c2b
NN
1834
1835fi
1836
a3bba767
JJ
1837echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1838echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1839if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1840 if test x"$gas_flag" = x"no"; then
a3bba767
JJ
1841 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1842echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1843 else
a3bba767
JJ
1844 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1845echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1846 fi
1847else
a3bba767
JJ
1848 echo "$as_me:$LINENO: result: no" >&5
1849echo "${ECHO_T}no" >&6
34a86c2b
NN
1850fi
1851
1852# ---------------
1853# Find C compiler
1854# ---------------
1855
426ca3ca
RO
1856# If a non-executable a.out is present (e.g. created by GNU as above even if
1857# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1858# file, even when creating an executable, so an execution test fails.
1859# Remove possible default executable files to avoid this.
1860#
1861# FIXME: This really belongs into AC_PROG_CC and can be removed once
1862# Autoconf includes it.
1863rm -f a.out a.exe b.out
1864
34a86c2b 1865# Find the native compiler
ba479fd2
NN
1866ac_ext=c
1867ac_cpp='$CPP $CPPFLAGS'
1868ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1869ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1870ac_compiler_gnu=$ac_cv_c_compiler_gnu
1871if test -n "$ac_tool_prefix"; then
1872 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1873set dummy ${ac_tool_prefix}gcc; ac_word=$2
a3bba767
JJ
1874echo "$as_me:$LINENO: checking for $ac_word" >&5
1875echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
1876if test "${ac_cv_prog_CC+set}" = set; then
1877 echo $ECHO_N "(cached) $ECHO_C" >&6
1878else
1879 if test -n "$CC"; then
1880 ac_cv_prog_CC="$CC" # Let the user override the test.
1881else
1882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1883for as_dir in $PATH
1884do
1885 IFS=$as_save_IFS
1886 test -z "$as_dir" && as_dir=.
1887 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 1888 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
1889 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1890 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1891 break 2
1892 fi
1893done
1894done
1895
1896fi
1897fi
1898CC=$ac_cv_prog_CC
1899if test -n "$CC"; then
a3bba767
JJ
1900 echo "$as_me:$LINENO: result: $CC" >&5
1901echo "${ECHO_T}$CC" >&6
ba479fd2 1902else
a3bba767
JJ
1903 echo "$as_me:$LINENO: result: no" >&5
1904echo "${ECHO_T}no" >&6
ba479fd2
NN
1905fi
1906
1907fi
1908if test -z "$ac_cv_prog_CC"; then
1909 ac_ct_CC=$CC
1910 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1911set dummy gcc; ac_word=$2
a3bba767
JJ
1912echo "$as_me:$LINENO: checking for $ac_word" >&5
1913echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
1914if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1915 echo $ECHO_N "(cached) $ECHO_C" >&6
1916else
1917 if test -n "$ac_ct_CC"; then
1918 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1919else
1920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1921for as_dir in $PATH
1922do
1923 IFS=$as_save_IFS
1924 test -z "$as_dir" && as_dir=.
1925 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 1926 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
1927 ac_cv_prog_ac_ct_CC="gcc"
1928 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1929 break 2
1930 fi
1931done
1932done
1933
1934fi
1935fi
1936ac_ct_CC=$ac_cv_prog_ac_ct_CC
1937if test -n "$ac_ct_CC"; then
a3bba767
JJ
1938 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1939echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 1940else
a3bba767
JJ
1941 echo "$as_me:$LINENO: result: no" >&5
1942echo "${ECHO_T}no" >&6
ba479fd2
NN
1943fi
1944
a3bba767 1945 CC=$ac_ct_CC
ba479fd2
NN
1946else
1947 CC="$ac_cv_prog_CC"
1948fi
1949
1950if test -z "$CC"; then
a3bba767
JJ
1951 if test -n "$ac_tool_prefix"; then
1952 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
ba479fd2 1953set dummy ${ac_tool_prefix}cc; ac_word=$2
a3bba767
JJ
1954echo "$as_me:$LINENO: checking for $ac_word" >&5
1955echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
1956if test "${ac_cv_prog_CC+set}" = set; then
1957 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1958else
1959 if test -n "$CC"; then
1960 ac_cv_prog_CC="$CC" # Let the user override the test.
1961else
ba479fd2
NN
1962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1963for as_dir in $PATH
1964do
1965 IFS=$as_save_IFS
1966 test -z "$as_dir" && as_dir=.
1967 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 1968 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
1969 ac_cv_prog_CC="${ac_tool_prefix}cc"
1970 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1971 break 2
1972 fi
1973done
1974done
1975
cd9e5e7c
MK
1976fi
1977fi
ba479fd2 1978CC=$ac_cv_prog_CC
cd9e5e7c 1979if test -n "$CC"; then
a3bba767
JJ
1980 echo "$as_me:$LINENO: result: $CC" >&5
1981echo "${ECHO_T}$CC" >&6
8b1f719a 1982else
a3bba767
JJ
1983 echo "$as_me:$LINENO: result: no" >&5
1984echo "${ECHO_T}no" >&6
8b1f719a
PB
1985fi
1986
a3bba767
JJ
1987fi
1988if test -z "$ac_cv_prog_CC"; then
1989 ac_ct_CC=$CC
1990 # Extract the first word of "cc", so it can be a program name with args.
1991set dummy cc; ac_word=$2
1992echo "$as_me:$LINENO: checking for $ac_word" >&5
1993echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1994if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1995 echo $ECHO_N "(cached) $ECHO_C" >&6
1996else
1997 if test -n "$ac_ct_CC"; then
1998 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1999else
2000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2001for as_dir in $PATH
2002do
2003 IFS=$as_save_IFS
2004 test -z "$as_dir" && as_dir=.
2005 for ac_exec_ext in '' $ac_executable_extensions; do
2006 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2007 ac_cv_prog_ac_ct_CC="cc"
2008 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2009 break 2
703d89ab 2010 fi
a3bba767
JJ
2011done
2012done
2013
2014fi
2015fi
2016ac_ct_CC=$ac_cv_prog_ac_ct_CC
2017if test -n "$ac_ct_CC"; then
2018 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2019echo "${ECHO_T}$ac_ct_CC" >&6
2020else
2021 echo "$as_me:$LINENO: result: no" >&5
2022echo "${ECHO_T}no" >&6
2023fi
2024
2025 CC=$ac_ct_CC
2026else
2027 CC="$ac_cv_prog_CC"
2028fi
2029
ba479fd2 2030fi
6e3f3080
NN
2031if test -z "$CC"; then
2032 # Extract the first word of "cc", so it can be a program name with args.
2033set dummy cc; ac_word=$2
a3bba767
JJ
2034echo "$as_me:$LINENO: checking for $ac_word" >&5
2035echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2036if test "${ac_cv_prog_CC+set}" = set; then
2037 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2038else
2039 if test -n "$CC"; then
2040 ac_cv_prog_CC="$CC" # Let the user override the test.
2041else
2042 ac_prog_rejected=no
ba479fd2
NN
2043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2044for as_dir in $PATH
2045do
2046 IFS=$as_save_IFS
2047 test -z "$as_dir" && as_dir=.
2048 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 2049 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2050 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2051 ac_prog_rejected=yes
2052 continue
2053 fi
2054 ac_cv_prog_CC="cc"
2055 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2056 break 2
2057 fi
2058done
2059done
2060
6e3f3080
NN
2061if test $ac_prog_rejected = yes; then
2062 # We found a bogon in the path, so make sure we never use it.
2063 set dummy $ac_cv_prog_CC
2064 shift
ba479fd2 2065 if test $# != 0; then
6e3f3080
NN
2066 # We chose a different compiler from the bogus one.
2067 # However, it has the same basename, so the bogon will be chosen
2068 # first if we set CC to just the basename; use the full file name.
2069 shift
ba479fd2 2070 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2071 fi
6e3f3080
NN
2072fi
2073fi
2074fi
ba479fd2 2075CC=$ac_cv_prog_CC
6e3f3080 2076if test -n "$CC"; then
a3bba767
JJ
2077 echo "$as_me:$LINENO: result: $CC" >&5
2078echo "${ECHO_T}$CC" >&6
e9a25f70 2079else
a3bba767
JJ
2080 echo "$as_me:$LINENO: result: no" >&5
2081echo "${ECHO_T}no" >&6
e9a25f70 2082fi
6e3f3080 2083
ba479fd2
NN
2084fi
2085if test -z "$CC"; then
2086 if test -n "$ac_tool_prefix"; then
a3bba767 2087 for ac_prog in cl
ba479fd2
NN
2088 do
2089 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2090set dummy $ac_tool_prefix$ac_prog; ac_word=$2
a3bba767
JJ
2091echo "$as_me:$LINENO: checking for $ac_word" >&5
2092echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2093if test "${ac_cv_prog_CC+set}" = set; then
2094 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2095else
6e3f3080
NN
2096 if test -n "$CC"; then
2097 ac_cv_prog_CC="$CC" # Let the user override the test.
2098else
ba479fd2
NN
2099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2100for as_dir in $PATH
2101do
2102 IFS=$as_save_IFS
2103 test -z "$as_dir" && as_dir=.
2104 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 2105 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2106 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2107 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2108 break 2
2109 fi
2110done
2111done
2112
093e61a6 2113fi
6e3f3080 2114fi
ba479fd2 2115CC=$ac_cv_prog_CC
6e3f3080 2116if test -n "$CC"; then
a3bba767
JJ
2117 echo "$as_me:$LINENO: result: $CC" >&5
2118echo "${ECHO_T}$CC" >&6
6e3f3080 2119else
a3bba767
JJ
2120 echo "$as_me:$LINENO: result: no" >&5
2121echo "${ECHO_T}no" >&6
093e61a6 2122fi
cafe096b 2123
ba479fd2
NN
2124 test -n "$CC" && break
2125 done
2126fi
2127if test -z "$CC"; then
2128 ac_ct_CC=$CC
a3bba767 2129 for ac_prog in cl
ba479fd2
NN
2130do
2131 # Extract the first word of "$ac_prog", so it can be a program name with args.
2132set dummy $ac_prog; ac_word=$2
a3bba767
JJ
2133echo "$as_me:$LINENO: checking for $ac_word" >&5
2134echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2135if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2136 echo $ECHO_N "(cached) $ECHO_C" >&6
2137else
2138 if test -n "$ac_ct_CC"; then
2139 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2140else
2141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2142for as_dir in $PATH
2143do
2144 IFS=$as_save_IFS
2145 test -z "$as_dir" && as_dir=.
2146 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 2147 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2148 ac_cv_prog_ac_ct_CC="$ac_prog"
2149 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2150 break 2
2151 fi
2152done
2153done
6e3f3080 2154
ba479fd2
NN
2155fi
2156fi
2157ac_ct_CC=$ac_cv_prog_ac_ct_CC
2158if test -n "$ac_ct_CC"; then
a3bba767
JJ
2159 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2160echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 2161else
a3bba767
JJ
2162 echo "$as_me:$LINENO: result: no" >&5
2163echo "${ECHO_T}no" >&6
ba479fd2 2164fi
6e3f3080 2165
ba479fd2
NN
2166 test -n "$ac_ct_CC" && break
2167done
63cf211a 2168
a3bba767 2169 CC=$ac_ct_CC
ba479fd2
NN
2170fi
2171
2172fi
2173
2174
2175test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2176See \`config.log' for more details." >&5
2177echo "$as_me: error: no acceptable C compiler found in \$PATH
2178See \`config.log' for more details." >&2;}
2179 { (exit 1); exit 1; }; }
2180
2181# Provide some information about the compiler.
a3bba767
JJ
2182echo "$as_me:$LINENO:" \
2183 "checking for C compiler version" >&5
ba479fd2 2184ac_compiler=`set X $ac_compile; echo $2`
a3bba767
JJ
2185{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2186 (eval $ac_compiler --version </dev/null >&5) 2>&5
ba479fd2
NN
2187 ac_status=$?
2188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2189 (exit $ac_status); }
a3bba767
JJ
2190{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2191 (eval $ac_compiler -v </dev/null >&5) 2>&5
ba479fd2
NN
2192 ac_status=$?
2193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2194 (exit $ac_status); }
a3bba767
JJ
2195{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2196 (eval $ac_compiler -V </dev/null >&5) 2>&5
ba479fd2
NN
2197 ac_status=$?
2198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2199 (exit $ac_status); }
2200
2201cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2202/* confdefs.h. */
2203_ACEOF
2204cat confdefs.h >>conftest.$ac_ext
2205cat >>conftest.$ac_ext <<_ACEOF
2206/* end confdefs.h. */
2207
2208int
2209main ()
2210{
63cf211a 2211
ba479fd2
NN
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216ac_clean_files_save=$ac_clean_files
2217ac_clean_files="$ac_clean_files a.out a.exe b.out"
2218# Try to create an executable without -o first, disregard a.out.
2219# It will help us diagnose broken compilers, and finding out an intuition
2220# of exeext.
a3bba767
JJ
2221echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2222echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2 2223ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
a3bba767
JJ
2224if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2225 (eval $ac_link_default) 2>&5
ba479fd2
NN
2226 ac_status=$?
2227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2228 (exit $ac_status); }; then
a3bba767
JJ
2229 # Find the output, starting from the most likely. This scheme is
2230# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2231# resort.
2232
2233# Be careful to initialize this variable, since it used to be cached.
2234# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2235ac_cv_exeext=
2236# b.out is created by i960 compilers.
2237for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
ba479fd2
NN
2238do
2239 test -f "$ac_file" || continue
2240 case $ac_file in
a3bba767
JJ
2241 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2242 ;;
2243 conftest.$ac_ext )
2244 # This is the source file.
86da66b5 2245 ;;
ba479fd2 2246 [ab].out )
86da66b5
HPN
2247 # We found the default executable, but exeext='' is most
2248 # certainly right.
2249 break;;
ba479fd2 2250 *.* )
a3bba767
JJ
2251 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2252 # FIXME: I believe we export ac_cv_exeext for Libtool,
2253 # but it would be cool to find out if it's true. Does anybody
2254 # maintain Libtool? --akim.
2255 export ac_cv_exeext
86da66b5 2256 break;;
ba479fd2 2257 * )
86da66b5 2258 break;;
ba479fd2
NN
2259 esac
2260done
2261else
2262 echo "$as_me: failed program was:" >&5
2263sed 's/^/| /' conftest.$ac_ext >&5
2264
2265{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2266See \`config.log' for more details." >&5
2267echo "$as_me: error: C compiler cannot create executables
2268See \`config.log' for more details." >&2;}
2269 { (exit 77); exit 77; }; }
2270fi
2271
2272ac_exeext=$ac_cv_exeext
a3bba767
JJ
2273echo "$as_me:$LINENO: result: $ac_file" >&5
2274echo "${ECHO_T}$ac_file" >&6
ba479fd2 2275
a3bba767 2276# Check the compiler produces executables we can run. If not, either
ba479fd2 2277# the compiler is broken, or we cross compile.
a3bba767
JJ
2278echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2279echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
ba479fd2
NN
2280# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2281# If not cross compiling, check that we can run a simple program.
2282if test "$cross_compiling" != yes; then
2283 if { ac_try='./$ac_file'
a3bba767
JJ
2284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2285 (eval $ac_try) 2>&5
ba479fd2
NN
2286 ac_status=$?
2287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2288 (exit $ac_status); }; }; then
2289 cross_compiling=no
6e3f3080 2290 else
ba479fd2
NN
2291 if test "$cross_compiling" = maybe; then
2292 cross_compiling=yes
2293 else
2294 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2295If you meant to cross compile, use \`--host'.
2296See \`config.log' for more details." >&5
2297echo "$as_me: error: cannot run C compiled programs.
2298If you meant to cross compile, use \`--host'.
2299See \`config.log' for more details." >&2;}
2300 { (exit 1); exit 1; }; }
2301 fi
6e3f3080
NN
2302 fi
2303fi
a3bba767
JJ
2304echo "$as_me:$LINENO: result: yes" >&5
2305echo "${ECHO_T}yes" >&6
ba479fd2
NN
2306
2307rm -f a.out a.exe conftest$ac_cv_exeext b.out
2308ac_clean_files=$ac_clean_files_save
a3bba767 2309# Check the compiler produces executables we can run. If not, either
ba479fd2 2310# the compiler is broken, or we cross compile.
a3bba767
JJ
2311echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2312echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2313echo "$as_me:$LINENO: result: $cross_compiling" >&5
2314echo "${ECHO_T}$cross_compiling" >&6
2315
2316echo "$as_me:$LINENO: checking for suffix of executables" >&5
2317echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2319 (eval $ac_link) 2>&5
ba479fd2
NN
2320 ac_status=$?
2321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2322 (exit $ac_status); }; then
2323 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2324# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2325# work properly (i.e., refer to `conftest.exe'), while it won't with
2326# `rm'.
2327for ac_file in conftest.exe conftest conftest.*; do
2328 test -f "$ac_file" || continue
2329 case $ac_file in
a3bba767 2330 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
ba479fd2 2331 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
a3bba767 2332 export ac_cv_exeext
86da66b5 2333 break;;
ba479fd2
NN
2334 * ) break;;
2335 esac
2336done
e9a25f70 2337else
ba479fd2
NN
2338 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2339See \`config.log' for more details." >&5
2340echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2341See \`config.log' for more details." >&2;}
2342 { (exit 1); exit 1; }; }
2343fi
2344
2345rm -f conftest$ac_cv_exeext
a3bba767
JJ
2346echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2347echo "${ECHO_T}$ac_cv_exeext" >&6
ba479fd2
NN
2348
2349rm -f conftest.$ac_ext
2350EXEEXT=$ac_cv_exeext
2351ac_exeext=$EXEEXT
a3bba767
JJ
2352echo "$as_me:$LINENO: checking for suffix of object files" >&5
2353echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
ba479fd2
NN
2354if test "${ac_cv_objext+set}" = set; then
2355 echo $ECHO_N "(cached) $ECHO_C" >&6
2356else
2357 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2358/* confdefs.h. */
2359_ACEOF
2360cat confdefs.h >>conftest.$ac_ext
2361cat >>conftest.$ac_ext <<_ACEOF
2362/* end confdefs.h. */
2363
2364int
2365main ()
2366{
6e3f3080 2367
ba479fd2
NN
2368 ;
2369 return 0;
2370}
2371_ACEOF
2372rm -f conftest.o conftest.obj
a3bba767
JJ
2373if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2374 (eval $ac_compile) 2>&5
ba479fd2
NN
2375 ac_status=$?
2376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2377 (exit $ac_status); }; then
a3bba767 2378 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
ba479fd2 2379 case $ac_file in
a3bba767 2380 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
ba479fd2
NN
2381 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2382 break;;
2383 esac
2384done
63cf211a 2385else
ba479fd2
NN
2386 echo "$as_me: failed program was:" >&5
2387sed 's/^/| /' conftest.$ac_ext >&5
2388
2389{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2390See \`config.log' for more details." >&5
2391echo "$as_me: error: cannot compute suffix of object files: cannot compile
2392See \`config.log' for more details." >&2;}
2393 { (exit 1); exit 1; }; }
2394fi
2395
2396rm -f conftest.$ac_cv_objext conftest.$ac_ext
2397fi
a3bba767
JJ
2398echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2399echo "${ECHO_T}$ac_cv_objext" >&6
ba479fd2
NN
2400OBJEXT=$ac_cv_objext
2401ac_objext=$OBJEXT
a3bba767
JJ
2402echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2403echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
ba479fd2
NN
2404if test "${ac_cv_c_compiler_gnu+set}" = set; then
2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2406else
2407 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2408/* confdefs.h. */
2409_ACEOF
2410cat confdefs.h >>conftest.$ac_ext
2411cat >>conftest.$ac_ext <<_ACEOF
2412/* end confdefs.h. */
2413
2414int
2415main ()
2416{
2417#ifndef __GNUC__
2418 choke me
2419#endif
6e3f3080 2420
ba479fd2
NN
2421 ;
2422 return 0;
2423}
2424_ACEOF
2425rm -f conftest.$ac_objext
a3bba767
JJ
2426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2427 (eval $ac_compile) 2>conftest.er1
ba479fd2 2428 ac_status=$?
86da66b5
HPN
2429 grep -v '^ *+' conftest.er1 >conftest.err
2430 rm -f conftest.er1
2431 cat conftest.err >&5
ba479fd2 2432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
2433 (exit $ac_status); } &&
2434 { ac_try='test -z "$ac_c_werror_flag"
2435 || test ! -s conftest.err'
2436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2437 (eval $ac_try) 2>&5
2438 ac_status=$?
2439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2440 (exit $ac_status); }; } &&
2441 { ac_try='test -s conftest.$ac_objext'
2442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2443 (eval $ac_try) 2>&5
2444 ac_status=$?
2445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2446 (exit $ac_status); }; }; then
ba479fd2
NN
2447 ac_compiler_gnu=yes
2448else
2449 echo "$as_me: failed program was:" >&5
2450sed 's/^/| /' conftest.$ac_ext >&5
2451
a3bba767 2452ac_compiler_gnu=no
ba479fd2 2453fi
a3bba767 2454rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2455ac_cv_c_compiler_gnu=$ac_compiler_gnu
2456
2457fi
a3bba767
JJ
2458echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2459echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
ba479fd2
NN
2460GCC=`test $ac_compiler_gnu = yes && echo yes`
2461ac_test_CFLAGS=${CFLAGS+set}
2462ac_save_CFLAGS=$CFLAGS
a3bba767
JJ
2463CFLAGS="-g"
2464echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2465echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
ba479fd2
NN
2466if test "${ac_cv_prog_cc_g+set}" = set; then
2467 echo $ECHO_N "(cached) $ECHO_C" >&6
2468else
a3bba767 2469 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2470/* confdefs.h. */
2471_ACEOF
2472cat confdefs.h >>conftest.$ac_ext
2473cat >>conftest.$ac_ext <<_ACEOF
2474/* end confdefs.h. */
2475
2476int
2477main ()
2478{
2479
2480 ;
2481 return 0;
2482}
2483_ACEOF
2484rm -f conftest.$ac_objext
a3bba767
JJ
2485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2486 (eval $ac_compile) 2>conftest.er1
ba479fd2 2487 ac_status=$?
86da66b5
HPN
2488 grep -v '^ *+' conftest.er1 >conftest.err
2489 rm -f conftest.er1
2490 cat conftest.err >&5
ba479fd2 2491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
2492 (exit $ac_status); } &&
2493 { ac_try='test -z "$ac_c_werror_flag"
2494 || test ! -s conftest.err'
2495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2496 (eval $ac_try) 2>&5
2497 ac_status=$?
2498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2499 (exit $ac_status); }; } &&
2500 { ac_try='test -s conftest.$ac_objext'
2501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2502 (eval $ac_try) 2>&5
2503 ac_status=$?
2504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2505 (exit $ac_status); }; }; then
703d89ab
ZW
2506 ac_cv_prog_cc_g=yes
2507else
2508 echo "$as_me: failed program was:" >&5
2509sed 's/^/| /' conftest.$ac_ext >&5
2510
a3bba767
JJ
2511ac_cv_prog_cc_g=no
2512fi
2513rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2514fi
2515echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2516echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2517if test "$ac_test_CFLAGS" = set; then
2518 CFLAGS=$ac_save_CFLAGS
2519elif test $ac_cv_prog_cc_g = yes; then
2520 if test "$GCC" = yes; then
2521 CFLAGS="-g -O2"
2522 else
2523 CFLAGS="-g"
2524 fi
2525else
2526 if test "$GCC" = yes; then
2527 CFLAGS="-O2"
2528 else
2529 CFLAGS=
2530 fi
2531fi
2532echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2533echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2534if test "${ac_cv_prog_cc_stdc+set}" = set; then
2535 echo $ECHO_N "(cached) $ECHO_C" >&6
2536else
2537 ac_cv_prog_cc_stdc=no
2538ac_save_CC=$CC
2539cat >conftest.$ac_ext <<_ACEOF
703d89ab
ZW
2540/* confdefs.h. */
2541_ACEOF
2542cat confdefs.h >>conftest.$ac_ext
2543cat >>conftest.$ac_ext <<_ACEOF
2544/* end confdefs.h. */
a3bba767
JJ
2545#include <stdarg.h>
2546#include <stdio.h>
2547#include <sys/types.h>
2548#include <sys/stat.h>
2549/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2550struct buf { int x; };
2551FILE * (*rcsopen) (struct buf *, struct stat *, int);
2552static char *e (p, i)
2553 char **p;
2554 int i;
703d89ab 2555{
a3bba767 2556 return p[i];
703d89ab 2557}
a3bba767
JJ
2558static char *f (char * (*g) (char **, int), char **p, ...)
2559{
2560 char *s;
2561 va_list v;
2562 va_start (v,p);
2563 s = g (p, va_arg (v,int));
2564 va_end (v);
2565 return s;
2566}
2567
2568/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2569 function prototypes and stuff, but not '\xHH' hex character constants.
2570 These don't provoke an error unfortunately, instead are silently treated
2571 as 'x'. The following induces an error, until -std1 is added to get
2572 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2573 array size at least. It's necessary to write '\x00'==0 to get something
2574 that's true only with -std1. */
2575int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2576
2577int test (int i, double x);
2578struct s1 {int (*f) (int a);};
2579struct s2 {int (*f) (double a);};
2580int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2581int argc;
2582char **argv;
2583int
2584main ()
2585{
2586return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2587 ;
2588 return 0;
2589}
2590_ACEOF
2591# Don't try gcc -ansi; that turns off useful extensions and
2592# breaks some systems' header files.
2593# AIX -qlanglvl=ansi
2594# Ultrix and OSF/1 -std1
2595# HP-UX 10.20 and later -Ae
2596# HP-UX older versions -Aa -D_HPUX_SOURCE
2597# SVR4 -Xc -D__EXTENSIONS__
2598for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2599do
2600 CC="$ac_save_CC $ac_arg"
2601 rm -f conftest.$ac_objext
2602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2603 (eval $ac_compile) 2>conftest.er1
2604 ac_status=$?
703d89ab
ZW
2605 grep -v '^ *+' conftest.er1 >conftest.err
2606 rm -f conftest.er1
2607 cat conftest.err >&5
8b1f719a 2608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
2609 (exit $ac_status); } &&
2610 { ac_try='test -z "$ac_c_werror_flag"
2611 || test ! -s conftest.err'
2612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2613 (eval $ac_try) 2>&5
2614 ac_status=$?
2615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2616 (exit $ac_status); }; } &&
2617 { ac_try='test -s conftest.$ac_objext'
2618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2619 (eval $ac_try) 2>&5
2620 ac_status=$?
2621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2622 (exit $ac_status); }; }; then
2623 ac_cv_prog_cc_stdc=$ac_arg
2624break
703d89ab
ZW
2625else
2626 echo "$as_me: failed program was:" >&5
2627sed 's/^/| /' conftest.$ac_ext >&5
2628
a3bba767
JJ
2629fi
2630rm -f conftest.err conftest.$ac_objext
2631done
2632rm -f conftest.$ac_ext conftest.$ac_objext
2633CC=$ac_save_CC
2634
2635fi
2636
2637case "x$ac_cv_prog_cc_stdc" in
2638 x|xno)
2639 echo "$as_me:$LINENO: result: none needed" >&5
2640echo "${ECHO_T}none needed" >&6 ;;
2641 *)
2642 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2643echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2644 CC="$CC $ac_cv_prog_cc_stdc" ;;
2645esac
2646
2647# Some people use a C++ compiler to compile C. Since we use `exit',
2648# in C++ we need to declare it. In case someone uses the same compiler
2649# for both compiling C and C++ we need to have the C++ compiler decide
2650# the declaration of exit, since it's the most demanding environment.
2651cat >conftest.$ac_ext <<_ACEOF
2652#ifndef __cplusplus
2653 choke me
2654#endif
2655_ACEOF
2656rm -f conftest.$ac_objext
2657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2658 (eval $ac_compile) 2>conftest.er1
2659 ac_status=$?
2660 grep -v '^ *+' conftest.er1 >conftest.err
2661 rm -f conftest.er1
2662 cat conftest.err >&5
2663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2664 (exit $ac_status); } &&
2665 { ac_try='test -z "$ac_c_werror_flag"
2666 || test ! -s conftest.err'
2667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2668 (eval $ac_try) 2>&5
2669 ac_status=$?
2670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2671 (exit $ac_status); }; } &&
2672 { ac_try='test -s conftest.$ac_objext'
2673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2674 (eval $ac_try) 2>&5
2675 ac_status=$?
2676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2677 (exit $ac_status); }; }; then
2678 for ac_declaration in \
2679 '' \
2680 'extern "C" void std::exit (int) throw (); using std::exit;' \
2681 'extern "C" void std::exit (int); using std::exit;' \
2682 'extern "C" void exit (int) throw ();' \
2683 'extern "C" void exit (int);' \
2684 'void exit (int);'
2685do
2686 cat >conftest.$ac_ext <<_ACEOF
703d89ab
ZW
2687/* confdefs.h. */
2688_ACEOF
2689cat confdefs.h >>conftest.$ac_ext
2690cat >>conftest.$ac_ext <<_ACEOF
2691/* end confdefs.h. */
a3bba767
JJ
2692$ac_declaration
2693#include <stdlib.h>
703d89ab
ZW
2694int
2695main ()
2696{
a3bba767 2697exit (42);
703d89ab
ZW
2698 ;
2699 return 0;
2700}
2701_ACEOF
2702rm -f conftest.$ac_objext
a3bba767
JJ
2703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2704 (eval $ac_compile) 2>conftest.er1
8b1f719a 2705 ac_status=$?
703d89ab
ZW
2706 grep -v '^ *+' conftest.er1 >conftest.err
2707 rm -f conftest.er1
2708 cat conftest.err >&5
8b1f719a 2709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
2710 (exit $ac_status); } &&
2711 { ac_try='test -z "$ac_c_werror_flag"
2712 || test ! -s conftest.err'
2713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2714 (eval $ac_try) 2>&5
2715 ac_status=$?
2716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2717 (exit $ac_status); }; } &&
2718 { ac_try='test -s conftest.$ac_objext'
2719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2720 (eval $ac_try) 2>&5
2721 ac_status=$?
2722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2723 (exit $ac_status); }; }; then
2724 :
a6ccdbab
EC
2725else
2726 echo "$as_me: failed program was:" >&5
2727sed 's/^/| /' conftest.$ac_ext >&5
2728
a3bba767 2729continue
8b1f719a 2730fi
a3bba767
JJ
2731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2732 cat >conftest.$ac_ext <<_ACEOF
a6ccdbab
EC
2733/* confdefs.h. */
2734_ACEOF
2735cat confdefs.h >>conftest.$ac_ext
2736cat >>conftest.$ac_ext <<_ACEOF
2737/* end confdefs.h. */
a3bba767 2738$ac_declaration
8b1f719a
PB
2739int
2740main ()
2741{
a3bba767 2742exit (42);
8b1f719a
PB
2743 ;
2744 return 0;
2745}
2746_ACEOF
a3bba767
JJ
2747rm -f conftest.$ac_objext
2748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2749 (eval $ac_compile) 2>conftest.er1
8b1f719a
PB
2750 ac_status=$?
2751 grep -v '^ *+' conftest.er1 >conftest.err
2752 rm -f conftest.er1
a6ccdbab 2753 cat conftest.err >&5
86da66b5 2754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
2755 (exit $ac_status); } &&
2756 { ac_try='test -z "$ac_c_werror_flag"
2757 || test ! -s conftest.err'
2758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2759 (eval $ac_try) 2>&5
2760 ac_status=$?
2761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2762 (exit $ac_status); }; } &&
2763 { ac_try='test -s conftest.$ac_objext'
2764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2765 (eval $ac_try) 2>&5
2766 ac_status=$?
2767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2768 (exit $ac_status); }; }; then
2769 break
a6ccdbab
EC
2770else
2771 echo "$as_me: failed program was:" >&5
2772sed 's/^/| /' conftest.$ac_ext >&5
2773
8b1f719a 2774fi
a3bba767 2775rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8b1f719a 2776done
a3bba767
JJ
2777rm -f conftest*
2778if test -n "$ac_declaration"; then
2779 echo '#ifdef __cplusplus' >>confdefs.h
2780 echo $ac_declaration >>confdefs.h
2781 echo '#endif' >>confdefs.h
8b1f719a 2782fi
8b1f719a 2783
a3bba767
JJ
2784else
2785 echo "$as_me: failed program was:" >&5
2786sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2787
a3bba767
JJ
2788fi
2789rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2790ac_ext=c
2791ac_cpp='$CPP $CPPFLAGS'
2792ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2793ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2794ac_compiler_gnu=$ac_cv_c_compiler_gnu
2795
2796if test "x$CC" != xcc; then
a3bba767
JJ
2797 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2798echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
ba479fd2 2799else
a3bba767
JJ
2800 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2801echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
ba479fd2
NN
2802fi
2803set dummy $CC; ac_cc=`echo $2 |
2804 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
a3bba767 2805if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
ba479fd2
NN
2806 echo $ECHO_N "(cached) $ECHO_C" >&6
2807else
2808 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2809/* confdefs.h. */
2810_ACEOF
2811cat confdefs.h >>conftest.$ac_ext
2812cat >>conftest.$ac_ext <<_ACEOF
2813/* end confdefs.h. */
2814
2815int
2816main ()
2817{
2818
2819 ;
2820 return 0;
2821}
2822_ACEOF
3ec83fc2
RH
2823# Make sure it works both with $CC and with simple cc.
2824# We do the test twice because some compilers refuse to overwrite an
2825# existing .o file with -o, though they will create one.
a3bba767
JJ
2826ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2827if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2828 (eval $ac_try) 2>&5
ba479fd2
NN
2829 ac_status=$?
2830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2831 (exit $ac_status); } &&
a3bba767
JJ
2832 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2833 (eval $ac_try) 2>&5
ba479fd2
NN
2834 ac_status=$?
2835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2836 (exit $ac_status); };
3ec83fc2
RH
2837then
2838 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2839 if test "x$CC" != xcc; then
2840 # Test first that cc exists at all.
ba479fd2 2841 if { ac_try='cc -c conftest.$ac_ext >&5'
a3bba767
JJ
2842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2843 (eval $ac_try) 2>&5
ba479fd2
NN
2844 ac_status=$?
2845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2846 (exit $ac_status); }; }; then
a3bba767
JJ
2847 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2848 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2849 (eval $ac_try) 2>&5
ba479fd2
NN
2850 ac_status=$?
2851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2852 (exit $ac_status); } &&
a3bba767
JJ
2853 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2854 (eval $ac_try) 2>&5
ba479fd2
NN
2855 ac_status=$?
2856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2857 (exit $ac_status); };
3ec83fc2 2858 then
86da66b5
HPN
2859 # cc works too.
2860 :
3ec83fc2 2861 else
86da66b5
HPN
2862 # cc exists but doesn't like -o.
2863 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2864 fi
2865 fi
2866 fi
2867else
2868 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2869fi
a3bba767 2870rm -f conftest*
3ec83fc2
RH
2871
2872fi
a3bba767
JJ
2873if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
2874 echo "$as_me:$LINENO: result: yes" >&5
2875echo "${ECHO_T}yes" >&6
3ec83fc2 2876else
a3bba767
JJ
2877 echo "$as_me:$LINENO: result: no" >&5
2878echo "${ECHO_T}no" >&6
ba479fd2
NN
2879
2880cat >>confdefs.h <<\_ACEOF
3ec83fc2 2881#define NO_MINUS_C_MINUS_O 1
ba479fd2 2882_ACEOF
3ec83fc2
RH
2883
2884fi
2885
3b620440
KC
2886# expand $ac_aux_dir to an absolute path
2887am_aux_dir=`cd $ac_aux_dir && pwd`
2888
2889# FIXME: we rely on the cache variable name because
2890# there is no other way.
2891set dummy $CC
2892ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2893if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2894 # Losing compiler, so override with the script.
2895 # FIXME: It is wrong to rewrite CC.
2896 # But if we don't then we get into trouble of one sort or another.
2897 # A longer-term fix would be to have automake use am__CC in this case,
2898 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2899 CC="$am_aux_dir/compile $CC"
2900fi
2901
414d23ae
HPN
2902# autoconf is lame and doesn't give us any substitution variable for this.
2903if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2904 NO_MINUS_C_MINUS_O=yes
2905else
2906 OUTPUT_OPTION='-o $@'
2907fi
2908
2909
2910
ec6c7392
PB
2911# Remove the -O2: for historical reasons, unless bootstrapping we prefer
2912# optimizations to be activated explicitly by the toplevel.
2913case "$CC" in
2914 */prev-gcc/xgcc*) ;;
2915 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
2916esac
2917
2918
73458fb7
NN
2919# -------------------------
2920# Check C compiler features
2921# -------------------------
2922
ba479fd2
NN
2923ac_ext=c
2924ac_cpp='$CPP $CPPFLAGS'
2925ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2926ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2927ac_compiler_gnu=$ac_cv_c_compiler_gnu
a3bba767
JJ
2928echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2929echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2930# On Suns, sometimes $CPP names a directory.
2931if test -n "$CPP" && test -d "$CPP"; then
2932 CPP=
2933fi
2934if test -z "$CPP"; then
ba479fd2
NN
2935 if test "${ac_cv_prog_CPP+set}" = set; then
2936 echo $ECHO_N "(cached) $ECHO_C" >&6
2937else
2938 # Double quotes because CPP needs to be expanded
2939 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2940 do
2941 ac_preproc_ok=false
2942for ac_c_preproc_warn_flag in '' yes
2943do
2944 # Use a header file that comes with gcc, so configuring glibc
2945 # with a fresh cross-compiler works.
2946 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2947 # <limits.h> exists even on freestanding compilers.
84c041a1 2948 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2949 # not just through cpp. "Syntax error" is here to catch this case.
2950 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2951/* confdefs.h. */
2952_ACEOF
2953cat confdefs.h >>conftest.$ac_ext
2954cat >>conftest.$ac_ext <<_ACEOF
2955/* end confdefs.h. */
2956#ifdef __STDC__
2957# include <limits.h>
2958#else
2959# include <assert.h>
2960#endif
86da66b5 2961 Syntax error
ba479fd2 2962_ACEOF
a3bba767
JJ
2963if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2964 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
2965 ac_status=$?
2966 grep -v '^ *+' conftest.er1 >conftest.err
2967 rm -f conftest.er1
2968 cat conftest.err >&5
2969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
2970 (exit $ac_status); } >/dev/null; then
2971 if test -s conftest.err; then
2972 ac_cpp_err=$ac_c_preproc_warn_flag
2973 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2974 else
2975 ac_cpp_err=
2976 fi
2977else
2978 ac_cpp_err=yes
2979fi
2980if test -z "$ac_cpp_err"; then
093e61a6 2981 :
cafe096b 2982else
ba479fd2
NN
2983 echo "$as_me: failed program was:" >&5
2984sed 's/^/| /' conftest.$ac_ext >&5
2985
2986 # Broken: fails on valid input.
2987continue
2988fi
2989rm -f conftest.err conftest.$ac_ext
2990
a3bba767 2991 # OK, works on sane cases. Now check whether non-existent headers
ba479fd2
NN
2992 # can be detected and how.
2993 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2994/* confdefs.h. */
2995_ACEOF
2996cat confdefs.h >>conftest.$ac_ext
2997cat >>conftest.$ac_ext <<_ACEOF
2998/* end confdefs.h. */
2999#include <ac_nonexistent.h>
3000_ACEOF
a3bba767
JJ
3001if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3002 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3003 ac_status=$?
3004 grep -v '^ *+' conftest.er1 >conftest.err
3005 rm -f conftest.er1
3006 cat conftest.err >&5
3007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3008 (exit $ac_status); } >/dev/null; then
3009 if test -s conftest.err; then
3010 ac_cpp_err=$ac_c_preproc_warn_flag
3011 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3012 else
3013 ac_cpp_err=
3014 fi
3015else
3016 ac_cpp_err=yes
3017fi
3018if test -z "$ac_cpp_err"; then
ba479fd2
NN
3019 # Broken: success on invalid input.
3020continue
3021else
3022 echo "$as_me: failed program was:" >&5
3023sed 's/^/| /' conftest.$ac_ext >&5
3024
3025 # Passes both tests.
3026ac_preproc_ok=:
3027break
3028fi
3029rm -f conftest.err conftest.$ac_ext
3030
3031done
3032# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3033rm -f conftest.err conftest.$ac_ext
3034if $ac_preproc_ok; then
3035 break
3036fi
3037
3038 done
3039 ac_cv_prog_CPP=$CPP
3040
3041fi
3042 CPP=$ac_cv_prog_CPP
3043else
3044 ac_cv_prog_CPP=$CPP
3045fi
a3bba767
JJ
3046echo "$as_me:$LINENO: result: $CPP" >&5
3047echo "${ECHO_T}$CPP" >&6
ba479fd2
NN
3048ac_preproc_ok=false
3049for ac_c_preproc_warn_flag in '' yes
3050do
3051 # Use a header file that comes with gcc, so configuring glibc
3052 # with a fresh cross-compiler works.
3053 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3054 # <limits.h> exists even on freestanding compilers.
3055 # On the NeXT, cc -E runs the code through the compiler's parser,
3056 # not just through cpp. "Syntax error" is here to catch this case.
3057 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3058/* confdefs.h. */
3059_ACEOF
3060cat confdefs.h >>conftest.$ac_ext
3061cat >>conftest.$ac_ext <<_ACEOF
3062/* end confdefs.h. */
3063#ifdef __STDC__
3064# include <limits.h>
3065#else
3066# include <assert.h>
3067#endif
86da66b5 3068 Syntax error
ba479fd2 3069_ACEOF
a3bba767
JJ
3070if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3071 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3072 ac_status=$?
3073 grep -v '^ *+' conftest.er1 >conftest.err
3074 rm -f conftest.er1
3075 cat conftest.err >&5
3076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3077 (exit $ac_status); } >/dev/null; then
3078 if test -s conftest.err; then
3079 ac_cpp_err=$ac_c_preproc_warn_flag
3080 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3081 else
3082 ac_cpp_err=
3083 fi
3084else
3085 ac_cpp_err=yes
3086fi
3087if test -z "$ac_cpp_err"; then
6e3f3080 3088 :
414d23ae 3089else
ba479fd2
NN
3090 echo "$as_me: failed program was:" >&5
3091sed 's/^/| /' conftest.$ac_ext >&5
3092
3093 # Broken: fails on valid input.
3094continue
3095fi
3096rm -f conftest.err conftest.$ac_ext
3097
a3bba767 3098 # OK, works on sane cases. Now check whether non-existent headers
ba479fd2
NN
3099 # can be detected and how.
3100 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3101/* confdefs.h. */
3102_ACEOF
3103cat confdefs.h >>conftest.$ac_ext
3104cat >>conftest.$ac_ext <<_ACEOF
3105/* end confdefs.h. */
3106#include <ac_nonexistent.h>
3107_ACEOF
a3bba767
JJ
3108if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3109 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3110 ac_status=$?
3111 grep -v '^ *+' conftest.er1 >conftest.err
3112 rm -f conftest.er1
3113 cat conftest.err >&5
3114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3115 (exit $ac_status); } >/dev/null; then
3116 if test -s conftest.err; then
3117 ac_cpp_err=$ac_c_preproc_warn_flag
3118 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3119 else
3120 ac_cpp_err=
3121 fi
3122else
3123 ac_cpp_err=yes
3124fi
3125if test -z "$ac_cpp_err"; then
ba479fd2
NN
3126 # Broken: success on invalid input.
3127continue
3128else
3129 echo "$as_me: failed program was:" >&5
3130sed 's/^/| /' conftest.$ac_ext >&5
3131
3132 # Passes both tests.
3133ac_preproc_ok=:
3134break
63cf211a 3135fi
ba479fd2
NN
3136rm -f conftest.err conftest.$ac_ext
3137
3138done
3139# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3140rm -f conftest.err conftest.$ac_ext
3141if $ac_preproc_ok; then
3142 :
6e3f3080 3143else
ba479fd2
NN
3144 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3145See \`config.log' for more details." >&5
3146echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3147See \`config.log' for more details." >&2;}
3148 { (exit 1); exit 1; }; }
6e3f3080
NN
3149fi
3150
ba479fd2
NN
3151ac_ext=c
3152ac_cpp='$CPP $CPPFLAGS'
3153ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3154ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3155ac_compiler_gnu=$ac_cv_c_compiler_gnu
3156
b5472e1d 3157
a3bba767
JJ
3158echo "$as_me:$LINENO: checking for inline" >&5
3159echo $ECHO_N "checking for inline... $ECHO_C" >&6
ba479fd2
NN
3160if test "${ac_cv_c_inline+set}" = set; then
3161 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3162else
3163 ac_cv_c_inline=no
3164for ac_kw in inline __inline__ __inline; do
ba479fd2 3165 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3166/* confdefs.h. */
3167_ACEOF
3168cat confdefs.h >>conftest.$ac_ext
3169cat >>conftest.$ac_ext <<_ACEOF
3170/* end confdefs.h. */
3171#ifndef __cplusplus
3172typedef int foo_t;
3173static $ac_kw foo_t static_foo () {return 0; }
3174$ac_kw foo_t foo () {return 0; }
3175#endif
414d23ae 3176
ba479fd2
NN
3177_ACEOF
3178rm -f conftest.$ac_objext
a3bba767
JJ
3179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3180 (eval $ac_compile) 2>conftest.er1
ba479fd2 3181 ac_status=$?
86da66b5
HPN
3182 grep -v '^ *+' conftest.er1 >conftest.err
3183 rm -f conftest.er1
3184 cat conftest.err >&5
ba479fd2 3185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3186 (exit $ac_status); } &&
3187 { ac_try='test -z "$ac_c_werror_flag"
3188 || test ! -s conftest.err'
3189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3190 (eval $ac_try) 2>&5
3191 ac_status=$?
3192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3193 (exit $ac_status); }; } &&
3194 { ac_try='test -s conftest.$ac_objext'
3195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3196 (eval $ac_try) 2>&5
3197 ac_status=$?
3198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3199 (exit $ac_status); }; }; then
3200 ac_cv_c_inline=$ac_kw; break
414d23ae 3201else
ba479fd2
NN
3202 echo "$as_me: failed program was:" >&5
3203sed 's/^/| /' conftest.$ac_ext >&5
3204
414d23ae 3205fi
a3bba767 3206rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3207done
3208
3209fi
a3bba767
JJ
3210echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3211echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3212
3213
ba479fd2 3214case $ac_cv_c_inline in
414d23ae 3215 inline | yes) ;;
86da66b5
HPN
3216 *)
3217 case $ac_cv_c_inline in
3218 no) ac_val=;;
3219 *) ac_val=$ac_cv_c_inline;;
3220 esac
3221 cat >>confdefs.h <<_ACEOF
3222#ifndef __cplusplus
3223#define inline $ac_val
3224#endif
ba479fd2 3225_ACEOF
86da66b5 3226 ;;
414d23ae
HPN
3227esac
3228
414d23ae 3229
414d23ae 3230# sizeof(char) is 1 by definition.
bf3b7cd3 3231
a3bba767
JJ
3232echo "$as_me:$LINENO: checking for egrep" >&5
3233echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3234if test "${ac_cv_prog_egrep+set}" = set; then
703d89ab
ZW
3235 echo $ECHO_N "(cached) $ECHO_C" >&6
3236else
a3bba767
JJ
3237 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3238 then ac_cv_prog_egrep='grep -E'
3239 else ac_cv_prog_egrep='egrep'
703d89ab 3240 fi
a3bba767
JJ
3241fi
3242echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3243echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3244 EGREP=$ac_cv_prog_egrep
703d89ab
ZW
3245
3246
a3bba767
JJ
3247echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3248echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
bf3b7cd3
JD
3249if test "${ac_cv_header_stdc+set}" = set; then
3250 echo $ECHO_N "(cached) $ECHO_C" >&6
3251else
3252 cat >conftest.$ac_ext <<_ACEOF
3253/* confdefs.h. */
3254_ACEOF
3255cat confdefs.h >>conftest.$ac_ext
3256cat >>conftest.$ac_ext <<_ACEOF
3257/* end confdefs.h. */
3258#include <stdlib.h>
3259#include <stdarg.h>
3260#include <string.h>
3261#include <float.h>
3262
3263int
3264main ()
3265{
3266
3267 ;
3268 return 0;
3269}
3270_ACEOF
3271rm -f conftest.$ac_objext
a3bba767
JJ
3272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3273 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3274 ac_status=$?
3275 grep -v '^ *+' conftest.er1 >conftest.err
3276 rm -f conftest.er1
3277 cat conftest.err >&5
3278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3279 (exit $ac_status); } &&
3280 { ac_try='test -z "$ac_c_werror_flag"
3281 || test ! -s conftest.err'
3282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3283 (eval $ac_try) 2>&5
3284 ac_status=$?
3285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3286 (exit $ac_status); }; } &&
3287 { ac_try='test -s conftest.$ac_objext'
3288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3289 (eval $ac_try) 2>&5
3290 ac_status=$?
3291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3292 (exit $ac_status); }; }; then
bf3b7cd3
JD
3293 ac_cv_header_stdc=yes
3294else
3295 echo "$as_me: failed program was:" >&5
3296sed 's/^/| /' conftest.$ac_ext >&5
3297
a3bba767 3298ac_cv_header_stdc=no
bf3b7cd3 3299fi
a3bba767 3300rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3301
3302if test $ac_cv_header_stdc = yes; then
3303 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3304 cat >conftest.$ac_ext <<_ACEOF
3305/* confdefs.h. */
3306_ACEOF
3307cat confdefs.h >>conftest.$ac_ext
3308cat >>conftest.$ac_ext <<_ACEOF
3309/* end confdefs.h. */
3310#include <string.h>
3311
3312_ACEOF
3313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3314 $EGREP "memchr" >/dev/null 2>&1; then
3315 :
3316else
3317 ac_cv_header_stdc=no
3318fi
3319rm -f conftest*
3320
3321fi
3322
3323if test $ac_cv_header_stdc = yes; then
3324 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3325 cat >conftest.$ac_ext <<_ACEOF
3326/* confdefs.h. */
3327_ACEOF
3328cat confdefs.h >>conftest.$ac_ext
3329cat >>conftest.$ac_ext <<_ACEOF
3330/* end confdefs.h. */
3331#include <stdlib.h>
3332
3333_ACEOF
3334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3335 $EGREP "free" >/dev/null 2>&1; then
3336 :
3337else
3338 ac_cv_header_stdc=no
3339fi
3340rm -f conftest*
3341
3342fi
3343
3344if test $ac_cv_header_stdc = yes; then
3345 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3346 if test "$cross_compiling" = yes; then
3347 :
3348else
3349 cat >conftest.$ac_ext <<_ACEOF
3350/* confdefs.h. */
3351_ACEOF
3352cat confdefs.h >>conftest.$ac_ext
3353cat >>conftest.$ac_ext <<_ACEOF
3354/* end confdefs.h. */
3355#include <ctype.h>
3356#if ((' ' & 0x0FF) == 0x020)
3357# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3358# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3359#else
3360# define ISLOWER(c) \
3361 (('a' <= (c) && (c) <= 'i') \
3362 || ('j' <= (c) && (c) <= 'r') \
3363 || ('s' <= (c) && (c) <= 'z'))
3364# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3365#endif
3366
3367#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3368int
3369main ()
3370{
3371 int i;
3372 for (i = 0; i < 256; i++)
3373 if (XOR (islower (i), ISLOWER (i))
3374 || toupper (i) != TOUPPER (i))
a3bba767
JJ
3375 exit(2);
3376 exit (0);
bf3b7cd3
JD
3377}
3378_ACEOF
3379rm -f conftest$ac_exeext
a3bba767
JJ
3380if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3381 (eval $ac_link) 2>&5
bf3b7cd3
JD
3382 ac_status=$?
3383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3384 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
3385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3386 (eval $ac_try) 2>&5
bf3b7cd3
JD
3387 ac_status=$?
3388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3389 (exit $ac_status); }; }; then
3390 :
3391else
3392 echo "$as_me: program exited with status $ac_status" >&5
3393echo "$as_me: failed program was:" >&5
3394sed 's/^/| /' conftest.$ac_ext >&5
3395
3396( exit $ac_status )
3397ac_cv_header_stdc=no
3398fi
a3bba767 3399rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3400fi
3401fi
703d89ab 3402fi
a3bba767
JJ
3403echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3404echo "${ECHO_T}$ac_cv_header_stdc" >&6
bf3b7cd3
JD
3405if test $ac_cv_header_stdc = yes; then
3406
3407cat >>confdefs.h <<\_ACEOF
3408#define STDC_HEADERS 1
3409_ACEOF
3410
3411fi
3412
3413# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3424 inttypes.h stdint.h unistd.h
3425do
3426as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a3bba767
JJ
3427echo "$as_me:$LINENO: checking for $ac_header" >&5
3428echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3429if eval "test \"\${$as_ac_Header+set}\" = set"; then
bf3b7cd3
JD
3430 echo $ECHO_N "(cached) $ECHO_C" >&6
3431else
3432 cat >conftest.$ac_ext <<_ACEOF
3433/* confdefs.h. */
3434_ACEOF
3435cat confdefs.h >>conftest.$ac_ext
3436cat >>conftest.$ac_ext <<_ACEOF
3437/* end confdefs.h. */
3438$ac_includes_default
3439
3440#include <$ac_header>
3441_ACEOF
3442rm -f conftest.$ac_objext
a3bba767
JJ
3443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3444 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3445 ac_status=$?
3446 grep -v '^ *+' conftest.er1 >conftest.err
3447 rm -f conftest.er1
3448 cat conftest.err >&5
3449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3450 (exit $ac_status); } &&
3451 { ac_try='test -z "$ac_c_werror_flag"
3452 || test ! -s conftest.err'
3453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3454 (eval $ac_try) 2>&5
3455 ac_status=$?
3456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3457 (exit $ac_status); }; } &&
3458 { ac_try='test -s conftest.$ac_objext'
3459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3460 (eval $ac_try) 2>&5
3461 ac_status=$?
3462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3463 (exit $ac_status); }; }; then
bf3b7cd3
JD
3464 eval "$as_ac_Header=yes"
3465else
3466 echo "$as_me: failed program was:" >&5
3467sed 's/^/| /' conftest.$ac_ext >&5
3468
a3bba767 3469eval "$as_ac_Header=no"
bf3b7cd3 3470fi
a3bba767 3471rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 3472fi
a3bba767
JJ
3473echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3474echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bf3b7cd3
JD
3475if test `eval echo '${'$as_ac_Header'}'` = yes; then
3476 cat >>confdefs.h <<_ACEOF
3477#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3478_ACEOF
3479
3480fi
3481
3482done
3483
3484
a3bba767
JJ
3485echo "$as_me:$LINENO: checking for void *" >&5
3486echo $ECHO_N "checking for void *... $ECHO_C" >&6
bf3b7cd3
JD
3487if test "${ac_cv_type_void_p+set}" = set; then
3488 echo $ECHO_N "(cached) $ECHO_C" >&6
3489else
3490 cat >conftest.$ac_ext <<_ACEOF
3491/* confdefs.h. */
3492_ACEOF
3493cat confdefs.h >>conftest.$ac_ext
3494cat >>conftest.$ac_ext <<_ACEOF
3495/* end confdefs.h. */
3496$ac_includes_default
3497int
3498main ()
3499{
a3bba767 3500if ((void * *) 0)
bf3b7cd3 3501 return 0;
a3bba767 3502if (sizeof (void *))
bf3b7cd3
JD
3503 return 0;
3504 ;
3505 return 0;
3506}
3507_ACEOF
3508rm -f conftest.$ac_objext
a3bba767
JJ
3509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3510 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3511 ac_status=$?
3512 grep -v '^ *+' conftest.er1 >conftest.err
3513 rm -f conftest.er1
3514 cat conftest.err >&5
3515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3516 (exit $ac_status); } &&
3517 { ac_try='test -z "$ac_c_werror_flag"
3518 || test ! -s conftest.err'
3519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3520 (eval $ac_try) 2>&5
3521 ac_status=$?
3522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3523 (exit $ac_status); }; } &&
3524 { ac_try='test -s conftest.$ac_objext'
3525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3526 (eval $ac_try) 2>&5
3527 ac_status=$?
3528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3529 (exit $ac_status); }; }; then
bf3b7cd3
JD
3530 ac_cv_type_void_p=yes
3531else
3532 echo "$as_me: failed program was:" >&5
3533sed 's/^/| /' conftest.$ac_ext >&5
3534
a3bba767 3535ac_cv_type_void_p=no
bf3b7cd3 3536fi
a3bba767 3537rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 3538fi
a3bba767
JJ
3539echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3540echo "${ECHO_T}$ac_cv_type_void_p" >&6
bf3b7cd3 3541
a3bba767
JJ
3542echo "$as_me:$LINENO: checking size of void *" >&5
3543echo $ECHO_N "checking size of void *... $ECHO_C" >&6
ba479fd2
NN
3544if test "${ac_cv_sizeof_void_p+set}" = set; then
3545 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 3546else
a3bba767
JJ
3547 if test "$ac_cv_type_void_p" = yes; then
3548 # The cast to unsigned long works around a bug in the HP C Compiler
3549 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3550 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3551 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
3552 if test "$cross_compiling" = yes; then
3553 # Depending upon the size, compute the lo and hi bounds.
3554cat >conftest.$ac_ext <<_ACEOF
3555/* confdefs.h. */
3556_ACEOF
3557cat confdefs.h >>conftest.$ac_ext
3558cat >>conftest.$ac_ext <<_ACEOF
3559/* end confdefs.h. */
3560$ac_includes_default
3561int
3562main ()
3563{
a3bba767 3564static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
bf3b7cd3
JD
3565test_array [0] = 0
3566
3567 ;
3568 return 0;
3569}
3570_ACEOF
3571rm -f conftest.$ac_objext
a3bba767
JJ
3572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3573 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3574 ac_status=$?
3575 grep -v '^ *+' conftest.er1 >conftest.err
3576 rm -f conftest.er1
3577 cat conftest.err >&5
3578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3579 (exit $ac_status); } &&
3580 { ac_try='test -z "$ac_c_werror_flag"
3581 || test ! -s conftest.err'
3582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3583 (eval $ac_try) 2>&5
3584 ac_status=$?
3585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3586 (exit $ac_status); }; } &&
3587 { ac_try='test -s conftest.$ac_objext'
3588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3589 (eval $ac_try) 2>&5
3590 ac_status=$?
3591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3592 (exit $ac_status); }; }; then
bf3b7cd3
JD
3593 ac_lo=0 ac_mid=0
3594 while :; do
3595 cat >conftest.$ac_ext <<_ACEOF
3596/* confdefs.h. */
3597_ACEOF
3598cat confdefs.h >>conftest.$ac_ext
3599cat >>conftest.$ac_ext <<_ACEOF
3600/* end confdefs.h. */
3601$ac_includes_default
3602int
3603main ()
3604{
a3bba767 3605static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
3606test_array [0] = 0
3607
3608 ;
3609 return 0;
3610}
3611_ACEOF
3612rm -f conftest.$ac_objext
a3bba767
JJ
3613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3614 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3615 ac_status=$?
3616 grep -v '^ *+' conftest.er1 >conftest.err
3617 rm -f conftest.er1
3618 cat conftest.err >&5
3619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3620 (exit $ac_status); } &&
3621 { ac_try='test -z "$ac_c_werror_flag"
3622 || test ! -s conftest.err'
3623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3624 (eval $ac_try) 2>&5
3625 ac_status=$?
3626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3627 (exit $ac_status); }; } &&
3628 { ac_try='test -s conftest.$ac_objext'
3629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3630 (eval $ac_try) 2>&5
3631 ac_status=$?
3632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3633 (exit $ac_status); }; }; then
bf3b7cd3
JD
3634 ac_hi=$ac_mid; break
3635else
3636 echo "$as_me: failed program was:" >&5
3637sed 's/^/| /' conftest.$ac_ext >&5
3638
a3bba767
JJ
3639ac_lo=`expr $ac_mid + 1`
3640 if test $ac_lo -le $ac_mid; then
3641 ac_lo= ac_hi=
3642 break
3643 fi
3644 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 3645fi
a3bba767 3646rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3647 done
3648else
3649 echo "$as_me: failed program was:" >&5
3650sed 's/^/| /' conftest.$ac_ext >&5
3651
a3bba767 3652cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
3653/* confdefs.h. */
3654_ACEOF
3655cat confdefs.h >>conftest.$ac_ext
3656cat >>conftest.$ac_ext <<_ACEOF
3657/* end confdefs.h. */
3658$ac_includes_default
3659int
3660main ()
3661{
a3bba767 3662static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
bf3b7cd3
JD
3663test_array [0] = 0
3664
3665 ;
3666 return 0;
3667}
3668_ACEOF
3669rm -f conftest.$ac_objext
a3bba767
JJ
3670if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3671 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3672 ac_status=$?
3673 grep -v '^ *+' conftest.er1 >conftest.err
3674 rm -f conftest.er1
3675 cat conftest.err >&5
3676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3677 (exit $ac_status); } &&
3678 { ac_try='test -z "$ac_c_werror_flag"
3679 || test ! -s conftest.err'
3680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3681 (eval $ac_try) 2>&5
3682 ac_status=$?
3683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3684 (exit $ac_status); }; } &&
3685 { ac_try='test -s conftest.$ac_objext'
3686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3687 (eval $ac_try) 2>&5
3688 ac_status=$?
3689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3690 (exit $ac_status); }; }; then
bf3b7cd3
JD
3691 ac_hi=-1 ac_mid=-1
3692 while :; do
3693 cat >conftest.$ac_ext <<_ACEOF
3694/* confdefs.h. */
3695_ACEOF
3696cat confdefs.h >>conftest.$ac_ext
3697cat >>conftest.$ac_ext <<_ACEOF
3698/* end confdefs.h. */
3699$ac_includes_default
3700int
3701main ()
3702{
a3bba767 3703static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
bf3b7cd3
JD
3704test_array [0] = 0
3705
3706 ;
3707 return 0;
3708}
3709_ACEOF
3710rm -f conftest.$ac_objext
a3bba767
JJ
3711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3712 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3713 ac_status=$?
3714 grep -v '^ *+' conftest.er1 >conftest.err
3715 rm -f conftest.er1
3716 cat conftest.err >&5
3717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3718 (exit $ac_status); } &&
3719 { ac_try='test -z "$ac_c_werror_flag"
3720 || test ! -s conftest.err'
3721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3722 (eval $ac_try) 2>&5
3723 ac_status=$?
3724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3725 (exit $ac_status); }; } &&
3726 { ac_try='test -s conftest.$ac_objext'
3727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3728 (eval $ac_try) 2>&5
3729 ac_status=$?
3730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3731 (exit $ac_status); }; }; then
bf3b7cd3
JD
3732 ac_lo=$ac_mid; break
3733else
3734 echo "$as_me: failed program was:" >&5
3735sed 's/^/| /' conftest.$ac_ext >&5
3736
a3bba767
JJ
3737ac_hi=`expr '(' $ac_mid ')' - 1`
3738 if test $ac_mid -le $ac_hi; then
3739 ac_lo= ac_hi=
3740 break
3741 fi
3742 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 3743fi
a3bba767 3744rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3745 done
3746else
3747 echo "$as_me: failed program was:" >&5
3748sed 's/^/| /' conftest.$ac_ext >&5
3749
a3bba767 3750ac_lo= ac_hi=
bf3b7cd3 3751fi
a3bba767 3752rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 3753fi
a3bba767 3754rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3755# Binary search between lo and hi bounds.
3756while test "x$ac_lo" != "x$ac_hi"; do
3757 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3758 cat >conftest.$ac_ext <<_ACEOF
3759/* confdefs.h. */
3760_ACEOF
3761cat confdefs.h >>conftest.$ac_ext
3762cat >>conftest.$ac_ext <<_ACEOF
3763/* end confdefs.h. */
3764$ac_includes_default
3765int
3766main ()
3767{
a3bba767 3768static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
3769test_array [0] = 0
3770
3771 ;
3772 return 0;
3773}
3774_ACEOF
3775rm -f conftest.$ac_objext
a3bba767
JJ
3776if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3777 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3778 ac_status=$?
3779 grep -v '^ *+' conftest.er1 >conftest.err
3780 rm -f conftest.er1
3781 cat conftest.err >&5
3782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3783 (exit $ac_status); } &&
3784 { ac_try='test -z "$ac_c_werror_flag"
3785 || test ! -s conftest.err'
3786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3787 (eval $ac_try) 2>&5
3788 ac_status=$?
3789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3790 (exit $ac_status); }; } &&
3791 { ac_try='test -s conftest.$ac_objext'
3792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3793 (eval $ac_try) 2>&5
3794 ac_status=$?
3795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3796 (exit $ac_status); }; }; then
bf3b7cd3
JD
3797 ac_hi=$ac_mid
3798else
3799 echo "$as_me: failed program was:" >&5
3800sed 's/^/| /' conftest.$ac_ext >&5
3801
a3bba767 3802ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 3803fi
a3bba767 3804rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3805done
3806case $ac_lo in
3807?*) ac_cv_sizeof_void_p=$ac_lo;;
a3bba767 3808'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 3809See \`config.log' for more details." >&5
a3bba767 3810echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 3811See \`config.log' for more details." >&2;}
a3bba767 3812 { (exit 1); exit 1; }; } ;;
bf3b7cd3 3813esac
a3bba767
JJ
3814else
3815 if test "$cross_compiling" = yes; then
3816 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
3817See \`config.log' for more details." >&5
3818echo "$as_me: error: cannot run test program while cross compiling
3819See \`config.log' for more details." >&2;}
3820 { (exit 1); exit 1; }; }
bf3b7cd3
JD
3821else
3822 cat >conftest.$ac_ext <<_ACEOF
3823/* confdefs.h. */
3824_ACEOF
3825cat confdefs.h >>conftest.$ac_ext
3826cat >>conftest.$ac_ext <<_ACEOF
3827/* end confdefs.h. */
3828$ac_includes_default
a3bba767
JJ
3829long longval () { return (long) (sizeof (void *)); }
3830unsigned long ulongval () { return (long) (sizeof (void *)); }
bf3b7cd3
JD
3831#include <stdio.h>
3832#include <stdlib.h>
3833int
3834main ()
3835{
3836
3837 FILE *f = fopen ("conftest.val", "w");
3838 if (! f)
a3bba767
JJ
3839 exit (1);
3840 if (((long) (sizeof (void *))) < 0)
bf3b7cd3 3841 {
a3bba767
JJ
3842 long i = longval ();
3843 if (i != ((long) (sizeof (void *))))
3844 exit (1);
bf3b7cd3
JD
3845 fprintf (f, "%ld\n", i);
3846 }
3847 else
3848 {
a3bba767
JJ
3849 unsigned long i = ulongval ();
3850 if (i != ((long) (sizeof (void *))))
3851 exit (1);
bf3b7cd3
JD
3852 fprintf (f, "%lu\n", i);
3853 }
a3bba767 3854 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
3855
3856 ;
3857 return 0;
3858}
3859_ACEOF
3860rm -f conftest$ac_exeext
a3bba767
JJ
3861if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3862 (eval $ac_link) 2>&5
bf3b7cd3
JD
3863 ac_status=$?
3864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3865 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
3866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3867 (eval $ac_try) 2>&5
bf3b7cd3
JD
3868 ac_status=$?
3869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3870 (exit $ac_status); }; }; then
3871 ac_cv_sizeof_void_p=`cat conftest.val`
3872else
3873 echo "$as_me: program exited with status $ac_status" >&5
3874echo "$as_me: failed program was:" >&5
3875sed 's/^/| /' conftest.$ac_ext >&5
3876
3877( exit $ac_status )
a3bba767 3878{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 3879See \`config.log' for more details." >&5
a3bba767 3880echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 3881See \`config.log' for more details." >&2;}
a3bba767
JJ
3882 { (exit 1); exit 1; }; }
3883fi
3884rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3885fi
3886fi
3887rm -f conftest.val
a3bba767
JJ
3888else
3889 ac_cv_sizeof_void_p=0
bf3b7cd3 3890fi
a3bba767
JJ
3891fi
3892echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3893echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
bf3b7cd3
JD
3894cat >>confdefs.h <<_ACEOF
3895#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3896_ACEOF
3897
3898
a3bba767
JJ
3899echo "$as_me:$LINENO: checking for short" >&5
3900echo $ECHO_N "checking for short... $ECHO_C" >&6
bf3b7cd3
JD
3901if test "${ac_cv_type_short+set}" = set; then
3902 echo $ECHO_N "(cached) $ECHO_C" >&6
3903else
3904 cat >conftest.$ac_ext <<_ACEOF
3905/* confdefs.h. */
3906_ACEOF
3907cat confdefs.h >>conftest.$ac_ext
3908cat >>conftest.$ac_ext <<_ACEOF
3909/* end confdefs.h. */
3910$ac_includes_default
3911int
3912main ()
3913{
a3bba767 3914if ((short *) 0)
bf3b7cd3 3915 return 0;
a3bba767 3916if (sizeof (short))
bf3b7cd3
JD
3917 return 0;
3918 ;
3919 return 0;
3920}
3921_ACEOF
3922rm -f conftest.$ac_objext
a3bba767
JJ
3923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3924 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3925 ac_status=$?
3926 grep -v '^ *+' conftest.er1 >conftest.err
3927 rm -f conftest.er1
3928 cat conftest.err >&5
3929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3930 (exit $ac_status); } &&
3931 { ac_try='test -z "$ac_c_werror_flag"
3932 || test ! -s conftest.err'
3933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3934 (eval $ac_try) 2>&5
3935 ac_status=$?
3936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3937 (exit $ac_status); }; } &&
3938 { ac_try='test -s conftest.$ac_objext'
3939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3940 (eval $ac_try) 2>&5
3941 ac_status=$?
3942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3943 (exit $ac_status); }; }; then
bf3b7cd3
JD
3944 ac_cv_type_short=yes
3945else
3946 echo "$as_me: failed program was:" >&5
3947sed 's/^/| /' conftest.$ac_ext >&5
3948
a3bba767 3949ac_cv_type_short=no
bf3b7cd3 3950fi
a3bba767 3951rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 3952fi
a3bba767
JJ
3953echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
3954echo "${ECHO_T}$ac_cv_type_short" >&6
bf3b7cd3 3955
a3bba767
JJ
3956echo "$as_me:$LINENO: checking size of short" >&5
3957echo $ECHO_N "checking size of short... $ECHO_C" >&6
bf3b7cd3
JD
3958if test "${ac_cv_sizeof_short+set}" = set; then
3959 echo $ECHO_N "(cached) $ECHO_C" >&6
3960else
a3bba767
JJ
3961 if test "$ac_cv_type_short" = yes; then
3962 # The cast to unsigned long works around a bug in the HP C Compiler
3963 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3964 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3965 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
3966 if test "$cross_compiling" = yes; then
3967 # Depending upon the size, compute the lo and hi bounds.
3968cat >conftest.$ac_ext <<_ACEOF
3969/* confdefs.h. */
3970_ACEOF
3971cat confdefs.h >>conftest.$ac_ext
3972cat >>conftest.$ac_ext <<_ACEOF
3973/* end confdefs.h. */
3974$ac_includes_default
3975int
3976main ()
3977{
a3bba767 3978static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
bf3b7cd3
JD
3979test_array [0] = 0
3980
3981 ;
3982 return 0;
3983}
3984_ACEOF
3985rm -f conftest.$ac_objext
a3bba767
JJ
3986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3987 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3988 ac_status=$?
3989 grep -v '^ *+' conftest.er1 >conftest.err
3990 rm -f conftest.er1
3991 cat conftest.err >&5
3992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
3993 (exit $ac_status); } &&
3994 { ac_try='test -z "$ac_c_werror_flag"
3995 || test ! -s conftest.err'
3996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3997 (eval $ac_try) 2>&5
3998 ac_status=$?
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); }; } &&
4001 { ac_try='test -s conftest.$ac_objext'
4002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4003 (eval $ac_try) 2>&5
4004 ac_status=$?
4005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4006 (exit $ac_status); }; }; then
bf3b7cd3
JD
4007 ac_lo=0 ac_mid=0
4008 while :; do
4009 cat >conftest.$ac_ext <<_ACEOF
4010/* confdefs.h. */
4011_ACEOF
4012cat confdefs.h >>conftest.$ac_ext
4013cat >>conftest.$ac_ext <<_ACEOF
4014/* end confdefs.h. */
4015$ac_includes_default
4016int
4017main ()
4018{
a3bba767 4019static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
4020test_array [0] = 0
4021
4022 ;
4023 return 0;
4024}
4025_ACEOF
4026rm -f conftest.$ac_objext
a3bba767
JJ
4027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4028 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4029 ac_status=$?
4030 grep -v '^ *+' conftest.er1 >conftest.err
4031 rm -f conftest.er1
4032 cat conftest.err >&5
4033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4034 (exit $ac_status); } &&
4035 { ac_try='test -z "$ac_c_werror_flag"
4036 || test ! -s conftest.err'
4037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4038 (eval $ac_try) 2>&5
4039 ac_status=$?
4040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4041 (exit $ac_status); }; } &&
4042 { ac_try='test -s conftest.$ac_objext'
4043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4044 (eval $ac_try) 2>&5
4045 ac_status=$?
4046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4047 (exit $ac_status); }; }; then
bf3b7cd3
JD
4048 ac_hi=$ac_mid; break
4049else
4050 echo "$as_me: failed program was:" >&5
4051sed 's/^/| /' conftest.$ac_ext >&5
4052
a3bba767
JJ
4053ac_lo=`expr $ac_mid + 1`
4054 if test $ac_lo -le $ac_mid; then
4055 ac_lo= ac_hi=
4056 break
4057 fi
4058 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4059fi
a3bba767 4060rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4061 done
4062else
4063 echo "$as_me: failed program was:" >&5
4064sed 's/^/| /' conftest.$ac_ext >&5
4065
a3bba767 4066cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4067/* confdefs.h. */
4068_ACEOF
4069cat confdefs.h >>conftest.$ac_ext
4070cat >>conftest.$ac_ext <<_ACEOF
4071/* end confdefs.h. */
4072$ac_includes_default
4073int
4074main ()
4075{
a3bba767 4076static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
bf3b7cd3
JD
4077test_array [0] = 0
4078
4079 ;
4080 return 0;
4081}
4082_ACEOF
4083rm -f conftest.$ac_objext
a3bba767
JJ
4084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4085 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4086 ac_status=$?
4087 grep -v '^ *+' conftest.er1 >conftest.err
4088 rm -f conftest.er1
4089 cat conftest.err >&5
4090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4091 (exit $ac_status); } &&
4092 { ac_try='test -z "$ac_c_werror_flag"
4093 || test ! -s conftest.err'
4094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4095 (eval $ac_try) 2>&5
4096 ac_status=$?
4097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4098 (exit $ac_status); }; } &&
4099 { ac_try='test -s conftest.$ac_objext'
4100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4101 (eval $ac_try) 2>&5
4102 ac_status=$?
4103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4104 (exit $ac_status); }; }; then
bf3b7cd3
JD
4105 ac_hi=-1 ac_mid=-1
4106 while :; do
4107 cat >conftest.$ac_ext <<_ACEOF
4108/* confdefs.h. */
4109_ACEOF
4110cat confdefs.h >>conftest.$ac_ext
4111cat >>conftest.$ac_ext <<_ACEOF
4112/* end confdefs.h. */
4113$ac_includes_default
4114int
4115main ()
4116{
a3bba767 4117static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
bf3b7cd3
JD
4118test_array [0] = 0
4119
4120 ;
4121 return 0;
4122}
4123_ACEOF
4124rm -f conftest.$ac_objext
a3bba767
JJ
4125if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4126 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4127 ac_status=$?
4128 grep -v '^ *+' conftest.er1 >conftest.err
4129 rm -f conftest.er1
4130 cat conftest.err >&5
4131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4132 (exit $ac_status); } &&
4133 { ac_try='test -z "$ac_c_werror_flag"
4134 || test ! -s conftest.err'
4135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4136 (eval $ac_try) 2>&5
4137 ac_status=$?
4138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4139 (exit $ac_status); }; } &&
4140 { ac_try='test -s conftest.$ac_objext'
4141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4142 (eval $ac_try) 2>&5
4143 ac_status=$?
4144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4145 (exit $ac_status); }; }; then
bf3b7cd3
JD
4146 ac_lo=$ac_mid; break
4147else
4148 echo "$as_me: failed program was:" >&5
4149sed 's/^/| /' conftest.$ac_ext >&5
4150
a3bba767
JJ
4151ac_hi=`expr '(' $ac_mid ')' - 1`
4152 if test $ac_mid -le $ac_hi; then
4153 ac_lo= ac_hi=
4154 break
4155 fi
4156 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4157fi
a3bba767 4158rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4159 done
4160else
4161 echo "$as_me: failed program was:" >&5
4162sed 's/^/| /' conftest.$ac_ext >&5
4163
a3bba767 4164ac_lo= ac_hi=
bf3b7cd3 4165fi
a3bba767 4166rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4167fi
a3bba767 4168rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4169# Binary search between lo and hi bounds.
4170while test "x$ac_lo" != "x$ac_hi"; do
4171 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4172 cat >conftest.$ac_ext <<_ACEOF
4173/* confdefs.h. */
4174_ACEOF
4175cat confdefs.h >>conftest.$ac_ext
4176cat >>conftest.$ac_ext <<_ACEOF
4177/* end confdefs.h. */
4178$ac_includes_default
4179int
4180main ()
4181{
a3bba767 4182static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
4183test_array [0] = 0
4184
4185 ;
4186 return 0;
4187}
4188_ACEOF
4189rm -f conftest.$ac_objext
a3bba767
JJ
4190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4191 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4192 ac_status=$?
4193 grep -v '^ *+' conftest.er1 >conftest.err
4194 rm -f conftest.er1
4195 cat conftest.err >&5
4196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4197 (exit $ac_status); } &&
4198 { ac_try='test -z "$ac_c_werror_flag"
4199 || test ! -s conftest.err'
4200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4201 (eval $ac_try) 2>&5
4202 ac_status=$?
4203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4204 (exit $ac_status); }; } &&
4205 { ac_try='test -s conftest.$ac_objext'
4206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4207 (eval $ac_try) 2>&5
4208 ac_status=$?
4209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4210 (exit $ac_status); }; }; then
bf3b7cd3
JD
4211 ac_hi=$ac_mid
4212else
4213 echo "$as_me: failed program was:" >&5
4214sed 's/^/| /' conftest.$ac_ext >&5
4215
a3bba767 4216ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 4217fi
a3bba767 4218rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4219done
4220case $ac_lo in
4221?*) ac_cv_sizeof_short=$ac_lo;;
a3bba767 4222'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 4223See \`config.log' for more details." >&5
a3bba767 4224echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 4225See \`config.log' for more details." >&2;}
a3bba767 4226 { (exit 1); exit 1; }; } ;;
bf3b7cd3 4227esac
a3bba767
JJ
4228else
4229 if test "$cross_compiling" = yes; then
4230 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4231See \`config.log' for more details." >&5
4232echo "$as_me: error: cannot run test program while cross compiling
4233See \`config.log' for more details." >&2;}
4234 { (exit 1); exit 1; }; }
8b1f719a
PB
4235else
4236 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4237/* confdefs.h. */
4238_ACEOF
4239cat confdefs.h >>conftest.$ac_ext
4240cat >>conftest.$ac_ext <<_ACEOF
4241/* end confdefs.h. */
4242$ac_includes_default
a3bba767
JJ
4243long longval () { return (long) (sizeof (short)); }
4244unsigned long ulongval () { return (long) (sizeof (short)); }
bf3b7cd3
JD
4245#include <stdio.h>
4246#include <stdlib.h>
4247int
4248main ()
4249{
4250
4251 FILE *f = fopen ("conftest.val", "w");
4252 if (! f)
a3bba767
JJ
4253 exit (1);
4254 if (((long) (sizeof (short))) < 0)
bf3b7cd3 4255 {
a3bba767
JJ
4256 long i = longval ();
4257 if (i != ((long) (sizeof (short))))
4258 exit (1);
bf3b7cd3
JD
4259 fprintf (f, "%ld\n", i);
4260 }
4261 else
4262 {
a3bba767
JJ
4263 unsigned long i = ulongval ();
4264 if (i != ((long) (sizeof (short))))
4265 exit (1);
bf3b7cd3
JD
4266 fprintf (f, "%lu\n", i);
4267 }
a3bba767 4268 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
4269
4270 ;
4271 return 0;
4272}
4273_ACEOF
4274rm -f conftest$ac_exeext
a3bba767
JJ
4275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4276 (eval $ac_link) 2>&5
bf3b7cd3
JD
4277 ac_status=$?
4278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4279 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
4280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4281 (eval $ac_try) 2>&5
bf3b7cd3
JD
4282 ac_status=$?
4283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4284 (exit $ac_status); }; }; then
4285 ac_cv_sizeof_short=`cat conftest.val`
4286else
4287 echo "$as_me: program exited with status $ac_status" >&5
4288echo "$as_me: failed program was:" >&5
4289sed 's/^/| /' conftest.$ac_ext >&5
4290
4291( exit $ac_status )
a3bba767 4292{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 4293See \`config.log' for more details." >&5
a3bba767 4294echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 4295See \`config.log' for more details." >&2;}
a3bba767
JJ
4296 { (exit 1); exit 1; }; }
4297fi
4298rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4299fi
4300fi
4301rm -f conftest.val
a3bba767
JJ
4302else
4303 ac_cv_sizeof_short=0
bf3b7cd3 4304fi
a3bba767
JJ
4305fi
4306echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4307echo "${ECHO_T}$ac_cv_sizeof_short" >&6
bf3b7cd3
JD
4308cat >>confdefs.h <<_ACEOF
4309#define SIZEOF_SHORT $ac_cv_sizeof_short
4310_ACEOF
4311
4312
a3bba767
JJ
4313echo "$as_me:$LINENO: checking for int" >&5
4314echo $ECHO_N "checking for int... $ECHO_C" >&6
bf3b7cd3
JD
4315if test "${ac_cv_type_int+set}" = set; then
4316 echo $ECHO_N "(cached) $ECHO_C" >&6
4317else
4318 cat >conftest.$ac_ext <<_ACEOF
4319/* confdefs.h. */
4320_ACEOF
4321cat confdefs.h >>conftest.$ac_ext
4322cat >>conftest.$ac_ext <<_ACEOF
4323/* end confdefs.h. */
4324$ac_includes_default
4325int
4326main ()
4327{
a3bba767 4328if ((int *) 0)
bf3b7cd3 4329 return 0;
a3bba767 4330if (sizeof (int))
bf3b7cd3
JD
4331 return 0;
4332 ;
4333 return 0;
4334}
4335_ACEOF
4336rm -f conftest.$ac_objext
a3bba767
JJ
4337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4338 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4339 ac_status=$?
4340 grep -v '^ *+' conftest.er1 >conftest.err
4341 rm -f conftest.er1
4342 cat conftest.err >&5
4343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4344 (exit $ac_status); } &&
4345 { ac_try='test -z "$ac_c_werror_flag"
4346 || test ! -s conftest.err'
4347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4348 (eval $ac_try) 2>&5
4349 ac_status=$?
4350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4351 (exit $ac_status); }; } &&
4352 { ac_try='test -s conftest.$ac_objext'
4353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4354 (eval $ac_try) 2>&5
4355 ac_status=$?
4356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4357 (exit $ac_status); }; }; then
bf3b7cd3
JD
4358 ac_cv_type_int=yes
4359else
4360 echo "$as_me: failed program was:" >&5
4361sed 's/^/| /' conftest.$ac_ext >&5
4362
a3bba767 4363ac_cv_type_int=no
bf3b7cd3 4364fi
a3bba767 4365rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4366fi
a3bba767
JJ
4367echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4368echo "${ECHO_T}$ac_cv_type_int" >&6
bf3b7cd3 4369
a3bba767
JJ
4370echo "$as_me:$LINENO: checking size of int" >&5
4371echo $ECHO_N "checking size of int... $ECHO_C" >&6
bf3b7cd3
JD
4372if test "${ac_cv_sizeof_int+set}" = set; then
4373 echo $ECHO_N "(cached) $ECHO_C" >&6
4374else
a3bba767
JJ
4375 if test "$ac_cv_type_int" = yes; then
4376 # The cast to unsigned long works around a bug in the HP C Compiler
4377 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4378 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4379 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4380 if test "$cross_compiling" = yes; then
4381 # Depending upon the size, compute the lo and hi bounds.
4382cat >conftest.$ac_ext <<_ACEOF
4383/* confdefs.h. */
4384_ACEOF
4385cat confdefs.h >>conftest.$ac_ext
4386cat >>conftest.$ac_ext <<_ACEOF
4387/* end confdefs.h. */
4388$ac_includes_default
4389int
4390main ()
4391{
a3bba767 4392static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
bf3b7cd3
JD
4393test_array [0] = 0
4394
4395 ;
4396 return 0;
4397}
4398_ACEOF
4399rm -f conftest.$ac_objext
a3bba767
JJ
4400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4401 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4402 ac_status=$?
4403 grep -v '^ *+' conftest.er1 >conftest.err
4404 rm -f conftest.er1
4405 cat conftest.err >&5
4406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4407 (exit $ac_status); } &&
4408 { ac_try='test -z "$ac_c_werror_flag"
4409 || test ! -s conftest.err'
4410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4411 (eval $ac_try) 2>&5
4412 ac_status=$?
4413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4414 (exit $ac_status); }; } &&
4415 { ac_try='test -s conftest.$ac_objext'
4416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4417 (eval $ac_try) 2>&5
4418 ac_status=$?
4419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4420 (exit $ac_status); }; }; then
bf3b7cd3
JD
4421 ac_lo=0 ac_mid=0
4422 while :; do
4423 cat >conftest.$ac_ext <<_ACEOF
4424/* confdefs.h. */
4425_ACEOF
4426cat confdefs.h >>conftest.$ac_ext
4427cat >>conftest.$ac_ext <<_ACEOF
4428/* end confdefs.h. */
4429$ac_includes_default
4430int
4431main ()
4432{
a3bba767 4433static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
4434test_array [0] = 0
4435
4436 ;
4437 return 0;
4438}
4439_ACEOF
4440rm -f conftest.$ac_objext
a3bba767
JJ
4441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4442 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4443 ac_status=$?
4444 grep -v '^ *+' conftest.er1 >conftest.err
4445 rm -f conftest.er1
4446 cat conftest.err >&5
4447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4448 (exit $ac_status); } &&
4449 { ac_try='test -z "$ac_c_werror_flag"
4450 || test ! -s conftest.err'
4451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4452 (eval $ac_try) 2>&5
4453 ac_status=$?
4454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4455 (exit $ac_status); }; } &&
4456 { ac_try='test -s conftest.$ac_objext'
4457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4458 (eval $ac_try) 2>&5
4459 ac_status=$?
4460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4461 (exit $ac_status); }; }; then
bf3b7cd3
JD
4462 ac_hi=$ac_mid; break
4463else
4464 echo "$as_me: failed program was:" >&5
4465sed 's/^/| /' conftest.$ac_ext >&5
4466
a3bba767
JJ
4467ac_lo=`expr $ac_mid + 1`
4468 if test $ac_lo -le $ac_mid; then
4469 ac_lo= ac_hi=
4470 break
4471 fi
4472 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4473fi
a3bba767 4474rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4475 done
4476else
4477 echo "$as_me: failed program was:" >&5
4478sed 's/^/| /' conftest.$ac_ext >&5
4479
a3bba767 4480cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4481/* confdefs.h. */
4482_ACEOF
4483cat confdefs.h >>conftest.$ac_ext
4484cat >>conftest.$ac_ext <<_ACEOF
4485/* end confdefs.h. */
4486$ac_includes_default
4487int
4488main ()
4489{
a3bba767 4490static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
bf3b7cd3
JD
4491test_array [0] = 0
4492
4493 ;
4494 return 0;
4495}
4496_ACEOF
4497rm -f conftest.$ac_objext
a3bba767
JJ
4498if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4499 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4500 ac_status=$?
4501 grep -v '^ *+' conftest.er1 >conftest.err
4502 rm -f conftest.er1
4503 cat conftest.err >&5
4504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4505 (exit $ac_status); } &&
4506 { ac_try='test -z "$ac_c_werror_flag"
4507 || test ! -s conftest.err'
4508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4509 (eval $ac_try) 2>&5
4510 ac_status=$?
4511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4512 (exit $ac_status); }; } &&
4513 { ac_try='test -s conftest.$ac_objext'
4514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4515 (eval $ac_try) 2>&5
4516 ac_status=$?
4517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4518 (exit $ac_status); }; }; then
bf3b7cd3
JD
4519 ac_hi=-1 ac_mid=-1
4520 while :; do
4521 cat >conftest.$ac_ext <<_ACEOF
4522/* confdefs.h. */
4523_ACEOF
4524cat confdefs.h >>conftest.$ac_ext
4525cat >>conftest.$ac_ext <<_ACEOF
4526/* end confdefs.h. */
4527$ac_includes_default
4528int
4529main ()
4530{
a3bba767 4531static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
bf3b7cd3
JD
4532test_array [0] = 0
4533
4534 ;
4535 return 0;
4536}
4537_ACEOF
4538rm -f conftest.$ac_objext
a3bba767
JJ
4539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4540 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4541 ac_status=$?
4542 grep -v '^ *+' conftest.er1 >conftest.err
4543 rm -f conftest.er1
4544 cat conftest.err >&5
4545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4546 (exit $ac_status); } &&
4547 { ac_try='test -z "$ac_c_werror_flag"
4548 || test ! -s conftest.err'
4549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4550 (eval $ac_try) 2>&5
4551 ac_status=$?
4552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4553 (exit $ac_status); }; } &&
4554 { ac_try='test -s conftest.$ac_objext'
4555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4556 (eval $ac_try) 2>&5
4557 ac_status=$?
4558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4559 (exit $ac_status); }; }; then
bf3b7cd3
JD
4560 ac_lo=$ac_mid; break
4561else
4562 echo "$as_me: failed program was:" >&5
4563sed 's/^/| /' conftest.$ac_ext >&5
4564
a3bba767
JJ
4565ac_hi=`expr '(' $ac_mid ')' - 1`
4566 if test $ac_mid -le $ac_hi; then
4567 ac_lo= ac_hi=
4568 break
4569 fi
4570 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4571fi
a3bba767 4572rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4573 done
4574else
4575 echo "$as_me: failed program was:" >&5
4576sed 's/^/| /' conftest.$ac_ext >&5
4577
a3bba767 4578ac_lo= ac_hi=
bf3b7cd3 4579fi
a3bba767 4580rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4581fi
a3bba767 4582rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4583# Binary search between lo and hi bounds.
4584while test "x$ac_lo" != "x$ac_hi"; do
4585 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4586 cat >conftest.$ac_ext <<_ACEOF
4587/* confdefs.h. */
4588_ACEOF
4589cat confdefs.h >>conftest.$ac_ext
4590cat >>conftest.$ac_ext <<_ACEOF
4591/* end confdefs.h. */
4592$ac_includes_default
4593int
4594main ()
4595{
a3bba767 4596static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
4597test_array [0] = 0
4598
4599 ;
4600 return 0;
4601}
4602_ACEOF
4603rm -f conftest.$ac_objext
a3bba767
JJ
4604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4605 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4606 ac_status=$?
4607 grep -v '^ *+' conftest.er1 >conftest.err
4608 rm -f conftest.er1
4609 cat conftest.err >&5
4610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4611 (exit $ac_status); } &&
4612 { ac_try='test -z "$ac_c_werror_flag"
4613 || test ! -s conftest.err'
4614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4615 (eval $ac_try) 2>&5
4616 ac_status=$?
4617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4618 (exit $ac_status); }; } &&
4619 { ac_try='test -s conftest.$ac_objext'
4620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4621 (eval $ac_try) 2>&5
4622 ac_status=$?
4623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4624 (exit $ac_status); }; }; then
bf3b7cd3
JD
4625 ac_hi=$ac_mid
4626else
4627 echo "$as_me: failed program was:" >&5
4628sed 's/^/| /' conftest.$ac_ext >&5
4629
a3bba767 4630ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 4631fi
a3bba767 4632rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4633done
4634case $ac_lo in
4635?*) ac_cv_sizeof_int=$ac_lo;;
a3bba767 4636'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 4637See \`config.log' for more details." >&5
a3bba767 4638echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 4639See \`config.log' for more details." >&2;}
a3bba767 4640 { (exit 1); exit 1; }; } ;;
bf3b7cd3 4641esac
a3bba767
JJ
4642else
4643 if test "$cross_compiling" = yes; then
4644 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4645See \`config.log' for more details." >&5
4646echo "$as_me: error: cannot run test program while cross compiling
4647See \`config.log' for more details." >&2;}
4648 { (exit 1); exit 1; }; }
bf3b7cd3
JD
4649else
4650 cat >conftest.$ac_ext <<_ACEOF
4651/* confdefs.h. */
4652_ACEOF
4653cat confdefs.h >>conftest.$ac_ext
4654cat >>conftest.$ac_ext <<_ACEOF
4655/* end confdefs.h. */
4656$ac_includes_default
a3bba767
JJ
4657long longval () { return (long) (sizeof (int)); }
4658unsigned long ulongval () { return (long) (sizeof (int)); }
bf3b7cd3
JD
4659#include <stdio.h>
4660#include <stdlib.h>
4661int
4662main ()
4663{
4664
4665 FILE *f = fopen ("conftest.val", "w");
4666 if (! f)
a3bba767
JJ
4667 exit (1);
4668 if (((long) (sizeof (int))) < 0)
bf3b7cd3 4669 {
a3bba767
JJ
4670 long i = longval ();
4671 if (i != ((long) (sizeof (int))))
4672 exit (1);
bf3b7cd3
JD
4673 fprintf (f, "%ld\n", i);
4674 }
4675 else
4676 {
a3bba767
JJ
4677 unsigned long i = ulongval ();
4678 if (i != ((long) (sizeof (int))))
4679 exit (1);
bf3b7cd3
JD
4680 fprintf (f, "%lu\n", i);
4681 }
a3bba767 4682 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
4683
4684 ;
4685 return 0;
4686}
4687_ACEOF
4688rm -f conftest$ac_exeext
a3bba767
JJ
4689if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4690 (eval $ac_link) 2>&5
bf3b7cd3
JD
4691 ac_status=$?
4692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
4694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4695 (eval $ac_try) 2>&5
bf3b7cd3
JD
4696 ac_status=$?
4697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4698 (exit $ac_status); }; }; then
4699 ac_cv_sizeof_int=`cat conftest.val`
4700else
4701 echo "$as_me: program exited with status $ac_status" >&5
4702echo "$as_me: failed program was:" >&5
4703sed 's/^/| /' conftest.$ac_ext >&5
4704
4705( exit $ac_status )
a3bba767 4706{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 4707See \`config.log' for more details." >&5
a3bba767 4708echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 4709See \`config.log' for more details." >&2;}
a3bba767
JJ
4710 { (exit 1); exit 1; }; }
4711fi
4712rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4713fi
4714fi
4715rm -f conftest.val
a3bba767
JJ
4716else
4717 ac_cv_sizeof_int=0
bf3b7cd3 4718fi
a3bba767
JJ
4719fi
4720echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4721echo "${ECHO_T}$ac_cv_sizeof_int" >&6
bf3b7cd3
JD
4722cat >>confdefs.h <<_ACEOF
4723#define SIZEOF_INT $ac_cv_sizeof_int
4724_ACEOF
4725
4726
a3bba767
JJ
4727echo "$as_me:$LINENO: checking for long" >&5
4728echo $ECHO_N "checking for long... $ECHO_C" >&6
bf3b7cd3
JD
4729if test "${ac_cv_type_long+set}" = set; then
4730 echo $ECHO_N "(cached) $ECHO_C" >&6
4731else
4732 cat >conftest.$ac_ext <<_ACEOF
4733/* confdefs.h. */
4734_ACEOF
4735cat confdefs.h >>conftest.$ac_ext
4736cat >>conftest.$ac_ext <<_ACEOF
4737/* end confdefs.h. */
4738$ac_includes_default
4739int
4740main ()
4741{
a3bba767 4742if ((long *) 0)
bf3b7cd3 4743 return 0;
a3bba767 4744if (sizeof (long))
bf3b7cd3
JD
4745 return 0;
4746 ;
4747 return 0;
4748}
4749_ACEOF
4750rm -f conftest.$ac_objext
a3bba767
JJ
4751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4752 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4753 ac_status=$?
4754 grep -v '^ *+' conftest.er1 >conftest.err
4755 rm -f conftest.er1
4756 cat conftest.err >&5
4757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4758 (exit $ac_status); } &&
4759 { ac_try='test -z "$ac_c_werror_flag"
4760 || test ! -s conftest.err'
4761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4762 (eval $ac_try) 2>&5
4763 ac_status=$?
4764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4765 (exit $ac_status); }; } &&
4766 { ac_try='test -s conftest.$ac_objext'
4767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4768 (eval $ac_try) 2>&5
4769 ac_status=$?
4770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4771 (exit $ac_status); }; }; then
bf3b7cd3
JD
4772 ac_cv_type_long=yes
4773else
4774 echo "$as_me: failed program was:" >&5
4775sed 's/^/| /' conftest.$ac_ext >&5
4776
a3bba767 4777ac_cv_type_long=no
bf3b7cd3 4778fi
a3bba767 4779rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4780fi
a3bba767
JJ
4781echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4782echo "${ECHO_T}$ac_cv_type_long" >&6
bf3b7cd3 4783
a3bba767
JJ
4784echo "$as_me:$LINENO: checking size of long" >&5
4785echo $ECHO_N "checking size of long... $ECHO_C" >&6
bf3b7cd3
JD
4786if test "${ac_cv_sizeof_long+set}" = set; then
4787 echo $ECHO_N "(cached) $ECHO_C" >&6
4788else
a3bba767
JJ
4789 if test "$ac_cv_type_long" = yes; then
4790 # The cast to unsigned long works around a bug in the HP C Compiler
4791 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4792 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4793 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4794 if test "$cross_compiling" = yes; then
4795 # Depending upon the size, compute the lo and hi bounds.
4796cat >conftest.$ac_ext <<_ACEOF
4797/* confdefs.h. */
4798_ACEOF
4799cat confdefs.h >>conftest.$ac_ext
4800cat >>conftest.$ac_ext <<_ACEOF
4801/* end confdefs.h. */
4802$ac_includes_default
4803int
4804main ()
4805{
a3bba767 4806static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
bf3b7cd3
JD
4807test_array [0] = 0
4808
4809 ;
4810 return 0;
4811}
4812_ACEOF
4813rm -f conftest.$ac_objext
a3bba767
JJ
4814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4815 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4816 ac_status=$?
4817 grep -v '^ *+' conftest.er1 >conftest.err
4818 rm -f conftest.er1
4819 cat conftest.err >&5
4820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4821 (exit $ac_status); } &&
4822 { ac_try='test -z "$ac_c_werror_flag"
4823 || test ! -s conftest.err'
4824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4825 (eval $ac_try) 2>&5
4826 ac_status=$?
4827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4828 (exit $ac_status); }; } &&
4829 { ac_try='test -s conftest.$ac_objext'
4830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4831 (eval $ac_try) 2>&5
4832 ac_status=$?
4833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4834 (exit $ac_status); }; }; then
bf3b7cd3
JD
4835 ac_lo=0 ac_mid=0
4836 while :; do
4837 cat >conftest.$ac_ext <<_ACEOF
4838/* confdefs.h. */
4839_ACEOF
4840cat confdefs.h >>conftest.$ac_ext
4841cat >>conftest.$ac_ext <<_ACEOF
4842/* end confdefs.h. */
4843$ac_includes_default
4844int
4845main ()
4846{
a3bba767 4847static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
4848test_array [0] = 0
4849
4850 ;
4851 return 0;
4852}
4853_ACEOF
4854rm -f conftest.$ac_objext
a3bba767
JJ
4855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4856 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4857 ac_status=$?
4858 grep -v '^ *+' conftest.er1 >conftest.err
4859 rm -f conftest.er1
4860 cat conftest.err >&5
4861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4862 (exit $ac_status); } &&
4863 { ac_try='test -z "$ac_c_werror_flag"
4864 || test ! -s conftest.err'
4865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4866 (eval $ac_try) 2>&5
4867 ac_status=$?
4868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4869 (exit $ac_status); }; } &&
4870 { ac_try='test -s conftest.$ac_objext'
4871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4872 (eval $ac_try) 2>&5
4873 ac_status=$?
4874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4875 (exit $ac_status); }; }; then
bf3b7cd3
JD
4876 ac_hi=$ac_mid; break
4877else
4878 echo "$as_me: failed program was:" >&5
4879sed 's/^/| /' conftest.$ac_ext >&5
4880
a3bba767
JJ
4881ac_lo=`expr $ac_mid + 1`
4882 if test $ac_lo -le $ac_mid; then
4883 ac_lo= ac_hi=
4884 break
4885 fi
4886 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4887fi
a3bba767 4888rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4889 done
4890else
4891 echo "$as_me: failed program was:" >&5
4892sed 's/^/| /' conftest.$ac_ext >&5
4893
a3bba767 4894cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4895/* confdefs.h. */
4896_ACEOF
4897cat confdefs.h >>conftest.$ac_ext
4898cat >>conftest.$ac_ext <<_ACEOF
4899/* end confdefs.h. */
4900$ac_includes_default
4901int
4902main ()
4903{
a3bba767 4904static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
bf3b7cd3
JD
4905test_array [0] = 0
4906
4907 ;
4908 return 0;
4909}
4910_ACEOF
4911rm -f conftest.$ac_objext
a3bba767
JJ
4912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4913 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4914 ac_status=$?
4915 grep -v '^ *+' conftest.er1 >conftest.err
4916 rm -f conftest.er1
4917 cat conftest.err >&5
4918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4919 (exit $ac_status); } &&
4920 { ac_try='test -z "$ac_c_werror_flag"
4921 || test ! -s conftest.err'
4922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4923 (eval $ac_try) 2>&5
4924 ac_status=$?
4925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4926 (exit $ac_status); }; } &&
4927 { ac_try='test -s conftest.$ac_objext'
4928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4929 (eval $ac_try) 2>&5
4930 ac_status=$?
4931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4932 (exit $ac_status); }; }; then
bf3b7cd3
JD
4933 ac_hi=-1 ac_mid=-1
4934 while :; do
4935 cat >conftest.$ac_ext <<_ACEOF
4936/* confdefs.h. */
4937_ACEOF
4938cat confdefs.h >>conftest.$ac_ext
4939cat >>conftest.$ac_ext <<_ACEOF
4940/* end confdefs.h. */
4941$ac_includes_default
4942int
4943main ()
4944{
a3bba767 4945static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
bf3b7cd3
JD
4946test_array [0] = 0
4947
4948 ;
4949 return 0;
4950}
4951_ACEOF
4952rm -f conftest.$ac_objext
a3bba767
JJ
4953if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4954 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4955 ac_status=$?
4956 grep -v '^ *+' conftest.er1 >conftest.err
4957 rm -f conftest.er1
4958 cat conftest.err >&5
4959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
4960 (exit $ac_status); } &&
4961 { ac_try='test -z "$ac_c_werror_flag"
4962 || test ! -s conftest.err'
4963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4964 (eval $ac_try) 2>&5
4965 ac_status=$?
4966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4967 (exit $ac_status); }; } &&
4968 { ac_try='test -s conftest.$ac_objext'
4969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4970 (eval $ac_try) 2>&5
4971 ac_status=$?
4972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4973 (exit $ac_status); }; }; then
bf3b7cd3
JD
4974 ac_lo=$ac_mid; break
4975else
4976 echo "$as_me: failed program was:" >&5
4977sed 's/^/| /' conftest.$ac_ext >&5
4978
a3bba767
JJ
4979ac_hi=`expr '(' $ac_mid ')' - 1`
4980 if test $ac_mid -le $ac_hi; then
4981 ac_lo= ac_hi=
4982 break
4983 fi
4984 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4985fi
a3bba767 4986rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4987 done
4988else
4989 echo "$as_me: failed program was:" >&5
4990sed 's/^/| /' conftest.$ac_ext >&5
4991
a3bba767 4992ac_lo= ac_hi=
bf3b7cd3 4993fi
a3bba767 4994rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4995fi
a3bba767 4996rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4997# Binary search between lo and hi bounds.
4998while test "x$ac_lo" != "x$ac_hi"; do
4999 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5000 cat >conftest.$ac_ext <<_ACEOF
5001/* confdefs.h. */
5002_ACEOF
5003cat confdefs.h >>conftest.$ac_ext
5004cat >>conftest.$ac_ext <<_ACEOF
5005/* end confdefs.h. */
5006$ac_includes_default
5007int
5008main ()
5009{
a3bba767 5010static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
5011test_array [0] = 0
5012
5013 ;
5014 return 0;
5015}
5016_ACEOF
5017rm -f conftest.$ac_objext
a3bba767
JJ
5018if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5019 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5020 ac_status=$?
5021 grep -v '^ *+' conftest.er1 >conftest.err
5022 rm -f conftest.er1
5023 cat conftest.err >&5
5024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5025 (exit $ac_status); } &&
5026 { ac_try='test -z "$ac_c_werror_flag"
5027 || test ! -s conftest.err'
5028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5029 (eval $ac_try) 2>&5
5030 ac_status=$?
5031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5032 (exit $ac_status); }; } &&
5033 { ac_try='test -s conftest.$ac_objext'
5034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5035 (eval $ac_try) 2>&5
5036 ac_status=$?
5037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5038 (exit $ac_status); }; }; then
bf3b7cd3
JD
5039 ac_hi=$ac_mid
5040else
5041 echo "$as_me: failed program was:" >&5
5042sed 's/^/| /' conftest.$ac_ext >&5
5043
a3bba767 5044ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5045fi
a3bba767 5046rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5047done
5048case $ac_lo in
5049?*) ac_cv_sizeof_long=$ac_lo;;
a3bba767 5050'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 5051See \`config.log' for more details." >&5
a3bba767 5052echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 5053See \`config.log' for more details." >&2;}
a3bba767 5054 { (exit 1); exit 1; }; } ;;
bf3b7cd3 5055esac
a3bba767
JJ
5056else
5057 if test "$cross_compiling" = yes; then
5058 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5059See \`config.log' for more details." >&5
5060echo "$as_me: error: cannot run test program while cross compiling
5061See \`config.log' for more details." >&2;}
5062 { (exit 1); exit 1; }; }
bf3b7cd3
JD
5063else
5064 cat >conftest.$ac_ext <<_ACEOF
5065/* confdefs.h. */
5066_ACEOF
5067cat confdefs.h >>conftest.$ac_ext
5068cat >>conftest.$ac_ext <<_ACEOF
5069/* end confdefs.h. */
5070$ac_includes_default
a3bba767
JJ
5071long longval () { return (long) (sizeof (long)); }
5072unsigned long ulongval () { return (long) (sizeof (long)); }
bf3b7cd3
JD
5073#include <stdio.h>
5074#include <stdlib.h>
5075int
5076main ()
5077{
5078
5079 FILE *f = fopen ("conftest.val", "w");
5080 if (! f)
a3bba767
JJ
5081 exit (1);
5082 if (((long) (sizeof (long))) < 0)
bf3b7cd3 5083 {
a3bba767
JJ
5084 long i = longval ();
5085 if (i != ((long) (sizeof (long))))
5086 exit (1);
bf3b7cd3
JD
5087 fprintf (f, "%ld\n", i);
5088 }
5089 else
5090 {
a3bba767
JJ
5091 unsigned long i = ulongval ();
5092 if (i != ((long) (sizeof (long))))
5093 exit (1);
bf3b7cd3
JD
5094 fprintf (f, "%lu\n", i);
5095 }
a3bba767 5096 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5097
5098 ;
5099 return 0;
5100}
5101_ACEOF
5102rm -f conftest$ac_exeext
a3bba767
JJ
5103if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5104 (eval $ac_link) 2>&5
bf3b7cd3
JD
5105 ac_status=$?
5106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5107 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
5108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5109 (eval $ac_try) 2>&5
bf3b7cd3
JD
5110 ac_status=$?
5111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5112 (exit $ac_status); }; }; then
5113 ac_cv_sizeof_long=`cat conftest.val`
5114else
5115 echo "$as_me: program exited with status $ac_status" >&5
5116echo "$as_me: failed program was:" >&5
5117sed 's/^/| /' conftest.$ac_ext >&5
5118
5119( exit $ac_status )
a3bba767 5120{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 5121See \`config.log' for more details." >&5
a3bba767 5122echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 5123See \`config.log' for more details." >&2;}
a3bba767
JJ
5124 { (exit 1); exit 1; }; }
5125fi
5126rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5127fi
5128fi
5129rm -f conftest.val
a3bba767
JJ
5130else
5131 ac_cv_sizeof_long=0
bf3b7cd3 5132fi
a3bba767
JJ
5133fi
5134echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5135echo "${ECHO_T}$ac_cv_sizeof_long" >&6
bf3b7cd3
JD
5136cat >>confdefs.h <<_ACEOF
5137#define SIZEOF_LONG $ac_cv_sizeof_long
5138_ACEOF
5139
5140
a3bba767
JJ
5141echo "$as_me:$LINENO: checking for long long" >&5
5142echo $ECHO_N "checking for long long... $ECHO_C" >&6
5ec1c5e6
KC
5143if test "${ac_cv_type_long_long+set}" = set; then
5144 echo $ECHO_N "(cached) $ECHO_C" >&6
5145else
5146 cat >conftest.$ac_ext <<_ACEOF
5147/* confdefs.h. */
5148_ACEOF
5149cat confdefs.h >>conftest.$ac_ext
5150cat >>conftest.$ac_ext <<_ACEOF
5151/* end confdefs.h. */
5152$ac_includes_default
5153int
5154main ()
5155{
a3bba767 5156if ((long long *) 0)
5ec1c5e6 5157 return 0;
a3bba767 5158if (sizeof (long long))
5ec1c5e6
KC
5159 return 0;
5160 ;
5161 return 0;
5162}
5163_ACEOF
5164rm -f conftest.$ac_objext
a3bba767
JJ
5165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5166 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
5167 ac_status=$?
5168 grep -v '^ *+' conftest.er1 >conftest.err
5169 rm -f conftest.er1
5170 cat conftest.err >&5
5171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5172 (exit $ac_status); } &&
5173 { ac_try='test -z "$ac_c_werror_flag"
5174 || test ! -s conftest.err'
5175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5176 (eval $ac_try) 2>&5
5177 ac_status=$?
5178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5179 (exit $ac_status); }; } &&
5180 { ac_try='test -s conftest.$ac_objext'
5181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5182 (eval $ac_try) 2>&5
5183 ac_status=$?
5184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5185 (exit $ac_status); }; }; then
5ec1c5e6
KC
5186 ac_cv_type_long_long=yes
5187else
5188 echo "$as_me: failed program was:" >&5
5189sed 's/^/| /' conftest.$ac_ext >&5
5190
a3bba767 5191ac_cv_type_long_long=no
5ec1c5e6 5192fi
a3bba767 5193rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 5194fi
a3bba767
JJ
5195echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5196echo "${ECHO_T}$ac_cv_type_long_long" >&6
5ec1c5e6
KC
5197if test $ac_cv_type_long_long = yes; then
5198
5199cat >>confdefs.h <<_ACEOF
5200#define HAVE_LONG_LONG 1
5201_ACEOF
5202
a3bba767
JJ
5203echo "$as_me:$LINENO: checking for long long" >&5
5204echo $ECHO_N "checking for long long... $ECHO_C" >&6
bf3b7cd3
JD
5205if test "${ac_cv_type_long_long+set}" = set; then
5206 echo $ECHO_N "(cached) $ECHO_C" >&6
5207else
5208 cat >conftest.$ac_ext <<_ACEOF
5209/* confdefs.h. */
5210_ACEOF
5211cat confdefs.h >>conftest.$ac_ext
5212cat >>conftest.$ac_ext <<_ACEOF
5213/* end confdefs.h. */
5214$ac_includes_default
5215int
5216main ()
5217{
a3bba767 5218if ((long long *) 0)
bf3b7cd3 5219 return 0;
a3bba767 5220if (sizeof (long long))
bf3b7cd3
JD
5221 return 0;
5222 ;
5223 return 0;
5224}
5225_ACEOF
5226rm -f conftest.$ac_objext
a3bba767
JJ
5227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5228 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5229 ac_status=$?
5230 grep -v '^ *+' conftest.er1 >conftest.err
5231 rm -f conftest.er1
5232 cat conftest.err >&5
5233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5234 (exit $ac_status); } &&
5235 { ac_try='test -z "$ac_c_werror_flag"
5236 || test ! -s conftest.err'
5237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5238 (eval $ac_try) 2>&5
5239 ac_status=$?
5240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5241 (exit $ac_status); }; } &&
5242 { ac_try='test -s conftest.$ac_objext'
5243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5244 (eval $ac_try) 2>&5
5245 ac_status=$?
5246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5247 (exit $ac_status); }; }; then
5248 ac_cv_type_long_long=yes
5249else
bf3b7cd3
JD
5250 echo "$as_me: failed program was:" >&5
5251sed 's/^/| /' conftest.$ac_ext >&5
5252
a3bba767 5253ac_cv_type_long_long=no
bf3b7cd3 5254fi
a3bba767 5255rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5256fi
a3bba767
JJ
5257echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5258echo "${ECHO_T}$ac_cv_type_long_long" >&6
bf3b7cd3 5259
a3bba767
JJ
5260echo "$as_me:$LINENO: checking size of long long" >&5
5261echo $ECHO_N "checking size of long long... $ECHO_C" >&6
bf3b7cd3
JD
5262if test "${ac_cv_sizeof_long_long+set}" = set; then
5263 echo $ECHO_N "(cached) $ECHO_C" >&6
5264else
a3bba767
JJ
5265 if test "$ac_cv_type_long_long" = yes; then
5266 # The cast to unsigned long works around a bug in the HP C Compiler
5267 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5268 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5269 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5270 if test "$cross_compiling" = yes; then
5271 # Depending upon the size, compute the lo and hi bounds.
5272cat >conftest.$ac_ext <<_ACEOF
5273/* confdefs.h. */
5274_ACEOF
5275cat confdefs.h >>conftest.$ac_ext
5276cat >>conftest.$ac_ext <<_ACEOF
5277/* end confdefs.h. */
5278$ac_includes_default
5279int
5280main ()
5281{
a3bba767 5282static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
bf3b7cd3
JD
5283test_array [0] = 0
5284
5285 ;
5286 return 0;
5287}
5288_ACEOF
5289rm -f conftest.$ac_objext
a3bba767
JJ
5290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5291 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5292 ac_status=$?
5293 grep -v '^ *+' conftest.er1 >conftest.err
5294 rm -f conftest.er1
5295 cat conftest.err >&5
5296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5297 (exit $ac_status); } &&
5298 { ac_try='test -z "$ac_c_werror_flag"
5299 || test ! -s conftest.err'
5300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5301 (eval $ac_try) 2>&5
5302 ac_status=$?
5303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5304 (exit $ac_status); }; } &&
5305 { ac_try='test -s conftest.$ac_objext'
5306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5307 (eval $ac_try) 2>&5
5308 ac_status=$?
5309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5310 (exit $ac_status); }; }; then
bf3b7cd3
JD
5311 ac_lo=0 ac_mid=0
5312 while :; do
5313 cat >conftest.$ac_ext <<_ACEOF
5314/* confdefs.h. */
5315_ACEOF
5316cat confdefs.h >>conftest.$ac_ext
5317cat >>conftest.$ac_ext <<_ACEOF
5318/* end confdefs.h. */
5319$ac_includes_default
5320int
5321main ()
5322{
a3bba767 5323static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
5324test_array [0] = 0
5325
5326 ;
5327 return 0;
5328}
5329_ACEOF
5330rm -f conftest.$ac_objext
a3bba767
JJ
5331if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5332 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5333 ac_status=$?
5334 grep -v '^ *+' conftest.er1 >conftest.err
5335 rm -f conftest.er1
5336 cat conftest.err >&5
5337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5338 (exit $ac_status); } &&
5339 { ac_try='test -z "$ac_c_werror_flag"
5340 || test ! -s conftest.err'
5341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5342 (eval $ac_try) 2>&5
5343 ac_status=$?
5344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5345 (exit $ac_status); }; } &&
5346 { ac_try='test -s conftest.$ac_objext'
5347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5348 (eval $ac_try) 2>&5
5349 ac_status=$?
5350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5351 (exit $ac_status); }; }; then
8b1f719a 5352 ac_hi=$ac_mid; break
bf3b7cd3
JD
5353else
5354 echo "$as_me: failed program was:" >&5
5355sed 's/^/| /' conftest.$ac_ext >&5
5356
a3bba767
JJ
5357ac_lo=`expr $ac_mid + 1`
5358 if test $ac_lo -le $ac_mid; then
5359 ac_lo= ac_hi=
5360 break
5361 fi
5362 ac_mid=`expr 2 '*' $ac_mid + 1`
8b1f719a 5363fi
a3bba767 5364rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8b1f719a
PB
5365 done
5366else
5367 echo "$as_me: failed program was:" >&5
5368sed 's/^/| /' conftest.$ac_ext >&5
5369
a3bba767 5370cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5371/* confdefs.h. */
5372_ACEOF
5373cat confdefs.h >>conftest.$ac_ext
5374cat >>conftest.$ac_ext <<_ACEOF
5375/* end confdefs.h. */
5376$ac_includes_default
5377int
5378main ()
5379{
a3bba767 5380static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
bf3b7cd3
JD
5381test_array [0] = 0
5382
5383 ;
5384 return 0;
5385}
5386_ACEOF
5387rm -f conftest.$ac_objext
a3bba767
JJ
5388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5389 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5390 ac_status=$?
5391 grep -v '^ *+' conftest.er1 >conftest.err
5392 rm -f conftest.er1
5393 cat conftest.err >&5
5394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5395 (exit $ac_status); } &&
5396 { ac_try='test -z "$ac_c_werror_flag"
5397 || test ! -s conftest.err'
5398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5399 (eval $ac_try) 2>&5
5400 ac_status=$?
5401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5402 (exit $ac_status); }; } &&
5403 { ac_try='test -s conftest.$ac_objext'
5404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5405 (eval $ac_try) 2>&5
5406 ac_status=$?
5407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5408 (exit $ac_status); }; }; then
bf3b7cd3
JD
5409 ac_hi=-1 ac_mid=-1
5410 while :; do
5411 cat >conftest.$ac_ext <<_ACEOF
5412/* confdefs.h. */
5413_ACEOF
5414cat confdefs.h >>conftest.$ac_ext
5415cat >>conftest.$ac_ext <<_ACEOF
5416/* end confdefs.h. */
5417$ac_includes_default
5418int
5419main ()
5420{
a3bba767 5421static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
bf3b7cd3
JD
5422test_array [0] = 0
5423
5424 ;
5425 return 0;
5426}
5427_ACEOF
5428rm -f conftest.$ac_objext
a3bba767
JJ
5429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5430 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5431 ac_status=$?
5432 grep -v '^ *+' conftest.er1 >conftest.err
5433 rm -f conftest.er1
5434 cat conftest.err >&5
5435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5436 (exit $ac_status); } &&
5437 { ac_try='test -z "$ac_c_werror_flag"
5438 || test ! -s conftest.err'
5439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5440 (eval $ac_try) 2>&5
5441 ac_status=$?
5442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5443 (exit $ac_status); }; } &&
5444 { ac_try='test -s conftest.$ac_objext'
5445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5446 (eval $ac_try) 2>&5
5447 ac_status=$?
5448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5449 (exit $ac_status); }; }; then
bf3b7cd3
JD
5450 ac_lo=$ac_mid; break
5451else
5452 echo "$as_me: failed program was:" >&5
5453sed 's/^/| /' conftest.$ac_ext >&5
5454
a3bba767
JJ
5455ac_hi=`expr '(' $ac_mid ')' - 1`
5456 if test $ac_mid -le $ac_hi; then
5457 ac_lo= ac_hi=
5458 break
5459 fi
5460 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5461fi
a3bba767 5462rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5463 done
5464else
5465 echo "$as_me: failed program was:" >&5
5466sed 's/^/| /' conftest.$ac_ext >&5
5467
a3bba767 5468ac_lo= ac_hi=
bf3b7cd3 5469fi
a3bba767 5470rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5471fi
a3bba767 5472rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5473# Binary search between lo and hi bounds.
5474while test "x$ac_lo" != "x$ac_hi"; do
5475 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5476 cat >conftest.$ac_ext <<_ACEOF
5477/* confdefs.h. */
5478_ACEOF
5479cat confdefs.h >>conftest.$ac_ext
5480cat >>conftest.$ac_ext <<_ACEOF
5481/* end confdefs.h. */
5482$ac_includes_default
5483int
5484main ()
5485{
a3bba767 5486static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
5487test_array [0] = 0
5488
5489 ;
5490 return 0;
5491}
5492_ACEOF
5493rm -f conftest.$ac_objext
a3bba767
JJ
5494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5495 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5496 ac_status=$?
5497 grep -v '^ *+' conftest.er1 >conftest.err
5498 rm -f conftest.er1
5499 cat conftest.err >&5
5500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5501 (exit $ac_status); } &&
5502 { ac_try='test -z "$ac_c_werror_flag"
5503 || test ! -s conftest.err'
5504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5505 (eval $ac_try) 2>&5
5506 ac_status=$?
5507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5508 (exit $ac_status); }; } &&
5509 { ac_try='test -s conftest.$ac_objext'
5510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5511 (eval $ac_try) 2>&5
5512 ac_status=$?
5513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5514 (exit $ac_status); }; }; then
bf3b7cd3
JD
5515 ac_hi=$ac_mid
5516else
5517 echo "$as_me: failed program was:" >&5
5518sed 's/^/| /' conftest.$ac_ext >&5
5519
a3bba767 5520ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5521fi
a3bba767 5522rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5523done
5524case $ac_lo in
5525?*) ac_cv_sizeof_long_long=$ac_lo;;
a3bba767 5526'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 5527See \`config.log' for more details." >&5
a3bba767 5528echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 5529See \`config.log' for more details." >&2;}
a3bba767 5530 { (exit 1); exit 1; }; } ;;
bf3b7cd3 5531esac
a3bba767
JJ
5532else
5533 if test "$cross_compiling" = yes; then
5534 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5535See \`config.log' for more details." >&5
5536echo "$as_me: error: cannot run test program while cross compiling
5537See \`config.log' for more details." >&2;}
5538 { (exit 1); exit 1; }; }
bf3b7cd3
JD
5539else
5540 cat >conftest.$ac_ext <<_ACEOF
5541/* confdefs.h. */
5542_ACEOF
5543cat confdefs.h >>conftest.$ac_ext
5544cat >>conftest.$ac_ext <<_ACEOF
5545/* end confdefs.h. */
5546$ac_includes_default
a3bba767
JJ
5547long longval () { return (long) (sizeof (long long)); }
5548unsigned long ulongval () { return (long) (sizeof (long long)); }
bf3b7cd3
JD
5549#include <stdio.h>
5550#include <stdlib.h>
5551int
5552main ()
5553{
5554
5555 FILE *f = fopen ("conftest.val", "w");
5556 if (! f)
a3bba767
JJ
5557 exit (1);
5558 if (((long) (sizeof (long long))) < 0)
bf3b7cd3 5559 {
a3bba767
JJ
5560 long i = longval ();
5561 if (i != ((long) (sizeof (long long))))
5562 exit (1);
bf3b7cd3
JD
5563 fprintf (f, "%ld\n", i);
5564 }
5565 else
5566 {
a3bba767
JJ
5567 unsigned long i = ulongval ();
5568 if (i != ((long) (sizeof (long long))))
5569 exit (1);
bf3b7cd3
JD
5570 fprintf (f, "%lu\n", i);
5571 }
a3bba767 5572 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5573
5574 ;
5575 return 0;
5576}
5577_ACEOF
5578rm -f conftest$ac_exeext
a3bba767
JJ
5579if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5580 (eval $ac_link) 2>&5
bf3b7cd3
JD
5581 ac_status=$?
5582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5583 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
5584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5585 (eval $ac_try) 2>&5
bf3b7cd3
JD
5586 ac_status=$?
5587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5588 (exit $ac_status); }; }; then
5589 ac_cv_sizeof_long_long=`cat conftest.val`
5590else
5591 echo "$as_me: program exited with status $ac_status" >&5
5592echo "$as_me: failed program was:" >&5
5593sed 's/^/| /' conftest.$ac_ext >&5
5594
5595( exit $ac_status )
a3bba767 5596{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 5597See \`config.log' for more details." >&5
a3bba767 5598echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 5599See \`config.log' for more details." >&2;}
a3bba767
JJ
5600 { (exit 1); exit 1; }; }
5601fi
5602rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5603fi
5604fi
5605rm -f conftest.val
a3bba767
JJ
5606else
5607 ac_cv_sizeof_long_long=0
8b1f719a 5608fi
a3bba767
JJ
5609fi
5610echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5611echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
bf3b7cd3
JD
5612cat >>confdefs.h <<_ACEOF
5613#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5614_ACEOF
5615
5616
5617fi
5ec1c5e6 5618
a3bba767
JJ
5619echo "$as_me:$LINENO: checking for __int64" >&5
5620echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5ec1c5e6
KC
5621if test "${ac_cv_type___int64+set}" = set; then
5622 echo $ECHO_N "(cached) $ECHO_C" >&6
5623else
5624 cat >conftest.$ac_ext <<_ACEOF
5625/* confdefs.h. */
5626_ACEOF
5627cat confdefs.h >>conftest.$ac_ext
5628cat >>conftest.$ac_ext <<_ACEOF
5629/* end confdefs.h. */
5630$ac_includes_default
5631int
5632main ()
5633{
a3bba767 5634if ((__int64 *) 0)
5ec1c5e6 5635 return 0;
a3bba767 5636if (sizeof (__int64))
5ec1c5e6
KC
5637 return 0;
5638 ;
5639 return 0;
5640}
5641_ACEOF
5642rm -f conftest.$ac_objext
a3bba767
JJ
5643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5644 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
5645 ac_status=$?
5646 grep -v '^ *+' conftest.er1 >conftest.err
5647 rm -f conftest.er1
5648 cat conftest.err >&5
5649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5650 (exit $ac_status); } &&
5651 { ac_try='test -z "$ac_c_werror_flag"
5652 || test ! -s conftest.err'
5653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5654 (eval $ac_try) 2>&5
5655 ac_status=$?
5656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5657 (exit $ac_status); }; } &&
5658 { ac_try='test -s conftest.$ac_objext'
5659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5660 (eval $ac_try) 2>&5
5661 ac_status=$?
5662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5663 (exit $ac_status); }; }; then
5ec1c5e6
KC
5664 ac_cv_type___int64=yes
5665else
5666 echo "$as_me: failed program was:" >&5
5667sed 's/^/| /' conftest.$ac_ext >&5
5668
a3bba767 5669ac_cv_type___int64=no
5ec1c5e6 5670fi
a3bba767 5671rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 5672fi
a3bba767
JJ
5673echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5674echo "${ECHO_T}$ac_cv_type___int64" >&6
5ec1c5e6
KC
5675if test $ac_cv_type___int64 = yes; then
5676
5677cat >>confdefs.h <<_ACEOF
5678#define HAVE___INT64 1
5679_ACEOF
5680
a3bba767
JJ
5681echo "$as_me:$LINENO: checking for __int64" >&5
5682echo $ECHO_N "checking for __int64... $ECHO_C" >&6
bf3b7cd3
JD
5683if test "${ac_cv_type___int64+set}" = set; then
5684 echo $ECHO_N "(cached) $ECHO_C" >&6
5685else
ba479fd2 5686 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5687/* confdefs.h. */
5688_ACEOF
5689cat confdefs.h >>conftest.$ac_ext
5690cat >>conftest.$ac_ext <<_ACEOF
5691/* end confdefs.h. */
bf3b7cd3 5692$ac_includes_default
ba479fd2
NN
5693int
5694main ()
5695{
a3bba767 5696if ((__int64 *) 0)
bf3b7cd3 5697 return 0;
a3bba767 5698if (sizeof (__int64))
bf3b7cd3 5699 return 0;
ba479fd2
NN
5700 ;
5701 return 0;
5702}
5703_ACEOF
5704rm -f conftest.$ac_objext
a3bba767
JJ
5705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5706 (eval $ac_compile) 2>conftest.er1
ba479fd2 5707 ac_status=$?
86da66b5
HPN
5708 grep -v '^ *+' conftest.er1 >conftest.err
5709 rm -f conftest.er1
5710 cat conftest.err >&5
ba479fd2 5711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5712 (exit $ac_status); } &&
5713 { ac_try='test -z "$ac_c_werror_flag"
5714 || test ! -s conftest.err'
5715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5716 (eval $ac_try) 2>&5
5717 ac_status=$?
5718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5719 (exit $ac_status); }; } &&
5720 { ac_try='test -s conftest.$ac_objext'
5721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5722 (eval $ac_try) 2>&5
5723 ac_status=$?
5724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5725 (exit $ac_status); }; }; then
bf3b7cd3 5726 ac_cv_type___int64=yes
75b6f3fd 5727else
ba479fd2
NN
5728 echo "$as_me: failed program was:" >&5
5729sed 's/^/| /' conftest.$ac_ext >&5
5730
a3bba767 5731ac_cv_type___int64=no
75b6f3fd 5732fi
a3bba767 5733rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5734fi
a3bba767
JJ
5735echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5736echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 5737
a3bba767
JJ
5738echo "$as_me:$LINENO: checking size of __int64" >&5
5739echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
bf3b7cd3 5740if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 5741 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 5742else
a3bba767
JJ
5743 if test "$ac_cv_type___int64" = yes; then
5744 # The cast to unsigned long works around a bug in the HP C Compiler
5745 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5746 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5747 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5748 if test "$cross_compiling" = yes; then
5749 # Depending upon the size, compute the lo and hi bounds.
5750cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5751/* confdefs.h. */
5752_ACEOF
5753cat confdefs.h >>conftest.$ac_ext
5754cat >>conftest.$ac_ext <<_ACEOF
5755/* end confdefs.h. */
bf3b7cd3 5756$ac_includes_default
ba479fd2
NN
5757int
5758main ()
5759{
a3bba767 5760static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
bf3b7cd3
JD
5761test_array [0] = 0
5762
ba479fd2
NN
5763 ;
5764 return 0;
5765}
5766_ACEOF
5767rm -f conftest.$ac_objext
a3bba767
JJ
5768if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5769 (eval $ac_compile) 2>conftest.er1
ba479fd2 5770 ac_status=$?
86da66b5
HPN
5771 grep -v '^ *+' conftest.er1 >conftest.err
5772 rm -f conftest.er1
5773 cat conftest.err >&5
ba479fd2 5774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5775 (exit $ac_status); } &&
5776 { ac_try='test -z "$ac_c_werror_flag"
5777 || test ! -s conftest.err'
5778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5779 (eval $ac_try) 2>&5
5780 ac_status=$?
5781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5782 (exit $ac_status); }; } &&
5783 { ac_try='test -s conftest.$ac_objext'
5784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5785 (eval $ac_try) 2>&5
5786 ac_status=$?
5787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5788 (exit $ac_status); }; }; then
bf3b7cd3
JD
5789 ac_lo=0 ac_mid=0
5790 while :; do
5791 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5792/* confdefs.h. */
5793_ACEOF
5794cat confdefs.h >>conftest.$ac_ext
5795cat >>conftest.$ac_ext <<_ACEOF
5796/* end confdefs.h. */
bf3b7cd3 5797$ac_includes_default
ba479fd2
NN
5798int
5799main ()
5800{
a3bba767 5801static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
bf3b7cd3
JD
5802test_array [0] = 0
5803
ba479fd2
NN
5804 ;
5805 return 0;
5806}
5807_ACEOF
5808rm -f conftest.$ac_objext
a3bba767
JJ
5809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5810 (eval $ac_compile) 2>conftest.er1
ba479fd2 5811 ac_status=$?
86da66b5
HPN
5812 grep -v '^ *+' conftest.er1 >conftest.err
5813 rm -f conftest.er1
5814 cat conftest.err >&5
ba479fd2 5815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5816 (exit $ac_status); } &&
5817 { ac_try='test -z "$ac_c_werror_flag"
5818 || test ! -s conftest.err'
5819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5820 (eval $ac_try) 2>&5
5821 ac_status=$?
5822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5823 (exit $ac_status); }; } &&
5824 { ac_try='test -s conftest.$ac_objext'
5825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5826 (eval $ac_try) 2>&5
5827 ac_status=$?
5828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5829 (exit $ac_status); }; }; then
bf3b7cd3 5830 ac_hi=$ac_mid; break
75e93faa 5831else
ba479fd2
NN
5832 echo "$as_me: failed program was:" >&5
5833sed 's/^/| /' conftest.$ac_ext >&5
5834
a3bba767
JJ
5835ac_lo=`expr $ac_mid + 1`
5836 if test $ac_lo -le $ac_mid; then
5837 ac_lo= ac_hi=
5838 break
5839 fi
5840 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 5841fi
a3bba767 5842rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5843 done
75e93faa 5844else
bf3b7cd3
JD
5845 echo "$as_me: failed program was:" >&5
5846sed 's/^/| /' conftest.$ac_ext >&5
5847
a3bba767 5848cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5849/* confdefs.h. */
5850_ACEOF
5851cat confdefs.h >>conftest.$ac_ext
5852cat >>conftest.$ac_ext <<_ACEOF
5853/* end confdefs.h. */
bf3b7cd3 5854$ac_includes_default
ba479fd2
NN
5855int
5856main ()
5857{
a3bba767 5858static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
bf3b7cd3
JD
5859test_array [0] = 0
5860
ba479fd2
NN
5861 ;
5862 return 0;
5863}
5864_ACEOF
5865rm -f conftest.$ac_objext
a3bba767
JJ
5866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5867 (eval $ac_compile) 2>conftest.er1
ba479fd2 5868 ac_status=$?
86da66b5
HPN
5869 grep -v '^ *+' conftest.er1 >conftest.err
5870 rm -f conftest.er1
5871 cat conftest.err >&5
ba479fd2 5872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5873 (exit $ac_status); } &&
5874 { ac_try='test -z "$ac_c_werror_flag"
5875 || test ! -s conftest.err'
5876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5877 (eval $ac_try) 2>&5
5878 ac_status=$?
5879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880 (exit $ac_status); }; } &&
5881 { ac_try='test -s conftest.$ac_objext'
5882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5883 (eval $ac_try) 2>&5
5884 ac_status=$?
5885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5886 (exit $ac_status); }; }; then
bf3b7cd3
JD
5887 ac_hi=-1 ac_mid=-1
5888 while :; do
5889 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5890/* confdefs.h. */
5891_ACEOF
5892cat confdefs.h >>conftest.$ac_ext
5893cat >>conftest.$ac_ext <<_ACEOF
5894/* end confdefs.h. */
bf3b7cd3 5895$ac_includes_default
ba479fd2
NN
5896int
5897main ()
5898{
a3bba767 5899static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
bf3b7cd3
JD
5900test_array [0] = 0
5901
ba479fd2
NN
5902 ;
5903 return 0;
5904}
5905_ACEOF
5906rm -f conftest.$ac_objext
a3bba767
JJ
5907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5908 (eval $ac_compile) 2>conftest.er1
ba479fd2 5909 ac_status=$?
86da66b5
HPN
5910 grep -v '^ *+' conftest.er1 >conftest.err
5911 rm -f conftest.er1
5912 cat conftest.err >&5
ba479fd2 5913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5914 (exit $ac_status); } &&
5915 { ac_try='test -z "$ac_c_werror_flag"
5916 || test ! -s conftest.err'
5917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5918 (eval $ac_try) 2>&5
5919 ac_status=$?
5920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5921 (exit $ac_status); }; } &&
5922 { ac_try='test -s conftest.$ac_objext'
5923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5924 (eval $ac_try) 2>&5
5925 ac_status=$?
5926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5927 (exit $ac_status); }; }; then
bf3b7cd3 5928 ac_lo=$ac_mid; break
04cabffc 5929else
ba479fd2
NN
5930 echo "$as_me: failed program was:" >&5
5931sed 's/^/| /' conftest.$ac_ext >&5
5932
a3bba767
JJ
5933ac_hi=`expr '(' $ac_mid ')' - 1`
5934 if test $ac_mid -le $ac_hi; then
5935 ac_lo= ac_hi=
5936 break
5937 fi
5938 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 5939fi
a3bba767 5940rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5941 done
5942else
5943 echo "$as_me: failed program was:" >&5
5944sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 5945
a3bba767 5946ac_lo= ac_hi=
414d23ae 5947fi
a3bba767 5948rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5949fi
a3bba767 5950rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5951# Binary search between lo and hi bounds.
5952while test "x$ac_lo" != "x$ac_hi"; do
5953 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 5954 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5955/* confdefs.h. */
5956_ACEOF
5957cat confdefs.h >>conftest.$ac_ext
5958cat >>conftest.$ac_ext <<_ACEOF
5959/* end confdefs.h. */
bf3b7cd3 5960$ac_includes_default
ba479fd2
NN
5961int
5962main ()
5963{
a3bba767 5964static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
bf3b7cd3
JD
5965test_array [0] = 0
5966
ba479fd2
NN
5967 ;
5968 return 0;
5969}
5970_ACEOF
5971rm -f conftest.$ac_objext
a3bba767
JJ
5972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5973 (eval $ac_compile) 2>conftest.er1
ba479fd2 5974 ac_status=$?
86da66b5
HPN
5975 grep -v '^ *+' conftest.er1 >conftest.err
5976 rm -f conftest.er1
5977 cat conftest.err >&5
ba479fd2 5978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
5979 (exit $ac_status); } &&
5980 { ac_try='test -z "$ac_c_werror_flag"
5981 || test ! -s conftest.err'
5982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5983 (eval $ac_try) 2>&5
5984 ac_status=$?
5985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5986 (exit $ac_status); }; } &&
5987 { ac_try='test -s conftest.$ac_objext'
5988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5989 (eval $ac_try) 2>&5
5990 ac_status=$?
5991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5992 (exit $ac_status); }; }; then
bf3b7cd3 5993 ac_hi=$ac_mid
75e93faa 5994else
ba479fd2
NN
5995 echo "$as_me: failed program was:" >&5
5996sed 's/^/| /' conftest.$ac_ext >&5
5997
a3bba767 5998ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 5999fi
a3bba767 6000rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6001done
bf3b7cd3
JD
6002case $ac_lo in
6003?*) ac_cv_sizeof___int64=$ac_lo;;
a3bba767 6004'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6005See \`config.log' for more details." >&5
a3bba767 6006echo "$as_me: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6007See \`config.log' for more details." >&2;}
a3bba767 6008 { (exit 1); exit 1; }; } ;;
bf3b7cd3 6009esac
a3bba767
JJ
6010else
6011 if test "$cross_compiling" = yes; then
6012 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6013See \`config.log' for more details." >&5
6014echo "$as_me: error: cannot run test program while cross compiling
6015See \`config.log' for more details." >&2;}
6016 { (exit 1); exit 1; }; }
bf3b7cd3
JD
6017else
6018 cat >conftest.$ac_ext <<_ACEOF
6019/* confdefs.h. */
6020_ACEOF
6021cat confdefs.h >>conftest.$ac_ext
6022cat >>conftest.$ac_ext <<_ACEOF
6023/* end confdefs.h. */
6024$ac_includes_default
a3bba767
JJ
6025long longval () { return (long) (sizeof (__int64)); }
6026unsigned long ulongval () { return (long) (sizeof (__int64)); }
bf3b7cd3
JD
6027#include <stdio.h>
6028#include <stdlib.h>
6029int
6030main ()
6031{
414d23ae 6032
bf3b7cd3
JD
6033 FILE *f = fopen ("conftest.val", "w");
6034 if (! f)
a3bba767
JJ
6035 exit (1);
6036 if (((long) (sizeof (__int64))) < 0)
bf3b7cd3 6037 {
a3bba767
JJ
6038 long i = longval ();
6039 if (i != ((long) (sizeof (__int64))))
6040 exit (1);
bf3b7cd3
JD
6041 fprintf (f, "%ld\n", i);
6042 }
6043 else
6044 {
a3bba767
JJ
6045 unsigned long i = ulongval ();
6046 if (i != ((long) (sizeof (__int64))))
6047 exit (1);
bf3b7cd3
JD
6048 fprintf (f, "%lu\n", i);
6049 }
a3bba767 6050 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6051
6052 ;
6053 return 0;
6054}
6055_ACEOF
6056rm -f conftest$ac_exeext
a3bba767
JJ
6057if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6058 (eval $ac_link) 2>&5
bf3b7cd3
JD
6059 ac_status=$?
6060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6061 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
6062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6063 (eval $ac_try) 2>&5
bf3b7cd3
JD
6064 ac_status=$?
6065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6066 (exit $ac_status); }; }; then
6067 ac_cv_sizeof___int64=`cat conftest.val`
6068else
6069 echo "$as_me: program exited with status $ac_status" >&5
6070echo "$as_me: failed program was:" >&5
6071sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6072
bf3b7cd3 6073( exit $ac_status )
a3bba767 6074{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6075See \`config.log' for more details." >&5
a3bba767 6076echo "$as_me: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6077See \`config.log' for more details." >&2;}
a3bba767
JJ
6078 { (exit 1); exit 1; }; }
6079fi
6080rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6081fi
6082fi
6083rm -f conftest.val
a3bba767
JJ
6084else
6085 ac_cv_sizeof___int64=0
bf3b7cd3 6086fi
a3bba767
JJ
6087fi
6088echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6089echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 6090cat >>confdefs.h <<_ACEOF
414d23ae 6091#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6092_ACEOF
414d23ae 6093
cafe096b 6094
414d23ae
HPN
6095fi
6096
5ec1c5e6 6097
34a86c2b
NN
6098# ---------------------
6099# Warnings and checking
6100# ---------------------
6101
b5472e1d
NN
6102# Check $CC warning features (if it's GCC).
6103# We want to use -pedantic, but we don't want warnings about
6104# * 'long long'
6105# * variadic macros
89a42ac8 6106# * overlong strings
b5472e1d
NN
6107# So, we only use -pedantic if we can disable those warnings.
6108
3bbd5a19
PB
6109loose_warn=
6110save_CFLAGS="$CFLAGS"
6111for option in -W -Wall -Wwrite-strings -Wstrict-prototypes \
6112 -Wmissing-prototypes; do
6113 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
6114
6115 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
6116echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
6117if eval "test \"\${$as_acx_Woption+set}\" = set"; then
b5472e1d
NN
6118 echo $ECHO_N "(cached) $ECHO_C" >&6
6119else
3bbd5a19
PB
6120 CFLAGS="$option"
6121 cat >conftest.$ac_ext <<_ACEOF
b5472e1d
NN
6122/* confdefs.h. */
6123_ACEOF
6124cat confdefs.h >>conftest.$ac_ext
6125cat >>conftest.$ac_ext <<_ACEOF
6126/* end confdefs.h. */
6127
3bbd5a19
PB
6128int
6129main ()
6130{
6131
6132 ;
6133 return 0;
6134}
b5472e1d
NN
6135_ACEOF
6136rm -f conftest.$ac_objext
a3bba767
JJ
6137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6138 (eval $ac_compile) 2>conftest.er1
b5472e1d
NN
6139 ac_status=$?
6140 grep -v '^ *+' conftest.er1 >conftest.err
6141 rm -f conftest.er1
6142 cat conftest.err >&5
6143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6144 (exit $ac_status); } &&
6145 { ac_try='test -z "$ac_c_werror_flag"
6146 || test ! -s conftest.err'
6147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6148 (eval $ac_try) 2>&5
6149 ac_status=$?
6150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6151 (exit $ac_status); }; } &&
6152 { ac_try='test -s conftest.$ac_objext'
6153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6154 (eval $ac_try) 2>&5
6155 ac_status=$?
6156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6157 (exit $ac_status); }; }; then
3bbd5a19 6158 eval "$as_acx_Woption=yes"
b5472e1d
NN
6159else
6160 echo "$as_me: failed program was:" >&5
6161sed 's/^/| /' conftest.$ac_ext >&5
6162
3bbd5a19 6163eval "$as_acx_Woption=no"
b5472e1d 6164fi
a3bba767 6165rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
6166
6167fi
3bbd5a19
PB
6168echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
6169echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
6170 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
6171 loose_warn="$loose_warn${loose_warn:+ }$option"
6172fi
6173
6174 done
6175CFLAGS="$save_CFLAGS"
6176
6177cxx_compat_warn=
6178save_CFLAGS="$CFLAGS"
6179for option in -Wc++-compat; do
6180 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
b5472e1d 6181
3bbd5a19
PB
6182 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
6183echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
6184if eval "test \"\${$as_acx_Woption+set}\" = set"; then
b5472e1d
NN
6185 echo $ECHO_N "(cached) $ECHO_C" >&6
6186else
3bbd5a19
PB
6187 CFLAGS="$option"
6188 cat >conftest.$ac_ext <<_ACEOF
b5472e1d
NN
6189/* confdefs.h. */
6190_ACEOF
6191cat confdefs.h >>conftest.$ac_ext
6192cat >>conftest.$ac_ext <<_ACEOF
6193/* end confdefs.h. */
6194
3bbd5a19
PB
6195int
6196main ()
6197{
6198
6199 ;
6200 return 0;
6201}
b5472e1d
NN
6202_ACEOF
6203rm -f conftest.$ac_objext
a3bba767
JJ
6204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6205 (eval $ac_compile) 2>conftest.er1
b5472e1d
NN
6206 ac_status=$?
6207 grep -v '^ *+' conftest.er1 >conftest.err
6208 rm -f conftest.er1
6209 cat conftest.err >&5
6210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6211 (exit $ac_status); } &&
6212 { ac_try='test -z "$ac_c_werror_flag"
6213 || test ! -s conftest.err'
6214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6215 (eval $ac_try) 2>&5
6216 ac_status=$?
6217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6218 (exit $ac_status); }; } &&
6219 { ac_try='test -s conftest.$ac_objext'
6220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6221 (eval $ac_try) 2>&5
6222 ac_status=$?
6223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6224 (exit $ac_status); }; }; then
3bbd5a19 6225 eval "$as_acx_Woption=yes"
b5472e1d
NN
6226else
6227 echo "$as_me: failed program was:" >&5
6228sed 's/^/| /' conftest.$ac_ext >&5
6229
3bbd5a19 6230eval "$as_acx_Woption=no"
b5472e1d 6231fi
a3bba767 6232rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
6233
6234fi
3bbd5a19
PB
6235echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
6236echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
6237 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
6238 cxx_compat_warn="$cxx_compat_warn${cxx_compat_warn:+ }$option"
6239fi
6240
6241 done
6242CFLAGS="$save_CFLAGS"
b5472e1d 6243
3bbd5a19
PB
6244strict_warn=
6245save_CFLAGS="$CFLAGS"
6246for option in -Wold-style-definition \
6247 -Wmissing-format-attribute; do
6248 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
6249
6250 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
6251echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
6252if eval "test \"\${$as_acx_Woption+set}\" = set"; then
89a42ac8
ZW
6253 echo $ECHO_N "(cached) $ECHO_C" >&6
6254else
3bbd5a19
PB
6255 CFLAGS="$option"
6256 cat >conftest.$ac_ext <<_ACEOF
89a42ac8
ZW
6257/* confdefs.h. */
6258_ACEOF
6259cat confdefs.h >>conftest.$ac_ext
6260cat >>conftest.$ac_ext <<_ACEOF
6261/* end confdefs.h. */
6262
3bbd5a19
PB
6263int
6264main ()
6265{
6266
6267 ;
6268 return 0;
6269}
89a42ac8
ZW
6270_ACEOF
6271rm -f conftest.$ac_objext
a3bba767
JJ
6272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6273 (eval $ac_compile) 2>conftest.er1
89a42ac8
ZW
6274 ac_status=$?
6275 grep -v '^ *+' conftest.er1 >conftest.err
6276 rm -f conftest.er1
6277 cat conftest.err >&5
6278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6279 (exit $ac_status); } &&
6280 { ac_try='test -z "$ac_c_werror_flag"
6281 || test ! -s conftest.err'
6282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6283 (eval $ac_try) 2>&5
6284 ac_status=$?
6285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6286 (exit $ac_status); }; } &&
6287 { ac_try='test -s conftest.$ac_objext'
6288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6289 (eval $ac_try) 2>&5
6290 ac_status=$?
6291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6292 (exit $ac_status); }; }; then
3bbd5a19 6293 eval "$as_acx_Woption=yes"
89a42ac8
ZW
6294else
6295 echo "$as_me: failed program was:" >&5
6296sed 's/^/| /' conftest.$ac_ext >&5
6297
3bbd5a19 6298eval "$as_acx_Woption=no"
89a42ac8 6299fi
a3bba767 6300rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
89a42ac8
ZW
6301
6302fi
3bbd5a19
PB
6303echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
6304echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
6305 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
6306 strict_warn="$strict_warn${strict_warn:+ }$option"
34a86c2b
NN
6307fi
6308
3bbd5a19
PB
6309 done
6310CFLAGS="$save_CFLAGS"
6311
6312if test "$GCC" = yes; then
6313 echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \
6314 -Wno-overlength-strings" >&5
6315echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \
6316 -Wno-overlength-strings... $ECHO_C" >&6
6317if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings+set}" = set; then
643d3bd2
NN
6318 echo $ECHO_N "(cached) $ECHO_C" >&6
6319else
6320 save_CFLAGS="$CFLAGS"
3bbd5a19
PB
6321CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros \
6322 -Wno-overlength-strings"
6323cat >conftest.$ac_ext <<_ACEOF
643d3bd2
NN
6324/* confdefs.h. */
6325_ACEOF
6326cat confdefs.h >>conftest.$ac_ext
6327cat >>conftest.$ac_ext <<_ACEOF
6328/* end confdefs.h. */
6329
3bbd5a19
PB
6330int
6331main ()
6332{
6333
6334 ;
6335 return 0;
6336}
643d3bd2
NN
6337_ACEOF
6338rm -f conftest.$ac_objext
a3bba767
JJ
6339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6340 (eval $ac_compile) 2>conftest.er1
643d3bd2
NN
6341 ac_status=$?
6342 grep -v '^ *+' conftest.er1 >conftest.err
6343 rm -f conftest.er1
6344 cat conftest.err >&5
6345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6346 (exit $ac_status); } &&
6347 { ac_try='test -z "$ac_c_werror_flag"
6348 || test ! -s conftest.err'
6349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6350 (eval $ac_try) 2>&5
6351 ac_status=$?
6352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6353 (exit $ac_status); }; } &&
6354 { ac_try='test -s conftest.$ac_objext'
6355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6356 (eval $ac_try) 2>&5
6357 ac_status=$?
6358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6359 (exit $ac_status); }; }; then
3bbd5a19 6360 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=yes
643d3bd2
NN
6361else
6362 echo "$as_me: failed program was:" >&5
6363sed 's/^/| /' conftest.$ac_ext >&5
6364
3bbd5a19 6365acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=no
643d3bd2 6366fi
a3bba767 6367rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3bbd5a19 6368CFLAGS="$save_CFLAGS"
643d3bd2 6369fi
3bbd5a19
PB
6370echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&5
6371echo "${ECHO_T}$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&6
6372if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings = yes; then
6373 strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros \
6374 -Wno-overlength-strings"
643d3bd2
NN
6375fi
6376
ac0f3f39 6377
ac0f3f39 6378fi
ac0f3f39 6379
ac0f3f39 6380
3bbd5a19 6381# Check whether --enable-werror-always or --disable-werror-always was given.
09a9c095 6382if test "${enable_werror_always+set}" = set; then
a3bba767
JJ
6383 enableval="$enable_werror_always"
6384
09a9c095
NN
6385else
6386 enable_werror_always=no
a3bba767 6387fi;
3bbd5a19
PB
6388if test $enable_werror_always = yes; then
6389 strict_warn="$strict_warn${strict_warn:+ }-Werror"
373477bb 6390fi
373477bb 6391
373477bb
GDR
6392
6393
6394
3bbd5a19
PB
6395# The above macros do nothing if the compiler is not GCC. However, the
6396# Makefile has more goo to add other flags, so this variabl is used to
6397# enables warnings only for GCC.
414d23ae
HPN
6398warn_cflags=
6399if test "x$GCC" = "xyes"; then
6400 warn_cflags='$(GCC_WARN_CFLAGS)'
6401fi
6402
6403
8b1f719a 6404# Enable expensive internal checks
a1286ef5
ZW
6405is_release=
6406if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6407 is_release=yes
6408fi
a6ccdbab 6409
a3bba767 6410# Check whether --enable-checking or --disable-checking was given.
414d23ae 6411if test "${enable_checking+set}" = set; then
a3bba767
JJ
6412 enableval="$enable_checking"
6413 ac_checking_flags="${enableval}"
e1bbfc5c
NS
6414else
6415
6416# Determine the default checks.
6417if test x$is_release = x ; then
6418 ac_checking_flags=yes
6419else
6420 ac_checking_flags=release
6421fi
a3bba767 6422fi;
e1bbfc5c 6423IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
04c3028a 6424for check in release $ac_checking_flags
e1bbfc5c
NS
6425do
6426 case $check in
cdce5c16 6427 # these set all the flags to specific states
3089f8b5 6428 yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
cdce5c16
NS
6429 ac_fold_checking= ; ac_gc_checking=1 ;
6430 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6431 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
cdce5c16 6432 ac_tree_checking=1 ; ac_valgrind_checking= ;;
3089f8b5 6433 no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
cdce5c16
NS
6434 ac_fold_checking= ; ac_gc_checking= ;
6435 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6436 ac_rtlflag_checking= ; ac_runtime_checking= ;
cdce5c16 6437 ac_tree_checking= ; ac_valgrind_checking= ;;
3089f8b5 6438 all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
cdce5c16
NS
6439 ac_fold_checking=1 ; ac_gc_checking=1 ;
6440 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
6441 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6442 ac_tree_checking=1 ; ac_valgrind_checking= ;;
3089f8b5 6443 release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
cdce5c16
NS
6444 ac_fold_checking= ; ac_gc_checking= ;
6445 ac_gc_always_collect= ; ac_rtl_checking= ;
6446 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6447 ac_tree_checking= ; ac_valgrind_checking= ;;
6448 # these enable particular checks
e1bbfc5c 6449 assert) ac_assert_checking=1 ;;
3089f8b5 6450 df) ac_df_checking=1 ;;
e1bbfc5c
NS
6451 fold) ac_fold_checking=1 ;;
6452 gc) ac_gc_checking=1 ;;
6453 gcac) ac_gc_always_collect=1 ;;
6454 misc) ac_checking=1 ;;
e1bbfc5c 6455 rtl) ac_rtl_checking=1 ;;
cdce5c16 6456 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 6457 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 6458 tree) ac_tree_checking=1 ;;
cdce5c16 6459 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 6460 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
6461echo "$as_me: error: unknown check category $check" >&2;}
6462 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
6463 esac
6464done
6465IFS="$ac_save_IFS"
06c37c96 6466
ba479fd2
NN
6467nocommon_flag=""
6468if test x$ac_checking != x ; then
6469
6470cat >>confdefs.h <<\_ACEOF
6471#define ENABLE_CHECKING 1
6472_ACEOF
6473
6474 nocommon_flag=-fno-common
6475fi
3bbd5a19 6476
3089f8b5
PB
6477if test x$ac_df_checking != x ; then
6478
6479cat >>confdefs.h <<\_ACEOF
6480#define ENABLE_DF_CHECKING 1
6481_ACEOF
6482
6483fi
06c37c96
NS
6484if test x$ac_assert_checking != x ; then
6485
6486cat >>confdefs.h <<\_ACEOF
6487#define ENABLE_ASSERT_CHECKING 1
6488_ACEOF
6489
b53ef395 6490fi
232b67d9 6491
b53ef395
NS
6492if test x$ac_runtime_checking != x ; then
6493
6494cat >>confdefs.h <<\_ACEOF
6495#define ENABLE_RUNTIME_CHECKING 1
6496_ACEOF
6497
06c37c96 6498fi
ba479fd2
NN
6499if test x$ac_tree_checking != x ; then
6500
6501cat >>confdefs.h <<\_ACEOF
6502#define ENABLE_TREE_CHECKING 1
6503_ACEOF
6504
13f05fd0 6505 TREEBROWSER=tree-browser.o
ba479fd2 6506fi
13f05fd0 6507
ba479fd2
NN
6508if test x$ac_rtl_checking != x ; then
6509
6510cat >>confdefs.h <<\_ACEOF
6511#define ENABLE_RTL_CHECKING 1
6512_ACEOF
6513
6514fi
6515if test x$ac_rtlflag_checking != x ; then
6516
6517cat >>confdefs.h <<\_ACEOF
6518#define ENABLE_RTL_FLAG_CHECKING 1
6519_ACEOF
6520
6521fi
6522if test x$ac_gc_checking != x ; then
6523
6524cat >>confdefs.h <<\_ACEOF
6525#define ENABLE_GC_CHECKING 1
6526_ACEOF
6527
6528fi
6529if test x$ac_gc_always_collect != x ; then
6530
6531cat >>confdefs.h <<\_ACEOF
6532#define ENABLE_GC_ALWAYS_COLLECT 1
6533_ACEOF
6534
6535fi
6536if test x$ac_fold_checking != x ; then
6537
6538cat >>confdefs.h <<\_ACEOF
6539#define ENABLE_FOLD_CHECKING 1
6540_ACEOF
6541
6542fi
6543valgrind_path_defines=
6544valgrind_command=
6545
ba479fd2 6546if test "${ac_cv_header_valgrind_h+set}" = set; then
a3bba767
JJ
6547 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6548echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
ba479fd2
NN
6549if test "${ac_cv_header_valgrind_h+set}" = set; then
6550 echo $ECHO_N "(cached) $ECHO_C" >&6
6551fi
a3bba767
JJ
6552echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6553echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
ba479fd2
NN
6554else
6555 # Is the header compilable?
a3bba767
JJ
6556echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6557echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
ba479fd2 6558cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6559/* confdefs.h. */
6560_ACEOF
6561cat confdefs.h >>conftest.$ac_ext
6562cat >>conftest.$ac_ext <<_ACEOF
6563/* end confdefs.h. */
6564$ac_includes_default
63cf211a 6565#include <valgrind.h>
ba479fd2
NN
6566_ACEOF
6567rm -f conftest.$ac_objext
a3bba767
JJ
6568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6569 (eval $ac_compile) 2>conftest.er1
ba479fd2 6570 ac_status=$?
86da66b5
HPN
6571 grep -v '^ *+' conftest.er1 >conftest.err
6572 rm -f conftest.er1
6573 cat conftest.err >&5
ba479fd2 6574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6575 (exit $ac_status); } &&
6576 { ac_try='test -z "$ac_c_werror_flag"
6577 || test ! -s conftest.err'
6578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6579 (eval $ac_try) 2>&5
6580 ac_status=$?
6581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6582 (exit $ac_status); }; } &&
6583 { ac_try='test -s conftest.$ac_objext'
6584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6585 (eval $ac_try) 2>&5
6586 ac_status=$?
6587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6588 (exit $ac_status); }; }; then
ba479fd2
NN
6589 ac_header_compiler=yes
6590else
6591 echo "$as_me: failed program was:" >&5
6592sed 's/^/| /' conftest.$ac_ext >&5
6593
a3bba767 6594ac_header_compiler=no
ba479fd2 6595fi
a3bba767
JJ
6596rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6597echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6598echo "${ECHO_T}$ac_header_compiler" >&6
ba479fd2
NN
6599
6600# Is the header present?
a3bba767
JJ
6601echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6602echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
ba479fd2 6603cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6604/* confdefs.h. */
6605_ACEOF
6606cat confdefs.h >>conftest.$ac_ext
6607cat >>conftest.$ac_ext <<_ACEOF
6608/* end confdefs.h. */
6609#include <valgrind.h>
6610_ACEOF
a3bba767
JJ
6611if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6612 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
6613 ac_status=$?
6614 grep -v '^ *+' conftest.er1 >conftest.err
6615 rm -f conftest.er1
6616 cat conftest.err >&5
6617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6618 (exit $ac_status); } >/dev/null; then
6619 if test -s conftest.err; then
6620 ac_cpp_err=$ac_c_preproc_warn_flag
6621 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6622 else
6623 ac_cpp_err=
6624 fi
6625else
6626 ac_cpp_err=yes
6627fi
6628if test -z "$ac_cpp_err"; then
ba479fd2
NN
6629 ac_header_preproc=yes
6630else
6631 echo "$as_me: failed program was:" >&5
6632sed 's/^/| /' conftest.$ac_ext >&5
6633
6634 ac_header_preproc=no
6635fi
6636rm -f conftest.err conftest.$ac_ext
a3bba767
JJ
6637echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6638echo "${ECHO_T}$ac_header_preproc" >&6
ba479fd2
NN
6639
6640# So? What about this header?
86da66b5
HPN
6641case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6642 yes:no: )
ba479fd2
NN
6643 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6644echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
6645 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6646echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6647 ac_header_preproc=yes
ba479fd2 6648 ;;
86da66b5 6649 no:yes:* )
ba479fd2
NN
6650 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6651echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
6652 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6653echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6654 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6655echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6656 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6657echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
6658 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6659echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
6660 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6661echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
a3bba767
JJ
6662 (
6663 cat <<\_ASBOX
6664## ------------------------------------------ ##
6665## Report this to the AC_PACKAGE_NAME lists. ##
6666## ------------------------------------------ ##
6667_ASBOX
6668 ) |
6669 sed "s/^/$as_me: WARNING: /" >&2
ba479fd2
NN
6670 ;;
6671esac
a3bba767
JJ
6672echo "$as_me:$LINENO: checking for valgrind.h" >&5
6673echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
ba479fd2
NN
6674if test "${ac_cv_header_valgrind_h+set}" = set; then
6675 echo $ECHO_N "(cached) $ECHO_C" >&6
6676else
6677 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 6678fi
a3bba767
JJ
6679echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6680echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
ba479fd2 6681
6e3f3080 6682fi
ba479fd2 6683if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
6684 have_valgrind_h=yes
6685else
ba479fd2 6686 have_valgrind_h=no
6938ec6c
NN
6687fi
6688
6689
ba479fd2 6690
cdce5c16 6691if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
6692 # It is certainly possible that there's valgrind but no valgrind.h.
6693 # GCC relies on making annotations so we must have both.
a3bba767
JJ
6694 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6695echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
ba479fd2 6696 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6697/* confdefs.h. */
6698_ACEOF
6699cat confdefs.h >>conftest.$ac_ext
6700cat >>conftest.$ac_ext <<_ACEOF
6701/* end confdefs.h. */
a207b594 6702#include <valgrind/memcheck.h>
14011ca4
AJ
6703#ifndef VALGRIND_DISCARD
6704#error VALGRIND_DISCARD not defined
6705#endif
ba479fd2 6706_ACEOF
a3bba767
JJ
6707if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6708 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
6709 ac_status=$?
6710 grep -v '^ *+' conftest.er1 >conftest.err
6711 rm -f conftest.er1
6712 cat conftest.err >&5
6713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6714 (exit $ac_status); } >/dev/null; then
6715 if test -s conftest.err; then
6716 ac_cpp_err=$ac_c_preproc_warn_flag
6717 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6718 else
6719 ac_cpp_err=
6720 fi
6721else
6722 ac_cpp_err=yes
6723fi
6724if test -z "$ac_cpp_err"; then
a207b594
HPN
6725 gcc_cv_header_valgrind_memcheck_h=yes
6726else
ba479fd2
NN
6727 echo "$as_me: failed program was:" >&5
6728sed 's/^/| /' conftest.$ac_ext >&5
6729
a207b594
HPN
6730 gcc_cv_header_valgrind_memcheck_h=no
6731fi
ba479fd2 6732rm -f conftest.err conftest.$ac_ext
a3bba767
JJ
6733 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6734echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6735 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6736echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
ba479fd2 6737 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6738/* confdefs.h. */
6739_ACEOF
6740cat confdefs.h >>conftest.$ac_ext
6741cat >>conftest.$ac_ext <<_ACEOF
6742/* end confdefs.h. */
a207b594
HPN
6743#include <memcheck.h>
6744#ifndef VALGRIND_DISCARD
6745#error VALGRIND_DISCARD not defined
6746#endif
ba479fd2 6747_ACEOF
a3bba767
JJ
6748if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6749 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
6750 ac_status=$?
6751 grep -v '^ *+' conftest.er1 >conftest.err
6752 rm -f conftest.er1
6753 cat conftest.err >&5
6754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
6755 (exit $ac_status); } >/dev/null; then
6756 if test -s conftest.err; then
6757 ac_cpp_err=$ac_c_preproc_warn_flag
6758 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6759 else
6760 ac_cpp_err=
6761 fi
6762else
6763 ac_cpp_err=yes
6764fi
6765if test -z "$ac_cpp_err"; then
14011ca4
AJ
6766 gcc_cv_header_memcheck_h=yes
6767else
ba479fd2
NN
6768 echo "$as_me: failed program was:" >&5
6769sed 's/^/| /' conftest.$ac_ext >&5
6770
cafe096b
EC
6771 gcc_cv_header_memcheck_h=no
6772fi
ba479fd2 6773rm -f conftest.err conftest.$ac_ext
a3bba767
JJ
6774 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6775echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
ba479fd2 6776
56694dd9
ZW
6777# Prepare PATH_SEPARATOR.
6778# The user is always right.
6779if test "${PATH_SEPARATOR+set}" != set; then
6780 echo "#! /bin/sh" >conf$$.sh
6781 echo "exit 0" >>conf$$.sh
6782 chmod +x conf$$.sh
6783 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6784 PATH_SEPARATOR=';'
6785 else
6786 PATH_SEPARATOR=:
6787 fi
6788 rm -f conf$$.sh
6789fi
6790
6791# Find out how to test for executable files. Don't use a zero-byte file,
6792# as systems may use methods other than mode bits to determine executability.
6793cat >conf$$.file <<_ASEOF
6794#! /bin/sh
6795exit 0
6796_ASEOF
6797chmod +x conf$$.file
6798if test -x conf$$.file >/dev/null 2>&1; then
6799 ac_executable_p="test -x"
6800else
6801 ac_executable_p="test -f"
6802fi
6803rm -f conf$$.file
6804
6805# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 6806set dummy valgrind; ac_word=$2
a3bba767
JJ
6807echo "$as_me:$LINENO: checking for $ac_word" >&5
6808echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
6809if test "${ac_cv_path_valgrind_path+set}" = set; then
6810 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
6811else
6812 case "$valgrind_path" in
56694dd9
ZW
6813 [\\/]* | ?:[\\/]*)
6814 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6815 ;;
414d23ae 6816 *)
56694dd9
ZW
6817 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6818 for ac_dir in $PATH; do
6819 IFS="$ac_save_IFS"
6820 test -z "$ac_dir" && ac_dir=.
6821 for ac_exec_ext in '' $ac_executable_extensions; do
6822 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6823 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6824 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6825 break 2
6826 fi
6827 fi
6828 done
6829 done
6830 IFS="$ac_save_IFS"
6831 ;;
414d23ae 6832esac
75e93faa 6833fi
414d23ae
HPN
6834valgrind_path="$ac_cv_path_valgrind_path"
6835if test -n "$valgrind_path"; then
a3bba767
JJ
6836 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6837echo "${ECHO_T}$valgrind_path" >&6
414d23ae 6838else
a3bba767
JJ
6839 echo "$as_me:$LINENO: result: no" >&5
6840echo "${ECHO_T}no" >&6
414d23ae
HPN
6841fi
6842
a207b594
HPN
6843 if test "x$valgrind_path" = "x" \
6844 || (test $have_valgrind_h = no \
6845 && test $gcc_cv_header_memcheck_h = no \
6846 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
6847 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6848echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6849 { (exit 1); exit 1; }; }
414d23ae
HPN
6850 fi
6851 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6852 valgrind_command="$valgrind_path -q"
ba479fd2
NN
6853
6854cat >>confdefs.h <<\_ACEOF
414d23ae 6855#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 6856_ACEOF
75e93faa 6857
a207b594 6858 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
6859
6860cat >>confdefs.h <<\_ACEOF
a207b594 6861#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 6862_ACEOF
a207b594
HPN
6863
6864 fi
14011ca4 6865 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
6866
6867cat >>confdefs.h <<\_ACEOF
14011ca4 6868#define HAVE_MEMCHECK_H 1
ba479fd2 6869_ACEOF
14011ca4
AJ
6870
6871 fi
414d23ae 6872fi
75e93faa 6873
75e93faa
ZW
6874
6875
a3bba767 6876# Check whether --enable-mapped-location or --disable-mapped-location was given.
74ee1642 6877if test "${enable_mapped_location+set}" = set; then
a3bba767
JJ
6878 enableval="$enable_mapped_location"
6879
74ee1642
PB
6880else
6881 enable_mapped_location=no
a3bba767 6882fi;
74ee1642
PB
6883
6884if test "$enable_mapped_location" = yes ; then
6885
6886cat >>confdefs.h <<\_ACEOF
6887#define USE_MAPPED_LOCATION 1
6888_ACEOF
6889
6890fi
6891
414d23ae 6892# Enable code coverage collection
a3bba767 6893# Check whether --enable-coverage or --disable-coverage was given.
414d23ae 6894if test "${enable_coverage+set}" = set; then
a3bba767
JJ
6895 enableval="$enable_coverage"
6896 case "${enableval}" in
6dd297da
NN
6897 yes|noopt)
6898 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6899 ;;
6900 opt)
6901 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6902 ;;
6903 no)
6904 # a.k.a. --disable-coverage
6905 coverage_flags=""
6906 ;;
6907 *)
6908 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
6909echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6910 { (exit 1); exit 1; }; }
6dd297da 6911 ;;
414d23ae 6912esac
75e93faa 6913else
414d23ae 6914 coverage_flags=""
a3bba767 6915fi;
dd7f7a6e 6916
8b1f719a 6917
a3bba767 6918# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
703d89ab 6919if test "${enable_gather_detailed_mem_stats+set}" = set; then
a3bba767
JJ
6920 enableval="$enable_gather_detailed_mem_stats"
6921
439a7e54
DN
6922else
6923 enable_gather_detailed_mem_stats=no
a3bba767 6924fi;
439a7e54 6925if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
6926
6927cat >>confdefs.h <<\_ACEOF
439a7e54 6928#define GATHER_STATISTICS 1
ba479fd2 6929_ACEOF
439a7e54
DN
6930
6931fi
6932
73458fb7
NN
6933# -------------------------------
6934# Miscenalleous configure options
6935# -------------------------------
34a86c2b
NN
6936
6937# With stabs
ba479fd2 6938
a3bba767 6939# Check whether --with-stabs or --without-stabs was given.
34a86c2b 6940if test "${with_stabs+set}" = set; then
a3bba767
JJ
6941 withval="$with_stabs"
6942 stabs="$with_stabs"
34a86c2b
NN
6943else
6944 stabs=no
a3bba767 6945fi;
cafe096b 6946
34a86c2b 6947# Determine whether or not multilibs are enabled.
a3bba767 6948# Check whether --enable-multilib or --disable-multilib was given.
34a86c2b 6949if test "${enable_multilib+set}" = set; then
a3bba767
JJ
6950 enableval="$enable_multilib"
6951
34a86c2b
NN
6952else
6953 enable_multilib=yes
a3bba767 6954fi;
75e93faa 6955
34a86c2b 6956
414d23ae 6957# Enable __cxa_atexit for C++.
a3bba767 6958# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
414d23ae 6959if test "${enable___cxa_atexit+set}" = set; then
a3bba767 6960 enableval="$enable___cxa_atexit"
75e93faa 6961
a3bba767 6962fi;
75e93faa 6963
486aa804 6964# Enable C extension for decimal float if target supports it.
a3bba767 6965# Check whether --enable-decimal-float or --disable-decimal-float was given.
486aa804 6966if test "${enable_decimal_float+set}" = set; then
a3bba767
JJ
6967 enableval="$enable_decimal_float"
6968
79b87c74
MM
6969 case $enable_decimal_float in
6970 yes | no | bid | dpd) ;;
6971 *) { { echo "$as_me:$LINENO: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
6972Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&5
6973echo "$as_me: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
6974Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&2;}
6975 { (exit 1); exit 1; }; } ;;
6976 esac
6977
6978else
6979
6980 case $target in
6981 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
a4a9df5f 6982 enable_decimal_float=yes
486aa804
BE
6983 ;;
6984 *)
6985 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
6986echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
6987 enable_decimal_float=no
6988 ;;
79b87c74 6989 esac
486aa804 6990
a3bba767 6991fi;
486aa804 6992
79b87c74
MM
6993dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
6994
6995cat >>confdefs.h <<_ACEOF
6996#define ENABLE_DECIMAL_FLOAT $dfp
6997_ACEOF
6998
6999
7000# x86's use BID format instead of DPD
7001case x$enable_decimal_float in
7002 xyes)
7003 case $target in
7004 i?86*-*-linux* | x86_64*-*-linux*)
7005 enable_decimal_float=bid
7006 ;;
7007 *)
7008 enable_decimal_float=dpd
7009 ;;
7010 esac
7011 ;;
7012 xno)
7013 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
7014 # dependency on libdecnumber.
7015 enable_decimal_float=dpd
7016 ;;
7017esac
486aa804
BE
7018
7019
79b87c74 7020bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
486aa804
BE
7021
7022cat >>confdefs.h <<_ACEOF
79b87c74 7023#define ENABLE_DECIMAL_BID_FORMAT $bid
486aa804
BE
7024_ACEOF
7025
7026
414d23ae
HPN
7027# Enable threads
7028# Pass with no value to take the default
7029# Pass with a value to specify a thread package
a3bba767 7030# Check whether --enable-threads or --disable-threads was given.
414d23ae 7031if test "${enable_threads+set}" = set; then
a3bba767
JJ
7032 enableval="$enable_threads"
7033
414d23ae
HPN
7034else
7035 enable_threads=''
a3bba767 7036fi;
8b1f719a 7037
a3bba767 7038# Check whether --enable-tls or --disable-tls was given.
703d89ab 7039if test "${enable_tls+set}" = set; then
a3bba767
JJ
7040 enableval="$enable_tls"
7041
8dea1cca
DD
7042 case $enable_tls in
7043 yes | no) ;;
7044 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
7045Valid choices are 'yes' and 'no'." >&5
7046echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
7047Valid choices are 'yes' and 'no'." >&2;}
7048 { (exit 1); exit 1; }; } ;;
7049 esac
7050
7051else
7052 enable_tls=''
a3bba767 7053fi;
703d89ab 7054
a3bba767 7055# Check whether --enable-objc-gc or --disable-objc-gc was given.
414d23ae 7056if test "${enable_objc_gc+set}" = set; then
a3bba767
JJ
7057 enableval="$enable_objc_gc"
7058 if test x$enable_objc_gc = xno; then
414d23ae
HPN
7059 objc_boehm_gc=''
7060else
7061 objc_boehm_gc=1
7062fi
7063else
7064 objc_boehm_gc=''
a3bba767 7065fi;
75e93faa 7066
a6ccdbab 7067
a3bba767 7068# Check whether --with-dwarf2 or --without-dwarf2 was given.
414d23ae 7069if test "${with_dwarf2+set}" = set; then
a3bba767
JJ
7070 withval="$with_dwarf2"
7071 dwarf2="$with_dwarf2"
75e93faa 7072else
414d23ae 7073 dwarf2=no
a3bba767 7074fi;
8b1f719a 7075
a3bba767 7076# Check whether --enable-shared or --disable-shared was given.
703d89ab 7077if test "${enable_shared+set}" = set; then
a3bba767
JJ
7078 enableval="$enable_shared"
7079
414d23ae
HPN
7080 case $enable_shared in
7081 yes | no) ;;
7082 *)
7083 enable_shared=no
7084 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
7085 for pkg in $enableval; do
7086 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
7087 enable_shared=yes
7088 fi
7089 done
7090 IFS="$ac_save_ifs"
7091 ;;
7092 esac
7093
75e93faa 7094else
414d23ae 7095 enable_shared=yes
a3bba767 7096fi;
75e93faa 7097
b8ec3cc8 7098
703d89ab 7099
a3bba767 7100# Check whether --with-build-sysroot or --without-build-sysroot was given.
160633c6 7101if test "${with_build_sysroot+set}" = set; then
a3bba767 7102 withval="$with_build_sysroot"
160633c6 7103
a3bba767 7104fi;
160633c6
MM
7105
7106
a3bba767 7107# Check whether --with-sysroot or --without-sysroot was given.
4977bab6 7108if test "${with_sysroot+set}" = set; then
a3bba767
JJ
7109 withval="$with_sysroot"
7110
4977bab6 7111 case ${with_sysroot} in
caa55b1e 7112 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
7113 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
7114 esac
ba479fd2 7115
4977bab6 7116 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14da6073 7117 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
4977bab6 7118
748670c2
RS
7119 if test "x$prefix" = xNONE; then
7120 test_prefix=/usr/local
7121 else
7122 test_prefix=$prefix
7123 fi
047d636f 7124 if test "x$exec_prefix" = xNONE; then
748670c2 7125 test_exec_prefix=$test_prefix
047d636f 7126 else
748670c2 7127 test_exec_prefix=$exec_prefix
047d636f
DJ
7128 fi
7129 case ${TARGET_SYSTEM_ROOT} in
91710e62 7130 "${test_prefix}"|"${test_prefix}/"*|\
748670c2
RS
7131 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
7132 '${prefix}'|'${prefix}/'*|\
91710e62 7133 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
7134 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
7135 TARGET_SYSTEM_ROOT_DEFINE="$t"
7136 ;;
7137 esac
7138
4977bab6 7139else
ba479fd2 7140
4977bab6 7141 TARGET_SYSTEM_ROOT=
db720d9a 7142 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
7143 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
7144
a3bba767 7145fi;
4977bab6
ZW
7146
7147
7148
7149
d1bd0ded 7150# Build with intermodule optimisations
a3bba767 7151# Check whether --enable-intermodule or --disable-intermodule was given.
d1bd0ded 7152if test "${enable_intermodule+set}" = set; then
a3bba767
JJ
7153 enableval="$enable_intermodule"
7154 case ${enable_intermodule} in
0c46c5c7
KC
7155 yes) onestep="-onestep";;
7156 *) onestep="";;
d1bd0ded 7157esac
0c46c5c7
KC
7158else
7159 onestep=""
a3bba767 7160fi;
d1bd0ded
GK
7161
7162
f3c9f174
NN
7163# Sanity check enable_languages in case someone does not run the toplevel
7164# configure # script.
a3bba767 7165# Check whether --enable-languages or --disable-languages was given.
f3c9f174 7166if test "${enable_languages+set}" = set; then
a3bba767
JJ
7167 enableval="$enable_languages"
7168 case ,${enable_languages}, in
f3c9f174
NN
7169 ,,|,yes,)
7170 # go safe -- we cannot be much sure without the toplevel
7171 # configure's
7172 # analysis of which target libs are present and usable
7173 enable_languages=c
7174 ;;
7175 *,all,*)
7176 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
7177echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
7178 { (exit 1); exit 1; }; }
7179 ;;
7180 *,c,*)
7181 ;;
7182 *)
7183 enable_languages=c,${enable_languages}
7184 ;;
7185esac
7186else
7187 enable_languages=c
a3bba767 7188fi;
f3c9f174 7189
9288b845
CD
7190# Used by documentation targets
7191
7192
7193
f3c9f174 7194
73458fb7
NN
7195# -------------------------
7196# Checks for other programs
7197# -------------------------
5b67ad6f 7198
a3bba767
JJ
7199echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7200echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
7201set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
7202if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
ba479fd2 7203 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 7204else
ba479fd2 7205 cat >conftest.make <<\_ACEOF
e9a25f70 7206all:
a3bba767 7207 @echo 'ac_maketemp="$(MAKE)"'
ba479fd2 7208_ACEOF
e9a25f70 7209# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
a3bba767
JJ
7210eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
7211if test -n "$ac_maketemp"; then
7212 eval ac_cv_prog_make_${ac_make}_set=yes
7213else
7214 eval ac_cv_prog_make_${ac_make}_set=no
7215fi
ba479fd2 7216rm -f conftest.make
e9a25f70 7217fi
a3bba767
JJ
7218if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
7219 echo "$as_me:$LINENO: result: yes" >&5
7220echo "${ECHO_T}yes" >&6
e9a25f70
JL
7221 SET_MAKE=
7222else
a3bba767
JJ
7223 echo "$as_me:$LINENO: result: no" >&5
7224echo "${ECHO_T}no" >&6
e9a25f70
JL
7225 SET_MAKE="MAKE=${MAKE-make}"
7226fi
7227
7228
861bb6c1 7229# Find some useful tools
ba479fd2 7230for ac_prog in gawk mawk nawk awk
861bb6c1 7231do
ba479fd2 7232 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 7233set dummy $ac_prog; ac_word=$2
a3bba767
JJ
7234echo "$as_me:$LINENO: checking for $ac_word" >&5
7235echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7236if test "${ac_cv_prog_AWK+set}" = set; then
7237 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7238else
7239 if test -n "$AWK"; then
7240 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7241else
ba479fd2
NN
7242as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7243for as_dir in $PATH
7244do
7245 IFS=$as_save_IFS
7246 test -z "$as_dir" && as_dir=.
7247 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7248 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7249 ac_cv_prog_AWK="$ac_prog"
7250 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7251 break 2
7252 fi
7253done
7254done
7255
861bb6c1
JL
7256fi
7257fi
ba479fd2 7258AWK=$ac_cv_prog_AWK
861bb6c1 7259if test -n "$AWK"; then
a3bba767
JJ
7260 echo "$as_me:$LINENO: result: $AWK" >&5
7261echo "${ECHO_T}$AWK" >&6
861bb6c1 7262else
a3bba767
JJ
7263 echo "$as_me:$LINENO: result: no" >&5
7264echo "${ECHO_T}no" >&6
861bb6c1
JL
7265fi
7266
ba479fd2 7267 test -n "$AWK" && break
861bb6c1
JL
7268done
7269
776dc15d 7270# We need awk to create options.c and options.h.
2c4902b9
NN
7271# Bail out if it's missing.
7272case ${AWK} in
ba479fd2
NN
7273 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7274echo "$as_me: error: can't build without awk, bailing out" >&2;}
7275 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
7276esac
7277
a3bba767
JJ
7278echo "$as_me:$LINENO: checking whether ln -s works" >&5
7279echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
ba479fd2
NN
7280if test "${gcc_cv_prog_LN_S+set}" = set; then
7281 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7282else
7283 rm -f conftestdata_t
7284echo >conftestdata_f
7285if ln -s conftestdata_f conftestdata_t 2>/dev/null
7286then
7287 gcc_cv_prog_LN_S="ln -s"
7288else
7289 if ln conftestdata_f conftestdata_t 2>/dev/null
7290 then
7291 gcc_cv_prog_LN_S=ln
7292 else
35f06ae4
PB
7293 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7294 then
06c3418c 7295 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
7296 else
7297 gcc_cv_prog_LN_S=cp
7298 fi
0a4b6309
RL
7299 fi
7300fi
7301rm -f conftestdata_f conftestdata_t
7302
7303fi
7304LN_S="$gcc_cv_prog_LN_S"
7305if test "$gcc_cv_prog_LN_S" = "ln -s"; then
a3bba767
JJ
7306 echo "$as_me:$LINENO: result: yes" >&5
7307echo "${ECHO_T}yes" >&6
0a4b6309
RL
7308else
7309 if test "$gcc_cv_prog_LN_S" = "ln"; then
a3bba767
JJ
7310 echo "$as_me:$LINENO: result: no, using ln" >&5
7311echo "${ECHO_T}no, using ln" >&6
0a4b6309 7312 else
a3bba767
JJ
7313 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7314echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
7315 fi
7316fi
7317
a3bba767
JJ
7318echo "$as_me:$LINENO: checking whether ln works" >&5
7319echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
18fc9bd4
RG
7320if test "${acx_cv_prog_LN+set}" = set; then
7321 echo $ECHO_N "(cached) $ECHO_C" >&6
7322else
7323 rm -f conftestdata_t
7324echo >conftestdata_f
7325if ln conftestdata_f conftestdata_t 2>/dev/null
7326then
7327 acx_cv_prog_LN=ln
7328else
7329 acx_cv_prog_LN=no
7330fi
7331rm -f conftestdata_f conftestdata_t
7332
7333fi
7334if test $acx_cv_prog_LN = no; then
7335 LN="$LN_S"
a3bba767
JJ
7336 echo "$as_me:$LINENO: result: no, using $LN" >&5
7337echo "${ECHO_T}no, using $LN" >&6
18fc9bd4
RG
7338else
7339 LN="$acx_cv_prog_LN"
a3bba767
JJ
7340 echo "$as_me:$LINENO: result: yes" >&5
7341echo "${ECHO_T}yes" >&6
18fc9bd4
RG
7342fi
7343
ba479fd2
NN
7344if test -n "$ac_tool_prefix"; then
7345 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7346set dummy ${ac_tool_prefix}ranlib; ac_word=$2
a3bba767
JJ
7347echo "$as_me:$LINENO: checking for $ac_word" >&5
7348echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7349if test "${ac_cv_prog_RANLIB+set}" = set; then
7350 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7351else
7352 if test -n "$RANLIB"; then
7353 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7354else
ba479fd2
NN
7355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7356for as_dir in $PATH
7357do
7358 IFS=$as_save_IFS
7359 test -z "$as_dir" && as_dir=.
7360 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7361 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7362 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7363 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7364 break 2
7365 fi
7366done
7367done
7368
6e3f3080
NN
7369fi
7370fi
ba479fd2 7371RANLIB=$ac_cv_prog_RANLIB
6e3f3080 7372if test -n "$RANLIB"; then
a3bba767
JJ
7373 echo "$as_me:$LINENO: result: $RANLIB" >&5
7374echo "${ECHO_T}$RANLIB" >&6
ba479fd2 7375else
a3bba767
JJ
7376 echo "$as_me:$LINENO: result: no" >&5
7377echo "${ECHO_T}no" >&6
ba479fd2
NN
7378fi
7379
7380fi
7381if test -z "$ac_cv_prog_RANLIB"; then
7382 ac_ct_RANLIB=$RANLIB
7383 # Extract the first word of "ranlib", so it can be a program name with args.
7384set dummy ranlib; ac_word=$2
a3bba767
JJ
7385echo "$as_me:$LINENO: checking for $ac_word" >&5
7386echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7387if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7388 echo $ECHO_N "(cached) $ECHO_C" >&6
7389else
7390 if test -n "$ac_ct_RANLIB"; then
7391 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7392else
7393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7394for as_dir in $PATH
7395do
7396 IFS=$as_save_IFS
7397 test -z "$as_dir" && as_dir=.
7398 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7399 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7400 ac_cv_prog_ac_ct_RANLIB="ranlib"
7401 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7402 break 2
7403 fi
7404done
7405done
7406
a3bba767 7407 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
ba479fd2
NN
7408fi
7409fi
7410ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7411if test -n "$ac_ct_RANLIB"; then
a3bba767
JJ
7412 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7413echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 7414else
a3bba767
JJ
7415 echo "$as_me:$LINENO: result: no" >&5
7416echo "${ECHO_T}no" >&6
ba479fd2
NN
7417fi
7418
a3bba767 7419 RANLIB=$ac_ct_RANLIB
ba479fd2
NN
7420else
7421 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
7422fi
7423
343a6100
MM
7424case "${host}" in
7425*-*-darwin*)
7426 # By default, the Darwin ranlib will not treat common symbols as
7427 # definitions when building the archive table of contents. Other
7428 # ranlibs do that; pass an option to the Darwin ranlib that makes
7429 # it behave similarly.
7430 ranlib_flags="-c"
7431 ;;
7432*)
7433 ranlib_flags=""
7434esac
7435
7436
0a4b6309
RL
7437# Find a good install program. We prefer a C program (faster),
7438# so one script is as good as another. But avoid the broken or
7439# incompatible versions:
7440# SysV /etc/install, /usr/sbin/install
7441# SunOS /usr/etc/install
7442# IRIX /sbin/install
7443# AIX /bin/install
7444# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7445# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7446# ./install, which can be erroneously created by make from ./install.sh.
a3bba767
JJ
7447echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7448echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 7449if test -z "$INSTALL"; then
ba479fd2
NN
7450if test "${ac_cv_path_install+set}" = set; then
7451 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7452else
7453 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7454 for ac_dir in $PATH; do
7455 # Account for people who put trailing slashes in PATH elements.
7456 case "$ac_dir/" in
7457 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7458 *)
7459 # OSF1 and SCO ODT 3.0 have their own names for install.
7460 for ac_prog in ginstall scoinst install; do
7461 if test -f $ac_dir/$ac_prog; then
7462 if test $ac_prog = install &&
7463 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7464 # AIX install. It has an incompatible calling convention.
7465 # OSF/1 installbsd also uses dspmsg, but is usable.
7466 :
7467 else
7468 ac_cv_path_install="$ac_dir/$ac_prog -c"
7469 break 2
7470 fi
7471 fi
7472 done
7473 ;;
7474 esac
7475 done
7476 IFS="$ac_save_IFS"
7477
7478fi
7479 if test "${ac_cv_path_install+set}" = set; then
7480 INSTALL="$ac_cv_path_install"
7481 else
7482 # As a last resort, use the slow shell script. We don't cache a
7483 # path for INSTALL within a source directory, because that will
7484 # break other packages using the cache if that directory is
7485 # removed, or if the path is relative.
7486 INSTALL="$ac_install_sh"
7487 fi
7488fi
a3bba767
JJ
7489echo "$as_me:$LINENO: result: $INSTALL" >&5
7490echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
7491
7492# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7493# It thinks the first close brace ends the variable substitution.
7494test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7495
7496test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7497
861bb6c1 7498
3a000df0 7499# See if cmp has --ignore-initial.
a3bba767
JJ
7500echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7501echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
ba479fd2
NN
7502if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7503 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
7504else
7505 echo abfoo >t1
7506 echo cdfoo >t2
269a7343 7507 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
7508 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7509 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 7510 :
3a000df0
KC
7511 else
7512 gcc_cv_prog_cmp_skip=gnucompare
7513 fi
269a7343
KG
7514 fi
7515 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7516 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7517 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7518 :
7519 else
7520 gcc_cv_prog_cmp_skip=fastcompare
7521 fi
7522 fi
3a000df0
KC
7523 fi
7524 rm t1 t2
7525
7526fi
a3bba767
JJ
7527echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7528echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
7529make_compare_target=$gcc_cv_prog_cmp_skip
7530
7531
7532
73458fb7
NN
7533# See if we have the mktemp command.
7534# Extract the first word of "mktemp", so it can be a program name with args.
7535set dummy mktemp; ac_word=$2
a3bba767
JJ
7536echo "$as_me:$LINENO: checking for $ac_word" >&5
7537echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7538if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7539 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7540else
7541 if test -n "$have_mktemp_command"; then
7542 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7543else
ba479fd2
NN
7544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7545for as_dir in $PATH
7546do
7547 IFS=$as_save_IFS
7548 test -z "$as_dir" && as_dir=.
7549 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7550 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7551 ac_cv_prog_have_mktemp_command="yes"
7552 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7553 break 2
7554 fi
7555done
7556done
7557
73458fb7
NN
7558 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7559fi
7560fi
ba479fd2 7561have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 7562if test -n "$have_mktemp_command"; then
a3bba767
JJ
7563 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7564echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 7565else
a3bba767
JJ
7566 echo "$as_me:$LINENO: result: no" >&5
7567echo "${ECHO_T}no" >&6
73458fb7
NN
7568fi
7569
7570
7c27e184
PB
7571# See if makeinfo has been installed and is modern enough
7572# that we can use it.
9f18db39 7573
3bbd5a19 7574 # Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 7575set dummy makeinfo; ac_word=$2
a3bba767
JJ
7576echo "$as_me:$LINENO: checking for $ac_word" >&5
7577echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7578if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7579 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7580else
7581 if test -n "$MAKEINFO"; then
7582 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7583else
ba479fd2
NN
7584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7585for as_dir in $PATH
7586do
7587 IFS=$as_save_IFS
7588 test -z "$as_dir" && as_dir=.
7589 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7590 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7591 ac_cv_prog_MAKEINFO="makeinfo"
7592 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7593 break 2
7594 fi
7595done
7596done
7597
73458fb7
NN
7598fi
7599fi
ba479fd2 7600MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 7601if test -n "$MAKEINFO"; then
a3bba767
JJ
7602 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7603echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 7604else
a3bba767
JJ
7605 echo "$as_me:$LINENO: result: no" >&5
7606echo "${ECHO_T}no" >&6
73458fb7
NN
7607fi
7608
3bbd5a19
PB
7609 if test -n "$MAKEINFO"; then
7610 # Found it, now check the version.
7611 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
a3bba767 7612echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
ba479fd2
NN
7613if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7614 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7 7615else
3bbd5a19
PB
7616 ac_prog_version=`eval $MAKEINFO --version 2>&1 |
7617 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
7618
7619 case $ac_prog_version in
7620 '') gcc_cv_prog_makeinfo_modern=no;;
7621 4.[4-9]*) gcc_cv_prog_makeinfo_modern=yes;;
7622 *) gcc_cv_prog_makeinfo_modern=no;;
7623 esac
73458fb7
NN
7624
7625fi
a3bba767
JJ
7626echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7627echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
3bbd5a19
PB
7628 else
7629 gcc_cv_prog_makeinfo_modern=no
7630 fi
7631 if test $gcc_cv_prog_makeinfo_modern = no; then
7632 MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo"
7633 fi
73458fb7 7634
73458fb7 7635if test $gcc_cv_prog_makeinfo_modern = no; then
ba479fd2
NN
7636 { echo "$as_me:$LINENO: WARNING:
7637*** Makeinfo is missing or too old.
7638*** Info documentation will not be built." >&5
7639echo "$as_me: WARNING:
cafe096b 7640*** Makeinfo is missing or too old.
ba479fd2 7641*** Info documentation will not be built." >&2;}
73458fb7
NN
7642 BUILD_INFO=
7643else
ba479fd2 7644 BUILD_INFO=info
73458fb7
NN
7645fi
7646
7c27e184 7647
73458fb7 7648# Is pod2man recent enough to regenerate manpages?
a3bba767
JJ
7649echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7650echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 7651if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
a3bba767
JJ
7652 echo "$as_me:$LINENO: result: yes" >&5
7653echo "${ECHO_T}yes" >&6
ba479fd2 7654 GENERATED_MANPAGES=generated-manpages
73458fb7 7655else
a3bba767
JJ
7656 echo "$as_me:$LINENO: result: no" >&5
7657echo "${ECHO_T}no" >&6
73458fb7
NN
7658 GENERATED_MANPAGES=
7659fi
7660
7c27e184 7661
3bbd5a19
PB
7662MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
7663
73458fb7 7664# How about lex?
7c27e184
PB
7665for ac_prog in flex
7666do
7667 # Extract the first word of "$ac_prog", so it can be a program name with args.
7668set dummy $ac_prog; ac_word=$2
a3bba767
JJ
7669echo "$as_me:$LINENO: checking for $ac_word" >&5
7670echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7671if test "${ac_cv_prog_FLEX+set}" = set; then
7672 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7673else
7674 if test -n "$FLEX"; then
7675 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7676else
ba479fd2
NN
7677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7678for as_dir in $PATH
7679do
7680 IFS=$as_save_IFS
7681 test -z "$as_dir" && as_dir=.
7682 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7683 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7684 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
7685 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7686 break 2
7687 fi
7688done
7689done
7690
73458fb7
NN
7691fi
7692fi
ba479fd2 7693FLEX=$ac_cv_prog_FLEX
73458fb7 7694if test -n "$FLEX"; then
a3bba767
JJ
7695 echo "$as_me:$LINENO: result: $FLEX" >&5
7696echo "${ECHO_T}$FLEX" >&6
73458fb7 7697else
a3bba767
JJ
7698 echo "$as_me:$LINENO: result: no" >&5
7699echo "${ECHO_T}no" >&6
73458fb7
NN
7700fi
7701
7c27e184
PB
7702 test -n "$FLEX" && break
7703done
7704test -n "$FLEX" || FLEX="$MISSING flex"
7705
73458fb7
NN
7706
7707# Bison?
7c27e184
PB
7708for ac_prog in bison
7709do
7710 # Extract the first word of "$ac_prog", so it can be a program name with args.
7711set dummy $ac_prog; ac_word=$2
a3bba767
JJ
7712echo "$as_me:$LINENO: checking for $ac_word" >&5
7713echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7714if test "${ac_cv_prog_BISON+set}" = set; then
7715 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7716else
7717 if test -n "$BISON"; then
7718 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7719else
ba479fd2
NN
7720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7721for as_dir in $PATH
7722do
7723 IFS=$as_save_IFS
7724 test -z "$as_dir" && as_dir=.
7725 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7726 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7727 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
7728 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7729 break 2
7730 fi
7731done
7732done
7733
73458fb7
NN
7734fi
7735fi
ba479fd2 7736BISON=$ac_cv_prog_BISON
73458fb7 7737if test -n "$BISON"; then
a3bba767
JJ
7738 echo "$as_me:$LINENO: result: $BISON" >&5
7739echo "${ECHO_T}$BISON" >&6
73458fb7 7740else
a3bba767
JJ
7741 echo "$as_me:$LINENO: result: no" >&5
7742echo "${ECHO_T}no" >&6
73458fb7
NN
7743fi
7744
7c27e184
PB
7745 test -n "$BISON" && break
7746done
7747test -n "$BISON" || BISON="$MISSING bison"
7748
7749
7750# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7751# check for build == host before using them.
73458fb7 7752
f6a874ac 7753# NM
414adbdd
GK
7754if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7755 && test -d ../binutils ; then
f6a874ac
JW
7756 NM='$(objdir)/../binutils/nm-new'
7757else
7758 # Extract the first word of "nm", so it can be a program name with args.
7759set dummy nm; ac_word=$2
a3bba767
JJ
7760echo "$as_me:$LINENO: checking for $ac_word" >&5
7761echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
f6a874ac
JW
7762if test "${ac_cv_prog_NM+set}" = set; then
7763 echo $ECHO_N "(cached) $ECHO_C" >&6
7764else
7765 if test -n "$NM"; then
7766 ac_cv_prog_NM="$NM" # Let the user override the test.
7767else
7768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7769for as_dir in $PATH
7770do
7771 IFS=$as_save_IFS
7772 test -z "$as_dir" && as_dir=.
7773 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7774 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f6a874ac
JW
7775 ac_cv_prog_NM="nm"
7776 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7777 break 2
7778 fi
7779done
7780done
7781
7782 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7783fi
7784fi
7785NM=$ac_cv_prog_NM
7786if test -n "$NM"; then
a3bba767
JJ
7787 echo "$as_me:$LINENO: result: $NM" >&5
7788echo "${ECHO_T}$NM" >&6
f6a874ac 7789else
a3bba767
JJ
7790 echo "$as_me:$LINENO: result: no" >&5
7791echo "${ECHO_T}no" >&6
f6a874ac
JW
7792fi
7793
7794fi
7795
7796# AR
414adbdd
GK
7797if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7798 && test -d ../binutils ; then
f6a874ac
JW
7799 AR='$(objdir)/../binutils/ar'
7800else
7801 # Extract the first word of "ar", so it can be a program name with args.
7802set dummy ar; ac_word=$2
a3bba767
JJ
7803echo "$as_me:$LINENO: checking for $ac_word" >&5
7804echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
f6a874ac
JW
7805if test "${ac_cv_prog_AR+set}" = set; then
7806 echo $ECHO_N "(cached) $ECHO_C" >&6
7807else
7808 if test -n "$AR"; then
7809 ac_cv_prog_AR="$AR" # Let the user override the test.
7810else
7811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7812for as_dir in $PATH
7813do
7814 IFS=$as_save_IFS
7815 test -z "$as_dir" && as_dir=.
7816 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 7817 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f6a874ac
JW
7818 ac_cv_prog_AR="ar"
7819 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7820 break 2
7821 fi
7822done
7823done
7824
7825 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7826fi
7827fi
7828AR=$ac_cv_prog_AR
7829if test -n "$AR"; then
a3bba767
JJ
7830 echo "$as_me:$LINENO: result: $AR" >&5
7831echo "${ECHO_T}$AR" >&6
f6a874ac 7832else
a3bba767
JJ
7833 echo "$as_me:$LINENO: result: no" >&5
7834echo "${ECHO_T}no" >&6
f6a874ac
JW
7835fi
7836
7837fi
7838
7839
73458fb7
NN
7840# --------------------
7841# Checks for C headers
7842# --------------------
7843
a3bba767
JJ
7844echo "$as_me:$LINENO: checking for GNU C library" >&5
7845echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
ba479fd2
NN
7846if test "${gcc_cv_glibc+set}" = set; then
7847 echo $ECHO_N "(cached) $ECHO_C" >&6
7848else
7849 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7850/* confdefs.h. */
7851_ACEOF
7852cat confdefs.h >>conftest.$ac_ext
7853cat >>conftest.$ac_ext <<_ACEOF
7854/* end confdefs.h. */
73458fb7 7855#include <features.h>
ba479fd2
NN
7856int
7857main ()
7858{
73458fb7
NN
7859
7860#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7861#error Not a GNU C library system
7862#endif
ba479fd2
NN
7863 ;
7864 return 0;
7865}
7866_ACEOF
7867rm -f conftest.$ac_objext
a3bba767
JJ
7868if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7869 (eval $ac_compile) 2>conftest.er1
ba479fd2 7870 ac_status=$?
86da66b5
HPN
7871 grep -v '^ *+' conftest.er1 >conftest.err
7872 rm -f conftest.er1
7873 cat conftest.err >&5
ba479fd2 7874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
7875 (exit $ac_status); } &&
7876 { ac_try='test -z "$ac_c_werror_flag"
7877 || test ! -s conftest.err'
7878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7879 (eval $ac_try) 2>&5
7880 ac_status=$?
7881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7882 (exit $ac_status); }; } &&
7883 { ac_try='test -s conftest.$ac_objext'
7884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7885 (eval $ac_try) 2>&5
7886 ac_status=$?
7887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7888 (exit $ac_status); }; }; then
73458fb7
NN
7889 gcc_cv_glibc=yes
7890else
ba479fd2
NN
7891 echo "$as_me: failed program was:" >&5
7892sed 's/^/| /' conftest.$ac_ext >&5
7893
a3bba767 7894gcc_cv_glibc=no
73458fb7 7895fi
a3bba767 7896rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
7897fi
7898
a3bba767
JJ
7899echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7900echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 7901if test $gcc_cv_glibc = yes; then
ba479fd2
NN
7902
7903cat >>confdefs.h <<\_ACEOF
73458fb7 7904#define _GNU_SOURCE 1
ba479fd2 7905_ACEOF
73458fb7
NN
7906
7907fi
7908
ca9bc441
NN
7909# Need to reject headers which give warnings, so that the -Werror bootstrap
7910# works later. *sigh* This needs to come before all header checks.
18fc9bd4 7911
ca9bc441
NN
7912ac_c_preproc_warn_flag=yes
7913
a3bba767
JJ
7914echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7915echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
ba479fd2
NN
7916if test "${ac_cv_header_stdc+set}" = set; then
7917 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7918else
ba479fd2 7919 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7920/* confdefs.h. */
7921_ACEOF
7922cat confdefs.h >>conftest.$ac_ext
7923cat >>conftest.$ac_ext <<_ACEOF
7924/* end confdefs.h. */
956d6950
JL
7925#include <stdlib.h>
7926#include <stdarg.h>
7927#include <string.h>
7928#include <float.h>
ba479fd2
NN
7929
7930int
7931main ()
7932{
7933
7934 ;
7935 return 0;
7936}
7937_ACEOF
7938rm -f conftest.$ac_objext
a3bba767
JJ
7939if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7940 (eval $ac_compile) 2>conftest.er1
ba479fd2 7941 ac_status=$?
86da66b5
HPN
7942 grep -v '^ *+' conftest.er1 >conftest.err
7943 rm -f conftest.er1
7944 cat conftest.err >&5
ba479fd2 7945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
7946 (exit $ac_status); } &&
7947 { ac_try='test -z "$ac_c_werror_flag"
7948 || test ! -s conftest.err'
7949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7950 (eval $ac_try) 2>&5
7951 ac_status=$?
7952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7953 (exit $ac_status); }; } &&
7954 { ac_try='test -s conftest.$ac_objext'
7955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7956 (eval $ac_try) 2>&5
7957 ac_status=$?
7958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7959 (exit $ac_status); }; }; then
956d6950
JL
7960 ac_cv_header_stdc=yes
7961else
ba479fd2
NN
7962 echo "$as_me: failed program was:" >&5
7963sed 's/^/| /' conftest.$ac_ext >&5
7964
a3bba767 7965ac_cv_header_stdc=no
956d6950 7966fi
a3bba767 7967rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
7968
7969if test $ac_cv_header_stdc = yes; then
7970 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 7971 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7972/* confdefs.h. */
7973_ACEOF
7974cat confdefs.h >>conftest.$ac_ext
7975cat >>conftest.$ac_ext <<_ACEOF
7976/* end confdefs.h. */
956d6950 7977#include <string.h>
ba479fd2
NN
7978
7979_ACEOF
956d6950 7980if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7981 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
7982 :
7983else
956d6950
JL
7984 ac_cv_header_stdc=no
7985fi
7986rm -f conftest*
7987
7988fi
7989
7990if test $ac_cv_header_stdc = yes; then
7991 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 7992 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7993/* confdefs.h. */
7994_ACEOF
7995cat confdefs.h >>conftest.$ac_ext
7996cat >>conftest.$ac_ext <<_ACEOF
7997/* end confdefs.h. */
956d6950 7998#include <stdlib.h>
ba479fd2
NN
7999
8000_ACEOF
956d6950 8001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8002 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
8003 :
8004else
956d6950
JL
8005 ac_cv_header_stdc=no
8006fi
8007rm -f conftest*
8008
8009fi
8010
8011if test $ac_cv_header_stdc = yes; then
8012 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 8013 if test "$cross_compiling" = yes; then
956d6950
JL
8014 :
8015else
ba479fd2 8016 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8017/* confdefs.h. */
8018_ACEOF
8019cat confdefs.h >>conftest.$ac_ext
8020cat >>conftest.$ac_ext <<_ACEOF
8021/* end confdefs.h. */
956d6950 8022#include <ctype.h>
ba479fd2
NN
8023#if ((' ' & 0x0FF) == 0x020)
8024# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8025# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8026#else
8027# define ISLOWER(c) \
86da66b5
HPN
8028 (('a' <= (c) && (c) <= 'i') \
8029 || ('j' <= (c) && (c) <= 'r') \
8030 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
8031# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8032#endif
63cf211a 8033
ba479fd2
NN
8034#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8035int
8036main ()
8037{
8038 int i;
8039 for (i = 0; i < 256; i++)
8040 if (XOR (islower (i), ISLOWER (i))
86da66b5 8041 || toupper (i) != TOUPPER (i))
a3bba767
JJ
8042 exit(2);
8043 exit (0);
ba479fd2
NN
8044}
8045_ACEOF
8046rm -f conftest$ac_exeext
a3bba767
JJ
8047if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8048 (eval $ac_link) 2>&5
ba479fd2
NN
8049 ac_status=$?
8050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8051 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
8052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8053 (eval $ac_try) 2>&5
ba479fd2
NN
8054 ac_status=$?
8055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8056 (exit $ac_status); }; }; then
956d6950
JL
8057 :
8058else
ba479fd2
NN
8059 echo "$as_me: program exited with status $ac_status" >&5
8060echo "$as_me: failed program was:" >&5
8061sed 's/^/| /' conftest.$ac_ext >&5
8062
8063( exit $ac_status )
8064ac_cv_header_stdc=no
956d6950 8065fi
a3bba767 8066rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 8067fi
956d6950
JL
8068fi
8069fi
a3bba767
JJ
8070echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8071echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 8072if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
8073
8074cat >>confdefs.h <<\_ACEOF
956d6950 8075#define STDC_HEADERS 1
ba479fd2 8076_ACEOF
956d6950
JL
8077
8078fi
8079
a3bba767
JJ
8080echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
8081echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
ba479fd2
NN
8082if test "${ac_cv_header_time+set}" = set; then
8083 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8084else
ba479fd2 8085 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8086/* confdefs.h. */
8087_ACEOF
8088cat confdefs.h >>conftest.$ac_ext
8089cat >>conftest.$ac_ext <<_ACEOF
8090/* end confdefs.h. */
956d6950
JL
8091#include <sys/types.h>
8092#include <sys/time.h>
8093#include <time.h>
ba479fd2
NN
8094
8095int
8096main ()
8097{
8098if ((struct tm *) 0)
8099return 0;
8100 ;
8101 return 0;
8102}
8103_ACEOF
8104rm -f conftest.$ac_objext
a3bba767
JJ
8105if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8106 (eval $ac_compile) 2>conftest.er1
ba479fd2 8107 ac_status=$?
86da66b5
HPN
8108 grep -v '^ *+' conftest.er1 >conftest.err
8109 rm -f conftest.er1
8110 cat conftest.err >&5
ba479fd2 8111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8112 (exit $ac_status); } &&
8113 { ac_try='test -z "$ac_c_werror_flag"
8114 || test ! -s conftest.err'
8115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8116 (eval $ac_try) 2>&5
8117 ac_status=$?
8118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8119 (exit $ac_status); }; } &&
8120 { ac_try='test -s conftest.$ac_objext'
8121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8122 (eval $ac_try) 2>&5
8123 ac_status=$?
8124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8125 (exit $ac_status); }; }; then
956d6950
JL
8126 ac_cv_header_time=yes
8127else
ba479fd2
NN
8128 echo "$as_me: failed program was:" >&5
8129sed 's/^/| /' conftest.$ac_ext >&5
8130
a3bba767 8131ac_cv_header_time=no
956d6950 8132fi
a3bba767 8133rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 8134fi
a3bba767
JJ
8135echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
8136echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 8137if test $ac_cv_header_time = yes; then
ba479fd2
NN
8138
8139cat >>confdefs.h <<\_ACEOF
956d6950 8140#define TIME_WITH_SYS_TIME 1
ba479fd2 8141_ACEOF
956d6950
JL
8142
8143fi
8144
a3bba767
JJ
8145echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
8146echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
18fc9bd4
RG
8147if test "${gcc_cv_header_string+set}" = set; then
8148 echo $ECHO_N "(cached) $ECHO_C" >&6
8149else
8150 cat >conftest.$ac_ext <<_ACEOF
8151/* confdefs.h. */
8152_ACEOF
8153cat confdefs.h >>conftest.$ac_ext
8154cat >>conftest.$ac_ext <<_ACEOF
8155/* end confdefs.h. */
8156#include <string.h>
8157#include <strings.h>
8158int
8159main ()
8160{
8161
8162 ;
8163 return 0;
8164}
8165_ACEOF
8166rm -f conftest.$ac_objext
a3bba767
JJ
8167if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8168 (eval $ac_compile) 2>conftest.er1
18fc9bd4
RG
8169 ac_status=$?
8170 grep -v '^ *+' conftest.er1 >conftest.err
8171 rm -f conftest.er1
8172 cat conftest.err >&5
8173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8174 (exit $ac_status); } &&
8175 { ac_try='test -z "$ac_c_werror_flag"
8176 || test ! -s conftest.err'
8177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8178 (eval $ac_try) 2>&5
8179 ac_status=$?
8180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8181 (exit $ac_status); }; } &&
8182 { ac_try='test -s conftest.$ac_objext'
8183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8184 (eval $ac_try) 2>&5
8185 ac_status=$?
8186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8187 (exit $ac_status); }; }; then
18fc9bd4
RG
8188 gcc_cv_header_string=yes
8189else
8190 echo "$as_me: failed program was:" >&5
8191sed 's/^/| /' conftest.$ac_ext >&5
8192
a3bba767 8193gcc_cv_header_string=no
18fc9bd4 8194fi
a3bba767 8195rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18fc9bd4 8196fi
a3bba767
JJ
8197echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
8198echo "${ECHO_T}$gcc_cv_header_string" >&6
18fc9bd4
RG
8199if test $gcc_cv_header_string = yes; then
8200
8201cat >>confdefs.h <<\_ACEOF
8202#define STRING_WITH_STRINGS 1
8203_ACEOF
8204
8205fi
8206
a3bba767
JJ
8207echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
8208echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
ba479fd2
NN
8209if test "${ac_cv_header_sys_wait_h+set}" = set; then
8210 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 8211else
ba479fd2 8212 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8213/* confdefs.h. */
8214_ACEOF
8215cat confdefs.h >>conftest.$ac_ext
8216cat >>conftest.$ac_ext <<_ACEOF
8217/* end confdefs.h. */
e9831ca0
KG
8218#include <sys/types.h>
8219#include <sys/wait.h>
8220#ifndef WEXITSTATUS
a3bba767 8221# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
8222#endif
8223#ifndef WIFEXITED
ba479fd2 8224# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 8225#endif
ba479fd2
NN
8226
8227int
8228main ()
8229{
8230 int s;
8231 wait (&s);
8232 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8233 ;
8234 return 0;
8235}
8236_ACEOF
8237rm -f conftest.$ac_objext
a3bba767
JJ
8238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8239 (eval $ac_compile) 2>conftest.er1
ba479fd2 8240 ac_status=$?
86da66b5
HPN
8241 grep -v '^ *+' conftest.er1 >conftest.err
8242 rm -f conftest.er1
8243 cat conftest.err >&5
ba479fd2 8244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8245 (exit $ac_status); } &&
8246 { ac_try='test -z "$ac_c_werror_flag"
8247 || test ! -s conftest.err'
8248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8249 (eval $ac_try) 2>&5
8250 ac_status=$?
8251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8252 (exit $ac_status); }; } &&
8253 { ac_try='test -s conftest.$ac_objext'
8254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8255 (eval $ac_try) 2>&5
8256 ac_status=$?
8257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8258 (exit $ac_status); }; }; then
e9831ca0
KG
8259 ac_cv_header_sys_wait_h=yes
8260else
ba479fd2
NN
8261 echo "$as_me: failed program was:" >&5
8262sed 's/^/| /' conftest.$ac_ext >&5
8263
a3bba767 8264ac_cv_header_sys_wait_h=no
e9831ca0 8265fi
a3bba767 8266rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 8267fi
a3bba767
JJ
8268echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8269echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 8270if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
8271
8272cat >>confdefs.h <<\_ACEOF
e9831ca0 8273#define HAVE_SYS_WAIT_H 1
ba479fd2 8274_ACEOF
6e3f3080 8275
63cf211a 8276fi
6e3f3080 8277
ba479fd2
NN
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
dfb77e37
KC
8299
8300for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 8301 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 8302 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 8303 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 8304do
ba479fd2 8305as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a3bba767
JJ
8306echo "$as_me:$LINENO: checking for $ac_header" >&5
8307echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8308if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 8309 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8310else
18fc9bd4 8311 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8312/* confdefs.h. */
8313_ACEOF
8314cat confdefs.h >>conftest.$ac_ext
8315cat >>conftest.$ac_ext <<_ACEOF
8316/* end confdefs.h. */
8317#include <$ac_header>
8318_ACEOF
a3bba767
JJ
8319if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8320 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
8321 ac_status=$?
8322 grep -v '^ *+' conftest.er1 >conftest.err
8323 rm -f conftest.er1
8324 cat conftest.err >&5
8325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8326 (exit $ac_status); } >/dev/null; then
8327 if test -s conftest.err; then
8328 ac_cpp_err=$ac_c_preproc_warn_flag
8329 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8330 else
8331 ac_cpp_err=
8332 fi
8333else
8334 ac_cpp_err=yes
8335fi
8336if test -z "$ac_cpp_err"; then
18fc9bd4 8337 eval "$as_ac_Header=yes"
ba479fd2
NN
8338else
8339 echo "$as_me: failed program was:" >&5
8340sed 's/^/| /' conftest.$ac_ext >&5
8341
18fc9bd4 8342 eval "$as_ac_Header=no"
ba479fd2
NN
8343fi
8344rm -f conftest.err conftest.$ac_ext
6e3f3080 8345fi
a3bba767
JJ
8346echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8347echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
8348if test `eval echo '${'$as_ac_Header'}'` = yes; then
8349 cat >>confdefs.h <<_ACEOF
8350#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8351_ACEOF
8352
956d6950
JL
8353fi
8354done
8355
8356
f24af81b 8357# Check for thread headers.
a3bba767
JJ
8358echo "$as_me:$LINENO: checking for thread.h" >&5
8359echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
ba479fd2
NN
8360if test "${ac_cv_header_thread_h+set}" = set; then
8361 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8362else
18fc9bd4 8363 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8364/* confdefs.h. */
8365_ACEOF
8366cat confdefs.h >>conftest.$ac_ext
8367cat >>conftest.$ac_ext <<_ACEOF
8368/* end confdefs.h. */
8369#include <thread.h>
8370_ACEOF
a3bba767
JJ
8371if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8372 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
8373 ac_status=$?
8374 grep -v '^ *+' conftest.er1 >conftest.err
8375 rm -f conftest.er1
8376 cat conftest.err >&5
8377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8378 (exit $ac_status); } >/dev/null; then
8379 if test -s conftest.err; then
8380 ac_cpp_err=$ac_c_preproc_warn_flag
8381 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8382 else
8383 ac_cpp_err=
8384 fi
8385else
8386 ac_cpp_err=yes
8387fi
8388if test -z "$ac_cpp_err"; then
18fc9bd4 8389 ac_cv_header_thread_h=yes
ba479fd2
NN
8390else
8391 echo "$as_me: failed program was:" >&5
8392sed 's/^/| /' conftest.$ac_ext >&5
8393
18fc9bd4 8394 ac_cv_header_thread_h=no
ba479fd2
NN
8395fi
8396rm -f conftest.err conftest.$ac_ext
6e3f3080 8397fi
a3bba767
JJ
8398echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8399echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 8400if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
8401 have_thread_h=yes
8402else
ba479fd2 8403 have_thread_h=
f24af81b
TT
8404fi
8405
a3bba767
JJ
8406echo "$as_me:$LINENO: checking for pthread.h" >&5
8407echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
ba479fd2
NN
8408if test "${ac_cv_header_pthread_h+set}" = set; then
8409 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 8410else
18fc9bd4 8411 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8412/* confdefs.h. */
8413_ACEOF
8414cat confdefs.h >>conftest.$ac_ext
8415cat >>conftest.$ac_ext <<_ACEOF
8416/* end confdefs.h. */
8417#include <pthread.h>
8418_ACEOF
a3bba767
JJ
8419if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8420 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
8421 ac_status=$?
8422 grep -v '^ *+' conftest.er1 >conftest.err
8423 rm -f conftest.er1
8424 cat conftest.err >&5
8425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8426 (exit $ac_status); } >/dev/null; then
8427 if test -s conftest.err; then
8428 ac_cpp_err=$ac_c_preproc_warn_flag
8429 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8430 else
8431 ac_cpp_err=
8432 fi
8433else
8434 ac_cpp_err=yes
8435fi
8436if test -z "$ac_cpp_err"; then
18fc9bd4 8437 ac_cv_header_pthread_h=yes
ba479fd2 8438else
18fc9bd4
RG
8439 echo "$as_me: failed program was:" >&5
8440sed 's/^/| /' conftest.$ac_ext >&5
8441
8442 ac_cv_header_pthread_h=no
8443fi
8444rm -f conftest.err conftest.$ac_ext
6e3f3080 8445fi
a3bba767
JJ
8446echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8447echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 8448if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
8449 have_pthread_h=yes
8450else
ba479fd2 8451 have_pthread_h=
f24af81b
TT
8452fi
8453
8454
84c041a1 8455# These tests can't be done till we know if we have limits.h.
a3bba767
JJ
8456echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8457echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
ba479fd2
NN
8458if test "${gcc_cv_decl_char_bit+set}" = set; then
8459 echo $ECHO_N "(cached) $ECHO_C" >&6
8460else
8461 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8462/* confdefs.h. */
8463_ACEOF
8464cat confdefs.h >>conftest.$ac_ext
8465cat >>conftest.$ac_ext <<_ACEOF
8466/* end confdefs.h. */
75e93faa
ZW
8467#ifdef HAVE_LIMITS_H
8468#include <limits.h>
8469#endif
8470#ifdef CHAR_BIT
8471found
8472#endif
ba479fd2 8473_ACEOF
75e93faa 8474if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8475 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
8476 gcc_cv_decl_char_bit=yes
8477else
75e93faa
ZW
8478 gcc_cv_decl_char_bit=no
8479fi
8480rm -f conftest*
8481
8482
8483fi
a3bba767
JJ
8484echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8485echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 8486if test $gcc_cv_decl_char_bit = no; then
a3bba767
JJ
8487 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8488echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
ba479fd2
NN
8489if test "${gcc_cv_c_nbby+set}" = set; then
8490 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
8491else
8492 i=8
8493 gcc_cv_c_nbby=
8494 while test $i -lt 65; do
ba479fd2 8495 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8496/* confdefs.h. */
8497_ACEOF
8498cat confdefs.h >>conftest.$ac_ext
8499cat >>conftest.$ac_ext <<_ACEOF
8500/* end confdefs.h. */
8501
8502int
8503main ()
8504{
4e70264f
ZW
8505switch(0) {
8506 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8507 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8508 ; }
ba479fd2
NN
8509 ;
8510 return 0;
8511}
8512_ACEOF
8513rm -f conftest.$ac_objext
a3bba767
JJ
8514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8515 (eval $ac_compile) 2>conftest.er1
ba479fd2 8516 ac_status=$?
86da66b5
HPN
8517 grep -v '^ *+' conftest.er1 >conftest.err
8518 rm -f conftest.er1
8519 cat conftest.err >&5
ba479fd2 8520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8521 (exit $ac_status); } &&
8522 { ac_try='test -z "$ac_c_werror_flag"
8523 || test ! -s conftest.err'
8524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8525 (eval $ac_try) 2>&5
8526 ac_status=$?
8527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8528 (exit $ac_status); }; } &&
8529 { ac_try='test -s conftest.$ac_objext'
8530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8531 (eval $ac_try) 2>&5
8532 ac_status=$?
8533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534 (exit $ac_status); }; }; then
4e70264f 8535 gcc_cv_c_nbby=$i; break
75e93faa 8536else
ba479fd2
NN
8537 echo "$as_me: failed program was:" >&5
8538sed 's/^/| /' conftest.$ac_ext >&5
8539
75e93faa 8540fi
a3bba767 8541rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
8542 i=`expr $i + 1`
8543 done
8544 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8545
8546fi
a3bba767
JJ
8547echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8548echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 8549if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
8550 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8551echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8552 { (exit 1); exit 1; }; }
75e93faa 8553else
ba479fd2
NN
8554
8555cat >>confdefs.h <<_ACEOF
75e93faa 8556#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 8557_ACEOF
75e93faa
ZW
8558
8559fi
8560fi
a3bba767
JJ
8561echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8562echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
ba479fd2
NN
8563if test "${ac_cv_c_bigendian+set}" = set; then
8564 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 8565else
9791c75c 8566 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 8567cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8568/* confdefs.h. */
8569_ACEOF
8570cat confdefs.h >>conftest.$ac_ext
8571cat >>conftest.$ac_ext <<_ACEOF
8572/* end confdefs.h. */
4977bab6
ZW
8573#include <sys/types.h>
8574#include <sys/param.h>
9791c75c 8575
ba479fd2
NN
8576int
8577main ()
8578{
a3bba767 8579#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4977bab6 8580 bogus endian macros
84c041a1 8581#endif
9791c75c 8582
ba479fd2
NN
8583 ;
8584 return 0;
8585}
8586_ACEOF
8587rm -f conftest.$ac_objext
a3bba767
JJ
8588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8589 (eval $ac_compile) 2>conftest.er1
ba479fd2 8590 ac_status=$?
86da66b5
HPN
8591 grep -v '^ *+' conftest.er1 >conftest.err
8592 rm -f conftest.er1
8593 cat conftest.err >&5
ba479fd2 8594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8595 (exit $ac_status); } &&
8596 { ac_try='test -z "$ac_c_werror_flag"
8597 || test ! -s conftest.err'
8598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8599 (eval $ac_try) 2>&5
8600 ac_status=$?
8601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8602 (exit $ac_status); }; } &&
8603 { ac_try='test -s conftest.$ac_objext'
8604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8605 (eval $ac_try) 2>&5
8606 ac_status=$?
8607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8608 (exit $ac_status); }; }; then
4977bab6 8609 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 8610cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8611/* confdefs.h. */
8612_ACEOF
8613cat confdefs.h >>conftest.$ac_ext
8614cat >>conftest.$ac_ext <<_ACEOF
8615/* end confdefs.h. */
4977bab6
ZW
8616#include <sys/types.h>
8617#include <sys/param.h>
9791c75c 8618
ba479fd2
NN
8619int
8620main ()
8621{
4977bab6
ZW
8622#if BYTE_ORDER != BIG_ENDIAN
8623 not big endian
84c041a1 8624#endif
9791c75c 8625
ba479fd2
NN
8626 ;
8627 return 0;
8628}
8629_ACEOF
8630rm -f conftest.$ac_objext
a3bba767
JJ
8631if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8632 (eval $ac_compile) 2>conftest.er1
ba479fd2 8633 ac_status=$?
86da66b5
HPN
8634 grep -v '^ *+' conftest.er1 >conftest.err
8635 rm -f conftest.er1
8636 cat conftest.err >&5
ba479fd2 8637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8638 (exit $ac_status); } &&
8639 { ac_try='test -z "$ac_c_werror_flag"
8640 || test ! -s conftest.err'
8641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8642 (eval $ac_try) 2>&5
8643 ac_status=$?
8644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8645 (exit $ac_status); }; } &&
8646 { ac_try='test -s conftest.$ac_objext'
8647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8648 (eval $ac_try) 2>&5
8649 ac_status=$?
8650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8651 (exit $ac_status); }; }; then
4977bab6
ZW
8652 ac_cv_c_bigendian=yes
8653else
ba479fd2
NN
8654 echo "$as_me: failed program was:" >&5
8655sed 's/^/| /' conftest.$ac_ext >&5
8656
a3bba767 8657ac_cv_c_bigendian=no
4977bab6 8658fi
a3bba767 8659rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8660else
ba479fd2
NN
8661 echo "$as_me: failed program was:" >&5
8662sed 's/^/| /' conftest.$ac_ext >&5
8663
a3bba767 8664# It does not; compile a test program.
9791c75c
KC
8665if test "$cross_compiling" = yes; then
8666 # try to guess the endianness by grepping values into an object file
8667 ac_cv_c_bigendian=unknown
8668 cat >conftest.$ac_ext <<_ACEOF
8669/* confdefs.h. */
8670_ACEOF
8671cat confdefs.h >>conftest.$ac_ext
8672cat >>conftest.$ac_ext <<_ACEOF
8673/* end confdefs.h. */
a3bba767
JJ
8674short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8675short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9791c75c 8676void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
a3bba767
JJ
8677short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8678short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9791c75c
KC
8679void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
8680int
8681main ()
8682{
8683 _ascii (); _ebcdic ();
8684 ;
8685 return 0;
8686}
8687_ACEOF
8688rm -f conftest.$ac_objext
a3bba767
JJ
8689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8690 (eval $ac_compile) 2>conftest.er1
9791c75c
KC
8691 ac_status=$?
8692 grep -v '^ *+' conftest.er1 >conftest.err
8693 rm -f conftest.er1
8694 cat conftest.err >&5
8695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8696 (exit $ac_status); } &&
8697 { ac_try='test -z "$ac_c_werror_flag"
8698 || test ! -s conftest.err'
8699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8700 (eval $ac_try) 2>&5
8701 ac_status=$?
8702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8703 (exit $ac_status); }; } &&
8704 { ac_try='test -s conftest.$ac_objext'
8705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8706 (eval $ac_try) 2>&5
8707 ac_status=$?
8708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8709 (exit $ac_status); }; }; then
8b1f719a
PB
8710 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
8711 ac_cv_c_bigendian=yes
8712fi
9791c75c
KC
8713if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8714 if test "$ac_cv_c_bigendian" = unknown; then
8715 ac_cv_c_bigendian=no
8716 else
8717 # finding both strings is unlikely to happen, but who knows?
8718 ac_cv_c_bigendian=unknown
8719 fi
8720fi
8721else
8722 echo "$as_me: failed program was:" >&5
8723sed 's/^/| /' conftest.$ac_ext >&5
8724
4977bab6 8725fi
a3bba767 8726rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
8727else
8728 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8729/* confdefs.h. */
8730_ACEOF
8731cat confdefs.h >>conftest.$ac_ext
8732cat >>conftest.$ac_ext <<_ACEOF
8733/* end confdefs.h. */
9791c75c
KC
8734int
8735main ()
8736{
4977bab6
ZW
8737 /* Are we little or big endian? From Harbison&Steele. */
8738 union
8739 {
a3bba767
JJ
8740 long l;
8741 char c[sizeof (long)];
4977bab6
ZW
8742 } u;
8743 u.l = 1;
a3bba767 8744 exit (u.c[sizeof (long) - 1] == 1);
4977bab6 8745}
ba479fd2
NN
8746_ACEOF
8747rm -f conftest$ac_exeext
a3bba767
JJ
8748if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8749 (eval $ac_link) 2>&5
ba479fd2
NN
8750 ac_status=$?
8751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8752 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
8753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8754 (eval $ac_try) 2>&5
ba479fd2
NN
8755 ac_status=$?
8756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8757 (exit $ac_status); }; }; then
4977bab6
ZW
8758 ac_cv_c_bigendian=no
8759else
ba479fd2
NN
8760 echo "$as_me: program exited with status $ac_status" >&5
8761echo "$as_me: failed program was:" >&5
8762sed 's/^/| /' conftest.$ac_ext >&5
8763
8764( exit $ac_status )
8765ac_cv_c_bigendian=yes
4977bab6 8766fi
a3bba767 8767rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 8768fi
4977bab6 8769fi
a3bba767 8770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8771fi
a3bba767
JJ
8772echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8773echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
8774case $ac_cv_c_bigendian in
8775 yes)
ba479fd2
NN
8776
8777cat >>confdefs.h <<\_ACEOF
4977bab6 8778#define WORDS_BIGENDIAN 1
ba479fd2 8779_ACEOF
9791c75c
KC
8780 ;;
8781 no)
8782 ;;
8783 *)
8784 { { echo "$as_me:$LINENO: error: unknown endianness
8785presetting ac_cv_c_bigendian=no (or yes) will help" >&5
8786echo "$as_me: error: unknown endianness
8787presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
8788 { (exit 1); exit 1; }; } ;;
8789esac
84c041a1 8790
75e93faa 8791
73458fb7
NN
8792# --------
8793# UNSORTED
8794# --------
1e608388 8795
1e608388 8796
4e70264f
ZW
8797# These libraries may be used by collect2.
8798# We may need a special search path to get them linked.
a3bba767
JJ
8799echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8800echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
ba479fd2
NN
8801if test "${gcc_cv_collect2_libs+set}" = set; then
8802 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
8803else
8804 save_LIBS="$LIBS"
7f2749d4 8805for libs in '' -lld -lmld \
4e70264f
ZW
8806 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8807 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8808do
8809 LIBS="$libs"
ba479fd2 8810 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8811/* confdefs.h. */
8812_ACEOF
8813cat confdefs.h >>conftest.$ac_ext
8814cat >>conftest.$ac_ext <<_ACEOF
8815/* end confdefs.h. */
8816
a3bba767 8817/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8818#ifdef __cplusplus
8819extern "C"
8820#endif
a3bba767
JJ
8821/* We use char because int might match the return type of a gcc2
8822 builtin and then its argument prototype would still apply. */
ba479fd2
NN
8823char ldopen ();
8824int
8825main ()
8826{
a3bba767 8827ldopen ();
ba479fd2
NN
8828 ;
8829 return 0;
8830}
8831_ACEOF
8832rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
8833if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8834 (eval $ac_link) 2>conftest.er1
ba479fd2 8835 ac_status=$?
86da66b5
HPN
8836 grep -v '^ *+' conftest.er1 >conftest.err
8837 rm -f conftest.er1
8838 cat conftest.err >&5
ba479fd2 8839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8840 (exit $ac_status); } &&
8841 { ac_try='test -z "$ac_c_werror_flag"
8842 || test ! -s conftest.err'
8843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8844 (eval $ac_try) 2>&5
8845 ac_status=$?
8846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8847 (exit $ac_status); }; } &&
8848 { ac_try='test -s conftest$ac_exeext'
8849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8850 (eval $ac_try) 2>&5
8851 ac_status=$?
8852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8853 (exit $ac_status); }; }; then
4e70264f
ZW
8854 gcc_cv_collect2_libs="$libs"; break
8855else
ba479fd2
NN
8856 echo "$as_me: failed program was:" >&5
8857sed 's/^/| /' conftest.$ac_ext >&5
8858
4e70264f 8859fi
a3bba767 8860rm -f conftest.err conftest.$ac_objext \
86da66b5 8861 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8862done
8863LIBS="$save_LIBS"
8864test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8865fi
a3bba767
JJ
8866echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8867echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
8868case $gcc_cv_collect2_libs in
8869 "none required") ;;
8870 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8871esac
8872
8873
7f2749d4
RK
8874# When building Ada code on Alpha, we need exc_resume which is usually in
8875# -lexc. So test for it.
8876save_LIBS="$LIBS"
8877LIBS=
a3bba767
JJ
8878echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8879echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
ba479fd2
NN
8880if test "${ac_cv_search_exc_resume+set}" = set; then
8881 echo $ECHO_N "(cached) $ECHO_C" >&6
8882else
8883 ac_func_search_save_LIBS=$LIBS
a3bba767 8884ac_cv_search_exc_resume=no
ba479fd2 8885cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8886/* confdefs.h. */
8887_ACEOF
8888cat confdefs.h >>conftest.$ac_ext
8889cat >>conftest.$ac_ext <<_ACEOF
8890/* end confdefs.h. */
7f2749d4 8891
a3bba767 8892/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8893#ifdef __cplusplus
8894extern "C"
8895#endif
a3bba767
JJ
8896/* We use char because int might match the return type of a gcc2
8897 builtin and then its argument prototype would still apply. */
ba479fd2
NN
8898char exc_resume ();
8899int
8900main ()
8901{
a3bba767 8902exc_resume ();
ba479fd2
NN
8903 ;
8904 return 0;
8905}
8906_ACEOF
a3bba767
JJ
8907rm -f conftest.$ac_objext conftest$ac_exeext
8908if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8909 (eval $ac_link) 2>conftest.er1
ba479fd2 8910 ac_status=$?
86da66b5
HPN
8911 grep -v '^ *+' conftest.er1 >conftest.err
8912 rm -f conftest.er1
8913 cat conftest.err >&5
ba479fd2 8914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
8915 (exit $ac_status); } &&
8916 { ac_try='test -z "$ac_c_werror_flag"
8917 || test ! -s conftest.err'
8918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8919 (eval $ac_try) 2>&5
8920 ac_status=$?
8921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8922 (exit $ac_status); }; } &&
8923 { ac_try='test -s conftest$ac_exeext'
8924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8925 (eval $ac_try) 2>&5
8926 ac_status=$?
8927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8928 (exit $ac_status); }; }; then
8929 ac_cv_search_exc_resume="none required"
7f2749d4 8930else
ba479fd2
NN
8931 echo "$as_me: failed program was:" >&5
8932sed 's/^/| /' conftest.$ac_ext >&5
8933
703d89ab 8934fi
a3bba767
JJ
8935rm -f conftest.err conftest.$ac_objext \
8936 conftest$ac_exeext conftest.$ac_ext
8937if test "$ac_cv_search_exc_resume" = no; then
8938 for ac_lib in exc; do
8939 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8940 cat >conftest.$ac_ext <<_ACEOF
8941/* confdefs.h. */
8942_ACEOF
8943cat confdefs.h >>conftest.$ac_ext
8944cat >>conftest.$ac_ext <<_ACEOF
8945/* end confdefs.h. */
8b1f719a 8946
a3bba767
JJ
8947/* Override any gcc2 internal prototype to avoid an error. */
8948#ifdef __cplusplus
8949extern "C"
8950#endif
8951/* We use char because int might match the return type of a gcc2
8952 builtin and then its argument prototype would still apply. */
8953char exc_resume ();
8954int
8955main ()
8956{
8957exc_resume ();
8958 ;
8959 return 0;
8960}
8961_ACEOF
8962rm -f conftest.$ac_objext conftest$ac_exeext
8963if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8964 (eval $ac_link) 2>conftest.er1
8965 ac_status=$?
8966 grep -v '^ *+' conftest.er1 >conftest.err
8967 rm -f conftest.er1
8968 cat conftest.err >&5
8969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8970 (exit $ac_status); } &&
8971 { ac_try='test -z "$ac_c_werror_flag"
8972 || test ! -s conftest.err'
8973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8974 (eval $ac_try) 2>&5
8975 ac_status=$?
8976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8977 (exit $ac_status); }; } &&
8978 { ac_try='test -s conftest$ac_exeext'
8979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8980 (eval $ac_try) 2>&5
8981 ac_status=$?
8982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8983 (exit $ac_status); }; }; then
8984 ac_cv_search_exc_resume="-l$ac_lib"
8985break
703d89ab 8986else
a3bba767
JJ
8987 echo "$as_me: failed program was:" >&5
8988sed 's/^/| /' conftest.$ac_ext >&5
8989
8990fi
8991rm -f conftest.err conftest.$ac_objext \
8992 conftest$ac_exeext conftest.$ac_ext
8993 done
b8ec3cc8 8994fi
b8ec3cc8
EC
8995LIBS=$ac_func_search_save_LIBS
8996fi
a3bba767
JJ
8997echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
8998echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
8999if test "$ac_cv_search_exc_resume" != no; then
9000 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
b8ec3cc8
EC
9001
9002fi
9003
dd7f7a6e 9004GNAT_LIBEXC="$LIBS"
b8ec3cc8
EC
9005LIBS="$save_LIBS"
9006
9007
dd7f7a6e
EC
9008# Some systems put ldexp and frexp in libm instead of libc; assume
9009# they're both in the same place. jcf-dump needs them.
9010save_LIBS="$LIBS"
9011LIBS=
a3bba767
JJ
9012echo "$as_me:$LINENO: checking for library containing ldexp" >&5
9013echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
dd7f7a6e 9014if test "${ac_cv_search_ldexp+set}" = set; then
b8ec3cc8
EC
9015 echo $ECHO_N "(cached) $ECHO_C" >&6
9016else
dd7f7a6e 9017 ac_func_search_save_LIBS=$LIBS
a3bba767 9018ac_cv_search_ldexp=no
dd7f7a6e 9019cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9020/* confdefs.h. */
9021_ACEOF
9022cat confdefs.h >>conftest.$ac_ext
9023cat >>conftest.$ac_ext <<_ACEOF
9024/* end confdefs.h. */
dd7f7a6e 9025
a3bba767 9026/* Override any gcc2 internal prototype to avoid an error. */
dd7f7a6e
EC
9027#ifdef __cplusplus
9028extern "C"
9029#endif
a3bba767
JJ
9030/* We use char because int might match the return type of a gcc2
9031 builtin and then its argument prototype would still apply. */
dd7f7a6e 9032char ldexp ();
ba479fd2
NN
9033int
9034main ()
9035{
a3bba767 9036ldexp ();
ba479fd2
NN
9037 ;
9038 return 0;
9039}
9040_ACEOF
a3bba767
JJ
9041rm -f conftest.$ac_objext conftest$ac_exeext
9042if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9043 (eval $ac_link) 2>conftest.er1
dd7f7a6e
EC
9044 ac_status=$?
9045 grep -v '^ *+' conftest.er1 >conftest.err
9046 rm -f conftest.er1
9047 cat conftest.err >&5
9048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9049 (exit $ac_status); } &&
9050 { ac_try='test -z "$ac_c_werror_flag"
9051 || test ! -s conftest.err'
9052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9053 (eval $ac_try) 2>&5
9054 ac_status=$?
9055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9056 (exit $ac_status); }; } &&
9057 { ac_try='test -s conftest$ac_exeext'
9058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9059 (eval $ac_try) 2>&5
9060 ac_status=$?
9061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9062 (exit $ac_status); }; }; then
9063 ac_cv_search_ldexp="none required"
dd7f7a6e
EC
9064else
9065 echo "$as_me: failed program was:" >&5
9066sed 's/^/| /' conftest.$ac_ext >&5
9067
703d89ab 9068fi
a3bba767
JJ
9069rm -f conftest.err conftest.$ac_objext \
9070 conftest$ac_exeext conftest.$ac_ext
9071if test "$ac_cv_search_ldexp" = no; then
9072 for ac_lib in m; do
9073 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9074 cat >conftest.$ac_ext <<_ACEOF
9075/* confdefs.h. */
9076_ACEOF
9077cat confdefs.h >>conftest.$ac_ext
9078cat >>conftest.$ac_ext <<_ACEOF
9079/* end confdefs.h. */
8b1f719a 9080
a3bba767
JJ
9081/* Override any gcc2 internal prototype to avoid an error. */
9082#ifdef __cplusplus
9083extern "C"
9084#endif
9085/* We use char because int might match the return type of a gcc2
9086 builtin and then its argument prototype would still apply. */
9087char ldexp ();
9088int
9089main ()
9090{
9091ldexp ();
9092 ;
9093 return 0;
9094}
9095_ACEOF
9096rm -f conftest.$ac_objext conftest$ac_exeext
9097if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9098 (eval $ac_link) 2>conftest.er1
9099 ac_status=$?
9100 grep -v '^ *+' conftest.er1 >conftest.err
9101 rm -f conftest.er1
9102 cat conftest.err >&5
9103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9104 (exit $ac_status); } &&
9105 { ac_try='test -z "$ac_c_werror_flag"
9106 || test ! -s conftest.err'
9107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9108 (eval $ac_try) 2>&5
9109 ac_status=$?
9110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9111 (exit $ac_status); }; } &&
9112 { ac_try='test -s conftest$ac_exeext'
9113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9114 (eval $ac_try) 2>&5
9115 ac_status=$?
9116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9117 (exit $ac_status); }; }; then
9118 ac_cv_search_ldexp="-l$ac_lib"
9119break
703d89ab 9120else
a3bba767
JJ
9121 echo "$as_me: failed program was:" >&5
9122sed 's/^/| /' conftest.$ac_ext >&5
9123
9124fi
9125rm -f conftest.err conftest.$ac_objext \
9126 conftest$ac_exeext conftest.$ac_ext
9127 done
dd7f7a6e
EC
9128fi
9129LIBS=$ac_func_search_save_LIBS
9130fi
a3bba767
JJ
9131echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
9132echo "${ECHO_T}$ac_cv_search_ldexp" >&6
9133if test "$ac_cv_search_ldexp" != no; then
9134 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
dd7f7a6e
EC
9135
9136fi
9137
9138LDEXP_LIB="$LIBS"
9139LIBS="$save_LIBS"
9140
9141
9142# Use <inttypes.h> only if it exists,
9143# doesn't clash with <sys/types.h>, and declares intmax_t.
a3bba767
JJ
9144echo "$as_me:$LINENO: checking for inttypes.h" >&5
9145echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
dd7f7a6e
EC
9146if test "${gcc_cv_header_inttypes_h+set}" = set; then
9147 echo $ECHO_N "(cached) $ECHO_C" >&6
9148else
9149 cat >conftest.$ac_ext <<_ACEOF
9150/* confdefs.h. */
9151_ACEOF
9152cat confdefs.h >>conftest.$ac_ext
9153cat >>conftest.$ac_ext <<_ACEOF
9154/* end confdefs.h. */
9155#include <sys/types.h>
9156#include <inttypes.h>
9157int
9158main ()
9159{
9160intmax_t i = -1;
9161 ;
9162 return 0;
9163}
9164_ACEOF
9165rm -f conftest.$ac_objext
a3bba767
JJ
9166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9167 (eval $ac_compile) 2>conftest.er1
dd7f7a6e
EC
9168 ac_status=$?
9169 grep -v '^ *+' conftest.er1 >conftest.err
9170 rm -f conftest.er1
9171 cat conftest.err >&5
9172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9173 (exit $ac_status); } &&
9174 { ac_try='test -z "$ac_c_werror_flag"
9175 || test ! -s conftest.err'
9176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9177 (eval $ac_try) 2>&5
9178 ac_status=$?
9179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9180 (exit $ac_status); }; } &&
9181 { ac_try='test -s conftest.$ac_objext'
9182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9183 (eval $ac_try) 2>&5
9184 ac_status=$?
9185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9186 (exit $ac_status); }; }; then
dd7f7a6e
EC
9187 gcc_cv_header_inttypes_h=yes
9188else
9189 echo "$as_me: failed program was:" >&5
9190sed 's/^/| /' conftest.$ac_ext >&5
9191
a3bba767 9192gcc_cv_header_inttypes_h=no
dd7f7a6e 9193fi
a3bba767 9194rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e
EC
9195fi
9196
a3bba767
JJ
9197echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
9198echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
dd7f7a6e
EC
9199if test $gcc_cv_header_inttypes_h = yes; then
9200
9201cat >>confdefs.h <<\_ACEOF
9202#define HAVE_INTTYPES_H 1
9203_ACEOF
9204
0056a9b5 9205fi
956d6950 9206
c149cc37 9207
ba479fd2
NN
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
0d667716
KG
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
ba479fd2
NN
9236
9237
9238
9239
9240
9241
9242
9243
52a6edcc 9244for ac_func in times clock kill getrlimit setrlimit atoll atoq \
0d667716
KG
9245 sysconf strsignal getrusage nl_langinfo scandir alphasort \
9246 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9247 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 9248do
ba479fd2 9249as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
a3bba767
JJ
9250echo "$as_me:$LINENO: checking for $ac_func" >&5
9251echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9252if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
9253 echo $ECHO_N "(cached) $ECHO_C" >&6
9254else
9255 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9256/* confdefs.h. */
9257_ACEOF
9258cat confdefs.h >>conftest.$ac_ext
9259cat >>conftest.$ac_ext <<_ACEOF
9260/* end confdefs.h. */
86da66b5
HPN
9261/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9262 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9263#define $ac_func innocuous_$ac_func
9264
956d6950 9265/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9266 which can conflict with char $ac_func (); below.
9267 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9268 <limits.h> exists even on freestanding compilers. */
86da66b5 9269
ba479fd2
NN
9270#ifdef __STDC__
9271# include <limits.h>
9272#else
9273# include <assert.h>
9274#endif
86da66b5
HPN
9275
9276#undef $ac_func
9277
a3bba767 9278/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9279#ifdef __cplusplus
9280extern "C"
a3bba767 9281{
ba479fd2 9282#endif
a3bba767
JJ
9283/* We use char because int might match the return type of a gcc2
9284 builtin and then its argument prototype would still apply. */
ba479fd2 9285char $ac_func ();
956d6950
JL
9286/* The GNU C library defines this for functions which it implements
9287 to always fail with ENOSYS. Some functions are actually named
9288 something starting with __ and the normal name is an alias. */
a3bba767 9289#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
956d6950 9290choke me
a3bba767
JJ
9291#else
9292char (*f) () = $ac_func;
9293#endif
9294#ifdef __cplusplus
9295}
956d6950
JL
9296#endif
9297
ba479fd2
NN
9298int
9299main ()
9300{
a3bba767 9301return f != $ac_func;
ba479fd2
NN
9302 ;
9303 return 0;
9304}
9305_ACEOF
9306rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
9307if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9308 (eval $ac_link) 2>conftest.er1
ba479fd2 9309 ac_status=$?
86da66b5
HPN
9310 grep -v '^ *+' conftest.er1 >conftest.err
9311 rm -f conftest.er1
9312 cat conftest.err >&5
ba479fd2 9313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9314 (exit $ac_status); } &&
9315 { ac_try='test -z "$ac_c_werror_flag"
9316 || test ! -s conftest.err'
9317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9318 (eval $ac_try) 2>&5
9319 ac_status=$?
9320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9321 (exit $ac_status); }; } &&
9322 { ac_try='test -s conftest$ac_exeext'
9323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9324 (eval $ac_try) 2>&5
9325 ac_status=$?
9326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9327 (exit $ac_status); }; }; then
ba479fd2
NN
9328 eval "$as_ac_var=yes"
9329else
9330 echo "$as_me: failed program was:" >&5
9331sed 's/^/| /' conftest.$ac_ext >&5
9332
a3bba767 9333eval "$as_ac_var=no"
ba479fd2 9334fi
a3bba767 9335rm -f conftest.err conftest.$ac_objext \
86da66b5 9336 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9337fi
a3bba767
JJ
9338echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9339echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
9340if test `eval echo '${'$as_ac_var'}'` = yes; then
9341 cat >>confdefs.h <<_ACEOF
9342#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9343_ACEOF
956d6950 9344
956d6950
JL
9345fi
9346done
9347
6885fc87 9348
39f6c4c8 9349if test x$ac_cv_func_mbstowcs = xyes; then
a3bba767
JJ
9350 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9351echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
ba479fd2
NN
9352if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9353 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9354else
9355 if test "$cross_compiling" = yes; then
9356 gcc_cv_func_mbstowcs_works=yes
9357else
ba479fd2 9358 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9359/* confdefs.h. */
9360_ACEOF
9361cat confdefs.h >>conftest.$ac_ext
9362cat >>conftest.$ac_ext <<_ACEOF
9363/* end confdefs.h. */
39f6c4c8
KW
9364#include <stdlib.h>
9365int main()
9366{
9367 mbstowcs(0, "", 0);
9368 return 0;
9369}
ba479fd2
NN
9370_ACEOF
9371rm -f conftest$ac_exeext
a3bba767
JJ
9372if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9373 (eval $ac_link) 2>&5
ba479fd2
NN
9374 ac_status=$?
9375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9376 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
9377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9378 (eval $ac_try) 2>&5
ba479fd2
NN
9379 ac_status=$?
9380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9381 (exit $ac_status); }; }; then
39f6c4c8
KW
9382 gcc_cv_func_mbstowcs_works=yes
9383else
ba479fd2
NN
9384 echo "$as_me: program exited with status $ac_status" >&5
9385echo "$as_me: failed program was:" >&5
9386sed 's/^/| /' conftest.$ac_ext >&5
9387
9388( exit $ac_status )
9389gcc_cv_func_mbstowcs_works=no
39f6c4c8 9390fi
a3bba767 9391rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 9392fi
39f6c4c8 9393fi
a3bba767
JJ
9394echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9395echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 9396 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
9397
9398cat >>confdefs.h <<\_ACEOF
39f6c4c8 9399#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 9400_ACEOF
39f6c4c8
KW
9401
9402 fi
9403fi
9404
a3bba767
JJ
9405echo "$as_me:$LINENO: checking for ssize_t" >&5
9406echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
ba479fd2
NN
9407if test "${ac_cv_type_ssize_t+set}" = set; then
9408 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 9409else
ba479fd2 9410 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9411/* confdefs.h. */
9412_ACEOF
9413cat confdefs.h >>conftest.$ac_ext
9414cat >>conftest.$ac_ext <<_ACEOF
9415/* end confdefs.h. */
8b4fc07a
NN
9416$ac_includes_default
9417int
9418main ()
9419{
a3bba767 9420if ((ssize_t *) 0)
8b4fc07a 9421 return 0;
a3bba767 9422if (sizeof (ssize_t))
8b4fc07a
NN
9423 return 0;
9424 ;
9425 return 0;
9426}
ba479fd2 9427_ACEOF
8b4fc07a 9428rm -f conftest.$ac_objext
a3bba767
JJ
9429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9430 (eval $ac_compile) 2>conftest.er1
8b4fc07a 9431 ac_status=$?
86da66b5
HPN
9432 grep -v '^ *+' conftest.er1 >conftest.err
9433 rm -f conftest.er1
9434 cat conftest.err >&5
8b4fc07a 9435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9436 (exit $ac_status); } &&
9437 { ac_try='test -z "$ac_c_werror_flag"
9438 || test ! -s conftest.err'
9439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9440 (eval $ac_try) 2>&5
9441 ac_status=$?
9442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9443 (exit $ac_status); }; } &&
9444 { ac_try='test -s conftest.$ac_objext'
9445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9446 (eval $ac_try) 2>&5
9447 ac_status=$?
9448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9449 (exit $ac_status); }; }; then
cb65112a 9450 ac_cv_type_ssize_t=yes
f12bc141 9451else
8b4fc07a
NN
9452 echo "$as_me: failed program was:" >&5
9453sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9454
a3bba767 9455ac_cv_type_ssize_t=no
8b4fc07a 9456fi
a3bba767 9457rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9458fi
a3bba767
JJ
9459echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9460echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
9461if test $ac_cv_type_ssize_t = yes; then
9462 :
9463else
ba479fd2 9464
8b4fc07a 9465cat >>confdefs.h <<_ACEOF
f12bc141 9466#define ssize_t int
ba479fd2 9467_ACEOF
f12bc141
ZW
9468
9469fi
9470
0b9d02c6 9471
e256b8b6
DA
9472# Try to determine the array type of the second argument of getgroups
9473# for the target system (int or gid_t).
a3bba767
JJ
9474echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9475echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
ba479fd2
NN
9476if test "${ac_cv_type_uid_t+set}" = set; then
9477 echo $ECHO_N "(cached) $ECHO_C" >&6
9478else
9479 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9480/* confdefs.h. */
9481_ACEOF
9482cat confdefs.h >>conftest.$ac_ext
9483cat >>conftest.$ac_ext <<_ACEOF
9484/* end confdefs.h. */
e256b8b6 9485#include <sys/types.h>
ba479fd2
NN
9486
9487_ACEOF
e256b8b6 9488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9489 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
9490 ac_cv_type_uid_t=yes
9491else
e256b8b6
DA
9492 ac_cv_type_uid_t=no
9493fi
9494rm -f conftest*
9495
9496fi
a3bba767
JJ
9497echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9498echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 9499if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
9500
9501cat >>confdefs.h <<\_ACEOF
e256b8b6 9502#define uid_t int
ba479fd2 9503_ACEOF
cafe096b 9504
ba479fd2
NN
9505
9506cat >>confdefs.h <<\_ACEOF
e256b8b6 9507#define gid_t int
ba479fd2 9508_ACEOF
e256b8b6
DA
9509
9510fi
9511
a3bba767
JJ
9512echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9513echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
ba479fd2
NN
9514if test "${ac_cv_type_getgroups+set}" = set; then
9515 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
9516else
9517 if test "$cross_compiling" = yes; then
9518 ac_cv_type_getgroups=cross
9519else
ba479fd2 9520 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9521/* confdefs.h. */
9522_ACEOF
9523cat confdefs.h >>conftest.$ac_ext
9524cat >>conftest.$ac_ext <<_ACEOF
9525/* end confdefs.h. */
e256b8b6 9526/* Thanks to Mike Rendell for this test. */
a3bba767 9527#include <sys/types.h>
e256b8b6
DA
9528#define NGID 256
9529#undef MAX
9530#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
9531
9532int
9533main ()
e256b8b6
DA
9534{
9535 gid_t gidset[NGID];
9536 int i, n;
a3bba767 9537 union { gid_t gval; long lval; } val;
e256b8b6
DA
9538
9539 val.lval = -1;
9540 for (i = 0; i < NGID; i++)
9541 gidset[i] = val.gval;
9542 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 9543 gidset);
e256b8b6 9544 /* Exit non-zero if getgroups seems to require an array of ints. This
a3bba767
JJ
9545 happens when gid_t is short but getgroups modifies an array of ints. */
9546 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 9547}
ba479fd2
NN
9548_ACEOF
9549rm -f conftest$ac_exeext
a3bba767
JJ
9550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9551 (eval $ac_link) 2>&5
ba479fd2
NN
9552 ac_status=$?
9553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9554 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
9555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9556 (eval $ac_try) 2>&5
ba479fd2
NN
9557 ac_status=$?
9558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9559 (exit $ac_status); }; }; then
9560 ac_cv_type_getgroups=gid_t
63cf211a 9561else
ba479fd2
NN
9562 echo "$as_me: program exited with status $ac_status" >&5
9563echo "$as_me: failed program was:" >&5
9564sed 's/^/| /' conftest.$ac_ext >&5
9565
9566( exit $ac_status )
9567ac_cv_type_getgroups=int
e256b8b6 9568fi
a3bba767 9569rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 9570fi
e256b8b6 9571if test $ac_cv_type_getgroups = cross; then
ba479fd2 9572 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9573/* confdefs.h. */
9574_ACEOF
9575cat confdefs.h >>conftest.$ac_ext
9576cat >>conftest.$ac_ext <<_ACEOF
9577/* end confdefs.h. */
e256b8b6 9578#include <unistd.h>
ba479fd2
NN
9579
9580_ACEOF
e256b8b6 9581if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9582 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
9583 ac_cv_type_getgroups=gid_t
9584else
e256b8b6
DA
9585 ac_cv_type_getgroups=int
9586fi
9587rm -f conftest*
9588
9589fi
9590fi
a3bba767
JJ
9591echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9592echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 9593
ba479fd2 9594cat >>confdefs.h <<_ACEOF
e256b8b6 9595#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 9596_ACEOF
e256b8b6
DA
9597
9598
9599if test "${target}" = "${build}"; then
9600 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9601else
9602 case "${target}" in
9603 # This condition may need some tweaking. It should include all
9604 # targets where the array type of the second argument of getgroups
9605 # is int and the type of gid_t is not equivalent to int.
9606 *-*-sunos* | *-*-ultrix*)
9607 TARGET_GETGROUPS_T=int
9608 ;;
9609 *)
9610 TARGET_GETGROUPS_T=gid_t
9611 ;;
9612 esac
9613fi
9614
9615
3b0727a0 9616
a3bba767
JJ
9617echo "$as_me:$LINENO: checking for sys/mman.h" >&5
9618echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
3b0727a0
MR
9619if test "${ac_cv_header_sys_mman_h+set}" = set; then
9620 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 9621else
18fc9bd4 9622 cat >conftest.$ac_ext <<_ACEOF
3b0727a0
MR
9623/* confdefs.h. */
9624_ACEOF
9625cat confdefs.h >>conftest.$ac_ext
9626cat >>conftest.$ac_ext <<_ACEOF
9627/* end confdefs.h. */
9628#include <sys/mman.h>
9629_ACEOF
a3bba767
JJ
9630if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9631 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3b0727a0
MR
9632 ac_status=$?
9633 grep -v '^ *+' conftest.er1 >conftest.err
9634 rm -f conftest.er1
9635 cat conftest.err >&5
9636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9637 (exit $ac_status); } >/dev/null; then
9638 if test -s conftest.err; then
9639 ac_cpp_err=$ac_c_preproc_warn_flag
9640 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9641 else
9642 ac_cpp_err=
9643 fi
9644else
9645 ac_cpp_err=yes
9646fi
9647if test -z "$ac_cpp_err"; then
18fc9bd4 9648 ac_cv_header_sys_mman_h=yes
3b0727a0
MR
9649else
9650 echo "$as_me: failed program was:" >&5
9651sed 's/^/| /' conftest.$ac_ext >&5
9652
18fc9bd4 9653 ac_cv_header_sys_mman_h=no
3b0727a0
MR
9654fi
9655rm -f conftest.err conftest.$ac_ext
9656fi
a3bba767
JJ
9657echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9658echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
3b0727a0
MR
9659if test $ac_cv_header_sys_mman_h = yes; then
9660 gcc_header_sys_mman_h=yes
9661else
9662 gcc_header_sys_mman_h=no
9663fi
9664
a3bba767
JJ
9665echo "$as_me:$LINENO: checking for mmap" >&5
9666echo $ECHO_N "checking for mmap... $ECHO_C" >&6
3b0727a0
MR
9667if test "${ac_cv_func_mmap+set}" = set; then
9668 echo $ECHO_N "(cached) $ECHO_C" >&6
9669else
9670 cat >conftest.$ac_ext <<_ACEOF
9671/* confdefs.h. */
9672_ACEOF
9673cat confdefs.h >>conftest.$ac_ext
9674cat >>conftest.$ac_ext <<_ACEOF
9675/* end confdefs.h. */
9676/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9677 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9678#define mmap innocuous_mmap
9679
9680/* System header to define __stub macros and hopefully few prototypes,
9681 which can conflict with char mmap (); below.
9682 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9683 <limits.h> exists even on freestanding compilers. */
9684
9685#ifdef __STDC__
9686# include <limits.h>
9687#else
9688# include <assert.h>
9689#endif
9690
9691#undef mmap
9692
a3bba767 9693/* Override any gcc2 internal prototype to avoid an error. */
3b0727a0
MR
9694#ifdef __cplusplus
9695extern "C"
a3bba767 9696{
3b0727a0 9697#endif
a3bba767
JJ
9698/* We use char because int might match the return type of a gcc2
9699 builtin and then its argument prototype would still apply. */
3b0727a0
MR
9700char mmap ();
9701/* The GNU C library defines this for functions which it implements
9702 to always fail with ENOSYS. Some functions are actually named
9703 something starting with __ and the normal name is an alias. */
a3bba767 9704#if defined (__stub_mmap) || defined (__stub___mmap)
3b0727a0 9705choke me
a3bba767
JJ
9706#else
9707char (*f) () = mmap;
9708#endif
9709#ifdef __cplusplus
9710}
3b0727a0
MR
9711#endif
9712
9713int
9714main ()
9715{
a3bba767 9716return f != mmap;
3b0727a0
MR
9717 ;
9718 return 0;
9719}
9720_ACEOF
9721rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
9722if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9723 (eval $ac_link) 2>conftest.er1
3b0727a0
MR
9724 ac_status=$?
9725 grep -v '^ *+' conftest.er1 >conftest.err
9726 rm -f conftest.er1
9727 cat conftest.err >&5
9728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9729 (exit $ac_status); } &&
9730 { ac_try='test -z "$ac_c_werror_flag"
9731 || test ! -s conftest.err'
9732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9733 (eval $ac_try) 2>&5
9734 ac_status=$?
9735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9736 (exit $ac_status); }; } &&
9737 { ac_try='test -s conftest$ac_exeext'
9738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9739 (eval $ac_try) 2>&5
9740 ac_status=$?
9741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9742 (exit $ac_status); }; }; then
8b1f719a
PB
9743 ac_cv_func_mmap=yes
9744else
9745 echo "$as_me: failed program was:" >&5
9746sed 's/^/| /' conftest.$ac_ext >&5
a6ccdbab 9747
a3bba767 9748ac_cv_func_mmap=no
8b1f719a 9749fi
a3bba767 9750rm -f conftest.err conftest.$ac_objext \
3b0727a0
MR
9751 conftest$ac_exeext conftest.$ac_ext
9752fi
a3bba767
JJ
9753echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9754echo "${ECHO_T}$ac_cv_func_mmap" >&6
3b0727a0
MR
9755if test $ac_cv_func_mmap = yes; then
9756 gcc_func_mmap=yes
9757else
9758 gcc_func_mmap=no
9759fi
9760
9761if test "$gcc_header_sys_mman_h" != yes \
9762 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
9763 gcc_cv_func_mmap_file=no
9764 gcc_cv_func_mmap_dev_zero=no
9765 gcc_cv_func_mmap_anon=no
9766else
a3bba767
JJ
9767 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9768echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
ba479fd2
NN
9769if test "${gcc_cv_func_mmap_file+set}" = set; then
9770 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 9771else
ba479fd2 9772 # Add a system to this blacklist if
1072ec3f
ZW
9773 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9774 # memory area containing the same data that you'd get if you applied
9775 # read() to the same fd. The only system known to have a problem here
9776 # is VMS, where text files have record structure.
9777 case "$host_os" in
ba479fd2 9778 vms* | ultrix*)
1072ec3f
ZW
9779 gcc_cv_func_mmap_file=no ;;
9780 *)
9781 gcc_cv_func_mmap_file=yes;;
9782 esac
9783fi
a3bba767
JJ
9784echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9785echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9786 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9787echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
ba479fd2
NN
9788if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9789 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9790else
9791 # Add a system to this blacklist if it has mmap() but /dev/zero
9792 # does not exist, or if mmapping /dev/zero does not give anonymous
9793 # zeroed pages with both the following properties:
9794 # 1. If you map N consecutive pages in with one call, and then
9795 # unmap any subset of those pages, the pages that were not
9796 # explicitly unmapped remain accessible.
9797 # 2. If you map two adjacent blocks of memory and then unmap them
9798 # both at once, they must both go away.
9799 # Systems known to be in this category are Windows (all variants),
9800 # VMS, and Darwin.
9801 case "$host_os" in
2ce240d3 9802 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
9803 gcc_cv_func_mmap_dev_zero=no ;;
9804 *)
9805 gcc_cv_func_mmap_dev_zero=yes;;
9806 esac
9807fi
a3bba767
JJ
9808echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9809echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
9810
9811 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
a3bba767
JJ
9812 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9813echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
ba479fd2
NN
9814if test "${gcc_cv_decl_map_anon+set}" = set; then
9815 echo $ECHO_N "(cached) $ECHO_C" >&6
9816else
9817 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9818/* confdefs.h. */
9819_ACEOF
9820cat confdefs.h >>conftest.$ac_ext
9821cat >>conftest.$ac_ext <<_ACEOF
9822/* end confdefs.h. */
1072ec3f
ZW
9823#include <sys/types.h>
9824#include <sys/mman.h>
9825#include <unistd.h>
9826
9827#ifndef MAP_ANONYMOUS
9828#define MAP_ANONYMOUS MAP_ANON
9829#endif
9830
ba479fd2
NN
9831int
9832main ()
9833{
1072ec3f 9834int n = MAP_ANONYMOUS;
ba479fd2
NN
9835 ;
9836 return 0;
9837}
9838_ACEOF
9839rm -f conftest.$ac_objext
a3bba767
JJ
9840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9841 (eval $ac_compile) 2>conftest.er1
ba479fd2 9842 ac_status=$?
86da66b5
HPN
9843 grep -v '^ *+' conftest.er1 >conftest.err
9844 rm -f conftest.er1
9845 cat conftest.err >&5
ba479fd2 9846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9847 (exit $ac_status); } &&
9848 { ac_try='test -z "$ac_c_werror_flag"
9849 || test ! -s conftest.err'
9850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9851 (eval $ac_try) 2>&5
9852 ac_status=$?
9853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9854 (exit $ac_status); }; } &&
9855 { ac_try='test -s conftest.$ac_objext'
9856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9857 (eval $ac_try) 2>&5
9858 ac_status=$?
9859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9860 (exit $ac_status); }; }; then
1072ec3f
ZW
9861 gcc_cv_decl_map_anon=yes
9862else
ba479fd2
NN
9863 echo "$as_me: failed program was:" >&5
9864sed 's/^/| /' conftest.$ac_ext >&5
9865
a3bba767 9866gcc_cv_decl_map_anon=no
1072ec3f 9867fi
a3bba767 9868rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 9869fi
a3bba767
JJ
9870echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9871echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
9872
9873 if test $gcc_cv_decl_map_anon = no; then
9874 gcc_cv_func_mmap_anon=no
9875 else
a3bba767
JJ
9876 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9877echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
ba479fd2
NN
9878if test "${gcc_cv_func_mmap_anon+set}" = set; then
9879 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9880else
9881 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9882 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9883 # doesn't give anonymous zeroed pages with the same properties listed
9884 # above for use of /dev/zero.
9885 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9886 case "$host_os" in
9887 vms* | cygwin* | pe | mingw* | sco* | udk* )
9888 gcc_cv_func_mmap_anon=no ;;
9889 *)
9890 gcc_cv_func_mmap_anon=yes;;
9891 esac
9892fi
a3bba767
JJ
9893echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9894echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
9895 fi
9896fi
9897
9898if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
9899
9900cat >>confdefs.h <<\_ACEOF
1072ec3f 9901#define HAVE_MMAP_FILE 1
ba479fd2 9902_ACEOF
1072ec3f
ZW
9903
9904fi
9905if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
9906
9907cat >>confdefs.h <<\_ACEOF
1072ec3f 9908#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 9909_ACEOF
1072ec3f
ZW
9910
9911fi
9912if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
9913
9914cat >>confdefs.h <<\_ACEOF
1072ec3f 9915#define HAVE_MMAP_ANON 1
ba479fd2 9916_ACEOF
1072ec3f
ZW
9917
9918fi
9919
b27d2bd5
MK
9920
9921case "${host}" in
ee262b6f 9922*-*-*vms*)
ba479fd2 9923 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
9924 # won't work, and it isn't easily adaptable. It makes more sense to
9925 # just force it.
9926 ac_cv_func_vfork_works=yes
9927 ;;
b27d2bd5 9928esac
a3bba767
JJ
9929echo "$as_me:$LINENO: checking for pid_t" >&5
9930echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
ba479fd2
NN
9931if test "${ac_cv_type_pid_t+set}" = set; then
9932 echo $ECHO_N "(cached) $ECHO_C" >&6
9933else
9934 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9935/* confdefs.h. */
9936_ACEOF
9937cat confdefs.h >>conftest.$ac_ext
9938cat >>conftest.$ac_ext <<_ACEOF
9939/* end confdefs.h. */
9940$ac_includes_default
9941int
9942main ()
9943{
a3bba767 9944if ((pid_t *) 0)
ba479fd2 9945 return 0;
a3bba767 9946if (sizeof (pid_t))
ba479fd2
NN
9947 return 0;
9948 ;
9949 return 0;
9950}
9951_ACEOF
9952rm -f conftest.$ac_objext
a3bba767
JJ
9953if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9954 (eval $ac_compile) 2>conftest.er1
ba479fd2 9955 ac_status=$?
86da66b5
HPN
9956 grep -v '^ *+' conftest.er1 >conftest.err
9957 rm -f conftest.er1
9958 cat conftest.err >&5
ba479fd2 9959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
9960 (exit $ac_status); } &&
9961 { ac_try='test -z "$ac_c_werror_flag"
9962 || test ! -s conftest.err'
9963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9964 (eval $ac_try) 2>&5
9965 ac_status=$?
9966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9967 (exit $ac_status); }; } &&
9968 { ac_try='test -s conftest.$ac_objext'
9969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9970 (eval $ac_try) 2>&5
9971 ac_status=$?
9972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9973 (exit $ac_status); }; }; then
cb65112a 9974 ac_cv_type_pid_t=yes
c375c43b 9975else
ba479fd2
NN
9976 echo "$as_me: failed program was:" >&5
9977sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9978
a3bba767 9979ac_cv_type_pid_t=no
ba479fd2 9980fi
a3bba767 9981rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9982fi
a3bba767
JJ
9983echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
9984echo "${ECHO_T}$ac_cv_type_pid_t" >&6
ba479fd2
NN
9985if test $ac_cv_type_pid_t = yes; then
9986 :
9987else
9988
9989cat >>confdefs.h <<_ACEOF
c375c43b 9990#define pid_t int
ba479fd2 9991_ACEOF
c375c43b
KG
9992
9993fi
9994
ba479fd2 9995
a3bba767
JJ
9996
9997for ac_header in unistd.h vfork.h
ba479fd2
NN
9998do
9999as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a3bba767
JJ
10000echo "$as_me:$LINENO: checking for $ac_header" >&5
10001echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10002if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 10003 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10004else
18fc9bd4 10005 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10006/* confdefs.h. */
10007_ACEOF
10008cat confdefs.h >>conftest.$ac_ext
10009cat >>conftest.$ac_ext <<_ACEOF
10010/* end confdefs.h. */
10011#include <$ac_header>
10012_ACEOF
a3bba767
JJ
10013if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10014 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
10015 ac_status=$?
10016 grep -v '^ *+' conftest.er1 >conftest.err
10017 rm -f conftest.er1
10018 cat conftest.err >&5
10019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
10020 (exit $ac_status); } >/dev/null; then
10021 if test -s conftest.err; then
10022 ac_cpp_err=$ac_c_preproc_warn_flag
10023 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10024 else
10025 ac_cpp_err=
10026 fi
10027else
10028 ac_cpp_err=yes
10029fi
10030if test -z "$ac_cpp_err"; then
18fc9bd4 10031 eval "$as_ac_Header=yes"
ba479fd2
NN
10032else
10033 echo "$as_me: failed program was:" >&5
10034sed 's/^/| /' conftest.$ac_ext >&5
10035
18fc9bd4 10036 eval "$as_ac_Header=no"
ba479fd2
NN
10037fi
10038rm -f conftest.err conftest.$ac_ext
c375c43b 10039fi
a3bba767
JJ
10040echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10041echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
10042if test `eval echo '${'$as_ac_Header'}'` = yes; then
10043 cat >>confdefs.h <<_ACEOF
10044#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10045_ACEOF
6e3f3080
NN
10046
10047fi
ba479fd2
NN
10048done
10049
10050
10051
10052for ac_func in fork vfork
10053do
10054as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
a3bba767
JJ
10055echo "$as_me:$LINENO: checking for $ac_func" >&5
10056echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10057if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
10058 echo $ECHO_N "(cached) $ECHO_C" >&6
10059else
10060 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10061/* confdefs.h. */
10062_ACEOF
10063cat confdefs.h >>conftest.$ac_ext
10064cat >>conftest.$ac_ext <<_ACEOF
10065/* end confdefs.h. */
86da66b5
HPN
10066/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10067 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10068#define $ac_func innocuous_$ac_func
10069
c375c43b 10070/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10071 which can conflict with char $ac_func (); below.
10072 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10073 <limits.h> exists even on freestanding compilers. */
86da66b5 10074
ba479fd2
NN
10075#ifdef __STDC__
10076# include <limits.h>
10077#else
10078# include <assert.h>
10079#endif
86da66b5
HPN
10080
10081#undef $ac_func
10082
a3bba767 10083/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10084#ifdef __cplusplus
10085extern "C"
a3bba767 10086{
ba479fd2 10087#endif
a3bba767
JJ
10088/* We use char because int might match the return type of a gcc2
10089 builtin and then its argument prototype would still apply. */
ba479fd2 10090char $ac_func ();
c375c43b
KG
10091/* The GNU C library defines this for functions which it implements
10092 to always fail with ENOSYS. Some functions are actually named
10093 something starting with __ and the normal name is an alias. */
a3bba767 10094#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b 10095choke me
a3bba767
JJ
10096#else
10097char (*f) () = $ac_func;
10098#endif
10099#ifdef __cplusplus
10100}
c375c43b
KG
10101#endif
10102
ba479fd2
NN
10103int
10104main ()
10105{
a3bba767 10106return f != $ac_func;
ba479fd2
NN
10107 ;
10108 return 0;
10109}
10110_ACEOF
10111rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
10112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10113 (eval $ac_link) 2>conftest.er1
ba479fd2 10114 ac_status=$?
86da66b5
HPN
10115 grep -v '^ *+' conftest.er1 >conftest.err
10116 rm -f conftest.er1
10117 cat conftest.err >&5
ba479fd2 10118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
10119 (exit $ac_status); } &&
10120 { ac_try='test -z "$ac_c_werror_flag"
10121 || test ! -s conftest.err'
10122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10123 (eval $ac_try) 2>&5
10124 ac_status=$?
10125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10126 (exit $ac_status); }; } &&
10127 { ac_try='test -s conftest$ac_exeext'
10128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10129 (eval $ac_try) 2>&5
10130 ac_status=$?
10131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10132 (exit $ac_status); }; }; then
ba479fd2
NN
10133 eval "$as_ac_var=yes"
10134else
10135 echo "$as_me: failed program was:" >&5
10136sed 's/^/| /' conftest.$ac_ext >&5
10137
a3bba767 10138eval "$as_ac_var=no"
ba479fd2 10139fi
a3bba767 10140rm -f conftest.err conftest.$ac_objext \
86da66b5 10141 conftest$ac_exeext conftest.$ac_ext
ba479fd2 10142fi
a3bba767
JJ
10143echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10144echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
10145if test `eval echo '${'$as_ac_var'}'` = yes; then
10146 cat >>confdefs.h <<_ACEOF
10147#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10148_ACEOF
10149
c375c43b 10150fi
ba479fd2 10151done
c375c43b 10152
ba479fd2 10153if test "x$ac_cv_func_fork" = xyes; then
a3bba767
JJ
10154 echo "$as_me:$LINENO: checking for working fork" >&5
10155echo $ECHO_N "checking for working fork... $ECHO_C" >&6
ba479fd2
NN
10156if test "${ac_cv_func_fork_works+set}" = set; then
10157 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10158else
ba479fd2
NN
10159 if test "$cross_compiling" = yes; then
10160 ac_cv_func_fork_works=cross
10161else
10162 cat >conftest.$ac_ext <<_ACEOF
a3bba767
JJ
10163/* By Ruediger Kuhlmann. */
10164 #include <sys/types.h>
10165 #if HAVE_UNISTD_H
10166 # include <unistd.h>
10167 #endif
10168 /* Some systems only have a dummy stub for fork() */
10169 int main ()
10170 {
10171 if (fork() < 0)
10172 exit (1);
10173 exit (0);
10174 }
ba479fd2
NN
10175_ACEOF
10176rm -f conftest$ac_exeext
a3bba767
JJ
10177if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10178 (eval $ac_link) 2>&5
ba479fd2
NN
10179 ac_status=$?
10180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10181 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
10182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10183 (eval $ac_try) 2>&5
ba479fd2
NN
10184 ac_status=$?
10185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10186 (exit $ac_status); }; }; then
10187 ac_cv_func_fork_works=yes
10188else
10189 echo "$as_me: program exited with status $ac_status" >&5
10190echo "$as_me: failed program was:" >&5
10191sed 's/^/| /' conftest.$ac_ext >&5
10192
10193( exit $ac_status )
10194ac_cv_func_fork_works=no
10195fi
a3bba767 10196rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
10197fi
10198fi
a3bba767
JJ
10199echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10200echo "${ECHO_T}$ac_cv_func_fork_works" >&6
ba479fd2
NN
10201
10202else
10203 ac_cv_func_fork_works=$ac_cv_func_fork
10204fi
10205if test "x$ac_cv_func_fork_works" = xcross; then
10206 case $host in
10207 *-*-amigaos* | *-*-msdosdjgpp*)
10208 # Override, as these systems have only a dummy fork() stub
10209 ac_cv_func_fork_works=no
10210 ;;
10211 *)
10212 ac_cv_func_fork_works=yes
10213 ;;
10214 esac
10215 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10216echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 10217fi
c375c43b 10218ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2 10219if test "x$ac_cv_func_vfork" = xyes; then
a3bba767
JJ
10220 echo "$as_me:$LINENO: checking for working vfork" >&5
10221echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
ba479fd2
NN
10222if test "${ac_cv_func_vfork_works+set}" = set; then
10223 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10224else
ba479fd2
NN
10225 if test "$cross_compiling" = yes; then
10226 ac_cv_func_vfork_works=cross
10227else
10228 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10229/* confdefs.h. */
10230_ACEOF
10231cat confdefs.h >>conftest.$ac_ext
10232cat >>conftest.$ac_ext <<_ACEOF
10233/* end confdefs.h. */
c375c43b 10234/* Thanks to Paul Eggert for this test. */
a3bba767
JJ
10235#include <stdio.h>
10236#include <stdlib.h>
10237#include <sys/types.h>
10238#include <sys/stat.h>
ba479fd2 10239#include <sys/wait.h>
a3bba767
JJ
10240#if HAVE_UNISTD_H
10241# include <unistd.h>
10242#endif
10243#if HAVE_VFORK_H
ba479fd2 10244# include <vfork.h>
c375c43b
KG
10245#endif
10246/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
10247 argument registers are propagated back to the parent. The compiler
10248 is told about this with #include <vfork.h>, but some compilers
10249 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10250 static variable whose address is put into a register that is
10251 clobbered by the vfork. */
10252static void
c375c43b
KG
10253#ifdef __cplusplus
10254sparc_address_test (int arg)
ba479fd2 10255# else
c375c43b
KG
10256sparc_address_test (arg) int arg;
10257#endif
10258{
10259 static pid_t child;
10260 if (!child) {
10261 child = vfork ();
10262 if (child < 0) {
10263 perror ("vfork");
10264 _exit(2);
10265 }
10266 if (!child) {
10267 arg = getpid();
10268 write(-1, "", 0);
10269 _exit (arg);
10270 }
10271 }
10272}
ba479fd2
NN
10273
10274int
10275main ()
10276{
c375c43b
KG
10277 pid_t parent = getpid ();
10278 pid_t child;
10279
ba479fd2 10280 sparc_address_test (0);
c375c43b
KG
10281
10282 child = vfork ();
10283
10284 if (child == 0) {
ba479fd2
NN
10285 /* Here is another test for sparc vfork register problems. This
10286 test uses lots of local variables, at least as many local
10287 variables as main has allocated so far including compiler
10288 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10289 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10290 reuse the register of parent for one of the local variables,
10291 since it will think that parent can't possibly be used any more
10292 in this routine. Assigning to the local variable will thus
10293 munge parent in the parent process. */
c375c43b
KG
10294 pid_t
10295 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10296 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10297 /* Convince the compiler that p..p7 are live; otherwise, it might
10298 use the same hardware register for all 8 local variables. */
10299 if (p != p1 || p != p2 || p != p3 || p != p4
10300 || p != p5 || p != p6 || p != p7)
10301 _exit(1);
10302
ba479fd2
NN
10303 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10304 from child file descriptors. If the child closes a descriptor
10305 before it execs or exits, this munges the parent's descriptor
10306 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10307 _exit(close(fileno(stdout)) != 0);
10308 } else {
10309 int status;
10310 struct stat st;
10311
10312 while (wait(&status) != child)
10313 ;
a3bba767 10314 exit(
c375c43b
KG
10315 /* Was there some problem with vforking? */
10316 child < 0
10317
10318 /* Did the child fail? (This shouldn't happen.) */
10319 || status
10320
10321 /* Did the vfork/compiler bug occur? */
10322 || parent != getpid()
10323
10324 /* Did the file descriptor bug occur? */
10325 || fstat(fileno(stdout), &st) != 0
10326 );
10327 }
10328}
ba479fd2
NN
10329_ACEOF
10330rm -f conftest$ac_exeext
a3bba767
JJ
10331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10332 (eval $ac_link) 2>&5
ba479fd2
NN
10333 ac_status=$?
10334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10335 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
10336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10337 (eval $ac_try) 2>&5
ba479fd2
NN
10338 ac_status=$?
10339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10340 (exit $ac_status); }; }; then
c375c43b
KG
10341 ac_cv_func_vfork_works=yes
10342else
ba479fd2
NN
10343 echo "$as_me: program exited with status $ac_status" >&5
10344echo "$as_me: failed program was:" >&5
10345sed 's/^/| /' conftest.$ac_ext >&5
10346
10347( exit $ac_status )
10348ac_cv_func_vfork_works=no
cafe096b 10349fi
a3bba767 10350rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10351fi
ba479fd2 10352fi
a3bba767
JJ
10353echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10354echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 10355
ba479fd2
NN
10356fi;
10357if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 10358 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10359 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10360echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
10361fi
10362
ba479fd2
NN
10363if test "x$ac_cv_func_vfork_works" = xyes; then
10364
10365cat >>confdefs.h <<\_ACEOF
10366#define HAVE_WORKING_VFORK 1
10367_ACEOF
10368
10369else
10370
10371cat >>confdefs.h <<\_ACEOF
c375c43b 10372#define vfork fork
ba479fd2 10373_ACEOF
c375c43b
KG
10374
10375fi
ba479fd2
NN
10376if test "x$ac_cv_func_fork_works" = xyes; then
10377
10378cat >>confdefs.h <<\_ACEOF
10379#define HAVE_WORKING_FORK 1
10380_ACEOF
10381
10382fi
10383
c375c43b 10384
81bf3d9e 10385
dfb77e37
KC
10386 if test "X$prefix" = "XNONE"; then
10387 acl_final_prefix="$ac_default_prefix"
10388 else
10389 acl_final_prefix="$prefix"
10390 fi
10391 if test "X$exec_prefix" = "XNONE"; then
10392 acl_final_exec_prefix='${prefix}'
10393 else
10394 acl_final_exec_prefix="$exec_prefix"
10395 fi
10396 acl_save_prefix="$prefix"
10397 prefix="$acl_final_prefix"
10398 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10399 prefix="$acl_save_prefix"
f91abfce
TT
10400
10401
a3bba767 10402# Check whether --with-gnu-ld or --without-gnu-ld was given.
dfb77e37 10403if test "${with_gnu_ld+set}" = set; then
a3bba767
JJ
10404 withval="$with_gnu_ld"
10405 test "$withval" = no || with_gnu_ld=yes
ba479fd2 10406else
dfb77e37 10407 with_gnu_ld=no
a3bba767 10408fi;
dfb77e37
KC
10409# Prepare PATH_SEPARATOR.
10410# The user is always right.
10411if test "${PATH_SEPARATOR+set}" != set; then
10412 echo "#! /bin/sh" >conf$$.sh
10413 echo "exit 0" >>conf$$.sh
10414 chmod +x conf$$.sh
10415 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10416 PATH_SEPARATOR=';'
ba479fd2 10417 else
dfb77e37 10418 PATH_SEPARATOR=:
ba479fd2 10419 fi
dfb77e37
KC
10420 rm -f conf$$.sh
10421fi
10422ac_prog=ld
10423if test "$GCC" = yes; then
10424 # Check if gcc -print-prog-name=ld gives a path.
a3bba767
JJ
10425 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10426echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
dfb77e37
KC
10427 case $host in
10428 *-*-mingw*)
10429 # gcc leaves a trailing carriage return which upsets mingw
10430 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10431 *)
10432 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10433 esac
10434 case $ac_prog in
10435 # Accept absolute paths.
10436 [\\/]* | [A-Za-z]:[\\/]*)
10437 re_direlt='/[^/][^/]*/\.\./'
10438 # Canonicalize the path of ld
10439 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10440 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10441 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10442 done
10443 test -z "$LD" && LD="$ac_prog"
10444 ;;
10445 "")
10446 # If it fails, then pretend we aren't using GCC.
10447 ac_prog=ld
10448 ;;
10449 *)
10450 # If it is relative, then search for the first ld in PATH.
10451 with_gnu_ld=unknown
10452 ;;
10453 esac
10454elif test "$with_gnu_ld" = yes; then
a3bba767
JJ
10455 echo "$as_me:$LINENO: checking for GNU ld" >&5
10456echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 10457else
a3bba767
JJ
10458 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10459echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 10460fi
dfb77e37
KC
10461if test "${acl_cv_path_LD+set}" = set; then
10462 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 10463else
dfb77e37
KC
10464 if test -z "$LD"; then
10465 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10466 for ac_dir in $PATH; do
10467 test -z "$ac_dir" && ac_dir=.
10468 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10469 acl_cv_path_LD="$ac_dir/$ac_prog"
10470 # Check to see if the program is GNU ld. I'd rather use --version,
10471 # but apparently some GNU ld's only accept -v.
10472 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
10473 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10474 test "$with_gnu_ld" != no && break
10475 else
10476 test "$with_gnu_ld" != yes && break
10477 fi
dfb77e37
KC
10478 fi
10479 done
10480 IFS="$ac_save_ifs"
10481else
10482 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10483fi
10484fi
ba479fd2 10485
dfb77e37
KC
10486LD="$acl_cv_path_LD"
10487if test -n "$LD"; then
a3bba767
JJ
10488 echo "$as_me:$LINENO: result: $LD" >&5
10489echo "${ECHO_T}$LD" >&6
dfb77e37 10490else
a3bba767
JJ
10491 echo "$as_me:$LINENO: result: no" >&5
10492echo "${ECHO_T}no" >&6
ba479fd2 10493fi
dfb77e37
KC
10494test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10495echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10496 { (exit 1); exit 1; }; }
a3bba767
JJ
10497echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10498echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
dfb77e37
KC
10499if test "${acl_cv_prog_gnu_ld+set}" = set; then
10500 echo $ECHO_N "(cached) $ECHO_C" >&6
10501else
10502 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
10503if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10504 acl_cv_prog_gnu_ld=yes
10505else
10506 acl_cv_prog_gnu_ld=no
10507fi
dfb77e37 10508fi
a3bba767
JJ
10509echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10510echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
dfb77e37
KC
10511with_gnu_ld=$acl_cv_prog_gnu_ld
10512
10513
10514
a3bba767
JJ
10515 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10516echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
dfb77e37
KC
10517if test "${acl_cv_rpath+set}" = set; then
10518 echo $ECHO_N "(cached) $ECHO_C" >&6
10519else
10520
10521 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10522 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10523 . ./conftest.sh
10524 rm -f ./conftest.sh
10525 acl_cv_rpath=done
ba479fd2 10526
eb158727 10527fi
a3bba767
JJ
10528echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10529echo "${ECHO_T}$acl_cv_rpath" >&6
dfb77e37
KC
10530 wl="$acl_cv_wl"
10531 libext="$acl_cv_libext"
10532 shlibext="$acl_cv_shlibext"
10533 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10534 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10535 hardcode_direct="$acl_cv_hardcode_direct"
10536 hardcode_minus_L="$acl_cv_hardcode_minus_L"
a3bba767 10537 # Check whether --enable-rpath or --disable-rpath was given.
dfb77e37 10538if test "${enable_rpath+set}" = set; then
a3bba767
JJ
10539 enableval="$enable_rpath"
10540 :
dfb77e37
KC
10541else
10542 enable_rpath=yes
a3bba767 10543fi;
8b1f719a 10544
a6ccdbab 10545
dfb77e37
KC
10546
10547
10548
10549
10550
b639c3c2
JJ
10551 use_additional=yes
10552
10553 acl_save_prefix="$prefix"
10554 prefix="$acl_final_prefix"
10555 acl_save_exec_prefix="$exec_prefix"
10556 exec_prefix="$acl_final_exec_prefix"
10557
10558 eval additional_includedir=\"$includedir\"
10559 eval additional_libdir=\"$libdir\"
10560
10561 exec_prefix="$acl_save_exec_prefix"
10562 prefix="$acl_save_prefix"
dfb77e37
KC
10563
10564
a3bba767 10565# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
8b1f719a 10566if test "${with_libiconv_prefix+set}" = set; then
a3bba767
JJ
10567 withval="$with_libiconv_prefix"
10568
8b1f719a 10569 if test "X$withval" = "Xno"; then
b639c3c2 10570 use_additional=no
8b1f719a
PB
10571 else
10572 if test "X$withval" = "X"; then
dfb77e37
KC
10573
10574 acl_save_prefix="$prefix"
10575 prefix="$acl_final_prefix"
10576 acl_save_exec_prefix="$exec_prefix"
10577 exec_prefix="$acl_final_exec_prefix"
10578
b639c3c2
JJ
10579 eval additional_includedir=\"$includedir\"
10580 eval additional_libdir=\"$libdir\"
dfb77e37
KC
10581
10582 exec_prefix="$acl_save_exec_prefix"
10583 prefix="$acl_save_prefix"
10584
8b1f719a 10585 else
b639c3c2
JJ
10586 additional_includedir="$withval/include"
10587 additional_libdir="$withval/lib"
8b1f719a
PB
10588 fi
10589 fi
10590
a3bba767 10591fi;
dfb77e37
KC
10592 LIBICONV=
10593 LTLIBICONV=
10594 INCICONV=
10595 rpathdirs=
10596 ltrpathdirs=
10597 names_already_handled=
10598 names_next_round='iconv '
10599 while test -n "$names_next_round"; do
10600 names_this_round="$names_next_round"
10601 names_next_round=
10602 for name in $names_this_round; do
10603 already_handled=
10604 for n in $names_already_handled; do
10605 if test "$n" = "$name"; then
10606 already_handled=yes
10607 break
10608 fi
10609 done
10610 if test -z "$already_handled"; then
10611 names_already_handled="$names_already_handled $name"
10612 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10613 eval value=\"\$HAVE_LIB$uppername\"
10614 if test -n "$value"; then
10615 if test "$value" = yes; then
10616 eval value=\"\$LIB$uppername\"
10617 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10618 eval value=\"\$LTLIB$uppername\"
10619 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10620 else
10621 :
10622 fi
10623 else
10624 found_dir=
10625 found_la=
10626 found_so=
10627 found_a=
b639c3c2
JJ
10628 if test $use_additional = yes; then
10629 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10630 found_dir="$additional_libdir"
10631 found_so="$additional_libdir/lib$name.$shlibext"
10632 if test -f "$additional_libdir/lib$name.la"; then
10633 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
10634 fi
10635 else
b639c3c2
JJ
10636 if test -f "$additional_libdir/lib$name.$libext"; then
10637 found_dir="$additional_libdir"
10638 found_a="$additional_libdir/lib$name.$libext"
10639 if test -f "$additional_libdir/lib$name.la"; then
10640 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
10641 fi
10642 fi
10643 fi
10644 fi
10645 if test "X$found_dir" = "X"; then
10646 for x in $LDFLAGS $LTLIBICONV; do
10647
10648 acl_save_prefix="$prefix"
10649 prefix="$acl_final_prefix"
10650 acl_save_exec_prefix="$exec_prefix"
10651 exec_prefix="$acl_final_exec_prefix"
10652 eval x=\"$x\"
10653 exec_prefix="$acl_save_exec_prefix"
10654 prefix="$acl_save_prefix"
10655
10656 case "$x" in
10657 -L*)
10658 dir=`echo "X$x" | sed -e 's/^X-L//'`
10659 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10660 found_dir="$dir"
10661 found_so="$dir/lib$name.$shlibext"
10662 if test -f "$dir/lib$name.la"; then
10663 found_la="$dir/lib$name.la"
10664 fi
10665 else
10666 if test -f "$dir/lib$name.$libext"; then
10667 found_dir="$dir"
10668 found_a="$dir/lib$name.$libext"
10669 if test -f "$dir/lib$name.la"; then
10670 found_la="$dir/lib$name.la"
10671 fi
10672 fi
10673 fi
10674 ;;
10675 esac
10676 if test "X$found_dir" != "X"; then
10677 break
10678 fi
10679 done
10680 fi
10681 if test "X$found_dir" != "X"; then
10682 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10683 if test "X$found_so" != "X"; then
10684 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10685 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10686 else
10687 haveit=
10688 for x in $ltrpathdirs; do
10689 if test "X$x" = "X$found_dir"; then
10690 haveit=yes
10691 break
10692 fi
10693 done
10694 if test -z "$haveit"; then
10695 ltrpathdirs="$ltrpathdirs $found_dir"
10696 fi
10697 if test "$hardcode_direct" = yes; then
10698 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10699 else
10700 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10701 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10702 haveit=
10703 for x in $rpathdirs; do
10704 if test "X$x" = "X$found_dir"; then
10705 haveit=yes
10706 break
10707 fi
10708 done
10709 if test -z "$haveit"; then
10710 rpathdirs="$rpathdirs $found_dir"
10711 fi
10712 else
10713 haveit=
10714 for x in $LDFLAGS $LIBICONV; do
10715
10716 acl_save_prefix="$prefix"
10717 prefix="$acl_final_prefix"
10718 acl_save_exec_prefix="$exec_prefix"
10719 exec_prefix="$acl_final_exec_prefix"
10720 eval x=\"$x\"
10721 exec_prefix="$acl_save_exec_prefix"
10722 prefix="$acl_save_prefix"
10723
10724 if test "X$x" = "X-L$found_dir"; then
10725 haveit=yes
10726 break
10727 fi
10728 done
10729 if test -z "$haveit"; then
10730 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10731 fi
10732 if test "$hardcode_minus_L" != no; then
10733 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10734 else
10735 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10736 fi
10737 fi
10738 fi
10739 fi
10740 else
10741 if test "X$found_a" != "X"; then
10742 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10743 else
10744 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10745 fi
10746 fi
10747 additional_includedir=
10748 case "$found_dir" in
10749 */lib | */lib/)
10750 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10751 additional_includedir="$basedir/include"
10752 ;;
10753 esac
10754 if test "X$additional_includedir" != "X"; then
10755 if test "X$additional_includedir" != "X/usr/include"; then
10756 haveit=
10757 if test "X$additional_includedir" = "X/usr/local/include"; then
10758 if test -n "$GCC"; then
10759 case $host_os in
18fc9bd4 10760 linux*) haveit=yes;;
dfb77e37
KC
10761 esac
10762 fi
10763 fi
10764 if test -z "$haveit"; then
10765 for x in $CPPFLAGS $INCICONV; do
10766
10767 acl_save_prefix="$prefix"
10768 prefix="$acl_final_prefix"
10769 acl_save_exec_prefix="$exec_prefix"
10770 exec_prefix="$acl_final_exec_prefix"
10771 eval x=\"$x\"
10772 exec_prefix="$acl_save_exec_prefix"
10773 prefix="$acl_save_prefix"
10774
10775 if test "X$x" = "X-I$additional_includedir"; then
10776 haveit=yes
10777 break
10778 fi
10779 done
10780 if test -z "$haveit"; then
10781 if test -d "$additional_includedir"; then
10782 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10783 fi
10784 fi
10785 fi
10786 fi
10787 fi
10788 if test -n "$found_la"; then
10789 save_libdir="$libdir"
10790 case "$found_la" in
10791 */* | *\\*) . "$found_la" ;;
10792 *) . "./$found_la" ;;
10793 esac
10794 libdir="$save_libdir"
10795 for dep in $dependency_libs; do
10796 case "$dep" in
10797 -L*)
10798 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10799 if test "X$additional_libdir" != "X/usr/lib"; then
10800 haveit=
10801 if test "X$additional_libdir" = "X/usr/local/lib"; then
10802 if test -n "$GCC"; then
10803 case $host_os in
18fc9bd4 10804 linux*) haveit=yes;;
dfb77e37
KC
10805 esac
10806 fi
10807 fi
10808 if test -z "$haveit"; then
10809 haveit=
10810 for x in $LDFLAGS $LIBICONV; do
10811
10812 acl_save_prefix="$prefix"
10813 prefix="$acl_final_prefix"
10814 acl_save_exec_prefix="$exec_prefix"
10815 exec_prefix="$acl_final_exec_prefix"
10816 eval x=\"$x\"
10817 exec_prefix="$acl_save_exec_prefix"
10818 prefix="$acl_save_prefix"
10819
10820 if test "X$x" = "X-L$additional_libdir"; then
10821 haveit=yes
10822 break
10823 fi
10824 done
10825 if test -z "$haveit"; then
10826 if test -d "$additional_libdir"; then
10827 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10828 fi
10829 fi
10830 haveit=
10831 for x in $LDFLAGS $LTLIBICONV; do
10832
10833 acl_save_prefix="$prefix"
10834 prefix="$acl_final_prefix"
10835 acl_save_exec_prefix="$exec_prefix"
10836 exec_prefix="$acl_final_exec_prefix"
10837 eval x=\"$x\"
10838 exec_prefix="$acl_save_exec_prefix"
10839 prefix="$acl_save_prefix"
10840
10841 if test "X$x" = "X-L$additional_libdir"; then
10842 haveit=yes
10843 break
10844 fi
10845 done
10846 if test -z "$haveit"; then
10847 if test -d "$additional_libdir"; then
10848 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10849 fi
10850 fi
10851 fi
10852 fi
10853 ;;
10854 -R*)
10855 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10856 if test "$enable_rpath" != no; then
10857 haveit=
10858 for x in $rpathdirs; do
10859 if test "X$x" = "X$dir"; then
10860 haveit=yes
10861 break
10862 fi
10863 done
10864 if test -z "$haveit"; then
10865 rpathdirs="$rpathdirs $dir"
10866 fi
10867 haveit=
10868 for x in $ltrpathdirs; do
10869 if test "X$x" = "X$dir"; then
10870 haveit=yes
10871 break
10872 fi
10873 done
10874 if test -z "$haveit"; then
10875 ltrpathdirs="$ltrpathdirs $dir"
10876 fi
10877 fi
10878 ;;
10879 -l*)
10880 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10881 ;;
10882 *.la)
10883 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10884 ;;
10885 *)
10886 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10887 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10888 ;;
10889 esac
10890 done
10891 fi
10892 else
10893 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10894 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10895 fi
10896 fi
10897 fi
10898 done
10899 done
10900 if test "X$rpathdirs" != "X"; then
10901 if test -n "$hardcode_libdir_separator"; then
10902 alldirs=
10903 for found_dir in $rpathdirs; do
10904 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10905 done
10906 acl_save_libdir="$libdir"
10907 libdir="$alldirs"
10908 eval flag=\"$hardcode_libdir_flag_spec\"
10909 libdir="$acl_save_libdir"
10910 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10911 else
10912 for found_dir in $rpathdirs; do
10913 acl_save_libdir="$libdir"
10914 libdir="$found_dir"
10915 eval flag=\"$hardcode_libdir_flag_spec\"
10916 libdir="$acl_save_libdir"
10917 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10918 done
10919 fi
10920 fi
10921 if test "X$ltrpathdirs" != "X"; then
10922 for found_dir in $ltrpathdirs; do
10923 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10924 done
10925 fi
10926
10927
10928
10929
10930
10931
10932
10933 am_save_CPPFLAGS="$CPPFLAGS"
10934
10935 for element in $INCICONV; do
10936 haveit=
10937 for x in $CPPFLAGS; do
10938
10939 acl_save_prefix="$prefix"
10940 prefix="$acl_final_prefix"
10941 acl_save_exec_prefix="$exec_prefix"
10942 exec_prefix="$acl_final_exec_prefix"
10943 eval x=\"$x\"
10944 exec_prefix="$acl_save_exec_prefix"
10945 prefix="$acl_save_prefix"
10946
10947 if test "X$x" = "X$element"; then
10948 haveit=yes
10949 break
10950 fi
10951 done
10952 if test -z "$haveit"; then
10953 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10954 fi
10955 done
eb158727
ZW
10956
10957
a3bba767
JJ
10958 echo "$as_me:$LINENO: checking for iconv" >&5
10959echo $ECHO_N "checking for iconv... $ECHO_C" >&6
ba479fd2
NN
10960if test "${am_cv_func_iconv+set}" = set; then
10961 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10962else
ba479fd2 10963
f91abfce
TT
10964 am_cv_func_iconv="no, consider installing GNU libiconv"
10965 am_cv_lib_iconv=no
ba479fd2 10966 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10967/* confdefs.h. */
10968_ACEOF
10969cat confdefs.h >>conftest.$ac_ext
10970cat >>conftest.$ac_ext <<_ACEOF
10971/* end confdefs.h. */
f91abfce
TT
10972#include <stdlib.h>
10973#include <iconv.h>
ba479fd2
NN
10974int
10975main ()
10976{
f91abfce
TT
10977iconv_t cd = iconv_open("","");
10978 iconv(cd,NULL,NULL,NULL,NULL);
10979 iconv_close(cd);
ba479fd2
NN
10980 ;
10981 return 0;
10982}
10983_ACEOF
10984rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
10985if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10986 (eval $ac_link) 2>conftest.er1
ba479fd2 10987 ac_status=$?
86da66b5
HPN
10988 grep -v '^ *+' conftest.er1 >conftest.err
10989 rm -f conftest.er1
10990 cat conftest.err >&5
ba479fd2 10991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
10992 (exit $ac_status); } &&
10993 { ac_try='test -z "$ac_c_werror_flag"
10994 || test ! -s conftest.err'
10995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10996 (eval $ac_try) 2>&5
10997 ac_status=$?
10998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10999 (exit $ac_status); }; } &&
11000 { ac_try='test -s conftest$ac_exeext'
11001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11002 (eval $ac_try) 2>&5
11003 ac_status=$?
11004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11005 (exit $ac_status); }; }; then
f91abfce
TT
11006 am_cv_func_iconv=yes
11007else
ba479fd2
NN
11008 echo "$as_me: failed program was:" >&5
11009sed 's/^/| /' conftest.$ac_ext >&5
11010
f91abfce 11011fi
a3bba767 11012rm -f conftest.err conftest.$ac_objext \
86da66b5 11013 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11014 if test "$am_cv_func_iconv" != yes; then
11015 am_save_LIBS="$LIBS"
dfb77e37 11016 LIBS="$LIBS $LIBICONV"
ba479fd2 11017 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11018/* confdefs.h. */
11019_ACEOF
11020cat confdefs.h >>conftest.$ac_ext
11021cat >>conftest.$ac_ext <<_ACEOF
11022/* end confdefs.h. */
f91abfce
TT
11023#include <stdlib.h>
11024#include <iconv.h>
ba479fd2
NN
11025int
11026main ()
11027{
f91abfce
TT
11028iconv_t cd = iconv_open("","");
11029 iconv(cd,NULL,NULL,NULL,NULL);
11030 iconv_close(cd);
ba479fd2
NN
11031 ;
11032 return 0;
11033}
11034_ACEOF
11035rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
11036if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11037 (eval $ac_link) 2>conftest.er1
ba479fd2 11038 ac_status=$?
86da66b5
HPN
11039 grep -v '^ *+' conftest.er1 >conftest.err
11040 rm -f conftest.er1
11041 cat conftest.err >&5
ba479fd2 11042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11043 (exit $ac_status); } &&
11044 { ac_try='test -z "$ac_c_werror_flag"
11045 || test ! -s conftest.err'
11046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11047 (eval $ac_try) 2>&5
11048 ac_status=$?
11049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11050 (exit $ac_status); }; } &&
11051 { ac_try='test -s conftest$ac_exeext'
11052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11053 (eval $ac_try) 2>&5
11054 ac_status=$?
11055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11056 (exit $ac_status); }; }; then
f91abfce
TT
11057 am_cv_lib_iconv=yes
11058 am_cv_func_iconv=yes
11059else
ba479fd2
NN
11060 echo "$as_me: failed program was:" >&5
11061sed 's/^/| /' conftest.$ac_ext >&5
11062
f91abfce 11063fi
a3bba767 11064rm -f conftest.err conftest.$ac_objext \
86da66b5 11065 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11066 LIBS="$am_save_LIBS"
11067 fi
6e3f3080 11068
ba479fd2 11069fi
a3bba767
JJ
11070echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
11071echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 11072 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11073
11074cat >>confdefs.h <<\_ACEOF
f91abfce 11075#define HAVE_ICONV 1
ba479fd2 11076_ACEOF
f91abfce 11077
dfb77e37
KC
11078 fi
11079 if test "$am_cv_lib_iconv" = yes; then
a3bba767
JJ
11080 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
11081echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
11082 echo "$as_me:$LINENO: result: $LIBICONV" >&5
11083echo "${ECHO_T}$LIBICONV" >&6
dfb77e37
KC
11084 else
11085 CPPFLAGS="$am_save_CPPFLAGS"
11086 LIBICONV=
11087 LTLIBICONV=
11088 fi
11089
11090
11091
11092 if test "$am_cv_func_iconv" = yes; then
a3bba767
JJ
11093 echo "$as_me:$LINENO: checking for iconv declaration" >&5
11094echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
ba479fd2
NN
11095 if test "${am_cv_proto_iconv+set}" = set; then
11096 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11097else
ba479fd2
NN
11098
11099 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11100/* confdefs.h. */
11101_ACEOF
11102cat confdefs.h >>conftest.$ac_ext
11103cat >>conftest.$ac_ext <<_ACEOF
11104/* end confdefs.h. */
f91abfce
TT
11105
11106#include <stdlib.h>
11107#include <iconv.h>
11108extern
11109#ifdef __cplusplus
11110"C"
11111#endif
11112#if defined(__STDC__) || defined(__cplusplus)
11113size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11114#else
11115size_t iconv();
11116#endif
11117
ba479fd2
NN
11118int
11119main ()
11120{
f91abfce 11121
ba479fd2
NN
11122 ;
11123 return 0;
11124}
11125_ACEOF
11126rm -f conftest.$ac_objext
a3bba767
JJ
11127if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11128 (eval $ac_compile) 2>conftest.er1
ba479fd2 11129 ac_status=$?
86da66b5
HPN
11130 grep -v '^ *+' conftest.er1 >conftest.err
11131 rm -f conftest.er1
11132 cat conftest.err >&5
ba479fd2 11133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11134 (exit $ac_status); } &&
11135 { ac_try='test -z "$ac_c_werror_flag"
11136 || test ! -s conftest.err'
11137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11138 (eval $ac_try) 2>&5
11139 ac_status=$?
11140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11141 (exit $ac_status); }; } &&
11142 { ac_try='test -s conftest.$ac_objext'
11143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11144 (eval $ac_try) 2>&5
11145 ac_status=$?
11146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11147 (exit $ac_status); }; }; then
f91abfce
TT
11148 am_cv_proto_iconv_arg1=""
11149else
ba479fd2
NN
11150 echo "$as_me: failed program was:" >&5
11151sed 's/^/| /' conftest.$ac_ext >&5
11152
a3bba767 11153am_cv_proto_iconv_arg1="const"
f91abfce 11154fi
a3bba767 11155rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
11156 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);"
11157fi
11158
11159 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
a3bba767 11160 echo "$as_me:$LINENO: result: ${ac_t:-
ba479fd2
NN
11161 }$am_cv_proto_iconv" >&5
11162echo "${ECHO_T}${ac_t:-
a3bba767 11163 }$am_cv_proto_iconv" >&6
ba479fd2
NN
11164
11165cat >>confdefs.h <<_ACEOF
f91abfce 11166#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 11167_ACEOF
f91abfce
TT
11168
11169 fi
f91abfce 11170
56694dd9
ZW
11171# Until we have in-tree GNU iconv:
11172LIBICONV_DEP=
11173
11174
18fc9bd4 11175
a3bba767
JJ
11176 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11177echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
18fc9bd4
RG
11178if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11179 echo $ECHO_N "(cached) $ECHO_C" >&6
11180else
11181 cat >conftest.$ac_ext <<_ACEOF
11182/* confdefs.h. */
11183_ACEOF
11184cat confdefs.h >>conftest.$ac_ext
11185cat >>conftest.$ac_ext <<_ACEOF
11186/* end confdefs.h. */
11187#include <locale.h>
11188int
11189main ()
11190{
11191return LC_MESSAGES
11192 ;
11193 return 0;
11194}
11195_ACEOF
11196rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
11197if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11198 (eval $ac_link) 2>conftest.er1
18fc9bd4
RG
11199 ac_status=$?
11200 grep -v '^ *+' conftest.er1 >conftest.err
11201 rm -f conftest.er1
11202 cat conftest.err >&5
11203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11204 (exit $ac_status); } &&
11205 { ac_try='test -z "$ac_c_werror_flag"
11206 || test ! -s conftest.err'
11207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11208 (eval $ac_try) 2>&5
11209 ac_status=$?
11210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11211 (exit $ac_status); }; } &&
11212 { ac_try='test -s conftest$ac_exeext'
11213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11214 (eval $ac_try) 2>&5
11215 ac_status=$?
11216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11217 (exit $ac_status); }; }; then
18fc9bd4
RG
11218 am_cv_val_LC_MESSAGES=yes
11219else
11220 echo "$as_me: failed program was:" >&5
11221sed 's/^/| /' conftest.$ac_ext >&5
11222
a3bba767 11223am_cv_val_LC_MESSAGES=no
18fc9bd4 11224fi
a3bba767 11225rm -f conftest.err conftest.$ac_objext \
18fc9bd4
RG
11226 conftest$ac_exeext conftest.$ac_ext
11227fi
a3bba767
JJ
11228echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11229echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
18fc9bd4
RG
11230 if test $am_cv_val_LC_MESSAGES = yes; then
11231
11232cat >>confdefs.h <<\_ACEOF
11233#define HAVE_LC_MESSAGES 1
11234_ACEOF
11235
11236 fi
11237
f91abfce 11238
a03ea89b 11239
a3bba767
JJ
11240 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11241echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
a03ea89b
BM
11242if test "${am_cv_langinfo_codeset+set}" = set; then
11243 echo $ECHO_N "(cached) $ECHO_C" >&6
11244else
11245 cat >conftest.$ac_ext <<_ACEOF
11246/* confdefs.h. */
11247_ACEOF
11248cat confdefs.h >>conftest.$ac_ext
11249cat >>conftest.$ac_ext <<_ACEOF
11250/* end confdefs.h. */
11251#include <langinfo.h>
11252int
11253main ()
11254{
11255char* cs = nl_langinfo(CODESET);
11256 ;
11257 return 0;
11258}
11259_ACEOF
11260rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
11261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11262 (eval $ac_link) 2>conftest.er1
a03ea89b
BM
11263 ac_status=$?
11264 grep -v '^ *+' conftest.er1 >conftest.err
11265 rm -f conftest.er1
11266 cat conftest.err >&5
11267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11268 (exit $ac_status); } &&
11269 { ac_try='test -z "$ac_c_werror_flag"
11270 || test ! -s conftest.err'
11271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11272 (eval $ac_try) 2>&5
11273 ac_status=$?
11274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11275 (exit $ac_status); }; } &&
11276 { ac_try='test -s conftest$ac_exeext'
11277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11278 (eval $ac_try) 2>&5
11279 ac_status=$?
11280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11281 (exit $ac_status); }; }; then
a03ea89b
BM
11282 am_cv_langinfo_codeset=yes
11283else
11284 echo "$as_me: failed program was:" >&5
11285sed 's/^/| /' conftest.$ac_ext >&5
11286
a3bba767 11287am_cv_langinfo_codeset=no
a03ea89b 11288fi
a3bba767 11289rm -f conftest.err conftest.$ac_objext \
a03ea89b
BM
11290 conftest$ac_exeext conftest.$ac_ext
11291
11292fi
a3bba767
JJ
11293echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11294echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
a03ea89b
BM
11295 if test $am_cv_langinfo_codeset = yes; then
11296
11297cat >>confdefs.h <<\_ACEOF
11298#define HAVE_LANGINFO_CODESET 1
11299_ACEOF
11300
11301 fi
11302
11303
86cf1cbd
KG
11304# We will need to find libiberty.h and ansidecl.h
11305saved_CFLAGS="$CFLAGS"
11306CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
6a257778 11328
ad6717df
PB
11329
11330
0d667716
KG
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
367e8319 11341
0d667716
KG
11342
11343
7391b66c 11344
ed5b9f96
GK
11345
11346for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
11347 strsignal strstr strverscmp \
11348 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 11349 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 11350do
ad6717df 11351 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a3bba767
JJ
11352echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11353echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11354if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
11355 echo $ECHO_N "(cached) $ECHO_C" >&6
11356else
11357 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11358/* confdefs.h. */
11359_ACEOF
11360cat confdefs.h >>conftest.$ac_ext
11361cat >>conftest.$ac_ext <<_ACEOF
11362/* end confdefs.h. */
7afe8c41
KG
11363#undef $ac_tr_decl
11364#define $ac_tr_decl 1
ba479fd2 11365
d02af173 11366#include "ansidecl.h"
86cf1cbd 11367#include "system.h"
f31e826b 11368
ba479fd2
NN
11369int
11370main ()
11371{
86cf1cbd
KG
11372#ifndef $ac_func
11373char *(*pfn) = (char *(*)) $ac_func ;
11374#endif
ba479fd2
NN
11375 ;
11376 return 0;
11377}
11378_ACEOF
11379rm -f conftest.$ac_objext
a3bba767
JJ
11380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11381 (eval $ac_compile) 2>conftest.er1
ba479fd2 11382 ac_status=$?
86da66b5
HPN
11383 grep -v '^ *+' conftest.er1 >conftest.err
11384 rm -f conftest.er1
11385 cat conftest.err >&5
ba479fd2 11386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11387 (exit $ac_status); } &&
11388 { ac_try='test -z "$ac_c_werror_flag"
11389 || test ! -s conftest.err'
11390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11391 (eval $ac_try) 2>&5
11392 ac_status=$?
11393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11394 (exit $ac_status); }; } &&
11395 { ac_try='test -s conftest.$ac_objext'
11396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11397 (eval $ac_try) 2>&5
11398 ac_status=$?
11399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11400 (exit $ac_status); }; }; then
f31e826b 11401 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11402else
ba479fd2
NN
11403 echo "$as_me: failed program was:" >&5
11404sed 's/^/| /' conftest.$ac_ext >&5
11405
a3bba767 11406eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11407fi
a3bba767 11408rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11409fi
11410
f31e826b 11411if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a3bba767
JJ
11412 echo "$as_me:$LINENO: result: yes" >&5
11413echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11414#define $ac_tr_decl 1
ba479fd2
NN
11415_ACEOF
11416
81bf3d9e 11417else
a3bba767
JJ
11418 echo "$as_me:$LINENO: result: no" >&5
11419echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11420#define $ac_tr_decl 0
ba479fd2
NN
11421_ACEOF
11422
81bf3d9e
RH
11423fi
11424
11425done
ba479fd2 11426
ba479fd2 11427
ba479fd2 11428
81bf3d9e 11429
81bf3d9e
RH
11430
11431for ac_func in getrlimit setrlimit getrusage
11432do
ad6717df 11433 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a3bba767
JJ
11434echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11435echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11436if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
11437 echo $ECHO_N "(cached) $ECHO_C" >&6
11438else
11439 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11440/* confdefs.h. */
11441_ACEOF
11442cat confdefs.h >>conftest.$ac_ext
11443cat >>conftest.$ac_ext <<_ACEOF
11444/* end confdefs.h. */
7afe8c41
KG
11445#undef $ac_tr_decl
11446#define $ac_tr_decl 1
ba479fd2 11447
d02af173 11448#include "ansidecl.h"
86cf1cbd 11449#include "system.h"
81bf3d9e
RH
11450#ifdef HAVE_SYS_RESOURCE_H
11451#include <sys/resource.h>
11452#endif
11453
f31e826b 11454
ba479fd2
NN
11455int
11456main ()
11457{
86cf1cbd
KG
11458#ifndef $ac_func
11459char *(*pfn) = (char *(*)) $ac_func ;
11460#endif
ba479fd2
NN
11461 ;
11462 return 0;
11463}
11464_ACEOF
11465rm -f conftest.$ac_objext
a3bba767
JJ
11466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11467 (eval $ac_compile) 2>conftest.er1
ba479fd2 11468 ac_status=$?
86da66b5
HPN
11469 grep -v '^ *+' conftest.er1 >conftest.err
11470 rm -f conftest.er1
11471 cat conftest.err >&5
ba479fd2 11472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11473 (exit $ac_status); } &&
11474 { ac_try='test -z "$ac_c_werror_flag"
11475 || test ! -s conftest.err'
11476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11477 (eval $ac_try) 2>&5
11478 ac_status=$?
11479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11480 (exit $ac_status); }; } &&
11481 { ac_try='test -s conftest.$ac_objext'
11482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11483 (eval $ac_try) 2>&5
11484 ac_status=$?
11485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11486 (exit $ac_status); }; }; then
f31e826b 11487 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11488else
ba479fd2
NN
11489 echo "$as_me: failed program was:" >&5
11490sed 's/^/| /' conftest.$ac_ext >&5
11491
a3bba767 11492eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11493fi
a3bba767 11494rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11495fi
11496
f31e826b 11497if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a3bba767
JJ
11498 echo "$as_me:$LINENO: result: yes" >&5
11499echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11500#define $ac_tr_decl 1
ba479fd2
NN
11501_ACEOF
11502
81bf3d9e 11503else
a3bba767
JJ
11504 echo "$as_me:$LINENO: result: no" >&5
11505echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11506#define $ac_tr_decl 0
ba479fd2
NN
11507_ACEOF
11508
81bf3d9e
RH
11509fi
11510
11511done
86cf1cbd 11512
81bf3d9e 11513
ba479fd2 11514cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11515/* confdefs.h. */
11516_ACEOF
11517cat confdefs.h >>conftest.$ac_ext
11518cat >>conftest.$ac_ext <<_ACEOF
11519/* end confdefs.h. */
b2522d2b
HPN
11520
11521#include "ansidecl.h"
11522#include "system.h"
11523#ifdef HAVE_SYS_RESOURCE_H
11524#include <sys/resource.h>
11525#endif
11526
ba479fd2
NN
11527int
11528main ()
11529{
b2522d2b 11530rlim_t l = 0;
ba479fd2
NN
11531 ;
11532 return 0;
11533}
11534_ACEOF
11535rm -f conftest.$ac_objext
a3bba767
JJ
11536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11537 (eval $ac_compile) 2>conftest.er1
ba479fd2 11538 ac_status=$?
86da66b5
HPN
11539 grep -v '^ *+' conftest.er1 >conftest.err
11540 rm -f conftest.er1
11541 cat conftest.err >&5
ba479fd2 11542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11543 (exit $ac_status); } &&
11544 { ac_try='test -z "$ac_c_werror_flag"
11545 || test ! -s conftest.err'
11546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11547 (eval $ac_try) 2>&5
11548 ac_status=$?
11549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11550 (exit $ac_status); }; } &&
11551 { ac_try='test -s conftest.$ac_objext'
11552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11553 (eval $ac_try) 2>&5
11554 ac_status=$?
11555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11556 (exit $ac_status); }; }; then
b2522d2b
HPN
11557 :
11558else
ba479fd2
NN
11559 echo "$as_me: failed program was:" >&5
11560sed 's/^/| /' conftest.$ac_ext >&5
11561
11562
11563cat >>confdefs.h <<\_ACEOF
b2522d2b 11564#define rlim_t long
ba479fd2 11565_ACEOF
b2522d2b
HPN
11566
11567fi
a3bba767 11568rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 11569
2102b2fe
RS
11570# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11571# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11572# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11573# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 11574
351df804 11575for ac_func in ldgetname
c1800ec8 11576do
ad6717df 11577 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a3bba767
JJ
11578echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11579echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11580if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
11581 echo $ECHO_N "(cached) $ECHO_C" >&6
11582else
11583 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11584/* confdefs.h. */
11585_ACEOF
11586cat confdefs.h >>conftest.$ac_ext
11587cat >>conftest.$ac_ext <<_ACEOF
11588/* end confdefs.h. */
c1800ec8
ZW
11589#undef $ac_tr_decl
11590#define $ac_tr_decl 1
ba479fd2 11591
351df804
KG
11592#include "ansidecl.h"
11593#include "system.h"
11594#ifdef HAVE_LDFCN_H
2102b2fe
RS
11595#undef FREAD
11596#undef FWRITE
351df804
KG
11597#include <ldfcn.h>
11598#endif
11599
11600
ba479fd2
NN
11601int
11602main ()
11603{
351df804
KG
11604#ifndef $ac_func
11605char *(*pfn) = (char *(*)) $ac_func ;
11606#endif
ba479fd2
NN
11607 ;
11608 return 0;
11609}
11610_ACEOF
11611rm -f conftest.$ac_objext
a3bba767
JJ
11612if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11613 (eval $ac_compile) 2>conftest.er1
ba479fd2 11614 ac_status=$?
86da66b5
HPN
11615 grep -v '^ *+' conftest.er1 >conftest.err
11616 rm -f conftest.er1
11617 cat conftest.err >&5
ba479fd2 11618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11619 (exit $ac_status); } &&
11620 { ac_try='test -z "$ac_c_werror_flag"
11621 || test ! -s conftest.err'
11622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11623 (eval $ac_try) 2>&5
11624 ac_status=$?
11625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11626 (exit $ac_status); }; } &&
11627 { ac_try='test -s conftest.$ac_objext'
11628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11629 (eval $ac_try) 2>&5
11630 ac_status=$?
11631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11632 (exit $ac_status); }; }; then
351df804
KG
11633 eval "gcc_cv_have_decl_$ac_func=yes"
11634else
ba479fd2
NN
11635 echo "$as_me: failed program was:" >&5
11636sed 's/^/| /' conftest.$ac_ext >&5
11637
a3bba767 11638eval "gcc_cv_have_decl_$ac_func=no"
351df804 11639fi
a3bba767 11640rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
11641fi
11642
11643if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a3bba767
JJ
11644 echo "$as_me:$LINENO: result: yes" >&5
11645echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11646#define $ac_tr_decl 1
ba479fd2
NN
11647_ACEOF
11648
351df804 11649else
a3bba767
JJ
11650 echo "$as_me:$LINENO: result: no" >&5
11651echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11652#define $ac_tr_decl 0
ba479fd2
NN
11653_ACEOF
11654
351df804
KG
11655fi
11656
11657done
ba479fd2 11658
351df804
KG
11659
11660
11661for ac_func in times
11662do
ad6717df 11663 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a3bba767
JJ
11664echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11665echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11666if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
11667 echo $ECHO_N "(cached) $ECHO_C" >&6
11668else
11669 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11670/* confdefs.h. */
11671_ACEOF
11672cat confdefs.h >>conftest.$ac_ext
11673cat >>conftest.$ac_ext <<_ACEOF
11674/* end confdefs.h. */
351df804
KG
11675#undef $ac_tr_decl
11676#define $ac_tr_decl 1
ba479fd2 11677
c1800ec8
ZW
11678#include "ansidecl.h"
11679#include "system.h"
11680#ifdef HAVE_SYS_TIMES_H
11681#include <sys/times.h>
11682#endif
11683
11684
ba479fd2
NN
11685int
11686main ()
11687{
c1800ec8
ZW
11688#ifndef $ac_func
11689char *(*pfn) = (char *(*)) $ac_func ;
11690#endif
ba479fd2
NN
11691 ;
11692 return 0;
11693}
11694_ACEOF
11695rm -f conftest.$ac_objext
a3bba767
JJ
11696if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11697 (eval $ac_compile) 2>conftest.er1
ba479fd2 11698 ac_status=$?
86da66b5
HPN
11699 grep -v '^ *+' conftest.er1 >conftest.err
11700 rm -f conftest.er1
11701 cat conftest.err >&5
ba479fd2 11702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11703 (exit $ac_status); } &&
11704 { ac_try='test -z "$ac_c_werror_flag"
11705 || test ! -s conftest.err'
11706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11707 (eval $ac_try) 2>&5
11708 ac_status=$?
11709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11710 (exit $ac_status); }; } &&
11711 { ac_try='test -s conftest.$ac_objext'
11712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11713 (eval $ac_try) 2>&5
11714 ac_status=$?
11715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11716 (exit $ac_status); }; }; then
11717 eval "gcc_cv_have_decl_$ac_func=yes"
11718else
11719 echo "$as_me: failed program was:" >&5
11720sed 's/^/| /' conftest.$ac_ext >&5
703d89ab 11721
a3bba767
JJ
11722eval "gcc_cv_have_decl_$ac_func=no"
11723fi
11724rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
11725fi
11726
11727if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a3bba767
JJ
11728 echo "$as_me:$LINENO: result: yes" >&5
11729echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11730#define $ac_tr_decl 1
ba479fd2
NN
11731_ACEOF
11732
c1800ec8 11733else
a3bba767
JJ
11734 echo "$as_me:$LINENO: result: no" >&5
11735echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11736#define $ac_tr_decl 0
ba479fd2
NN
11737_ACEOF
11738
c1800ec8
ZW
11739fi
11740
11741done
c1800ec8
ZW
11742
11743
4f6d8cc8
GK
11744
11745for ac_func in sigaltstack
11746do
11747 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a3bba767
JJ
11748echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11749echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11750if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
4f6d8cc8
GK
11751 echo $ECHO_N "(cached) $ECHO_C" >&6
11752else
11753 cat >conftest.$ac_ext <<_ACEOF
11754/* confdefs.h. */
11755_ACEOF
11756cat confdefs.h >>conftest.$ac_ext
11757cat >>conftest.$ac_ext <<_ACEOF
11758/* end confdefs.h. */
11759#undef $ac_tr_decl
11760#define $ac_tr_decl 1
11761
11762#include "ansidecl.h"
11763#include "system.h"
11764#include <signal.h>
11765
11766
11767int
11768main ()
11769{
11770#ifndef $ac_func
11771char *(*pfn) = (char *(*)) $ac_func ;
11772#endif
11773 ;
11774 return 0;
11775}
11776_ACEOF
11777rm -f conftest.$ac_objext
a3bba767
JJ
11778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11779 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
11780 ac_status=$?
11781 grep -v '^ *+' conftest.er1 >conftest.err
11782 rm -f conftest.er1
11783 cat conftest.err >&5
11784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11785 (exit $ac_status); } &&
11786 { ac_try='test -z "$ac_c_werror_flag"
11787 || test ! -s conftest.err'
11788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11789 (eval $ac_try) 2>&5
11790 ac_status=$?
11791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11792 (exit $ac_status); }; } &&
11793 { ac_try='test -s conftest.$ac_objext'
11794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11795 (eval $ac_try) 2>&5
11796 ac_status=$?
11797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11798 (exit $ac_status); }; }; then
8b1f719a
PB
11799 eval "gcc_cv_have_decl_$ac_func=yes"
11800else
11801 echo "$as_me: failed program was:" >&5
11802sed 's/^/| /' conftest.$ac_ext >&5
4f6d8cc8 11803
a3bba767 11804eval "gcc_cv_have_decl_$ac_func=no"
4f6d8cc8 11805fi
a3bba767 11806rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8
GK
11807fi
11808
11809if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a3bba767
JJ
11810 echo "$as_me:$LINENO: result: yes" >&5
11811echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
11812#define $ac_tr_decl 1
11813_ACEOF
11814
11815else
a3bba767
JJ
11816 echo "$as_me:$LINENO: result: no" >&5
11817echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
11818#define $ac_tr_decl 0
11819_ACEOF
11820
11821fi
11822
11823done
11824
11825
c1800ec8 11826# More time-related stuff.
a3bba767
JJ
11827echo "$as_me:$LINENO: checking for struct tms" >&5
11828echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
ba479fd2
NN
11829if test "${ac_cv_struct_tms+set}" = set; then
11830 echo $ECHO_N "(cached) $ECHO_C" >&6
11831else
11832
11833cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11834/* confdefs.h. */
11835_ACEOF
11836cat confdefs.h >>conftest.$ac_ext
11837cat >>conftest.$ac_ext <<_ACEOF
11838/* end confdefs.h. */
c1800ec8
ZW
11839
11840#include "ansidecl.h"
11841#include "system.h"
11842#ifdef HAVE_SYS_TIMES_H
11843#include <sys/times.h>
11844#endif
11845
ba479fd2
NN
11846int
11847main ()
11848{
c1800ec8 11849struct tms tms;
ba479fd2
NN
11850 ;
11851 return 0;
11852}
11853_ACEOF
11854rm -f conftest.$ac_objext
a3bba767
JJ
11855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11856 (eval $ac_compile) 2>conftest.er1
ba479fd2 11857 ac_status=$?
86da66b5
HPN
11858 grep -v '^ *+' conftest.er1 >conftest.err
11859 rm -f conftest.er1
11860 cat conftest.err >&5
ba479fd2 11861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11862 (exit $ac_status); } &&
11863 { ac_try='test -z "$ac_c_werror_flag"
11864 || test ! -s conftest.err'
11865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11866 (eval $ac_try) 2>&5
11867 ac_status=$?
11868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11869 (exit $ac_status); }; } &&
11870 { ac_try='test -s conftest.$ac_objext'
11871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11872 (eval $ac_try) 2>&5
11873 ac_status=$?
11874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11875 (exit $ac_status); }; }; then
c1800ec8
ZW
11876 ac_cv_struct_tms=yes
11877else
ba479fd2
NN
11878 echo "$as_me: failed program was:" >&5
11879sed 's/^/| /' conftest.$ac_ext >&5
11880
a3bba767 11881ac_cv_struct_tms=no
c1800ec8 11882fi
a3bba767 11883rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11884fi
a3bba767
JJ
11885echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11886echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 11887if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
11888
11889cat >>confdefs.h <<\_ACEOF
c1800ec8 11890#define HAVE_STRUCT_TMS 1
ba479fd2 11891_ACEOF
c1800ec8
ZW
11892
11893fi
11894
11895# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11896# revisit after autoconf 2.50.
a3bba767
JJ
11897echo "$as_me:$LINENO: checking for clock_t" >&5
11898echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
ba479fd2
NN
11899if test "${gcc_cv_type_clock_t+set}" = set; then
11900 echo $ECHO_N "(cached) $ECHO_C" >&6
11901else
11902
11903cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11904/* confdefs.h. */
11905_ACEOF
11906cat confdefs.h >>conftest.$ac_ext
11907cat >>conftest.$ac_ext <<_ACEOF
11908/* end confdefs.h. */
c1800ec8
ZW
11909
11910#include "ansidecl.h"
11911#include "system.h"
11912
ba479fd2
NN
11913int
11914main ()
11915{
c1800ec8 11916clock_t x;
ba479fd2
NN
11917 ;
11918 return 0;
11919}
11920_ACEOF
11921rm -f conftest.$ac_objext
a3bba767
JJ
11922if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11923 (eval $ac_compile) 2>conftest.er1
ba479fd2 11924 ac_status=$?
86da66b5
HPN
11925 grep -v '^ *+' conftest.er1 >conftest.err
11926 rm -f conftest.er1
11927 cat conftest.err >&5
ba479fd2 11928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
11929 (exit $ac_status); } &&
11930 { ac_try='test -z "$ac_c_werror_flag"
11931 || test ! -s conftest.err'
11932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11933 (eval $ac_try) 2>&5
11934 ac_status=$?
11935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11936 (exit $ac_status); }; } &&
11937 { ac_try='test -s conftest.$ac_objext'
11938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11939 (eval $ac_try) 2>&5
11940 ac_status=$?
11941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11942 (exit $ac_status); }; }; then
c1800ec8
ZW
11943 gcc_cv_type_clock_t=yes
11944else
ba479fd2
NN
11945 echo "$as_me: failed program was:" >&5
11946sed 's/^/| /' conftest.$ac_ext >&5
11947
a3bba767 11948gcc_cv_type_clock_t=no
c1800ec8 11949fi
a3bba767 11950rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11951fi
a3bba767
JJ
11952echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
11953echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 11954if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
11955
11956cat >>confdefs.h <<\_ACEOF
c1800ec8 11957#define HAVE_CLOCK_T 1
ba479fd2 11958_ACEOF
c1800ec8
ZW
11959
11960fi
11961
eb70d86d
AS
11962# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
11963CFLAGS="$saved_CFLAGS"
11964
a3bba767 11965# Check whether --enable-initfini-array or --disable-initfini-array was given.
07cf4226 11966if test "${enable_initfini_array+set}" = set; then
a3bba767
JJ
11967 enableval="$enable_initfini_array"
11968
07cf4226 11969else
ba479fd2 11970
a3bba767
JJ
11971echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
11972echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
ba479fd2
NN
11973if test "${gcc_cv_initfini_array+set}" = set; then
11974 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 11975else
eb70d86d 11976 if test "$cross_compiling" = yes; then
918c4fe4 11977 gcc_cv_initfini_array=no
eb70d86d 11978else
ba479fd2 11979 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11980/* confdefs.h. */
11981_ACEOF
11982cat confdefs.h >>conftest.$ac_ext
11983cat >>conftest.$ac_ext <<_ACEOF
11984/* end confdefs.h. */
eb70d86d 11985
07cf4226
DM
11986static int x = -1;
11987int main (void) { return x; }
11988int foo (void) { x = 0; }
11989int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
11990_ACEOF
11991rm -f conftest$ac_exeext
a3bba767
JJ
11992if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11993 (eval $ac_link) 2>&5
ba479fd2
NN
11994 ac_status=$?
11995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11996 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a3bba767
JJ
11997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11998 (eval $ac_try) 2>&5
ba479fd2
NN
11999 ac_status=$?
12000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12001 (exit $ac_status); }; }; then
918c4fe4 12002 gcc_cv_initfini_array=yes
eb70d86d 12003else
ba479fd2
NN
12004 echo "$as_me: program exited with status $ac_status" >&5
12005echo "$as_me: failed program was:" >&5
12006sed 's/^/| /' conftest.$ac_ext >&5
12007
12008( exit $ac_status )
12009gcc_cv_initfini_array=no
eb70d86d 12010fi
a3bba767 12011rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 12012fi
07cf4226 12013fi
a3bba767
JJ
12014echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
12015echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 12016 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 12017
a3bba767 12018fi;
63cf211a 12019if test $enable_initfini_array = yes; then
ba479fd2
NN
12020
12021cat >>confdefs.h <<\_ACEOF
eb70d86d 12022#define HAVE_INITFINI_ARRAY 1
ba479fd2 12023_ACEOF
07cf4226 12024
eb70d86d 12025fi
81bf3d9e 12026
ba479fd2 12027# mkdir takes a single argument on some systems.
a3bba767
JJ
12028echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
12029echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
ba479fd2
NN
12030if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
12031 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 12032else
ba479fd2 12033 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12034/* confdefs.h. */
12035_ACEOF
12036cat confdefs.h >>conftest.$ac_ext
12037cat >>conftest.$ac_ext <<_ACEOF
12038/* end confdefs.h. */
75923b2f
MK
12039
12040#include <sys/types.h>
12041#ifdef HAVE_SYS_STAT_H
12042# include <sys/stat.h>
12043#endif
12044#ifdef HAVE_UNISTD_H
12045# include <unistd.h>
12046#endif
12047#ifdef HAVE_DIRECT_H
12048# include <direct.h>
12049#endif
ba479fd2
NN
12050int
12051main ()
12052{
75923b2f 12053mkdir ("foo", 0);
ba479fd2
NN
12054 ;
12055 return 0;
12056}
12057_ACEOF
12058rm -f conftest.$ac_objext
a3bba767
JJ
12059if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12060 (eval $ac_compile) 2>conftest.er1
ba479fd2 12061 ac_status=$?
86da66b5
HPN
12062 grep -v '^ *+' conftest.er1 >conftest.err
12063 rm -f conftest.er1
12064 cat conftest.err >&5
ba479fd2 12065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
12066 (exit $ac_status); } &&
12067 { ac_try='test -z "$ac_c_werror_flag"
12068 || test ! -s conftest.err'
12069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12070 (eval $ac_try) 2>&5
12071 ac_status=$?
12072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12073 (exit $ac_status); }; } &&
12074 { ac_try='test -s conftest.$ac_objext'
12075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12076 (eval $ac_try) 2>&5
12077 ac_status=$?
12078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12079 (exit $ac_status); }; }; then
75923b2f
MK
12080 gcc_cv_mkdir_takes_one_arg=no
12081else
ba479fd2
NN
12082 echo "$as_me: failed program was:" >&5
12083sed 's/^/| /' conftest.$ac_ext >&5
12084
a3bba767 12085gcc_cv_mkdir_takes_one_arg=yes
75923b2f 12086fi
a3bba767 12087rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 12088fi
a3bba767
JJ
12089echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
12090echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 12091if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
12092
12093cat >>confdefs.h <<\_ACEOF
75923b2f 12094#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 12095_ACEOF
75923b2f
MK
12096
12097fi
12098
12099
861bb6c1
JL
12100# File extensions
12101manext='.1'
12102objext='.o'
12103
12104
12105
4977bab6 12106# With Setjmp/Longjmp based exception handling.
a3bba767 12107# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
4977bab6 12108if test "${enable_sjlj_exceptions+set}" = set; then
a3bba767
JJ
12109 enableval="$enable_sjlj_exceptions"
12110 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 12111
ba479fd2
NN
12112cat >>confdefs.h <<_ACEOF
12113#define CONFIG_SJLJ_EXCEPTIONS $sjlj
12114_ACEOF
4977bab6 12115
a3bba767 12116fi;
4977bab6 12117
443728bb
L
12118# For platforms with the unwind ABI which includes an unwind library,
12119# libunwind, we can choose to use the system libunwind.
4977bab6 12120
a3bba767 12121# Check whether --with-system-libunwind or --without-system-libunwind was given.
443728bb 12122if test "${with_system_libunwind+set}" = set; then
a3bba767 12123 withval="$with_system_libunwind"
4977bab6 12124
a3bba767 12125fi;
4977bab6 12126
e64f5acf
SE
12127# config.gcc also contains tests of with_system_libunwind.
12128if test x$with_system_libunwind = xyes; then
12129
12130cat >>confdefs.h <<\_ACEOF
12131#define HAVE_GETIPINFO 1
12132_ACEOF
12133
12134fi
12135
34a86c2b
NN
12136# --------------------------------------------------------
12137# Build, host, and target specific configuration fragments
12138# --------------------------------------------------------
12139
5b28c537
NN
12140# Collect build-machine-specific information.
12141. ${srcdir}/config.build
12142
a89ea0df
NN
12143# Collect host-machine-specific information.
12144. ${srcdir}/config.host
12145
ef69da62 12146target_gtfiles=
a89ea0df
NN
12147
12148# Collect target-machine-specific information.
8ad9fb33 12149. ${srcdir}/config.gcc
861bb6c1
JL
12150
12151extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 12152extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
12153
12154# Default the target-machine variables that were not explicitly set.
75bffa71 12155if test x"$tm_file" = x
861bb6c1
JL
12156then tm_file=$cpu_type/$cpu_type.h; fi
12157
6b2adea9 12158if test x"$extra_headers" = x
861bb6c1
JL
12159then extra_headers=; fi
12160
75bffa71 12161if test x$md_file = x
e98e406f 12162then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 12163
75bffa71 12164if test x$out_file = x
861bb6c1
JL
12165then out_file=$cpu_type/$cpu_type.c; fi
12166
75bffa71 12167if test x"$tmake_file" = x
861bb6c1
JL
12168then tmake_file=$cpu_type/t-$cpu_type
12169fi
12170
90e6a802 12171if test x"$dwarf2" = xyes
756ee602 12172then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
12173fi
12174
861bb6c1 12175# Say what files are being used for the output code and MD file.
11642c3a 12176echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
12177echo "Using \`$srcdir/config/$md_file' as machine description file."
12178
11642c3a 12179# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
12180# about them and drop them.
12181
11642c3a
ZW
12182bx=
12183for x in $build_xm_file; do
12184 if test -f $srcdir/config/$x
12185 then bx="$bx $x"
ba479fd2
NN
12186 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12187echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12188 fi
12189done
12190build_xm_file="$bx"
12191
12192hx=
12193for x in $host_xm_file; do
12194 if test -f $srcdir/config/$x
12195 then hx="$hx $x"
ba479fd2
NN
12196 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12197echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12198 fi
12199done
12200host_xm_file="$hx"
12201
12202tx=
12203for x in $xm_file; do
12204 if test -f $srcdir/config/$x
12205 then tx="$tx $x"
ba479fd2
NN
12206 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12207echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12208 fi
12209done
12210xm_file="$tx"
12211
861bb6c1
JL
12212count=a
12213for f in $tm_file; do
12214 count=${count}x
12215done
75bffa71 12216if test $count = ax; then
861bb6c1
JL
12217 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
12218else
12219 echo "Using the following target machine macro files:"
12220 for f in $tm_file; do
12221 echo " $srcdir/config/$f"
12222 done
12223fi
12224
4977bab6 12225if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
12226
12227cat >>confdefs.h <<\_ACEOF
4977bab6 12228#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 12229_ACEOF
4977bab6
ZW
12230
12231fi
12232
99fa8911
AP
12233if test x$use_long_long_for_widest_fast_int = xyes; then
12234
12235cat >>confdefs.h <<\_ACEOF
12236#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12237_ACEOF
12238
12239fi
12240
861bb6c1
JL
12241count=a
12242for f in $host_xm_file; do
12243 count=${count}x
12244done
11642c3a
ZW
12245if test $count = a; then
12246 :
12247elif test $count = ax; then
861bb6c1
JL
12248 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12249else
12250 echo "Using the following host machine macro files:"
12251 for f in $host_xm_file; do
12252 echo " $srcdir/config/$f"
12253 done
12254fi
476d9098 12255echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 12256
75bffa71 12257if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
12258 count=a
12259 for f in $build_xm_file; do
12260 count=${count}x
12261 done
11642c3a
ZW
12262 if test $count = a; then
12263 :
12264 elif test $count = ax; then
861bb6c1
JL
12265 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12266 else
12267 echo "Using the following build machine macro files:"
12268 for f in $build_xm_file; do
12269 echo " $srcdir/config/$f"
12270 done
12271 fi
12272fi
12273
4f6d8cc8 12274case ${host} in
b8ec3cc8 12275 powerpc*-*-darwin*)
a3bba767
JJ
12276 echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
12277echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6
4f6d8cc8
GK
12278if test "${gcc_cv_mcontext_underscores+set}" = set; then
12279 echo $ECHO_N "(cached) $ECHO_C" >&6
12280else
12281 cat >conftest.$ac_ext <<_ACEOF
12282
ba7da42a 12283#include <sys/cdefs.h>
de4fb767 12284#include <sys/signal.h>
4f6d8cc8
GK
12285#include <ucontext.h>
12286int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
12287
12288_ACEOF
12289rm -f conftest.$ac_objext
a3bba767
JJ
12290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12291 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
12292 ac_status=$?
12293 grep -v '^ *+' conftest.er1 >conftest.err
12294 rm -f conftest.er1
12295 cat conftest.err >&5
12296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
12297 (exit $ac_status); } &&
12298 { ac_try='test -z "$ac_c_werror_flag"
12299 || test ! -s conftest.err'
12300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12301 (eval $ac_try) 2>&5
12302 ac_status=$?
12303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12304 (exit $ac_status); }; } &&
12305 { ac_try='test -s conftest.$ac_objext'
12306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12307 (eval $ac_try) 2>&5
12308 ac_status=$?
12309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12310 (exit $ac_status); }; }; then
4f6d8cc8
GK
12311 gcc_cv_mcontext_underscores=no
12312else
12313 echo "$as_me: failed program was:" >&5
12314sed 's/^/| /' conftest.$ac_ext >&5
12315
a3bba767 12316gcc_cv_mcontext_underscores=yes
4f6d8cc8 12317fi
a3bba767 12318rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8 12319fi
a3bba767
JJ
12320echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
12321echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6
4f6d8cc8
GK
12322 if test $gcc_cv_mcontext_underscores = yes; then
12323
12324cat >>confdefs.h <<\_ACEOF
12325#define HAS_MCONTEXT_T_UNDERSCORES
12326_ACEOF
12327
12328 fi
12329 ;;
12330esac
12331
8bb915b6
NN
12332# ---------
12333# Threading
12334# ---------
12335
c2e494a8 12336# Check if a valid thread package
615be2cf 12337case ${enable_threads} in
c2e494a8
NN
12338 "" | no)
12339 # No threads
12340 target_thread_file='single'
12341 ;;
12342 yes)
12343 # default
12344 target_thread_file='single'
12345 ;;
18167442 12346 aix | dce | gnat | irix | posix | posix95 | rtems | \
769e49eb 12347 single | solaris | vxworks | win32 )
615be2cf 12348 target_thread_file=${enable_threads}
c2e494a8
NN
12349 ;;
12350 *)
615be2cf 12351 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
12352 exit 1
12353 ;;
12354esac
12355
12356if test x${thread_file} = x; then
12357 # No thread file set by target-specific clauses in config.gcc,
12358 # so use file chosen by default logic above
12359 thread_file=${target_thread_file}
861bb6c1
JL
12360fi
12361
8bb915b6
NN
12362# Make gthr-default.h if we have a thread file.
12363gthread_flags=
12364if test $thread_file != single; then
12365 rm -f gthr-default.h
12366 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12367 gthread_flags=-DHAVE_GTHR_DEFAULT
12368fi
12369
12370
12371# --------
12372# UNSORTED
12373# --------
12374
18fbf599 12375use_cxa_atexit=no
2121a768
JT
12376if test x$enable___cxa_atexit = xyes || \
12377 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599 12378 if test x$host = x$target; then
97388150
DS
12379 case $host in
12380 # mingw32 doesn't have __cxa_atexit but uses atexit registration
12381 # keyed to flag_use_cxa_atexit
12382 *-*-mingw32*)
12383 use_cxa_atexit=yes
12384 ;;
12385 *)
a3bba767
JJ
12386 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
12387echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
354b7da5
DH
12388if test "${ac_cv_func___cxa_atexit+set}" = set; then
12389 echo $ECHO_N "(cached) $ECHO_C" >&6
12390else
12391 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
12392/* confdefs.h. */
12393_ACEOF
12394cat confdefs.h >>conftest.$ac_ext
12395cat >>conftest.$ac_ext <<_ACEOF
12396/* end confdefs.h. */
86da66b5
HPN
12397/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12398 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12399#define __cxa_atexit innocuous___cxa_atexit
12400
354b7da5
DH
12401/* System header to define __stub macros and hopefully few prototypes,
12402 which can conflict with char __cxa_atexit (); below.
12403 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12404 <limits.h> exists even on freestanding compilers. */
86da66b5 12405
354b7da5
DH
12406#ifdef __STDC__
12407# include <limits.h>
12408#else
12409# include <assert.h>
12410#endif
86da66b5
HPN
12411
12412#undef __cxa_atexit
12413
a3bba767 12414/* Override any gcc2 internal prototype to avoid an error. */
354b7da5
DH
12415#ifdef __cplusplus
12416extern "C"
a3bba767 12417{
354b7da5 12418#endif
a3bba767
JJ
12419/* We use char because int might match the return type of a gcc2
12420 builtin and then its argument prototype would still apply. */
354b7da5
DH
12421char __cxa_atexit ();
12422/* The GNU C library defines this for functions which it implements
12423 to always fail with ENOSYS. Some functions are actually named
12424 something starting with __ and the normal name is an alias. */
a3bba767 12425#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
354b7da5 12426choke me
a3bba767
JJ
12427#else
12428char (*f) () = __cxa_atexit;
12429#endif
12430#ifdef __cplusplus
12431}
354b7da5
DH
12432#endif
12433
12434int
12435main ()
12436{
a3bba767 12437return f != __cxa_atexit;
354b7da5
DH
12438 ;
12439 return 0;
12440}
12441_ACEOF
12442rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
12443if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12444 (eval $ac_link) 2>conftest.er1
354b7da5 12445 ac_status=$?
86da66b5
HPN
12446 grep -v '^ *+' conftest.er1 >conftest.err
12447 rm -f conftest.er1
12448 cat conftest.err >&5
354b7da5 12449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
12450 (exit $ac_status); } &&
12451 { ac_try='test -z "$ac_c_werror_flag"
12452 || test ! -s conftest.err'
12453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12454 (eval $ac_try) 2>&5
12455 ac_status=$?
12456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12457 (exit $ac_status); }; } &&
12458 { ac_try='test -s conftest$ac_exeext'
12459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12460 (eval $ac_try) 2>&5
12461 ac_status=$?
12462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12463 (exit $ac_status); }; }; then
354b7da5
DH
12464 ac_cv_func___cxa_atexit=yes
12465else
12466 echo "$as_me: failed program was:" >&5
12467sed 's/^/| /' conftest.$ac_ext >&5
12468
a3bba767 12469ac_cv_func___cxa_atexit=no
354b7da5 12470fi
a3bba767 12471rm -f conftest.err conftest.$ac_objext \
86da66b5 12472 conftest$ac_exeext conftest.$ac_ext
354b7da5 12473fi
a3bba767
JJ
12474echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12475echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
354b7da5 12476if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
12477 use_cxa_atexit=yes
12478else
12479 echo "__cxa_atexit can't be enabled on this target"
12480fi
12481
5f60e48f 12482 ;;
97388150 12483 esac
18fbf599
PB
12484 else
12485 # We can't check for __cxa_atexit when building a cross, so assume
12486 # it is available
12487 use_cxa_atexit=yes
12488 fi
12489 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
12490
12491cat >>confdefs.h <<\_ACEOF
c7b5e395 12492#define DEFAULT_USE_CXA_ATEXIT 2
ba479fd2 12493_ACEOF
2121a768 12494
18fbf599 12495 fi
2121a768
JT
12496fi
12497
e64f5acf
SE
12498use_getipinfo=yes
12499if test x$with_system_libunwind = xyes; then
12500 if test x$host = x$target; then
a3bba767
JJ
12501 echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5
12502echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6
e64f5acf
SE
12503if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
12504 echo $ECHO_N "(cached) $ECHO_C" >&6
12505else
12506 ac_func_search_save_LIBS=$LIBS
a3bba767 12507ac_cv_search__Unwind_GetIPInfo=no
e64f5acf
SE
12508cat >conftest.$ac_ext <<_ACEOF
12509/* confdefs.h. */
12510_ACEOF
12511cat confdefs.h >>conftest.$ac_ext
12512cat >>conftest.$ac_ext <<_ACEOF
12513/* end confdefs.h. */
12514
a3bba767 12515/* Override any gcc2 internal prototype to avoid an error. */
e64f5acf
SE
12516#ifdef __cplusplus
12517extern "C"
12518#endif
a3bba767
JJ
12519/* We use char because int might match the return type of a gcc2
12520 builtin and then its argument prototype would still apply. */
e64f5acf
SE
12521char _Unwind_GetIPInfo ();
12522int
12523main ()
12524{
a3bba767 12525_Unwind_GetIPInfo ();
e64f5acf
SE
12526 ;
12527 return 0;
12528}
12529_ACEOF
a3bba767
JJ
12530rm -f conftest.$ac_objext conftest$ac_exeext
12531if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12532 (eval $ac_link) 2>conftest.er1
e64f5acf
SE
12533 ac_status=$?
12534 grep -v '^ *+' conftest.er1 >conftest.err
12535 rm -f conftest.er1
12536 cat conftest.err >&5
12537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
12538 (exit $ac_status); } &&
12539 { ac_try='test -z "$ac_c_werror_flag"
12540 || test ! -s conftest.err'
12541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12542 (eval $ac_try) 2>&5
12543 ac_status=$?
12544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12545 (exit $ac_status); }; } &&
12546 { ac_try='test -s conftest$ac_exeext'
12547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12548 (eval $ac_try) 2>&5
12549 ac_status=$?
12550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12551 (exit $ac_status); }; }; then
12552 ac_cv_search__Unwind_GetIPInfo="none required"
e64f5acf
SE
12553else
12554 echo "$as_me: failed program was:" >&5
12555sed 's/^/| /' conftest.$ac_ext >&5
12556
703d89ab 12557fi
a3bba767
JJ
12558rm -f conftest.err conftest.$ac_objext \
12559 conftest$ac_exeext conftest.$ac_ext
12560if test "$ac_cv_search__Unwind_GetIPInfo" = no; then
12561 for ac_lib in unwind; do
12562 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12563 cat >conftest.$ac_ext <<_ACEOF
12564/* confdefs.h. */
12565_ACEOF
12566cat confdefs.h >>conftest.$ac_ext
12567cat >>conftest.$ac_ext <<_ACEOF
12568/* end confdefs.h. */
8b1f719a 12569
a3bba767
JJ
12570/* Override any gcc2 internal prototype to avoid an error. */
12571#ifdef __cplusplus
12572extern "C"
12573#endif
12574/* We use char because int might match the return type of a gcc2
12575 builtin and then its argument prototype would still apply. */
12576char _Unwind_GetIPInfo ();
12577int
12578main ()
12579{
12580_Unwind_GetIPInfo ();
12581 ;
12582 return 0;
12583}
12584_ACEOF
12585rm -f conftest.$ac_objext conftest$ac_exeext
12586if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12587 (eval $ac_link) 2>conftest.er1
12588 ac_status=$?
12589 grep -v '^ *+' conftest.er1 >conftest.err
12590 rm -f conftest.er1
12591 cat conftest.err >&5
12592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12593 (exit $ac_status); } &&
12594 { ac_try='test -z "$ac_c_werror_flag"
12595 || test ! -s conftest.err'
12596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12597 (eval $ac_try) 2>&5
12598 ac_status=$?
12599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12600 (exit $ac_status); }; } &&
12601 { ac_try='test -s conftest$ac_exeext'
12602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12603 (eval $ac_try) 2>&5
12604 ac_status=$?
12605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12606 (exit $ac_status); }; }; then
12607 ac_cv_search__Unwind_GetIPInfo="-l$ac_lib"
12608break
703d89ab 12609else
a3bba767
JJ
12610 echo "$as_me: failed program was:" >&5
12611sed 's/^/| /' conftest.$ac_ext >&5
12612
12613fi
12614rm -f conftest.err conftest.$ac_objext \
12615 conftest$ac_exeext conftest.$ac_ext
12616 done
a6ccdbab 12617fi
a6ccdbab
EC
12618LIBS=$ac_func_search_save_LIBS
12619fi
a3bba767
JJ
12620echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5
12621echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6
12622if test "$ac_cv_search__Unwind_GetIPInfo" != no; then
12623 test "$ac_cv_search__Unwind_GetIPInfo" = "none required" || LIBS="$ac_cv_search__Unwind_GetIPInfo $LIBS"
a6ccdbab
EC
12624
12625else
12626 use_getipinfo=no
12627fi
12628
12629 fi
12630fi
12631
12632if test x$use_getipinfo = xyes; then
12633
12634cat >>confdefs.h <<\_ACEOF
12635#define HAVE_GETIPINFO 1
e64f5acf
SE
12636_ACEOF
12637
12638else
12639 echo "The system unwind library does not support _Unwind_GetIPInfo."
12640fi
12641
a5381466 12642# Look for a file containing extra machine modes.
1c0ca89d
ZW
12643if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12644 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
12645
12646
12647cat >>confdefs.h <<_ACEOF
e22340b0 12648#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 12649_ACEOF
a5381466
ZW
12650
12651fi
12652
75685792
RS
12653# Convert extra_options into a form suitable for Makefile use.
12654extra_opt_files=
12655for f in $extra_options; do
12656 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12657done
12658
12659
b7cb92ad 12660# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 12661# the first file included by config.h.
4977bab6 12662# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 12663# as well. If host!=build, we are in error and need to do more
db81d74a 12664# work to find out the build config parameters.
75bffa71 12665if test x$host = x$build
db81d74a 12666then
eaf4e618 12667 build_auto=auto-host.h
b7cb92ad
JL
12668else
12669 # We create a subdir, then run autoconf in the subdir.
12670 # To prevent recursion we set host and build for the new
12671 # invocation of configure to the build for this invocation
ba479fd2 12672 # of configure.
b7cb92ad
JL
12673 tempdir=build.$$
12674 rm -rf $tempdir
12675 mkdir $tempdir
12676 cd $tempdir
12677 case ${srcdir} in
255b8a49 12678 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
12679 *) realsrcdir=../${srcdir};;
12680 esac
d920e825
L
12681 saved_CFLAGS="${CFLAGS}"
12682 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12683 ${realsrcdir}/configure \
33e70558 12684 --enable-languages=${enable_languages-all} \
534d0cc0 12685 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 12686 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
12687
12688 # We just finished tests for the build machine, so rename
12689 # the file auto-build.h in the gcc directory.
12690 mv auto-host.h ../auto-build.h
12691 cd ..
12692 rm -rf $tempdir
eaf4e618 12693 build_auto=auto-build.h
db81d74a
RH
12694fi
12695
06f0b04c 12696
eaf4e618 12697tm_file="${tm_file} defaults.h"
4977bab6
ZW
12698tm_p_file="${tm_p_file} tm-preds.h"
12699host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12700build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 12701# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 12702# put this back in temporarily.
232b67d9 12703xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 12704
34a86c2b
NN
12705# --------
12706# UNSORTED
12707# --------
12708
cc1e60ea 12709# Compile in configure arguments.
8105825d 12710if test -f configargs.h ; then
cc1e60ea 12711 # Being re-configured.
022dae81 12712 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
12713 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12714else
12715 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12716fi
eeae7b41
DJ
12717
12718# Double all backslashes and backslash all quotes to turn
12719# gcc_config_arguments into a C string.
12720sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12721$gcc_config_arguments
12722EOF
12723gcc_config_arguments_str=`cat conftest.out`
12724rm -f conftest.out
12725
cc1e60ea
JM
12726cat > configargs.h <<EOF
12727/* Generated automatically. */
eeae7b41 12728static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 12729static const char thread_model[] = "$thread_file";
7816bea0
DJ
12730
12731static const struct {
12732 const char *name, *value;
12733} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
12734EOF
12735
ab87f8c8 12736# Internationalization
18fc9bd4
RG
12737# If we haven't got the data from the intl directory,
12738# assume NLS is disabled.
12739USE_NLS=no
12740LIBINTL=
12741LIBINTL_DEP=
12742INCINTL=
12743XGETTEXT=
12744GMSGFMT=
12745POSUB=
12746
12747if test -f ../intl/config.intl; then
12748 . ../intl/config.intl
12749fi
a3bba767
JJ
12750echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12751echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
18fc9bd4 12752if test x"$USE_NLS" != xyes; then
a3bba767
JJ
12753 echo "$as_me:$LINENO: result: no" >&5
12754echo "${ECHO_T}no" >&6
18fc9bd4 12755else
a3bba767
JJ
12756 echo "$as_me:$LINENO: result: yes" >&5
12757echo "${ECHO_T}yes" >&6
18fc9bd4
RG
12758
12759cat >>confdefs.h <<\_ACEOF
12760#define ENABLE_NLS 1
12761_ACEOF
12762
12763
a3bba767
JJ
12764 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12765echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
18fc9bd4
RG
12766 # Look for .po and .gmo files in the source directory.
12767 CATALOGS=
12768 XLINGUAS=
12769 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12770 # If there aren't any .gmo files the shell will give us the
12771 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12772 # weeded out.
12773 case "$cat" in *\**)
12774 continue;;
12775 esac
12776 # The quadruple backslash is collapsed to a double backslash
12777 # by the backticks, then collapsed again by the double quotes,
12778 # leaving us with one backslash in the sed expression (right
12779 # before the dot that mustn't act as a wildcard).
12780 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
12781 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
12782 # The user is allowed to set LINGUAS to a list of languages to
12783 # install catalogs for. If it's empty that means "all of them."
12784 if test "x$LINGUAS" = x; then
12785 CATALOGS="$CATALOGS $cat"
12786 XLINGUAS="$XLINGUAS $lang"
12787 else
12788 case "$LINGUAS" in *$lang*)
12789 CATALOGS="$CATALOGS $cat"
12790 XLINGUAS="$XLINGUAS $lang"
12791 ;;
12792 esac
12793 fi
12794 done
12795 LINGUAS="$XLINGUAS"
a3bba767
JJ
12796 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12797echo "${ECHO_T}$LINGUAS" >&6
18fc9bd4
RG
12798
12799
12800 DATADIRNAME=share
12801
12802 INSTOBJEXT=.mo
12803
12804 GENCAT=gencat
12805
12806 CATOBJEXT=.gmo
12807
12808fi
861bb6c1 12809
56694dd9
ZW
12810# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12811# -liconv on the link line twice.
12812case "$LIBINTL" in *$LIBICONV*)
12813 LIBICONV= ;;
12814esac
dc6746e7 12815
a3bba767 12816# Check whether --enable-secureplt or --disable-secureplt was given.
7f970b70 12817if test "${enable_secureplt+set}" = set; then
a3bba767 12818 enableval="$enable_secureplt"
7f970b70 12819
a3bba767 12820fi;
7f970b70 12821
56694dd9 12822# Windows32 Registry support for specifying GCC installation paths.
a3bba767 12823# Check whether --enable-win32-registry or --disable-win32-registry was given.
56694dd9 12824if test "${enable_win32_registry+set}" = set; then
a3bba767 12825 enableval="$enable_win32_registry"
dc6746e7 12826
a3bba767 12827fi;
ba479fd2 12828
a1286ef5
ZW
12829case $host_os in
12830 win32 | pe | cygwin* | mingw32* | uwin*)
12831 if test "x$enable_win32_registry" != xno; then
a3bba767
JJ
12832 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
12833echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
ba479fd2
NN
12834if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12835 echo $ECHO_N "(cached) $ECHO_C" >&6
12836else
12837 ac_func_search_save_LIBS=$LIBS
a3bba767 12838ac_cv_search_RegOpenKeyExA=no
ba479fd2 12839cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12840/* confdefs.h. */
12841_ACEOF
12842cat confdefs.h >>conftest.$ac_ext
12843cat >>conftest.$ac_ext <<_ACEOF
12844/* end confdefs.h. */
861bb6c1 12845
a3bba767 12846/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12847#ifdef __cplusplus
12848extern "C"
12849#endif
a3bba767
JJ
12850/* We use char because int might match the return type of a gcc2
12851 builtin and then its argument prototype would still apply. */
ba479fd2
NN
12852char RegOpenKeyExA ();
12853int
12854main ()
12855{
a3bba767 12856RegOpenKeyExA ();
ba479fd2
NN
12857 ;
12858 return 0;
12859}
12860_ACEOF
a3bba767
JJ
12861rm -f conftest.$ac_objext conftest$ac_exeext
12862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12863 (eval $ac_link) 2>conftest.er1
ba479fd2 12864 ac_status=$?
86da66b5
HPN
12865 grep -v '^ *+' conftest.er1 >conftest.err
12866 rm -f conftest.er1
12867 cat conftest.err >&5
ba479fd2 12868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
12869 (exit $ac_status); } &&
12870 { ac_try='test -z "$ac_c_werror_flag"
12871 || test ! -s conftest.err'
12872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12873 (eval $ac_try) 2>&5
12874 ac_status=$?
12875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12876 (exit $ac_status); }; } &&
12877 { ac_try='test -s conftest$ac_exeext'
12878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12879 (eval $ac_try) 2>&5
12880 ac_status=$?
12881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12882 (exit $ac_status); }; }; then
12883 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 12884else
ba479fd2
NN
12885 echo "$as_me: failed program was:" >&5
12886sed 's/^/| /' conftest.$ac_ext >&5
12887
703d89ab 12888fi
a3bba767
JJ
12889rm -f conftest.err conftest.$ac_objext \
12890 conftest$ac_exeext conftest.$ac_ext
12891if test "$ac_cv_search_RegOpenKeyExA" = no; then
12892 for ac_lib in advapi32; do
12893 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12894 cat >conftest.$ac_ext <<_ACEOF
12895/* confdefs.h. */
12896_ACEOF
12897cat confdefs.h >>conftest.$ac_ext
12898cat >>conftest.$ac_ext <<_ACEOF
12899/* end confdefs.h. */
8b1f719a 12900
a3bba767
JJ
12901/* Override any gcc2 internal prototype to avoid an error. */
12902#ifdef __cplusplus
12903extern "C"
12904#endif
12905/* We use char because int might match the return type of a gcc2
12906 builtin and then its argument prototype would still apply. */
12907char RegOpenKeyExA ();
12908int
12909main ()
12910{
12911RegOpenKeyExA ();
12912 ;
12913 return 0;
12914}
12915_ACEOF
12916rm -f conftest.$ac_objext conftest$ac_exeext
12917if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12918 (eval $ac_link) 2>conftest.er1
12919 ac_status=$?
12920 grep -v '^ *+' conftest.er1 >conftest.err
12921 rm -f conftest.er1
12922 cat conftest.err >&5
12923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12924 (exit $ac_status); } &&
12925 { ac_try='test -z "$ac_c_werror_flag"
12926 || test ! -s conftest.err'
12927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12928 (eval $ac_try) 2>&5
12929 ac_status=$?
12930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12931 (exit $ac_status); }; } &&
12932 { ac_try='test -s conftest$ac_exeext'
12933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12934 (eval $ac_try) 2>&5
12935 ac_status=$?
12936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12937 (exit $ac_status); }; }; then
12938 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
12939break
703d89ab 12940else
a3bba767
JJ
12941 echo "$as_me: failed program was:" >&5
12942sed 's/^/| /' conftest.$ac_ext >&5
12943
12944fi
12945rm -f conftest.err conftest.$ac_objext \
12946 conftest$ac_exeext conftest.$ac_ext
12947 done
dd7f7a6e
EC
12948fi
12949LIBS=$ac_func_search_save_LIBS
12950fi
a3bba767
JJ
12951echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
12952echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
12953if test "$ac_cv_search_RegOpenKeyExA" != no; then
12954 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
dd7f7a6e
EC
12955
12956else
12957 enable_win32_registry=no
12958fi
12959
12960 fi
12961
12962 if test "x$enable_win32_registry" != xno; then
12963
12964cat >>confdefs.h <<\_ACEOF
12965#define ENABLE_WIN32_REGISTRY 1
12966_ACEOF
12967
12968
12969 if test "x$enable_win32_registry" != xyes \
12970 && test "x$enable_win32_registry" != x; then
12971
12972cat >>confdefs.h <<_ACEOF
12973#define WIN32_REGISTRY_KEY "$enable_win32_registry"
12974_ACEOF
12975
12976 fi
12977 fi
12978 ;;
12979esac
ab87f8c8 12980
56694dd9
ZW
12981# Get an absolute path to the GCC top-level source directory
12982holddir=`${PWDCMD-pwd}`
12983cd $srcdir
12984topdir=`${PWDCMD-pwd}`
12985cd $holddir
ab87f8c8 12986
56694dd9 12987# Conditionalize the makefile for this host machine.
2ed26f6b 12988xmake_file=
c406e779 12989for f in ${host_xmake_file}
56694dd9
ZW
12990do
12991 if test -f ${srcdir}/config/$f
12992 then
2ed26f6b 12993 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
12994 fi
12995done
093e61a6 12996
56694dd9 12997# Conditionalize the makefile for this target machine.
2ed26f6b 12998tmake_file_=
c406e779 12999for f in ${tmake_file}
56694dd9
ZW
13000do
13001 if test -f ${srcdir}/config/$f
13002 then
2ed26f6b 13003 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
13004 fi
13005done
2ed26f6b 13006tmake_file="${tmake_file_}"
71a94577 13007
5395b47b
NN
13008# This is a terrible hack which will go away some day.
13009host_cc_for_libada=${CC}
1e3fad21
NN
13010
13011
ab87f8c8
JL
13012out_object_file=`basename $out_file .c`.o
13013
75685792
RS
13014tm_file_list="options.h"
13015tm_include_list="options.h"
ab87f8c8 13016for f in $tm_file; do
64ccbc99 13017 case $f in
3ca43df7
RS
13018 ./* )
13019 f=`echo $f | sed 's/^..//'`
13020 tm_file_list="${tm_file_list} $f"
13021 tm_include_list="${tm_include_list} $f"
13022 ;;
d02af173 13023 defaults.h )
e22340b0
ZW
13024 tm_file_list="${tm_file_list} \$(srcdir)/$f"
13025 tm_include_list="${tm_include_list} $f"
13026 ;;
13027 * )
13028 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
13029 tm_include_list="${tm_include_list} config/$f"
13030 ;;
64ccbc99 13031 esac
ab87f8c8
JL
13032done
13033
11642c3a 13034tm_p_file_list=
e22340b0 13035tm_p_include_list=
11642c3a 13036for f in $tm_p_file; do
4977bab6
ZW
13037 case $f in
13038 tm-preds.h )
e22340b0
ZW
13039 tm_p_file_list="${tm_p_file_list} $f"
13040 tm_p_include_list="${tm_p_include_list} $f"
13041 ;;
13042 * )
13043 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
13044 tm_p_include_list="${tm_p_include_list} config/$f"
13045 esac
13046done
13047
13048xm_file_list=
13049xm_include_list=
13050for f in $xm_file; do
13051 case $f in
13052 ansidecl.h )
13053 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
13054 xm_include_list="${xm_include_list} $f"
13055 ;;
13056 auto-host.h )
13057 xm_file_list="${xm_file_list} $f"
13058 xm_include_list="${xm_include_list} $f"
13059 ;;
13060 * )
13061 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
13062 xm_include_list="${xm_include_list} config/$f"
13063 ;;
4977bab6 13064 esac
11642c3a
ZW
13065done
13066
ab87f8c8 13067host_xm_file_list=
e22340b0 13068host_xm_include_list=
ab87f8c8 13069for f in $host_xm_file; do
64ccbc99 13070 case $f in
d02af173 13071 ansidecl.h )
e22340b0
ZW
13072 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
13073 host_xm_include_list="${host_xm_include_list} $f"
13074 ;;
e2500fed 13075 auto-host.h )
e22340b0
ZW
13076 host_xm_file_list="${host_xm_file_list} $f"
13077 host_xm_include_list="${host_xm_include_list} $f"
13078 ;;
13079 * )
13080 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
13081 host_xm_include_list="${host_xm_include_list} config/$f"
13082 ;;
64ccbc99 13083 esac
ab87f8c8
JL
13084done
13085
13086build_xm_file_list=
13087for f in $build_xm_file; do
64ccbc99 13088 case $f in
d02af173 13089 ansidecl.h )
e22340b0
ZW
13090 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
13091 build_xm_include_list="${build_xm_include_list} $f"
13092 ;;
e2500fed 13093 auto-build.h | auto-host.h )
e22340b0
ZW
13094 build_xm_file_list="${build_xm_file_list} $f"
13095 build_xm_include_list="${build_xm_include_list} $f"
13096 ;;
13097 * )
13098 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
13099 build_xm_include_list="${build_xm_include_list} config/$f"
13100 ;;
64ccbc99 13101 esac
ab87f8c8
JL
13102done
13103
2989d30c
GK
13104# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
13105# cross-compiler which does not use the native headers and libraries.
a078a589 13106# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
13107CROSS=
13108ALL=all.internal
13109SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
13110
13111if test "x$with_build_sysroot" != x; then
14da6073 13112 build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
13113else
13114 # This value is used, even on a native system, because
13115 # CROSS_SYSTEM_HEADER_DIR is just
13116 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
13117 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
13118fi
13119
ab87f8c8
JL
13120if test x$host != x$target
13121then
2989d30c 13122 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
a078a589 13123 ALL=all.cross
160633c6 13124 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 13125 case "$host","$target" in
3a7e8b87
GK
13126 # Darwin crosses can use the host system's libraries and headers,
13127 # because of the fat library support. Of course, it must be the
13128 # same version of Darwin on both sides. Allow the user to
13129 # just say --target=foo-darwin without a version number to mean
13130 # "the version on this system".
13131 *-*-darwin*,*-*-darwin*)
13132 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
13133 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
13134 if test $hostos = $targetos -o $targetos = darwin ; then
13135 CROSS=
13136 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
13137 with_headers=yes
13138 fi
13139 ;;
13140
343f59d9
AM
13141 i?86-*-*,x86_64-*-* \
13142 | powerpc*-*-*,powerpc64*-*-*)
13143 CROSS="$CROSS -DNATIVE_CROSS" ;;
13144 esac
7a615b25 13145elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 13146 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
13147fi
13148
b39d221a
EC
13149# If this is a cross-compiler that does not
13150# have its own set of headers then define
13151# inhibit_libc
13152
dc06db20
R
13153# If this is using newlib, without having the headers available now,
13154# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
13155# This prevents libgcc2 from containing any code which requires libc
13156# support.
160633c6 13157inhibit_libc=false
dc06db20
R
13158if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
13159 test x$with_newlib = xyes ; } &&
e50084fa 13160 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 13161 inhibit_libc=true
b39d221a
EC
13162fi
13163
13164
a078a589
ZW
13165# When building gcc with a cross-compiler, we need to adjust things so
13166# that the generator programs are still built with the native compiler.
13167# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
13168
13169# These are the normal (build=host) settings:
ba479fd2
NN
13170CC_FOR_BUILD='$(CC)'
13171BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 13172STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
13173
13174# Possibly disable fixproto, on a per-target basis.
13175case ${use_fixproto} in
13176 no)
13177 STMP_FIXPROTO=
13178 ;;
13179 yes)
13180 STMP_FIXPROTO=stmp-fixproto
13181 ;;
13182esac
13183
a078a589 13184
83599948
NS
13185# And these apply if build != host, or we are generating coverage data
13186if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 13187then
b11e4747 13188 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 13189
7a615b25 13190 if test "x$TARGET_SYSTEM_ROOT" = x; then
d8e5117d 13191 if test "x$STMP_FIXPROTO" != x; then
de253ca4
GK
13192 STMP_FIXPROTO=stmp-install-fixproto
13193 fi
7a615b25 13194 fi
ab87f8c8
JL
13195fi
13196
13197# Expand extra_headers to include complete path.
13198# This substitutes for lots of t-* files.
13199extra_headers_list=
b1ef58c8
NN
13200# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
13201for file in ${extra_headers} ; do
13202 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
13203done
ab87f8c8 13204
c38f02df
ILT
13205# Define collect2 in Makefile.
13206case $host_can_use_collect2 in
13207 no) collect2= ;;
13208 *) collect2='collect2$(exeext)' ;;
13209esac
13210
13211
ab87f8c8 13212# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
13213case $use_collect2 in
13214 no) use_collect2= ;;
13215 "") ;;
ba479fd2 13216 *)
34a86c2b
NN
13217 host_xm_defines="${host_xm_defines} USE_COLLECT2"
13218 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
13219 case $host_can_use_collect2 in
13220 no)
13221 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
13222echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
13223 { (exit 1); exit 1; }; }
13224 ;;
13225 esac
34a86c2b
NN
13226 ;;
13227esac
ab87f8c8 13228
8bb915b6
NN
13229# ---------------------------
13230# Assembler & linker features
13231# ---------------------------
13232
d869a8c4
NN
13233# Identify the assembler which will work hand-in-glove with the newly
13234# built GCC, so that we can examine its features. This is the assembler
13235# which will be driven by the driver program.
13236#
13237# If build != host, and we aren't building gas in-tree, we identify a
13238# build->target assembler and hope that it will have the same features
13239# as the host->target assembler we'll be using.
981d4858
JM
13240gcc_cv_gas_major_version=
13241gcc_cv_gas_minor_version=
ab87f8c8 13242gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
e8b05380
PB
13243
13244if test "${gcc_cv_as+set}" = set; then
13245 :
13246else
13247
ab87f8c8
JL
13248if test -x "$DEFAULT_ASSEMBLER"; then
13249 gcc_cv_as="$DEFAULT_ASSEMBLER"
34a86c2b 13250elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
13251 && test -f ../gas/Makefile \
13252 && test x$build = x$host; then
e8b05380
PB
13253 gcc_cv_as=../gas/as-new$build_exeext
13254elif test -x as$build_exeext; then
13255 # Build using assembler in the current directory.
13256 gcc_cv_as=./as$build_exeext
13257elif test -x $AS_FOR_TARGET; then
13258 gcc_cv_as="$AS_FOR_TARGET"
13259else
13260 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
13261set dummy $AS_FOR_TARGET; ac_word=$2
a3bba767
JJ
13262echo "$as_me:$LINENO: checking for $ac_word" >&5
13263echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380
PB
13264if test "${ac_cv_path_gcc_cv_as+set}" = set; then
13265 echo $ECHO_N "(cached) $ECHO_C" >&6
13266else
13267 case $gcc_cv_as in
13268 [\\/]* | ?:[\\/]*)
13269 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
13270 ;;
13271 *)
13272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13273for as_dir in $PATH
13274do
13275 IFS=$as_save_IFS
13276 test -z "$as_dir" && as_dir=.
13277 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 13278 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380
PB
13279 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
13280 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13281 break 2
13282 fi
13283done
13284done
13285
13286 ;;
13287esac
13288fi
13289gcc_cv_as=$ac_cv_path_gcc_cv_as
a3bba767 13290
e8b05380 13291if test -n "$gcc_cv_as"; then
a3bba767
JJ
13292 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13293echo "${ECHO_T}$gcc_cv_as" >&6
e8b05380 13294else
a3bba767
JJ
13295 echo "$as_me:$LINENO: result: no" >&5
13296echo "${ECHO_T}no" >&6
e8b05380
PB
13297fi
13298
13299fi
13300fi
13301
13302
13303ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
13304
be0fe523
PB
13305case "$ORIGINAL_AS_FOR_TARGET" in
13306 ./as | ./as$build_exeext) ;;
13307 *) ac_config_files="$ac_config_files as:exec-tool.in"
13308 ;;
13309esac
e8b05380 13310
a3bba767
JJ
13311echo "$as_me:$LINENO: checking what assembler to use" >&5
13312echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
e8b05380 13313if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
08d105fa
AO
13314 # Single tree build which includes gas. We want to prefer it
13315 # over whatever linker top-level may have detected, since
13316 # we'll use what we're building after installation anyway.
a3bba767
JJ
13317 echo "$as_me:$LINENO: result: newly built gas" >&5
13318echo "${ECHO_T}newly built gas" >&6
ad9c4d9f
NN
13319 in_tree_gas=yes
13320 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
13321for f in $gcc_cv_as_bfd_srcdir/configure \
13322 $gcc_cv_as_gas_srcdir/configure \
13323 $gcc_cv_as_gas_srcdir/configure.in \
13324 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 13325 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
13326 if test x$gcc_cv_gas_version != x; then
13327 break
13328 fi
13329done
13330gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
13331gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13332gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
13333case $gcc_cv_gas_patch_version in
13334 "") gcc_cv_gas_patch_version="0" ;;
13335esac
8ada417f
ZW
13336gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
13337 + $gcc_cv_gas_minor_version \) \* 1000 \
13338 + $gcc_cv_gas_patch_version`
ad9c4d9f 13339
5408ac6c
HPN
13340 in_tree_gas_is_elf=no
13341 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
13342 || (grep 'obj_format = multi' ../gas/Makefile \
13343 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
13344 then
13345 in_tree_gas_is_elf=yes
13346 fi
e8b05380 13347else
a3bba767
JJ
13348 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13349echo "${ECHO_T}$gcc_cv_as" >&6
e8b05380 13350 in_tree_gas=no
981d4858 13351fi
9e423e6d 13352
e8b05380
PB
13353# Identify the linker which will work hand-in-glove with the newly
13354# built GCC, so that we can examine its features. This is the linker
13355# which will be driven by the driver program.
9f18db39 13356#
e8b05380
PB
13357# If build != host, and we aren't building gas in-tree, we identify a
13358# build->target linker and hope that it will have the same features
13359# as the host->target linker we'll be using.
13360gcc_cv_gld_major_version=
13361gcc_cv_gld_minor_version=
13362gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
13363gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9f18db39 13364
e8b05380
PB
13365if test "${gcc_cv_ld+set}" = set; then
13366 :
9f18db39 13367else
9f18db39 13368
e8b05380
PB
13369if test -x "$DEFAULT_LINKER"; then
13370 gcc_cv_ld="$DEFAULT_LINKER"
13371elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
13372 && test -f ../ld/Makefile \
13373 && test x$build = x$host; then
13374 gcc_cv_ld=../ld/ld-new$build_exeext
13375elif test -x collect-ld$build_exeext; then
13376 # Build using linker in the current directory.
13377 gcc_cv_ld=./collect-ld$build_exeext
13378elif test -x $LD_FOR_TARGET; then
13379 gcc_cv_ld="$LD_FOR_TARGET"
13380else
13381 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
13382set dummy $LD_FOR_TARGET; ac_word=$2
a3bba767
JJ
13383echo "$as_me:$LINENO: checking for $ac_word" >&5
13384echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13385if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
d739199a
DJ
13386 echo $ECHO_N "(cached) $ECHO_C" >&6
13387else
e8b05380 13388 case $gcc_cv_ld in
d739199a 13389 [\\/]* | ?:[\\/]*)
e8b05380 13390 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
13391 ;;
13392 *)
13393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13394for as_dir in $PATH
13395do
13396 IFS=$as_save_IFS
13397 test -z "$as_dir" && as_dir=.
13398 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 13399 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13400 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13401 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13402 break 2
13403 fi
13404done
13405done
13406
13407 ;;
13408esac
13409fi
e8b05380 13410gcc_cv_ld=$ac_cv_path_gcc_cv_ld
a3bba767 13411
e8b05380 13412if test -n "$gcc_cv_ld"; then
a3bba767
JJ
13413 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13414echo "${ECHO_T}$gcc_cv_ld" >&6
d739199a 13415else
a3bba767
JJ
13416 echo "$as_me:$LINENO: result: no" >&5
13417echo "${ECHO_T}no" >&6
d739199a
DJ
13418fi
13419
13420fi
e8b05380
PB
13421fi
13422
13423
13424ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
13425
be0fe523
PB
13426case "$ORIGINAL_LD_FOR_TARGET" in
13427 ./collect-ld | ./collect-ld$build_exeext) ;;
13428 *) ac_config_files="$ac_config_files collect-ld:exec-tool.in"
13429 ;;
13430esac
e8b05380 13431
a3bba767
JJ
13432echo "$as_me:$LINENO: checking what linker to use" >&5
13433echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
e8b05380
PB
13434if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
13435 # Single tree build which includes ld. We want to prefer it
13436 # over whatever linker top-level may have detected, since
13437 # we'll use what we're building after installation anyway.
a3bba767
JJ
13438 echo "$as_me:$LINENO: result: newly built ld" >&5
13439echo "${ECHO_T}newly built ld" >&6
e8b05380
PB
13440 in_tree_ld=yes
13441 in_tree_ld_is_elf=no
13442 if (grep 'EMUL = .*elf' ../ld/Makefile \
13443 || grep 'EMUL = .*linux' ../ld/Makefile \
13444 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
13445 in_tree_ld_is_elf=yes
13446 fi
13447 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
13448 do
13449 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
13450 if test x$gcc_cv_gld_version != x; then
13451 break
13452 fi
13453 done
13454 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
13455 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13456else
a3bba767
JJ
13457 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13458echo "${ECHO_T}$gcc_cv_ld" >&6
e8b05380
PB
13459 in_tree_ld=no
13460fi
13461
13462# Figure out what nm we will be using.
13463gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
13464if test "${gcc_cv_nm+set}" = set; then
13465 :
13466else
13467
13468if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
13469 && test -f ../binutils/Makefile \
13470 && test x$build = x$host; then
e8b05380
PB
13471 gcc_cv_nm=../binutils/nm-new$build_exeext
13472elif test -x nm$build_exeext; then
13473 gcc_cv_nm=./nm$build_exeext
13474elif test -x $NM_FOR_TARGET; then
13475 gcc_cv_nm="$NM_FOR_TARGET"
13476else
13477 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
13478set dummy $NM_FOR_TARGET; ac_word=$2
a3bba767
JJ
13479echo "$as_me:$LINENO: checking for $ac_word" >&5
13480echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13481if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
d739199a
DJ
13482 echo $ECHO_N "(cached) $ECHO_C" >&6
13483else
e8b05380 13484 case $gcc_cv_nm in
d739199a 13485 [\\/]* | ?:[\\/]*)
e8b05380 13486 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
13487 ;;
13488 *)
13489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13490for as_dir in $PATH
13491do
13492 IFS=$as_save_IFS
13493 test -z "$as_dir" && as_dir=.
13494 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 13495 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13496 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13497 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13498 break 2
13499 fi
13500done
13501done
13502
13503 ;;
13504esac
13505fi
e8b05380 13506gcc_cv_nm=$ac_cv_path_gcc_cv_nm
a3bba767 13507
e8b05380 13508if test -n "$gcc_cv_nm"; then
a3bba767
JJ
13509 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13510echo "${ECHO_T}$gcc_cv_nm" >&6
d739199a 13511else
a3bba767
JJ
13512 echo "$as_me:$LINENO: result: no" >&5
13513echo "${ECHO_T}no" >&6
d739199a
DJ
13514fi
13515
13516fi
e8b05380 13517fi
d739199a 13518
e8b05380 13519
a3bba767
JJ
13520echo "$as_me:$LINENO: checking what nm to use" >&5
13521echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
e8b05380
PB
13522if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
13523 # Single tree build which includes binutils.
a3bba767
JJ
13524 echo "$as_me:$LINENO: result: newly built nm" >&5
13525echo "${ECHO_T}newly built nm" >&6
e8b05380
PB
13526 in_tree_nm=yes
13527else
a3bba767
JJ
13528 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13529echo "${ECHO_T}$gcc_cv_nm" >&6
e8b05380
PB
13530 in_tree_nm=no
13531fi
13532
13533ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
13534
be0fe523
PB
13535case "$ORIGINAL_NM_FOR_TARGET" in
13536 ./nm | ./nm$build_exeext) ;;
13537 *) ac_config_files="$ac_config_files nm:exec-tool.in"
13538 ;;
13539esac
13540
e8b05380
PB
13541
13542# Figure out what objdump we will be using.
13543if test "${gcc_cv_objdump+set}" = set; then
13544 :
13545else
13546
13547if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
13548 && test -f ../binutils/Makefile \
13549 && test x$build = x$host; then
e8b05380
PB
13550 # Single tree build which includes binutils.
13551 gcc_cv_objdump=../binutils/objdump$build_exeext
13552elif test -x objdump$build_exeext; then
13553 gcc_cv_objdump=./objdump$build_exeext
13554elif test -x $OBJDUMP_FOR_TARGET; then
13555 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
13556else
13557 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
13558set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
a3bba767
JJ
13559echo "$as_me:$LINENO: checking for $ac_word" >&5
13560echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13561if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
9f18db39
PB
13562 echo $ECHO_N "(cached) $ECHO_C" >&6
13563else
e8b05380 13564 case $gcc_cv_objdump in
9f18db39 13565 [\\/]* | ?:[\\/]*)
e8b05380 13566 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
13567 ;;
13568 *)
13569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 13570for as_dir in $PATH
9f18db39
PB
13571do
13572 IFS=$as_save_IFS
13573 test -z "$as_dir" && as_dir=.
13574 for ac_exec_ext in '' $ac_executable_extensions; do
a3bba767 13575 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13576 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
9f18db39
PB
13577 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13578 break 2
13579 fi
13580done
13581done
779243f7 13582
9f18db39
PB
13583 ;;
13584esac
13585fi
e8b05380 13586gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
a3bba767 13587
e8b05380 13588if test -n "$gcc_cv_objdump"; then
a3bba767
JJ
13589 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13590echo "${ECHO_T}$gcc_cv_objdump" >&6
9f18db39 13591else
a3bba767
JJ
13592 echo "$as_me:$LINENO: result: no" >&5
13593echo "${ECHO_T}no" >&6
9f18db39
PB
13594fi
13595
e8b05380
PB
13596fi
13597fi
9f18db39 13598
e8b05380 13599
a3bba767
JJ
13600echo "$as_me:$LINENO: checking what objdump to use" >&5
13601echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
e8b05380
PB
13602if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
13603 # Single tree build which includes binutils.
a3bba767
JJ
13604 echo "$as_me:$LINENO: result: newly built objdump" >&5
13605echo "${ECHO_T}newly built objdump" >&6
e8b05380 13606elif test x$gcc_cv_objdump = x; then
a3bba767
JJ
13607 echo "$as_me:$LINENO: result: not found" >&5
13608echo "${ECHO_T}not found" >&6
e8b05380 13609else
a3bba767
JJ
13610 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13611echo "${ECHO_T}$gcc_cv_objdump" >&6
a2eafc76 13612fi
3cae5780 13613
981d4858 13614# Figure out what assembler alignment features are present.
a3bba767
JJ
13615echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13616echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
ba479fd2
NN
13617if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13618 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13619else
13620 gcc_cv_as_balign_and_p2align=no
13621 if test $in_tree_gas = yes; then
13622 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13623 then gcc_cv_as_balign_and_p2align=yes
13624fi
13625 elif test x$gcc_cv_as != x; then
6e3f3080 13626 echo '.balign 4
8ada417f 13627.p2align 2' > conftest.s
ba479fd2
NN
13628 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13630 (eval $ac_try) 2>&5
13631 ac_status=$?
13632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13633 (exit $ac_status); }; }
8ada417f
ZW
13634 then
13635 gcc_cv_as_balign_and_p2align=yes
13636 else
13637 echo "configure: failed program was" >&5
13638 cat conftest.s >&5
13639 fi
13640 rm -f conftest.o conftest.s
13641 fi
13642fi
a3bba767
JJ
13643echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13644echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 13645if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
13646
13647cat >>confdefs.h <<\_ACEOF
981d4858 13648#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 13649_ACEOF
981d4858 13650
ad9c4d9f
NN
13651fi
13652
a3bba767
JJ
13653echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13654echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
ba479fd2
NN
13655if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13656 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13657else
13658 gcc_cv_as_max_skip_p2align=no
13659 if test $in_tree_gas = yes; then
13660 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13661 then gcc_cv_as_max_skip_p2align=yes
13662fi
13663 elif test x$gcc_cv_as != x; then
6e3f3080 13664 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
13665 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13667 (eval $ac_try) 2>&5
13668 ac_status=$?
13669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13670 (exit $ac_status); }; }
8ada417f
ZW
13671 then
13672 gcc_cv_as_max_skip_p2align=yes
13673 else
13674 echo "configure: failed program was" >&5
13675 cat conftest.s >&5
13676 fi
13677 rm -f conftest.o conftest.s
13678 fi
ad9c4d9f 13679fi
a3bba767
JJ
13680echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13681echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 13682if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
13683
13684cat >>confdefs.h <<\_ACEOF
9e423e6d 13685#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 13686_ACEOF
9e423e6d 13687
9e423e6d 13688fi
ad9c4d9f 13689
a3bba767
JJ
13690echo "$as_me:$LINENO: checking assembler for .literal16" >&5
13691echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6
5708d18d
MS
13692if test "${gcc_cv_as_literal16+set}" = set; then
13693 echo $ECHO_N "(cached) $ECHO_C" >&6
13694else
13695 gcc_cv_as_literal16=no
13696 if test $in_tree_gas = yes; then
13697 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13698 then gcc_cv_as_literal16=yes
13699fi
13700 elif test x$gcc_cv_as != x; then
13701 echo '.literal16' > conftest.s
13702 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13704 (eval $ac_try) 2>&5
13705 ac_status=$?
13706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13707 (exit $ac_status); }; }
13708 then
13709 gcc_cv_as_literal16=yes
13710 else
13711 echo "configure: failed program was" >&5
13712 cat conftest.s >&5
13713 fi
13714 rm -f conftest.o conftest.s
13715 fi
13716fi
a3bba767
JJ
13717echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5
13718echo "${ECHO_T}$gcc_cv_as_literal16" >&6
5708d18d
MS
13719if test $gcc_cv_as_literal16 = yes; then
13720
13721cat >>confdefs.h <<\_ACEOF
13722#define HAVE_GAS_LITERAL16 1
13723_ACEOF
13724
13725fi
13726
a3bba767
JJ
13727echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13728echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
ba479fd2
NN
13729if test "${gcc_cv_as_subsection_m1+set}" = set; then
13730 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13731else
13732 gcc_cv_as_subsection_m1=no
13733 if test $in_tree_gas = yes; then
13734 if test $in_tree_gas_is_elf = yes \
13735 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13736 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 13737fi
8ada417f 13738 elif test x$gcc_cv_as != x; then
6e3f3080 13739 echo 'conftest_label1: .word 0
d1accaa3
JJ
13740.subsection -1
13741conftest_label2: .word 0
8ada417f 13742.previous' > conftest.s
ba479fd2
NN
13743 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13745 (eval $ac_try) 2>&5
13746 ac_status=$?
13747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13748 (exit $ac_status); }; }
8ada417f
ZW
13749 then
13750 if test x$gcc_cv_nm != x; then
13751 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13752 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13753 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13754 then :
13755 else gcc_cv_as_subsection_m1=yes
13756 fi
13757 rm -f conftest.nm1 conftest.nm2
13758 fi
13759 else
13760 echo "configure: failed program was" >&5
13761 cat conftest.s >&5
13762 fi
13763 rm -f conftest.o conftest.s
13764 fi
981d4858 13765fi
a3bba767
JJ
13766echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13767echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 13768if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
13769
13770cat >>confdefs.h <<\_ACEOF
981d4858 13771#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 13772_ACEOF
981d4858 13773
d1accaa3 13774fi
ad9c4d9f 13775
a3bba767
JJ
13776echo "$as_me:$LINENO: checking assembler for .weak" >&5
13777echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
ba479fd2
NN
13778if test "${gcc_cv_as_weak+set}" = set; then
13779 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13780else
13781 gcc_cv_as_weak=no
13782 if test $in_tree_gas = yes; then
13783 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13784 then gcc_cv_as_weak=yes
ad9c4d9f 13785fi
8ada417f 13786 elif test x$gcc_cv_as != x; then
6e3f3080 13787 echo ' .weak foobar' > conftest.s
ba479fd2
NN
13788 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13790 (eval $ac_try) 2>&5
13791 ac_status=$?
13792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13793 (exit $ac_status); }; }
8ada417f
ZW
13794 then
13795 gcc_cv_as_weak=yes
13796 else
13797 echo "configure: failed program was" >&5
13798 cat conftest.s >&5
13799 fi
13800 rm -f conftest.o conftest.s
13801 fi
981d4858 13802fi
a3bba767
JJ
13803echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13804echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 13805if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
13806
13807cat >>confdefs.h <<\_ACEOF
981d4858 13808#define HAVE_GAS_WEAK 1
ba479fd2 13809_ACEOF
981d4858 13810
12822146 13811fi
ad9c4d9f 13812
a3bba767
JJ
13813echo "$as_me:$LINENO: checking assembler for .weakref" >&5
13814echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
a0203ca7
AO
13815if test "${gcc_cv_as_weakref+set}" = set; then
13816 echo $ECHO_N "(cached) $ECHO_C" >&6
13817else
13818 gcc_cv_as_weakref=no
13819 if test $in_tree_gas = yes; then
13820 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
13821 then gcc_cv_as_weakref=yes
13822fi
13823 elif test x$gcc_cv_as != x; then
13824 echo ' .weakref foobar, barfnot' > conftest.s
13825 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13827 (eval $ac_try) 2>&5
13828 ac_status=$?
13829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13830 (exit $ac_status); }; }
13831 then
13832 gcc_cv_as_weakref=yes
13833 else
13834 echo "configure: failed program was" >&5
13835 cat conftest.s >&5
13836 fi
13837 rm -f conftest.o conftest.s
13838 fi
13839fi
a3bba767
JJ
13840echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
13841echo "${ECHO_T}$gcc_cv_as_weakref" >&6
a0203ca7
AO
13842if test $gcc_cv_as_weakref = yes; then
13843
13844cat >>confdefs.h <<\_ACEOF
13845#define HAVE_GAS_WEAKREF 1
13846_ACEOF
13847
13848fi
13849
a3bba767
JJ
13850echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13851echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
e41f3691
JDA
13852if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13853 echo $ECHO_N "(cached) $ECHO_C" >&6
13854else
13855 gcc_cv_as_nsubspa_comdat=no
13856 if test $in_tree_gas = yes; then
13857 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13858 then gcc_cv_as_nsubspa_comdat=yes
13859fi
13860 elif test x$gcc_cv_as != x; then
13861 echo ' .SPACE $TEXT$
13862 .NSUBSPA $CODE$,COMDAT' > conftest.s
13863 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13865 (eval $ac_try) 2>&5
13866 ac_status=$?
13867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13868 (exit $ac_status); }; }
13869 then
13870 gcc_cv_as_nsubspa_comdat=yes
13871 else
13872 echo "configure: failed program was" >&5
13873 cat conftest.s >&5
13874 fi
13875 rm -f conftest.o conftest.s
13876 fi
13877fi
a3bba767
JJ
13878echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13879echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
e41f3691
JDA
13880if test $gcc_cv_as_nsubspa_comdat = yes; then
13881
13882cat >>confdefs.h <<\_ACEOF
13883#define HAVE_GAS_NSUBSPA_COMDAT 1
13884_ACEOF
13885
13886fi
13887
8ada417f
ZW
13888# .hidden needs to be supported in both the assembler and the linker,
13889# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13890# This is irritatingly difficult to feature test for; we have to check the
13891# date string after the version number. If we've got an in-tree
13892# ld, we don't know its patchlevel version, so we set the baseline at 2.13
13893# to be safe.
13894# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
a3bba767
JJ
13895echo "$as_me:$LINENO: checking assembler for .hidden" >&5
13896echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
ba479fd2
NN
13897if test "${gcc_cv_as_hidden+set}" = set; then
13898 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13899else
13900 gcc_cv_as_hidden=no
13901 if test $in_tree_gas = yes; then
13902 if test $in_tree_gas_is_elf = yes \
13903 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
13904 then gcc_cv_as_hidden=yes
13905fi
13906 elif test x$gcc_cv_as != x; then
6e3f3080 13907 echo ' .hidden foobar
8ada417f 13908foobar:' > conftest.s
ba479fd2
NN
13909 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13911 (eval $ac_try) 2>&5
13912 ac_status=$?
13913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13914 (exit $ac_status); }; }
8ada417f
ZW
13915 then
13916 gcc_cv_as_hidden=yes
13917 else
13918 echo "configure: failed program was" >&5
13919 cat conftest.s >&5
13920 fi
13921 rm -f conftest.o conftest.s
13922 fi
13923fi
a3bba767
JJ
13924echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
13925echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 13926
ad9c4d9f 13927
a3bba767
JJ
13928echo "$as_me:$LINENO: checking linker for .hidden support" >&5
13929echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
ba479fd2
NN
13930if test "${gcc_cv_ld_hidden+set}" = set; then
13931 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13932else
13933 if test $in_tree_ld = yes ; then
13934 gcc_cv_ld_hidden=no
13935 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 \
13936 && test $in_tree_ld_is_elf = yes; then
13937 gcc_cv_ld_hidden=yes
13938 fi
13939else
13940 gcc_cv_ld_hidden=yes
bace148a 13941 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
13942 if echo "$ld_ver" | grep GNU > /dev/null; then
13943 ld_vers=`echo $ld_ver | sed -n \
13944 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13945 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13946 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13947 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13948 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
11176d2a 13949 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
e8116f40 13950 -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 13951 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
13952 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
13953 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
13954 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
13955 if test 0"$ld_date" -lt 20020404; then
13956 if test -n "$ld_date"; then
13957 # If there was date string, but was earlier than 2002-04-04, fail
13958 gcc_cv_ld_hidden=no
13959 elif test -z "$ld_vers"; then
13960 # If there was no date string nor ld version number, something is wrong
13961 gcc_cv_ld_hidden=no
13962 else
8ada417f
ZW
13963 test -z "$ld_vers_patch" && ld_vers_patch=0
13964 if test "$ld_vers_major" -lt 2; then
13965 gcc_cv_ld_hidden=no
13966 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
13967 gcc_cv_ld_hidden="no"
13968 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
13969 gcc_cv_ld_hidden=no
c72931a6 13970 fi
8ada417f 13971 fi
789b7de5 13972 fi
8ada417f 13973 else
28690784 13974 case "${target}" in
b0fd7d27 13975 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
13976 gcc_cv_ld_hidden=yes
13977 ;;
13978 *)
13979 gcc_cv_ld_hidden=no
13980 ;;
13981 esac
8ada417f
ZW
13982 fi
13983fi
6d07784a 13984fi
a3bba767
JJ
13985echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
13986echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 13987libgcc_visibility=no
ad9c4d9f 13988
232b67d9 13989
8e3940b2 13990if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 13991 libgcc_visibility=yes
ba479fd2
NN
13992
13993cat >>confdefs.h <<\_ACEOF
8ada417f 13994#define HAVE_GAS_HIDDEN 1
ba479fd2 13995_ACEOF
ad9c4d9f
NN
13996
13997fi
13998
8ada417f 13999# Check if we have .[us]leb128, and support symbol arithmetic with it.
a3bba767
JJ
14000echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
14001echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
ba479fd2
NN
14002if test "${gcc_cv_as_leb128+set}" = set; then
14003 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14004else
14005 gcc_cv_as_leb128=no
14006 if test $in_tree_gas = yes; then
14007 if test $in_tree_gas_is_elf = yes \
14008 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14009 then gcc_cv_as_leb128=yes
14010fi
14011 elif test x$gcc_cv_as != x; then
6e3f3080 14012 echo ' .data
b7460f24
RH
14013 .uleb128 L2 - L1
14014L1:
14015 .uleb128 1280
14016 .sleb128 -1010
8ada417f 14017L2:' > conftest.s
ba479fd2
NN
14018 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14020 (eval $ac_try) 2>&5
14021 ac_status=$?
14022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14023 (exit $ac_status); }; }
8ada417f
ZW
14024 then
14025 # GAS versions before 2.11 do not support uleb128,
14026 # despite appearing to.
14027 # ??? There exists an elf-specific test that will crash
14028 # the assembler. Perhaps it's better to figure out whether
14029 # arbitrary sections are supported and try the test.
bace148a 14030 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
14031 if echo "$as_ver" | grep GNU > /dev/null; then
14032 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
14033 as_major=`echo $as_ver | sed 's/\..*//'`
14034 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
14035 if test $as_major -eq 2 && test $as_minor -lt 11
14036 then :
14037 else gcc_cv_as_leb128=yes
14038 fi
14039 fi
14040 else
14041 echo "configure: failed program was" >&5
14042 cat conftest.s >&5
14043 fi
14044 rm -f conftest.o conftest.s
14045 fi
b7460f24 14046fi
a3bba767
JJ
14047echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
14048echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 14049if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
14050
14051cat >>confdefs.h <<\_ACEOF
b7460f24 14052#define HAVE_AS_LEB128 1
ba479fd2 14053_ACEOF
b7460f24
RH
14054
14055fi
ad9c4d9f 14056
8ada417f
ZW
14057# GAS versions up to and including 2.11.0 may mis-optimize
14058# .eh_frame data.
a3bba767
JJ
14059echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
14060echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
ba479fd2
NN
14061if test "${gcc_cv_as_eh_frame+set}" = set; then
14062 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14063else
14064 gcc_cv_as_eh_frame=no
14065 if test $in_tree_gas = yes; then
14066 if test $in_tree_gas_is_elf = yes \
14067 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14068 then gcc_cv_as_eh_frame=yes
ad9c4d9f 14069fi
8ada417f 14070 elif test x$gcc_cv_as != x; then
6e3f3080 14071 echo ' .text
c64688ae
RH
14072.LFB1:
14073 .4byte 0
14074.L1:
14075 .4byte 0
14076.LFE1:
14077 .section .eh_frame,"aw",@progbits
14078__FRAME_BEGIN__:
14079 .4byte .LECIE1-.LSCIE1
14080.LSCIE1:
14081 .4byte 0x0
14082 .byte 0x1
14083 .ascii "z\0"
14084 .byte 0x1
14085 .byte 0x78
14086 .byte 0x1a
14087 .byte 0x0
14088 .byte 0x4
14089 .4byte 1
14090 .p2align 1
14091.LECIE1:
14092.LSFDE1:
14093 .4byte .LEFDE1-.LASFDE1
14094.LASFDE1:
14095 .4byte .LASFDE1-__FRAME_BEGIN__
14096 .4byte .LFB1
14097 .4byte .LFE1-.LFB1
14098 .byte 0x4
14099 .4byte .LFE1-.LFB1
14100 .byte 0x4
14101 .4byte .L1-.LFB1
8ada417f 14102.LEFDE1:' > conftest.s
ba479fd2
NN
14103 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14105 (eval $ac_try) 2>&5
14106 ac_status=$?
14107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14108 (exit $ac_status); }; }
8ada417f
ZW
14109 then
14110 cat > conftest.lit <<EOF
c64688ae
RH
14111 0000 10000000 00000000 017a0001 781a0004 .........z..x...
14112 0010 01000000 12000000 18000000 00000000 ................
093e61a6 14113 0020 08000000 04080000 0044 .........D
01efb963 14114EOF
ba479fd2 14115cat > conftest.big <<EOF
01efb963
AS
14116 0000 00000010 00000000 017a0001 781a0004 .........z..x...
14117 0010 00000001 00000012 00000018 00000000 ................
093e61a6 14118 0020 00000008 04000000 0844 .........D
c64688ae 14119EOF
8ada417f
ZW
14120 # If the assembler didn't choke, and we can objdump,
14121 # and we got the correct data, then succeed.
dbc02e7f
AS
14122 # The text in the here-document typically retains its unix-style line
14123 # endings, while the output of objdump will use host line endings.
14124 # Therefore, use diff -b for the comparisons.
8ada417f
ZW
14125 if test x$gcc_cv_objdump != x \
14126 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
14127 | tail -3 > conftest.got \
dbc02e7f
AS
14128 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
14129 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
8ada417f
ZW
14130 then
14131 gcc_cv_as_eh_frame=yes
ba479fd2
NN
14132 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
14133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14134 (eval $ac_try) 2>&5
14135 ac_status=$?
14136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14137 (exit $ac_status); }; }; then
8ada417f
ZW
14138 gcc_cv_as_eh_frame=buggy
14139 else
14140 # Uh oh, what do we do now?
14141 gcc_cv_as_eh_frame=no
14142 fi
14143 else
14144 echo "configure: failed program was" >&5
14145 cat conftest.s >&5
14146 fi
14147 rm -f conftest.o conftest.s
14148 fi
c64688ae 14149fi
a3bba767
JJ
14150echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
14151echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 14152
6e3f3080 14153
63cf211a 14154if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
14155
14156cat >>confdefs.h <<\_ACEOF
8ada417f 14157#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 14158_ACEOF
ad9c4d9f
NN
14159
14160fi
14161
a3bba767
JJ
14162echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14163echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
ba479fd2
NN
14164if test "${gcc_cv_as_shf_merge+set}" = set; then
14165 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14166else
14167 gcc_cv_as_shf_merge=no
14168 if test $in_tree_gas = yes; then
14169 if test $in_tree_gas_is_elf = yes \
14170 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14171 then gcc_cv_as_shf_merge=yes
14172fi
14173 elif test x$gcc_cv_as != x; then
6e3f3080 14174 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
14175 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14177 (eval $ac_try) 2>&5
14178 ac_status=$?
14179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14180 (exit $ac_status); }; }
8ada417f
ZW
14181 then
14182 gcc_cv_as_shf_merge=yes
14183 else
14184 echo "configure: failed program was" >&5
14185 cat conftest.s >&5
14186 fi
14187 rm -f conftest.o conftest.s
14188 fi
201556f0 14189fi
a3bba767
JJ
14190echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14191echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 14192
c18a5b6c 14193if test $gcc_cv_as_shf_merge = no; then
a3bba767
JJ
14194 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14195echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
c18a5b6c
MM
14196if test "${gcc_cv_as_shf_merge+set}" = set; then
14197 echo $ECHO_N "(cached) $ECHO_C" >&6
14198else
14199 gcc_cv_as_shf_merge=no
14200 if test $in_tree_gas = yes; then
14201 if test $in_tree_gas_is_elf = yes \
14202 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14203 then gcc_cv_as_shf_merge=yes
14204fi
14205 elif test x$gcc_cv_as != x; then
14206 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
14207 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14209 (eval $ac_try) 2>&5
14210 ac_status=$?
14211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14212 (exit $ac_status); }; }
14213 then
14214 gcc_cv_as_shf_merge=yes
14215 else
14216 echo "configure: failed program was" >&5
14217 cat conftest.s >&5
14218 fi
14219 rm -f conftest.o conftest.s
14220 fi
14221fi
a3bba767
JJ
14222echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14223echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
c18a5b6c
MM
14224
14225fi
8ad9fb33 14226
ba479fd2 14227cat >>confdefs.h <<_ACEOF
8ad9fb33 14228#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 14229_ACEOF
201556f0 14230
201556f0 14231
a3bba767
JJ
14232echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14233echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
14234if test "${gcc_cv_as_comdat_group+set}" = set; then
14235 echo $ECHO_N "(cached) $ECHO_C" >&6
14236else
14237 gcc_cv_as_comdat_group=no
14238 if test $in_tree_gas = yes; then
14239 if test $in_tree_gas_is_elf = yes \
11176d2a 14240 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14241 then gcc_cv_as_comdat_group=yes
14242fi
14243 elif test x$gcc_cv_as != x; then
14244 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
14245 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14247 (eval $ac_try) 2>&5
14248 ac_status=$?
14249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14250 (exit $ac_status); }; }
14251 then
14252 gcc_cv_as_comdat_group=yes
14253 else
14254 echo "configure: failed program was" >&5
14255 cat conftest.s >&5
14256 fi
14257 rm -f conftest.o conftest.s
14258 fi
14259fi
a3bba767
JJ
14260echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
14261echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
c18a5b6c
MM
14262
14263if test $gcc_cv_as_comdat_group = yes; then
14264 gcc_cv_as_comdat_group_percent=no
14265else
a3bba767
JJ
14266 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14267echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
14268if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
14269 echo $ECHO_N "(cached) $ECHO_C" >&6
14270else
14271 gcc_cv_as_comdat_group_percent=no
14272 if test $in_tree_gas = yes; then
14273 if test $in_tree_gas_is_elf = yes \
11176d2a 14274 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14275 then gcc_cv_as_comdat_group_percent=yes
14276fi
14277 elif test x$gcc_cv_as != x; then
14278 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
14279 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14281 (eval $ac_try) 2>&5
14282 ac_status=$?
14283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14284 (exit $ac_status); }; }
14285 then
14286 gcc_cv_as_comdat_group_percent=yes
14287 else
14288 echo "configure: failed program was" >&5
14289 cat conftest.s >&5
14290 fi
14291 rm -f conftest.o conftest.s
14292 fi
14293fi
a3bba767
JJ
14294echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
14295echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
c18a5b6c
MM
14296
14297fi
11176d2a
JB
14298if test $in_tree_ld != yes && test x"$ld_vers" != x; then
14299 comdat_group=yes
14300 if test 0"$ld_date" -lt 20050308; then
14301 if test -n "$ld_date"; then
14302 # If there was date string, but was earlier than 2005-03-08, fail
14303 comdat_group=no
14304 elif test "$ld_vers_major" -lt 2; then
14305 comdat_group=no
14306 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
14307 comdat_group=no
14308 fi
14309 fi
1cf0118d
RO
14310else
14311 # assume linkers other than GNU ld don't support COMDAT group
14312 comdat_group=no
14313fi
14314if test $comdat_group = no; then
14315 gcc_cv_as_comdat_group=no
14316 gcc_cv_as_comdat_group_percent=no
11176d2a 14317fi
c18a5b6c
MM
14318
14319cat >>confdefs.h <<_ACEOF
11176d2a 14320#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
14321_ACEOF
14322
14323
8ada417f 14324# Thread-local storage - the check is heavily parametrized.
f996902d
RH
14325conftest_s=
14326tls_first_major=
14327tls_first_minor=
9739c90c 14328tls_as_opt=
f996902d 14329case "$target" in
6f9b006d
RH
14330 alpha*-*-*)
14331 conftest_s='
14332 .section ".tdata","awT",@progbits
14333foo: .long 25
14334 .text
14335 ldq $27,__tls_get_addr($29) !literal!1
14336 lda $16,foo($29) !tlsgd!1
14337 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
14338 ldq $27,__tls_get_addr($29) !literal!2
14339 lda $16,foo($29) !tlsldm!2
14340 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
14341 ldq $1,foo($29) !gotdtprel
14342 ldah $2,foo($29) !dtprelhi
14343 lda $3,foo($2) !dtprello
14344 lda $4,foo($29) !dtprel
14345 ldq $1,foo($29) !gottprel
14346 ldah $2,foo($29) !tprelhi
14347 lda $3,foo($2) !tprello
14348 lda $4,foo($29) !tprel'
14349 tls_first_major=2
14350 tls_first_minor=13
2f3321ca 14351 tls_as_opt=--fatal-warnings
6f9b006d 14352 ;;
e4dd71de
AH
14353 frv*-*-*)
14354 conftest_s='
14355 .section ".tdata","awT",@progbits
14356x: .long 25
14357 .text
14358 call #gettlsoff(x)'
14359 tls_first_major=2
14360 tls_first_minor=14
14361 ;;
51076f96
RC
14362 hppa*-*-linux*)
14363 conftest_s='
14364t1: .reg %r20
14365t2: .reg %r21
14366gp: .reg %r19
14367 .section ".tdata","awT",@progbits
14368foo: .long 25
14369 .text
14370 .align 4
14371 addil LT%foo-$tls_gdidx$,gp
14372 ldo RT%foo-$tls_gdidx$(%r1),%arg0
14373 b __tls_get_addr
14374 nop
14375 addil LT%foo-$tls_ldidx$,gp
14376 b __tls_get_addr
14377 ldo RT%foo-$tls_ldidx$(%r1),%arg0
14378 addil LR%foo-$tls_dtpoff$,%ret0
14379 ldo RR%foo-$tls_dtpoff$(%r1),%t1
14380 mfctl %cr27,%t1
14381 addil LT%foo-$tls_ieoff$,gp
14382 ldw RT%foo-$tls_ieoff$(%r1),%t2
14383 add %t1,%t2,%t3
14384 mfctl %cr27,%t1
14385 addil LR%foo-$tls_leoff$,%t1
14386 ldo RR%foo-$tls_leoff$(%r1),%t2'
14387 tls_first_major=2
14388 tls_first_minor=15
14389 tls_as_opt=--fatal-warnings
14390 ;;
d3585b76
DJ
14391 arm*-*-*)
14392 conftest_s='
14393 .section ".tdata","awT",%progbits
14394foo: .long 25
14395 .text
14396.word foo(gottpoff)
14397.word foo(tpoff)
14398.word foo(tlsgd)
14399.word foo(tlsldm)
14400.word foo(tlsldo)'
14401 tls_first_major=2
14402 tls_first_minor=17
14403 ;;
f996902d
RH
14404 i[34567]86-*-*)
14405 conftest_s='
14406 .section ".tdata","awT",@progbits
14407foo: .long 25
14408 .text
14409 movl %gs:0, %eax
14410 leal foo@TLSGD(,%ebx,1), %eax
14411 leal foo@TLSLDM(%ebx), %eax
14412 leal foo@DTPOFF(%eax), %edx
14413 movl foo@GOTTPOFF(%ebx), %eax
14414 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
14415 addl foo@GOTNTPOFF(%ebx), %eax
14416 movl foo@INDNTPOFF, %eax
f996902d
RH
14417 movl $foo@TPOFF, %eax
14418 subl $foo@TPOFF, %eax
14419 leal foo@NTPOFF(%ecx), %eax'
14420 tls_first_major=2
75d38379 14421 tls_first_minor=14
2f3321ca 14422 tls_as_opt=--fatal-warnings
75d38379
JJ
14423 ;;
14424 x86_64-*-*)
14425 conftest_s='
14426 .section ".tdata","awT",@progbits
14427foo: .long 25
14428 .text
14429 movq %fs:0, %rax
14430 leaq foo@TLSGD(%rip), %rdi
14431 leaq foo@TLSLD(%rip), %rdi
14432 leaq foo@DTPOFF(%rax), %rdx
14433 movq foo@GOTTPOFF(%rip), %rax
14434 movq $foo@TPOFF, %rax'
14435 tls_first_major=2
14436 tls_first_minor=14
2f3321ca 14437 tls_as_opt=--fatal-warnings
f996902d 14438 ;;
7b6e506e
RH
14439 ia64-*-*)
14440 conftest_s='
14441 .section ".tdata","awT",@progbits
14442foo: data8 25
14443 .text
14444 addl r16 = @ltoff(@dtpmod(foo#)), gp
14445 addl r17 = @ltoff(@dtprel(foo#)), gp
14446 addl r18 = @ltoff(@tprel(foo#)), gp
14447 addl r19 = @dtprel(foo#), gp
14448 adds r21 = @dtprel(foo#), r13
14449 movl r23 = @dtprel(foo#)
14450 addl r20 = @tprel(foo#), gp
14451 adds r22 = @tprel(foo#), r13
14452 movl r24 = @tprel(foo#)'
14453 tls_first_major=2
14454 tls_first_minor=13
2f3321ca 14455 tls_as_opt=--fatal-warnings
7b6e506e 14456 ;;
69229b81
DJ
14457 mips*-*-*)
14458 conftest_s='
14459 .section .tdata,"awT",@progbits
14460x:
14461 .word 2
14462 .text
14463 addiu $4, $28, %tlsgd(x)
14464 addiu $4, $28, %tlsldm(x)
14465 lui $4, %dtprel_hi(x)
14466 addiu $4, $4, %dtprel_lo(x)
14467 lw $4, %gottprel(x)($28)
14468 lui $4, %tprel_hi(x)
14469 addiu $4, $4, %tprel_lo(x)'
14470 tls_first_major=2
14471 tls_first_minor=16
14472 tls_as_opt='-32 --fatal-warnings'
14473 ;;
c4501e62
JJ
14474 powerpc-*-*)
14475 conftest_s='
14476 .section ".tdata","awT",@progbits
14477 .align 2
14478ld0: .space 4
14479ld1: .space 4
14480x1: .space 4
14481x2: .space 4
14482x3: .space 4
14483 .text
14484 addi 3,31,ld0@got@tlsgd
14485 bl __tls_get_addr
14486 addi 3,31,x1@got@tlsld
14487 bl __tls_get_addr
14488 addi 9,3,x1@dtprel
14489 addis 9,3,x2@dtprel@ha
14490 addi 9,9,x2@dtprel@l
14491 lwz 9,x3@got@tprel(31)
14492 add 9,9,x@tls
14493 addi 9,2,x1@tprel
14494 addis 9,2,x2@tprel@ha
14495 addi 9,9,x2@tprel@l'
14496 tls_first_major=2
14497 tls_first_minor=14
2f3321ca 14498 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
14499 ;;
14500 powerpc64-*-*)
14501 conftest_s='
14502 .section ".tdata","awT",@progbits
14503 .align 3
14504ld0: .space 8
14505ld1: .space 8
14506x1: .space 8
14507x2: .space 8
14508x3: .space 8
14509 .text
14510 addi 3,2,ld0@got@tlsgd
14511 bl .__tls_get_addr
14512 nop
14513 addi 3,2,ld1@toc
14514 bl .__tls_get_addr
14515 nop
14516 addi 3,2,x1@got@tlsld
14517 bl .__tls_get_addr
14518 nop
14519 addi 9,3,x1@dtprel
14520 bl .__tls_get_addr
14521 nop
14522 addis 9,3,x2@dtprel@ha
14523 addi 9,9,x2@dtprel@l
14524 bl .__tls_get_addr
14525 nop
14526 ld 9,x3@got@dtprel(2)
14527 add 9,9,3
14528 bl .__tls_get_addr
14529 nop'
14530 tls_first_major=2
14531 tls_first_minor=14
2f3321ca 14532 tls_as_opt="-a64 --fatal-warnings"
c4501e62 14533 ;;
fd3cd001
UW
14534 s390-*-*)
14535 conftest_s='
14536 .section ".tdata","awT",@progbits
14537foo: .long 25
14538 .text
14539 .long foo@TLSGD
14540 .long foo@TLSLDM
14541 .long foo@DTPOFF
14542 .long foo@NTPOFF
14543 .long foo@GOTNTPOFF
14544 .long foo@INDNTPOFF
14545 l %r1,foo@GOTNTPOFF(%r12)
14546 l %r1,0(%r1):tls_load:foo
14547 bas %r14,0(%r1,%r13):tls_gdcall:foo
14548 bas %r14,0(%r1,%r13):tls_ldcall:foo'
14549 tls_first_major=2
14550 tls_first_minor=14
2f3321ca 14551 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
14552 ;;
14553 s390x-*-*)
14554 conftest_s='
14555 .section ".tdata","awT",@progbits
14556foo: .long 25
14557 .text
14558 .quad foo@TLSGD
14559 .quad foo@TLSLDM
14560 .quad foo@DTPOFF
14561 .quad foo@NTPOFF
14562 .quad foo@GOTNTPOFF
14563 lg %r1,foo@GOTNTPOFF(%r12)
14564 larl %r1,foo@INDNTPOFF
14565 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
14566 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
14567 tls_first_major=2
14568 tls_first_minor=14
2f3321ca 14569 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 14570 ;;
9ff13962
KK
14571 sh-*-* | sh[34]-*-*)
14572 conftest_s='
14573 .section ".tdata","awT",@progbits
14574foo: .long 25
14575 .text
14576 .long foo@TLSGD
14577 .long foo@TLSLDM
14578 .long foo@DTPOFF
14579 .long foo@GOTTPOFF
14580 .long foo@TPOFF'
14581 tls_first_major=2
14582 tls_first_minor=13
2f3321ca 14583 tls_as_opt=--fatal-warnings
9ff13962 14584 ;;
5751a10b 14585 sparc*-*-*)
2f3321ca 14586 case "$target" in
7935dc1b
EB
14587 sparc*-sun-solaris2.[56789]*)
14588 # TLS was introduced in the Solaris 9 4/04 release but
14589 # we do not enable it by default on Solaris 9 either.
14590 if test "x$enable_tls" = xyes ; then
14591 on_solaris=yes
14592 else
14593 enable_tls=no;
14594 fi
14595 ;;
2f3321ca
EB
14596 sparc*-sun-solaris2.*)
14597 on_solaris=yes
14598 ;;
14599 *)
14600 on_solaris=no
14601 ;;
14602 esac
14603 if test x$on_solaris = xyes && test x$gas_flag = xno; then
14604 conftest_s='
14605 .section ".tdata",#alloc,#write,#tls
14606foo: .long 25
14607 .text
14608 sethi %tgd_hi22(foo), %o0
14609 add %o0, %tgd_lo10(foo), %o1
14610 add %l7, %o1, %o0, %tgd_add(foo)
14611 call __tls_get_addr, %tgd_call(foo)
14612 sethi %tldm_hi22(foo), %l1
14613 add %l1, %tldm_lo10(foo), %l2
14614 add %l7, %l2, %o0, %tldm_add(foo)
14615 call __tls_get_addr, %tldm_call(foo)
14616 sethi %tldo_hix22(foo), %l3
14617 xor %l3, %tldo_lox10(foo), %l4
14618 add %o0, %l4, %l5, %tldo_add(foo)
14619 sethi %tie_hi22(foo), %o3
14620 add %o3, %tie_lo10(foo), %o3
14621 ld [%l7 + %o3], %o2, %tie_ld(foo)
14622 add %g7, %o2, %o4, %tie_add(foo)
14623 sethi %tle_hix22(foo), %l1
14624 xor %l1, %tle_lox10(foo), %o5
14625 ld [%g7 + %o5], %o1'
14626 tls_first_major=0
14627 tls_first_minor=0
14628 else
14629 conftest_s='
5751a10b
JJ
14630 .section ".tdata","awT",@progbits
14631foo: .long 25
14632 .text
14633 sethi %tgd_hi22(foo), %o0
14634 add %o0, %tgd_lo10(foo), %o1
14635 add %l7, %o1, %o0, %tgd_add(foo)
14636 call __tls_get_addr, %tgd_call(foo)
14637 sethi %tldm_hi22(foo), %l1
14638 add %l1, %tldm_lo10(foo), %l2
14639 add %l7, %l2, %o0, %tldm_add(foo)
14640 call __tls_get_addr, %tldm_call(foo)
14641 sethi %tldo_hix22(foo), %l3
14642 xor %l3, %tldo_lox10(foo), %l4
14643 add %o0, %l4, %l5, %tldo_add(foo)
14644 sethi %tie_hi22(foo), %o3
14645 add %o3, %tie_lo10(foo), %o3
14646 ld [%l7 + %o3], %o2, %tie_ld(foo)
14647 add %g7, %o2, %o4, %tie_add(foo)
14648 sethi %tle_hix22(foo), %l1
14649 xor %l1, %tle_lox10(foo), %o5
14650 ld [%g7 + %o5], %o1'
14651 tls_first_major=2
14652 tls_first_minor=14
2f3321ca
EB
14653 tls_as_opt="-32 --fatal-warnings"
14654 fi
5751a10b 14655 ;;
f996902d 14656esac
8dea1cca
DD
14657set_have_as_tls=no
14658if test "x$enable_tls" = xno ; then
14659 : # TLS explicitly disabled.
14660elif test "x$enable_tls" = xyes ; then
14661 set_have_as_tls=yes # TLS explicitly enabled.
14662elif test -z "$tls_first_major"; then
8ada417f
ZW
14663 : # If we don't have a check, assume no support.
14664else
a3bba767
JJ
14665 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
14666echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
ba479fd2
NN
14667if test "${gcc_cv_as_tls+set}" = set; then
14668 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14669else
14670 gcc_cv_as_tls=no
14671 if test $in_tree_gas = yes; then
14672 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
14673 then gcc_cv_as_tls=yes
ad9c4d9f 14674fi
8ada417f 14675 elif test x$gcc_cv_as != x; then
6e3f3080 14676 echo "$conftest_s" > conftest.s
2f3321ca 14677 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
14678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14679 (eval $ac_try) 2>&5
14680 ac_status=$?
14681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14682 (exit $ac_status); }; }
8ada417f
ZW
14683 then
14684 gcc_cv_as_tls=yes
14685 else
14686 echo "configure: failed program was" >&5
14687 cat conftest.s >&5
14688 fi
14689 rm -f conftest.o conftest.s
f996902d 14690 fi
f996902d 14691fi
a3bba767
JJ
14692echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
14693echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 14694if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
14695 set_have_as_tls=yes
14696fi
14697fi
14698if test $set_have_as_tls = yes ; then
ba479fd2
NN
14699
14700cat >>confdefs.h <<\_ACEOF
f996902d 14701#define HAVE_AS_TLS 1
ba479fd2 14702_ACEOF
f996902d 14703
8ada417f
ZW
14704fi
14705
14706# Target-specific assembler checks.
f996902d 14707
a3bba767
JJ
14708echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
14709echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
7e9d8517
L
14710gcc_cv_ld_static_dynamic=no
14711if test $in_tree_ld = yes ; then
14712 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
14713 gcc_cv_ld_static_dynamic=yes
14714 fi
14715elif test x$gcc_cv_ld != x; then
14716 # Check if linker supports -Bstatic/-Bdynamic option
14717 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
14718 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
14719 gcc_cv_ld_static_dynamic=yes
14720 fi
14721fi
14722if test x"$gcc_cv_ld_static_dynamic" = xyes; then
14723
14724cat >>confdefs.h <<\_ACEOF
14725#define HAVE_LD_STATIC_DYNAMIC 1
14726_ACEOF
14727
14728fi
a3bba767
JJ
14729echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14730echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
7e9d8517 14731
d594623a 14732if test x"$demangler_in_ld" = xyes; then
a3bba767
JJ
14733 echo "$as_me:$LINENO: checking linker --demangle support" >&5
14734echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
d594623a
L
14735 gcc_cv_ld_demangle=no
14736 if test $in_tree_ld = yes; then
14737 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 \
14738 gcc_cv_ld_demangle=yes
14739 fi
14740 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14741 # Check if the GNU linker supports --demangle option
14742 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14743 gcc_cv_ld_demangle=yes
14744 fi
14745 fi
14746 if test x"$gcc_cv_ld_demangle" = xyes; then
14747
14748cat >>confdefs.h <<\_ACEOF
14749#define HAVE_LD_DEMANGLE 1
14750_ACEOF
14751
14752 fi
a3bba767
JJ
14753 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14754echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
d594623a
L
14755fi
14756
3a37b08e
RH
14757case "$target" in
14758 # All TARGET_ABI_OSF targets.
14759 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
a3bba767
JJ
14760 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14761echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
14762if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14763 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 14764else
8ada417f
ZW
14765 gcc_cv_as_alpha_explicit_relocs=no
14766 if test $in_tree_gas = yes; then
14767 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14768 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 14769fi
8ada417f 14770 elif test x$gcc_cv_as != x; then
6e3f3080 14771 echo ' .set nomacro
3a37b08e
RH
14772 .text
14773 extbl $3, $2, $3 !lituse_bytoff!1
14774 ldq $2, a($29) !literal!1
14775 ldq $4, b($29) !literal!2
14776 ldq_u $3, 0($2) !lituse_base!1
14777 ldq $27, f($29) !literal!5
14778 jsr $26, ($27), f !lituse_jsr!5
14779 ldah $29, 0($26) !gpdisp!3
14780 lda $0, c($29) !gprel
14781 ldah $1, d($29) !gprelhigh
14782 lda $1, d($1) !gprellow
8ada417f 14783 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
14784 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14786 (eval $ac_try) 2>&5
14787 ac_status=$?
14788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14789 (exit $ac_status); }; }
8ada417f
ZW
14790 then
14791 gcc_cv_as_alpha_explicit_relocs=yes
14792 else
14793 echo "configure: failed program was" >&5
14794 cat conftest.s >&5
14795 fi
14796 rm -f conftest.o conftest.s
14797 fi
cafe096b 14798fi
a3bba767
JJ
14799echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14800echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 14801if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
14802
14803cat >>confdefs.h <<\_ACEOF
3a37b08e 14804#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 14805_ACEOF
3a37b08e 14806
d006f5eb 14807fi
a3bba767
JJ
14808 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
14809echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
d006f5eb
RH
14810if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
14811 echo $ECHO_N "(cached) $ECHO_C" >&6
14812else
14813 gcc_cv_as_alpha_jsrdirect_relocs=no
14814 if test $in_tree_gas = yes; then
14815 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
14816 then gcc_cv_as_alpha_jsrdirect_relocs=yes
14817fi
14818 elif test x$gcc_cv_as != x; then
14819 echo ' .set nomacro
14820 .text
14821 ldq $27, a($29) !literal!1
14822 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
14823 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14825 (eval $ac_try) 2>&5
14826 ac_status=$?
14827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14828 (exit $ac_status); }; }
14829 then
14830 gcc_cv_as_alpha_jsrdirect_relocs=yes
14831 else
14832 echo "configure: failed program was" >&5
14833 cat conftest.s >&5
14834 fi
14835 rm -f conftest.o conftest.s
14836 fi
14837fi
a3bba767
JJ
14838echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
14839echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
d006f5eb
RH
14840if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
14841
14842cat >>confdefs.h <<\_ACEOF
14843#define HAVE_AS_JSRDIRECT_RELOCS 1
14844_ACEOF
14845
86da66b5
HPN
14846fi
14847 ;;
14848
14849 cris-*-*)
a3bba767
JJ
14850 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14851echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
86da66b5
HPN
14852if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14853 echo $ECHO_N "(cached) $ECHO_C" >&6
14854else
14855 gcc_cv_as_cris_no_mul_bug=no
14856 if test $in_tree_gas = yes; then
14857 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14858 then gcc_cv_as_cris_no_mul_bug=yes
14859fi
14860 elif test x$gcc_cv_as != x; then
14861 echo '.text' > conftest.s
14862 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14864 (eval $ac_try) 2>&5
14865 ac_status=$?
14866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14867 (exit $ac_status); }; }
14868 then
14869 gcc_cv_as_cris_no_mul_bug=yes
14870 else
14871 echo "configure: failed program was" >&5
14872 cat conftest.s >&5
14873 fi
14874 rm -f conftest.o conftest.s
14875 fi
14876fi
a3bba767
JJ
14877echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14878echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
86da66b5
HPN
14879if test $gcc_cv_as_cris_no_mul_bug = yes; then
14880
14881cat >>confdefs.h <<\_ACEOF
14882#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14883_ACEOF
14884
8ada417f 14885fi
3a37b08e 14886 ;;
8ada417f 14887
1cb36a98 14888 sparc*-*-*)
a3bba767
JJ
14889 echo "$as_me:$LINENO: checking assembler for .register" >&5
14890echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
ba479fd2
NN
14891if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14892 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14893else
8ada417f
ZW
14894 gcc_cv_as_sparc_register_op=no
14895 if test x$gcc_cv_as != x; then
6e3f3080 14896 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
14897 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14899 (eval $ac_try) 2>&5
14900 ac_status=$?
14901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14902 (exit $ac_status); }; }
8ada417f
ZW
14903 then
14904 gcc_cv_as_sparc_register_op=yes
14905 else
14906 echo "configure: failed program was" >&5
14907 cat conftest.s >&5
14908 fi
14909 rm -f conftest.o conftest.s
14910 fi
cafe096b 14911fi
a3bba767
JJ
14912echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
14913echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 14914if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
14915
14916cat >>confdefs.h <<\_ACEOF
1cb36a98 14917#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 14918_ACEOF
1cb36a98 14919
8ada417f 14920fi
1cb36a98 14921
a3bba767
JJ
14922 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
14923echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
ba479fd2
NN
14924if test "${gcc_cv_as_sparc_relax+set}" = set; then
14925 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 14926else
8ada417f
ZW
14927 gcc_cv_as_sparc_relax=no
14928 if test x$gcc_cv_as != x; then
6e3f3080 14929 echo '.text' > conftest.s
ba479fd2
NN
14930 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
14931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14932 (eval $ac_try) 2>&5
14933 ac_status=$?
14934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14935 (exit $ac_status); }; }
8ada417f
ZW
14936 then
14937 gcc_cv_as_sparc_relax=yes
14938 else
14939 echo "configure: failed program was" >&5
14940 cat conftest.s >&5
14941 fi
14942 rm -f conftest.o conftest.s
14943 fi
cafe096b 14944fi
a3bba767
JJ
14945echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
14946echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 14947if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
14948
14949cat >>confdefs.h <<\_ACEOF
e95b1e6a 14950#define HAVE_AS_RELAX_OPTION 1
ba479fd2 14951_ACEOF
e95b1e6a 14952
8ada417f 14953fi
e95b1e6a 14954
a3bba767
JJ
14955 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
14956echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
ba479fd2
NN
14957if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
14958 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 14959else
8ada417f
ZW
14960 gcc_cv_as_sparc_ua_pcrel=no
14961 if test x$gcc_cv_as != x; then
6e3f3080 14962 echo '.text
8ada417f
ZW
14963foo:
14964 nop
14965.data
14966.align 4
14967.byte 0
14968.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
14969 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14971 (eval $ac_try) 2>&5
14972 ac_status=$?
14973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14974 (exit $ac_status); }; }
8ada417f
ZW
14975 then
14976 if test x$gcc_cv_ld != x \
14977 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
14978 gcc_cv_as_sparc_ua_pcrel=yes
14979 fi
14980 rm -f conftest
14981 else
14982 echo "configure: failed program was" >&5
14983 cat conftest.s >&5
14984 fi
14985 rm -f conftest.o conftest.s
14986 fi
cafe096b 14987fi
a3bba767
JJ
14988echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
14989echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 14990if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
14991
14992cat >>confdefs.h <<\_ACEOF
17e9e88c 14993#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 14994_ACEOF
17e9e88c 14995
17e9e88c 14996
a3bba767
JJ
14997 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
14998echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
ba479fd2
NN
14999if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
15000 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 15001else
8ada417f
ZW
15002 gcc_cv_as_sparc_ua_pcrel_hidden=no
15003 if test x$gcc_cv_as != x; then
6e3f3080 15004 echo '.data
8ada417f
ZW
15005.align 4
15006.byte 0x31
15007.uaword %r_disp32(foo)
15008.byte 0x32, 0x33, 0x34
15009.global foo
15010.hidden foo
15011foo:
15012.skip 4' > conftest.s
ba479fd2
NN
15013 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
15014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15015 (eval $ac_try) 2>&5
15016 ac_status=$?
15017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15018 (exit $ac_status); }; }
8ada417f
ZW
15019 then
15020 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
15021 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
15022 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
15023 | grep ' 31000000 07323334' > /dev/null 2>&1; then
15024 if $gcc_cv_objdump -R conftest 2> /dev/null \
15025 | grep 'DISP32' > /dev/null 2>&1; then
15026 :
15027 else
15028 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 15029 fi
8ada417f
ZW
15030 fi
15031 rm -f conftest
15032 else
15033 echo "configure: failed program was" >&5
15034 cat conftest.s >&5
15035 fi
15036 rm -f conftest.o conftest.s
15037 fi
cafe096b 15038fi
a3bba767
JJ
15039echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
15040echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 15041if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
15042
15043cat >>confdefs.h <<\_ACEOF
cf7b8b0d 15044#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 15045_ACEOF
cf7b8b0d 15046
8ada417f 15047fi
ba479fd2 15048
8ada417f 15049fi # unaligned pcrel relocs
cf7b8b0d 15050
a3bba767
JJ
15051 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
15052echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
ba479fd2
NN
15053if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
15054 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 15055else
8ada417f
ZW
15056 gcc_cv_as_sparc_offsetable_lo10=no
15057 if test x$gcc_cv_as != x; then
6e3f3080 15058 echo '.text
8ada417f
ZW
15059 or %g1, %lo(ab) + 12, %g1
15060 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
15061 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
15062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15063 (eval $ac_try) 2>&5
15064 ac_status=$?
15065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15066 (exit $ac_status); }; }
8ada417f
ZW
15067 then
15068 if test x$gcc_cv_objdump != x \
ecb0ccbc 15069 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 15070 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 15071 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
15072 fi
15073 else
15074 echo "configure: failed program was" >&5
15075 cat conftest.s >&5
15076 fi
15077 rm -f conftest.o conftest.s
15078 fi
cafe096b 15079fi
a3bba767
JJ
15080echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
15081echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 15082if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
15083
15084cat >>confdefs.h <<\_ACEOF
1cb36a98 15085#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 15086_ACEOF
1cb36a98 15087
8ada417f 15088fi
1cb36a98
RH
15089 ;;
15090
c307e6dd 15091 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
15092 case $target_os in
15093 cygwin* | pe | mingw32*)
15094 # Used for DWARF 2 in PE
a3bba767
JJ
15095 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
15096echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
d38bc601
BF
15097if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
15098 echo $ECHO_N "(cached) $ECHO_C" >&6
15099else
15100 gcc_cv_as_ix86_pe_secrel32=no
15101 if test $in_tree_gas = yes; then
15102 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
15103 then gcc_cv_as_ix86_pe_secrel32=yes
15104fi
15105 elif test x$gcc_cv_as != x; then
15106 echo '.text
15107foo: nop
15108.data
15109 .secrel32 foo' > conftest.s
15110 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15112 (eval $ac_try) 2>&5
15113 ac_status=$?
15114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15115 (exit $ac_status); }; }
15116 then
15117 if test x$gcc_cv_ld != x \
15118 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
15119 gcc_cv_as_ix86_pe_secrel32=yes
15120 fi
15121 rm -f conftest
15122 else
15123 echo "configure: failed program was" >&5
15124 cat conftest.s >&5
15125 fi
15126 rm -f conftest.o conftest.s
15127 fi
15128fi
a3bba767
JJ
15129echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
15130echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
d38bc601
BF
15131if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
15132
15133cat >>confdefs.h <<\_ACEOF
15134#define HAVE_GAS_PE_SECREL32_RELOC 1
15135_ACEOF
15136
15137fi
15138 ;;
15139 esac
15140
a3bba767
JJ
15141 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
15142echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
ba479fd2
NN
15143if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
15144 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15145else
15146 gcc_cv_as_ix86_filds_fists=no
15147 if test $in_tree_gas = yes; then
15148 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
15149 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 15150fi
8ada417f 15151 elif test x$gcc_cv_as != x; then
6e3f3080 15152 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
15153 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15155 (eval $ac_try) 2>&5
15156 ac_status=$?
15157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15158 (exit $ac_status); }; }
8ada417f
ZW
15159 then
15160 gcc_cv_as_ix86_filds_fists=yes
15161 else
15162 echo "configure: failed program was" >&5
15163 cat conftest.s >&5
981d4858 15164 fi
8ada417f
ZW
15165 rm -f conftest.o conftest.s
15166 fi
15167fi
a3bba767
JJ
15168echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
15169echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 15170if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
15171
15172cat >>confdefs.h <<\_ACEOF
8ada417f 15173#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 15174_ACEOF
ad9c4d9f 15175
f6f5dff2
RO
15176fi
15177
a3bba767
JJ
15178 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
15179echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
ba479fd2
NN
15180if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
15181 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
15182else
15183 gcc_cv_as_ix86_cmov_sun_syntax=no
15184 if test x$gcc_cv_as != x; then
6e3f3080 15185 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
15186 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15188 (eval $ac_try) 2>&5
15189 ac_status=$?
15190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15191 (exit $ac_status); }; }
f6f5dff2
RO
15192 then
15193 gcc_cv_as_ix86_cmov_sun_syntax=yes
15194 else
15195 echo "configure: failed program was" >&5
15196 cat conftest.s >&5
15197 fi
15198 rm -f conftest.o conftest.s
15199 fi
15200fi
a3bba767
JJ
15201echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
15202echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 15203if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
15204
15205cat >>confdefs.h <<\_ACEOF
f6f5dff2 15206#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 15207_ACEOF
f6f5dff2 15208
b6c03bcd
RS
15209fi
15210
a3bba767
JJ
15211 echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5
15212echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6
b6c03bcd
RS
15213if test "${gcc_cv_as_ix86_ffreep+set}" = set; then
15214 echo $ECHO_N "(cached) $ECHO_C" >&6
15215else
15216 gcc_cv_as_ix86_ffreep=no
15217 if test x$gcc_cv_as != x; then
15218 echo 'ffreep %st(1)' > conftest.s
15219 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15221 (eval $ac_try) 2>&5
15222 ac_status=$?
15223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15224 (exit $ac_status); }; }
15225 then
15226 gcc_cv_as_ix86_ffreep=yes
15227 else
15228 echo "configure: failed program was" >&5
15229 cat conftest.s >&5
15230 fi
15231 rm -f conftest.o conftest.s
15232 fi
15233fi
a3bba767
JJ
15234echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5
15235echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6
b6c03bcd
RS
15236if test $gcc_cv_as_ix86_ffreep = yes; then
15237
15238cat >>confdefs.h <<\_ACEOF
15239#define HAVE_AS_IX86_FFREEP 1
15240_ACEOF
15241
38ca3765
UB
15242fi
15243
a3bba767
JJ
15244 echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5
15245echo $ECHO_N "checking assembler for sahf mnemonic... $ECHO_C" >&6
38ca3765
UB
15246if test "${gcc_cv_as_ix86_sahf+set}" = set; then
15247 echo $ECHO_N "(cached) $ECHO_C" >&6
15248else
15249 gcc_cv_as_ix86_sahf=no
15250 if test x$gcc_cv_as != x; then
15251 echo 'sahf' > conftest.s
15252 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15254 (eval $ac_try) 2>&5
15255 ac_status=$?
15256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15257 (exit $ac_status); }; }
15258 then
15259 gcc_cv_as_ix86_sahf=yes
15260 else
15261 echo "configure: failed program was" >&5
15262 cat conftest.s >&5
15263 fi
15264 rm -f conftest.o conftest.s
15265 fi
15266fi
a3bba767
JJ
15267echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_sahf" >&5
15268echo "${ECHO_T}$gcc_cv_as_ix86_sahf" >&6
38ca3765
UB
15269if test $gcc_cv_as_ix86_sahf = yes; then
15270
15271cat >>confdefs.h <<\_ACEOF
15272#define HAVE_AS_IX86_SAHF 1
15273_ACEOF
15274
68b92f78
RS
15275fi
15276
a3bba767
JJ
15277 echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5
15278echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6
68b92f78
RS
15279if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then
15280 echo $ECHO_N "(cached) $ECHO_C" >&6
15281else
15282 gcc_cv_as_ix86_diff_sect_delta=no
15283 if test x$gcc_cv_as != x; then
15284 echo '.section .rodata
15285.L1:
15286 .long .L2-.L1
15287 .long .L3-.L1
15288 .text
15289.L3: nop
15290.L2: nop' > conftest.s
15291 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15293 (eval $ac_try) 2>&5
15294 ac_status=$?
15295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15296 (exit $ac_status); }; }
15297 then
15298 gcc_cv_as_ix86_diff_sect_delta=yes
15299 else
15300 echo "configure: failed program was" >&5
15301 cat conftest.s >&5
15302 fi
15303 rm -f conftest.o conftest.s
15304 fi
15305fi
a3bba767
JJ
15306echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
15307echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6
68b92f78
RS
15308if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
15309
15310cat >>confdefs.h <<\_ACEOF
15311#define HAVE_AS_IX86_DIFF_SECT_DELTA 1
15312_ACEOF
15313
ad9c4d9f
NN
15314fi
15315
6f3ca281
ZW
15316 # This one is used unconditionally by i386.[ch]; it is to be defined
15317 # to 1 if the feature is present, 0 otherwise.
a3bba767
JJ
15318 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
15319echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
ba479fd2
NN
15320if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
15321 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15322else
15323 gcc_cv_as_ix86_gotoff_in_data=no
15324 if test $in_tree_gas = yes; then
15325 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15326 then gcc_cv_as_ix86_gotoff_in_data=yes
15327fi
15328 elif test x$gcc_cv_as != x; then
6e3f3080 15329 echo ' .text
f88c65f7
RH
15330.L0:
15331 nop
15332 .data
8ada417f 15333 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
15334 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15336 (eval $ac_try) 2>&5
15337 ac_status=$?
15338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15339 (exit $ac_status); }; }
8ada417f
ZW
15340 then
15341 gcc_cv_as_ix86_gotoff_in_data=yes
15342 else
15343 echo "configure: failed program was" >&5
15344 cat conftest.s >&5
f88c65f7 15345 fi
8ada417f
ZW
15346 rm -f conftest.o conftest.s
15347 fi
15348fi
a3bba767
JJ
15349echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
15350echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 15351
6f3ca281 15352
ba479fd2 15353cat >>confdefs.h <<_ACEOF
6f3ca281 15354#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 15355_ACEOF
f88c65f7 15356
1cb36a98 15357 ;;
ef1ecf87
RH
15358
15359 ia64*-*-*)
a3bba767
JJ
15360 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
15361echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
ba479fd2
NN
15362if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
15363 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 15364else
8ada417f
ZW
15365 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
15366 if test $in_tree_gas = yes; then
15367 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15368 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 15369fi
8ada417f 15370 elif test x$gcc_cv_as != x; then
6e3f3080 15371 echo ' .text
ef1ecf87
RH
15372 addl r15 = @ltoffx(x#), gp
15373 ;;
cfa9ee99 15374 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
15375 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15377 (eval $ac_try) 2>&5
15378 ac_status=$?
15379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15380 (exit $ac_status); }; }
8ada417f 15381 then
cfa9ee99 15382 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
15383 else
15384 echo "configure: failed program was" >&5
15385 cat conftest.s >&5
2c4a9cff 15386 fi
8ada417f
ZW
15387 rm -f conftest.o conftest.s
15388 fi
15389fi
a3bba767
JJ
15390echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
15391echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 15392if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
15393
15394cat >>confdefs.h <<\_ACEOF
cfa9ee99 15395#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 15396_ACEOF
8ada417f 15397
cfa9ee99 15398fi
8ada417f 15399
2c4a9cff 15400 ;;
8ada417f 15401
2c4a9cff 15402 powerpc*-*-*)
8ada417f 15403 case $target in
432218ba
DE
15404 *-*-aix*) conftest_s=' .machine "pwr5"
15405 .csect .text[PR]
6b37db3c 15406 mfcr 3,128';;
8af4d362 15407 *-*-darwin*)
a3bba767
JJ
15408 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
15409echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
8af4d362
PB
15410if test "${gcc_cv_as_machine_directive+set}" = set; then
15411 echo $ECHO_N "(cached) $ECHO_C" >&6
15412else
15413 gcc_cv_as_machine_directive=no
15414 if test x$gcc_cv_as != x; then
15415 echo ' .machine ppc7400' > conftest.s
15416 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15418 (eval $ac_try) 2>&5
15419 ac_status=$?
15420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15421 (exit $ac_status); }; }
15422 then
15423 gcc_cv_as_machine_directive=yes
15424 else
15425 echo "configure: failed program was" >&5
15426 cat conftest.s >&5
15427 fi
15428 rm -f conftest.o conftest.s
15429 fi
15430fi
a3bba767
JJ
15431echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
15432echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
8af4d362
PB
15433
15434 if test x$gcc_cv_as_machine_directive != xyes; then
15435 echo "*** This target requires an assembler supporting \".machine\"" >&2
15436 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
15437 test x$build = x$target && exit 1
15438 fi
15439 conftest_s=' .text
6b37db3c 15440 mfcr r3,128';;
4c67db14 15441 *) conftest_s=' .machine power4
d2ab3e37 15442 .text
6b37db3c 15443 mfcr 3,128';;
8ada417f 15444 esac
8ada417f 15445
a3bba767
JJ
15446 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
15447echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
ba479fd2
NN
15448if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
15449 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 15450else
8ada417f
ZW
15451 gcc_cv_as_powerpc_mfcrf=no
15452 if test $in_tree_gas = yes; then
15453 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15454 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 15455fi
8ada417f 15456 elif test x$gcc_cv_as != x; then
6e3f3080 15457 echo "$conftest_s" > conftest.s
ba479fd2
NN
15458 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15460 (eval $ac_try) 2>&5
15461 ac_status=$?
15462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15463 (exit $ac_status); }; }
8ada417f
ZW
15464 then
15465 gcc_cv_as_powerpc_mfcrf=yes
15466 else
15467 echo "configure: failed program was" >&5
15468 cat conftest.s >&5
15469 fi
15470 rm -f conftest.o conftest.s
15471 fi
2c4a9cff 15472fi
a3bba767
JJ
15473echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
15474echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 15475if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
15476
15477cat >>confdefs.h <<\_ACEOF
2c4a9cff 15478#define HAVE_AS_MFCRF 1
ba479fd2 15479_ACEOF
ef1ecf87 15480
8ada417f 15481fi
432218ba
DE
15482
15483 case $target in
15484 *-*-aix*) conftest_s=' .machine "pwr5"
15485 .csect .text[PR]
15486 popcntb 3,3';;
15487 *) conftest_s=' .machine power5
15488 .text
15489 popcntb 3,3';;
15490 esac
15491
a3bba767
JJ
15492 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
15493echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
432218ba
DE
15494if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
15495 echo $ECHO_N "(cached) $ECHO_C" >&6
15496else
15497 gcc_cv_as_powerpc_popcntb=no
15498 if test $in_tree_gas = yes; then
15499 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15500 then gcc_cv_as_powerpc_popcntb=yes
15501fi
15502 elif test x$gcc_cv_as != x; then
15503 echo "$conftest_s" > conftest.s
15504 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15506 (eval $ac_try) 2>&5
15507 ac_status=$?
15508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15509 (exit $ac_status); }; }
15510 then
15511 gcc_cv_as_powerpc_popcntb=yes
15512 else
15513 echo "configure: failed program was" >&5
15514 cat conftest.s >&5
15515 fi
15516 rm -f conftest.o conftest.s
15517 fi
15518fi
a3bba767
JJ
15519echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
15520echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
432218ba
DE
15521if test $gcc_cv_as_powerpc_popcntb = yes; then
15522
15523cat >>confdefs.h <<\_ACEOF
15524#define HAVE_AS_POPCNTB 1
15525_ACEOF
15526
9719f3b7
DE
15527fi
15528
15529 case $target in
15530 *-*-aix*) conftest_s=' .machine "pwr5x"
15531 .csect .text[PR]
15532 frin 1,1';;
1e04bfdc 15533 *) conftest_s=' .machine power5
9719f3b7
DE
15534 .text
15535 frin 1,1';;
15536 esac
15537
a3bba767
JJ
15538 echo "$as_me:$LINENO: checking assembler for fp round support" >&5
15539echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
9719f3b7
DE
15540if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
15541 echo $ECHO_N "(cached) $ECHO_C" >&6
15542else
15543 gcc_cv_as_powerpc_fprnd=no
15544 if test $in_tree_gas = yes; then
15545 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15546 then gcc_cv_as_powerpc_fprnd=yes
15547fi
15548 elif test x$gcc_cv_as != x; then
15549 echo "$conftest_s" > conftest.s
15550 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15552 (eval $ac_try) 2>&5
15553 ac_status=$?
15554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15555 (exit $ac_status); }; }
15556 then
15557 gcc_cv_as_powerpc_fprnd=yes
15558 else
15559 echo "configure: failed program was" >&5
15560 cat conftest.s >&5
15561 fi
15562 rm -f conftest.o conftest.s
15563 fi
15564fi
a3bba767
JJ
15565echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
15566echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
9719f3b7
DE
15567if test $gcc_cv_as_powerpc_fprnd = yes; then
15568
15569cat >>confdefs.h <<\_ACEOF
15570#define HAVE_AS_FPRND 1
15571_ACEOF
15572
44cd321e
PS
15573fi
15574
15575 case $target in
15576 *-*-aix*) conftest_s=' .machine "pwr6"
15577 .csect .text[PR]
15578 mffgpr 1,3';;
15579 *) conftest_s=' .machine power6
15580 .text
15581 mffgpr 1,3';;
15582 esac
15583
a3bba767
JJ
15584 echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5
15585echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6
44cd321e
PS
15586if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then
15587 echo $ECHO_N "(cached) $ECHO_C" >&6
15588else
15589 gcc_cv_as_powerpc_mfpgpr=no
15590 if test $in_tree_gas = yes; then
15591 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
15592 then gcc_cv_as_powerpc_mfpgpr=yes
15593fi
15594 elif test x$gcc_cv_as != x; then
15595 echo "$conftest_s" > conftest.s
15596 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15598 (eval $ac_try) 2>&5
15599 ac_status=$?
15600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15601 (exit $ac_status); }; }
15602 then
15603 gcc_cv_as_powerpc_mfpgpr=yes
15604 else
15605 echo "configure: failed program was" >&5
15606 cat conftest.s >&5
15607 fi
15608 rm -f conftest.o conftest.s
15609 fi
15610fi
a3bba767
JJ
15611echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5
15612echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6
44cd321e
PS
15613if test $gcc_cv_as_powerpc_mfpgpr = yes; then
15614
15615cat >>confdefs.h <<\_ACEOF
15616#define HAVE_AS_MFPGPR 1
15617_ACEOF
15618
432218ba
DE
15619fi
15620
7f970b70
AM
15621 case $target in
15622 *-*-aix*) conftest_s=' .csect .text[PR]
15623LCF..0:
15624 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
15625 *-*-darwin*)
15626 conftest_s=' .text
15627LCF0:
15628 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
15629 *) conftest_s=' .text
15630.LCF0:
15631 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
15632 esac
15633
a3bba767
JJ
15634 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
15635echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
695d8830
AS
15636if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
15637 echo $ECHO_N "(cached) $ECHO_C" >&6
15638else
15639 gcc_cv_as_powerpc_rel16=no
15640 if test $in_tree_gas = yes; then
15641 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15642 then gcc_cv_as_powerpc_rel16=yes
15643fi
15644 elif test x$gcc_cv_as != x; then
15645 echo "$conftest_s" > conftest.s
15646 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15648 (eval $ac_try) 2>&5
15649 ac_status=$?
15650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15651 (exit $ac_status); }; }
15652 then
15653 gcc_cv_as_powerpc_rel16=yes
15654 else
15655 echo "configure: failed program was" >&5
15656 cat conftest.s >&5
15657 fi
15658 rm -f conftest.o conftest.s
15659 fi
15660fi
a3bba767
JJ
15661echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
15662echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
695d8830
AS
15663if test $gcc_cv_as_powerpc_rel16 = yes; then
15664
15665cat >>confdefs.h <<\_ACEOF
15666#define HAVE_AS_REL16 1
15667_ACEOF
15668
15669fi
15670
b639c3c2
JJ
15671 case $target in
15672 *-*-aix*) conftest_s=' .machine "pwr6"
15673 .csect .text[PR]
15674 cmpb 3,4,5';;
15675 *) conftest_s=' .machine power6
15676 .text
15677 cmpb 3,4,5';;
15678 esac
15679
a3bba767
JJ
15680 echo "$as_me:$LINENO: checking assembler for compare bytes support" >&5
15681echo $ECHO_N "checking assembler for compare bytes support... $ECHO_C" >&6
b639c3c2
JJ
15682if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then
15683 echo $ECHO_N "(cached) $ECHO_C" >&6
15684else
15685 gcc_cv_as_powerpc_cmpb=no
15686 if test $in_tree_gas = yes; then
15687 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
15688 then gcc_cv_as_powerpc_cmpb=yes
15689fi
15690 elif test x$gcc_cv_as != x; then
15691 echo "$conftest_s" > conftest.s
15692 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15694 (eval $ac_try) 2>&5
15695 ac_status=$?
15696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15697 (exit $ac_status); }; }
15698 then
15699 gcc_cv_as_powerpc_cmpb=yes
15700 else
15701 echo "configure: failed program was" >&5
15702 cat conftest.s >&5
15703 fi
15704 rm -f conftest.o conftest.s
15705 fi
15706fi
a3bba767
JJ
15707echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_cmpb" >&5
15708echo "${ECHO_T}$gcc_cv_as_powerpc_cmpb" >&6
b639c3c2
JJ
15709if test $gcc_cv_as_powerpc_cmpb = yes; then
15710
15711cat >>confdefs.h <<\_ACEOF
15712#define HAVE_AS_CMPB 1
15713_ACEOF
15714
15715fi
15716
15717 case $target in
15718 *-*-aix*) conftest_s=' .machine "pwr6"
15719 .csect .text[PR]
0d74c0ee 15720 dadd 1,2,3';;
b639c3c2
JJ
15721 *) conftest_s=' .machine power6
15722 .text
0d74c0ee 15723 dadd 1,2,3';;
b639c3c2
JJ
15724 esac
15725
a3bba767
JJ
15726 echo "$as_me:$LINENO: checking assembler for decimal float support" >&5
15727echo $ECHO_N "checking assembler for decimal float support... $ECHO_C" >&6
b639c3c2
JJ
15728if test "${gcc_cv_as_powerpc_dfp+set}" = set; then
15729 echo $ECHO_N "(cached) $ECHO_C" >&6
15730else
15731 gcc_cv_as_powerpc_dfp=no
15732 if test $in_tree_gas = yes; then
15733 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
15734 then gcc_cv_as_powerpc_dfp=yes
15735fi
15736 elif test x$gcc_cv_as != x; then
15737 echo "$conftest_s" > conftest.s
15738 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15740 (eval $ac_try) 2>&5
15741 ac_status=$?
15742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15743 (exit $ac_status); }; }
15744 then
15745 gcc_cv_as_powerpc_dfp=yes
15746 else
15747 echo "configure: failed program was" >&5
15748 cat conftest.s >&5
15749 fi
15750 rm -f conftest.o conftest.s
15751 fi
15752fi
a3bba767
JJ
15753echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_dfp" >&5
15754echo "${ECHO_T}$gcc_cv_as_powerpc_dfp" >&6
b639c3c2
JJ
15755if test $gcc_cv_as_powerpc_dfp = yes; then
15756
15757cat >>confdefs.h <<\_ACEOF
15758#define HAVE_AS_DFP 1
15759_ACEOF
15760
e51917ae
JM
15761fi
15762
15763 echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
15764echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
15765if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then
15766 echo $ECHO_N "(cached) $ECHO_C" >&6
15767else
15768 gcc_cv_as_powerpc_gnu_attribute=no
15769 if test $in_tree_gas = yes; then
15770 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
15771 then gcc_cv_as_powerpc_gnu_attribute=yes
15772fi
15773 elif test x$gcc_cv_as != x; then
15774 echo '.gnu_attribute 4,1' > conftest.s
15775 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15777 (eval $ac_try) 2>&5
15778 ac_status=$?
15779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15780 (exit $ac_status); }; }
15781 then
15782 gcc_cv_as_powerpc_gnu_attribute=yes
15783 else
15784 echo "configure: failed program was" >&5
15785 cat conftest.s >&5
15786 fi
15787 rm -f conftest.o conftest.s
15788 fi
15789fi
15790echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_gnu_attribute" >&5
15791echo "${ECHO_T}$gcc_cv_as_powerpc_gnu_attribute" >&6
15792if test $gcc_cv_as_powerpc_gnu_attribute = yes; then
15793
15794cat >>confdefs.h <<\_ACEOF
15795#define HAVE_AS_GNU_ATTRIBUTE 1
15796_ACEOF
15797
7f970b70 15798fi
8ada417f
ZW
15799 ;;
15800
15801 mips*-*-*)
a3bba767
JJ
15802 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
15803echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
15804if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
15805 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15806else
15807 gcc_cv_as_mips_explicit_relocs=no
15808 if test $in_tree_gas = yes; then
15809 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15810 then gcc_cv_as_mips_explicit_relocs=yes
15811fi
15812 elif test x$gcc_cv_as != x; then
6e3f3080 15813 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
15814 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15816 (eval $ac_try) 2>&5
15817 ac_status=$?
15818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15819 (exit $ac_status); }; }
8ada417f
ZW
15820 then
15821 gcc_cv_as_mips_explicit_relocs=yes
15822 else
15823 echo "configure: failed program was" >&5
15824 cat conftest.s >&5
ef1ecf87 15825 fi
8ada417f
ZW
15826 rm -f conftest.o conftest.s
15827 fi
15828fi
a3bba767
JJ
15829echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
15830echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
15831if test $gcc_cv_as_mips_explicit_relocs = yes; then
15832 if test x$target_cpu_default = x
15833 then target_cpu_default=MASK_EXPLICIT_RELOCS
15834 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
15835 fi
4551169f 15836fi
a3bba767
JJ
15837 echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5
15838echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6
4551169f
RS
15839if test "${gcc_cv_as_mips_no_shared+set}" = set; then
15840 echo $ECHO_N "(cached) $ECHO_C" >&6
15841else
15842 gcc_cv_as_mips_no_shared=no
15843 if test $in_tree_gas = yes; then
15844 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
15845 then gcc_cv_as_mips_no_shared=yes
15846fi
15847 elif test x$gcc_cv_as != x; then
15848 echo 'nop' > conftest.s
15849 if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5'
15850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15851 (eval $ac_try) 2>&5
15852 ac_status=$?
15853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15854 (exit $ac_status); }; }
15855 then
15856 gcc_cv_as_mips_no_shared=yes
15857 else
15858 echo "configure: failed program was" >&5
15859 cat conftest.s >&5
15860 fi
15861 rm -f conftest.o conftest.s
15862 fi
15863fi
a3bba767
JJ
15864echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5
15865echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6
4551169f
RS
15866if test $gcc_cv_as_mips_no_shared = yes; then
15867
15868cat >>confdefs.h <<\_ACEOF
15869#define HAVE_AS_NO_SHARED 1
15870_ACEOF
15871
dcb957d9
JM
15872fi
15873
15874 echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
15875echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
15876if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then
15877 echo $ECHO_N "(cached) $ECHO_C" >&6
15878else
15879 gcc_cv_as_mips_gnu_attribute=no
15880 if test $in_tree_gas = yes; then
15881 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
15882 then gcc_cv_as_mips_gnu_attribute=yes
15883fi
15884 elif test x$gcc_cv_as != x; then
15885 echo '.gnu_attribute 4,1' > conftest.s
15886 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15888 (eval $ac_try) 2>&5
15889 ac_status=$?
15890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15891 (exit $ac_status); }; }
15892 then
15893 gcc_cv_as_mips_gnu_attribute=yes
15894 else
15895 echo "configure: failed program was" >&5
15896 cat conftest.s >&5
15897 fi
15898 rm -f conftest.o conftest.s
15899 fi
15900fi
15901echo "$as_me:$LINENO: result: $gcc_cv_as_mips_gnu_attribute" >&5
15902echo "${ECHO_T}$gcc_cv_as_mips_gnu_attribute" >&6
15903if test $gcc_cv_as_mips_gnu_attribute = yes; then
15904
15905cat >>confdefs.h <<\_ACEOF
15906#define HAVE_AS_GNU_ATTRIBUTE 1
15907_ACEOF
15908
8ada417f 15909fi
dbad5e72
SE
15910 ;;
15911esac
8ada417f 15912
dbad5e72
SE
15913# Mips and HP-UX need the GNU assembler.
15914# Linux on IA64 might be able to use the Intel assembler.
15915
15916case "$target" in
15917 mips*-*-* | *-*-hpux* )
82563d35
RS
15918 if test x$gas_flag = xyes \
15919 || test x"$host" != x"$build" \
15920 || test ! -x "$gcc_cv_as" \
15921 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
15922 :
15923 else
15924 echo "*** This configuration requires the GNU assembler" >&2
15925 exit 1
15926 fi
ef1ecf87 15927 ;;
1cb36a98 15928esac
dbad5e72 15929
9d147085
RH
15930# ??? Not all targets support dwarf2 debug_line, even within a version
15931# of gas. Moreover, we need to emit a valid instruction to trigger any
15932# info to the output file. So, as supported targets are added to gas 2.11,
15933# add some instruction here to (also) show we expect this might work.
15934# ??? Once 2.11 is released, probably need to add first known working
15935# version to the per-target configury.
15936case "$target" in
80486e06 15937 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 15938 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
714f737f 15939 | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* | spu-*-*)
9d147085
RH
15940 insn="nop"
15941 ;;
57116d8d 15942 ia64*-*-* | s390*-*-*)
9d147085
RH
15943 insn="nop 0"
15944 ;;
2853bc5a
HPN
15945 mmix-*-*)
15946 insn="swym 0"
15947 ;;
8ada417f
ZW
15948esac
15949if test x"$insn" != x; then
15950 conftest_s="\
15951 .file 1 \"conftest.s\"
15952 .loc 1 3 0
15953 $insn"
a3bba767
JJ
15954 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
15955echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
ba479fd2
NN
15956if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
15957 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15958else
15959 gcc_cv_as_dwarf2_debug_line=no
15960 if test $in_tree_gas = yes; then
15961 if test $in_tree_gas_is_elf = yes \
15962 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15963 then gcc_cv_as_dwarf2_debug_line=yes
15964fi
15965 elif test x$gcc_cv_as != x; then
6e3f3080 15966 echo "$conftest_s" > conftest.s
ba479fd2
NN
15967 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15969 (eval $ac_try) 2>&5
15970 ac_status=$?
15971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15972 (exit $ac_status); }; }
8ada417f 15973 then
080a5bb0
EB
15974 if test x$gcc_cv_objdump != x \
15975 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
15976 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
15977 gcc_cv_as_dwarf2_debug_line=yes
15978 fi
15979 else
15980 echo "configure: failed program was" >&5
15981 cat conftest.s >&5
15982 fi
15983 rm -f conftest.o conftest.s
15984 fi
15985fi
a3bba767
JJ
15986echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
15987echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 15988
ad9c4d9f 15989
8ada417f
ZW
15990# The .debug_line file table must be in the exact order that
15991# we specified the files, since these indices are also used
15992# by DW_AT_decl_file. Approximate this test by testing if
15993# the assembler bitches if the same index is assigned twice.
a3bba767
JJ
15994 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
15995echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
ba479fd2
NN
15996if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
15997 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15998else
15999 gcc_cv_as_dwarf2_file_buggy=no
16000 if test x$gcc_cv_as != x; then
6e3f3080 16001 echo ' .file 1 "foo.s"
8ada417f 16002 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
16003 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16005 (eval $ac_try) 2>&5
16006 ac_status=$?
16007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16008 (exit $ac_status); }; }
8ada417f
ZW
16009 then
16010 gcc_cv_as_dwarf2_file_buggy=yes
16011 else
16012 echo "configure: failed program was" >&5
16013 cat conftest.s >&5
16014 fi
16015 rm -f conftest.o conftest.s
16016 fi
ad9c4d9f 16017fi
a3bba767
JJ
16018echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
16019echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
16020
16021
16022 if test $gcc_cv_as_dwarf2_debug_line = yes \
16023 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
16024
16025cat >>confdefs.h <<\_ACEOF
9d147085 16026#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 16027_ACEOF
9d147085 16028
8ada417f 16029 fi
ad9c4d9f 16030
a3bba767
JJ
16031 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
16032echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
ba479fd2
NN
16033if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
16034 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16035else
16036 gcc_cv_as_gdwarf2_flag=no
16037 if test $in_tree_gas = yes; then
16038 if test $in_tree_gas_is_elf = yes \
16039 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
16040 then gcc_cv_as_gdwarf2_flag=yes
16041fi
16042 elif test x$gcc_cv_as != x; then
6e3f3080 16043 echo "$insn" > conftest.s
ba479fd2
NN
16044 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
16045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16046 (eval $ac_try) 2>&5
16047 ac_status=$?
16048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16049 (exit $ac_status); }; }
8ada417f
ZW
16050 then
16051 gcc_cv_as_gdwarf2_flag=yes
16052 else
16053 echo "configure: failed program was" >&5
16054 cat conftest.s >&5
16055 fi
16056 rm -f conftest.o conftest.s
16057 fi
ad9c4d9f 16058fi
a3bba767
JJ
16059echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
16060echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 16061if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
16062
16063cat >>confdefs.h <<\_ACEOF
5f0e9ea2 16064#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 16065_ACEOF
5f0e9ea2
GK
16066
16067fi
ad9c4d9f 16068
a3bba767
JJ
16069 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
16070echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
ba479fd2
NN
16071if test "${gcc_cv_as_gstabs_flag+set}" = set; then
16072 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16073else
16074 gcc_cv_as_gstabs_flag=no
16075 if test $in_tree_gas = yes; then
16076 if test $in_tree_gas_is_elf = yes \
16077 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
16078 then gcc_cv_as_gstabs_flag=yes
16079fi
16080 elif test x$gcc_cv_as != x; then
6e3f3080 16081 echo "$insn" > conftest.s
ba479fd2
NN
16082 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
16083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16084 (eval $ac_try) 2>&5
16085 ac_status=$?
16086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16087 (exit $ac_status); }; }
8ada417f
ZW
16088 then
16089 # The native Solaris 9/Intel assembler doesn't understand --gstabs
16090 # and warns about it, but still exits successfully. So check for
16091 # this.
ba479fd2
NN
16092 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
16093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16094 (eval $ac_try) 2>&5
16095 ac_status=$?
16096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16097 (exit $ac_status); }; }
8ada417f
ZW
16098 then :
16099 else gcc_cv_as_gstabs_flag=yes
16100 fi
16101 else
16102 echo "configure: failed program was" >&5
16103 cat conftest.s >&5
16104 fi
16105 rm -f conftest.o conftest.s
16106 fi
ad9c4d9f 16107fi
a3bba767
JJ
16108echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
16109echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 16110if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
16111
16112cat >>confdefs.h <<\_ACEOF
5f0e9ea2 16113#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 16114_ACEOF
5f0e9ea2
GK
16115
16116fi
8ada417f 16117fi
5f0e9ea2 16118
a3bba767
JJ
16119echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5
16120echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6
03943c05
AO
16121if test "${gcc_cv_as_line_zero+set}" = set; then
16122 echo $ECHO_N "(cached) $ECHO_C" >&6
16123else
16124 gcc_cv_as_line_zero=no
16125 if test $in_tree_gas = yes; then
cf0eb7a1
AO
16126 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
16127 then gcc_cv_as_line_zero=yes
03943c05
AO
16128fi
16129 elif test "x$gcc_cv_as" != x; then
16130 { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
16131 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
16132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16133 (eval $ac_try) 2>&5
16134 ac_status=$?
16135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16136 (exit $ac_status); }; } &&
16137 test "x`cat conftest.out`" = x
16138 then
16139 gcc_cv_as_line_zero=yes
16140 else
16141 echo "configure: failed program was" >&5
16142 cat conftest.s >&5
16143 echo "configure: error output was" >&5
16144 cat conftest.out >&5
16145 fi
16146 rm -f conftest.o conftest.s conftest.out
16147 fi
16148fi
a3bba767
JJ
16149echo "$as_me:$LINENO: result: $gcc_cv_as_line_zero" >&5
16150echo "${ECHO_T}$gcc_cv_as_line_zero" >&6
03943c05
AO
16151if test "x$gcc_cv_as_line_zero" = xyes; then
16152
16153cat >>confdefs.h <<\_ACEOF
16154#define HAVE_AS_LINE_ZERO 1
16155_ACEOF
16156
16157fi
16158
a3bba767
JJ
16159echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
16160echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 16161gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 16162if test $in_tree_ld = yes ; then
5408ac6c
HPN
16163 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 \
16164 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
16165 gcc_cv_ld_ro_rw_mix=read-write
16166 fi
16167elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
16168 echo '.section myfoosect, "a"' > conftest1.s
16169 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 16170 echo '.byte 1' >> conftest2.s
90e145da 16171 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 16172 echo '.byte 0' >> conftest3.s
6cd656d0
KC
16173 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
16174 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
16175 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 16176 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 16177 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 16178 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 16179 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
16180 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
16181 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
16182 gcc_cv_ld_ro_rw_mix=read-only
16183 else
16184 gcc_cv_ld_ro_rw_mix=read-write
16185 fi
16186 fi
16187 fi
16188 rm -f conftest.* conftest[123].*
16189fi
16190if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
16191
16192cat >>confdefs.h <<\_ACEOF
96d0f4dc 16193#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 16194_ACEOF
96d0f4dc
JJ
16195
16196fi
a3bba767
JJ
16197echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
16198echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 16199
a3bba767
JJ
16200echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
16201echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 16202gcc_cv_ld_eh_frame_hdr=no
34a86c2b 16203if test $in_tree_ld = yes ; then
5408ac6c
HPN
16204 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 \
16205 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
16206 gcc_cv_ld_eh_frame_hdr=yes
16207 fi
16208elif test x$gcc_cv_ld != x; then
16209 # Check if linker supports --eh-frame-hdr option
16210 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
16211 gcc_cv_ld_eh_frame_hdr=yes
16212 fi
16213fi
232b67d9 16214
275b60d6 16215if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
16216
16217cat >>confdefs.h <<\_ACEOF
275b60d6 16218#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 16219_ACEOF
275b60d6
JJ
16220
16221fi
a3bba767
JJ
16222echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
16223echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 16224
a3bba767
JJ
16225echo "$as_me:$LINENO: checking linker position independent executable support" >&5
16226echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
16227gcc_cv_ld_pie=no
16228if test $in_tree_ld = yes ; then
5408ac6c
HPN
16229 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 \
16230 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
16231 gcc_cv_ld_pie=yes
16232 fi
16233elif test x$gcc_cv_ld != x; then
16234 # Check if linker supports -pie option
16235 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
16236 gcc_cv_ld_pie=yes
16237 fi
16238fi
16239if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
16240
16241cat >>confdefs.h <<\_ACEOF
24a4dd31 16242#define HAVE_LD_PIE 1
ba479fd2 16243_ACEOF
24a4dd31
JJ
16244
16245fi
a3bba767
JJ
16246echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
16247echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 16248
a3bba767
JJ
16249echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5
16250echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6
22ba88ef 16251gcc_cv_ld_eh_gc_sections=no
b639c3c2
JJ
16252if test $in_tree_ld = yes ; then
16253 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 \
16254 && test $in_tree_ld_is_elf = yes; then
16255 gcc_cv_ld_eh_gc_sections=yes
16256 fi
16257elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
16258 cat > conftest.s <<EOF
16259 .section .text
16260.globl _start
16261 .type _start, @function
16262_start:
16263 .long foo
16264 .size _start, .-_start
16265 .section .text.foo,"ax",@progbits
16266 .type foo, @function
16267foo:
16268 .long 0
16269 .size foo, .-foo
16270 .section .gcc_except_table.foo,"a",@progbits
16271.L0:
16272 .long 0
16273 .section .eh_frame,"a",@progbits
16274 .long .L0
16275EOF
16276 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
16277 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
16278 | grep "gc-sections option ignored" > /dev/null; then
16279 gcc_cv_ld_eh_gc_sections=no
16280 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
16281 gcc_cv_ld_eh_gc_sections=yes
16282 # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
16283 if test x$gcc_cv_as_comdat_group != xyes; then
16284 gcc_cv_ld_eh_gc_sections=no
16285 cat > conftest.s <<EOF
16286 .section .text
16287.globl _start
16288 .type _start, @function
16289_start:
16290 .long foo
16291 .size _start, .-_start
16292 .section .gnu.linkonce.t.foo,"ax",@progbits
16293 .type foo, @function
16294foo:
16295 .long 0
16296 .size foo, .-foo
16297 .section .gcc_except_table.foo,"a",@progbits
16298.L0:
16299 .long 0
16300 .section .eh_frame,"a",@progbits
16301 .long .L0
16302EOF
16303 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
16304 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
16305 | grep "gc-sections option ignored" > /dev/null; then
16306 gcc_cv_ld_eh_gc_sections=no
16307 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
16308 gcc_cv_ld_eh_gc_sections=yes
16309 fi
16310 fi
16311 fi
16312 fi
16313 fi
16314 rm -f conftest.s conftest.o conftest
16315fi
e9d207d9
EB
16316case "$target" in
16317 hppa*-*-linux*)
16318 # ??? This apparently exposes a binutils bug with PC-relative relocations.
16319 gcc_cv_ld_eh_gc_sections=no
16320 ;;
16321esac
22ba88ef
EB
16322if test x$gcc_cv_ld_eh_gc_sections = xyes; then
16323
16324cat >>confdefs.h <<\_ACEOF
16325#define HAVE_LD_EH_GC_SECTIONS 1
16326_ACEOF
16327
16328fi
a3bba767
JJ
16329echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5
16330echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6
22ba88ef 16331
8bb915b6
NN
16332# --------
16333# UNSORTED
16334# --------
16335
a3bba767
JJ
16336echo "$as_me:$LINENO: checking linker --as-needed support" >&5
16337echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
16338if test "${gcc_cv_ld_as_needed+set}" = set; then
16339 echo $ECHO_N "(cached) $ECHO_C" >&6
16340else
16341 gcc_cv_ld_as_needed=no
765f1bf9
AM
16342if test $in_tree_ld = yes ; then
16343 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 \
16344 && test $in_tree_ld_is_elf = yes; then
16345 gcc_cv_ld_as_needed=yes
16346 fi
16347elif test x$gcc_cv_ld != x; then
16348 # Check if linker supports --as-needed and --no-as-needed options
16349 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
16350 gcc_cv_ld_as_needed=yes
16351 fi
16352fi
82e923f6
RS
16353
16354fi
a3bba767
JJ
16355echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
16356echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
16357if test x"$gcc_cv_ld_as_needed" = xyes; then
16358
16359cat >>confdefs.h <<\_ACEOF
16360#define HAVE_LD_AS_NEEDED 1
16361_ACEOF
16362
16363fi
765f1bf9 16364
d82bf747
AM
16365case "$target:$tm_file" in
16366 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
a3bba767
JJ
16367 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
16368echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
85b776df
AM
16369if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
16370 echo $ECHO_N "(cached) $ECHO_C" >&6
16371else
16372 gcc_cv_ld_no_dot_syms=no
16373 if test $in_tree_ld = yes ; then
16374 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
16375 gcc_cv_ld_no_dot_syms=yes
16376 fi
16377 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
16378 cat > conftest1.s <<EOF
16379 .text
16380 bl .foo
16381EOF
16382 cat > conftest2.s <<EOF
16383 .section ".opd","aw"
16384 .align 3
16385 .globl foo
16386 .type foo,@function
16387foo:
16388 .quad .LEfoo,.TOC.@tocbase,0
16389 .text
16390.LEfoo:
16391 blr
16392 .size foo,.-.LEfoo
16393EOF
16394 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
16395 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
16396 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
16397 gcc_cv_ld_no_dot_syms=yes
16398 fi
16399 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
16400 fi
16401
16402fi
a3bba767
JJ
16403echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
16404echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
85b776df
AM
16405 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
16406
16407cat >>confdefs.h <<\_ACEOF
16408#define HAVE_LD_NO_DOT_SYMS 1
16409_ACEOF
16410
16411 fi
16412 ;;
16413esac
16414
a3bba767
JJ
16415echo "$as_me:$LINENO: checking linker --sysroot support" >&5
16416echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
380e5ca4
MM
16417if test "${gcc_cv_ld_sysroot+set}" = set; then
16418 echo $ECHO_N "(cached) $ECHO_C" >&6
16419else
16420 gcc_cv_ld_sysroot=no
16421 if test $in_tree_ld = yes ; then
16422 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 16423 gcc_cv_ld_sysroot=yes
380e5ca4
MM
16424 fi
16425 elif test x$gcc_cv_ld != x; then
16426 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
16427 gcc_cv_ld_sysroot=yes
16428 fi
16429 fi
16430fi
a3bba767
JJ
16431echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
16432echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
380e5ca4
MM
16433if test x"$gcc_cv_ld_sysroot" = xyes; then
16434
16435cat >>confdefs.h <<\_ACEOF
16436#define HAVE_LD_SYSROOT 1
16437_ACEOF
16438
16439fi
16440
9fb28a67 16441if test x$with_sysroot = x && test x$host = x$target \
c794c06f
CD
16442 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
16443 && test "$prefix" != "NONE"; then
ba479fd2
NN
16444
16445cat >>confdefs.h <<_ACEOF
793e9558 16446#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 16447_ACEOF
793e9558
PB
16448
16449fi
16450
77008252 16451# Test for stack protector support in target C library.
a3bba767
JJ
16452echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5
16453echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6
77008252
JJ
16454if test "${gcc_cv_libc_provides_ssp+set}" = set; then
16455 echo $ECHO_N "(cached) $ECHO_C" >&6
16456else
16457 gcc_cv_libc_provides_ssp=no
a6ccdbab
EC
16458 case "$target" in
16459 *-*-linux*)
77008252
JJ
16460 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
16461 if test "x$with_sysroot" = x; then
16462 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
16463 elif test "x$with_build_sysroot" != "x"; then
16464 glibc_header_dir="${with_build_sysroot}/usr/include"
77008252
JJ
16465 elif test "x$with_sysroot" = xyes; then
16466 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
16467 else
16468 glibc_header_dir="${with_sysroot}/usr/include"
16469 fi
16470 else
16471 glibc_header_dir=/usr/include
16472 fi
16473 # glibc 2.4 and later provides __stack_chk_fail and
16474 # either __stack_chk_guard, or TLS access to stack guard canary.
16475 if test -f $glibc_header_dir/features.h \
16476 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
16477 $glibc_header_dir/features.h > /dev/null; then
16478 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
16479 $glibc_header_dir/features.h > /dev/null; then
16480 gcc_cv_libc_provides_ssp=yes
16481 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
16482 $glibc_header_dir/features.h > /dev/null \
16483 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
16484 $glibc_header_dir/features.h > /dev/null; then
16485 gcc_cv_libc_provides_ssp=yes
16486 fi
a6ccdbab
EC
16487 fi
16488 ;;
16489 *-*-darwin*)
a3bba767
JJ
16490 echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5
16491echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6
a6ccdbab
EC
16492if test "${ac_cv_func___stack_chk_fail+set}" = set; then
16493 echo $ECHO_N "(cached) $ECHO_C" >&6
16494else
16495 cat >conftest.$ac_ext <<_ACEOF
16496/* confdefs.h. */
16497_ACEOF
16498cat confdefs.h >>conftest.$ac_ext
16499cat >>conftest.$ac_ext <<_ACEOF
16500/* end confdefs.h. */
16501/* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail.
16502 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16503#define __stack_chk_fail innocuous___stack_chk_fail
16504
16505/* System header to define __stub macros and hopefully few prototypes,
16506 which can conflict with char __stack_chk_fail (); below.
16507 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16508 <limits.h> exists even on freestanding compilers. */
16509
16510#ifdef __STDC__
16511# include <limits.h>
16512#else
16513# include <assert.h>
16514#endif
16515
16516#undef __stack_chk_fail
16517
a3bba767 16518/* Override any gcc2 internal prototype to avoid an error. */
a6ccdbab
EC
16519#ifdef __cplusplus
16520extern "C"
a3bba767 16521{
a6ccdbab 16522#endif
a3bba767
JJ
16523/* We use char because int might match the return type of a gcc2
16524 builtin and then its argument prototype would still apply. */
a6ccdbab
EC
16525char __stack_chk_fail ();
16526/* The GNU C library defines this for functions which it implements
16527 to always fail with ENOSYS. Some functions are actually named
16528 something starting with __ and the normal name is an alias. */
a3bba767 16529#if defined (__stub___stack_chk_fail) || defined (__stub_____stack_chk_fail)
a6ccdbab 16530choke me
a3bba767
JJ
16531#else
16532char (*f) () = __stack_chk_fail;
16533#endif
16534#ifdef __cplusplus
16535}
a6ccdbab
EC
16536#endif
16537
16538int
16539main ()
16540{
a3bba767 16541return f != __stack_chk_fail;
a6ccdbab
EC
16542 ;
16543 return 0;
16544}
16545_ACEOF
16546rm -f conftest.$ac_objext conftest$ac_exeext
a3bba767
JJ
16547if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16548 (eval $ac_link) 2>conftest.er1
a6ccdbab
EC
16549 ac_status=$?
16550 grep -v '^ *+' conftest.er1 >conftest.err
16551 rm -f conftest.er1
16552 cat conftest.err >&5
16553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3bba767
JJ
16554 (exit $ac_status); } &&
16555 { ac_try='test -z "$ac_c_werror_flag"
16556 || test ! -s conftest.err'
16557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16558 (eval $ac_try) 2>&5
16559 ac_status=$?
16560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16561 (exit $ac_status); }; } &&
16562 { ac_try='test -s conftest$ac_exeext'
16563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16564 (eval $ac_try) 2>&5
16565 ac_status=$?
16566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16567 (exit $ac_status); }; }; then
8b1f719a
PB
16568 ac_cv_func___stack_chk_fail=yes
16569else
a6ccdbab
EC
16570 echo "$as_me: failed program was:" >&5
16571sed 's/^/| /' conftest.$ac_ext >&5
16572
a3bba767 16573ac_cv_func___stack_chk_fail=no
a6ccdbab 16574fi
a3bba767 16575rm -f conftest.err conftest.$ac_objext \
a6ccdbab
EC
16576 conftest$ac_exeext conftest.$ac_ext
16577fi
a3bba767
JJ
16578echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5
16579echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6
a6ccdbab
EC
16580if test $ac_cv_func___stack_chk_fail = yes; then
16581 gcc_cv_libc_provides_ssp=yes
16582else
16583 echo "no __stack_chk_fail on this target"
77008252 16584fi
a6ccdbab
EC
16585
16586 ;;
77008252 16587 *) gcc_cv_libc_provides_ssp=no ;;
a6ccdbab
EC
16588 esac
16589fi
a3bba767
JJ
16590echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
16591echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6
a6ccdbab 16592
77008252
JJ
16593if test x$gcc_cv_libc_provides_ssp = xyes; then
16594
16595cat >>confdefs.h <<\_ACEOF
16596#define TARGET_LIBC_PROVIDES_SSP 1
16597_ACEOF
16598
16599fi
16600
ed965309
JJ
16601# Check if TFmode long double should be used by default or not.
16602# Some glibc targets used DFmode long double, but with glibc 2.4
16603# and later they can use TFmode.
16604case "$target" in
f7cc5390
JM
16605 powerpc*-*-linux* | \
16606 powerpc*-*-gnu* | \
ed965309
JJ
16607 sparc*-*-linux* | \
16608 s390*-*-linux* | \
16609 alpha*-*-linux*)
16610
a3bba767 16611# Check whether --with-long-double-128 or --without-long-double-128 was given.
ed965309 16612if test "${with_long_double_128+set}" = set; then
a3bba767
JJ
16613 withval="$with_long_double_128"
16614 gcc_cv_target_ldbl128="$with_long_double_128"
ed965309
JJ
16615else
16616 gcc_cv_target_ldbl128=no
16617 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
16618 if test "x$with_sysroot" = x; then
16619 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
16620 elif test "x$with_build_sysroot" != "x"; then
16621 glibc_header_dir="${with_build_sysroot}/usr/include"
ed965309
JJ
16622 elif test "x$with_sysroot" = xyes; then
16623 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
16624 else
16625 glibc_header_dir="${with_sysroot}/usr/include"
16626 fi
16627 else
16628 glibc_header_dir=/usr/include
16629 fi
65280f6c 16630 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
ed965309
JJ
16631 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
16632 && gcc_cv_target_ldbl128=yes
65280f6c 16633
a3bba767 16634fi;
ed965309
JJ
16635 ;;
16636esac
16637if test x$gcc_cv_target_ldbl128 = xyes; then
16638
16639cat >>confdefs.h <<\_ACEOF
16640#define TARGET_DEFAULT_LONG_DOUBLE_128 1
16641_ACEOF
16642
16643fi
16644
81bf3d9e 16645# Find out what GC implementation we want, or may, use.
ba479fd2 16646
a3bba767 16647# Check whether --with-gc or --without-gc was given.
81bf3d9e 16648if test "${with_gc+set}" = set; then
a3bba767
JJ
16649 withval="$with_gc"
16650 case "$withval" in
08cee789 16651 page)
81bf3d9e 16652 GGC=ggc-$withval
08cee789
DJ
16653 ;;
16654 zone)
16655 GGC=ggc-$withval
16656
16657cat >>confdefs.h <<\_ACEOF
16658#define GGC_ZONE 1
16659_ACEOF
16660
81bf3d9e
RH
16661 ;;
16662 *)
ba479fd2
NN
16663 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
16664echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
16665 { (exit 1); exit 1; }; }
81bf3d9e
RH
16666 ;;
16667esac
16668else
005537df 16669 GGC=ggc-page
a3bba767 16670fi;
81bf3d9e
RH
16671
16672echo "Using $GGC for garbage collection."
16673
3c809ba4 16674# Use the system's zlib library.
b8dad04b
ZW
16675zlibdir=-L../zlib
16676zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 16677
a3bba767 16678# Check whether --with-system-zlib or --without-system-zlib was given.
3c809ba4 16679if test "${with_system_zlib+set}" = set; then
a3bba767
JJ
16680 withval="$with_system_zlib"
16681 zlibdir=
3c809ba4
AG
16682zlibinc=
16683
a3bba767 16684fi;
3c809ba4 16685
dc6746e7 16686
b8ec3cc8 16687
703d89ab 16688
a3bba767
JJ
16689echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
16690echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
16691 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
dc6746e7 16692if test "${enable_maintainer_mode+set}" = set; then
a3bba767
JJ
16693 enableval="$enable_maintainer_mode"
16694 maintainer_mode=$enableval
dc6746e7
PT
16695else
16696 maintainer_mode=no
a3bba767 16697fi;
a6ccdbab 16698
a3bba767
JJ
16699echo "$as_me:$LINENO: result: $maintainer_mode" >&5
16700echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
16701
16702if test "$maintainer_mode" = "yes"; then
16703 MAINT=''
16704else
16705 MAINT='#'
16706fi
16707
8bb915b6
NN
16708# --------------
16709# Language hooks
16710# --------------
16711
861bb6c1
JL
16712# Make empty files to contain the specs and options for each language.
16713# Then add #include lines to for a compiler that has specs and/or options.
16714
cc11cc9b 16715subdirs=
d7b42618 16716lang_opt_files=
861bb6c1 16717lang_specs_files=
3103b7db 16718lang_tree_files=
861bb6c1
JL
16719# These (without "all_") are set in each config-lang.in.
16720# `language' must be a single word so is spelled singularly.
16721all_languages=
861bb6c1 16722all_compilers=
fa958513 16723all_outputs='Makefile gccbug libada-mk'
861bb6c1 16724# List of language makefile fragments.
2ed26f6b
ZW
16725all_lang_makefrags=
16726# List of language subdirectory makefiles. Deprecated.
861bb6c1 16727all_lang_makefiles=
703d89ab 16728# Additional files for gengtype
ef69da62 16729all_gtfiles="$target_gtfiles"
861bb6c1 16730
cc11cc9b
PB
16731# These are the languages that are set in --enable-languages,
16732# and are available in the GCC tree.
16733all_selected_languages=
16734
861bb6c1
JL
16735# Add the language fragments.
16736# Languages are added via two mechanisms. Some information must be
16737# recorded in makefile variables, these are defined in config-lang.in.
16738# We accumulate them and plug them into the main Makefile.
16739# The other mechanism is a set of hooks for each of the main targets
16740# like `clean', `install', etc.
16741
861bb6c1 16742language_hooks="Make-hooks"
861bb6c1 16743
cc11cc9b 16744for lang in ${srcdir}/*/config-lang.in
861bb6c1 16745do
1546bb64
PB
16746 test "$lang" = "${srcdir}/*/config-lang.in" && continue
16747
cc11cc9b
PB
16748 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
16749 if test "x$lang_alias" = x
16750 then
16751 echo "$lang doesn't set \$language." 1>&2
16752 exit 1
16753 fi
16754 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
16755 subdirs="$subdirs $subdir"
16756 case ",$enable_languages," in
16757 *,$lang_alias,*)
16758 all_selected_languages="$all_selected_languages $lang_alias"
16759 if test -f $srcdir/$subdir/lang-specs.h; then
16760 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
16761 fi
16762 ;;
16763 esac
16764
cc11cc9b
PB
16765 language=
16766 boot_language=
16767 compilers=
cc11cc9b
PB
16768 outputs=
16769 gtfiles=
1546bb64 16770 subdir_requires=
cc11cc9b
PB
16771 . ${srcdir}/$subdir/config-lang.in
16772 if test "x$language" = x
16773 then
16774 echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2
16775 exit 1
16776 fi
1546bb64
PB
16777
16778 ok=:
16779 case ",$enable_languages," in
16780 *,$lang_alias,*) ;;
16781 *)
16782 for i in $subdir_requires; do
b6348cb3 16783 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
16784 ok=false
16785 break
16786 done
16787 ;;
16788 esac
16789 $ok || continue
16790
cc11cc9b 16791 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in"
1546bb64
PB
16792 if test -f $srcdir/$subdir/lang.opt; then
16793 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
16794 fi
16795 if test -f $srcdir/$subdir/$subdir-tree.def; then
16796 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
16797 fi
cc11cc9b
PB
16798 if test -f ${srcdir}/$subdir/Makefile.in
16799 then all_lang_makefiles="$subdir/Makefile"
16800 fi
16801 all_languages="$all_languages $language"
cc11cc9b 16802 all_compilers="$all_compilers $compilers"
cc11cc9b 16803 all_outputs="$all_outputs $outputs"
703d89ab 16804 all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
861bb6c1
JL
16805done
16806
8ac9d31f
TJ
16807# Pick up gtfiles for c
16808gtfiles=
8ac9d31f 16809. ${srcdir}/c-config-lang.in
703d89ab 16810all_gtfiles="$all_gtfiles [c] $gtfiles"
8ac9d31f 16811
cbc59f01 16812check_languages=
cc11cc9b 16813for language in $all_selected_languages
cbc59f01 16814do
cc11cc9b 16815 check_languages="$check_languages check-$language"
cbc59f01
DD
16816done
16817
62b81e45 16818# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 16819# lang.${target}. Only do so for selected languages.
861bb6c1
JL
16820
16821rm -f Make-hooks
16822touch Make-hooks
bd97af06 16823target_list="all.cross start.encap rest.encap tags \
bcc3d150
BM
16824 install-common install-man install-info install-pdf dvi pdf \
16825 html uninstall info man srcextra srcman srcinfo \
8b1f719a 16826 mostlyclean clean distclean maintainer-clean"
cc11cc9b 16827
861bb6c1
JL
16828for t in $target_list
16829do
16830 x=
cc11cc9b 16831 for lang in $all_selected_languages
861bb6c1 16832 do
cc11cc9b 16833 x="$x $lang.$t"
861bb6c1
JL
16834 done
16835 echo "lang.$t: $x" >> Make-hooks
16836done
16837
8bb915b6
NN
16838# --------
16839# UNSORTED
16840# --------
16841
cc06d68c 16842# Create .gdbinit.
861bb6c1 16843
cc06d68c
GP
16844echo "dir ." > .gdbinit
16845echo "dir ${srcdir}" >> .gdbinit
16846if test x$gdb_needs_out_file_path = xyes
16847then
16848 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
16849fi
16850if test "x$subdirs" != x; then
16851 for s in $subdirs
16852 do
16853 echo "dir ${srcdir}/$s" >> .gdbinit
16854 done
861bb6c1 16855fi
cc06d68c 16856echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 16857
4ef2b6ed
RS
16858# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
16859# absolute path for gcc_tooldir based on inserting the number of up-directory
16860# movements required to get from $(exec_prefix) to $(prefix) into the basic
16861# $(libsubdir)/@(unlibsubdir) based path.
16862# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
16863# make and thus we'd get different behavior depending on where we built the
16864# sources.
16865if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
16866 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
16867else
16868# An explanation of the sed strings:
16869# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
16870# -e 's|/$||' match a trailing forward slash and eliminates it
16871# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
16872# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
16873#
16874# (*) Note this pattern overwrites the first character of the string
16875# with a forward slash if one is not already present. This is not a
16876# problem because the exact names of the sub-directories concerned is
16877# unimportant, just the number of them matters.
16878#
16879# The practical upshot of these patterns is like this:
16880#
16881# prefix exec_prefix result
16882# ------ ----------- ------
16883# /foo /foo/bar ../
16884# /foo/ /foo/bar ../
16885# /foo /foo/bar/ ../
16886# /foo/ /foo/bar/ ../
16887# /foo /foo/bar/ugg ../../
16888#
16889 dollar='$$'
16890 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
16891fi
d062c304
JL
16892
16893
2ce3c6c6 16894
2bbea3a6
RH
16895# Find a directory in which to install a shared libgcc.
16896
a3bba767 16897# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
2bbea3a6 16898if test "${enable_version_specific_runtime_libs+set}" = set; then
a3bba767 16899 enableval="$enable_version_specific_runtime_libs"
ba479fd2 16900
a3bba767 16901fi;
2bbea3a6
RH
16902
16903
a3bba767 16904# Check whether --with-slibdir or --without-slibdir was given.
5b15f277 16905if test "${with_slibdir+set}" = set; then
a3bba767
JJ
16906 withval="$with_slibdir"
16907 slibdir="$with_slibdir"
5b15f277
RH
16908else
16909 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 16910 slibdir='$(libsubdir)'
5b15f277 16911elif test "$host" != "$target"; then
2bbea3a6
RH
16912 slibdir='$(build_tooldir)/lib'
16913else
5b15f277 16914 slibdir='$(libdir)'
2bbea3a6 16915fi
a3bba767 16916fi;
2bbea3a6
RH
16917
16918
1e6347d8 16919objdir=`${PWDCMD-pwd}`
7e717196
JL
16920
16921
22482f74 16922
a3bba767 16923# Check whether --with-datarootdir or --without-datarootdir was given.
22482f74 16924if test "${with_datarootdir+set}" = set; then
a3bba767
JJ
16925 withval="$with_datarootdir"
16926 datarootdir="\${prefix}/$with_datarootdir"
22482f74
MS
16927else
16928 datarootdir='$(prefix)/share'
a3bba767 16929fi;
22482f74
MS
16930
16931
a6ccdbab 16932
a3bba767 16933# Check whether --with-docdir or --without-docdir was given.
22482f74 16934if test "${with_docdir+set}" = set; then
a3bba767
JJ
16935 withval="$with_docdir"
16936 docdir="\${prefix}/$with_docdir"
22482f74
MS
16937else
16938 docdir='$(datarootdir)'
a3bba767 16939fi;
22482f74 16940
b8ec3cc8 16941
703d89ab 16942
a3bba767 16943# Check whether --with-htmldir or --without-htmldir was given.
22482f74 16944if test "${with_htmldir+set}" = set; then
a3bba767
JJ
16945 withval="$with_htmldir"
16946 htmldir="\${prefix}/$with_htmldir"
22482f74
MS
16947else
16948 htmldir='$(docdir)'
a3bba767 16949fi;
861bb6c1
JL
16950
16951
703d89ab 16952# Substitute configuration variables
861bb6c1
JL
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
9b16d2c4 16997
e9a25f70 16998
6e26218f 16999
c8724862 17000
11642c3a
ZW
17001
17002
17003
3d9d2476 17004
e2500fed 17005
51b9ff45 17006
861bb6c1 17007
6e3f3080
NN
17008# Echo link setup.
17009if test x${build} = x${host} ; then
17010 if test x${host} = x${target} ; then
17011 echo "Links are now set up to build a native compiler for ${target}." 1>&2
17012 else
17013 echo "Links are now set up to build a cross-compiler" 1>&2
17014 echo " from ${host} to ${target}." 1>&2
17015 fi
17016else
17017 if test x${host} = x${target} ; then
17018 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
17019 echo " for ${target}." 1>&2
17020 else
17021 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
17022 echo " from ${host} to ${target}." 1>&2
17023 fi
17024fi
17025
6de9cd9a
DN
17026
17027
17028
6e3f3080
NN
17029# Configure the subdirectories
17030# AC_CONFIG_SUBDIRS($subdirs)
17031
17032# Create the Makefile
17033# and configure language subdirectories
a3bba767 17034 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
17035
17036
a3bba767 17037 ac_config_commands="$ac_config_commands default"
914c5af7 17038
ba479fd2 17039cat >confcache <<\_ACEOF
6e3f3080
NN
17040# This file is a shell script that caches the results of configure
17041# tests run on this system so they can be shared between configure
ba479fd2
NN
17042# scripts and configure runs, see configure's option --config-cache.
17043# It is not useful on other systems. If it contains results you don't
17044# want to keep, you may remove or edit it.
6e3f3080 17045#
ba479fd2
NN
17046# config.status only pays attention to the cache file if you give it
17047# the --recheck option to rerun configure.
6e3f3080 17048#
ba479fd2
NN
17049# `ac_cv_env_foo' variables (set or unset) will be overridden when
17050# loading this file, other *unset* `ac_cv_foo' will be assigned the
17051# following values.
17052
17053_ACEOF
17054
6e3f3080
NN
17055# The following way of writing the cache mishandles newlines in values,
17056# but we know of no workaround that is simple, portable, and efficient.
a3bba767 17057# So, don't put newlines in cache variables' values.
6e3f3080
NN
17058# Ultrix sh set writes to stderr and can't be redirected directly,
17059# and sets the high bit in the cache file unless we assign to the vars.
a3bba767 17060{
ba479fd2 17061 (set) 2>&1 |
a3bba767
JJ
17062 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17063 *ac_space=\ *)
ba479fd2
NN
17064 # `set' does not quote correctly, so add quotes (double-quote
17065 # substitution turns \\\\ into \\, and sed turns \\ into \).
17066 sed -n \
86da66b5
HPN
17067 "s/'/'\\\\''/g;
17068 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
a3bba767 17069 ;;
ba479fd2
NN
17070 *)
17071 # `set' quotes correctly as required by POSIX, so do not add quotes.
a3bba767
JJ
17072 sed -n \
17073 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 17074 ;;
a3bba767
JJ
17075 esac;
17076} |
ba479fd2
NN
17077 sed '
17078 t clear
a3bba767 17079 : clear
ba479fd2
NN
17080 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17081 t end
a3bba767
JJ
17082 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17083 : end' >>confcache
17084if diff $cache_file confcache >/dev/null 2>&1; then :; else
17085 if test -w $cache_file; then
17086 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
ba479fd2 17087 cat confcache >$cache_file
6e3f3080 17088 else
a3bba767 17089 echo "not updating unwritable cache $cache_file"
6e3f3080
NN
17090 fi
17091fi
17092rm -f confcache
17093
17094test "x$prefix" = xNONE && prefix=$ac_default_prefix
17095# Let make expand exec_prefix.
17096test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17097
a3bba767
JJ
17098# VPATH may cause trouble with some makes, so we remove $(srcdir),
17099# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17100# trailing colons and then remove the whole line if VPATH becomes empty
17101# (actually we leave an empty line to preserve line numbers).
17102if test "x$srcdir" = x.; then
17103 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17104s/:*\$(srcdir):*/:/;
17105s/:*\${srcdir}:*/:/;
17106s/:*@srcdir@:*/:/;
17107s/^\([^=]*=[ ]*\):*/\1/;
17108s/:*$//;
17109s/^[^=]*=[ ]*$//;
17110}'
17111fi
17112
63cf211a 17113DEFS=-DHAVE_CONFIG_H
6e3f3080 17114
ba479fd2
NN
17115ac_libobjs=
17116ac_ltlibobjs=
17117for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17118 # 1. Remove the extension, and $U if already installed.
a3bba767
JJ
17119 ac_i=`echo "$ac_i" |
17120 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
17121 # 2. Add them.
17122 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
17123 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
ba479fd2
NN
17124done
17125LIBOBJS=$ac_libobjs
63cf211a 17126
ba479fd2
NN
17127LTLIBOBJS=$ac_ltlibobjs
17128
17129
17130
17131: ${CONFIG_STATUS=./config.status}
17132ac_clean_files_save=$ac_clean_files
17133ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17134{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17135echo "$as_me: creating $CONFIG_STATUS" >&6;}
17136cat >$CONFIG_STATUS <<_ACEOF
17137#! $SHELL
17138# Generated by $as_me.
6e3f3080
NN
17139# Run this file to recreate the current configuration.
17140# Compiler output produced by configure, useful for debugging
ba479fd2 17141# configure, is in config.log if it exists.
6e3f3080 17142
ba479fd2
NN
17143debug=false
17144ac_cs_recheck=false
17145ac_cs_silent=false
17146SHELL=\${CONFIG_SHELL-$SHELL}
17147_ACEOF
17148
17149cat >>$CONFIG_STATUS <<\_ACEOF
17150## --------------------- ##
17151## M4sh Initialization. ##
17152## --------------------- ##
17153
a3bba767 17154# Be Bourne compatible
ba479fd2
NN
17155if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17156 emulate sh
17157 NULLCMD=:
17158 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17159 # is contrary to our usage. Disable this feature.
17160 alias -g '${1+"$@"}'='"$@"'
a3bba767
JJ
17161elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17162 set -o posix
703d89ab 17163fi
a3bba767 17164DUALCASE=1; export DUALCASE # for MKS sh
703d89ab
ZW
17165
17166# Support unset when possible.
17167if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
17168 as_unset=unset
17169else
17170 as_unset=false
17171fi
17172
17173
a6ccdbab 17174# Work around bugs in pre-3.0 UWIN ksh.
a3bba767 17175$as_unset ENV MAIL MAILPATH
a6ccdbab
EC
17176PS1='$ '
17177PS2='> '
ba479fd2
NN
17178PS4='+ '
17179
17180# NLS nuisances.
17181for as_var in \
17182 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
17183 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
17184 LC_TELEPHONE LC_TIME
6e3f3080 17185do
86da66b5 17186 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
17187 eval $as_var=C; export $as_var
17188 else
a3bba767 17189 $as_unset $as_var
ba479fd2 17190 fi
6e3f3080
NN
17191done
17192
ba479fd2 17193# Required to use basename.
a3bba767 17194if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
17195 as_expr=expr
17196else
17197 as_expr=false
17198fi
6e3f3080 17199
a3bba767 17200if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
ba479fd2
NN
17201 as_basename=basename
17202else
17203 as_basename=false
17204fi
6e3f3080
NN
17205
17206
ba479fd2 17207# Name of the executable.
a3bba767 17208as_me=`$as_basename "$0" ||
ba479fd2
NN
17209$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17210 X"$0" : 'X\(//\)$' \| \
a3bba767
JJ
17211 X"$0" : 'X\(/\)$' \| \
17212 . : '\(.\)' 2>/dev/null ||
ba479fd2 17213echo X/"$0" |
a3bba767
JJ
17214 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17215 /^X\/\(\/\/\)$/{ s//\1/; q; }
17216 /^X\/\(\/\).*/{ s//\1/; q; }
17217 s/.*/./; q'`
6e3f3080 17218
a3bba767
JJ
17219
17220# PATH needs CR, and LINENO needs CR and PATH.
17221# Avoid depending upon Character Ranges.
17222as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17223as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17224as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17225as_cr_digits='0123456789'
17226as_cr_alnum=$as_cr_Letters$as_cr_digits
17227
17228# The user is always right.
17229if test "${PATH_SEPARATOR+set}" != set; then
17230 echo "#! /bin/sh" >conf$$.sh
17231 echo "exit 0" >>conf$$.sh
17232 chmod +x conf$$.sh
17233 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
17234 PATH_SEPARATOR=';'
17235 else
17236 PATH_SEPARATOR=:
17237 fi
17238 rm -f conf$$.sh
17239fi
dd7f7a6e 17240
8b1f719a 17241
a3bba767
JJ
17242 as_lineno_1=$LINENO
17243 as_lineno_2=$LINENO
17244 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17245 test "x$as_lineno_1" != "x$as_lineno_2" &&
17246 test "x$as_lineno_3" = "x$as_lineno_2" || {
17247 # Find who we are. Look in the path if we contain no path at all
17248 # relative or not.
17249 case $0 in
17250 *[\\/]* ) as_myself=$0 ;;
17251 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17252for as_dir in $PATH
17253do
17254 IFS=$as_save_IFS
17255 test -z "$as_dir" && as_dir=.
17256 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17257done
8b1f719a 17258
a3bba767
JJ
17259 ;;
17260 esac
17261 # We did not find ourselves, most probably we were run as `sh COMMAND'
17262 # in which case we are not to be found in the path.
17263 if test "x$as_myself" = x; then
17264 as_myself=$0
17265 fi
17266 if test ! -f "$as_myself"; then
17267 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17268echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17269 { (exit 1); exit 1; }; }
17270 fi
17271 case $CONFIG_SHELL in
17272 '')
17273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17274for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17275do
17276 IFS=$as_save_IFS
17277 test -z "$as_dir" && as_dir=.
17278 for as_base in sh bash ksh sh5; do
17279 case $as_dir in
17280 /*)
17281 if ("$as_dir/$as_base" -c '
8b1f719a
PB
17282 as_lineno_1=$LINENO
17283 as_lineno_2=$LINENO
a3bba767 17284 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
8b1f719a 17285 test "x$as_lineno_1" != "x$as_lineno_2" &&
a3bba767
JJ
17286 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17287 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
17288 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
17289 CONFIG_SHELL=$as_dir/$as_base
17290 export CONFIG_SHELL
17291 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17292 fi;;
17293 esac
17294 done
17295done
17296;;
17297 esac
ba479fd2
NN
17298
17299 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17300 # uniformly replaced by the line number. The first 'sed' inserts a
a3bba767
JJ
17301 # line-number line before each line; the second 'sed' does the real
17302 # work. The second script uses 'N' to pair each line-number line
17303 # with the numbered line, and appends trailing '-' during
17304 # substitution so that $LINENO is not a special case at line end.
ba479fd2 17305 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
a3bba767
JJ
17306 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17307 sed '=' <$as_myself |
ba479fd2
NN
17308 sed '
17309 N
a3bba767
JJ
17310 s,$,-,
17311 : loop
17312 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
ba479fd2 17313 t loop
a3bba767
JJ
17314 s,-$,,
17315 s,^['$as_cr_digits']*\n,,
ba479fd2 17316 ' >$as_me.lineno &&
a3bba767
JJ
17317 chmod +x $as_me.lineno ||
17318 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17319echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
ba479fd2
NN
17320 { (exit 1); exit 1; }; }
17321
17322 # Don't try to exec as it changes $[0], causing all sort of problems
17323 # (the dirname of $[0] is not the place where we might find the
a3bba767
JJ
17324 # original and so on. Autoconf is especially sensible to this).
17325 . ./$as_me.lineno
ba479fd2
NN
17326 # Exit status is that of the last command.
17327 exit
17328}
17329
17330
a3bba767
JJ
17331case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17332 *c*,-n*) ECHO_N= ECHO_C='
17333' ECHO_T=' ' ;;
17334 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17335 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
ba479fd2
NN
17336esac
17337
a3bba767 17338if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
17339 as_expr=expr
17340else
17341 as_expr=false
17342fi
17343
17344rm -f conf$$ conf$$.exe conf$$.file
17345echo >conf$$.file
17346if ln -s conf$$.file conf$$ 2>/dev/null; then
a3bba767
JJ
17347 # We could just check for DJGPP; but this test a) works b) is more generic
17348 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17349 if test -f conf$$.exe; then
17350 # Don't use ln at all; we don't have any links
ba479fd2 17351 as_ln_s='cp -p'
a3bba767
JJ
17352 else
17353 as_ln_s='ln -s'
17354 fi
ba479fd2
NN
17355elif ln conf$$.file conf$$ 2>/dev/null; then
17356 as_ln_s=ln
17357else
17358 as_ln_s='cp -p'
17359fi
a3bba767 17360rm -f conf$$ conf$$.exe conf$$.file
ba479fd2
NN
17361
17362if mkdir -p . 2>/dev/null; then
17363 as_mkdir_p=:
17364else
86da66b5 17365 test -d ./-p && rmdir ./-p
ba479fd2
NN
17366 as_mkdir_p=false
17367fi
17368
a3bba767 17369as_executable_p="test -f"
ba479fd2
NN
17370
17371# Sed expression to map a string onto a valid CPP name.
86da66b5 17372as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
17373
17374# Sed expression to map a string onto a valid variable name.
86da66b5 17375as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
17376
17377
a3bba767
JJ
17378# IFS
17379# We need space, tab and new line, in precisely that order.
17380as_nl='
17381'
17382IFS=" $as_nl"
17383
17384# CDPATH.
17385$as_unset CDPATH
17386
ba479fd2
NN
17387exec 6>&1
17388
a3bba767 17389# Open the log real soon, to keep \$[0] and so on meaningful, and to
ba479fd2 17390# report actual input values of CONFIG_FILES etc. instead of their
a3bba767
JJ
17391# values after options handling. Logging --version etc. is OK.
17392exec 5>>config.log
17393{
17394 echo
17395 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17396## Running $as_me. ##
17397_ASBOX
17398} >&5
17399cat >&5 <<_CSEOF
17400
ba479fd2 17401This file was extended by $as_me, which was
a3bba767 17402generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
17403
17404 CONFIG_FILES = $CONFIG_FILES
17405 CONFIG_HEADERS = $CONFIG_HEADERS
17406 CONFIG_LINKS = $CONFIG_LINKS
17407 CONFIG_COMMANDS = $CONFIG_COMMANDS
17408 $ $0 $@
17409
a3bba767
JJ
17410_CSEOF
17411echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17412echo >&5
ba479fd2
NN
17413_ACEOF
17414
17415# Files that config.status was made for.
a3bba767
JJ
17416if test -n "$ac_config_files"; then
17417 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17418fi
dd7f7a6e 17419
a3bba767
JJ
17420if test -n "$ac_config_headers"; then
17421 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17422fi
17423
17424if test -n "$ac_config_links"; then
17425 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17426fi
17427
17428if test -n "$ac_config_commands"; then
17429 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17430fi
ba479fd2
NN
17431
17432cat >>$CONFIG_STATUS <<\_ACEOF
a3bba767 17433
ba479fd2
NN
17434ac_cs_usage="\
17435\`$as_me' instantiates files from templates according to the
17436current configuration.
17437
17438Usage: $0 [OPTIONS] [FILE]...
17439
17440 -h, --help print this help, then exit
a3bba767 17441 -V, --version print version number, then exit
ba479fd2
NN
17442 -q, --quiet do not print progress messages
17443 -d, --debug don't remove temporary files
17444 --recheck update $as_me by reconfiguring in the same conditions
17445 --file=FILE[:TEMPLATE]
86da66b5 17446 instantiate the configuration file FILE
ba479fd2 17447 --header=FILE[:TEMPLATE]
86da66b5 17448 instantiate the configuration header FILE
ba479fd2
NN
17449
17450Configuration files:
17451$config_files
17452
17453Configuration headers:
17454$config_headers
17455
17456Configuration commands:
17457$config_commands
17458
17459Report bugs to <bug-autoconf@gnu.org>."
703d89ab 17460_ACEOF
a3bba767 17461
ba479fd2
NN
17462cat >>$CONFIG_STATUS <<_ACEOF
17463ac_cs_version="\\
17464config.status
a3bba767
JJ
17465configured by $0, generated by GNU Autoconf 2.59,
17466 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
ba479fd2 17467
a3bba767 17468Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
17469This config.status script is free software; the Free Software Foundation
17470gives unlimited permission to copy, distribute and modify it."
a3bba767 17471srcdir=$srcdir
ba479fd2
NN
17472_ACEOF
17473
17474cat >>$CONFIG_STATUS <<\_ACEOF
17475# If no file are specified by the user, then we need to provide default
17476# value. By we need to know if files were specified by the user.
17477ac_need_defaults=:
17478while test $# != 0
17479do
17480 case $1 in
17481 --*=*)
a3bba767
JJ
17482 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17483 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
ba479fd2
NN
17484 ac_shift=:
17485 ;;
a3bba767 17486 -*)
ba479fd2
NN
17487 ac_option=$1
17488 ac_optarg=$2
17489 ac_shift=shift
17490 ;;
a3bba767
JJ
17491 *) # This is not an option, so the user has probably given explicit
17492 # arguments.
17493 ac_option=$1
17494 ac_need_defaults=false;;
ba479fd2
NN
17495 esac
17496
17497 case $ac_option in
17498 # Handling of the options.
a3bba767
JJ
17499_ACEOF
17500cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
17501 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17502 ac_cs_recheck=: ;;
a3bba767
JJ
17503 --version | --vers* | -V )
17504 echo "$ac_cs_version"; exit 0 ;;
17505 --he | --h)
17506 # Conflict between --help and --header
17507 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17508Try \`$0 --help' for more information." >&5
17509echo "$as_me: error: ambiguous option: $1
17510Try \`$0 --help' for more information." >&2;}
17511 { (exit 1); exit 1; }; };;
17512 --help | --hel | -h )
17513 echo "$ac_cs_usage"; exit 0 ;;
17514 --debug | --d* | -d )
ba479fd2
NN
17515 debug=: ;;
17516 --file | --fil | --fi | --f )
17517 $ac_shift
17518 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
17519 ac_need_defaults=false;;
17520 --header | --heade | --head | --hea )
17521 $ac_shift
17522 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
17523 ac_need_defaults=false;;
17524 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17525 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17526 ac_cs_silent=: ;;
17527
17528 # This is an error.
a3bba767
JJ
17529 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17530Try \`$0 --help' for more information." >&5
17531echo "$as_me: error: unrecognized option: $1
17532Try \`$0 --help' for more information." >&2;}
ba479fd2
NN
17533 { (exit 1); exit 1; }; } ;;
17534
a3bba767 17535 *) ac_config_targets="$ac_config_targets $1" ;;
ba479fd2
NN
17536
17537 esac
17538 shift
6e3f3080 17539done
ba479fd2
NN
17540
17541ac_configure_extra_args=
17542
17543if $ac_cs_silent; then
17544 exec 6>/dev/null
17545 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
17546fi
17547
ba479fd2
NN
17548_ACEOF
17549cat >>$CONFIG_STATUS <<_ACEOF
17550if \$ac_cs_recheck; then
a3bba767
JJ
17551 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
17552 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
ba479fd2 17553fi
861bb6c1 17554
ba479fd2
NN
17555_ACEOF
17556
17557cat >>$CONFIG_STATUS <<_ACEOF
17558#
a3bba767 17559# INIT-COMMANDS section.
ba479fd2 17560#
a3bba767 17561
ba479fd2 17562subdirs='$subdirs'
ba479fd2
NN
17563
17564_ACEOF
17565
703d89ab 17566
a3bba767
JJ
17567
17568cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
17569for ac_config_target in $ac_config_targets
17570do
a3bba767
JJ
17571 case "$ac_config_target" in
17572 # Handling of arguments.
be0fe523
PB
17573 "as" ) CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
17574 "collect-ld" ) CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
17575 "nm" ) CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
a3bba767
JJ
17576 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
17577 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17578 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
ba479fd2
NN
17579 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17580echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17581 { (exit 1); exit 1; }; };;
861bb6c1 17582 esac
ba479fd2
NN
17583done
17584
17585# If the user did not use the arguments to specify the items to instantiate,
17586# then the envvar interface is used. Set only those that are not.
17587# We use the long form for the default assignment because of an extremely
17588# bizarre bug on SunOS 4.1.3.
17589if $ac_need_defaults; then
17590 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17591 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17592 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17593fi
17594
17595# Have a temporary directory for convenience. Make it in the build tree
a3bba767 17596# simply because there is no reason to put it here, and in addition,
ba479fd2 17597# creating and moving files from /tmp can sometimes cause problems.
a3bba767 17598# Create a temporary directory, and hook for its removal unless debugging.
ba479fd2
NN
17599$debug ||
17600{
a3bba767 17601 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
ba479fd2
NN
17602 trap '{ (exit 1); exit 1; }' 1 2 13 15
17603}
a3bba767 17604
ba479fd2 17605# Create a (secure) tmp directory for tmp files.
6e3f3080 17606
ba479fd2 17607{
a3bba767 17608 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
ba479fd2
NN
17609 test -n "$tmp" && test -d "$tmp"
17610} ||
17611{
a3bba767
JJ
17612 tmp=./confstat$$-$RANDOM
17613 (umask 077 && mkdir $tmp)
ba479fd2
NN
17614} ||
17615{
17616 echo "$me: cannot create a temporary directory in ." >&2
17617 { (exit 1); exit 1; }
17618}
17619
a3bba767
JJ
17620_ACEOF
17621
17622cat >>$CONFIG_STATUS <<_ACEOF
17623
ba479fd2 17624#
a3bba767 17625# CONFIG_FILES section.
ba479fd2
NN
17626#
17627
17628# No need to generate the scripts if there are no CONFIG_FILES.
17629# This happens for instance when ./config.status config.h
a3bba767
JJ
17630if test -n "\$CONFIG_FILES"; then
17631 # Protect against being on the right side of a sed subst in config.status.
17632 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17633 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17634s,@SHELL@,$SHELL,;t t
17635s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17636s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17637s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17638s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17639s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17640s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17641s,@exec_prefix@,$exec_prefix,;t t
17642s,@prefix@,$prefix,;t t
17643s,@program_transform_name@,$program_transform_name,;t t
17644s,@bindir@,$bindir,;t t
17645s,@sbindir@,$sbindir,;t t
17646s,@libexecdir@,$libexecdir,;t t
17647s,@datadir@,$datadir,;t t
17648s,@sysconfdir@,$sysconfdir,;t t
17649s,@sharedstatedir@,$sharedstatedir,;t t
17650s,@localstatedir@,$localstatedir,;t t
17651s,@libdir@,$libdir,;t t
17652s,@includedir@,$includedir,;t t
17653s,@oldincludedir@,$oldincludedir,;t t
17654s,@infodir@,$infodir,;t t
17655s,@mandir@,$mandir,;t t
17656s,@build_alias@,$build_alias,;t t
17657s,@host_alias@,$host_alias,;t t
17658s,@target_alias@,$target_alias,;t t
17659s,@DEFS@,$DEFS,;t t
17660s,@ECHO_C@,$ECHO_C,;t t
17661s,@ECHO_N@,$ECHO_N,;t t
17662s,@ECHO_T@,$ECHO_T,;t t
17663s,@LIBS@,$LIBS,;t t
17664s,@build@,$build,;t t
17665s,@build_cpu@,$build_cpu,;t t
17666s,@build_vendor@,$build_vendor,;t t
17667s,@build_os@,$build_os,;t t
17668s,@host@,$host,;t t
17669s,@host_cpu@,$host_cpu,;t t
17670s,@host_vendor@,$host_vendor,;t t
17671s,@host_os@,$host_os,;t t
17672s,@target@,$target,;t t
17673s,@target_cpu@,$target_cpu,;t t
17674s,@target_vendor@,$target_vendor,;t t
17675s,@target_os@,$target_os,;t t
17676s,@target_noncanonical@,$target_noncanonical,;t t
17677s,@build_libsubdir@,$build_libsubdir,;t t
17678s,@build_subdir@,$build_subdir,;t t
17679s,@host_subdir@,$host_subdir,;t t
17680s,@target_subdir@,$target_subdir,;t t
17681s,@GENINSRC@,$GENINSRC,;t t
17682s,@CC@,$CC,;t t
17683s,@CFLAGS@,$CFLAGS,;t t
17684s,@LDFLAGS@,$LDFLAGS,;t t
17685s,@CPPFLAGS@,$CPPFLAGS,;t t
17686s,@ac_ct_CC@,$ac_ct_CC,;t t
17687s,@EXEEXT@,$EXEEXT,;t t
17688s,@OBJEXT@,$OBJEXT,;t t
17689s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
17690s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
17691s,@CPP@,$CPP,;t t
17692s,@EGREP@,$EGREP,;t t
3bbd5a19 17693s,@loose_warn@,$loose_warn,;t t
a3bba767 17694s,@cxx_compat_warn@,$cxx_compat_warn,;t t
3bbd5a19 17695s,@strict_warn@,$strict_warn,;t t
a3bba767
JJ
17696s,@warn_cflags@,$warn_cflags,;t t
17697s,@nocommon_flag@,$nocommon_flag,;t t
17698s,@TREEBROWSER@,$TREEBROWSER,;t t
17699s,@valgrind_path@,$valgrind_path,;t t
17700s,@valgrind_path_defines@,$valgrind_path_defines,;t t
17701s,@valgrind_command@,$valgrind_command,;t t
17702s,@coverage_flags@,$coverage_flags,;t t
17703s,@enable_multilib@,$enable_multilib,;t t
17704s,@enable_decimal_float@,$enable_decimal_float,;t t
17705s,@enable_shared@,$enable_shared,;t t
17706s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
17707s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
17708s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
17709s,@onestep@,$onestep,;t t
17710s,@datarootdir@,$datarootdir,;t t
17711s,@docdir@,$docdir,;t t
17712s,@htmldir@,$htmldir,;t t
17713s,@SET_MAKE@,$SET_MAKE,;t t
17714s,@AWK@,$AWK,;t t
17715s,@LN_S@,$LN_S,;t t
17716s,@LN@,$LN,;t t
17717s,@RANLIB@,$RANLIB,;t t
17718s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17719s,@ranlib_flags@,$ranlib_flags,;t t
17720s,@INSTALL@,$INSTALL,;t t
17721s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17722s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17723s,@make_compare_target@,$make_compare_target,;t t
17724s,@have_mktemp_command@,$have_mktemp_command,;t t
17725s,@MAKEINFO@,$MAKEINFO,;t t
17726s,@BUILD_INFO@,$BUILD_INFO,;t t
17727s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
17728s,@FLEX@,$FLEX,;t t
17729s,@BISON@,$BISON,;t t
17730s,@NM@,$NM,;t t
17731s,@AR@,$AR,;t t
17732s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
17733s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
17734s,@LDEXP_LIB@,$LDEXP_LIB,;t t
17735s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
17736s,@LIBICONV@,$LIBICONV,;t t
17737s,@LTLIBICONV@,$LTLIBICONV,;t t
17738s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
17739s,@manext@,$manext,;t t
17740s,@objext@,$objext,;t t
17741s,@gthread_flags@,$gthread_flags,;t t
17742s,@extra_modes_file@,$extra_modes_file,;t t
17743s,@extra_opt_files@,$extra_opt_files,;t t
17744s,@USE_NLS@,$USE_NLS,;t t
17745s,@LIBINTL@,$LIBINTL,;t t
17746s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
17747s,@INCINTL@,$INCINTL,;t t
17748s,@XGETTEXT@,$XGETTEXT,;t t
17749s,@GMSGFMT@,$GMSGFMT,;t t
17750s,@POSUB@,$POSUB,;t t
17751s,@CATALOGS@,$CATALOGS,;t t
17752s,@DATADIRNAME@,$DATADIRNAME,;t t
17753s,@INSTOBJEXT@,$INSTOBJEXT,;t t
17754s,@GENCAT@,$GENCAT,;t t
17755s,@CATOBJEXT@,$CATOBJEXT,;t t
17756s,@host_cc_for_libada@,$host_cc_for_libada,;t t
17757s,@CROSS@,$CROSS,;t t
17758s,@ALL@,$ALL,;t t
17759s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
17760s,@inhibit_libc@,$inhibit_libc,;t t
17761s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
17762s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17763s,@STMP_FIXINC@,$STMP_FIXINC,;t t
17764s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
17765s,@collect2@,$collect2,;t t
17766s,@gcc_cv_as@,$gcc_cv_as,;t t
17767s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
17768s,@gcc_cv_ld@,$gcc_cv_ld,;t t
17769s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
17770s,@gcc_cv_nm@,$gcc_cv_nm,;t t
17771s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
17772s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
17773s,@libgcc_visibility@,$libgcc_visibility,;t t
17774s,@GGC@,$GGC,;t t
17775s,@zlibdir@,$zlibdir,;t t
17776s,@zlibinc@,$zlibinc,;t t
17777s,@MAINT@,$MAINT,;t t
17778s,@gcc_tooldir@,$gcc_tooldir,;t t
17779s,@dollar@,$dollar,;t t
17780s,@slibdir@,$slibdir,;t t
17781s,@objdir@,$objdir,;t t
17782s,@subdirs@,$subdirs,;t t
17783s,@srcdir@,$srcdir,;t t
17784s,@all_compilers@,$all_compilers,;t t
17785s,@all_gtfiles@,$all_gtfiles,;t t
17786s,@all_lang_makefrags@,$all_lang_makefrags,;t t
17787s,@all_lang_makefiles@,$all_lang_makefiles,;t t
17788s,@all_languages@,$all_languages,;t t
17789s,@all_selected_languages@,$all_selected_languages,;t t
17790s,@build_exeext@,$build_exeext,;t t
17791s,@build_install_headers_dir@,$build_install_headers_dir,;t t
17792s,@build_xm_file_list@,$build_xm_file_list,;t t
17793s,@build_xm_include_list@,$build_xm_include_list,;t t
17794s,@build_xm_defines@,$build_xm_defines,;t t
17795s,@check_languages@,$check_languages,;t t
17796s,@cpp_install_dir@,$cpp_install_dir,;t t
17797s,@xmake_file@,$xmake_file,;t t
17798s,@tmake_file@,$tmake_file,;t t
17799s,@extra_gcc_objs@,$extra_gcc_objs,;t t
17800s,@extra_headers_list@,$extra_headers_list,;t t
17801s,@extra_objs@,$extra_objs,;t t
17802s,@extra_parts@,$extra_parts,;t t
17803s,@extra_passes@,$extra_passes,;t t
17804s,@extra_programs@,$extra_programs,;t t
17805s,@float_h_file@,$float_h_file,;t t
17806s,@gcc_config_arguments@,$gcc_config_arguments,;t t
17807s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
17808s,@host_exeext@,$host_exeext,;t t
17809s,@host_xm_file_list@,$host_xm_file_list,;t t
17810s,@host_xm_include_list@,$host_xm_include_list,;t t
17811s,@host_xm_defines@,$host_xm_defines,;t t
17812s,@out_host_hook_obj@,$out_host_hook_obj,;t t
17813s,@install@,$install,;t t
17814s,@lang_opt_files@,$lang_opt_files,;t t
17815s,@lang_specs_files@,$lang_specs_files,;t t
17816s,@lang_tree_files@,$lang_tree_files,;t t
17817s,@local_prefix@,$local_prefix,;t t
17818s,@md_file@,$md_file,;t t
17819s,@objc_boehm_gc@,$objc_boehm_gc,;t t
17820s,@out_file@,$out_file,;t t
17821s,@out_object_file@,$out_object_file,;t t
17822s,@thread_file@,$thread_file,;t t
17823s,@tm_file_list@,$tm_file_list,;t t
17824s,@tm_include_list@,$tm_include_list,;t t
17825s,@tm_defines@,$tm_defines,;t t
17826s,@tm_p_file_list@,$tm_p_file_list,;t t
17827s,@tm_p_include_list@,$tm_p_include_list,;t t
17828s,@xm_file_list@,$xm_file_list,;t t
17829s,@xm_include_list@,$xm_include_list,;t t
17830s,@xm_defines@,$xm_defines,;t t
17831s,@c_target_objs@,$c_target_objs,;t t
17832s,@cxx_target_objs@,$cxx_target_objs,;t t
17833s,@target_cpu_default@,$target_cpu_default,;t t
17834s,@GMPLIBS@,$GMPLIBS,;t t
17835s,@GMPINC@,$GMPINC,;t t
17836s,@LIBOBJS@,$LIBOBJS,;t t
17837s,@LTLIBOBJS@,$LTLIBOBJS,;t t
17838/@language_hooks@/r $language_hooks
17839s,@language_hooks@,,;t t
17840CEOF
17841
17842_ACEOF
17843
17844 cat >>$CONFIG_STATUS <<\_ACEOF
17845 # Split the substitutions into bite-sized pieces for seds with
17846 # small command number limits, like on Digital OSF/1 and HP-UX.
17847 ac_max_sed_lines=48
17848 ac_sed_frag=1 # Number of current file.
17849 ac_beg=1 # First line for current file.
17850 ac_end=$ac_max_sed_lines # Line after last line for current file.
17851 ac_more_lines=:
17852 ac_sed_cmds=
17853 while $ac_more_lines; do
17854 if test $ac_beg -gt 1; then
17855 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17856 else
17857 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17858 fi
17859 if test ! -s $tmp/subs.frag; then
17860 ac_more_lines=false
17861 else
17862 # The purpose of the label and of the branching condition is to
17863 # speed up the sed processing (if there are no `@' at all, there
17864 # is no need to browse any of the substitutions).
17865 # These are the two extra sed commands mentioned above.
17866 (echo ':t
17867 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17868 if test -z "$ac_sed_cmds"; then
17869 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17870 else
17871 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17872 fi
17873 ac_sed_frag=`expr $ac_sed_frag + 1`
17874 ac_beg=$ac_end
17875 ac_end=`expr $ac_end + $ac_max_sed_lines`
17876 fi
17877 done
17878 if test -z "$ac_sed_cmds"; then
17879 ac_sed_cmds=cat
703d89ab 17880 fi
a3bba767 17881fi # test -n "$CONFIG_FILES"
703d89ab 17882
b8ec3cc8 17883_ACEOF
ba479fd2 17884cat >>$CONFIG_STATUS <<\_ACEOF
a3bba767
JJ
17885for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17886 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17887 case $ac_file in
17888 - | *:- | *:-:* ) # input from stdin
17889 cat >$tmp/stdin
17890 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17891 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17892 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17893 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17894 * ) ac_file_in=$ac_file.in ;;
703d89ab
ZW
17895 esac
17896
a3bba767
JJ
17897 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17898 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
ba479fd2 17899$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17900 X"$ac_file" : 'X\(//\)[^/]' \| \
17901 X"$ac_file" : 'X\(//\)$' \| \
a3bba767
JJ
17902 X"$ac_file" : 'X\(/\)' \| \
17903 . : '\(.\)' 2>/dev/null ||
ba479fd2 17904echo X"$ac_file" |
a3bba767
JJ
17905 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17906 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17907 /^X\(\/\/\)$/{ s//\1/; q; }
17908 /^X\(\/\).*/{ s//\1/; q; }
17909 s/.*/./; q'`
17910 { if $as_mkdir_p; then
17911 mkdir -p "$ac_dir"
17912 else
17913 as_dir="$ac_dir"
ba479fd2 17914 as_dirs=
a3bba767
JJ
17915 while test ! -d "$as_dir"; do
17916 as_dirs="$as_dir $as_dirs"
17917 as_dir=`(dirname "$as_dir") 2>/dev/null ||
ba479fd2 17918$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17919 X"$as_dir" : 'X\(//\)[^/]' \| \
17920 X"$as_dir" : 'X\(//\)$' \| \
a3bba767
JJ
17921 X"$as_dir" : 'X\(/\)' \| \
17922 . : '\(.\)' 2>/dev/null ||
ba479fd2 17923echo X"$as_dir" |
a3bba767
JJ
17924 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17925 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17926 /^X\(\/\/\)$/{ s//\1/; q; }
17927 /^X\(\/\).*/{ s//\1/; q; }
17928 s/.*/./; q'`
ba479fd2 17929 done
a3bba767
JJ
17930 test ! -n "$as_dirs" || mkdir $as_dirs
17931 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17932echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
ba479fd2 17933 { (exit 1); exit 1; }; }; }
a3bba767 17934
ba479fd2
NN
17935 ac_builddir=.
17936
a3bba767 17937if test "$ac_dir" != .; then
ba479fd2 17938 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
a3bba767
JJ
17939 # A "../" for each directory in $ac_dir_suffix.
17940 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17941else
17942 ac_dir_suffix= ac_top_builddir=
17943fi
ba479fd2
NN
17944
17945case $srcdir in
a3bba767 17946 .) # No --srcdir option. We are building in place.
ba479fd2 17947 ac_srcdir=.
a3bba767
JJ
17948 if test -z "$ac_top_builddir"; then
17949 ac_top_srcdir=.
17950 else
17951 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17952 fi ;;
17953 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 17954 ac_srcdir=$srcdir$ac_dir_suffix;
a3bba767
JJ
17955 ac_top_srcdir=$srcdir ;;
17956 *) # Relative path.
17957 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17958 ac_top_srcdir=$ac_top_builddir$srcdir ;;
ba479fd2 17959esac
ba479fd2 17960
a3bba767
JJ
17961# Do not use `cd foo && pwd` to compute absolute paths, because
17962# the directories may not exist.
17963case `pwd` in
17964.) ac_abs_builddir="$ac_dir";;
17965*)
17966 case "$ac_dir" in
17967 .) ac_abs_builddir=`pwd`;;
17968 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17969 *) ac_abs_builddir=`pwd`/"$ac_dir";;
17970 esac;;
17971esac
17972case $ac_abs_builddir in
17973.) ac_abs_top_builddir=${ac_top_builddir}.;;
17974*)
17975 case ${ac_top_builddir}. in
17976 .) ac_abs_top_builddir=$ac_abs_builddir;;
17977 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
17978 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
17979 esac;;
17980esac
17981case $ac_abs_builddir in
17982.) ac_abs_srcdir=$ac_srcdir;;
17983*)
17984 case $ac_srcdir in
17985 .) ac_abs_srcdir=$ac_abs_builddir;;
17986 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
17987 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
17988 esac;;
17989esac
17990case $ac_abs_builddir in
17991.) ac_abs_top_srcdir=$ac_top_srcdir;;
17992*)
17993 case $ac_top_srcdir in
17994 .) ac_abs_top_srcdir=$ac_abs_builddir;;
17995 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
17996 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
17997 esac;;
17998esac
ba479fd2 17999
a6ccdbab 18000
703d89ab 18001
a3bba767
JJ
18002 if test x"$ac_file" != x-; then
18003 { echo "$as_me:$LINENO: creating $ac_file" >&5
18004echo "$as_me: creating $ac_file" >&6;}
18005 rm -f "$ac_file"
18006 fi
18007 # Let's still pretend it is `configure' which instantiates (i.e., don't
18008 # use $as_me), people would be surprised to read:
18009 # /* config.h. Generated by config.status. */
18010 if test x"$ac_file" = x-; then
18011 configure_input=
18012 else
18013 configure_input="$ac_file. "
18014 fi
18015 configure_input=$configure_input"Generated from `echo $ac_file_in |
18016 sed 's,.*/,,'` by configure."
18017
18018 # First look for the input files in the build tree, otherwise in the
18019 # src tree.
18020 ac_file_inputs=`IFS=:
18021 for f in $ac_file_in; do
18022 case $f in
18023 -) echo $tmp/stdin ;;
18024 [\\/$]*)
18025 # Absolute (can't be DOS-style, as IFS=:)
18026 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18027echo "$as_me: error: cannot find input file: $f" >&2;}
18028 { (exit 1); exit 1; }; }
18029 echo "$f";;
18030 *) # Relative
18031 if test -f "$f"; then
18032 # Build tree
18033 echo "$f"
18034 elif test -f "$srcdir/$f"; then
18035 # Source tree
18036 echo "$srcdir/$f"
18037 else
18038 # /dev/null tree
18039 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18040echo "$as_me: error: cannot find input file: $f" >&2;}
18041 { (exit 1); exit 1; }; }
18042 fi;;
18043 esac
18044 done` || { (exit 1); exit 1; }
a6ccdbab 18045_ACEOF
ba479fd2
NN
18046cat >>$CONFIG_STATUS <<_ACEOF
18047 sed "$ac_vpsub
18048$extrasub
18049_ACEOF
18050cat >>$CONFIG_STATUS <<\_ACEOF
18051:t
18052/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
a3bba767
JJ
18053s,@configure_input@,$configure_input,;t t
18054s,@srcdir@,$ac_srcdir,;t t
18055s,@abs_srcdir@,$ac_abs_srcdir,;t t
18056s,@top_srcdir@,$ac_top_srcdir,;t t
18057s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18058s,@builddir@,$ac_builddir,;t t
18059s,@abs_builddir@,$ac_abs_builddir,;t t
18060s,@top_builddir@,$ac_top_builddir,;t t
18061s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18062" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18063 rm -f $tmp/stdin
18064 if test x"$ac_file" != x-; then
18065 mv $tmp/out $ac_file
18066 else
18067 cat $tmp/out
18068 rm -f $tmp/out
18069 fi
18070
be0fe523
PB
18071 # Run the commands associated with the file.
18072 case $ac_file in
18073 as ) chmod +x as ;;
18074 collect-ld ) chmod +x collect-ld ;;
18075 nm ) chmod +x nm ;;
18076 esac
a3bba767
JJ
18077done
18078_ACEOF
18079cat >>$CONFIG_STATUS <<\_ACEOF
18080
18081#
18082# CONFIG_HEADER section.
18083#
18084
18085# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18086# NAME is the cpp macro being defined and VALUE is the value it is being given.
18087#
18088# ac_d sets the value in "#define NAME VALUE" lines.
18089ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18090ac_dB='[ ].*$,\1#\2'
18091ac_dC=' '
18092ac_dD=',;t'
18093# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18094ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18095ac_uB='$,\1#\2define\3'
18096ac_uC=' '
18097ac_uD=',;t'
18098
18099for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18100 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2 18101 case $ac_file in
a3bba767
JJ
18102 - | *:- | *:-:* ) # input from stdin
18103 cat >$tmp/stdin
18104 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18105 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18106 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18107 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18108 * ) ac_file_in=$ac_file.in ;;
861bb6c1 18109 esac
a3bba767
JJ
18110
18111 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18112echo "$as_me: creating $ac_file" >&6;}
18113
18114 # First look for the input files in the build tree, otherwise in the
18115 # src tree.
18116 ac_file_inputs=`IFS=:
18117 for f in $ac_file_in; do
18118 case $f in
18119 -) echo $tmp/stdin ;;
18120 [\\/$]*)
18121 # Absolute (can't be DOS-style, as IFS=:)
18122 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18123echo "$as_me: error: cannot find input file: $f" >&2;}
18124 { (exit 1); exit 1; }; }
18125 # Do quote $f, to prevent DOS paths from being IFS'd.
18126 echo "$f";;
18127 *) # Relative
18128 if test -f "$f"; then
18129 # Build tree
18130 echo "$f"
18131 elif test -f "$srcdir/$f"; then
18132 # Source tree
18133 echo "$srcdir/$f"
18134 else
18135 # /dev/null tree
18136 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18137echo "$as_me: error: cannot find input file: $f" >&2;}
18138 { (exit 1); exit 1; }; }
18139 fi;;
18140 esac
18141 done` || { (exit 1); exit 1; }
18142 # Remove the trailing spaces.
18143 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18144
18145_ACEOF
18146
18147# Transform confdefs.h into two sed scripts, `conftest.defines' and
18148# `conftest.undefs', that substitutes the proper values into
18149# config.h.in to produce config.h. The first handles `#define'
18150# templates, and the second `#undef' templates.
18151# And first: Protect against being on the right side of a sed subst in
18152# config.status. Protect against being in an unquoted here document
18153# in config.status.
18154rm -f conftest.defines conftest.undefs
18155# Using a here document instead of a string reduces the quoting nightmare.
18156# Putting comments in sed scripts is not portable.
18157#
18158# `end' is used to avoid that the second main sed command (meant for
18159# 0-ary CPP macros) applies to n-ary macro definitions.
18160# See the Autoconf documentation for `clear'.
18161cat >confdef2sed.sed <<\_ACEOF
18162s/[\\&,]/\\&/g
18163s,[\\$`],\\&,g
18164t clear
18165: clear
18166s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18167t end
18168s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18169: end
18170_ACEOF
18171# If some macros were called several times there might be several times
18172# the same #defines, which is useless. Nevertheless, we may not want to
18173# sort them, since we want the *last* AC-DEFINE to be honored.
18174uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18175sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18176rm -f confdef2sed.sed
18177
18178# This sed command replaces #undef with comments. This is necessary, for
861bb6c1
JL
18179# example, in the case of _POSIX_SOURCE, which is predefined and required
18180# on some systems where configure will not decide to define it.
a3bba767
JJ
18181cat >>conftest.undefs <<\_ACEOF
18182s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18183_ACEOF
18184
18185# Break up conftest.defines because some shells have a limit on the size
18186# of here documents, and old seds have small limits too (100 cmds).
18187echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
18188echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
18189echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18190echo ' :' >>$CONFIG_STATUS
18191rm -f conftest.tail
18192while grep . conftest.defines >/dev/null
ba479fd2 18193do
a3bba767
JJ
18194 # Write a limited-size here document to $tmp/defines.sed.
18195 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18196 # Speed up: don't consider the non `#define' lines.
18197 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18198 # Work around the forget-to-reset-the-flag bug.
18199 echo 't clr' >>$CONFIG_STATUS
18200 echo ': clr' >>$CONFIG_STATUS
18201 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
ba479fd2 18202 echo 'CEOF
a3bba767
JJ
18203 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18204 rm -f $tmp/in
18205 mv $tmp/out $tmp/in
18206' >>$CONFIG_STATUS
18207 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
ba479fd2
NN
18208 rm -f conftest.defines
18209 mv conftest.tail conftest.defines
18210done
a3bba767
JJ
18211rm -f conftest.defines
18212echo ' fi # grep' >>$CONFIG_STATUS
18213echo >>$CONFIG_STATUS
18214
18215# Break up conftest.undefs because some shells have a limit on the size
18216# of here documents, and old seds have small limits too (100 cmds).
18217echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18218rm -f conftest.tail
18219while grep . conftest.undefs >/dev/null
18220do
18221 # Write a limited-size here document to $tmp/undefs.sed.
18222 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18223 # Speed up: don't consider the non `#undef'
18224 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18225 # Work around the forget-to-reset-the-flag bug.
18226 echo 't clr' >>$CONFIG_STATUS
18227 echo ': clr' >>$CONFIG_STATUS
18228 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18229 echo 'CEOF
18230 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18231 rm -f $tmp/in
18232 mv $tmp/out $tmp/in
18233' >>$CONFIG_STATUS
18234 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18235 rm -f conftest.undefs
18236 mv conftest.tail conftest.undefs
18237done
18238rm -f conftest.undefs
ba479fd2
NN
18239
18240cat >>$CONFIG_STATUS <<\_ACEOF
a3bba767
JJ
18241 # Let's still pretend it is `configure' which instantiates (i.e., don't
18242 # use $as_me), people would be surprised to read:
18243 # /* config.h. Generated by config.status. */
18244 if test x"$ac_file" = x-; then
18245 echo "/* Generated by configure. */" >$tmp/config.h
18246 else
18247 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
18248 fi
18249 cat $tmp/in >>$tmp/config.h
18250 rm -f $tmp/in
ba479fd2 18251 if test x"$ac_file" != x-; then
a3bba767 18252 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
ba479fd2
NN
18253 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18254echo "$as_me: $ac_file is unchanged" >&6;}
18255 else
a3bba767
JJ
18256 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18257$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18258 X"$ac_file" : 'X\(//\)[^/]' \| \
18259 X"$ac_file" : 'X\(//\)$' \| \
18260 X"$ac_file" : 'X\(/\)' \| \
18261 . : '\(.\)' 2>/dev/null ||
18262echo X"$ac_file" |
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; }; }; }
18292
ba479fd2 18293 rm -f $ac_file
a3bba767 18294 mv $tmp/config.h $ac_file
ba479fd2
NN
18295 fi
18296 else
a3bba767
JJ
18297 cat $tmp/config.h
18298 rm -f $tmp/config.h
ba479fd2 18299 fi
a3bba767
JJ
18300done
18301_ACEOF
18302cat >>$CONFIG_STATUS <<\_ACEOF
8b1f719a 18303
a3bba767
JJ
18304#
18305# CONFIG_COMMANDS section.
18306#
18307for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18308 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18309 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18310 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
18311$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18312 X"$ac_dest" : 'X\(//\)[^/]' \| \
18313 X"$ac_dest" : 'X\(//\)$' \| \
18314 X"$ac_dest" : 'X\(/\)' \| \
18315 . : '\(.\)' 2>/dev/null ||
18316echo X"$ac_dest" |
18317 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18318 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18319 /^X\(\/\/\)$/{ s//\1/; q; }
18320 /^X\(\/\).*/{ s//\1/; q; }
18321 s/.*/./; q'`
18322 { if $as_mkdir_p; then
18323 mkdir -p "$ac_dir"
18324 else
18325 as_dir="$ac_dir"
18326 as_dirs=
18327 while test ! -d "$as_dir"; do
18328 as_dirs="$as_dir $as_dirs"
18329 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18331 X"$as_dir" : 'X\(//\)[^/]' \| \
18332 X"$as_dir" : 'X\(//\)$' \| \
18333 X"$as_dir" : 'X\(/\)' \| \
18334 . : '\(.\)' 2>/dev/null ||
18335echo X"$as_dir" |
18336 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18337 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18338 /^X\(\/\/\)$/{ s//\1/; q; }
18339 /^X\(\/\).*/{ s//\1/; q; }
18340 s/.*/./; q'`
18341 done
18342 test ! -n "$as_dirs" || mkdir $as_dirs
18343 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18344echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18345 { (exit 1); exit 1; }; }; }
8b1f719a 18346
a3bba767 18347 ac_builddir=.
8b1f719a 18348
a3bba767
JJ
18349if test "$ac_dir" != .; then
18350 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18351 # A "../" for each directory in $ac_dir_suffix.
18352 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18353else
18354 ac_dir_suffix= ac_top_builddir=
18355fi
18356
18357case $srcdir in
18358 .) # No --srcdir option. We are building in place.
18359 ac_srcdir=.
18360 if test -z "$ac_top_builddir"; then
18361 ac_top_srcdir=.
18362 else
18363 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18364 fi ;;
18365 [\\/]* | ?:[\\/]* ) # Absolute path.
18366 ac_srcdir=$srcdir$ac_dir_suffix;
18367 ac_top_srcdir=$srcdir ;;
18368 *) # Relative path.
18369 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18370 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18371esac
18372
18373# Do not use `cd foo && pwd` to compute absolute paths, because
18374# the directories may not exist.
18375case `pwd` in
18376.) ac_abs_builddir="$ac_dir";;
18377*)
18378 case "$ac_dir" in
18379 .) ac_abs_builddir=`pwd`;;
18380 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
18381 *) ac_abs_builddir=`pwd`/"$ac_dir";;
18382 esac;;
18383esac
18384case $ac_abs_builddir in
18385.) ac_abs_top_builddir=${ac_top_builddir}.;;
18386*)
18387 case ${ac_top_builddir}. in
18388 .) ac_abs_top_builddir=$ac_abs_builddir;;
18389 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
18390 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
18391 esac;;
18392esac
18393case $ac_abs_builddir in
18394.) ac_abs_srcdir=$ac_srcdir;;
18395*)
18396 case $ac_srcdir in
18397 .) ac_abs_srcdir=$ac_abs_builddir;;
18398 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
18399 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
18400 esac;;
18401esac
18402case $ac_abs_builddir in
18403.) ac_abs_top_srcdir=$ac_top_srcdir;;
18404*)
18405 case $ac_top_srcdir in
18406 .) ac_abs_top_srcdir=$ac_abs_builddir;;
18407 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
18408 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
18409 esac;;
18410esac
18411
18412
18413 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
18414echo "$as_me: executing $ac_dest commands" >&6;}
18415 case $ac_dest in
18416 default )
f1faaabd
NN
18417case ${CONFIG_HEADERS} in
18418 *auto-host.h:config.in*)
18419 echo > cstamp-h ;;
861bb6c1 18420esac
2ed26f6b 18421# Make sure all the subdirs exist.
3b620440 18422for d in $subdirs doc build
2ed26f6b 18423do
2ed26f6b 18424 test -d $d || mkdir $d
2ed26f6b 18425done
ba479fd2
NN
18426 ;;
18427 esac
a3bba767
JJ
18428done
18429_ACEOF
cafe096b 18430
a3bba767 18431cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
18432
18433{ (exit 0); exit 0; }
18434_ACEOF
861bb6c1 18435chmod +x $CONFIG_STATUS
ba479fd2
NN
18436ac_clean_files=$ac_clean_files_save
18437
18438
18439# configure is writing to config.log, and then calls config.status.
18440# config.status does its own redirection, appending to config.log.
18441# Unfortunately, on DOS this fails, as config.log is still kept open
18442# by configure, so config.status won't be able to write to it; its
18443# output is simply discarded. So we exec the FD to /dev/null,
18444# effectively closing config.log, so it can be properly (re)opened and
18445# appended to by config.status. When coming back to configure, we
18446# need to make the FD available again.
18447if test "$no_create" != yes; then
18448 ac_cs_success=:
18449 ac_config_status_args=
18450 test "$silent" = yes &&
18451 ac_config_status_args="$ac_config_status_args --quiet"
18452 exec 5>/dev/null
18453 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18454 exec 5>>config.log
18455 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18456 # would make configure fail if this is the last instruction.
18457 $ac_cs_success || { (exit 1); exit 1; }
18458fi
861bb6c1 18459