]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
demangle.h (demangle_component_type): Add DEMANGLE_COMPONENT_JAVA_RESOURCE...
[thirdparty/gcc.git] / gcc / configure
CommitLineData
005537df 1#! /bin/sh
861bb6c1 2# Guess values for system-dependent variables and create Makefiles.
b61ff9c8 3# Generated by GNU Autoconf 2.59.
861bb6c1 4#
b61ff9c8 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
b61ff9c8 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+"$@"}'='"$@"'
b61ff9c8
BS
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
ba479fd2 21fi
b61ff9c8 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.
b61ff9c8 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
b61ff9c8 47 $as_unset $as_var
ba479fd2
NN
48 fi
49done
50
51# Required to use basename.
b61ff9c8 52if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
53 as_expr=expr
54else
55 as_expr=false
56fi
57
b61ff9c8 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.
b61ff9c8 66as_me=`$as_basename "$0" ||
ba479fd2
NN
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
b61ff9c8
BS
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
ba479fd2 71echo X/"$0" |
b61ff9c8
BS
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
703d89ab 76
ab22c1fa 77
b61ff9c8
BS
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
1a4b763e 85
b61ff9c8
BS
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
1a4b763e
BS
97fi
98
1a4b763e 99
b61ff9c8
BS
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
1a4b763e 116
b61ff9c8
BS
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=.
b61ff9c8
BS
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
ba479fd2 137 /*)
b61ff9c8 138 if ("$as_dir/$as_base" -c '
1a4b763e
BS
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
b61ff9c8 141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
1a4b763e 142 test "x$as_lineno_1" != "x$as_lineno_2" &&
b61ff9c8
BS
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
b61ff9c8
BS
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
b61ff9c8
BS
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
ba479fd2
NN
165 sed '
166 N
b61ff9c8
BS
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
ba479fd2 170 t loop
b61ff9c8
BS
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
ba479fd2 173 ' >$as_me.lineno &&
b61ff9c8 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
b61ff9c8
BS
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
b61ff9c8
BS
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
b61ff9c8 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
b61ff9c8
BS
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'
b61ff9c8
BS
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
b61ff9c8 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
b61ff9c8 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
b61ff9c8
BS
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
b61ff9c8
BS
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
b61ff9c8
BS
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>
b61ff9c8 278#if HAVE_SYS_TYPES_H
ba479fd2
NN
279# include <sys/types.h>
280#endif
b61ff9c8 281#if HAVE_SYS_STAT_H
ba479fd2
NN
282# include <sys/stat.h>
283#endif
b61ff9c8 284#if STDC_HEADERS
ba479fd2
NN
285# include <stdlib.h>
286# include <stddef.h>
287#else
b61ff9c8 288# if HAVE_STDLIB_H
ba479fd2
NN
289# include <stdlib.h>
290# endif
291#endif
b61ff9c8
BS
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
b61ff9c8 298#if HAVE_STRINGS_H
ba479fd2
NN
299# include <strings.h>
300#endif
b61ff9c8 301#if HAVE_INTTYPES_H
ba479fd2 302# include <inttypes.h>
b61ff9c8
BS
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
ba479fd2 307#endif
b61ff9c8 308#if HAVE_UNISTD_H
ba479fd2
NN
309# include <unistd.h>
310#endif"
311
b61ff9c8 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_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI 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'
b61ff9c8 343datadir='${prefix}/share'
861bb6c1
JL
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
b61ff9c8 347libdir='${exec_prefix}/lib'
861bb6c1
JL
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
b61ff9c8
BS
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
b61ff9c8 358 eval "$ac_prev=\$ac_option"
861bb6c1
JL
359 ac_prev=
360 continue
361 fi
362
b61ff9c8 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
861bb6c1
JL
364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
b61ff9c8 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
b61ff9c8 389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
861bb6c1 390 ac_prev=datadir ;;
b61ff9c8
BS
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.
b61ff9c8 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; }; }
b61ff9c8
BS
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.
b61ff9c8 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; }; }
b61ff9c8
BS
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 \
b61ff9c8
BS
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
861bb6c1
JL
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
b61ff9c8
BS
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.
b61ff9c8 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; }; }
b61ff9c8
BS
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.
b61ff9c8 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; }; }
b61ff9c8
BS
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; }; }
b61ff9c8
BS
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
b61ff9c8
BS
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
861bb6c1 660do
b61ff9c8 661 eval ac_val=$`echo $ac_var`
ba479fd2 662 case $ac_val in
b61ff9c8
BS
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
2f41c1d6
PB
666 esac
667done
668
b61ff9c8
BS
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
b61ff9c8
BS
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\(//\)$' \| \
b61ff9c8
BS
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
ba479fd2 715echo X"$0" |
b61ff9c8
BS
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
b61ff9c8 722 if test ! -r $srcdir/$ac_unique_file; then
861bb6c1
JL
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
b61ff9c8
BS
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; }; }
b61ff9c8 735 fi
dd7f7a6e 736fi
b61ff9c8
BS
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; }; }
b61ff9c8
BS
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
b61ff9c8
BS
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]
b61ff9c8 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]
b61ff9c8
BS
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,
7e98624c 871 rtlflag,rtl,runtime,tree,valgrind,types.
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
ab22c1fa 886 --enable-fixed-point enable fixed-point arithmetic extension to C
ba479fd2
NN
887 --enable-threads enable thread usage for target GCC
888 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
889 --enable-tls enable or disable generation of tls code
890 overriding the assembler check for tls support
ba479fd2
NN
891 --enable-objc-gc enable the use of Boehm's garbage collector with
892 the GNU Objective-C runtime
893 --disable-shared don't provide a shared libgcc
894 --enable-intermodule build the compiler in one step
f3c9f174 895 --enable-languages=LIST specify which front-ends to build
dfb77e37 896 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
897 --enable-initfini-array use .init_array/.fini_array sections
898 --enable-sjlj-exceptions
899 arrange to use setjmp/longjmp exception handling
7f970b70 900 --enable-secureplt enable -msecure-plt by default for PowerPC
ba479fd2
NN
901 --disable-win32-registry
902 disable lookup of installation paths in the
903 Registry on Windows hosts
904 --enable-win32-registry enable registry lookup (default)
905 --enable-win32-registry=KEY
906 use KEY instead of GCC version as the last portion
907 of the registry key
908 --enable-maintainer-mode
909 enable make rules and dependencies not useful
910 (and sometimes confusing) to the casual installer
911 --enable-version-specific-runtime-libs
912 specify that runtime libraries should be
913 installed in a compiler-specific directory
093e61a6 914
ba479fd2
NN
915Optional Packages:
916 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
917 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1546bb64 918 --with-build-libsubdir=DIR Directory where to find libraries for build system
ba479fd2
NN
919 --with-local-prefix=DIR specifies directory to put local include
920 --with-gxx-include-dir=DIR
921 specifies directory to put g++ header files
922 --with-cpp-install-dir=DIR
923 install the user visible C preprocessor in DIR
924 (relative to PREFIX) as well as PREFIX/bin
925 --with-gnu-ld arrange to work with GNU ld.
926 --with-ld arrange to use the specified ld (full pathname)
d594623a 927 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
928 --with-gnu-as arrange to work with GNU as
929 --with-as arrange to use the specified as (full pathname)
930 --with-stabs arrange to use stabs instead of host debug format
931 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
932 --with-build-sysroot=sysroot
933 use sysroot as the system root during the build
ba479fd2 934 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
2f41c1d6
PB
935 --with-pkgversion=PKG Use PKG in the version string in place of "GCC"
936 --with-bugurl=URL Direct users to URL to report a bug
dfb77e37
KC
937 --with-gnu-ld assume the C compiler uses GNU ld default=no
938 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
939 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 940 --with-system-libunwind use installed libunwind
ed965309 941 --with-long-double-128 Use 128-bit long double by default.
59415997 942 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
943 with the compiler
944 --with-system-zlib use installed libz
22482f74
MS
945 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
946 --with-datarootdir=DIR Use DIR as the data root [PREFIX/share]
947 --with-docdir=DIR Install documentation in DIR [DATAROOTDIR]
948 --with-htmldir=DIR html documentation in in DIR [DOCDIR]
13c22933 949
ba479fd2
NN
950Some influential environment variables:
951 CC C compiler command
952 CFLAGS C compiler flags
953 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
954 nonstandard directory <lib dir>
b61ff9c8
BS
955 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
956 headers in a nonstandard directory <include dir>
ba479fd2 957 CPP C preprocessor
6de9cd9a
DN
958 GMPLIBS How to link GMP
959 GMPINC How to find GMP include files
13c22933 960
ba479fd2
NN
961Use these variables to override the choices made by `configure' or to help
962it to find libraries and programs with nonstandard names/locations.
73458fb7 963
ba479fd2
NN
964_ACEOF
965fi
6e3f3080 966
ba479fd2
NN
967if test "$ac_init_help" = "recursive"; then
968 # If there are subdirs, report their specific --help.
b61ff9c8 969 ac_popdir=`pwd`
ba479fd2 970 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
b61ff9c8 971 test -d $ac_dir || continue
ba479fd2
NN
972 ac_builddir=.
973
b61ff9c8 974if test "$ac_dir" != .; then
ba479fd2 975 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b61ff9c8
BS
976 # A "../" for each directory in $ac_dir_suffix.
977 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
978else
979 ac_dir_suffix= ac_top_builddir=
980fi
ba479fd2
NN
981
982case $srcdir in
b61ff9c8 983 .) # No --srcdir option. We are building in place.
ba479fd2 984 ac_srcdir=.
b61ff9c8
BS
985 if test -z "$ac_top_builddir"; then
986 ac_top_srcdir=.
987 else
988 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
989 fi ;;
990 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 991 ac_srcdir=$srcdir$ac_dir_suffix;
b61ff9c8
BS
992 ac_top_srcdir=$srcdir ;;
993 *) # Relative path.
994 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
995 ac_top_srcdir=$ac_top_builddir$srcdir ;;
996esac
997
998# Do not use `cd foo && pwd` to compute absolute paths, because
999# the directories may not exist.
1000case `pwd` in
1001.) ac_abs_builddir="$ac_dir";;
1002*)
1003 case "$ac_dir" in
1004 .) ac_abs_builddir=`pwd`;;
1005 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1006 *) ac_abs_builddir=`pwd`/"$ac_dir";;
1007 esac;;
1008esac
1009case $ac_abs_builddir in
1010.) ac_abs_top_builddir=${ac_top_builddir}.;;
1011*)
1012 case ${ac_top_builddir}. in
1013 .) ac_abs_top_builddir=$ac_abs_builddir;;
1014 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1015 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1016 esac;;
1017esac
1018case $ac_abs_builddir in
1019.) ac_abs_srcdir=$ac_srcdir;;
1020*)
1021 case $ac_srcdir in
1022 .) ac_abs_srcdir=$ac_abs_builddir;;
1023 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1024 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1025 esac;;
1026esac
1027case $ac_abs_builddir in
1028.) ac_abs_top_srcdir=$ac_top_srcdir;;
1029*)
1030 case $ac_top_srcdir in
1031 .) ac_abs_top_srcdir=$ac_abs_builddir;;
1032 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1033 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1034 esac;;
86da66b5 1035esac
b61ff9c8
BS
1036
1037 cd $ac_dir
1038 # Check for guested configure; otherwise get Cygnus style configure.
1039 if test -f $ac_srcdir/configure.gnu; then
1040 echo
1041 $SHELL $ac_srcdir/configure.gnu --help=recursive
1042 elif test -f $ac_srcdir/configure; then
1043 echo
1044 $SHELL $ac_srcdir/configure --help=recursive
1045 elif test -f $ac_srcdir/configure.ac ||
1046 test -f $ac_srcdir/configure.in; then
1047 echo
1048 $ac_configure --help
ba479fd2
NN
1049 else
1050 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
b61ff9c8
BS
1051 fi
1052 cd $ac_popdir
ba479fd2
NN
1053 done
1054fi
1055
b61ff9c8 1056test -n "$ac_init_help" && exit 0
ba479fd2
NN
1057if $ac_init_version; then
1058 cat <<\_ACEOF
1059
b61ff9c8 1060Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1061This configure script is free software; the Free Software Foundation
1062gives unlimited permission to copy, distribute and modify it.
1063_ACEOF
b61ff9c8 1064 exit 0
ba479fd2 1065fi
b61ff9c8
BS
1066exec 5>config.log
1067cat >&5 <<_ACEOF
ba479fd2
NN
1068This file contains any messages produced by compilers while
1069running configure, to aid debugging if configure makes a mistake.
1070
1071It was created by $as_me, which was
b61ff9c8 1072generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1073
1074 $ $0 $@
1075
1076_ACEOF
1077{
1078cat <<_ASUNAME
1079## --------- ##
1080## Platform. ##
1081## --------- ##
1082
1083hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1084uname -m = `(uname -m) 2>/dev/null || echo unknown`
1085uname -r = `(uname -r) 2>/dev/null || echo unknown`
1086uname -s = `(uname -s) 2>/dev/null || echo unknown`
1087uname -v = `(uname -v) 2>/dev/null || echo unknown`
1088
1089/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1090/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1091
1092/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1093/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1094/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
b61ff9c8 1095hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
ba479fd2
NN
1096/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1097/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1098/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1099
1100_ASUNAME
1101
1102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1103for as_dir in $PATH
1104do
1105 IFS=$as_save_IFS
1106 test -z "$as_dir" && as_dir=.
1107 echo "PATH: $as_dir"
1108done
1109
1110} >&5
1111
1112cat >&5 <<_ACEOF
1113
1114
1115## ----------- ##
1116## Core tests. ##
1117## ----------- ##
1118
1119_ACEOF
1120
1121
1122# Keep a trace of the command line.
1123# Strip out --no-create and --no-recursion so they do not pile up.
1124# Strip out --silent because we don't want to record it for future runs.
1125# Also quote any args containing shell meta-characters.
1126# Make two passes to allow for proper duplicate-argument suppression.
1127ac_configure_args=
1128ac_configure_args0=
1129ac_configure_args1=
b61ff9c8 1130ac_sep=
ba479fd2
NN
1131ac_must_keep_next=false
1132for ac_pass in 1 2
1133do
1134 for ac_arg
1135 do
1136 case $ac_arg in
1137 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1138 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1139 | -silent | --silent | --silen | --sile | --sil)
1140 continue ;;
b61ff9c8 1141 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ba479fd2
NN
1142 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1143 esac
1144 case $ac_pass in
1145 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1146 2)
1147 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1148 if test $ac_must_keep_next = true; then
86da66b5 1149 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1150 else
86da66b5
HPN
1151 case $ac_arg in
1152 *=* | --config-cache | -C | -disable-* | --disable-* \
1153 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1154 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1155 | -with-* | --with-* | -without-* | --without-* | --x)
1156 case "$ac_configure_args0 " in
1157 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1158 esac
1159 ;;
1160 -* ) ac_must_keep_next=true ;;
1161 esac
ba479fd2 1162 fi
b61ff9c8
BS
1163 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1164 # Get rid of the leading space.
1165 ac_sep=" "
ba479fd2
NN
1166 ;;
1167 esac
1168 done
1169done
1170$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1171$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1172
1173# When interrupted or exit'd, cleanup temporary files, and complete
1174# config.log. We remove comments because anyway the quotes in there
1175# would cause problems or look ugly.
b61ff9c8
BS
1176# WARNING: Be sure not to use single quotes in there, as some shells,
1177# such as our DU 5.0 friend, will then `close' the trap.
ba479fd2
NN
1178trap 'exit_status=$?
1179 # Save into config.log some information that might help in debugging.
1180 {
1181 echo
1182
1183 cat <<\_ASBOX
1184## ---------------- ##
1185## Cache variables. ##
1186## ---------------- ##
1187_ASBOX
1188 echo
1189 # The following way of writing the cache mishandles newlines in values,
b61ff9c8 1190{
ba479fd2 1191 (set) 2>&1 |
b61ff9c8
BS
1192 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1193 *ac_space=\ *)
ba479fd2 1194 sed -n \
b61ff9c8
BS
1195 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1196 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1197 ;;
ba479fd2 1198 *)
b61ff9c8
BS
1199 sed -n \
1200 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 1201 ;;
b61ff9c8
BS
1202 esac;
1203}
ba479fd2
NN
1204 echo
1205
1206 cat <<\_ASBOX
1207## ----------------- ##
1208## Output variables. ##
1209## ----------------- ##
1210_ASBOX
1211 echo
1212 for ac_var in $ac_subst_vars
1213 do
b61ff9c8
BS
1214 eval ac_val=$`echo $ac_var`
1215 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1216 done | sort
1217 echo
1218
1219 if test -n "$ac_subst_files"; then
1220 cat <<\_ASBOX
b61ff9c8
BS
1221## ------------- ##
1222## Output files. ##
1223## ------------- ##
ba479fd2
NN
1224_ASBOX
1225 echo
1226 for ac_var in $ac_subst_files
1227 do
b61ff9c8
BS
1228 eval ac_val=$`echo $ac_var`
1229 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1230 done | sort
1231 echo
1232 fi
1233
1234 if test -s confdefs.h; then
1235 cat <<\_ASBOX
1236## ----------- ##
1237## confdefs.h. ##
1238## ----------- ##
1239_ASBOX
1240 echo
b61ff9c8 1241 sed "/^$/d" confdefs.h | sort
ba479fd2
NN
1242 echo
1243 fi
1244 test "$ac_signal" != 0 &&
1245 echo "$as_me: caught signal $ac_signal"
1246 echo "$as_me: exit $exit_status"
1247 } >&5
b61ff9c8
BS
1248 rm -f core *.core &&
1249 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
ba479fd2 1250 exit $exit_status
b61ff9c8 1251 ' 0
ba479fd2
NN
1252for ac_signal in 1 2 13 15; do
1253 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1254done
1255ac_signal=0
1256
1257# confdefs.h avoids OS command line length limits that DEFS can exceed.
b61ff9c8
BS
1258rm -rf conftest* confdefs.h
1259# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1260echo >confdefs.h
ba479fd2
NN
1261
1262# Predefined preprocessor variables.
1263
1264cat >>confdefs.h <<_ACEOF
1265#define PACKAGE_NAME "$PACKAGE_NAME"
1266_ACEOF
1267
1268
1269cat >>confdefs.h <<_ACEOF
1270#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1271_ACEOF
1272
1273
1274cat >>confdefs.h <<_ACEOF
1275#define PACKAGE_VERSION "$PACKAGE_VERSION"
1276_ACEOF
1277
1278
1279cat >>confdefs.h <<_ACEOF
1280#define PACKAGE_STRING "$PACKAGE_STRING"
1281_ACEOF
1282
1283
1284cat >>confdefs.h <<_ACEOF
1285#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1286_ACEOF
1287
1288
1289# Let the site file select an alternate cache file if it wants to.
1290# Prefer explicitly selected file to automatically selected ones.
b61ff9c8
BS
1291if test -z "$CONFIG_SITE"; then
1292 if test "x$prefix" != xNONE; then
1293 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1294 else
1295 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1296 fi
ba479fd2 1297fi
b61ff9c8 1298for ac_site_file in $CONFIG_SITE; do
ba479fd2
NN
1299 if test -r "$ac_site_file"; then
1300 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1301echo "$as_me: loading site script $ac_site_file" >&6;}
1302 sed 's/^/| /' "$ac_site_file" >&5
1303 . "$ac_site_file"
1304 fi
1305done
1306
1307if test -r "$cache_file"; then
1308 # Some versions of bash will fail to source /dev/null (special
1309 # files actually), so we avoid doing that.
1310 if test -f "$cache_file"; then
1311 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1312echo "$as_me: loading cache $cache_file" >&6;}
1313 case $cache_file in
b61ff9c8
BS
1314 [\\/]* | ?:[\\/]* ) . $cache_file;;
1315 *) . ./$cache_file;;
ba479fd2
NN
1316 esac
1317 fi
1318else
1319 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1320echo "$as_me: creating cache $cache_file" >&6;}
1321 >$cache_file
1322fi
1323
1324# Check that the precious variables saved in the cache have kept the same
1325# value.
1326ac_cache_corrupted=false
b61ff9c8
BS
1327for ac_var in `(set) 2>&1 |
1328 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1329 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1330 eval ac_new_set=\$ac_env_${ac_var}_set
b61ff9c8
BS
1331 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1332 eval ac_new_val="\$ac_env_${ac_var}_value"
ba479fd2
NN
1333 case $ac_old_set,$ac_new_set in
1334 set,)
1335 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1336echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1337 ac_cache_corrupted=: ;;
1338 ,set)
1339 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1340echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1341 ac_cache_corrupted=: ;;
1342 ,);;
1343 *)
1344 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1345 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1346echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1347 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1348echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1349 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1350echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1351 ac_cache_corrupted=:
ba479fd2
NN
1352 fi;;
1353 esac
1354 # Pass precious variables to config.status.
1355 if test "$ac_new_set" = set; then
1356 case $ac_new_val in
b61ff9c8
BS
1357 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1358 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
ba479fd2
NN
1359 *) ac_arg=$ac_var=$ac_new_val ;;
1360 esac
1361 case " $ac_configure_args " in
1362 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1363 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1364 esac
1365 fi
1366done
1367if $ac_cache_corrupted; then
1368 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1369echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1370 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1371echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1372 { (exit 1); exit 1; }; }
1373fi
1374
b61ff9c8
BS
1375ac_ext=c
1376ac_cpp='$CPP $CPPFLAGS'
1377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1379ac_compiler_gnu=$ac_cv_c_compiler_gnu
1380
ba479fd2
NN
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
914c5af7 1399
b61ff9c8 1400 ac_config_headers="$ac_config_headers auto-host.h:config.in"
ba479fd2
NN
1401
1402
9f18db39
PB
1403gcc_version=`cat $srcdir/BASE-VER`
1404
ba479fd2
NN
1405# Determine the host, build, and target systems
1406ac_aux_dir=
b61ff9c8
BS
1407for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1408 if test -f $ac_dir/install-sh; then
ba479fd2
NN
1409 ac_aux_dir=$ac_dir
1410 ac_install_sh="$ac_aux_dir/install-sh -c"
1411 break
b61ff9c8 1412 elif test -f $ac_dir/install.sh; then
ba479fd2
NN
1413 ac_aux_dir=$ac_dir
1414 ac_install_sh="$ac_aux_dir/install.sh -c"
1415 break
b61ff9c8 1416 elif test -f $ac_dir/shtool; then
ba479fd2
NN
1417 ac_aux_dir=$ac_dir
1418 ac_install_sh="$ac_aux_dir/shtool install -c"
1419 break
1420 fi
1421done
1422if test -z "$ac_aux_dir"; then
b61ff9c8
BS
1423 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1424echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
ba479fd2
NN
1425 { (exit 1); exit 1; }; }
1426fi
b61ff9c8
BS
1427ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1428ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1429ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba479fd2
NN
1430
1431# Make sure we can run config.sub.
b61ff9c8
BS
1432$ac_config_sub sun4 >/dev/null 2>&1 ||
1433 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1434echo "$as_me: error: cannot run $ac_config_sub" >&2;}
ba479fd2
NN
1435 { (exit 1); exit 1; }; }
1436
b61ff9c8
BS
1437echo "$as_me:$LINENO: checking build system type" >&5
1438echo $ECHO_N "checking build system type... $ECHO_C" >&6
ba479fd2
NN
1439if test "${ac_cv_build+set}" = set; then
1440 echo $ECHO_N "(cached) $ECHO_C" >&6
1441else
b61ff9c8
BS
1442 ac_cv_build_alias=$build_alias
1443test -z "$ac_cv_build_alias" &&
1444 ac_cv_build_alias=`$ac_config_guess`
1445test -z "$ac_cv_build_alias" &&
ba479fd2
NN
1446 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1447echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1448 { (exit 1); exit 1; }; }
b61ff9c8
BS
1449ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1450 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1451echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
ba479fd2
NN
1452 { (exit 1); exit 1; }; }
1453
1454fi
b61ff9c8
BS
1455echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1456echo "${ECHO_T}$ac_cv_build" >&6
ba479fd2 1457build=$ac_cv_build
b61ff9c8
BS
1458build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1459build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1460build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1461
1462
1463echo "$as_me:$LINENO: checking host system type" >&5
1464echo $ECHO_N "checking host system type... $ECHO_C" >&6
ba479fd2
NN
1465if test "${ac_cv_host+set}" = set; then
1466 echo $ECHO_N "(cached) $ECHO_C" >&6
1467else
b61ff9c8
BS
1468 ac_cv_host_alias=$host_alias
1469test -z "$ac_cv_host_alias" &&
1470 ac_cv_host_alias=$ac_cv_build_alias
1471ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1472 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1473echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
ba479fd2
NN
1474 { (exit 1); exit 1; }; }
1475
1476fi
b61ff9c8
BS
1477echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1478echo "${ECHO_T}$ac_cv_host" >&6
ba479fd2 1479host=$ac_cv_host
b61ff9c8
BS
1480host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1481host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1482host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1483
1484
1485echo "$as_me:$LINENO: checking target system type" >&5
1486echo $ECHO_N "checking target system type... $ECHO_C" >&6
ba479fd2
NN
1487if test "${ac_cv_target+set}" = set; then
1488 echo $ECHO_N "(cached) $ECHO_C" >&6
1489else
b61ff9c8
BS
1490 ac_cv_target_alias=$target_alias
1491test "x$ac_cv_target_alias" = "x" &&
1492 ac_cv_target_alias=$ac_cv_host_alias
1493ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1494 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1495echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
ba479fd2
NN
1496 { (exit 1); exit 1; }; }
1497
1498fi
b61ff9c8
BS
1499echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1500echo "${ECHO_T}$ac_cv_target" >&6
ba479fd2 1501target=$ac_cv_target
b61ff9c8
BS
1502target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1503target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1504target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba479fd2
NN
1505
1506
1507# The aliases save the names the user supplied, while $host etc.
1508# will get canonicalized.
1509test -n "$target_alias" &&
1510 test "$program_prefix$program_suffix$program_transform_name" = \
1511 NONENONEs,x,x, &&
1512 program_prefix=${target_alias}-
1513
1514# Determine the noncanonical target name, for directory use.
18fc9bd4
RG
1515 case ${build_alias} in
1516 "") build_noncanonical=${build} ;;
1517 *) build_noncanonical=${build_alias} ;;
1518esac
1519
1520 case ${host_alias} in
1521 "") host_noncanonical=${build_noncanonical} ;;
1522 *) host_noncanonical=${host_alias} ;;
1523esac
1524
1525 case ${target_alias} in
1526 "") target_noncanonical=${host_noncanonical} ;;
1527 *) target_noncanonical=${target_alias} ;;
1528esac
1529
1530
1531
8f1529e6
L
1532
1533# Determine the target- and build-specific subdirectories
57255173
PB
1534
1535# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
1536# have matching libraries, they should use host libraries: Makefile.tpl
1537# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
1538# However, they still use the build modules, because the corresponding
1539# host modules (e.g. bison) are only built for the host when bootstrap
1540# finishes. So:
1541# - build_subdir is where we find build modules, and never changes.
1542# - build_libsubdir is where we find build libraries, and can be overridden.
1543
1544# Prefix 'build-' so this never conflicts with target_subdir.
18fc9bd4 1545build_subdir="build-${build_noncanonical}"
1546bb64 1546
b61ff9c8 1547# Check whether --with-build-libsubdir or --without-build-libsubdir was given.
1546bb64 1548if test "${with_build_libsubdir+set}" = set; then
b61ff9c8
BS
1549 withval="$with_build_libsubdir"
1550 build_libsubdir="$withval"
1546bb64
PB
1551else
1552 build_libsubdir="$build_subdir"
b61ff9c8 1553fi;
18fc9bd4
RG
1554# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1555if ( test $srcdir = . && test -d gcc ) \
1556 || test -d $srcdir/../host-${host_noncanonical}; then
1557 host_subdir="host-${host_noncanonical}"
1558else
1559 host_subdir=.
1560fi
1561# No prefix.
1562target_subdir=${target_noncanonical}
1563
73458fb7 1564
093e61a6 1565# Set program_transform_name
13c22933 1566test "$program_prefix" != NONE &&
b61ff9c8 1567 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1568# Use a double $ so make ignores it.
1569test "$program_suffix" != NONE &&
b61ff9c8 1570 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
ba479fd2
NN
1571# Double any \ or $. echo might interpret backslashes.
1572# By default was `s,x,x', remove it if useless.
1573cat <<\_ACEOF >conftest.sed
1574s/[\\$]/&&/g;s/;s,x,x,$//
1575_ACEOF
1576program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
b61ff9c8 1577rm conftest.sed
13c22933
JJ
1578
1579
34a86c2b
NN
1580# Check for bogus environment variables.
1581# Test if LIBRARY_PATH contains the notation for the current directory
1582# since this would lead to problems installing/building glibc.
1583# LIBRARY_PATH contains the current directory if one of the following
1584# is true:
1585# - one of the terminals (":" and ";") is the first or last sign
1586# - two terminals occur directly after each other
1587# - the path contains an element with a dot in it
b61ff9c8
BS
1588echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1589echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1590case ${LIBRARY_PATH} in
1591 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1592 library_path_setting="contains current directory"
1593 ;;
1594 *)
1595 library_path_setting="ok"
1596 ;;
1597esac
b61ff9c8
BS
1598echo "$as_me:$LINENO: result: $library_path_setting" >&5
1599echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1600if test "$library_path_setting" != "ok"; then
ba479fd2 1601{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1602*** LIBRARY_PATH shouldn't contain the current directory when
1603*** building gcc. Please change the environment variable
ba479fd2
NN
1604*** and run configure again." >&5
1605echo "$as_me: error:
1606*** LIBRARY_PATH shouldn't contain the current directory when
1607*** building gcc. Please change the environment variable
1608*** and run configure again." >&2;}
1609 { (exit 1); exit 1; }; }
e9a25f70
JL
1610fi
1611
34a86c2b
NN
1612# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1613# since this would lead to problems installing/building glibc.
1614# GCC_EXEC_PREFIX contains the current directory if one of the following
1615# is true:
1616# - one of the terminals (":" and ";") is the first or last sign
1617# - two terminals occur directly after each other
1618# - the path contains an element with a dot in it
b61ff9c8
BS
1619echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1620echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1621case ${GCC_EXEC_PREFIX} in
1622 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1623 gcc_exec_prefix_setting="contains current directory"
1624 ;;
1625 *)
1626 gcc_exec_prefix_setting="ok"
1627 ;;
1628esac
b61ff9c8
BS
1629echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1630echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1631if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1632{ { echo "$as_me:$LINENO: error:
1633*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1634*** building gcc. Please change the environment variable
1635*** and run configure again." >&5
1636echo "$as_me: error:
cafe096b
EC
1637*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1638*** building gcc. Please change the environment variable
ba479fd2
NN
1639*** and run configure again." >&2;}
1640 { (exit 1); exit 1; }; }
34a86c2b
NN
1641fi
1642
1643# -----------
1644# Directories
1645# -----------
1646
1647# Specify the local prefix
1648local_prefix=
ba479fd2 1649
b61ff9c8 1650# Check whether --with-local-prefix or --without-local-prefix was given.
34a86c2b 1651if test "${with_local_prefix+set}" = set; then
b61ff9c8
BS
1652 withval="$with_local_prefix"
1653 case "${withval}" in
ba479fd2
NN
1654yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1655echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1656 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1657no) ;;
1658*) local_prefix=$with_local_prefix ;;
1659esac
b61ff9c8 1660fi;
34a86c2b
NN
1661
1662# Default local prefix if it is empty
1663if test x$local_prefix = x; then
1664 local_prefix=/usr/local
1665fi
1666
1667# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1668# passed in by the toplevel make and thus we'd get different behavior
1669# depending on where we built the sources.
1670gcc_gxx_include_dir=
1671# Specify the g++ header file directory
ba479fd2 1672
b61ff9c8 1673# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
34a86c2b 1674if test "${with_gxx_include_dir+set}" = set; then
b61ff9c8
BS
1675 withval="$with_gxx_include_dir"
1676 case "${withval}" in
ba479fd2
NN
1677yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1678echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1679 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1680no) ;;
1681*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1682esac
b61ff9c8 1683fi;
34a86c2b 1684
0f57bf40 1685# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
34a86c2b
NN
1686if test x${gcc_gxx_include_dir} = x; then
1687 if test x${enable_version_specific_runtime_libs} = xyes; then
1688 gcc_gxx_include_dir='${libsubdir}/include/c++'
1689 else
0f57bf40
MM
1690 libstdcxx_incdir='include/c++/$(version)'
1691 if test x$host != x$target; then
1692 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
1693 fi
15c723f3 1694 gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
34a86c2b
NN
1695 fi
1696fi
1697
ba479fd2 1698
b61ff9c8 1699# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
34a86c2b 1700if test "${with_cpp_install_dir+set}" = set; then
b61ff9c8
BS
1701 withval="$with_cpp_install_dir"
1702 if test x$withval = xyes; then
ba479fd2
NN
1703 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1704echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1705 { (exit 1); exit 1; }; }
34a86c2b
NN
1706elif test x$withval != xno; then
1707 cpp_install_dir=$withval
1708fi
b61ff9c8 1709fi;
34a86c2b 1710
51b9ff45 1711# We would like to our source tree to be readonly. However when releases or
ba479fd2 1712# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1713# various formats of manuals need to be included along with the rest of the
ba479fd2 1714# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1715# just that.
1716
b61ff9c8
BS
1717echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1718echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1719 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45 1720if test "${enable_generated_files_in_srcdir+set}" = set; then
b61ff9c8
BS
1721 enableval="$enable_generated_files_in_srcdir"
1722 generated_files_in_srcdir=$enableval
51b9ff45 1723else
03787dfd 1724 generated_files_in_srcdir=no
b61ff9c8 1725fi;
1a4b763e 1726
b61ff9c8
BS
1727echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1728echo "${ECHO_T}$generated_files_in_srcdir" >&6
03787dfd
KC
1729
1730if test "$generated_files_in_srcdir" = "yes"; then
1731 GENINSRC=''
03787dfd
KC
1732else
1733 GENINSRC='#'
03787dfd
KC
1734fi
1735
1736
34a86c2b
NN
1737# -------------------
1738# Find default linker
1739# -------------------
1740
1741# With GNU ld
ba479fd2 1742
b61ff9c8 1743# Check whether --with-gnu-ld or --without-gnu-ld was given.
34a86c2b 1744if test "${with_gnu_ld+set}" = set; then
b61ff9c8
BS
1745 withval="$with_gnu_ld"
1746 gnu_ld_flag="$with_gnu_ld"
34a86c2b
NN
1747else
1748 gnu_ld_flag=no
b61ff9c8 1749fi;
6e3f3080 1750
63cf211a 1751# With pre-defined ld
ba479fd2 1752
b61ff9c8 1753# Check whether --with-ld or --without-ld was given.
34a86c2b 1754if test "${with_ld+set}" = set; then
b61ff9c8
BS
1755 withval="$with_ld"
1756 DEFAULT_LINKER="$with_ld"
1757fi;
34a86c2b
NN
1758if test x"${DEFAULT_LINKER+set}" = x"set"; then
1759 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1760 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1761echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1762 { (exit 1); exit 1; }; }
34a86c2b
NN
1763 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1764 gnu_ld_flag=yes
1765 fi
ba479fd2
NN
1766
1767cat >>confdefs.h <<_ACEOF
34a86c2b 1768#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1769_ACEOF
34a86c2b
NN
1770
1771fi
1772
2091ff66
NF
1773gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
1774
1775cat >>confdefs.h <<_ACEOF
1776#define HAVE_GNU_LD $gnu_ld
1777_ACEOF
1778
1779
b61ff9c8
BS
1780echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1781echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1782if test x"${DEFAULT_LINKER+set}" = x"set"; then
1783 if test x"$gnu_ld_flag" = x"no"; then
b61ff9c8
BS
1784 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1785echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1786 else
b61ff9c8
BS
1787 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1788echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1789 fi
1790else
b61ff9c8
BS
1791 echo "$as_me:$LINENO: result: no" >&5
1792echo "${ECHO_T}no" >&6
34a86c2b
NN
1793fi
1794
d594623a
L
1795# With demangler in GNU ld
1796
b61ff9c8 1797# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
d594623a 1798if test "${with_demangler_in_ld+set}" = set; then
b61ff9c8
BS
1799 withval="$with_demangler_in_ld"
1800 demangler_in_ld="$with_demangler_in_ld"
d594623a
L
1801else
1802 demangler_in_ld=no
b61ff9c8 1803fi;
d594623a 1804
34a86c2b
NN
1805# ----------------------
1806# Find default assembler
1807# ----------------------
1808
1809# With GNU as
ba479fd2 1810
b61ff9c8 1811# Check whether --with-gnu-as or --without-gnu-as was given.
34a86c2b 1812if test "${with_gnu_as+set}" = set; then
b61ff9c8
BS
1813 withval="$with_gnu_as"
1814 gas_flag="$with_gnu_as"
34a86c2b
NN
1815else
1816 gas_flag=no
b61ff9c8 1817fi;
ab22c1fa 1818
1a4b763e 1819
b61ff9c8 1820# Check whether --with-as or --without-as was given.
34a86c2b 1821if test "${with_as+set}" = set; then
b61ff9c8
BS
1822 withval="$with_as"
1823 DEFAULT_ASSEMBLER="$with_as"
1824fi;
34a86c2b
NN
1825if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1826 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1827 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1828echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1829 { (exit 1); exit 1; }; }
34a86c2b
NN
1830 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1831 gas_flag=yes
1832 fi
ba479fd2
NN
1833
1834cat >>confdefs.h <<_ACEOF
34a86c2b 1835#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1836_ACEOF
34a86c2b
NN
1837
1838fi
1839
dc60b775
CD
1840gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
1841
1842cat >>confdefs.h <<_ACEOF
1843#define HAVE_GNU_AS $gnu_as
1844_ACEOF
1845
1846
b61ff9c8
BS
1847echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1848echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1849if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1850 if test x"$gas_flag" = x"no"; then
b61ff9c8
BS
1851 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1852echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1853 else
b61ff9c8
BS
1854 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1855echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1856 fi
1857else
b61ff9c8
BS
1858 echo "$as_me:$LINENO: result: no" >&5
1859echo "${ECHO_T}no" >&6
34a86c2b
NN
1860fi
1861
1862# ---------------
1863# Find C compiler
1864# ---------------
1865
426ca3ca
RO
1866# If a non-executable a.out is present (e.g. created by GNU as above even if
1867# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1868# file, even when creating an executable, so an execution test fails.
1869# Remove possible default executable files to avoid this.
1870#
1871# FIXME: This really belongs into AC_PROG_CC and can be removed once
1872# Autoconf includes it.
1873rm -f a.out a.exe b.out
1874
34a86c2b 1875# Find the native compiler
ba479fd2
NN
1876ac_ext=c
1877ac_cpp='$CPP $CPPFLAGS'
1878ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1879ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1880ac_compiler_gnu=$ac_cv_c_compiler_gnu
1881if test -n "$ac_tool_prefix"; then
1882 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1883set dummy ${ac_tool_prefix}gcc; ac_word=$2
b61ff9c8
BS
1884echo "$as_me:$LINENO: checking for $ac_word" >&5
1885echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
1886if test "${ac_cv_prog_CC+set}" = set; then
1887 echo $ECHO_N "(cached) $ECHO_C" >&6
1888else
1889 if test -n "$CC"; then
1890 ac_cv_prog_CC="$CC" # Let the user override the test.
1891else
1892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1893for as_dir in $PATH
1894do
1895 IFS=$as_save_IFS
1896 test -z "$as_dir" && as_dir=.
1897 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 1898 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
1899 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1900 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1901 break 2
1902 fi
1903done
1904done
1905
1906fi
1907fi
1908CC=$ac_cv_prog_CC
1909if test -n "$CC"; then
b61ff9c8
BS
1910 echo "$as_me:$LINENO: result: $CC" >&5
1911echo "${ECHO_T}$CC" >&6
ba479fd2 1912else
b61ff9c8
BS
1913 echo "$as_me:$LINENO: result: no" >&5
1914echo "${ECHO_T}no" >&6
ba479fd2
NN
1915fi
1916
1917fi
1918if test -z "$ac_cv_prog_CC"; then
1919 ac_ct_CC=$CC
1920 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1921set dummy gcc; ac_word=$2
b61ff9c8
BS
1922echo "$as_me:$LINENO: checking for $ac_word" >&5
1923echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
1924if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1925 echo $ECHO_N "(cached) $ECHO_C" >&6
1926else
1927 if test -n "$ac_ct_CC"; then
1928 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1929else
1930as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1931for as_dir in $PATH
1932do
1933 IFS=$as_save_IFS
1934 test -z "$as_dir" && as_dir=.
1935 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 1936 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
1937 ac_cv_prog_ac_ct_CC="gcc"
1938 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1939 break 2
1940 fi
1941done
1942done
1943
1944fi
1945fi
1946ac_ct_CC=$ac_cv_prog_ac_ct_CC
1947if test -n "$ac_ct_CC"; then
b61ff9c8
BS
1948 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1949echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 1950else
b61ff9c8
BS
1951 echo "$as_me:$LINENO: result: no" >&5
1952echo "${ECHO_T}no" >&6
ba479fd2
NN
1953fi
1954
b61ff9c8 1955 CC=$ac_ct_CC
ba479fd2
NN
1956else
1957 CC="$ac_cv_prog_CC"
1958fi
1959
1960if test -z "$CC"; then
b61ff9c8
BS
1961 if test -n "$ac_tool_prefix"; then
1962 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
ba479fd2 1963set dummy ${ac_tool_prefix}cc; ac_word=$2
b61ff9c8
BS
1964echo "$as_me:$LINENO: checking for $ac_word" >&5
1965echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
1966if test "${ac_cv_prog_CC+set}" = set; then
1967 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1968else
1969 if test -n "$CC"; then
1970 ac_cv_prog_CC="$CC" # Let the user override the test.
1971else
ba479fd2
NN
1972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1973for as_dir in $PATH
1974do
1975 IFS=$as_save_IFS
1976 test -z "$as_dir" && as_dir=.
1977 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 1978 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
1979 ac_cv_prog_CC="${ac_tool_prefix}cc"
1980 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1981 break 2
1982 fi
1983done
1984done
1985
cd9e5e7c
MK
1986fi
1987fi
ba479fd2 1988CC=$ac_cv_prog_CC
cd9e5e7c 1989if test -n "$CC"; then
b61ff9c8
BS
1990 echo "$as_me:$LINENO: result: $CC" >&5
1991echo "${ECHO_T}$CC" >&6
2f41c1d6 1992else
b61ff9c8
BS
1993 echo "$as_me:$LINENO: result: no" >&5
1994echo "${ECHO_T}no" >&6
2f41c1d6
PB
1995fi
1996
b61ff9c8
BS
1997fi
1998if test -z "$ac_cv_prog_CC"; then
1999 ac_ct_CC=$CC
2000 # Extract the first word of "cc", so it can be a program name with args.
2001set dummy cc; ac_word=$2
2002echo "$as_me:$LINENO: checking for $ac_word" >&5
2003echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2004if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2005 echo $ECHO_N "(cached) $ECHO_C" >&6
2006else
2007 if test -n "$ac_ct_CC"; then
2008 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2009else
2010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2011for as_dir in $PATH
2012do
2013 IFS=$as_save_IFS
2014 test -z "$as_dir" && as_dir=.
2015 for ac_exec_ext in '' $ac_executable_extensions; do
2016 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2017 ac_cv_prog_ac_ct_CC="cc"
2018 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2019 break 2
1a4b763e 2020 fi
b61ff9c8
BS
2021done
2022done
2023
2024fi
2025fi
2026ac_ct_CC=$ac_cv_prog_ac_ct_CC
2027if test -n "$ac_ct_CC"; then
2028 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2029echo "${ECHO_T}$ac_ct_CC" >&6
2030else
2031 echo "$as_me:$LINENO: result: no" >&5
2032echo "${ECHO_T}no" >&6
2033fi
2034
2035 CC=$ac_ct_CC
2036else
2037 CC="$ac_cv_prog_CC"
2038fi
2039
ba479fd2 2040fi
6e3f3080
NN
2041if test -z "$CC"; then
2042 # Extract the first word of "cc", so it can be a program name with args.
2043set dummy cc; ac_word=$2
b61ff9c8
BS
2044echo "$as_me:$LINENO: checking for $ac_word" >&5
2045echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2046if test "${ac_cv_prog_CC+set}" = set; then
2047 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2048else
2049 if test -n "$CC"; then
2050 ac_cv_prog_CC="$CC" # Let the user override the test.
2051else
2052 ac_prog_rejected=no
ba479fd2
NN
2053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2054for as_dir in $PATH
2055do
2056 IFS=$as_save_IFS
2057 test -z "$as_dir" && as_dir=.
2058 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2059 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2060 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2061 ac_prog_rejected=yes
2062 continue
2063 fi
2064 ac_cv_prog_CC="cc"
2065 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2066 break 2
2067 fi
2068done
2069done
2070
6e3f3080
NN
2071if test $ac_prog_rejected = yes; then
2072 # We found a bogon in the path, so make sure we never use it.
2073 set dummy $ac_cv_prog_CC
2074 shift
ba479fd2 2075 if test $# != 0; then
6e3f3080
NN
2076 # We chose a different compiler from the bogus one.
2077 # However, it has the same basename, so the bogon will be chosen
2078 # first if we set CC to just the basename; use the full file name.
2079 shift
ba479fd2 2080 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2081 fi
6e3f3080
NN
2082fi
2083fi
2084fi
ba479fd2 2085CC=$ac_cv_prog_CC
6e3f3080 2086if test -n "$CC"; then
b61ff9c8
BS
2087 echo "$as_me:$LINENO: result: $CC" >&5
2088echo "${ECHO_T}$CC" >&6
e9a25f70 2089else
b61ff9c8
BS
2090 echo "$as_me:$LINENO: result: no" >&5
2091echo "${ECHO_T}no" >&6
e9a25f70 2092fi
6e3f3080 2093
ba479fd2
NN
2094fi
2095if test -z "$CC"; then
2096 if test -n "$ac_tool_prefix"; then
b61ff9c8 2097 for ac_prog in cl
ba479fd2
NN
2098 do
2099 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2100set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b61ff9c8
BS
2101echo "$as_me:$LINENO: checking for $ac_word" >&5
2102echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2103if test "${ac_cv_prog_CC+set}" = set; then
2104 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2105else
6e3f3080
NN
2106 if test -n "$CC"; then
2107 ac_cv_prog_CC="$CC" # Let the user override the test.
2108else
ba479fd2
NN
2109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2110for as_dir in $PATH
2111do
2112 IFS=$as_save_IFS
2113 test -z "$as_dir" && as_dir=.
2114 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2115 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2116 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2117 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2118 break 2
2119 fi
2120done
2121done
2122
093e61a6 2123fi
6e3f3080 2124fi
ba479fd2 2125CC=$ac_cv_prog_CC
6e3f3080 2126if test -n "$CC"; then
b61ff9c8
BS
2127 echo "$as_me:$LINENO: result: $CC" >&5
2128echo "${ECHO_T}$CC" >&6
6e3f3080 2129else
b61ff9c8
BS
2130 echo "$as_me:$LINENO: result: no" >&5
2131echo "${ECHO_T}no" >&6
093e61a6 2132fi
cafe096b 2133
ba479fd2
NN
2134 test -n "$CC" && break
2135 done
2136fi
2137if test -z "$CC"; then
2138 ac_ct_CC=$CC
b61ff9c8 2139 for ac_prog in cl
ba479fd2
NN
2140do
2141 # Extract the first word of "$ac_prog", so it can be a program name with args.
2142set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
2143echo "$as_me:$LINENO: checking for $ac_word" >&5
2144echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
2145if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2146 echo $ECHO_N "(cached) $ECHO_C" >&6
2147else
2148 if test -n "$ac_ct_CC"; then
2149 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2150else
2151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2152for as_dir in $PATH
2153do
2154 IFS=$as_save_IFS
2155 test -z "$as_dir" && as_dir=.
2156 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 2157 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
2158 ac_cv_prog_ac_ct_CC="$ac_prog"
2159 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2160 break 2
2161 fi
2162done
2163done
6e3f3080 2164
ba479fd2
NN
2165fi
2166fi
2167ac_ct_CC=$ac_cv_prog_ac_ct_CC
2168if test -n "$ac_ct_CC"; then
b61ff9c8
BS
2169 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2170echo "${ECHO_T}$ac_ct_CC" >&6
ba479fd2 2171else
b61ff9c8
BS
2172 echo "$as_me:$LINENO: result: no" >&5
2173echo "${ECHO_T}no" >&6
ba479fd2 2174fi
6e3f3080 2175
ba479fd2
NN
2176 test -n "$ac_ct_CC" && break
2177done
63cf211a 2178
b61ff9c8 2179 CC=$ac_ct_CC
ba479fd2
NN
2180fi
2181
2182fi
2183
2184
2185test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2186See \`config.log' for more details." >&5
2187echo "$as_me: error: no acceptable C compiler found in \$PATH
2188See \`config.log' for more details." >&2;}
2189 { (exit 1); exit 1; }; }
2190
2191# Provide some information about the compiler.
b61ff9c8
BS
2192echo "$as_me:$LINENO:" \
2193 "checking for C compiler version" >&5
ba479fd2 2194ac_compiler=`set X $ac_compile; echo $2`
b61ff9c8
BS
2195{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2196 (eval $ac_compiler --version </dev/null >&5) 2>&5
ba479fd2
NN
2197 ac_status=$?
2198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2199 (exit $ac_status); }
b61ff9c8
BS
2200{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2201 (eval $ac_compiler -v </dev/null >&5) 2>&5
ba479fd2
NN
2202 ac_status=$?
2203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2204 (exit $ac_status); }
b61ff9c8
BS
2205{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2206 (eval $ac_compiler -V </dev/null >&5) 2>&5
ba479fd2
NN
2207 ac_status=$?
2208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2209 (exit $ac_status); }
2210
2211cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2212/* confdefs.h. */
2213_ACEOF
2214cat confdefs.h >>conftest.$ac_ext
2215cat >>conftest.$ac_ext <<_ACEOF
2216/* end confdefs.h. */
2217
2218int
2219main ()
2220{
63cf211a 2221
ba479fd2
NN
2222 ;
2223 return 0;
2224}
2225_ACEOF
2226ac_clean_files_save=$ac_clean_files
2227ac_clean_files="$ac_clean_files a.out a.exe b.out"
2228# Try to create an executable without -o first, disregard a.out.
2229# It will help us diagnose broken compilers, and finding out an intuition
2230# of exeext.
b61ff9c8
BS
2231echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2232echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2 2233ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
b61ff9c8
BS
2234if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2235 (eval $ac_link_default) 2>&5
ba479fd2
NN
2236 ac_status=$?
2237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2238 (exit $ac_status); }; then
b61ff9c8
BS
2239 # Find the output, starting from the most likely. This scheme is
2240# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2241# resort.
2242
2243# Be careful to initialize this variable, since it used to be cached.
2244# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2245ac_cv_exeext=
2246# b.out is created by i960 compilers.
2247for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
ba479fd2
NN
2248do
2249 test -f "$ac_file" || continue
2250 case $ac_file in
b61ff9c8
BS
2251 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2252 ;;
2253 conftest.$ac_ext )
2254 # This is the source file.
86da66b5 2255 ;;
ba479fd2 2256 [ab].out )
86da66b5
HPN
2257 # We found the default executable, but exeext='' is most
2258 # certainly right.
2259 break;;
ba479fd2 2260 *.* )
b61ff9c8
BS
2261 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2262 # FIXME: I believe we export ac_cv_exeext for Libtool,
2263 # but it would be cool to find out if it's true. Does anybody
2264 # maintain Libtool? --akim.
2265 export ac_cv_exeext
86da66b5 2266 break;;
ba479fd2 2267 * )
86da66b5 2268 break;;
ba479fd2
NN
2269 esac
2270done
2271else
2272 echo "$as_me: failed program was:" >&5
2273sed 's/^/| /' conftest.$ac_ext >&5
2274
2275{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2276See \`config.log' for more details." >&5
2277echo "$as_me: error: C compiler cannot create executables
2278See \`config.log' for more details." >&2;}
2279 { (exit 77); exit 77; }; }
2280fi
2281
2282ac_exeext=$ac_cv_exeext
b61ff9c8
BS
2283echo "$as_me:$LINENO: result: $ac_file" >&5
2284echo "${ECHO_T}$ac_file" >&6
ba479fd2 2285
b61ff9c8 2286# Check the compiler produces executables we can run. If not, either
ba479fd2 2287# the compiler is broken, or we cross compile.
b61ff9c8
BS
2288echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2289echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
ba479fd2
NN
2290# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2291# If not cross compiling, check that we can run a simple program.
2292if test "$cross_compiling" != yes; then
2293 if { ac_try='./$ac_file'
b61ff9c8
BS
2294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2295 (eval $ac_try) 2>&5
ba479fd2
NN
2296 ac_status=$?
2297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2298 (exit $ac_status); }; }; then
2299 cross_compiling=no
6e3f3080 2300 else
ba479fd2
NN
2301 if test "$cross_compiling" = maybe; then
2302 cross_compiling=yes
2303 else
2304 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2305If you meant to cross compile, use \`--host'.
2306See \`config.log' for more details." >&5
2307echo "$as_me: error: cannot run C compiled programs.
2308If you meant to cross compile, use \`--host'.
2309See \`config.log' for more details." >&2;}
2310 { (exit 1); exit 1; }; }
2311 fi
6e3f3080
NN
2312 fi
2313fi
b61ff9c8
BS
2314echo "$as_me:$LINENO: result: yes" >&5
2315echo "${ECHO_T}yes" >&6
ba479fd2
NN
2316
2317rm -f a.out a.exe conftest$ac_cv_exeext b.out
2318ac_clean_files=$ac_clean_files_save
b61ff9c8 2319# Check the compiler produces executables we can run. If not, either
ba479fd2 2320# the compiler is broken, or we cross compile.
b61ff9c8
BS
2321echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2322echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2323echo "$as_me:$LINENO: result: $cross_compiling" >&5
2324echo "${ECHO_T}$cross_compiling" >&6
2325
2326echo "$as_me:$LINENO: checking for suffix of executables" >&5
2327echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2328if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2329 (eval $ac_link) 2>&5
ba479fd2
NN
2330 ac_status=$?
2331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2332 (exit $ac_status); }; then
2333 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2334# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2335# work properly (i.e., refer to `conftest.exe'), while it won't with
2336# `rm'.
2337for ac_file in conftest.exe conftest conftest.*; do
2338 test -f "$ac_file" || continue
2339 case $ac_file in
b61ff9c8 2340 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
ba479fd2 2341 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b61ff9c8 2342 export ac_cv_exeext
86da66b5 2343 break;;
ba479fd2
NN
2344 * ) break;;
2345 esac
2346done
e9a25f70 2347else
ba479fd2
NN
2348 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2349See \`config.log' for more details." >&5
2350echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2351See \`config.log' for more details." >&2;}
2352 { (exit 1); exit 1; }; }
2353fi
2354
2355rm -f conftest$ac_cv_exeext
b61ff9c8
BS
2356echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2357echo "${ECHO_T}$ac_cv_exeext" >&6
ba479fd2
NN
2358
2359rm -f conftest.$ac_ext
2360EXEEXT=$ac_cv_exeext
2361ac_exeext=$EXEEXT
b61ff9c8
BS
2362echo "$as_me:$LINENO: checking for suffix of object files" >&5
2363echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
ba479fd2
NN
2364if test "${ac_cv_objext+set}" = set; then
2365 echo $ECHO_N "(cached) $ECHO_C" >&6
2366else
2367 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2368/* confdefs.h. */
2369_ACEOF
2370cat confdefs.h >>conftest.$ac_ext
2371cat >>conftest.$ac_ext <<_ACEOF
2372/* end confdefs.h. */
2373
2374int
2375main ()
2376{
6e3f3080 2377
ba479fd2
NN
2378 ;
2379 return 0;
2380}
2381_ACEOF
2382rm -f conftest.o conftest.obj
b61ff9c8
BS
2383if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2384 (eval $ac_compile) 2>&5
ba479fd2
NN
2385 ac_status=$?
2386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2387 (exit $ac_status); }; then
b61ff9c8 2388 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
ba479fd2 2389 case $ac_file in
b61ff9c8 2390 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
ba479fd2
NN
2391 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2392 break;;
2393 esac
2394done
63cf211a 2395else
ba479fd2
NN
2396 echo "$as_me: failed program was:" >&5
2397sed 's/^/| /' conftest.$ac_ext >&5
2398
2399{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2400See \`config.log' for more details." >&5
2401echo "$as_me: error: cannot compute suffix of object files: cannot compile
2402See \`config.log' for more details." >&2;}
2403 { (exit 1); exit 1; }; }
2404fi
2405
2406rm -f conftest.$ac_cv_objext conftest.$ac_ext
2407fi
b61ff9c8
BS
2408echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2409echo "${ECHO_T}$ac_cv_objext" >&6
ba479fd2
NN
2410OBJEXT=$ac_cv_objext
2411ac_objext=$OBJEXT
b61ff9c8
BS
2412echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2413echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
ba479fd2
NN
2414if test "${ac_cv_c_compiler_gnu+set}" = set; then
2415 echo $ECHO_N "(cached) $ECHO_C" >&6
2416else
2417 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2418/* confdefs.h. */
2419_ACEOF
2420cat confdefs.h >>conftest.$ac_ext
2421cat >>conftest.$ac_ext <<_ACEOF
2422/* end confdefs.h. */
2423
2424int
2425main ()
2426{
2427#ifndef __GNUC__
2428 choke me
2429#endif
6e3f3080 2430
ba479fd2
NN
2431 ;
2432 return 0;
2433}
2434_ACEOF
2435rm -f conftest.$ac_objext
b61ff9c8
BS
2436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2437 (eval $ac_compile) 2>conftest.er1
ba479fd2 2438 ac_status=$?
86da66b5
HPN
2439 grep -v '^ *+' conftest.er1 >conftest.err
2440 rm -f conftest.er1
2441 cat conftest.err >&5
ba479fd2 2442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2443 (exit $ac_status); } &&
2444 { ac_try='test -z "$ac_c_werror_flag"
2445 || test ! -s conftest.err'
2446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2447 (eval $ac_try) 2>&5
2448 ac_status=$?
2449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2450 (exit $ac_status); }; } &&
2451 { ac_try='test -s conftest.$ac_objext'
2452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2453 (eval $ac_try) 2>&5
2454 ac_status=$?
2455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2456 (exit $ac_status); }; }; then
ba479fd2
NN
2457 ac_compiler_gnu=yes
2458else
2459 echo "$as_me: failed program was:" >&5
2460sed 's/^/| /' conftest.$ac_ext >&5
2461
b61ff9c8 2462ac_compiler_gnu=no
ba479fd2 2463fi
b61ff9c8 2464rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2465ac_cv_c_compiler_gnu=$ac_compiler_gnu
2466
2467fi
b61ff9c8
BS
2468echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2469echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
ba479fd2
NN
2470GCC=`test $ac_compiler_gnu = yes && echo yes`
2471ac_test_CFLAGS=${CFLAGS+set}
2472ac_save_CFLAGS=$CFLAGS
b61ff9c8
BS
2473CFLAGS="-g"
2474echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2475echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
ba479fd2
NN
2476if test "${ac_cv_prog_cc_g+set}" = set; then
2477 echo $ECHO_N "(cached) $ECHO_C" >&6
2478else
b61ff9c8 2479 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2480/* confdefs.h. */
2481_ACEOF
2482cat confdefs.h >>conftest.$ac_ext
2483cat >>conftest.$ac_ext <<_ACEOF
2484/* end confdefs.h. */
2485
2486int
2487main ()
2488{
2489
2490 ;
2491 return 0;
2492}
2493_ACEOF
2494rm -f conftest.$ac_objext
b61ff9c8
BS
2495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2496 (eval $ac_compile) 2>conftest.er1
ba479fd2 2497 ac_status=$?
86da66b5
HPN
2498 grep -v '^ *+' conftest.er1 >conftest.err
2499 rm -f conftest.er1
2500 cat conftest.err >&5
ba479fd2 2501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2502 (exit $ac_status); } &&
2503 { ac_try='test -z "$ac_c_werror_flag"
2504 || test ! -s conftest.err'
2505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2506 (eval $ac_try) 2>&5
2507 ac_status=$?
2508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2509 (exit $ac_status); }; } &&
2510 { ac_try='test -s conftest.$ac_objext'
2511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2512 (eval $ac_try) 2>&5
2513 ac_status=$?
2514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2515 (exit $ac_status); }; }; then
1a4b763e
BS
2516 ac_cv_prog_cc_g=yes
2517else
2518 echo "$as_me: failed program was:" >&5
2519sed 's/^/| /' conftest.$ac_ext >&5
2520
b61ff9c8
BS
2521ac_cv_prog_cc_g=no
2522fi
2523rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2524fi
2525echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2526echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2527if test "$ac_test_CFLAGS" = set; then
2528 CFLAGS=$ac_save_CFLAGS
2529elif test $ac_cv_prog_cc_g = yes; then
2530 if test "$GCC" = yes; then
2531 CFLAGS="-g -O2"
2532 else
2533 CFLAGS="-g"
2534 fi
2535else
2536 if test "$GCC" = yes; then
2537 CFLAGS="-O2"
2538 else
2539 CFLAGS=
2540 fi
2541fi
2542echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2543echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2544if test "${ac_cv_prog_cc_stdc+set}" = set; then
2545 echo $ECHO_N "(cached) $ECHO_C" >&6
2546else
2547 ac_cv_prog_cc_stdc=no
2548ac_save_CC=$CC
2549cat >conftest.$ac_ext <<_ACEOF
1a4b763e
BS
2550/* confdefs.h. */
2551_ACEOF
2552cat confdefs.h >>conftest.$ac_ext
2553cat >>conftest.$ac_ext <<_ACEOF
2554/* end confdefs.h. */
b61ff9c8
BS
2555#include <stdarg.h>
2556#include <stdio.h>
2557#include <sys/types.h>
2558#include <sys/stat.h>
2559/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2560struct buf { int x; };
2561FILE * (*rcsopen) (struct buf *, struct stat *, int);
2562static char *e (p, i)
2563 char **p;
2564 int i;
1a4b763e 2565{
b61ff9c8 2566 return p[i];
1a4b763e 2567}
b61ff9c8
BS
2568static char *f (char * (*g) (char **, int), char **p, ...)
2569{
2570 char *s;
2571 va_list v;
2572 va_start (v,p);
2573 s = g (p, va_arg (v,int));
2574 va_end (v);
2575 return s;
2576}
2577
2578/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2579 function prototypes and stuff, but not '\xHH' hex character constants.
2580 These don't provoke an error unfortunately, instead are silently treated
2581 as 'x'. The following induces an error, until -std1 is added to get
2582 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2583 array size at least. It's necessary to write '\x00'==0 to get something
2584 that's true only with -std1. */
2585int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2586
2587int test (int i, double x);
2588struct s1 {int (*f) (int a);};
2589struct s2 {int (*f) (double a);};
2590int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2591int argc;
2592char **argv;
2593int
2594main ()
2595{
2596return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2597 ;
2598 return 0;
2599}
2600_ACEOF
2601# Don't try gcc -ansi; that turns off useful extensions and
2602# breaks some systems' header files.
2603# AIX -qlanglvl=ansi
2604# Ultrix and OSF/1 -std1
2605# HP-UX 10.20 and later -Ae
2606# HP-UX older versions -Aa -D_HPUX_SOURCE
2607# SVR4 -Xc -D__EXTENSIONS__
2608for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2609do
2610 CC="$ac_save_CC $ac_arg"
2611 rm -f conftest.$ac_objext
2612if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2613 (eval $ac_compile) 2>conftest.er1
2614 ac_status=$?
1a4b763e
BS
2615 grep -v '^ *+' conftest.er1 >conftest.err
2616 rm -f conftest.er1
2617 cat conftest.err >&5
2f41c1d6 2618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2619 (exit $ac_status); } &&
2620 { ac_try='test -z "$ac_c_werror_flag"
2621 || test ! -s conftest.err'
2622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2623 (eval $ac_try) 2>&5
2624 ac_status=$?
2625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2626 (exit $ac_status); }; } &&
2627 { ac_try='test -s conftest.$ac_objext'
2628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2629 (eval $ac_try) 2>&5
2630 ac_status=$?
2631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2632 (exit $ac_status); }; }; then
2633 ac_cv_prog_cc_stdc=$ac_arg
2634break
1a4b763e
BS
2635else
2636 echo "$as_me: failed program was:" >&5
2637sed 's/^/| /' conftest.$ac_ext >&5
2638
b61ff9c8
BS
2639fi
2640rm -f conftest.err conftest.$ac_objext
2641done
2642rm -f conftest.$ac_ext conftest.$ac_objext
2643CC=$ac_save_CC
2644
2645fi
2646
2647case "x$ac_cv_prog_cc_stdc" in
2648 x|xno)
2649 echo "$as_me:$LINENO: result: none needed" >&5
2650echo "${ECHO_T}none needed" >&6 ;;
2651 *)
2652 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2653echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2654 CC="$CC $ac_cv_prog_cc_stdc" ;;
2655esac
2656
2657# Some people use a C++ compiler to compile C. Since we use `exit',
2658# in C++ we need to declare it. In case someone uses the same compiler
2659# for both compiling C and C++ we need to have the C++ compiler decide
2660# the declaration of exit, since it's the most demanding environment.
2661cat >conftest.$ac_ext <<_ACEOF
2662#ifndef __cplusplus
2663 choke me
2664#endif
2665_ACEOF
2666rm -f conftest.$ac_objext
2667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2668 (eval $ac_compile) 2>conftest.er1
2669 ac_status=$?
2670 grep -v '^ *+' conftest.er1 >conftest.err
2671 rm -f conftest.er1
2672 cat conftest.err >&5
2673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2674 (exit $ac_status); } &&
2675 { ac_try='test -z "$ac_c_werror_flag"
2676 || test ! -s conftest.err'
2677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2678 (eval $ac_try) 2>&5
2679 ac_status=$?
2680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2681 (exit $ac_status); }; } &&
2682 { ac_try='test -s conftest.$ac_objext'
2683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2684 (eval $ac_try) 2>&5
2685 ac_status=$?
2686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2687 (exit $ac_status); }; }; then
2688 for ac_declaration in \
2689 '' \
2690 'extern "C" void std::exit (int) throw (); using std::exit;' \
2691 'extern "C" void std::exit (int); using std::exit;' \
2692 'extern "C" void exit (int) throw ();' \
2693 'extern "C" void exit (int);' \
2694 'void exit (int);'
2695do
2696 cat >conftest.$ac_ext <<_ACEOF
1a4b763e
BS
2697/* confdefs.h. */
2698_ACEOF
2699cat confdefs.h >>conftest.$ac_ext
2700cat >>conftest.$ac_ext <<_ACEOF
2701/* end confdefs.h. */
b61ff9c8
BS
2702$ac_declaration
2703#include <stdlib.h>
1a4b763e
BS
2704int
2705main ()
2706{
b61ff9c8 2707exit (42);
1a4b763e
BS
2708 ;
2709 return 0;
2710}
2711_ACEOF
2712rm -f conftest.$ac_objext
b61ff9c8
BS
2713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2714 (eval $ac_compile) 2>conftest.er1
2f41c1d6 2715 ac_status=$?
1a4b763e
BS
2716 grep -v '^ *+' conftest.er1 >conftest.err
2717 rm -f conftest.er1
2718 cat conftest.err >&5
2f41c1d6 2719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2720 (exit $ac_status); } &&
2721 { ac_try='test -z "$ac_c_werror_flag"
2722 || test ! -s conftest.err'
2723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2724 (eval $ac_try) 2>&5
2725 ac_status=$?
2726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2727 (exit $ac_status); }; } &&
2728 { ac_try='test -s conftest.$ac_objext'
2729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2730 (eval $ac_try) 2>&5
2731 ac_status=$?
2732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2733 (exit $ac_status); }; }; then
2734 :
ab22c1fa
CF
2735else
2736 echo "$as_me: failed program was:" >&5
2737sed 's/^/| /' conftest.$ac_ext >&5
2738
b61ff9c8 2739continue
2f41c1d6 2740fi
b61ff9c8
BS
2741rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2742 cat >conftest.$ac_ext <<_ACEOF
ab22c1fa
CF
2743/* confdefs.h. */
2744_ACEOF
2745cat confdefs.h >>conftest.$ac_ext
2746cat >>conftest.$ac_ext <<_ACEOF
2747/* end confdefs.h. */
b61ff9c8 2748$ac_declaration
2f41c1d6
PB
2749int
2750main ()
2751{
b61ff9c8 2752exit (42);
2f41c1d6
PB
2753 ;
2754 return 0;
2755}
2756_ACEOF
b61ff9c8
BS
2757rm -f conftest.$ac_objext
2758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2759 (eval $ac_compile) 2>conftest.er1
2f41c1d6 2760 ac_status=$?
ab22c1fa
CF
2761 grep -v '^ *+' conftest.er1 >conftest.err
2762 rm -f conftest.er1
2763 cat conftest.err >&5
a3bba767 2764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2765 (exit $ac_status); } &&
2766 { ac_try='test -z "$ac_c_werror_flag"
2767 || test ! -s conftest.err'
2768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2769 (eval $ac_try) 2>&5
2770 ac_status=$?
2771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2772 (exit $ac_status); }; } &&
2773 { ac_try='test -s conftest.$ac_objext'
2774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2775 (eval $ac_try) 2>&5
2776 ac_status=$?
2777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2778 (exit $ac_status); }; }; then
2779 break
ab22c1fa
CF
2780else
2781 echo "$as_me: failed program was:" >&5
2782sed 's/^/| /' conftest.$ac_ext >&5
2783
2f41c1d6 2784fi
b61ff9c8 2785rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2f41c1d6 2786done
b61ff9c8
BS
2787rm -f conftest*
2788if test -n "$ac_declaration"; then
2789 echo '#ifdef __cplusplus' >>confdefs.h
2790 echo $ac_declaration >>confdefs.h
2791 echo '#endif' >>confdefs.h
2f41c1d6 2792fi
2f41c1d6 2793
b61ff9c8
BS
2794else
2795 echo "$as_me: failed program was:" >&5
2796sed 's/^/| /' conftest.$ac_ext >&5
ba479fd2 2797
b61ff9c8
BS
2798fi
2799rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2800ac_ext=c
2801ac_cpp='$CPP $CPPFLAGS'
2802ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2803ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2804ac_compiler_gnu=$ac_cv_c_compiler_gnu
2805
2806if test "x$CC" != xcc; then
b61ff9c8
BS
2807 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2808echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
ba479fd2 2809else
b61ff9c8
BS
2810 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2811echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
ba479fd2
NN
2812fi
2813set dummy $CC; ac_cc=`echo $2 |
2814 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
b61ff9c8 2815if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
ba479fd2
NN
2816 echo $ECHO_N "(cached) $ECHO_C" >&6
2817else
2818 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2819/* confdefs.h. */
2820_ACEOF
2821cat confdefs.h >>conftest.$ac_ext
2822cat >>conftest.$ac_ext <<_ACEOF
2823/* end confdefs.h. */
2824
2825int
2826main ()
2827{
2828
2829 ;
2830 return 0;
2831}
2832_ACEOF
3ec83fc2
RH
2833# Make sure it works both with $CC and with simple cc.
2834# We do the test twice because some compilers refuse to overwrite an
2835# existing .o file with -o, though they will create one.
b61ff9c8
BS
2836ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2837if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2838 (eval $ac_try) 2>&5
ba479fd2
NN
2839 ac_status=$?
2840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2841 (exit $ac_status); } &&
b61ff9c8
BS
2842 test -f conftest.$ac_objext && { (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); };
3ec83fc2
RH
2847then
2848 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2849 if test "x$CC" != xcc; then
2850 # Test first that cc exists at all.
ba479fd2 2851 if { ac_try='cc -c conftest.$ac_ext >&5'
b61ff9c8
BS
2852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2853 (eval $ac_try) 2>&5
ba479fd2
NN
2854 ac_status=$?
2855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2856 (exit $ac_status); }; }; then
b61ff9c8
BS
2857 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2858 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2859 (eval $ac_try) 2>&5
ba479fd2
NN
2860 ac_status=$?
2861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2862 (exit $ac_status); } &&
b61ff9c8
BS
2863 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2864 (eval $ac_try) 2>&5
ba479fd2
NN
2865 ac_status=$?
2866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2867 (exit $ac_status); };
3ec83fc2 2868 then
86da66b5
HPN
2869 # cc works too.
2870 :
3ec83fc2 2871 else
86da66b5
HPN
2872 # cc exists but doesn't like -o.
2873 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2874 fi
2875 fi
2876 fi
2877else
2878 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2879fi
b61ff9c8 2880rm -f conftest*
3ec83fc2
RH
2881
2882fi
b61ff9c8
BS
2883if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
2884 echo "$as_me:$LINENO: result: yes" >&5
2885echo "${ECHO_T}yes" >&6
3ec83fc2 2886else
b61ff9c8
BS
2887 echo "$as_me:$LINENO: result: no" >&5
2888echo "${ECHO_T}no" >&6
ba479fd2
NN
2889
2890cat >>confdefs.h <<\_ACEOF
3ec83fc2 2891#define NO_MINUS_C_MINUS_O 1
ba479fd2 2892_ACEOF
3ec83fc2
RH
2893
2894fi
2895
3b620440
KC
2896# expand $ac_aux_dir to an absolute path
2897am_aux_dir=`cd $ac_aux_dir && pwd`
2898
2899# FIXME: we rely on the cache variable name because
2900# there is no other way.
2901set dummy $CC
2902ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2903if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2904 # Losing compiler, so override with the script.
2905 # FIXME: It is wrong to rewrite CC.
2906 # But if we don't then we get into trouble of one sort or another.
2907 # A longer-term fix would be to have automake use am__CC in this case,
2908 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2909 CC="$am_aux_dir/compile $CC"
2910fi
2911
414d23ae
HPN
2912# autoconf is lame and doesn't give us any substitution variable for this.
2913if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2914 NO_MINUS_C_MINUS_O=yes
2915else
2916 OUTPUT_OPTION='-o $@'
2917fi
2918
2919
2920
ec6c7392
PB
2921# Remove the -O2: for historical reasons, unless bootstrapping we prefer
2922# optimizations to be activated explicitly by the toplevel.
2923case "$CC" in
2924 */prev-gcc/xgcc*) ;;
2925 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
2926esac
2927
2928
73458fb7
NN
2929# -------------------------
2930# Check C compiler features
2931# -------------------------
2932
ba479fd2
NN
2933ac_ext=c
2934ac_cpp='$CPP $CPPFLAGS'
2935ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2936ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2937ac_compiler_gnu=$ac_cv_c_compiler_gnu
b61ff9c8
BS
2938echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2939echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2940# On Suns, sometimes $CPP names a directory.
2941if test -n "$CPP" && test -d "$CPP"; then
2942 CPP=
2943fi
2944if test -z "$CPP"; then
ba479fd2
NN
2945 if test "${ac_cv_prog_CPP+set}" = set; then
2946 echo $ECHO_N "(cached) $ECHO_C" >&6
2947else
2948 # Double quotes because CPP needs to be expanded
2949 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2950 do
2951 ac_preproc_ok=false
2952for ac_c_preproc_warn_flag in '' yes
2953do
2954 # Use a header file that comes with gcc, so configuring glibc
2955 # with a fresh cross-compiler works.
2956 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2957 # <limits.h> exists even on freestanding compilers.
84c041a1 2958 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2959 # not just through cpp. "Syntax error" is here to catch this case.
2960 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2961/* confdefs.h. */
2962_ACEOF
2963cat confdefs.h >>conftest.$ac_ext
2964cat >>conftest.$ac_ext <<_ACEOF
2965/* end confdefs.h. */
2966#ifdef __STDC__
2967# include <limits.h>
2968#else
2969# include <assert.h>
2970#endif
86da66b5 2971 Syntax error
ba479fd2 2972_ACEOF
b61ff9c8
BS
2973if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2974 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
2975 ac_status=$?
2976 grep -v '^ *+' conftest.er1 >conftest.err
2977 rm -f conftest.er1
2978 cat conftest.err >&5
2979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
2980 (exit $ac_status); } >/dev/null; then
2981 if test -s conftest.err; then
2982 ac_cpp_err=$ac_c_preproc_warn_flag
2983 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2984 else
2985 ac_cpp_err=
2986 fi
2987else
2988 ac_cpp_err=yes
2989fi
2990if test -z "$ac_cpp_err"; then
093e61a6 2991 :
cafe096b 2992else
ba479fd2
NN
2993 echo "$as_me: failed program was:" >&5
2994sed 's/^/| /' conftest.$ac_ext >&5
2995
2996 # Broken: fails on valid input.
2997continue
2998fi
2999rm -f conftest.err conftest.$ac_ext
3000
b61ff9c8 3001 # OK, works on sane cases. Now check whether non-existent headers
ba479fd2
NN
3002 # can be detected and how.
3003 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3004/* confdefs.h. */
3005_ACEOF
3006cat confdefs.h >>conftest.$ac_ext
3007cat >>conftest.$ac_ext <<_ACEOF
3008/* end confdefs.h. */
3009#include <ac_nonexistent.h>
3010_ACEOF
b61ff9c8
BS
3011if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3012 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3013 ac_status=$?
3014 grep -v '^ *+' conftest.er1 >conftest.err
3015 rm -f conftest.er1
3016 cat conftest.err >&5
3017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3018 (exit $ac_status); } >/dev/null; then
3019 if test -s conftest.err; then
3020 ac_cpp_err=$ac_c_preproc_warn_flag
3021 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3022 else
3023 ac_cpp_err=
3024 fi
3025else
3026 ac_cpp_err=yes
3027fi
3028if test -z "$ac_cpp_err"; then
ba479fd2
NN
3029 # Broken: success on invalid input.
3030continue
3031else
3032 echo "$as_me: failed program was:" >&5
3033sed 's/^/| /' conftest.$ac_ext >&5
3034
3035 # Passes both tests.
3036ac_preproc_ok=:
3037break
3038fi
3039rm -f conftest.err conftest.$ac_ext
3040
3041done
3042# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3043rm -f conftest.err conftest.$ac_ext
3044if $ac_preproc_ok; then
3045 break
3046fi
3047
3048 done
3049 ac_cv_prog_CPP=$CPP
3050
3051fi
3052 CPP=$ac_cv_prog_CPP
3053else
3054 ac_cv_prog_CPP=$CPP
3055fi
b61ff9c8
BS
3056echo "$as_me:$LINENO: result: $CPP" >&5
3057echo "${ECHO_T}$CPP" >&6
ba479fd2
NN
3058ac_preproc_ok=false
3059for ac_c_preproc_warn_flag in '' yes
3060do
3061 # Use a header file that comes with gcc, so configuring glibc
3062 # with a fresh cross-compiler works.
3063 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3064 # <limits.h> exists even on freestanding compilers.
3065 # On the NeXT, cc -E runs the code through the compiler's parser,
3066 # not just through cpp. "Syntax error" is here to catch this case.
3067 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3068/* confdefs.h. */
3069_ACEOF
3070cat confdefs.h >>conftest.$ac_ext
3071cat >>conftest.$ac_ext <<_ACEOF
3072/* end confdefs.h. */
3073#ifdef __STDC__
3074# include <limits.h>
3075#else
3076# include <assert.h>
3077#endif
86da66b5 3078 Syntax error
ba479fd2 3079_ACEOF
b61ff9c8
BS
3080if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3081 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3082 ac_status=$?
3083 grep -v '^ *+' conftest.er1 >conftest.err
3084 rm -f conftest.er1
3085 cat conftest.err >&5
3086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3087 (exit $ac_status); } >/dev/null; then
3088 if test -s conftest.err; then
3089 ac_cpp_err=$ac_c_preproc_warn_flag
3090 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3091 else
3092 ac_cpp_err=
3093 fi
3094else
3095 ac_cpp_err=yes
3096fi
3097if test -z "$ac_cpp_err"; then
6e3f3080 3098 :
414d23ae 3099else
ba479fd2
NN
3100 echo "$as_me: failed program was:" >&5
3101sed 's/^/| /' conftest.$ac_ext >&5
3102
3103 # Broken: fails on valid input.
3104continue
3105fi
3106rm -f conftest.err conftest.$ac_ext
3107
b61ff9c8 3108 # OK, works on sane cases. Now check whether non-existent headers
ba479fd2
NN
3109 # can be detected and how.
3110 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3111/* confdefs.h. */
3112_ACEOF
3113cat confdefs.h >>conftest.$ac_ext
3114cat >>conftest.$ac_ext <<_ACEOF
3115/* end confdefs.h. */
3116#include <ac_nonexistent.h>
3117_ACEOF
b61ff9c8
BS
3118if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3119 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
3120 ac_status=$?
3121 grep -v '^ *+' conftest.er1 >conftest.err
3122 rm -f conftest.er1
3123 cat conftest.err >&5
3124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3125 (exit $ac_status); } >/dev/null; then
3126 if test -s conftest.err; then
3127 ac_cpp_err=$ac_c_preproc_warn_flag
3128 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3129 else
3130 ac_cpp_err=
3131 fi
3132else
3133 ac_cpp_err=yes
3134fi
3135if test -z "$ac_cpp_err"; then
ba479fd2
NN
3136 # Broken: success on invalid input.
3137continue
3138else
3139 echo "$as_me: failed program was:" >&5
3140sed 's/^/| /' conftest.$ac_ext >&5
3141
3142 # Passes both tests.
3143ac_preproc_ok=:
3144break
63cf211a 3145fi
ba479fd2
NN
3146rm -f conftest.err conftest.$ac_ext
3147
3148done
3149# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3150rm -f conftest.err conftest.$ac_ext
3151if $ac_preproc_ok; then
3152 :
6e3f3080 3153else
ba479fd2
NN
3154 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3155See \`config.log' for more details." >&5
3156echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3157See \`config.log' for more details." >&2;}
3158 { (exit 1); exit 1; }; }
6e3f3080
NN
3159fi
3160
ba479fd2
NN
3161ac_ext=c
3162ac_cpp='$CPP $CPPFLAGS'
3163ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3164ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3165ac_compiler_gnu=$ac_cv_c_compiler_gnu
3166
b5472e1d 3167
b61ff9c8
BS
3168echo "$as_me:$LINENO: checking for inline" >&5
3169echo $ECHO_N "checking for inline... $ECHO_C" >&6
ba479fd2
NN
3170if test "${ac_cv_c_inline+set}" = set; then
3171 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3172else
3173 ac_cv_c_inline=no
3174for ac_kw in inline __inline__ __inline; do
ba479fd2 3175 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3176/* confdefs.h. */
3177_ACEOF
3178cat confdefs.h >>conftest.$ac_ext
3179cat >>conftest.$ac_ext <<_ACEOF
3180/* end confdefs.h. */
3181#ifndef __cplusplus
3182typedef int foo_t;
3183static $ac_kw foo_t static_foo () {return 0; }
3184$ac_kw foo_t foo () {return 0; }
3185#endif
414d23ae 3186
ba479fd2
NN
3187_ACEOF
3188rm -f conftest.$ac_objext
b61ff9c8
BS
3189if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3190 (eval $ac_compile) 2>conftest.er1
ba479fd2 3191 ac_status=$?
86da66b5
HPN
3192 grep -v '^ *+' conftest.er1 >conftest.err
3193 rm -f conftest.er1
3194 cat conftest.err >&5
ba479fd2 3195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3196 (exit $ac_status); } &&
3197 { ac_try='test -z "$ac_c_werror_flag"
3198 || test ! -s conftest.err'
3199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3200 (eval $ac_try) 2>&5
3201 ac_status=$?
3202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3203 (exit $ac_status); }; } &&
3204 { ac_try='test -s conftest.$ac_objext'
3205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3206 (eval $ac_try) 2>&5
3207 ac_status=$?
3208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3209 (exit $ac_status); }; }; then
3210 ac_cv_c_inline=$ac_kw; break
414d23ae 3211else
ba479fd2
NN
3212 echo "$as_me: failed program was:" >&5
3213sed 's/^/| /' conftest.$ac_ext >&5
3214
414d23ae 3215fi
b61ff9c8 3216rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3217done
3218
3219fi
b61ff9c8
BS
3220echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3221echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3222
3223
ba479fd2 3224case $ac_cv_c_inline in
414d23ae 3225 inline | yes) ;;
86da66b5
HPN
3226 *)
3227 case $ac_cv_c_inline in
3228 no) ac_val=;;
3229 *) ac_val=$ac_cv_c_inline;;
3230 esac
3231 cat >>confdefs.h <<_ACEOF
3232#ifndef __cplusplus
3233#define inline $ac_val
3234#endif
ba479fd2 3235_ACEOF
86da66b5 3236 ;;
414d23ae
HPN
3237esac
3238
414d23ae 3239
414d23ae 3240# sizeof(char) is 1 by definition.
bf3b7cd3 3241
b61ff9c8
BS
3242echo "$as_me:$LINENO: checking for egrep" >&5
3243echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3244if test "${ac_cv_prog_egrep+set}" = set; then
1a4b763e
BS
3245 echo $ECHO_N "(cached) $ECHO_C" >&6
3246else
b61ff9c8
BS
3247 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3248 then ac_cv_prog_egrep='grep -E'
3249 else ac_cv_prog_egrep='egrep'
1a4b763e 3250 fi
b61ff9c8
BS
3251fi
3252echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3253echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3254 EGREP=$ac_cv_prog_egrep
1a4b763e
BS
3255
3256
b61ff9c8
BS
3257echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3258echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
bf3b7cd3
JD
3259if test "${ac_cv_header_stdc+set}" = set; then
3260 echo $ECHO_N "(cached) $ECHO_C" >&6
3261else
3262 cat >conftest.$ac_ext <<_ACEOF
3263/* confdefs.h. */
3264_ACEOF
3265cat confdefs.h >>conftest.$ac_ext
3266cat >>conftest.$ac_ext <<_ACEOF
3267/* end confdefs.h. */
3268#include <stdlib.h>
3269#include <stdarg.h>
3270#include <string.h>
3271#include <float.h>
3272
3273int
3274main ()
3275{
3276
3277 ;
3278 return 0;
3279}
3280_ACEOF
3281rm -f conftest.$ac_objext
b61ff9c8
BS
3282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3283 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3284 ac_status=$?
3285 grep -v '^ *+' conftest.er1 >conftest.err
3286 rm -f conftest.er1
3287 cat conftest.err >&5
3288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3289 (exit $ac_status); } &&
3290 { ac_try='test -z "$ac_c_werror_flag"
3291 || test ! -s conftest.err'
3292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3293 (eval $ac_try) 2>&5
3294 ac_status=$?
3295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3296 (exit $ac_status); }; } &&
3297 { ac_try='test -s conftest.$ac_objext'
3298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3299 (eval $ac_try) 2>&5
3300 ac_status=$?
3301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3302 (exit $ac_status); }; }; then
bf3b7cd3
JD
3303 ac_cv_header_stdc=yes
3304else
3305 echo "$as_me: failed program was:" >&5
3306sed 's/^/| /' conftest.$ac_ext >&5
3307
b61ff9c8 3308ac_cv_header_stdc=no
bf3b7cd3 3309fi
b61ff9c8 3310rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3311
3312if test $ac_cv_header_stdc = yes; then
3313 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3314 cat >conftest.$ac_ext <<_ACEOF
3315/* confdefs.h. */
3316_ACEOF
3317cat confdefs.h >>conftest.$ac_ext
3318cat >>conftest.$ac_ext <<_ACEOF
3319/* end confdefs.h. */
3320#include <string.h>
3321
3322_ACEOF
3323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3324 $EGREP "memchr" >/dev/null 2>&1; then
3325 :
3326else
3327 ac_cv_header_stdc=no
3328fi
3329rm -f conftest*
3330
3331fi
3332
3333if test $ac_cv_header_stdc = yes; then
3334 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3335 cat >conftest.$ac_ext <<_ACEOF
3336/* confdefs.h. */
3337_ACEOF
3338cat confdefs.h >>conftest.$ac_ext
3339cat >>conftest.$ac_ext <<_ACEOF
3340/* end confdefs.h. */
3341#include <stdlib.h>
3342
3343_ACEOF
3344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3345 $EGREP "free" >/dev/null 2>&1; then
3346 :
3347else
3348 ac_cv_header_stdc=no
3349fi
3350rm -f conftest*
3351
3352fi
3353
3354if test $ac_cv_header_stdc = yes; then
3355 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3356 if test "$cross_compiling" = yes; then
3357 :
3358else
3359 cat >conftest.$ac_ext <<_ACEOF
3360/* confdefs.h. */
3361_ACEOF
3362cat confdefs.h >>conftest.$ac_ext
3363cat >>conftest.$ac_ext <<_ACEOF
3364/* end confdefs.h. */
3365#include <ctype.h>
3366#if ((' ' & 0x0FF) == 0x020)
3367# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3368# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3369#else
3370# define ISLOWER(c) \
3371 (('a' <= (c) && (c) <= 'i') \
3372 || ('j' <= (c) && (c) <= 'r') \
3373 || ('s' <= (c) && (c) <= 'z'))
3374# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3375#endif
3376
3377#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3378int
3379main ()
3380{
3381 int i;
3382 for (i = 0; i < 256; i++)
3383 if (XOR (islower (i), ISLOWER (i))
3384 || toupper (i) != TOUPPER (i))
b61ff9c8
BS
3385 exit(2);
3386 exit (0);
bf3b7cd3
JD
3387}
3388_ACEOF
3389rm -f conftest$ac_exeext
b61ff9c8
BS
3390if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3391 (eval $ac_link) 2>&5
bf3b7cd3
JD
3392 ac_status=$?
3393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3394 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
3395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3396 (eval $ac_try) 2>&5
bf3b7cd3
JD
3397 ac_status=$?
3398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3399 (exit $ac_status); }; }; then
3400 :
3401else
3402 echo "$as_me: program exited with status $ac_status" >&5
3403echo "$as_me: failed program was:" >&5
3404sed 's/^/| /' conftest.$ac_ext >&5
3405
3406( exit $ac_status )
3407ac_cv_header_stdc=no
3408fi
b61ff9c8 3409rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
703d89ab 3410fi
ab22c1fa 3411fi
1a4b763e 3412fi
b61ff9c8
BS
3413echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3414echo "${ECHO_T}$ac_cv_header_stdc" >&6
bf3b7cd3
JD
3415if test $ac_cv_header_stdc = yes; then
3416
3417cat >>confdefs.h <<\_ACEOF
3418#define STDC_HEADERS 1
3419_ACEOF
3420
3421fi
3422
3423# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3434 inttypes.h stdint.h unistd.h
3435do
3436as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b61ff9c8
BS
3437echo "$as_me:$LINENO: checking for $ac_header" >&5
3438echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3439if eval "test \"\${$as_ac_Header+set}\" = set"; then
bf3b7cd3
JD
3440 echo $ECHO_N "(cached) $ECHO_C" >&6
3441else
3442 cat >conftest.$ac_ext <<_ACEOF
3443/* confdefs.h. */
3444_ACEOF
3445cat confdefs.h >>conftest.$ac_ext
3446cat >>conftest.$ac_ext <<_ACEOF
3447/* end confdefs.h. */
3448$ac_includes_default
3449
3450#include <$ac_header>
3451_ACEOF
3452rm -f conftest.$ac_objext
b61ff9c8
BS
3453if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3454 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3455 ac_status=$?
3456 grep -v '^ *+' conftest.er1 >conftest.err
3457 rm -f conftest.er1
3458 cat conftest.err >&5
3459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3460 (exit $ac_status); } &&
3461 { ac_try='test -z "$ac_c_werror_flag"
3462 || test ! -s conftest.err'
3463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3464 (eval $ac_try) 2>&5
3465 ac_status=$?
3466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3467 (exit $ac_status); }; } &&
3468 { ac_try='test -s conftest.$ac_objext'
3469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3470 (eval $ac_try) 2>&5
3471 ac_status=$?
3472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3473 (exit $ac_status); }; }; then
bf3b7cd3
JD
3474 eval "$as_ac_Header=yes"
3475else
3476 echo "$as_me: failed program was:" >&5
3477sed 's/^/| /' conftest.$ac_ext >&5
3478
b61ff9c8 3479eval "$as_ac_Header=no"
bf3b7cd3 3480fi
b61ff9c8 3481rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 3482fi
b61ff9c8
BS
3483echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3484echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bf3b7cd3
JD
3485if test `eval echo '${'$as_ac_Header'}'` = yes; then
3486 cat >>confdefs.h <<_ACEOF
3487#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3488_ACEOF
3489
3490fi
3491
3492done
3493
3494
b61ff9c8
BS
3495echo "$as_me:$LINENO: checking for void *" >&5
3496echo $ECHO_N "checking for void *... $ECHO_C" >&6
bf3b7cd3
JD
3497if test "${ac_cv_type_void_p+set}" = set; then
3498 echo $ECHO_N "(cached) $ECHO_C" >&6
3499else
3500 cat >conftest.$ac_ext <<_ACEOF
3501/* confdefs.h. */
3502_ACEOF
3503cat confdefs.h >>conftest.$ac_ext
3504cat >>conftest.$ac_ext <<_ACEOF
3505/* end confdefs.h. */
3506$ac_includes_default
3507int
3508main ()
3509{
b61ff9c8 3510if ((void * *) 0)
bf3b7cd3 3511 return 0;
b61ff9c8 3512if (sizeof (void *))
bf3b7cd3
JD
3513 return 0;
3514 ;
3515 return 0;
3516}
3517_ACEOF
3518rm -f conftest.$ac_objext
b61ff9c8
BS
3519if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3520 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3521 ac_status=$?
3522 grep -v '^ *+' conftest.er1 >conftest.err
3523 rm -f conftest.er1
3524 cat conftest.err >&5
3525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3526 (exit $ac_status); } &&
3527 { ac_try='test -z "$ac_c_werror_flag"
3528 || test ! -s conftest.err'
3529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3530 (eval $ac_try) 2>&5
3531 ac_status=$?
3532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3533 (exit $ac_status); }; } &&
3534 { ac_try='test -s conftest.$ac_objext'
3535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3536 (eval $ac_try) 2>&5
3537 ac_status=$?
3538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3539 (exit $ac_status); }; }; then
bf3b7cd3
JD
3540 ac_cv_type_void_p=yes
3541else
3542 echo "$as_me: failed program was:" >&5
3543sed 's/^/| /' conftest.$ac_ext >&5
3544
b61ff9c8 3545ac_cv_type_void_p=no
bf3b7cd3 3546fi
b61ff9c8 3547rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 3548fi
b61ff9c8
BS
3549echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3550echo "${ECHO_T}$ac_cv_type_void_p" >&6
bf3b7cd3 3551
b61ff9c8
BS
3552echo "$as_me:$LINENO: checking size of void *" >&5
3553echo $ECHO_N "checking size of void *... $ECHO_C" >&6
ba479fd2
NN
3554if test "${ac_cv_sizeof_void_p+set}" = set; then
3555 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 3556else
b61ff9c8
BS
3557 if test "$ac_cv_type_void_p" = yes; then
3558 # The cast to unsigned long works around a bug in the HP C Compiler
3559 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3560 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3561 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
3562 if test "$cross_compiling" = yes; then
3563 # Depending upon the size, compute the lo and hi bounds.
3564cat >conftest.$ac_ext <<_ACEOF
3565/* confdefs.h. */
3566_ACEOF
3567cat confdefs.h >>conftest.$ac_ext
3568cat >>conftest.$ac_ext <<_ACEOF
3569/* end confdefs.h. */
3570$ac_includes_default
3571int
3572main ()
3573{
b61ff9c8 3574static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
bf3b7cd3
JD
3575test_array [0] = 0
3576
3577 ;
3578 return 0;
3579}
3580_ACEOF
3581rm -f conftest.$ac_objext
b61ff9c8
BS
3582if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3583 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3584 ac_status=$?
3585 grep -v '^ *+' conftest.er1 >conftest.err
3586 rm -f conftest.er1
3587 cat conftest.err >&5
3588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3589 (exit $ac_status); } &&
3590 { ac_try='test -z "$ac_c_werror_flag"
3591 || test ! -s conftest.err'
3592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3593 (eval $ac_try) 2>&5
3594 ac_status=$?
3595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3596 (exit $ac_status); }; } &&
3597 { ac_try='test -s conftest.$ac_objext'
3598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3599 (eval $ac_try) 2>&5
3600 ac_status=$?
3601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3602 (exit $ac_status); }; }; then
bf3b7cd3
JD
3603 ac_lo=0 ac_mid=0
3604 while :; do
3605 cat >conftest.$ac_ext <<_ACEOF
3606/* confdefs.h. */
3607_ACEOF
3608cat confdefs.h >>conftest.$ac_ext
3609cat >>conftest.$ac_ext <<_ACEOF
3610/* end confdefs.h. */
3611$ac_includes_default
3612int
3613main ()
3614{
b61ff9c8 3615static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
3616test_array [0] = 0
3617
3618 ;
3619 return 0;
3620}
3621_ACEOF
3622rm -f conftest.$ac_objext
b61ff9c8
BS
3623if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3624 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3625 ac_status=$?
3626 grep -v '^ *+' conftest.er1 >conftest.err
3627 rm -f conftest.er1
3628 cat conftest.err >&5
3629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3630 (exit $ac_status); } &&
3631 { ac_try='test -z "$ac_c_werror_flag"
3632 || test ! -s conftest.err'
3633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3634 (eval $ac_try) 2>&5
3635 ac_status=$?
3636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3637 (exit $ac_status); }; } &&
3638 { ac_try='test -s conftest.$ac_objext'
3639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3640 (eval $ac_try) 2>&5
3641 ac_status=$?
3642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3643 (exit $ac_status); }; }; then
bf3b7cd3
JD
3644 ac_hi=$ac_mid; break
3645else
3646 echo "$as_me: failed program was:" >&5
3647sed 's/^/| /' conftest.$ac_ext >&5
3648
b61ff9c8
BS
3649ac_lo=`expr $ac_mid + 1`
3650 if test $ac_lo -le $ac_mid; then
3651 ac_lo= ac_hi=
3652 break
3653 fi
3654 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 3655fi
b61ff9c8 3656rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3657 done
3658else
3659 echo "$as_me: failed program was:" >&5
3660sed 's/^/| /' conftest.$ac_ext >&5
3661
b61ff9c8 3662cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
3663/* confdefs.h. */
3664_ACEOF
3665cat confdefs.h >>conftest.$ac_ext
3666cat >>conftest.$ac_ext <<_ACEOF
3667/* end confdefs.h. */
3668$ac_includes_default
3669int
3670main ()
3671{
b61ff9c8 3672static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
bf3b7cd3
JD
3673test_array [0] = 0
3674
3675 ;
3676 return 0;
3677}
3678_ACEOF
3679rm -f conftest.$ac_objext
b61ff9c8
BS
3680if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3681 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3682 ac_status=$?
3683 grep -v '^ *+' conftest.er1 >conftest.err
3684 rm -f conftest.er1
3685 cat conftest.err >&5
3686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3687 (exit $ac_status); } &&
3688 { ac_try='test -z "$ac_c_werror_flag"
3689 || test ! -s conftest.err'
3690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3691 (eval $ac_try) 2>&5
3692 ac_status=$?
3693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3694 (exit $ac_status); }; } &&
3695 { ac_try='test -s conftest.$ac_objext'
3696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3697 (eval $ac_try) 2>&5
3698 ac_status=$?
3699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3700 (exit $ac_status); }; }; then
bf3b7cd3
JD
3701 ac_hi=-1 ac_mid=-1
3702 while :; do
3703 cat >conftest.$ac_ext <<_ACEOF
3704/* confdefs.h. */
3705_ACEOF
3706cat confdefs.h >>conftest.$ac_ext
3707cat >>conftest.$ac_ext <<_ACEOF
3708/* end confdefs.h. */
3709$ac_includes_default
3710int
3711main ()
3712{
b61ff9c8 3713static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
bf3b7cd3
JD
3714test_array [0] = 0
3715
3716 ;
3717 return 0;
3718}
3719_ACEOF
3720rm -f conftest.$ac_objext
b61ff9c8
BS
3721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3722 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3723 ac_status=$?
3724 grep -v '^ *+' conftest.er1 >conftest.err
3725 rm -f conftest.er1
3726 cat conftest.err >&5
3727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3728 (exit $ac_status); } &&
3729 { ac_try='test -z "$ac_c_werror_flag"
3730 || test ! -s conftest.err'
3731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3732 (eval $ac_try) 2>&5
3733 ac_status=$?
3734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3735 (exit $ac_status); }; } &&
3736 { ac_try='test -s conftest.$ac_objext'
3737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3738 (eval $ac_try) 2>&5
3739 ac_status=$?
3740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3741 (exit $ac_status); }; }; then
bf3b7cd3
JD
3742 ac_lo=$ac_mid; break
3743else
3744 echo "$as_me: failed program was:" >&5
3745sed 's/^/| /' conftest.$ac_ext >&5
3746
b61ff9c8
BS
3747ac_hi=`expr '(' $ac_mid ')' - 1`
3748 if test $ac_mid -le $ac_hi; then
3749 ac_lo= ac_hi=
3750 break
3751 fi
3752 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 3753fi
b61ff9c8 3754rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3755 done
3756else
3757 echo "$as_me: failed program was:" >&5
3758sed 's/^/| /' conftest.$ac_ext >&5
3759
b61ff9c8 3760ac_lo= ac_hi=
bf3b7cd3 3761fi
b61ff9c8 3762rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 3763fi
b61ff9c8 3764rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3765# Binary search between lo and hi bounds.
3766while test "x$ac_lo" != "x$ac_hi"; do
3767 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3768 cat >conftest.$ac_ext <<_ACEOF
3769/* confdefs.h. */
3770_ACEOF
3771cat confdefs.h >>conftest.$ac_ext
3772cat >>conftest.$ac_ext <<_ACEOF
3773/* end confdefs.h. */
3774$ac_includes_default
3775int
3776main ()
3777{
b61ff9c8 3778static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
bf3b7cd3
JD
3779test_array [0] = 0
3780
3781 ;
3782 return 0;
3783}
3784_ACEOF
3785rm -f conftest.$ac_objext
b61ff9c8
BS
3786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3787 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3788 ac_status=$?
3789 grep -v '^ *+' conftest.er1 >conftest.err
3790 rm -f conftest.er1
3791 cat conftest.err >&5
3792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3793 (exit $ac_status); } &&
3794 { ac_try='test -z "$ac_c_werror_flag"
3795 || test ! -s conftest.err'
3796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3797 (eval $ac_try) 2>&5
3798 ac_status=$?
3799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3800 (exit $ac_status); }; } &&
3801 { ac_try='test -s conftest.$ac_objext'
3802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3803 (eval $ac_try) 2>&5
3804 ac_status=$?
3805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3806 (exit $ac_status); }; }; then
bf3b7cd3
JD
3807 ac_hi=$ac_mid
3808else
3809 echo "$as_me: failed program was:" >&5
3810sed 's/^/| /' conftest.$ac_ext >&5
3811
b61ff9c8 3812ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 3813fi
b61ff9c8 3814rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3815done
3816case $ac_lo in
3817?*) ac_cv_sizeof_void_p=$ac_lo;;
b61ff9c8 3818'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 3819See \`config.log' for more details." >&5
b61ff9c8 3820echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 3821See \`config.log' for more details." >&2;}
b61ff9c8 3822 { (exit 1); exit 1; }; } ;;
bf3b7cd3 3823esac
b61ff9c8
BS
3824else
3825 if test "$cross_compiling" = yes; then
3826 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
3827See \`config.log' for more details." >&5
3828echo "$as_me: error: cannot run test program while cross compiling
3829See \`config.log' for more details." >&2;}
3830 { (exit 1); exit 1; }; }
bf3b7cd3
JD
3831else
3832 cat >conftest.$ac_ext <<_ACEOF
3833/* confdefs.h. */
3834_ACEOF
3835cat confdefs.h >>conftest.$ac_ext
3836cat >>conftest.$ac_ext <<_ACEOF
3837/* end confdefs.h. */
3838$ac_includes_default
b61ff9c8
BS
3839long longval () { return (long) (sizeof (void *)); }
3840unsigned long ulongval () { return (long) (sizeof (void *)); }
bf3b7cd3
JD
3841#include <stdio.h>
3842#include <stdlib.h>
3843int
3844main ()
3845{
3846
3847 FILE *f = fopen ("conftest.val", "w");
3848 if (! f)
b61ff9c8
BS
3849 exit (1);
3850 if (((long) (sizeof (void *))) < 0)
bf3b7cd3 3851 {
b61ff9c8
BS
3852 long i = longval ();
3853 if (i != ((long) (sizeof (void *))))
3854 exit (1);
bf3b7cd3
JD
3855 fprintf (f, "%ld\n", i);
3856 }
3857 else
3858 {
b61ff9c8
BS
3859 unsigned long i = ulongval ();
3860 if (i != ((long) (sizeof (void *))))
3861 exit (1);
bf3b7cd3
JD
3862 fprintf (f, "%lu\n", i);
3863 }
b61ff9c8 3864 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
3865
3866 ;
3867 return 0;
3868}
3869_ACEOF
3870rm -f conftest$ac_exeext
b61ff9c8
BS
3871if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3872 (eval $ac_link) 2>&5
bf3b7cd3
JD
3873 ac_status=$?
3874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3875 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
3876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3877 (eval $ac_try) 2>&5
bf3b7cd3
JD
3878 ac_status=$?
3879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3880 (exit $ac_status); }; }; then
3881 ac_cv_sizeof_void_p=`cat conftest.val`
3882else
3883 echo "$as_me: program exited with status $ac_status" >&5
3884echo "$as_me: failed program was:" >&5
3885sed 's/^/| /' conftest.$ac_ext >&5
3886
3887( exit $ac_status )
b61ff9c8 3888{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
bf3b7cd3 3889See \`config.log' for more details." >&5
b61ff9c8 3890echo "$as_me: error: cannot compute sizeof (void *), 77
bf3b7cd3 3891See \`config.log' for more details." >&2;}
b61ff9c8
BS
3892 { (exit 1); exit 1; }; }
3893fi
3894rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
3895fi
3896fi
3897rm -f conftest.val
b61ff9c8
BS
3898else
3899 ac_cv_sizeof_void_p=0
bf3b7cd3 3900fi
b61ff9c8
BS
3901fi
3902echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3903echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
bf3b7cd3
JD
3904cat >>confdefs.h <<_ACEOF
3905#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3906_ACEOF
3907
3908
b61ff9c8
BS
3909echo "$as_me:$LINENO: checking for short" >&5
3910echo $ECHO_N "checking for short... $ECHO_C" >&6
bf3b7cd3
JD
3911if test "${ac_cv_type_short+set}" = set; then
3912 echo $ECHO_N "(cached) $ECHO_C" >&6
3913else
3914 cat >conftest.$ac_ext <<_ACEOF
3915/* confdefs.h. */
3916_ACEOF
3917cat confdefs.h >>conftest.$ac_ext
3918cat >>conftest.$ac_ext <<_ACEOF
3919/* end confdefs.h. */
3920$ac_includes_default
3921int
3922main ()
3923{
b61ff9c8 3924if ((short *) 0)
bf3b7cd3 3925 return 0;
b61ff9c8 3926if (sizeof (short))
bf3b7cd3
JD
3927 return 0;
3928 ;
3929 return 0;
3930}
3931_ACEOF
3932rm -f conftest.$ac_objext
b61ff9c8
BS
3933if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3934 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3935 ac_status=$?
3936 grep -v '^ *+' conftest.er1 >conftest.err
3937 rm -f conftest.er1
3938 cat conftest.err >&5
3939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
3940 (exit $ac_status); } &&
3941 { ac_try='test -z "$ac_c_werror_flag"
3942 || test ! -s conftest.err'
3943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3944 (eval $ac_try) 2>&5
3945 ac_status=$?
3946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3947 (exit $ac_status); }; } &&
3948 { ac_try='test -s conftest.$ac_objext'
3949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3950 (eval $ac_try) 2>&5
3951 ac_status=$?
3952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3953 (exit $ac_status); }; }; then
bf3b7cd3
JD
3954 ac_cv_type_short=yes
3955else
3956 echo "$as_me: failed program was:" >&5
3957sed 's/^/| /' conftest.$ac_ext >&5
3958
b61ff9c8 3959ac_cv_type_short=no
bf3b7cd3 3960fi
b61ff9c8 3961rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 3962fi
b61ff9c8
BS
3963echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
3964echo "${ECHO_T}$ac_cv_type_short" >&6
bf3b7cd3 3965
b61ff9c8
BS
3966echo "$as_me:$LINENO: checking size of short" >&5
3967echo $ECHO_N "checking size of short... $ECHO_C" >&6
bf3b7cd3
JD
3968if test "${ac_cv_sizeof_short+set}" = set; then
3969 echo $ECHO_N "(cached) $ECHO_C" >&6
3970else
b61ff9c8
BS
3971 if test "$ac_cv_type_short" = yes; then
3972 # The cast to unsigned long works around a bug in the HP C Compiler
3973 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3974 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3975 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
3976 if test "$cross_compiling" = yes; then
3977 # Depending upon the size, compute the lo and hi bounds.
3978cat >conftest.$ac_ext <<_ACEOF
3979/* confdefs.h. */
3980_ACEOF
3981cat confdefs.h >>conftest.$ac_ext
3982cat >>conftest.$ac_ext <<_ACEOF
3983/* end confdefs.h. */
3984$ac_includes_default
3985int
3986main ()
3987{
b61ff9c8 3988static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
bf3b7cd3
JD
3989test_array [0] = 0
3990
3991 ;
3992 return 0;
3993}
3994_ACEOF
3995rm -f conftest.$ac_objext
b61ff9c8
BS
3996if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3997 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
3998 ac_status=$?
3999 grep -v '^ *+' conftest.er1 >conftest.err
4000 rm -f conftest.er1
4001 cat conftest.err >&5
4002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4003 (exit $ac_status); } &&
4004 { ac_try='test -z "$ac_c_werror_flag"
4005 || test ! -s conftest.err'
4006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4007 (eval $ac_try) 2>&5
4008 ac_status=$?
4009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4010 (exit $ac_status); }; } &&
4011 { ac_try='test -s conftest.$ac_objext'
4012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4013 (eval $ac_try) 2>&5
4014 ac_status=$?
4015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4016 (exit $ac_status); }; }; then
bf3b7cd3
JD
4017 ac_lo=0 ac_mid=0
4018 while :; do
4019 cat >conftest.$ac_ext <<_ACEOF
4020/* confdefs.h. */
4021_ACEOF
4022cat confdefs.h >>conftest.$ac_ext
4023cat >>conftest.$ac_ext <<_ACEOF
4024/* end confdefs.h. */
4025$ac_includes_default
4026int
4027main ()
4028{
b61ff9c8 4029static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
4030test_array [0] = 0
4031
4032 ;
4033 return 0;
4034}
4035_ACEOF
4036rm -f conftest.$ac_objext
b61ff9c8
BS
4037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4038 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4039 ac_status=$?
4040 grep -v '^ *+' conftest.er1 >conftest.err
4041 rm -f conftest.er1
4042 cat conftest.err >&5
4043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4044 (exit $ac_status); } &&
4045 { ac_try='test -z "$ac_c_werror_flag"
4046 || test ! -s conftest.err'
4047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4048 (eval $ac_try) 2>&5
4049 ac_status=$?
4050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4051 (exit $ac_status); }; } &&
4052 { ac_try='test -s conftest.$ac_objext'
4053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4054 (eval $ac_try) 2>&5
4055 ac_status=$?
4056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4057 (exit $ac_status); }; }; then
bf3b7cd3
JD
4058 ac_hi=$ac_mid; break
4059else
4060 echo "$as_me: failed program was:" >&5
4061sed 's/^/| /' conftest.$ac_ext >&5
4062
b61ff9c8
BS
4063ac_lo=`expr $ac_mid + 1`
4064 if test $ac_lo -le $ac_mid; then
4065 ac_lo= ac_hi=
4066 break
4067 fi
4068 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4069fi
b61ff9c8 4070rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4071 done
4072else
4073 echo "$as_me: failed program was:" >&5
4074sed 's/^/| /' conftest.$ac_ext >&5
4075
b61ff9c8 4076cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4077/* confdefs.h. */
4078_ACEOF
4079cat confdefs.h >>conftest.$ac_ext
4080cat >>conftest.$ac_ext <<_ACEOF
4081/* end confdefs.h. */
4082$ac_includes_default
4083int
4084main ()
4085{
b61ff9c8 4086static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
bf3b7cd3
JD
4087test_array [0] = 0
4088
4089 ;
4090 return 0;
4091}
4092_ACEOF
4093rm -f conftest.$ac_objext
b61ff9c8
BS
4094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4095 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4096 ac_status=$?
4097 grep -v '^ *+' conftest.er1 >conftest.err
4098 rm -f conftest.er1
4099 cat conftest.err >&5
4100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4101 (exit $ac_status); } &&
4102 { ac_try='test -z "$ac_c_werror_flag"
4103 || test ! -s conftest.err'
4104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4105 (eval $ac_try) 2>&5
4106 ac_status=$?
4107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4108 (exit $ac_status); }; } &&
4109 { ac_try='test -s conftest.$ac_objext'
4110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4111 (eval $ac_try) 2>&5
4112 ac_status=$?
4113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4114 (exit $ac_status); }; }; then
bf3b7cd3
JD
4115 ac_hi=-1 ac_mid=-1
4116 while :; do
4117 cat >conftest.$ac_ext <<_ACEOF
4118/* confdefs.h. */
4119_ACEOF
4120cat confdefs.h >>conftest.$ac_ext
4121cat >>conftest.$ac_ext <<_ACEOF
4122/* end confdefs.h. */
4123$ac_includes_default
4124int
4125main ()
4126{
b61ff9c8 4127static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
bf3b7cd3
JD
4128test_array [0] = 0
4129
4130 ;
4131 return 0;
4132}
4133_ACEOF
4134rm -f conftest.$ac_objext
b61ff9c8
BS
4135if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4136 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4137 ac_status=$?
4138 grep -v '^ *+' conftest.er1 >conftest.err
4139 rm -f conftest.er1
4140 cat conftest.err >&5
4141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4142 (exit $ac_status); } &&
4143 { ac_try='test -z "$ac_c_werror_flag"
4144 || test ! -s conftest.err'
4145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4146 (eval $ac_try) 2>&5
4147 ac_status=$?
4148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4149 (exit $ac_status); }; } &&
4150 { ac_try='test -s conftest.$ac_objext'
4151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4152 (eval $ac_try) 2>&5
4153 ac_status=$?
4154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4155 (exit $ac_status); }; }; then
bf3b7cd3
JD
4156 ac_lo=$ac_mid; break
4157else
4158 echo "$as_me: failed program was:" >&5
4159sed 's/^/| /' conftest.$ac_ext >&5
4160
b61ff9c8
BS
4161ac_hi=`expr '(' $ac_mid ')' - 1`
4162 if test $ac_mid -le $ac_hi; then
4163 ac_lo= ac_hi=
4164 break
4165 fi
4166 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4167fi
b61ff9c8 4168rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4169 done
4170else
4171 echo "$as_me: failed program was:" >&5
4172sed 's/^/| /' conftest.$ac_ext >&5
4173
b61ff9c8 4174ac_lo= ac_hi=
bf3b7cd3 4175fi
b61ff9c8 4176rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4177fi
b61ff9c8 4178rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4179# Binary search between lo and hi bounds.
4180while test "x$ac_lo" != "x$ac_hi"; do
4181 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4182 cat >conftest.$ac_ext <<_ACEOF
4183/* confdefs.h. */
4184_ACEOF
4185cat confdefs.h >>conftest.$ac_ext
4186cat >>conftest.$ac_ext <<_ACEOF
4187/* end confdefs.h. */
4188$ac_includes_default
4189int
4190main ()
4191{
b61ff9c8 4192static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
bf3b7cd3
JD
4193test_array [0] = 0
4194
4195 ;
4196 return 0;
4197}
4198_ACEOF
4199rm -f conftest.$ac_objext
b61ff9c8
BS
4200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4201 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4202 ac_status=$?
4203 grep -v '^ *+' conftest.er1 >conftest.err
4204 rm -f conftest.er1
4205 cat conftest.err >&5
4206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4207 (exit $ac_status); } &&
4208 { ac_try='test -z "$ac_c_werror_flag"
4209 || test ! -s conftest.err'
4210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4211 (eval $ac_try) 2>&5
4212 ac_status=$?
4213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4214 (exit $ac_status); }; } &&
4215 { ac_try='test -s conftest.$ac_objext'
4216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4217 (eval $ac_try) 2>&5
4218 ac_status=$?
4219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4220 (exit $ac_status); }; }; then
bf3b7cd3
JD
4221 ac_hi=$ac_mid
4222else
4223 echo "$as_me: failed program was:" >&5
4224sed 's/^/| /' conftest.$ac_ext >&5
4225
b61ff9c8 4226ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 4227fi
b61ff9c8 4228rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4229done
4230case $ac_lo in
4231?*) ac_cv_sizeof_short=$ac_lo;;
b61ff9c8 4232'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 4233See \`config.log' for more details." >&5
b61ff9c8 4234echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 4235See \`config.log' for more details." >&2;}
b61ff9c8 4236 { (exit 1); exit 1; }; } ;;
bf3b7cd3 4237esac
b61ff9c8
BS
4238else
4239 if test "$cross_compiling" = yes; then
4240 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4241See \`config.log' for more details." >&5
4242echo "$as_me: error: cannot run test program while cross compiling
4243See \`config.log' for more details." >&2;}
4244 { (exit 1); exit 1; }; }
8b1f719a
PB
4245else
4246 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4247/* confdefs.h. */
4248_ACEOF
4249cat confdefs.h >>conftest.$ac_ext
4250cat >>conftest.$ac_ext <<_ACEOF
4251/* end confdefs.h. */
4252$ac_includes_default
b61ff9c8
BS
4253long longval () { return (long) (sizeof (short)); }
4254unsigned long ulongval () { return (long) (sizeof (short)); }
bf3b7cd3
JD
4255#include <stdio.h>
4256#include <stdlib.h>
4257int
4258main ()
4259{
4260
4261 FILE *f = fopen ("conftest.val", "w");
4262 if (! f)
b61ff9c8
BS
4263 exit (1);
4264 if (((long) (sizeof (short))) < 0)
bf3b7cd3 4265 {
b61ff9c8
BS
4266 long i = longval ();
4267 if (i != ((long) (sizeof (short))))
4268 exit (1);
bf3b7cd3
JD
4269 fprintf (f, "%ld\n", i);
4270 }
4271 else
4272 {
b61ff9c8
BS
4273 unsigned long i = ulongval ();
4274 if (i != ((long) (sizeof (short))))
4275 exit (1);
bf3b7cd3
JD
4276 fprintf (f, "%lu\n", i);
4277 }
b61ff9c8 4278 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
4279
4280 ;
4281 return 0;
4282}
4283_ACEOF
4284rm -f conftest$ac_exeext
b61ff9c8
BS
4285if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4286 (eval $ac_link) 2>&5
bf3b7cd3
JD
4287 ac_status=$?
4288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4289 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
4290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4291 (eval $ac_try) 2>&5
bf3b7cd3
JD
4292 ac_status=$?
4293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4294 (exit $ac_status); }; }; then
4295 ac_cv_sizeof_short=`cat conftest.val`
4296else
4297 echo "$as_me: program exited with status $ac_status" >&5
4298echo "$as_me: failed program was:" >&5
4299sed 's/^/| /' conftest.$ac_ext >&5
4300
4301( exit $ac_status )
b61ff9c8 4302{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
bf3b7cd3 4303See \`config.log' for more details." >&5
b61ff9c8 4304echo "$as_me: error: cannot compute sizeof (short), 77
bf3b7cd3 4305See \`config.log' for more details." >&2;}
b61ff9c8
BS
4306 { (exit 1); exit 1; }; }
4307fi
4308rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4309fi
4310fi
4311rm -f conftest.val
b61ff9c8
BS
4312else
4313 ac_cv_sizeof_short=0
bf3b7cd3 4314fi
b61ff9c8
BS
4315fi
4316echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4317echo "${ECHO_T}$ac_cv_sizeof_short" >&6
bf3b7cd3
JD
4318cat >>confdefs.h <<_ACEOF
4319#define SIZEOF_SHORT $ac_cv_sizeof_short
4320_ACEOF
4321
4322
b61ff9c8
BS
4323echo "$as_me:$LINENO: checking for int" >&5
4324echo $ECHO_N "checking for int... $ECHO_C" >&6
bf3b7cd3
JD
4325if test "${ac_cv_type_int+set}" = set; then
4326 echo $ECHO_N "(cached) $ECHO_C" >&6
4327else
4328 cat >conftest.$ac_ext <<_ACEOF
4329/* confdefs.h. */
4330_ACEOF
4331cat confdefs.h >>conftest.$ac_ext
4332cat >>conftest.$ac_ext <<_ACEOF
4333/* end confdefs.h. */
4334$ac_includes_default
4335int
4336main ()
4337{
b61ff9c8 4338if ((int *) 0)
bf3b7cd3 4339 return 0;
b61ff9c8 4340if (sizeof (int))
bf3b7cd3
JD
4341 return 0;
4342 ;
4343 return 0;
4344}
4345_ACEOF
4346rm -f conftest.$ac_objext
b61ff9c8
BS
4347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4348 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4349 ac_status=$?
4350 grep -v '^ *+' conftest.er1 >conftest.err
4351 rm -f conftest.er1
4352 cat conftest.err >&5
4353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4354 (exit $ac_status); } &&
4355 { ac_try='test -z "$ac_c_werror_flag"
4356 || test ! -s conftest.err'
4357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4358 (eval $ac_try) 2>&5
4359 ac_status=$?
4360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4361 (exit $ac_status); }; } &&
4362 { ac_try='test -s conftest.$ac_objext'
4363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4364 (eval $ac_try) 2>&5
4365 ac_status=$?
4366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4367 (exit $ac_status); }; }; then
bf3b7cd3
JD
4368 ac_cv_type_int=yes
4369else
4370 echo "$as_me: failed program was:" >&5
4371sed 's/^/| /' conftest.$ac_ext >&5
4372
b61ff9c8 4373ac_cv_type_int=no
bf3b7cd3 4374fi
b61ff9c8 4375rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4376fi
b61ff9c8
BS
4377echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4378echo "${ECHO_T}$ac_cv_type_int" >&6
bf3b7cd3 4379
b61ff9c8
BS
4380echo "$as_me:$LINENO: checking size of int" >&5
4381echo $ECHO_N "checking size of int... $ECHO_C" >&6
bf3b7cd3
JD
4382if test "${ac_cv_sizeof_int+set}" = set; then
4383 echo $ECHO_N "(cached) $ECHO_C" >&6
4384else
b61ff9c8
BS
4385 if test "$ac_cv_type_int" = yes; then
4386 # The cast to unsigned long works around a bug in the HP C Compiler
4387 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4388 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4389 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4390 if test "$cross_compiling" = yes; then
4391 # Depending upon the size, compute the lo and hi bounds.
4392cat >conftest.$ac_ext <<_ACEOF
4393/* confdefs.h. */
4394_ACEOF
4395cat confdefs.h >>conftest.$ac_ext
4396cat >>conftest.$ac_ext <<_ACEOF
4397/* end confdefs.h. */
4398$ac_includes_default
4399int
4400main ()
4401{
b61ff9c8 4402static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
bf3b7cd3
JD
4403test_array [0] = 0
4404
4405 ;
4406 return 0;
4407}
4408_ACEOF
4409rm -f conftest.$ac_objext
b61ff9c8
BS
4410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4411 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4412 ac_status=$?
4413 grep -v '^ *+' conftest.er1 >conftest.err
4414 rm -f conftest.er1
4415 cat conftest.err >&5
4416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4417 (exit $ac_status); } &&
4418 { ac_try='test -z "$ac_c_werror_flag"
4419 || test ! -s conftest.err'
4420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4421 (eval $ac_try) 2>&5
4422 ac_status=$?
4423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4424 (exit $ac_status); }; } &&
4425 { ac_try='test -s conftest.$ac_objext'
4426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4427 (eval $ac_try) 2>&5
4428 ac_status=$?
4429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4430 (exit $ac_status); }; }; then
bf3b7cd3
JD
4431 ac_lo=0 ac_mid=0
4432 while :; do
4433 cat >conftest.$ac_ext <<_ACEOF
4434/* confdefs.h. */
4435_ACEOF
4436cat confdefs.h >>conftest.$ac_ext
4437cat >>conftest.$ac_ext <<_ACEOF
4438/* end confdefs.h. */
4439$ac_includes_default
4440int
4441main ()
4442{
b61ff9c8 4443static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
4444test_array [0] = 0
4445
4446 ;
4447 return 0;
4448}
4449_ACEOF
4450rm -f conftest.$ac_objext
b61ff9c8
BS
4451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4452 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4453 ac_status=$?
4454 grep -v '^ *+' conftest.er1 >conftest.err
4455 rm -f conftest.er1
4456 cat conftest.err >&5
4457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4458 (exit $ac_status); } &&
4459 { ac_try='test -z "$ac_c_werror_flag"
4460 || test ! -s conftest.err'
4461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4462 (eval $ac_try) 2>&5
4463 ac_status=$?
4464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4465 (exit $ac_status); }; } &&
4466 { ac_try='test -s conftest.$ac_objext'
4467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4468 (eval $ac_try) 2>&5
4469 ac_status=$?
4470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4471 (exit $ac_status); }; }; then
bf3b7cd3
JD
4472 ac_hi=$ac_mid; break
4473else
4474 echo "$as_me: failed program was:" >&5
4475sed 's/^/| /' conftest.$ac_ext >&5
4476
b61ff9c8
BS
4477ac_lo=`expr $ac_mid + 1`
4478 if test $ac_lo -le $ac_mid; then
4479 ac_lo= ac_hi=
4480 break
4481 fi
4482 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4483fi
b61ff9c8 4484rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4485 done
4486else
4487 echo "$as_me: failed program was:" >&5
4488sed 's/^/| /' conftest.$ac_ext >&5
4489
b61ff9c8 4490cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4491/* confdefs.h. */
4492_ACEOF
4493cat confdefs.h >>conftest.$ac_ext
4494cat >>conftest.$ac_ext <<_ACEOF
4495/* end confdefs.h. */
4496$ac_includes_default
4497int
4498main ()
4499{
b61ff9c8 4500static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
bf3b7cd3
JD
4501test_array [0] = 0
4502
4503 ;
4504 return 0;
4505}
4506_ACEOF
4507rm -f conftest.$ac_objext
b61ff9c8
BS
4508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4509 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4510 ac_status=$?
4511 grep -v '^ *+' conftest.er1 >conftest.err
4512 rm -f conftest.er1
4513 cat conftest.err >&5
4514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4515 (exit $ac_status); } &&
4516 { ac_try='test -z "$ac_c_werror_flag"
4517 || test ! -s conftest.err'
4518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4519 (eval $ac_try) 2>&5
4520 ac_status=$?
4521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4522 (exit $ac_status); }; } &&
4523 { ac_try='test -s conftest.$ac_objext'
4524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4525 (eval $ac_try) 2>&5
4526 ac_status=$?
4527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4528 (exit $ac_status); }; }; then
bf3b7cd3
JD
4529 ac_hi=-1 ac_mid=-1
4530 while :; do
4531 cat >conftest.$ac_ext <<_ACEOF
4532/* confdefs.h. */
4533_ACEOF
4534cat confdefs.h >>conftest.$ac_ext
4535cat >>conftest.$ac_ext <<_ACEOF
4536/* end confdefs.h. */
4537$ac_includes_default
4538int
4539main ()
4540{
b61ff9c8 4541static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
bf3b7cd3
JD
4542test_array [0] = 0
4543
4544 ;
4545 return 0;
4546}
4547_ACEOF
4548rm -f conftest.$ac_objext
b61ff9c8
BS
4549if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4550 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4551 ac_status=$?
4552 grep -v '^ *+' conftest.er1 >conftest.err
4553 rm -f conftest.er1
4554 cat conftest.err >&5
4555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4556 (exit $ac_status); } &&
4557 { ac_try='test -z "$ac_c_werror_flag"
4558 || test ! -s conftest.err'
4559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4560 (eval $ac_try) 2>&5
4561 ac_status=$?
4562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4563 (exit $ac_status); }; } &&
4564 { ac_try='test -s conftest.$ac_objext'
4565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4566 (eval $ac_try) 2>&5
4567 ac_status=$?
4568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4569 (exit $ac_status); }; }; then
bf3b7cd3
JD
4570 ac_lo=$ac_mid; break
4571else
4572 echo "$as_me: failed program was:" >&5
4573sed 's/^/| /' conftest.$ac_ext >&5
4574
b61ff9c8
BS
4575ac_hi=`expr '(' $ac_mid ')' - 1`
4576 if test $ac_mid -le $ac_hi; then
4577 ac_lo= ac_hi=
4578 break
4579 fi
4580 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4581fi
b61ff9c8 4582rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4583 done
4584else
4585 echo "$as_me: failed program was:" >&5
4586sed 's/^/| /' conftest.$ac_ext >&5
4587
b61ff9c8 4588ac_lo= ac_hi=
bf3b7cd3 4589fi
b61ff9c8 4590rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4591fi
b61ff9c8 4592rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4593# Binary search between lo and hi bounds.
4594while test "x$ac_lo" != "x$ac_hi"; do
4595 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4596 cat >conftest.$ac_ext <<_ACEOF
4597/* confdefs.h. */
4598_ACEOF
4599cat confdefs.h >>conftest.$ac_ext
4600cat >>conftest.$ac_ext <<_ACEOF
4601/* end confdefs.h. */
4602$ac_includes_default
4603int
4604main ()
4605{
b61ff9c8 4606static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
bf3b7cd3
JD
4607test_array [0] = 0
4608
4609 ;
4610 return 0;
4611}
4612_ACEOF
4613rm -f conftest.$ac_objext
b61ff9c8
BS
4614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4615 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4616 ac_status=$?
4617 grep -v '^ *+' conftest.er1 >conftest.err
4618 rm -f conftest.er1
4619 cat conftest.err >&5
4620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4621 (exit $ac_status); } &&
4622 { ac_try='test -z "$ac_c_werror_flag"
4623 || test ! -s conftest.err'
4624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4625 (eval $ac_try) 2>&5
4626 ac_status=$?
4627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4628 (exit $ac_status); }; } &&
4629 { ac_try='test -s conftest.$ac_objext'
4630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4631 (eval $ac_try) 2>&5
4632 ac_status=$?
4633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4634 (exit $ac_status); }; }; then
bf3b7cd3
JD
4635 ac_hi=$ac_mid
4636else
4637 echo "$as_me: failed program was:" >&5
4638sed 's/^/| /' conftest.$ac_ext >&5
4639
b61ff9c8 4640ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 4641fi
b61ff9c8 4642rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4643done
4644case $ac_lo in
4645?*) ac_cv_sizeof_int=$ac_lo;;
b61ff9c8 4646'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 4647See \`config.log' for more details." >&5
b61ff9c8 4648echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 4649See \`config.log' for more details." >&2;}
b61ff9c8 4650 { (exit 1); exit 1; }; } ;;
bf3b7cd3 4651esac
b61ff9c8
BS
4652else
4653 if test "$cross_compiling" = yes; then
4654 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4655See \`config.log' for more details." >&5
4656echo "$as_me: error: cannot run test program while cross compiling
4657See \`config.log' for more details." >&2;}
4658 { (exit 1); exit 1; }; }
bf3b7cd3
JD
4659else
4660 cat >conftest.$ac_ext <<_ACEOF
4661/* confdefs.h. */
4662_ACEOF
4663cat confdefs.h >>conftest.$ac_ext
4664cat >>conftest.$ac_ext <<_ACEOF
4665/* end confdefs.h. */
4666$ac_includes_default
b61ff9c8
BS
4667long longval () { return (long) (sizeof (int)); }
4668unsigned long ulongval () { return (long) (sizeof (int)); }
bf3b7cd3
JD
4669#include <stdio.h>
4670#include <stdlib.h>
4671int
4672main ()
4673{
4674
4675 FILE *f = fopen ("conftest.val", "w");
4676 if (! f)
b61ff9c8
BS
4677 exit (1);
4678 if (((long) (sizeof (int))) < 0)
bf3b7cd3 4679 {
b61ff9c8
BS
4680 long i = longval ();
4681 if (i != ((long) (sizeof (int))))
4682 exit (1);
bf3b7cd3
JD
4683 fprintf (f, "%ld\n", i);
4684 }
4685 else
4686 {
b61ff9c8
BS
4687 unsigned long i = ulongval ();
4688 if (i != ((long) (sizeof (int))))
4689 exit (1);
bf3b7cd3
JD
4690 fprintf (f, "%lu\n", i);
4691 }
b61ff9c8 4692 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
4693
4694 ;
4695 return 0;
4696}
4697_ACEOF
4698rm -f conftest$ac_exeext
b61ff9c8
BS
4699if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4700 (eval $ac_link) 2>&5
bf3b7cd3
JD
4701 ac_status=$?
4702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4703 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
4704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4705 (eval $ac_try) 2>&5
bf3b7cd3
JD
4706 ac_status=$?
4707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4708 (exit $ac_status); }; }; then
4709 ac_cv_sizeof_int=`cat conftest.val`
4710else
4711 echo "$as_me: program exited with status $ac_status" >&5
4712echo "$as_me: failed program was:" >&5
4713sed 's/^/| /' conftest.$ac_ext >&5
4714
4715( exit $ac_status )
b61ff9c8 4716{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
bf3b7cd3 4717See \`config.log' for more details." >&5
b61ff9c8 4718echo "$as_me: error: cannot compute sizeof (int), 77
bf3b7cd3 4719See \`config.log' for more details." >&2;}
b61ff9c8
BS
4720 { (exit 1); exit 1; }; }
4721fi
4722rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4723fi
4724fi
4725rm -f conftest.val
b61ff9c8
BS
4726else
4727 ac_cv_sizeof_int=0
bf3b7cd3 4728fi
b61ff9c8
BS
4729fi
4730echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4731echo "${ECHO_T}$ac_cv_sizeof_int" >&6
bf3b7cd3
JD
4732cat >>confdefs.h <<_ACEOF
4733#define SIZEOF_INT $ac_cv_sizeof_int
4734_ACEOF
4735
4736
b61ff9c8
BS
4737echo "$as_me:$LINENO: checking for long" >&5
4738echo $ECHO_N "checking for long... $ECHO_C" >&6
bf3b7cd3
JD
4739if test "${ac_cv_type_long+set}" = set; then
4740 echo $ECHO_N "(cached) $ECHO_C" >&6
4741else
4742 cat >conftest.$ac_ext <<_ACEOF
4743/* confdefs.h. */
4744_ACEOF
4745cat confdefs.h >>conftest.$ac_ext
4746cat >>conftest.$ac_ext <<_ACEOF
4747/* end confdefs.h. */
4748$ac_includes_default
4749int
4750main ()
4751{
b61ff9c8 4752if ((long *) 0)
bf3b7cd3 4753 return 0;
b61ff9c8 4754if (sizeof (long))
bf3b7cd3
JD
4755 return 0;
4756 ;
4757 return 0;
4758}
4759_ACEOF
4760rm -f conftest.$ac_objext
b61ff9c8
BS
4761if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4762 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4763 ac_status=$?
4764 grep -v '^ *+' conftest.er1 >conftest.err
4765 rm -f conftest.er1
4766 cat conftest.err >&5
4767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4768 (exit $ac_status); } &&
4769 { ac_try='test -z "$ac_c_werror_flag"
4770 || test ! -s conftest.err'
4771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4772 (eval $ac_try) 2>&5
4773 ac_status=$?
4774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4775 (exit $ac_status); }; } &&
4776 { ac_try='test -s conftest.$ac_objext'
4777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4778 (eval $ac_try) 2>&5
4779 ac_status=$?
4780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4781 (exit $ac_status); }; }; then
bf3b7cd3
JD
4782 ac_cv_type_long=yes
4783else
4784 echo "$as_me: failed program was:" >&5
4785sed 's/^/| /' conftest.$ac_ext >&5
4786
b61ff9c8 4787ac_cv_type_long=no
bf3b7cd3 4788fi
b61ff9c8 4789rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4790fi
b61ff9c8
BS
4791echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4792echo "${ECHO_T}$ac_cv_type_long" >&6
bf3b7cd3 4793
b61ff9c8
BS
4794echo "$as_me:$LINENO: checking size of long" >&5
4795echo $ECHO_N "checking size of long... $ECHO_C" >&6
bf3b7cd3
JD
4796if test "${ac_cv_sizeof_long+set}" = set; then
4797 echo $ECHO_N "(cached) $ECHO_C" >&6
4798else
b61ff9c8
BS
4799 if test "$ac_cv_type_long" = yes; then
4800 # The cast to unsigned long works around a bug in the HP C Compiler
4801 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4802 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4803 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
4804 if test "$cross_compiling" = yes; then
4805 # Depending upon the size, compute the lo and hi bounds.
4806cat >conftest.$ac_ext <<_ACEOF
4807/* confdefs.h. */
4808_ACEOF
4809cat confdefs.h >>conftest.$ac_ext
4810cat >>conftest.$ac_ext <<_ACEOF
4811/* end confdefs.h. */
4812$ac_includes_default
4813int
4814main ()
4815{
b61ff9c8 4816static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
bf3b7cd3
JD
4817test_array [0] = 0
4818
4819 ;
4820 return 0;
4821}
4822_ACEOF
4823rm -f conftest.$ac_objext
b61ff9c8
BS
4824if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4825 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4826 ac_status=$?
4827 grep -v '^ *+' conftest.er1 >conftest.err
4828 rm -f conftest.er1
4829 cat conftest.err >&5
4830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4831 (exit $ac_status); } &&
4832 { ac_try='test -z "$ac_c_werror_flag"
4833 || test ! -s conftest.err'
4834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4835 (eval $ac_try) 2>&5
4836 ac_status=$?
4837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4838 (exit $ac_status); }; } &&
4839 { ac_try='test -s conftest.$ac_objext'
4840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4841 (eval $ac_try) 2>&5
4842 ac_status=$?
4843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4844 (exit $ac_status); }; }; then
bf3b7cd3
JD
4845 ac_lo=0 ac_mid=0
4846 while :; do
4847 cat >conftest.$ac_ext <<_ACEOF
4848/* confdefs.h. */
4849_ACEOF
4850cat confdefs.h >>conftest.$ac_ext
4851cat >>conftest.$ac_ext <<_ACEOF
4852/* end confdefs.h. */
4853$ac_includes_default
4854int
4855main ()
4856{
b61ff9c8 4857static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
4858test_array [0] = 0
4859
4860 ;
4861 return 0;
4862}
4863_ACEOF
4864rm -f conftest.$ac_objext
b61ff9c8
BS
4865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4866 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4867 ac_status=$?
4868 grep -v '^ *+' conftest.er1 >conftest.err
4869 rm -f conftest.er1
4870 cat conftest.err >&5
4871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4872 (exit $ac_status); } &&
4873 { ac_try='test -z "$ac_c_werror_flag"
4874 || test ! -s conftest.err'
4875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4876 (eval $ac_try) 2>&5
4877 ac_status=$?
4878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4879 (exit $ac_status); }; } &&
4880 { ac_try='test -s conftest.$ac_objext'
4881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4882 (eval $ac_try) 2>&5
4883 ac_status=$?
4884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4885 (exit $ac_status); }; }; then
bf3b7cd3
JD
4886 ac_hi=$ac_mid; break
4887else
4888 echo "$as_me: failed program was:" >&5
4889sed 's/^/| /' conftest.$ac_ext >&5
4890
b61ff9c8
BS
4891ac_lo=`expr $ac_mid + 1`
4892 if test $ac_lo -le $ac_mid; then
4893 ac_lo= ac_hi=
4894 break
4895 fi
4896 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4897fi
b61ff9c8 4898rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4899 done
4900else
4901 echo "$as_me: failed program was:" >&5
4902sed 's/^/| /' conftest.$ac_ext >&5
4903
b61ff9c8 4904cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4905/* confdefs.h. */
4906_ACEOF
4907cat confdefs.h >>conftest.$ac_ext
4908cat >>conftest.$ac_ext <<_ACEOF
4909/* end confdefs.h. */
4910$ac_includes_default
4911int
4912main ()
4913{
b61ff9c8 4914static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
bf3b7cd3
JD
4915test_array [0] = 0
4916
4917 ;
4918 return 0;
4919}
4920_ACEOF
4921rm -f conftest.$ac_objext
b61ff9c8
BS
4922if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4923 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4924 ac_status=$?
4925 grep -v '^ *+' conftest.er1 >conftest.err
4926 rm -f conftest.er1
4927 cat conftest.err >&5
4928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4929 (exit $ac_status); } &&
4930 { ac_try='test -z "$ac_c_werror_flag"
4931 || test ! -s conftest.err'
4932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4933 (eval $ac_try) 2>&5
4934 ac_status=$?
4935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4936 (exit $ac_status); }; } &&
4937 { ac_try='test -s conftest.$ac_objext'
4938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4939 (eval $ac_try) 2>&5
4940 ac_status=$?
4941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4942 (exit $ac_status); }; }; then
bf3b7cd3
JD
4943 ac_hi=-1 ac_mid=-1
4944 while :; do
4945 cat >conftest.$ac_ext <<_ACEOF
4946/* confdefs.h. */
4947_ACEOF
4948cat confdefs.h >>conftest.$ac_ext
4949cat >>conftest.$ac_ext <<_ACEOF
4950/* end confdefs.h. */
4951$ac_includes_default
4952int
4953main ()
4954{
b61ff9c8 4955static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
bf3b7cd3
JD
4956test_array [0] = 0
4957
4958 ;
4959 return 0;
4960}
4961_ACEOF
4962rm -f conftest.$ac_objext
b61ff9c8
BS
4963if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4964 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
4965 ac_status=$?
4966 grep -v '^ *+' conftest.er1 >conftest.err
4967 rm -f conftest.er1
4968 cat conftest.err >&5
4969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
4970 (exit $ac_status); } &&
4971 { ac_try='test -z "$ac_c_werror_flag"
4972 || test ! -s conftest.err'
4973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4974 (eval $ac_try) 2>&5
4975 ac_status=$?
4976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977 (exit $ac_status); }; } &&
4978 { ac_try='test -s conftest.$ac_objext'
4979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4980 (eval $ac_try) 2>&5
4981 ac_status=$?
4982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4983 (exit $ac_status); }; }; then
bf3b7cd3
JD
4984 ac_lo=$ac_mid; break
4985else
4986 echo "$as_me: failed program was:" >&5
4987sed 's/^/| /' conftest.$ac_ext >&5
4988
b61ff9c8
BS
4989ac_hi=`expr '(' $ac_mid ')' - 1`
4990 if test $ac_mid -le $ac_hi; then
4991 ac_lo= ac_hi=
4992 break
4993 fi
4994 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4995fi
b61ff9c8 4996rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4997 done
4998else
4999 echo "$as_me: failed program was:" >&5
5000sed 's/^/| /' conftest.$ac_ext >&5
5001
b61ff9c8 5002ac_lo= ac_hi=
bf3b7cd3 5003fi
b61ff9c8 5004rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5005fi
b61ff9c8 5006rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5007# Binary search between lo and hi bounds.
5008while test "x$ac_lo" != "x$ac_hi"; do
5009 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5010 cat >conftest.$ac_ext <<_ACEOF
5011/* confdefs.h. */
5012_ACEOF
5013cat confdefs.h >>conftest.$ac_ext
5014cat >>conftest.$ac_ext <<_ACEOF
5015/* end confdefs.h. */
5016$ac_includes_default
5017int
5018main ()
5019{
b61ff9c8 5020static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
bf3b7cd3
JD
5021test_array [0] = 0
5022
5023 ;
5024 return 0;
5025}
5026_ACEOF
5027rm -f conftest.$ac_objext
b61ff9c8
BS
5028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5029 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5030 ac_status=$?
5031 grep -v '^ *+' conftest.er1 >conftest.err
5032 rm -f conftest.er1
5033 cat conftest.err >&5
5034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5035 (exit $ac_status); } &&
5036 { ac_try='test -z "$ac_c_werror_flag"
5037 || test ! -s conftest.err'
5038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5039 (eval $ac_try) 2>&5
5040 ac_status=$?
5041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5042 (exit $ac_status); }; } &&
5043 { ac_try='test -s conftest.$ac_objext'
5044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5045 (eval $ac_try) 2>&5
5046 ac_status=$?
5047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5048 (exit $ac_status); }; }; then
bf3b7cd3
JD
5049 ac_hi=$ac_mid
5050else
5051 echo "$as_me: failed program was:" >&5
5052sed 's/^/| /' conftest.$ac_ext >&5
5053
b61ff9c8 5054ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5055fi
b61ff9c8 5056rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5057done
5058case $ac_lo in
5059?*) ac_cv_sizeof_long=$ac_lo;;
b61ff9c8 5060'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 5061See \`config.log' for more details." >&5
b61ff9c8 5062echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 5063See \`config.log' for more details." >&2;}
b61ff9c8 5064 { (exit 1); exit 1; }; } ;;
bf3b7cd3 5065esac
b61ff9c8
BS
5066else
5067 if test "$cross_compiling" = yes; then
5068 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5069See \`config.log' for more details." >&5
5070echo "$as_me: error: cannot run test program while cross compiling
5071See \`config.log' for more details." >&2;}
5072 { (exit 1); exit 1; }; }
bf3b7cd3
JD
5073else
5074 cat >conftest.$ac_ext <<_ACEOF
5075/* confdefs.h. */
5076_ACEOF
5077cat confdefs.h >>conftest.$ac_ext
5078cat >>conftest.$ac_ext <<_ACEOF
5079/* end confdefs.h. */
5080$ac_includes_default
b61ff9c8
BS
5081long longval () { return (long) (sizeof (long)); }
5082unsigned long ulongval () { return (long) (sizeof (long)); }
bf3b7cd3
JD
5083#include <stdio.h>
5084#include <stdlib.h>
5085int
5086main ()
5087{
5088
5089 FILE *f = fopen ("conftest.val", "w");
5090 if (! f)
b61ff9c8
BS
5091 exit (1);
5092 if (((long) (sizeof (long))) < 0)
bf3b7cd3 5093 {
b61ff9c8
BS
5094 long i = longval ();
5095 if (i != ((long) (sizeof (long))))
5096 exit (1);
bf3b7cd3
JD
5097 fprintf (f, "%ld\n", i);
5098 }
5099 else
5100 {
b61ff9c8
BS
5101 unsigned long i = ulongval ();
5102 if (i != ((long) (sizeof (long))))
5103 exit (1);
bf3b7cd3
JD
5104 fprintf (f, "%lu\n", i);
5105 }
b61ff9c8 5106 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5107
5108 ;
5109 return 0;
5110}
5111_ACEOF
5112rm -f conftest$ac_exeext
b61ff9c8
BS
5113if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5114 (eval $ac_link) 2>&5
bf3b7cd3
JD
5115 ac_status=$?
5116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5117 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5119 (eval $ac_try) 2>&5
bf3b7cd3
JD
5120 ac_status=$?
5121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5122 (exit $ac_status); }; }; then
5123 ac_cv_sizeof_long=`cat conftest.val`
5124else
5125 echo "$as_me: program exited with status $ac_status" >&5
5126echo "$as_me: failed program was:" >&5
5127sed 's/^/| /' conftest.$ac_ext >&5
5128
5129( exit $ac_status )
b61ff9c8 5130{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
bf3b7cd3 5131See \`config.log' for more details." >&5
b61ff9c8 5132echo "$as_me: error: cannot compute sizeof (long), 77
bf3b7cd3 5133See \`config.log' for more details." >&2;}
b61ff9c8
BS
5134 { (exit 1); exit 1; }; }
5135fi
5136rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5137fi
5138fi
5139rm -f conftest.val
b61ff9c8
BS
5140else
5141 ac_cv_sizeof_long=0
bf3b7cd3 5142fi
b61ff9c8
BS
5143fi
5144echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5145echo "${ECHO_T}$ac_cv_sizeof_long" >&6
bf3b7cd3
JD
5146cat >>confdefs.h <<_ACEOF
5147#define SIZEOF_LONG $ac_cv_sizeof_long
5148_ACEOF
5149
5150
b61ff9c8
BS
5151echo "$as_me:$LINENO: checking for long long" >&5
5152echo $ECHO_N "checking for long long... $ECHO_C" >&6
5ec1c5e6
KC
5153if test "${ac_cv_type_long_long+set}" = set; then
5154 echo $ECHO_N "(cached) $ECHO_C" >&6
5155else
5156 cat >conftest.$ac_ext <<_ACEOF
5157/* confdefs.h. */
5158_ACEOF
5159cat confdefs.h >>conftest.$ac_ext
5160cat >>conftest.$ac_ext <<_ACEOF
5161/* end confdefs.h. */
5162$ac_includes_default
5163int
5164main ()
5165{
b61ff9c8 5166if ((long long *) 0)
5ec1c5e6 5167 return 0;
b61ff9c8 5168if (sizeof (long long))
5ec1c5e6
KC
5169 return 0;
5170 ;
5171 return 0;
5172}
5173_ACEOF
5174rm -f conftest.$ac_objext
b61ff9c8
BS
5175if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5176 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
5177 ac_status=$?
5178 grep -v '^ *+' conftest.er1 >conftest.err
5179 rm -f conftest.er1
5180 cat conftest.err >&5
5181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5182 (exit $ac_status); } &&
5183 { ac_try='test -z "$ac_c_werror_flag"
5184 || test ! -s conftest.err'
5185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5186 (eval $ac_try) 2>&5
5187 ac_status=$?
5188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5189 (exit $ac_status); }; } &&
5190 { ac_try='test -s conftest.$ac_objext'
5191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5192 (eval $ac_try) 2>&5
5193 ac_status=$?
5194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5195 (exit $ac_status); }; }; then
5ec1c5e6
KC
5196 ac_cv_type_long_long=yes
5197else
5198 echo "$as_me: failed program was:" >&5
5199sed 's/^/| /' conftest.$ac_ext >&5
5200
b61ff9c8 5201ac_cv_type_long_long=no
5ec1c5e6 5202fi
b61ff9c8 5203rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 5204fi
b61ff9c8
BS
5205echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5206echo "${ECHO_T}$ac_cv_type_long_long" >&6
5ec1c5e6
KC
5207if test $ac_cv_type_long_long = yes; then
5208
5209cat >>confdefs.h <<_ACEOF
5210#define HAVE_LONG_LONG 1
5211_ACEOF
5212
b61ff9c8
BS
5213echo "$as_me:$LINENO: checking for long long" >&5
5214echo $ECHO_N "checking for long long... $ECHO_C" >&6
bf3b7cd3
JD
5215if test "${ac_cv_type_long_long+set}" = set; then
5216 echo $ECHO_N "(cached) $ECHO_C" >&6
5217else
5218 cat >conftest.$ac_ext <<_ACEOF
5219/* confdefs.h. */
5220_ACEOF
5221cat confdefs.h >>conftest.$ac_ext
5222cat >>conftest.$ac_ext <<_ACEOF
5223/* end confdefs.h. */
5224$ac_includes_default
5225int
5226main ()
5227{
b61ff9c8 5228if ((long long *) 0)
bf3b7cd3 5229 return 0;
b61ff9c8 5230if (sizeof (long long))
bf3b7cd3
JD
5231 return 0;
5232 ;
5233 return 0;
5234}
5235_ACEOF
5236rm -f conftest.$ac_objext
b61ff9c8
BS
5237if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5238 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5239 ac_status=$?
5240 grep -v '^ *+' conftest.er1 >conftest.err
5241 rm -f conftest.er1
5242 cat conftest.err >&5
5243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5244 (exit $ac_status); } &&
5245 { ac_try='test -z "$ac_c_werror_flag"
5246 || test ! -s conftest.err'
5247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5248 (eval $ac_try) 2>&5
5249 ac_status=$?
5250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5251 (exit $ac_status); }; } &&
5252 { ac_try='test -s conftest.$ac_objext'
5253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5254 (eval $ac_try) 2>&5
5255 ac_status=$?
5256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5257 (exit $ac_status); }; }; then
5258 ac_cv_type_long_long=yes
5259else
bf3b7cd3
JD
5260 echo "$as_me: failed program was:" >&5
5261sed 's/^/| /' conftest.$ac_ext >&5
5262
b61ff9c8 5263ac_cv_type_long_long=no
bf3b7cd3 5264fi
b61ff9c8 5265rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5266fi
b61ff9c8
BS
5267echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5268echo "${ECHO_T}$ac_cv_type_long_long" >&6
bf3b7cd3 5269
b61ff9c8
BS
5270echo "$as_me:$LINENO: checking size of long long" >&5
5271echo $ECHO_N "checking size of long long... $ECHO_C" >&6
bf3b7cd3
JD
5272if test "${ac_cv_sizeof_long_long+set}" = set; then
5273 echo $ECHO_N "(cached) $ECHO_C" >&6
5274else
b61ff9c8
BS
5275 if test "$ac_cv_type_long_long" = yes; then
5276 # The cast to unsigned long works around a bug in the HP C Compiler
5277 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5278 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5279 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5280 if test "$cross_compiling" = yes; then
5281 # Depending upon the size, compute the lo and hi bounds.
5282cat >conftest.$ac_ext <<_ACEOF
5283/* confdefs.h. */
5284_ACEOF
5285cat confdefs.h >>conftest.$ac_ext
5286cat >>conftest.$ac_ext <<_ACEOF
5287/* end confdefs.h. */
5288$ac_includes_default
5289int
5290main ()
5291{
b61ff9c8 5292static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
bf3b7cd3
JD
5293test_array [0] = 0
5294
5295 ;
5296 return 0;
5297}
5298_ACEOF
5299rm -f conftest.$ac_objext
b61ff9c8
BS
5300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5301 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5302 ac_status=$?
5303 grep -v '^ *+' conftest.er1 >conftest.err
5304 rm -f conftest.er1
5305 cat conftest.err >&5
5306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5307 (exit $ac_status); } &&
5308 { ac_try='test -z "$ac_c_werror_flag"
5309 || test ! -s conftest.err'
5310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5311 (eval $ac_try) 2>&5
5312 ac_status=$?
5313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5314 (exit $ac_status); }; } &&
5315 { ac_try='test -s conftest.$ac_objext'
5316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5317 (eval $ac_try) 2>&5
5318 ac_status=$?
5319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5320 (exit $ac_status); }; }; then
bf3b7cd3
JD
5321 ac_lo=0 ac_mid=0
5322 while :; do
5323 cat >conftest.$ac_ext <<_ACEOF
5324/* confdefs.h. */
5325_ACEOF
5326cat confdefs.h >>conftest.$ac_ext
5327cat >>conftest.$ac_ext <<_ACEOF
5328/* end confdefs.h. */
5329$ac_includes_default
5330int
5331main ()
5332{
b61ff9c8 5333static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
5334test_array [0] = 0
5335
5336 ;
5337 return 0;
5338}
5339_ACEOF
5340rm -f conftest.$ac_objext
b61ff9c8
BS
5341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5342 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5343 ac_status=$?
5344 grep -v '^ *+' conftest.er1 >conftest.err
5345 rm -f conftest.er1
5346 cat conftest.err >&5
5347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5348 (exit $ac_status); } &&
5349 { ac_try='test -z "$ac_c_werror_flag"
5350 || test ! -s conftest.err'
5351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5352 (eval $ac_try) 2>&5
5353 ac_status=$?
5354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5355 (exit $ac_status); }; } &&
5356 { ac_try='test -s conftest.$ac_objext'
5357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5358 (eval $ac_try) 2>&5
5359 ac_status=$?
5360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5361 (exit $ac_status); }; }; then
8b1f719a 5362 ac_hi=$ac_mid; break
bf3b7cd3
JD
5363else
5364 echo "$as_me: failed program was:" >&5
5365sed 's/^/| /' conftest.$ac_ext >&5
5366
b61ff9c8
BS
5367ac_lo=`expr $ac_mid + 1`
5368 if test $ac_lo -le $ac_mid; then
5369 ac_lo= ac_hi=
5370 break
5371 fi
5372 ac_mid=`expr 2 '*' $ac_mid + 1`
8b1f719a 5373fi
b61ff9c8 5374rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8b1f719a
PB
5375 done
5376else
5377 echo "$as_me: failed program was:" >&5
5378sed 's/^/| /' conftest.$ac_ext >&5
5379
b61ff9c8 5380cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5381/* confdefs.h. */
5382_ACEOF
5383cat confdefs.h >>conftest.$ac_ext
5384cat >>conftest.$ac_ext <<_ACEOF
5385/* end confdefs.h. */
5386$ac_includes_default
5387int
5388main ()
5389{
b61ff9c8 5390static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
bf3b7cd3
JD
5391test_array [0] = 0
5392
5393 ;
5394 return 0;
5395}
5396_ACEOF
5397rm -f conftest.$ac_objext
b61ff9c8
BS
5398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5399 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5400 ac_status=$?
5401 grep -v '^ *+' conftest.er1 >conftest.err
5402 rm -f conftest.er1
5403 cat conftest.err >&5
5404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5405 (exit $ac_status); } &&
5406 { ac_try='test -z "$ac_c_werror_flag"
5407 || test ! -s conftest.err'
5408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5409 (eval $ac_try) 2>&5
5410 ac_status=$?
5411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5412 (exit $ac_status); }; } &&
5413 { ac_try='test -s conftest.$ac_objext'
5414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5415 (eval $ac_try) 2>&5
5416 ac_status=$?
5417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5418 (exit $ac_status); }; }; then
bf3b7cd3
JD
5419 ac_hi=-1 ac_mid=-1
5420 while :; do
5421 cat >conftest.$ac_ext <<_ACEOF
5422/* confdefs.h. */
5423_ACEOF
5424cat confdefs.h >>conftest.$ac_ext
5425cat >>conftest.$ac_ext <<_ACEOF
5426/* end confdefs.h. */
5427$ac_includes_default
5428int
5429main ()
5430{
b61ff9c8 5431static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
bf3b7cd3
JD
5432test_array [0] = 0
5433
5434 ;
5435 return 0;
5436}
5437_ACEOF
5438rm -f conftest.$ac_objext
b61ff9c8
BS
5439if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5440 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5441 ac_status=$?
5442 grep -v '^ *+' conftest.er1 >conftest.err
5443 rm -f conftest.er1
5444 cat conftest.err >&5
5445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5446 (exit $ac_status); } &&
5447 { ac_try='test -z "$ac_c_werror_flag"
5448 || test ! -s conftest.err'
5449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5450 (eval $ac_try) 2>&5
5451 ac_status=$?
5452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5453 (exit $ac_status); }; } &&
5454 { ac_try='test -s conftest.$ac_objext'
5455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5456 (eval $ac_try) 2>&5
5457 ac_status=$?
5458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5459 (exit $ac_status); }; }; then
bf3b7cd3
JD
5460 ac_lo=$ac_mid; break
5461else
5462 echo "$as_me: failed program was:" >&5
5463sed 's/^/| /' conftest.$ac_ext >&5
5464
b61ff9c8
BS
5465ac_hi=`expr '(' $ac_mid ')' - 1`
5466 if test $ac_mid -le $ac_hi; then
5467 ac_lo= ac_hi=
5468 break
5469 fi
5470 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5471fi
b61ff9c8 5472rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5473 done
5474else
5475 echo "$as_me: failed program was:" >&5
5476sed 's/^/| /' conftest.$ac_ext >&5
5477
b61ff9c8 5478ac_lo= ac_hi=
bf3b7cd3 5479fi
b61ff9c8 5480rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5481fi
b61ff9c8 5482rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5483# Binary search between lo and hi bounds.
5484while test "x$ac_lo" != "x$ac_hi"; do
5485 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5486 cat >conftest.$ac_ext <<_ACEOF
5487/* confdefs.h. */
5488_ACEOF
5489cat confdefs.h >>conftest.$ac_ext
5490cat >>conftest.$ac_ext <<_ACEOF
5491/* end confdefs.h. */
5492$ac_includes_default
5493int
5494main ()
5495{
b61ff9c8 5496static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
bf3b7cd3
JD
5497test_array [0] = 0
5498
5499 ;
5500 return 0;
5501}
5502_ACEOF
5503rm -f conftest.$ac_objext
b61ff9c8
BS
5504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5505 (eval $ac_compile) 2>conftest.er1
bf3b7cd3
JD
5506 ac_status=$?
5507 grep -v '^ *+' conftest.er1 >conftest.err
5508 rm -f conftest.er1
5509 cat conftest.err >&5
5510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5511 (exit $ac_status); } &&
5512 { ac_try='test -z "$ac_c_werror_flag"
5513 || test ! -s conftest.err'
5514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5515 (eval $ac_try) 2>&5
5516 ac_status=$?
5517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5518 (exit $ac_status); }; } &&
5519 { ac_try='test -s conftest.$ac_objext'
5520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5521 (eval $ac_try) 2>&5
5522 ac_status=$?
5523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5524 (exit $ac_status); }; }; then
bf3b7cd3
JD
5525 ac_hi=$ac_mid
5526else
5527 echo "$as_me: failed program was:" >&5
5528sed 's/^/| /' conftest.$ac_ext >&5
5529
b61ff9c8 5530ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5531fi
b61ff9c8 5532rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5533done
5534case $ac_lo in
5535?*) ac_cv_sizeof_long_long=$ac_lo;;
b61ff9c8 5536'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 5537See \`config.log' for more details." >&5
b61ff9c8 5538echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 5539See \`config.log' for more details." >&2;}
b61ff9c8 5540 { (exit 1); exit 1; }; } ;;
bf3b7cd3 5541esac
b61ff9c8
BS
5542else
5543 if test "$cross_compiling" = yes; then
5544 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5545See \`config.log' for more details." >&5
5546echo "$as_me: error: cannot run test program while cross compiling
5547See \`config.log' for more details." >&2;}
5548 { (exit 1); exit 1; }; }
bf3b7cd3
JD
5549else
5550 cat >conftest.$ac_ext <<_ACEOF
5551/* confdefs.h. */
5552_ACEOF
5553cat confdefs.h >>conftest.$ac_ext
5554cat >>conftest.$ac_ext <<_ACEOF
5555/* end confdefs.h. */
5556$ac_includes_default
b61ff9c8
BS
5557long longval () { return (long) (sizeof (long long)); }
5558unsigned long ulongval () { return (long) (sizeof (long long)); }
bf3b7cd3
JD
5559#include <stdio.h>
5560#include <stdlib.h>
5561int
5562main ()
5563{
5564
5565 FILE *f = fopen ("conftest.val", "w");
5566 if (! f)
b61ff9c8
BS
5567 exit (1);
5568 if (((long) (sizeof (long long))) < 0)
bf3b7cd3 5569 {
b61ff9c8
BS
5570 long i = longval ();
5571 if (i != ((long) (sizeof (long long))))
5572 exit (1);
bf3b7cd3
JD
5573 fprintf (f, "%ld\n", i);
5574 }
5575 else
5576 {
b61ff9c8
BS
5577 unsigned long i = ulongval ();
5578 if (i != ((long) (sizeof (long long))))
5579 exit (1);
bf3b7cd3
JD
5580 fprintf (f, "%lu\n", i);
5581 }
b61ff9c8 5582 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
5583
5584 ;
5585 return 0;
5586}
5587_ACEOF
5588rm -f conftest$ac_exeext
b61ff9c8
BS
5589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5590 (eval $ac_link) 2>&5
bf3b7cd3
JD
5591 ac_status=$?
5592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5593 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
5594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5595 (eval $ac_try) 2>&5
bf3b7cd3
JD
5596 ac_status=$?
5597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5598 (exit $ac_status); }; }; then
5599 ac_cv_sizeof_long_long=`cat conftest.val`
5600else
5601 echo "$as_me: program exited with status $ac_status" >&5
5602echo "$as_me: failed program was:" >&5
5603sed 's/^/| /' conftest.$ac_ext >&5
5604
5605( exit $ac_status )
b61ff9c8 5606{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
bf3b7cd3 5607See \`config.log' for more details." >&5
b61ff9c8 5608echo "$as_me: error: cannot compute sizeof (long long), 77
bf3b7cd3 5609See \`config.log' for more details." >&2;}
b61ff9c8
BS
5610 { (exit 1); exit 1; }; }
5611fi
5612rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5613fi
5614fi
5615rm -f conftest.val
b61ff9c8
BS
5616else
5617 ac_cv_sizeof_long_long=0
2f41c1d6 5618fi
b61ff9c8
BS
5619fi
5620echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5621echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
bf3b7cd3
JD
5622cat >>confdefs.h <<_ACEOF
5623#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5624_ACEOF
5625
5626
5627fi
5ec1c5e6 5628
b61ff9c8
BS
5629echo "$as_me:$LINENO: checking for __int64" >&5
5630echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5ec1c5e6
KC
5631if test "${ac_cv_type___int64+set}" = set; then
5632 echo $ECHO_N "(cached) $ECHO_C" >&6
5633else
5634 cat >conftest.$ac_ext <<_ACEOF
5635/* confdefs.h. */
5636_ACEOF
5637cat confdefs.h >>conftest.$ac_ext
5638cat >>conftest.$ac_ext <<_ACEOF
5639/* end confdefs.h. */
5640$ac_includes_default
5641int
5642main ()
5643{
b61ff9c8 5644if ((__int64 *) 0)
5ec1c5e6 5645 return 0;
b61ff9c8 5646if (sizeof (__int64))
5ec1c5e6
KC
5647 return 0;
5648 ;
5649 return 0;
5650}
5651_ACEOF
5652rm -f conftest.$ac_objext
b61ff9c8
BS
5653if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5654 (eval $ac_compile) 2>conftest.er1
5ec1c5e6
KC
5655 ac_status=$?
5656 grep -v '^ *+' conftest.er1 >conftest.err
5657 rm -f conftest.er1
5658 cat conftest.err >&5
5659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5660 (exit $ac_status); } &&
5661 { ac_try='test -z "$ac_c_werror_flag"
5662 || test ! -s conftest.err'
5663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5664 (eval $ac_try) 2>&5
5665 ac_status=$?
5666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5667 (exit $ac_status); }; } &&
5668 { ac_try='test -s conftest.$ac_objext'
5669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5670 (eval $ac_try) 2>&5
5671 ac_status=$?
5672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5673 (exit $ac_status); }; }; then
5ec1c5e6
KC
5674 ac_cv_type___int64=yes
5675else
5676 echo "$as_me: failed program was:" >&5
5677sed 's/^/| /' conftest.$ac_ext >&5
5678
b61ff9c8 5679ac_cv_type___int64=no
5ec1c5e6 5680fi
b61ff9c8 5681rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 5682fi
b61ff9c8
BS
5683echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5684echo "${ECHO_T}$ac_cv_type___int64" >&6
5ec1c5e6
KC
5685if test $ac_cv_type___int64 = yes; then
5686
5687cat >>confdefs.h <<_ACEOF
5688#define HAVE___INT64 1
5689_ACEOF
5690
b61ff9c8
BS
5691echo "$as_me:$LINENO: checking for __int64" >&5
5692echo $ECHO_N "checking for __int64... $ECHO_C" >&6
bf3b7cd3
JD
5693if test "${ac_cv_type___int64+set}" = set; then
5694 echo $ECHO_N "(cached) $ECHO_C" >&6
5695else
ba479fd2 5696 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5697/* confdefs.h. */
5698_ACEOF
5699cat confdefs.h >>conftest.$ac_ext
5700cat >>conftest.$ac_ext <<_ACEOF
5701/* end confdefs.h. */
bf3b7cd3 5702$ac_includes_default
ba479fd2
NN
5703int
5704main ()
5705{
b61ff9c8 5706if ((__int64 *) 0)
bf3b7cd3 5707 return 0;
b61ff9c8 5708if (sizeof (__int64))
bf3b7cd3 5709 return 0;
ba479fd2
NN
5710 ;
5711 return 0;
5712}
5713_ACEOF
5714rm -f conftest.$ac_objext
b61ff9c8
BS
5715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5716 (eval $ac_compile) 2>conftest.er1
ba479fd2 5717 ac_status=$?
86da66b5
HPN
5718 grep -v '^ *+' conftest.er1 >conftest.err
5719 rm -f conftest.er1
5720 cat conftest.err >&5
ba479fd2 5721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5722 (exit $ac_status); } &&
5723 { ac_try='test -z "$ac_c_werror_flag"
5724 || test ! -s conftest.err'
5725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5726 (eval $ac_try) 2>&5
5727 ac_status=$?
5728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5729 (exit $ac_status); }; } &&
5730 { ac_try='test -s conftest.$ac_objext'
5731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5732 (eval $ac_try) 2>&5
5733 ac_status=$?
5734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5735 (exit $ac_status); }; }; then
bf3b7cd3 5736 ac_cv_type___int64=yes
75b6f3fd 5737else
ba479fd2
NN
5738 echo "$as_me: failed program was:" >&5
5739sed 's/^/| /' conftest.$ac_ext >&5
5740
b61ff9c8 5741ac_cv_type___int64=no
75b6f3fd 5742fi
b61ff9c8 5743rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5744fi
b61ff9c8
BS
5745echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5746echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 5747
b61ff9c8
BS
5748echo "$as_me:$LINENO: checking size of __int64" >&5
5749echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
bf3b7cd3 5750if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 5751 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 5752else
b61ff9c8
BS
5753 if test "$ac_cv_type___int64" = yes; then
5754 # The cast to unsigned long works around a bug in the HP C Compiler
5755 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5756 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5757 # This bug is HP SR number 8606223364.
bf3b7cd3
JD
5758 if test "$cross_compiling" = yes; then
5759 # Depending upon the size, compute the lo and hi bounds.
5760cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5761/* confdefs.h. */
5762_ACEOF
5763cat confdefs.h >>conftest.$ac_ext
5764cat >>conftest.$ac_ext <<_ACEOF
5765/* end confdefs.h. */
bf3b7cd3 5766$ac_includes_default
ba479fd2
NN
5767int
5768main ()
5769{
b61ff9c8 5770static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
bf3b7cd3
JD
5771test_array [0] = 0
5772
ba479fd2
NN
5773 ;
5774 return 0;
5775}
5776_ACEOF
5777rm -f conftest.$ac_objext
b61ff9c8
BS
5778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5779 (eval $ac_compile) 2>conftest.er1
ba479fd2 5780 ac_status=$?
86da66b5
HPN
5781 grep -v '^ *+' conftest.er1 >conftest.err
5782 rm -f conftest.er1
5783 cat conftest.err >&5
ba479fd2 5784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5785 (exit $ac_status); } &&
5786 { ac_try='test -z "$ac_c_werror_flag"
5787 || test ! -s conftest.err'
5788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5789 (eval $ac_try) 2>&5
5790 ac_status=$?
5791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5792 (exit $ac_status); }; } &&
5793 { ac_try='test -s conftest.$ac_objext'
5794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5795 (eval $ac_try) 2>&5
5796 ac_status=$?
5797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5798 (exit $ac_status); }; }; then
bf3b7cd3
JD
5799 ac_lo=0 ac_mid=0
5800 while :; do
5801 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5802/* confdefs.h. */
5803_ACEOF
5804cat confdefs.h >>conftest.$ac_ext
5805cat >>conftest.$ac_ext <<_ACEOF
5806/* end confdefs.h. */
bf3b7cd3 5807$ac_includes_default
ba479fd2
NN
5808int
5809main ()
5810{
b61ff9c8 5811static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
bf3b7cd3
JD
5812test_array [0] = 0
5813
ba479fd2
NN
5814 ;
5815 return 0;
5816}
5817_ACEOF
5818rm -f conftest.$ac_objext
b61ff9c8
BS
5819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5820 (eval $ac_compile) 2>conftest.er1
ba479fd2 5821 ac_status=$?
86da66b5
HPN
5822 grep -v '^ *+' conftest.er1 >conftest.err
5823 rm -f conftest.er1
5824 cat conftest.err >&5
ba479fd2 5825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5826 (exit $ac_status); } &&
5827 { ac_try='test -z "$ac_c_werror_flag"
5828 || test ! -s conftest.err'
5829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5830 (eval $ac_try) 2>&5
5831 ac_status=$?
5832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5833 (exit $ac_status); }; } &&
5834 { ac_try='test -s conftest.$ac_objext'
5835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5836 (eval $ac_try) 2>&5
5837 ac_status=$?
5838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5839 (exit $ac_status); }; }; then
bf3b7cd3 5840 ac_hi=$ac_mid; break
75e93faa 5841else
ba479fd2
NN
5842 echo "$as_me: failed program was:" >&5
5843sed 's/^/| /' conftest.$ac_ext >&5
5844
b61ff9c8
BS
5845ac_lo=`expr $ac_mid + 1`
5846 if test $ac_lo -le $ac_mid; then
5847 ac_lo= ac_hi=
5848 break
5849 fi
5850 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 5851fi
b61ff9c8 5852rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5853 done
75e93faa 5854else
bf3b7cd3
JD
5855 echo "$as_me: failed program was:" >&5
5856sed 's/^/| /' conftest.$ac_ext >&5
5857
b61ff9c8 5858cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5859/* confdefs.h. */
5860_ACEOF
5861cat confdefs.h >>conftest.$ac_ext
5862cat >>conftest.$ac_ext <<_ACEOF
5863/* end confdefs.h. */
bf3b7cd3 5864$ac_includes_default
ba479fd2
NN
5865int
5866main ()
5867{
b61ff9c8 5868static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
bf3b7cd3
JD
5869test_array [0] = 0
5870
ba479fd2
NN
5871 ;
5872 return 0;
5873}
5874_ACEOF
5875rm -f conftest.$ac_objext
b61ff9c8
BS
5876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5877 (eval $ac_compile) 2>conftest.er1
ba479fd2 5878 ac_status=$?
86da66b5
HPN
5879 grep -v '^ *+' conftest.er1 >conftest.err
5880 rm -f conftest.er1
5881 cat conftest.err >&5
ba479fd2 5882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5883 (exit $ac_status); } &&
5884 { ac_try='test -z "$ac_c_werror_flag"
5885 || test ! -s conftest.err'
5886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5887 (eval $ac_try) 2>&5
5888 ac_status=$?
5889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5890 (exit $ac_status); }; } &&
5891 { ac_try='test -s conftest.$ac_objext'
5892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5893 (eval $ac_try) 2>&5
5894 ac_status=$?
5895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5896 (exit $ac_status); }; }; then
bf3b7cd3
JD
5897 ac_hi=-1 ac_mid=-1
5898 while :; do
5899 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5900/* confdefs.h. */
5901_ACEOF
5902cat confdefs.h >>conftest.$ac_ext
5903cat >>conftest.$ac_ext <<_ACEOF
5904/* end confdefs.h. */
bf3b7cd3 5905$ac_includes_default
ba479fd2
NN
5906int
5907main ()
5908{
b61ff9c8 5909static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
bf3b7cd3
JD
5910test_array [0] = 0
5911
ba479fd2
NN
5912 ;
5913 return 0;
5914}
5915_ACEOF
5916rm -f conftest.$ac_objext
b61ff9c8
BS
5917if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5918 (eval $ac_compile) 2>conftest.er1
ba479fd2 5919 ac_status=$?
86da66b5
HPN
5920 grep -v '^ *+' conftest.er1 >conftest.err
5921 rm -f conftest.er1
5922 cat conftest.err >&5
ba479fd2 5923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5924 (exit $ac_status); } &&
5925 { ac_try='test -z "$ac_c_werror_flag"
5926 || test ! -s conftest.err'
5927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5928 (eval $ac_try) 2>&5
5929 ac_status=$?
5930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5931 (exit $ac_status); }; } &&
5932 { ac_try='test -s conftest.$ac_objext'
5933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5934 (eval $ac_try) 2>&5
5935 ac_status=$?
5936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5937 (exit $ac_status); }; }; then
bf3b7cd3 5938 ac_lo=$ac_mid; break
04cabffc 5939else
ba479fd2
NN
5940 echo "$as_me: failed program was:" >&5
5941sed 's/^/| /' conftest.$ac_ext >&5
5942
b61ff9c8
BS
5943ac_hi=`expr '(' $ac_mid ')' - 1`
5944 if test $ac_mid -le $ac_hi; then
5945 ac_lo= ac_hi=
5946 break
5947 fi
5948 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 5949fi
b61ff9c8 5950rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5951 done
5952else
5953 echo "$as_me: failed program was:" >&5
5954sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 5955
b61ff9c8 5956ac_lo= ac_hi=
414d23ae 5957fi
b61ff9c8 5958rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5959fi
b61ff9c8 5960rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5961# Binary search between lo and hi bounds.
5962while test "x$ac_lo" != "x$ac_hi"; do
5963 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 5964 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5965/* confdefs.h. */
5966_ACEOF
5967cat confdefs.h >>conftest.$ac_ext
5968cat >>conftest.$ac_ext <<_ACEOF
5969/* end confdefs.h. */
bf3b7cd3 5970$ac_includes_default
ba479fd2
NN
5971int
5972main ()
5973{
b61ff9c8 5974static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
bf3b7cd3
JD
5975test_array [0] = 0
5976
ba479fd2
NN
5977 ;
5978 return 0;
5979}
5980_ACEOF
5981rm -f conftest.$ac_objext
b61ff9c8
BS
5982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5983 (eval $ac_compile) 2>conftest.er1
ba479fd2 5984 ac_status=$?
86da66b5
HPN
5985 grep -v '^ *+' conftest.er1 >conftest.err
5986 rm -f conftest.er1
5987 cat conftest.err >&5
ba479fd2 5988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
5989 (exit $ac_status); } &&
5990 { ac_try='test -z "$ac_c_werror_flag"
5991 || test ! -s conftest.err'
5992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5993 (eval $ac_try) 2>&5
5994 ac_status=$?
5995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5996 (exit $ac_status); }; } &&
5997 { ac_try='test -s conftest.$ac_objext'
5998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5999 (eval $ac_try) 2>&5
6000 ac_status=$?
6001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6002 (exit $ac_status); }; }; then
bf3b7cd3 6003 ac_hi=$ac_mid
75e93faa 6004else
ba479fd2
NN
6005 echo "$as_me: failed program was:" >&5
6006sed 's/^/| /' conftest.$ac_ext >&5
6007
b61ff9c8 6008ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 6009fi
b61ff9c8 6010rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6011done
bf3b7cd3
JD
6012case $ac_lo in
6013?*) ac_cv_sizeof___int64=$ac_lo;;
b61ff9c8 6014'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6015See \`config.log' for more details." >&5
b61ff9c8 6016echo "$as_me: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6017See \`config.log' for more details." >&2;}
b61ff9c8 6018 { (exit 1); exit 1; }; } ;;
bf3b7cd3 6019esac
b61ff9c8
BS
6020else
6021 if test "$cross_compiling" = yes; then
6022 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6023See \`config.log' for more details." >&5
6024echo "$as_me: error: cannot run test program while cross compiling
6025See \`config.log' for more details." >&2;}
6026 { (exit 1); exit 1; }; }
bf3b7cd3
JD
6027else
6028 cat >conftest.$ac_ext <<_ACEOF
6029/* confdefs.h. */
6030_ACEOF
6031cat confdefs.h >>conftest.$ac_ext
6032cat >>conftest.$ac_ext <<_ACEOF
6033/* end confdefs.h. */
6034$ac_includes_default
b61ff9c8
BS
6035long longval () { return (long) (sizeof (__int64)); }
6036unsigned long ulongval () { return (long) (sizeof (__int64)); }
bf3b7cd3
JD
6037#include <stdio.h>
6038#include <stdlib.h>
6039int
6040main ()
6041{
414d23ae 6042
bf3b7cd3
JD
6043 FILE *f = fopen ("conftest.val", "w");
6044 if (! f)
b61ff9c8
BS
6045 exit (1);
6046 if (((long) (sizeof (__int64))) < 0)
bf3b7cd3 6047 {
b61ff9c8
BS
6048 long i = longval ();
6049 if (i != ((long) (sizeof (__int64))))
6050 exit (1);
bf3b7cd3
JD
6051 fprintf (f, "%ld\n", i);
6052 }
6053 else
6054 {
b61ff9c8
BS
6055 unsigned long i = ulongval ();
6056 if (i != ((long) (sizeof (__int64))))
6057 exit (1);
bf3b7cd3
JD
6058 fprintf (f, "%lu\n", i);
6059 }
b61ff9c8 6060 exit (ferror (f) || fclose (f) != 0);
bf3b7cd3
JD
6061
6062 ;
6063 return 0;
6064}
6065_ACEOF
6066rm -f conftest$ac_exeext
b61ff9c8
BS
6067if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6068 (eval $ac_link) 2>&5
bf3b7cd3
JD
6069 ac_status=$?
6070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6071 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
6072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6073 (eval $ac_try) 2>&5
bf3b7cd3
JD
6074 ac_status=$?
6075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6076 (exit $ac_status); }; }; then
6077 ac_cv_sizeof___int64=`cat conftest.val`
6078else
6079 echo "$as_me: program exited with status $ac_status" >&5
6080echo "$as_me: failed program was:" >&5
6081sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6082
bf3b7cd3 6083( exit $ac_status )
b61ff9c8 6084{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6085See \`config.log' for more details." >&5
b61ff9c8 6086echo "$as_me: error: cannot compute sizeof (__int64), 77
bf3b7cd3 6087See \`config.log' for more details." >&2;}
b61ff9c8
BS
6088 { (exit 1); exit 1; }; }
6089fi
6090rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6091fi
6092fi
6093rm -f conftest.val
b61ff9c8
BS
6094else
6095 ac_cv_sizeof___int64=0
bf3b7cd3 6096fi
b61ff9c8
BS
6097fi
6098echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6099echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 6100cat >>confdefs.h <<_ACEOF
414d23ae 6101#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6102_ACEOF
414d23ae 6103
cafe096b 6104
414d23ae
HPN
6105fi
6106
5ec1c5e6 6107
34a86c2b
NN
6108# ---------------------
6109# Warnings and checking
6110# ---------------------
6111
b5472e1d
NN
6112# Check $CC warning features (if it's GCC).
6113# We want to use -pedantic, but we don't want warnings about
6114# * 'long long'
6115# * variadic macros
89a42ac8 6116# * overlong strings
b5472e1d
NN
6117# So, we only use -pedantic if we can disable those warnings.
6118
3bbd5a19
PB
6119loose_warn=
6120save_CFLAGS="$CFLAGS"
6121for option in -W -Wall -Wwrite-strings -Wstrict-prototypes \
6122 -Wmissing-prototypes; do
6123 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
6124
b61ff9c8
BS
6125 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
6126echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
6127if eval "test \"\${$as_acx_Woption+set}\" = set"; then
b5472e1d
NN
6128 echo $ECHO_N "(cached) $ECHO_C" >&6
6129else
3bbd5a19
PB
6130 CFLAGS="$option"
6131 cat >conftest.$ac_ext <<_ACEOF
b5472e1d
NN
6132/* confdefs.h. */
6133_ACEOF
6134cat confdefs.h >>conftest.$ac_ext
6135cat >>conftest.$ac_ext <<_ACEOF
6136/* end confdefs.h. */
6137
3bbd5a19
PB
6138int
6139main ()
6140{
6141
6142 ;
6143 return 0;
6144}
b5472e1d
NN
6145_ACEOF
6146rm -f conftest.$ac_objext
b61ff9c8
BS
6147if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6148 (eval $ac_compile) 2>conftest.er1
b5472e1d
NN
6149 ac_status=$?
6150 grep -v '^ *+' conftest.er1 >conftest.err
6151 rm -f conftest.er1
6152 cat conftest.err >&5
6153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6154 (exit $ac_status); } &&
6155 { ac_try='test -z "$ac_c_werror_flag"
6156 || test ! -s conftest.err'
6157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6158 (eval $ac_try) 2>&5
6159 ac_status=$?
6160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6161 (exit $ac_status); }; } &&
6162 { ac_try='test -s conftest.$ac_objext'
6163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6164 (eval $ac_try) 2>&5
6165 ac_status=$?
6166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6167 (exit $ac_status); }; }; then
3bbd5a19 6168 eval "$as_acx_Woption=yes"
b5472e1d
NN
6169else
6170 echo "$as_me: failed program was:" >&5
6171sed 's/^/| /' conftest.$ac_ext >&5
6172
b61ff9c8 6173eval "$as_acx_Woption=no"
b5472e1d 6174fi
b61ff9c8 6175rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
6176
6177fi
b61ff9c8
BS
6178echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
6179echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3bbd5a19
PB
6180 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
6181 loose_warn="$loose_warn${loose_warn:+ }$option"
6182fi
6183
6184 done
6185CFLAGS="$save_CFLAGS"
6186
6187cxx_compat_warn=
6188save_CFLAGS="$CFLAGS"
6189for option in -Wc++-compat; do
6190 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
b5472e1d 6191
b61ff9c8
BS
6192 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
6193echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
6194if eval "test \"\${$as_acx_Woption+set}\" = set"; then
b5472e1d
NN
6195 echo $ECHO_N "(cached) $ECHO_C" >&6
6196else
3bbd5a19
PB
6197 CFLAGS="$option"
6198 cat >conftest.$ac_ext <<_ACEOF
b5472e1d
NN
6199/* confdefs.h. */
6200_ACEOF
6201cat confdefs.h >>conftest.$ac_ext
6202cat >>conftest.$ac_ext <<_ACEOF
6203/* end confdefs.h. */
6204
3bbd5a19
PB
6205int
6206main ()
6207{
6208
6209 ;
6210 return 0;
6211}
b5472e1d
NN
6212_ACEOF
6213rm -f conftest.$ac_objext
b61ff9c8
BS
6214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6215 (eval $ac_compile) 2>conftest.er1
b5472e1d
NN
6216 ac_status=$?
6217 grep -v '^ *+' conftest.er1 >conftest.err
6218 rm -f conftest.er1
6219 cat conftest.err >&5
6220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6221 (exit $ac_status); } &&
6222 { ac_try='test -z "$ac_c_werror_flag"
6223 || test ! -s conftest.err'
6224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6225 (eval $ac_try) 2>&5
6226 ac_status=$?
6227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6228 (exit $ac_status); }; } &&
6229 { ac_try='test -s conftest.$ac_objext'
6230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6231 (eval $ac_try) 2>&5
6232 ac_status=$?
6233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6234 (exit $ac_status); }; }; then
3bbd5a19 6235 eval "$as_acx_Woption=yes"
b5472e1d
NN
6236else
6237 echo "$as_me: failed program was:" >&5
6238sed 's/^/| /' conftest.$ac_ext >&5
6239
b61ff9c8 6240eval "$as_acx_Woption=no"
b5472e1d 6241fi
b61ff9c8 6242rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
6243
6244fi
b61ff9c8
BS
6245echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
6246echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3bbd5a19
PB
6247 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
6248 cxx_compat_warn="$cxx_compat_warn${cxx_compat_warn:+ }$option"
6249fi
6250
6251 done
6252CFLAGS="$save_CFLAGS"
b5472e1d 6253
3bbd5a19
PB
6254strict_warn=
6255save_CFLAGS="$CFLAGS"
6256for option in -Wold-style-definition \
6257 -Wmissing-format-attribute; do
6258 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
6259
b61ff9c8
BS
6260 echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
6261echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
6262if eval "test \"\${$as_acx_Woption+set}\" = set"; then
89a42ac8
ZW
6263 echo $ECHO_N "(cached) $ECHO_C" >&6
6264else
3bbd5a19
PB
6265 CFLAGS="$option"
6266 cat >conftest.$ac_ext <<_ACEOF
89a42ac8
ZW
6267/* confdefs.h. */
6268_ACEOF
6269cat confdefs.h >>conftest.$ac_ext
6270cat >>conftest.$ac_ext <<_ACEOF
6271/* end confdefs.h. */
6272
3bbd5a19
PB
6273int
6274main ()
6275{
6276
6277 ;
6278 return 0;
6279}
89a42ac8
ZW
6280_ACEOF
6281rm -f conftest.$ac_objext
b61ff9c8
BS
6282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6283 (eval $ac_compile) 2>conftest.er1
89a42ac8
ZW
6284 ac_status=$?
6285 grep -v '^ *+' conftest.er1 >conftest.err
6286 rm -f conftest.er1
6287 cat conftest.err >&5
6288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6289 (exit $ac_status); } &&
6290 { ac_try='test -z "$ac_c_werror_flag"
6291 || test ! -s conftest.err'
6292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6293 (eval $ac_try) 2>&5
6294 ac_status=$?
6295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6296 (exit $ac_status); }; } &&
6297 { ac_try='test -s conftest.$ac_objext'
6298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6299 (eval $ac_try) 2>&5
6300 ac_status=$?
6301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6302 (exit $ac_status); }; }; then
3bbd5a19 6303 eval "$as_acx_Woption=yes"
89a42ac8
ZW
6304else
6305 echo "$as_me: failed program was:" >&5
6306sed 's/^/| /' conftest.$ac_ext >&5
6307
b61ff9c8 6308eval "$as_acx_Woption=no"
89a42ac8 6309fi
b61ff9c8 6310rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
89a42ac8
ZW
6311
6312fi
b61ff9c8
BS
6313echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
6314echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
3bbd5a19
PB
6315 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
6316 strict_warn="$strict_warn${strict_warn:+ }$option"
34a86c2b
NN
6317fi
6318
3bbd5a19
PB
6319 done
6320CFLAGS="$save_CFLAGS"
6321
6322if test "$GCC" = yes; then
b61ff9c8 6323 echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \
3bbd5a19
PB
6324 -Wno-overlength-strings" >&5
6325echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \
b61ff9c8 6326 -Wno-overlength-strings... $ECHO_C" >&6
3bbd5a19 6327if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings+set}" = set; then
643d3bd2
NN
6328 echo $ECHO_N "(cached) $ECHO_C" >&6
6329else
6330 save_CFLAGS="$CFLAGS"
3bbd5a19
PB
6331CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros \
6332 -Wno-overlength-strings"
6333cat >conftest.$ac_ext <<_ACEOF
643d3bd2
NN
6334/* confdefs.h. */
6335_ACEOF
6336cat confdefs.h >>conftest.$ac_ext
6337cat >>conftest.$ac_ext <<_ACEOF
6338/* end confdefs.h. */
6339
3bbd5a19
PB
6340int
6341main ()
6342{
6343
6344 ;
6345 return 0;
6346}
643d3bd2
NN
6347_ACEOF
6348rm -f conftest.$ac_objext
b61ff9c8
BS
6349if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6350 (eval $ac_compile) 2>conftest.er1
643d3bd2
NN
6351 ac_status=$?
6352 grep -v '^ *+' conftest.er1 >conftest.err
6353 rm -f conftest.er1
6354 cat conftest.err >&5
6355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6356 (exit $ac_status); } &&
6357 { ac_try='test -z "$ac_c_werror_flag"
6358 || test ! -s conftest.err'
6359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6360 (eval $ac_try) 2>&5
6361 ac_status=$?
6362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6363 (exit $ac_status); }; } &&
6364 { ac_try='test -s conftest.$ac_objext'
6365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6366 (eval $ac_try) 2>&5
6367 ac_status=$?
6368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6369 (exit $ac_status); }; }; then
3bbd5a19 6370 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=yes
643d3bd2
NN
6371else
6372 echo "$as_me: failed program was:" >&5
6373sed 's/^/| /' conftest.$ac_ext >&5
6374
b61ff9c8 6375acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=no
643d3bd2 6376fi
b61ff9c8 6377rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3bbd5a19 6378CFLAGS="$save_CFLAGS"
643d3bd2 6379fi
b61ff9c8
BS
6380echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&5
6381echo "${ECHO_T}$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&6
3bbd5a19
PB
6382if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings = yes; then
6383 strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros \
6384 -Wno-overlength-strings"
643d3bd2
NN
6385fi
6386
ac0f3f39 6387
ac0f3f39 6388fi
ac0f3f39 6389
ac0f3f39 6390
b61ff9c8 6391# Check whether --enable-werror-always or --disable-werror-always was given.
09a9c095 6392if test "${enable_werror_always+set}" = set; then
b61ff9c8
BS
6393 enableval="$enable_werror_always"
6394
09a9c095
NN
6395else
6396 enable_werror_always=no
b61ff9c8 6397fi;
3bbd5a19
PB
6398if test $enable_werror_always = yes; then
6399 strict_warn="$strict_warn${strict_warn:+ }-Werror"
373477bb 6400fi
373477bb 6401
373477bb
GDR
6402
6403
6404
3bbd5a19
PB
6405# The above macros do nothing if the compiler is not GCC. However, the
6406# Makefile has more goo to add other flags, so this variabl is used to
6407# enables warnings only for GCC.
414d23ae
HPN
6408warn_cflags=
6409if test "x$GCC" = "xyes"; then
6410 warn_cflags='$(GCC_WARN_CFLAGS)'
6411fi
6412
6413
8b1f719a 6414# Enable expensive internal checks
a1286ef5
ZW
6415is_release=
6416if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6417 is_release=yes
6418fi
a6ccdbab 6419
b61ff9c8 6420# Check whether --enable-checking or --disable-checking was given.
414d23ae 6421if test "${enable_checking+set}" = set; then
b61ff9c8
BS
6422 enableval="$enable_checking"
6423 ac_checking_flags="${enableval}"
e1bbfc5c
NS
6424else
6425
6426# Determine the default checks.
6427if test x$is_release = x ; then
6428 ac_checking_flags=yes
6429else
6430 ac_checking_flags=release
6431fi
b61ff9c8 6432fi;
e1bbfc5c 6433IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
04c3028a 6434for check in release $ac_checking_flags
e1bbfc5c
NS
6435do
6436 case $check in
cdce5c16 6437 # these set all the flags to specific states
0d475361 6438 yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
cdce5c16
NS
6439 ac_fold_checking= ; ac_gc_checking=1 ;
6440 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6441 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7e98624c
RG
6442 ac_tree_checking=1 ; ac_valgrind_checking= ;
6443 ac_types_checking= ;;
3089f8b5 6444 no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
cdce5c16
NS
6445 ac_fold_checking= ; ac_gc_checking= ;
6446 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6447 ac_rtlflag_checking= ; ac_runtime_checking= ;
7e98624c
RG
6448 ac_tree_checking= ; ac_valgrind_checking= ;
6449 ac_types_checking= ;;
3089f8b5 6450 all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
cdce5c16
NS
6451 ac_fold_checking=1 ; ac_gc_checking=1 ;
6452 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
6453 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7e98624c
RG
6454 ac_tree_checking=1 ; ac_valgrind_checking= ;
6455 ac_types_checking=1 ;;
3089f8b5 6456 release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
cdce5c16
NS
6457 ac_fold_checking= ; ac_gc_checking= ;
6458 ac_gc_always_collect= ; ac_rtl_checking= ;
6459 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
7e98624c
RG
6460 ac_tree_checking= ; ac_valgrind_checking= ;
6461 ac_types_checking= ;;
cdce5c16 6462 # these enable particular checks
e1bbfc5c 6463 assert) ac_assert_checking=1 ;;
3089f8b5 6464 df) ac_df_checking=1 ;;
e1bbfc5c
NS
6465 fold) ac_fold_checking=1 ;;
6466 gc) ac_gc_checking=1 ;;
6467 gcac) ac_gc_always_collect=1 ;;
6468 misc) ac_checking=1 ;;
e1bbfc5c 6469 rtl) ac_rtl_checking=1 ;;
cdce5c16 6470 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 6471 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 6472 tree) ac_tree_checking=1 ;;
7e98624c 6473 types) ac_types_checking=1 ;;
cdce5c16 6474 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 6475 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
6476echo "$as_me: error: unknown check category $check" >&2;}
6477 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
6478 esac
6479done
6480IFS="$ac_save_IFS"
06c37c96 6481
ba479fd2
NN
6482nocommon_flag=""
6483if test x$ac_checking != x ; then
6484
6485cat >>confdefs.h <<\_ACEOF
6486#define ENABLE_CHECKING 1
6487_ACEOF
6488
6489 nocommon_flag=-fno-common
6490fi
3bbd5a19 6491
3089f8b5
PB
6492if test x$ac_df_checking != x ; then
6493
6494cat >>confdefs.h <<\_ACEOF
6495#define ENABLE_DF_CHECKING 1
6496_ACEOF
6497
6498fi
06c37c96
NS
6499if test x$ac_assert_checking != x ; then
6500
6501cat >>confdefs.h <<\_ACEOF
6502#define ENABLE_ASSERT_CHECKING 1
6503_ACEOF
6504
b53ef395 6505fi
232b67d9 6506
b53ef395
NS
6507if test x$ac_runtime_checking != x ; then
6508
6509cat >>confdefs.h <<\_ACEOF
6510#define ENABLE_RUNTIME_CHECKING 1
6511_ACEOF
6512
06c37c96 6513fi
ba479fd2
NN
6514if test x$ac_tree_checking != x ; then
6515
6516cat >>confdefs.h <<\_ACEOF
6517#define ENABLE_TREE_CHECKING 1
6518_ACEOF
6519
13f05fd0 6520 TREEBROWSER=tree-browser.o
ba479fd2 6521fi
7e98624c
RG
6522if test x$ac_types_checking != x ; then
6523
6524cat >>confdefs.h <<\_ACEOF
6525#define ENABLE_TYPES_CHECKING 1
6526_ACEOF
6527
6528fi
13f05fd0 6529
ba479fd2
NN
6530if test x$ac_rtl_checking != x ; then
6531
6532cat >>confdefs.h <<\_ACEOF
6533#define ENABLE_RTL_CHECKING 1
6534_ACEOF
6535
6536fi
6537if test x$ac_rtlflag_checking != x ; then
6538
6539cat >>confdefs.h <<\_ACEOF
6540#define ENABLE_RTL_FLAG_CHECKING 1
6541_ACEOF
6542
6543fi
6544if test x$ac_gc_checking != x ; then
6545
6546cat >>confdefs.h <<\_ACEOF
6547#define ENABLE_GC_CHECKING 1
6548_ACEOF
6549
6550fi
6551if test x$ac_gc_always_collect != x ; then
6552
6553cat >>confdefs.h <<\_ACEOF
6554#define ENABLE_GC_ALWAYS_COLLECT 1
6555_ACEOF
6556
6557fi
6558if test x$ac_fold_checking != x ; then
6559
6560cat >>confdefs.h <<\_ACEOF
6561#define ENABLE_FOLD_CHECKING 1
6562_ACEOF
6563
6564fi
6565valgrind_path_defines=
6566valgrind_command=
6567
ba479fd2 6568if test "${ac_cv_header_valgrind_h+set}" = set; then
b61ff9c8
BS
6569 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6570echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
ba479fd2
NN
6571if test "${ac_cv_header_valgrind_h+set}" = set; then
6572 echo $ECHO_N "(cached) $ECHO_C" >&6
6573fi
b61ff9c8
BS
6574echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6575echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
ba479fd2
NN
6576else
6577 # Is the header compilable?
b61ff9c8
BS
6578echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6579echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
ba479fd2 6580cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6581/* confdefs.h. */
6582_ACEOF
6583cat confdefs.h >>conftest.$ac_ext
6584cat >>conftest.$ac_ext <<_ACEOF
6585/* end confdefs.h. */
6586$ac_includes_default
63cf211a 6587#include <valgrind.h>
ba479fd2
NN
6588_ACEOF
6589rm -f conftest.$ac_objext
b61ff9c8
BS
6590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6591 (eval $ac_compile) 2>conftest.er1
ba479fd2 6592 ac_status=$?
86da66b5
HPN
6593 grep -v '^ *+' conftest.er1 >conftest.err
6594 rm -f conftest.er1
6595 cat conftest.err >&5
ba479fd2 6596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6597 (exit $ac_status); } &&
6598 { ac_try='test -z "$ac_c_werror_flag"
6599 || test ! -s conftest.err'
6600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6601 (eval $ac_try) 2>&5
6602 ac_status=$?
6603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6604 (exit $ac_status); }; } &&
6605 { ac_try='test -s conftest.$ac_objext'
6606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6607 (eval $ac_try) 2>&5
6608 ac_status=$?
6609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6610 (exit $ac_status); }; }; then
ba479fd2
NN
6611 ac_header_compiler=yes
6612else
6613 echo "$as_me: failed program was:" >&5
6614sed 's/^/| /' conftest.$ac_ext >&5
6615
b61ff9c8 6616ac_header_compiler=no
ba479fd2 6617fi
b61ff9c8
BS
6618rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6619echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6620echo "${ECHO_T}$ac_header_compiler" >&6
ba479fd2
NN
6621
6622# Is the header present?
b61ff9c8
BS
6623echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6624echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
ba479fd2 6625cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6626/* confdefs.h. */
6627_ACEOF
6628cat confdefs.h >>conftest.$ac_ext
6629cat >>conftest.$ac_ext <<_ACEOF
6630/* end confdefs.h. */
6631#include <valgrind.h>
6632_ACEOF
b61ff9c8
BS
6633if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6634 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
6635 ac_status=$?
6636 grep -v '^ *+' conftest.er1 >conftest.err
6637 rm -f conftest.er1
6638 cat conftest.err >&5
6639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6640 (exit $ac_status); } >/dev/null; then
6641 if test -s conftest.err; then
6642 ac_cpp_err=$ac_c_preproc_warn_flag
6643 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6644 else
6645 ac_cpp_err=
6646 fi
6647else
6648 ac_cpp_err=yes
6649fi
6650if test -z "$ac_cpp_err"; then
ba479fd2
NN
6651 ac_header_preproc=yes
6652else
6653 echo "$as_me: failed program was:" >&5
6654sed 's/^/| /' conftest.$ac_ext >&5
6655
6656 ac_header_preproc=no
6657fi
6658rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
6659echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6660echo "${ECHO_T}$ac_header_preproc" >&6
ba479fd2
NN
6661
6662# So? What about this header?
86da66b5
HPN
6663case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6664 yes:no: )
ba479fd2
NN
6665 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6666echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
6667 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6668echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6669 ac_header_preproc=yes
ba479fd2 6670 ;;
86da66b5 6671 no:yes:* )
ba479fd2
NN
6672 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6673echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
6674 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6675echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6676 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6677echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6678 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6679echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
6680 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6681echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
6682 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6683echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
b61ff9c8
BS
6684 (
6685 cat <<\_ASBOX
6686## ------------------------------------------ ##
6687## Report this to the AC_PACKAGE_NAME lists. ##
6688## ------------------------------------------ ##
6689_ASBOX
6690 ) |
6691 sed "s/^/$as_me: WARNING: /" >&2
ba479fd2
NN
6692 ;;
6693esac
b61ff9c8
BS
6694echo "$as_me:$LINENO: checking for valgrind.h" >&5
6695echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
ba479fd2
NN
6696if test "${ac_cv_header_valgrind_h+set}" = set; then
6697 echo $ECHO_N "(cached) $ECHO_C" >&6
6698else
6699 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 6700fi
b61ff9c8
BS
6701echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6702echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
ba479fd2 6703
6e3f3080 6704fi
ba479fd2 6705if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
6706 have_valgrind_h=yes
6707else
ba479fd2 6708 have_valgrind_h=no
6938ec6c
NN
6709fi
6710
6711
ba479fd2 6712
cdce5c16 6713if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
6714 # It is certainly possible that there's valgrind but no valgrind.h.
6715 # GCC relies on making annotations so we must have both.
b61ff9c8
BS
6716 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6717echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
ba479fd2 6718 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6719/* confdefs.h. */
6720_ACEOF
6721cat confdefs.h >>conftest.$ac_ext
6722cat >>conftest.$ac_ext <<_ACEOF
6723/* end confdefs.h. */
a207b594 6724#include <valgrind/memcheck.h>
14011ca4
AJ
6725#ifndef VALGRIND_DISCARD
6726#error VALGRIND_DISCARD not defined
6727#endif
ba479fd2 6728_ACEOF
b61ff9c8
BS
6729if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6730 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
6731 ac_status=$?
6732 grep -v '^ *+' conftest.er1 >conftest.err
6733 rm -f conftest.er1
6734 cat conftest.err >&5
6735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6736 (exit $ac_status); } >/dev/null; then
6737 if test -s conftest.err; then
6738 ac_cpp_err=$ac_c_preproc_warn_flag
6739 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6740 else
6741 ac_cpp_err=
6742 fi
6743else
6744 ac_cpp_err=yes
6745fi
6746if test -z "$ac_cpp_err"; then
a207b594
HPN
6747 gcc_cv_header_valgrind_memcheck_h=yes
6748else
ba479fd2
NN
6749 echo "$as_me: failed program was:" >&5
6750sed 's/^/| /' conftest.$ac_ext >&5
6751
a207b594
HPN
6752 gcc_cv_header_valgrind_memcheck_h=no
6753fi
ba479fd2 6754rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
6755 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6756echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6757 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6758echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
ba479fd2 6759 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6760/* confdefs.h. */
6761_ACEOF
6762cat confdefs.h >>conftest.$ac_ext
6763cat >>conftest.$ac_ext <<_ACEOF
6764/* end confdefs.h. */
a207b594
HPN
6765#include <memcheck.h>
6766#ifndef VALGRIND_DISCARD
6767#error VALGRIND_DISCARD not defined
6768#endif
ba479fd2 6769_ACEOF
b61ff9c8
BS
6770if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6771 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
6772 ac_status=$?
6773 grep -v '^ *+' conftest.er1 >conftest.err
6774 rm -f conftest.er1
6775 cat conftest.err >&5
6776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
6777 (exit $ac_status); } >/dev/null; then
6778 if test -s conftest.err; then
6779 ac_cpp_err=$ac_c_preproc_warn_flag
6780 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6781 else
6782 ac_cpp_err=
6783 fi
6784else
6785 ac_cpp_err=yes
6786fi
6787if test -z "$ac_cpp_err"; then
14011ca4
AJ
6788 gcc_cv_header_memcheck_h=yes
6789else
ba479fd2
NN
6790 echo "$as_me: failed program was:" >&5
6791sed 's/^/| /' conftest.$ac_ext >&5
6792
cafe096b
EC
6793 gcc_cv_header_memcheck_h=no
6794fi
ba479fd2 6795rm -f conftest.err conftest.$ac_ext
b61ff9c8
BS
6796 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6797echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
ba479fd2 6798
56694dd9
ZW
6799# Prepare PATH_SEPARATOR.
6800# The user is always right.
6801if test "${PATH_SEPARATOR+set}" != set; then
6802 echo "#! /bin/sh" >conf$$.sh
6803 echo "exit 0" >>conf$$.sh
6804 chmod +x conf$$.sh
6805 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6806 PATH_SEPARATOR=';'
6807 else
6808 PATH_SEPARATOR=:
6809 fi
6810 rm -f conf$$.sh
6811fi
6812
6813# Find out how to test for executable files. Don't use a zero-byte file,
6814# as systems may use methods other than mode bits to determine executability.
6815cat >conf$$.file <<_ASEOF
6816#! /bin/sh
6817exit 0
6818_ASEOF
6819chmod +x conf$$.file
6820if test -x conf$$.file >/dev/null 2>&1; then
6821 ac_executable_p="test -x"
6822else
6823 ac_executable_p="test -f"
6824fi
6825rm -f conf$$.file
6826
6827# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 6828set dummy valgrind; ac_word=$2
b61ff9c8
BS
6829echo "$as_me:$LINENO: checking for $ac_word" >&5
6830echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
6831if test "${ac_cv_path_valgrind_path+set}" = set; then
6832 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
6833else
6834 case "$valgrind_path" in
56694dd9
ZW
6835 [\\/]* | ?:[\\/]*)
6836 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6837 ;;
414d23ae 6838 *)
56694dd9
ZW
6839 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6840 for ac_dir in $PATH; do
6841 IFS="$ac_save_IFS"
6842 test -z "$ac_dir" && ac_dir=.
6843 for ac_exec_ext in '' $ac_executable_extensions; do
6844 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6845 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6846 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6847 break 2
6848 fi
6849 fi
6850 done
6851 done
6852 IFS="$ac_save_IFS"
6853 ;;
414d23ae 6854esac
75e93faa 6855fi
414d23ae
HPN
6856valgrind_path="$ac_cv_path_valgrind_path"
6857if test -n "$valgrind_path"; then
b61ff9c8
BS
6858 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6859echo "${ECHO_T}$valgrind_path" >&6
414d23ae 6860else
b61ff9c8
BS
6861 echo "$as_me:$LINENO: result: no" >&5
6862echo "${ECHO_T}no" >&6
414d23ae
HPN
6863fi
6864
a207b594
HPN
6865 if test "x$valgrind_path" = "x" \
6866 || (test $have_valgrind_h = no \
6867 && test $gcc_cv_header_memcheck_h = no \
6868 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
6869 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6870echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6871 { (exit 1); exit 1; }; }
414d23ae
HPN
6872 fi
6873 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6874 valgrind_command="$valgrind_path -q"
ba479fd2
NN
6875
6876cat >>confdefs.h <<\_ACEOF
414d23ae 6877#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 6878_ACEOF
75e93faa 6879
a207b594 6880 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
6881
6882cat >>confdefs.h <<\_ACEOF
a207b594 6883#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 6884_ACEOF
a207b594
HPN
6885
6886 fi
14011ca4 6887 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
6888
6889cat >>confdefs.h <<\_ACEOF
14011ca4 6890#define HAVE_MEMCHECK_H 1
ba479fd2 6891_ACEOF
14011ca4
AJ
6892
6893 fi
414d23ae 6894fi
75e93faa 6895
75e93faa
ZW
6896
6897
b61ff9c8 6898# Check whether --enable-mapped-location or --disable-mapped-location was given.
74ee1642 6899if test "${enable_mapped_location+set}" = set; then
b61ff9c8
BS
6900 enableval="$enable_mapped_location"
6901
74ee1642 6902else
f6230c17 6903 enable_mapped_location=yes
b61ff9c8 6904fi;
74ee1642
PB
6905
6906if test "$enable_mapped_location" = yes ; then
6907
6908cat >>confdefs.h <<\_ACEOF
6909#define USE_MAPPED_LOCATION 1
6910_ACEOF
6911
6912fi
6913
414d23ae 6914# Enable code coverage collection
b61ff9c8 6915# Check whether --enable-coverage or --disable-coverage was given.
414d23ae 6916if test "${enable_coverage+set}" = set; then
b61ff9c8
BS
6917 enableval="$enable_coverage"
6918 case "${enableval}" in
6dd297da
NN
6919 yes|noopt)
6920 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6921 ;;
6922 opt)
6923 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6924 ;;
6925 no)
6926 # a.k.a. --disable-coverage
6927 coverage_flags=""
6928 ;;
6929 *)
6930 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
6931echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6932 { (exit 1); exit 1; }; }
6dd297da 6933 ;;
414d23ae 6934esac
75e93faa 6935else
414d23ae 6936 coverage_flags=""
b61ff9c8 6937fi;
a3bba767 6938
2f41c1d6 6939
b61ff9c8 6940# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
1a4b763e 6941if test "${enable_gather_detailed_mem_stats+set}" = set; then
b61ff9c8
BS
6942 enableval="$enable_gather_detailed_mem_stats"
6943
439a7e54
DN
6944else
6945 enable_gather_detailed_mem_stats=no
b61ff9c8 6946fi;
439a7e54 6947if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
6948
6949cat >>confdefs.h <<\_ACEOF
439a7e54 6950#define GATHER_STATISTICS 1
ba479fd2 6951_ACEOF
439a7e54
DN
6952
6953fi
6954
73458fb7
NN
6955# -------------------------------
6956# Miscenalleous configure options
6957# -------------------------------
34a86c2b
NN
6958
6959# With stabs
ba479fd2 6960
b61ff9c8 6961# Check whether --with-stabs or --without-stabs was given.
34a86c2b 6962if test "${with_stabs+set}" = set; then
b61ff9c8
BS
6963 withval="$with_stabs"
6964 stabs="$with_stabs"
34a86c2b
NN
6965else
6966 stabs=no
b61ff9c8 6967fi;
cafe096b 6968
34a86c2b 6969# Determine whether or not multilibs are enabled.
b61ff9c8 6970# Check whether --enable-multilib or --disable-multilib was given.
34a86c2b 6971if test "${enable_multilib+set}" = set; then
b61ff9c8
BS
6972 enableval="$enable_multilib"
6973
34a86c2b
NN
6974else
6975 enable_multilib=yes
b61ff9c8 6976fi;
75e93faa 6977
34a86c2b 6978
414d23ae 6979# Enable __cxa_atexit for C++.
b61ff9c8 6980# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
414d23ae 6981if test "${enable___cxa_atexit+set}" = set; then
b61ff9c8 6982 enableval="$enable___cxa_atexit"
75e93faa 6983
b61ff9c8 6984fi;
75e93faa 6985
486aa804 6986# Enable C extension for decimal float if target supports it.
b61ff9c8 6987# Check whether --enable-decimal-float or --disable-decimal-float was given.
486aa804 6988if test "${enable_decimal_float+set}" = set; then
b61ff9c8
BS
6989 enableval="$enable_decimal_float"
6990
79b87c74
MM
6991 case $enable_decimal_float in
6992 yes | no | bid | dpd) ;;
6993 *) { { echo "$as_me:$LINENO: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
6994Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&5
6995echo "$as_me: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
6996Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&2;}
6997 { (exit 1); exit 1; }; } ;;
6998 esac
6999
7000else
7001
7002 case $target in
7003 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
a4a9df5f 7004 enable_decimal_float=yes
486aa804
BE
7005 ;;
7006 *)
7007 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
7008echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
7009 enable_decimal_float=no
7010 ;;
79b87c74 7011 esac
486aa804 7012
b61ff9c8 7013fi;
486aa804 7014
79b87c74
MM
7015dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
7016
7017cat >>confdefs.h <<_ACEOF
7018#define ENABLE_DECIMAL_FLOAT $dfp
7019_ACEOF
7020
7021
7022# x86's use BID format instead of DPD
7023case x$enable_decimal_float in
7024 xyes)
7025 case $target in
7026 i?86*-*-linux* | x86_64*-*-linux*)
7027 enable_decimal_float=bid
7028 ;;
7029 *)
7030 enable_decimal_float=dpd
7031 ;;
7032 esac
7033 ;;
7034 xno)
7035 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
7036 # dependency on libdecnumber.
7037 enable_decimal_float=dpd
7038 ;;
7039esac
486aa804
BE
7040
7041
79b87c74 7042bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
486aa804
BE
7043
7044cat >>confdefs.h <<_ACEOF
79b87c74 7045#define ENABLE_DECIMAL_BID_FORMAT $bid
486aa804
BE
7046_ACEOF
7047
7048
ab22c1fa 7049# Enable C extension for fixed-point arithmetic.
b61ff9c8 7050# Check whether --enable-fixed-point or --disable-fixed-point was given.
ab22c1fa 7051if test "${enable_fixed_point+set}" = set; then
b61ff9c8
BS
7052 enableval="$enable_fixed_point"
7053
ab22c1fa
CF
7054
7055else
7056
7057 case $target in
7058 mips*-*-*)
7059 enable_fixed_point=yes
7060 ;;
7061 *)
7062 { echo "$as_me:$LINENO: WARNING: fixed-point is not supported for this target" >&5
7063echo "$as_me: WARNING: fixed-point is not supported for this target" >&2;}
7064 enable_fixed_point=no
7065 ;;
7066 esac
7067
b61ff9c8 7068fi;
ab22c1fa
CF
7069
7070
7071fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi`
7072
7073cat >>confdefs.h <<_ACEOF
7074#define ENABLE_FIXED_POINT $fixedpoint
7075_ACEOF
7076
7077
414d23ae
HPN
7078# Enable threads
7079# Pass with no value to take the default
7080# Pass with a value to specify a thread package
b61ff9c8 7081# Check whether --enable-threads or --disable-threads was given.
414d23ae 7082if test "${enable_threads+set}" = set; then
b61ff9c8
BS
7083 enableval="$enable_threads"
7084
414d23ae
HPN
7085else
7086 enable_threads=''
b61ff9c8 7087fi;
2f41c1d6 7088
b61ff9c8 7089# Check whether --enable-tls or --disable-tls was given.
1a4b763e 7090if test "${enable_tls+set}" = set; then
b61ff9c8
BS
7091 enableval="$enable_tls"
7092
8dea1cca
DD
7093 case $enable_tls in
7094 yes | no) ;;
7095 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
7096Valid choices are 'yes' and 'no'." >&5
7097echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
7098Valid choices are 'yes' and 'no'." >&2;}
7099 { (exit 1); exit 1; }; } ;;
7100 esac
7101
7102else
7103 enable_tls=''
b61ff9c8 7104fi;
1a4b763e 7105
b61ff9c8 7106# Check whether --enable-objc-gc or --disable-objc-gc was given.
414d23ae 7107if test "${enable_objc_gc+set}" = set; then
b61ff9c8
BS
7108 enableval="$enable_objc_gc"
7109 if test x$enable_objc_gc = xno; then
414d23ae
HPN
7110 objc_boehm_gc=''
7111else
7112 objc_boehm_gc=1
7113fi
7114else
7115 objc_boehm_gc=''
b61ff9c8 7116fi;
75e93faa 7117
a6ccdbab 7118
b61ff9c8 7119# Check whether --with-dwarf2 or --without-dwarf2 was given.
414d23ae 7120if test "${with_dwarf2+set}" = set; then
b61ff9c8
BS
7121 withval="$with_dwarf2"
7122 dwarf2="$with_dwarf2"
75e93faa 7123else
414d23ae 7124 dwarf2=no
b61ff9c8 7125fi;
2f41c1d6 7126
b61ff9c8 7127# Check whether --enable-shared or --disable-shared was given.
1a4b763e 7128if test "${enable_shared+set}" = set; then
b61ff9c8
BS
7129 enableval="$enable_shared"
7130
414d23ae
HPN
7131 case $enable_shared in
7132 yes | no) ;;
7133 *)
7134 enable_shared=no
7135 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
7136 for pkg in $enableval; do
7137 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
7138 enable_shared=yes
7139 fi
7140 done
7141 IFS="$ac_save_ifs"
7142 ;;
7143 esac
7144
75e93faa 7145else
414d23ae 7146 enable_shared=yes
b61ff9c8 7147fi;
703d89ab 7148
ab22c1fa 7149
1a4b763e 7150
b61ff9c8 7151# Check whether --with-build-sysroot or --without-build-sysroot was given.
160633c6 7152if test "${with_build_sysroot+set}" = set; then
b61ff9c8 7153 withval="$with_build_sysroot"
160633c6 7154
b61ff9c8 7155fi;
160633c6
MM
7156
7157
b61ff9c8 7158# Check whether --with-sysroot or --without-sysroot was given.
4977bab6 7159if test "${with_sysroot+set}" = set; then
b61ff9c8
BS
7160 withval="$with_sysroot"
7161
4977bab6 7162 case ${with_sysroot} in
caa55b1e 7163 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
7164 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
7165 esac
ba479fd2 7166
4977bab6 7167 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14da6073 7168 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
4977bab6 7169
748670c2
RS
7170 if test "x$prefix" = xNONE; then
7171 test_prefix=/usr/local
7172 else
7173 test_prefix=$prefix
7174 fi
047d636f 7175 if test "x$exec_prefix" = xNONE; then
748670c2 7176 test_exec_prefix=$test_prefix
047d636f 7177 else
748670c2 7178 test_exec_prefix=$exec_prefix
047d636f
DJ
7179 fi
7180 case ${TARGET_SYSTEM_ROOT} in
91710e62 7181 "${test_prefix}"|"${test_prefix}/"*|\
748670c2
RS
7182 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
7183 '${prefix}'|'${prefix}/'*|\
91710e62 7184 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
7185 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
7186 TARGET_SYSTEM_ROOT_DEFINE="$t"
7187 ;;
7188 esac
7189
4977bab6 7190else
ba479fd2 7191
4977bab6 7192 TARGET_SYSTEM_ROOT=
db720d9a 7193 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
7194 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
7195
b61ff9c8 7196fi;
4977bab6
ZW
7197
7198
7199
7200
d1bd0ded 7201# Build with intermodule optimisations
b61ff9c8 7202# Check whether --enable-intermodule or --disable-intermodule was given.
d1bd0ded 7203if test "${enable_intermodule+set}" = set; then
b61ff9c8
BS
7204 enableval="$enable_intermodule"
7205 case ${enable_intermodule} in
0c46c5c7
KC
7206 yes) onestep="-onestep";;
7207 *) onestep="";;
d1bd0ded 7208esac
0c46c5c7
KC
7209else
7210 onestep=""
b61ff9c8 7211fi;
2f41c1d6
PB
7212
7213
7214
7215
b61ff9c8 7216# Check whether --with-pkgversion or --without-pkgversion was given.
2f41c1d6 7217if test "${with_pkgversion+set}" = set; then
b61ff9c8
BS
7218 withval="$with_pkgversion"
7219 case "$withval" in
2f41c1d6
PB
7220 yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
7221echo "$as_me: error: package version not specified" >&2;}
7222 { (exit 1); exit 1; }; } ;;
7223 no) PKGVERSION= ;;
7224 *) PKGVERSION="($withval) " ;;
7225 esac
7226else
7227 PKGVERSION="(GCC) "
7228
b61ff9c8 7229fi;
2f41c1d6
PB
7230
7231
7232
1a4b763e 7233
b61ff9c8 7234# Check whether --with-bugurl or --without-bugurl was given.
2f41c1d6 7235if test "${with_bugurl+set}" = set; then
b61ff9c8
BS
7236 withval="$with_bugurl"
7237 case "$withval" in
2f41c1d6
PB
7238 yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
7239echo "$as_me: error: bug URL not specified" >&2;}
7240 { (exit 1); exit 1; }; } ;;
7241 no) BUGURL=
7242 ;;
7243 *) BUGURL="$withval"
7244 ;;
7245 esac
7246else
7247 BUGURL="http://gcc.gnu.org/bugs.html"
7248
b61ff9c8 7249fi;
2f41c1d6
PB
7250 case ${BUGURL} in
7251 "")
7252 REPORT_BUGS_TO=
7253 REPORT_BUGS_TEXI=
7254 ;;
7255 *)
7256 REPORT_BUGS_TO="<$BUGURL>"
7257 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7258 ;;
7259 esac;
7260
ab22c1fa 7261
d1bd0ded
GK
7262
7263
f3c9f174
NN
7264# Sanity check enable_languages in case someone does not run the toplevel
7265# configure # script.
b61ff9c8 7266# Check whether --enable-languages or --disable-languages was given.
f3c9f174 7267if test "${enable_languages+set}" = set; then
b61ff9c8
BS
7268 enableval="$enable_languages"
7269 case ,${enable_languages}, in
f3c9f174
NN
7270 ,,|,yes,)
7271 # go safe -- we cannot be much sure without the toplevel
7272 # configure's
7273 # analysis of which target libs are present and usable
7274 enable_languages=c
7275 ;;
7276 *,all,*)
7277 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
7278echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
7279 { (exit 1); exit 1; }; }
7280 ;;
7281 *,c,*)
7282 ;;
7283 *)
7284 enable_languages=c,${enable_languages}
7285 ;;
7286esac
7287else
7288 enable_languages=c
b61ff9c8 7289fi;
f3c9f174 7290
9288b845
CD
7291# Used by documentation targets
7292
7293
7294
f3c9f174 7295
73458fb7
NN
7296# -------------------------
7297# Checks for other programs
7298# -------------------------
5b67ad6f 7299
b61ff9c8
BS
7300echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7301echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
7302set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
7303if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
ba479fd2 7304 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 7305else
ba479fd2 7306 cat >conftest.make <<\_ACEOF
e9a25f70 7307all:
b61ff9c8 7308 @echo 'ac_maketemp="$(MAKE)"'
ba479fd2 7309_ACEOF
e9a25f70 7310# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
b61ff9c8
BS
7311eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
7312if test -n "$ac_maketemp"; then
7313 eval ac_cv_prog_make_${ac_make}_set=yes
7314else
7315 eval ac_cv_prog_make_${ac_make}_set=no
7316fi
ba479fd2 7317rm -f conftest.make
e9a25f70 7318fi
b61ff9c8
BS
7319if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
7320 echo "$as_me:$LINENO: result: yes" >&5
7321echo "${ECHO_T}yes" >&6
e9a25f70
JL
7322 SET_MAKE=
7323else
b61ff9c8
BS
7324 echo "$as_me:$LINENO: result: no" >&5
7325echo "${ECHO_T}no" >&6
e9a25f70
JL
7326 SET_MAKE="MAKE=${MAKE-make}"
7327fi
7328
7329
861bb6c1 7330# Find some useful tools
ba479fd2 7331for ac_prog in gawk mawk nawk awk
861bb6c1 7332do
ba479fd2 7333 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 7334set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
7335echo "$as_me:$LINENO: checking for $ac_word" >&5
7336echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7337if test "${ac_cv_prog_AWK+set}" = set; then
7338 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7339else
7340 if test -n "$AWK"; then
7341 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7342else
ba479fd2
NN
7343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7344for as_dir in $PATH
7345do
7346 IFS=$as_save_IFS
7347 test -z "$as_dir" && as_dir=.
7348 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 7349 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7350 ac_cv_prog_AWK="$ac_prog"
7351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7352 break 2
7353 fi
7354done
7355done
7356
861bb6c1
JL
7357fi
7358fi
ba479fd2 7359AWK=$ac_cv_prog_AWK
861bb6c1 7360if test -n "$AWK"; then
b61ff9c8
BS
7361 echo "$as_me:$LINENO: result: $AWK" >&5
7362echo "${ECHO_T}$AWK" >&6
861bb6c1 7363else
b61ff9c8
BS
7364 echo "$as_me:$LINENO: result: no" >&5
7365echo "${ECHO_T}no" >&6
861bb6c1
JL
7366fi
7367
ba479fd2 7368 test -n "$AWK" && break
861bb6c1
JL
7369done
7370
776dc15d 7371# We need awk to create options.c and options.h.
2c4902b9
NN
7372# Bail out if it's missing.
7373case ${AWK} in
ba479fd2
NN
7374 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7375echo "$as_me: error: can't build without awk, bailing out" >&2;}
7376 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
7377esac
7378
b61ff9c8
BS
7379echo "$as_me:$LINENO: checking whether ln -s works" >&5
7380echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
ba479fd2
NN
7381if test "${gcc_cv_prog_LN_S+set}" = set; then
7382 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7383else
7384 rm -f conftestdata_t
7385echo >conftestdata_f
7386if ln -s conftestdata_f conftestdata_t 2>/dev/null
7387then
7388 gcc_cv_prog_LN_S="ln -s"
7389else
7390 if ln conftestdata_f conftestdata_t 2>/dev/null
7391 then
7392 gcc_cv_prog_LN_S=ln
7393 else
35f06ae4
PB
7394 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7395 then
06c3418c 7396 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
7397 else
7398 gcc_cv_prog_LN_S=cp
7399 fi
0a4b6309
RL
7400 fi
7401fi
7402rm -f conftestdata_f conftestdata_t
7403
7404fi
7405LN_S="$gcc_cv_prog_LN_S"
7406if test "$gcc_cv_prog_LN_S" = "ln -s"; then
b61ff9c8
BS
7407 echo "$as_me:$LINENO: result: yes" >&5
7408echo "${ECHO_T}yes" >&6
0a4b6309
RL
7409else
7410 if test "$gcc_cv_prog_LN_S" = "ln"; then
b61ff9c8
BS
7411 echo "$as_me:$LINENO: result: no, using ln" >&5
7412echo "${ECHO_T}no, using ln" >&6
0a4b6309 7413 else
b61ff9c8
BS
7414 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7415echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
7416 fi
7417fi
7418
b61ff9c8
BS
7419echo "$as_me:$LINENO: checking whether ln works" >&5
7420echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
18fc9bd4
RG
7421if test "${acx_cv_prog_LN+set}" = set; then
7422 echo $ECHO_N "(cached) $ECHO_C" >&6
7423else
7424 rm -f conftestdata_t
7425echo >conftestdata_f
7426if ln conftestdata_f conftestdata_t 2>/dev/null
7427then
7428 acx_cv_prog_LN=ln
7429else
7430 acx_cv_prog_LN=no
7431fi
7432rm -f conftestdata_f conftestdata_t
7433
7434fi
7435if test $acx_cv_prog_LN = no; then
7436 LN="$LN_S"
b61ff9c8
BS
7437 echo "$as_me:$LINENO: result: no, using $LN" >&5
7438echo "${ECHO_T}no, using $LN" >&6
18fc9bd4
RG
7439else
7440 LN="$acx_cv_prog_LN"
b61ff9c8
BS
7441 echo "$as_me:$LINENO: result: yes" >&5
7442echo "${ECHO_T}yes" >&6
18fc9bd4
RG
7443fi
7444
ba479fd2
NN
7445if test -n "$ac_tool_prefix"; then
7446 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7447set dummy ${ac_tool_prefix}ranlib; ac_word=$2
b61ff9c8
BS
7448echo "$as_me:$LINENO: checking for $ac_word" >&5
7449echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7450if test "${ac_cv_prog_RANLIB+set}" = set; then
7451 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7452else
7453 if test -n "$RANLIB"; then
7454 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7455else
ba479fd2
NN
7456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7457for as_dir in $PATH
7458do
7459 IFS=$as_save_IFS
7460 test -z "$as_dir" && as_dir=.
7461 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 7462 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7463 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7464 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7465 break 2
7466 fi
7467done
7468done
7469
6e3f3080
NN
7470fi
7471fi
ba479fd2 7472RANLIB=$ac_cv_prog_RANLIB
6e3f3080 7473if test -n "$RANLIB"; then
b61ff9c8
BS
7474 echo "$as_me:$LINENO: result: $RANLIB" >&5
7475echo "${ECHO_T}$RANLIB" >&6
ba479fd2 7476else
b61ff9c8
BS
7477 echo "$as_me:$LINENO: result: no" >&5
7478echo "${ECHO_T}no" >&6
ba479fd2
NN
7479fi
7480
7481fi
7482if test -z "$ac_cv_prog_RANLIB"; then
7483 ac_ct_RANLIB=$RANLIB
7484 # Extract the first word of "ranlib", so it can be a program name with args.
7485set dummy ranlib; ac_word=$2
b61ff9c8
BS
7486echo "$as_me:$LINENO: checking for $ac_word" >&5
7487echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7488if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7489 echo $ECHO_N "(cached) $ECHO_C" >&6
7490else
7491 if test -n "$ac_ct_RANLIB"; then
7492 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7493else
7494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7495for as_dir in $PATH
7496do
7497 IFS=$as_save_IFS
7498 test -z "$as_dir" && as_dir=.
7499 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 7500 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7501 ac_cv_prog_ac_ct_RANLIB="ranlib"
7502 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7503 break 2
7504 fi
7505done
7506done
7507
b61ff9c8 7508 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
ba479fd2
NN
7509fi
7510fi
7511ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7512if test -n "$ac_ct_RANLIB"; then
b61ff9c8
BS
7513 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7514echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 7515else
b61ff9c8
BS
7516 echo "$as_me:$LINENO: result: no" >&5
7517echo "${ECHO_T}no" >&6
ba479fd2
NN
7518fi
7519
b61ff9c8 7520 RANLIB=$ac_ct_RANLIB
ba479fd2
NN
7521else
7522 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
7523fi
7524
343a6100
MM
7525case "${host}" in
7526*-*-darwin*)
7527 # By default, the Darwin ranlib will not treat common symbols as
7528 # definitions when building the archive table of contents. Other
7529 # ranlibs do that; pass an option to the Darwin ranlib that makes
7530 # it behave similarly.
7531 ranlib_flags="-c"
7532 ;;
7533*)
7534 ranlib_flags=""
7535esac
7536
7537
0a4b6309
RL
7538# Find a good install program. We prefer a C program (faster),
7539# so one script is as good as another. But avoid the broken or
7540# incompatible versions:
7541# SysV /etc/install, /usr/sbin/install
7542# SunOS /usr/etc/install
7543# IRIX /sbin/install
7544# AIX /bin/install
7545# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7546# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7547# ./install, which can be erroneously created by make from ./install.sh.
b61ff9c8
BS
7548echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7549echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 7550if test -z "$INSTALL"; then
ba479fd2
NN
7551if test "${ac_cv_path_install+set}" = set; then
7552 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7553else
7554 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7555 for ac_dir in $PATH; do
7556 # Account for people who put trailing slashes in PATH elements.
7557 case "$ac_dir/" in
7558 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7559 *)
7560 # OSF1 and SCO ODT 3.0 have their own names for install.
7561 for ac_prog in ginstall scoinst install; do
7562 if test -f $ac_dir/$ac_prog; then
7563 if test $ac_prog = install &&
7564 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7565 # AIX install. It has an incompatible calling convention.
7566 # OSF/1 installbsd also uses dspmsg, but is usable.
7567 :
7568 else
7569 ac_cv_path_install="$ac_dir/$ac_prog -c"
7570 break 2
7571 fi
7572 fi
7573 done
7574 ;;
7575 esac
7576 done
7577 IFS="$ac_save_IFS"
7578
7579fi
7580 if test "${ac_cv_path_install+set}" = set; then
7581 INSTALL="$ac_cv_path_install"
7582 else
7583 # As a last resort, use the slow shell script. We don't cache a
7584 # path for INSTALL within a source directory, because that will
7585 # break other packages using the cache if that directory is
7586 # removed, or if the path is relative.
7587 INSTALL="$ac_install_sh"
7588 fi
7589fi
b61ff9c8
BS
7590echo "$as_me:$LINENO: result: $INSTALL" >&5
7591echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
7592
7593# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7594# It thinks the first close brace ends the variable substitution.
7595test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7596
7597test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7598
861bb6c1 7599
3a000df0 7600# See if cmp has --ignore-initial.
b61ff9c8
BS
7601echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7602echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
ba479fd2
NN
7603if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7604 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
7605else
7606 echo abfoo >t1
7607 echo cdfoo >t2
269a7343 7608 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
7609 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7610 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 7611 :
3a000df0
KC
7612 else
7613 gcc_cv_prog_cmp_skip=gnucompare
7614 fi
269a7343
KG
7615 fi
7616 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7617 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7618 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7619 :
7620 else
7621 gcc_cv_prog_cmp_skip=fastcompare
7622 fi
7623 fi
3a000df0
KC
7624 fi
7625 rm t1 t2
7626
7627fi
b61ff9c8
BS
7628echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7629echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
7630make_compare_target=$gcc_cv_prog_cmp_skip
7631
7632
7633
73458fb7
NN
7634# See if we have the mktemp command.
7635# Extract the first word of "mktemp", so it can be a program name with args.
7636set dummy mktemp; ac_word=$2
b61ff9c8
BS
7637echo "$as_me:$LINENO: checking for $ac_word" >&5
7638echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7639if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7640 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7641else
7642 if test -n "$have_mktemp_command"; then
7643 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7644else
ba479fd2
NN
7645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7646for as_dir in $PATH
7647do
7648 IFS=$as_save_IFS
7649 test -z "$as_dir" && as_dir=.
7650 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 7651 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7652 ac_cv_prog_have_mktemp_command="yes"
7653 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7654 break 2
7655 fi
7656done
7657done
7658
73458fb7
NN
7659 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7660fi
7661fi
ba479fd2 7662have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 7663if test -n "$have_mktemp_command"; then
b61ff9c8
BS
7664 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7665echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 7666else
b61ff9c8
BS
7667 echo "$as_me:$LINENO: result: no" >&5
7668echo "${ECHO_T}no" >&6
73458fb7
NN
7669fi
7670
7671
7c27e184
PB
7672# See if makeinfo has been installed and is modern enough
7673# that we can use it.
9f18db39 7674
3bbd5a19 7675 # Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 7676set dummy makeinfo; ac_word=$2
b61ff9c8
BS
7677echo "$as_me:$LINENO: checking for $ac_word" >&5
7678echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7679if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7680 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7681else
7682 if test -n "$MAKEINFO"; then
7683 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7684else
ba479fd2
NN
7685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7686for as_dir in $PATH
7687do
7688 IFS=$as_save_IFS
7689 test -z "$as_dir" && as_dir=.
7690 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 7691 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ba479fd2
NN
7692 ac_cv_prog_MAKEINFO="makeinfo"
7693 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7694 break 2
7695 fi
7696done
7697done
7698
73458fb7
NN
7699fi
7700fi
ba479fd2 7701MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 7702if test -n "$MAKEINFO"; then
b61ff9c8
BS
7703 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7704echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 7705else
b61ff9c8
BS
7706 echo "$as_me:$LINENO: result: no" >&5
7707echo "${ECHO_T}no" >&6
73458fb7
NN
7708fi
7709
3bbd5a19
PB
7710 if test -n "$MAKEINFO"; then
7711 # Found it, now check the version.
b61ff9c8
BS
7712 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7713echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
ba479fd2
NN
7714if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7715 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7 7716else
3bbd5a19
PB
7717 ac_prog_version=`eval $MAKEINFO --version 2>&1 |
7718 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
7719
7720 case $ac_prog_version in
7721 '') gcc_cv_prog_makeinfo_modern=no;;
4c471775 7722 4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;;
3bbd5a19
PB
7723 *) gcc_cv_prog_makeinfo_modern=no;;
7724 esac
73458fb7
NN
7725
7726fi
b61ff9c8
BS
7727echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7728echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
3bbd5a19
PB
7729 else
7730 gcc_cv_prog_makeinfo_modern=no
7731 fi
7732 if test $gcc_cv_prog_makeinfo_modern = no; then
7733 MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo"
7734 fi
73458fb7 7735
73458fb7 7736if test $gcc_cv_prog_makeinfo_modern = no; then
ba479fd2
NN
7737 { echo "$as_me:$LINENO: WARNING:
7738*** Makeinfo is missing or too old.
7739*** Info documentation will not be built." >&5
7740echo "$as_me: WARNING:
cafe096b 7741*** Makeinfo is missing or too old.
ba479fd2 7742*** Info documentation will not be built." >&2;}
73458fb7
NN
7743 BUILD_INFO=
7744else
ba479fd2 7745 BUILD_INFO=info
73458fb7
NN
7746fi
7747
7c27e184 7748
73458fb7 7749# Is pod2man recent enough to regenerate manpages?
b61ff9c8
BS
7750echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7751echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 7752if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
b61ff9c8
BS
7753 echo "$as_me:$LINENO: result: yes" >&5
7754echo "${ECHO_T}yes" >&6
ba479fd2 7755 GENERATED_MANPAGES=generated-manpages
73458fb7 7756else
b61ff9c8
BS
7757 echo "$as_me:$LINENO: result: no" >&5
7758echo "${ECHO_T}no" >&6
73458fb7
NN
7759 GENERATED_MANPAGES=
7760fi
7761
7c27e184 7762
3bbd5a19
PB
7763MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
7764
73458fb7 7765# How about lex?
7c27e184
PB
7766for ac_prog in flex
7767do
7768 # Extract the first word of "$ac_prog", so it can be a program name with args.
7769set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
7770echo "$as_me:$LINENO: checking for $ac_word" >&5
7771echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7772if test "${ac_cv_prog_FLEX+set}" = set; then
7773 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7774else
7775 if test -n "$FLEX"; then
7776 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7777else
ba479fd2
NN
7778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7779for as_dir in $PATH
7780do
7781 IFS=$as_save_IFS
7782 test -z "$as_dir" && as_dir=.
7783 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 7784 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7785 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
7786 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7787 break 2
7788 fi
7789done
7790done
7791
73458fb7
NN
7792fi
7793fi
ba479fd2 7794FLEX=$ac_cv_prog_FLEX
73458fb7 7795if test -n "$FLEX"; then
b61ff9c8
BS
7796 echo "$as_me:$LINENO: result: $FLEX" >&5
7797echo "${ECHO_T}$FLEX" >&6
73458fb7 7798else
b61ff9c8
BS
7799 echo "$as_me:$LINENO: result: no" >&5
7800echo "${ECHO_T}no" >&6
73458fb7
NN
7801fi
7802
7c27e184
PB
7803 test -n "$FLEX" && break
7804done
7805test -n "$FLEX" || FLEX="$MISSING flex"
7806
73458fb7
NN
7807
7808# Bison?
7c27e184
PB
7809for ac_prog in bison
7810do
7811 # Extract the first word of "$ac_prog", so it can be a program name with args.
7812set dummy $ac_prog; ac_word=$2
b61ff9c8
BS
7813echo "$as_me:$LINENO: checking for $ac_word" >&5
7814echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
ba479fd2
NN
7815if test "${ac_cv_prog_BISON+set}" = set; then
7816 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7817else
7818 if test -n "$BISON"; then
7819 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7820else
ba479fd2
NN
7821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7822for as_dir in $PATH
7823do
7824 IFS=$as_save_IFS
7825 test -z "$as_dir" && as_dir=.
7826 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 7827 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7828 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
7829 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7830 break 2
7831 fi
7832done
7833done
7834
73458fb7
NN
7835fi
7836fi
ba479fd2 7837BISON=$ac_cv_prog_BISON
73458fb7 7838if test -n "$BISON"; then
b61ff9c8
BS
7839 echo "$as_me:$LINENO: result: $BISON" >&5
7840echo "${ECHO_T}$BISON" >&6
73458fb7 7841else
b61ff9c8
BS
7842 echo "$as_me:$LINENO: result: no" >&5
7843echo "${ECHO_T}no" >&6
73458fb7
NN
7844fi
7845
7c27e184
PB
7846 test -n "$BISON" && break
7847done
7848test -n "$BISON" || BISON="$MISSING bison"
7849
7850
7851# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7852# check for build == host before using them.
73458fb7 7853
f6a874ac 7854# NM
414adbdd
GK
7855if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7856 && test -d ../binutils ; then
f6a874ac
JW
7857 NM='$(objdir)/../binutils/nm-new'
7858else
7859 # Extract the first word of "nm", so it can be a program name with args.
7860set dummy nm; ac_word=$2
b61ff9c8
BS
7861echo "$as_me:$LINENO: checking for $ac_word" >&5
7862echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
f6a874ac
JW
7863if test "${ac_cv_prog_NM+set}" = set; then
7864 echo $ECHO_N "(cached) $ECHO_C" >&6
7865else
7866 if test -n "$NM"; then
7867 ac_cv_prog_NM="$NM" # Let the user override the test.
7868else
7869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7870for as_dir in $PATH
7871do
7872 IFS=$as_save_IFS
7873 test -z "$as_dir" && as_dir=.
7874 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 7875 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f6a874ac
JW
7876 ac_cv_prog_NM="nm"
7877 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7878 break 2
7879 fi
7880done
7881done
7882
7883 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7884fi
7885fi
7886NM=$ac_cv_prog_NM
7887if test -n "$NM"; then
b61ff9c8
BS
7888 echo "$as_me:$LINENO: result: $NM" >&5
7889echo "${ECHO_T}$NM" >&6
f6a874ac 7890else
b61ff9c8
BS
7891 echo "$as_me:$LINENO: result: no" >&5
7892echo "${ECHO_T}no" >&6
f6a874ac
JW
7893fi
7894
7895fi
7896
7897# AR
414adbdd
GK
7898if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7899 && test -d ../binutils ; then
f6a874ac
JW
7900 AR='$(objdir)/../binutils/ar'
7901else
7902 # Extract the first word of "ar", so it can be a program name with args.
7903set dummy ar; ac_word=$2
b61ff9c8
BS
7904echo "$as_me:$LINENO: checking for $ac_word" >&5
7905echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
f6a874ac
JW
7906if test "${ac_cv_prog_AR+set}" = set; then
7907 echo $ECHO_N "(cached) $ECHO_C" >&6
7908else
7909 if test -n "$AR"; then
7910 ac_cv_prog_AR="$AR" # Let the user override the test.
7911else
7912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7913for as_dir in $PATH
7914do
7915 IFS=$as_save_IFS
7916 test -z "$as_dir" && as_dir=.
7917 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 7918 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
f6a874ac
JW
7919 ac_cv_prog_AR="ar"
7920 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7921 break 2
7922 fi
7923done
7924done
7925
7926 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7927fi
7928fi
7929AR=$ac_cv_prog_AR
7930if test -n "$AR"; then
b61ff9c8
BS
7931 echo "$as_me:$LINENO: result: $AR" >&5
7932echo "${ECHO_T}$AR" >&6
f6a874ac 7933else
b61ff9c8
BS
7934 echo "$as_me:$LINENO: result: no" >&5
7935echo "${ECHO_T}no" >&6
f6a874ac
JW
7936fi
7937
7938fi
7939
7940
73458fb7
NN
7941# --------------------
7942# Checks for C headers
7943# --------------------
7944
b61ff9c8
BS
7945echo "$as_me:$LINENO: checking for GNU C library" >&5
7946echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
ba479fd2
NN
7947if test "${gcc_cv_glibc+set}" = set; then
7948 echo $ECHO_N "(cached) $ECHO_C" >&6
7949else
7950 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7951/* confdefs.h. */
7952_ACEOF
7953cat confdefs.h >>conftest.$ac_ext
7954cat >>conftest.$ac_ext <<_ACEOF
7955/* end confdefs.h. */
73458fb7 7956#include <features.h>
ba479fd2
NN
7957int
7958main ()
7959{
73458fb7
NN
7960
7961#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7962#error Not a GNU C library system
7963#endif
ba479fd2
NN
7964 ;
7965 return 0;
7966}
7967_ACEOF
7968rm -f conftest.$ac_objext
b61ff9c8
BS
7969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7970 (eval $ac_compile) 2>conftest.er1
ba479fd2 7971 ac_status=$?
86da66b5
HPN
7972 grep -v '^ *+' conftest.er1 >conftest.err
7973 rm -f conftest.er1
7974 cat conftest.err >&5
ba479fd2 7975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
7976 (exit $ac_status); } &&
7977 { ac_try='test -z "$ac_c_werror_flag"
7978 || test ! -s conftest.err'
7979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7980 (eval $ac_try) 2>&5
7981 ac_status=$?
7982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7983 (exit $ac_status); }; } &&
7984 { ac_try='test -s conftest.$ac_objext'
7985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7986 (eval $ac_try) 2>&5
7987 ac_status=$?
7988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7989 (exit $ac_status); }; }; then
73458fb7
NN
7990 gcc_cv_glibc=yes
7991else
ba479fd2
NN
7992 echo "$as_me: failed program was:" >&5
7993sed 's/^/| /' conftest.$ac_ext >&5
7994
b61ff9c8 7995gcc_cv_glibc=no
73458fb7 7996fi
b61ff9c8 7997rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
7998fi
7999
b61ff9c8
BS
8000echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
8001echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 8002if test $gcc_cv_glibc = yes; then
ba479fd2
NN
8003
8004cat >>confdefs.h <<\_ACEOF
73458fb7 8005#define _GNU_SOURCE 1
ba479fd2 8006_ACEOF
73458fb7
NN
8007
8008fi
8009
ca9bc441
NN
8010# Need to reject headers which give warnings, so that the -Werror bootstrap
8011# works later. *sigh* This needs to come before all header checks.
18fc9bd4 8012
ca9bc441
NN
8013ac_c_preproc_warn_flag=yes
8014
b61ff9c8
BS
8015echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8016echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
ba479fd2
NN
8017if test "${ac_cv_header_stdc+set}" = set; then
8018 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8019else
ba479fd2 8020 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8021/* confdefs.h. */
8022_ACEOF
8023cat confdefs.h >>conftest.$ac_ext
8024cat >>conftest.$ac_ext <<_ACEOF
8025/* end confdefs.h. */
956d6950
JL
8026#include <stdlib.h>
8027#include <stdarg.h>
8028#include <string.h>
8029#include <float.h>
ba479fd2
NN
8030
8031int
8032main ()
8033{
8034
8035 ;
8036 return 0;
8037}
8038_ACEOF
8039rm -f conftest.$ac_objext
b61ff9c8
BS
8040if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8041 (eval $ac_compile) 2>conftest.er1
ba479fd2 8042 ac_status=$?
86da66b5
HPN
8043 grep -v '^ *+' conftest.er1 >conftest.err
8044 rm -f conftest.er1
8045 cat conftest.err >&5
ba479fd2 8046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8047 (exit $ac_status); } &&
8048 { ac_try='test -z "$ac_c_werror_flag"
8049 || test ! -s conftest.err'
8050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8051 (eval $ac_try) 2>&5
8052 ac_status=$?
8053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8054 (exit $ac_status); }; } &&
8055 { ac_try='test -s conftest.$ac_objext'
8056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8057 (eval $ac_try) 2>&5
8058 ac_status=$?
8059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8060 (exit $ac_status); }; }; then
956d6950
JL
8061 ac_cv_header_stdc=yes
8062else
ba479fd2
NN
8063 echo "$as_me: failed program was:" >&5
8064sed 's/^/| /' conftest.$ac_ext >&5
8065
b61ff9c8 8066ac_cv_header_stdc=no
956d6950 8067fi
b61ff9c8 8068rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
8069
8070if test $ac_cv_header_stdc = yes; then
8071 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 8072 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8073/* confdefs.h. */
8074_ACEOF
8075cat confdefs.h >>conftest.$ac_ext
8076cat >>conftest.$ac_ext <<_ACEOF
8077/* end confdefs.h. */
956d6950 8078#include <string.h>
ba479fd2
NN
8079
8080_ACEOF
956d6950 8081if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8082 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
8083 :
8084else
956d6950
JL
8085 ac_cv_header_stdc=no
8086fi
8087rm -f conftest*
8088
8089fi
8090
8091if test $ac_cv_header_stdc = yes; then
8092 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 8093 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8094/* confdefs.h. */
8095_ACEOF
8096cat confdefs.h >>conftest.$ac_ext
8097cat >>conftest.$ac_ext <<_ACEOF
8098/* end confdefs.h. */
956d6950 8099#include <stdlib.h>
ba479fd2
NN
8100
8101_ACEOF
956d6950 8102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8103 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
8104 :
8105else
956d6950
JL
8106 ac_cv_header_stdc=no
8107fi
8108rm -f conftest*
8109
8110fi
8111
8112if test $ac_cv_header_stdc = yes; then
8113 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 8114 if test "$cross_compiling" = yes; then
956d6950
JL
8115 :
8116else
ba479fd2 8117 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8118/* confdefs.h. */
8119_ACEOF
8120cat confdefs.h >>conftest.$ac_ext
8121cat >>conftest.$ac_ext <<_ACEOF
8122/* end confdefs.h. */
956d6950 8123#include <ctype.h>
ba479fd2
NN
8124#if ((' ' & 0x0FF) == 0x020)
8125# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8126# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8127#else
8128# define ISLOWER(c) \
86da66b5
HPN
8129 (('a' <= (c) && (c) <= 'i') \
8130 || ('j' <= (c) && (c) <= 'r') \
8131 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
8132# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8133#endif
63cf211a 8134
ba479fd2
NN
8135#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8136int
8137main ()
8138{
8139 int i;
8140 for (i = 0; i < 256; i++)
8141 if (XOR (islower (i), ISLOWER (i))
86da66b5 8142 || toupper (i) != TOUPPER (i))
b61ff9c8
BS
8143 exit(2);
8144 exit (0);
ba479fd2
NN
8145}
8146_ACEOF
8147rm -f conftest$ac_exeext
b61ff9c8
BS
8148if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8149 (eval $ac_link) 2>&5
ba479fd2
NN
8150 ac_status=$?
8151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8152 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
8153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8154 (eval $ac_try) 2>&5
ba479fd2
NN
8155 ac_status=$?
8156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8157 (exit $ac_status); }; }; then
956d6950
JL
8158 :
8159else
ba479fd2
NN
8160 echo "$as_me: program exited with status $ac_status" >&5
8161echo "$as_me: failed program was:" >&5
8162sed 's/^/| /' conftest.$ac_ext >&5
8163
8164( exit $ac_status )
8165ac_cv_header_stdc=no
956d6950 8166fi
b61ff9c8 8167rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 8168fi
956d6950
JL
8169fi
8170fi
b61ff9c8
BS
8171echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8172echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 8173if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
8174
8175cat >>confdefs.h <<\_ACEOF
956d6950 8176#define STDC_HEADERS 1
ba479fd2 8177_ACEOF
956d6950
JL
8178
8179fi
8180
b61ff9c8
BS
8181echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
8182echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
ba479fd2
NN
8183if test "${ac_cv_header_time+set}" = set; then
8184 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8185else
ba479fd2 8186 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8187/* confdefs.h. */
8188_ACEOF
8189cat confdefs.h >>conftest.$ac_ext
8190cat >>conftest.$ac_ext <<_ACEOF
8191/* end confdefs.h. */
956d6950
JL
8192#include <sys/types.h>
8193#include <sys/time.h>
8194#include <time.h>
ba479fd2
NN
8195
8196int
8197main ()
8198{
8199if ((struct tm *) 0)
8200return 0;
8201 ;
8202 return 0;
8203}
8204_ACEOF
8205rm -f conftest.$ac_objext
b61ff9c8
BS
8206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8207 (eval $ac_compile) 2>conftest.er1
ba479fd2 8208 ac_status=$?
86da66b5
HPN
8209 grep -v '^ *+' conftest.er1 >conftest.err
8210 rm -f conftest.er1
8211 cat conftest.err >&5
ba479fd2 8212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8213 (exit $ac_status); } &&
8214 { ac_try='test -z "$ac_c_werror_flag"
8215 || test ! -s conftest.err'
8216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8217 (eval $ac_try) 2>&5
8218 ac_status=$?
8219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220 (exit $ac_status); }; } &&
8221 { ac_try='test -s conftest.$ac_objext'
8222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8223 (eval $ac_try) 2>&5
8224 ac_status=$?
8225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8226 (exit $ac_status); }; }; then
956d6950
JL
8227 ac_cv_header_time=yes
8228else
ba479fd2
NN
8229 echo "$as_me: failed program was:" >&5
8230sed 's/^/| /' conftest.$ac_ext >&5
8231
b61ff9c8 8232ac_cv_header_time=no
956d6950 8233fi
b61ff9c8 8234rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 8235fi
b61ff9c8
BS
8236echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
8237echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 8238if test $ac_cv_header_time = yes; then
ba479fd2
NN
8239
8240cat >>confdefs.h <<\_ACEOF
956d6950 8241#define TIME_WITH_SYS_TIME 1
ba479fd2 8242_ACEOF
956d6950
JL
8243
8244fi
8245
b61ff9c8
BS
8246echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
8247echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
18fc9bd4
RG
8248if test "${gcc_cv_header_string+set}" = set; then
8249 echo $ECHO_N "(cached) $ECHO_C" >&6
8250else
8251 cat >conftest.$ac_ext <<_ACEOF
8252/* confdefs.h. */
8253_ACEOF
8254cat confdefs.h >>conftest.$ac_ext
8255cat >>conftest.$ac_ext <<_ACEOF
8256/* end confdefs.h. */
8257#include <string.h>
8258#include <strings.h>
8259int
8260main ()
8261{
8262
8263 ;
8264 return 0;
8265}
8266_ACEOF
8267rm -f conftest.$ac_objext
b61ff9c8
BS
8268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8269 (eval $ac_compile) 2>conftest.er1
18fc9bd4
RG
8270 ac_status=$?
8271 grep -v '^ *+' conftest.er1 >conftest.err
8272 rm -f conftest.er1
8273 cat conftest.err >&5
8274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8275 (exit $ac_status); } &&
8276 { ac_try='test -z "$ac_c_werror_flag"
8277 || test ! -s conftest.err'
8278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8279 (eval $ac_try) 2>&5
8280 ac_status=$?
8281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8282 (exit $ac_status); }; } &&
8283 { ac_try='test -s conftest.$ac_objext'
8284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8285 (eval $ac_try) 2>&5
8286 ac_status=$?
8287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8288 (exit $ac_status); }; }; then
18fc9bd4
RG
8289 gcc_cv_header_string=yes
8290else
8291 echo "$as_me: failed program was:" >&5
8292sed 's/^/| /' conftest.$ac_ext >&5
8293
b61ff9c8 8294gcc_cv_header_string=no
18fc9bd4 8295fi
b61ff9c8 8296rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18fc9bd4 8297fi
b61ff9c8
BS
8298echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
8299echo "${ECHO_T}$gcc_cv_header_string" >&6
18fc9bd4
RG
8300if test $gcc_cv_header_string = yes; then
8301
8302cat >>confdefs.h <<\_ACEOF
8303#define STRING_WITH_STRINGS 1
8304_ACEOF
8305
8306fi
8307
b61ff9c8
BS
8308echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
8309echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
ba479fd2
NN
8310if test "${ac_cv_header_sys_wait_h+set}" = set; then
8311 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 8312else
ba479fd2 8313 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8314/* confdefs.h. */
8315_ACEOF
8316cat confdefs.h >>conftest.$ac_ext
8317cat >>conftest.$ac_ext <<_ACEOF
8318/* end confdefs.h. */
e9831ca0
KG
8319#include <sys/types.h>
8320#include <sys/wait.h>
8321#ifndef WEXITSTATUS
b61ff9c8 8322# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
8323#endif
8324#ifndef WIFEXITED
ba479fd2 8325# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 8326#endif
ba479fd2
NN
8327
8328int
8329main ()
8330{
8331 int s;
8332 wait (&s);
8333 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8334 ;
8335 return 0;
8336}
8337_ACEOF
8338rm -f conftest.$ac_objext
b61ff9c8
BS
8339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8340 (eval $ac_compile) 2>conftest.er1
ba479fd2 8341 ac_status=$?
86da66b5
HPN
8342 grep -v '^ *+' conftest.er1 >conftest.err
8343 rm -f conftest.er1
8344 cat conftest.err >&5
ba479fd2 8345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8346 (exit $ac_status); } &&
8347 { ac_try='test -z "$ac_c_werror_flag"
8348 || test ! -s conftest.err'
8349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8350 (eval $ac_try) 2>&5
8351 ac_status=$?
8352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8353 (exit $ac_status); }; } &&
8354 { ac_try='test -s conftest.$ac_objext'
8355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8356 (eval $ac_try) 2>&5
8357 ac_status=$?
8358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8359 (exit $ac_status); }; }; then
e9831ca0
KG
8360 ac_cv_header_sys_wait_h=yes
8361else
ba479fd2
NN
8362 echo "$as_me: failed program was:" >&5
8363sed 's/^/| /' conftest.$ac_ext >&5
8364
b61ff9c8 8365ac_cv_header_sys_wait_h=no
e9831ca0 8366fi
b61ff9c8 8367rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 8368fi
b61ff9c8
BS
8369echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8370echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 8371if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
8372
8373cat >>confdefs.h <<\_ACEOF
e9831ca0 8374#define HAVE_SYS_WAIT_H 1
ba479fd2 8375_ACEOF
6e3f3080 8376
63cf211a 8377fi
6e3f3080 8378
ba479fd2
NN
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
dfb77e37
KC
8400
8401for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 8402 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 8403 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 8404 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 8405do
ba479fd2 8406as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b61ff9c8
BS
8407echo "$as_me:$LINENO: checking for $ac_header" >&5
8408echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8409if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 8410 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8411else
18fc9bd4 8412 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8413/* confdefs.h. */
8414_ACEOF
8415cat confdefs.h >>conftest.$ac_ext
8416cat >>conftest.$ac_ext <<_ACEOF
8417/* end confdefs.h. */
8418#include <$ac_header>
8419_ACEOF
b61ff9c8
BS
8420if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8421 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
8422 ac_status=$?
8423 grep -v '^ *+' conftest.er1 >conftest.err
8424 rm -f conftest.er1
8425 cat conftest.err >&5
8426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8427 (exit $ac_status); } >/dev/null; then
8428 if test -s conftest.err; then
8429 ac_cpp_err=$ac_c_preproc_warn_flag
8430 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8431 else
8432 ac_cpp_err=
8433 fi
8434else
8435 ac_cpp_err=yes
8436fi
8437if test -z "$ac_cpp_err"; then
18fc9bd4 8438 eval "$as_ac_Header=yes"
ba479fd2
NN
8439else
8440 echo "$as_me: failed program was:" >&5
8441sed 's/^/| /' conftest.$ac_ext >&5
8442
18fc9bd4 8443 eval "$as_ac_Header=no"
ba479fd2
NN
8444fi
8445rm -f conftest.err conftest.$ac_ext
6e3f3080 8446fi
b61ff9c8
BS
8447echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8448echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
8449if test `eval echo '${'$as_ac_Header'}'` = yes; then
8450 cat >>confdefs.h <<_ACEOF
8451#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8452_ACEOF
8453
956d6950
JL
8454fi
8455done
8456
8457
f24af81b 8458# Check for thread headers.
b61ff9c8
BS
8459echo "$as_me:$LINENO: checking for thread.h" >&5
8460echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
ba479fd2
NN
8461if test "${ac_cv_header_thread_h+set}" = set; then
8462 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8463else
18fc9bd4 8464 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8465/* confdefs.h. */
8466_ACEOF
8467cat confdefs.h >>conftest.$ac_ext
8468cat >>conftest.$ac_ext <<_ACEOF
8469/* end confdefs.h. */
8470#include <thread.h>
8471_ACEOF
b61ff9c8
BS
8472if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8473 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
8474 ac_status=$?
8475 grep -v '^ *+' conftest.er1 >conftest.err
8476 rm -f conftest.er1
8477 cat conftest.err >&5
8478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8479 (exit $ac_status); } >/dev/null; then
8480 if test -s conftest.err; then
8481 ac_cpp_err=$ac_c_preproc_warn_flag
8482 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8483 else
8484 ac_cpp_err=
8485 fi
8486else
8487 ac_cpp_err=yes
8488fi
8489if test -z "$ac_cpp_err"; then
18fc9bd4 8490 ac_cv_header_thread_h=yes
ba479fd2
NN
8491else
8492 echo "$as_me: failed program was:" >&5
8493sed 's/^/| /' conftest.$ac_ext >&5
8494
18fc9bd4 8495 ac_cv_header_thread_h=no
ba479fd2
NN
8496fi
8497rm -f conftest.err conftest.$ac_ext
6e3f3080 8498fi
b61ff9c8
BS
8499echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8500echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 8501if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
8502 have_thread_h=yes
8503else
ba479fd2 8504 have_thread_h=
f24af81b
TT
8505fi
8506
b61ff9c8
BS
8507echo "$as_me:$LINENO: checking for pthread.h" >&5
8508echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
ba479fd2
NN
8509if test "${ac_cv_header_pthread_h+set}" = set; then
8510 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 8511else
18fc9bd4 8512 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8513/* confdefs.h. */
8514_ACEOF
8515cat confdefs.h >>conftest.$ac_ext
8516cat >>conftest.$ac_ext <<_ACEOF
8517/* end confdefs.h. */
8518#include <pthread.h>
8519_ACEOF
b61ff9c8
BS
8520if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8521 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
8522 ac_status=$?
8523 grep -v '^ *+' conftest.er1 >conftest.err
8524 rm -f conftest.er1
8525 cat conftest.err >&5
8526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8527 (exit $ac_status); } >/dev/null; then
8528 if test -s conftest.err; then
8529 ac_cpp_err=$ac_c_preproc_warn_flag
8530 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8531 else
8532 ac_cpp_err=
8533 fi
8534else
8535 ac_cpp_err=yes
8536fi
8537if test -z "$ac_cpp_err"; then
18fc9bd4 8538 ac_cv_header_pthread_h=yes
ba479fd2 8539else
18fc9bd4
RG
8540 echo "$as_me: failed program was:" >&5
8541sed 's/^/| /' conftest.$ac_ext >&5
8542
8543 ac_cv_header_pthread_h=no
8544fi
8545rm -f conftest.err conftest.$ac_ext
6e3f3080 8546fi
b61ff9c8
BS
8547echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8548echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 8549if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
8550 have_pthread_h=yes
8551else
ba479fd2 8552 have_pthread_h=
f24af81b
TT
8553fi
8554
8555
84c041a1 8556# These tests can't be done till we know if we have limits.h.
b61ff9c8
BS
8557echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8558echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
ba479fd2
NN
8559if test "${gcc_cv_decl_char_bit+set}" = set; then
8560 echo $ECHO_N "(cached) $ECHO_C" >&6
8561else
8562 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8563/* confdefs.h. */
8564_ACEOF
8565cat confdefs.h >>conftest.$ac_ext
8566cat >>conftest.$ac_ext <<_ACEOF
8567/* end confdefs.h. */
75e93faa
ZW
8568#ifdef HAVE_LIMITS_H
8569#include <limits.h>
8570#endif
8571#ifdef CHAR_BIT
8572found
8573#endif
ba479fd2 8574_ACEOF
75e93faa 8575if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8576 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
8577 gcc_cv_decl_char_bit=yes
8578else
75e93faa
ZW
8579 gcc_cv_decl_char_bit=no
8580fi
8581rm -f conftest*
8582
8583
8584fi
b61ff9c8
BS
8585echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8586echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 8587if test $gcc_cv_decl_char_bit = no; then
b61ff9c8
BS
8588 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8589echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
ba479fd2
NN
8590if test "${gcc_cv_c_nbby+set}" = set; then
8591 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
8592else
8593 i=8
8594 gcc_cv_c_nbby=
8595 while test $i -lt 65; do
ba479fd2 8596 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8597/* confdefs.h. */
8598_ACEOF
8599cat confdefs.h >>conftest.$ac_ext
8600cat >>conftest.$ac_ext <<_ACEOF
8601/* end confdefs.h. */
8602
8603int
8604main ()
8605{
4e70264f
ZW
8606switch(0) {
8607 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8608 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8609 ; }
ba479fd2
NN
8610 ;
8611 return 0;
8612}
8613_ACEOF
8614rm -f conftest.$ac_objext
b61ff9c8
BS
8615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8616 (eval $ac_compile) 2>conftest.er1
ba479fd2 8617 ac_status=$?
86da66b5
HPN
8618 grep -v '^ *+' conftest.er1 >conftest.err
8619 rm -f conftest.er1
8620 cat conftest.err >&5
ba479fd2 8621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8622 (exit $ac_status); } &&
8623 { ac_try='test -z "$ac_c_werror_flag"
8624 || test ! -s conftest.err'
8625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8626 (eval $ac_try) 2>&5
8627 ac_status=$?
8628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8629 (exit $ac_status); }; } &&
8630 { ac_try='test -s conftest.$ac_objext'
8631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8632 (eval $ac_try) 2>&5
8633 ac_status=$?
8634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8635 (exit $ac_status); }; }; then
4e70264f 8636 gcc_cv_c_nbby=$i; break
75e93faa 8637else
ba479fd2
NN
8638 echo "$as_me: failed program was:" >&5
8639sed 's/^/| /' conftest.$ac_ext >&5
8640
75e93faa 8641fi
b61ff9c8 8642rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
8643 i=`expr $i + 1`
8644 done
8645 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8646
8647fi
b61ff9c8
BS
8648echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8649echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 8650if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
8651 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8652echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8653 { (exit 1); exit 1; }; }
75e93faa 8654else
ba479fd2
NN
8655
8656cat >>confdefs.h <<_ACEOF
75e93faa 8657#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 8658_ACEOF
75e93faa
ZW
8659
8660fi
8661fi
b61ff9c8
BS
8662echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8663echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
ba479fd2
NN
8664if test "${ac_cv_c_bigendian+set}" = set; then
8665 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 8666else
9791c75c 8667 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 8668cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8669/* confdefs.h. */
8670_ACEOF
8671cat confdefs.h >>conftest.$ac_ext
8672cat >>conftest.$ac_ext <<_ACEOF
8673/* end confdefs.h. */
4977bab6
ZW
8674#include <sys/types.h>
8675#include <sys/param.h>
9791c75c 8676
ba479fd2
NN
8677int
8678main ()
8679{
b61ff9c8 8680#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4977bab6 8681 bogus endian macros
84c041a1 8682#endif
9791c75c 8683
ba479fd2
NN
8684 ;
8685 return 0;
8686}
8687_ACEOF
8688rm -f conftest.$ac_objext
b61ff9c8
BS
8689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8690 (eval $ac_compile) 2>conftest.er1
ba479fd2 8691 ac_status=$?
86da66b5
HPN
8692 grep -v '^ *+' conftest.er1 >conftest.err
8693 rm -f conftest.er1
8694 cat conftest.err >&5
ba479fd2 8695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
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
2f41c1d6 8710 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 8711cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8712/* confdefs.h. */
8713_ACEOF
8714cat confdefs.h >>conftest.$ac_ext
8715cat >>conftest.$ac_ext <<_ACEOF
8716/* end confdefs.h. */
4977bab6
ZW
8717#include <sys/types.h>
8718#include <sys/param.h>
9791c75c 8719
ba479fd2
NN
8720int
8721main ()
8722{
4977bab6
ZW
8723#if BYTE_ORDER != BIG_ENDIAN
8724 not big endian
84c041a1 8725#endif
9791c75c 8726
ba479fd2
NN
8727 ;
8728 return 0;
8729}
8730_ACEOF
8731rm -f conftest.$ac_objext
b61ff9c8
BS
8732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8733 (eval $ac_compile) 2>conftest.er1
ba479fd2 8734 ac_status=$?
86da66b5
HPN
8735 grep -v '^ *+' conftest.er1 >conftest.err
8736 rm -f conftest.er1
8737 cat conftest.err >&5
ba479fd2 8738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8739 (exit $ac_status); } &&
8740 { ac_try='test -z "$ac_c_werror_flag"
8741 || test ! -s conftest.err'
8742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8743 (eval $ac_try) 2>&5
8744 ac_status=$?
8745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8746 (exit $ac_status); }; } &&
8747 { ac_try='test -s conftest.$ac_objext'
8748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8749 (eval $ac_try) 2>&5
8750 ac_status=$?
8751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8752 (exit $ac_status); }; }; then
8753 ac_cv_c_bigendian=yes
8754else
8755 echo "$as_me: failed program was:" >&5
ba479fd2
NN
8756sed 's/^/| /' conftest.$ac_ext >&5
8757
b61ff9c8 8758ac_cv_c_bigendian=no
4977bab6 8759fi
b61ff9c8 8760rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8761else
ba479fd2
NN
8762 echo "$as_me: failed program was:" >&5
8763sed 's/^/| /' conftest.$ac_ext >&5
8764
b61ff9c8 8765# It does not; compile a test program.
9791c75c
KC
8766if test "$cross_compiling" = yes; then
8767 # try to guess the endianness by grepping values into an object file
8768 ac_cv_c_bigendian=unknown
8769 cat >conftest.$ac_ext <<_ACEOF
8770/* confdefs.h. */
8771_ACEOF
8772cat confdefs.h >>conftest.$ac_ext
8773cat >>conftest.$ac_ext <<_ACEOF
8774/* end confdefs.h. */
b61ff9c8
BS
8775short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8776short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9791c75c 8777void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
b61ff9c8
BS
8778short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8779short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9791c75c
KC
8780void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
8781int
8782main ()
8783{
8784 _ascii (); _ebcdic ();
8785 ;
8786 return 0;
8787}
8788_ACEOF
8789rm -f conftest.$ac_objext
b61ff9c8
BS
8790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8791 (eval $ac_compile) 2>conftest.er1
9791c75c
KC
8792 ac_status=$?
8793 grep -v '^ *+' conftest.er1 >conftest.err
8794 rm -f conftest.er1
8795 cat conftest.err >&5
8796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8797 (exit $ac_status); } &&
8798 { ac_try='test -z "$ac_c_werror_flag"
8799 || test ! -s conftest.err'
8800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8801 (eval $ac_try) 2>&5
8802 ac_status=$?
8803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8804 (exit $ac_status); }; } &&
8805 { ac_try='test -s conftest.$ac_objext'
8806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8807 (eval $ac_try) 2>&5
8808 ac_status=$?
8809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8810 (exit $ac_status); }; }; then
8b1f719a
PB
8811 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
8812 ac_cv_c_bigendian=yes
8813fi
9791c75c
KC
8814if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8815 if test "$ac_cv_c_bigendian" = unknown; then
8816 ac_cv_c_bigendian=no
8817 else
8818 # finding both strings is unlikely to happen, but who knows?
8819 ac_cv_c_bigendian=unknown
8820 fi
8821fi
8822else
8823 echo "$as_me: failed program was:" >&5
8824sed 's/^/| /' conftest.$ac_ext >&5
8825
4977bab6 8826fi
b61ff9c8 8827rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
8828else
8829 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8830/* confdefs.h. */
8831_ACEOF
8832cat confdefs.h >>conftest.$ac_ext
8833cat >>conftest.$ac_ext <<_ACEOF
8834/* end confdefs.h. */
9791c75c
KC
8835int
8836main ()
8837{
4977bab6
ZW
8838 /* Are we little or big endian? From Harbison&Steele. */
8839 union
8840 {
b61ff9c8
BS
8841 long l;
8842 char c[sizeof (long)];
4977bab6
ZW
8843 } u;
8844 u.l = 1;
b61ff9c8 8845 exit (u.c[sizeof (long) - 1] == 1);
4977bab6 8846}
ba479fd2
NN
8847_ACEOF
8848rm -f conftest$ac_exeext
b61ff9c8
BS
8849if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8850 (eval $ac_link) 2>&5
ba479fd2
NN
8851 ac_status=$?
8852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8853 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
8854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8855 (eval $ac_try) 2>&5
ba479fd2
NN
8856 ac_status=$?
8857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8858 (exit $ac_status); }; }; then
4977bab6
ZW
8859 ac_cv_c_bigendian=no
8860else
ba479fd2
NN
8861 echo "$as_me: program exited with status $ac_status" >&5
8862echo "$as_me: failed program was:" >&5
8863sed 's/^/| /' conftest.$ac_ext >&5
8864
8865( exit $ac_status )
8866ac_cv_c_bigendian=yes
4977bab6 8867fi
b61ff9c8 8868rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 8869fi
4977bab6 8870fi
b61ff9c8 8871rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8872fi
b61ff9c8
BS
8873echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8874echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
8875case $ac_cv_c_bigendian in
8876 yes)
ba479fd2
NN
8877
8878cat >>confdefs.h <<\_ACEOF
4977bab6 8879#define WORDS_BIGENDIAN 1
ba479fd2 8880_ACEOF
9791c75c
KC
8881 ;;
8882 no)
8883 ;;
8884 *)
8885 { { echo "$as_me:$LINENO: error: unknown endianness
8886presetting ac_cv_c_bigendian=no (or yes) will help" >&5
8887echo "$as_me: error: unknown endianness
8888presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
8889 { (exit 1); exit 1; }; } ;;
8890esac
84c041a1 8891
75e93faa 8892
73458fb7
NN
8893# --------
8894# UNSORTED
8895# --------
1e608388 8896
1e608388 8897
4e70264f
ZW
8898# These libraries may be used by collect2.
8899# We may need a special search path to get them linked.
b61ff9c8
BS
8900echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8901echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
ba479fd2
NN
8902if test "${gcc_cv_collect2_libs+set}" = set; then
8903 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
8904else
8905 save_LIBS="$LIBS"
7f2749d4 8906for libs in '' -lld -lmld \
4e70264f
ZW
8907 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8908 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8909do
8910 LIBS="$libs"
ba479fd2 8911 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8912/* confdefs.h. */
8913_ACEOF
8914cat confdefs.h >>conftest.$ac_ext
8915cat >>conftest.$ac_ext <<_ACEOF
8916/* end confdefs.h. */
8917
b61ff9c8 8918/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8919#ifdef __cplusplus
8920extern "C"
8921#endif
b61ff9c8
BS
8922/* We use char because int might match the return type of a gcc2
8923 builtin and then its argument prototype would still apply. */
ba479fd2
NN
8924char ldopen ();
8925int
8926main ()
8927{
b61ff9c8 8928ldopen ();
ba479fd2
NN
8929 ;
8930 return 0;
8931}
8932_ACEOF
8933rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
8934if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8935 (eval $ac_link) 2>conftest.er1
ba479fd2 8936 ac_status=$?
86da66b5
HPN
8937 grep -v '^ *+' conftest.er1 >conftest.err
8938 rm -f conftest.er1
8939 cat conftest.err >&5
ba479fd2 8940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
8941 (exit $ac_status); } &&
8942 { ac_try='test -z "$ac_c_werror_flag"
8943 || test ! -s conftest.err'
8944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8945 (eval $ac_try) 2>&5
8946 ac_status=$?
8947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8948 (exit $ac_status); }; } &&
8949 { ac_try='test -s conftest$ac_exeext'
8950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8951 (eval $ac_try) 2>&5
8952 ac_status=$?
8953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8954 (exit $ac_status); }; }; then
4e70264f
ZW
8955 gcc_cv_collect2_libs="$libs"; break
8956else
ba479fd2
NN
8957 echo "$as_me: failed program was:" >&5
8958sed 's/^/| /' conftest.$ac_ext >&5
8959
4e70264f 8960fi
b61ff9c8 8961rm -f conftest.err conftest.$ac_objext \
86da66b5 8962 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8963done
8964LIBS="$save_LIBS"
8965test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8966fi
b61ff9c8
BS
8967echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8968echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
8969case $gcc_cv_collect2_libs in
8970 "none required") ;;
8971 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8972esac
8973
8974
7f2749d4
RK
8975# When building Ada code on Alpha, we need exc_resume which is usually in
8976# -lexc. So test for it.
8977save_LIBS="$LIBS"
8978LIBS=
b61ff9c8
BS
8979echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8980echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
ba479fd2
NN
8981if test "${ac_cv_search_exc_resume+set}" = set; then
8982 echo $ECHO_N "(cached) $ECHO_C" >&6
8983else
8984 ac_func_search_save_LIBS=$LIBS
b61ff9c8 8985ac_cv_search_exc_resume=no
ba479fd2 8986cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8987/* confdefs.h. */
8988_ACEOF
8989cat confdefs.h >>conftest.$ac_ext
8990cat >>conftest.$ac_ext <<_ACEOF
8991/* end confdefs.h. */
7f2749d4 8992
b61ff9c8 8993/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8994#ifdef __cplusplus
8995extern "C"
8996#endif
b61ff9c8
BS
8997/* We use char because int might match the return type of a gcc2
8998 builtin and then its argument prototype would still apply. */
ba479fd2
NN
8999char exc_resume ();
9000int
9001main ()
9002{
b61ff9c8 9003exc_resume ();
ba479fd2
NN
9004 ;
9005 return 0;
9006}
9007_ACEOF
b61ff9c8
BS
9008rm -f conftest.$ac_objext conftest$ac_exeext
9009if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9010 (eval $ac_link) 2>conftest.er1
ba479fd2 9011 ac_status=$?
86da66b5
HPN
9012 grep -v '^ *+' conftest.er1 >conftest.err
9013 rm -f conftest.er1
9014 cat conftest.err >&5
ba479fd2 9015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9016 (exit $ac_status); } &&
9017 { ac_try='test -z "$ac_c_werror_flag"
9018 || test ! -s conftest.err'
9019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9020 (eval $ac_try) 2>&5
9021 ac_status=$?
9022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9023 (exit $ac_status); }; } &&
9024 { ac_try='test -s conftest$ac_exeext'
9025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9026 (eval $ac_try) 2>&5
9027 ac_status=$?
9028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9029 (exit $ac_status); }; }; then
9030 ac_cv_search_exc_resume="none required"
7f2749d4 9031else
ba479fd2
NN
9032 echo "$as_me: failed program was:" >&5
9033sed 's/^/| /' conftest.$ac_ext >&5
9034
ab22c1fa 9035fi
b61ff9c8
BS
9036rm -f conftest.err conftest.$ac_objext \
9037 conftest$ac_exeext conftest.$ac_ext
9038if test "$ac_cv_search_exc_resume" = no; then
9039 for ac_lib in exc; do
9040 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9041 cat >conftest.$ac_ext <<_ACEOF
9042/* confdefs.h. */
9043_ACEOF
9044cat confdefs.h >>conftest.$ac_ext
9045cat >>conftest.$ac_ext <<_ACEOF
9046/* end confdefs.h. */
2f41c1d6 9047
b61ff9c8
BS
9048/* Override any gcc2 internal prototype to avoid an error. */
9049#ifdef __cplusplus
9050extern "C"
9051#endif
9052/* We use char because int might match the return type of a gcc2
9053 builtin and then its argument prototype would still apply. */
9054char exc_resume ();
9055int
9056main ()
9057{
9058exc_resume ();
9059 ;
9060 return 0;
9061}
9062_ACEOF
9063rm -f conftest.$ac_objext conftest$ac_exeext
9064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9065 (eval $ac_link) 2>conftest.er1
9066 ac_status=$?
9067 grep -v '^ *+' conftest.er1 >conftest.err
9068 rm -f conftest.er1
9069 cat conftest.err >&5
9070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9071 (exit $ac_status); } &&
9072 { ac_try='test -z "$ac_c_werror_flag"
9073 || test ! -s conftest.err'
9074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9075 (eval $ac_try) 2>&5
9076 ac_status=$?
9077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9078 (exit $ac_status); }; } &&
9079 { ac_try='test -s conftest$ac_exeext'
9080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9081 (eval $ac_try) 2>&5
9082 ac_status=$?
9083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9084 (exit $ac_status); }; }; then
9085 ac_cv_search_exc_resume="-l$ac_lib"
9086break
1a4b763e 9087else
b61ff9c8
BS
9088 echo "$as_me: failed program was:" >&5
9089sed 's/^/| /' conftest.$ac_ext >&5
9090
9091fi
9092rm -f conftest.err conftest.$ac_objext \
9093 conftest$ac_exeext conftest.$ac_ext
9094 done
b8ec3cc8 9095fi
b8ec3cc8
EC
9096LIBS=$ac_func_search_save_LIBS
9097fi
b61ff9c8
BS
9098echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
9099echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
9100if test "$ac_cv_search_exc_resume" != no; then
9101 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
b8ec3cc8
EC
9102
9103fi
9104
dd7f7a6e 9105GNAT_LIBEXC="$LIBS"
b8ec3cc8
EC
9106LIBS="$save_LIBS"
9107
9108
dd7f7a6e
EC
9109# Some systems put ldexp and frexp in libm instead of libc; assume
9110# they're both in the same place. jcf-dump needs them.
9111save_LIBS="$LIBS"
9112LIBS=
b61ff9c8
BS
9113echo "$as_me:$LINENO: checking for library containing ldexp" >&5
9114echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
dd7f7a6e 9115if test "${ac_cv_search_ldexp+set}" = set; then
b8ec3cc8
EC
9116 echo $ECHO_N "(cached) $ECHO_C" >&6
9117else
dd7f7a6e 9118 ac_func_search_save_LIBS=$LIBS
b61ff9c8 9119ac_cv_search_ldexp=no
dd7f7a6e 9120cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9121/* confdefs.h. */
9122_ACEOF
9123cat confdefs.h >>conftest.$ac_ext
9124cat >>conftest.$ac_ext <<_ACEOF
9125/* end confdefs.h. */
dd7f7a6e 9126
b61ff9c8 9127/* Override any gcc2 internal prototype to avoid an error. */
dd7f7a6e
EC
9128#ifdef __cplusplus
9129extern "C"
9130#endif
b61ff9c8
BS
9131/* We use char because int might match the return type of a gcc2
9132 builtin and then its argument prototype would still apply. */
dd7f7a6e 9133char ldexp ();
ba479fd2
NN
9134int
9135main ()
9136{
b61ff9c8 9137ldexp ();
ba479fd2
NN
9138 ;
9139 return 0;
9140}
9141_ACEOF
b61ff9c8
BS
9142rm -f conftest.$ac_objext conftest$ac_exeext
9143if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9144 (eval $ac_link) 2>conftest.er1
dd7f7a6e
EC
9145 ac_status=$?
9146 grep -v '^ *+' conftest.er1 >conftest.err
9147 rm -f conftest.er1
9148 cat conftest.err >&5
9149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9150 (exit $ac_status); } &&
9151 { ac_try='test -z "$ac_c_werror_flag"
9152 || test ! -s conftest.err'
9153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9154 (eval $ac_try) 2>&5
9155 ac_status=$?
9156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9157 (exit $ac_status); }; } &&
9158 { ac_try='test -s conftest$ac_exeext'
9159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9160 (eval $ac_try) 2>&5
9161 ac_status=$?
9162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9163 (exit $ac_status); }; }; then
9164 ac_cv_search_ldexp="none required"
dd7f7a6e
EC
9165else
9166 echo "$as_me: failed program was:" >&5
9167sed 's/^/| /' conftest.$ac_ext >&5
9168
1a4b763e 9169fi
b61ff9c8
BS
9170rm -f conftest.err conftest.$ac_objext \
9171 conftest$ac_exeext conftest.$ac_ext
9172if test "$ac_cv_search_ldexp" = no; then
9173 for ac_lib in m; do
9174 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9175 cat >conftest.$ac_ext <<_ACEOF
9176/* confdefs.h. */
9177_ACEOF
9178cat confdefs.h >>conftest.$ac_ext
9179cat >>conftest.$ac_ext <<_ACEOF
9180/* end confdefs.h. */
2f41c1d6 9181
b61ff9c8
BS
9182/* Override any gcc2 internal prototype to avoid an error. */
9183#ifdef __cplusplus
9184extern "C"
9185#endif
9186/* We use char because int might match the return type of a gcc2
9187 builtin and then its argument prototype would still apply. */
9188char ldexp ();
9189int
9190main ()
9191{
9192ldexp ();
9193 ;
9194 return 0;
9195}
9196_ACEOF
9197rm -f conftest.$ac_objext conftest$ac_exeext
9198if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9199 (eval $ac_link) 2>conftest.er1
9200 ac_status=$?
9201 grep -v '^ *+' conftest.er1 >conftest.err
9202 rm -f conftest.er1
9203 cat conftest.err >&5
9204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9205 (exit $ac_status); } &&
9206 { ac_try='test -z "$ac_c_werror_flag"
9207 || test ! -s conftest.err'
9208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9209 (eval $ac_try) 2>&5
9210 ac_status=$?
9211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9212 (exit $ac_status); }; } &&
9213 { ac_try='test -s conftest$ac_exeext'
9214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9215 (eval $ac_try) 2>&5
9216 ac_status=$?
9217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9218 (exit $ac_status); }; }; then
9219 ac_cv_search_ldexp="-l$ac_lib"
9220break
1a4b763e 9221else
b61ff9c8
BS
9222 echo "$as_me: failed program was:" >&5
9223sed 's/^/| /' conftest.$ac_ext >&5
9224
9225fi
9226rm -f conftest.err conftest.$ac_objext \
9227 conftest$ac_exeext conftest.$ac_ext
9228 done
dd7f7a6e
EC
9229fi
9230LIBS=$ac_func_search_save_LIBS
9231fi
b61ff9c8
BS
9232echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
9233echo "${ECHO_T}$ac_cv_search_ldexp" >&6
9234if test "$ac_cv_search_ldexp" != no; then
9235 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
dd7f7a6e
EC
9236
9237fi
9238
9239LDEXP_LIB="$LIBS"
9240LIBS="$save_LIBS"
9241
9242
9243# Use <inttypes.h> only if it exists,
9244# doesn't clash with <sys/types.h>, and declares intmax_t.
b61ff9c8
BS
9245echo "$as_me:$LINENO: checking for inttypes.h" >&5
9246echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
dd7f7a6e
EC
9247if test "${gcc_cv_header_inttypes_h+set}" = set; then
9248 echo $ECHO_N "(cached) $ECHO_C" >&6
9249else
9250 cat >conftest.$ac_ext <<_ACEOF
9251/* confdefs.h. */
9252_ACEOF
9253cat confdefs.h >>conftest.$ac_ext
9254cat >>conftest.$ac_ext <<_ACEOF
9255/* end confdefs.h. */
9256#include <sys/types.h>
9257#include <inttypes.h>
9258int
9259main ()
9260{
9261intmax_t i = -1;
9262 ;
9263 return 0;
9264}
9265_ACEOF
9266rm -f conftest.$ac_objext
b61ff9c8
BS
9267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9268 (eval $ac_compile) 2>conftest.er1
dd7f7a6e
EC
9269 ac_status=$?
9270 grep -v '^ *+' conftest.er1 >conftest.err
9271 rm -f conftest.er1
9272 cat conftest.err >&5
9273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9274 (exit $ac_status); } &&
9275 { ac_try='test -z "$ac_c_werror_flag"
9276 || test ! -s conftest.err'
9277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9278 (eval $ac_try) 2>&5
9279 ac_status=$?
9280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9281 (exit $ac_status); }; } &&
9282 { ac_try='test -s conftest.$ac_objext'
9283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9284 (eval $ac_try) 2>&5
9285 ac_status=$?
9286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9287 (exit $ac_status); }; }; then
dd7f7a6e
EC
9288 gcc_cv_header_inttypes_h=yes
9289else
9290 echo "$as_me: failed program was:" >&5
9291sed 's/^/| /' conftest.$ac_ext >&5
9292
b61ff9c8 9293gcc_cv_header_inttypes_h=no
dd7f7a6e 9294fi
b61ff9c8 9295rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e
EC
9296fi
9297
b61ff9c8
BS
9298echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
9299echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
dd7f7a6e
EC
9300if test $gcc_cv_header_inttypes_h = yes; then
9301
9302cat >>confdefs.h <<\_ACEOF
9303#define HAVE_INTTYPES_H 1
9304_ACEOF
9305
0056a9b5 9306fi
956d6950 9307
c149cc37 9308
ba479fd2
NN
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
0d667716
KG
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
ba479fd2
NN
9337
9338
9339
9340
9341
9342
9343
9344
52a6edcc 9345for ac_func in times clock kill getrlimit setrlimit atoll atoq \
0d667716
KG
9346 sysconf strsignal getrusage nl_langinfo scandir alphasort \
9347 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9348 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 9349do
ba479fd2 9350as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b61ff9c8
BS
9351echo "$as_me:$LINENO: checking for $ac_func" >&5
9352echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9353if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
9354 echo $ECHO_N "(cached) $ECHO_C" >&6
9355else
9356 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9357/* confdefs.h. */
9358_ACEOF
9359cat confdefs.h >>conftest.$ac_ext
9360cat >>conftest.$ac_ext <<_ACEOF
9361/* end confdefs.h. */
86da66b5
HPN
9362/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9363 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9364#define $ac_func innocuous_$ac_func
9365
956d6950 9366/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9367 which can conflict with char $ac_func (); below.
9368 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9369 <limits.h> exists even on freestanding compilers. */
86da66b5 9370
ba479fd2
NN
9371#ifdef __STDC__
9372# include <limits.h>
9373#else
9374# include <assert.h>
9375#endif
86da66b5
HPN
9376
9377#undef $ac_func
9378
b61ff9c8 9379/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9380#ifdef __cplusplus
9381extern "C"
b61ff9c8 9382{
ba479fd2 9383#endif
b61ff9c8
BS
9384/* We use char because int might match the return type of a gcc2
9385 builtin and then its argument prototype would still apply. */
ba479fd2 9386char $ac_func ();
956d6950
JL
9387/* The GNU C library defines this for functions which it implements
9388 to always fail with ENOSYS. Some functions are actually named
9389 something starting with __ and the normal name is an alias. */
b61ff9c8 9390#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
956d6950 9391choke me
b61ff9c8
BS
9392#else
9393char (*f) () = $ac_func;
9394#endif
9395#ifdef __cplusplus
9396}
956d6950
JL
9397#endif
9398
ba479fd2
NN
9399int
9400main ()
9401{
b61ff9c8 9402return f != $ac_func;
ba479fd2
NN
9403 ;
9404 return 0;
9405}
9406_ACEOF
9407rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
9408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9409 (eval $ac_link) 2>conftest.er1
ba479fd2 9410 ac_status=$?
86da66b5
HPN
9411 grep -v '^ *+' conftest.er1 >conftest.err
9412 rm -f conftest.er1
9413 cat conftest.err >&5
ba479fd2 9414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9415 (exit $ac_status); } &&
9416 { ac_try='test -z "$ac_c_werror_flag"
9417 || test ! -s conftest.err'
9418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9419 (eval $ac_try) 2>&5
9420 ac_status=$?
9421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9422 (exit $ac_status); }; } &&
9423 { ac_try='test -s conftest$ac_exeext'
9424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9425 (eval $ac_try) 2>&5
9426 ac_status=$?
9427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9428 (exit $ac_status); }; }; then
ba479fd2
NN
9429 eval "$as_ac_var=yes"
9430else
9431 echo "$as_me: failed program was:" >&5
9432sed 's/^/| /' conftest.$ac_ext >&5
9433
b61ff9c8 9434eval "$as_ac_var=no"
ba479fd2 9435fi
b61ff9c8 9436rm -f conftest.err conftest.$ac_objext \
86da66b5 9437 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9438fi
b61ff9c8
BS
9439echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9440echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
9441if test `eval echo '${'$as_ac_var'}'` = yes; then
9442 cat >>confdefs.h <<_ACEOF
9443#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9444_ACEOF
956d6950 9445
956d6950
JL
9446fi
9447done
9448
6885fc87 9449
39f6c4c8 9450if test x$ac_cv_func_mbstowcs = xyes; then
b61ff9c8
BS
9451 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9452echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
ba479fd2
NN
9453if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9454 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9455else
9456 if test "$cross_compiling" = yes; then
9457 gcc_cv_func_mbstowcs_works=yes
9458else
ba479fd2 9459 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9460/* confdefs.h. */
9461_ACEOF
9462cat confdefs.h >>conftest.$ac_ext
9463cat >>conftest.$ac_ext <<_ACEOF
9464/* end confdefs.h. */
39f6c4c8
KW
9465#include <stdlib.h>
9466int main()
9467{
9468 mbstowcs(0, "", 0);
9469 return 0;
9470}
ba479fd2
NN
9471_ACEOF
9472rm -f conftest$ac_exeext
b61ff9c8
BS
9473if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9474 (eval $ac_link) 2>&5
ba479fd2
NN
9475 ac_status=$?
9476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9477 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
9478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9479 (eval $ac_try) 2>&5
ba479fd2
NN
9480 ac_status=$?
9481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9482 (exit $ac_status); }; }; then
39f6c4c8
KW
9483 gcc_cv_func_mbstowcs_works=yes
9484else
ba479fd2
NN
9485 echo "$as_me: program exited with status $ac_status" >&5
9486echo "$as_me: failed program was:" >&5
9487sed 's/^/| /' conftest.$ac_ext >&5
9488
9489( exit $ac_status )
9490gcc_cv_func_mbstowcs_works=no
39f6c4c8 9491fi
b61ff9c8 9492rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 9493fi
39f6c4c8 9494fi
b61ff9c8
BS
9495echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9496echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 9497 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
9498
9499cat >>confdefs.h <<\_ACEOF
39f6c4c8 9500#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 9501_ACEOF
39f6c4c8
KW
9502
9503 fi
9504fi
9505
b61ff9c8
BS
9506echo "$as_me:$LINENO: checking for ssize_t" >&5
9507echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
ba479fd2
NN
9508if test "${ac_cv_type_ssize_t+set}" = set; then
9509 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 9510else
ba479fd2 9511 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9512/* confdefs.h. */
9513_ACEOF
9514cat confdefs.h >>conftest.$ac_ext
9515cat >>conftest.$ac_ext <<_ACEOF
9516/* end confdefs.h. */
8b4fc07a
NN
9517$ac_includes_default
9518int
9519main ()
9520{
b61ff9c8 9521if ((ssize_t *) 0)
8b4fc07a 9522 return 0;
b61ff9c8 9523if (sizeof (ssize_t))
8b4fc07a
NN
9524 return 0;
9525 ;
9526 return 0;
9527}
ba479fd2 9528_ACEOF
8b4fc07a 9529rm -f conftest.$ac_objext
b61ff9c8
BS
9530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9531 (eval $ac_compile) 2>conftest.er1
8b4fc07a 9532 ac_status=$?
86da66b5
HPN
9533 grep -v '^ *+' conftest.er1 >conftest.err
9534 rm -f conftest.er1
9535 cat conftest.err >&5
8b4fc07a 9536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9537 (exit $ac_status); } &&
9538 { ac_try='test -z "$ac_c_werror_flag"
9539 || test ! -s conftest.err'
9540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9541 (eval $ac_try) 2>&5
9542 ac_status=$?
9543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9544 (exit $ac_status); }; } &&
9545 { ac_try='test -s conftest.$ac_objext'
9546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9547 (eval $ac_try) 2>&5
9548 ac_status=$?
9549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9550 (exit $ac_status); }; }; then
cb65112a 9551 ac_cv_type_ssize_t=yes
f12bc141 9552else
8b4fc07a
NN
9553 echo "$as_me: failed program was:" >&5
9554sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9555
b61ff9c8 9556ac_cv_type_ssize_t=no
8b4fc07a 9557fi
b61ff9c8 9558rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9559fi
b61ff9c8
BS
9560echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9561echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
9562if test $ac_cv_type_ssize_t = yes; then
9563 :
9564else
ba479fd2 9565
8b4fc07a 9566cat >>confdefs.h <<_ACEOF
f12bc141 9567#define ssize_t int
ba479fd2 9568_ACEOF
f12bc141
ZW
9569
9570fi
9571
0b9d02c6 9572
e256b8b6
DA
9573# Try to determine the array type of the second argument of getgroups
9574# for the target system (int or gid_t).
b61ff9c8
BS
9575echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9576echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
ba479fd2
NN
9577if test "${ac_cv_type_uid_t+set}" = set; then
9578 echo $ECHO_N "(cached) $ECHO_C" >&6
9579else
9580 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9581/* confdefs.h. */
9582_ACEOF
9583cat confdefs.h >>conftest.$ac_ext
9584cat >>conftest.$ac_ext <<_ACEOF
9585/* end confdefs.h. */
e256b8b6 9586#include <sys/types.h>
ba479fd2
NN
9587
9588_ACEOF
e256b8b6 9589if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9590 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
9591 ac_cv_type_uid_t=yes
9592else
e256b8b6
DA
9593 ac_cv_type_uid_t=no
9594fi
9595rm -f conftest*
9596
9597fi
b61ff9c8
BS
9598echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9599echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 9600if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
9601
9602cat >>confdefs.h <<\_ACEOF
e256b8b6 9603#define uid_t int
ba479fd2 9604_ACEOF
cafe096b 9605
ba479fd2
NN
9606
9607cat >>confdefs.h <<\_ACEOF
e256b8b6 9608#define gid_t int
ba479fd2 9609_ACEOF
e256b8b6
DA
9610
9611fi
9612
b61ff9c8
BS
9613echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9614echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
ba479fd2
NN
9615if test "${ac_cv_type_getgroups+set}" = set; then
9616 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
9617else
9618 if test "$cross_compiling" = yes; then
9619 ac_cv_type_getgroups=cross
9620else
ba479fd2 9621 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9622/* confdefs.h. */
9623_ACEOF
9624cat confdefs.h >>conftest.$ac_ext
9625cat >>conftest.$ac_ext <<_ACEOF
9626/* end confdefs.h. */
e256b8b6 9627/* Thanks to Mike Rendell for this test. */
b61ff9c8 9628#include <sys/types.h>
e256b8b6
DA
9629#define NGID 256
9630#undef MAX
9631#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
9632
9633int
9634main ()
e256b8b6
DA
9635{
9636 gid_t gidset[NGID];
9637 int i, n;
b61ff9c8 9638 union { gid_t gval; long lval; } val;
e256b8b6
DA
9639
9640 val.lval = -1;
9641 for (i = 0; i < NGID; i++)
9642 gidset[i] = val.gval;
9643 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 9644 gidset);
e256b8b6 9645 /* Exit non-zero if getgroups seems to require an array of ints. This
b61ff9c8
BS
9646 happens when gid_t is short but getgroups modifies an array of ints. */
9647 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 9648}
ba479fd2
NN
9649_ACEOF
9650rm -f conftest$ac_exeext
b61ff9c8
BS
9651if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9652 (eval $ac_link) 2>&5
ba479fd2
NN
9653 ac_status=$?
9654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9655 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
9656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9657 (eval $ac_try) 2>&5
ba479fd2
NN
9658 ac_status=$?
9659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9660 (exit $ac_status); }; }; then
9661 ac_cv_type_getgroups=gid_t
63cf211a 9662else
ba479fd2
NN
9663 echo "$as_me: program exited with status $ac_status" >&5
9664echo "$as_me: failed program was:" >&5
9665sed 's/^/| /' conftest.$ac_ext >&5
9666
9667( exit $ac_status )
9668ac_cv_type_getgroups=int
e256b8b6 9669fi
b61ff9c8 9670rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 9671fi
e256b8b6 9672if test $ac_cv_type_getgroups = cross; then
ba479fd2 9673 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9674/* confdefs.h. */
9675_ACEOF
9676cat confdefs.h >>conftest.$ac_ext
9677cat >>conftest.$ac_ext <<_ACEOF
9678/* end confdefs.h. */
e256b8b6 9679#include <unistd.h>
ba479fd2
NN
9680
9681_ACEOF
e256b8b6 9682if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9683 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
9684 ac_cv_type_getgroups=gid_t
9685else
e256b8b6
DA
9686 ac_cv_type_getgroups=int
9687fi
9688rm -f conftest*
9689
9690fi
9691fi
b61ff9c8
BS
9692echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9693echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 9694
ba479fd2 9695cat >>confdefs.h <<_ACEOF
e256b8b6 9696#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 9697_ACEOF
e256b8b6
DA
9698
9699
9700if test "${target}" = "${build}"; then
9701 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9702else
9703 case "${target}" in
9704 # This condition may need some tweaking. It should include all
9705 # targets where the array type of the second argument of getgroups
9706 # is int and the type of gid_t is not equivalent to int.
9707 *-*-sunos* | *-*-ultrix*)
9708 TARGET_GETGROUPS_T=int
9709 ;;
9710 *)
9711 TARGET_GETGROUPS_T=gid_t
9712 ;;
9713 esac
9714fi
9715
9716
3b0727a0 9717
b61ff9c8
BS
9718echo "$as_me:$LINENO: checking for sys/mman.h" >&5
9719echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
3b0727a0
MR
9720if test "${ac_cv_header_sys_mman_h+set}" = set; then
9721 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 9722else
18fc9bd4 9723 cat >conftest.$ac_ext <<_ACEOF
3b0727a0
MR
9724/* confdefs.h. */
9725_ACEOF
9726cat confdefs.h >>conftest.$ac_ext
9727cat >>conftest.$ac_ext <<_ACEOF
9728/* end confdefs.h. */
9729#include <sys/mman.h>
9730_ACEOF
b61ff9c8
BS
9731if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9732 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3b0727a0
MR
9733 ac_status=$?
9734 grep -v '^ *+' conftest.er1 >conftest.err
9735 rm -f conftest.er1
9736 cat conftest.err >&5
9737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9738 (exit $ac_status); } >/dev/null; then
9739 if test -s conftest.err; then
9740 ac_cpp_err=$ac_c_preproc_warn_flag
9741 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9742 else
9743 ac_cpp_err=
9744 fi
9745else
9746 ac_cpp_err=yes
9747fi
9748if test -z "$ac_cpp_err"; then
9749 ac_cv_header_sys_mman_h=yes
9750else
3b0727a0
MR
9751 echo "$as_me: failed program was:" >&5
9752sed 's/^/| /' conftest.$ac_ext >&5
9753
18fc9bd4 9754 ac_cv_header_sys_mman_h=no
3b0727a0
MR
9755fi
9756rm -f conftest.err conftest.$ac_ext
9757fi
b61ff9c8
BS
9758echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9759echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
3b0727a0
MR
9760if test $ac_cv_header_sys_mman_h = yes; then
9761 gcc_header_sys_mman_h=yes
9762else
9763 gcc_header_sys_mman_h=no
9764fi
9765
b61ff9c8
BS
9766echo "$as_me:$LINENO: checking for mmap" >&5
9767echo $ECHO_N "checking for mmap... $ECHO_C" >&6
3b0727a0
MR
9768if test "${ac_cv_func_mmap+set}" = set; then
9769 echo $ECHO_N "(cached) $ECHO_C" >&6
9770else
9771 cat >conftest.$ac_ext <<_ACEOF
9772/* confdefs.h. */
9773_ACEOF
9774cat confdefs.h >>conftest.$ac_ext
9775cat >>conftest.$ac_ext <<_ACEOF
9776/* end confdefs.h. */
9777/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9778 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9779#define mmap innocuous_mmap
9780
9781/* System header to define __stub macros and hopefully few prototypes,
9782 which can conflict with char mmap (); below.
9783 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9784 <limits.h> exists even on freestanding compilers. */
9785
9786#ifdef __STDC__
9787# include <limits.h>
9788#else
9789# include <assert.h>
9790#endif
9791
9792#undef mmap
9793
b61ff9c8 9794/* Override any gcc2 internal prototype to avoid an error. */
3b0727a0
MR
9795#ifdef __cplusplus
9796extern "C"
b61ff9c8 9797{
3b0727a0 9798#endif
b61ff9c8
BS
9799/* We use char because int might match the return type of a gcc2
9800 builtin and then its argument prototype would still apply. */
3b0727a0
MR
9801char mmap ();
9802/* The GNU C library defines this for functions which it implements
9803 to always fail with ENOSYS. Some functions are actually named
9804 something starting with __ and the normal name is an alias. */
b61ff9c8 9805#if defined (__stub_mmap) || defined (__stub___mmap)
3b0727a0 9806choke me
b61ff9c8
BS
9807#else
9808char (*f) () = mmap;
9809#endif
9810#ifdef __cplusplus
9811}
3b0727a0
MR
9812#endif
9813
9814int
9815main ()
9816{
b61ff9c8 9817return f != mmap;
3b0727a0
MR
9818 ;
9819 return 0;
9820}
9821_ACEOF
9822rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
9823if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9824 (eval $ac_link) 2>conftest.er1
3b0727a0
MR
9825 ac_status=$?
9826 grep -v '^ *+' conftest.er1 >conftest.err
9827 rm -f conftest.er1
9828 cat conftest.err >&5
9829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9830 (exit $ac_status); } &&
9831 { ac_try='test -z "$ac_c_werror_flag"
9832 || test ! -s conftest.err'
9833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9834 (eval $ac_try) 2>&5
9835 ac_status=$?
9836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9837 (exit $ac_status); }; } &&
9838 { ac_try='test -s conftest$ac_exeext'
9839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9840 (eval $ac_try) 2>&5
9841 ac_status=$?
9842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9843 (exit $ac_status); }; }; then
8b1f719a
PB
9844 ac_cv_func_mmap=yes
9845else
9846 echo "$as_me: failed program was:" >&5
9847sed 's/^/| /' conftest.$ac_ext >&5
a6ccdbab 9848
b61ff9c8 9849ac_cv_func_mmap=no
8b1f719a 9850fi
b61ff9c8 9851rm -f conftest.err conftest.$ac_objext \
3b0727a0
MR
9852 conftest$ac_exeext conftest.$ac_ext
9853fi
b61ff9c8
BS
9854echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9855echo "${ECHO_T}$ac_cv_func_mmap" >&6
3b0727a0
MR
9856if test $ac_cv_func_mmap = yes; then
9857 gcc_func_mmap=yes
9858else
9859 gcc_func_mmap=no
9860fi
9861
9862if test "$gcc_header_sys_mman_h" != yes \
9863 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
9864 gcc_cv_func_mmap_file=no
9865 gcc_cv_func_mmap_dev_zero=no
9866 gcc_cv_func_mmap_anon=no
9867else
b61ff9c8
BS
9868 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9869echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
ba479fd2
NN
9870if test "${gcc_cv_func_mmap_file+set}" = set; then
9871 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 9872else
ba479fd2 9873 # Add a system to this blacklist if
1072ec3f
ZW
9874 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9875 # memory area containing the same data that you'd get if you applied
9876 # read() to the same fd. The only system known to have a problem here
9877 # is VMS, where text files have record structure.
9878 case "$host_os" in
ba479fd2 9879 vms* | ultrix*)
1072ec3f
ZW
9880 gcc_cv_func_mmap_file=no ;;
9881 *)
9882 gcc_cv_func_mmap_file=yes;;
9883 esac
9884fi
b61ff9c8
BS
9885echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9886echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9887 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9888echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
ba479fd2
NN
9889if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9890 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9891else
9892 # Add a system to this blacklist if it has mmap() but /dev/zero
9893 # does not exist, or if mmapping /dev/zero does not give anonymous
9894 # zeroed pages with both the following properties:
9895 # 1. If you map N consecutive pages in with one call, and then
9896 # unmap any subset of those pages, the pages that were not
9897 # explicitly unmapped remain accessible.
9898 # 2. If you map two adjacent blocks of memory and then unmap them
9899 # both at once, they must both go away.
9900 # Systems known to be in this category are Windows (all variants),
9901 # VMS, and Darwin.
9902 case "$host_os" in
2ce240d3 9903 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
9904 gcc_cv_func_mmap_dev_zero=no ;;
9905 *)
9906 gcc_cv_func_mmap_dev_zero=yes;;
9907 esac
9908fi
b61ff9c8
BS
9909echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9910echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
9911
9912 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
b61ff9c8
BS
9913 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9914echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
ba479fd2
NN
9915if test "${gcc_cv_decl_map_anon+set}" = set; then
9916 echo $ECHO_N "(cached) $ECHO_C" >&6
9917else
9918 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9919/* confdefs.h. */
9920_ACEOF
9921cat confdefs.h >>conftest.$ac_ext
9922cat >>conftest.$ac_ext <<_ACEOF
9923/* end confdefs.h. */
1072ec3f
ZW
9924#include <sys/types.h>
9925#include <sys/mman.h>
9926#include <unistd.h>
9927
9928#ifndef MAP_ANONYMOUS
9929#define MAP_ANONYMOUS MAP_ANON
9930#endif
9931
ba479fd2
NN
9932int
9933main ()
9934{
1072ec3f 9935int n = MAP_ANONYMOUS;
ba479fd2
NN
9936 ;
9937 return 0;
9938}
9939_ACEOF
9940rm -f conftest.$ac_objext
b61ff9c8
BS
9941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9942 (eval $ac_compile) 2>conftest.er1
ba479fd2 9943 ac_status=$?
86da66b5
HPN
9944 grep -v '^ *+' conftest.er1 >conftest.err
9945 rm -f conftest.er1
9946 cat conftest.err >&5
ba479fd2 9947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
9948 (exit $ac_status); } &&
9949 { ac_try='test -z "$ac_c_werror_flag"
9950 || test ! -s conftest.err'
9951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9952 (eval $ac_try) 2>&5
9953 ac_status=$?
9954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9955 (exit $ac_status); }; } &&
9956 { ac_try='test -s conftest.$ac_objext'
9957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9958 (eval $ac_try) 2>&5
9959 ac_status=$?
9960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9961 (exit $ac_status); }; }; then
1072ec3f
ZW
9962 gcc_cv_decl_map_anon=yes
9963else
ba479fd2
NN
9964 echo "$as_me: failed program was:" >&5
9965sed 's/^/| /' conftest.$ac_ext >&5
9966
b61ff9c8 9967gcc_cv_decl_map_anon=no
1072ec3f 9968fi
b61ff9c8 9969rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 9970fi
b61ff9c8
BS
9971echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9972echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
9973
9974 if test $gcc_cv_decl_map_anon = no; then
9975 gcc_cv_func_mmap_anon=no
9976 else
b61ff9c8
BS
9977 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9978echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
ba479fd2
NN
9979if test "${gcc_cv_func_mmap_anon+set}" = set; then
9980 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9981else
9982 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9983 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9984 # doesn't give anonymous zeroed pages with the same properties listed
9985 # above for use of /dev/zero.
9986 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9987 case "$host_os" in
9988 vms* | cygwin* | pe | mingw* | sco* | udk* )
9989 gcc_cv_func_mmap_anon=no ;;
9990 *)
9991 gcc_cv_func_mmap_anon=yes;;
9992 esac
9993fi
b61ff9c8
BS
9994echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9995echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
9996 fi
9997fi
9998
9999if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
10000
10001cat >>confdefs.h <<\_ACEOF
1072ec3f 10002#define HAVE_MMAP_FILE 1
ba479fd2 10003_ACEOF
1072ec3f
ZW
10004
10005fi
10006if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
10007
10008cat >>confdefs.h <<\_ACEOF
1072ec3f 10009#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 10010_ACEOF
1072ec3f
ZW
10011
10012fi
10013if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
10014
10015cat >>confdefs.h <<\_ACEOF
1072ec3f 10016#define HAVE_MMAP_ANON 1
ba479fd2 10017_ACEOF
1072ec3f
ZW
10018
10019fi
10020
b27d2bd5
MK
10021
10022case "${host}" in
ee262b6f 10023*-*-*vms*)
ba479fd2 10024 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
10025 # won't work, and it isn't easily adaptable. It makes more sense to
10026 # just force it.
10027 ac_cv_func_vfork_works=yes
10028 ;;
b27d2bd5 10029esac
b61ff9c8
BS
10030echo "$as_me:$LINENO: checking for pid_t" >&5
10031echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
ba479fd2
NN
10032if test "${ac_cv_type_pid_t+set}" = set; then
10033 echo $ECHO_N "(cached) $ECHO_C" >&6
10034else
10035 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10036/* confdefs.h. */
10037_ACEOF
10038cat confdefs.h >>conftest.$ac_ext
10039cat >>conftest.$ac_ext <<_ACEOF
10040/* end confdefs.h. */
10041$ac_includes_default
10042int
10043main ()
10044{
b61ff9c8 10045if ((pid_t *) 0)
ba479fd2 10046 return 0;
b61ff9c8 10047if (sizeof (pid_t))
ba479fd2
NN
10048 return 0;
10049 ;
10050 return 0;
10051}
10052_ACEOF
10053rm -f conftest.$ac_objext
b61ff9c8
BS
10054if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10055 (eval $ac_compile) 2>conftest.er1
ba479fd2 10056 ac_status=$?
86da66b5
HPN
10057 grep -v '^ *+' conftest.er1 >conftest.err
10058 rm -f conftest.er1
10059 cat conftest.err >&5
ba479fd2 10060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10061 (exit $ac_status); } &&
10062 { ac_try='test -z "$ac_c_werror_flag"
10063 || test ! -s conftest.err'
10064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10065 (eval $ac_try) 2>&5
10066 ac_status=$?
10067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10068 (exit $ac_status); }; } &&
10069 { ac_try='test -s conftest.$ac_objext'
10070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10071 (eval $ac_try) 2>&5
10072 ac_status=$?
10073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10074 (exit $ac_status); }; }; then
cb65112a 10075 ac_cv_type_pid_t=yes
c375c43b 10076else
ba479fd2
NN
10077 echo "$as_me: failed program was:" >&5
10078sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10079
b61ff9c8 10080ac_cv_type_pid_t=no
ba479fd2 10081fi
b61ff9c8 10082rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10083fi
b61ff9c8
BS
10084echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10085echo "${ECHO_T}$ac_cv_type_pid_t" >&6
ba479fd2
NN
10086if test $ac_cv_type_pid_t = yes; then
10087 :
10088else
10089
10090cat >>confdefs.h <<_ACEOF
c375c43b 10091#define pid_t int
ba479fd2 10092_ACEOF
c375c43b
KG
10093
10094fi
10095
ba479fd2 10096
b61ff9c8
BS
10097
10098for ac_header in unistd.h vfork.h
ba479fd2
NN
10099do
10100as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b61ff9c8
BS
10101echo "$as_me:$LINENO: checking for $ac_header" >&5
10102echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10103if eval "test \"\${$as_ac_Header+set}\" = set"; then
ba479fd2 10104 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10105else
18fc9bd4 10106 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10107/* confdefs.h. */
10108_ACEOF
10109cat confdefs.h >>conftest.$ac_ext
10110cat >>conftest.$ac_ext <<_ACEOF
10111/* end confdefs.h. */
10112#include <$ac_header>
10113_ACEOF
b61ff9c8
BS
10114if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10115 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ba479fd2
NN
10116 ac_status=$?
10117 grep -v '^ *+' conftest.er1 >conftest.err
10118 rm -f conftest.er1
10119 cat conftest.err >&5
10120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10121 (exit $ac_status); } >/dev/null; then
10122 if test -s conftest.err; then
10123 ac_cpp_err=$ac_c_preproc_warn_flag
10124 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10125 else
10126 ac_cpp_err=
10127 fi
10128else
10129 ac_cpp_err=yes
10130fi
10131if test -z "$ac_cpp_err"; then
18fc9bd4 10132 eval "$as_ac_Header=yes"
ba479fd2
NN
10133else
10134 echo "$as_me: failed program was:" >&5
10135sed 's/^/| /' conftest.$ac_ext >&5
10136
18fc9bd4 10137 eval "$as_ac_Header=no"
ba479fd2
NN
10138fi
10139rm -f conftest.err conftest.$ac_ext
c375c43b 10140fi
b61ff9c8
BS
10141echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10142echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
10143if test `eval echo '${'$as_ac_Header'}'` = yes; then
10144 cat >>confdefs.h <<_ACEOF
10145#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10146_ACEOF
6e3f3080
NN
10147
10148fi
ba479fd2
NN
10149done
10150
10151
10152
10153for ac_func in fork vfork
10154do
10155as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b61ff9c8
BS
10156echo "$as_me:$LINENO: checking for $ac_func" >&5
10157echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10158if eval "test \"\${$as_ac_var+set}\" = set"; then
ba479fd2
NN
10159 echo $ECHO_N "(cached) $ECHO_C" >&6
10160else
10161 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10162/* confdefs.h. */
10163_ACEOF
10164cat confdefs.h >>conftest.$ac_ext
10165cat >>conftest.$ac_ext <<_ACEOF
10166/* end confdefs.h. */
86da66b5
HPN
10167/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10168 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10169#define $ac_func innocuous_$ac_func
10170
c375c43b 10171/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10172 which can conflict with char $ac_func (); below.
10173 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10174 <limits.h> exists even on freestanding compilers. */
86da66b5 10175
ba479fd2
NN
10176#ifdef __STDC__
10177# include <limits.h>
10178#else
10179# include <assert.h>
10180#endif
86da66b5
HPN
10181
10182#undef $ac_func
10183
b61ff9c8 10184/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10185#ifdef __cplusplus
10186extern "C"
b61ff9c8 10187{
ba479fd2 10188#endif
b61ff9c8
BS
10189/* We use char because int might match the return type of a gcc2
10190 builtin and then its argument prototype would still apply. */
ba479fd2 10191char $ac_func ();
c375c43b
KG
10192/* The GNU C library defines this for functions which it implements
10193 to always fail with ENOSYS. Some functions are actually named
10194 something starting with __ and the normal name is an alias. */
b61ff9c8 10195#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b 10196choke me
b61ff9c8
BS
10197#else
10198char (*f) () = $ac_func;
10199#endif
10200#ifdef __cplusplus
10201}
c375c43b
KG
10202#endif
10203
ba479fd2
NN
10204int
10205main ()
10206{
b61ff9c8 10207return f != $ac_func;
ba479fd2
NN
10208 ;
10209 return 0;
10210}
10211_ACEOF
10212rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
10213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10214 (eval $ac_link) 2>conftest.er1
ba479fd2 10215 ac_status=$?
86da66b5
HPN
10216 grep -v '^ *+' conftest.er1 >conftest.err
10217 rm -f conftest.er1
10218 cat conftest.err >&5
ba479fd2 10219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
10220 (exit $ac_status); } &&
10221 { ac_try='test -z "$ac_c_werror_flag"
10222 || test ! -s conftest.err'
10223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10224 (eval $ac_try) 2>&5
10225 ac_status=$?
10226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10227 (exit $ac_status); }; } &&
10228 { ac_try='test -s conftest$ac_exeext'
10229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10230 (eval $ac_try) 2>&5
10231 ac_status=$?
10232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10233 (exit $ac_status); }; }; then
ba479fd2
NN
10234 eval "$as_ac_var=yes"
10235else
10236 echo "$as_me: failed program was:" >&5
10237sed 's/^/| /' conftest.$ac_ext >&5
10238
b61ff9c8 10239eval "$as_ac_var=no"
ba479fd2 10240fi
b61ff9c8 10241rm -f conftest.err conftest.$ac_objext \
86da66b5 10242 conftest$ac_exeext conftest.$ac_ext
ba479fd2 10243fi
b61ff9c8
BS
10244echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10245echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
ba479fd2
NN
10246if test `eval echo '${'$as_ac_var'}'` = yes; then
10247 cat >>confdefs.h <<_ACEOF
10248#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10249_ACEOF
10250
c375c43b 10251fi
ba479fd2 10252done
c375c43b 10253
ba479fd2 10254if test "x$ac_cv_func_fork" = xyes; then
b61ff9c8
BS
10255 echo "$as_me:$LINENO: checking for working fork" >&5
10256echo $ECHO_N "checking for working fork... $ECHO_C" >&6
ba479fd2
NN
10257if test "${ac_cv_func_fork_works+set}" = set; then
10258 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10259else
ba479fd2
NN
10260 if test "$cross_compiling" = yes; then
10261 ac_cv_func_fork_works=cross
10262else
10263 cat >conftest.$ac_ext <<_ACEOF
b61ff9c8
BS
10264/* By Ruediger Kuhlmann. */
10265 #include <sys/types.h>
10266 #if HAVE_UNISTD_H
10267 # include <unistd.h>
10268 #endif
10269 /* Some systems only have a dummy stub for fork() */
10270 int main ()
10271 {
10272 if (fork() < 0)
10273 exit (1);
10274 exit (0);
10275 }
1a4b763e
BS
10276_ACEOF
10277rm -f conftest$ac_exeext
b61ff9c8
BS
10278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10279 (eval $ac_link) 2>&5
1a4b763e
BS
10280 ac_status=$?
10281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
10283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10284 (eval $ac_try) 2>&5
ba479fd2
NN
10285 ac_status=$?
10286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10287 (exit $ac_status); }; }; then
10288 ac_cv_func_fork_works=yes
10289else
10290 echo "$as_me: program exited with status $ac_status" >&5
10291echo "$as_me: failed program was:" >&5
10292sed 's/^/| /' conftest.$ac_ext >&5
10293
10294( exit $ac_status )
10295ac_cv_func_fork_works=no
10296fi
b61ff9c8 10297rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
10298fi
10299fi
b61ff9c8
BS
10300echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10301echo "${ECHO_T}$ac_cv_func_fork_works" >&6
ba479fd2
NN
10302
10303else
10304 ac_cv_func_fork_works=$ac_cv_func_fork
10305fi
10306if test "x$ac_cv_func_fork_works" = xcross; then
10307 case $host in
10308 *-*-amigaos* | *-*-msdosdjgpp*)
10309 # Override, as these systems have only a dummy fork() stub
10310 ac_cv_func_fork_works=no
10311 ;;
10312 *)
10313 ac_cv_func_fork_works=yes
10314 ;;
10315 esac
10316 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10317echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 10318fi
c375c43b 10319ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2 10320if test "x$ac_cv_func_vfork" = xyes; then
b61ff9c8
BS
10321 echo "$as_me:$LINENO: checking for working vfork" >&5
10322echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
ba479fd2
NN
10323if test "${ac_cv_func_vfork_works+set}" = set; then
10324 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10325else
ba479fd2
NN
10326 if test "$cross_compiling" = yes; then
10327 ac_cv_func_vfork_works=cross
10328else
10329 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10330/* confdefs.h. */
10331_ACEOF
10332cat confdefs.h >>conftest.$ac_ext
10333cat >>conftest.$ac_ext <<_ACEOF
10334/* end confdefs.h. */
c375c43b 10335/* Thanks to Paul Eggert for this test. */
b61ff9c8
BS
10336#include <stdio.h>
10337#include <stdlib.h>
10338#include <sys/types.h>
10339#include <sys/stat.h>
ba479fd2 10340#include <sys/wait.h>
b61ff9c8
BS
10341#if HAVE_UNISTD_H
10342# include <unistd.h>
10343#endif
10344#if HAVE_VFORK_H
ba479fd2 10345# include <vfork.h>
c375c43b
KG
10346#endif
10347/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
10348 argument registers are propagated back to the parent. The compiler
10349 is told about this with #include <vfork.h>, but some compilers
10350 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10351 static variable whose address is put into a register that is
10352 clobbered by the vfork. */
10353static void
c375c43b
KG
10354#ifdef __cplusplus
10355sparc_address_test (int arg)
ba479fd2 10356# else
c375c43b
KG
10357sparc_address_test (arg) int arg;
10358#endif
10359{
10360 static pid_t child;
10361 if (!child) {
10362 child = vfork ();
10363 if (child < 0) {
10364 perror ("vfork");
10365 _exit(2);
10366 }
10367 if (!child) {
10368 arg = getpid();
10369 write(-1, "", 0);
10370 _exit (arg);
10371 }
10372 }
10373}
ba479fd2
NN
10374
10375int
10376main ()
10377{
c375c43b
KG
10378 pid_t parent = getpid ();
10379 pid_t child;
10380
ba479fd2 10381 sparc_address_test (0);
c375c43b
KG
10382
10383 child = vfork ();
10384
10385 if (child == 0) {
ba479fd2
NN
10386 /* Here is another test for sparc vfork register problems. This
10387 test uses lots of local variables, at least as many local
10388 variables as main has allocated so far including compiler
10389 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10390 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10391 reuse the register of parent for one of the local variables,
10392 since it will think that parent can't possibly be used any more
10393 in this routine. Assigning to the local variable will thus
10394 munge parent in the parent process. */
c375c43b
KG
10395 pid_t
10396 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10397 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10398 /* Convince the compiler that p..p7 are live; otherwise, it might
10399 use the same hardware register for all 8 local variables. */
10400 if (p != p1 || p != p2 || p != p3 || p != p4
10401 || p != p5 || p != p6 || p != p7)
10402 _exit(1);
10403
ba479fd2
NN
10404 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10405 from child file descriptors. If the child closes a descriptor
10406 before it execs or exits, this munges the parent's descriptor
10407 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10408 _exit(close(fileno(stdout)) != 0);
10409 } else {
10410 int status;
10411 struct stat st;
10412
10413 while (wait(&status) != child)
10414 ;
b61ff9c8 10415 exit(
c375c43b
KG
10416 /* Was there some problem with vforking? */
10417 child < 0
10418
10419 /* Did the child fail? (This shouldn't happen.) */
10420 || status
10421
10422 /* Did the vfork/compiler bug occur? */
10423 || parent != getpid()
10424
10425 /* Did the file descriptor bug occur? */
10426 || fstat(fileno(stdout), &st) != 0
10427 );
10428 }
10429}
ba479fd2
NN
10430_ACEOF
10431rm -f conftest$ac_exeext
b61ff9c8
BS
10432if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10433 (eval $ac_link) 2>&5
ba479fd2
NN
10434 ac_status=$?
10435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10436 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
10437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10438 (eval $ac_try) 2>&5
ba479fd2
NN
10439 ac_status=$?
10440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10441 (exit $ac_status); }; }; then
c375c43b
KG
10442 ac_cv_func_vfork_works=yes
10443else
ba479fd2
NN
10444 echo "$as_me: program exited with status $ac_status" >&5
10445echo "$as_me: failed program was:" >&5
10446sed 's/^/| /' conftest.$ac_ext >&5
10447
10448( exit $ac_status )
10449ac_cv_func_vfork_works=no
cafe096b 10450fi
b61ff9c8 10451rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10452fi
ba479fd2 10453fi
b61ff9c8
BS
10454echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10455echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 10456
ba479fd2
NN
10457fi;
10458if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 10459 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10460 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10461echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
10462fi
10463
ba479fd2
NN
10464if test "x$ac_cv_func_vfork_works" = xyes; then
10465
10466cat >>confdefs.h <<\_ACEOF
10467#define HAVE_WORKING_VFORK 1
10468_ACEOF
10469
10470else
10471
10472cat >>confdefs.h <<\_ACEOF
c375c43b 10473#define vfork fork
ba479fd2 10474_ACEOF
c375c43b
KG
10475
10476fi
ba479fd2
NN
10477if test "x$ac_cv_func_fork_works" = xyes; then
10478
10479cat >>confdefs.h <<\_ACEOF
10480#define HAVE_WORKING_FORK 1
10481_ACEOF
10482
10483fi
10484
c375c43b 10485
81bf3d9e 10486
dfb77e37
KC
10487 if test "X$prefix" = "XNONE"; then
10488 acl_final_prefix="$ac_default_prefix"
10489 else
10490 acl_final_prefix="$prefix"
10491 fi
10492 if test "X$exec_prefix" = "XNONE"; then
10493 acl_final_exec_prefix='${prefix}'
10494 else
10495 acl_final_exec_prefix="$exec_prefix"
10496 fi
10497 acl_save_prefix="$prefix"
10498 prefix="$acl_final_prefix"
10499 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10500 prefix="$acl_save_prefix"
f91abfce
TT
10501
10502
b61ff9c8 10503# Check whether --with-gnu-ld or --without-gnu-ld was given.
dfb77e37 10504if test "${with_gnu_ld+set}" = set; then
b61ff9c8
BS
10505 withval="$with_gnu_ld"
10506 test "$withval" = no || with_gnu_ld=yes
ba479fd2 10507else
dfb77e37 10508 with_gnu_ld=no
b61ff9c8 10509fi;
dfb77e37
KC
10510# Prepare PATH_SEPARATOR.
10511# The user is always right.
10512if test "${PATH_SEPARATOR+set}" != set; then
10513 echo "#! /bin/sh" >conf$$.sh
10514 echo "exit 0" >>conf$$.sh
10515 chmod +x conf$$.sh
10516 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10517 PATH_SEPARATOR=';'
ba479fd2 10518 else
dfb77e37 10519 PATH_SEPARATOR=:
ba479fd2 10520 fi
dfb77e37
KC
10521 rm -f conf$$.sh
10522fi
10523ac_prog=ld
10524if test "$GCC" = yes; then
10525 # Check if gcc -print-prog-name=ld gives a path.
b61ff9c8
BS
10526 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10527echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
dfb77e37
KC
10528 case $host in
10529 *-*-mingw*)
10530 # gcc leaves a trailing carriage return which upsets mingw
10531 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10532 *)
10533 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10534 esac
10535 case $ac_prog in
10536 # Accept absolute paths.
10537 [\\/]* | [A-Za-z]:[\\/]*)
10538 re_direlt='/[^/][^/]*/\.\./'
10539 # Canonicalize the path of ld
10540 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10541 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10542 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10543 done
10544 test -z "$LD" && LD="$ac_prog"
10545 ;;
10546 "")
10547 # If it fails, then pretend we aren't using GCC.
10548 ac_prog=ld
10549 ;;
10550 *)
10551 # If it is relative, then search for the first ld in PATH.
10552 with_gnu_ld=unknown
10553 ;;
10554 esac
10555elif test "$with_gnu_ld" = yes; then
b61ff9c8
BS
10556 echo "$as_me:$LINENO: checking for GNU ld" >&5
10557echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 10558else
b61ff9c8
BS
10559 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10560echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 10561fi
dfb77e37
KC
10562if test "${acl_cv_path_LD+set}" = set; then
10563 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 10564else
dfb77e37
KC
10565 if test -z "$LD"; then
10566 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10567 for ac_dir in $PATH; do
10568 test -z "$ac_dir" && ac_dir=.
10569 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10570 acl_cv_path_LD="$ac_dir/$ac_prog"
10571 # Check to see if the program is GNU ld. I'd rather use --version,
10572 # but apparently some GNU ld's only accept -v.
10573 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
10574 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10575 test "$with_gnu_ld" != no && break
10576 else
10577 test "$with_gnu_ld" != yes && break
10578 fi
dfb77e37
KC
10579 fi
10580 done
10581 IFS="$ac_save_ifs"
10582else
10583 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10584fi
10585fi
ba479fd2 10586
dfb77e37
KC
10587LD="$acl_cv_path_LD"
10588if test -n "$LD"; then
b61ff9c8
BS
10589 echo "$as_me:$LINENO: result: $LD" >&5
10590echo "${ECHO_T}$LD" >&6
dfb77e37 10591else
b61ff9c8
BS
10592 echo "$as_me:$LINENO: result: no" >&5
10593echo "${ECHO_T}no" >&6
ba479fd2 10594fi
dfb77e37
KC
10595test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10596echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10597 { (exit 1); exit 1; }; }
b61ff9c8
BS
10598echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10599echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
dfb77e37
KC
10600if test "${acl_cv_prog_gnu_ld+set}" = set; then
10601 echo $ECHO_N "(cached) $ECHO_C" >&6
10602else
10603 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
10604if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10605 acl_cv_prog_gnu_ld=yes
10606else
10607 acl_cv_prog_gnu_ld=no
10608fi
dfb77e37 10609fi
b61ff9c8
BS
10610echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10611echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
dfb77e37
KC
10612with_gnu_ld=$acl_cv_prog_gnu_ld
10613
10614
10615
b61ff9c8
BS
10616 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10617echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
dfb77e37
KC
10618if test "${acl_cv_rpath+set}" = set; then
10619 echo $ECHO_N "(cached) $ECHO_C" >&6
10620else
10621
10622 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10623 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10624 . ./conftest.sh
10625 rm -f ./conftest.sh
10626 acl_cv_rpath=done
ba479fd2 10627
eb158727 10628fi
b61ff9c8
BS
10629echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10630echo "${ECHO_T}$acl_cv_rpath" >&6
dfb77e37
KC
10631 wl="$acl_cv_wl"
10632 libext="$acl_cv_libext"
10633 shlibext="$acl_cv_shlibext"
10634 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10635 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10636 hardcode_direct="$acl_cv_hardcode_direct"
10637 hardcode_minus_L="$acl_cv_hardcode_minus_L"
b61ff9c8 10638 # Check whether --enable-rpath or --disable-rpath was given.
dfb77e37 10639if test "${enable_rpath+set}" = set; then
b61ff9c8
BS
10640 enableval="$enable_rpath"
10641 :
dfb77e37
KC
10642else
10643 enable_rpath=yes
b61ff9c8 10644fi;
8b1f719a 10645
a6ccdbab 10646
dfb77e37
KC
10647
10648
10649
10650
10651
b639c3c2
JJ
10652 use_additional=yes
10653
10654 acl_save_prefix="$prefix"
10655 prefix="$acl_final_prefix"
10656 acl_save_exec_prefix="$exec_prefix"
10657 exec_prefix="$acl_final_exec_prefix"
10658
10659 eval additional_includedir=\"$includedir\"
10660 eval additional_libdir=\"$libdir\"
10661
10662 exec_prefix="$acl_save_exec_prefix"
10663 prefix="$acl_save_prefix"
dfb77e37
KC
10664
10665
b61ff9c8 10666# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
8b1f719a 10667if test "${with_libiconv_prefix+set}" = set; then
b61ff9c8
BS
10668 withval="$with_libiconv_prefix"
10669
8b1f719a 10670 if test "X$withval" = "Xno"; then
b639c3c2 10671 use_additional=no
8b1f719a
PB
10672 else
10673 if test "X$withval" = "X"; then
dfb77e37
KC
10674
10675 acl_save_prefix="$prefix"
10676 prefix="$acl_final_prefix"
10677 acl_save_exec_prefix="$exec_prefix"
10678 exec_prefix="$acl_final_exec_prefix"
10679
b639c3c2
JJ
10680 eval additional_includedir=\"$includedir\"
10681 eval additional_libdir=\"$libdir\"
dfb77e37
KC
10682
10683 exec_prefix="$acl_save_exec_prefix"
10684 prefix="$acl_save_prefix"
10685
8b1f719a 10686 else
b639c3c2
JJ
10687 additional_includedir="$withval/include"
10688 additional_libdir="$withval/lib"
8b1f719a
PB
10689 fi
10690 fi
10691
b61ff9c8 10692fi;
dfb77e37
KC
10693 LIBICONV=
10694 LTLIBICONV=
10695 INCICONV=
10696 rpathdirs=
10697 ltrpathdirs=
10698 names_already_handled=
10699 names_next_round='iconv '
10700 while test -n "$names_next_round"; do
10701 names_this_round="$names_next_round"
10702 names_next_round=
10703 for name in $names_this_round; do
10704 already_handled=
10705 for n in $names_already_handled; do
10706 if test "$n" = "$name"; then
10707 already_handled=yes
10708 break
10709 fi
10710 done
10711 if test -z "$already_handled"; then
10712 names_already_handled="$names_already_handled $name"
10713 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10714 eval value=\"\$HAVE_LIB$uppername\"
10715 if test -n "$value"; then
10716 if test "$value" = yes; then
10717 eval value=\"\$LIB$uppername\"
10718 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10719 eval value=\"\$LTLIB$uppername\"
10720 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10721 else
10722 :
10723 fi
10724 else
10725 found_dir=
10726 found_la=
10727 found_so=
10728 found_a=
b639c3c2
JJ
10729 if test $use_additional = yes; then
10730 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10731 found_dir="$additional_libdir"
10732 found_so="$additional_libdir/lib$name.$shlibext"
10733 if test -f "$additional_libdir/lib$name.la"; then
10734 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
10735 fi
10736 else
b639c3c2
JJ
10737 if test -f "$additional_libdir/lib$name.$libext"; then
10738 found_dir="$additional_libdir"
10739 found_a="$additional_libdir/lib$name.$libext"
10740 if test -f "$additional_libdir/lib$name.la"; then
10741 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
10742 fi
10743 fi
10744 fi
10745 fi
10746 if test "X$found_dir" = "X"; then
10747 for x in $LDFLAGS $LTLIBICONV; do
10748
10749 acl_save_prefix="$prefix"
10750 prefix="$acl_final_prefix"
10751 acl_save_exec_prefix="$exec_prefix"
10752 exec_prefix="$acl_final_exec_prefix"
10753 eval x=\"$x\"
10754 exec_prefix="$acl_save_exec_prefix"
10755 prefix="$acl_save_prefix"
10756
10757 case "$x" in
10758 -L*)
10759 dir=`echo "X$x" | sed -e 's/^X-L//'`
10760 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10761 found_dir="$dir"
10762 found_so="$dir/lib$name.$shlibext"
10763 if test -f "$dir/lib$name.la"; then
10764 found_la="$dir/lib$name.la"
10765 fi
10766 else
10767 if test -f "$dir/lib$name.$libext"; then
10768 found_dir="$dir"
10769 found_a="$dir/lib$name.$libext"
10770 if test -f "$dir/lib$name.la"; then
10771 found_la="$dir/lib$name.la"
10772 fi
10773 fi
10774 fi
10775 ;;
10776 esac
10777 if test "X$found_dir" != "X"; then
10778 break
10779 fi
10780 done
10781 fi
10782 if test "X$found_dir" != "X"; then
10783 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10784 if test "X$found_so" != "X"; then
10785 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10786 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10787 else
10788 haveit=
10789 for x in $ltrpathdirs; do
10790 if test "X$x" = "X$found_dir"; then
10791 haveit=yes
10792 break
10793 fi
10794 done
10795 if test -z "$haveit"; then
10796 ltrpathdirs="$ltrpathdirs $found_dir"
10797 fi
10798 if test "$hardcode_direct" = yes; then
10799 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10800 else
10801 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10802 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10803 haveit=
10804 for x in $rpathdirs; do
10805 if test "X$x" = "X$found_dir"; then
10806 haveit=yes
10807 break
10808 fi
10809 done
10810 if test -z "$haveit"; then
10811 rpathdirs="$rpathdirs $found_dir"
10812 fi
10813 else
10814 haveit=
10815 for x in $LDFLAGS $LIBICONV; do
10816
10817 acl_save_prefix="$prefix"
10818 prefix="$acl_final_prefix"
10819 acl_save_exec_prefix="$exec_prefix"
10820 exec_prefix="$acl_final_exec_prefix"
10821 eval x=\"$x\"
10822 exec_prefix="$acl_save_exec_prefix"
10823 prefix="$acl_save_prefix"
10824
10825 if test "X$x" = "X-L$found_dir"; then
10826 haveit=yes
10827 break
10828 fi
10829 done
10830 if test -z "$haveit"; then
10831 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10832 fi
10833 if test "$hardcode_minus_L" != no; then
10834 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10835 else
10836 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10837 fi
10838 fi
10839 fi
10840 fi
10841 else
10842 if test "X$found_a" != "X"; then
10843 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10844 else
10845 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10846 fi
10847 fi
10848 additional_includedir=
10849 case "$found_dir" in
10850 */lib | */lib/)
10851 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10852 additional_includedir="$basedir/include"
10853 ;;
10854 esac
10855 if test "X$additional_includedir" != "X"; then
10856 if test "X$additional_includedir" != "X/usr/include"; then
10857 haveit=
10858 if test "X$additional_includedir" = "X/usr/local/include"; then
10859 if test -n "$GCC"; then
10860 case $host_os in
18fc9bd4 10861 linux*) haveit=yes;;
dfb77e37
KC
10862 esac
10863 fi
10864 fi
10865 if test -z "$haveit"; then
10866 for x in $CPPFLAGS $INCICONV; do
10867
10868 acl_save_prefix="$prefix"
10869 prefix="$acl_final_prefix"
10870 acl_save_exec_prefix="$exec_prefix"
10871 exec_prefix="$acl_final_exec_prefix"
10872 eval x=\"$x\"
10873 exec_prefix="$acl_save_exec_prefix"
10874 prefix="$acl_save_prefix"
10875
10876 if test "X$x" = "X-I$additional_includedir"; then
10877 haveit=yes
10878 break
10879 fi
10880 done
10881 if test -z "$haveit"; then
10882 if test -d "$additional_includedir"; then
10883 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10884 fi
10885 fi
10886 fi
10887 fi
10888 fi
10889 if test -n "$found_la"; then
10890 save_libdir="$libdir"
10891 case "$found_la" in
10892 */* | *\\*) . "$found_la" ;;
10893 *) . "./$found_la" ;;
10894 esac
10895 libdir="$save_libdir"
10896 for dep in $dependency_libs; do
10897 case "$dep" in
10898 -L*)
10899 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10900 if test "X$additional_libdir" != "X/usr/lib"; then
10901 haveit=
10902 if test "X$additional_libdir" = "X/usr/local/lib"; then
10903 if test -n "$GCC"; then
10904 case $host_os in
18fc9bd4 10905 linux*) haveit=yes;;
dfb77e37
KC
10906 esac
10907 fi
10908 fi
10909 if test -z "$haveit"; then
10910 haveit=
10911 for x in $LDFLAGS $LIBICONV; do
10912
10913 acl_save_prefix="$prefix"
10914 prefix="$acl_final_prefix"
10915 acl_save_exec_prefix="$exec_prefix"
10916 exec_prefix="$acl_final_exec_prefix"
10917 eval x=\"$x\"
10918 exec_prefix="$acl_save_exec_prefix"
10919 prefix="$acl_save_prefix"
10920
10921 if test "X$x" = "X-L$additional_libdir"; then
10922 haveit=yes
10923 break
10924 fi
10925 done
10926 if test -z "$haveit"; then
10927 if test -d "$additional_libdir"; then
10928 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10929 fi
10930 fi
10931 haveit=
10932 for x in $LDFLAGS $LTLIBICONV; do
10933
10934 acl_save_prefix="$prefix"
10935 prefix="$acl_final_prefix"
10936 acl_save_exec_prefix="$exec_prefix"
10937 exec_prefix="$acl_final_exec_prefix"
10938 eval x=\"$x\"
10939 exec_prefix="$acl_save_exec_prefix"
10940 prefix="$acl_save_prefix"
10941
10942 if test "X$x" = "X-L$additional_libdir"; then
10943 haveit=yes
10944 break
10945 fi
10946 done
10947 if test -z "$haveit"; then
10948 if test -d "$additional_libdir"; then
10949 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10950 fi
10951 fi
10952 fi
10953 fi
10954 ;;
10955 -R*)
10956 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10957 if test "$enable_rpath" != no; then
10958 haveit=
10959 for x in $rpathdirs; do
10960 if test "X$x" = "X$dir"; then
10961 haveit=yes
10962 break
10963 fi
10964 done
10965 if test -z "$haveit"; then
10966 rpathdirs="$rpathdirs $dir"
10967 fi
10968 haveit=
10969 for x in $ltrpathdirs; do
10970 if test "X$x" = "X$dir"; then
10971 haveit=yes
10972 break
10973 fi
10974 done
10975 if test -z "$haveit"; then
10976 ltrpathdirs="$ltrpathdirs $dir"
10977 fi
10978 fi
10979 ;;
10980 -l*)
10981 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10982 ;;
10983 *.la)
10984 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10985 ;;
10986 *)
10987 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10988 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10989 ;;
10990 esac
10991 done
10992 fi
10993 else
10994 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10995 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10996 fi
10997 fi
10998 fi
10999 done
11000 done
11001 if test "X$rpathdirs" != "X"; then
11002 if test -n "$hardcode_libdir_separator"; then
11003 alldirs=
11004 for found_dir in $rpathdirs; do
11005 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11006 done
11007 acl_save_libdir="$libdir"
11008 libdir="$alldirs"
11009 eval flag=\"$hardcode_libdir_flag_spec\"
11010 libdir="$acl_save_libdir"
11011 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11012 else
11013 for found_dir in $rpathdirs; do
11014 acl_save_libdir="$libdir"
11015 libdir="$found_dir"
11016 eval flag=\"$hardcode_libdir_flag_spec\"
11017 libdir="$acl_save_libdir"
11018 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11019 done
11020 fi
11021 fi
11022 if test "X$ltrpathdirs" != "X"; then
11023 for found_dir in $ltrpathdirs; do
11024 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11025 done
11026 fi
11027
11028
11029
11030
11031
11032
11033
11034 am_save_CPPFLAGS="$CPPFLAGS"
11035
11036 for element in $INCICONV; do
11037 haveit=
11038 for x in $CPPFLAGS; do
11039
11040 acl_save_prefix="$prefix"
11041 prefix="$acl_final_prefix"
11042 acl_save_exec_prefix="$exec_prefix"
11043 exec_prefix="$acl_final_exec_prefix"
11044 eval x=\"$x\"
11045 exec_prefix="$acl_save_exec_prefix"
11046 prefix="$acl_save_prefix"
11047
11048 if test "X$x" = "X$element"; then
11049 haveit=yes
11050 break
11051 fi
11052 done
11053 if test -z "$haveit"; then
11054 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11055 fi
11056 done
eb158727
ZW
11057
11058
b61ff9c8
BS
11059 echo "$as_me:$LINENO: checking for iconv" >&5
11060echo $ECHO_N "checking for iconv... $ECHO_C" >&6
ba479fd2
NN
11061if test "${am_cv_func_iconv+set}" = set; then
11062 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11063else
ba479fd2 11064
f91abfce
TT
11065 am_cv_func_iconv="no, consider installing GNU libiconv"
11066 am_cv_lib_iconv=no
ba479fd2 11067 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11068/* confdefs.h. */
11069_ACEOF
11070cat confdefs.h >>conftest.$ac_ext
11071cat >>conftest.$ac_ext <<_ACEOF
11072/* end confdefs.h. */
f91abfce
TT
11073#include <stdlib.h>
11074#include <iconv.h>
ba479fd2
NN
11075int
11076main ()
11077{
f91abfce
TT
11078iconv_t cd = iconv_open("","");
11079 iconv(cd,NULL,NULL,NULL,NULL);
11080 iconv_close(cd);
ba479fd2
NN
11081 ;
11082 return 0;
11083}
11084_ACEOF
11085rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11086if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11087 (eval $ac_link) 2>conftest.er1
ba479fd2 11088 ac_status=$?
86da66b5
HPN
11089 grep -v '^ *+' conftest.er1 >conftest.err
11090 rm -f conftest.er1
11091 cat conftest.err >&5
ba479fd2 11092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11093 (exit $ac_status); } &&
11094 { ac_try='test -z "$ac_c_werror_flag"
11095 || test ! -s conftest.err'
11096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11097 (eval $ac_try) 2>&5
11098 ac_status=$?
11099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11100 (exit $ac_status); }; } &&
11101 { ac_try='test -s conftest$ac_exeext'
11102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11103 (eval $ac_try) 2>&5
11104 ac_status=$?
11105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11106 (exit $ac_status); }; }; then
f91abfce
TT
11107 am_cv_func_iconv=yes
11108else
ba479fd2
NN
11109 echo "$as_me: failed program was:" >&5
11110sed 's/^/| /' conftest.$ac_ext >&5
11111
f91abfce 11112fi
b61ff9c8 11113rm -f conftest.err conftest.$ac_objext \
86da66b5 11114 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11115 if test "$am_cv_func_iconv" != yes; then
11116 am_save_LIBS="$LIBS"
dfb77e37 11117 LIBS="$LIBS $LIBICONV"
ba479fd2 11118 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11119/* confdefs.h. */
11120_ACEOF
11121cat confdefs.h >>conftest.$ac_ext
11122cat >>conftest.$ac_ext <<_ACEOF
11123/* end confdefs.h. */
f91abfce
TT
11124#include <stdlib.h>
11125#include <iconv.h>
ba479fd2
NN
11126int
11127main ()
11128{
f91abfce
TT
11129iconv_t cd = iconv_open("","");
11130 iconv(cd,NULL,NULL,NULL,NULL);
11131 iconv_close(cd);
ba479fd2
NN
11132 ;
11133 return 0;
11134}
11135_ACEOF
11136rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11137if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11138 (eval $ac_link) 2>conftest.er1
ba479fd2 11139 ac_status=$?
86da66b5
HPN
11140 grep -v '^ *+' conftest.er1 >conftest.err
11141 rm -f conftest.er1
11142 cat conftest.err >&5
ba479fd2 11143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11144 (exit $ac_status); } &&
11145 { ac_try='test -z "$ac_c_werror_flag"
11146 || test ! -s conftest.err'
11147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11148 (eval $ac_try) 2>&5
11149 ac_status=$?
11150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11151 (exit $ac_status); }; } &&
11152 { ac_try='test -s conftest$ac_exeext'
11153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11154 (eval $ac_try) 2>&5
11155 ac_status=$?
11156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11157 (exit $ac_status); }; }; then
f91abfce
TT
11158 am_cv_lib_iconv=yes
11159 am_cv_func_iconv=yes
11160else
ba479fd2
NN
11161 echo "$as_me: failed program was:" >&5
11162sed 's/^/| /' conftest.$ac_ext >&5
11163
f91abfce 11164fi
b61ff9c8 11165rm -f conftest.err conftest.$ac_objext \
86da66b5 11166 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11167 LIBS="$am_save_LIBS"
11168 fi
6e3f3080 11169
ba479fd2 11170fi
b61ff9c8
BS
11171echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
11172echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 11173 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11174
11175cat >>confdefs.h <<\_ACEOF
f91abfce 11176#define HAVE_ICONV 1
ba479fd2 11177_ACEOF
f91abfce 11178
dfb77e37
KC
11179 fi
11180 if test "$am_cv_lib_iconv" = yes; then
b61ff9c8
BS
11181 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
11182echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
11183 echo "$as_me:$LINENO: result: $LIBICONV" >&5
11184echo "${ECHO_T}$LIBICONV" >&6
dfb77e37
KC
11185 else
11186 CPPFLAGS="$am_save_CPPFLAGS"
11187 LIBICONV=
11188 LTLIBICONV=
11189 fi
11190
11191
11192
11193 if test "$am_cv_func_iconv" = yes; then
b61ff9c8
BS
11194 echo "$as_me:$LINENO: checking for iconv declaration" >&5
11195echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
ba479fd2
NN
11196 if test "${am_cv_proto_iconv+set}" = set; then
11197 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11198else
ba479fd2
NN
11199
11200 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11201/* confdefs.h. */
11202_ACEOF
11203cat confdefs.h >>conftest.$ac_ext
11204cat >>conftest.$ac_ext <<_ACEOF
11205/* end confdefs.h. */
f91abfce
TT
11206
11207#include <stdlib.h>
11208#include <iconv.h>
11209extern
11210#ifdef __cplusplus
11211"C"
11212#endif
11213#if defined(__STDC__) || defined(__cplusplus)
11214size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11215#else
11216size_t iconv();
11217#endif
11218
ba479fd2
NN
11219int
11220main ()
11221{
f91abfce 11222
ba479fd2
NN
11223 ;
11224 return 0;
11225}
11226_ACEOF
11227rm -f conftest.$ac_objext
b61ff9c8
BS
11228if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11229 (eval $ac_compile) 2>conftest.er1
ba479fd2 11230 ac_status=$?
86da66b5
HPN
11231 grep -v '^ *+' conftest.er1 >conftest.err
11232 rm -f conftest.er1
11233 cat conftest.err >&5
ba479fd2 11234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11235 (exit $ac_status); } &&
11236 { ac_try='test -z "$ac_c_werror_flag"
11237 || test ! -s conftest.err'
11238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11239 (eval $ac_try) 2>&5
11240 ac_status=$?
11241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11242 (exit $ac_status); }; } &&
11243 { ac_try='test -s conftest.$ac_objext'
11244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11245 (eval $ac_try) 2>&5
11246 ac_status=$?
11247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11248 (exit $ac_status); }; }; then
f91abfce
TT
11249 am_cv_proto_iconv_arg1=""
11250else
ba479fd2
NN
11251 echo "$as_me: failed program was:" >&5
11252sed 's/^/| /' conftest.$ac_ext >&5
11253
b61ff9c8 11254am_cv_proto_iconv_arg1="const"
f91abfce 11255fi
b61ff9c8 11256rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
11257 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);"
11258fi
11259
11260 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
b61ff9c8 11261 echo "$as_me:$LINENO: result: ${ac_t:-
ba479fd2
NN
11262 }$am_cv_proto_iconv" >&5
11263echo "${ECHO_T}${ac_t:-
b61ff9c8 11264 }$am_cv_proto_iconv" >&6
ba479fd2
NN
11265
11266cat >>confdefs.h <<_ACEOF
f91abfce 11267#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 11268_ACEOF
f91abfce
TT
11269
11270 fi
f91abfce 11271
56694dd9
ZW
11272# Until we have in-tree GNU iconv:
11273LIBICONV_DEP=
11274
11275
18fc9bd4 11276
b61ff9c8
BS
11277 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11278echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
18fc9bd4
RG
11279if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11280 echo $ECHO_N "(cached) $ECHO_C" >&6
11281else
11282 cat >conftest.$ac_ext <<_ACEOF
11283/* confdefs.h. */
11284_ACEOF
11285cat confdefs.h >>conftest.$ac_ext
11286cat >>conftest.$ac_ext <<_ACEOF
11287/* end confdefs.h. */
11288#include <locale.h>
11289int
11290main ()
11291{
11292return LC_MESSAGES
11293 ;
11294 return 0;
11295}
11296_ACEOF
11297rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11298if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11299 (eval $ac_link) 2>conftest.er1
18fc9bd4
RG
11300 ac_status=$?
11301 grep -v '^ *+' conftest.er1 >conftest.err
11302 rm -f conftest.er1
11303 cat conftest.err >&5
11304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11305 (exit $ac_status); } &&
11306 { ac_try='test -z "$ac_c_werror_flag"
11307 || test ! -s conftest.err'
11308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11309 (eval $ac_try) 2>&5
11310 ac_status=$?
11311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11312 (exit $ac_status); }; } &&
11313 { ac_try='test -s conftest$ac_exeext'
11314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11315 (eval $ac_try) 2>&5
11316 ac_status=$?
11317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11318 (exit $ac_status); }; }; then
18fc9bd4
RG
11319 am_cv_val_LC_MESSAGES=yes
11320else
11321 echo "$as_me: failed program was:" >&5
11322sed 's/^/| /' conftest.$ac_ext >&5
11323
b61ff9c8 11324am_cv_val_LC_MESSAGES=no
18fc9bd4 11325fi
b61ff9c8 11326rm -f conftest.err conftest.$ac_objext \
18fc9bd4
RG
11327 conftest$ac_exeext conftest.$ac_ext
11328fi
b61ff9c8
BS
11329echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11330echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
18fc9bd4
RG
11331 if test $am_cv_val_LC_MESSAGES = yes; then
11332
11333cat >>confdefs.h <<\_ACEOF
11334#define HAVE_LC_MESSAGES 1
11335_ACEOF
11336
11337 fi
11338
f91abfce 11339
a03ea89b 11340
b61ff9c8
BS
11341 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11342echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
a03ea89b
BM
11343if test "${am_cv_langinfo_codeset+set}" = set; then
11344 echo $ECHO_N "(cached) $ECHO_C" >&6
11345else
11346 cat >conftest.$ac_ext <<_ACEOF
11347/* confdefs.h. */
11348_ACEOF
11349cat confdefs.h >>conftest.$ac_ext
11350cat >>conftest.$ac_ext <<_ACEOF
11351/* end confdefs.h. */
11352#include <langinfo.h>
11353int
11354main ()
11355{
11356char* cs = nl_langinfo(CODESET);
11357 ;
11358 return 0;
11359}
11360_ACEOF
11361rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
11362if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11363 (eval $ac_link) 2>conftest.er1
a03ea89b
BM
11364 ac_status=$?
11365 grep -v '^ *+' conftest.er1 >conftest.err
11366 rm -f conftest.er1
11367 cat conftest.err >&5
11368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11369 (exit $ac_status); } &&
11370 { ac_try='test -z "$ac_c_werror_flag"
11371 || test ! -s conftest.err'
11372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11373 (eval $ac_try) 2>&5
11374 ac_status=$?
11375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11376 (exit $ac_status); }; } &&
11377 { ac_try='test -s conftest$ac_exeext'
11378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11379 (eval $ac_try) 2>&5
11380 ac_status=$?
11381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11382 (exit $ac_status); }; }; then
a03ea89b
BM
11383 am_cv_langinfo_codeset=yes
11384else
11385 echo "$as_me: failed program was:" >&5
11386sed 's/^/| /' conftest.$ac_ext >&5
11387
b61ff9c8 11388am_cv_langinfo_codeset=no
a03ea89b 11389fi
b61ff9c8 11390rm -f conftest.err conftest.$ac_objext \
a03ea89b
BM
11391 conftest$ac_exeext conftest.$ac_ext
11392
11393fi
b61ff9c8
BS
11394echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11395echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
a03ea89b
BM
11396 if test $am_cv_langinfo_codeset = yes; then
11397
11398cat >>confdefs.h <<\_ACEOF
11399#define HAVE_LANGINFO_CODESET 1
11400_ACEOF
11401
11402 fi
11403
11404
86cf1cbd
KG
11405# We will need to find libiberty.h and ansidecl.h
11406saved_CFLAGS="$CFLAGS"
11407CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
6a257778 11429
ad6717df
PB
11430
11431
0d667716
KG
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
367e8319 11442
0d667716
KG
11443
11444
7391b66c 11445
ed5b9f96
GK
11446
11447for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
11448 strsignal strstr strverscmp \
11449 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 11450 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 11451do
ad6717df 11452 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
11453echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11454echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11455if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
11456 echo $ECHO_N "(cached) $ECHO_C" >&6
11457else
11458 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11459/* confdefs.h. */
11460_ACEOF
11461cat confdefs.h >>conftest.$ac_ext
11462cat >>conftest.$ac_ext <<_ACEOF
11463/* end confdefs.h. */
7afe8c41
KG
11464#undef $ac_tr_decl
11465#define $ac_tr_decl 1
ba479fd2 11466
d02af173 11467#include "ansidecl.h"
86cf1cbd 11468#include "system.h"
f31e826b 11469
ba479fd2
NN
11470int
11471main ()
11472{
86cf1cbd
KG
11473#ifndef $ac_func
11474char *(*pfn) = (char *(*)) $ac_func ;
11475#endif
ba479fd2
NN
11476 ;
11477 return 0;
11478}
11479_ACEOF
11480rm -f conftest.$ac_objext
b61ff9c8
BS
11481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11482 (eval $ac_compile) 2>conftest.er1
ba479fd2 11483 ac_status=$?
86da66b5
HPN
11484 grep -v '^ *+' conftest.er1 >conftest.err
11485 rm -f conftest.er1
11486 cat conftest.err >&5
ba479fd2 11487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11488 (exit $ac_status); } &&
11489 { ac_try='test -z "$ac_c_werror_flag"
11490 || test ! -s conftest.err'
11491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11492 (eval $ac_try) 2>&5
11493 ac_status=$?
11494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11495 (exit $ac_status); }; } &&
11496 { ac_try='test -s conftest.$ac_objext'
11497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11498 (eval $ac_try) 2>&5
11499 ac_status=$?
11500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11501 (exit $ac_status); }; }; then
f31e826b 11502 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11503else
ba479fd2
NN
11504 echo "$as_me: failed program was:" >&5
11505sed 's/^/| /' conftest.$ac_ext >&5
11506
b61ff9c8 11507eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11508fi
b61ff9c8 11509rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11510fi
11511
f31e826b 11512if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
11513 echo "$as_me:$LINENO: result: yes" >&5
11514echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11515#define $ac_tr_decl 1
ba479fd2
NN
11516_ACEOF
11517
81bf3d9e 11518else
b61ff9c8
BS
11519 echo "$as_me:$LINENO: result: no" >&5
11520echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11521#define $ac_tr_decl 0
ba479fd2
NN
11522_ACEOF
11523
81bf3d9e
RH
11524fi
11525
11526done
ba479fd2 11527
ba479fd2 11528
ba479fd2 11529
81bf3d9e 11530
81bf3d9e
RH
11531
11532for ac_func in getrlimit setrlimit getrusage
11533do
ad6717df 11534 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
11535echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11536echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11537if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
11538 echo $ECHO_N "(cached) $ECHO_C" >&6
11539else
11540 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11541/* confdefs.h. */
11542_ACEOF
11543cat confdefs.h >>conftest.$ac_ext
11544cat >>conftest.$ac_ext <<_ACEOF
11545/* end confdefs.h. */
7afe8c41
KG
11546#undef $ac_tr_decl
11547#define $ac_tr_decl 1
ba479fd2 11548
d02af173 11549#include "ansidecl.h"
86cf1cbd 11550#include "system.h"
81bf3d9e
RH
11551#ifdef HAVE_SYS_RESOURCE_H
11552#include <sys/resource.h>
11553#endif
11554
f31e826b 11555
ba479fd2
NN
11556int
11557main ()
11558{
86cf1cbd
KG
11559#ifndef $ac_func
11560char *(*pfn) = (char *(*)) $ac_func ;
11561#endif
ba479fd2
NN
11562 ;
11563 return 0;
11564}
11565_ACEOF
11566rm -f conftest.$ac_objext
b61ff9c8
BS
11567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11568 (eval $ac_compile) 2>conftest.er1
ba479fd2 11569 ac_status=$?
86da66b5
HPN
11570 grep -v '^ *+' conftest.er1 >conftest.err
11571 rm -f conftest.er1
11572 cat conftest.err >&5
ba479fd2 11573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11574 (exit $ac_status); } &&
11575 { ac_try='test -z "$ac_c_werror_flag"
11576 || test ! -s conftest.err'
11577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11578 (eval $ac_try) 2>&5
11579 ac_status=$?
11580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11581 (exit $ac_status); }; } &&
11582 { ac_try='test -s conftest.$ac_objext'
11583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11584 (eval $ac_try) 2>&5
11585 ac_status=$?
11586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11587 (exit $ac_status); }; }; then
f31e826b 11588 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11589else
ba479fd2
NN
11590 echo "$as_me: failed program was:" >&5
11591sed 's/^/| /' conftest.$ac_ext >&5
11592
b61ff9c8 11593eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11594fi
b61ff9c8 11595rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11596fi
11597
f31e826b 11598if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
11599 echo "$as_me:$LINENO: result: yes" >&5
11600echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11601#define $ac_tr_decl 1
ba479fd2
NN
11602_ACEOF
11603
81bf3d9e 11604else
b61ff9c8
BS
11605 echo "$as_me:$LINENO: result: no" >&5
11606echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11607#define $ac_tr_decl 0
ba479fd2
NN
11608_ACEOF
11609
81bf3d9e
RH
11610fi
11611
11612done
86cf1cbd 11613
81bf3d9e 11614
ba479fd2 11615cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11616/* confdefs.h. */
11617_ACEOF
11618cat confdefs.h >>conftest.$ac_ext
11619cat >>conftest.$ac_ext <<_ACEOF
11620/* end confdefs.h. */
b2522d2b
HPN
11621
11622#include "ansidecl.h"
11623#include "system.h"
11624#ifdef HAVE_SYS_RESOURCE_H
11625#include <sys/resource.h>
11626#endif
11627
ba479fd2
NN
11628int
11629main ()
11630{
b2522d2b 11631rlim_t l = 0;
ba479fd2
NN
11632 ;
11633 return 0;
11634}
11635_ACEOF
11636rm -f conftest.$ac_objext
b61ff9c8
BS
11637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11638 (eval $ac_compile) 2>conftest.er1
ba479fd2 11639 ac_status=$?
86da66b5
HPN
11640 grep -v '^ *+' conftest.er1 >conftest.err
11641 rm -f conftest.er1
11642 cat conftest.err >&5
ba479fd2 11643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11644 (exit $ac_status); } &&
11645 { ac_try='test -z "$ac_c_werror_flag"
11646 || test ! -s conftest.err'
11647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11648 (eval $ac_try) 2>&5
11649 ac_status=$?
11650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11651 (exit $ac_status); }; } &&
11652 { ac_try='test -s conftest.$ac_objext'
11653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11654 (eval $ac_try) 2>&5
11655 ac_status=$?
11656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11657 (exit $ac_status); }; }; then
b2522d2b
HPN
11658 :
11659else
ba479fd2
NN
11660 echo "$as_me: failed program was:" >&5
11661sed 's/^/| /' conftest.$ac_ext >&5
11662
11663
11664cat >>confdefs.h <<\_ACEOF
b2522d2b 11665#define rlim_t long
ba479fd2 11666_ACEOF
b2522d2b
HPN
11667
11668fi
b61ff9c8 11669rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 11670
2102b2fe
RS
11671# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11672# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11673# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11674# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 11675
351df804 11676for ac_func in ldgetname
c1800ec8 11677do
ad6717df 11678 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
11679echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11680echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11681if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
11682 echo $ECHO_N "(cached) $ECHO_C" >&6
11683else
11684 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11685/* confdefs.h. */
11686_ACEOF
11687cat confdefs.h >>conftest.$ac_ext
11688cat >>conftest.$ac_ext <<_ACEOF
11689/* end confdefs.h. */
c1800ec8
ZW
11690#undef $ac_tr_decl
11691#define $ac_tr_decl 1
ba479fd2 11692
351df804
KG
11693#include "ansidecl.h"
11694#include "system.h"
11695#ifdef HAVE_LDFCN_H
2102b2fe
RS
11696#undef FREAD
11697#undef FWRITE
351df804
KG
11698#include <ldfcn.h>
11699#endif
11700
11701
ba479fd2
NN
11702int
11703main ()
11704{
351df804
KG
11705#ifndef $ac_func
11706char *(*pfn) = (char *(*)) $ac_func ;
11707#endif
ba479fd2
NN
11708 ;
11709 return 0;
11710}
11711_ACEOF
11712rm -f conftest.$ac_objext
b61ff9c8
BS
11713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11714 (eval $ac_compile) 2>conftest.er1
ba479fd2 11715 ac_status=$?
86da66b5
HPN
11716 grep -v '^ *+' conftest.er1 >conftest.err
11717 rm -f conftest.er1
11718 cat conftest.err >&5
ba479fd2 11719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11720 (exit $ac_status); } &&
11721 { ac_try='test -z "$ac_c_werror_flag"
11722 || test ! -s conftest.err'
11723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11724 (eval $ac_try) 2>&5
11725 ac_status=$?
11726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11727 (exit $ac_status); }; } &&
11728 { ac_try='test -s conftest.$ac_objext'
11729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11730 (eval $ac_try) 2>&5
11731 ac_status=$?
11732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11733 (exit $ac_status); }; }; then
351df804
KG
11734 eval "gcc_cv_have_decl_$ac_func=yes"
11735else
ba479fd2
NN
11736 echo "$as_me: failed program was:" >&5
11737sed 's/^/| /' conftest.$ac_ext >&5
11738
b61ff9c8 11739eval "gcc_cv_have_decl_$ac_func=no"
351df804 11740fi
b61ff9c8 11741rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
11742fi
11743
11744if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
11745 echo "$as_me:$LINENO: result: yes" >&5
11746echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11747#define $ac_tr_decl 1
ba479fd2
NN
11748_ACEOF
11749
351df804 11750else
b61ff9c8
BS
11751 echo "$as_me:$LINENO: result: no" >&5
11752echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11753#define $ac_tr_decl 0
ba479fd2
NN
11754_ACEOF
11755
351df804
KG
11756fi
11757
11758done
ba479fd2 11759
351df804
KG
11760
11761
11762for ac_func in times
11763do
ad6717df 11764 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
11765echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11766echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11767if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
ba479fd2
NN
11768 echo $ECHO_N "(cached) $ECHO_C" >&6
11769else
11770 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11771/* confdefs.h. */
11772_ACEOF
11773cat confdefs.h >>conftest.$ac_ext
11774cat >>conftest.$ac_ext <<_ACEOF
11775/* end confdefs.h. */
351df804
KG
11776#undef $ac_tr_decl
11777#define $ac_tr_decl 1
ba479fd2 11778
c1800ec8
ZW
11779#include "ansidecl.h"
11780#include "system.h"
11781#ifdef HAVE_SYS_TIMES_H
11782#include <sys/times.h>
11783#endif
11784
11785
ba479fd2
NN
11786int
11787main ()
11788{
c1800ec8
ZW
11789#ifndef $ac_func
11790char *(*pfn) = (char *(*)) $ac_func ;
11791#endif
ba479fd2
NN
11792 ;
11793 return 0;
11794}
11795_ACEOF
11796rm -f conftest.$ac_objext
b61ff9c8
BS
11797if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11798 (eval $ac_compile) 2>conftest.er1
ba479fd2 11799 ac_status=$?
86da66b5
HPN
11800 grep -v '^ *+' conftest.er1 >conftest.err
11801 rm -f conftest.er1
11802 cat conftest.err >&5
ba479fd2 11803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11804 (exit $ac_status); } &&
11805 { ac_try='test -z "$ac_c_werror_flag"
11806 || test ! -s conftest.err'
11807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11808 (eval $ac_try) 2>&5
11809 ac_status=$?
11810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11811 (exit $ac_status); }; } &&
11812 { ac_try='test -s conftest.$ac_objext'
11813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11814 (eval $ac_try) 2>&5
11815 ac_status=$?
11816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11817 (exit $ac_status); }; }; then
2f41c1d6
PB
11818 eval "gcc_cv_have_decl_$ac_func=yes"
11819else
11820 echo "$as_me: failed program was:" >&5
11821sed 's/^/| /' conftest.$ac_ext >&5
ab22c1fa 11822
b61ff9c8 11823eval "gcc_cv_have_decl_$ac_func=no"
2f41c1d6 11824fi
b61ff9c8 11825rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
11826fi
11827
11828if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
11829 echo "$as_me:$LINENO: result: yes" >&5
11830echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11831#define $ac_tr_decl 1
ba479fd2
NN
11832_ACEOF
11833
c1800ec8 11834else
b61ff9c8
BS
11835 echo "$as_me:$LINENO: result: no" >&5
11836echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11837#define $ac_tr_decl 0
ba479fd2
NN
11838_ACEOF
11839
c1800ec8
ZW
11840fi
11841
11842done
c1800ec8
ZW
11843
11844
4f6d8cc8
GK
11845
11846for ac_func in sigaltstack
11847do
11848 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
b61ff9c8
BS
11849echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11850echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11851if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
4f6d8cc8
GK
11852 echo $ECHO_N "(cached) $ECHO_C" >&6
11853else
11854 cat >conftest.$ac_ext <<_ACEOF
11855/* confdefs.h. */
11856_ACEOF
11857cat confdefs.h >>conftest.$ac_ext
11858cat >>conftest.$ac_ext <<_ACEOF
11859/* end confdefs.h. */
11860#undef $ac_tr_decl
11861#define $ac_tr_decl 1
11862
11863#include "ansidecl.h"
11864#include "system.h"
11865#include <signal.h>
11866
11867
11868int
11869main ()
11870{
11871#ifndef $ac_func
11872char *(*pfn) = (char *(*)) $ac_func ;
11873#endif
11874 ;
11875 return 0;
11876}
11877_ACEOF
11878rm -f conftest.$ac_objext
b61ff9c8
BS
11879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11880 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
11881 ac_status=$?
11882 grep -v '^ *+' conftest.er1 >conftest.err
11883 rm -f conftest.er1
11884 cat conftest.err >&5
11885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11886 (exit $ac_status); } &&
11887 { ac_try='test -z "$ac_c_werror_flag"
11888 || test ! -s conftest.err'
11889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11890 (eval $ac_try) 2>&5
11891 ac_status=$?
11892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11893 (exit $ac_status); }; } &&
11894 { ac_try='test -s conftest.$ac_objext'
11895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11896 (eval $ac_try) 2>&5
11897 ac_status=$?
11898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11899 (exit $ac_status); }; }; then
8b1f719a
PB
11900 eval "gcc_cv_have_decl_$ac_func=yes"
11901else
11902 echo "$as_me: failed program was:" >&5
11903sed 's/^/| /' conftest.$ac_ext >&5
4f6d8cc8 11904
b61ff9c8 11905eval "gcc_cv_have_decl_$ac_func=no"
4f6d8cc8 11906fi
b61ff9c8 11907rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8
GK
11908fi
11909
11910if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
b61ff9c8
BS
11911 echo "$as_me:$LINENO: result: yes" >&5
11912echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
11913#define $ac_tr_decl 1
11914_ACEOF
11915
11916else
b61ff9c8
BS
11917 echo "$as_me:$LINENO: result: no" >&5
11918echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
11919#define $ac_tr_decl 0
11920_ACEOF
11921
11922fi
11923
11924done
11925
11926
c1800ec8 11927# More time-related stuff.
b61ff9c8
BS
11928echo "$as_me:$LINENO: checking for struct tms" >&5
11929echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
ba479fd2
NN
11930if test "${ac_cv_struct_tms+set}" = set; then
11931 echo $ECHO_N "(cached) $ECHO_C" >&6
11932else
11933
11934cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11935/* confdefs.h. */
11936_ACEOF
11937cat confdefs.h >>conftest.$ac_ext
11938cat >>conftest.$ac_ext <<_ACEOF
11939/* end confdefs.h. */
c1800ec8
ZW
11940
11941#include "ansidecl.h"
11942#include "system.h"
11943#ifdef HAVE_SYS_TIMES_H
11944#include <sys/times.h>
11945#endif
11946
ba479fd2
NN
11947int
11948main ()
11949{
c1800ec8 11950struct tms tms;
ba479fd2
NN
11951 ;
11952 return 0;
11953}
11954_ACEOF
11955rm -f conftest.$ac_objext
b61ff9c8
BS
11956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11957 (eval $ac_compile) 2>conftest.er1
ba479fd2 11958 ac_status=$?
86da66b5
HPN
11959 grep -v '^ *+' conftest.er1 >conftest.err
11960 rm -f conftest.er1
11961 cat conftest.err >&5
ba479fd2 11962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
11963 (exit $ac_status); } &&
11964 { ac_try='test -z "$ac_c_werror_flag"
11965 || test ! -s conftest.err'
11966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11967 (eval $ac_try) 2>&5
11968 ac_status=$?
11969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11970 (exit $ac_status); }; } &&
11971 { ac_try='test -s conftest.$ac_objext'
11972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11973 (eval $ac_try) 2>&5
11974 ac_status=$?
11975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11976 (exit $ac_status); }; }; then
c1800ec8
ZW
11977 ac_cv_struct_tms=yes
11978else
ba479fd2
NN
11979 echo "$as_me: failed program was:" >&5
11980sed 's/^/| /' conftest.$ac_ext >&5
11981
b61ff9c8 11982ac_cv_struct_tms=no
c1800ec8 11983fi
b61ff9c8 11984rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11985fi
b61ff9c8
BS
11986echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11987echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 11988if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
11989
11990cat >>confdefs.h <<\_ACEOF
c1800ec8 11991#define HAVE_STRUCT_TMS 1
ba479fd2 11992_ACEOF
c1800ec8
ZW
11993
11994fi
11995
11996# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11997# revisit after autoconf 2.50.
b61ff9c8
BS
11998echo "$as_me:$LINENO: checking for clock_t" >&5
11999echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
ba479fd2
NN
12000if test "${gcc_cv_type_clock_t+set}" = set; then
12001 echo $ECHO_N "(cached) $ECHO_C" >&6
12002else
12003
12004cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12005/* confdefs.h. */
12006_ACEOF
12007cat confdefs.h >>conftest.$ac_ext
12008cat >>conftest.$ac_ext <<_ACEOF
12009/* end confdefs.h. */
c1800ec8
ZW
12010
12011#include "ansidecl.h"
12012#include "system.h"
12013
ba479fd2
NN
12014int
12015main ()
12016{
c1800ec8 12017clock_t x;
ba479fd2
NN
12018 ;
12019 return 0;
12020}
12021_ACEOF
12022rm -f conftest.$ac_objext
b61ff9c8
BS
12023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12024 (eval $ac_compile) 2>conftest.er1
ba479fd2 12025 ac_status=$?
86da66b5
HPN
12026 grep -v '^ *+' conftest.er1 >conftest.err
12027 rm -f conftest.er1
12028 cat conftest.err >&5
ba479fd2 12029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12030 (exit $ac_status); } &&
12031 { ac_try='test -z "$ac_c_werror_flag"
12032 || test ! -s conftest.err'
12033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12034 (eval $ac_try) 2>&5
12035 ac_status=$?
12036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12037 (exit $ac_status); }; } &&
12038 { ac_try='test -s conftest.$ac_objext'
12039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12040 (eval $ac_try) 2>&5
12041 ac_status=$?
12042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12043 (exit $ac_status); }; }; then
c1800ec8
ZW
12044 gcc_cv_type_clock_t=yes
12045else
ba479fd2
NN
12046 echo "$as_me: failed program was:" >&5
12047sed 's/^/| /' conftest.$ac_ext >&5
12048
b61ff9c8 12049gcc_cv_type_clock_t=no
c1800ec8 12050fi
b61ff9c8 12051rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 12052fi
b61ff9c8
BS
12053echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
12054echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 12055if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
12056
12057cat >>confdefs.h <<\_ACEOF
c1800ec8 12058#define HAVE_CLOCK_T 1
ba479fd2 12059_ACEOF
c1800ec8
ZW
12060
12061fi
12062
eb70d86d
AS
12063# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
12064CFLAGS="$saved_CFLAGS"
12065
b61ff9c8 12066# Check whether --enable-initfini-array or --disable-initfini-array was given.
07cf4226 12067if test "${enable_initfini_array+set}" = set; then
b61ff9c8
BS
12068 enableval="$enable_initfini_array"
12069
07cf4226 12070else
ba479fd2 12071
b61ff9c8
BS
12072echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
12073echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
ba479fd2
NN
12074if test "${gcc_cv_initfini_array+set}" = set; then
12075 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 12076else
eb70d86d 12077 if test "$cross_compiling" = yes; then
918c4fe4 12078 gcc_cv_initfini_array=no
eb70d86d 12079else
ba479fd2 12080 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12081/* confdefs.h. */
12082_ACEOF
12083cat confdefs.h >>conftest.$ac_ext
12084cat >>conftest.$ac_ext <<_ACEOF
12085/* end confdefs.h. */
eb70d86d 12086
07cf4226
DM
12087static int x = -1;
12088int main (void) { return x; }
12089int foo (void) { x = 0; }
12090int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
12091_ACEOF
12092rm -f conftest$ac_exeext
b61ff9c8
BS
12093if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12094 (eval $ac_link) 2>&5
ba479fd2
NN
12095 ac_status=$?
12096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12097 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
b61ff9c8
BS
12098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12099 (eval $ac_try) 2>&5
ba479fd2
NN
12100 ac_status=$?
12101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12102 (exit $ac_status); }; }; then
918c4fe4 12103 gcc_cv_initfini_array=yes
eb70d86d 12104else
ba479fd2
NN
12105 echo "$as_me: program exited with status $ac_status" >&5
12106echo "$as_me: failed program was:" >&5
12107sed 's/^/| /' conftest.$ac_ext >&5
12108
12109( exit $ac_status )
12110gcc_cv_initfini_array=no
eb70d86d 12111fi
b61ff9c8 12112rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 12113fi
07cf4226 12114fi
b61ff9c8
BS
12115echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
12116echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 12117 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 12118
b61ff9c8 12119fi;
63cf211a 12120if test $enable_initfini_array = yes; then
ba479fd2
NN
12121
12122cat >>confdefs.h <<\_ACEOF
eb70d86d 12123#define HAVE_INITFINI_ARRAY 1
ba479fd2 12124_ACEOF
07cf4226 12125
eb70d86d 12126fi
81bf3d9e 12127
ba479fd2 12128# mkdir takes a single argument on some systems.
b61ff9c8
BS
12129echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
12130echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
ba479fd2
NN
12131if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
12132 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 12133else
ba479fd2 12134 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12135/* confdefs.h. */
12136_ACEOF
12137cat confdefs.h >>conftest.$ac_ext
12138cat >>conftest.$ac_ext <<_ACEOF
12139/* end confdefs.h. */
75923b2f
MK
12140
12141#include <sys/types.h>
12142#ifdef HAVE_SYS_STAT_H
12143# include <sys/stat.h>
12144#endif
12145#ifdef HAVE_UNISTD_H
12146# include <unistd.h>
12147#endif
12148#ifdef HAVE_DIRECT_H
12149# include <direct.h>
12150#endif
ba479fd2
NN
12151int
12152main ()
12153{
75923b2f 12154mkdir ("foo", 0);
ba479fd2
NN
12155 ;
12156 return 0;
12157}
12158_ACEOF
12159rm -f conftest.$ac_objext
b61ff9c8
BS
12160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12161 (eval $ac_compile) 2>conftest.er1
ba479fd2 12162 ac_status=$?
86da66b5
HPN
12163 grep -v '^ *+' conftest.er1 >conftest.err
12164 rm -f conftest.er1
12165 cat conftest.err >&5
ba479fd2 12166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12167 (exit $ac_status); } &&
12168 { ac_try='test -z "$ac_c_werror_flag"
12169 || test ! -s conftest.err'
12170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12171 (eval $ac_try) 2>&5
12172 ac_status=$?
12173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12174 (exit $ac_status); }; } &&
12175 { ac_try='test -s conftest.$ac_objext'
12176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12177 (eval $ac_try) 2>&5
12178 ac_status=$?
12179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12180 (exit $ac_status); }; }; then
75923b2f
MK
12181 gcc_cv_mkdir_takes_one_arg=no
12182else
ba479fd2
NN
12183 echo "$as_me: failed program was:" >&5
12184sed 's/^/| /' conftest.$ac_ext >&5
12185
b61ff9c8 12186gcc_cv_mkdir_takes_one_arg=yes
75923b2f 12187fi
b61ff9c8 12188rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 12189fi
b61ff9c8
BS
12190echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
12191echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 12192if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
12193
12194cat >>confdefs.h <<\_ACEOF
75923b2f 12195#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 12196_ACEOF
75923b2f
MK
12197
12198fi
12199
12200
861bb6c1
JL
12201# File extensions
12202manext='.1'
12203objext='.o'
12204
12205
12206
4977bab6 12207# With Setjmp/Longjmp based exception handling.
b61ff9c8 12208# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
4977bab6 12209if test "${enable_sjlj_exceptions+set}" = set; then
b61ff9c8
BS
12210 enableval="$enable_sjlj_exceptions"
12211 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 12212
ba479fd2
NN
12213cat >>confdefs.h <<_ACEOF
12214#define CONFIG_SJLJ_EXCEPTIONS $sjlj
12215_ACEOF
4977bab6 12216
b61ff9c8 12217fi;
4977bab6 12218
443728bb
L
12219# For platforms with the unwind ABI which includes an unwind library,
12220# libunwind, we can choose to use the system libunwind.
4977bab6 12221
b61ff9c8 12222# Check whether --with-system-libunwind or --without-system-libunwind was given.
443728bb 12223if test "${with_system_libunwind+set}" = set; then
b61ff9c8 12224 withval="$with_system_libunwind"
4977bab6 12225
b61ff9c8 12226fi;
4977bab6 12227
e64f5acf
SE
12228# config.gcc also contains tests of with_system_libunwind.
12229if test x$with_system_libunwind = xyes; then
12230
12231cat >>confdefs.h <<\_ACEOF
12232#define HAVE_GETIPINFO 1
12233_ACEOF
12234
12235fi
12236
34a86c2b
NN
12237# --------------------------------------------------------
12238# Build, host, and target specific configuration fragments
12239# --------------------------------------------------------
12240
5b28c537
NN
12241# Collect build-machine-specific information.
12242. ${srcdir}/config.build
12243
a89ea0df
NN
12244# Collect host-machine-specific information.
12245. ${srcdir}/config.host
12246
ef69da62 12247target_gtfiles=
a89ea0df
NN
12248
12249# Collect target-machine-specific information.
8ad9fb33 12250. ${srcdir}/config.gcc
861bb6c1
JL
12251
12252extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 12253extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
12254
12255# Default the target-machine variables that were not explicitly set.
75bffa71 12256if test x"$tm_file" = x
861bb6c1
JL
12257then tm_file=$cpu_type/$cpu_type.h; fi
12258
6b2adea9 12259if test x"$extra_headers" = x
861bb6c1
JL
12260then extra_headers=; fi
12261
75bffa71 12262if test x$md_file = x
e98e406f 12263then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 12264
75bffa71 12265if test x$out_file = x
861bb6c1
JL
12266then out_file=$cpu_type/$cpu_type.c; fi
12267
75bffa71 12268if test x"$tmake_file" = x
861bb6c1
JL
12269then tmake_file=$cpu_type/t-$cpu_type
12270fi
12271
90e6a802 12272if test x"$dwarf2" = xyes
756ee602 12273then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
12274fi
12275
861bb6c1 12276# Say what files are being used for the output code and MD file.
11642c3a 12277echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
12278echo "Using \`$srcdir/config/$md_file' as machine description file."
12279
11642c3a 12280# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
12281# about them and drop them.
12282
11642c3a
ZW
12283bx=
12284for x in $build_xm_file; do
12285 if test -f $srcdir/config/$x
12286 then bx="$bx $x"
ba479fd2
NN
12287 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12288echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12289 fi
12290done
12291build_xm_file="$bx"
12292
12293hx=
12294for x in $host_xm_file; do
12295 if test -f $srcdir/config/$x
12296 then hx="$hx $x"
ba479fd2
NN
12297 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12298echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12299 fi
12300done
12301host_xm_file="$hx"
12302
12303tx=
12304for x in $xm_file; do
12305 if test -f $srcdir/config/$x
12306 then tx="$tx $x"
ba479fd2
NN
12307 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12308echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12309 fi
12310done
12311xm_file="$tx"
12312
861bb6c1
JL
12313count=a
12314for f in $tm_file; do
12315 count=${count}x
12316done
75bffa71 12317if test $count = ax; then
861bb6c1
JL
12318 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
12319else
12320 echo "Using the following target machine macro files:"
12321 for f in $tm_file; do
12322 echo " $srcdir/config/$f"
12323 done
12324fi
12325
4977bab6 12326if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
12327
12328cat >>confdefs.h <<\_ACEOF
4977bab6 12329#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 12330_ACEOF
4977bab6
ZW
12331
12332fi
12333
99fa8911
AP
12334if test x$use_long_long_for_widest_fast_int = xyes; then
12335
12336cat >>confdefs.h <<\_ACEOF
12337#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12338_ACEOF
12339
12340fi
12341
861bb6c1
JL
12342count=a
12343for f in $host_xm_file; do
12344 count=${count}x
12345done
11642c3a
ZW
12346if test $count = a; then
12347 :
12348elif test $count = ax; then
861bb6c1
JL
12349 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12350else
12351 echo "Using the following host machine macro files:"
12352 for f in $host_xm_file; do
12353 echo " $srcdir/config/$f"
12354 done
12355fi
476d9098 12356echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 12357
75bffa71 12358if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
12359 count=a
12360 for f in $build_xm_file; do
12361 count=${count}x
12362 done
11642c3a
ZW
12363 if test $count = a; then
12364 :
12365 elif test $count = ax; then
861bb6c1
JL
12366 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12367 else
12368 echo "Using the following build machine macro files:"
12369 for f in $build_xm_file; do
12370 echo " $srcdir/config/$f"
12371 done
12372 fi
12373fi
12374
4f6d8cc8 12375case ${host} in
b8ec3cc8 12376 powerpc*-*-darwin*)
b61ff9c8
BS
12377 echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
12378echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6
4f6d8cc8
GK
12379if test "${gcc_cv_mcontext_underscores+set}" = set; then
12380 echo $ECHO_N "(cached) $ECHO_C" >&6
12381else
12382 cat >conftest.$ac_ext <<_ACEOF
12383
ba7da42a 12384#include <sys/cdefs.h>
de4fb767 12385#include <sys/signal.h>
4f6d8cc8
GK
12386#include <ucontext.h>
12387int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
12388
12389_ACEOF
12390rm -f conftest.$ac_objext
b61ff9c8
BS
12391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12392 (eval $ac_compile) 2>conftest.er1
4f6d8cc8
GK
12393 ac_status=$?
12394 grep -v '^ *+' conftest.er1 >conftest.err
12395 rm -f conftest.er1
12396 cat conftest.err >&5
12397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12398 (exit $ac_status); } &&
12399 { ac_try='test -z "$ac_c_werror_flag"
12400 || test ! -s conftest.err'
12401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12402 (eval $ac_try) 2>&5
12403 ac_status=$?
12404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12405 (exit $ac_status); }; } &&
12406 { ac_try='test -s conftest.$ac_objext'
12407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12408 (eval $ac_try) 2>&5
12409 ac_status=$?
12410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12411 (exit $ac_status); }; }; then
4f6d8cc8
GK
12412 gcc_cv_mcontext_underscores=no
12413else
12414 echo "$as_me: failed program was:" >&5
12415sed 's/^/| /' conftest.$ac_ext >&5
12416
b61ff9c8 12417gcc_cv_mcontext_underscores=yes
4f6d8cc8 12418fi
b61ff9c8 12419rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8 12420fi
b61ff9c8
BS
12421echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
12422echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6
4f6d8cc8
GK
12423 if test $gcc_cv_mcontext_underscores = yes; then
12424
12425cat >>confdefs.h <<\_ACEOF
12426#define HAS_MCONTEXT_T_UNDERSCORES
12427_ACEOF
12428
12429 fi
12430 ;;
12431esac
12432
8bb915b6
NN
12433# ---------
12434# Threading
12435# ---------
12436
c2e494a8 12437# Check if a valid thread package
615be2cf 12438case ${enable_threads} in
c2e494a8
NN
12439 "" | no)
12440 # No threads
12441 target_thread_file='single'
12442 ;;
12443 yes)
12444 # default
12445 target_thread_file='single'
12446 ;;
18167442 12447 aix | dce | gnat | irix | posix | posix95 | rtems | \
d9dced13 12448 single | solaris | vxworks | win32 | mipssde)
615be2cf 12449 target_thread_file=${enable_threads}
c2e494a8
NN
12450 ;;
12451 *)
615be2cf 12452 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
12453 exit 1
12454 ;;
12455esac
12456
12457if test x${thread_file} = x; then
12458 # No thread file set by target-specific clauses in config.gcc,
12459 # so use file chosen by default logic above
12460 thread_file=${target_thread_file}
861bb6c1
JL
12461fi
12462
8bb915b6
NN
12463# Make gthr-default.h if we have a thread file.
12464gthread_flags=
12465if test $thread_file != single; then
12466 rm -f gthr-default.h
12467 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12468 gthread_flags=-DHAVE_GTHR_DEFAULT
12469fi
12470
12471
12472# --------
12473# UNSORTED
12474# --------
12475
18fbf599 12476use_cxa_atexit=no
2121a768
JT
12477if test x$enable___cxa_atexit = xyes || \
12478 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599 12479 if test x$host = x$target; then
97388150
DS
12480 case $host in
12481 # mingw32 doesn't have __cxa_atexit but uses atexit registration
12482 # keyed to flag_use_cxa_atexit
12483 *-*-mingw32*)
12484 use_cxa_atexit=yes
12485 ;;
12486 *)
b61ff9c8
BS
12487 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
12488echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
354b7da5
DH
12489if test "${ac_cv_func___cxa_atexit+set}" = set; then
12490 echo $ECHO_N "(cached) $ECHO_C" >&6
12491else
12492 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
12493/* confdefs.h. */
12494_ACEOF
12495cat confdefs.h >>conftest.$ac_ext
12496cat >>conftest.$ac_ext <<_ACEOF
12497/* end confdefs.h. */
86da66b5
HPN
12498/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12499 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12500#define __cxa_atexit innocuous___cxa_atexit
12501
354b7da5
DH
12502/* System header to define __stub macros and hopefully few prototypes,
12503 which can conflict with char __cxa_atexit (); below.
12504 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12505 <limits.h> exists even on freestanding compilers. */
86da66b5 12506
354b7da5
DH
12507#ifdef __STDC__
12508# include <limits.h>
12509#else
12510# include <assert.h>
12511#endif
86da66b5
HPN
12512
12513#undef __cxa_atexit
12514
b61ff9c8 12515/* Override any gcc2 internal prototype to avoid an error. */
354b7da5
DH
12516#ifdef __cplusplus
12517extern "C"
b61ff9c8 12518{
354b7da5 12519#endif
b61ff9c8
BS
12520/* We use char because int might match the return type of a gcc2
12521 builtin and then its argument prototype would still apply. */
354b7da5
DH
12522char __cxa_atexit ();
12523/* The GNU C library defines this for functions which it implements
12524 to always fail with ENOSYS. Some functions are actually named
12525 something starting with __ and the normal name is an alias. */
b61ff9c8 12526#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
354b7da5 12527choke me
b61ff9c8
BS
12528#else
12529char (*f) () = __cxa_atexit;
12530#endif
12531#ifdef __cplusplus
12532}
354b7da5
DH
12533#endif
12534
12535int
12536main ()
12537{
b61ff9c8 12538return f != __cxa_atexit;
354b7da5
DH
12539 ;
12540 return 0;
12541}
12542_ACEOF
12543rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
12544if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12545 (eval $ac_link) 2>conftest.er1
354b7da5 12546 ac_status=$?
86da66b5
HPN
12547 grep -v '^ *+' conftest.er1 >conftest.err
12548 rm -f conftest.er1
12549 cat conftest.err >&5
354b7da5 12550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12551 (exit $ac_status); } &&
12552 { ac_try='test -z "$ac_c_werror_flag"
12553 || test ! -s conftest.err'
12554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12555 (eval $ac_try) 2>&5
12556 ac_status=$?
12557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12558 (exit $ac_status); }; } &&
12559 { ac_try='test -s conftest$ac_exeext'
12560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12561 (eval $ac_try) 2>&5
12562 ac_status=$?
12563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12564 (exit $ac_status); }; }; then
354b7da5
DH
12565 ac_cv_func___cxa_atexit=yes
12566else
12567 echo "$as_me: failed program was:" >&5
12568sed 's/^/| /' conftest.$ac_ext >&5
12569
b61ff9c8 12570ac_cv_func___cxa_atexit=no
354b7da5 12571fi
b61ff9c8 12572rm -f conftest.err conftest.$ac_objext \
86da66b5 12573 conftest$ac_exeext conftest.$ac_ext
354b7da5 12574fi
b61ff9c8
BS
12575echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12576echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
354b7da5 12577if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
12578 use_cxa_atexit=yes
12579else
12580 echo "__cxa_atexit can't be enabled on this target"
12581fi
12582
5f60e48f 12583 ;;
97388150 12584 esac
18fbf599
PB
12585 else
12586 # We can't check for __cxa_atexit when building a cross, so assume
12587 # it is available
12588 use_cxa_atexit=yes
12589 fi
12590 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
12591
12592cat >>confdefs.h <<\_ACEOF
c7b5e395 12593#define DEFAULT_USE_CXA_ATEXIT 2
ba479fd2 12594_ACEOF
2121a768 12595
18fbf599 12596 fi
2121a768
JT
12597fi
12598
e64f5acf
SE
12599use_getipinfo=yes
12600if test x$with_system_libunwind = xyes; then
12601 if test x$host = x$target; then
b61ff9c8
BS
12602 echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5
12603echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6
e64f5acf
SE
12604if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
12605 echo $ECHO_N "(cached) $ECHO_C" >&6
12606else
12607 ac_func_search_save_LIBS=$LIBS
b61ff9c8 12608ac_cv_search__Unwind_GetIPInfo=no
e64f5acf
SE
12609cat >conftest.$ac_ext <<_ACEOF
12610/* confdefs.h. */
12611_ACEOF
12612cat confdefs.h >>conftest.$ac_ext
12613cat >>conftest.$ac_ext <<_ACEOF
12614/* end confdefs.h. */
12615
b61ff9c8 12616/* Override any gcc2 internal prototype to avoid an error. */
e64f5acf
SE
12617#ifdef __cplusplus
12618extern "C"
12619#endif
b61ff9c8
BS
12620/* We use char because int might match the return type of a gcc2
12621 builtin and then its argument prototype would still apply. */
e64f5acf
SE
12622char _Unwind_GetIPInfo ();
12623int
12624main ()
12625{
b61ff9c8 12626_Unwind_GetIPInfo ();
e64f5acf
SE
12627 ;
12628 return 0;
12629}
12630_ACEOF
b61ff9c8
BS
12631rm -f conftest.$ac_objext conftest$ac_exeext
12632if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12633 (eval $ac_link) 2>conftest.er1
e64f5acf
SE
12634 ac_status=$?
12635 grep -v '^ *+' conftest.er1 >conftest.err
12636 rm -f conftest.er1
12637 cat conftest.err >&5
12638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12639 (exit $ac_status); } &&
12640 { ac_try='test -z "$ac_c_werror_flag"
12641 || test ! -s conftest.err'
12642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12643 (eval $ac_try) 2>&5
12644 ac_status=$?
12645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12646 (exit $ac_status); }; } &&
12647 { ac_try='test -s conftest$ac_exeext'
12648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12649 (eval $ac_try) 2>&5
12650 ac_status=$?
12651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12652 (exit $ac_status); }; }; then
12653 ac_cv_search__Unwind_GetIPInfo="none required"
e64f5acf
SE
12654else
12655 echo "$as_me: failed program was:" >&5
12656sed 's/^/| /' conftest.$ac_ext >&5
12657
1a4b763e 12658fi
b61ff9c8
BS
12659rm -f conftest.err conftest.$ac_objext \
12660 conftest$ac_exeext conftest.$ac_ext
12661if test "$ac_cv_search__Unwind_GetIPInfo" = no; then
12662 for ac_lib in unwind; do
12663 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12664 cat >conftest.$ac_ext <<_ACEOF
12665/* confdefs.h. */
12666_ACEOF
12667cat confdefs.h >>conftest.$ac_ext
12668cat >>conftest.$ac_ext <<_ACEOF
12669/* end confdefs.h. */
2f41c1d6 12670
b61ff9c8
BS
12671/* Override any gcc2 internal prototype to avoid an error. */
12672#ifdef __cplusplus
12673extern "C"
12674#endif
12675/* We use char because int might match the return type of a gcc2
12676 builtin and then its argument prototype would still apply. */
12677char _Unwind_GetIPInfo ();
12678int
12679main ()
12680{
12681_Unwind_GetIPInfo ();
12682 ;
12683 return 0;
12684}
12685_ACEOF
12686rm -f conftest.$ac_objext conftest$ac_exeext
12687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12688 (eval $ac_link) 2>conftest.er1
12689 ac_status=$?
12690 grep -v '^ *+' conftest.er1 >conftest.err
12691 rm -f conftest.er1
12692 cat conftest.err >&5
12693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12694 (exit $ac_status); } &&
12695 { ac_try='test -z "$ac_c_werror_flag"
12696 || test ! -s conftest.err'
12697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12698 (eval $ac_try) 2>&5
12699 ac_status=$?
12700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12701 (exit $ac_status); }; } &&
12702 { ac_try='test -s conftest$ac_exeext'
12703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12704 (eval $ac_try) 2>&5
12705 ac_status=$?
12706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12707 (exit $ac_status); }; }; then
12708 ac_cv_search__Unwind_GetIPInfo="-l$ac_lib"
12709break
1a4b763e 12710else
b61ff9c8
BS
12711 echo "$as_me: failed program was:" >&5
12712sed 's/^/| /' conftest.$ac_ext >&5
12713
12714fi
12715rm -f conftest.err conftest.$ac_objext \
12716 conftest$ac_exeext conftest.$ac_ext
12717 done
a6ccdbab 12718fi
a6ccdbab
EC
12719LIBS=$ac_func_search_save_LIBS
12720fi
b61ff9c8
BS
12721echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5
12722echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6
12723if test "$ac_cv_search__Unwind_GetIPInfo" != no; then
12724 test "$ac_cv_search__Unwind_GetIPInfo" = "none required" || LIBS="$ac_cv_search__Unwind_GetIPInfo $LIBS"
a6ccdbab
EC
12725
12726else
12727 use_getipinfo=no
12728fi
12729
12730 fi
12731fi
12732
12733if test x$use_getipinfo = xyes; then
12734
12735cat >>confdefs.h <<\_ACEOF
12736#define HAVE_GETIPINFO 1
e64f5acf
SE
12737_ACEOF
12738
12739else
12740 echo "The system unwind library does not support _Unwind_GetIPInfo."
12741fi
12742
a5381466 12743# Look for a file containing extra machine modes.
1c0ca89d
ZW
12744if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12745 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
12746
12747
12748cat >>confdefs.h <<_ACEOF
e22340b0 12749#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 12750_ACEOF
a5381466
ZW
12751
12752fi
12753
75685792
RS
12754# Convert extra_options into a form suitable for Makefile use.
12755extra_opt_files=
12756for f in $extra_options; do
12757 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12758done
12759
12760
b7cb92ad 12761# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 12762# the first file included by config.h.
4977bab6 12763# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 12764# as well. If host!=build, we are in error and need to do more
db81d74a 12765# work to find out the build config parameters.
75bffa71 12766if test x$host = x$build
db81d74a 12767then
eaf4e618 12768 build_auto=auto-host.h
b7cb92ad
JL
12769else
12770 # We create a subdir, then run autoconf in the subdir.
12771 # To prevent recursion we set host and build for the new
12772 # invocation of configure to the build for this invocation
ba479fd2 12773 # of configure.
b7cb92ad
JL
12774 tempdir=build.$$
12775 rm -rf $tempdir
12776 mkdir $tempdir
12777 cd $tempdir
12778 case ${srcdir} in
255b8a49 12779 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
12780 *) realsrcdir=../${srcdir};;
12781 esac
d920e825
L
12782 saved_CFLAGS="${CFLAGS}"
12783 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12784 ${realsrcdir}/configure \
33e70558 12785 --enable-languages=${enable_languages-all} \
534d0cc0 12786 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 12787 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
12788
12789 # We just finished tests for the build machine, so rename
12790 # the file auto-build.h in the gcc directory.
12791 mv auto-host.h ../auto-build.h
12792 cd ..
12793 rm -rf $tempdir
eaf4e618 12794 build_auto=auto-build.h
db81d74a
RH
12795fi
12796
06f0b04c 12797
eaf4e618 12798tm_file="${tm_file} defaults.h"
4977bab6
ZW
12799tm_p_file="${tm_p_file} tm-preds.h"
12800host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12801build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 12802# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 12803# put this back in temporarily.
232b67d9 12804xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 12805
34a86c2b
NN
12806# --------
12807# UNSORTED
12808# --------
12809
cc1e60ea 12810# Compile in configure arguments.
8105825d 12811if test -f configargs.h ; then
cc1e60ea 12812 # Being re-configured.
022dae81 12813 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
12814 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12815else
12816 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12817fi
eeae7b41
DJ
12818
12819# Double all backslashes and backslash all quotes to turn
12820# gcc_config_arguments into a C string.
12821sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12822$gcc_config_arguments
12823EOF
12824gcc_config_arguments_str=`cat conftest.out`
12825rm -f conftest.out
12826
cc1e60ea
JM
12827cat > configargs.h <<EOF
12828/* Generated automatically. */
eeae7b41 12829static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 12830static const char thread_model[] = "$thread_file";
7816bea0
DJ
12831
12832static const struct {
12833 const char *name, *value;
12834} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
12835EOF
12836
ab87f8c8 12837# Internationalization
18fc9bd4
RG
12838# If we haven't got the data from the intl directory,
12839# assume NLS is disabled.
12840USE_NLS=no
12841LIBINTL=
12842LIBINTL_DEP=
12843INCINTL=
12844XGETTEXT=
12845GMSGFMT=
12846POSUB=
12847
12848if test -f ../intl/config.intl; then
12849 . ../intl/config.intl
12850fi
b61ff9c8
BS
12851echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12852echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
18fc9bd4 12853if test x"$USE_NLS" != xyes; then
b61ff9c8
BS
12854 echo "$as_me:$LINENO: result: no" >&5
12855echo "${ECHO_T}no" >&6
18fc9bd4 12856else
b61ff9c8
BS
12857 echo "$as_me:$LINENO: result: yes" >&5
12858echo "${ECHO_T}yes" >&6
18fc9bd4
RG
12859
12860cat >>confdefs.h <<\_ACEOF
12861#define ENABLE_NLS 1
12862_ACEOF
12863
12864
b61ff9c8
BS
12865 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12866echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
18fc9bd4
RG
12867 # Look for .po and .gmo files in the source directory.
12868 CATALOGS=
12869 XLINGUAS=
12870 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12871 # If there aren't any .gmo files the shell will give us the
12872 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12873 # weeded out.
12874 case "$cat" in *\**)
12875 continue;;
12876 esac
12877 # The quadruple backslash is collapsed to a double backslash
12878 # by the backticks, then collapsed again by the double quotes,
12879 # leaving us with one backslash in the sed expression (right
12880 # before the dot that mustn't act as a wildcard).
12881 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
12882 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
12883 # The user is allowed to set LINGUAS to a list of languages to
12884 # install catalogs for. If it's empty that means "all of them."
12885 if test "x$LINGUAS" = x; then
12886 CATALOGS="$CATALOGS $cat"
12887 XLINGUAS="$XLINGUAS $lang"
12888 else
12889 case "$LINGUAS" in *$lang*)
12890 CATALOGS="$CATALOGS $cat"
12891 XLINGUAS="$XLINGUAS $lang"
12892 ;;
12893 esac
12894 fi
12895 done
12896 LINGUAS="$XLINGUAS"
b61ff9c8
BS
12897 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12898echo "${ECHO_T}$LINGUAS" >&6
18fc9bd4
RG
12899
12900
12901 DATADIRNAME=share
12902
12903 INSTOBJEXT=.mo
12904
12905 GENCAT=gencat
12906
12907 CATOBJEXT=.gmo
12908
12909fi
861bb6c1 12910
56694dd9
ZW
12911# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12912# -liconv on the link line twice.
12913case "$LIBINTL" in *$LIBICONV*)
12914 LIBICONV= ;;
12915esac
dc6746e7 12916
b61ff9c8 12917# Check whether --enable-secureplt or --disable-secureplt was given.
7f970b70 12918if test "${enable_secureplt+set}" = set; then
b61ff9c8 12919 enableval="$enable_secureplt"
7f970b70 12920
b61ff9c8 12921fi;
7f970b70 12922
56694dd9 12923# Windows32 Registry support for specifying GCC installation paths.
b61ff9c8 12924# Check whether --enable-win32-registry or --disable-win32-registry was given.
56694dd9 12925if test "${enable_win32_registry+set}" = set; then
b61ff9c8 12926 enableval="$enable_win32_registry"
dc6746e7 12927
b61ff9c8 12928fi;
ba479fd2 12929
a1286ef5
ZW
12930case $host_os in
12931 win32 | pe | cygwin* | mingw32* | uwin*)
12932 if test "x$enable_win32_registry" != xno; then
b61ff9c8
BS
12933 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
12934echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
ba479fd2
NN
12935if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12936 echo $ECHO_N "(cached) $ECHO_C" >&6
12937else
12938 ac_func_search_save_LIBS=$LIBS
b61ff9c8 12939ac_cv_search_RegOpenKeyExA=no
ba479fd2 12940cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12941/* confdefs.h. */
12942_ACEOF
12943cat confdefs.h >>conftest.$ac_ext
12944cat >>conftest.$ac_ext <<_ACEOF
12945/* end confdefs.h. */
861bb6c1 12946
b61ff9c8 12947/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12948#ifdef __cplusplus
12949extern "C"
12950#endif
b61ff9c8
BS
12951/* We use char because int might match the return type of a gcc2
12952 builtin and then its argument prototype would still apply. */
ba479fd2
NN
12953char RegOpenKeyExA ();
12954int
12955main ()
12956{
b61ff9c8 12957RegOpenKeyExA ();
ba479fd2
NN
12958 ;
12959 return 0;
12960}
12961_ACEOF
b61ff9c8
BS
12962rm -f conftest.$ac_objext conftest$ac_exeext
12963if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12964 (eval $ac_link) 2>conftest.er1
ba479fd2 12965 ac_status=$?
86da66b5
HPN
12966 grep -v '^ *+' conftest.er1 >conftest.err
12967 rm -f conftest.er1
12968 cat conftest.err >&5
ba479fd2 12969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
12970 (exit $ac_status); } &&
12971 { ac_try='test -z "$ac_c_werror_flag"
12972 || test ! -s conftest.err'
12973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12974 (eval $ac_try) 2>&5
12975 ac_status=$?
12976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12977 (exit $ac_status); }; } &&
12978 { ac_try='test -s conftest$ac_exeext'
12979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12980 (eval $ac_try) 2>&5
12981 ac_status=$?
12982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12983 (exit $ac_status); }; }; then
12984 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 12985else
ba479fd2
NN
12986 echo "$as_me: failed program was:" >&5
12987sed 's/^/| /' conftest.$ac_ext >&5
12988
1a4b763e 12989fi
b61ff9c8
BS
12990rm -f conftest.err conftest.$ac_objext \
12991 conftest$ac_exeext conftest.$ac_ext
12992if test "$ac_cv_search_RegOpenKeyExA" = no; then
12993 for ac_lib in advapi32; do
12994 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12995 cat >conftest.$ac_ext <<_ACEOF
12996/* confdefs.h. */
12997_ACEOF
12998cat confdefs.h >>conftest.$ac_ext
12999cat >>conftest.$ac_ext <<_ACEOF
13000/* end confdefs.h. */
2f41c1d6 13001
b61ff9c8
BS
13002/* Override any gcc2 internal prototype to avoid an error. */
13003#ifdef __cplusplus
13004extern "C"
13005#endif
13006/* We use char because int might match the return type of a gcc2
13007 builtin and then its argument prototype would still apply. */
13008char RegOpenKeyExA ();
13009int
13010main ()
13011{
13012RegOpenKeyExA ();
13013 ;
13014 return 0;
13015}
13016_ACEOF
13017rm -f conftest.$ac_objext conftest$ac_exeext
13018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13019 (eval $ac_link) 2>conftest.er1
13020 ac_status=$?
13021 grep -v '^ *+' conftest.er1 >conftest.err
13022 rm -f conftest.er1
13023 cat conftest.err >&5
13024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13025 (exit $ac_status); } &&
13026 { ac_try='test -z "$ac_c_werror_flag"
13027 || test ! -s conftest.err'
13028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13029 (eval $ac_try) 2>&5
13030 ac_status=$?
13031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13032 (exit $ac_status); }; } &&
13033 { ac_try='test -s conftest$ac_exeext'
13034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13035 (eval $ac_try) 2>&5
13036 ac_status=$?
13037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13038 (exit $ac_status); }; }; then
13039 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
13040break
1a4b763e 13041else
b61ff9c8
BS
13042 echo "$as_me: failed program was:" >&5
13043sed 's/^/| /' conftest.$ac_ext >&5
13044
13045fi
13046rm -f conftest.err conftest.$ac_objext \
13047 conftest$ac_exeext conftest.$ac_ext
13048 done
dd7f7a6e
EC
13049fi
13050LIBS=$ac_func_search_save_LIBS
13051fi
b61ff9c8
BS
13052echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
13053echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
13054if test "$ac_cv_search_RegOpenKeyExA" != no; then
13055 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
dd7f7a6e
EC
13056
13057else
13058 enable_win32_registry=no
13059fi
13060
13061 fi
13062
13063 if test "x$enable_win32_registry" != xno; then
13064
13065cat >>confdefs.h <<\_ACEOF
13066#define ENABLE_WIN32_REGISTRY 1
13067_ACEOF
13068
13069
13070 if test "x$enable_win32_registry" != xyes \
13071 && test "x$enable_win32_registry" != x; then
13072
13073cat >>confdefs.h <<_ACEOF
13074#define WIN32_REGISTRY_KEY "$enable_win32_registry"
13075_ACEOF
13076
13077 fi
13078 fi
13079 ;;
13080esac
ab87f8c8 13081
56694dd9
ZW
13082# Get an absolute path to the GCC top-level source directory
13083holddir=`${PWDCMD-pwd}`
13084cd $srcdir
13085topdir=`${PWDCMD-pwd}`
13086cd $holddir
ab87f8c8 13087
56694dd9 13088# Conditionalize the makefile for this host machine.
2ed26f6b 13089xmake_file=
c406e779 13090for f in ${host_xmake_file}
56694dd9
ZW
13091do
13092 if test -f ${srcdir}/config/$f
13093 then
2ed26f6b 13094 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
13095 fi
13096done
093e61a6 13097
56694dd9 13098# Conditionalize the makefile for this target machine.
2ed26f6b 13099tmake_file_=
c406e779 13100for f in ${tmake_file}
56694dd9
ZW
13101do
13102 if test -f ${srcdir}/config/$f
13103 then
2ed26f6b 13104 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
13105 fi
13106done
2ed26f6b 13107tmake_file="${tmake_file_}"
71a94577 13108
5395b47b
NN
13109# This is a terrible hack which will go away some day.
13110host_cc_for_libada=${CC}
1e3fad21
NN
13111
13112
ab87f8c8
JL
13113out_object_file=`basename $out_file .c`.o
13114
75685792
RS
13115tm_file_list="options.h"
13116tm_include_list="options.h"
ab87f8c8 13117for f in $tm_file; do
64ccbc99 13118 case $f in
3ca43df7
RS
13119 ./* )
13120 f=`echo $f | sed 's/^..//'`
13121 tm_file_list="${tm_file_list} $f"
13122 tm_include_list="${tm_include_list} $f"
13123 ;;
d02af173 13124 defaults.h )
e22340b0
ZW
13125 tm_file_list="${tm_file_list} \$(srcdir)/$f"
13126 tm_include_list="${tm_include_list} $f"
13127 ;;
13128 * )
13129 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
13130 tm_include_list="${tm_include_list} config/$f"
13131 ;;
64ccbc99 13132 esac
ab87f8c8
JL
13133done
13134
11642c3a 13135tm_p_file_list=
e22340b0 13136tm_p_include_list=
11642c3a 13137for f in $tm_p_file; do
4977bab6
ZW
13138 case $f in
13139 tm-preds.h )
e22340b0
ZW
13140 tm_p_file_list="${tm_p_file_list} $f"
13141 tm_p_include_list="${tm_p_include_list} $f"
13142 ;;
13143 * )
13144 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
13145 tm_p_include_list="${tm_p_include_list} config/$f"
13146 esac
13147done
13148
13149xm_file_list=
13150xm_include_list=
13151for f in $xm_file; do
13152 case $f in
13153 ansidecl.h )
13154 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
13155 xm_include_list="${xm_include_list} $f"
13156 ;;
13157 auto-host.h )
13158 xm_file_list="${xm_file_list} $f"
13159 xm_include_list="${xm_include_list} $f"
13160 ;;
13161 * )
13162 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
13163 xm_include_list="${xm_include_list} config/$f"
13164 ;;
4977bab6 13165 esac
11642c3a
ZW
13166done
13167
ab87f8c8 13168host_xm_file_list=
e22340b0 13169host_xm_include_list=
ab87f8c8 13170for f in $host_xm_file; do
64ccbc99 13171 case $f in
d02af173 13172 ansidecl.h )
e22340b0
ZW
13173 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
13174 host_xm_include_list="${host_xm_include_list} $f"
13175 ;;
e2500fed 13176 auto-host.h )
e22340b0
ZW
13177 host_xm_file_list="${host_xm_file_list} $f"
13178 host_xm_include_list="${host_xm_include_list} $f"
13179 ;;
13180 * )
13181 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
13182 host_xm_include_list="${host_xm_include_list} config/$f"
13183 ;;
64ccbc99 13184 esac
ab87f8c8
JL
13185done
13186
13187build_xm_file_list=
13188for f in $build_xm_file; do
64ccbc99 13189 case $f in
d02af173 13190 ansidecl.h )
e22340b0
ZW
13191 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
13192 build_xm_include_list="${build_xm_include_list} $f"
13193 ;;
e2500fed 13194 auto-build.h | auto-host.h )
e22340b0
ZW
13195 build_xm_file_list="${build_xm_file_list} $f"
13196 build_xm_include_list="${build_xm_include_list} $f"
13197 ;;
13198 * )
13199 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
13200 build_xm_include_list="${build_xm_include_list} config/$f"
13201 ;;
64ccbc99 13202 esac
ab87f8c8
JL
13203done
13204
2989d30c
GK
13205# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
13206# cross-compiler which does not use the native headers and libraries.
a078a589 13207# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
13208CROSS=
13209ALL=all.internal
13210SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
13211
13212if test "x$with_build_sysroot" != x; then
14da6073 13213 build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
13214else
13215 # This value is used, even on a native system, because
13216 # CROSS_SYSTEM_HEADER_DIR is just
13217 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
13218 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
13219fi
13220
ab87f8c8
JL
13221if test x$host != x$target
13222then
2989d30c 13223 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
a078a589 13224 ALL=all.cross
160633c6 13225 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 13226 case "$host","$target" in
3a7e8b87
GK
13227 # Darwin crosses can use the host system's libraries and headers,
13228 # because of the fat library support. Of course, it must be the
13229 # same version of Darwin on both sides. Allow the user to
13230 # just say --target=foo-darwin without a version number to mean
13231 # "the version on this system".
13232 *-*-darwin*,*-*-darwin*)
13233 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
13234 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
13235 if test $hostos = $targetos -o $targetos = darwin ; then
13236 CROSS=
13237 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
13238 with_headers=yes
13239 fi
13240 ;;
13241
343f59d9
AM
13242 i?86-*-*,x86_64-*-* \
13243 | powerpc*-*-*,powerpc64*-*-*)
13244 CROSS="$CROSS -DNATIVE_CROSS" ;;
13245 esac
7a615b25 13246elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 13247 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
13248fi
13249
b39d221a
EC
13250# If this is a cross-compiler that does not
13251# have its own set of headers then define
13252# inhibit_libc
13253
dc06db20
R
13254# If this is using newlib, without having the headers available now,
13255# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
13256# This prevents libgcc2 from containing any code which requires libc
13257# support.
160633c6 13258inhibit_libc=false
dc06db20
R
13259if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
13260 test x$with_newlib = xyes ; } &&
e50084fa 13261 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 13262 inhibit_libc=true
b39d221a
EC
13263fi
13264
13265
a078a589
ZW
13266# When building gcc with a cross-compiler, we need to adjust things so
13267# that the generator programs are still built with the native compiler.
13268# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
13269
13270# These are the normal (build=host) settings:
ba479fd2
NN
13271CC_FOR_BUILD='$(CC)'
13272BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 13273STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
13274
13275# Possibly disable fixproto, on a per-target basis.
13276case ${use_fixproto} in
13277 no)
13278 STMP_FIXPROTO=
13279 ;;
13280 yes)
13281 STMP_FIXPROTO=stmp-fixproto
13282 ;;
13283esac
13284
a078a589 13285
83599948
NS
13286# And these apply if build != host, or we are generating coverage data
13287if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 13288then
b11e4747 13289 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 13290
7a615b25 13291 if test "x$TARGET_SYSTEM_ROOT" = x; then
d8e5117d 13292 if test "x$STMP_FIXPROTO" != x; then
de253ca4
GK
13293 STMP_FIXPROTO=stmp-install-fixproto
13294 fi
7a615b25 13295 fi
ab87f8c8
JL
13296fi
13297
13298# Expand extra_headers to include complete path.
13299# This substitutes for lots of t-* files.
13300extra_headers_list=
b1ef58c8
NN
13301# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
13302for file in ${extra_headers} ; do
13303 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
13304done
ab87f8c8 13305
1617e5ee
GK
13306# If use_gcc_tgmath is set, append ginclude/tgmath.h.
13307if test x"$use_gcc_tgmath" = xyes
13308then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h"
13309fi
13310
c38f02df
ILT
13311# Define collect2 in Makefile.
13312case $host_can_use_collect2 in
13313 no) collect2= ;;
13314 *) collect2='collect2$(exeext)' ;;
13315esac
13316
13317
ab87f8c8 13318# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
13319case $use_collect2 in
13320 no) use_collect2= ;;
13321 "") ;;
ba479fd2 13322 *)
34a86c2b
NN
13323 host_xm_defines="${host_xm_defines} USE_COLLECT2"
13324 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
13325 case $host_can_use_collect2 in
13326 no)
13327 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
13328echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
13329 { (exit 1); exit 1; }; }
13330 ;;
13331 esac
34a86c2b
NN
13332 ;;
13333esac
ab87f8c8 13334
8bb915b6
NN
13335# ---------------------------
13336# Assembler & linker features
13337# ---------------------------
13338
d869a8c4
NN
13339# Identify the assembler which will work hand-in-glove with the newly
13340# built GCC, so that we can examine its features. This is the assembler
13341# which will be driven by the driver program.
13342#
13343# If build != host, and we aren't building gas in-tree, we identify a
13344# build->target assembler and hope that it will have the same features
13345# as the host->target assembler we'll be using.
981d4858
JM
13346gcc_cv_gas_major_version=
13347gcc_cv_gas_minor_version=
ab87f8c8 13348gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
e8b05380
PB
13349
13350if test "${gcc_cv_as+set}" = set; then
13351 :
13352else
13353
ab87f8c8
JL
13354if test -x "$DEFAULT_ASSEMBLER"; then
13355 gcc_cv_as="$DEFAULT_ASSEMBLER"
34a86c2b 13356elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
13357 && test -f ../gas/Makefile \
13358 && test x$build = x$host; then
e8b05380
PB
13359 gcc_cv_as=../gas/as-new$build_exeext
13360elif test -x as$build_exeext; then
13361 # Build using assembler in the current directory.
13362 gcc_cv_as=./as$build_exeext
13363elif test -x $AS_FOR_TARGET; then
13364 gcc_cv_as="$AS_FOR_TARGET"
13365else
13366 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
13367set dummy $AS_FOR_TARGET; ac_word=$2
b61ff9c8
BS
13368echo "$as_me:$LINENO: checking for $ac_word" >&5
13369echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380
PB
13370if test "${ac_cv_path_gcc_cv_as+set}" = set; then
13371 echo $ECHO_N "(cached) $ECHO_C" >&6
13372else
13373 case $gcc_cv_as in
13374 [\\/]* | ?:[\\/]*)
13375 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
13376 ;;
13377 *)
13378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13379for as_dir in $PATH
13380do
13381 IFS=$as_save_IFS
13382 test -z "$as_dir" && as_dir=.
13383 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 13384 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380
PB
13385 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
13386 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13387 break 2
13388 fi
13389done
13390done
13391
13392 ;;
13393esac
13394fi
13395gcc_cv_as=$ac_cv_path_gcc_cv_as
b61ff9c8 13396
e8b05380 13397if test -n "$gcc_cv_as"; then
b61ff9c8
BS
13398 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13399echo "${ECHO_T}$gcc_cv_as" >&6
e8b05380 13400else
b61ff9c8
BS
13401 echo "$as_me:$LINENO: result: no" >&5
13402echo "${ECHO_T}no" >&6
e8b05380
PB
13403fi
13404
13405fi
13406fi
13407
13408
13409ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
13410
be0fe523
PB
13411case "$ORIGINAL_AS_FOR_TARGET" in
13412 ./as | ./as$build_exeext) ;;
b61ff9c8 13413 *) ac_config_files="$ac_config_files as:exec-tool.in"
be0fe523
PB
13414 ;;
13415esac
e8b05380 13416
b61ff9c8
BS
13417echo "$as_me:$LINENO: checking what assembler to use" >&5
13418echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
e8b05380 13419if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
08d105fa
AO
13420 # Single tree build which includes gas. We want to prefer it
13421 # over whatever linker top-level may have detected, since
13422 # we'll use what we're building after installation anyway.
b61ff9c8
BS
13423 echo "$as_me:$LINENO: result: newly built gas" >&5
13424echo "${ECHO_T}newly built gas" >&6
ad9c4d9f
NN
13425 in_tree_gas=yes
13426 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
13427for f in $gcc_cv_as_bfd_srcdir/configure \
13428 $gcc_cv_as_gas_srcdir/configure \
13429 $gcc_cv_as_gas_srcdir/configure.in \
13430 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 13431 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
13432 if test x$gcc_cv_gas_version != x; then
13433 break
13434 fi
13435done
13436gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
13437gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13438gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
13439case $gcc_cv_gas_patch_version in
13440 "") gcc_cv_gas_patch_version="0" ;;
13441esac
8ada417f
ZW
13442gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
13443 + $gcc_cv_gas_minor_version \) \* 1000 \
13444 + $gcc_cv_gas_patch_version`
ad9c4d9f 13445
5408ac6c
HPN
13446 in_tree_gas_is_elf=no
13447 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
13448 || (grep 'obj_format = multi' ../gas/Makefile \
13449 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
13450 then
13451 in_tree_gas_is_elf=yes
13452 fi
e8b05380 13453else
b61ff9c8
BS
13454 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13455echo "${ECHO_T}$gcc_cv_as" >&6
e8b05380 13456 in_tree_gas=no
981d4858 13457fi
9e423e6d 13458
e8b05380
PB
13459# Identify the linker which will work hand-in-glove with the newly
13460# built GCC, so that we can examine its features. This is the linker
13461# which will be driven by the driver program.
9f18db39 13462#
e8b05380
PB
13463# If build != host, and we aren't building gas in-tree, we identify a
13464# build->target linker and hope that it will have the same features
13465# as the host->target linker we'll be using.
13466gcc_cv_gld_major_version=
13467gcc_cv_gld_minor_version=
13468gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
13469gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9f18db39 13470
e8b05380
PB
13471if test "${gcc_cv_ld+set}" = set; then
13472 :
9f18db39 13473else
9f18db39 13474
e8b05380
PB
13475if test -x "$DEFAULT_LINKER"; then
13476 gcc_cv_ld="$DEFAULT_LINKER"
13477elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
13478 && test -f ../ld/Makefile \
13479 && test x$build = x$host; then
13480 gcc_cv_ld=../ld/ld-new$build_exeext
13481elif test -x collect-ld$build_exeext; then
13482 # Build using linker in the current directory.
13483 gcc_cv_ld=./collect-ld$build_exeext
13484elif test -x $LD_FOR_TARGET; then
13485 gcc_cv_ld="$LD_FOR_TARGET"
13486else
13487 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
13488set dummy $LD_FOR_TARGET; ac_word=$2
b61ff9c8
BS
13489echo "$as_me:$LINENO: checking for $ac_word" >&5
13490echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13491if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
d739199a
DJ
13492 echo $ECHO_N "(cached) $ECHO_C" >&6
13493else
e8b05380 13494 case $gcc_cv_ld in
d739199a 13495 [\\/]* | ?:[\\/]*)
e8b05380 13496 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
13497 ;;
13498 *)
13499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13500for as_dir in $PATH
13501do
13502 IFS=$as_save_IFS
13503 test -z "$as_dir" && as_dir=.
13504 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 13505 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13506 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13507 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13508 break 2
13509 fi
13510done
13511done
13512
13513 ;;
13514esac
13515fi
e8b05380 13516gcc_cv_ld=$ac_cv_path_gcc_cv_ld
b61ff9c8 13517
e8b05380 13518if test -n "$gcc_cv_ld"; then
b61ff9c8
BS
13519 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13520echo "${ECHO_T}$gcc_cv_ld" >&6
d739199a 13521else
b61ff9c8
BS
13522 echo "$as_me:$LINENO: result: no" >&5
13523echo "${ECHO_T}no" >&6
d739199a
DJ
13524fi
13525
13526fi
e8b05380
PB
13527fi
13528
13529
13530ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
13531
be0fe523
PB
13532case "$ORIGINAL_LD_FOR_TARGET" in
13533 ./collect-ld | ./collect-ld$build_exeext) ;;
b61ff9c8 13534 *) ac_config_files="$ac_config_files collect-ld:exec-tool.in"
be0fe523
PB
13535 ;;
13536esac
e8b05380 13537
b61ff9c8
BS
13538echo "$as_me:$LINENO: checking what linker to use" >&5
13539echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
e8b05380
PB
13540if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
13541 # Single tree build which includes ld. We want to prefer it
13542 # over whatever linker top-level may have detected, since
13543 # we'll use what we're building after installation anyway.
b61ff9c8
BS
13544 echo "$as_me:$LINENO: result: newly built ld" >&5
13545echo "${ECHO_T}newly built ld" >&6
e8b05380
PB
13546 in_tree_ld=yes
13547 in_tree_ld_is_elf=no
13548 if (grep 'EMUL = .*elf' ../ld/Makefile \
13549 || grep 'EMUL = .*linux' ../ld/Makefile \
13550 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
13551 in_tree_ld_is_elf=yes
13552 fi
13553 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
13554 do
13555 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
13556 if test x$gcc_cv_gld_version != x; then
13557 break
13558 fi
13559 done
13560 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
13561 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13562else
b61ff9c8
BS
13563 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13564echo "${ECHO_T}$gcc_cv_ld" >&6
e8b05380
PB
13565 in_tree_ld=no
13566fi
13567
13568# Figure out what nm we will be using.
13569gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
13570if test "${gcc_cv_nm+set}" = set; then
13571 :
13572else
13573
13574if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
13575 && test -f ../binutils/Makefile \
13576 && test x$build = x$host; then
e8b05380
PB
13577 gcc_cv_nm=../binutils/nm-new$build_exeext
13578elif test -x nm$build_exeext; then
13579 gcc_cv_nm=./nm$build_exeext
13580elif test -x $NM_FOR_TARGET; then
13581 gcc_cv_nm="$NM_FOR_TARGET"
13582else
13583 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
13584set dummy $NM_FOR_TARGET; ac_word=$2
b61ff9c8
BS
13585echo "$as_me:$LINENO: checking for $ac_word" >&5
13586echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13587if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
d739199a
DJ
13588 echo $ECHO_N "(cached) $ECHO_C" >&6
13589else
e8b05380 13590 case $gcc_cv_nm in
d739199a 13591 [\\/]* | ?:[\\/]*)
e8b05380 13592 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
13593 ;;
13594 *)
13595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13596for as_dir in $PATH
13597do
13598 IFS=$as_save_IFS
13599 test -z "$as_dir" && as_dir=.
13600 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 13601 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13602 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13603 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13604 break 2
13605 fi
13606done
13607done
13608
13609 ;;
13610esac
13611fi
e8b05380 13612gcc_cv_nm=$ac_cv_path_gcc_cv_nm
b61ff9c8 13613
e8b05380 13614if test -n "$gcc_cv_nm"; then
b61ff9c8
BS
13615 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13616echo "${ECHO_T}$gcc_cv_nm" >&6
d739199a 13617else
b61ff9c8
BS
13618 echo "$as_me:$LINENO: result: no" >&5
13619echo "${ECHO_T}no" >&6
d739199a
DJ
13620fi
13621
13622fi
e8b05380 13623fi
d739199a 13624
e8b05380 13625
b61ff9c8
BS
13626echo "$as_me:$LINENO: checking what nm to use" >&5
13627echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
e8b05380
PB
13628if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
13629 # Single tree build which includes binutils.
b61ff9c8
BS
13630 echo "$as_me:$LINENO: result: newly built nm" >&5
13631echo "${ECHO_T}newly built nm" >&6
e8b05380
PB
13632 in_tree_nm=yes
13633else
b61ff9c8
BS
13634 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13635echo "${ECHO_T}$gcc_cv_nm" >&6
e8b05380
PB
13636 in_tree_nm=no
13637fi
13638
13639ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
13640
be0fe523
PB
13641case "$ORIGINAL_NM_FOR_TARGET" in
13642 ./nm | ./nm$build_exeext) ;;
b61ff9c8 13643 *) ac_config_files="$ac_config_files nm:exec-tool.in"
be0fe523
PB
13644 ;;
13645esac
13646
e8b05380
PB
13647
13648# Figure out what objdump we will be using.
13649if test "${gcc_cv_objdump+set}" = set; then
13650 :
13651else
13652
13653if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
13654 && test -f ../binutils/Makefile \
13655 && test x$build = x$host; then
e8b05380
PB
13656 # Single tree build which includes binutils.
13657 gcc_cv_objdump=../binutils/objdump$build_exeext
13658elif test -x objdump$build_exeext; then
13659 gcc_cv_objdump=./objdump$build_exeext
13660elif test -x $OBJDUMP_FOR_TARGET; then
13661 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
13662else
13663 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
13664set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
b61ff9c8
BS
13665echo "$as_me:$LINENO: checking for $ac_word" >&5
13666echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13667if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
9f18db39
PB
13668 echo $ECHO_N "(cached) $ECHO_C" >&6
13669else
e8b05380 13670 case $gcc_cv_objdump in
9f18db39 13671 [\\/]* | ?:[\\/]*)
e8b05380 13672 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
13673 ;;
13674 *)
13675 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 13676for as_dir in $PATH
9f18db39
PB
13677do
13678 IFS=$as_save_IFS
13679 test -z "$as_dir" && as_dir=.
13680 for ac_exec_ext in '' $ac_executable_extensions; do
b61ff9c8 13681 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13682 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
9f18db39
PB
13683 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13684 break 2
13685 fi
13686done
13687done
779243f7 13688
9f18db39
PB
13689 ;;
13690esac
13691fi
e8b05380 13692gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
b61ff9c8 13693
e8b05380 13694if test -n "$gcc_cv_objdump"; then
b61ff9c8
BS
13695 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13696echo "${ECHO_T}$gcc_cv_objdump" >&6
9f18db39 13697else
b61ff9c8
BS
13698 echo "$as_me:$LINENO: result: no" >&5
13699echo "${ECHO_T}no" >&6
9f18db39
PB
13700fi
13701
e8b05380
PB
13702fi
13703fi
9f18db39 13704
e8b05380 13705
b61ff9c8
BS
13706echo "$as_me:$LINENO: checking what objdump to use" >&5
13707echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
e8b05380
PB
13708if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
13709 # Single tree build which includes binutils.
b61ff9c8
BS
13710 echo "$as_me:$LINENO: result: newly built objdump" >&5
13711echo "${ECHO_T}newly built objdump" >&6
e8b05380 13712elif test x$gcc_cv_objdump = x; then
b61ff9c8
BS
13713 echo "$as_me:$LINENO: result: not found" >&5
13714echo "${ECHO_T}not found" >&6
e8b05380 13715else
b61ff9c8
BS
13716 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13717echo "${ECHO_T}$gcc_cv_objdump" >&6
a2eafc76 13718fi
3cae5780 13719
981d4858 13720# Figure out what assembler alignment features are present.
b61ff9c8
BS
13721echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13722echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
ba479fd2
NN
13723if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13724 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13725else
13726 gcc_cv_as_balign_and_p2align=no
13727 if test $in_tree_gas = yes; then
13728 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13729 then gcc_cv_as_balign_and_p2align=yes
13730fi
13731 elif test x$gcc_cv_as != x; then
6e3f3080 13732 echo '.balign 4
8ada417f 13733.p2align 2' > conftest.s
ba479fd2
NN
13734 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13736 (eval $ac_try) 2>&5
13737 ac_status=$?
13738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13739 (exit $ac_status); }; }
8ada417f
ZW
13740 then
13741 gcc_cv_as_balign_and_p2align=yes
13742 else
13743 echo "configure: failed program was" >&5
13744 cat conftest.s >&5
13745 fi
13746 rm -f conftest.o conftest.s
13747 fi
13748fi
b61ff9c8
BS
13749echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13750echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 13751if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
13752
13753cat >>confdefs.h <<\_ACEOF
981d4858 13754#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 13755_ACEOF
981d4858 13756
ad9c4d9f
NN
13757fi
13758
b61ff9c8
BS
13759echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13760echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
ba479fd2
NN
13761if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13762 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13763else
13764 gcc_cv_as_max_skip_p2align=no
13765 if test $in_tree_gas = yes; then
13766 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13767 then gcc_cv_as_max_skip_p2align=yes
13768fi
13769 elif test x$gcc_cv_as != x; then
6e3f3080 13770 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
13771 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13773 (eval $ac_try) 2>&5
13774 ac_status=$?
13775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13776 (exit $ac_status); }; }
8ada417f
ZW
13777 then
13778 gcc_cv_as_max_skip_p2align=yes
13779 else
13780 echo "configure: failed program was" >&5
13781 cat conftest.s >&5
13782 fi
13783 rm -f conftest.o conftest.s
13784 fi
ad9c4d9f 13785fi
b61ff9c8
BS
13786echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13787echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 13788if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
13789
13790cat >>confdefs.h <<\_ACEOF
9e423e6d 13791#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 13792_ACEOF
9e423e6d 13793
9e423e6d 13794fi
ad9c4d9f 13795
b61ff9c8
BS
13796echo "$as_me:$LINENO: checking assembler for .literal16" >&5
13797echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6
5708d18d
MS
13798if test "${gcc_cv_as_literal16+set}" = set; then
13799 echo $ECHO_N "(cached) $ECHO_C" >&6
13800else
13801 gcc_cv_as_literal16=no
13802 if test $in_tree_gas = yes; then
13803 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13804 then gcc_cv_as_literal16=yes
13805fi
13806 elif test x$gcc_cv_as != x; then
13807 echo '.literal16' > conftest.s
13808 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13810 (eval $ac_try) 2>&5
13811 ac_status=$?
13812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13813 (exit $ac_status); }; }
13814 then
13815 gcc_cv_as_literal16=yes
13816 else
13817 echo "configure: failed program was" >&5
13818 cat conftest.s >&5
13819 fi
13820 rm -f conftest.o conftest.s
13821 fi
13822fi
b61ff9c8
BS
13823echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5
13824echo "${ECHO_T}$gcc_cv_as_literal16" >&6
5708d18d
MS
13825if test $gcc_cv_as_literal16 = yes; then
13826
13827cat >>confdefs.h <<\_ACEOF
13828#define HAVE_GAS_LITERAL16 1
13829_ACEOF
13830
13831fi
13832
b61ff9c8
BS
13833echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13834echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
ba479fd2
NN
13835if test "${gcc_cv_as_subsection_m1+set}" = set; then
13836 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13837else
13838 gcc_cv_as_subsection_m1=no
13839 if test $in_tree_gas = yes; then
13840 if test $in_tree_gas_is_elf = yes \
13841 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13842 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 13843fi
8ada417f 13844 elif test x$gcc_cv_as != x; then
6e3f3080 13845 echo 'conftest_label1: .word 0
d1accaa3
JJ
13846.subsection -1
13847conftest_label2: .word 0
8ada417f 13848.previous' > conftest.s
ba479fd2
NN
13849 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13851 (eval $ac_try) 2>&5
13852 ac_status=$?
13853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13854 (exit $ac_status); }; }
8ada417f
ZW
13855 then
13856 if test x$gcc_cv_nm != x; then
13857 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13858 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13859 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13860 then :
13861 else gcc_cv_as_subsection_m1=yes
13862 fi
13863 rm -f conftest.nm1 conftest.nm2
13864 fi
13865 else
13866 echo "configure: failed program was" >&5
13867 cat conftest.s >&5
13868 fi
13869 rm -f conftest.o conftest.s
13870 fi
981d4858 13871fi
b61ff9c8
BS
13872echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13873echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 13874if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
13875
13876cat >>confdefs.h <<\_ACEOF
981d4858 13877#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 13878_ACEOF
981d4858 13879
d1accaa3 13880fi
ad9c4d9f 13881
b61ff9c8
BS
13882echo "$as_me:$LINENO: checking assembler for .weak" >&5
13883echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
ba479fd2
NN
13884if test "${gcc_cv_as_weak+set}" = set; then
13885 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13886else
13887 gcc_cv_as_weak=no
13888 if test $in_tree_gas = yes; then
13889 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13890 then gcc_cv_as_weak=yes
ad9c4d9f 13891fi
8ada417f 13892 elif test x$gcc_cv_as != x; then
6e3f3080 13893 echo ' .weak foobar' > conftest.s
ba479fd2
NN
13894 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13896 (eval $ac_try) 2>&5
13897 ac_status=$?
13898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13899 (exit $ac_status); }; }
8ada417f
ZW
13900 then
13901 gcc_cv_as_weak=yes
13902 else
13903 echo "configure: failed program was" >&5
13904 cat conftest.s >&5
13905 fi
13906 rm -f conftest.o conftest.s
13907 fi
981d4858 13908fi
b61ff9c8
BS
13909echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13910echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 13911if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
13912
13913cat >>confdefs.h <<\_ACEOF
981d4858 13914#define HAVE_GAS_WEAK 1
ba479fd2 13915_ACEOF
981d4858 13916
12822146 13917fi
ad9c4d9f 13918
b61ff9c8
BS
13919echo "$as_me:$LINENO: checking assembler for .weakref" >&5
13920echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
a0203ca7
AO
13921if test "${gcc_cv_as_weakref+set}" = set; then
13922 echo $ECHO_N "(cached) $ECHO_C" >&6
13923else
13924 gcc_cv_as_weakref=no
13925 if test $in_tree_gas = yes; then
13926 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
13927 then gcc_cv_as_weakref=yes
13928fi
13929 elif test x$gcc_cv_as != x; then
13930 echo ' .weakref foobar, barfnot' > conftest.s
13931 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13933 (eval $ac_try) 2>&5
13934 ac_status=$?
13935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13936 (exit $ac_status); }; }
13937 then
13938 gcc_cv_as_weakref=yes
13939 else
13940 echo "configure: failed program was" >&5
13941 cat conftest.s >&5
13942 fi
13943 rm -f conftest.o conftest.s
13944 fi
13945fi
b61ff9c8
BS
13946echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
13947echo "${ECHO_T}$gcc_cv_as_weakref" >&6
a0203ca7
AO
13948if test $gcc_cv_as_weakref = yes; then
13949
13950cat >>confdefs.h <<\_ACEOF
13951#define HAVE_GAS_WEAKREF 1
13952_ACEOF
13953
13954fi
13955
b61ff9c8
BS
13956echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13957echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
e41f3691
JDA
13958if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13959 echo $ECHO_N "(cached) $ECHO_C" >&6
13960else
13961 gcc_cv_as_nsubspa_comdat=no
13962 if test $in_tree_gas = yes; then
13963 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13964 then gcc_cv_as_nsubspa_comdat=yes
13965fi
13966 elif test x$gcc_cv_as != x; then
13967 echo ' .SPACE $TEXT$
13968 .NSUBSPA $CODE$,COMDAT' > conftest.s
13969 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13971 (eval $ac_try) 2>&5
13972 ac_status=$?
13973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13974 (exit $ac_status); }; }
13975 then
13976 gcc_cv_as_nsubspa_comdat=yes
13977 else
13978 echo "configure: failed program was" >&5
13979 cat conftest.s >&5
13980 fi
13981 rm -f conftest.o conftest.s
13982 fi
13983fi
b61ff9c8
BS
13984echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13985echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
e41f3691
JDA
13986if test $gcc_cv_as_nsubspa_comdat = yes; then
13987
13988cat >>confdefs.h <<\_ACEOF
13989#define HAVE_GAS_NSUBSPA_COMDAT 1
13990_ACEOF
13991
13992fi
13993
8ada417f
ZW
13994# .hidden needs to be supported in both the assembler and the linker,
13995# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13996# This is irritatingly difficult to feature test for; we have to check the
13997# date string after the version number. If we've got an in-tree
13998# ld, we don't know its patchlevel version, so we set the baseline at 2.13
13999# to be safe.
14000# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
b61ff9c8
BS
14001echo "$as_me:$LINENO: checking assembler for .hidden" >&5
14002echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
ba479fd2
NN
14003if test "${gcc_cv_as_hidden+set}" = set; then
14004 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14005else
14006 gcc_cv_as_hidden=no
14007 if test $in_tree_gas = yes; then
14008 if test $in_tree_gas_is_elf = yes \
14009 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
14010 then gcc_cv_as_hidden=yes
14011fi
14012 elif test x$gcc_cv_as != x; then
6e3f3080 14013 echo ' .hidden foobar
8ada417f 14014foobar:' > conftest.s
ba479fd2
NN
14015 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14017 (eval $ac_try) 2>&5
14018 ac_status=$?
14019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14020 (exit $ac_status); }; }
8ada417f
ZW
14021 then
14022 gcc_cv_as_hidden=yes
14023 else
14024 echo "configure: failed program was" >&5
14025 cat conftest.s >&5
14026 fi
14027 rm -f conftest.o conftest.s
14028 fi
14029fi
b61ff9c8
BS
14030echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
14031echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 14032
ad9c4d9f 14033
b61ff9c8
BS
14034echo "$as_me:$LINENO: checking linker for .hidden support" >&5
14035echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
ba479fd2
NN
14036if test "${gcc_cv_ld_hidden+set}" = set; then
14037 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14038else
14039 if test $in_tree_ld = yes ; then
14040 gcc_cv_ld_hidden=no
14041 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 \
14042 && test $in_tree_ld_is_elf = yes; then
14043 gcc_cv_ld_hidden=yes
14044 fi
14045else
14046 gcc_cv_ld_hidden=yes
bace148a 14047 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
14048 if echo "$ld_ver" | grep GNU > /dev/null; then
14049 ld_vers=`echo $ld_ver | sed -n \
115e6e55 14050 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
8ada417f 14051 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
14052 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
14053 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
14054 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
14055 if test 0"$ld_date" -lt 20020404; then
14056 if test -n "$ld_date"; then
14057 # If there was date string, but was earlier than 2002-04-04, fail
14058 gcc_cv_ld_hidden=no
14059 elif test -z "$ld_vers"; then
14060 # If there was no date string nor ld version number, something is wrong
14061 gcc_cv_ld_hidden=no
14062 else
8ada417f
ZW
14063 test -z "$ld_vers_patch" && ld_vers_patch=0
14064 if test "$ld_vers_major" -lt 2; then
14065 gcc_cv_ld_hidden=no
14066 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
14067 gcc_cv_ld_hidden="no"
14068 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
14069 gcc_cv_ld_hidden=no
c72931a6 14070 fi
8ada417f 14071 fi
789b7de5 14072 fi
8ada417f 14073 else
28690784 14074 case "${target}" in
b0fd7d27 14075 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
14076 gcc_cv_ld_hidden=yes
14077 ;;
14078 *)
14079 gcc_cv_ld_hidden=no
14080 ;;
14081 esac
8ada417f
ZW
14082 fi
14083fi
6d07784a 14084fi
b61ff9c8
BS
14085echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
14086echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 14087libgcc_visibility=no
ad9c4d9f 14088
232b67d9 14089
8e3940b2 14090if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 14091 libgcc_visibility=yes
ba479fd2
NN
14092
14093cat >>confdefs.h <<\_ACEOF
8ada417f 14094#define HAVE_GAS_HIDDEN 1
ba479fd2 14095_ACEOF
ad9c4d9f
NN
14096
14097fi
14098
8ada417f 14099# Check if we have .[us]leb128, and support symbol arithmetic with it.
b61ff9c8
BS
14100echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
14101echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
ba479fd2
NN
14102if test "${gcc_cv_as_leb128+set}" = set; then
14103 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14104else
14105 gcc_cv_as_leb128=no
14106 if test $in_tree_gas = yes; then
14107 if test $in_tree_gas_is_elf = yes \
14108 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14109 then gcc_cv_as_leb128=yes
14110fi
14111 elif test x$gcc_cv_as != x; then
6e3f3080 14112 echo ' .data
b7460f24
RH
14113 .uleb128 L2 - L1
14114L1:
14115 .uleb128 1280
14116 .sleb128 -1010
8ada417f 14117L2:' > conftest.s
ba479fd2
NN
14118 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14120 (eval $ac_try) 2>&5
14121 ac_status=$?
14122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14123 (exit $ac_status); }; }
8ada417f
ZW
14124 then
14125 # GAS versions before 2.11 do not support uleb128,
14126 # despite appearing to.
14127 # ??? There exists an elf-specific test that will crash
14128 # the assembler. Perhaps it's better to figure out whether
14129 # arbitrary sections are supported and try the test.
bace148a 14130 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f 14131 if echo "$as_ver" | grep GNU > /dev/null; then
ddcd0f6f 14132 as_vers=`echo $as_ver | sed -n \
115e6e55 14133 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
ddcd0f6f
BS
14134 as_major=`expr "$as_vers" : '\([0-9]*\)'`
14135 as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
14136 if test $as_major -eq 2 && test $as_minor -lt 11
14137 then :
14138 else gcc_cv_as_leb128=yes
14139 fi
14140 fi
14141 else
14142 echo "configure: failed program was" >&5
14143 cat conftest.s >&5
14144 fi
14145 rm -f conftest.o conftest.s
14146 fi
b7460f24 14147fi
b61ff9c8
BS
14148echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
14149echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 14150if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
14151
14152cat >>confdefs.h <<\_ACEOF
b7460f24 14153#define HAVE_AS_LEB128 1
ba479fd2 14154_ACEOF
b7460f24
RH
14155
14156fi
ad9c4d9f 14157
8ada417f
ZW
14158# GAS versions up to and including 2.11.0 may mis-optimize
14159# .eh_frame data.
b61ff9c8
BS
14160echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
14161echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
ba479fd2
NN
14162if test "${gcc_cv_as_eh_frame+set}" = set; then
14163 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14164else
14165 gcc_cv_as_eh_frame=no
14166 if test $in_tree_gas = yes; then
14167 if test $in_tree_gas_is_elf = yes \
14168 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14169 then gcc_cv_as_eh_frame=yes
ad9c4d9f 14170fi
8ada417f 14171 elif test x$gcc_cv_as != x; then
6e3f3080 14172 echo ' .text
c64688ae
RH
14173.LFB1:
14174 .4byte 0
14175.L1:
14176 .4byte 0
14177.LFE1:
14178 .section .eh_frame,"aw",@progbits
14179__FRAME_BEGIN__:
14180 .4byte .LECIE1-.LSCIE1
14181.LSCIE1:
14182 .4byte 0x0
14183 .byte 0x1
14184 .ascii "z\0"
14185 .byte 0x1
14186 .byte 0x78
14187 .byte 0x1a
14188 .byte 0x0
14189 .byte 0x4
14190 .4byte 1
14191 .p2align 1
14192.LECIE1:
14193.LSFDE1:
14194 .4byte .LEFDE1-.LASFDE1
14195.LASFDE1:
14196 .4byte .LASFDE1-__FRAME_BEGIN__
14197 .4byte .LFB1
14198 .4byte .LFE1-.LFB1
14199 .byte 0x4
14200 .4byte .LFE1-.LFB1
14201 .byte 0x4
14202 .4byte .L1-.LFB1
8ada417f 14203.LEFDE1:' > conftest.s
ba479fd2
NN
14204 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14206 (eval $ac_try) 2>&5
14207 ac_status=$?
14208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209 (exit $ac_status); }; }
8ada417f
ZW
14210 then
14211 cat > conftest.lit <<EOF
c64688ae
RH
14212 0000 10000000 00000000 017a0001 781a0004 .........z..x...
14213 0010 01000000 12000000 18000000 00000000 ................
093e61a6 14214 0020 08000000 04080000 0044 .........D
01efb963 14215EOF
ba479fd2 14216cat > conftest.big <<EOF
01efb963
AS
14217 0000 00000010 00000000 017a0001 781a0004 .........z..x...
14218 0010 00000001 00000012 00000018 00000000 ................
093e61a6 14219 0020 00000008 04000000 0844 .........D
c64688ae 14220EOF
8ada417f
ZW
14221 # If the assembler didn't choke, and we can objdump,
14222 # and we got the correct data, then succeed.
dbc02e7f
AS
14223 # The text in the here-document typically retains its unix-style line
14224 # endings, while the output of objdump will use host line endings.
14225 # Therefore, use diff -b for the comparisons.
8ada417f
ZW
14226 if test x$gcc_cv_objdump != x \
14227 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
14228 | tail -3 > conftest.got \
dbc02e7f
AS
14229 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
14230 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
8ada417f
ZW
14231 then
14232 gcc_cv_as_eh_frame=yes
ba479fd2
NN
14233 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
14234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14235 (eval $ac_try) 2>&5
14236 ac_status=$?
14237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14238 (exit $ac_status); }; }; then
8ada417f
ZW
14239 gcc_cv_as_eh_frame=buggy
14240 else
14241 # Uh oh, what do we do now?
14242 gcc_cv_as_eh_frame=no
14243 fi
14244 else
14245 echo "configure: failed program was" >&5
14246 cat conftest.s >&5
14247 fi
14248 rm -f conftest.o conftest.s
14249 fi
c64688ae 14250fi
b61ff9c8
BS
14251echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
14252echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 14253
6e3f3080 14254
63cf211a 14255if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
14256
14257cat >>confdefs.h <<\_ACEOF
8ada417f 14258#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 14259_ACEOF
ad9c4d9f
NN
14260
14261fi
14262
b61ff9c8
BS
14263echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14264echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
ba479fd2
NN
14265if test "${gcc_cv_as_shf_merge+set}" = set; then
14266 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14267else
14268 gcc_cv_as_shf_merge=no
14269 if test $in_tree_gas = yes; then
14270 if test $in_tree_gas_is_elf = yes \
14271 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14272 then gcc_cv_as_shf_merge=yes
14273fi
14274 elif test x$gcc_cv_as != x; then
6e3f3080 14275 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
14276 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14278 (eval $ac_try) 2>&5
14279 ac_status=$?
14280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14281 (exit $ac_status); }; }
8ada417f
ZW
14282 then
14283 gcc_cv_as_shf_merge=yes
14284 else
14285 echo "configure: failed program was" >&5
14286 cat conftest.s >&5
14287 fi
14288 rm -f conftest.o conftest.s
14289 fi
201556f0 14290fi
b61ff9c8
BS
14291echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14292echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 14293
c18a5b6c 14294if test $gcc_cv_as_shf_merge = no; then
b61ff9c8
BS
14295 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14296echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
c18a5b6c
MM
14297if test "${gcc_cv_as_shf_merge+set}" = set; then
14298 echo $ECHO_N "(cached) $ECHO_C" >&6
14299else
14300 gcc_cv_as_shf_merge=no
14301 if test $in_tree_gas = yes; then
14302 if test $in_tree_gas_is_elf = yes \
14303 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14304 then gcc_cv_as_shf_merge=yes
14305fi
14306 elif test x$gcc_cv_as != x; then
14307 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
14308 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14310 (eval $ac_try) 2>&5
14311 ac_status=$?
14312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14313 (exit $ac_status); }; }
14314 then
14315 gcc_cv_as_shf_merge=yes
14316 else
14317 echo "configure: failed program was" >&5
14318 cat conftest.s >&5
14319 fi
14320 rm -f conftest.o conftest.s
14321 fi
14322fi
b61ff9c8
BS
14323echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14324echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
c18a5b6c
MM
14325
14326fi
8ad9fb33 14327
ba479fd2 14328cat >>confdefs.h <<_ACEOF
8ad9fb33 14329#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 14330_ACEOF
201556f0 14331
201556f0 14332
b61ff9c8
BS
14333echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14334echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
14335if test "${gcc_cv_as_comdat_group+set}" = set; then
14336 echo $ECHO_N "(cached) $ECHO_C" >&6
14337else
14338 gcc_cv_as_comdat_group=no
14339 if test $in_tree_gas = yes; then
14340 if test $in_tree_gas_is_elf = yes \
11176d2a 14341 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14342 then gcc_cv_as_comdat_group=yes
14343fi
14344 elif test x$gcc_cv_as != x; then
14345 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
14346 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14348 (eval $ac_try) 2>&5
14349 ac_status=$?
14350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14351 (exit $ac_status); }; }
14352 then
14353 gcc_cv_as_comdat_group=yes
14354 else
14355 echo "configure: failed program was" >&5
14356 cat conftest.s >&5
14357 fi
14358 rm -f conftest.o conftest.s
14359 fi
14360fi
b61ff9c8
BS
14361echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
14362echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
c18a5b6c
MM
14363
14364if test $gcc_cv_as_comdat_group = yes; then
14365 gcc_cv_as_comdat_group_percent=no
14366else
b61ff9c8
BS
14367 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14368echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
c18a5b6c
MM
14369if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
14370 echo $ECHO_N "(cached) $ECHO_C" >&6
14371else
14372 gcc_cv_as_comdat_group_percent=no
14373 if test $in_tree_gas = yes; then
14374 if test $in_tree_gas_is_elf = yes \
11176d2a 14375 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14376 then gcc_cv_as_comdat_group_percent=yes
14377fi
14378 elif test x$gcc_cv_as != x; then
14379 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
14380 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14382 (eval $ac_try) 2>&5
14383 ac_status=$?
14384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14385 (exit $ac_status); }; }
14386 then
14387 gcc_cv_as_comdat_group_percent=yes
14388 else
14389 echo "configure: failed program was" >&5
14390 cat conftest.s >&5
14391 fi
14392 rm -f conftest.o conftest.s
14393 fi
14394fi
b61ff9c8
BS
14395echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
14396echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
c18a5b6c
MM
14397
14398fi
11176d2a
JB
14399if test $in_tree_ld != yes && test x"$ld_vers" != x; then
14400 comdat_group=yes
14401 if test 0"$ld_date" -lt 20050308; then
14402 if test -n "$ld_date"; then
14403 # If there was date string, but was earlier than 2005-03-08, fail
14404 comdat_group=no
14405 elif test "$ld_vers_major" -lt 2; then
14406 comdat_group=no
14407 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
14408 comdat_group=no
14409 fi
14410 fi
1cf0118d
RO
14411else
14412 # assume linkers other than GNU ld don't support COMDAT group
14413 comdat_group=no
14414fi
14415if test $comdat_group = no; then
14416 gcc_cv_as_comdat_group=no
14417 gcc_cv_as_comdat_group_percent=no
11176d2a 14418fi
c18a5b6c
MM
14419
14420cat >>confdefs.h <<_ACEOF
11176d2a 14421#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
14422_ACEOF
14423
14424
8ada417f 14425# Thread-local storage - the check is heavily parametrized.
f996902d
RH
14426conftest_s=
14427tls_first_major=
14428tls_first_minor=
9739c90c 14429tls_as_opt=
f996902d 14430case "$target" in
6f9b006d
RH
14431 alpha*-*-*)
14432 conftest_s='
14433 .section ".tdata","awT",@progbits
14434foo: .long 25
14435 .text
14436 ldq $27,__tls_get_addr($29) !literal!1
14437 lda $16,foo($29) !tlsgd!1
14438 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
14439 ldq $27,__tls_get_addr($29) !literal!2
14440 lda $16,foo($29) !tlsldm!2
14441 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
14442 ldq $1,foo($29) !gotdtprel
14443 ldah $2,foo($29) !dtprelhi
14444 lda $3,foo($2) !dtprello
14445 lda $4,foo($29) !dtprel
14446 ldq $1,foo($29) !gottprel
14447 ldah $2,foo($29) !tprelhi
14448 lda $3,foo($2) !tprello
14449 lda $4,foo($29) !tprel'
14450 tls_first_major=2
14451 tls_first_minor=13
2f3321ca 14452 tls_as_opt=--fatal-warnings
6f9b006d 14453 ;;
e4dd71de
AH
14454 frv*-*-*)
14455 conftest_s='
14456 .section ".tdata","awT",@progbits
14457x: .long 25
14458 .text
14459 call #gettlsoff(x)'
14460 tls_first_major=2
14461 tls_first_minor=14
14462 ;;
51076f96
RC
14463 hppa*-*-linux*)
14464 conftest_s='
14465t1: .reg %r20
14466t2: .reg %r21
14467gp: .reg %r19
14468 .section ".tdata","awT",@progbits
14469foo: .long 25
14470 .text
14471 .align 4
14472 addil LT%foo-$tls_gdidx$,gp
14473 ldo RT%foo-$tls_gdidx$(%r1),%arg0
14474 b __tls_get_addr
14475 nop
14476 addil LT%foo-$tls_ldidx$,gp
14477 b __tls_get_addr
14478 ldo RT%foo-$tls_ldidx$(%r1),%arg0
14479 addil LR%foo-$tls_dtpoff$,%ret0
14480 ldo RR%foo-$tls_dtpoff$(%r1),%t1
14481 mfctl %cr27,%t1
14482 addil LT%foo-$tls_ieoff$,gp
14483 ldw RT%foo-$tls_ieoff$(%r1),%t2
14484 add %t1,%t2,%t3
14485 mfctl %cr27,%t1
14486 addil LR%foo-$tls_leoff$,%t1
14487 ldo RR%foo-$tls_leoff$(%r1),%t2'
14488 tls_first_major=2
14489 tls_first_minor=15
14490 tls_as_opt=--fatal-warnings
14491 ;;
d3585b76
DJ
14492 arm*-*-*)
14493 conftest_s='
14494 .section ".tdata","awT",%progbits
14495foo: .long 25
14496 .text
14497.word foo(gottpoff)
14498.word foo(tpoff)
14499.word foo(tlsgd)
14500.word foo(tlsldm)
14501.word foo(tlsldo)'
14502 tls_first_major=2
14503 tls_first_minor=17
14504 ;;
f996902d
RH
14505 i[34567]86-*-*)
14506 conftest_s='
14507 .section ".tdata","awT",@progbits
14508foo: .long 25
14509 .text
14510 movl %gs:0, %eax
14511 leal foo@TLSGD(,%ebx,1), %eax
14512 leal foo@TLSLDM(%ebx), %eax
14513 leal foo@DTPOFF(%eax), %edx
14514 movl foo@GOTTPOFF(%ebx), %eax
14515 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
14516 addl foo@GOTNTPOFF(%ebx), %eax
14517 movl foo@INDNTPOFF, %eax
f996902d
RH
14518 movl $foo@TPOFF, %eax
14519 subl $foo@TPOFF, %eax
14520 leal foo@NTPOFF(%ecx), %eax'
14521 tls_first_major=2
75d38379 14522 tls_first_minor=14
2f3321ca 14523 tls_as_opt=--fatal-warnings
75d38379
JJ
14524 ;;
14525 x86_64-*-*)
14526 conftest_s='
14527 .section ".tdata","awT",@progbits
14528foo: .long 25
14529 .text
14530 movq %fs:0, %rax
14531 leaq foo@TLSGD(%rip), %rdi
14532 leaq foo@TLSLD(%rip), %rdi
14533 leaq foo@DTPOFF(%rax), %rdx
14534 movq foo@GOTTPOFF(%rip), %rax
14535 movq $foo@TPOFF, %rax'
14536 tls_first_major=2
14537 tls_first_minor=14
2f3321ca 14538 tls_as_opt=--fatal-warnings
f996902d 14539 ;;
7b6e506e
RH
14540 ia64-*-*)
14541 conftest_s='
14542 .section ".tdata","awT",@progbits
14543foo: data8 25
14544 .text
14545 addl r16 = @ltoff(@dtpmod(foo#)), gp
14546 addl r17 = @ltoff(@dtprel(foo#)), gp
14547 addl r18 = @ltoff(@tprel(foo#)), gp
14548 addl r19 = @dtprel(foo#), gp
14549 adds r21 = @dtprel(foo#), r13
14550 movl r23 = @dtprel(foo#)
14551 addl r20 = @tprel(foo#), gp
14552 adds r22 = @tprel(foo#), r13
14553 movl r24 = @tprel(foo#)'
14554 tls_first_major=2
14555 tls_first_minor=13
2f3321ca 14556 tls_as_opt=--fatal-warnings
7b6e506e 14557 ;;
69229b81
DJ
14558 mips*-*-*)
14559 conftest_s='
14560 .section .tdata,"awT",@progbits
14561x:
14562 .word 2
14563 .text
14564 addiu $4, $28, %tlsgd(x)
14565 addiu $4, $28, %tlsldm(x)
14566 lui $4, %dtprel_hi(x)
14567 addiu $4, $4, %dtprel_lo(x)
14568 lw $4, %gottprel(x)($28)
14569 lui $4, %tprel_hi(x)
14570 addiu $4, $4, %tprel_lo(x)'
14571 tls_first_major=2
14572 tls_first_minor=16
14573 tls_as_opt='-32 --fatal-warnings'
14574 ;;
c4501e62
JJ
14575 powerpc-*-*)
14576 conftest_s='
14577 .section ".tdata","awT",@progbits
14578 .align 2
14579ld0: .space 4
14580ld1: .space 4
14581x1: .space 4
14582x2: .space 4
14583x3: .space 4
14584 .text
14585 addi 3,31,ld0@got@tlsgd
14586 bl __tls_get_addr
14587 addi 3,31,x1@got@tlsld
14588 bl __tls_get_addr
14589 addi 9,3,x1@dtprel
14590 addis 9,3,x2@dtprel@ha
14591 addi 9,9,x2@dtprel@l
14592 lwz 9,x3@got@tprel(31)
14593 add 9,9,x@tls
14594 addi 9,2,x1@tprel
14595 addis 9,2,x2@tprel@ha
14596 addi 9,9,x2@tprel@l'
14597 tls_first_major=2
14598 tls_first_minor=14
2f3321ca 14599 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
14600 ;;
14601 powerpc64-*-*)
14602 conftest_s='
14603 .section ".tdata","awT",@progbits
14604 .align 3
14605ld0: .space 8
14606ld1: .space 8
14607x1: .space 8
14608x2: .space 8
14609x3: .space 8
14610 .text
14611 addi 3,2,ld0@got@tlsgd
14612 bl .__tls_get_addr
14613 nop
14614 addi 3,2,ld1@toc
14615 bl .__tls_get_addr
14616 nop
14617 addi 3,2,x1@got@tlsld
14618 bl .__tls_get_addr
14619 nop
14620 addi 9,3,x1@dtprel
14621 bl .__tls_get_addr
14622 nop
14623 addis 9,3,x2@dtprel@ha
14624 addi 9,9,x2@dtprel@l
14625 bl .__tls_get_addr
14626 nop
14627 ld 9,x3@got@dtprel(2)
14628 add 9,9,3
14629 bl .__tls_get_addr
14630 nop'
14631 tls_first_major=2
14632 tls_first_minor=14
2f3321ca 14633 tls_as_opt="-a64 --fatal-warnings"
c4501e62 14634 ;;
fd3cd001
UW
14635 s390-*-*)
14636 conftest_s='
14637 .section ".tdata","awT",@progbits
14638foo: .long 25
14639 .text
14640 .long foo@TLSGD
14641 .long foo@TLSLDM
14642 .long foo@DTPOFF
14643 .long foo@NTPOFF
14644 .long foo@GOTNTPOFF
14645 .long foo@INDNTPOFF
14646 l %r1,foo@GOTNTPOFF(%r12)
14647 l %r1,0(%r1):tls_load:foo
14648 bas %r14,0(%r1,%r13):tls_gdcall:foo
14649 bas %r14,0(%r1,%r13):tls_ldcall:foo'
14650 tls_first_major=2
14651 tls_first_minor=14
2f3321ca 14652 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
14653 ;;
14654 s390x-*-*)
14655 conftest_s='
14656 .section ".tdata","awT",@progbits
14657foo: .long 25
14658 .text
14659 .quad foo@TLSGD
14660 .quad foo@TLSLDM
14661 .quad foo@DTPOFF
14662 .quad foo@NTPOFF
14663 .quad foo@GOTNTPOFF
14664 lg %r1,foo@GOTNTPOFF(%r12)
14665 larl %r1,foo@INDNTPOFF
14666 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
14667 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
14668 tls_first_major=2
14669 tls_first_minor=14
2f3321ca 14670 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 14671 ;;
9ff13962
KK
14672 sh-*-* | sh[34]-*-*)
14673 conftest_s='
14674 .section ".tdata","awT",@progbits
14675foo: .long 25
14676 .text
14677 .long foo@TLSGD
14678 .long foo@TLSLDM
14679 .long foo@DTPOFF
14680 .long foo@GOTTPOFF
14681 .long foo@TPOFF'
14682 tls_first_major=2
14683 tls_first_minor=13
2f3321ca 14684 tls_as_opt=--fatal-warnings
9ff13962 14685 ;;
5751a10b 14686 sparc*-*-*)
2f3321ca 14687 case "$target" in
7935dc1b
EB
14688 sparc*-sun-solaris2.[56789]*)
14689 # TLS was introduced in the Solaris 9 4/04 release but
14690 # we do not enable it by default on Solaris 9 either.
14691 if test "x$enable_tls" = xyes ; then
14692 on_solaris=yes
14693 else
14694 enable_tls=no;
14695 fi
14696 ;;
2f3321ca
EB
14697 sparc*-sun-solaris2.*)
14698 on_solaris=yes
14699 ;;
14700 *)
14701 on_solaris=no
14702 ;;
14703 esac
14704 if test x$on_solaris = xyes && test x$gas_flag = xno; then
14705 conftest_s='
14706 .section ".tdata",#alloc,#write,#tls
14707foo: .long 25
14708 .text
14709 sethi %tgd_hi22(foo), %o0
14710 add %o0, %tgd_lo10(foo), %o1
14711 add %l7, %o1, %o0, %tgd_add(foo)
14712 call __tls_get_addr, %tgd_call(foo)
14713 sethi %tldm_hi22(foo), %l1
14714 add %l1, %tldm_lo10(foo), %l2
14715 add %l7, %l2, %o0, %tldm_add(foo)
14716 call __tls_get_addr, %tldm_call(foo)
14717 sethi %tldo_hix22(foo), %l3
14718 xor %l3, %tldo_lox10(foo), %l4
14719 add %o0, %l4, %l5, %tldo_add(foo)
14720 sethi %tie_hi22(foo), %o3
14721 add %o3, %tie_lo10(foo), %o3
14722 ld [%l7 + %o3], %o2, %tie_ld(foo)
14723 add %g7, %o2, %o4, %tie_add(foo)
14724 sethi %tle_hix22(foo), %l1
14725 xor %l1, %tle_lox10(foo), %o5
14726 ld [%g7 + %o5], %o1'
14727 tls_first_major=0
14728 tls_first_minor=0
14729 else
14730 conftest_s='
5751a10b
JJ
14731 .section ".tdata","awT",@progbits
14732foo: .long 25
14733 .text
14734 sethi %tgd_hi22(foo), %o0
14735 add %o0, %tgd_lo10(foo), %o1
14736 add %l7, %o1, %o0, %tgd_add(foo)
14737 call __tls_get_addr, %tgd_call(foo)
14738 sethi %tldm_hi22(foo), %l1
14739 add %l1, %tldm_lo10(foo), %l2
14740 add %l7, %l2, %o0, %tldm_add(foo)
14741 call __tls_get_addr, %tldm_call(foo)
14742 sethi %tldo_hix22(foo), %l3
14743 xor %l3, %tldo_lox10(foo), %l4
14744 add %o0, %l4, %l5, %tldo_add(foo)
14745 sethi %tie_hi22(foo), %o3
14746 add %o3, %tie_lo10(foo), %o3
14747 ld [%l7 + %o3], %o2, %tie_ld(foo)
14748 add %g7, %o2, %o4, %tie_add(foo)
14749 sethi %tle_hix22(foo), %l1
14750 xor %l1, %tle_lox10(foo), %o5
14751 ld [%g7 + %o5], %o1'
14752 tls_first_major=2
14753 tls_first_minor=14
2f3321ca
EB
14754 tls_as_opt="-32 --fatal-warnings"
14755 fi
5751a10b 14756 ;;
f996902d 14757esac
8dea1cca
DD
14758set_have_as_tls=no
14759if test "x$enable_tls" = xno ; then
14760 : # TLS explicitly disabled.
14761elif test "x$enable_tls" = xyes ; then
14762 set_have_as_tls=yes # TLS explicitly enabled.
14763elif test -z "$tls_first_major"; then
8ada417f
ZW
14764 : # If we don't have a check, assume no support.
14765else
b61ff9c8
BS
14766 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
14767echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
ba479fd2
NN
14768if test "${gcc_cv_as_tls+set}" = set; then
14769 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14770else
14771 gcc_cv_as_tls=no
14772 if test $in_tree_gas = yes; then
14773 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
14774 then gcc_cv_as_tls=yes
ad9c4d9f 14775fi
8ada417f 14776 elif test x$gcc_cv_as != x; then
6e3f3080 14777 echo "$conftest_s" > conftest.s
2f3321ca 14778 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
14779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14780 (eval $ac_try) 2>&5
14781 ac_status=$?
14782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14783 (exit $ac_status); }; }
8ada417f
ZW
14784 then
14785 gcc_cv_as_tls=yes
14786 else
14787 echo "configure: failed program was" >&5
14788 cat conftest.s >&5
14789 fi
14790 rm -f conftest.o conftest.s
f996902d 14791 fi
f996902d 14792fi
b61ff9c8
BS
14793echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
14794echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 14795if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
14796 set_have_as_tls=yes
14797fi
14798fi
14799if test $set_have_as_tls = yes ; then
ba479fd2
NN
14800
14801cat >>confdefs.h <<\_ACEOF
f996902d 14802#define HAVE_AS_TLS 1
ba479fd2 14803_ACEOF
f996902d 14804
8ada417f
ZW
14805fi
14806
14807# Target-specific assembler checks.
f996902d 14808
b61ff9c8
BS
14809echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
14810echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
7e9d8517
L
14811gcc_cv_ld_static_dynamic=no
14812if test $in_tree_ld = yes ; then
14813 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
14814 gcc_cv_ld_static_dynamic=yes
14815 fi
14816elif test x$gcc_cv_ld != x; then
14817 # Check if linker supports -Bstatic/-Bdynamic option
14818 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
14819 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
14820 gcc_cv_ld_static_dynamic=yes
14821 fi
14822fi
14823if test x"$gcc_cv_ld_static_dynamic" = xyes; then
14824
14825cat >>confdefs.h <<\_ACEOF
14826#define HAVE_LD_STATIC_DYNAMIC 1
14827_ACEOF
14828
14829fi
b61ff9c8
BS
14830echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14831echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
7e9d8517 14832
d594623a 14833if test x"$demangler_in_ld" = xyes; then
b61ff9c8
BS
14834 echo "$as_me:$LINENO: checking linker --demangle support" >&5
14835echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
d594623a
L
14836 gcc_cv_ld_demangle=no
14837 if test $in_tree_ld = yes; then
14838 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 \
14839 gcc_cv_ld_demangle=yes
14840 fi
14841 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14842 # Check if the GNU linker supports --demangle option
14843 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14844 gcc_cv_ld_demangle=yes
14845 fi
14846 fi
14847 if test x"$gcc_cv_ld_demangle" = xyes; then
14848
14849cat >>confdefs.h <<\_ACEOF
14850#define HAVE_LD_DEMANGLE 1
14851_ACEOF
14852
14853 fi
b61ff9c8
BS
14854 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14855echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
d594623a
L
14856fi
14857
3a37b08e
RH
14858case "$target" in
14859 # All TARGET_ABI_OSF targets.
14860 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
b61ff9c8
BS
14861 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14862echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
14863if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14864 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 14865else
8ada417f
ZW
14866 gcc_cv_as_alpha_explicit_relocs=no
14867 if test $in_tree_gas = yes; then
14868 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14869 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 14870fi
8ada417f 14871 elif test x$gcc_cv_as != x; then
6e3f3080 14872 echo ' .set nomacro
3a37b08e
RH
14873 .text
14874 extbl $3, $2, $3 !lituse_bytoff!1
14875 ldq $2, a($29) !literal!1
14876 ldq $4, b($29) !literal!2
14877 ldq_u $3, 0($2) !lituse_base!1
14878 ldq $27, f($29) !literal!5
14879 jsr $26, ($27), f !lituse_jsr!5
14880 ldah $29, 0($26) !gpdisp!3
14881 lda $0, c($29) !gprel
14882 ldah $1, d($29) !gprelhigh
14883 lda $1, d($1) !gprellow
8ada417f 14884 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
14885 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14887 (eval $ac_try) 2>&5
14888 ac_status=$?
14889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14890 (exit $ac_status); }; }
8ada417f
ZW
14891 then
14892 gcc_cv_as_alpha_explicit_relocs=yes
14893 else
14894 echo "configure: failed program was" >&5
14895 cat conftest.s >&5
14896 fi
14897 rm -f conftest.o conftest.s
14898 fi
cafe096b 14899fi
b61ff9c8
BS
14900echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14901echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 14902if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
14903
14904cat >>confdefs.h <<\_ACEOF
3a37b08e 14905#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 14906_ACEOF
3a37b08e 14907
d006f5eb 14908fi
b61ff9c8
BS
14909 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
14910echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
d006f5eb
RH
14911if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
14912 echo $ECHO_N "(cached) $ECHO_C" >&6
14913else
14914 gcc_cv_as_alpha_jsrdirect_relocs=no
14915 if test $in_tree_gas = yes; then
14916 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
14917 then gcc_cv_as_alpha_jsrdirect_relocs=yes
14918fi
14919 elif test x$gcc_cv_as != x; then
14920 echo ' .set nomacro
14921 .text
14922 ldq $27, a($29) !literal!1
14923 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
14924 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14926 (eval $ac_try) 2>&5
14927 ac_status=$?
14928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14929 (exit $ac_status); }; }
14930 then
14931 gcc_cv_as_alpha_jsrdirect_relocs=yes
14932 else
14933 echo "configure: failed program was" >&5
14934 cat conftest.s >&5
14935 fi
14936 rm -f conftest.o conftest.s
14937 fi
14938fi
b61ff9c8
BS
14939echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
14940echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
d006f5eb
RH
14941if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
14942
14943cat >>confdefs.h <<\_ACEOF
14944#define HAVE_AS_JSRDIRECT_RELOCS 1
14945_ACEOF
14946
86da66b5
HPN
14947fi
14948 ;;
14949
14950 cris-*-*)
b61ff9c8
BS
14951 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14952echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
86da66b5
HPN
14953if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14954 echo $ECHO_N "(cached) $ECHO_C" >&6
14955else
14956 gcc_cv_as_cris_no_mul_bug=no
14957 if test $in_tree_gas = yes; then
14958 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14959 then gcc_cv_as_cris_no_mul_bug=yes
14960fi
14961 elif test x$gcc_cv_as != x; then
14962 echo '.text' > conftest.s
14963 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14965 (eval $ac_try) 2>&5
14966 ac_status=$?
14967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14968 (exit $ac_status); }; }
14969 then
14970 gcc_cv_as_cris_no_mul_bug=yes
14971 else
14972 echo "configure: failed program was" >&5
14973 cat conftest.s >&5
14974 fi
14975 rm -f conftest.o conftest.s
14976 fi
14977fi
b61ff9c8
BS
14978echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14979echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
86da66b5
HPN
14980if test $gcc_cv_as_cris_no_mul_bug = yes; then
14981
14982cat >>confdefs.h <<\_ACEOF
14983#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14984_ACEOF
14985
8ada417f 14986fi
3a37b08e 14987 ;;
8ada417f 14988
1cb36a98 14989 sparc*-*-*)
b61ff9c8
BS
14990 echo "$as_me:$LINENO: checking assembler for .register" >&5
14991echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
ba479fd2
NN
14992if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14993 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14994else
8ada417f
ZW
14995 gcc_cv_as_sparc_register_op=no
14996 if test x$gcc_cv_as != x; then
6e3f3080 14997 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
14998 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15000 (eval $ac_try) 2>&5
15001 ac_status=$?
15002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15003 (exit $ac_status); }; }
8ada417f
ZW
15004 then
15005 gcc_cv_as_sparc_register_op=yes
15006 else
15007 echo "configure: failed program was" >&5
15008 cat conftest.s >&5
15009 fi
15010 rm -f conftest.o conftest.s
15011 fi
cafe096b 15012fi
b61ff9c8
BS
15013echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
15014echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 15015if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
15016
15017cat >>confdefs.h <<\_ACEOF
1cb36a98 15018#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 15019_ACEOF
1cb36a98 15020
8ada417f 15021fi
1cb36a98 15022
b61ff9c8
BS
15023 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
15024echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
ba479fd2
NN
15025if test "${gcc_cv_as_sparc_relax+set}" = set; then
15026 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 15027else
8ada417f
ZW
15028 gcc_cv_as_sparc_relax=no
15029 if test x$gcc_cv_as != x; then
6e3f3080 15030 echo '.text' > conftest.s
ba479fd2
NN
15031 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
15032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15033 (eval $ac_try) 2>&5
15034 ac_status=$?
15035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15036 (exit $ac_status); }; }
8ada417f
ZW
15037 then
15038 gcc_cv_as_sparc_relax=yes
15039 else
15040 echo "configure: failed program was" >&5
15041 cat conftest.s >&5
15042 fi
15043 rm -f conftest.o conftest.s
15044 fi
cafe096b 15045fi
b61ff9c8
BS
15046echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
15047echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 15048if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
15049
15050cat >>confdefs.h <<\_ACEOF
e95b1e6a 15051#define HAVE_AS_RELAX_OPTION 1
ba479fd2 15052_ACEOF
e95b1e6a 15053
8ada417f 15054fi
e95b1e6a 15055
b61ff9c8
BS
15056 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
15057echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
ba479fd2
NN
15058if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
15059 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 15060else
8ada417f
ZW
15061 gcc_cv_as_sparc_ua_pcrel=no
15062 if test x$gcc_cv_as != x; then
6e3f3080 15063 echo '.text
8ada417f
ZW
15064foo:
15065 nop
15066.data
15067.align 4
15068.byte 0
15069.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
15070 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
15071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15072 (eval $ac_try) 2>&5
15073 ac_status=$?
15074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15075 (exit $ac_status); }; }
8ada417f
ZW
15076 then
15077 if test x$gcc_cv_ld != x \
15078 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
15079 gcc_cv_as_sparc_ua_pcrel=yes
15080 fi
15081 rm -f conftest
15082 else
15083 echo "configure: failed program was" >&5
15084 cat conftest.s >&5
15085 fi
15086 rm -f conftest.o conftest.s
15087 fi
cafe096b 15088fi
b61ff9c8
BS
15089echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
15090echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 15091if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
15092
15093cat >>confdefs.h <<\_ACEOF
17e9e88c 15094#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 15095_ACEOF
17e9e88c 15096
17e9e88c 15097
b61ff9c8
BS
15098 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
15099echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
ba479fd2
NN
15100if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
15101 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 15102else
8ada417f
ZW
15103 gcc_cv_as_sparc_ua_pcrel_hidden=no
15104 if test x$gcc_cv_as != x; then
6e3f3080 15105 echo '.data
8ada417f
ZW
15106.align 4
15107.byte 0x31
15108.uaword %r_disp32(foo)
15109.byte 0x32, 0x33, 0x34
15110.global foo
15111.hidden foo
15112foo:
15113.skip 4' > conftest.s
ba479fd2
NN
15114 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
15115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15116 (eval $ac_try) 2>&5
15117 ac_status=$?
15118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15119 (exit $ac_status); }; }
8ada417f
ZW
15120 then
15121 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
15122 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
15123 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
15124 | grep ' 31000000 07323334' > /dev/null 2>&1; then
15125 if $gcc_cv_objdump -R conftest 2> /dev/null \
15126 | grep 'DISP32' > /dev/null 2>&1; then
15127 :
15128 else
15129 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 15130 fi
8ada417f
ZW
15131 fi
15132 rm -f conftest
15133 else
15134 echo "configure: failed program was" >&5
15135 cat conftest.s >&5
15136 fi
15137 rm -f conftest.o conftest.s
15138 fi
cafe096b 15139fi
b61ff9c8
BS
15140echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
15141echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 15142if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
15143
15144cat >>confdefs.h <<\_ACEOF
cf7b8b0d 15145#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 15146_ACEOF
cf7b8b0d 15147
8ada417f 15148fi
ba479fd2 15149
8ada417f 15150fi # unaligned pcrel relocs
cf7b8b0d 15151
b61ff9c8
BS
15152 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
15153echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
ba479fd2
NN
15154if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
15155 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 15156else
8ada417f
ZW
15157 gcc_cv_as_sparc_offsetable_lo10=no
15158 if test x$gcc_cv_as != x; then
6e3f3080 15159 echo '.text
8ada417f
ZW
15160 or %g1, %lo(ab) + 12, %g1
15161 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
15162 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
15163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15164 (eval $ac_try) 2>&5
15165 ac_status=$?
15166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15167 (exit $ac_status); }; }
8ada417f
ZW
15168 then
15169 if test x$gcc_cv_objdump != x \
ecb0ccbc 15170 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 15171 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 15172 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
15173 fi
15174 else
15175 echo "configure: failed program was" >&5
15176 cat conftest.s >&5
15177 fi
15178 rm -f conftest.o conftest.s
15179 fi
cafe096b 15180fi
b61ff9c8
BS
15181echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
15182echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 15183if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
15184
15185cat >>confdefs.h <<\_ACEOF
1cb36a98 15186#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 15187_ACEOF
1cb36a98 15188
8ada417f 15189fi
1cb36a98
RH
15190 ;;
15191
c307e6dd 15192 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
15193 case $target_os in
15194 cygwin* | pe | mingw32*)
15195 # Used for DWARF 2 in PE
b61ff9c8
BS
15196 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
15197echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
d38bc601
BF
15198if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
15199 echo $ECHO_N "(cached) $ECHO_C" >&6
15200else
15201 gcc_cv_as_ix86_pe_secrel32=no
15202 if test $in_tree_gas = yes; then
15203 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
15204 then gcc_cv_as_ix86_pe_secrel32=yes
15205fi
15206 elif test x$gcc_cv_as != x; then
15207 echo '.text
15208foo: nop
15209.data
15210 .secrel32 foo' > conftest.s
15211 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15213 (eval $ac_try) 2>&5
15214 ac_status=$?
15215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15216 (exit $ac_status); }; }
15217 then
15218 if test x$gcc_cv_ld != x \
15219 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
15220 gcc_cv_as_ix86_pe_secrel32=yes
15221 fi
15222 rm -f conftest
15223 else
15224 echo "configure: failed program was" >&5
15225 cat conftest.s >&5
15226 fi
15227 rm -f conftest.o conftest.s
15228 fi
15229fi
b61ff9c8
BS
15230echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
15231echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
d38bc601
BF
15232if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
15233
15234cat >>confdefs.h <<\_ACEOF
15235#define HAVE_GAS_PE_SECREL32_RELOC 1
15236_ACEOF
15237
15238fi
15239 ;;
15240 esac
15241
b61ff9c8
BS
15242 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
15243echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
ba479fd2
NN
15244if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
15245 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15246else
15247 gcc_cv_as_ix86_filds_fists=no
15248 if test $in_tree_gas = yes; then
15249 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
15250 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 15251fi
8ada417f 15252 elif test x$gcc_cv_as != x; then
6e3f3080 15253 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
15254 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15256 (eval $ac_try) 2>&5
15257 ac_status=$?
15258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15259 (exit $ac_status); }; }
8ada417f
ZW
15260 then
15261 gcc_cv_as_ix86_filds_fists=yes
15262 else
15263 echo "configure: failed program was" >&5
15264 cat conftest.s >&5
981d4858 15265 fi
8ada417f
ZW
15266 rm -f conftest.o conftest.s
15267 fi
15268fi
b61ff9c8
BS
15269echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
15270echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 15271if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
15272
15273cat >>confdefs.h <<\_ACEOF
8ada417f 15274#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 15275_ACEOF
ad9c4d9f 15276
f6f5dff2
RO
15277fi
15278
b61ff9c8
BS
15279 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
15280echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
ba479fd2
NN
15281if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
15282 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
15283else
15284 gcc_cv_as_ix86_cmov_sun_syntax=no
15285 if test x$gcc_cv_as != x; then
6e3f3080 15286 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
15287 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15289 (eval $ac_try) 2>&5
15290 ac_status=$?
15291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15292 (exit $ac_status); }; }
f6f5dff2
RO
15293 then
15294 gcc_cv_as_ix86_cmov_sun_syntax=yes
15295 else
15296 echo "configure: failed program was" >&5
15297 cat conftest.s >&5
15298 fi
15299 rm -f conftest.o conftest.s
15300 fi
15301fi
b61ff9c8
BS
15302echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
15303echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 15304if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
15305
15306cat >>confdefs.h <<\_ACEOF
f6f5dff2 15307#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 15308_ACEOF
f6f5dff2 15309
b6c03bcd
RS
15310fi
15311
b61ff9c8
BS
15312 echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5
15313echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6
b6c03bcd
RS
15314if test "${gcc_cv_as_ix86_ffreep+set}" = set; then
15315 echo $ECHO_N "(cached) $ECHO_C" >&6
15316else
15317 gcc_cv_as_ix86_ffreep=no
15318 if test x$gcc_cv_as != x; then
15319 echo 'ffreep %st(1)' > conftest.s
15320 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15322 (eval $ac_try) 2>&5
15323 ac_status=$?
15324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15325 (exit $ac_status); }; }
15326 then
15327 gcc_cv_as_ix86_ffreep=yes
15328 else
15329 echo "configure: failed program was" >&5
15330 cat conftest.s >&5
15331 fi
15332 rm -f conftest.o conftest.s
15333 fi
15334fi
b61ff9c8
BS
15335echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5
15336echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6
b6c03bcd
RS
15337if test $gcc_cv_as_ix86_ffreep = yes; then
15338
15339cat >>confdefs.h <<\_ACEOF
15340#define HAVE_AS_IX86_FFREEP 1
15341_ACEOF
15342
38ca3765
UB
15343fi
15344
b61ff9c8
BS
15345 echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5
15346echo $ECHO_N "checking assembler for sahf mnemonic... $ECHO_C" >&6
38ca3765
UB
15347if test "${gcc_cv_as_ix86_sahf+set}" = set; then
15348 echo $ECHO_N "(cached) $ECHO_C" >&6
15349else
15350 gcc_cv_as_ix86_sahf=no
15351 if test x$gcc_cv_as != x; then
15352 echo 'sahf' > conftest.s
15353 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15355 (eval $ac_try) 2>&5
15356 ac_status=$?
15357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15358 (exit $ac_status); }; }
15359 then
15360 gcc_cv_as_ix86_sahf=yes
15361 else
15362 echo "configure: failed program was" >&5
15363 cat conftest.s >&5
15364 fi
15365 rm -f conftest.o conftest.s
15366 fi
15367fi
b61ff9c8
BS
15368echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_sahf" >&5
15369echo "${ECHO_T}$gcc_cv_as_ix86_sahf" >&6
38ca3765
UB
15370if test $gcc_cv_as_ix86_sahf = yes; then
15371
15372cat >>confdefs.h <<\_ACEOF
15373#define HAVE_AS_IX86_SAHF 1
15374_ACEOF
15375
68b92f78
RS
15376fi
15377
b61ff9c8
BS
15378 echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5
15379echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6
68b92f78
RS
15380if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then
15381 echo $ECHO_N "(cached) $ECHO_C" >&6
15382else
15383 gcc_cv_as_ix86_diff_sect_delta=no
15384 if test x$gcc_cv_as != x; then
15385 echo '.section .rodata
15386.L1:
15387 .long .L2-.L1
15388 .long .L3-.L1
15389 .text
15390.L3: nop
15391.L2: nop' > conftest.s
15392 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15394 (eval $ac_try) 2>&5
15395 ac_status=$?
15396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15397 (exit $ac_status); }; }
15398 then
15399 gcc_cv_as_ix86_diff_sect_delta=yes
15400 else
15401 echo "configure: failed program was" >&5
15402 cat conftest.s >&5
15403 fi
15404 rm -f conftest.o conftest.s
15405 fi
15406fi
b61ff9c8
BS
15407echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
15408echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6
68b92f78
RS
15409if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
15410
15411cat >>confdefs.h <<\_ACEOF
15412#define HAVE_AS_IX86_DIFF_SECT_DELTA 1
15413_ACEOF
15414
ad9c4d9f
NN
15415fi
15416
6f3ca281
ZW
15417 # This one is used unconditionally by i386.[ch]; it is to be defined
15418 # to 1 if the feature is present, 0 otherwise.
b61ff9c8
BS
15419 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
15420echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
ba479fd2
NN
15421if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
15422 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15423else
15424 gcc_cv_as_ix86_gotoff_in_data=no
15425 if test $in_tree_gas = yes; then
15426 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15427 then gcc_cv_as_ix86_gotoff_in_data=yes
15428fi
15429 elif test x$gcc_cv_as != x; then
6e3f3080 15430 echo ' .text
f88c65f7
RH
15431.L0:
15432 nop
15433 .data
8ada417f 15434 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
15435 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15437 (eval $ac_try) 2>&5
15438 ac_status=$?
15439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15440 (exit $ac_status); }; }
8ada417f
ZW
15441 then
15442 gcc_cv_as_ix86_gotoff_in_data=yes
15443 else
15444 echo "configure: failed program was" >&5
15445 cat conftest.s >&5
f88c65f7 15446 fi
8ada417f
ZW
15447 rm -f conftest.o conftest.s
15448 fi
15449fi
b61ff9c8
BS
15450echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
15451echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 15452
6f3ca281 15453
ba479fd2 15454cat >>confdefs.h <<_ACEOF
6f3ca281 15455#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 15456_ACEOF
f88c65f7 15457
1cb36a98 15458 ;;
ef1ecf87
RH
15459
15460 ia64*-*-*)
b61ff9c8
BS
15461 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
15462echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
ba479fd2
NN
15463if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
15464 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 15465else
8ada417f
ZW
15466 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
15467 if test $in_tree_gas = yes; then
15468 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15469 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 15470fi
8ada417f 15471 elif test x$gcc_cv_as != x; then
6e3f3080 15472 echo ' .text
ef1ecf87
RH
15473 addl r15 = @ltoffx(x#), gp
15474 ;;
cfa9ee99 15475 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
15476 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15478 (eval $ac_try) 2>&5
15479 ac_status=$?
15480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15481 (exit $ac_status); }; }
8ada417f 15482 then
cfa9ee99 15483 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
15484 else
15485 echo "configure: failed program was" >&5
15486 cat conftest.s >&5
2c4a9cff 15487 fi
8ada417f
ZW
15488 rm -f conftest.o conftest.s
15489 fi
15490fi
b61ff9c8
BS
15491echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
15492echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 15493if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
15494
15495cat >>confdefs.h <<\_ACEOF
cfa9ee99 15496#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 15497_ACEOF
8ada417f 15498
cfa9ee99 15499fi
8ada417f 15500
2c4a9cff 15501 ;;
8ada417f 15502
2c4a9cff 15503 powerpc*-*-*)
8ada417f 15504 case $target in
432218ba
DE
15505 *-*-aix*) conftest_s=' .machine "pwr5"
15506 .csect .text[PR]
6b37db3c 15507 mfcr 3,128';;
8af4d362 15508 *-*-darwin*)
b61ff9c8
BS
15509 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
15510echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
8af4d362
PB
15511if test "${gcc_cv_as_machine_directive+set}" = set; then
15512 echo $ECHO_N "(cached) $ECHO_C" >&6
15513else
15514 gcc_cv_as_machine_directive=no
15515 if test x$gcc_cv_as != x; then
15516 echo ' .machine ppc7400' > conftest.s
15517 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15519 (eval $ac_try) 2>&5
15520 ac_status=$?
15521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15522 (exit $ac_status); }; }
15523 then
15524 gcc_cv_as_machine_directive=yes
15525 else
15526 echo "configure: failed program was" >&5
15527 cat conftest.s >&5
15528 fi
15529 rm -f conftest.o conftest.s
15530 fi
15531fi
b61ff9c8
BS
15532echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
15533echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
8af4d362
PB
15534
15535 if test x$gcc_cv_as_machine_directive != xyes; then
15536 echo "*** This target requires an assembler supporting \".machine\"" >&2
15537 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
15538 test x$build = x$target && exit 1
15539 fi
15540 conftest_s=' .text
6b37db3c 15541 mfcr r3,128';;
4c67db14 15542 *) conftest_s=' .machine power4
d2ab3e37 15543 .text
6b37db3c 15544 mfcr 3,128';;
8ada417f 15545 esac
8ada417f 15546
b61ff9c8
BS
15547 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
15548echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
ba479fd2
NN
15549if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
15550 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 15551else
8ada417f
ZW
15552 gcc_cv_as_powerpc_mfcrf=no
15553 if test $in_tree_gas = yes; then
15554 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15555 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 15556fi
8ada417f 15557 elif test x$gcc_cv_as != x; then
6e3f3080 15558 echo "$conftest_s" > conftest.s
ba479fd2
NN
15559 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15561 (eval $ac_try) 2>&5
15562 ac_status=$?
15563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15564 (exit $ac_status); }; }
8ada417f
ZW
15565 then
15566 gcc_cv_as_powerpc_mfcrf=yes
15567 else
15568 echo "configure: failed program was" >&5
15569 cat conftest.s >&5
15570 fi
15571 rm -f conftest.o conftest.s
15572 fi
2c4a9cff 15573fi
b61ff9c8
BS
15574echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
15575echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 15576if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
15577
15578cat >>confdefs.h <<\_ACEOF
2c4a9cff 15579#define HAVE_AS_MFCRF 1
ba479fd2 15580_ACEOF
ef1ecf87 15581
8ada417f 15582fi
432218ba
DE
15583
15584 case $target in
15585 *-*-aix*) conftest_s=' .machine "pwr5"
15586 .csect .text[PR]
15587 popcntb 3,3';;
15588 *) conftest_s=' .machine power5
15589 .text
15590 popcntb 3,3';;
15591 esac
15592
b61ff9c8
BS
15593 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
15594echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
432218ba
DE
15595if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
15596 echo $ECHO_N "(cached) $ECHO_C" >&6
15597else
15598 gcc_cv_as_powerpc_popcntb=no
15599 if test $in_tree_gas = yes; then
15600 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15601 then gcc_cv_as_powerpc_popcntb=yes
15602fi
15603 elif test x$gcc_cv_as != x; then
15604 echo "$conftest_s" > conftest.s
15605 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15607 (eval $ac_try) 2>&5
15608 ac_status=$?
15609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15610 (exit $ac_status); }; }
15611 then
15612 gcc_cv_as_powerpc_popcntb=yes
15613 else
15614 echo "configure: failed program was" >&5
15615 cat conftest.s >&5
15616 fi
15617 rm -f conftest.o conftest.s
15618 fi
15619fi
b61ff9c8
BS
15620echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
15621echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
432218ba
DE
15622if test $gcc_cv_as_powerpc_popcntb = yes; then
15623
15624cat >>confdefs.h <<\_ACEOF
15625#define HAVE_AS_POPCNTB 1
15626_ACEOF
15627
9719f3b7
DE
15628fi
15629
15630 case $target in
15631 *-*-aix*) conftest_s=' .machine "pwr5x"
15632 .csect .text[PR]
15633 frin 1,1';;
1e04bfdc 15634 *) conftest_s=' .machine power5
9719f3b7
DE
15635 .text
15636 frin 1,1';;
15637 esac
15638
b61ff9c8
BS
15639 echo "$as_me:$LINENO: checking assembler for fp round support" >&5
15640echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
9719f3b7
DE
15641if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
15642 echo $ECHO_N "(cached) $ECHO_C" >&6
15643else
15644 gcc_cv_as_powerpc_fprnd=no
15645 if test $in_tree_gas = yes; then
15646 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15647 then gcc_cv_as_powerpc_fprnd=yes
15648fi
15649 elif test x$gcc_cv_as != x; then
15650 echo "$conftest_s" > conftest.s
15651 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15653 (eval $ac_try) 2>&5
15654 ac_status=$?
15655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15656 (exit $ac_status); }; }
15657 then
15658 gcc_cv_as_powerpc_fprnd=yes
15659 else
15660 echo "configure: failed program was" >&5
15661 cat conftest.s >&5
15662 fi
15663 rm -f conftest.o conftest.s
15664 fi
15665fi
b61ff9c8
BS
15666echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
15667echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
9719f3b7
DE
15668if test $gcc_cv_as_powerpc_fprnd = yes; then
15669
15670cat >>confdefs.h <<\_ACEOF
15671#define HAVE_AS_FPRND 1
15672_ACEOF
15673
44cd321e
PS
15674fi
15675
15676 case $target in
15677 *-*-aix*) conftest_s=' .machine "pwr6"
15678 .csect .text[PR]
15679 mffgpr 1,3';;
15680 *) conftest_s=' .machine power6
15681 .text
15682 mffgpr 1,3';;
15683 esac
15684
b61ff9c8
BS
15685 echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5
15686echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6
44cd321e
PS
15687if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then
15688 echo $ECHO_N "(cached) $ECHO_C" >&6
15689else
15690 gcc_cv_as_powerpc_mfpgpr=no
15691 if test $in_tree_gas = yes; then
15692 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
15693 then gcc_cv_as_powerpc_mfpgpr=yes
15694fi
15695 elif test x$gcc_cv_as != x; then
15696 echo "$conftest_s" > conftest.s
15697 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15699 (eval $ac_try) 2>&5
15700 ac_status=$?
15701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15702 (exit $ac_status); }; }
15703 then
15704 gcc_cv_as_powerpc_mfpgpr=yes
15705 else
15706 echo "configure: failed program was" >&5
15707 cat conftest.s >&5
15708 fi
15709 rm -f conftest.o conftest.s
15710 fi
15711fi
b61ff9c8
BS
15712echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5
15713echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6
44cd321e
PS
15714if test $gcc_cv_as_powerpc_mfpgpr = yes; then
15715
15716cat >>confdefs.h <<\_ACEOF
15717#define HAVE_AS_MFPGPR 1
15718_ACEOF
15719
432218ba
DE
15720fi
15721
7f970b70
AM
15722 case $target in
15723 *-*-aix*) conftest_s=' .csect .text[PR]
15724LCF..0:
15725 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
15726 *-*-darwin*)
15727 conftest_s=' .text
15728LCF0:
15729 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
15730 *) conftest_s=' .text
15731.LCF0:
15732 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
15733 esac
15734
b61ff9c8
BS
15735 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
15736echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
695d8830
AS
15737if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
15738 echo $ECHO_N "(cached) $ECHO_C" >&6
15739else
15740 gcc_cv_as_powerpc_rel16=no
15741 if test $in_tree_gas = yes; then
15742 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15743 then gcc_cv_as_powerpc_rel16=yes
15744fi
15745 elif test x$gcc_cv_as != x; then
15746 echo "$conftest_s" > conftest.s
15747 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15749 (eval $ac_try) 2>&5
15750 ac_status=$?
15751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15752 (exit $ac_status); }; }
15753 then
15754 gcc_cv_as_powerpc_rel16=yes
15755 else
15756 echo "configure: failed program was" >&5
15757 cat conftest.s >&5
15758 fi
15759 rm -f conftest.o conftest.s
15760 fi
15761fi
b61ff9c8
BS
15762echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
15763echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
695d8830
AS
15764if test $gcc_cv_as_powerpc_rel16 = yes; then
15765
15766cat >>confdefs.h <<\_ACEOF
15767#define HAVE_AS_REL16 1
15768_ACEOF
15769
15770fi
15771
b639c3c2
JJ
15772 case $target in
15773 *-*-aix*) conftest_s=' .machine "pwr6"
15774 .csect .text[PR]
15775 cmpb 3,4,5';;
15776 *) conftest_s=' .machine power6
15777 .text
15778 cmpb 3,4,5';;
15779 esac
15780
b61ff9c8
BS
15781 echo "$as_me:$LINENO: checking assembler for compare bytes support" >&5
15782echo $ECHO_N "checking assembler for compare bytes support... $ECHO_C" >&6
b639c3c2
JJ
15783if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then
15784 echo $ECHO_N "(cached) $ECHO_C" >&6
15785else
15786 gcc_cv_as_powerpc_cmpb=no
15787 if test $in_tree_gas = yes; then
15788 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
15789 then gcc_cv_as_powerpc_cmpb=yes
15790fi
15791 elif test x$gcc_cv_as != x; then
15792 echo "$conftest_s" > conftest.s
15793 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15795 (eval $ac_try) 2>&5
15796 ac_status=$?
15797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15798 (exit $ac_status); }; }
15799 then
15800 gcc_cv_as_powerpc_cmpb=yes
15801 else
15802 echo "configure: failed program was" >&5
15803 cat conftest.s >&5
15804 fi
15805 rm -f conftest.o conftest.s
15806 fi
15807fi
b61ff9c8
BS
15808echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_cmpb" >&5
15809echo "${ECHO_T}$gcc_cv_as_powerpc_cmpb" >&6
b639c3c2
JJ
15810if test $gcc_cv_as_powerpc_cmpb = yes; then
15811
15812cat >>confdefs.h <<\_ACEOF
15813#define HAVE_AS_CMPB 1
15814_ACEOF
15815
15816fi
15817
15818 case $target in
15819 *-*-aix*) conftest_s=' .machine "pwr6"
15820 .csect .text[PR]
0d74c0ee 15821 dadd 1,2,3';;
b639c3c2
JJ
15822 *) conftest_s=' .machine power6
15823 .text
0d74c0ee 15824 dadd 1,2,3';;
b639c3c2
JJ
15825 esac
15826
b61ff9c8
BS
15827 echo "$as_me:$LINENO: checking assembler for decimal float support" >&5
15828echo $ECHO_N "checking assembler for decimal float support... $ECHO_C" >&6
b639c3c2
JJ
15829if test "${gcc_cv_as_powerpc_dfp+set}" = set; then
15830 echo $ECHO_N "(cached) $ECHO_C" >&6
15831else
15832 gcc_cv_as_powerpc_dfp=no
15833 if test $in_tree_gas = yes; then
15834 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
15835 then gcc_cv_as_powerpc_dfp=yes
15836fi
15837 elif test x$gcc_cv_as != x; then
15838 echo "$conftest_s" > conftest.s
15839 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15841 (eval $ac_try) 2>&5
15842 ac_status=$?
15843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15844 (exit $ac_status); }; }
15845 then
15846 gcc_cv_as_powerpc_dfp=yes
15847 else
15848 echo "configure: failed program was" >&5
15849 cat conftest.s >&5
15850 fi
15851 rm -f conftest.o conftest.s
15852 fi
15853fi
b61ff9c8
BS
15854echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_dfp" >&5
15855echo "${ECHO_T}$gcc_cv_as_powerpc_dfp" >&6
b639c3c2
JJ
15856if test $gcc_cv_as_powerpc_dfp = yes; then
15857
15858cat >>confdefs.h <<\_ACEOF
15859#define HAVE_AS_DFP 1
15860_ACEOF
15861
e51917ae
JM
15862fi
15863
b61ff9c8
BS
15864 echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
15865echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
e51917ae
JM
15866if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then
15867 echo $ECHO_N "(cached) $ECHO_C" >&6
15868else
15869 gcc_cv_as_powerpc_gnu_attribute=no
15870 if test $in_tree_gas = yes; then
15871 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
15872 then gcc_cv_as_powerpc_gnu_attribute=yes
15873fi
15874 elif test x$gcc_cv_as != x; then
15875 echo '.gnu_attribute 4,1' > conftest.s
15876 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15878 (eval $ac_try) 2>&5
15879 ac_status=$?
15880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15881 (exit $ac_status); }; }
15882 then
15883 gcc_cv_as_powerpc_gnu_attribute=yes
15884 else
15885 echo "configure: failed program was" >&5
15886 cat conftest.s >&5
15887 fi
15888 rm -f conftest.o conftest.s
15889 fi
15890fi
b61ff9c8
BS
15891echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_gnu_attribute" >&5
15892echo "${ECHO_T}$gcc_cv_as_powerpc_gnu_attribute" >&6
e51917ae
JM
15893if test $gcc_cv_as_powerpc_gnu_attribute = yes; then
15894
15895cat >>confdefs.h <<\_ACEOF
15896#define HAVE_AS_GNU_ATTRIBUTE 1
15897_ACEOF
15898
7f970b70 15899fi
8ada417f
ZW
15900 ;;
15901
15902 mips*-*-*)
b61ff9c8
BS
15903 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
15904echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
ba479fd2
NN
15905if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
15906 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15907else
15908 gcc_cv_as_mips_explicit_relocs=no
15909 if test $in_tree_gas = yes; then
15910 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15911 then gcc_cv_as_mips_explicit_relocs=yes
15912fi
15913 elif test x$gcc_cv_as != x; then
6e3f3080 15914 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
15915 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15917 (eval $ac_try) 2>&5
15918 ac_status=$?
15919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15920 (exit $ac_status); }; }
8ada417f
ZW
15921 then
15922 gcc_cv_as_mips_explicit_relocs=yes
15923 else
15924 echo "configure: failed program was" >&5
15925 cat conftest.s >&5
ef1ecf87 15926 fi
8ada417f
ZW
15927 rm -f conftest.o conftest.s
15928 fi
15929fi
b61ff9c8
BS
15930echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
15931echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
15932if test $gcc_cv_as_mips_explicit_relocs = yes; then
15933 if test x$target_cpu_default = x
15934 then target_cpu_default=MASK_EXPLICIT_RELOCS
15935 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
15936 fi
4551169f 15937fi
b61ff9c8
BS
15938 echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5
15939echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6
4551169f
RS
15940if test "${gcc_cv_as_mips_no_shared+set}" = set; then
15941 echo $ECHO_N "(cached) $ECHO_C" >&6
15942else
15943 gcc_cv_as_mips_no_shared=no
15944 if test $in_tree_gas = yes; then
15945 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
15946 then gcc_cv_as_mips_no_shared=yes
15947fi
15948 elif test x$gcc_cv_as != x; then
15949 echo 'nop' > conftest.s
15950 if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5'
15951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15952 (eval $ac_try) 2>&5
15953 ac_status=$?
15954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15955 (exit $ac_status); }; }
15956 then
15957 gcc_cv_as_mips_no_shared=yes
15958 else
15959 echo "configure: failed program was" >&5
15960 cat conftest.s >&5
15961 fi
15962 rm -f conftest.o conftest.s
15963 fi
15964fi
b61ff9c8
BS
15965echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5
15966echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6
4551169f
RS
15967if test $gcc_cv_as_mips_no_shared = yes; then
15968
15969cat >>confdefs.h <<\_ACEOF
15970#define HAVE_AS_NO_SHARED 1
15971_ACEOF
15972
dcb957d9
JM
15973fi
15974
b61ff9c8
BS
15975 echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
15976echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
dcb957d9
JM
15977if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then
15978 echo $ECHO_N "(cached) $ECHO_C" >&6
15979else
15980 gcc_cv_as_mips_gnu_attribute=no
15981 if test $in_tree_gas = yes; then
15982 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
15983 then gcc_cv_as_mips_gnu_attribute=yes
15984fi
15985 elif test x$gcc_cv_as != x; then
15986 echo '.gnu_attribute 4,1' > conftest.s
15987 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15989 (eval $ac_try) 2>&5
15990 ac_status=$?
15991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15992 (exit $ac_status); }; }
15993 then
15994 gcc_cv_as_mips_gnu_attribute=yes
15995 else
15996 echo "configure: failed program was" >&5
15997 cat conftest.s >&5
15998 fi
15999 rm -f conftest.o conftest.s
16000 fi
16001fi
b61ff9c8
BS
16002echo "$as_me:$LINENO: result: $gcc_cv_as_mips_gnu_attribute" >&5
16003echo "${ECHO_T}$gcc_cv_as_mips_gnu_attribute" >&6
dcb957d9
JM
16004if test $gcc_cv_as_mips_gnu_attribute = yes; then
16005
16006cat >>confdefs.h <<\_ACEOF
16007#define HAVE_AS_GNU_ATTRIBUTE 1
16008_ACEOF
16009
a44380d2
JM
16010fi
16011
b61ff9c8
BS
16012 echo "$as_me:$LINENO: checking assembler for .dtprelword support" >&5
16013echo $ECHO_N "checking assembler for .dtprelword support... $ECHO_C" >&6
a44380d2
JM
16014if test "${gcc_cv_as_mips_dtprelword+set}" = set; then
16015 echo $ECHO_N "(cached) $ECHO_C" >&6
16016else
16017 gcc_cv_as_mips_dtprelword=no
16018 if test $in_tree_gas = yes; then
16019 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
16020 then gcc_cv_as_mips_dtprelword=yes
16021fi
16022 elif test x$gcc_cv_as != x; then
16023 echo '.section .tdata,"awT",@progbits
16024x:
16025 .word 2
16026 .text
16027 .dtprelword x+0x8000' > conftest.s
16028 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16030 (eval $ac_try) 2>&5
16031 ac_status=$?
16032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16033 (exit $ac_status); }; }
16034 then
16035 gcc_cv_as_mips_dtprelword=yes
16036 else
16037 echo "configure: failed program was" >&5
16038 cat conftest.s >&5
16039 fi
16040 rm -f conftest.o conftest.s
16041 fi
16042fi
b61ff9c8
BS
16043echo "$as_me:$LINENO: result: $gcc_cv_as_mips_dtprelword" >&5
16044echo "${ECHO_T}$gcc_cv_as_mips_dtprelword" >&6
a44380d2
JM
16045if test $gcc_cv_as_mips_dtprelword = yes; then
16046
16047cat >>confdefs.h <<\_ACEOF
16048#define HAVE_AS_DTPRELWORD 1
16049_ACEOF
16050
8ada417f 16051fi
dbad5e72
SE
16052 ;;
16053esac
8ada417f 16054
dbad5e72
SE
16055# Mips and HP-UX need the GNU assembler.
16056# Linux on IA64 might be able to use the Intel assembler.
16057
16058case "$target" in
16059 mips*-*-* | *-*-hpux* )
82563d35
RS
16060 if test x$gas_flag = xyes \
16061 || test x"$host" != x"$build" \
16062 || test ! -x "$gcc_cv_as" \
16063 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
16064 :
16065 else
16066 echo "*** This configuration requires the GNU assembler" >&2
16067 exit 1
16068 fi
ef1ecf87 16069 ;;
1cb36a98 16070esac
dbad5e72 16071
9d147085
RH
16072# ??? Not all targets support dwarf2 debug_line, even within a version
16073# of gas. Moreover, we need to emit a valid instruction to trigger any
16074# info to the output file. So, as supported targets are added to gas 2.11,
16075# add some instruction here to (also) show we expect this might work.
16076# ??? Once 2.11 is released, probably need to add first known working
16077# version to the per-target configury.
16078case "$target" in
80486e06 16079 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 16080 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
714f737f 16081 | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* | spu-*-*)
9d147085
RH
16082 insn="nop"
16083 ;;
57116d8d 16084 ia64*-*-* | s390*-*-*)
9d147085
RH
16085 insn="nop 0"
16086 ;;
2853bc5a
HPN
16087 mmix-*-*)
16088 insn="swym 0"
16089 ;;
8ada417f
ZW
16090esac
16091if test x"$insn" != x; then
16092 conftest_s="\
16093 .file 1 \"conftest.s\"
16094 .loc 1 3 0
16095 $insn"
b61ff9c8
BS
16096 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
16097echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
ba479fd2
NN
16098if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
16099 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16100else
16101 gcc_cv_as_dwarf2_debug_line=no
16102 if test $in_tree_gas = yes; then
16103 if test $in_tree_gas_is_elf = yes \
16104 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
16105 then gcc_cv_as_dwarf2_debug_line=yes
16106fi
16107 elif test x$gcc_cv_as != x; then
6e3f3080 16108 echo "$conftest_s" > conftest.s
ba479fd2
NN
16109 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16111 (eval $ac_try) 2>&5
16112 ac_status=$?
16113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16114 (exit $ac_status); }; }
8ada417f 16115 then
080a5bb0
EB
16116 if test x$gcc_cv_objdump != x \
16117 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
16118 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
16119 gcc_cv_as_dwarf2_debug_line=yes
16120 fi
16121 else
16122 echo "configure: failed program was" >&5
16123 cat conftest.s >&5
16124 fi
16125 rm -f conftest.o conftest.s
16126 fi
16127fi
b61ff9c8
BS
16128echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
16129echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 16130
ad9c4d9f 16131
8ada417f
ZW
16132# The .debug_line file table must be in the exact order that
16133# we specified the files, since these indices are also used
16134# by DW_AT_decl_file. Approximate this test by testing if
16135# the assembler bitches if the same index is assigned twice.
b61ff9c8
BS
16136 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
16137echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
ba479fd2
NN
16138if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
16139 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16140else
16141 gcc_cv_as_dwarf2_file_buggy=no
16142 if test x$gcc_cv_as != x; then
6e3f3080 16143 echo ' .file 1 "foo.s"
8ada417f 16144 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
16145 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16147 (eval $ac_try) 2>&5
16148 ac_status=$?
16149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16150 (exit $ac_status); }; }
8ada417f
ZW
16151 then
16152 gcc_cv_as_dwarf2_file_buggy=yes
16153 else
16154 echo "configure: failed program was" >&5
16155 cat conftest.s >&5
16156 fi
16157 rm -f conftest.o conftest.s
16158 fi
ad9c4d9f 16159fi
b61ff9c8
BS
16160echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
16161echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
16162
16163
16164 if test $gcc_cv_as_dwarf2_debug_line = yes \
16165 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
16166
16167cat >>confdefs.h <<\_ACEOF
9d147085 16168#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 16169_ACEOF
9d147085 16170
8ada417f 16171 fi
ad9c4d9f 16172
b61ff9c8
BS
16173 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
16174echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
ba479fd2
NN
16175if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
16176 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16177else
16178 gcc_cv_as_gdwarf2_flag=no
16179 if test $in_tree_gas = yes; then
16180 if test $in_tree_gas_is_elf = yes \
16181 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
16182 then gcc_cv_as_gdwarf2_flag=yes
16183fi
16184 elif test x$gcc_cv_as != x; then
6e3f3080 16185 echo "$insn" > conftest.s
ba479fd2
NN
16186 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
16187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16188 (eval $ac_try) 2>&5
16189 ac_status=$?
16190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16191 (exit $ac_status); }; }
8ada417f
ZW
16192 then
16193 gcc_cv_as_gdwarf2_flag=yes
16194 else
16195 echo "configure: failed program was" >&5
16196 cat conftest.s >&5
16197 fi
16198 rm -f conftest.o conftest.s
16199 fi
ad9c4d9f 16200fi
b61ff9c8
BS
16201echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
16202echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 16203if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
16204
16205cat >>confdefs.h <<\_ACEOF
5f0e9ea2 16206#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 16207_ACEOF
5f0e9ea2
GK
16208
16209fi
ad9c4d9f 16210
b61ff9c8
BS
16211 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
16212echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
ba479fd2
NN
16213if test "${gcc_cv_as_gstabs_flag+set}" = set; then
16214 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16215else
16216 gcc_cv_as_gstabs_flag=no
16217 if test $in_tree_gas = yes; then
16218 if test $in_tree_gas_is_elf = yes \
16219 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
16220 then gcc_cv_as_gstabs_flag=yes
16221fi
16222 elif test x$gcc_cv_as != x; then
6e3f3080 16223 echo "$insn" > conftest.s
ba479fd2
NN
16224 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
16225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16226 (eval $ac_try) 2>&5
16227 ac_status=$?
16228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16229 (exit $ac_status); }; }
8ada417f
ZW
16230 then
16231 # The native Solaris 9/Intel assembler doesn't understand --gstabs
16232 # and warns about it, but still exits successfully. So check for
16233 # this.
ba479fd2
NN
16234 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
16235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16236 (eval $ac_try) 2>&5
16237 ac_status=$?
16238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16239 (exit $ac_status); }; }
8ada417f
ZW
16240 then :
16241 else gcc_cv_as_gstabs_flag=yes
16242 fi
16243 else
16244 echo "configure: failed program was" >&5
16245 cat conftest.s >&5
16246 fi
16247 rm -f conftest.o conftest.s
16248 fi
ad9c4d9f 16249fi
b61ff9c8
BS
16250echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
16251echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 16252if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
16253
16254cat >>confdefs.h <<\_ACEOF
5f0e9ea2 16255#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 16256_ACEOF
5f0e9ea2 16257
c8aea42c
PB
16258fi
16259
b61ff9c8
BS
16260 echo "$as_me:$LINENO: checking assembler for --debug-prefix-map option" >&5
16261echo $ECHO_N "checking assembler for --debug-prefix-map option... $ECHO_C" >&6
c8aea42c
PB
16262if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then
16263 echo $ECHO_N "(cached) $ECHO_C" >&6
16264else
16265 gcc_cv_as_debug_prefix_map_flag=no
16266 if test $in_tree_gas = yes; then
303a4698 16267 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
c8aea42c
PB
16268 then gcc_cv_as_debug_prefix_map_flag=yes
16269fi
16270 elif test x$gcc_cv_as != x; then
16271 echo "$insn" > conftest.s
16272 if { ac_try='$gcc_cv_as --debug-prefix-map /a=/b -o conftest.o conftest.s >&5'
16273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16274 (eval $ac_try) 2>&5
16275 ac_status=$?
16276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16277 (exit $ac_status); }; }
16278 then
16279 gcc_cv_as_debug_prefix_map_flag=yes
16280 else
16281 echo "configure: failed program was" >&5
16282 cat conftest.s >&5
16283 fi
16284 rm -f conftest.o conftest.s
16285 fi
16286fi
b61ff9c8
BS
16287echo "$as_me:$LINENO: result: $gcc_cv_as_debug_prefix_map_flag" >&5
16288echo "${ECHO_T}$gcc_cv_as_debug_prefix_map_flag" >&6
c8aea42c
PB
16289if test $gcc_cv_as_debug_prefix_map_flag = yes; then
16290
16291cat >>confdefs.h <<\_ACEOF
16292#define HAVE_AS_DEBUG_PREFIX_MAP 1
16293_ACEOF
16294
5f0e9ea2 16295fi
8ada417f 16296fi
5f0e9ea2 16297
b61ff9c8
BS
16298echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5
16299echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6
03943c05
AO
16300if test "${gcc_cv_as_line_zero+set}" = set; then
16301 echo $ECHO_N "(cached) $ECHO_C" >&6
16302else
16303 gcc_cv_as_line_zero=no
16304 if test $in_tree_gas = yes; then
cf0eb7a1
AO
16305 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
16306 then gcc_cv_as_line_zero=yes
03943c05
AO
16307fi
16308 elif test "x$gcc_cv_as" != x; then
16309 { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
16310 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
16311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16312 (eval $ac_try) 2>&5
16313 ac_status=$?
16314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16315 (exit $ac_status); }; } &&
16316 test "x`cat conftest.out`" = x
16317 then
16318 gcc_cv_as_line_zero=yes
16319 else
16320 echo "configure: failed program was" >&5
16321 cat conftest.s >&5
16322 echo "configure: error output was" >&5
16323 cat conftest.out >&5
16324 fi
16325 rm -f conftest.o conftest.s conftest.out
16326 fi
16327fi
b61ff9c8
BS
16328echo "$as_me:$LINENO: result: $gcc_cv_as_line_zero" >&5
16329echo "${ECHO_T}$gcc_cv_as_line_zero" >&6
03943c05
AO
16330if test "x$gcc_cv_as_line_zero" = xyes; then
16331
16332cat >>confdefs.h <<\_ACEOF
16333#define HAVE_AS_LINE_ZERO 1
16334_ACEOF
16335
16336fi
16337
b61ff9c8
BS
16338echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
16339echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 16340gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 16341if test $in_tree_ld = yes ; then
5408ac6c
HPN
16342 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 \
16343 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
16344 gcc_cv_ld_ro_rw_mix=read-write
16345 fi
16346elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
16347 echo '.section myfoosect, "a"' > conftest1.s
16348 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 16349 echo '.byte 1' >> conftest2.s
90e145da 16350 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 16351 echo '.byte 0' >> conftest3.s
6cd656d0
KC
16352 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
16353 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
16354 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 16355 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 16356 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 16357 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 16358 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
16359 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
16360 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
16361 gcc_cv_ld_ro_rw_mix=read-only
16362 else
16363 gcc_cv_ld_ro_rw_mix=read-write
16364 fi
16365 fi
16366 fi
16367 rm -f conftest.* conftest[123].*
16368fi
16369if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
16370
16371cat >>confdefs.h <<\_ACEOF
96d0f4dc 16372#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 16373_ACEOF
96d0f4dc
JJ
16374
16375fi
b61ff9c8
BS
16376echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
16377echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 16378
b61ff9c8
BS
16379echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
16380echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 16381gcc_cv_ld_eh_frame_hdr=no
34a86c2b 16382if test $in_tree_ld = yes ; then
5408ac6c
HPN
16383 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 \
16384 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
16385 gcc_cv_ld_eh_frame_hdr=yes
16386 fi
16387elif test x$gcc_cv_ld != x; then
16388 # Check if linker supports --eh-frame-hdr option
16389 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
16390 gcc_cv_ld_eh_frame_hdr=yes
16391 fi
16392fi
232b67d9 16393
275b60d6 16394if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
16395
16396cat >>confdefs.h <<\_ACEOF
275b60d6 16397#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 16398_ACEOF
275b60d6
JJ
16399
16400fi
b61ff9c8
BS
16401echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
16402echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 16403
b61ff9c8
BS
16404echo "$as_me:$LINENO: checking linker position independent executable support" >&5
16405echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
16406gcc_cv_ld_pie=no
16407if test $in_tree_ld = yes ; then
5408ac6c
HPN
16408 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 \
16409 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
16410 gcc_cv_ld_pie=yes
16411 fi
16412elif test x$gcc_cv_ld != x; then
16413 # Check if linker supports -pie option
16414 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
16415 gcc_cv_ld_pie=yes
16416 fi
16417fi
16418if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
16419
16420cat >>confdefs.h <<\_ACEOF
24a4dd31 16421#define HAVE_LD_PIE 1
ba479fd2 16422_ACEOF
24a4dd31
JJ
16423
16424fi
b61ff9c8
BS
16425echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
16426echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 16427
b61ff9c8
BS
16428echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5
16429echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6
22ba88ef 16430gcc_cv_ld_eh_gc_sections=no
b639c3c2
JJ
16431if test $in_tree_ld = yes ; then
16432 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 \
16433 && test $in_tree_ld_is_elf = yes; then
16434 gcc_cv_ld_eh_gc_sections=yes
16435 fi
16436elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
16437 cat > conftest.s <<EOF
16438 .section .text
16439.globl _start
16440 .type _start, @function
16441_start:
16442 .long foo
16443 .size _start, .-_start
16444 .section .text.foo,"ax",@progbits
16445 .type foo, @function
16446foo:
16447 .long 0
16448 .size foo, .-foo
16449 .section .gcc_except_table.foo,"a",@progbits
16450.L0:
16451 .long 0
16452 .section .eh_frame,"a",@progbits
16453 .long .L0
16454EOF
16455 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
16456 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
16457 | grep "gc-sections option ignored" > /dev/null; then
16458 gcc_cv_ld_eh_gc_sections=no
16459 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
16460 gcc_cv_ld_eh_gc_sections=yes
16461 # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
16462 if test x$gcc_cv_as_comdat_group != xyes; then
16463 gcc_cv_ld_eh_gc_sections=no
16464 cat > conftest.s <<EOF
16465 .section .text
16466.globl _start
16467 .type _start, @function
16468_start:
16469 .long foo
16470 .size _start, .-_start
16471 .section .gnu.linkonce.t.foo,"ax",@progbits
16472 .type foo, @function
16473foo:
16474 .long 0
16475 .size foo, .-foo
16476 .section .gcc_except_table.foo,"a",@progbits
16477.L0:
16478 .long 0
16479 .section .eh_frame,"a",@progbits
16480 .long .L0
16481EOF
16482 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
16483 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
16484 | grep "gc-sections option ignored" > /dev/null; then
16485 gcc_cv_ld_eh_gc_sections=no
16486 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
16487 gcc_cv_ld_eh_gc_sections=yes
16488 fi
16489 fi
16490 fi
16491 fi
16492 fi
16493 rm -f conftest.s conftest.o conftest
16494fi
e9d207d9
EB
16495case "$target" in
16496 hppa*-*-linux*)
16497 # ??? This apparently exposes a binutils bug with PC-relative relocations.
16498 gcc_cv_ld_eh_gc_sections=no
16499 ;;
16500esac
22ba88ef
EB
16501if test x$gcc_cv_ld_eh_gc_sections = xyes; then
16502
16503cat >>confdefs.h <<\_ACEOF
16504#define HAVE_LD_EH_GC_SECTIONS 1
16505_ACEOF
16506
16507fi
b61ff9c8
BS
16508echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5
16509echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6
22ba88ef 16510
8bb915b6
NN
16511# --------
16512# UNSORTED
16513# --------
16514
b61ff9c8
BS
16515echo "$as_me:$LINENO: checking linker --as-needed support" >&5
16516echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
16517if test "${gcc_cv_ld_as_needed+set}" = set; then
16518 echo $ECHO_N "(cached) $ECHO_C" >&6
16519else
16520 gcc_cv_ld_as_needed=no
765f1bf9
AM
16521if test $in_tree_ld = yes ; then
16522 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 \
16523 && test $in_tree_ld_is_elf = yes; then
16524 gcc_cv_ld_as_needed=yes
16525 fi
16526elif test x$gcc_cv_ld != x; then
16527 # Check if linker supports --as-needed and --no-as-needed options
16528 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
16529 gcc_cv_ld_as_needed=yes
16530 fi
16531fi
82e923f6
RS
16532
16533fi
b61ff9c8
BS
16534echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
16535echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
16536if test x"$gcc_cv_ld_as_needed" = xyes; then
16537
16538cat >>confdefs.h <<\_ACEOF
16539#define HAVE_LD_AS_NEEDED 1
16540_ACEOF
16541
16542fi
765f1bf9 16543
d82bf747
AM
16544case "$target:$tm_file" in
16545 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
b61ff9c8
BS
16546 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
16547echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
85b776df
AM
16548if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
16549 echo $ECHO_N "(cached) $ECHO_C" >&6
16550else
16551 gcc_cv_ld_no_dot_syms=no
16552 if test $in_tree_ld = yes ; then
16553 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
16554 gcc_cv_ld_no_dot_syms=yes
16555 fi
16556 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
16557 cat > conftest1.s <<EOF
16558 .text
16559 bl .foo
16560EOF
16561 cat > conftest2.s <<EOF
16562 .section ".opd","aw"
16563 .align 3
16564 .globl foo
16565 .type foo,@function
16566foo:
16567 .quad .LEfoo,.TOC.@tocbase,0
16568 .text
16569.LEfoo:
16570 blr
16571 .size foo,.-.LEfoo
16572EOF
16573 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
16574 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
16575 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
16576 gcc_cv_ld_no_dot_syms=yes
16577 fi
16578 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
16579 fi
16580
16581fi
b61ff9c8
BS
16582echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
16583echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
85b776df
AM
16584 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
16585
16586cat >>confdefs.h <<\_ACEOF
16587#define HAVE_LD_NO_DOT_SYMS 1
16588_ACEOF
16589
16590 fi
16591 ;;
16592esac
16593
b61ff9c8
BS
16594echo "$as_me:$LINENO: checking linker --sysroot support" >&5
16595echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
380e5ca4
MM
16596if test "${gcc_cv_ld_sysroot+set}" = set; then
16597 echo $ECHO_N "(cached) $ECHO_C" >&6
16598else
16599 gcc_cv_ld_sysroot=no
16600 if test $in_tree_ld = yes ; then
16601 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 16602 gcc_cv_ld_sysroot=yes
380e5ca4
MM
16603 fi
16604 elif test x$gcc_cv_ld != x; then
16605 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
16606 gcc_cv_ld_sysroot=yes
16607 fi
16608 fi
16609fi
b61ff9c8
BS
16610echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
16611echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
380e5ca4
MM
16612if test x"$gcc_cv_ld_sysroot" = xyes; then
16613
16614cat >>confdefs.h <<\_ACEOF
16615#define HAVE_LD_SYSROOT 1
16616_ACEOF
16617
16618fi
16619
9fb28a67 16620if test x$with_sysroot = x && test x$host = x$target \
c794c06f
CD
16621 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
16622 && test "$prefix" != "NONE"; then
ba479fd2
NN
16623
16624cat >>confdefs.h <<_ACEOF
793e9558 16625#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 16626_ACEOF
793e9558
PB
16627
16628fi
16629
77008252 16630# Test for stack protector support in target C library.
b61ff9c8
BS
16631echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5
16632echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6
77008252
JJ
16633if test "${gcc_cv_libc_provides_ssp+set}" = set; then
16634 echo $ECHO_N "(cached) $ECHO_C" >&6
16635else
16636 gcc_cv_libc_provides_ssp=no
a6ccdbab
EC
16637 case "$target" in
16638 *-*-linux*)
77008252
JJ
16639 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
16640 if test "x$with_sysroot" = x; then
16641 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
16642 elif test "x$with_build_sysroot" != "x"; then
16643 glibc_header_dir="${with_build_sysroot}/usr/include"
77008252
JJ
16644 elif test "x$with_sysroot" = xyes; then
16645 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
16646 else
16647 glibc_header_dir="${with_sysroot}/usr/include"
16648 fi
16649 else
16650 glibc_header_dir=/usr/include
16651 fi
16652 # glibc 2.4 and later provides __stack_chk_fail and
16653 # either __stack_chk_guard, or TLS access to stack guard canary.
16654 if test -f $glibc_header_dir/features.h \
16655 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
16656 $glibc_header_dir/features.h > /dev/null; then
16657 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
16658 $glibc_header_dir/features.h > /dev/null; then
16659 gcc_cv_libc_provides_ssp=yes
16660 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
16661 $glibc_header_dir/features.h > /dev/null \
16662 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
16663 $glibc_header_dir/features.h > /dev/null; then
16664 gcc_cv_libc_provides_ssp=yes
16665 fi
a6ccdbab
EC
16666 fi
16667 ;;
16668 *-*-darwin*)
b61ff9c8
BS
16669 echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5
16670echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6
a6ccdbab
EC
16671if test "${ac_cv_func___stack_chk_fail+set}" = set; then
16672 echo $ECHO_N "(cached) $ECHO_C" >&6
16673else
16674 cat >conftest.$ac_ext <<_ACEOF
16675/* confdefs.h. */
16676_ACEOF
16677cat confdefs.h >>conftest.$ac_ext
16678cat >>conftest.$ac_ext <<_ACEOF
16679/* end confdefs.h. */
16680/* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail.
16681 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16682#define __stack_chk_fail innocuous___stack_chk_fail
16683
16684/* System header to define __stub macros and hopefully few prototypes,
16685 which can conflict with char __stack_chk_fail (); below.
16686 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16687 <limits.h> exists even on freestanding compilers. */
16688
16689#ifdef __STDC__
16690# include <limits.h>
16691#else
16692# include <assert.h>
16693#endif
16694
16695#undef __stack_chk_fail
16696
b61ff9c8 16697/* Override any gcc2 internal prototype to avoid an error. */
a6ccdbab
EC
16698#ifdef __cplusplus
16699extern "C"
b61ff9c8 16700{
a6ccdbab 16701#endif
b61ff9c8
BS
16702/* We use char because int might match the return type of a gcc2
16703 builtin and then its argument prototype would still apply. */
a6ccdbab
EC
16704char __stack_chk_fail ();
16705/* The GNU C library defines this for functions which it implements
16706 to always fail with ENOSYS. Some functions are actually named
16707 something starting with __ and the normal name is an alias. */
b61ff9c8 16708#if defined (__stub___stack_chk_fail) || defined (__stub_____stack_chk_fail)
a6ccdbab 16709choke me
b61ff9c8
BS
16710#else
16711char (*f) () = __stack_chk_fail;
16712#endif
16713#ifdef __cplusplus
16714}
a6ccdbab
EC
16715#endif
16716
16717int
16718main ()
16719{
b61ff9c8 16720return f != __stack_chk_fail;
a6ccdbab
EC
16721 ;
16722 return 0;
16723}
16724_ACEOF
16725rm -f conftest.$ac_objext conftest$ac_exeext
b61ff9c8
BS
16726if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16727 (eval $ac_link) 2>conftest.er1
a6ccdbab
EC
16728 ac_status=$?
16729 grep -v '^ *+' conftest.er1 >conftest.err
16730 rm -f conftest.er1
16731 cat conftest.err >&5
16732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b61ff9c8
BS
16733 (exit $ac_status); } &&
16734 { ac_try='test -z "$ac_c_werror_flag"
16735 || test ! -s conftest.err'
16736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16737 (eval $ac_try) 2>&5
16738 ac_status=$?
16739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16740 (exit $ac_status); }; } &&
16741 { ac_try='test -s conftest$ac_exeext'
16742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16743 (eval $ac_try) 2>&5
16744 ac_status=$?
16745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16746 (exit $ac_status); }; }; then
8b1f719a
PB
16747 ac_cv_func___stack_chk_fail=yes
16748else
a6ccdbab
EC
16749 echo "$as_me: failed program was:" >&5
16750sed 's/^/| /' conftest.$ac_ext >&5
16751
b61ff9c8 16752ac_cv_func___stack_chk_fail=no
a6ccdbab 16753fi
b61ff9c8 16754rm -f conftest.err conftest.$ac_objext \
a6ccdbab
EC
16755 conftest$ac_exeext conftest.$ac_ext
16756fi
b61ff9c8
BS
16757echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5
16758echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6
a6ccdbab
EC
16759if test $ac_cv_func___stack_chk_fail = yes; then
16760 gcc_cv_libc_provides_ssp=yes
16761else
16762 echo "no __stack_chk_fail on this target"
77008252 16763fi
a6ccdbab
EC
16764
16765 ;;
77008252 16766 *) gcc_cv_libc_provides_ssp=no ;;
a6ccdbab
EC
16767 esac
16768fi
b61ff9c8
BS
16769echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
16770echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6
a6ccdbab 16771
77008252
JJ
16772if test x$gcc_cv_libc_provides_ssp = xyes; then
16773
16774cat >>confdefs.h <<\_ACEOF
16775#define TARGET_LIBC_PROVIDES_SSP 1
16776_ACEOF
16777
16778fi
16779
ed965309
JJ
16780# Check if TFmode long double should be used by default or not.
16781# Some glibc targets used DFmode long double, but with glibc 2.4
16782# and later they can use TFmode.
16783case "$target" in
f7cc5390
JM
16784 powerpc*-*-linux* | \
16785 powerpc*-*-gnu* | \
ed965309
JJ
16786 sparc*-*-linux* | \
16787 s390*-*-linux* | \
16788 alpha*-*-linux*)
16789
b61ff9c8 16790# Check whether --with-long-double-128 or --without-long-double-128 was given.
ed965309 16791if test "${with_long_double_128+set}" = set; then
b61ff9c8
BS
16792 withval="$with_long_double_128"
16793 gcc_cv_target_ldbl128="$with_long_double_128"
ed965309
JJ
16794else
16795 gcc_cv_target_ldbl128=no
16796 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
16797 if test "x$with_sysroot" = x; then
16798 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
16799 elif test "x$with_build_sysroot" != "x"; then
16800 glibc_header_dir="${with_build_sysroot}/usr/include"
ed965309
JJ
16801 elif test "x$with_sysroot" = xyes; then
16802 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
16803 else
16804 glibc_header_dir="${with_sysroot}/usr/include"
16805 fi
16806 else
16807 glibc_header_dir=/usr/include
16808 fi
65280f6c 16809 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
ed965309
JJ
16810 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
16811 && gcc_cv_target_ldbl128=yes
65280f6c 16812
b61ff9c8 16813fi;
ed965309
JJ
16814 ;;
16815esac
16816if test x$gcc_cv_target_ldbl128 = xyes; then
16817
16818cat >>confdefs.h <<\_ACEOF
16819#define TARGET_DEFAULT_LONG_DOUBLE_128 1
16820_ACEOF
16821
16822fi
16823
81bf3d9e 16824# Find out what GC implementation we want, or may, use.
ba479fd2 16825
b61ff9c8 16826# Check whether --with-gc or --without-gc was given.
81bf3d9e 16827if test "${with_gc+set}" = set; then
b61ff9c8
BS
16828 withval="$with_gc"
16829 case "$withval" in
08cee789 16830 page)
81bf3d9e 16831 GGC=ggc-$withval
08cee789
DJ
16832 ;;
16833 zone)
16834 GGC=ggc-$withval
16835
16836cat >>confdefs.h <<\_ACEOF
16837#define GGC_ZONE 1
16838_ACEOF
16839
81bf3d9e
RH
16840 ;;
16841 *)
ba479fd2
NN
16842 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
16843echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
16844 { (exit 1); exit 1; }; }
81bf3d9e
RH
16845 ;;
16846esac
16847else
005537df 16848 GGC=ggc-page
b61ff9c8 16849fi;
81bf3d9e
RH
16850
16851echo "Using $GGC for garbage collection."
16852
3c809ba4 16853# Use the system's zlib library.
b8dad04b
ZW
16854zlibdir=-L../zlib
16855zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 16856
b61ff9c8 16857# Check whether --with-system-zlib or --without-system-zlib was given.
3c809ba4 16858if test "${with_system_zlib+set}" = set; then
b61ff9c8
BS
16859 withval="$with_system_zlib"
16860 zlibdir=
3c809ba4
AG
16861zlibinc=
16862
b61ff9c8 16863fi;
b8ec3cc8 16864
703d89ab 16865
ab22c1fa 16866
1a4b763e 16867
b61ff9c8
BS
16868echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
16869echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
16870 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
dc6746e7 16871if test "${enable_maintainer_mode+set}" = set; then
b61ff9c8
BS
16872 enableval="$enable_maintainer_mode"
16873 maintainer_mode=$enableval
dc6746e7
PT
16874else
16875 maintainer_mode=no
b61ff9c8 16876fi;
a6ccdbab 16877
b61ff9c8
BS
16878echo "$as_me:$LINENO: result: $maintainer_mode" >&5
16879echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
16880
16881if test "$maintainer_mode" = "yes"; then
16882 MAINT=''
16883else
16884 MAINT='#'
16885fi
16886
8bb915b6
NN
16887# --------------
16888# Language hooks
16889# --------------
16890
861bb6c1
JL
16891# Make empty files to contain the specs and options for each language.
16892# Then add #include lines to for a compiler that has specs and/or options.
16893
cc11cc9b 16894subdirs=
d7b42618 16895lang_opt_files=
861bb6c1 16896lang_specs_files=
3103b7db 16897lang_tree_files=
861bb6c1
JL
16898# These (without "all_") are set in each config-lang.in.
16899# `language' must be a single word so is spelled singularly.
16900all_languages=
861bb6c1 16901all_compilers=
fa958513 16902all_outputs='Makefile gccbug libada-mk'
861bb6c1 16903# List of language makefile fragments.
2ed26f6b
ZW
16904all_lang_makefrags=
16905# List of language subdirectory makefiles. Deprecated.
861bb6c1 16906all_lang_makefiles=
703d89ab 16907# Additional files for gengtype
ef69da62 16908all_gtfiles="$target_gtfiles"
861bb6c1 16909
cc11cc9b
PB
16910# These are the languages that are set in --enable-languages,
16911# and are available in the GCC tree.
16912all_selected_languages=
16913
861bb6c1
JL
16914# Add the language fragments.
16915# Languages are added via two mechanisms. Some information must be
16916# recorded in makefile variables, these are defined in config-lang.in.
16917# We accumulate them and plug them into the main Makefile.
16918# The other mechanism is a set of hooks for each of the main targets
16919# like `clean', `install', etc.
16920
861bb6c1 16921language_hooks="Make-hooks"
861bb6c1 16922
cc11cc9b 16923for lang in ${srcdir}/*/config-lang.in
861bb6c1 16924do
1546bb64
PB
16925 test "$lang" = "${srcdir}/*/config-lang.in" && continue
16926
cc11cc9b
PB
16927 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
16928 if test "x$lang_alias" = x
16929 then
16930 echo "$lang doesn't set \$language." 1>&2
16931 exit 1
16932 fi
16933 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
16934 subdirs="$subdirs $subdir"
16935 case ",$enable_languages," in
16936 *,$lang_alias,*)
16937 all_selected_languages="$all_selected_languages $lang_alias"
16938 if test -f $srcdir/$subdir/lang-specs.h; then
16939 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
16940 fi
16941 ;;
16942 esac
16943
cc11cc9b
PB
16944 language=
16945 boot_language=
16946 compilers=
cc11cc9b
PB
16947 outputs=
16948 gtfiles=
1546bb64 16949 subdir_requires=
cc11cc9b
PB
16950 . ${srcdir}/$subdir/config-lang.in
16951 if test "x$language" = x
16952 then
16953 echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2
16954 exit 1
16955 fi
1546bb64
PB
16956
16957 ok=:
16958 case ",$enable_languages," in
16959 *,$lang_alias,*) ;;
16960 *)
16961 for i in $subdir_requires; do
b6348cb3 16962 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
16963 ok=false
16964 break
16965 done
16966 ;;
16967 esac
16968 $ok || continue
16969
cc11cc9b 16970 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in"
1546bb64
PB
16971 if test -f $srcdir/$subdir/lang.opt; then
16972 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
16973 fi
16974 if test -f $srcdir/$subdir/$subdir-tree.def; then
16975 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
16976 fi
cc11cc9b
PB
16977 if test -f ${srcdir}/$subdir/Makefile.in
16978 then all_lang_makefiles="$subdir/Makefile"
16979 fi
16980 all_languages="$all_languages $language"
cc11cc9b 16981 all_compilers="$all_compilers $compilers"
cc11cc9b 16982 all_outputs="$all_outputs $outputs"
703d89ab 16983 all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
861bb6c1
JL
16984done
16985
8ac9d31f
TJ
16986# Pick up gtfiles for c
16987gtfiles=
8ac9d31f 16988. ${srcdir}/c-config-lang.in
703d89ab 16989all_gtfiles="$all_gtfiles [c] $gtfiles"
8ac9d31f 16990
cbc59f01 16991check_languages=
cc11cc9b 16992for language in $all_selected_languages
cbc59f01 16993do
cc11cc9b 16994 check_languages="$check_languages check-$language"
cbc59f01
DD
16995done
16996
62b81e45 16997# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 16998# lang.${target}. Only do so for selected languages.
861bb6c1
JL
16999
17000rm -f Make-hooks
17001touch Make-hooks
bd97af06 17002target_list="all.cross start.encap rest.encap tags \
bcc3d150
BM
17003 install-common install-man install-info install-pdf dvi pdf \
17004 html uninstall info man srcextra srcman srcinfo \
8b1f719a 17005 mostlyclean clean distclean maintainer-clean"
cc11cc9b 17006
861bb6c1
JL
17007for t in $target_list
17008do
17009 x=
cc11cc9b 17010 for lang in $all_selected_languages
861bb6c1 17011 do
cc11cc9b 17012 x="$x $lang.$t"
861bb6c1
JL
17013 done
17014 echo "lang.$t: $x" >> Make-hooks
17015done
17016
8bb915b6
NN
17017# --------
17018# UNSORTED
17019# --------
17020
cc06d68c 17021# Create .gdbinit.
861bb6c1 17022
cc06d68c
GP
17023echo "dir ." > .gdbinit
17024echo "dir ${srcdir}" >> .gdbinit
17025if test x$gdb_needs_out_file_path = xyes
17026then
17027 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
17028fi
17029if test "x$subdirs" != x; then
17030 for s in $subdirs
17031 do
17032 echo "dir ${srcdir}/$s" >> .gdbinit
17033 done
861bb6c1 17034fi
cc06d68c 17035echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 17036
15c723f3 17037gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)'
d062c304
JL
17038
17039
2ce3c6c6 17040
2bbea3a6
RH
17041# Find a directory in which to install a shared libgcc.
17042
b61ff9c8 17043# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
2bbea3a6 17044if test "${enable_version_specific_runtime_libs+set}" = set; then
b61ff9c8 17045 enableval="$enable_version_specific_runtime_libs"
ba479fd2 17046
b61ff9c8 17047fi;
2bbea3a6
RH
17048
17049
b61ff9c8 17050# Check whether --with-slibdir or --without-slibdir was given.
5b15f277 17051if test "${with_slibdir+set}" = set; then
b61ff9c8
BS
17052 withval="$with_slibdir"
17053 slibdir="$with_slibdir"
5b15f277
RH
17054else
17055 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 17056 slibdir='$(libsubdir)'
5b15f277 17057elif test "$host" != "$target"; then
2bbea3a6
RH
17058 slibdir='$(build_tooldir)/lib'
17059else
5b15f277 17060 slibdir='$(libdir)'
2bbea3a6 17061fi
b61ff9c8 17062fi;
2bbea3a6
RH
17063
17064
1e6347d8 17065objdir=`${PWDCMD-pwd}`
7e717196
JL
17066
17067
22482f74 17068
b61ff9c8 17069# Check whether --with-datarootdir or --without-datarootdir was given.
22482f74 17070if test "${with_datarootdir+set}" = set; then
b61ff9c8
BS
17071 withval="$with_datarootdir"
17072 datarootdir="\${prefix}/$with_datarootdir"
22482f74
MS
17073else
17074 datarootdir='$(prefix)/share'
b61ff9c8 17075fi;
22482f74
MS
17076
17077
a6ccdbab 17078
b61ff9c8 17079# Check whether --with-docdir or --without-docdir was given.
22482f74 17080if test "${with_docdir+set}" = set; then
b61ff9c8
BS
17081 withval="$with_docdir"
17082 docdir="\${prefix}/$with_docdir"
22482f74
MS
17083else
17084 docdir='$(datarootdir)'
b61ff9c8 17085fi;
703d89ab 17086
ab22c1fa 17087
1a4b763e 17088
b61ff9c8 17089# Check whether --with-htmldir or --without-htmldir was given.
22482f74 17090if test "${with_htmldir+set}" = set; then
b61ff9c8
BS
17091 withval="$with_htmldir"
17092 htmldir="\${prefix}/$with_htmldir"
22482f74
MS
17093else
17094 htmldir='$(docdir)'
b61ff9c8 17095fi;
861bb6c1
JL
17096
17097
703d89ab 17098# Substitute configuration variables
861bb6c1
JL
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
9b16d2c4 17143
e9a25f70 17144
6e26218f 17145
c8724862 17146
11642c3a
ZW
17147
17148
17149
3d9d2476 17150
e2500fed 17151
51b9ff45 17152
861bb6c1 17153
6e3f3080
NN
17154# Echo link setup.
17155if test x${build} = x${host} ; then
17156 if test x${host} = x${target} ; then
17157 echo "Links are now set up to build a native compiler for ${target}." 1>&2
17158 else
17159 echo "Links are now set up to build a cross-compiler" 1>&2
17160 echo " from ${host} to ${target}." 1>&2
17161 fi
17162else
17163 if test x${host} = x${target} ; then
17164 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
17165 echo " for ${target}." 1>&2
17166 else
17167 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
17168 echo " from ${host} to ${target}." 1>&2
17169 fi
17170fi
17171
6de9cd9a
DN
17172
17173
17174
6e3f3080
NN
17175# Configure the subdirectories
17176# AC_CONFIG_SUBDIRS($subdirs)
17177
17178# Create the Makefile
17179# and configure language subdirectories
b61ff9c8 17180 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
17181
17182
b61ff9c8 17183 ac_config_commands="$ac_config_commands default"
914c5af7 17184
ba479fd2 17185cat >confcache <<\_ACEOF
6e3f3080
NN
17186# This file is a shell script that caches the results of configure
17187# tests run on this system so they can be shared between configure
ba479fd2
NN
17188# scripts and configure runs, see configure's option --config-cache.
17189# It is not useful on other systems. If it contains results you don't
17190# want to keep, you may remove or edit it.
6e3f3080 17191#
ba479fd2
NN
17192# config.status only pays attention to the cache file if you give it
17193# the --recheck option to rerun configure.
6e3f3080 17194#
ba479fd2
NN
17195# `ac_cv_env_foo' variables (set or unset) will be overridden when
17196# loading this file, other *unset* `ac_cv_foo' will be assigned the
17197# following values.
17198
17199_ACEOF
17200
6e3f3080
NN
17201# The following way of writing the cache mishandles newlines in values,
17202# but we know of no workaround that is simple, portable, and efficient.
b61ff9c8 17203# So, don't put newlines in cache variables' values.
6e3f3080
NN
17204# Ultrix sh set writes to stderr and can't be redirected directly,
17205# and sets the high bit in the cache file unless we assign to the vars.
b61ff9c8 17206{
ba479fd2 17207 (set) 2>&1 |
b61ff9c8
BS
17208 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17209 *ac_space=\ *)
ba479fd2
NN
17210 # `set' does not quote correctly, so add quotes (double-quote
17211 # substitution turns \\\\ into \\, and sed turns \\ into \).
17212 sed -n \
86da66b5
HPN
17213 "s/'/'\\\\''/g;
17214 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
b61ff9c8 17215 ;;
ba479fd2
NN
17216 *)
17217 # `set' quotes correctly as required by POSIX, so do not add quotes.
b61ff9c8
BS
17218 sed -n \
17219 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2 17220 ;;
b61ff9c8
BS
17221 esac;
17222} |
ba479fd2
NN
17223 sed '
17224 t clear
b61ff9c8 17225 : clear
ba479fd2
NN
17226 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17227 t end
b61ff9c8
BS
17228 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17229 : end' >>confcache
17230if diff $cache_file confcache >/dev/null 2>&1; then :; else
17231 if test -w $cache_file; then
17232 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
ba479fd2 17233 cat confcache >$cache_file
6e3f3080 17234 else
b61ff9c8 17235 echo "not updating unwritable cache $cache_file"
6e3f3080
NN
17236 fi
17237fi
17238rm -f confcache
17239
17240test "x$prefix" = xNONE && prefix=$ac_default_prefix
17241# Let make expand exec_prefix.
17242test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17243
b61ff9c8
BS
17244# VPATH may cause trouble with some makes, so we remove $(srcdir),
17245# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17246# trailing colons and then remove the whole line if VPATH becomes empty
17247# (actually we leave an empty line to preserve line numbers).
17248if test "x$srcdir" = x.; then
17249 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17250s/:*\$(srcdir):*/:/;
17251s/:*\${srcdir}:*/:/;
17252s/:*@srcdir@:*/:/;
17253s/^\([^=]*=[ ]*\):*/\1/;
17254s/:*$//;
17255s/^[^=]*=[ ]*$//;
17256}'
17257fi
17258
63cf211a 17259DEFS=-DHAVE_CONFIG_H
6e3f3080 17260
ba479fd2
NN
17261ac_libobjs=
17262ac_ltlibobjs=
17263for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17264 # 1. Remove the extension, and $U if already installed.
b61ff9c8
BS
17265 ac_i=`echo "$ac_i" |
17266 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
17267 # 2. Add them.
17268 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
17269 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
ba479fd2
NN
17270done
17271LIBOBJS=$ac_libobjs
63cf211a 17272
ba479fd2
NN
17273LTLIBOBJS=$ac_ltlibobjs
17274
17275
17276
17277: ${CONFIG_STATUS=./config.status}
17278ac_clean_files_save=$ac_clean_files
17279ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17280{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17281echo "$as_me: creating $CONFIG_STATUS" >&6;}
17282cat >$CONFIG_STATUS <<_ACEOF
17283#! $SHELL
17284# Generated by $as_me.
6e3f3080
NN
17285# Run this file to recreate the current configuration.
17286# Compiler output produced by configure, useful for debugging
ba479fd2 17287# configure, is in config.log if it exists.
6e3f3080 17288
ba479fd2
NN
17289debug=false
17290ac_cs_recheck=false
17291ac_cs_silent=false
17292SHELL=\${CONFIG_SHELL-$SHELL}
17293_ACEOF
17294
17295cat >>$CONFIG_STATUS <<\_ACEOF
17296## --------------------- ##
17297## M4sh Initialization. ##
17298## --------------------- ##
17299
b61ff9c8 17300# Be Bourne compatible
ba479fd2
NN
17301if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17302 emulate sh
17303 NULLCMD=:
17304 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17305 # is contrary to our usage. Disable this feature.
17306 alias -g '${1+"$@"}'='"$@"'
b61ff9c8
BS
17307elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17308 set -o posix
2f41c1d6 17309fi
b61ff9c8 17310DUALCASE=1; export DUALCASE # for MKS sh
ab22c1fa 17311
1a4b763e
BS
17312# Support unset when possible.
17313if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
17314 as_unset=unset
17315else
17316 as_unset=false
17317fi
17318
ab22c1fa 17319
1a4b763e 17320# Work around bugs in pre-3.0 UWIN ksh.
b61ff9c8 17321$as_unset ENV MAIL MAILPATH
1a4b763e
BS
17322PS1='$ '
17323PS2='> '
17324PS4='+ '
17325
17326# NLS nuisances.
17327for as_var in \
17328 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
17329 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
17330 LC_TELEPHONE LC_TIME
2f41c1d6 17331do
1a4b763e
BS
17332 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
17333 eval $as_var=C; export $as_var
17334 else
b61ff9c8 17335 $as_unset $as_var
1a4b763e
BS
17336 fi
17337done
17338
17339# Required to use basename.
b61ff9c8 17340if expr a : '\(a\)' >/dev/null 2>&1; then
1a4b763e
BS
17341 as_expr=expr
17342else
17343 as_expr=false
17344fi
17345
b61ff9c8 17346if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
1a4b763e
BS
17347 as_basename=basename
17348else
17349 as_basename=false
17350fi
17351
17352
17353# Name of the executable.
b61ff9c8 17354as_me=`$as_basename "$0" ||
1a4b763e
BS
17355$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17356 X"$0" : 'X\(//\)$' \| \
b61ff9c8
BS
17357 X"$0" : 'X\(/\)$' \| \
17358 . : '\(.\)' 2>/dev/null ||
1a4b763e 17359echo X/"$0" |
b61ff9c8
BS
17360 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17361 /^X\/\(\/\/\)$/{ s//\1/; q; }
17362 /^X\/\(\/\).*/{ s//\1/; q; }
17363 s/.*/./; q'`
1a4b763e 17364
b61ff9c8
BS
17365
17366# PATH needs CR, and LINENO needs CR and PATH.
17367# Avoid depending upon Character Ranges.
17368as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17369as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17370as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17371as_cr_digits='0123456789'
17372as_cr_alnum=$as_cr_Letters$as_cr_digits
17373
17374# The user is always right.
17375if test "${PATH_SEPARATOR+set}" != set; then
17376 echo "#! /bin/sh" >conf$$.sh
17377 echo "exit 0" >>conf$$.sh
17378 chmod +x conf$$.sh
17379 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
17380 PATH_SEPARATOR=';'
17381 else
17382 PATH_SEPARATOR=:
17383 fi
17384 rm -f conf$$.sh
17385fi
1a4b763e
BS
17386
17387
b61ff9c8
BS
17388 as_lineno_1=$LINENO
17389 as_lineno_2=$LINENO
17390 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17391 test "x$as_lineno_1" != "x$as_lineno_2" &&
17392 test "x$as_lineno_3" = "x$as_lineno_2" || {
17393 # Find who we are. Look in the path if we contain no path at all
17394 # relative or not.
17395 case $0 in
17396 *[\\/]* ) as_myself=$0 ;;
17397 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17398for as_dir in $PATH
17399do
17400 IFS=$as_save_IFS
17401 test -z "$as_dir" && as_dir=.
17402 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17403done
1a4b763e 17404
b61ff9c8
BS
17405 ;;
17406 esac
17407 # We did not find ourselves, most probably we were run as `sh COMMAND'
17408 # in which case we are not to be found in the path.
17409 if test "x$as_myself" = x; then
17410 as_myself=$0
17411 fi
17412 if test ! -f "$as_myself"; then
17413 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17414echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17415 { (exit 1); exit 1; }; }
17416 fi
17417 case $CONFIG_SHELL in
17418 '')
17419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17420for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17421do
17422 IFS=$as_save_IFS
17423 test -z "$as_dir" && as_dir=.
17424 for as_base in sh bash ksh sh5; do
17425 case $as_dir in
17426 /*)
17427 if ("$as_dir/$as_base" -c '
8b1f719a
PB
17428 as_lineno_1=$LINENO
17429 as_lineno_2=$LINENO
b61ff9c8 17430 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
8b1f719a 17431 test "x$as_lineno_1" != "x$as_lineno_2" &&
b61ff9c8
BS
17432 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17433 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
17434 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
17435 CONFIG_SHELL=$as_dir/$as_base
17436 export CONFIG_SHELL
17437 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17438 fi;;
17439 esac
17440 done
17441done
17442;;
17443 esac
ba479fd2
NN
17444
17445 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17446 # uniformly replaced by the line number. The first 'sed' inserts a
b61ff9c8
BS
17447 # line-number line before each line; the second 'sed' does the real
17448 # work. The second script uses 'N' to pair each line-number line
17449 # with the numbered line, and appends trailing '-' during
17450 # substitution so that $LINENO is not a special case at line end.
ba479fd2 17451 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b61ff9c8
BS
17452 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17453 sed '=' <$as_myself |
ba479fd2
NN
17454 sed '
17455 N
b61ff9c8
BS
17456 s,$,-,
17457 : loop
17458 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
ba479fd2 17459 t loop
b61ff9c8
BS
17460 s,-$,,
17461 s,^['$as_cr_digits']*\n,,
ba479fd2 17462 ' >$as_me.lineno &&
b61ff9c8
BS
17463 chmod +x $as_me.lineno ||
17464 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17465echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
ba479fd2
NN
17466 { (exit 1); exit 1; }; }
17467
17468 # Don't try to exec as it changes $[0], causing all sort of problems
17469 # (the dirname of $[0] is not the place where we might find the
b61ff9c8
BS
17470 # original and so on. Autoconf is especially sensible to this).
17471 . ./$as_me.lineno
ba479fd2
NN
17472 # Exit status is that of the last command.
17473 exit
17474}
17475
17476
b61ff9c8
BS
17477case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17478 *c*,-n*) ECHO_N= ECHO_C='
17479' ECHO_T=' ' ;;
17480 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17481 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
ba479fd2
NN
17482esac
17483
b61ff9c8 17484if expr a : '\(a\)' >/dev/null 2>&1; then
ba479fd2
NN
17485 as_expr=expr
17486else
17487 as_expr=false
17488fi
17489
17490rm -f conf$$ conf$$.exe conf$$.file
17491echo >conf$$.file
17492if ln -s conf$$.file conf$$ 2>/dev/null; then
b61ff9c8
BS
17493 # We could just check for DJGPP; but this test a) works b) is more generic
17494 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17495 if test -f conf$$.exe; then
17496 # Don't use ln at all; we don't have any links
ba479fd2 17497 as_ln_s='cp -p'
b61ff9c8
BS
17498 else
17499 as_ln_s='ln -s'
17500 fi
ba479fd2
NN
17501elif ln conf$$.file conf$$ 2>/dev/null; then
17502 as_ln_s=ln
17503else
17504 as_ln_s='cp -p'
17505fi
b61ff9c8 17506rm -f conf$$ conf$$.exe conf$$.file
ba479fd2
NN
17507
17508if mkdir -p . 2>/dev/null; then
17509 as_mkdir_p=:
17510else
86da66b5 17511 test -d ./-p && rmdir ./-p
ba479fd2
NN
17512 as_mkdir_p=false
17513fi
17514
b61ff9c8 17515as_executable_p="test -f"
ba479fd2
NN
17516
17517# Sed expression to map a string onto a valid CPP name.
86da66b5 17518as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
17519
17520# Sed expression to map a string onto a valid variable name.
86da66b5 17521as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
17522
17523
b61ff9c8
BS
17524# IFS
17525# We need space, tab and new line, in precisely that order.
17526as_nl='
17527'
17528IFS=" $as_nl"
17529
17530# CDPATH.
17531$as_unset CDPATH
17532
ba479fd2
NN
17533exec 6>&1
17534
b61ff9c8 17535# Open the log real soon, to keep \$[0] and so on meaningful, and to
ba479fd2 17536# report actual input values of CONFIG_FILES etc. instead of their
b61ff9c8
BS
17537# values after options handling. Logging --version etc. is OK.
17538exec 5>>config.log
17539{
17540 echo
17541 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17542## Running $as_me. ##
17543_ASBOX
17544} >&5
17545cat >&5 <<_CSEOF
17546
ba479fd2 17547This file was extended by $as_me, which was
b61ff9c8 17548generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
17549
17550 CONFIG_FILES = $CONFIG_FILES
17551 CONFIG_HEADERS = $CONFIG_HEADERS
17552 CONFIG_LINKS = $CONFIG_LINKS
17553 CONFIG_COMMANDS = $CONFIG_COMMANDS
17554 $ $0 $@
17555
b61ff9c8
BS
17556_CSEOF
17557echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17558echo >&5
ba479fd2
NN
17559_ACEOF
17560
17561# Files that config.status was made for.
b61ff9c8
BS
17562if test -n "$ac_config_files"; then
17563 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17564fi
2f41c1d6 17565
b61ff9c8
BS
17566if test -n "$ac_config_headers"; then
17567 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17568fi
17569
17570if test -n "$ac_config_links"; then
17571 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17572fi
17573
17574if test -n "$ac_config_commands"; then
17575 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17576fi
ba479fd2
NN
17577
17578cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8 17579
ba479fd2
NN
17580ac_cs_usage="\
17581\`$as_me' instantiates files from templates according to the
17582current configuration.
17583
17584Usage: $0 [OPTIONS] [FILE]...
17585
17586 -h, --help print this help, then exit
b61ff9c8 17587 -V, --version print version number, then exit
ba479fd2
NN
17588 -q, --quiet do not print progress messages
17589 -d, --debug don't remove temporary files
17590 --recheck update $as_me by reconfiguring in the same conditions
17591 --file=FILE[:TEMPLATE]
86da66b5 17592 instantiate the configuration file FILE
ba479fd2 17593 --header=FILE[:TEMPLATE]
86da66b5 17594 instantiate the configuration header FILE
ba479fd2
NN
17595
17596Configuration files:
17597$config_files
17598
17599Configuration headers:
17600$config_headers
17601
17602Configuration commands:
17603$config_commands
17604
17605Report bugs to <bug-autoconf@gnu.org>."
1a4b763e 17606_ACEOF
b61ff9c8 17607
ba479fd2
NN
17608cat >>$CONFIG_STATUS <<_ACEOF
17609ac_cs_version="\\
17610config.status
b61ff9c8
BS
17611configured by $0, generated by GNU Autoconf 2.59,
17612 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
ba479fd2 17613
b61ff9c8 17614Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
17615This config.status script is free software; the Free Software Foundation
17616gives unlimited permission to copy, distribute and modify it."
b61ff9c8 17617srcdir=$srcdir
ba479fd2
NN
17618_ACEOF
17619
17620cat >>$CONFIG_STATUS <<\_ACEOF
17621# If no file are specified by the user, then we need to provide default
17622# value. By we need to know if files were specified by the user.
17623ac_need_defaults=:
17624while test $# != 0
17625do
17626 case $1 in
17627 --*=*)
b61ff9c8
BS
17628 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17629 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
ba479fd2
NN
17630 ac_shift=:
17631 ;;
b61ff9c8 17632 -*)
ba479fd2
NN
17633 ac_option=$1
17634 ac_optarg=$2
17635 ac_shift=shift
17636 ;;
b61ff9c8
BS
17637 *) # This is not an option, so the user has probably given explicit
17638 # arguments.
17639 ac_option=$1
17640 ac_need_defaults=false;;
ba479fd2
NN
17641 esac
17642
17643 case $ac_option in
17644 # Handling of the options.
b61ff9c8
BS
17645_ACEOF
17646cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
17647 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17648 ac_cs_recheck=: ;;
b61ff9c8
BS
17649 --version | --vers* | -V )
17650 echo "$ac_cs_version"; exit 0 ;;
17651 --he | --h)
17652 # Conflict between --help and --header
17653 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17654Try \`$0 --help' for more information." >&5
17655echo "$as_me: error: ambiguous option: $1
17656Try \`$0 --help' for more information." >&2;}
17657 { (exit 1); exit 1; }; };;
17658 --help | --hel | -h )
17659 echo "$ac_cs_usage"; exit 0 ;;
17660 --debug | --d* | -d )
ba479fd2
NN
17661 debug=: ;;
17662 --file | --fil | --fi | --f )
17663 $ac_shift
17664 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
17665 ac_need_defaults=false;;
17666 --header | --heade | --head | --hea )
17667 $ac_shift
17668 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
17669 ac_need_defaults=false;;
17670 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17671 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17672 ac_cs_silent=: ;;
17673
17674 # This is an error.
b61ff9c8
BS
17675 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17676Try \`$0 --help' for more information." >&5
17677echo "$as_me: error: unrecognized option: $1
17678Try \`$0 --help' for more information." >&2;}
ba479fd2
NN
17679 { (exit 1); exit 1; }; } ;;
17680
b61ff9c8 17681 *) ac_config_targets="$ac_config_targets $1" ;;
ba479fd2
NN
17682
17683 esac
17684 shift
6e3f3080 17685done
ba479fd2
NN
17686
17687ac_configure_extra_args=
17688
17689if $ac_cs_silent; then
17690 exec 6>/dev/null
17691 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
17692fi
17693
ba479fd2
NN
17694_ACEOF
17695cat >>$CONFIG_STATUS <<_ACEOF
17696if \$ac_cs_recheck; then
b61ff9c8
BS
17697 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
17698 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
ba479fd2 17699fi
861bb6c1 17700
ba479fd2
NN
17701_ACEOF
17702
17703cat >>$CONFIG_STATUS <<_ACEOF
17704#
b61ff9c8 17705# INIT-COMMANDS section.
ba479fd2 17706#
b61ff9c8 17707
ba479fd2 17708subdirs='$subdirs'
ba479fd2
NN
17709
17710_ACEOF
17711
1a4b763e 17712
b61ff9c8
BS
17713
17714cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
17715for ac_config_target in $ac_config_targets
17716do
b61ff9c8
BS
17717 case "$ac_config_target" in
17718 # Handling of arguments.
17719 "as" ) CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
17720 "collect-ld" ) CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
17721 "nm" ) CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
17722 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
17723 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17724 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
ba479fd2
NN
17725 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17726echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17727 { (exit 1); exit 1; }; };;
861bb6c1 17728 esac
ba479fd2
NN
17729done
17730
17731# If the user did not use the arguments to specify the items to instantiate,
17732# then the envvar interface is used. Set only those that are not.
17733# We use the long form for the default assignment because of an extremely
17734# bizarre bug on SunOS 4.1.3.
17735if $ac_need_defaults; then
17736 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17737 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17738 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17739fi
17740
17741# Have a temporary directory for convenience. Make it in the build tree
b61ff9c8 17742# simply because there is no reason to put it here, and in addition,
ba479fd2 17743# creating and moving files from /tmp can sometimes cause problems.
b61ff9c8 17744# Create a temporary directory, and hook for its removal unless debugging.
ba479fd2
NN
17745$debug ||
17746{
b61ff9c8 17747 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
ba479fd2
NN
17748 trap '{ (exit 1); exit 1; }' 1 2 13 15
17749}
b61ff9c8 17750
ba479fd2 17751# Create a (secure) tmp directory for tmp files.
6e3f3080 17752
ba479fd2 17753{
b61ff9c8 17754 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
ba479fd2
NN
17755 test -n "$tmp" && test -d "$tmp"
17756} ||
17757{
b61ff9c8
BS
17758 tmp=./confstat$$-$RANDOM
17759 (umask 077 && mkdir $tmp)
ba479fd2
NN
17760} ||
17761{
17762 echo "$me: cannot create a temporary directory in ." >&2
17763 { (exit 1); exit 1; }
17764}
17765
b61ff9c8
BS
17766_ACEOF
17767
17768cat >>$CONFIG_STATUS <<_ACEOF
17769
ba479fd2 17770#
b61ff9c8 17771# CONFIG_FILES section.
ba479fd2
NN
17772#
17773
17774# No need to generate the scripts if there are no CONFIG_FILES.
17775# This happens for instance when ./config.status config.h
b61ff9c8
BS
17776if test -n "\$CONFIG_FILES"; then
17777 # Protect against being on the right side of a sed subst in config.status.
17778 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17779 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17780s,@SHELL@,$SHELL,;t t
17781s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17782s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17783s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17784s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17785s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17786s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17787s,@exec_prefix@,$exec_prefix,;t t
17788s,@prefix@,$prefix,;t t
17789s,@program_transform_name@,$program_transform_name,;t t
17790s,@bindir@,$bindir,;t t
17791s,@sbindir@,$sbindir,;t t
17792s,@libexecdir@,$libexecdir,;t t
17793s,@datadir@,$datadir,;t t
17794s,@sysconfdir@,$sysconfdir,;t t
17795s,@sharedstatedir@,$sharedstatedir,;t t
17796s,@localstatedir@,$localstatedir,;t t
17797s,@libdir@,$libdir,;t t
17798s,@includedir@,$includedir,;t t
17799s,@oldincludedir@,$oldincludedir,;t t
17800s,@infodir@,$infodir,;t t
17801s,@mandir@,$mandir,;t t
17802s,@build_alias@,$build_alias,;t t
17803s,@host_alias@,$host_alias,;t t
17804s,@target_alias@,$target_alias,;t t
17805s,@DEFS@,$DEFS,;t t
17806s,@ECHO_C@,$ECHO_C,;t t
17807s,@ECHO_N@,$ECHO_N,;t t
17808s,@ECHO_T@,$ECHO_T,;t t
17809s,@LIBS@,$LIBS,;t t
17810s,@build@,$build,;t t
17811s,@build_cpu@,$build_cpu,;t t
17812s,@build_vendor@,$build_vendor,;t t
17813s,@build_os@,$build_os,;t t
17814s,@host@,$host,;t t
17815s,@host_cpu@,$host_cpu,;t t
17816s,@host_vendor@,$host_vendor,;t t
17817s,@host_os@,$host_os,;t t
17818s,@target@,$target,;t t
17819s,@target_cpu@,$target_cpu,;t t
17820s,@target_vendor@,$target_vendor,;t t
17821s,@target_os@,$target_os,;t t
17822s,@target_noncanonical@,$target_noncanonical,;t t
17823s,@build_libsubdir@,$build_libsubdir,;t t
17824s,@build_subdir@,$build_subdir,;t t
17825s,@host_subdir@,$host_subdir,;t t
17826s,@target_subdir@,$target_subdir,;t t
17827s,@GENINSRC@,$GENINSRC,;t t
17828s,@CC@,$CC,;t t
17829s,@CFLAGS@,$CFLAGS,;t t
17830s,@LDFLAGS@,$LDFLAGS,;t t
17831s,@CPPFLAGS@,$CPPFLAGS,;t t
17832s,@ac_ct_CC@,$ac_ct_CC,;t t
17833s,@EXEEXT@,$EXEEXT,;t t
17834s,@OBJEXT@,$OBJEXT,;t t
17835s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
17836s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
17837s,@CPP@,$CPP,;t t
17838s,@EGREP@,$EGREP,;t t
17839s,@loose_warn@,$loose_warn,;t t
17840s,@cxx_compat_warn@,$cxx_compat_warn,;t t
17841s,@strict_warn@,$strict_warn,;t t
17842s,@warn_cflags@,$warn_cflags,;t t
17843s,@nocommon_flag@,$nocommon_flag,;t t
17844s,@TREEBROWSER@,$TREEBROWSER,;t t
17845s,@valgrind_path@,$valgrind_path,;t t
17846s,@valgrind_path_defines@,$valgrind_path_defines,;t t
17847s,@valgrind_command@,$valgrind_command,;t t
17848s,@coverage_flags@,$coverage_flags,;t t
17849s,@enable_multilib@,$enable_multilib,;t t
17850s,@enable_decimal_float@,$enable_decimal_float,;t t
17851s,@enable_fixed_point@,$enable_fixed_point,;t t
17852s,@enable_shared@,$enable_shared,;t t
17853s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
17854s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
17855s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
17856s,@onestep@,$onestep,;t t
17857s,@PKGVERSION@,$PKGVERSION,;t t
17858s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
17859s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
17860s,@datarootdir@,$datarootdir,;t t
17861s,@docdir@,$docdir,;t t
17862s,@htmldir@,$htmldir,;t t
17863s,@SET_MAKE@,$SET_MAKE,;t t
17864s,@AWK@,$AWK,;t t
17865s,@LN_S@,$LN_S,;t t
17866s,@LN@,$LN,;t t
17867s,@RANLIB@,$RANLIB,;t t
17868s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17869s,@ranlib_flags@,$ranlib_flags,;t t
17870s,@INSTALL@,$INSTALL,;t t
17871s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17872s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17873s,@make_compare_target@,$make_compare_target,;t t
17874s,@have_mktemp_command@,$have_mktemp_command,;t t
17875s,@MAKEINFO@,$MAKEINFO,;t t
17876s,@BUILD_INFO@,$BUILD_INFO,;t t
17877s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
17878s,@FLEX@,$FLEX,;t t
17879s,@BISON@,$BISON,;t t
17880s,@NM@,$NM,;t t
17881s,@AR@,$AR,;t t
17882s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
17883s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
17884s,@LDEXP_LIB@,$LDEXP_LIB,;t t
17885s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
17886s,@LIBICONV@,$LIBICONV,;t t
17887s,@LTLIBICONV@,$LTLIBICONV,;t t
17888s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
17889s,@manext@,$manext,;t t
17890s,@objext@,$objext,;t t
17891s,@gthread_flags@,$gthread_flags,;t t
17892s,@extra_modes_file@,$extra_modes_file,;t t
17893s,@extra_opt_files@,$extra_opt_files,;t t
17894s,@USE_NLS@,$USE_NLS,;t t
17895s,@LIBINTL@,$LIBINTL,;t t
17896s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
17897s,@INCINTL@,$INCINTL,;t t
17898s,@XGETTEXT@,$XGETTEXT,;t t
17899s,@GMSGFMT@,$GMSGFMT,;t t
17900s,@POSUB@,$POSUB,;t t
17901s,@CATALOGS@,$CATALOGS,;t t
17902s,@DATADIRNAME@,$DATADIRNAME,;t t
17903s,@INSTOBJEXT@,$INSTOBJEXT,;t t
17904s,@GENCAT@,$GENCAT,;t t
17905s,@CATOBJEXT@,$CATOBJEXT,;t t
17906s,@host_cc_for_libada@,$host_cc_for_libada,;t t
17907s,@CROSS@,$CROSS,;t t
17908s,@ALL@,$ALL,;t t
17909s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
17910s,@inhibit_libc@,$inhibit_libc,;t t
17911s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
17912s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17913s,@STMP_FIXINC@,$STMP_FIXINC,;t t
17914s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
17915s,@collect2@,$collect2,;t t
17916s,@gcc_cv_as@,$gcc_cv_as,;t t
17917s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
17918s,@gcc_cv_ld@,$gcc_cv_ld,;t t
17919s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
17920s,@gcc_cv_nm@,$gcc_cv_nm,;t t
17921s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
17922s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
17923s,@libgcc_visibility@,$libgcc_visibility,;t t
17924s,@GGC@,$GGC,;t t
17925s,@zlibdir@,$zlibdir,;t t
17926s,@zlibinc@,$zlibinc,;t t
17927s,@MAINT@,$MAINT,;t t
17928s,@gcc_tooldir@,$gcc_tooldir,;t t
17929s,@dollar@,$dollar,;t t
17930s,@slibdir@,$slibdir,;t t
17931s,@objdir@,$objdir,;t t
17932s,@subdirs@,$subdirs,;t t
17933s,@srcdir@,$srcdir,;t t
17934s,@all_compilers@,$all_compilers,;t t
17935s,@all_gtfiles@,$all_gtfiles,;t t
17936s,@all_lang_makefrags@,$all_lang_makefrags,;t t
17937s,@all_lang_makefiles@,$all_lang_makefiles,;t t
17938s,@all_languages@,$all_languages,;t t
17939s,@all_selected_languages@,$all_selected_languages,;t t
17940s,@build_exeext@,$build_exeext,;t t
17941s,@build_install_headers_dir@,$build_install_headers_dir,;t t
17942s,@build_xm_file_list@,$build_xm_file_list,;t t
17943s,@build_xm_include_list@,$build_xm_include_list,;t t
17944s,@build_xm_defines@,$build_xm_defines,;t t
17945s,@check_languages@,$check_languages,;t t
17946s,@cpp_install_dir@,$cpp_install_dir,;t t
17947s,@xmake_file@,$xmake_file,;t t
17948s,@tmake_file@,$tmake_file,;t t
17949s,@extra_gcc_objs@,$extra_gcc_objs,;t t
17950s,@extra_headers_list@,$extra_headers_list,;t t
17951s,@extra_objs@,$extra_objs,;t t
17952s,@extra_parts@,$extra_parts,;t t
17953s,@extra_passes@,$extra_passes,;t t
17954s,@extra_programs@,$extra_programs,;t t
17955s,@float_h_file@,$float_h_file,;t t
17956s,@gcc_config_arguments@,$gcc_config_arguments,;t t
17957s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
17958s,@host_exeext@,$host_exeext,;t t
17959s,@host_xm_file_list@,$host_xm_file_list,;t t
17960s,@host_xm_include_list@,$host_xm_include_list,;t t
17961s,@host_xm_defines@,$host_xm_defines,;t t
17962s,@out_host_hook_obj@,$out_host_hook_obj,;t t
17963s,@install@,$install,;t t
17964s,@lang_opt_files@,$lang_opt_files,;t t
17965s,@lang_specs_files@,$lang_specs_files,;t t
17966s,@lang_tree_files@,$lang_tree_files,;t t
17967s,@local_prefix@,$local_prefix,;t t
17968s,@md_file@,$md_file,;t t
17969s,@objc_boehm_gc@,$objc_boehm_gc,;t t
17970s,@out_file@,$out_file,;t t
17971s,@out_object_file@,$out_object_file,;t t
17972s,@thread_file@,$thread_file,;t t
17973s,@tm_file_list@,$tm_file_list,;t t
17974s,@tm_include_list@,$tm_include_list,;t t
17975s,@tm_defines@,$tm_defines,;t t
17976s,@tm_p_file_list@,$tm_p_file_list,;t t
17977s,@tm_p_include_list@,$tm_p_include_list,;t t
17978s,@xm_file_list@,$xm_file_list,;t t
17979s,@xm_include_list@,$xm_include_list,;t t
17980s,@xm_defines@,$xm_defines,;t t
17981s,@c_target_objs@,$c_target_objs,;t t
17982s,@cxx_target_objs@,$cxx_target_objs,;t t
17983s,@target_cpu_default@,$target_cpu_default,;t t
17984s,@GMPLIBS@,$GMPLIBS,;t t
17985s,@GMPINC@,$GMPINC,;t t
17986s,@LIBOBJS@,$LIBOBJS,;t t
17987s,@LTLIBOBJS@,$LTLIBOBJS,;t t
17988/@language_hooks@/r $language_hooks
17989s,@language_hooks@,,;t t
17990CEOF
17991
17992_ACEOF
17993
17994 cat >>$CONFIG_STATUS <<\_ACEOF
17995 # Split the substitutions into bite-sized pieces for seds with
17996 # small command number limits, like on Digital OSF/1 and HP-UX.
17997 ac_max_sed_lines=48
17998 ac_sed_frag=1 # Number of current file.
17999 ac_beg=1 # First line for current file.
18000 ac_end=$ac_max_sed_lines # Line after last line for current file.
18001 ac_more_lines=:
18002 ac_sed_cmds=
18003 while $ac_more_lines; do
18004 if test $ac_beg -gt 1; then
18005 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18006 else
18007 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18008 fi
18009 if test ! -s $tmp/subs.frag; then
18010 ac_more_lines=false
18011 else
18012 # The purpose of the label and of the branching condition is to
18013 # speed up the sed processing (if there are no `@' at all, there
18014 # is no need to browse any of the substitutions).
18015 # These are the two extra sed commands mentioned above.
18016 (echo ':t
18017 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18018 if test -z "$ac_sed_cmds"; then
18019 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18020 else
18021 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18022 fi
18023 ac_sed_frag=`expr $ac_sed_frag + 1`
18024 ac_beg=$ac_end
18025 ac_end=`expr $ac_end + $ac_max_sed_lines`
18026 fi
18027 done
18028 if test -z "$ac_sed_cmds"; then
18029 ac_sed_cmds=cat
1a4b763e 18030 fi
b61ff9c8 18031fi # test -n "$CONFIG_FILES"
1a4b763e 18032
1a4b763e 18033_ACEOF
ba479fd2 18034cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8
BS
18035for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18036 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18037 case $ac_file in
18038 - | *:- | *:-:* ) # input from stdin
18039 cat >$tmp/stdin
18040 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18041 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18042 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18043 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18044 * ) ac_file_in=$ac_file.in ;;
703d89ab
ZW
18045 esac
18046
b61ff9c8
BS
18047 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18048 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
ba479fd2 18049$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
18050 X"$ac_file" : 'X\(//\)[^/]' \| \
18051 X"$ac_file" : 'X\(//\)$' \| \
b61ff9c8
BS
18052 X"$ac_file" : 'X\(/\)' \| \
18053 . : '\(.\)' 2>/dev/null ||
ba479fd2 18054echo X"$ac_file" |
b61ff9c8
BS
18055 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18056 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18057 /^X\(\/\/\)$/{ s//\1/; q; }
18058 /^X\(\/\).*/{ s//\1/; q; }
18059 s/.*/./; q'`
18060 { if $as_mkdir_p; then
18061 mkdir -p "$ac_dir"
18062 else
18063 as_dir="$ac_dir"
ba479fd2 18064 as_dirs=
b61ff9c8
BS
18065 while test ! -d "$as_dir"; do
18066 as_dirs="$as_dir $as_dirs"
18067 as_dir=`(dirname "$as_dir") 2>/dev/null ||
ba479fd2 18068$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
18069 X"$as_dir" : 'X\(//\)[^/]' \| \
18070 X"$as_dir" : 'X\(//\)$' \| \
b61ff9c8
BS
18071 X"$as_dir" : 'X\(/\)' \| \
18072 . : '\(.\)' 2>/dev/null ||
ba479fd2 18073echo X"$as_dir" |
b61ff9c8
BS
18074 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18075 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18076 /^X\(\/\/\)$/{ s//\1/; q; }
18077 /^X\(\/\).*/{ s//\1/; q; }
18078 s/.*/./; q'`
ba479fd2 18079 done
b61ff9c8
BS
18080 test ! -n "$as_dirs" || mkdir $as_dirs
18081 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18082echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
ba479fd2 18083 { (exit 1); exit 1; }; }; }
b61ff9c8 18084
ba479fd2
NN
18085 ac_builddir=.
18086
b61ff9c8 18087if test "$ac_dir" != .; then
ba479fd2 18088 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b61ff9c8
BS
18089 # A "../" for each directory in $ac_dir_suffix.
18090 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18091else
18092 ac_dir_suffix= ac_top_builddir=
18093fi
ba479fd2
NN
18094
18095case $srcdir in
b61ff9c8 18096 .) # No --srcdir option. We are building in place.
ba479fd2 18097 ac_srcdir=.
b61ff9c8
BS
18098 if test -z "$ac_top_builddir"; then
18099 ac_top_srcdir=.
18100 else
18101 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18102 fi ;;
18103 [\\/]* | ?:[\\/]* ) # Absolute path.
ba479fd2 18104 ac_srcdir=$srcdir$ac_dir_suffix;
b61ff9c8
BS
18105 ac_top_srcdir=$srcdir ;;
18106 *) # Relative path.
18107 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18108 ac_top_srcdir=$ac_top_builddir$srcdir ;;
ba479fd2 18109esac
ba479fd2 18110
b61ff9c8
BS
18111# Do not use `cd foo && pwd` to compute absolute paths, because
18112# the directories may not exist.
18113case `pwd` in
18114.) ac_abs_builddir="$ac_dir";;
18115*)
18116 case "$ac_dir" in
18117 .) ac_abs_builddir=`pwd`;;
18118 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
18119 *) ac_abs_builddir=`pwd`/"$ac_dir";;
18120 esac;;
18121esac
18122case $ac_abs_builddir in
18123.) ac_abs_top_builddir=${ac_top_builddir}.;;
18124*)
18125 case ${ac_top_builddir}. in
18126 .) ac_abs_top_builddir=$ac_abs_builddir;;
18127 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
18128 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
18129 esac;;
18130esac
18131case $ac_abs_builddir in
18132.) ac_abs_srcdir=$ac_srcdir;;
18133*)
18134 case $ac_srcdir in
18135 .) ac_abs_srcdir=$ac_abs_builddir;;
18136 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
18137 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
18138 esac;;
18139esac
18140case $ac_abs_builddir in
18141.) ac_abs_top_srcdir=$ac_top_srcdir;;
18142*)
18143 case $ac_top_srcdir in
18144 .) ac_abs_top_srcdir=$ac_abs_builddir;;
18145 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
18146 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
18147 esac;;
18148esac
703d89ab 18149
ab22c1fa 18150
1a4b763e 18151
b61ff9c8
BS
18152 if test x"$ac_file" != x-; then
18153 { echo "$as_me:$LINENO: creating $ac_file" >&5
18154echo "$as_me: creating $ac_file" >&6;}
18155 rm -f "$ac_file"
18156 fi
18157 # Let's still pretend it is `configure' which instantiates (i.e., don't
18158 # use $as_me), people would be surprised to read:
18159 # /* config.h. Generated by config.status. */
18160 if test x"$ac_file" = x-; then
18161 configure_input=
18162 else
18163 configure_input="$ac_file. "
18164 fi
18165 configure_input=$configure_input"Generated from `echo $ac_file_in |
18166 sed 's,.*/,,'` by configure."
18167
18168 # First look for the input files in the build tree, otherwise in the
18169 # src tree.
18170 ac_file_inputs=`IFS=:
18171 for f in $ac_file_in; do
18172 case $f in
18173 -) echo $tmp/stdin ;;
18174 [\\/$]*)
18175 # Absolute (can't be DOS-style, as IFS=:)
18176 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18177echo "$as_me: error: cannot find input file: $f" >&2;}
18178 { (exit 1); exit 1; }; }
18179 echo "$f";;
18180 *) # Relative
18181 if test -f "$f"; then
18182 # Build tree
18183 echo "$f"
18184 elif test -f "$srcdir/$f"; then
18185 # Source tree
18186 echo "$srcdir/$f"
18187 else
18188 # /dev/null tree
18189 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18190echo "$as_me: error: cannot find input file: $f" >&2;}
18191 { (exit 1); exit 1; }; }
18192 fi;;
18193 esac
18194 done` || { (exit 1); exit 1; }
a6ccdbab 18195_ACEOF
ba479fd2
NN
18196cat >>$CONFIG_STATUS <<_ACEOF
18197 sed "$ac_vpsub
18198$extrasub
18199_ACEOF
18200cat >>$CONFIG_STATUS <<\_ACEOF
18201:t
18202/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b61ff9c8
BS
18203s,@configure_input@,$configure_input,;t t
18204s,@srcdir@,$ac_srcdir,;t t
18205s,@abs_srcdir@,$ac_abs_srcdir,;t t
18206s,@top_srcdir@,$ac_top_srcdir,;t t
18207s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18208s,@builddir@,$ac_builddir,;t t
18209s,@abs_builddir@,$ac_abs_builddir,;t t
18210s,@top_builddir@,$ac_top_builddir,;t t
18211s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18212" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18213 rm -f $tmp/stdin
18214 if test x"$ac_file" != x-; then
18215 mv $tmp/out $ac_file
18216 else
18217 cat $tmp/out
18218 rm -f $tmp/out
18219 fi
18220
18221 # Run the commands associated with the file.
be0fe523 18222 case $ac_file in
b61ff9c8
BS
18223 as ) chmod +x as ;;
18224 collect-ld ) chmod +x collect-ld ;;
18225 nm ) chmod +x nm ;;
be0fe523 18226 esac
b61ff9c8
BS
18227done
18228_ACEOF
18229cat >>$CONFIG_STATUS <<\_ACEOF
18230
18231#
18232# CONFIG_HEADER section.
18233#
18234
18235# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18236# NAME is the cpp macro being defined and VALUE is the value it is being given.
18237#
18238# ac_d sets the value in "#define NAME VALUE" lines.
18239ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18240ac_dB='[ ].*$,\1#\2'
a3bba767 18241ac_dC=' '
b61ff9c8
BS
18242ac_dD=',;t'
18243# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18244ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18245ac_uB='$,\1#\2define\3'
18246ac_uC=' '
18247ac_uD=',;t'
18248
18249for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18250 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18251 case $ac_file in
18252 - | *:- | *:-:* ) # input from stdin
18253 cat >$tmp/stdin
18254 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18255 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18256 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18257 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18258 * ) ac_file_in=$ac_file.in ;;
18259 esac
18260
18261 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18262echo "$as_me: creating $ac_file" >&6;}
18263
18264 # First look for the input files in the build tree, otherwise in the
18265 # src tree.
18266 ac_file_inputs=`IFS=:
18267 for f in $ac_file_in; do
18268 case $f in
18269 -) echo $tmp/stdin ;;
18270 [\\/$]*)
18271 # Absolute (can't be DOS-style, as IFS=:)
18272 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18273echo "$as_me: error: cannot find input file: $f" >&2;}
18274 { (exit 1); exit 1; }; }
18275 # Do quote $f, to prevent DOS paths from being IFS'd.
18276 echo "$f";;
18277 *) # Relative
18278 if test -f "$f"; then
18279 # Build tree
18280 echo "$f"
18281 elif test -f "$srcdir/$f"; then
18282 # Source tree
18283 echo "$srcdir/$f"
18284 else
18285 # /dev/null tree
18286 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18287echo "$as_me: error: cannot find input file: $f" >&2;}
18288 { (exit 1); exit 1; }; }
18289 fi;;
18290 esac
18291 done` || { (exit 1); exit 1; }
18292 # Remove the trailing spaces.
18293 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18294
18295_ACEOF
18296
18297# Transform confdefs.h into two sed scripts, `conftest.defines' and
18298# `conftest.undefs', that substitutes the proper values into
18299# config.h.in to produce config.h. The first handles `#define'
18300# templates, and the second `#undef' templates.
18301# And first: Protect against being on the right side of a sed subst in
18302# config.status. Protect against being in an unquoted here document
18303# in config.status.
18304rm -f conftest.defines conftest.undefs
18305# Using a here document instead of a string reduces the quoting nightmare.
18306# Putting comments in sed scripts is not portable.
18307#
18308# `end' is used to avoid that the second main sed command (meant for
18309# 0-ary CPP macros) applies to n-ary macro definitions.
18310# See the Autoconf documentation for `clear'.
18311cat >confdef2sed.sed <<\_ACEOF
18312s/[\\&,]/\\&/g
18313s,[\\$`],\\&,g
18314t clear
18315: clear
18316s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18317t end
18318s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18319: end
18320_ACEOF
18321# If some macros were called several times there might be several times
18322# the same #defines, which is useless. Nevertheless, we may not want to
18323# sort them, since we want the *last* AC-DEFINE to be honored.
18324uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18325sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18326rm -f confdef2sed.sed
18327
18328# This sed command replaces #undef with comments. This is necessary, for
861bb6c1
JL
18329# example, in the case of _POSIX_SOURCE, which is predefined and required
18330# on some systems where configure will not decide to define it.
b61ff9c8
BS
18331cat >>conftest.undefs <<\_ACEOF
18332s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18333_ACEOF
18334
18335# Break up conftest.defines because some shells have a limit on the size
18336# of here documents, and old seds have small limits too (100 cmds).
18337echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
18338echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
18339echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18340echo ' :' >>$CONFIG_STATUS
18341rm -f conftest.tail
18342while grep . conftest.defines >/dev/null
ba479fd2 18343do
b61ff9c8
BS
18344 # Write a limited-size here document to $tmp/defines.sed.
18345 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18346 # Speed up: don't consider the non `#define' lines.
18347 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18348 # Work around the forget-to-reset-the-flag bug.
18349 echo 't clr' >>$CONFIG_STATUS
18350 echo ': clr' >>$CONFIG_STATUS
18351 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
ba479fd2 18352 echo 'CEOF
b61ff9c8
BS
18353 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18354 rm -f $tmp/in
18355 mv $tmp/out $tmp/in
18356' >>$CONFIG_STATUS
18357 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
ba479fd2
NN
18358 rm -f conftest.defines
18359 mv conftest.tail conftest.defines
18360done
b61ff9c8
BS
18361rm -f conftest.defines
18362echo ' fi # grep' >>$CONFIG_STATUS
18363echo >>$CONFIG_STATUS
18364
18365# Break up conftest.undefs because some shells have a limit on the size
18366# of here documents, and old seds have small limits too (100 cmds).
18367echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18368rm -f conftest.tail
18369while grep . conftest.undefs >/dev/null
18370do
18371 # Write a limited-size here document to $tmp/undefs.sed.
18372 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18373 # Speed up: don't consider the non `#undef'
18374 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18375 # Work around the forget-to-reset-the-flag bug.
18376 echo 't clr' >>$CONFIG_STATUS
18377 echo ': clr' >>$CONFIG_STATUS
18378 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18379 echo 'CEOF
18380 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18381 rm -f $tmp/in
18382 mv $tmp/out $tmp/in
18383' >>$CONFIG_STATUS
18384 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18385 rm -f conftest.undefs
18386 mv conftest.tail conftest.undefs
18387done
18388rm -f conftest.undefs
ba479fd2
NN
18389
18390cat >>$CONFIG_STATUS <<\_ACEOF
b61ff9c8
BS
18391 # Let's still pretend it is `configure' which instantiates (i.e., don't
18392 # use $as_me), people would be surprised to read:
18393 # /* config.h. Generated by config.status. */
18394 if test x"$ac_file" = x-; then
18395 echo "/* Generated by configure. */" >$tmp/config.h
18396 else
18397 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
18398 fi
18399 cat $tmp/in >>$tmp/config.h
18400 rm -f $tmp/in
ba479fd2 18401 if test x"$ac_file" != x-; then
b61ff9c8 18402 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
ba479fd2
NN
18403 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18404echo "$as_me: $ac_file is unchanged" >&6;}
18405 else
b61ff9c8
BS
18406 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18407$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18408 X"$ac_file" : 'X\(//\)[^/]' \| \
18409 X"$ac_file" : 'X\(//\)$' \| \
18410 X"$ac_file" : 'X\(/\)' \| \
18411 . : '\(.\)' 2>/dev/null ||
18412echo X"$ac_file" |
18413 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18414 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18415 /^X\(\/\/\)$/{ s//\1/; q; }
18416 /^X\(\/\).*/{ s//\1/; q; }
18417 s/.*/./; q'`
18418 { if $as_mkdir_p; then
18419 mkdir -p "$ac_dir"
18420 else
18421 as_dir="$ac_dir"
18422 as_dirs=
18423 while test ! -d "$as_dir"; do
18424 as_dirs="$as_dir $as_dirs"
18425 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18426$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18427 X"$as_dir" : 'X\(//\)[^/]' \| \
18428 X"$as_dir" : 'X\(//\)$' \| \
18429 X"$as_dir" : 'X\(/\)' \| \
18430 . : '\(.\)' 2>/dev/null ||
18431echo X"$as_dir" |
18432 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18433 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18434 /^X\(\/\/\)$/{ s//\1/; q; }
18435 /^X\(\/\).*/{ s//\1/; q; }
18436 s/.*/./; q'`
18437 done
18438 test ! -n "$as_dirs" || mkdir $as_dirs
18439 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18440echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18441 { (exit 1); exit 1; }; }; }
18442
ba479fd2 18443 rm -f $ac_file
b61ff9c8 18444 mv $tmp/config.h $ac_file
ba479fd2
NN
18445 fi
18446 else
b61ff9c8
BS
18447 cat $tmp/config.h
18448 rm -f $tmp/config.h
ba479fd2 18449 fi
b61ff9c8
BS
18450done
18451_ACEOF
18452cat >>$CONFIG_STATUS <<\_ACEOF
2f41c1d6 18453
b61ff9c8
BS
18454#
18455# CONFIG_COMMANDS section.
18456#
18457for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18458 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18459 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18460 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
18461$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18462 X"$ac_dest" : 'X\(//\)[^/]' \| \
18463 X"$ac_dest" : 'X\(//\)$' \| \
18464 X"$ac_dest" : 'X\(/\)' \| \
18465 . : '\(.\)' 2>/dev/null ||
18466echo X"$ac_dest" |
18467 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18468 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18469 /^X\(\/\/\)$/{ s//\1/; q; }
18470 /^X\(\/\).*/{ s//\1/; q; }
18471 s/.*/./; q'`
18472 { if $as_mkdir_p; then
18473 mkdir -p "$ac_dir"
18474 else
18475 as_dir="$ac_dir"
18476 as_dirs=
18477 while test ! -d "$as_dir"; do
18478 as_dirs="$as_dir $as_dirs"
18479 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18480$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18481 X"$as_dir" : 'X\(//\)[^/]' \| \
18482 X"$as_dir" : 'X\(//\)$' \| \
18483 X"$as_dir" : 'X\(/\)' \| \
18484 . : '\(.\)' 2>/dev/null ||
18485echo X"$as_dir" |
18486 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18487 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18488 /^X\(\/\/\)$/{ s//\1/; q; }
18489 /^X\(\/\).*/{ s//\1/; q; }
18490 s/.*/./; q'`
18491 done
18492 test ! -n "$as_dirs" || mkdir $as_dirs
18493 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18494echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18495 { (exit 1); exit 1; }; }; }
2f41c1d6 18496
b61ff9c8 18497 ac_builddir=.
2f41c1d6 18498
b61ff9c8
BS
18499if test "$ac_dir" != .; then
18500 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18501 # A "../" for each directory in $ac_dir_suffix.
18502 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18503else
18504 ac_dir_suffix= ac_top_builddir=
18505fi
18506
18507case $srcdir in
18508 .) # No --srcdir option. We are building in place.
18509 ac_srcdir=.
18510 if test -z "$ac_top_builddir"; then
18511 ac_top_srcdir=.
18512 else
18513 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18514 fi ;;
18515 [\\/]* | ?:[\\/]* ) # Absolute path.
18516 ac_srcdir=$srcdir$ac_dir_suffix;
18517 ac_top_srcdir=$srcdir ;;
18518 *) # Relative path.
18519 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18520 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18521esac
18522
18523# Do not use `cd foo && pwd` to compute absolute paths, because
18524# the directories may not exist.
18525case `pwd` in
18526.) ac_abs_builddir="$ac_dir";;
18527*)
18528 case "$ac_dir" in
18529 .) ac_abs_builddir=`pwd`;;
18530 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
18531 *) ac_abs_builddir=`pwd`/"$ac_dir";;
18532 esac;;
18533esac
18534case $ac_abs_builddir in
18535.) ac_abs_top_builddir=${ac_top_builddir}.;;
18536*)
18537 case ${ac_top_builddir}. in
18538 .) ac_abs_top_builddir=$ac_abs_builddir;;
18539 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
18540 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
18541 esac;;
18542esac
18543case $ac_abs_builddir in
18544.) ac_abs_srcdir=$ac_srcdir;;
18545*)
18546 case $ac_srcdir in
18547 .) ac_abs_srcdir=$ac_abs_builddir;;
18548 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
18549 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
18550 esac;;
18551esac
18552case $ac_abs_builddir in
18553.) ac_abs_top_srcdir=$ac_top_srcdir;;
18554*)
18555 case $ac_top_srcdir in
18556 .) ac_abs_top_srcdir=$ac_abs_builddir;;
18557 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
18558 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
18559 esac;;
18560esac
18561
18562
18563 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
18564echo "$as_me: executing $ac_dest commands" >&6;}
18565 case $ac_dest in
18566 default )
f1faaabd
NN
18567case ${CONFIG_HEADERS} in
18568 *auto-host.h:config.in*)
18569 echo > cstamp-h ;;
861bb6c1 18570esac
2ed26f6b 18571# Make sure all the subdirs exist.
3b620440 18572for d in $subdirs doc build
2ed26f6b 18573do
2ed26f6b 18574 test -d $d || mkdir $d
2ed26f6b 18575done
ba479fd2
NN
18576 ;;
18577 esac
b61ff9c8
BS
18578done
18579_ACEOF
cafe096b 18580
b61ff9c8 18581cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
18582
18583{ (exit 0); exit 0; }
18584_ACEOF
861bb6c1 18585chmod +x $CONFIG_STATUS
ba479fd2
NN
18586ac_clean_files=$ac_clean_files_save
18587
18588
18589# configure is writing to config.log, and then calls config.status.
18590# config.status does its own redirection, appending to config.log.
18591# Unfortunately, on DOS this fails, as config.log is still kept open
18592# by configure, so config.status won't be able to write to it; its
18593# output is simply discarded. So we exec the FD to /dev/null,
18594# effectively closing config.log, so it can be properly (re)opened and
18595# appended to by config.status. When coming back to configure, we
18596# need to make the FD available again.
18597if test "$no_create" != yes; then
18598 ac_cs_success=:
18599 ac_config_status_args=
18600 test "$silent" = yes &&
18601 ac_config_status_args="$ac_config_status_args --quiet"
18602 exec 5>/dev/null
18603 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18604 exec 5>>config.log
18605 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18606 # would make configure fail if this is the last instruction.
18607 $ac_cs_success || { (exit 1); exit 1; }
18608fi
861bb6c1 18609