]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
cstdint: New.
[thirdparty/gcc.git] / gcc / configure
CommitLineData
005537df 1#! /bin/sh
861bb6c1 2# Guess values for system-dependent variables and create Makefiles.
8ab705be 3# Generated by GNU Autoconf 2.59.
861bb6c1 4#
86da66b5 5# Copyright (C) 2003 Free Software Foundation, Inc.
861bb6c1
JL
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
ba479fd2
NN
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
11
12# Be Bourne compatible
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
21fi
86da66b5 22DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
23
24# Support unset when possible.
86da66b5 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
43do
86da66b5 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
48 fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54else
55 as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
66as_me=`$as_basename "$0" ||
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
76
77
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
96 rm -f conf$$.sh
97fi
98
99
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
116
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
137 /*)
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
166 N
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
210 fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
861bb6c1 217
ba479fd2
NN
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
86da66b5 221 test -d ./-p && rmdir ./-p
ba479fd2
NN
222 as_mkdir_p=false
223fi
224
225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
86da66b5 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
229
230# Sed expression to map a string onto a valid variable name.
86da66b5 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
241$as_unset CDPATH
242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
861bb6c1 254ac_default_prefix=/usr/local
ba479fd2
NN
255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
274ac_unique_file="tree.c"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
e8b05380 312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS 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_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
ba479fd2 313ac_subst_files='language_hooks'
861bb6c1
JL
314
315# Initialize some variables set by options.
ba479fd2
NN
316ac_init_help=
317ac_init_version=false
861bb6c1
JL
318# The variables have the same names as the options, with
319# dashes changed to underlines.
ba479fd2 320cache_file=/dev/null
861bb6c1 321exec_prefix=NONE
861bb6c1 322no_create=
861bb6c1
JL
323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
861bb6c1
JL
331verbose=
332x_includes=NONE
333x_libraries=NONE
ba479fd2
NN
334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
861bb6c1
JL
340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
861bb6c1
JL
353ac_prev=
354for ac_option
355do
861bb6c1
JL
356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
361 fi
362
ba479fd2 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
861bb6c1
JL
364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
ba479fd2 367 case $ac_option in
861bb6c1
JL
368
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 372 bindir=$ac_optarg ;;
861bb6c1
JL
373
374 -build | --build | --buil | --bui | --bu)
ba479fd2 375 ac_prev=build_alias ;;
861bb6c1 376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 377 build_alias=$ac_optarg ;;
861bb6c1
JL
378
379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
861bb6c1
JL
388
389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
ba479fd2 393 datadir=$ac_optarg ;;
861bb6c1
JL
394
395 -disable-* | --disable-*)
ba479fd2 396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 397 # Reject names that are not valid shell variable names.
ba479fd2
NN
398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
861bb6c1
JL
403
404 -enable-* | --enable-*)
ba479fd2 405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 406 # Reject names that are not valid shell variable names.
ba479fd2
NN
407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
413 *) ac_optarg=yes ;;
414 esac
ba479fd2 415 eval "enable_$ac_feature='$ac_optarg'" ;;
861bb6c1
JL
416
417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
ba479fd2 424 exec_prefix=$ac_optarg ;;
861bb6c1
JL
425
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
429
ba479fd2
NN
430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
861bb6c1
JL
436
437 -host | --host | --hos | --ho)
ba479fd2 438 ac_prev=host_alias ;;
861bb6c1 439 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 440 host_alias=$ac_optarg ;;
861bb6c1
JL
441
442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 447 includedir=$ac_optarg ;;
861bb6c1
JL
448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 452 infodir=$ac_optarg ;;
861bb6c1
JL
453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 457 libdir=$ac_optarg ;;
861bb6c1
JL
458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
ba479fd2 464 libexecdir=$ac_optarg ;;
861bb6c1
JL
465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
ba479fd2 473 localstatedir=$ac_optarg ;;
861bb6c1
JL
474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 478 mandir=$ac_optarg ;;
861bb6c1
JL
479
480 -nfp | --nfp | --nf)
481 # Obsolete; use --without-fp.
482 with_fp=no ;;
483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 485 | --no-cr | --no-c | -n)
861bb6c1
JL
486 no_create=yes ;;
487
488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
491
492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 499 oldincludedir=$ac_optarg ;;
861bb6c1
JL
500
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 504 prefix=$ac_optarg ;;
861bb6c1
JL
505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 511 program_prefix=$ac_optarg ;;
861bb6c1
JL
512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 518 program_suffix=$ac_optarg ;;
861bb6c1
JL
519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 535 program_transform_name=$ac_optarg ;;
861bb6c1
JL
536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
ba479fd2 545 sbindir=$ac_optarg ;;
861bb6c1
JL
546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
ba479fd2 556 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
557
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
ba479fd2 561 site=$ac_optarg ;;
861bb6c1
JL
562
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 566 srcdir=$ac_optarg ;;
861bb6c1
JL
567
568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 573 sysconfdir=$ac_optarg ;;
861bb6c1
JL
574
575 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 576 ac_prev=target_alias ;;
861bb6c1 577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 578 target_alias=$ac_optarg ;;
861bb6c1
JL
579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
ba479fd2
NN
583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
861bb6c1
JL
585
586 -with-* | --with-*)
ba479fd2 587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 588 # Reject names that are not valid shell variable names.
ba479fd2
NN
589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
861bb6c1 592 ac_package=`echo $ac_package| sed 's/-/_/g'`
ba479fd2
NN
593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
595 *) ac_optarg=yes ;;
596 esac
ba479fd2 597 eval "with_$ac_package='$ac_optarg'" ;;
861bb6c1
JL
598
599 -without-* | --without-*)
ba479fd2 600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 601 # Reject names that are not valid shell variable names.
ba479fd2
NN
602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
861bb6c1
JL
607
608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 617 x_includes=$ac_optarg ;;
861bb6c1
JL
618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 624 x_libraries=$ac_optarg ;;
861bb6c1 625
ba479fd2
NN
626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
861bb6c1
JL
629 ;;
630
ba479fd2
NN
631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
861bb6c1 641 *)
ba479fd2
NN
642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
647 ;;
648
649 esac
650done
651
652if test -n "$ac_prev"; then
ba479fd2
NN
653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
63cf211a 656fi
63cf211a 657
ba479fd2
NN
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
666 esac
667done
093e61a6 668
ba479fd2
NN
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
86da66b5 671 localstatedir libdir includedir oldincludedir infodir mandir
861bb6c1 672do
ba479fd2
NN
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
861bb6c1
JL
678 esac
679done
680
ba479fd2
NN
681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
687
688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
6e3f3080 698
ba479fd2
NN
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
861bb6c1 703
861bb6c1
JL
704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707 ac_srcdir_defaulted=yes
708 # Try the directory containing this script, then its parent.
ba479fd2
NN
709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
861bb6c1
JL
721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
ba479fd2
NN
730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
63cf211a 732 else
ba479fd2
NN
733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
63cf211a
NN
735 fi
736fi
ba479fd2
NN
737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
6de9cd9a
DN
773ac_env_GMPLIBS_set=${GMPLIBS+set}
774ac_env_GMPLIBS_value=$GMPLIBS
775ac_cv_env_GMPLIBS_set=${GMPLIBS+set}
776ac_cv_env_GMPLIBS_value=$GMPLIBS
777ac_env_GMPINC_set=${GMPINC+set}
778ac_env_GMPINC_value=$GMPINC
779ac_cv_env_GMPINC_set=${GMPINC+set}
780ac_cv_env_GMPINC_value=$GMPINC
63cf211a 781
ba479fd2
NN
782#
783# Report the --help message.
784#
785if test "$ac_init_help" = "long"; then
786 # Omit some internal or obsolete options to make the list less imposing.
787 # This message is too long to be a string in the A/UX 3.1 sh.
788 cat <<_ACEOF
789\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 790
ba479fd2 791Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 792
ba479fd2
NN
793To assign environment variables (e.g., CC, CFLAGS...), specify them as
794VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 795
ba479fd2 796Defaults for the options are specified in brackets.
861bb6c1 797
ba479fd2
NN
798Configuration:
799 -h, --help display this help and exit
800 --help=short display options specific to this package
801 --help=recursive display the short help of all the included packages
802 -V, --version display version information and exit
803 -q, --quiet, --silent do not print \`checking...' messages
804 --cache-file=FILE cache test results in FILE [disabled]
805 -C, --config-cache alias for \`--cache-file=config.cache'
806 -n, --no-create do not create output files
807 --srcdir=DIR find the sources in DIR [configure dir or \`..']
808
809_ACEOF
810
811 cat <<_ACEOF
812Installation directories:
813 --prefix=PREFIX install architecture-independent files in PREFIX
86da66b5 814 [$ac_default_prefix]
ba479fd2 815 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
86da66b5 816 [PREFIX]
861bb6c1 817
ba479fd2
NN
818By default, \`make install' will install all the files in
819\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
820an installation prefix other than \`$ac_default_prefix' using \`--prefix',
821for instance \`--prefix=\$HOME'.
13c22933 822
ba479fd2 823For better control, use the options below.
13c22933 824
ba479fd2
NN
825Fine tuning of the installation directories:
826 --bindir=DIR user executables [EPREFIX/bin]
827 --sbindir=DIR system admin executables [EPREFIX/sbin]
828 --libexecdir=DIR program executables [EPREFIX/libexec]
829 --datadir=DIR read-only architecture-independent data [PREFIX/share]
830 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
831 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
832 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
833 --libdir=DIR object code libraries [EPREFIX/lib]
834 --includedir=DIR C header files [PREFIX/include]
835 --oldincludedir=DIR C header files for non-gcc [/usr/include]
836 --infodir=DIR info documentation [PREFIX/info]
837 --mandir=DIR man documentation [PREFIX/man]
838_ACEOF
13c22933 839
ba479fd2 840 cat <<\_ACEOF
13c22933 841
ba479fd2
NN
842Program names:
843 --program-prefix=PREFIX prepend PREFIX to installed program names
844 --program-suffix=SUFFIX append SUFFIX to installed program names
845 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 846
ba479fd2
NN
847System types:
848 --build=BUILD configure for building on BUILD [guessed]
849 --host=HOST cross-compile to build programs to run on HOST [BUILD]
850 --target=TARGET configure for building compilers for TARGET [HOST]
851_ACEOF
13c22933
JJ
852fi
853
ba479fd2 854if test -n "$ac_init_help"; then
13c22933 855
ba479fd2 856 cat <<\_ACEOF
13c22933 857
ba479fd2
NN
858Optional Features:
859 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
860 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
861 --enable-generated-files-in-srcdir
862 put copies of generated files in source dir
863 intended for creating source tarballs for users
864 without texinfo bison or flex.
09a9c095 865 --enable-werror-always enable -Werror always
ba479fd2
NN
866 --enable-werror enable -Werror in bootstrap stage2 and later
867 --enable-checking=LIST
868 enable expensive run-time checks. With LIST,
869 enable only specific categories of checks.
cdce5c16
NS
870 Categories are: yes,no,all,none,release.
871 Flags are: assert,fold,gc,gcac,misc,
872 rtlflag,rtl,runtime,tree,valgrind.
74ee1642 873 --enable-mapped-location location_t is fileline integer cookie
ba479fd2 874 --enable-coverage=LEVEL
fb38008e 875 enable compiler's code coverage collection.
ba479fd2
NN
876 Use to measure compiler performance and locate
877 unused parts of the compiler. With LEVEL, specify
878 optimization. Values are opt, noopt,
879 default is noopt
880 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
881 --enable-multilib enable library support for multiple ABIs
882 --enable-__cxa_atexit enable __cxa_atexit for C++
486aa804 883 --enable-decimal-float enable decimal float extension to C
ba479fd2
NN
884 --enable-threads enable thread usage for target GCC
885 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
886 --enable-tls enable or disable generation of tls code
887 overriding the assembler check for tls support
ba479fd2
NN
888 --enable-objc-gc enable the use of Boehm's garbage collector with
889 the GNU Objective-C runtime
890 --disable-shared don't provide a shared libgcc
891 --enable-intermodule build the compiler in one step
f3c9f174 892 --enable-languages=LIST specify which front-ends to build
dfb77e37 893 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
894 --enable-initfini-array use .init_array/.fini_array sections
895 --enable-sjlj-exceptions
896 arrange to use setjmp/longjmp exception handling
7f970b70 897 --enable-secureplt enable -msecure-plt by default for PowerPC
ba479fd2
NN
898 --disable-win32-registry
899 disable lookup of installation paths in the
900 Registry on Windows hosts
901 --enable-win32-registry enable registry lookup (default)
902 --enable-win32-registry=KEY
903 use KEY instead of GCC version as the last portion
904 of the registry key
905 --enable-maintainer-mode
906 enable make rules and dependencies not useful
907 (and sometimes confusing) to the casual installer
908 --enable-version-specific-runtime-libs
909 specify that runtime libraries should be
910 installed in a compiler-specific directory
093e61a6 911
ba479fd2
NN
912Optional Packages:
913 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
914 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
915 --with-local-prefix=DIR specifies directory to put local include
916 --with-gxx-include-dir=DIR
917 specifies directory to put g++ header files
918 --with-cpp-install-dir=DIR
919 install the user visible C preprocessor in DIR
920 (relative to PREFIX) as well as PREFIX/bin
921 --with-gnu-ld arrange to work with GNU ld.
922 --with-ld arrange to use the specified ld (full pathname)
d594623a 923 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
924 --with-gnu-as arrange to work with GNU as
925 --with-as arrange to use the specified as (full pathname)
926 --with-stabs arrange to use stabs instead of host debug format
927 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
928 --with-build-sysroot=sysroot
929 use sysroot as the system root during the build
ba479fd2 930 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
dfb77e37
KC
931 --with-gnu-ld assume the C compiler uses GNU ld default=no
932 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
933 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 934 --with-system-libunwind use installed libunwind
59415997 935 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
936 with the compiler
937 --with-system-zlib use installed libz
938 --with-slibdir=DIR shared libraries in DIR LIBDIR
13c22933 939
ba479fd2
NN
940Some influential environment variables:
941 CC C compiler command
942 CFLAGS C compiler flags
943 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
944 nonstandard directory <lib dir>
945 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
946 headers in a nonstandard directory <include dir>
947 CPP C preprocessor
6de9cd9a
DN
948 GMPLIBS How to link GMP
949 GMPINC How to find GMP include files
13c22933 950
ba479fd2
NN
951Use these variables to override the choices made by `configure' or to help
952it to find libraries and programs with nonstandard names/locations.
73458fb7 953
ba479fd2
NN
954_ACEOF
955fi
6e3f3080 956
ba479fd2
NN
957if test "$ac_init_help" = "recursive"; then
958 # If there are subdirs, report their specific --help.
959 ac_popdir=`pwd`
960 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
961 test -d $ac_dir || continue
962 ac_builddir=.
963
964if test "$ac_dir" != .; then
965 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
966 # A "../" for each directory in $ac_dir_suffix.
967 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
968else
969 ac_dir_suffix= ac_top_builddir=
970fi
971
972case $srcdir in
973 .) # No --srcdir option. We are building in place.
974 ac_srcdir=.
975 if test -z "$ac_top_builddir"; then
976 ac_top_srcdir=.
977 else
978 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
979 fi ;;
980 [\\/]* | ?:[\\/]* ) # Absolute path.
981 ac_srcdir=$srcdir$ac_dir_suffix;
982 ac_top_srcdir=$srcdir ;;
983 *) # Relative path.
984 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
985 ac_top_srcdir=$ac_top_builddir$srcdir ;;
986esac
8ab705be
KC
987
988# Do not use `cd foo && pwd` to compute absolute paths, because
989# the directories may not exist.
990case `pwd` in
991.) ac_abs_builddir="$ac_dir";;
86da66b5 992*)
8ab705be
KC
993 case "$ac_dir" in
994 .) ac_abs_builddir=`pwd`;;
995 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
996 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
997 esac;;
998esac
8ab705be 999case $ac_abs_builddir in
86da66b5
HPN
1000.) ac_abs_top_builddir=${ac_top_builddir}.;;
1001*)
1002 case ${ac_top_builddir}. in
8ab705be 1003 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 1004 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 1005 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
1006 esac;;
1007esac
8ab705be 1008case $ac_abs_builddir in
86da66b5
HPN
1009.) ac_abs_srcdir=$ac_srcdir;;
1010*)
1011 case $ac_srcdir in
8ab705be 1012 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 1013 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 1014 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
1015 esac;;
1016esac
8ab705be 1017case $ac_abs_builddir in
86da66b5
HPN
1018.) ac_abs_top_srcdir=$ac_top_srcdir;;
1019*)
1020 case $ac_top_srcdir in
8ab705be 1021 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 1022 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 1023 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
1024 esac;;
1025esac
ba479fd2
NN
1026
1027 cd $ac_dir
1028 # Check for guested configure; otherwise get Cygnus style configure.
1029 if test -f $ac_srcdir/configure.gnu; then
1030 echo
1031 $SHELL $ac_srcdir/configure.gnu --help=recursive
1032 elif test -f $ac_srcdir/configure; then
1033 echo
1034 $SHELL $ac_srcdir/configure --help=recursive
1035 elif test -f $ac_srcdir/configure.ac ||
86da66b5 1036 test -f $ac_srcdir/configure.in; then
ba479fd2
NN
1037 echo
1038 $ac_configure --help
1039 else
1040 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1041 fi
e8b05380 1042 cd "$ac_popdir"
ba479fd2
NN
1043 done
1044fi
1045
1046test -n "$ac_init_help" && exit 0
1047if $ac_init_version; then
1048 cat <<\_ACEOF
1049
86da66b5 1050Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1051This configure script is free software; the Free Software Foundation
1052gives unlimited permission to copy, distribute and modify it.
1053_ACEOF
1054 exit 0
1055fi
1056exec 5>config.log
1057cat >&5 <<_ACEOF
1058This file contains any messages produced by compilers while
1059running configure, to aid debugging if configure makes a mistake.
1060
1061It was created by $as_me, which was
8ab705be 1062generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1063
1064 $ $0 $@
1065
1066_ACEOF
1067{
1068cat <<_ASUNAME
1069## --------- ##
1070## Platform. ##
1071## --------- ##
1072
1073hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1074uname -m = `(uname -m) 2>/dev/null || echo unknown`
1075uname -r = `(uname -r) 2>/dev/null || echo unknown`
1076uname -s = `(uname -s) 2>/dev/null || echo unknown`
1077uname -v = `(uname -v) 2>/dev/null || echo unknown`
1078
1079/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1080/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1081
1082/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1083/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1084/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1085hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1086/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1087/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1088/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1089
1090_ASUNAME
1091
1092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1093for as_dir in $PATH
1094do
1095 IFS=$as_save_IFS
1096 test -z "$as_dir" && as_dir=.
1097 echo "PATH: $as_dir"
1098done
1099
1100} >&5
1101
1102cat >&5 <<_ACEOF
1103
1104
1105## ----------- ##
1106## Core tests. ##
1107## ----------- ##
1108
1109_ACEOF
1110
1111
1112# Keep a trace of the command line.
1113# Strip out --no-create and --no-recursion so they do not pile up.
1114# Strip out --silent because we don't want to record it for future runs.
1115# Also quote any args containing shell meta-characters.
1116# Make two passes to allow for proper duplicate-argument suppression.
1117ac_configure_args=
1118ac_configure_args0=
1119ac_configure_args1=
1120ac_sep=
1121ac_must_keep_next=false
1122for ac_pass in 1 2
1123do
1124 for ac_arg
1125 do
1126 case $ac_arg in
1127 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1128 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1129 | -silent | --silent | --silen | --sile | --sil)
1130 continue ;;
1131 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1132 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1133 esac
1134 case $ac_pass in
1135 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1136 2)
1137 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1138 if test $ac_must_keep_next = true; then
86da66b5 1139 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1140 else
86da66b5
HPN
1141 case $ac_arg in
1142 *=* | --config-cache | -C | -disable-* | --disable-* \
1143 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1144 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1145 | -with-* | --with-* | -without-* | --without-* | --x)
1146 case "$ac_configure_args0 " in
1147 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1148 esac
1149 ;;
1150 -* ) ac_must_keep_next=true ;;
1151 esac
ba479fd2
NN
1152 fi
1153 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1154 # Get rid of the leading space.
1155 ac_sep=" "
1156 ;;
1157 esac
1158 done
1159done
1160$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1161$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1162
1163# When interrupted or exit'd, cleanup temporary files, and complete
1164# config.log. We remove comments because anyway the quotes in there
1165# would cause problems or look ugly.
1166# WARNING: Be sure not to use single quotes in there, as some shells,
1167# such as our DU 5.0 friend, will then `close' the trap.
1168trap 'exit_status=$?
1169 # Save into config.log some information that might help in debugging.
1170 {
1171 echo
1172
1173 cat <<\_ASBOX
1174## ---------------- ##
1175## Cache variables. ##
1176## ---------------- ##
1177_ASBOX
1178 echo
1179 # The following way of writing the cache mishandles newlines in values,
1180{
1181 (set) 2>&1 |
1182 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1183 *ac_space=\ *)
1184 sed -n \
86da66b5
HPN
1185 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1186 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
ba479fd2
NN
1187 ;;
1188 *)
1189 sed -n \
86da66b5 1190 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
1191 ;;
1192 esac;
1193}
1194 echo
1195
1196 cat <<\_ASBOX
1197## ----------------- ##
1198## Output variables. ##
1199## ----------------- ##
1200_ASBOX
1201 echo
1202 for ac_var in $ac_subst_vars
1203 do
1204 eval ac_val=$`echo $ac_var`
1205 echo "$ac_var='"'"'$ac_val'"'"'"
1206 done | sort
1207 echo
1208
1209 if test -n "$ac_subst_files"; then
1210 cat <<\_ASBOX
1211## ------------- ##
1212## Output files. ##
1213## ------------- ##
1214_ASBOX
1215 echo
1216 for ac_var in $ac_subst_files
1217 do
1218 eval ac_val=$`echo $ac_var`
86da66b5 1219 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1220 done | sort
1221 echo
1222 fi
1223
1224 if test -s confdefs.h; then
1225 cat <<\_ASBOX
1226## ----------- ##
1227## confdefs.h. ##
1228## ----------- ##
1229_ASBOX
1230 echo
1231 sed "/^$/d" confdefs.h | sort
1232 echo
1233 fi
1234 test "$ac_signal" != 0 &&
1235 echo "$as_me: caught signal $ac_signal"
1236 echo "$as_me: exit $exit_status"
1237 } >&5
86da66b5 1238 rm -f core *.core &&
ba479fd2
NN
1239 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1240 exit $exit_status
1241 ' 0
1242for ac_signal in 1 2 13 15; do
1243 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1244done
1245ac_signal=0
1246
1247# confdefs.h avoids OS command line length limits that DEFS can exceed.
1248rm -rf conftest* confdefs.h
1249# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1250echo >confdefs.h
1251
1252# Predefined preprocessor variables.
1253
1254cat >>confdefs.h <<_ACEOF
1255#define PACKAGE_NAME "$PACKAGE_NAME"
1256_ACEOF
1257
1258
1259cat >>confdefs.h <<_ACEOF
1260#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1261_ACEOF
1262
1263
1264cat >>confdefs.h <<_ACEOF
1265#define PACKAGE_VERSION "$PACKAGE_VERSION"
1266_ACEOF
1267
1268
1269cat >>confdefs.h <<_ACEOF
1270#define PACKAGE_STRING "$PACKAGE_STRING"
1271_ACEOF
1272
1273
1274cat >>confdefs.h <<_ACEOF
1275#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1276_ACEOF
1277
1278
1279# Let the site file select an alternate cache file if it wants to.
1280# Prefer explicitly selected file to automatically selected ones.
1281if test -z "$CONFIG_SITE"; then
1282 if test "x$prefix" != xNONE; then
1283 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1284 else
1285 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1286 fi
1287fi
1288for ac_site_file in $CONFIG_SITE; do
1289 if test -r "$ac_site_file"; then
1290 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1291echo "$as_me: loading site script $ac_site_file" >&6;}
1292 sed 's/^/| /' "$ac_site_file" >&5
1293 . "$ac_site_file"
1294 fi
1295done
1296
1297if test -r "$cache_file"; then
1298 # Some versions of bash will fail to source /dev/null (special
1299 # files actually), so we avoid doing that.
1300 if test -f "$cache_file"; then
1301 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1302echo "$as_me: loading cache $cache_file" >&6;}
1303 case $cache_file in
1304 [\\/]* | ?:[\\/]* ) . $cache_file;;
1305 *) . ./$cache_file;;
1306 esac
1307 fi
1308else
1309 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1310echo "$as_me: creating cache $cache_file" >&6;}
1311 >$cache_file
1312fi
1313
1314# Check that the precious variables saved in the cache have kept the same
1315# value.
1316ac_cache_corrupted=false
1317for ac_var in `(set) 2>&1 |
86da66b5 1318 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1319 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1320 eval ac_new_set=\$ac_env_${ac_var}_set
1321 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1322 eval ac_new_val="\$ac_env_${ac_var}_value"
1323 case $ac_old_set,$ac_new_set in
1324 set,)
1325 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1326echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1327 ac_cache_corrupted=: ;;
1328 ,set)
1329 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1330echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1331 ac_cache_corrupted=: ;;
1332 ,);;
1333 *)
1334 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1335 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1336echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1337 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1338echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1339 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1340echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1341 ac_cache_corrupted=:
ba479fd2
NN
1342 fi;;
1343 esac
1344 # Pass precious variables to config.status.
1345 if test "$ac_new_set" = set; then
1346 case $ac_new_val in
1347 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1348 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1349 *) ac_arg=$ac_var=$ac_new_val ;;
1350 esac
1351 case " $ac_configure_args " in
1352 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1353 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1354 esac
1355 fi
1356done
1357if $ac_cache_corrupted; then
1358 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1359echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1360 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1361echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1362 { (exit 1); exit 1; }; }
1363fi
1364
1365ac_ext=c
1366ac_cpp='$CPP $CPPFLAGS'
1367ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1368ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1369ac_compiler_gnu=$ac_cv_c_compiler_gnu
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
914c5af7 1389
ba479fd2
NN
1390 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1391
1392
9f18db39
PB
1393gcc_version=`cat $srcdir/BASE-VER`
1394
ba479fd2
NN
1395# Determine the host, build, and target systems
1396ac_aux_dir=
1397for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1398 if test -f $ac_dir/install-sh; then
1399 ac_aux_dir=$ac_dir
1400 ac_install_sh="$ac_aux_dir/install-sh -c"
1401 break
1402 elif test -f $ac_dir/install.sh; then
1403 ac_aux_dir=$ac_dir
1404 ac_install_sh="$ac_aux_dir/install.sh -c"
1405 break
1406 elif test -f $ac_dir/shtool; then
1407 ac_aux_dir=$ac_dir
1408 ac_install_sh="$ac_aux_dir/shtool install -c"
1409 break
1410 fi
1411done
1412if test -z "$ac_aux_dir"; then
1413 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1414echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1415 { (exit 1); exit 1; }; }
1416fi
1417ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1418ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1419ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1420
1421# Make sure we can run config.sub.
1422$ac_config_sub sun4 >/dev/null 2>&1 ||
1423 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1424echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1425 { (exit 1); exit 1; }; }
1426
1427echo "$as_me:$LINENO: checking build system type" >&5
1428echo $ECHO_N "checking build system type... $ECHO_C" >&6
1429if test "${ac_cv_build+set}" = set; then
1430 echo $ECHO_N "(cached) $ECHO_C" >&6
1431else
1432 ac_cv_build_alias=$build_alias
1433test -z "$ac_cv_build_alias" &&
1434 ac_cv_build_alias=`$ac_config_guess`
1435test -z "$ac_cv_build_alias" &&
1436 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1437echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1438 { (exit 1); exit 1; }; }
1439ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1440 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1441echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1442 { (exit 1); exit 1; }; }
1443
1444fi
1445echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1446echo "${ECHO_T}$ac_cv_build" >&6
1447build=$ac_cv_build
1448build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1449build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1450build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1451
1452
1453echo "$as_me:$LINENO: checking host system type" >&5
1454echo $ECHO_N "checking host system type... $ECHO_C" >&6
1455if test "${ac_cv_host+set}" = set; then
1456 echo $ECHO_N "(cached) $ECHO_C" >&6
1457else
1458 ac_cv_host_alias=$host_alias
1459test -z "$ac_cv_host_alias" &&
1460 ac_cv_host_alias=$ac_cv_build_alias
1461ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1462 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1463echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1464 { (exit 1); exit 1; }; }
1465
1466fi
1467echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1468echo "${ECHO_T}$ac_cv_host" >&6
1469host=$ac_cv_host
1470host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1471host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1472host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1473
1474
1475echo "$as_me:$LINENO: checking target system type" >&5
1476echo $ECHO_N "checking target system type... $ECHO_C" >&6
1477if test "${ac_cv_target+set}" = set; then
1478 echo $ECHO_N "(cached) $ECHO_C" >&6
1479else
1480 ac_cv_target_alias=$target_alias
1481test "x$ac_cv_target_alias" = "x" &&
1482 ac_cv_target_alias=$ac_cv_host_alias
1483ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1484 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1485echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1486 { (exit 1); exit 1; }; }
1487
1488fi
1489echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1490echo "${ECHO_T}$ac_cv_target" >&6
1491target=$ac_cv_target
1492target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1493target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1494target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1495
1496
1497# The aliases save the names the user supplied, while $host etc.
1498# will get canonicalized.
1499test -n "$target_alias" &&
1500 test "$program_prefix$program_suffix$program_transform_name" = \
1501 NONENONEs,x,x, &&
1502 program_prefix=${target_alias}-
1503
1504# Determine the noncanonical target name, for directory use.
1505 case ${build_alias} in
1506 "") build_noncanonical=${build} ;;
6e3f3080
NN
1507 *) build_noncanonical=${build_alias} ;;
1508esac
73458fb7 1509
4665e56c
NN
1510 case ${host_alias} in
1511 "") host_noncanonical=${build_noncanonical} ;;
1512 *) host_noncanonical=${host_alias} ;;
1513esac
73458fb7 1514
4665e56c
NN
1515 case ${target_alias} in
1516 "") target_noncanonical=${host_noncanonical} ;;
1517 *) target_noncanonical=${target_alias} ;;
1518esac
093e61a6 1519
8f1529e6
L
1520
1521
1522
1523# Determine the target- and build-specific subdirectories
4665e56c
NN
1524 # Prefix 'build-' so this never conflicts with target_subdir.
1525build_subdir="build-${build_noncanonical}"
215c351a
PB
1526# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1527if ( test $srcdir = . && test -d gcc ) \
1528 || test -d $srcdir/../host-${host_noncanonical}; then
1529 host_subdir="host-${host_noncanonical}"
1530else
1531 host_subdir=.
1532fi
4665e56c
NN
1533# No prefix.
1534target_subdir=${target_noncanonical}
ba479fd2 1535
73458fb7 1536
093e61a6 1537# Set program_transform_name
13c22933 1538test "$program_prefix" != NONE &&
ba479fd2 1539 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1540# Use a double $ so make ignores it.
1541test "$program_suffix" != NONE &&
ba479fd2
NN
1542 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1543# Double any \ or $. echo might interpret backslashes.
1544# By default was `s,x,x', remove it if useless.
1545cat <<\_ACEOF >conftest.sed
1546s/[\\$]/&&/g;s/;s,x,x,$//
1547_ACEOF
1548program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1549rm conftest.sed
13c22933
JJ
1550
1551
34a86c2b
NN
1552# Check for bogus environment variables.
1553# Test if LIBRARY_PATH contains the notation for the current directory
1554# since this would lead to problems installing/building glibc.
1555# LIBRARY_PATH contains the current directory if one of the following
1556# is true:
1557# - one of the terminals (":" and ";") is the first or last sign
1558# - two terminals occur directly after each other
1559# - the path contains an element with a dot in it
ba479fd2
NN
1560echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1561echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1562case ${LIBRARY_PATH} in
1563 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1564 library_path_setting="contains current directory"
1565 ;;
1566 *)
1567 library_path_setting="ok"
1568 ;;
1569esac
ba479fd2
NN
1570echo "$as_me:$LINENO: result: $library_path_setting" >&5
1571echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1572if test "$library_path_setting" != "ok"; then
ba479fd2 1573{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1574*** LIBRARY_PATH shouldn't contain the current directory when
1575*** building gcc. Please change the environment variable
ba479fd2
NN
1576*** and run configure again." >&5
1577echo "$as_me: error:
1578*** LIBRARY_PATH shouldn't contain the current directory when
1579*** building gcc. Please change the environment variable
1580*** and run configure again." >&2;}
1581 { (exit 1); exit 1; }; }
e9a25f70
JL
1582fi
1583
34a86c2b
NN
1584# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1585# since this would lead to problems installing/building glibc.
1586# GCC_EXEC_PREFIX contains the current directory if one of the following
1587# is true:
1588# - one of the terminals (":" and ";") is the first or last sign
1589# - two terminals occur directly after each other
1590# - the path contains an element with a dot in it
ba479fd2
NN
1591echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1592echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1593case ${GCC_EXEC_PREFIX} in
1594 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1595 gcc_exec_prefix_setting="contains current directory"
1596 ;;
1597 *)
1598 gcc_exec_prefix_setting="ok"
1599 ;;
1600esac
ba479fd2
NN
1601echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1602echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1603if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1604{ { echo "$as_me:$LINENO: error:
1605*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1606*** building gcc. Please change the environment variable
1607*** and run configure again." >&5
1608echo "$as_me: error:
cafe096b
EC
1609*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1610*** building gcc. Please change the environment variable
ba479fd2
NN
1611*** and run configure again." >&2;}
1612 { (exit 1); exit 1; }; }
34a86c2b
NN
1613fi
1614
1615# -----------
1616# Directories
1617# -----------
1618
1619# Specify the local prefix
1620local_prefix=
ba479fd2 1621
34a86c2b
NN
1622# Check whether --with-local-prefix or --without-local-prefix was given.
1623if test "${with_local_prefix+set}" = set; then
1624 withval="$with_local_prefix"
1625 case "${withval}" in
ba479fd2
NN
1626yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1627echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1628 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1629no) ;;
1630*) local_prefix=$with_local_prefix ;;
1631esac
ba479fd2 1632fi;
34a86c2b
NN
1633
1634# Default local prefix if it is empty
1635if test x$local_prefix = x; then
1636 local_prefix=/usr/local
1637fi
1638
1639# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1640# passed in by the toplevel make and thus we'd get different behavior
1641# depending on where we built the sources.
1642gcc_gxx_include_dir=
1643# Specify the g++ header file directory
ba479fd2 1644
34a86c2b
NN
1645# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1646if test "${with_gxx_include_dir+set}" = set; then
1647 withval="$with_gxx_include_dir"
1648 case "${withval}" in
ba479fd2
NN
1649yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1650echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1651 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1652no) ;;
1653*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1654esac
ba479fd2 1655fi;
34a86c2b
NN
1656
1657if test x${gcc_gxx_include_dir} = x; then
1658 if test x${enable_version_specific_runtime_libs} = xyes; then
1659 gcc_gxx_include_dir='${libsubdir}/include/c++'
1660 else
a1286ef5 1661 libstdcxx_incdir='c++/$(version)'
34a86c2b
NN
1662 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
1663 fi
1664fi
1665
ba479fd2 1666
34a86c2b
NN
1667# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1668if test "${with_cpp_install_dir+set}" = set; then
1669 withval="$with_cpp_install_dir"
1670 if test x$withval = xyes; then
ba479fd2
NN
1671 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1672echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1673 { (exit 1); exit 1; }; }
34a86c2b
NN
1674elif test x$withval != xno; then
1675 cpp_install_dir=$withval
1676fi
ba479fd2 1677fi;
34a86c2b 1678
51b9ff45 1679# We would like to our source tree to be readonly. However when releases or
ba479fd2 1680# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1681# various formats of manuals need to be included along with the rest of the
ba479fd2 1682# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1683# just that.
1684
03787dfd
KC
1685echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1686echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1687 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45
KC
1688if test "${enable_generated_files_in_srcdir+set}" = set; then
1689 enableval="$enable_generated_files_in_srcdir"
03787dfd 1690 generated_files_in_srcdir=$enableval
51b9ff45 1691else
03787dfd 1692 generated_files_in_srcdir=no
ba479fd2 1693fi;
51b9ff45 1694
03787dfd
KC
1695echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1696echo "${ECHO_T}$generated_files_in_srcdir" >&6
1697
1698if test "$generated_files_in_srcdir" = "yes"; then
1699 GENINSRC=''
03787dfd
KC
1700else
1701 GENINSRC='#'
03787dfd
KC
1702fi
1703
1704
34a86c2b
NN
1705# -------------------
1706# Find default linker
1707# -------------------
1708
1709# With GNU ld
ba479fd2 1710
34a86c2b
NN
1711# Check whether --with-gnu-ld or --without-gnu-ld was given.
1712if test "${with_gnu_ld+set}" = set; then
1713 withval="$with_gnu_ld"
1714 gnu_ld_flag="$with_gnu_ld"
1715else
1716 gnu_ld_flag=no
ba479fd2 1717fi;
6e3f3080 1718
63cf211a 1719# With pre-defined ld
ba479fd2 1720
34a86c2b
NN
1721# Check whether --with-ld or --without-ld was given.
1722if test "${with_ld+set}" = set; then
1723 withval="$with_ld"
1724 DEFAULT_LINKER="$with_ld"
ba479fd2 1725fi;
34a86c2b
NN
1726if test x"${DEFAULT_LINKER+set}" = x"set"; then
1727 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1728 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1729echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1730 { (exit 1); exit 1; }; }
34a86c2b
NN
1731 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1732 gnu_ld_flag=yes
1733 fi
ba479fd2
NN
1734
1735cat >>confdefs.h <<_ACEOF
34a86c2b 1736#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1737_ACEOF
34a86c2b
NN
1738
1739fi
1740
ba479fd2
NN
1741echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1742echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1743if test x"${DEFAULT_LINKER+set}" = x"set"; then
1744 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1745 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1746echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1747 else
ba479fd2
NN
1748 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1749echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1750 fi
1751else
ba479fd2
NN
1752 echo "$as_me:$LINENO: result: no" >&5
1753echo "${ECHO_T}no" >&6
34a86c2b
NN
1754fi
1755
d594623a
L
1756# With demangler in GNU ld
1757
1758# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
1759if test "${with_demangler_in_ld+set}" = set; then
1760 withval="$with_demangler_in_ld"
1761 demangler_in_ld="$with_demangler_in_ld"
1762else
1763 demangler_in_ld=no
1764fi;
1765
34a86c2b
NN
1766# ----------------------
1767# Find default assembler
1768# ----------------------
1769
1770# With GNU as
ba479fd2 1771
34a86c2b
NN
1772# Check whether --with-gnu-as or --without-gnu-as was given.
1773if test "${with_gnu_as+set}" = set; then
1774 withval="$with_gnu_as"
1775 gas_flag="$with_gnu_as"
1776else
1777 gas_flag=no
ba479fd2 1778fi;
34a86c2b
NN
1779
1780
1781# Check whether --with-as or --without-as was given.
1782if test "${with_as+set}" = set; then
1783 withval="$with_as"
1784 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1785fi;
34a86c2b
NN
1786if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1787 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1788 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1789echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1790 { (exit 1); exit 1; }; }
34a86c2b
NN
1791 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1792 gas_flag=yes
1793 fi
ba479fd2
NN
1794
1795cat >>confdefs.h <<_ACEOF
34a86c2b 1796#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1797_ACEOF
34a86c2b
NN
1798
1799fi
1800
ba479fd2
NN
1801echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1802echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1803if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1804 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1805 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1806echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1807 else
ba479fd2
NN
1808 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1809echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1810 fi
1811else
ba479fd2
NN
1812 echo "$as_me:$LINENO: result: no" >&5
1813echo "${ECHO_T}no" >&6
34a86c2b
NN
1814fi
1815
1816# ---------------
1817# Find C compiler
1818# ---------------
1819
426ca3ca
RO
1820# If a non-executable a.out is present (e.g. created by GNU as above even if
1821# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1822# file, even when creating an executable, so an execution test fails.
1823# Remove possible default executable files to avoid this.
1824#
1825# FIXME: This really belongs into AC_PROG_CC and can be removed once
1826# Autoconf includes it.
1827rm -f a.out a.exe b.out
1828
34a86c2b 1829# Find the native compiler
ba479fd2
NN
1830ac_ext=c
1831ac_cpp='$CPP $CPPFLAGS'
1832ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1833ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1834ac_compiler_gnu=$ac_cv_c_compiler_gnu
1835if test -n "$ac_tool_prefix"; then
1836 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1837set dummy ${ac_tool_prefix}gcc; ac_word=$2
1838echo "$as_me:$LINENO: checking for $ac_word" >&5
1839echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1840if test "${ac_cv_prog_CC+set}" = set; then
1841 echo $ECHO_N "(cached) $ECHO_C" >&6
1842else
1843 if test -n "$CC"; then
1844 ac_cv_prog_CC="$CC" # Let the user override the test.
1845else
1846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1847for as_dir in $PATH
1848do
1849 IFS=$as_save_IFS
1850 test -z "$as_dir" && as_dir=.
1851 for ac_exec_ext in '' $ac_executable_extensions; do
1852 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1853 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1854 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1855 break 2
1856 fi
1857done
1858done
1859
1860fi
1861fi
1862CC=$ac_cv_prog_CC
1863if test -n "$CC"; then
1864 echo "$as_me:$LINENO: result: $CC" >&5
1865echo "${ECHO_T}$CC" >&6
1866else
1867 echo "$as_me:$LINENO: result: no" >&5
1868echo "${ECHO_T}no" >&6
1869fi
1870
1871fi
1872if test -z "$ac_cv_prog_CC"; then
1873 ac_ct_CC=$CC
1874 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1875set dummy gcc; ac_word=$2
ba479fd2
NN
1876echo "$as_me:$LINENO: checking for $ac_word" >&5
1877echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1878if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1879 echo $ECHO_N "(cached) $ECHO_C" >&6
1880else
1881 if test -n "$ac_ct_CC"; then
1882 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1883else
1884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1885for as_dir in $PATH
1886do
1887 IFS=$as_save_IFS
1888 test -z "$as_dir" && as_dir=.
1889 for ac_exec_ext in '' $ac_executable_extensions; do
1890 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1891 ac_cv_prog_ac_ct_CC="gcc"
1892 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1893 break 2
1894 fi
1895done
1896done
1897
1898fi
1899fi
1900ac_ct_CC=$ac_cv_prog_ac_ct_CC
1901if test -n "$ac_ct_CC"; then
1902 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1903echo "${ECHO_T}$ac_ct_CC" >&6
1904else
1905 echo "$as_me:$LINENO: result: no" >&5
1906echo "${ECHO_T}no" >&6
1907fi
1908
1909 CC=$ac_ct_CC
1910else
1911 CC="$ac_cv_prog_CC"
1912fi
1913
1914if test -z "$CC"; then
1915 if test -n "$ac_tool_prefix"; then
1916 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1917set dummy ${ac_tool_prefix}cc; ac_word=$2
1918echo "$as_me:$LINENO: checking for $ac_word" >&5
1919echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1920if test "${ac_cv_prog_CC+set}" = set; then
1921 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1922else
1923 if test -n "$CC"; then
1924 ac_cv_prog_CC="$CC" # Let the user override the test.
1925else
ba479fd2
NN
1926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1927for as_dir in $PATH
1928do
1929 IFS=$as_save_IFS
1930 test -z "$as_dir" && as_dir=.
1931 for ac_exec_ext in '' $ac_executable_extensions; do
1932 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1933 ac_cv_prog_CC="${ac_tool_prefix}cc"
1934 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1935 break 2
1936 fi
1937done
1938done
1939
cd9e5e7c
MK
1940fi
1941fi
ba479fd2 1942CC=$ac_cv_prog_CC
cd9e5e7c 1943if test -n "$CC"; then
ba479fd2
NN
1944 echo "$as_me:$LINENO: result: $CC" >&5
1945echo "${ECHO_T}$CC" >&6
1946else
1947 echo "$as_me:$LINENO: result: no" >&5
1948echo "${ECHO_T}no" >&6
1949fi
1950
1951fi
1952if test -z "$ac_cv_prog_CC"; then
1953 ac_ct_CC=$CC
1954 # Extract the first word of "cc", so it can be a program name with args.
1955set dummy cc; ac_word=$2
1956echo "$as_me:$LINENO: checking for $ac_word" >&5
1957echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1958if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1959 echo $ECHO_N "(cached) $ECHO_C" >&6
1960else
1961 if test -n "$ac_ct_CC"; then
1962 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1963else
1964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1965for as_dir in $PATH
1966do
1967 IFS=$as_save_IFS
1968 test -z "$as_dir" && as_dir=.
1969 for ac_exec_ext in '' $ac_executable_extensions; do
1970 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1971 ac_cv_prog_ac_ct_CC="cc"
1972 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1973 break 2
1974 fi
1975done
1976done
1977
1978fi
1979fi
1980ac_ct_CC=$ac_cv_prog_ac_ct_CC
1981if test -n "$ac_ct_CC"; then
1982 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1983echo "${ECHO_T}$ac_ct_CC" >&6
1984else
1985 echo "$as_me:$LINENO: result: no" >&5
1986echo "${ECHO_T}no" >&6
1987fi
1988
1989 CC=$ac_ct_CC
cd9e5e7c 1990else
ba479fd2 1991 CC="$ac_cv_prog_CC"
e9a25f70 1992fi
6e3f3080 1993
ba479fd2 1994fi
6e3f3080
NN
1995if test -z "$CC"; then
1996 # Extract the first word of "cc", so it can be a program name with args.
1997set dummy cc; ac_word=$2
ba479fd2
NN
1998echo "$as_me:$LINENO: checking for $ac_word" >&5
1999echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2000if test "${ac_cv_prog_CC+set}" = set; then
2001 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2002else
2003 if test -n "$CC"; then
2004 ac_cv_prog_CC="$CC" # Let the user override the test.
2005else
2006 ac_prog_rejected=no
ba479fd2
NN
2007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2008for as_dir in $PATH
2009do
2010 IFS=$as_save_IFS
2011 test -z "$as_dir" && as_dir=.
2012 for ac_exec_ext in '' $ac_executable_extensions; do
2013 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2014 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2015 ac_prog_rejected=yes
2016 continue
2017 fi
2018 ac_cv_prog_CC="cc"
2019 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2020 break 2
2021 fi
2022done
2023done
2024
6e3f3080
NN
2025if test $ac_prog_rejected = yes; then
2026 # We found a bogon in the path, so make sure we never use it.
2027 set dummy $ac_cv_prog_CC
2028 shift
ba479fd2 2029 if test $# != 0; then
6e3f3080
NN
2030 # We chose a different compiler from the bogus one.
2031 # However, it has the same basename, so the bogon will be chosen
2032 # first if we set CC to just the basename; use the full file name.
2033 shift
ba479fd2 2034 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2035 fi
6e3f3080
NN
2036fi
2037fi
2038fi
ba479fd2 2039CC=$ac_cv_prog_CC
6e3f3080 2040if test -n "$CC"; then
ba479fd2
NN
2041 echo "$as_me:$LINENO: result: $CC" >&5
2042echo "${ECHO_T}$CC" >&6
e9a25f70 2043else
ba479fd2
NN
2044 echo "$as_me:$LINENO: result: no" >&5
2045echo "${ECHO_T}no" >&6
e9a25f70 2046fi
6e3f3080 2047
ba479fd2
NN
2048fi
2049if test -z "$CC"; then
2050 if test -n "$ac_tool_prefix"; then
2051 for ac_prog in cl
2052 do
2053 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2054set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2055echo "$as_me:$LINENO: checking for $ac_word" >&5
2056echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2057if test "${ac_cv_prog_CC+set}" = set; then
2058 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2059else
6e3f3080
NN
2060 if test -n "$CC"; then
2061 ac_cv_prog_CC="$CC" # Let the user override the test.
2062else
ba479fd2
NN
2063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2064for as_dir in $PATH
2065do
2066 IFS=$as_save_IFS
2067 test -z "$as_dir" && as_dir=.
2068 for ac_exec_ext in '' $ac_executable_extensions; do
2069 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2070 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2071 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2072 break 2
2073 fi
2074done
2075done
2076
093e61a6 2077fi
6e3f3080 2078fi
ba479fd2 2079CC=$ac_cv_prog_CC
6e3f3080 2080if test -n "$CC"; then
ba479fd2
NN
2081 echo "$as_me:$LINENO: result: $CC" >&5
2082echo "${ECHO_T}$CC" >&6
6e3f3080 2083else
ba479fd2
NN
2084 echo "$as_me:$LINENO: result: no" >&5
2085echo "${ECHO_T}no" >&6
093e61a6 2086fi
cafe096b 2087
ba479fd2
NN
2088 test -n "$CC" && break
2089 done
2090fi
2091if test -z "$CC"; then
2092 ac_ct_CC=$CC
2093 for ac_prog in cl
2094do
2095 # Extract the first word of "$ac_prog", so it can be a program name with args.
2096set dummy $ac_prog; ac_word=$2
2097echo "$as_me:$LINENO: checking for $ac_word" >&5
2098echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2099if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2100 echo $ECHO_N "(cached) $ECHO_C" >&6
2101else
2102 if test -n "$ac_ct_CC"; then
2103 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2104else
2105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2106for as_dir in $PATH
2107do
2108 IFS=$as_save_IFS
2109 test -z "$as_dir" && as_dir=.
2110 for ac_exec_ext in '' $ac_executable_extensions; do
2111 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2112 ac_cv_prog_ac_ct_CC="$ac_prog"
2113 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2114 break 2
2115 fi
2116done
2117done
6e3f3080 2118
ba479fd2
NN
2119fi
2120fi
2121ac_ct_CC=$ac_cv_prog_ac_ct_CC
2122if test -n "$ac_ct_CC"; then
2123 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2124echo "${ECHO_T}$ac_ct_CC" >&6
2125else
2126 echo "$as_me:$LINENO: result: no" >&5
2127echo "${ECHO_T}no" >&6
2128fi
6e3f3080 2129
ba479fd2
NN
2130 test -n "$ac_ct_CC" && break
2131done
63cf211a 2132
ba479fd2
NN
2133 CC=$ac_ct_CC
2134fi
2135
2136fi
2137
2138
2139test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2140See \`config.log' for more details." >&5
2141echo "$as_me: error: no acceptable C compiler found in \$PATH
2142See \`config.log' for more details." >&2;}
2143 { (exit 1); exit 1; }; }
2144
2145# Provide some information about the compiler.
2146echo "$as_me:$LINENO:" \
2147 "checking for C compiler version" >&5
2148ac_compiler=`set X $ac_compile; echo $2`
2149{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2150 (eval $ac_compiler --version </dev/null >&5) 2>&5
2151 ac_status=$?
2152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2153 (exit $ac_status); }
2154{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2155 (eval $ac_compiler -v </dev/null >&5) 2>&5
2156 ac_status=$?
2157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2158 (exit $ac_status); }
2159{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2160 (eval $ac_compiler -V </dev/null >&5) 2>&5
2161 ac_status=$?
2162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2163 (exit $ac_status); }
2164
2165cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2166/* confdefs.h. */
2167_ACEOF
2168cat confdefs.h >>conftest.$ac_ext
2169cat >>conftest.$ac_ext <<_ACEOF
2170/* end confdefs.h. */
2171
2172int
2173main ()
2174{
63cf211a 2175
ba479fd2
NN
2176 ;
2177 return 0;
2178}
2179_ACEOF
2180ac_clean_files_save=$ac_clean_files
2181ac_clean_files="$ac_clean_files a.out a.exe b.out"
2182# Try to create an executable without -o first, disregard a.out.
2183# It will help us diagnose broken compilers, and finding out an intuition
2184# of exeext.
86da66b5
HPN
2185echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2186echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2
NN
2187ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2188if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2189 (eval $ac_link_default) 2>&5
2190 ac_status=$?
2191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2192 (exit $ac_status); }; then
2193 # Find the output, starting from the most likely. This scheme is
2194# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2195# resort.
2196
2197# Be careful to initialize this variable, since it used to be cached.
2198# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2199ac_cv_exeext=
2200# b.out is created by i960 compilers.
2201for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2202do
2203 test -f "$ac_file" || continue
2204 case $ac_file in
2205 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
86da66b5 2206 ;;
ba479fd2 2207 conftest.$ac_ext )
86da66b5
HPN
2208 # This is the source file.
2209 ;;
ba479fd2 2210 [ab].out )
86da66b5
HPN
2211 # We found the default executable, but exeext='' is most
2212 # certainly right.
2213 break;;
ba479fd2 2214 *.* )
86da66b5
HPN
2215 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2216 # FIXME: I believe we export ac_cv_exeext for Libtool,
2217 # but it would be cool to find out if it's true. Does anybody
2218 # maintain Libtool? --akim.
2219 export ac_cv_exeext
2220 break;;
ba479fd2 2221 * )
86da66b5 2222 break;;
ba479fd2
NN
2223 esac
2224done
2225else
2226 echo "$as_me: failed program was:" >&5
2227sed 's/^/| /' conftest.$ac_ext >&5
2228
2229{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2230See \`config.log' for more details." >&5
2231echo "$as_me: error: C compiler cannot create executables
2232See \`config.log' for more details." >&2;}
2233 { (exit 77); exit 77; }; }
2234fi
2235
2236ac_exeext=$ac_cv_exeext
2237echo "$as_me:$LINENO: result: $ac_file" >&5
2238echo "${ECHO_T}$ac_file" >&6
2239
2240# Check the compiler produces executables we can run. If not, either
2241# the compiler is broken, or we cross compile.
2242echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2243echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2244# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2245# If not cross compiling, check that we can run a simple program.
2246if test "$cross_compiling" != yes; then
2247 if { ac_try='./$ac_file'
2248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2249 (eval $ac_try) 2>&5
2250 ac_status=$?
2251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2252 (exit $ac_status); }; }; then
2253 cross_compiling=no
6e3f3080 2254 else
ba479fd2
NN
2255 if test "$cross_compiling" = maybe; then
2256 cross_compiling=yes
2257 else
2258 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2259If you meant to cross compile, use \`--host'.
2260See \`config.log' for more details." >&5
2261echo "$as_me: error: cannot run C compiled programs.
2262If you meant to cross compile, use \`--host'.
2263See \`config.log' for more details." >&2;}
2264 { (exit 1); exit 1; }; }
2265 fi
6e3f3080
NN
2266 fi
2267fi
ba479fd2
NN
2268echo "$as_me:$LINENO: result: yes" >&5
2269echo "${ECHO_T}yes" >&6
2270
2271rm -f a.out a.exe conftest$ac_cv_exeext b.out
2272ac_clean_files=$ac_clean_files_save
2273# Check the compiler produces executables we can run. If not, either
2274# the compiler is broken, or we cross compile.
2275echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2276echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2277echo "$as_me:$LINENO: result: $cross_compiling" >&5
2278echo "${ECHO_T}$cross_compiling" >&6
2279
2280echo "$as_me:$LINENO: checking for suffix of executables" >&5
2281echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2282if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2283 (eval $ac_link) 2>&5
2284 ac_status=$?
2285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2286 (exit $ac_status); }; then
2287 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2288# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2289# work properly (i.e., refer to `conftest.exe'), while it won't with
2290# `rm'.
2291for ac_file in conftest.exe conftest conftest.*; do
2292 test -f "$ac_file" || continue
2293 case $ac_file in
2294 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2295 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
86da66b5
HPN
2296 export ac_cv_exeext
2297 break;;
ba479fd2
NN
2298 * ) break;;
2299 esac
2300done
e9a25f70 2301else
ba479fd2
NN
2302 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2303See \`config.log' for more details." >&5
2304echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2305See \`config.log' for more details." >&2;}
2306 { (exit 1); exit 1; }; }
2307fi
2308
2309rm -f conftest$ac_cv_exeext
2310echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2311echo "${ECHO_T}$ac_cv_exeext" >&6
2312
2313rm -f conftest.$ac_ext
2314EXEEXT=$ac_cv_exeext
2315ac_exeext=$EXEEXT
2316echo "$as_me:$LINENO: checking for suffix of object files" >&5
2317echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2318if test "${ac_cv_objext+set}" = set; then
2319 echo $ECHO_N "(cached) $ECHO_C" >&6
2320else
2321 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2322/* confdefs.h. */
2323_ACEOF
2324cat confdefs.h >>conftest.$ac_ext
2325cat >>conftest.$ac_ext <<_ACEOF
2326/* end confdefs.h. */
2327
2328int
2329main ()
2330{
6e3f3080 2331
ba479fd2
NN
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336rm -f conftest.o conftest.obj
2337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2338 (eval $ac_compile) 2>&5
2339 ac_status=$?
2340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2341 (exit $ac_status); }; then
2342 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2343 case $ac_file in
2344 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2345 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2346 break;;
2347 esac
2348done
63cf211a 2349else
ba479fd2
NN
2350 echo "$as_me: failed program was:" >&5
2351sed 's/^/| /' conftest.$ac_ext >&5
2352
2353{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2354See \`config.log' for more details." >&5
2355echo "$as_me: error: cannot compute suffix of object files: cannot compile
2356See \`config.log' for more details." >&2;}
2357 { (exit 1); exit 1; }; }
2358fi
2359
2360rm -f conftest.$ac_cv_objext conftest.$ac_ext
2361fi
2362echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2363echo "${ECHO_T}$ac_cv_objext" >&6
2364OBJEXT=$ac_cv_objext
2365ac_objext=$OBJEXT
2366echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2367echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2368if test "${ac_cv_c_compiler_gnu+set}" = set; then
2369 echo $ECHO_N "(cached) $ECHO_C" >&6
2370else
2371 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2372/* confdefs.h. */
2373_ACEOF
2374cat confdefs.h >>conftest.$ac_ext
2375cat >>conftest.$ac_ext <<_ACEOF
2376/* end confdefs.h. */
2377
2378int
2379main ()
2380{
2381#ifndef __GNUC__
2382 choke me
2383#endif
6e3f3080 2384
ba479fd2
NN
2385 ;
2386 return 0;
2387}
2388_ACEOF
2389rm -f conftest.$ac_objext
2390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2391 (eval $ac_compile) 2>conftest.er1
ba479fd2 2392 ac_status=$?
86da66b5
HPN
2393 grep -v '^ *+' conftest.er1 >conftest.err
2394 rm -f conftest.er1
2395 cat conftest.err >&5
ba479fd2
NN
2396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397 (exit $ac_status); } &&
e8b05380 2398 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2400 (eval $ac_try) 2>&5
2401 ac_status=$?
2402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2403 (exit $ac_status); }; } &&
2404 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2406 (eval $ac_try) 2>&5
2407 ac_status=$?
2408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2409 (exit $ac_status); }; }; then
2410 ac_compiler_gnu=yes
2411else
2412 echo "$as_me: failed program was:" >&5
2413sed 's/^/| /' conftest.$ac_ext >&5
2414
2415ac_compiler_gnu=no
2416fi
86da66b5 2417rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2418ac_cv_c_compiler_gnu=$ac_compiler_gnu
2419
2420fi
2421echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2422echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2423GCC=`test $ac_compiler_gnu = yes && echo yes`
2424ac_test_CFLAGS=${CFLAGS+set}
2425ac_save_CFLAGS=$CFLAGS
2426CFLAGS="-g"
2427echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2428echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2429if test "${ac_cv_prog_cc_g+set}" = set; then
2430 echo $ECHO_N "(cached) $ECHO_C" >&6
2431else
2432 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2433/* confdefs.h. */
2434_ACEOF
2435cat confdefs.h >>conftest.$ac_ext
2436cat >>conftest.$ac_ext <<_ACEOF
2437/* end confdefs.h. */
2438
2439int
2440main ()
2441{
2442
2443 ;
2444 return 0;
2445}
2446_ACEOF
2447rm -f conftest.$ac_objext
2448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2449 (eval $ac_compile) 2>conftest.er1
ba479fd2 2450 ac_status=$?
86da66b5
HPN
2451 grep -v '^ *+' conftest.er1 >conftest.err
2452 rm -f conftest.er1
2453 cat conftest.err >&5
ba479fd2
NN
2454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2455 (exit $ac_status); } &&
e8b05380 2456 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2458 (eval $ac_try) 2>&5
2459 ac_status=$?
2460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2461 (exit $ac_status); }; } &&
2462 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2464 (eval $ac_try) 2>&5
2465 ac_status=$?
2466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2467 (exit $ac_status); }; }; then
6e3f3080
NN
2468 ac_cv_prog_cc_g=yes
2469else
ba479fd2
NN
2470 echo "$as_me: failed program was:" >&5
2471sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2472
ba479fd2 2473ac_cv_prog_cc_g=no
6e3f3080 2474fi
86da66b5 2475rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2476fi
2477echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2478echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2479if test "$ac_test_CFLAGS" = set; then
ba479fd2 2480 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2481elif test $ac_cv_prog_cc_g = yes; then
2482 if test "$GCC" = yes; then
e9a25f70
JL
2483 CFLAGS="-g -O2"
2484 else
cd9e5e7c 2485 CFLAGS="-g"
81814e35 2486 fi
3723cad9 2487else
cd9e5e7c
MK
2488 if test "$GCC" = yes; then
2489 CFLAGS="-O2"
2490 else
2491 CFLAGS=
2492 fi
e9a25f70 2493fi
ba479fd2
NN
2494echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2495echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2496if test "${ac_cv_prog_cc_stdc+set}" = set; then
2497 echo $ECHO_N "(cached) $ECHO_C" >&6
2498else
2499 ac_cv_prog_cc_stdc=no
2500ac_save_CC=$CC
2501cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2502/* confdefs.h. */
2503_ACEOF
2504cat confdefs.h >>conftest.$ac_ext
2505cat >>conftest.$ac_ext <<_ACEOF
2506/* end confdefs.h. */
2507#include <stdarg.h>
2508#include <stdio.h>
2509#include <sys/types.h>
2510#include <sys/stat.h>
2511/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2512struct buf { int x; };
2513FILE * (*rcsopen) (struct buf *, struct stat *, int);
2514static char *e (p, i)
2515 char **p;
2516 int i;
2517{
2518 return p[i];
2519}
2520static char *f (char * (*g) (char **, int), char **p, ...)
2521{
2522 char *s;
2523 va_list v;
2524 va_start (v,p);
2525 s = g (p, va_arg (v,int));
2526 va_end (v);
2527 return s;
2528}
86da66b5
HPN
2529
2530/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2531 function prototypes and stuff, but not '\xHH' hex character constants.
2532 These don't provoke an error unfortunately, instead are silently treated
2533 as 'x'. The following induces an error, until -std1 is added to get
2534 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2535 array size at least. It's necessary to write '\x00'==0 to get something
2536 that's true only with -std1. */
2537int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2538
ba479fd2
NN
2539int test (int i, double x);
2540struct s1 {int (*f) (int a);};
2541struct s2 {int (*f) (double a);};
2542int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2543int argc;
2544char **argv;
2545int
2546main ()
2547{
2548return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2549 ;
2550 return 0;
2551}
2552_ACEOF
2553# Don't try gcc -ansi; that turns off useful extensions and
2554# breaks some systems' header files.
2555# AIX -qlanglvl=ansi
2556# Ultrix and OSF/1 -std1
2557# HP-UX 10.20 and later -Ae
2558# HP-UX older versions -Aa -D_HPUX_SOURCE
2559# SVR4 -Xc -D__EXTENSIONS__
2560for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2561do
2562 CC="$ac_save_CC $ac_arg"
2563 rm -f conftest.$ac_objext
2564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2565 (eval $ac_compile) 2>conftest.er1
ba479fd2 2566 ac_status=$?
86da66b5
HPN
2567 grep -v '^ *+' conftest.er1 >conftest.err
2568 rm -f conftest.er1
2569 cat conftest.err >&5
ba479fd2
NN
2570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2571 (exit $ac_status); } &&
e8b05380 2572 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2574 (eval $ac_try) 2>&5
2575 ac_status=$?
2576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2577 (exit $ac_status); }; } &&
2578 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2580 (eval $ac_try) 2>&5
2581 ac_status=$?
2582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2583 (exit $ac_status); }; }; then
2584 ac_cv_prog_cc_stdc=$ac_arg
2585break
2586else
2587 echo "$as_me: failed program was:" >&5
2588sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2589
ba479fd2 2590fi
86da66b5 2591rm -f conftest.err conftest.$ac_objext
ba479fd2
NN
2592done
2593rm -f conftest.$ac_ext conftest.$ac_objext
2594CC=$ac_save_CC
2595
2596fi
2597
2598case "x$ac_cv_prog_cc_stdc" in
2599 x|xno)
2600 echo "$as_me:$LINENO: result: none needed" >&5
2601echo "${ECHO_T}none needed" >&6 ;;
2602 *)
2603 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2604echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2605 CC="$CC $ac_cv_prog_cc_stdc" ;;
2606esac
2607
2608# Some people use a C++ compiler to compile C. Since we use `exit',
2609# in C++ we need to declare it. In case someone uses the same compiler
2610# for both compiling C and C++ we need to have the C++ compiler decide
2611# the declaration of exit, since it's the most demanding environment.
2612cat >conftest.$ac_ext <<_ACEOF
2613#ifndef __cplusplus
2614 choke me
2615#endif
2616_ACEOF
2617rm -f conftest.$ac_objext
2618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2619 (eval $ac_compile) 2>conftest.er1
ba479fd2 2620 ac_status=$?
86da66b5
HPN
2621 grep -v '^ *+' conftest.er1 >conftest.err
2622 rm -f conftest.er1
2623 cat conftest.err >&5
ba479fd2
NN
2624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2625 (exit $ac_status); } &&
e8b05380 2626 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2628 (eval $ac_try) 2>&5
2629 ac_status=$?
2630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2631 (exit $ac_status); }; } &&
2632 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2634 (eval $ac_try) 2>&5
2635 ac_status=$?
2636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2637 (exit $ac_status); }; }; then
2638 for ac_declaration in \
86da66b5 2639 '' \
ba479fd2
NN
2640 'extern "C" void std::exit (int) throw (); using std::exit;' \
2641 'extern "C" void std::exit (int); using std::exit;' \
2642 'extern "C" void exit (int) throw ();' \
2643 'extern "C" void exit (int);' \
2644 'void exit (int);'
2645do
2646 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2647/* confdefs.h. */
2648_ACEOF
2649cat confdefs.h >>conftest.$ac_ext
2650cat >>conftest.$ac_ext <<_ACEOF
2651/* end confdefs.h. */
33e70558 2652$ac_declaration
86da66b5 2653#include <stdlib.h>
ba479fd2
NN
2654int
2655main ()
2656{
2657exit (42);
2658 ;
2659 return 0;
2660}
2661_ACEOF
2662rm -f conftest.$ac_objext
2663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2664 (eval $ac_compile) 2>conftest.er1
ba479fd2 2665 ac_status=$?
86da66b5
HPN
2666 grep -v '^ *+' conftest.er1 >conftest.err
2667 rm -f conftest.er1
2668 cat conftest.err >&5
ba479fd2
NN
2669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2670 (exit $ac_status); } &&
e8b05380 2671 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2673 (eval $ac_try) 2>&5
2674 ac_status=$?
2675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2676 (exit $ac_status); }; } &&
2677 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2679 (eval $ac_try) 2>&5
2680 ac_status=$?
2681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2682 (exit $ac_status); }; }; then
2683 :
2684else
2685 echo "$as_me: failed program was:" >&5
2686sed 's/^/| /' conftest.$ac_ext >&5
2687
2688continue
2689fi
86da66b5 2690rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 2691 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2692/* confdefs.h. */
2693_ACEOF
2694cat confdefs.h >>conftest.$ac_ext
2695cat >>conftest.$ac_ext <<_ACEOF
2696/* end confdefs.h. */
2697$ac_declaration
2698int
2699main ()
2700{
2701exit (42);
2702 ;
2703 return 0;
2704}
2705_ACEOF
2706rm -f conftest.$ac_objext
2707if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2708 (eval $ac_compile) 2>conftest.er1
ba479fd2 2709 ac_status=$?
86da66b5
HPN
2710 grep -v '^ *+' conftest.er1 >conftest.err
2711 rm -f conftest.er1
2712 cat conftest.err >&5
ba479fd2
NN
2713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2714 (exit $ac_status); } &&
e8b05380 2715 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2717 (eval $ac_try) 2>&5
2718 ac_status=$?
2719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2720 (exit $ac_status); }; } &&
2721 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2723 (eval $ac_try) 2>&5
2724 ac_status=$?
2725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2726 (exit $ac_status); }; }; then
2727 break
3ec83fc2 2728else
ba479fd2
NN
2729 echo "$as_me: failed program was:" >&5
2730sed 's/^/| /' conftest.$ac_ext >&5
2731
6e3f3080 2732fi
86da66b5 2733rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2734done
2735rm -f conftest*
2736if test -n "$ac_declaration"; then
2737 echo '#ifdef __cplusplus' >>confdefs.h
2738 echo $ac_declaration >>confdefs.h
2739 echo '#endif' >>confdefs.h
2740fi
2741
3ec83fc2 2742else
ba479fd2
NN
2743 echo "$as_me: failed program was:" >&5
2744sed 's/^/| /' conftest.$ac_ext >&5
2745
2746fi
86da66b5 2747rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2748ac_ext=c
2749ac_cpp='$CPP $CPPFLAGS'
2750ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2751ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2752ac_compiler_gnu=$ac_cv_c_compiler_gnu
2753
2754if test "x$CC" != xcc; then
2755 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2756echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2757else
2758 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2759echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2760fi
2761set dummy $CC; ac_cc=`echo $2 |
2762 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2763if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2764 echo $ECHO_N "(cached) $ECHO_C" >&6
2765else
2766 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2767/* confdefs.h. */
2768_ACEOF
2769cat confdefs.h >>conftest.$ac_ext
2770cat >>conftest.$ac_ext <<_ACEOF
2771/* end confdefs.h. */
2772
2773int
2774main ()
2775{
2776
2777 ;
2778 return 0;
2779}
2780_ACEOF
3ec83fc2
RH
2781# Make sure it works both with $CC and with simple cc.
2782# We do the test twice because some compilers refuse to overwrite an
2783# existing .o file with -o, though they will create one.
ba479fd2
NN
2784ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2785if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2786 (eval $ac_try) 2>&5
2787 ac_status=$?
2788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2789 (exit $ac_status); } &&
2790 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2791 (eval $ac_try) 2>&5
2792 ac_status=$?
2793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2794 (exit $ac_status); };
3ec83fc2
RH
2795then
2796 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2797 if test "x$CC" != xcc; then
2798 # Test first that cc exists at all.
ba479fd2
NN
2799 if { ac_try='cc -c conftest.$ac_ext >&5'
2800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2801 (eval $ac_try) 2>&5
2802 ac_status=$?
2803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2804 (exit $ac_status); }; }; then
2805 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2806 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2807 (eval $ac_try) 2>&5
2808 ac_status=$?
2809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2810 (exit $ac_status); } &&
2811 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2812 (eval $ac_try) 2>&5
2813 ac_status=$?
2814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2815 (exit $ac_status); };
3ec83fc2 2816 then
86da66b5
HPN
2817 # cc works too.
2818 :
3ec83fc2 2819 else
86da66b5
HPN
2820 # cc exists but doesn't like -o.
2821 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2822 fi
2823 fi
2824 fi
2825else
2826 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2827fi
2828rm -f conftest*
2829
2830fi
2831if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2832 echo "$as_me:$LINENO: result: yes" >&5
2833echo "${ECHO_T}yes" >&6
3ec83fc2 2834else
ba479fd2
NN
2835 echo "$as_me:$LINENO: result: no" >&5
2836echo "${ECHO_T}no" >&6
2837
2838cat >>confdefs.h <<\_ACEOF
3ec83fc2 2839#define NO_MINUS_C_MINUS_O 1
ba479fd2 2840_ACEOF
3ec83fc2
RH
2841
2842fi
2843
3b620440
KC
2844# expand $ac_aux_dir to an absolute path
2845am_aux_dir=`cd $ac_aux_dir && pwd`
2846
2847# FIXME: we rely on the cache variable name because
2848# there is no other way.
2849set dummy $CC
2850ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2851if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2852 # Losing compiler, so override with the script.
2853 # FIXME: It is wrong to rewrite CC.
2854 # But if we don't then we get into trouble of one sort or another.
2855 # A longer-term fix would be to have automake use am__CC in this case,
2856 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2857 CC="$am_aux_dir/compile $CC"
2858fi
2859
414d23ae
HPN
2860# autoconf is lame and doesn't give us any substitution variable for this.
2861if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2862 NO_MINUS_C_MINUS_O=yes
2863else
2864 OUTPUT_OPTION='-o $@'
2865fi
2866
2867
2868
73458fb7
NN
2869# -------------------------
2870# Check C compiler features
2871# -------------------------
2872
ba479fd2
NN
2873ac_ext=c
2874ac_cpp='$CPP $CPPFLAGS'
2875ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2876ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2877ac_compiler_gnu=$ac_cv_c_compiler_gnu
2878echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2879echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2880# On Suns, sometimes $CPP names a directory.
2881if test -n "$CPP" && test -d "$CPP"; then
2882 CPP=
2883fi
2884if test -z "$CPP"; then
ba479fd2
NN
2885 if test "${ac_cv_prog_CPP+set}" = set; then
2886 echo $ECHO_N "(cached) $ECHO_C" >&6
2887else
2888 # Double quotes because CPP needs to be expanded
2889 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2890 do
2891 ac_preproc_ok=false
2892for ac_c_preproc_warn_flag in '' yes
2893do
2894 # Use a header file that comes with gcc, so configuring glibc
2895 # with a fresh cross-compiler works.
2896 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2897 # <limits.h> exists even on freestanding compilers.
84c041a1 2898 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2899 # not just through cpp. "Syntax error" is here to catch this case.
2900 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2901/* confdefs.h. */
2902_ACEOF
2903cat confdefs.h >>conftest.$ac_ext
2904cat >>conftest.$ac_ext <<_ACEOF
2905/* end confdefs.h. */
2906#ifdef __STDC__
2907# include <limits.h>
2908#else
2909# include <assert.h>
2910#endif
86da66b5 2911 Syntax error
ba479fd2
NN
2912_ACEOF
2913if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2914 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2915 ac_status=$?
2916 grep -v '^ *+' conftest.er1 >conftest.err
2917 rm -f conftest.er1
2918 cat conftest.err >&5
2919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2920 (exit $ac_status); } >/dev/null; then
2921 if test -s conftest.err; then
2922 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2923 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2924 else
2925 ac_cpp_err=
2926 fi
2927else
2928 ac_cpp_err=yes
2929fi
2930if test -z "$ac_cpp_err"; then
093e61a6 2931 :
cafe096b 2932else
ba479fd2
NN
2933 echo "$as_me: failed program was:" >&5
2934sed 's/^/| /' conftest.$ac_ext >&5
2935
2936 # Broken: fails on valid input.
2937continue
2938fi
2939rm -f conftest.err conftest.$ac_ext
2940
2941 # OK, works on sane cases. Now check whether non-existent headers
2942 # can be detected and how.
2943 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2944/* confdefs.h. */
2945_ACEOF
2946cat confdefs.h >>conftest.$ac_ext
2947cat >>conftest.$ac_ext <<_ACEOF
2948/* end confdefs.h. */
2949#include <ac_nonexistent.h>
2950_ACEOF
2951if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2952 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2953 ac_status=$?
2954 grep -v '^ *+' conftest.er1 >conftest.err
2955 rm -f conftest.er1
2956 cat conftest.err >&5
2957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2958 (exit $ac_status); } >/dev/null; then
2959 if test -s conftest.err; then
2960 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2961 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2962 else
2963 ac_cpp_err=
2964 fi
2965else
2966 ac_cpp_err=yes
2967fi
2968if test -z "$ac_cpp_err"; then
2969 # Broken: success on invalid input.
2970continue
2971else
2972 echo "$as_me: failed program was:" >&5
2973sed 's/^/| /' conftest.$ac_ext >&5
2974
2975 # Passes both tests.
2976ac_preproc_ok=:
2977break
2978fi
2979rm -f conftest.err conftest.$ac_ext
2980
2981done
2982# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2983rm -f conftest.err conftest.$ac_ext
2984if $ac_preproc_ok; then
2985 break
2986fi
2987
2988 done
2989 ac_cv_prog_CPP=$CPP
2990
2991fi
2992 CPP=$ac_cv_prog_CPP
2993else
2994 ac_cv_prog_CPP=$CPP
2995fi
2996echo "$as_me:$LINENO: result: $CPP" >&5
2997echo "${ECHO_T}$CPP" >&6
2998ac_preproc_ok=false
2999for ac_c_preproc_warn_flag in '' yes
3000do
3001 # Use a header file that comes with gcc, so configuring glibc
3002 # with a fresh cross-compiler works.
3003 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3004 # <limits.h> exists even on freestanding compilers.
3005 # On the NeXT, cc -E runs the code through the compiler's parser,
3006 # not just through cpp. "Syntax error" is here to catch this case.
3007 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3008/* confdefs.h. */
3009_ACEOF
3010cat confdefs.h >>conftest.$ac_ext
3011cat >>conftest.$ac_ext <<_ACEOF
3012/* end confdefs.h. */
3013#ifdef __STDC__
3014# include <limits.h>
3015#else
3016# include <assert.h>
3017#endif
86da66b5 3018 Syntax error
ba479fd2
NN
3019_ACEOF
3020if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3021 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3022 ac_status=$?
3023 grep -v '^ *+' conftest.er1 >conftest.err
3024 rm -f conftest.er1
3025 cat conftest.err >&5
3026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3027 (exit $ac_status); } >/dev/null; then
3028 if test -s conftest.err; then
3029 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3030 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3031 else
3032 ac_cpp_err=
3033 fi
3034else
3035 ac_cpp_err=yes
3036fi
3037if test -z "$ac_cpp_err"; then
6e3f3080 3038 :
414d23ae 3039else
ba479fd2
NN
3040 echo "$as_me: failed program was:" >&5
3041sed 's/^/| /' conftest.$ac_ext >&5
3042
3043 # Broken: fails on valid input.
3044continue
3045fi
3046rm -f conftest.err conftest.$ac_ext
3047
3048 # OK, works on sane cases. Now check whether non-existent headers
3049 # can be detected and how.
3050 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3051/* confdefs.h. */
3052_ACEOF
3053cat confdefs.h >>conftest.$ac_ext
3054cat >>conftest.$ac_ext <<_ACEOF
3055/* end confdefs.h. */
3056#include <ac_nonexistent.h>
3057_ACEOF
3058if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3059 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3060 ac_status=$?
3061 grep -v '^ *+' conftest.er1 >conftest.err
3062 rm -f conftest.er1
3063 cat conftest.err >&5
3064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3065 (exit $ac_status); } >/dev/null; then
3066 if test -s conftest.err; then
3067 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3068 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3069 else
3070 ac_cpp_err=
3071 fi
6e3f3080 3072else
ba479fd2 3073 ac_cpp_err=yes
63cf211a 3074fi
ba479fd2
NN
3075if test -z "$ac_cpp_err"; then
3076 # Broken: success on invalid input.
3077continue
3078else
3079 echo "$as_me: failed program was:" >&5
3080sed 's/^/| /' conftest.$ac_ext >&5
3081
3082 # Passes both tests.
3083ac_preproc_ok=:
3084break
63cf211a 3085fi
ba479fd2
NN
3086rm -f conftest.err conftest.$ac_ext
3087
3088done
3089# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3090rm -f conftest.err conftest.$ac_ext
3091if $ac_preproc_ok; then
3092 :
6e3f3080 3093else
ba479fd2
NN
3094 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3095See \`config.log' for more details." >&5
3096echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3097See \`config.log' for more details." >&2;}
3098 { (exit 1); exit 1; }; }
6e3f3080
NN
3099fi
3100
ba479fd2
NN
3101ac_ext=c
3102ac_cpp='$CPP $CPPFLAGS'
3103ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3104ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3105ac_compiler_gnu=$ac_cv_c_compiler_gnu
3106
b5472e1d 3107
ba479fd2
NN
3108echo "$as_me:$LINENO: checking for inline" >&5
3109echo $ECHO_N "checking for inline... $ECHO_C" >&6
3110if test "${ac_cv_c_inline+set}" = set; then
3111 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3112else
3113 ac_cv_c_inline=no
3114for ac_kw in inline __inline__ __inline; do
ba479fd2 3115 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3116/* confdefs.h. */
3117_ACEOF
3118cat confdefs.h >>conftest.$ac_ext
3119cat >>conftest.$ac_ext <<_ACEOF
3120/* end confdefs.h. */
3121#ifndef __cplusplus
3122typedef int foo_t;
3123static $ac_kw foo_t static_foo () {return 0; }
3124$ac_kw foo_t foo () {return 0; }
3125#endif
414d23ae 3126
ba479fd2
NN
3127_ACEOF
3128rm -f conftest.$ac_objext
3129if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3130 (eval $ac_compile) 2>conftest.er1
ba479fd2 3131 ac_status=$?
86da66b5
HPN
3132 grep -v '^ *+' conftest.er1 >conftest.err
3133 rm -f conftest.er1
3134 cat conftest.err >&5
ba479fd2
NN
3135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3136 (exit $ac_status); } &&
e8b05380 3137 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
3138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3139 (eval $ac_try) 2>&5
3140 ac_status=$?
3141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3142 (exit $ac_status); }; } &&
3143 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3145 (eval $ac_try) 2>&5
3146 ac_status=$?
3147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3148 (exit $ac_status); }; }; then
414d23ae
HPN
3149 ac_cv_c_inline=$ac_kw; break
3150else
ba479fd2
NN
3151 echo "$as_me: failed program was:" >&5
3152sed 's/^/| /' conftest.$ac_ext >&5
3153
414d23ae 3154fi
86da66b5 3155rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3156done
3157
3158fi
ba479fd2
NN
3159echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3160echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3161
3162
ba479fd2 3163case $ac_cv_c_inline in
414d23ae 3164 inline | yes) ;;
86da66b5
HPN
3165 *)
3166 case $ac_cv_c_inline in
3167 no) ac_val=;;
3168 *) ac_val=$ac_cv_c_inline;;
3169 esac
3170 cat >>confdefs.h <<_ACEOF
3171#ifndef __cplusplus
3172#define inline $ac_val
3173#endif
ba479fd2 3174_ACEOF
86da66b5 3175 ;;
414d23ae
HPN
3176esac
3177
414d23ae 3178
414d23ae 3179# sizeof(char) is 1 by definition.
bf3b7cd3
JD
3180
3181echo "$as_me:$LINENO: checking for egrep" >&5
3182echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3183if test "${ac_cv_prog_egrep+set}" = set; then
3184 echo $ECHO_N "(cached) $ECHO_C" >&6
3185else
3186 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3187 then ac_cv_prog_egrep='grep -E'
3188 else ac_cv_prog_egrep='egrep'
3189 fi
3190fi
3191echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3192echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3193 EGREP=$ac_cv_prog_egrep
3194
3195
3196echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3197echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3198if test "${ac_cv_header_stdc+set}" = set; then
3199 echo $ECHO_N "(cached) $ECHO_C" >&6
3200else
3201 cat >conftest.$ac_ext <<_ACEOF
3202/* confdefs.h. */
3203_ACEOF
3204cat confdefs.h >>conftest.$ac_ext
3205cat >>conftest.$ac_ext <<_ACEOF
3206/* end confdefs.h. */
3207#include <stdlib.h>
3208#include <stdarg.h>
3209#include <string.h>
3210#include <float.h>
3211
3212int
3213main ()
3214{
3215
3216 ;
3217 return 0;
3218}
3219_ACEOF
3220rm -f conftest.$ac_objext
3221if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3222 (eval $ac_compile) 2>conftest.er1
3223 ac_status=$?
3224 grep -v '^ *+' conftest.er1 >conftest.err
3225 rm -f conftest.er1
3226 cat conftest.err >&5
3227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3228 (exit $ac_status); } &&
e8b05380 3229 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3231 (eval $ac_try) 2>&5
3232 ac_status=$?
3233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3234 (exit $ac_status); }; } &&
3235 { ac_try='test -s conftest.$ac_objext'
3236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3237 (eval $ac_try) 2>&5
3238 ac_status=$?
3239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3240 (exit $ac_status); }; }; then
3241 ac_cv_header_stdc=yes
3242else
3243 echo "$as_me: failed program was:" >&5
3244sed 's/^/| /' conftest.$ac_ext >&5
3245
3246ac_cv_header_stdc=no
3247fi
3248rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3249
3250if test $ac_cv_header_stdc = yes; then
3251 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3252 cat >conftest.$ac_ext <<_ACEOF
3253/* confdefs.h. */
3254_ACEOF
3255cat confdefs.h >>conftest.$ac_ext
3256cat >>conftest.$ac_ext <<_ACEOF
3257/* end confdefs.h. */
3258#include <string.h>
3259
3260_ACEOF
3261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3262 $EGREP "memchr" >/dev/null 2>&1; then
3263 :
3264else
3265 ac_cv_header_stdc=no
3266fi
3267rm -f conftest*
3268
3269fi
3270
3271if test $ac_cv_header_stdc = yes; then
3272 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3273 cat >conftest.$ac_ext <<_ACEOF
3274/* confdefs.h. */
3275_ACEOF
3276cat confdefs.h >>conftest.$ac_ext
3277cat >>conftest.$ac_ext <<_ACEOF
3278/* end confdefs.h. */
3279#include <stdlib.h>
3280
3281_ACEOF
3282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3283 $EGREP "free" >/dev/null 2>&1; then
3284 :
3285else
3286 ac_cv_header_stdc=no
3287fi
3288rm -f conftest*
3289
3290fi
3291
3292if test $ac_cv_header_stdc = yes; then
3293 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3294 if test "$cross_compiling" = yes; then
3295 :
3296else
3297 cat >conftest.$ac_ext <<_ACEOF
3298/* confdefs.h. */
3299_ACEOF
3300cat confdefs.h >>conftest.$ac_ext
3301cat >>conftest.$ac_ext <<_ACEOF
3302/* end confdefs.h. */
3303#include <ctype.h>
3304#if ((' ' & 0x0FF) == 0x020)
3305# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3306# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3307#else
3308# define ISLOWER(c) \
3309 (('a' <= (c) && (c) <= 'i') \
3310 || ('j' <= (c) && (c) <= 'r') \
3311 || ('s' <= (c) && (c) <= 'z'))
3312# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3313#endif
3314
3315#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3316int
3317main ()
3318{
3319 int i;
3320 for (i = 0; i < 256; i++)
3321 if (XOR (islower (i), ISLOWER (i))
3322 || toupper (i) != TOUPPER (i))
3323 exit(2);
3324 exit (0);
3325}
3326_ACEOF
3327rm -f conftest$ac_exeext
3328if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3329 (eval $ac_link) 2>&5
3330 ac_status=$?
3331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3332 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3334 (eval $ac_try) 2>&5
3335 ac_status=$?
3336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3337 (exit $ac_status); }; }; then
3338 :
3339else
3340 echo "$as_me: program exited with status $ac_status" >&5
3341echo "$as_me: failed program was:" >&5
3342sed 's/^/| /' conftest.$ac_ext >&5
3343
3344( exit $ac_status )
3345ac_cv_header_stdc=no
3346fi
3347rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3348fi
3349fi
3350fi
3351echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3352echo "${ECHO_T}$ac_cv_header_stdc" >&6
3353if test $ac_cv_header_stdc = yes; then
3354
3355cat >>confdefs.h <<\_ACEOF
3356#define STDC_HEADERS 1
3357_ACEOF
3358
3359fi
3360
3361# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3372 inttypes.h stdint.h unistd.h
3373do
3374as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3375echo "$as_me:$LINENO: checking for $ac_header" >&5
3376echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3377if eval "test \"\${$as_ac_Header+set}\" = set"; then
3378 echo $ECHO_N "(cached) $ECHO_C" >&6
3379else
3380 cat >conftest.$ac_ext <<_ACEOF
3381/* confdefs.h. */
3382_ACEOF
3383cat confdefs.h >>conftest.$ac_ext
3384cat >>conftest.$ac_ext <<_ACEOF
3385/* end confdefs.h. */
3386$ac_includes_default
3387
3388#include <$ac_header>
3389_ACEOF
3390rm -f conftest.$ac_objext
3391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3392 (eval $ac_compile) 2>conftest.er1
3393 ac_status=$?
3394 grep -v '^ *+' conftest.er1 >conftest.err
3395 rm -f conftest.er1
3396 cat conftest.err >&5
3397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3398 (exit $ac_status); } &&
e8b05380 3399 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3401 (eval $ac_try) 2>&5
3402 ac_status=$?
3403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3404 (exit $ac_status); }; } &&
3405 { ac_try='test -s conftest.$ac_objext'
3406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3407 (eval $ac_try) 2>&5
3408 ac_status=$?
3409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3410 (exit $ac_status); }; }; then
3411 eval "$as_ac_Header=yes"
3412else
3413 echo "$as_me: failed program was:" >&5
3414sed 's/^/| /' conftest.$ac_ext >&5
3415
3416eval "$as_ac_Header=no"
3417fi
3418rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3419fi
3420echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3421echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3422if test `eval echo '${'$as_ac_Header'}'` = yes; then
3423 cat >>confdefs.h <<_ACEOF
3424#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3425_ACEOF
3426
3427fi
3428
3429done
3430
3431
3432echo "$as_me:$LINENO: checking for void *" >&5
3433echo $ECHO_N "checking for void *... $ECHO_C" >&6
3434if test "${ac_cv_type_void_p+set}" = set; then
3435 echo $ECHO_N "(cached) $ECHO_C" >&6
3436else
3437 cat >conftest.$ac_ext <<_ACEOF
3438/* confdefs.h. */
3439_ACEOF
3440cat confdefs.h >>conftest.$ac_ext
3441cat >>conftest.$ac_ext <<_ACEOF
3442/* end confdefs.h. */
3443$ac_includes_default
3444int
3445main ()
3446{
3447if ((void * *) 0)
3448 return 0;
3449if (sizeof (void *))
3450 return 0;
3451 ;
3452 return 0;
3453}
3454_ACEOF
3455rm -f conftest.$ac_objext
3456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3457 (eval $ac_compile) 2>conftest.er1
3458 ac_status=$?
3459 grep -v '^ *+' conftest.er1 >conftest.err
3460 rm -f conftest.er1
3461 cat conftest.err >&5
3462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3463 (exit $ac_status); } &&
e8b05380 3464 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3466 (eval $ac_try) 2>&5
3467 ac_status=$?
3468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3469 (exit $ac_status); }; } &&
3470 { ac_try='test -s conftest.$ac_objext'
3471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3472 (eval $ac_try) 2>&5
3473 ac_status=$?
3474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3475 (exit $ac_status); }; }; then
3476 ac_cv_type_void_p=yes
3477else
3478 echo "$as_me: failed program was:" >&5
3479sed 's/^/| /' conftest.$ac_ext >&5
3480
3481ac_cv_type_void_p=no
3482fi
3483rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3484fi
3485echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3486echo "${ECHO_T}$ac_cv_type_void_p" >&6
3487
ba479fd2
NN
3488echo "$as_me:$LINENO: checking size of void *" >&5
3489echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3490if test "${ac_cv_sizeof_void_p+set}" = set; then
3491 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 3492else
bf3b7cd3
JD
3493 if test "$ac_cv_type_void_p" = yes; then
3494 # The cast to unsigned long works around a bug in the HP C Compiler
3495 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3496 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3497 # This bug is HP SR number 8606223364.
3498 if test "$cross_compiling" = yes; then
3499 # Depending upon the size, compute the lo and hi bounds.
3500cat >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{
3510static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
3511test_array [0] = 0
3512
3513 ;
3514 return 0;
3515}
3516_ACEOF
3517rm -f conftest.$ac_objext
3518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3519 (eval $ac_compile) 2>conftest.er1
3520 ac_status=$?
3521 grep -v '^ *+' conftest.er1 >conftest.err
3522 rm -f conftest.er1
3523 cat conftest.err >&5
3524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3525 (exit $ac_status); } &&
e8b05380 3526 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3528 (eval $ac_try) 2>&5
3529 ac_status=$?
3530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3531 (exit $ac_status); }; } &&
3532 { ac_try='test -s conftest.$ac_objext'
3533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3534 (eval $ac_try) 2>&5
3535 ac_status=$?
3536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3537 (exit $ac_status); }; }; then
3538 ac_lo=0 ac_mid=0
3539 while :; do
3540 cat >conftest.$ac_ext <<_ACEOF
3541/* confdefs.h. */
3542_ACEOF
3543cat confdefs.h >>conftest.$ac_ext
3544cat >>conftest.$ac_ext <<_ACEOF
3545/* end confdefs.h. */
3546$ac_includes_default
3547int
3548main ()
3549{
3550static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3551test_array [0] = 0
3552
3553 ;
3554 return 0;
3555}
3556_ACEOF
3557rm -f conftest.$ac_objext
3558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3559 (eval $ac_compile) 2>conftest.er1
3560 ac_status=$?
3561 grep -v '^ *+' conftest.er1 >conftest.err
3562 rm -f conftest.er1
3563 cat conftest.err >&5
3564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3565 (exit $ac_status); } &&
e8b05380 3566 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3568 (eval $ac_try) 2>&5
3569 ac_status=$?
3570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3571 (exit $ac_status); }; } &&
3572 { ac_try='test -s conftest.$ac_objext'
3573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3574 (eval $ac_try) 2>&5
3575 ac_status=$?
3576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3577 (exit $ac_status); }; }; then
3578 ac_hi=$ac_mid; break
3579else
3580 echo "$as_me: failed program was:" >&5
3581sed 's/^/| /' conftest.$ac_ext >&5
3582
3583ac_lo=`expr $ac_mid + 1`
3584 if test $ac_lo -le $ac_mid; then
3585 ac_lo= ac_hi=
3586 break
3587 fi
3588 ac_mid=`expr 2 '*' $ac_mid + 1`
3589fi
3590rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3591 done
3592else
3593 echo "$as_me: failed program was:" >&5
3594sed 's/^/| /' conftest.$ac_ext >&5
3595
3596cat >conftest.$ac_ext <<_ACEOF
3597/* confdefs.h. */
3598_ACEOF
3599cat confdefs.h >>conftest.$ac_ext
3600cat >>conftest.$ac_ext <<_ACEOF
3601/* end confdefs.h. */
3602$ac_includes_default
3603int
3604main ()
3605{
3606static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
3607test_array [0] = 0
3608
3609 ;
3610 return 0;
3611}
3612_ACEOF
3613rm -f conftest.$ac_objext
3614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3615 (eval $ac_compile) 2>conftest.er1
3616 ac_status=$?
3617 grep -v '^ *+' conftest.er1 >conftest.err
3618 rm -f conftest.er1
3619 cat conftest.err >&5
3620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3621 (exit $ac_status); } &&
e8b05380 3622 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3624 (eval $ac_try) 2>&5
3625 ac_status=$?
3626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3627 (exit $ac_status); }; } &&
3628 { ac_try='test -s conftest.$ac_objext'
3629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3630 (eval $ac_try) 2>&5
3631 ac_status=$?
3632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3633 (exit $ac_status); }; }; then
3634 ac_hi=-1 ac_mid=-1
3635 while :; do
3636 cat >conftest.$ac_ext <<_ACEOF
3637/* confdefs.h. */
3638_ACEOF
3639cat confdefs.h >>conftest.$ac_ext
3640cat >>conftest.$ac_ext <<_ACEOF
3641/* end confdefs.h. */
3642$ac_includes_default
3643int
3644main ()
3645{
3646static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
3647test_array [0] = 0
3648
3649 ;
3650 return 0;
3651}
3652_ACEOF
3653rm -f conftest.$ac_objext
3654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3655 (eval $ac_compile) 2>conftest.er1
3656 ac_status=$?
3657 grep -v '^ *+' conftest.er1 >conftest.err
3658 rm -f conftest.er1
3659 cat conftest.err >&5
3660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3661 (exit $ac_status); } &&
e8b05380 3662 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3664 (eval $ac_try) 2>&5
3665 ac_status=$?
3666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3667 (exit $ac_status); }; } &&
3668 { ac_try='test -s conftest.$ac_objext'
3669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3670 (eval $ac_try) 2>&5
3671 ac_status=$?
3672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3673 (exit $ac_status); }; }; then
3674 ac_lo=$ac_mid; break
3675else
3676 echo "$as_me: failed program was:" >&5
3677sed 's/^/| /' conftest.$ac_ext >&5
3678
3679ac_hi=`expr '(' $ac_mid ')' - 1`
3680 if test $ac_mid -le $ac_hi; then
3681 ac_lo= ac_hi=
3682 break
3683 fi
3684 ac_mid=`expr 2 '*' $ac_mid`
3685fi
3686rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3687 done
3688else
3689 echo "$as_me: failed program was:" >&5
3690sed 's/^/| /' conftest.$ac_ext >&5
3691
3692ac_lo= ac_hi=
3693fi
3694rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3695fi
3696rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3697# Binary search between lo and hi bounds.
3698while test "x$ac_lo" != "x$ac_hi"; do
3699 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3700 cat >conftest.$ac_ext <<_ACEOF
3701/* confdefs.h. */
3702_ACEOF
3703cat confdefs.h >>conftest.$ac_ext
3704cat >>conftest.$ac_ext <<_ACEOF
3705/* end confdefs.h. */
3706$ac_includes_default
3707int
3708main ()
3709{
3710static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3711test_array [0] = 0
3712
3713 ;
3714 return 0;
3715}
3716_ACEOF
3717rm -f conftest.$ac_objext
3718if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3719 (eval $ac_compile) 2>conftest.er1
3720 ac_status=$?
3721 grep -v '^ *+' conftest.er1 >conftest.err
3722 rm -f conftest.er1
3723 cat conftest.err >&5
3724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3725 (exit $ac_status); } &&
e8b05380 3726 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3728 (eval $ac_try) 2>&5
3729 ac_status=$?
3730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3731 (exit $ac_status); }; } &&
3732 { ac_try='test -s conftest.$ac_objext'
3733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3734 (eval $ac_try) 2>&5
3735 ac_status=$?
3736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3737 (exit $ac_status); }; }; then
3738 ac_hi=$ac_mid
3739else
3740 echo "$as_me: failed program was:" >&5
3741sed 's/^/| /' conftest.$ac_ext >&5
3742
3743ac_lo=`expr '(' $ac_mid ')' + 1`
3744fi
3745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3746done
3747case $ac_lo in
3748?*) ac_cv_sizeof_void_p=$ac_lo;;
3749'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3750See \`config.log' for more details." >&5
3751echo "$as_me: error: cannot compute sizeof (void *), 77
3752See \`config.log' for more details." >&2;}
3753 { (exit 1); exit 1; }; } ;;
3754esac
3755else
3756 if test "$cross_compiling" = yes; then
e8b05380
PB
3757 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
3758echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
bf3b7cd3
JD
3759 { (exit 1); exit 1; }; }
3760else
3761 cat >conftest.$ac_ext <<_ACEOF
3762/* confdefs.h. */
3763_ACEOF
3764cat confdefs.h >>conftest.$ac_ext
3765cat >>conftest.$ac_ext <<_ACEOF
3766/* end confdefs.h. */
3767$ac_includes_default
3768long longval () { return (long) (sizeof (void *)); }
3769unsigned long ulongval () { return (long) (sizeof (void *)); }
3770#include <stdio.h>
3771#include <stdlib.h>
3772int
3773main ()
3774{
3775
3776 FILE *f = fopen ("conftest.val", "w");
3777 if (! f)
3778 exit (1);
3779 if (((long) (sizeof (void *))) < 0)
3780 {
3781 long i = longval ();
3782 if (i != ((long) (sizeof (void *))))
3783 exit (1);
3784 fprintf (f, "%ld\n", i);
3785 }
3786 else
3787 {
3788 unsigned long i = ulongval ();
3789 if (i != ((long) (sizeof (void *))))
3790 exit (1);
3791 fprintf (f, "%lu\n", i);
3792 }
3793 exit (ferror (f) || fclose (f) != 0);
3794
3795 ;
3796 return 0;
3797}
3798_ACEOF
3799rm -f conftest$ac_exeext
3800if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3801 (eval $ac_link) 2>&5
3802 ac_status=$?
3803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3804 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3806 (eval $ac_try) 2>&5
3807 ac_status=$?
3808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3809 (exit $ac_status); }; }; then
3810 ac_cv_sizeof_void_p=`cat conftest.val`
3811else
3812 echo "$as_me: program exited with status $ac_status" >&5
3813echo "$as_me: failed program was:" >&5
3814sed 's/^/| /' conftest.$ac_ext >&5
3815
3816( exit $ac_status )
3817{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3818See \`config.log' for more details." >&5
3819echo "$as_me: error: cannot compute sizeof (void *), 77
3820See \`config.log' for more details." >&2;}
3821 { (exit 1); exit 1; }; }
3822fi
3823rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3824fi
3825fi
3826rm -f conftest.val
3827else
3828 ac_cv_sizeof_void_p=0
3829fi
3830fi
3831echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3832echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3833cat >>confdefs.h <<_ACEOF
3834#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3835_ACEOF
3836
3837
3838echo "$as_me:$LINENO: checking for short" >&5
3839echo $ECHO_N "checking for short... $ECHO_C" >&6
3840if test "${ac_cv_type_short+set}" = set; then
3841 echo $ECHO_N "(cached) $ECHO_C" >&6
3842else
3843 cat >conftest.$ac_ext <<_ACEOF
3844/* confdefs.h. */
3845_ACEOF
3846cat confdefs.h >>conftest.$ac_ext
3847cat >>conftest.$ac_ext <<_ACEOF
3848/* end confdefs.h. */
3849$ac_includes_default
3850int
3851main ()
3852{
3853if ((short *) 0)
3854 return 0;
3855if (sizeof (short))
3856 return 0;
3857 ;
3858 return 0;
3859}
3860_ACEOF
3861rm -f conftest.$ac_objext
3862if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3863 (eval $ac_compile) 2>conftest.er1
3864 ac_status=$?
3865 grep -v '^ *+' conftest.er1 >conftest.err
3866 rm -f conftest.er1
3867 cat conftest.err >&5
3868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3869 (exit $ac_status); } &&
e8b05380 3870 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3872 (eval $ac_try) 2>&5
3873 ac_status=$?
3874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3875 (exit $ac_status); }; } &&
3876 { ac_try='test -s conftest.$ac_objext'
3877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3878 (eval $ac_try) 2>&5
3879 ac_status=$?
3880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3881 (exit $ac_status); }; }; then
3882 ac_cv_type_short=yes
3883else
3884 echo "$as_me: failed program was:" >&5
3885sed 's/^/| /' conftest.$ac_ext >&5
3886
3887ac_cv_type_short=no
3888fi
3889rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3890fi
3891echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
3892echo "${ECHO_T}$ac_cv_type_short" >&6
3893
3894echo "$as_me:$LINENO: checking size of short" >&5
3895echo $ECHO_N "checking size of short... $ECHO_C" >&6
3896if test "${ac_cv_sizeof_short+set}" = set; then
3897 echo $ECHO_N "(cached) $ECHO_C" >&6
3898else
3899 if test "$ac_cv_type_short" = yes; then
3900 # The cast to unsigned long works around a bug in the HP C Compiler
3901 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3902 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3903 # This bug is HP SR number 8606223364.
3904 if test "$cross_compiling" = yes; then
3905 # Depending upon the size, compute the lo and hi bounds.
3906cat >conftest.$ac_ext <<_ACEOF
3907/* confdefs.h. */
3908_ACEOF
3909cat confdefs.h >>conftest.$ac_ext
3910cat >>conftest.$ac_ext <<_ACEOF
3911/* end confdefs.h. */
3912$ac_includes_default
3913int
3914main ()
3915{
3916static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
3917test_array [0] = 0
3918
3919 ;
3920 return 0;
3921}
3922_ACEOF
3923rm -f conftest.$ac_objext
3924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3925 (eval $ac_compile) 2>conftest.er1
3926 ac_status=$?
3927 grep -v '^ *+' conftest.er1 >conftest.err
3928 rm -f conftest.er1
3929 cat conftest.err >&5
3930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3931 (exit $ac_status); } &&
e8b05380 3932 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3934 (eval $ac_try) 2>&5
3935 ac_status=$?
3936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3937 (exit $ac_status); }; } &&
3938 { ac_try='test -s conftest.$ac_objext'
3939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3940 (eval $ac_try) 2>&5
3941 ac_status=$?
3942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3943 (exit $ac_status); }; }; then
3944 ac_lo=0 ac_mid=0
3945 while :; do
3946 cat >conftest.$ac_ext <<_ACEOF
3947/* confdefs.h. */
3948_ACEOF
3949cat confdefs.h >>conftest.$ac_ext
3950cat >>conftest.$ac_ext <<_ACEOF
3951/* end confdefs.h. */
3952$ac_includes_default
3953int
3954main ()
3955{
3956static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
3957test_array [0] = 0
3958
3959 ;
3960 return 0;
3961}
3962_ACEOF
3963rm -f conftest.$ac_objext
3964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3965 (eval $ac_compile) 2>conftest.er1
3966 ac_status=$?
3967 grep -v '^ *+' conftest.er1 >conftest.err
3968 rm -f conftest.er1
3969 cat conftest.err >&5
3970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3971 (exit $ac_status); } &&
e8b05380 3972 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3974 (eval $ac_try) 2>&5
3975 ac_status=$?
3976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3977 (exit $ac_status); }; } &&
3978 { ac_try='test -s conftest.$ac_objext'
3979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3980 (eval $ac_try) 2>&5
3981 ac_status=$?
3982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3983 (exit $ac_status); }; }; then
3984 ac_hi=$ac_mid; break
3985else
3986 echo "$as_me: failed program was:" >&5
3987sed 's/^/| /' conftest.$ac_ext >&5
3988
3989ac_lo=`expr $ac_mid + 1`
3990 if test $ac_lo -le $ac_mid; then
3991 ac_lo= ac_hi=
3992 break
3993 fi
3994 ac_mid=`expr 2 '*' $ac_mid + 1`
3995fi
3996rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3997 done
3998else
3999 echo "$as_me: failed program was:" >&5
4000sed 's/^/| /' conftest.$ac_ext >&5
4001
4002cat >conftest.$ac_ext <<_ACEOF
4003/* confdefs.h. */
4004_ACEOF
4005cat confdefs.h >>conftest.$ac_ext
4006cat >>conftest.$ac_ext <<_ACEOF
4007/* end confdefs.h. */
4008$ac_includes_default
4009int
4010main ()
4011{
4012static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
4013test_array [0] = 0
4014
4015 ;
4016 return 0;
4017}
4018_ACEOF
4019rm -f conftest.$ac_objext
4020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4021 (eval $ac_compile) 2>conftest.er1
4022 ac_status=$?
4023 grep -v '^ *+' conftest.er1 >conftest.err
4024 rm -f conftest.er1
4025 cat conftest.err >&5
4026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4027 (exit $ac_status); } &&
e8b05380 4028 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4030 (eval $ac_try) 2>&5
4031 ac_status=$?
4032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4033 (exit $ac_status); }; } &&
4034 { ac_try='test -s conftest.$ac_objext'
4035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4036 (eval $ac_try) 2>&5
4037 ac_status=$?
4038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4039 (exit $ac_status); }; }; then
4040 ac_hi=-1 ac_mid=-1
4041 while :; do
4042 cat >conftest.$ac_ext <<_ACEOF
4043/* confdefs.h. */
4044_ACEOF
4045cat confdefs.h >>conftest.$ac_ext
4046cat >>conftest.$ac_ext <<_ACEOF
4047/* end confdefs.h. */
4048$ac_includes_default
4049int
4050main ()
4051{
4052static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
4053test_array [0] = 0
4054
4055 ;
4056 return 0;
4057}
4058_ACEOF
4059rm -f conftest.$ac_objext
4060if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4061 (eval $ac_compile) 2>conftest.er1
4062 ac_status=$?
4063 grep -v '^ *+' conftest.er1 >conftest.err
4064 rm -f conftest.er1
4065 cat conftest.err >&5
4066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4067 (exit $ac_status); } &&
e8b05380 4068 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4070 (eval $ac_try) 2>&5
4071 ac_status=$?
4072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4073 (exit $ac_status); }; } &&
4074 { ac_try='test -s conftest.$ac_objext'
4075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4076 (eval $ac_try) 2>&5
4077 ac_status=$?
4078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4079 (exit $ac_status); }; }; then
4080 ac_lo=$ac_mid; break
4081else
4082 echo "$as_me: failed program was:" >&5
4083sed 's/^/| /' conftest.$ac_ext >&5
4084
4085ac_hi=`expr '(' $ac_mid ')' - 1`
4086 if test $ac_mid -le $ac_hi; then
4087 ac_lo= ac_hi=
4088 break
4089 fi
4090 ac_mid=`expr 2 '*' $ac_mid`
4091fi
4092rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4093 done
4094else
4095 echo "$as_me: failed program was:" >&5
4096sed 's/^/| /' conftest.$ac_ext >&5
4097
4098ac_lo= ac_hi=
4099fi
4100rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4101fi
4102rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4103# Binary search between lo and hi bounds.
4104while test "x$ac_lo" != "x$ac_hi"; do
4105 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4106 cat >conftest.$ac_ext <<_ACEOF
4107/* confdefs.h. */
4108_ACEOF
4109cat confdefs.h >>conftest.$ac_ext
4110cat >>conftest.$ac_ext <<_ACEOF
4111/* end confdefs.h. */
4112$ac_includes_default
4113int
4114main ()
4115{
4116static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4117test_array [0] = 0
4118
4119 ;
4120 return 0;
4121}
4122_ACEOF
4123rm -f conftest.$ac_objext
4124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4125 (eval $ac_compile) 2>conftest.er1
4126 ac_status=$?
4127 grep -v '^ *+' conftest.er1 >conftest.err
4128 rm -f conftest.er1
4129 cat conftest.err >&5
4130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4131 (exit $ac_status); } &&
e8b05380 4132 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4134 (eval $ac_try) 2>&5
4135 ac_status=$?
4136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4137 (exit $ac_status); }; } &&
4138 { ac_try='test -s conftest.$ac_objext'
4139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4140 (eval $ac_try) 2>&5
4141 ac_status=$?
4142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4143 (exit $ac_status); }; }; then
4144 ac_hi=$ac_mid
4145else
4146 echo "$as_me: failed program was:" >&5
4147sed 's/^/| /' conftest.$ac_ext >&5
4148
4149ac_lo=`expr '(' $ac_mid ')' + 1`
4150fi
4151rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4152done
4153case $ac_lo in
4154?*) ac_cv_sizeof_short=$ac_lo;;
4155'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4156See \`config.log' for more details." >&5
4157echo "$as_me: error: cannot compute sizeof (short), 77
4158See \`config.log' for more details." >&2;}
4159 { (exit 1); exit 1; }; } ;;
4160esac
4161else
4162 if test "$cross_compiling" = yes; then
e8b05380
PB
4163 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
4164echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
bf3b7cd3
JD
4165 { (exit 1); exit 1; }; }
4166else
4167 cat >conftest.$ac_ext <<_ACEOF
4168/* confdefs.h. */
4169_ACEOF
4170cat confdefs.h >>conftest.$ac_ext
4171cat >>conftest.$ac_ext <<_ACEOF
4172/* end confdefs.h. */
4173$ac_includes_default
4174long longval () { return (long) (sizeof (short)); }
4175unsigned long ulongval () { return (long) (sizeof (short)); }
4176#include <stdio.h>
4177#include <stdlib.h>
4178int
4179main ()
4180{
4181
4182 FILE *f = fopen ("conftest.val", "w");
4183 if (! f)
4184 exit (1);
4185 if (((long) (sizeof (short))) < 0)
4186 {
4187 long i = longval ();
4188 if (i != ((long) (sizeof (short))))
4189 exit (1);
4190 fprintf (f, "%ld\n", i);
4191 }
4192 else
4193 {
4194 unsigned long i = ulongval ();
4195 if (i != ((long) (sizeof (short))))
4196 exit (1);
4197 fprintf (f, "%lu\n", i);
4198 }
4199 exit (ferror (f) || fclose (f) != 0);
4200
4201 ;
4202 return 0;
4203}
4204_ACEOF
4205rm -f conftest$ac_exeext
4206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4207 (eval $ac_link) 2>&5
4208 ac_status=$?
4209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4210 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4212 (eval $ac_try) 2>&5
4213 ac_status=$?
4214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4215 (exit $ac_status); }; }; then
4216 ac_cv_sizeof_short=`cat conftest.val`
4217else
4218 echo "$as_me: program exited with status $ac_status" >&5
4219echo "$as_me: failed program was:" >&5
4220sed 's/^/| /' conftest.$ac_ext >&5
4221
4222( exit $ac_status )
4223{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4224See \`config.log' for more details." >&5
4225echo "$as_me: error: cannot compute sizeof (short), 77
4226See \`config.log' for more details." >&2;}
4227 { (exit 1); exit 1; }; }
4228fi
4229rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4230fi
4231fi
4232rm -f conftest.val
4233else
4234 ac_cv_sizeof_short=0
4235fi
4236fi
4237echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4238echo "${ECHO_T}$ac_cv_sizeof_short" >&6
4239cat >>confdefs.h <<_ACEOF
4240#define SIZEOF_SHORT $ac_cv_sizeof_short
4241_ACEOF
4242
4243
4244echo "$as_me:$LINENO: checking for int" >&5
4245echo $ECHO_N "checking for int... $ECHO_C" >&6
4246if test "${ac_cv_type_int+set}" = set; then
4247 echo $ECHO_N "(cached) $ECHO_C" >&6
4248else
4249 cat >conftest.$ac_ext <<_ACEOF
4250/* confdefs.h. */
4251_ACEOF
4252cat confdefs.h >>conftest.$ac_ext
4253cat >>conftest.$ac_ext <<_ACEOF
4254/* end confdefs.h. */
4255$ac_includes_default
4256int
4257main ()
4258{
4259if ((int *) 0)
4260 return 0;
4261if (sizeof (int))
4262 return 0;
4263 ;
4264 return 0;
4265}
4266_ACEOF
4267rm -f conftest.$ac_objext
4268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4269 (eval $ac_compile) 2>conftest.er1
4270 ac_status=$?
4271 grep -v '^ *+' conftest.er1 >conftest.err
4272 rm -f conftest.er1
4273 cat conftest.err >&5
4274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4275 (exit $ac_status); } &&
e8b05380 4276 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4278 (eval $ac_try) 2>&5
4279 ac_status=$?
4280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4281 (exit $ac_status); }; } &&
4282 { ac_try='test -s conftest.$ac_objext'
4283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4284 (eval $ac_try) 2>&5
4285 ac_status=$?
4286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4287 (exit $ac_status); }; }; then
4288 ac_cv_type_int=yes
4289else
4290 echo "$as_me: failed program was:" >&5
4291sed 's/^/| /' conftest.$ac_ext >&5
4292
4293ac_cv_type_int=no
4294fi
4295rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4296fi
4297echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4298echo "${ECHO_T}$ac_cv_type_int" >&6
4299
4300echo "$as_me:$LINENO: checking size of int" >&5
4301echo $ECHO_N "checking size of int... $ECHO_C" >&6
4302if test "${ac_cv_sizeof_int+set}" = set; then
4303 echo $ECHO_N "(cached) $ECHO_C" >&6
4304else
4305 if test "$ac_cv_type_int" = yes; then
4306 # The cast to unsigned long works around a bug in the HP C Compiler
4307 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4308 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4309 # This bug is HP SR number 8606223364.
4310 if test "$cross_compiling" = yes; then
4311 # Depending upon the size, compute the lo and hi bounds.
4312cat >conftest.$ac_ext <<_ACEOF
4313/* confdefs.h. */
4314_ACEOF
4315cat confdefs.h >>conftest.$ac_ext
4316cat >>conftest.$ac_ext <<_ACEOF
4317/* end confdefs.h. */
4318$ac_includes_default
4319int
4320main ()
4321{
4322static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4323test_array [0] = 0
4324
4325 ;
4326 return 0;
4327}
4328_ACEOF
4329rm -f conftest.$ac_objext
4330if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4331 (eval $ac_compile) 2>conftest.er1
4332 ac_status=$?
4333 grep -v '^ *+' conftest.er1 >conftest.err
4334 rm -f conftest.er1
4335 cat conftest.err >&5
4336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4337 (exit $ac_status); } &&
e8b05380 4338 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4340 (eval $ac_try) 2>&5
4341 ac_status=$?
4342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4343 (exit $ac_status); }; } &&
4344 { ac_try='test -s conftest.$ac_objext'
4345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4346 (eval $ac_try) 2>&5
4347 ac_status=$?
4348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4349 (exit $ac_status); }; }; then
4350 ac_lo=0 ac_mid=0
4351 while :; do
4352 cat >conftest.$ac_ext <<_ACEOF
4353/* confdefs.h. */
4354_ACEOF
4355cat confdefs.h >>conftest.$ac_ext
4356cat >>conftest.$ac_ext <<_ACEOF
4357/* end confdefs.h. */
4358$ac_includes_default
4359int
4360main ()
4361{
4362static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4363test_array [0] = 0
4364
4365 ;
4366 return 0;
4367}
4368_ACEOF
4369rm -f conftest.$ac_objext
4370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4371 (eval $ac_compile) 2>conftest.er1
4372 ac_status=$?
4373 grep -v '^ *+' conftest.er1 >conftest.err
4374 rm -f conftest.er1
4375 cat conftest.err >&5
4376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4377 (exit $ac_status); } &&
e8b05380 4378 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4380 (eval $ac_try) 2>&5
4381 ac_status=$?
4382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4383 (exit $ac_status); }; } &&
4384 { ac_try='test -s conftest.$ac_objext'
4385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4386 (eval $ac_try) 2>&5
4387 ac_status=$?
4388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4389 (exit $ac_status); }; }; then
4390 ac_hi=$ac_mid; break
4391else
4392 echo "$as_me: failed program was:" >&5
4393sed 's/^/| /' conftest.$ac_ext >&5
4394
4395ac_lo=`expr $ac_mid + 1`
4396 if test $ac_lo -le $ac_mid; then
4397 ac_lo= ac_hi=
4398 break
4399 fi
4400 ac_mid=`expr 2 '*' $ac_mid + 1`
4401fi
4402rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4403 done
4404else
4405 echo "$as_me: failed program was:" >&5
4406sed 's/^/| /' conftest.$ac_ext >&5
4407
4408cat >conftest.$ac_ext <<_ACEOF
4409/* confdefs.h. */
4410_ACEOF
4411cat confdefs.h >>conftest.$ac_ext
4412cat >>conftest.$ac_ext <<_ACEOF
4413/* end confdefs.h. */
4414$ac_includes_default
4415int
4416main ()
4417{
4418static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4419test_array [0] = 0
4420
4421 ;
4422 return 0;
4423}
4424_ACEOF
4425rm -f conftest.$ac_objext
4426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4427 (eval $ac_compile) 2>conftest.er1
4428 ac_status=$?
4429 grep -v '^ *+' conftest.er1 >conftest.err
4430 rm -f conftest.er1
4431 cat conftest.err >&5
4432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4433 (exit $ac_status); } &&
e8b05380 4434 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4436 (eval $ac_try) 2>&5
4437 ac_status=$?
4438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4439 (exit $ac_status); }; } &&
4440 { ac_try='test -s conftest.$ac_objext'
4441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4442 (eval $ac_try) 2>&5
4443 ac_status=$?
4444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4445 (exit $ac_status); }; }; then
4446 ac_hi=-1 ac_mid=-1
4447 while :; do
4448 cat >conftest.$ac_ext <<_ACEOF
4449/* confdefs.h. */
4450_ACEOF
4451cat confdefs.h >>conftest.$ac_ext
4452cat >>conftest.$ac_ext <<_ACEOF
4453/* end confdefs.h. */
4454$ac_includes_default
4455int
4456main ()
4457{
4458static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4459test_array [0] = 0
4460
4461 ;
4462 return 0;
4463}
4464_ACEOF
4465rm -f conftest.$ac_objext
4466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4467 (eval $ac_compile) 2>conftest.er1
4468 ac_status=$?
4469 grep -v '^ *+' conftest.er1 >conftest.err
4470 rm -f conftest.er1
4471 cat conftest.err >&5
4472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4473 (exit $ac_status); } &&
e8b05380 4474 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4476 (eval $ac_try) 2>&5
4477 ac_status=$?
4478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4479 (exit $ac_status); }; } &&
4480 { ac_try='test -s conftest.$ac_objext'
4481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4482 (eval $ac_try) 2>&5
4483 ac_status=$?
4484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4485 (exit $ac_status); }; }; then
4486 ac_lo=$ac_mid; break
4487else
4488 echo "$as_me: failed program was:" >&5
4489sed 's/^/| /' conftest.$ac_ext >&5
4490
4491ac_hi=`expr '(' $ac_mid ')' - 1`
4492 if test $ac_mid -le $ac_hi; then
4493 ac_lo= ac_hi=
4494 break
4495 fi
4496 ac_mid=`expr 2 '*' $ac_mid`
4497fi
4498rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4499 done
4500else
4501 echo "$as_me: failed program was:" >&5
4502sed 's/^/| /' conftest.$ac_ext >&5
4503
4504ac_lo= ac_hi=
4505fi
4506rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4507fi
4508rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4509# Binary search between lo and hi bounds.
4510while test "x$ac_lo" != "x$ac_hi"; do
4511 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4512 cat >conftest.$ac_ext <<_ACEOF
4513/* confdefs.h. */
4514_ACEOF
4515cat confdefs.h >>conftest.$ac_ext
4516cat >>conftest.$ac_ext <<_ACEOF
4517/* end confdefs.h. */
4518$ac_includes_default
4519int
4520main ()
4521{
4522static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4523test_array [0] = 0
4524
4525 ;
4526 return 0;
4527}
4528_ACEOF
4529rm -f conftest.$ac_objext
4530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4531 (eval $ac_compile) 2>conftest.er1
4532 ac_status=$?
4533 grep -v '^ *+' conftest.er1 >conftest.err
4534 rm -f conftest.er1
4535 cat conftest.err >&5
4536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4537 (exit $ac_status); } &&
e8b05380 4538 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4540 (eval $ac_try) 2>&5
4541 ac_status=$?
4542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4543 (exit $ac_status); }; } &&
4544 { ac_try='test -s conftest.$ac_objext'
4545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4546 (eval $ac_try) 2>&5
4547 ac_status=$?
4548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4549 (exit $ac_status); }; }; then
4550 ac_hi=$ac_mid
4551else
4552 echo "$as_me: failed program was:" >&5
4553sed 's/^/| /' conftest.$ac_ext >&5
4554
4555ac_lo=`expr '(' $ac_mid ')' + 1`
4556fi
4557rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4558done
4559case $ac_lo in
4560?*) ac_cv_sizeof_int=$ac_lo;;
4561'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4562See \`config.log' for more details." >&5
4563echo "$as_me: error: cannot compute sizeof (int), 77
4564See \`config.log' for more details." >&2;}
4565 { (exit 1); exit 1; }; } ;;
4566esac
4567else
4568 if test "$cross_compiling" = yes; then
e8b05380
PB
4569 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
4570echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
bf3b7cd3
JD
4571 { (exit 1); exit 1; }; }
4572else
4573 cat >conftest.$ac_ext <<_ACEOF
4574/* confdefs.h. */
4575_ACEOF
4576cat confdefs.h >>conftest.$ac_ext
4577cat >>conftest.$ac_ext <<_ACEOF
4578/* end confdefs.h. */
4579$ac_includes_default
4580long longval () { return (long) (sizeof (int)); }
4581unsigned long ulongval () { return (long) (sizeof (int)); }
4582#include <stdio.h>
4583#include <stdlib.h>
4584int
4585main ()
4586{
4587
4588 FILE *f = fopen ("conftest.val", "w");
4589 if (! f)
4590 exit (1);
4591 if (((long) (sizeof (int))) < 0)
4592 {
4593 long i = longval ();
4594 if (i != ((long) (sizeof (int))))
4595 exit (1);
4596 fprintf (f, "%ld\n", i);
4597 }
4598 else
4599 {
4600 unsigned long i = ulongval ();
4601 if (i != ((long) (sizeof (int))))
4602 exit (1);
4603 fprintf (f, "%lu\n", i);
4604 }
4605 exit (ferror (f) || fclose (f) != 0);
4606
4607 ;
4608 return 0;
4609}
4610_ACEOF
4611rm -f conftest$ac_exeext
4612if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4613 (eval $ac_link) 2>&5
4614 ac_status=$?
4615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4616 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4618 (eval $ac_try) 2>&5
4619 ac_status=$?
4620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4621 (exit $ac_status); }; }; then
4622 ac_cv_sizeof_int=`cat conftest.val`
4623else
4624 echo "$as_me: program exited with status $ac_status" >&5
4625echo "$as_me: failed program was:" >&5
4626sed 's/^/| /' conftest.$ac_ext >&5
4627
4628( exit $ac_status )
4629{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4630See \`config.log' for more details." >&5
4631echo "$as_me: error: cannot compute sizeof (int), 77
4632See \`config.log' for more details." >&2;}
4633 { (exit 1); exit 1; }; }
4634fi
4635rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4636fi
4637fi
4638rm -f conftest.val
4639else
4640 ac_cv_sizeof_int=0
4641fi
4642fi
4643echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4644echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4645cat >>confdefs.h <<_ACEOF
4646#define SIZEOF_INT $ac_cv_sizeof_int
4647_ACEOF
4648
4649
4650echo "$as_me:$LINENO: checking for long" >&5
4651echo $ECHO_N "checking for long... $ECHO_C" >&6
4652if test "${ac_cv_type_long+set}" = set; then
4653 echo $ECHO_N "(cached) $ECHO_C" >&6
4654else
4655 cat >conftest.$ac_ext <<_ACEOF
4656/* confdefs.h. */
4657_ACEOF
4658cat confdefs.h >>conftest.$ac_ext
4659cat >>conftest.$ac_ext <<_ACEOF
4660/* end confdefs.h. */
4661$ac_includes_default
4662int
4663main ()
4664{
4665if ((long *) 0)
4666 return 0;
4667if (sizeof (long))
4668 return 0;
4669 ;
4670 return 0;
4671}
4672_ACEOF
4673rm -f conftest.$ac_objext
4674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4675 (eval $ac_compile) 2>conftest.er1
4676 ac_status=$?
4677 grep -v '^ *+' conftest.er1 >conftest.err
4678 rm -f conftest.er1
4679 cat conftest.err >&5
4680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4681 (exit $ac_status); } &&
e8b05380 4682 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4684 (eval $ac_try) 2>&5
4685 ac_status=$?
4686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4687 (exit $ac_status); }; } &&
4688 { ac_try='test -s conftest.$ac_objext'
4689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4690 (eval $ac_try) 2>&5
4691 ac_status=$?
4692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4693 (exit $ac_status); }; }; then
4694 ac_cv_type_long=yes
4695else
4696 echo "$as_me: failed program was:" >&5
4697sed 's/^/| /' conftest.$ac_ext >&5
4698
4699ac_cv_type_long=no
4700fi
4701rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4702fi
4703echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4704echo "${ECHO_T}$ac_cv_type_long" >&6
4705
4706echo "$as_me:$LINENO: checking size of long" >&5
4707echo $ECHO_N "checking size of long... $ECHO_C" >&6
4708if test "${ac_cv_sizeof_long+set}" = set; then
4709 echo $ECHO_N "(cached) $ECHO_C" >&6
4710else
4711 if test "$ac_cv_type_long" = yes; then
4712 # The cast to unsigned long works around a bug in the HP C Compiler
4713 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4714 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4715 # This bug is HP SR number 8606223364.
4716 if test "$cross_compiling" = yes; then
4717 # Depending upon the size, compute the lo and hi bounds.
4718cat >conftest.$ac_ext <<_ACEOF
4719/* confdefs.h. */
4720_ACEOF
4721cat confdefs.h >>conftest.$ac_ext
4722cat >>conftest.$ac_ext <<_ACEOF
4723/* end confdefs.h. */
4724$ac_includes_default
4725int
4726main ()
4727{
4728static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
4729test_array [0] = 0
4730
4731 ;
4732 return 0;
4733}
4734_ACEOF
4735rm -f conftest.$ac_objext
4736if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4737 (eval $ac_compile) 2>conftest.er1
4738 ac_status=$?
4739 grep -v '^ *+' conftest.er1 >conftest.err
4740 rm -f conftest.er1
4741 cat conftest.err >&5
4742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4743 (exit $ac_status); } &&
e8b05380 4744 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4746 (eval $ac_try) 2>&5
4747 ac_status=$?
4748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4749 (exit $ac_status); }; } &&
4750 { ac_try='test -s conftest.$ac_objext'
4751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4752 (eval $ac_try) 2>&5
4753 ac_status=$?
4754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4755 (exit $ac_status); }; }; then
4756 ac_lo=0 ac_mid=0
4757 while :; do
4758 cat >conftest.$ac_ext <<_ACEOF
4759/* confdefs.h. */
4760_ACEOF
4761cat confdefs.h >>conftest.$ac_ext
4762cat >>conftest.$ac_ext <<_ACEOF
4763/* end confdefs.h. */
4764$ac_includes_default
4765int
4766main ()
4767{
4768static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4769test_array [0] = 0
4770
4771 ;
4772 return 0;
4773}
4774_ACEOF
4775rm -f conftest.$ac_objext
4776if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4777 (eval $ac_compile) 2>conftest.er1
4778 ac_status=$?
4779 grep -v '^ *+' conftest.er1 >conftest.err
4780 rm -f conftest.er1
4781 cat conftest.err >&5
4782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4783 (exit $ac_status); } &&
e8b05380 4784 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4786 (eval $ac_try) 2>&5
4787 ac_status=$?
4788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4789 (exit $ac_status); }; } &&
4790 { ac_try='test -s conftest.$ac_objext'
4791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4792 (eval $ac_try) 2>&5
4793 ac_status=$?
4794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4795 (exit $ac_status); }; }; then
4796 ac_hi=$ac_mid; break
4797else
4798 echo "$as_me: failed program was:" >&5
4799sed 's/^/| /' conftest.$ac_ext >&5
4800
4801ac_lo=`expr $ac_mid + 1`
4802 if test $ac_lo -le $ac_mid; then
4803 ac_lo= ac_hi=
4804 break
4805 fi
4806 ac_mid=`expr 2 '*' $ac_mid + 1`
4807fi
4808rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4809 done
4810else
4811 echo "$as_me: failed program was:" >&5
4812sed 's/^/| /' conftest.$ac_ext >&5
4813
4814cat >conftest.$ac_ext <<_ACEOF
4815/* confdefs.h. */
4816_ACEOF
4817cat confdefs.h >>conftest.$ac_ext
4818cat >>conftest.$ac_ext <<_ACEOF
4819/* end confdefs.h. */
4820$ac_includes_default
4821int
4822main ()
4823{
4824static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
4825test_array [0] = 0
4826
4827 ;
4828 return 0;
4829}
4830_ACEOF
4831rm -f conftest.$ac_objext
4832if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4833 (eval $ac_compile) 2>conftest.er1
4834 ac_status=$?
4835 grep -v '^ *+' conftest.er1 >conftest.err
4836 rm -f conftest.er1
4837 cat conftest.err >&5
4838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4839 (exit $ac_status); } &&
e8b05380 4840 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4842 (eval $ac_try) 2>&5
4843 ac_status=$?
4844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4845 (exit $ac_status); }; } &&
4846 { ac_try='test -s conftest.$ac_objext'
4847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4848 (eval $ac_try) 2>&5
4849 ac_status=$?
4850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4851 (exit $ac_status); }; }; then
4852 ac_hi=-1 ac_mid=-1
4853 while :; do
4854 cat >conftest.$ac_ext <<_ACEOF
4855/* confdefs.h. */
4856_ACEOF
4857cat confdefs.h >>conftest.$ac_ext
4858cat >>conftest.$ac_ext <<_ACEOF
4859/* end confdefs.h. */
4860$ac_includes_default
4861int
4862main ()
4863{
4864static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
4865test_array [0] = 0
4866
4867 ;
4868 return 0;
4869}
4870_ACEOF
4871rm -f conftest.$ac_objext
4872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4873 (eval $ac_compile) 2>conftest.er1
4874 ac_status=$?
4875 grep -v '^ *+' conftest.er1 >conftest.err
4876 rm -f conftest.er1
4877 cat conftest.err >&5
4878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4879 (exit $ac_status); } &&
e8b05380 4880 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
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); }; } &&
4886 { ac_try='test -s conftest.$ac_objext'
4887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4888 (eval $ac_try) 2>&5
4889 ac_status=$?
4890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4891 (exit $ac_status); }; }; then
4892 ac_lo=$ac_mid; break
4893else
4894 echo "$as_me: failed program was:" >&5
4895sed 's/^/| /' conftest.$ac_ext >&5
4896
4897ac_hi=`expr '(' $ac_mid ')' - 1`
4898 if test $ac_mid -le $ac_hi; then
4899 ac_lo= ac_hi=
4900 break
4901 fi
4902 ac_mid=`expr 2 '*' $ac_mid`
4903fi
4904rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4905 done
4906else
4907 echo "$as_me: failed program was:" >&5
4908sed 's/^/| /' conftest.$ac_ext >&5
4909
4910ac_lo= ac_hi=
4911fi
4912rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4913fi
4914rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4915# Binary search between lo and hi bounds.
4916while test "x$ac_lo" != "x$ac_hi"; do
4917 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4918 cat >conftest.$ac_ext <<_ACEOF
4919/* confdefs.h. */
4920_ACEOF
4921cat confdefs.h >>conftest.$ac_ext
4922cat >>conftest.$ac_ext <<_ACEOF
4923/* end confdefs.h. */
4924$ac_includes_default
4925int
4926main ()
4927{
4928static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4929test_array [0] = 0
4930
4931 ;
4932 return 0;
4933}
4934_ACEOF
4935rm -f conftest.$ac_objext
4936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4937 (eval $ac_compile) 2>conftest.er1
4938 ac_status=$?
4939 grep -v '^ *+' conftest.er1 >conftest.err
4940 rm -f conftest.er1
4941 cat conftest.err >&5
4942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4943 (exit $ac_status); } &&
e8b05380 4944 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4946 (eval $ac_try) 2>&5
4947 ac_status=$?
4948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4949 (exit $ac_status); }; } &&
4950 { ac_try='test -s conftest.$ac_objext'
4951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4952 (eval $ac_try) 2>&5
4953 ac_status=$?
4954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4955 (exit $ac_status); }; }; then
4956 ac_hi=$ac_mid
4957else
4958 echo "$as_me: failed program was:" >&5
4959sed 's/^/| /' conftest.$ac_ext >&5
4960
4961ac_lo=`expr '(' $ac_mid ')' + 1`
4962fi
4963rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4964done
4965case $ac_lo in
4966?*) ac_cv_sizeof_long=$ac_lo;;
4967'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
4968See \`config.log' for more details." >&5
4969echo "$as_me: error: cannot compute sizeof (long), 77
4970See \`config.log' for more details." >&2;}
4971 { (exit 1); exit 1; }; } ;;
4972esac
4973else
4974 if test "$cross_compiling" = yes; then
e8b05380
PB
4975 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
4976echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
bf3b7cd3
JD
4977 { (exit 1); exit 1; }; }
4978else
4979 cat >conftest.$ac_ext <<_ACEOF
4980/* confdefs.h. */
4981_ACEOF
4982cat confdefs.h >>conftest.$ac_ext
4983cat >>conftest.$ac_ext <<_ACEOF
4984/* end confdefs.h. */
4985$ac_includes_default
4986long longval () { return (long) (sizeof (long)); }
4987unsigned long ulongval () { return (long) (sizeof (long)); }
4988#include <stdio.h>
4989#include <stdlib.h>
4990int
4991main ()
4992{
4993
4994 FILE *f = fopen ("conftest.val", "w");
4995 if (! f)
4996 exit (1);
4997 if (((long) (sizeof (long))) < 0)
4998 {
4999 long i = longval ();
5000 if (i != ((long) (sizeof (long))))
5001 exit (1);
5002 fprintf (f, "%ld\n", i);
5003 }
5004 else
5005 {
5006 unsigned long i = ulongval ();
5007 if (i != ((long) (sizeof (long))))
5008 exit (1);
5009 fprintf (f, "%lu\n", i);
5010 }
5011 exit (ferror (f) || fclose (f) != 0);
5012
5013 ;
5014 return 0;
5015}
5016_ACEOF
5017rm -f conftest$ac_exeext
5018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5019 (eval $ac_link) 2>&5
5020 ac_status=$?
5021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5022 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5024 (eval $ac_try) 2>&5
5025 ac_status=$?
5026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5027 (exit $ac_status); }; }; then
5028 ac_cv_sizeof_long=`cat conftest.val`
5029else
5030 echo "$as_me: program exited with status $ac_status" >&5
5031echo "$as_me: failed program was:" >&5
5032sed 's/^/| /' conftest.$ac_ext >&5
5033
5034( exit $ac_status )
5035{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5036See \`config.log' for more details." >&5
5037echo "$as_me: error: cannot compute sizeof (long), 77
5038See \`config.log' for more details." >&2;}
5039 { (exit 1); exit 1; }; }
5040fi
5041rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5042fi
5043fi
5044rm -f conftest.val
5045else
5046 ac_cv_sizeof_long=0
5047fi
5048fi
5049echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5050echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5051cat >>confdefs.h <<_ACEOF
5052#define SIZEOF_LONG $ac_cv_sizeof_long
5053_ACEOF
5054
5055
5ec1c5e6
KC
5056echo "$as_me:$LINENO: checking for long long" >&5
5057echo $ECHO_N "checking for long long... $ECHO_C" >&6
5058if test "${ac_cv_type_long_long+set}" = set; then
5059 echo $ECHO_N "(cached) $ECHO_C" >&6
5060else
5061 cat >conftest.$ac_ext <<_ACEOF
5062/* confdefs.h. */
5063_ACEOF
5064cat confdefs.h >>conftest.$ac_ext
5065cat >>conftest.$ac_ext <<_ACEOF
5066/* end confdefs.h. */
5067$ac_includes_default
5068int
5069main ()
5070{
5071if ((long long *) 0)
5072 return 0;
5073if (sizeof (long long))
5074 return 0;
5075 ;
5076 return 0;
5077}
5078_ACEOF
5079rm -f conftest.$ac_objext
5080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5081 (eval $ac_compile) 2>conftest.er1
5082 ac_status=$?
5083 grep -v '^ *+' conftest.er1 >conftest.err
5084 rm -f conftest.er1
5085 cat conftest.err >&5
5086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5087 (exit $ac_status); } &&
e8b05380 5088 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5ec1c5e6
KC
5089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5090 (eval $ac_try) 2>&5
5091 ac_status=$?
5092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5093 (exit $ac_status); }; } &&
5094 { ac_try='test -s conftest.$ac_objext'
5095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5096 (eval $ac_try) 2>&5
5097 ac_status=$?
5098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5099 (exit $ac_status); }; }; then
5100 ac_cv_type_long_long=yes
5101else
5102 echo "$as_me: failed program was:" >&5
5103sed 's/^/| /' conftest.$ac_ext >&5
5104
5105ac_cv_type_long_long=no
5106fi
5107rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5108fi
5109echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5110echo "${ECHO_T}$ac_cv_type_long_long" >&6
5111if test $ac_cv_type_long_long = yes; then
5112
5113cat >>confdefs.h <<_ACEOF
5114#define HAVE_LONG_LONG 1
5115_ACEOF
5116
5117echo "$as_me:$LINENO: checking for long long" >&5
bf3b7cd3
JD
5118echo $ECHO_N "checking for long long... $ECHO_C" >&6
5119if test "${ac_cv_type_long_long+set}" = set; then
5120 echo $ECHO_N "(cached) $ECHO_C" >&6
5121else
5122 cat >conftest.$ac_ext <<_ACEOF
5123/* confdefs.h. */
5124_ACEOF
5125cat confdefs.h >>conftest.$ac_ext
5126cat >>conftest.$ac_ext <<_ACEOF
5127/* end confdefs.h. */
5128$ac_includes_default
5129int
5130main ()
5131{
5132if ((long long *) 0)
5133 return 0;
5134if (sizeof (long long))
5135 return 0;
5136 ;
5137 return 0;
5138}
5139_ACEOF
5140rm -f conftest.$ac_objext
5141if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5142 (eval $ac_compile) 2>conftest.er1
5143 ac_status=$?
5144 grep -v '^ *+' conftest.er1 >conftest.err
5145 rm -f conftest.er1
5146 cat conftest.err >&5
5147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5148 (exit $ac_status); } &&
e8b05380 5149 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
5150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5151 (eval $ac_try) 2>&5
5152 ac_status=$?
5153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5154 (exit $ac_status); }; } &&
5155 { ac_try='test -s conftest.$ac_objext'
5156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5157 (eval $ac_try) 2>&5
5158 ac_status=$?
5159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5160 (exit $ac_status); }; }; then
5161 ac_cv_type_long_long=yes
5162else
5163 echo "$as_me: failed program was:" >&5
5164sed 's/^/| /' conftest.$ac_ext >&5
5165
5166ac_cv_type_long_long=no
5167fi
5168rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5169fi
5170echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5171echo "${ECHO_T}$ac_cv_type_long_long" >&6
5172
5173echo "$as_me:$LINENO: checking size of long long" >&5
5174echo $ECHO_N "checking size of long long... $ECHO_C" >&6
5175if test "${ac_cv_sizeof_long_long+set}" = set; then
5176 echo $ECHO_N "(cached) $ECHO_C" >&6
5177else
5178 if test "$ac_cv_type_long_long" = yes; then
5179 # The cast to unsigned long works around a bug in the HP C Compiler
5180 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5181 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5182 # This bug is HP SR number 8606223364.
5183 if test "$cross_compiling" = yes; then
5184 # Depending upon the size, compute the lo and hi bounds.
5185cat >conftest.$ac_ext <<_ACEOF
5186/* confdefs.h. */
5187_ACEOF
5188cat confdefs.h >>conftest.$ac_ext
5189cat >>conftest.$ac_ext <<_ACEOF
5190/* end confdefs.h. */
5191$ac_includes_default
5192int
5193main ()
5194{
5195static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
5196test_array [0] = 0
5197
5198 ;
5199 return 0;
5200}
5201_ACEOF
5202rm -f conftest.$ac_objext
5203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5204 (eval $ac_compile) 2>conftest.er1
5205 ac_status=$?
5206 grep -v '^ *+' conftest.er1 >conftest.err
5207 rm -f conftest.er1
5208 cat conftest.err >&5
5209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5210 (exit $ac_status); } &&
e8b05380 5211 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
5212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5213 (eval $ac_try) 2>&5
5214 ac_status=$?
5215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5216 (exit $ac_status); }; } &&
5217 { ac_try='test -s conftest.$ac_objext'
5218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5219 (eval $ac_try) 2>&5
5220 ac_status=$?
5221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5222 (exit $ac_status); }; }; then
5223 ac_lo=0 ac_mid=0
5224 while :; do
5225 cat >conftest.$ac_ext <<_ACEOF
5226/* confdefs.h. */
5227_ACEOF
5228cat confdefs.h >>conftest.$ac_ext
5229cat >>conftest.$ac_ext <<_ACEOF
5230/* end confdefs.h. */
5231$ac_includes_default
5232int
5233main ()
5234{
5235static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5236test_array [0] = 0
5237
5238 ;
5239 return 0;
5240}
5241_ACEOF
5242rm -f conftest.$ac_objext
5243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5244 (eval $ac_compile) 2>conftest.er1
5245 ac_status=$?
5246 grep -v '^ *+' conftest.er1 >conftest.err
5247 rm -f conftest.er1
5248 cat conftest.err >&5
5249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5250 (exit $ac_status); } &&
e8b05380 5251 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
5252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5253 (eval $ac_try) 2>&5
5254 ac_status=$?
5255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5256 (exit $ac_status); }; } &&
5257 { ac_try='test -s conftest.$ac_objext'
5258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5259 (eval $ac_try) 2>&5
5260 ac_status=$?
5261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5262 (exit $ac_status); }; }; then
5263 ac_hi=$ac_mid; break
5264else
5265 echo "$as_me: failed program was:" >&5
5266sed 's/^/| /' conftest.$ac_ext >&5
5267
5268ac_lo=`expr $ac_mid + 1`
5269 if test $ac_lo -le $ac_mid; then
5270 ac_lo= ac_hi=
5271 break
5272 fi
5273 ac_mid=`expr 2 '*' $ac_mid + 1`
5274fi
5275rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5276 done
5277else
5278 echo "$as_me: failed program was:" >&5
5279sed 's/^/| /' conftest.$ac_ext >&5
5280
5281cat >conftest.$ac_ext <<_ACEOF
5282/* confdefs.h. */
5283_ACEOF
5284cat confdefs.h >>conftest.$ac_ext
5285cat >>conftest.$ac_ext <<_ACEOF
5286/* end confdefs.h. */
5287$ac_includes_default
5288int
5289main ()
5290{
5291static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
5292test_array [0] = 0
5293
5294 ;
5295 return 0;
5296}
5297_ACEOF
5298rm -f conftest.$ac_objext
5299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5300 (eval $ac_compile) 2>conftest.er1
5301 ac_status=$?
5302 grep -v '^ *+' conftest.er1 >conftest.err
5303 rm -f conftest.er1
5304 cat conftest.err >&5
5305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5306 (exit $ac_status); } &&
e8b05380 5307 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
5308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5309 (eval $ac_try) 2>&5
5310 ac_status=$?
5311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5312 (exit $ac_status); }; } &&
5313 { ac_try='test -s conftest.$ac_objext'
5314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5315 (eval $ac_try) 2>&5
5316 ac_status=$?
5317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5318 (exit $ac_status); }; }; then
5319 ac_hi=-1 ac_mid=-1
5320 while :; do
5321 cat >conftest.$ac_ext <<_ACEOF
5322/* confdefs.h. */
5323_ACEOF
5324cat confdefs.h >>conftest.$ac_ext
5325cat >>conftest.$ac_ext <<_ACEOF
5326/* end confdefs.h. */
5327$ac_includes_default
5328int
5329main ()
5330{
5331static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
5332test_array [0] = 0
5333
5334 ;
5335 return 0;
5336}
5337_ACEOF
5338rm -f conftest.$ac_objext
5339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5340 (eval $ac_compile) 2>conftest.er1
5341 ac_status=$?
5342 grep -v '^ *+' conftest.er1 >conftest.err
5343 rm -f conftest.er1
5344 cat conftest.err >&5
5345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5346 (exit $ac_status); } &&
e8b05380 5347 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
5348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5349 (eval $ac_try) 2>&5
5350 ac_status=$?
5351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5352 (exit $ac_status); }; } &&
5353 { ac_try='test -s conftest.$ac_objext'
5354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5355 (eval $ac_try) 2>&5
5356 ac_status=$?
5357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5358 (exit $ac_status); }; }; then
5359 ac_lo=$ac_mid; break
5360else
5361 echo "$as_me: failed program was:" >&5
5362sed 's/^/| /' conftest.$ac_ext >&5
5363
5364ac_hi=`expr '(' $ac_mid ')' - 1`
5365 if test $ac_mid -le $ac_hi; then
5366 ac_lo= ac_hi=
5367 break
5368 fi
5369 ac_mid=`expr 2 '*' $ac_mid`
5370fi
5371rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5372 done
5373else
5374 echo "$as_me: failed program was:" >&5
5375sed 's/^/| /' conftest.$ac_ext >&5
5376
5377ac_lo= ac_hi=
5378fi
5379rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5380fi
5381rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5382# Binary search between lo and hi bounds.
5383while test "x$ac_lo" != "x$ac_hi"; do
5384 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5385 cat >conftest.$ac_ext <<_ACEOF
5386/* confdefs.h. */
5387_ACEOF
5388cat confdefs.h >>conftest.$ac_ext
5389cat >>conftest.$ac_ext <<_ACEOF
5390/* end confdefs.h. */
5391$ac_includes_default
5392int
5393main ()
5394{
5395static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5396test_array [0] = 0
5397
5398 ;
5399 return 0;
5400}
5401_ACEOF
5402rm -f conftest.$ac_objext
5403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5404 (eval $ac_compile) 2>conftest.er1
5405 ac_status=$?
5406 grep -v '^ *+' conftest.er1 >conftest.err
5407 rm -f conftest.er1
5408 cat conftest.err >&5
5409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5410 (exit $ac_status); } &&
e8b05380 5411 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
5412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5413 (eval $ac_try) 2>&5
5414 ac_status=$?
5415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5416 (exit $ac_status); }; } &&
5417 { ac_try='test -s conftest.$ac_objext'
5418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5419 (eval $ac_try) 2>&5
5420 ac_status=$?
5421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5422 (exit $ac_status); }; }; then
5423 ac_hi=$ac_mid
5424else
5425 echo "$as_me: failed program was:" >&5
5426sed 's/^/| /' conftest.$ac_ext >&5
5427
5428ac_lo=`expr '(' $ac_mid ')' + 1`
5429fi
5430rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5431done
5432case $ac_lo in
5433?*) ac_cv_sizeof_long_long=$ac_lo;;
5434'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5435See \`config.log' for more details." >&5
5436echo "$as_me: error: cannot compute sizeof (long long), 77
5437See \`config.log' for more details." >&2;}
5438 { (exit 1); exit 1; }; } ;;
5439esac
5440else
5441 if test "$cross_compiling" = yes; then
e8b05380
PB
5442 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
5443echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
bf3b7cd3
JD
5444 { (exit 1); exit 1; }; }
5445else
5446 cat >conftest.$ac_ext <<_ACEOF
5447/* confdefs.h. */
5448_ACEOF
5449cat confdefs.h >>conftest.$ac_ext
5450cat >>conftest.$ac_ext <<_ACEOF
5451/* end confdefs.h. */
5452$ac_includes_default
5453long longval () { return (long) (sizeof (long long)); }
5454unsigned long ulongval () { return (long) (sizeof (long long)); }
5455#include <stdio.h>
5456#include <stdlib.h>
5457int
5458main ()
5459{
5460
5461 FILE *f = fopen ("conftest.val", "w");
5462 if (! f)
5463 exit (1);
5464 if (((long) (sizeof (long long))) < 0)
5465 {
5466 long i = longval ();
5467 if (i != ((long) (sizeof (long long))))
5468 exit (1);
5469 fprintf (f, "%ld\n", i);
5470 }
5471 else
5472 {
5473 unsigned long i = ulongval ();
5474 if (i != ((long) (sizeof (long long))))
5475 exit (1);
5476 fprintf (f, "%lu\n", i);
5477 }
5478 exit (ferror (f) || fclose (f) != 0);
5479
5480 ;
5481 return 0;
5482}
5483_ACEOF
5484rm -f conftest$ac_exeext
5485if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5486 (eval $ac_link) 2>&5
5487 ac_status=$?
5488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5489 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5491 (eval $ac_try) 2>&5
5492 ac_status=$?
5493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5494 (exit $ac_status); }; }; then
5495 ac_cv_sizeof_long_long=`cat conftest.val`
5496else
5497 echo "$as_me: program exited with status $ac_status" >&5
5498echo "$as_me: failed program was:" >&5
5499sed 's/^/| /' conftest.$ac_ext >&5
5500
5501( exit $ac_status )
5502{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5503See \`config.log' for more details." >&5
5504echo "$as_me: error: cannot compute sizeof (long long), 77
5505See \`config.log' for more details." >&2;}
5506 { (exit 1); exit 1; }; }
5507fi
5508rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5509fi
5510fi
5511rm -f conftest.val
5512else
5513 ac_cv_sizeof_long_long=0
5514fi
5515fi
5516echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5517echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
5518cat >>confdefs.h <<_ACEOF
5519#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5520_ACEOF
5521
5522
5523fi
5ec1c5e6
KC
5524
5525echo "$as_me:$LINENO: checking for __int64" >&5
5526echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5527if test "${ac_cv_type___int64+set}" = set; then
5528 echo $ECHO_N "(cached) $ECHO_C" >&6
5529else
5530 cat >conftest.$ac_ext <<_ACEOF
5531/* confdefs.h. */
5532_ACEOF
5533cat confdefs.h >>conftest.$ac_ext
5534cat >>conftest.$ac_ext <<_ACEOF
5535/* end confdefs.h. */
5536$ac_includes_default
5537int
5538main ()
5539{
5540if ((__int64 *) 0)
5541 return 0;
5542if (sizeof (__int64))
5543 return 0;
5544 ;
5545 return 0;
5546}
5547_ACEOF
5548rm -f conftest.$ac_objext
5549if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5550 (eval $ac_compile) 2>conftest.er1
5551 ac_status=$?
5552 grep -v '^ *+' conftest.er1 >conftest.err
5553 rm -f conftest.er1
5554 cat conftest.err >&5
5555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5556 (exit $ac_status); } &&
e8b05380 5557 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5ec1c5e6
KC
5558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5559 (eval $ac_try) 2>&5
5560 ac_status=$?
5561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5562 (exit $ac_status); }; } &&
5563 { ac_try='test -s conftest.$ac_objext'
5564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5565 (eval $ac_try) 2>&5
5566 ac_status=$?
5567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5568 (exit $ac_status); }; }; then
5569 ac_cv_type___int64=yes
5570else
5571 echo "$as_me: failed program was:" >&5
5572sed 's/^/| /' conftest.$ac_ext >&5
5573
5574ac_cv_type___int64=no
5575fi
5576rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5577fi
5578echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5579echo "${ECHO_T}$ac_cv_type___int64" >&6
5580if test $ac_cv_type___int64 = yes; then
5581
5582cat >>confdefs.h <<_ACEOF
5583#define HAVE___INT64 1
5584_ACEOF
5585
5586echo "$as_me:$LINENO: checking for __int64" >&5
bf3b7cd3
JD
5587echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5588if test "${ac_cv_type___int64+set}" = set; then
5589 echo $ECHO_N "(cached) $ECHO_C" >&6
5590else
ba479fd2 5591 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5592/* confdefs.h. */
5593_ACEOF
5594cat confdefs.h >>conftest.$ac_ext
5595cat >>conftest.$ac_ext <<_ACEOF
5596/* end confdefs.h. */
bf3b7cd3 5597$ac_includes_default
ba479fd2
NN
5598int
5599main ()
5600{
bf3b7cd3
JD
5601if ((__int64 *) 0)
5602 return 0;
5603if (sizeof (__int64))
5604 return 0;
ba479fd2
NN
5605 ;
5606 return 0;
5607}
5608_ACEOF
5609rm -f conftest.$ac_objext
5610if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5611 (eval $ac_compile) 2>conftest.er1
ba479fd2 5612 ac_status=$?
86da66b5
HPN
5613 grep -v '^ *+' conftest.er1 >conftest.err
5614 rm -f conftest.er1
5615 cat conftest.err >&5
ba479fd2
NN
5616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5617 (exit $ac_status); } &&
e8b05380 5618 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5620 (eval $ac_try) 2>&5
5621 ac_status=$?
5622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5623 (exit $ac_status); }; } &&
5624 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5626 (eval $ac_try) 2>&5
5627 ac_status=$?
5628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5629 (exit $ac_status); }; }; then
bf3b7cd3 5630 ac_cv_type___int64=yes
75b6f3fd 5631else
ba479fd2
NN
5632 echo "$as_me: failed program was:" >&5
5633sed 's/^/| /' conftest.$ac_ext >&5
5634
bf3b7cd3 5635ac_cv_type___int64=no
75b6f3fd 5636fi
86da66b5 5637rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5638fi
bf3b7cd3
JD
5639echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5640echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 5641
bf3b7cd3
JD
5642echo "$as_me:$LINENO: checking size of __int64" >&5
5643echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
5644if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 5645 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 5646else
bf3b7cd3
JD
5647 if test "$ac_cv_type___int64" = yes; then
5648 # The cast to unsigned long works around a bug in the HP C Compiler
5649 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5650 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5651 # This bug is HP SR number 8606223364.
5652 if test "$cross_compiling" = yes; then
5653 # Depending upon the size, compute the lo and hi bounds.
5654cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5655/* confdefs.h. */
5656_ACEOF
5657cat confdefs.h >>conftest.$ac_ext
5658cat >>conftest.$ac_ext <<_ACEOF
5659/* end confdefs.h. */
bf3b7cd3 5660$ac_includes_default
ba479fd2
NN
5661int
5662main ()
5663{
bf3b7cd3
JD
5664static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
5665test_array [0] = 0
5666
ba479fd2
NN
5667 ;
5668 return 0;
5669}
5670_ACEOF
5671rm -f conftest.$ac_objext
5672if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5673 (eval $ac_compile) 2>conftest.er1
ba479fd2 5674 ac_status=$?
86da66b5
HPN
5675 grep -v '^ *+' conftest.er1 >conftest.err
5676 rm -f conftest.er1
5677 cat conftest.err >&5
ba479fd2
NN
5678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5679 (exit $ac_status); } &&
e8b05380 5680 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5682 (eval $ac_try) 2>&5
5683 ac_status=$?
5684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5685 (exit $ac_status); }; } &&
5686 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5688 (eval $ac_try) 2>&5
5689 ac_status=$?
5690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5691 (exit $ac_status); }; }; then
bf3b7cd3
JD
5692 ac_lo=0 ac_mid=0
5693 while :; do
5694 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5695/* confdefs.h. */
5696_ACEOF
5697cat confdefs.h >>conftest.$ac_ext
5698cat >>conftest.$ac_ext <<_ACEOF
5699/* end confdefs.h. */
bf3b7cd3 5700$ac_includes_default
ba479fd2
NN
5701int
5702main ()
5703{
bf3b7cd3
JD
5704static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5705test_array [0] = 0
5706
ba479fd2
NN
5707 ;
5708 return 0;
5709}
5710_ACEOF
5711rm -f conftest.$ac_objext
5712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5713 (eval $ac_compile) 2>conftest.er1
ba479fd2 5714 ac_status=$?
86da66b5
HPN
5715 grep -v '^ *+' conftest.er1 >conftest.err
5716 rm -f conftest.er1
5717 cat conftest.err >&5
ba479fd2
NN
5718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5719 (exit $ac_status); } &&
e8b05380 5720 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5722 (eval $ac_try) 2>&5
5723 ac_status=$?
5724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5725 (exit $ac_status); }; } &&
5726 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5728 (eval $ac_try) 2>&5
5729 ac_status=$?
5730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5731 (exit $ac_status); }; }; then
bf3b7cd3 5732 ac_hi=$ac_mid; break
75e93faa 5733else
ba479fd2
NN
5734 echo "$as_me: failed program was:" >&5
5735sed 's/^/| /' conftest.$ac_ext >&5
5736
bf3b7cd3
JD
5737ac_lo=`expr $ac_mid + 1`
5738 if test $ac_lo -le $ac_mid; then
5739 ac_lo= ac_hi=
5740 break
5741 fi
5742 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 5743fi
86da66b5 5744rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5745 done
75e93faa 5746else
bf3b7cd3
JD
5747 echo "$as_me: failed program was:" >&5
5748sed 's/^/| /' conftest.$ac_ext >&5
5749
5750cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5751/* confdefs.h. */
5752_ACEOF
5753cat confdefs.h >>conftest.$ac_ext
5754cat >>conftest.$ac_ext <<_ACEOF
5755/* end confdefs.h. */
bf3b7cd3 5756$ac_includes_default
ba479fd2
NN
5757int
5758main ()
5759{
bf3b7cd3
JD
5760static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
5761test_array [0] = 0
5762
ba479fd2
NN
5763 ;
5764 return 0;
5765}
5766_ACEOF
5767rm -f conftest.$ac_objext
5768if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5769 (eval $ac_compile) 2>conftest.er1
ba479fd2 5770 ac_status=$?
86da66b5
HPN
5771 grep -v '^ *+' conftest.er1 >conftest.err
5772 rm -f conftest.er1
5773 cat conftest.err >&5
ba479fd2
NN
5774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5775 (exit $ac_status); } &&
e8b05380 5776 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5778 (eval $ac_try) 2>&5
5779 ac_status=$?
5780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5781 (exit $ac_status); }; } &&
5782 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5784 (eval $ac_try) 2>&5
5785 ac_status=$?
5786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5787 (exit $ac_status); }; }; then
bf3b7cd3
JD
5788 ac_hi=-1 ac_mid=-1
5789 while :; do
5790 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5791/* confdefs.h. */
5792_ACEOF
5793cat confdefs.h >>conftest.$ac_ext
5794cat >>conftest.$ac_ext <<_ACEOF
5795/* end confdefs.h. */
bf3b7cd3 5796$ac_includes_default
ba479fd2
NN
5797int
5798main ()
5799{
bf3b7cd3
JD
5800static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
5801test_array [0] = 0
5802
ba479fd2
NN
5803 ;
5804 return 0;
5805}
5806_ACEOF
5807rm -f conftest.$ac_objext
5808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5809 (eval $ac_compile) 2>conftest.er1
ba479fd2 5810 ac_status=$?
86da66b5
HPN
5811 grep -v '^ *+' conftest.er1 >conftest.err
5812 rm -f conftest.er1
5813 cat conftest.err >&5
ba479fd2
NN
5814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5815 (exit $ac_status); } &&
e8b05380 5816 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5818 (eval $ac_try) 2>&5
5819 ac_status=$?
5820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5821 (exit $ac_status); }; } &&
5822 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5824 (eval $ac_try) 2>&5
5825 ac_status=$?
5826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5827 (exit $ac_status); }; }; then
bf3b7cd3 5828 ac_lo=$ac_mid; break
04cabffc 5829else
ba479fd2
NN
5830 echo "$as_me: failed program was:" >&5
5831sed 's/^/| /' conftest.$ac_ext >&5
5832
bf3b7cd3
JD
5833ac_hi=`expr '(' $ac_mid ')' - 1`
5834 if test $ac_mid -le $ac_hi; then
5835 ac_lo= ac_hi=
5836 break
5837 fi
5838 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 5839fi
86da66b5 5840rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5841 done
5842else
5843 echo "$as_me: failed program was:" >&5
5844sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 5845
bf3b7cd3 5846ac_lo= ac_hi=
414d23ae 5847fi
bf3b7cd3 5848rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5849fi
bf3b7cd3
JD
5850rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5851# Binary search between lo and hi bounds.
5852while test "x$ac_lo" != "x$ac_hi"; do
5853 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 5854 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5855/* confdefs.h. */
5856_ACEOF
5857cat confdefs.h >>conftest.$ac_ext
5858cat >>conftest.$ac_ext <<_ACEOF
5859/* end confdefs.h. */
bf3b7cd3 5860$ac_includes_default
ba479fd2
NN
5861int
5862main ()
5863{
bf3b7cd3
JD
5864static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5865test_array [0] = 0
5866
ba479fd2
NN
5867 ;
5868 return 0;
5869}
5870_ACEOF
5871rm -f conftest.$ac_objext
5872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5873 (eval $ac_compile) 2>conftest.er1
ba479fd2 5874 ac_status=$?
86da66b5
HPN
5875 grep -v '^ *+' conftest.er1 >conftest.err
5876 rm -f conftest.er1
5877 cat conftest.err >&5
ba479fd2
NN
5878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5879 (exit $ac_status); } &&
e8b05380 5880 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5882 (eval $ac_try) 2>&5
5883 ac_status=$?
5884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5885 (exit $ac_status); }; } &&
5886 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5888 (eval $ac_try) 2>&5
5889 ac_status=$?
5890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5891 (exit $ac_status); }; }; then
bf3b7cd3 5892 ac_hi=$ac_mid
75e93faa 5893else
ba479fd2
NN
5894 echo "$as_me: failed program was:" >&5
5895sed 's/^/| /' conftest.$ac_ext >&5
5896
bf3b7cd3 5897ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 5898fi
86da66b5 5899rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5900done
bf3b7cd3
JD
5901case $ac_lo in
5902?*) ac_cv_sizeof___int64=$ac_lo;;
5903'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
5904See \`config.log' for more details." >&5
5905echo "$as_me: error: cannot compute sizeof (__int64), 77
5906See \`config.log' for more details." >&2;}
5907 { (exit 1); exit 1; }; } ;;
5908esac
5909else
5910 if test "$cross_compiling" = yes; then
e8b05380
PB
5911 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
5912echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
bf3b7cd3
JD
5913 { (exit 1); exit 1; }; }
5914else
5915 cat >conftest.$ac_ext <<_ACEOF
5916/* confdefs.h. */
5917_ACEOF
5918cat confdefs.h >>conftest.$ac_ext
5919cat >>conftest.$ac_ext <<_ACEOF
5920/* end confdefs.h. */
5921$ac_includes_default
5922long longval () { return (long) (sizeof (__int64)); }
5923unsigned long ulongval () { return (long) (sizeof (__int64)); }
5924#include <stdio.h>
5925#include <stdlib.h>
5926int
5927main ()
5928{
414d23ae 5929
bf3b7cd3
JD
5930 FILE *f = fopen ("conftest.val", "w");
5931 if (! f)
5932 exit (1);
5933 if (((long) (sizeof (__int64))) < 0)
5934 {
5935 long i = longval ();
5936 if (i != ((long) (sizeof (__int64))))
5937 exit (1);
5938 fprintf (f, "%ld\n", i);
5939 }
5940 else
5941 {
5942 unsigned long i = ulongval ();
5943 if (i != ((long) (sizeof (__int64))))
5944 exit (1);
5945 fprintf (f, "%lu\n", i);
5946 }
5947 exit (ferror (f) || fclose (f) != 0);
5948
5949 ;
5950 return 0;
5951}
5952_ACEOF
5953rm -f conftest$ac_exeext
5954if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5955 (eval $ac_link) 2>&5
5956 ac_status=$?
5957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5958 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5960 (eval $ac_try) 2>&5
5961 ac_status=$?
5962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5963 (exit $ac_status); }; }; then
5964 ac_cv_sizeof___int64=`cat conftest.val`
5965else
5966 echo "$as_me: program exited with status $ac_status" >&5
5967echo "$as_me: failed program was:" >&5
5968sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 5969
bf3b7cd3
JD
5970( exit $ac_status )
5971{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
5972See \`config.log' for more details." >&5
5973echo "$as_me: error: cannot compute sizeof (__int64), 77
5974See \`config.log' for more details." >&2;}
ba479fd2 5975 { (exit 1); exit 1; }; }
414d23ae 5976fi
bf3b7cd3
JD
5977rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5978fi
5979fi
5980rm -f conftest.val
5981else
5982 ac_cv_sizeof___int64=0
5983fi
5984fi
ba479fd2
NN
5985echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
5986echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 5987cat >>confdefs.h <<_ACEOF
414d23ae 5988#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 5989_ACEOF
414d23ae 5990
cafe096b 5991
414d23ae
HPN
5992fi
5993
5ec1c5e6 5994
34a86c2b
NN
5995# ---------------------
5996# Warnings and checking
5997# ---------------------
5998
b5472e1d
NN
5999# Check $CC warning features (if it's GCC).
6000# We want to use -pedantic, but we don't want warnings about
6001# * 'long long'
6002# * variadic macros
89a42ac8 6003# * overlong strings
b5472e1d
NN
6004# So, we only use -pedantic if we can disable those warnings.
6005
6006echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6007echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
6008if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6009 echo $ECHO_N "(cached) $ECHO_C" >&6
6010else
6011 save_CFLAGS="$CFLAGS"
6012 CFLAGS="-Wno-long-long"
6013 cat >conftest.$ac_ext <<_ACEOF
6014/* confdefs.h. */
6015_ACEOF
6016cat confdefs.h >>conftest.$ac_ext
6017cat >>conftest.$ac_ext <<_ACEOF
6018/* end confdefs.h. */
6019
6020_ACEOF
6021rm -f conftest.$ac_objext
6022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6023 (eval $ac_compile) 2>conftest.er1
6024 ac_status=$?
6025 grep -v '^ *+' conftest.er1 >conftest.err
6026 rm -f conftest.er1
6027 cat conftest.err >&5
6028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6029 (exit $ac_status); } &&
e8b05380 6030 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
b5472e1d
NN
6031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6032 (eval $ac_try) 2>&5
6033 ac_status=$?
6034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6035 (exit $ac_status); }; } &&
6036 { ac_try='test -s conftest.$ac_objext'
6037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6038 (eval $ac_try) 2>&5
6039 ac_status=$?
6040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6041 (exit $ac_status); }; }; then
6042 ac_cv_prog_cc_w_no_long_long=yes
6043else
6044 echo "$as_me: failed program was:" >&5
6045sed 's/^/| /' conftest.$ac_ext >&5
6046
6047ac_cv_prog_cc_w_no_long_long=no
6048fi
6049rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6050 CFLAGS="$save_CFLAGS"
6051
6052fi
6053echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6054echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
6055
6056echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6057echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
6058if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6059 echo $ECHO_N "(cached) $ECHO_C" >&6
6060else
6061 save_CFLAGS="$CFLAGS"
6062 CFLAGS="-Wno-variadic-macros"
6063 cat >conftest.$ac_ext <<_ACEOF
6064/* confdefs.h. */
6065_ACEOF
6066cat confdefs.h >>conftest.$ac_ext
6067cat >>conftest.$ac_ext <<_ACEOF
6068/* end confdefs.h. */
6069
6070_ACEOF
6071rm -f conftest.$ac_objext
6072if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6073 (eval $ac_compile) 2>conftest.er1
6074 ac_status=$?
6075 grep -v '^ *+' conftest.er1 >conftest.err
6076 rm -f conftest.er1
6077 cat conftest.err >&5
6078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6079 (exit $ac_status); } &&
e8b05380 6080 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
b5472e1d
NN
6081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6082 (eval $ac_try) 2>&5
6083 ac_status=$?
6084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6085 (exit $ac_status); }; } &&
6086 { ac_try='test -s conftest.$ac_objext'
6087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6088 (eval $ac_try) 2>&5
6089 ac_status=$?
6090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6091 (exit $ac_status); }; }; then
6092 ac_cv_prog_cc_w_no_variadic_macros=yes
6093else
6094 echo "$as_me: failed program was:" >&5
6095sed 's/^/| /' conftest.$ac_ext >&5
6096
6097ac_cv_prog_cc_w_no_variadic_macros=no
6098fi
6099rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6100 CFLAGS="$save_CFLAGS"
6101
6102fi
6103echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6104echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
6105
89a42ac8
ZW
6106echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5
6107echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6
6108if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then
6109 echo $ECHO_N "(cached) $ECHO_C" >&6
6110else
6111 save_CFLAGS="$CFLAGS"
6112 CFLAGS="-Wno-overlength-strings"
6113 cat >conftest.$ac_ext <<_ACEOF
6114/* confdefs.h. */
6115_ACEOF
6116cat confdefs.h >>conftest.$ac_ext
6117cat >>conftest.$ac_ext <<_ACEOF
6118/* end confdefs.h. */
6119
6120_ACEOF
6121rm -f conftest.$ac_objext
6122if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6123 (eval $ac_compile) 2>conftest.er1
6124 ac_status=$?
6125 grep -v '^ *+' conftest.er1 >conftest.err
6126 rm -f conftest.er1
6127 cat conftest.err >&5
6128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6129 (exit $ac_status); } &&
6130 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6132 (eval $ac_try) 2>&5
6133 ac_status=$?
6134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6135 (exit $ac_status); }; } &&
6136 { ac_try='test -s conftest.$ac_objext'
6137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6138 (eval $ac_try) 2>&5
6139 ac_status=$?
6140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6141 (exit $ac_status); }; }; then
6142 ac_cv_prog_cc_w_no_overlength_strings=yes
6143else
6144 echo "$as_me: failed program was:" >&5
6145sed 's/^/| /' conftest.$ac_ext >&5
6146
6147ac_cv_prog_cc_w_no_overlength_strings=no
6148fi
6149rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6150 CFLAGS="$save_CFLAGS"
6151
6152fi
6153echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5
6154echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6
6155
34a86c2b 6156strict1_warn=
b5472e1d 6157if test $ac_cv_prog_cc_w_no_long_long = yes \
89a42ac8
ZW
6158 && test $ac_cv_prog_cc_w_no_variadic_macros = yes \
6159 && test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then
6160 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
34a86c2b
NN
6161fi
6162
643d3bd2
NN
6163# Add -Wold-style-definition if it's accepted
6164echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6165echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
6166if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6167 echo $ECHO_N "(cached) $ECHO_C" >&6
6168else
6169 save_CFLAGS="$CFLAGS"
6170 CFLAGS="-Wold-style-definition"
6171 cat >conftest.$ac_ext <<_ACEOF
6172/* confdefs.h. */
6173_ACEOF
6174cat confdefs.h >>conftest.$ac_ext
6175cat >>conftest.$ac_ext <<_ACEOF
6176/* end confdefs.h. */
6177
6178_ACEOF
6179rm -f conftest.$ac_objext
6180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6181 (eval $ac_compile) 2>conftest.er1
6182 ac_status=$?
6183 grep -v '^ *+' conftest.er1 >conftest.err
6184 rm -f conftest.er1
6185 cat conftest.err >&5
6186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6187 (exit $ac_status); } &&
e8b05380 6188 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
643d3bd2
NN
6189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6190 (eval $ac_try) 2>&5
6191 ac_status=$?
6192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6193 (exit $ac_status); }; } &&
6194 { ac_try='test -s conftest.$ac_objext'
6195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6196 (eval $ac_try) 2>&5
6197 ac_status=$?
6198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6199 (exit $ac_status); }; }; then
6200 ac_cv_prog_cc_w_old_style_definition=yes
6201else
6202 echo "$as_me: failed program was:" >&5
6203sed 's/^/| /' conftest.$ac_ext >&5
6204
6205ac_cv_prog_cc_w_old_style_definition=no
6206fi
6207rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6208 CFLAGS="$save_CFLAGS"
6209
6210fi
6211echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
6212echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
6213if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
6214 strict1_warn="${strict1_warn} -Wold-style-definition"
6215fi
6216
ac0f3f39
KG
6217# Add -Wmissing-format-attribute if it's accepted
6218echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5
6219echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6
6220if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then
6221 echo $ECHO_N "(cached) $ECHO_C" >&6
6222else
6223 save_CFLAGS="$CFLAGS"
6224 CFLAGS="-Wmissing-format-attribute"
6225 cat >conftest.$ac_ext <<_ACEOF
6226/* confdefs.h. */
6227_ACEOF
6228cat confdefs.h >>conftest.$ac_ext
6229cat >>conftest.$ac_ext <<_ACEOF
6230/* end confdefs.h. */
6231
6232_ACEOF
6233rm -f conftest.$ac_objext
6234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6235 (eval $ac_compile) 2>conftest.er1
6236 ac_status=$?
6237 grep -v '^ *+' conftest.er1 >conftest.err
6238 rm -f conftest.er1
6239 cat conftest.err >&5
6240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6241 (exit $ac_status); } &&
e8b05380 6242 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
ac0f3f39
KG
6243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6244 (eval $ac_try) 2>&5
6245 ac_status=$?
6246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6247 (exit $ac_status); }; } &&
6248 { ac_try='test -s conftest.$ac_objext'
6249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6250 (eval $ac_try) 2>&5
6251 ac_status=$?
6252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6253 (exit $ac_status); }; }; then
6254 ac_cv_prog_cc_w_missing_format_attribute=yes
6255else
6256 echo "$as_me: failed program was:" >&5
6257sed 's/^/| /' conftest.$ac_ext >&5
6258
6259ac_cv_prog_cc_w_missing_format_attribute=no
6260fi
6261rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6262 CFLAGS="$save_CFLAGS"
6263
6264fi
6265echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5
6266echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6
6267if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then
6268 strict1_warn="${strict1_warn} -Wmissing-format-attribute"
6269fi
6270
09a9c095
NN
6271# Enable -Werror, period.
6272# Check whether --enable-werror_always or --disable-werror_always was given.
6273if test "${enable_werror_always+set}" = set; then
6274 enableval="$enable_werror_always"
6275
6276else
6277 enable_werror_always=no
6278fi;
6279if test x${enable_werror_always} = xyes ; then
6280 strict1_warn="${strict1_warn} -Werror"
6281 WERROR=-Werror
6282fi
6283
ac0f3f39
KG
6284
6285
ba479fd2 6286# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
6287# That's useful for people building cross-compilers, or just running a
6288# quick `make'.
6289warn_cflags=
6290if test "x$GCC" = "xyes"; then
6291 warn_cflags='$(GCC_WARN_CFLAGS)'
6292fi
6293
6294
dd859b8a 6295# Enable -Werror in bootstrap stage2 and later.
a1286ef5
ZW
6296is_release=
6297if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6298 is_release=yes
6299fi
dd859b8a
KG
6300# Check whether --enable-werror or --disable-werror was given.
6301if test "${enable_werror+set}" = set; then
6302 enableval="$enable_werror"
ba479fd2 6303
dd859b8a 6304else
06c37c96
NS
6305 if test x$is_release = x ; then
6306 # Default to "yes" on development branches.
dd859b8a 6307 enable_werror=yes
06c37c96
NS
6308else
6309 # Default to "no" on release branches.
6310 enable_werror=no
6311fi
ba479fd2 6312fi;
dd859b8a
KG
6313if test x$enable_werror = xyes ; then
6314 WERROR=-Werror
6315fi
6316
6317
414d23ae
HPN
6318# Enable expensive internal checks
6319# Check whether --enable-checking or --disable-checking was given.
6320if test "${enable_checking+set}" = set; then
6321 enableval="$enable_checking"
e1bbfc5c
NS
6322 ac_checking_flags="${enableval}"
6323else
6324
6325# Determine the default checks.
6326if test x$is_release = x ; then
6327 ac_checking_flags=yes
6328else
6329 ac_checking_flags=release
6330fi
6331fi;
6332ac_assert_checking=1
6333ac_checking=
cdce5c16
NS
6334ac_fold_checking=
6335ac_gc_checking=
6336ac_gc_always_collect=
414d23ae
HPN
6337ac_rtl_checking=
6338ac_rtlflag_checking=
b53ef395 6339ac_runtime_checking=1
cdce5c16
NS
6340ac_tree_checking=
6341ac_valgrind_checking=
e1bbfc5c
NS
6342IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6343for check in $ac_checking_flags
6344do
6345 case $check in
cdce5c16 6346 # these set all the flags to specific states
e1bbfc5c 6347 yes) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6348 ac_fold_checking= ; ac_gc_checking=1 ;
6349 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6350 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
cdce5c16
NS
6351 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6352 no|none) ac_assert_checking= ; ac_checking= ;
6353 ac_fold_checking= ; ac_gc_checking= ;
6354 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6355 ac_rtlflag_checking= ; ac_runtime_checking= ;
cdce5c16 6356 ac_tree_checking= ; ac_valgrind_checking= ;;
e1bbfc5c 6357 all) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6358 ac_fold_checking=1 ; ac_gc_checking=1 ;
6359 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
6360 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6361 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6362 release) ac_assert_checking=1 ; ac_checking= ;
6363 ac_fold_checking= ; ac_gc_checking= ;
6364 ac_gc_always_collect= ; ac_rtl_checking= ;
6365 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6366 ac_tree_checking= ; ac_valgrind_checking= ;;
6367 # these enable particular checks
e1bbfc5c
NS
6368 assert) ac_assert_checking=1 ;;
6369 fold) ac_fold_checking=1 ;;
6370 gc) ac_gc_checking=1 ;;
6371 gcac) ac_gc_always_collect=1 ;;
6372 misc) ac_checking=1 ;;
e1bbfc5c 6373 rtl) ac_rtl_checking=1 ;;
cdce5c16 6374 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 6375 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 6376 tree) ac_tree_checking=1 ;;
cdce5c16 6377 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 6378 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
6379echo "$as_me: error: unknown check category $check" >&2;}
6380 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
6381 esac
6382done
6383IFS="$ac_save_IFS"
06c37c96 6384
ba479fd2
NN
6385nocommon_flag=""
6386if test x$ac_checking != x ; then
6387
6388cat >>confdefs.h <<\_ACEOF
6389#define ENABLE_CHECKING 1
6390_ACEOF
6391
6392 nocommon_flag=-fno-common
6393fi
6394
06c37c96
NS
6395if test x$ac_assert_checking != x ; then
6396
6397cat >>confdefs.h <<\_ACEOF
6398#define ENABLE_ASSERT_CHECKING 1
6399_ACEOF
6400
b53ef395 6401fi
232b67d9 6402
b53ef395
NS
6403if test x$ac_runtime_checking != x ; then
6404
6405cat >>confdefs.h <<\_ACEOF
6406#define ENABLE_RUNTIME_CHECKING 1
6407_ACEOF
6408
06c37c96 6409fi
ba479fd2
NN
6410if test x$ac_tree_checking != x ; then
6411
6412cat >>confdefs.h <<\_ACEOF
6413#define ENABLE_TREE_CHECKING 1
6414_ACEOF
6415
13f05fd0 6416 TREEBROWSER=tree-browser.o
ba479fd2 6417fi
13f05fd0 6418
ba479fd2
NN
6419if test x$ac_rtl_checking != x ; then
6420
6421cat >>confdefs.h <<\_ACEOF
6422#define ENABLE_RTL_CHECKING 1
6423_ACEOF
6424
6425fi
6426if test x$ac_rtlflag_checking != x ; then
6427
6428cat >>confdefs.h <<\_ACEOF
6429#define ENABLE_RTL_FLAG_CHECKING 1
6430_ACEOF
6431
6432fi
6433if test x$ac_gc_checking != x ; then
6434
6435cat >>confdefs.h <<\_ACEOF
6436#define ENABLE_GC_CHECKING 1
6437_ACEOF
6438
6439fi
6440if test x$ac_gc_always_collect != x ; then
6441
6442cat >>confdefs.h <<\_ACEOF
6443#define ENABLE_GC_ALWAYS_COLLECT 1
6444_ACEOF
6445
6446fi
6447if test x$ac_fold_checking != x ; then
6448
6449cat >>confdefs.h <<\_ACEOF
6450#define ENABLE_FOLD_CHECKING 1
6451_ACEOF
6452
6453fi
6454valgrind_path_defines=
6455valgrind_command=
6456
ba479fd2
NN
6457if test "${ac_cv_header_valgrind_h+set}" = set; then
6458 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6459echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6460if test "${ac_cv_header_valgrind_h+set}" = set; then
6461 echo $ECHO_N "(cached) $ECHO_C" >&6
6462fi
6463echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6464echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6465else
6466 # Is the header compilable?
6467echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6468echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
6469cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6470/* confdefs.h. */
6471_ACEOF
6472cat confdefs.h >>conftest.$ac_ext
6473cat >>conftest.$ac_ext <<_ACEOF
6474/* end confdefs.h. */
6475$ac_includes_default
63cf211a 6476#include <valgrind.h>
ba479fd2
NN
6477_ACEOF
6478rm -f conftest.$ac_objext
6479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6480 (eval $ac_compile) 2>conftest.er1
ba479fd2 6481 ac_status=$?
86da66b5
HPN
6482 grep -v '^ *+' conftest.er1 >conftest.err
6483 rm -f conftest.er1
6484 cat conftest.err >&5
ba479fd2
NN
6485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6486 (exit $ac_status); } &&
e8b05380 6487 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
6488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6489 (eval $ac_try) 2>&5
6490 ac_status=$?
6491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6492 (exit $ac_status); }; } &&
6493 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6495 (eval $ac_try) 2>&5
6496 ac_status=$?
6497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6498 (exit $ac_status); }; }; then
6499 ac_header_compiler=yes
6500else
6501 echo "$as_me: failed program was:" >&5
6502sed 's/^/| /' conftest.$ac_ext >&5
6503
6504ac_header_compiler=no
6505fi
86da66b5 6506rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
6507echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6508echo "${ECHO_T}$ac_header_compiler" >&6
6509
6510# Is the header present?
6511echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6512echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
6513cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6514/* confdefs.h. */
6515_ACEOF
6516cat confdefs.h >>conftest.$ac_ext
6517cat >>conftest.$ac_ext <<_ACEOF
6518/* end confdefs.h. */
6519#include <valgrind.h>
6520_ACEOF
6521if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6522 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6523 ac_status=$?
6524 grep -v '^ *+' conftest.er1 >conftest.err
6525 rm -f conftest.er1
6526 cat conftest.err >&5
6527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6528 (exit $ac_status); } >/dev/null; then
6529 if test -s conftest.err; then
6530 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6531 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6532 else
6533 ac_cpp_err=
6534 fi
6535else
6536 ac_cpp_err=yes
6537fi
6538if test -z "$ac_cpp_err"; then
6539 ac_header_preproc=yes
6540else
6541 echo "$as_me: failed program was:" >&5
6542sed 's/^/| /' conftest.$ac_ext >&5
6543
6544 ac_header_preproc=no
6545fi
6546rm -f conftest.err conftest.$ac_ext
6547echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6548echo "${ECHO_T}$ac_header_preproc" >&6
6549
6550# So? What about this header?
86da66b5
HPN
6551case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6552 yes:no: )
ba479fd2
NN
6553 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6554echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
6555 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6556echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6557 ac_header_preproc=yes
ba479fd2 6558 ;;
86da66b5 6559 no:yes:* )
ba479fd2
NN
6560 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6561echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
6562 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6563echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6564 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6565echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6566 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6567echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
6568 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6569echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
6570 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6571echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
ba479fd2
NN
6572 (
6573 cat <<\_ASBOX
86da66b5
HPN
6574## ------------------------------------------ ##
6575## Report this to the AC_PACKAGE_NAME lists. ##
6576## ------------------------------------------ ##
ba479fd2
NN
6577_ASBOX
6578 ) |
6579 sed "s/^/$as_me: WARNING: /" >&2
6580 ;;
6581esac
6582echo "$as_me:$LINENO: checking for valgrind.h" >&5
6583echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6584if test "${ac_cv_header_valgrind_h+set}" = set; then
6585 echo $ECHO_N "(cached) $ECHO_C" >&6
6586else
6587 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 6588fi
ba479fd2
NN
6589echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6590echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6591
6e3f3080 6592fi
ba479fd2 6593if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
6594 have_valgrind_h=yes
6595else
ba479fd2 6596 have_valgrind_h=no
6938ec6c
NN
6597fi
6598
6599
ba479fd2 6600
cdce5c16 6601if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
6602 # It is certainly possible that there's valgrind but no valgrind.h.
6603 # GCC relies on making annotations so we must have both.
ba479fd2
NN
6604 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6605echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
6606 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6607/* confdefs.h. */
6608_ACEOF
6609cat confdefs.h >>conftest.$ac_ext
6610cat >>conftest.$ac_ext <<_ACEOF
6611/* end confdefs.h. */
a207b594 6612#include <valgrind/memcheck.h>
14011ca4
AJ
6613#ifndef VALGRIND_DISCARD
6614#error VALGRIND_DISCARD not defined
6615#endif
ba479fd2
NN
6616_ACEOF
6617if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6618 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6619 ac_status=$?
6620 grep -v '^ *+' conftest.er1 >conftest.err
6621 rm -f conftest.er1
6622 cat conftest.err >&5
6623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6624 (exit $ac_status); } >/dev/null; then
6625 if test -s conftest.err; then
6626 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6627 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6628 else
6629 ac_cpp_err=
6630 fi
6631else
6632 ac_cpp_err=yes
6633fi
6634if test -z "$ac_cpp_err"; then
a207b594
HPN
6635 gcc_cv_header_valgrind_memcheck_h=yes
6636else
ba479fd2
NN
6637 echo "$as_me: failed program was:" >&5
6638sed 's/^/| /' conftest.$ac_ext >&5
6639
a207b594
HPN
6640 gcc_cv_header_valgrind_memcheck_h=no
6641fi
ba479fd2
NN
6642rm -f conftest.err conftest.$ac_ext
6643 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6644echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6645 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6646echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
6647 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6648/* confdefs.h. */
6649_ACEOF
6650cat confdefs.h >>conftest.$ac_ext
6651cat >>conftest.$ac_ext <<_ACEOF
6652/* end confdefs.h. */
a207b594
HPN
6653#include <memcheck.h>
6654#ifndef VALGRIND_DISCARD
6655#error VALGRIND_DISCARD not defined
6656#endif
ba479fd2
NN
6657_ACEOF
6658if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6659 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6660 ac_status=$?
6661 grep -v '^ *+' conftest.er1 >conftest.err
6662 rm -f conftest.er1
6663 cat conftest.err >&5
6664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6665 (exit $ac_status); } >/dev/null; then
6666 if test -s conftest.err; then
6667 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6668 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6669 else
6670 ac_cpp_err=
6671 fi
6672else
6673 ac_cpp_err=yes
6674fi
6675if test -z "$ac_cpp_err"; then
14011ca4
AJ
6676 gcc_cv_header_memcheck_h=yes
6677else
ba479fd2
NN
6678 echo "$as_me: failed program was:" >&5
6679sed 's/^/| /' conftest.$ac_ext >&5
6680
cafe096b
EC
6681 gcc_cv_header_memcheck_h=no
6682fi
ba479fd2
NN
6683rm -f conftest.err conftest.$ac_ext
6684 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6685echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
6686
56694dd9
ZW
6687# Prepare PATH_SEPARATOR.
6688# The user is always right.
6689if test "${PATH_SEPARATOR+set}" != set; then
6690 echo "#! /bin/sh" >conf$$.sh
6691 echo "exit 0" >>conf$$.sh
6692 chmod +x conf$$.sh
6693 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6694 PATH_SEPARATOR=';'
6695 else
6696 PATH_SEPARATOR=:
6697 fi
6698 rm -f conf$$.sh
6699fi
6700
6701# Find out how to test for executable files. Don't use a zero-byte file,
6702# as systems may use methods other than mode bits to determine executability.
6703cat >conf$$.file <<_ASEOF
6704#! /bin/sh
6705exit 0
6706_ASEOF
6707chmod +x conf$$.file
6708if test -x conf$$.file >/dev/null 2>&1; then
6709 ac_executable_p="test -x"
6710else
6711 ac_executable_p="test -f"
6712fi
6713rm -f conf$$.file
6714
6715# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 6716set dummy valgrind; ac_word=$2
ba479fd2
NN
6717echo "$as_me:$LINENO: checking for $ac_word" >&5
6718echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6719if test "${ac_cv_path_valgrind_path+set}" = set; then
6720 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
6721else
6722 case "$valgrind_path" in
56694dd9
ZW
6723 [\\/]* | ?:[\\/]*)
6724 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6725 ;;
414d23ae 6726 *)
56694dd9
ZW
6727 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6728 for ac_dir in $PATH; do
6729 IFS="$ac_save_IFS"
6730 test -z "$ac_dir" && ac_dir=.
6731 for ac_exec_ext in '' $ac_executable_extensions; do
6732 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6733 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6734 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6735 break 2
6736 fi
6737 fi
6738 done
6739 done
6740 IFS="$ac_save_IFS"
6741 ;;
414d23ae 6742esac
75e93faa 6743fi
414d23ae
HPN
6744valgrind_path="$ac_cv_path_valgrind_path"
6745if test -n "$valgrind_path"; then
ba479fd2
NN
6746 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6747echo "${ECHO_T}$valgrind_path" >&6
414d23ae 6748else
ba479fd2
NN
6749 echo "$as_me:$LINENO: result: no" >&5
6750echo "${ECHO_T}no" >&6
414d23ae
HPN
6751fi
6752
a207b594
HPN
6753 if test "x$valgrind_path" = "x" \
6754 || (test $have_valgrind_h = no \
6755 && test $gcc_cv_header_memcheck_h = no \
6756 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
6757 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6758echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6759 { (exit 1); exit 1; }; }
414d23ae
HPN
6760 fi
6761 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6762 valgrind_command="$valgrind_path -q"
ba479fd2
NN
6763
6764cat >>confdefs.h <<\_ACEOF
414d23ae 6765#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 6766_ACEOF
75e93faa 6767
a207b594 6768 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
6769
6770cat >>confdefs.h <<\_ACEOF
a207b594 6771#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 6772_ACEOF
a207b594
HPN
6773
6774 fi
14011ca4 6775 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
6776
6777cat >>confdefs.h <<\_ACEOF
14011ca4 6778#define HAVE_MEMCHECK_H 1
ba479fd2 6779_ACEOF
14011ca4
AJ
6780
6781 fi
414d23ae 6782fi
75e93faa 6783
75e93faa
ZW
6784
6785
74ee1642
PB
6786# Check whether --enable-mapped-location or --disable-mapped-location was given.
6787if test "${enable_mapped_location+set}" = set; then
6788 enableval="$enable_mapped_location"
6789
6790else
6791 enable_mapped_location=no
6792fi;
6793
6794if test "$enable_mapped_location" = yes ; then
6795
6796cat >>confdefs.h <<\_ACEOF
6797#define USE_MAPPED_LOCATION 1
6798_ACEOF
6799
6800fi
6801
414d23ae
HPN
6802# Enable code coverage collection
6803# Check whether --enable-coverage or --disable-coverage was given.
6804if test "${enable_coverage+set}" = set; then
6805 enableval="$enable_coverage"
6806 case "${enableval}" in
6dd297da
NN
6807 yes|noopt)
6808 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6809 ;;
6810 opt)
6811 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6812 ;;
6813 no)
6814 # a.k.a. --disable-coverage
6815 coverage_flags=""
6816 ;;
6817 *)
6818 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
6819echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6820 { (exit 1); exit 1; }; }
6dd297da 6821 ;;
414d23ae 6822esac
75e93faa 6823else
414d23ae 6824 coverage_flags=""
ba479fd2 6825fi;
5c3bc9fb 6826
414d23ae 6827
439a7e54
DN
6828# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
6829if test "${enable_gather_detailed_mem_stats+set}" = set; then
6830 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 6831
439a7e54
DN
6832else
6833 enable_gather_detailed_mem_stats=no
ba479fd2 6834fi;
439a7e54 6835if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
6836
6837cat >>confdefs.h <<\_ACEOF
439a7e54 6838#define GATHER_STATISTICS 1
ba479fd2 6839_ACEOF
439a7e54
DN
6840
6841fi
6842
73458fb7
NN
6843# -------------------------------
6844# Miscenalleous configure options
6845# -------------------------------
34a86c2b
NN
6846
6847# With stabs
ba479fd2 6848
34a86c2b
NN
6849# Check whether --with-stabs or --without-stabs was given.
6850if test "${with_stabs+set}" = set; then
6851 withval="$with_stabs"
6852 stabs="$with_stabs"
6853else
6854 stabs=no
ba479fd2 6855fi;
cafe096b 6856
34a86c2b
NN
6857# Determine whether or not multilibs are enabled.
6858# Check whether --enable-multilib or --disable-multilib was given.
6859if test "${enable_multilib+set}" = set; then
6860 enableval="$enable_multilib"
ba479fd2 6861
34a86c2b
NN
6862else
6863 enable_multilib=yes
ba479fd2 6864fi;
75e93faa 6865
34a86c2b 6866
414d23ae
HPN
6867# Enable __cxa_atexit for C++.
6868# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
6869if test "${enable___cxa_atexit+set}" = set; then
6870 enableval="$enable___cxa_atexit"
75e93faa 6871
ba479fd2 6872fi;
75e93faa 6873
486aa804
BE
6874# Enable C extension for decimal float if target supports it.
6875# Check whether --enable-decimal-float or --disable-decimal-float was given.
6876if test "${enable_decimal_float+set}" = set; then
6877 enableval="$enable_decimal_float"
6878
6879 if test x$enablevar = xyes ; then
6880 case $target in
6881 powerpc*-*-linux* | i?86*-*-linux*)
6882 ;;
6883 *)
6884 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
6885echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
6886 enable_decimal_float=no
6887 ;;
6888 esac
6889 fi
6890
6891else
6892
6893 case $target in
6894 powerpc*-*-linux*)
6895 enable_decimal_float=yes
6896 ;;
6897 *)
6898 enable_decimal_float=no
6899 ;;
6900 esac
6901
6902fi;
6903
6904
6905
6906dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi`
6907
6908cat >>confdefs.h <<_ACEOF
6909#define ENABLE_DECIMAL_FLOAT $dfp
6910_ACEOF
6911
6912
414d23ae
HPN
6913# Enable threads
6914# Pass with no value to take the default
6915# Pass with a value to specify a thread package
6916# Check whether --enable-threads or --disable-threads was given.
6917if test "${enable_threads+set}" = set; then
6918 enableval="$enable_threads"
ba479fd2 6919
414d23ae
HPN
6920else
6921 enable_threads=''
ba479fd2 6922fi;
414d23ae 6923
8dea1cca
DD
6924# Check whether --enable-tls or --disable-tls was given.
6925if test "${enable_tls+set}" = set; then
6926 enableval="$enable_tls"
6927
6928 case $enable_tls in
6929 yes | no) ;;
6930 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
6931Valid choices are 'yes' and 'no'." >&5
6932echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
6933Valid choices are 'yes' and 'no'." >&2;}
6934 { (exit 1); exit 1; }; } ;;
6935 esac
6936
6937else
6938 enable_tls=''
6939fi;
6940
414d23ae
HPN
6941# Check whether --enable-objc-gc or --disable-objc-gc was given.
6942if test "${enable_objc_gc+set}" = set; then
6943 enableval="$enable_objc_gc"
6944 if test x$enable_objc_gc = xno; then
6945 objc_boehm_gc=''
6946else
6947 objc_boehm_gc=1
6948fi
6949else
6950 objc_boehm_gc=''
ba479fd2 6951fi;
75e93faa
ZW
6952
6953
414d23ae
HPN
6954# Check whether --with-dwarf2 or --without-dwarf2 was given.
6955if test "${with_dwarf2+set}" = set; then
6956 withval="$with_dwarf2"
6957 dwarf2="$with_dwarf2"
75e93faa 6958else
414d23ae 6959 dwarf2=no
ba479fd2 6960fi;
75e93faa 6961
414d23ae
HPN
6962# Check whether --enable-shared or --disable-shared was given.
6963if test "${enable_shared+set}" = set; then
6964 enableval="$enable_shared"
ba479fd2 6965
414d23ae
HPN
6966 case $enable_shared in
6967 yes | no) ;;
6968 *)
6969 enable_shared=no
6970 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6971 for pkg in $enableval; do
6972 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
6973 enable_shared=yes
6974 fi
6975 done
6976 IFS="$ac_save_ifs"
6977 ;;
6978 esac
6979
75e93faa 6980else
414d23ae 6981 enable_shared=yes
ba479fd2 6982fi;
75e93faa 6983
75e93faa 6984
75e93faa 6985
160633c6
MM
6986# Check whether --with-build-sysroot or --without-build-sysroot was given.
6987if test "${with_build_sysroot+set}" = set; then
6988 withval="$with_build_sysroot"
6989
6990fi;
6991
6992
4977bab6
ZW
6993# Check whether --with-sysroot or --without-sysroot was given.
6994if test "${with_sysroot+set}" = set; then
6995 withval="$with_sysroot"
ba479fd2 6996
4977bab6 6997 case ${with_sysroot} in
caa55b1e 6998 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
6999 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
7000 esac
ba479fd2 7001
4977bab6
ZW
7002 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
7003 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
7004
047d636f
DJ
7005 if test "x$exec_prefix" = xNONE; then
7006 if test "x$prefix" = xNONE; then
7007 test_prefix=/usr/local
7008 else
7009 test_prefix=$prefix
7010 fi
7011 else
7012 test_prefix=$exec_prefix
7013 fi
7014 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
7015 "${test_prefix}"|"${test_prefix}/"*|\
7016 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
7017 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
7018 TARGET_SYSTEM_ROOT_DEFINE="$t"
7019 ;;
7020 esac
7021
4977bab6 7022else
ba479fd2 7023
4977bab6 7024 TARGET_SYSTEM_ROOT=
db720d9a 7025 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
7026 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
7027
ba479fd2 7028fi;
4977bab6
ZW
7029
7030
7031
7032
d1bd0ded 7033# Build with intermodule optimisations
d1bd0ded
GK
7034# Check whether --enable-intermodule or --disable-intermodule was given.
7035if test "${enable_intermodule+set}" = set; then
7036 enableval="$enable_intermodule"
0c46c5c7
KC
7037 case ${enable_intermodule} in
7038 yes) onestep="-onestep";;
7039 *) onestep="";;
d1bd0ded 7040esac
0c46c5c7
KC
7041else
7042 onestep=""
ba479fd2 7043fi;
d1bd0ded
GK
7044
7045
f3c9f174
NN
7046# Sanity check enable_languages in case someone does not run the toplevel
7047# configure # script.
7048# Check whether --enable-languages or --disable-languages was given.
7049if test "${enable_languages+set}" = set; then
7050 enableval="$enable_languages"
7051 case ,${enable_languages}, in
7052 ,,|,yes,)
7053 # go safe -- we cannot be much sure without the toplevel
7054 # configure's
7055 # analysis of which target libs are present and usable
7056 enable_languages=c
7057 ;;
7058 *,all,*)
7059 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
7060echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
7061 { (exit 1); exit 1; }; }
7062 ;;
7063 *,c,*)
7064 ;;
7065 *)
7066 enable_languages=c,${enable_languages}
7067 ;;
7068esac
7069else
7070 enable_languages=c
7071fi;
7072
7073subdirs=
7074for lang in ${srcdir}/*/config-lang.in
7075do
7076 case $lang in
7077 # The odd quoting in the next line works around
7078 # an apparent bug in bash 1.12 on linux.
7079 ${srcdir}/[*]/config-lang.in) ;;
7080 *)
7081 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
7082 if test "x$lang_alias" = x
7083 then
7084 echo "$lang doesn't set \$language." 1>&2
7085 exit 1
7086 fi
7087 case ",$enable_languages," in
7088 *,$lang_alias,*)
7089 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
7090 esac
7091 ;;
7092 esac
7093done
7094
7095
73458fb7
NN
7096# -------------------------
7097# Checks for other programs
7098# -------------------------
5b67ad6f 7099
ba479fd2
NN
7100echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7101echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
86da66b5 7102set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
ba479fd2
NN
7103if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
7104 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 7105else
ba479fd2 7106 cat >conftest.make <<\_ACEOF
e9a25f70 7107all:
ba479fd2
NN
7108 @echo 'ac_maketemp="$(MAKE)"'
7109_ACEOF
e9a25f70 7110# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 7111eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
7112if test -n "$ac_maketemp"; then
7113 eval ac_cv_prog_make_${ac_make}_set=yes
7114else
7115 eval ac_cv_prog_make_${ac_make}_set=no
7116fi
ba479fd2 7117rm -f conftest.make
e9a25f70
JL
7118fi
7119if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
7120 echo "$as_me:$LINENO: result: yes" >&5
7121echo "${ECHO_T}yes" >&6
e9a25f70
JL
7122 SET_MAKE=
7123else
ba479fd2
NN
7124 echo "$as_me:$LINENO: result: no" >&5
7125echo "${ECHO_T}no" >&6
e9a25f70
JL
7126 SET_MAKE="MAKE=${MAKE-make}"
7127fi
7128
7129
861bb6c1 7130# Find some useful tools
ba479fd2 7131for ac_prog in gawk mawk nawk awk
861bb6c1 7132do
ba479fd2 7133 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 7134set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7135echo "$as_me:$LINENO: checking for $ac_word" >&5
7136echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7137if test "${ac_cv_prog_AWK+set}" = set; then
7138 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7139else
7140 if test -n "$AWK"; then
7141 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7142else
ba479fd2
NN
7143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7144for as_dir in $PATH
7145do
7146 IFS=$as_save_IFS
7147 test -z "$as_dir" && as_dir=.
7148 for ac_exec_ext in '' $ac_executable_extensions; do
7149 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7150 ac_cv_prog_AWK="$ac_prog"
7151 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7152 break 2
7153 fi
7154done
7155done
7156
861bb6c1
JL
7157fi
7158fi
ba479fd2 7159AWK=$ac_cv_prog_AWK
861bb6c1 7160if test -n "$AWK"; then
ba479fd2
NN
7161 echo "$as_me:$LINENO: result: $AWK" >&5
7162echo "${ECHO_T}$AWK" >&6
861bb6c1 7163else
ba479fd2
NN
7164 echo "$as_me:$LINENO: result: no" >&5
7165echo "${ECHO_T}no" >&6
861bb6c1
JL
7166fi
7167
ba479fd2 7168 test -n "$AWK" && break
861bb6c1
JL
7169done
7170
776dc15d 7171# We need awk to create options.c and options.h.
2c4902b9
NN
7172# Bail out if it's missing.
7173case ${AWK} in
ba479fd2
NN
7174 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7175echo "$as_me: error: can't build without awk, bailing out" >&2;}
7176 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
7177esac
7178
ba479fd2
NN
7179echo "$as_me:$LINENO: checking whether ln -s works" >&5
7180echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
7181if test "${gcc_cv_prog_LN_S+set}" = set; then
7182 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7183else
7184 rm -f conftestdata_t
7185echo >conftestdata_f
7186if ln -s conftestdata_f conftestdata_t 2>/dev/null
7187then
7188 gcc_cv_prog_LN_S="ln -s"
7189else
7190 if ln conftestdata_f conftestdata_t 2>/dev/null
7191 then
7192 gcc_cv_prog_LN_S=ln
7193 else
35f06ae4
PB
7194 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7195 then
06c3418c 7196 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
7197 else
7198 gcc_cv_prog_LN_S=cp
7199 fi
0a4b6309
RL
7200 fi
7201fi
7202rm -f conftestdata_f conftestdata_t
7203
7204fi
7205LN_S="$gcc_cv_prog_LN_S"
7206if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
7207 echo "$as_me:$LINENO: result: yes" >&5
7208echo "${ECHO_T}yes" >&6
0a4b6309
RL
7209else
7210 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
7211 echo "$as_me:$LINENO: result: no, using ln" >&5
7212echo "${ECHO_T}no, using ln" >&6
0a4b6309 7213 else
35f06ae4
PB
7214 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7215echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
7216 fi
7217fi
7218
41e622a8
AP
7219echo "$as_me:$LINENO: checking whether ln works" >&5
7220echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
7221if test "${acx_cv_prog_LN+set}" = set; then
7222 echo $ECHO_N "(cached) $ECHO_C" >&6
7223else
7224 rm -f conftestdata_t
7225echo >conftestdata_f
7226if ln conftestdata_f conftestdata_t 2>/dev/null
7227then
7228 acx_cv_prog_LN=ln
7229else
7230 acx_cv_prog_LN=no
7231fi
7232rm -f conftestdata_f conftestdata_t
7233
7234fi
7235if test $acx_cv_prog_LN = no; then
7236 LN="$LN_S"
7237 echo "$as_me:$LINENO: result: no, using $LN" >&5
7238echo "${ECHO_T}no, using $LN" >&6
7239else
7240 LN="$acx_cv_prog_LN"
7241 echo "$as_me:$LINENO: result: yes" >&5
7242echo "${ECHO_T}yes" >&6
7243fi
7244
ba479fd2
NN
7245if test -n "$ac_tool_prefix"; then
7246 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7247set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7248echo "$as_me:$LINENO: checking for $ac_word" >&5
7249echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7250if test "${ac_cv_prog_RANLIB+set}" = set; then
7251 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7252else
7253 if test -n "$RANLIB"; then
7254 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7255else
ba479fd2
NN
7256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7257for as_dir in $PATH
7258do
7259 IFS=$as_save_IFS
7260 test -z "$as_dir" && as_dir=.
7261 for ac_exec_ext in '' $ac_executable_extensions; do
7262 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7263 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7264 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7265 break 2
7266 fi
7267done
7268done
7269
6e3f3080
NN
7270fi
7271fi
ba479fd2 7272RANLIB=$ac_cv_prog_RANLIB
6e3f3080 7273if test -n "$RANLIB"; then
ba479fd2
NN
7274 echo "$as_me:$LINENO: result: $RANLIB" >&5
7275echo "${ECHO_T}$RANLIB" >&6
7276else
7277 echo "$as_me:$LINENO: result: no" >&5
7278echo "${ECHO_T}no" >&6
7279fi
7280
7281fi
7282if test -z "$ac_cv_prog_RANLIB"; then
7283 ac_ct_RANLIB=$RANLIB
7284 # Extract the first word of "ranlib", so it can be a program name with args.
7285set dummy ranlib; ac_word=$2
7286echo "$as_me:$LINENO: checking for $ac_word" >&5
7287echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7288if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7289 echo $ECHO_N "(cached) $ECHO_C" >&6
7290else
7291 if test -n "$ac_ct_RANLIB"; then
7292 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7293else
7294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7295for as_dir in $PATH
7296do
7297 IFS=$as_save_IFS
7298 test -z "$as_dir" && as_dir=.
7299 for ac_exec_ext in '' $ac_executable_extensions; do
7300 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7301 ac_cv_prog_ac_ct_RANLIB="ranlib"
7302 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7303 break 2
7304 fi
7305done
7306done
7307
7308 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7309fi
7310fi
7311ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7312if test -n "$ac_ct_RANLIB"; then
7313 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7314echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 7315else
ba479fd2
NN
7316 echo "$as_me:$LINENO: result: no" >&5
7317echo "${ECHO_T}no" >&6
7318fi
7319
7320 RANLIB=$ac_ct_RANLIB
7321else
7322 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
7323fi
7324
343a6100
MM
7325case "${host}" in
7326*-*-darwin*)
7327 # By default, the Darwin ranlib will not treat common symbols as
7328 # definitions when building the archive table of contents. Other
7329 # ranlibs do that; pass an option to the Darwin ranlib that makes
7330 # it behave similarly.
7331 ranlib_flags="-c"
7332 ;;
7333*)
7334 ranlib_flags=""
7335esac
7336
7337
0a4b6309
RL
7338# Find a good install program. We prefer a C program (faster),
7339# so one script is as good as another. But avoid the broken or
7340# incompatible versions:
7341# SysV /etc/install, /usr/sbin/install
7342# SunOS /usr/etc/install
7343# IRIX /sbin/install
7344# AIX /bin/install
7345# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7346# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7347# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
7348echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7349echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 7350if test -z "$INSTALL"; then
ba479fd2
NN
7351if test "${ac_cv_path_install+set}" = set; then
7352 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7353else
7354 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7355 for ac_dir in $PATH; do
7356 # Account for people who put trailing slashes in PATH elements.
7357 case "$ac_dir/" in
7358 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7359 *)
7360 # OSF1 and SCO ODT 3.0 have their own names for install.
7361 for ac_prog in ginstall scoinst install; do
7362 if test -f $ac_dir/$ac_prog; then
7363 if test $ac_prog = install &&
7364 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7365 # AIX install. It has an incompatible calling convention.
7366 # OSF/1 installbsd also uses dspmsg, but is usable.
7367 :
7368 else
7369 ac_cv_path_install="$ac_dir/$ac_prog -c"
7370 break 2
7371 fi
7372 fi
7373 done
7374 ;;
7375 esac
7376 done
7377 IFS="$ac_save_IFS"
7378
7379fi
7380 if test "${ac_cv_path_install+set}" = set; then
7381 INSTALL="$ac_cv_path_install"
7382 else
7383 # As a last resort, use the slow shell script. We don't cache a
7384 # path for INSTALL within a source directory, because that will
7385 # break other packages using the cache if that directory is
7386 # removed, or if the path is relative.
7387 INSTALL="$ac_install_sh"
7388 fi
7389fi
ba479fd2
NN
7390echo "$as_me:$LINENO: result: $INSTALL" >&5
7391echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
7392
7393# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7394# It thinks the first close brace ends the variable substitution.
7395test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7396
7397test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7398
861bb6c1 7399
3a000df0 7400# See if cmp has --ignore-initial.
ba479fd2
NN
7401echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7402echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
7403if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7404 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
7405else
7406 echo abfoo >t1
7407 echo cdfoo >t2
269a7343 7408 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
7409 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7410 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 7411 :
3a000df0
KC
7412 else
7413 gcc_cv_prog_cmp_skip=gnucompare
7414 fi
269a7343
KG
7415 fi
7416 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7417 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7418 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7419 :
7420 else
7421 gcc_cv_prog_cmp_skip=fastcompare
7422 fi
7423 fi
3a000df0
KC
7424 fi
7425 rm t1 t2
7426
7427fi
ba479fd2
NN
7428echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7429echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
7430make_compare_target=$gcc_cv_prog_cmp_skip
7431
7432
7433
73458fb7
NN
7434# See if we have the mktemp command.
7435# Extract the first word of "mktemp", so it can be a program name with args.
7436set dummy mktemp; ac_word=$2
ba479fd2
NN
7437echo "$as_me:$LINENO: checking for $ac_word" >&5
7438echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7439if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7440 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7441else
7442 if test -n "$have_mktemp_command"; then
7443 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7444else
ba479fd2
NN
7445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7446for as_dir in $PATH
7447do
7448 IFS=$as_save_IFS
7449 test -z "$as_dir" && as_dir=.
7450 for ac_exec_ext in '' $ac_executable_extensions; do
7451 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7452 ac_cv_prog_have_mktemp_command="yes"
7453 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7454 break 2
7455 fi
7456done
7457done
7458
73458fb7
NN
7459 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7460fi
7461fi
ba479fd2 7462have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 7463if test -n "$have_mktemp_command"; then
ba479fd2
NN
7464 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7465echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 7466else
ba479fd2
NN
7467 echo "$as_me:$LINENO: result: no" >&5
7468echo "${ECHO_T}no" >&6
73458fb7
NN
7469fi
7470
7471
7c27e184
PB
7472MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
7473
7474# See if makeinfo has been installed and is modern enough
7475# that we can use it.
9f18db39
PB
7476
7477ac_executable_extensions="$build_exeext"
7478
7c27e184 7479# Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 7480set dummy makeinfo; ac_word=$2
ba479fd2
NN
7481echo "$as_me:$LINENO: checking for $ac_word" >&5
7482echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7483if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7484 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7485else
7486 if test -n "$MAKEINFO"; then
7487 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7488else
ba479fd2
NN
7489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7490for as_dir in $PATH
7491do
7492 IFS=$as_save_IFS
7493 test -z "$as_dir" && as_dir=.
7494 for ac_exec_ext in '' $ac_executable_extensions; do
7495 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7496 ac_cv_prog_MAKEINFO="makeinfo"
7497 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7498 break 2
7499 fi
7500done
7501done
7502
73458fb7
NN
7503fi
7504fi
ba479fd2 7505MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 7506if test -n "$MAKEINFO"; then
ba479fd2
NN
7507 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7508echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 7509else
ba479fd2
NN
7510 echo "$as_me:$LINENO: result: no" >&5
7511echo "${ECHO_T}no" >&6
73458fb7
NN
7512fi
7513
7514if test -n "$MAKEINFO"; then
7515 # Found it, now check the version.
ba479fd2
NN
7516 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7517echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
7518if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7519 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7520else
7521 ac_prog_version=`$MAKEINFO --version 2>&1 |
7522 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
89a42ac8 7523 echo "configure:7523: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
7524 case $ac_prog_version in
7525 '') gcc_cv_prog_makeinfo_modern=no;;
1a598a97 7526 4.[4-9]*)
73458fb7
NN
7527 gcc_cv_prog_makeinfo_modern=yes;;
7528 *) gcc_cv_prog_makeinfo_modern=no;;
7529 esac
7530
7531fi
ba479fd2
NN
7532echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7533echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
7534else
7535 gcc_cv_prog_makeinfo_modern=no
7536fi
7537
73458fb7 7538if test $gcc_cv_prog_makeinfo_modern = no; then
7c27e184 7539 MAKEINFO="$MISSING makeinfo"
ba479fd2
NN
7540 { echo "$as_me:$LINENO: WARNING:
7541*** Makeinfo is missing or too old.
7542*** Info documentation will not be built." >&5
7543echo "$as_me: WARNING:
cafe096b 7544*** Makeinfo is missing or too old.
ba479fd2 7545*** Info documentation will not be built." >&2;}
73458fb7
NN
7546 BUILD_INFO=
7547else
ba479fd2 7548 BUILD_INFO=info
73458fb7
NN
7549fi
7550
7c27e184 7551
73458fb7 7552# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
7553echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7554echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 7555if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
7556 echo "$as_me:$LINENO: result: yes" >&5
7557echo "${ECHO_T}yes" >&6
7558 GENERATED_MANPAGES=generated-manpages
73458fb7 7559else
ba479fd2
NN
7560 echo "$as_me:$LINENO: result: no" >&5
7561echo "${ECHO_T}no" >&6
73458fb7
NN
7562 GENERATED_MANPAGES=
7563fi
7564
7c27e184 7565
73458fb7 7566# How about lex?
7c27e184
PB
7567for ac_prog in flex
7568do
7569 # Extract the first word of "$ac_prog", so it can be a program name with args.
7570set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7571echo "$as_me:$LINENO: checking for $ac_word" >&5
7572echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7573if test "${ac_cv_prog_FLEX+set}" = set; then
7574 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7575else
7576 if test -n "$FLEX"; then
7577 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7578else
ba479fd2
NN
7579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7580for as_dir in $PATH
7581do
7582 IFS=$as_save_IFS
7583 test -z "$as_dir" && as_dir=.
7584 for ac_exec_ext in '' $ac_executable_extensions; do
7585 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7586 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
7587 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7588 break 2
7589 fi
7590done
7591done
7592
73458fb7
NN
7593fi
7594fi
ba479fd2 7595FLEX=$ac_cv_prog_FLEX
73458fb7 7596if test -n "$FLEX"; then
ba479fd2
NN
7597 echo "$as_me:$LINENO: result: $FLEX" >&5
7598echo "${ECHO_T}$FLEX" >&6
73458fb7 7599else
ba479fd2
NN
7600 echo "$as_me:$LINENO: result: no" >&5
7601echo "${ECHO_T}no" >&6
73458fb7
NN
7602fi
7603
7c27e184
PB
7604 test -n "$FLEX" && break
7605done
7606test -n "$FLEX" || FLEX="$MISSING flex"
7607
73458fb7
NN
7608
7609# Bison?
7c27e184
PB
7610for ac_prog in bison
7611do
7612 # Extract the first word of "$ac_prog", so it can be a program name with args.
7613set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7614echo "$as_me:$LINENO: checking for $ac_word" >&5
7615echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7616if test "${ac_cv_prog_BISON+set}" = set; then
7617 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7618else
7619 if test -n "$BISON"; then
7620 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7621else
ba479fd2
NN
7622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7623for as_dir in $PATH
7624do
7625 IFS=$as_save_IFS
7626 test -z "$as_dir" && as_dir=.
7627 for ac_exec_ext in '' $ac_executable_extensions; do
7628 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7629 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
7630 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7631 break 2
7632 fi
7633done
7634done
7635
73458fb7
NN
7636fi
7637fi
ba479fd2 7638BISON=$ac_cv_prog_BISON
73458fb7 7639if test -n "$BISON"; then
ba479fd2
NN
7640 echo "$as_me:$LINENO: result: $BISON" >&5
7641echo "${ECHO_T}$BISON" >&6
73458fb7 7642else
ba479fd2
NN
7643 echo "$as_me:$LINENO: result: no" >&5
7644echo "${ECHO_T}no" >&6
73458fb7
NN
7645fi
7646
7c27e184
PB
7647 test -n "$BISON" && break
7648done
7649test -n "$BISON" || BISON="$MISSING bison"
7650
7651
7652# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7653# check for build == host before using them.
73458fb7 7654
f6a874ac 7655# NM
414adbdd
GK
7656if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7657 && test -d ../binutils ; then
f6a874ac
JW
7658 NM='$(objdir)/../binutils/nm-new'
7659else
7660 # Extract the first word of "nm", so it can be a program name with args.
7661set dummy nm; ac_word=$2
7662echo "$as_me:$LINENO: checking for $ac_word" >&5
7663echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7664if test "${ac_cv_prog_NM+set}" = set; then
7665 echo $ECHO_N "(cached) $ECHO_C" >&6
7666else
7667 if test -n "$NM"; then
7668 ac_cv_prog_NM="$NM" # Let the user override the test.
7669else
7670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7671for as_dir in $PATH
7672do
7673 IFS=$as_save_IFS
7674 test -z "$as_dir" && as_dir=.
7675 for ac_exec_ext in '' $ac_executable_extensions; do
7676 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7677 ac_cv_prog_NM="nm"
7678 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7679 break 2
7680 fi
7681done
7682done
7683
7684 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7685fi
7686fi
7687NM=$ac_cv_prog_NM
7688if test -n "$NM"; then
7689 echo "$as_me:$LINENO: result: $NM" >&5
7690echo "${ECHO_T}$NM" >&6
7691else
7692 echo "$as_me:$LINENO: result: no" >&5
7693echo "${ECHO_T}no" >&6
7694fi
7695
7696fi
7697
7698# AR
414adbdd
GK
7699if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7700 && test -d ../binutils ; then
f6a874ac
JW
7701 AR='$(objdir)/../binutils/ar'
7702else
7703 # Extract the first word of "ar", so it can be a program name with args.
7704set dummy ar; ac_word=$2
7705echo "$as_me:$LINENO: checking for $ac_word" >&5
7706echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7707if test "${ac_cv_prog_AR+set}" = set; then
7708 echo $ECHO_N "(cached) $ECHO_C" >&6
7709else
7710 if test -n "$AR"; then
7711 ac_cv_prog_AR="$AR" # Let the user override the test.
7712else
7713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7714for as_dir in $PATH
7715do
7716 IFS=$as_save_IFS
7717 test -z "$as_dir" && as_dir=.
7718 for ac_exec_ext in '' $ac_executable_extensions; do
7719 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7720 ac_cv_prog_AR="ar"
7721 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7722 break 2
7723 fi
7724done
7725done
7726
7727 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7728fi
7729fi
7730AR=$ac_cv_prog_AR
7731if test -n "$AR"; then
7732 echo "$as_me:$LINENO: result: $AR" >&5
7733echo "${ECHO_T}$AR" >&6
7734else
7735 echo "$as_me:$LINENO: result: no" >&5
7736echo "${ECHO_T}no" >&6
7737fi
7738
7739fi
7740
7741
73458fb7
NN
7742# --------------------
7743# Checks for C headers
7744# --------------------
7745
ba479fd2
NN
7746echo "$as_me:$LINENO: checking for GNU C library" >&5
7747echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
7748if test "${gcc_cv_glibc+set}" = set; then
7749 echo $ECHO_N "(cached) $ECHO_C" >&6
7750else
7751 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7752/* confdefs.h. */
7753_ACEOF
7754cat confdefs.h >>conftest.$ac_ext
7755cat >>conftest.$ac_ext <<_ACEOF
7756/* end confdefs.h. */
73458fb7 7757#include <features.h>
ba479fd2
NN
7758int
7759main ()
7760{
73458fb7
NN
7761
7762#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7763#error Not a GNU C library system
7764#endif
ba479fd2
NN
7765 ;
7766 return 0;
7767}
7768_ACEOF
7769rm -f conftest.$ac_objext
7770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7771 (eval $ac_compile) 2>conftest.er1
ba479fd2 7772 ac_status=$?
86da66b5
HPN
7773 grep -v '^ *+' conftest.er1 >conftest.err
7774 rm -f conftest.er1
7775 cat conftest.err >&5
ba479fd2
NN
7776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7777 (exit $ac_status); } &&
e8b05380 7778 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
7779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7780 (eval $ac_try) 2>&5
7781 ac_status=$?
7782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7783 (exit $ac_status); }; } &&
7784 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7786 (eval $ac_try) 2>&5
7787 ac_status=$?
7788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7789 (exit $ac_status); }; }; then
73458fb7
NN
7790 gcc_cv_glibc=yes
7791else
ba479fd2
NN
7792 echo "$as_me: failed program was:" >&5
7793sed 's/^/| /' conftest.$ac_ext >&5
7794
7795gcc_cv_glibc=no
73458fb7 7796fi
86da66b5 7797rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
7798fi
7799
ba479fd2
NN
7800echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7801echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 7802if test $gcc_cv_glibc = yes; then
ba479fd2
NN
7803
7804cat >>confdefs.h <<\_ACEOF
73458fb7 7805#define _GNU_SOURCE 1
ba479fd2 7806_ACEOF
73458fb7
NN
7807
7808fi
7809
ca9bc441
NN
7810# Need to reject headers which give warnings, so that the -Werror bootstrap
7811# works later. *sigh* This needs to come before all header checks.
7812
7813ac_c_preproc_warn_flag=yes
7814
ba479fd2
NN
7815echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7816echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7817if test "${ac_cv_header_stdc+set}" = set; then
7818 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7819else
ba479fd2 7820 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7821/* confdefs.h. */
7822_ACEOF
7823cat confdefs.h >>conftest.$ac_ext
7824cat >>conftest.$ac_ext <<_ACEOF
7825/* end confdefs.h. */
956d6950
JL
7826#include <stdlib.h>
7827#include <stdarg.h>
7828#include <string.h>
7829#include <float.h>
ba479fd2
NN
7830
7831int
7832main ()
7833{
7834
7835 ;
7836 return 0;
7837}
7838_ACEOF
7839rm -f conftest.$ac_objext
7840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7841 (eval $ac_compile) 2>conftest.er1
ba479fd2 7842 ac_status=$?
86da66b5
HPN
7843 grep -v '^ *+' conftest.er1 >conftest.err
7844 rm -f conftest.er1
7845 cat conftest.err >&5
ba479fd2
NN
7846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7847 (exit $ac_status); } &&
e8b05380 7848 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
7849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7850 (eval $ac_try) 2>&5
7851 ac_status=$?
7852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7853 (exit $ac_status); }; } &&
7854 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7856 (eval $ac_try) 2>&5
7857 ac_status=$?
7858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7859 (exit $ac_status); }; }; then
956d6950
JL
7860 ac_cv_header_stdc=yes
7861else
ba479fd2
NN
7862 echo "$as_me: failed program was:" >&5
7863sed 's/^/| /' conftest.$ac_ext >&5
7864
7865ac_cv_header_stdc=no
956d6950 7866fi
86da66b5 7867rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
7868
7869if test $ac_cv_header_stdc = yes; then
7870 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 7871 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7872/* confdefs.h. */
7873_ACEOF
7874cat confdefs.h >>conftest.$ac_ext
7875cat >>conftest.$ac_ext <<_ACEOF
7876/* end confdefs.h. */
956d6950 7877#include <string.h>
ba479fd2
NN
7878
7879_ACEOF
956d6950 7880if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7881 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
7882 :
7883else
956d6950
JL
7884 ac_cv_header_stdc=no
7885fi
7886rm -f conftest*
7887
7888fi
7889
7890if test $ac_cv_header_stdc = yes; then
7891 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 7892 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7893/* confdefs.h. */
7894_ACEOF
7895cat confdefs.h >>conftest.$ac_ext
7896cat >>conftest.$ac_ext <<_ACEOF
7897/* end confdefs.h. */
956d6950 7898#include <stdlib.h>
ba479fd2
NN
7899
7900_ACEOF
956d6950 7901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7902 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
7903 :
7904else
956d6950
JL
7905 ac_cv_header_stdc=no
7906fi
7907rm -f conftest*
7908
7909fi
7910
7911if test $ac_cv_header_stdc = yes; then
7912 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 7913 if test "$cross_compiling" = yes; then
956d6950
JL
7914 :
7915else
ba479fd2 7916 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7917/* confdefs.h. */
7918_ACEOF
7919cat confdefs.h >>conftest.$ac_ext
7920cat >>conftest.$ac_ext <<_ACEOF
7921/* end confdefs.h. */
956d6950 7922#include <ctype.h>
ba479fd2
NN
7923#if ((' ' & 0x0FF) == 0x020)
7924# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7925# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7926#else
7927# define ISLOWER(c) \
86da66b5
HPN
7928 (('a' <= (c) && (c) <= 'i') \
7929 || ('j' <= (c) && (c) <= 'r') \
7930 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
7931# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7932#endif
63cf211a 7933
ba479fd2
NN
7934#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7935int
7936main ()
7937{
7938 int i;
7939 for (i = 0; i < 256; i++)
7940 if (XOR (islower (i), ISLOWER (i))
86da66b5 7941 || toupper (i) != TOUPPER (i))
ba479fd2
NN
7942 exit(2);
7943 exit (0);
7944}
7945_ACEOF
7946rm -f conftest$ac_exeext
7947if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7948 (eval $ac_link) 2>&5
7949 ac_status=$?
7950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7951 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7953 (eval $ac_try) 2>&5
7954 ac_status=$?
7955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7956 (exit $ac_status); }; }; then
956d6950
JL
7957 :
7958else
ba479fd2
NN
7959 echo "$as_me: program exited with status $ac_status" >&5
7960echo "$as_me: failed program was:" >&5
7961sed 's/^/| /' conftest.$ac_ext >&5
7962
7963( exit $ac_status )
7964ac_cv_header_stdc=no
956d6950 7965fi
86da66b5 7966rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 7967fi
956d6950
JL
7968fi
7969fi
ba479fd2
NN
7970echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7971echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 7972if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
7973
7974cat >>confdefs.h <<\_ACEOF
956d6950 7975#define STDC_HEADERS 1
ba479fd2 7976_ACEOF
956d6950
JL
7977
7978fi
7979
ba479fd2
NN
7980echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7981echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
7982if test "${ac_cv_header_time+set}" = set; then
7983 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7984else
ba479fd2 7985 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7986/* confdefs.h. */
7987_ACEOF
7988cat confdefs.h >>conftest.$ac_ext
7989cat >>conftest.$ac_ext <<_ACEOF
7990/* end confdefs.h. */
956d6950
JL
7991#include <sys/types.h>
7992#include <sys/time.h>
7993#include <time.h>
ba479fd2
NN
7994
7995int
7996main ()
7997{
7998if ((struct tm *) 0)
7999return 0;
8000 ;
8001 return 0;
8002}
8003_ACEOF
8004rm -f conftest.$ac_objext
8005if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8006 (eval $ac_compile) 2>conftest.er1
ba479fd2 8007 ac_status=$?
86da66b5
HPN
8008 grep -v '^ *+' conftest.er1 >conftest.err
8009 rm -f conftest.er1
8010 cat conftest.err >&5
ba479fd2
NN
8011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8012 (exit $ac_status); } &&
e8b05380 8013 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8015 (eval $ac_try) 2>&5
8016 ac_status=$?
8017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8018 (exit $ac_status); }; } &&
8019 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8021 (eval $ac_try) 2>&5
8022 ac_status=$?
8023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8024 (exit $ac_status); }; }; then
956d6950
JL
8025 ac_cv_header_time=yes
8026else
ba479fd2
NN
8027 echo "$as_me: failed program was:" >&5
8028sed 's/^/| /' conftest.$ac_ext >&5
8029
8030ac_cv_header_time=no
956d6950 8031fi
86da66b5 8032rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 8033fi
ba479fd2
NN
8034echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
8035echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 8036if test $ac_cv_header_time = yes; then
ba479fd2
NN
8037
8038cat >>confdefs.h <<\_ACEOF
956d6950 8039#define TIME_WITH_SYS_TIME 1
ba479fd2 8040_ACEOF
956d6950
JL
8041
8042fi
8043
41e622a8
AP
8044echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
8045echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
8046if test "${gcc_cv_header_string+set}" = set; then
8047 echo $ECHO_N "(cached) $ECHO_C" >&6
8048else
8049 cat >conftest.$ac_ext <<_ACEOF
8050/* confdefs.h. */
8051_ACEOF
8052cat confdefs.h >>conftest.$ac_ext
8053cat >>conftest.$ac_ext <<_ACEOF
8054/* end confdefs.h. */
8055#include <string.h>
8056#include <strings.h>
8057int
8058main ()
8059{
8060
8061 ;
8062 return 0;
8063}
8064_ACEOF
8065rm -f conftest.$ac_objext
8066if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8067 (eval $ac_compile) 2>conftest.er1
8068 ac_status=$?
8069 grep -v '^ *+' conftest.er1 >conftest.err
8070 rm -f conftest.er1
8071 cat conftest.err >&5
8072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8073 (exit $ac_status); } &&
e8b05380 8074 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
41e622a8
AP
8075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8076 (eval $ac_try) 2>&5
8077 ac_status=$?
8078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8079 (exit $ac_status); }; } &&
8080 { ac_try='test -s conftest.$ac_objext'
8081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8082 (eval $ac_try) 2>&5
8083 ac_status=$?
8084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8085 (exit $ac_status); }; }; then
8086 gcc_cv_header_string=yes
8087else
8088 echo "$as_me: failed program was:" >&5
8089sed 's/^/| /' conftest.$ac_ext >&5
8090
8091gcc_cv_header_string=no
8092fi
8093rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8094fi
8095echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
8096echo "${ECHO_T}$gcc_cv_header_string" >&6
8097if test $gcc_cv_header_string = yes; then
8098
8099cat >>confdefs.h <<\_ACEOF
8100#define STRING_WITH_STRINGS 1
8101_ACEOF
8102
8103fi
8104
ba479fd2
NN
8105echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
8106echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
8107if test "${ac_cv_header_sys_wait_h+set}" = set; then
8108 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 8109else
ba479fd2 8110 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8111/* confdefs.h. */
8112_ACEOF
8113cat confdefs.h >>conftest.$ac_ext
8114cat >>conftest.$ac_ext <<_ACEOF
8115/* end confdefs.h. */
e9831ca0
KG
8116#include <sys/types.h>
8117#include <sys/wait.h>
8118#ifndef WEXITSTATUS
ba479fd2 8119# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
8120#endif
8121#ifndef WIFEXITED
ba479fd2 8122# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 8123#endif
ba479fd2
NN
8124
8125int
8126main ()
8127{
8128 int s;
8129 wait (&s);
8130 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8131 ;
8132 return 0;
8133}
8134_ACEOF
8135rm -f conftest.$ac_objext
8136if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8137 (eval $ac_compile) 2>conftest.er1
ba479fd2 8138 ac_status=$?
86da66b5
HPN
8139 grep -v '^ *+' conftest.er1 >conftest.err
8140 rm -f conftest.er1
8141 cat conftest.err >&5
ba479fd2
NN
8142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8143 (exit $ac_status); } &&
e8b05380 8144 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8146 (eval $ac_try) 2>&5
8147 ac_status=$?
8148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149 (exit $ac_status); }; } &&
8150 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8152 (eval $ac_try) 2>&5
8153 ac_status=$?
8154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8155 (exit $ac_status); }; }; then
e9831ca0
KG
8156 ac_cv_header_sys_wait_h=yes
8157else
ba479fd2
NN
8158 echo "$as_me: failed program was:" >&5
8159sed 's/^/| /' conftest.$ac_ext >&5
8160
8161ac_cv_header_sys_wait_h=no
e9831ca0 8162fi
86da66b5 8163rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 8164fi
ba479fd2
NN
8165echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8166echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 8167if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
8168
8169cat >>confdefs.h <<\_ACEOF
e9831ca0 8170#define HAVE_SYS_WAIT_H 1
ba479fd2 8171_ACEOF
6e3f3080 8172
63cf211a 8173fi
6e3f3080 8174
ba479fd2
NN
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
dfb77e37
KC
8196
8197for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 8198 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 8199 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 8200 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 8201do
ba479fd2 8202as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 8203echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
8204echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8205if eval "test \"\${$as_ac_Header+set}\" = set"; then
8206 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8207else
ca9bc441 8208 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8209/* confdefs.h. */
8210_ACEOF
8211cat confdefs.h >>conftest.$ac_ext
8212cat >>conftest.$ac_ext <<_ACEOF
8213/* end confdefs.h. */
8214#include <$ac_header>
8215_ACEOF
8216if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8217 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8218 ac_status=$?
8219 grep -v '^ *+' conftest.er1 >conftest.err
8220 rm -f conftest.er1
8221 cat conftest.err >&5
8222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8223 (exit $ac_status); } >/dev/null; then
8224 if test -s conftest.err; then
8225 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8226 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8227 else
8228 ac_cpp_err=
8229 fi
8230else
8231 ac_cpp_err=yes
8232fi
8233if test -z "$ac_cpp_err"; then
ca9bc441 8234 eval "$as_ac_Header=yes"
ba479fd2
NN
8235else
8236 echo "$as_me: failed program was:" >&5
8237sed 's/^/| /' conftest.$ac_ext >&5
8238
ca9bc441 8239 eval "$as_ac_Header=no"
ba479fd2
NN
8240fi
8241rm -f conftest.err conftest.$ac_ext
6e3f3080 8242fi
ba479fd2
NN
8243echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8244echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
8245if test `eval echo '${'$as_ac_Header'}'` = yes; then
8246 cat >>confdefs.h <<_ACEOF
8247#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8248_ACEOF
8249
956d6950
JL
8250fi
8251done
8252
8253
f24af81b 8254# Check for thread headers.
ca9bc441 8255echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
8256echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
8257if test "${ac_cv_header_thread_h+set}" = set; then
8258 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8259else
ca9bc441 8260 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8261/* confdefs.h. */
8262_ACEOF
8263cat confdefs.h >>conftest.$ac_ext
8264cat >>conftest.$ac_ext <<_ACEOF
8265/* end confdefs.h. */
8266#include <thread.h>
8267_ACEOF
8268if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8269 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
8275 (exit $ac_status); } >/dev/null; then
8276 if test -s conftest.err; then
8277 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8278 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8279 else
8280 ac_cpp_err=
8281 fi
8282else
8283 ac_cpp_err=yes
8284fi
8285if test -z "$ac_cpp_err"; then
ca9bc441 8286 ac_cv_header_thread_h=yes
ba479fd2
NN
8287else
8288 echo "$as_me: failed program was:" >&5
8289sed 's/^/| /' conftest.$ac_ext >&5
8290
ca9bc441 8291 ac_cv_header_thread_h=no
ba479fd2
NN
8292fi
8293rm -f conftest.err conftest.$ac_ext
6e3f3080 8294fi
ba479fd2
NN
8295echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8296echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 8297if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
8298 have_thread_h=yes
8299else
ba479fd2 8300 have_thread_h=
f24af81b
TT
8301fi
8302
ca9bc441 8303echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
8304echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8305if test "${ac_cv_header_pthread_h+set}" = set; then
8306 echo $ECHO_N "(cached) $ECHO_C" >&6
f24af81b 8307else
ca9bc441 8308 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8309/* confdefs.h. */
8310_ACEOF
8311cat confdefs.h >>conftest.$ac_ext
8312cat >>conftest.$ac_ext <<_ACEOF
8313/* end confdefs.h. */
8314#include <pthread.h>
8315_ACEOF
8316if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8317 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8318 ac_status=$?
8319 grep -v '^ *+' conftest.er1 >conftest.err
8320 rm -f conftest.er1
8321 cat conftest.err >&5
8322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8323 (exit $ac_status); } >/dev/null; then
8324 if test -s conftest.err; then
8325 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8326 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8327 else
8328 ac_cpp_err=
8329 fi
8330else
8331 ac_cpp_err=yes
8332fi
8333if test -z "$ac_cpp_err"; then
ca9bc441 8334 ac_cv_header_pthread_h=yes
ba479fd2
NN
8335else
8336 echo "$as_me: failed program was:" >&5
8337sed 's/^/| /' conftest.$ac_ext >&5
8338
ca9bc441 8339 ac_cv_header_pthread_h=no
ba479fd2
NN
8340fi
8341rm -f conftest.err conftest.$ac_ext
6e3f3080 8342fi
ba479fd2
NN
8343echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8344echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 8345if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
8346 have_pthread_h=yes
8347else
ba479fd2 8348 have_pthread_h=
f24af81b
TT
8349fi
8350
8351
84c041a1 8352# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
8353echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8354echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
8355if test "${gcc_cv_decl_char_bit+set}" = set; then
8356 echo $ECHO_N "(cached) $ECHO_C" >&6
8357else
8358 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8359/* confdefs.h. */
8360_ACEOF
8361cat confdefs.h >>conftest.$ac_ext
8362cat >>conftest.$ac_ext <<_ACEOF
8363/* end confdefs.h. */
75e93faa
ZW
8364#ifdef HAVE_LIMITS_H
8365#include <limits.h>
8366#endif
8367#ifdef CHAR_BIT
8368found
8369#endif
ba479fd2 8370_ACEOF
75e93faa 8371if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8372 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
8373 gcc_cv_decl_char_bit=yes
8374else
75e93faa
ZW
8375 gcc_cv_decl_char_bit=no
8376fi
8377rm -f conftest*
8378
8379
8380fi
ba479fd2
NN
8381echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8382echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 8383if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
8384 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8385echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
8386if test "${gcc_cv_c_nbby+set}" = set; then
8387 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
8388else
8389 i=8
8390 gcc_cv_c_nbby=
8391 while test $i -lt 65; do
ba479fd2 8392 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8393/* confdefs.h. */
8394_ACEOF
8395cat confdefs.h >>conftest.$ac_ext
8396cat >>conftest.$ac_ext <<_ACEOF
8397/* end confdefs.h. */
8398
8399int
8400main ()
8401{
4e70264f
ZW
8402switch(0) {
8403 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8404 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8405 ; }
ba479fd2
NN
8406 ;
8407 return 0;
8408}
8409_ACEOF
8410rm -f conftest.$ac_objext
8411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8412 (eval $ac_compile) 2>conftest.er1
ba479fd2 8413 ac_status=$?
86da66b5
HPN
8414 grep -v '^ *+' conftest.er1 >conftest.err
8415 rm -f conftest.er1
8416 cat conftest.err >&5
ba479fd2
NN
8417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8418 (exit $ac_status); } &&
e8b05380 8419 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8421 (eval $ac_try) 2>&5
8422 ac_status=$?
8423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8424 (exit $ac_status); }; } &&
8425 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8427 (eval $ac_try) 2>&5
8428 ac_status=$?
8429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8430 (exit $ac_status); }; }; then
4e70264f 8431 gcc_cv_c_nbby=$i; break
75e93faa 8432else
ba479fd2
NN
8433 echo "$as_me: failed program was:" >&5
8434sed 's/^/| /' conftest.$ac_ext >&5
8435
75e93faa 8436fi
86da66b5 8437rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
8438 i=`expr $i + 1`
8439 done
8440 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8441
8442fi
ba479fd2
NN
8443echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8444echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 8445if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
8446 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8447echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8448 { (exit 1); exit 1; }; }
75e93faa 8449else
ba479fd2
NN
8450
8451cat >>confdefs.h <<_ACEOF
75e93faa 8452#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 8453_ACEOF
75e93faa
ZW
8454
8455fi
8456fi
ba479fd2
NN
8457echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8458echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
8459if test "${ac_cv_c_bigendian+set}" = set; then
8460 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 8461else
9791c75c 8462 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 8463cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8464/* confdefs.h. */
8465_ACEOF
8466cat confdefs.h >>conftest.$ac_ext
8467cat >>conftest.$ac_ext <<_ACEOF
8468/* end confdefs.h. */
4977bab6
ZW
8469#include <sys/types.h>
8470#include <sys/param.h>
9791c75c 8471
ba479fd2
NN
8472int
8473main ()
8474{
4977bab6
ZW
8475#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8476 bogus endian macros
84c041a1 8477#endif
9791c75c 8478
ba479fd2
NN
8479 ;
8480 return 0;
8481}
8482_ACEOF
8483rm -f conftest.$ac_objext
8484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8485 (eval $ac_compile) 2>conftest.er1
ba479fd2 8486 ac_status=$?
86da66b5
HPN
8487 grep -v '^ *+' conftest.er1 >conftest.err
8488 rm -f conftest.er1
8489 cat conftest.err >&5
ba479fd2
NN
8490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491 (exit $ac_status); } &&
e8b05380 8492 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8494 (eval $ac_try) 2>&5
8495 ac_status=$?
8496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8497 (exit $ac_status); }; } &&
8498 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8500 (eval $ac_try) 2>&5
8501 ac_status=$?
8502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8503 (exit $ac_status); }; }; then
4977bab6 8504 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 8505cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8506/* confdefs.h. */
8507_ACEOF
8508cat confdefs.h >>conftest.$ac_ext
8509cat >>conftest.$ac_ext <<_ACEOF
8510/* end confdefs.h. */
4977bab6
ZW
8511#include <sys/types.h>
8512#include <sys/param.h>
9791c75c 8513
ba479fd2
NN
8514int
8515main ()
8516{
4977bab6
ZW
8517#if BYTE_ORDER != BIG_ENDIAN
8518 not big endian
84c041a1 8519#endif
9791c75c 8520
ba479fd2
NN
8521 ;
8522 return 0;
8523}
8524_ACEOF
8525rm -f conftest.$ac_objext
8526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8527 (eval $ac_compile) 2>conftest.er1
ba479fd2 8528 ac_status=$?
86da66b5
HPN
8529 grep -v '^ *+' conftest.er1 >conftest.err
8530 rm -f conftest.er1
8531 cat conftest.err >&5
ba479fd2
NN
8532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8533 (exit $ac_status); } &&
e8b05380 8534 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8536 (eval $ac_try) 2>&5
8537 ac_status=$?
8538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539 (exit $ac_status); }; } &&
8540 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8542 (eval $ac_try) 2>&5
8543 ac_status=$?
8544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8545 (exit $ac_status); }; }; then
4977bab6
ZW
8546 ac_cv_c_bigendian=yes
8547else
ba479fd2
NN
8548 echo "$as_me: failed program was:" >&5
8549sed 's/^/| /' conftest.$ac_ext >&5
8550
8551ac_cv_c_bigendian=no
4977bab6 8552fi
86da66b5 8553rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8554else
ba479fd2
NN
8555 echo "$as_me: failed program was:" >&5
8556sed 's/^/| /' conftest.$ac_ext >&5
8557
9791c75c
KC
8558# It does not; compile a test program.
8559if test "$cross_compiling" = yes; then
8560 # try to guess the endianness by grepping values into an object file
8561 ac_cv_c_bigendian=unknown
8562 cat >conftest.$ac_ext <<_ACEOF
8563/* confdefs.h. */
8564_ACEOF
8565cat confdefs.h >>conftest.$ac_ext
8566cat >>conftest.$ac_ext <<_ACEOF
8567/* end confdefs.h. */
8568short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8569short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8570void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
8571short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8572short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8573void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
8574int
8575main ()
8576{
8577 _ascii (); _ebcdic ();
8578 ;
8579 return 0;
8580}
8581_ACEOF
8582rm -f conftest.$ac_objext
8583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8584 (eval $ac_compile) 2>conftest.er1
8585 ac_status=$?
8586 grep -v '^ *+' conftest.er1 >conftest.err
8587 rm -f conftest.er1
8588 cat conftest.err >&5
8589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8590 (exit $ac_status); } &&
e8b05380 8591 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9791c75c
KC
8592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8593 (eval $ac_try) 2>&5
8594 ac_status=$?
8595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8596 (exit $ac_status); }; } &&
8597 { ac_try='test -s conftest.$ac_objext'
8598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8599 (eval $ac_try) 2>&5
8600 ac_status=$?
8601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8602 (exit $ac_status); }; }; then
8603 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
8604 ac_cv_c_bigendian=yes
8605fi
8606if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8607 if test "$ac_cv_c_bigendian" = unknown; then
8608 ac_cv_c_bigendian=no
8609 else
8610 # finding both strings is unlikely to happen, but who knows?
8611 ac_cv_c_bigendian=unknown
8612 fi
8613fi
8614else
8615 echo "$as_me: failed program was:" >&5
8616sed 's/^/| /' conftest.$ac_ext >&5
8617
4977bab6 8618fi
86da66b5 8619rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
8620else
8621 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8622/* confdefs.h. */
8623_ACEOF
8624cat confdefs.h >>conftest.$ac_ext
8625cat >>conftest.$ac_ext <<_ACEOF
8626/* end confdefs.h. */
9791c75c
KC
8627int
8628main ()
8629{
4977bab6
ZW
8630 /* Are we little or big endian? From Harbison&Steele. */
8631 union
8632 {
8633 long l;
8634 char c[sizeof (long)];
8635 } u;
8636 u.l = 1;
8637 exit (u.c[sizeof (long) - 1] == 1);
8638}
ba479fd2
NN
8639_ACEOF
8640rm -f conftest$ac_exeext
8641if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8642 (eval $ac_link) 2>&5
8643 ac_status=$?
8644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8645 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8647 (eval $ac_try) 2>&5
8648 ac_status=$?
8649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8650 (exit $ac_status); }; }; then
4977bab6
ZW
8651 ac_cv_c_bigendian=no
8652else
ba479fd2
NN
8653 echo "$as_me: program exited with status $ac_status" >&5
8654echo "$as_me: failed program was:" >&5
8655sed 's/^/| /' conftest.$ac_ext >&5
8656
8657( exit $ac_status )
8658ac_cv_c_bigendian=yes
4977bab6 8659fi
86da66b5 8660rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 8661fi
4977bab6 8662fi
9791c75c 8663rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8664fi
ba479fd2
NN
8665echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8666echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
8667case $ac_cv_c_bigendian in
8668 yes)
ba479fd2
NN
8669
8670cat >>confdefs.h <<\_ACEOF
4977bab6 8671#define WORDS_BIGENDIAN 1
ba479fd2 8672_ACEOF
9791c75c
KC
8673 ;;
8674 no)
8675 ;;
8676 *)
8677 { { echo "$as_me:$LINENO: error: unknown endianness
8678presetting ac_cv_c_bigendian=no (or yes) will help" >&5
8679echo "$as_me: error: unknown endianness
8680presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
8681 { (exit 1); exit 1; }; } ;;
8682esac
84c041a1 8683
75e93faa 8684
73458fb7
NN
8685# --------
8686# UNSORTED
8687# --------
1e608388 8688
73458fb7
NN
8689# Stage specific cflags for build.
8690stage1_cflags=
8691case $build in
8692vax-*-*)
8693 if test x$GCC = xyes
8694 then
8695 stage1_cflags="-Wa,-J"
8696 else
8697 stage1_cflags="-J"
8698 fi
8699 ;;
8700powerpc-*-darwin*)
8701 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
8702 # sources; use -no-cpp-precomp to get to GNU cpp.
8703 # Apple's GCC has bugs in designated initializer handling, so disable
8704 # that too.
8705 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
8706 ;;
8707esac
1e608388 8708
1e608388 8709
4e70264f
ZW
8710# These libraries may be used by collect2.
8711# We may need a special search path to get them linked.
ba479fd2
NN
8712echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8713echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
8714if test "${gcc_cv_collect2_libs+set}" = set; then
8715 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
8716else
8717 save_LIBS="$LIBS"
7f2749d4 8718for libs in '' -lld -lmld \
4e70264f
ZW
8719 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8720 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8721do
8722 LIBS="$libs"
ba479fd2 8723 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8724/* confdefs.h. */
8725_ACEOF
8726cat confdefs.h >>conftest.$ac_ext
8727cat >>conftest.$ac_ext <<_ACEOF
8728/* end confdefs.h. */
8729
4e70264f 8730/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8731#ifdef __cplusplus
8732extern "C"
8733#endif
4e70264f 8734/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8735 builtin and then its argument prototype would still apply. */
8736char ldopen ();
8737int
8738main ()
8739{
8740ldopen ();
8741 ;
8742 return 0;
8743}
8744_ACEOF
8745rm -f conftest.$ac_objext conftest$ac_exeext
8746if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8747 (eval $ac_link) 2>conftest.er1
ba479fd2 8748 ac_status=$?
86da66b5
HPN
8749 grep -v '^ *+' conftest.er1 >conftest.err
8750 rm -f conftest.er1
8751 cat conftest.err >&5
ba479fd2
NN
8752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8753 (exit $ac_status); } &&
e8b05380 8754 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8756 (eval $ac_try) 2>&5
8757 ac_status=$?
8758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8759 (exit $ac_status); }; } &&
8760 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8762 (eval $ac_try) 2>&5
8763 ac_status=$?
8764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8765 (exit $ac_status); }; }; then
4e70264f
ZW
8766 gcc_cv_collect2_libs="$libs"; break
8767else
ba479fd2
NN
8768 echo "$as_me: failed program was:" >&5
8769sed 's/^/| /' conftest.$ac_ext >&5
8770
4e70264f 8771fi
86da66b5
HPN
8772rm -f conftest.err conftest.$ac_objext \
8773 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8774done
8775LIBS="$save_LIBS"
8776test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8777fi
ba479fd2
NN
8778echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8779echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
8780case $gcc_cv_collect2_libs in
8781 "none required") ;;
8782 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8783esac
8784
8785
7f2749d4
RK
8786# When building Ada code on Alpha, we need exc_resume which is usually in
8787# -lexc. So test for it.
8788save_LIBS="$LIBS"
8789LIBS=
ba479fd2
NN
8790echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8791echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
8792if test "${ac_cv_search_exc_resume+set}" = set; then
8793 echo $ECHO_N "(cached) $ECHO_C" >&6
8794else
8795 ac_func_search_save_LIBS=$LIBS
8796ac_cv_search_exc_resume=no
8797cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8798/* confdefs.h. */
8799_ACEOF
8800cat confdefs.h >>conftest.$ac_ext
8801cat >>conftest.$ac_ext <<_ACEOF
8802/* end confdefs.h. */
7f2749d4 8803
7f2749d4 8804/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8805#ifdef __cplusplus
8806extern "C"
8807#endif
7f2749d4 8808/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8809 builtin and then its argument prototype would still apply. */
8810char exc_resume ();
8811int
8812main ()
8813{
8814exc_resume ();
8815 ;
8816 return 0;
8817}
8818_ACEOF
8819rm -f conftest.$ac_objext conftest$ac_exeext
8820if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8821 (eval $ac_link) 2>conftest.er1
ba479fd2 8822 ac_status=$?
86da66b5
HPN
8823 grep -v '^ *+' conftest.er1 >conftest.err
8824 rm -f conftest.er1
8825 cat conftest.err >&5
ba479fd2
NN
8826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8827 (exit $ac_status); } &&
e8b05380 8828 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8830 (eval $ac_try) 2>&5
8831 ac_status=$?
8832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8833 (exit $ac_status); }; } &&
8834 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8836 (eval $ac_try) 2>&5
8837 ac_status=$?
8838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8839 (exit $ac_status); }; }; then
7f2749d4
RK
8840 ac_cv_search_exc_resume="none required"
8841else
ba479fd2
NN
8842 echo "$as_me: failed program was:" >&5
8843sed 's/^/| /' conftest.$ac_ext >&5
8844
7f2749d4 8845fi
86da66b5
HPN
8846rm -f conftest.err conftest.$ac_objext \
8847 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8848if test "$ac_cv_search_exc_resume" = no; then
8849 for ac_lib in exc; do
8850 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8851 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8852/* confdefs.h. */
8853_ACEOF
8854cat confdefs.h >>conftest.$ac_ext
8855cat >>conftest.$ac_ext <<_ACEOF
8856/* end confdefs.h. */
8857
7f2749d4 8858/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8859#ifdef __cplusplus
8860extern "C"
8861#endif
7f2749d4 8862/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8863 builtin and then its argument prototype would still apply. */
8864char exc_resume ();
8865int
8866main ()
8867{
8868exc_resume ();
8869 ;
8870 return 0;
8871}
8872_ACEOF
8873rm -f conftest.$ac_objext conftest$ac_exeext
8874if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8875 (eval $ac_link) 2>conftest.er1
ba479fd2 8876 ac_status=$?
86da66b5
HPN
8877 grep -v '^ *+' conftest.er1 >conftest.err
8878 rm -f conftest.er1
8879 cat conftest.err >&5
ba479fd2
NN
8880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8881 (exit $ac_status); } &&
e8b05380 8882 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8884 (eval $ac_try) 2>&5
8885 ac_status=$?
8886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8887 (exit $ac_status); }; } &&
8888 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8890 (eval $ac_try) 2>&5
8891 ac_status=$?
8892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8893 (exit $ac_status); }; }; then
8894 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
8895break
8896else
ba479fd2
NN
8897 echo "$as_me: failed program was:" >&5
8898sed 's/^/| /' conftest.$ac_ext >&5
8899
cafe096b 8900fi
86da66b5
HPN
8901rm -f conftest.err conftest.$ac_objext \
8902 conftest$ac_exeext conftest.$ac_ext
ba479fd2 8903 done
6e3f3080 8904fi
ba479fd2
NN
8905LIBS=$ac_func_search_save_LIBS
8906fi
8907echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
8908echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
8909if test "$ac_cv_search_exc_resume" != no; then
63cf211a 8910 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 8911
7f2749d4 8912fi
ba479fd2 8913
7f2749d4
RK
8914GNAT_LIBEXC="$LIBS"
8915LIBS="$save_LIBS"
8916
8917
62c9aa5f
ZW
8918# Some systems put ldexp and frexp in libm instead of libc; assume
8919# they're both in the same place. jcf-dump needs them.
8920save_LIBS="$LIBS"
8921LIBS=
ba479fd2
NN
8922echo "$as_me:$LINENO: checking for library containing ldexp" >&5
8923echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
8924if test "${ac_cv_search_ldexp+set}" = set; then
8925 echo $ECHO_N "(cached) $ECHO_C" >&6
8926else
8927 ac_func_search_save_LIBS=$LIBS
8928ac_cv_search_ldexp=no
8929cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8930/* confdefs.h. */
8931_ACEOF
8932cat confdefs.h >>conftest.$ac_ext
8933cat >>conftest.$ac_ext <<_ACEOF
8934/* end confdefs.h. */
62c9aa5f 8935
62c9aa5f 8936/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8937#ifdef __cplusplus
8938extern "C"
8939#endif
62c9aa5f 8940/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8941 builtin and then its argument prototype would still apply. */
8942char ldexp ();
8943int
8944main ()
8945{
8946ldexp ();
8947 ;
8948 return 0;
8949}
8950_ACEOF
8951rm -f conftest.$ac_objext conftest$ac_exeext
8952if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8953 (eval $ac_link) 2>conftest.er1
ba479fd2 8954 ac_status=$?
86da66b5
HPN
8955 grep -v '^ *+' conftest.er1 >conftest.err
8956 rm -f conftest.er1
8957 cat conftest.err >&5
ba479fd2
NN
8958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8959 (exit $ac_status); } &&
e8b05380 8960 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8962 (eval $ac_try) 2>&5
8963 ac_status=$?
8964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8965 (exit $ac_status); }; } &&
8966 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8968 (eval $ac_try) 2>&5
8969 ac_status=$?
8970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8971 (exit $ac_status); }; }; then
62c9aa5f
ZW
8972 ac_cv_search_ldexp="none required"
8973else
ba479fd2
NN
8974 echo "$as_me: failed program was:" >&5
8975sed 's/^/| /' conftest.$ac_ext >&5
8976
62c9aa5f 8977fi
86da66b5
HPN
8978rm -f conftest.err conftest.$ac_objext \
8979 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8980if test "$ac_cv_search_ldexp" = no; then
8981 for ac_lib in m; do
8982 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8983 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8984/* confdefs.h. */
8985_ACEOF
8986cat confdefs.h >>conftest.$ac_ext
8987cat >>conftest.$ac_ext <<_ACEOF
8988/* end confdefs.h. */
8989
62c9aa5f 8990/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8991#ifdef __cplusplus
8992extern "C"
8993#endif
62c9aa5f 8994/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8995 builtin and then its argument prototype would still apply. */
8996char ldexp ();
8997int
8998main ()
8999{
9000ldexp ();
9001 ;
9002 return 0;
9003}
9004_ACEOF
9005rm -f conftest.$ac_objext conftest$ac_exeext
9006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9007 (eval $ac_link) 2>conftest.er1
ba479fd2 9008 ac_status=$?
86da66b5
HPN
9009 grep -v '^ *+' conftest.er1 >conftest.err
9010 rm -f conftest.er1
9011 cat conftest.err >&5
ba479fd2
NN
9012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9013 (exit $ac_status); } &&
e8b05380 9014 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9016 (eval $ac_try) 2>&5
9017 ac_status=$?
9018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9019 (exit $ac_status); }; } &&
9020 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9022 (eval $ac_try) 2>&5
9023 ac_status=$?
9024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9025 (exit $ac_status); }; }; then
9026 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
9027break
9028else
ba479fd2
NN
9029 echo "$as_me: failed program was:" >&5
9030sed 's/^/| /' conftest.$ac_ext >&5
9031
cafe096b 9032fi
86da66b5
HPN
9033rm -f conftest.err conftest.$ac_objext \
9034 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9035 done
6e3f3080 9036fi
ba479fd2
NN
9037LIBS=$ac_func_search_save_LIBS
9038fi
9039echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
9040echo "${ECHO_T}$ac_cv_search_ldexp" >&6
9041if test "$ac_cv_search_ldexp" != no; then
63cf211a 9042 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 9043
62c9aa5f 9044fi
ba479fd2 9045
62c9aa5f
ZW
9046LDEXP_LIB="$LIBS"
9047LIBS="$save_LIBS"
9048
9049
956d6950
JL
9050# Use <inttypes.h> only if it exists,
9051# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
9052echo "$as_me:$LINENO: checking for inttypes.h" >&5
9053echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
9054if test "${gcc_cv_header_inttypes_h+set}" = set; then
9055 echo $ECHO_N "(cached) $ECHO_C" >&6
9056else
9057 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9058/* confdefs.h. */
9059_ACEOF
9060cat confdefs.h >>conftest.$ac_ext
9061cat >>conftest.$ac_ext <<_ACEOF
9062/* end confdefs.h. */
956d6950
JL
9063#include <sys/types.h>
9064#include <inttypes.h>
ba479fd2
NN
9065int
9066main ()
9067{
956d6950 9068intmax_t i = -1;
ba479fd2
NN
9069 ;
9070 return 0;
9071}
9072_ACEOF
9073rm -f conftest.$ac_objext
9074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9075 (eval $ac_compile) 2>conftest.er1
ba479fd2 9076 ac_status=$?
86da66b5
HPN
9077 grep -v '^ *+' conftest.er1 >conftest.err
9078 rm -f conftest.er1
9079 cat conftest.err >&5
ba479fd2
NN
9080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9081 (exit $ac_status); } &&
e8b05380 9082 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9084 (eval $ac_try) 2>&5
9085 ac_status=$?
9086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9087 (exit $ac_status); }; } &&
9088 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9090 (eval $ac_try) 2>&5
9091 ac_status=$?
9092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9093 (exit $ac_status); }; }; then
0056a9b5 9094 gcc_cv_header_inttypes_h=yes
956d6950 9095else
ba479fd2
NN
9096 echo "$as_me: failed program was:" >&5
9097sed 's/^/| /' conftest.$ac_ext >&5
9098
9099gcc_cv_header_inttypes_h=no
956d6950 9100fi
86da66b5 9101rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
9102fi
9103
ba479fd2
NN
9104echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
9105echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 9106if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
9107
9108cat >>confdefs.h <<\_ACEOF
0056a9b5 9109#define HAVE_INTTYPES_H 1
ba479fd2 9110_ACEOF
0056a9b5
KG
9111
9112fi
956d6950 9113
c149cc37 9114
ba479fd2
NN
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
0d667716
KG
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
ba479fd2
NN
9143
9144
9145
9146
9147
9148
9149
9150
52a6edcc 9151for ac_func in times clock kill getrlimit setrlimit atoll atoq \
0d667716
KG
9152 sysconf strsignal getrusage nl_langinfo scandir alphasort \
9153 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9154 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 9155do
ba479fd2
NN
9156as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9157echo "$as_me:$LINENO: checking for $ac_func" >&5
9158echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9159if eval "test \"\${$as_ac_var+set}\" = set"; then
9160 echo $ECHO_N "(cached) $ECHO_C" >&6
9161else
9162 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9163/* confdefs.h. */
9164_ACEOF
9165cat confdefs.h >>conftest.$ac_ext
9166cat >>conftest.$ac_ext <<_ACEOF
9167/* end confdefs.h. */
86da66b5
HPN
9168/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9169 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9170#define $ac_func innocuous_$ac_func
9171
956d6950 9172/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9173 which can conflict with char $ac_func (); below.
9174 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9175 <limits.h> exists even on freestanding compilers. */
86da66b5 9176
ba479fd2
NN
9177#ifdef __STDC__
9178# include <limits.h>
9179#else
9180# include <assert.h>
9181#endif
86da66b5
HPN
9182
9183#undef $ac_func
9184
6e3f3080 9185/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9186#ifdef __cplusplus
9187extern "C"
9188{
9189#endif
6e3f3080 9190/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9191 builtin and then its argument prototype would still apply. */
9192char $ac_func ();
956d6950
JL
9193/* The GNU C library defines this for functions which it implements
9194 to always fail with ENOSYS. Some functions are actually named
9195 something starting with __ and the normal name is an alias. */
9196#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9197choke me
9198#else
ba479fd2
NN
9199char (*f) () = $ac_func;
9200#endif
9201#ifdef __cplusplus
9202}
956d6950
JL
9203#endif
9204
ba479fd2
NN
9205int
9206main ()
9207{
9208return f != $ac_func;
9209 ;
9210 return 0;
9211}
9212_ACEOF
9213rm -f conftest.$ac_objext conftest$ac_exeext
9214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9215 (eval $ac_link) 2>conftest.er1
ba479fd2 9216 ac_status=$?
86da66b5
HPN
9217 grep -v '^ *+' conftest.er1 >conftest.err
9218 rm -f conftest.er1
9219 cat conftest.err >&5
ba479fd2
NN
9220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9221 (exit $ac_status); } &&
e8b05380 9222 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9224 (eval $ac_try) 2>&5
9225 ac_status=$?
9226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9227 (exit $ac_status); }; } &&
9228 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9230 (eval $ac_try) 2>&5
9231 ac_status=$?
9232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9233 (exit $ac_status); }; }; then
9234 eval "$as_ac_var=yes"
9235else
9236 echo "$as_me: failed program was:" >&5
9237sed 's/^/| /' conftest.$ac_ext >&5
9238
9239eval "$as_ac_var=no"
9240fi
86da66b5
HPN
9241rm -f conftest.err conftest.$ac_objext \
9242 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9243fi
9244echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9245echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9246if test `eval echo '${'$as_ac_var'}'` = yes; then
9247 cat >>confdefs.h <<_ACEOF
9248#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9249_ACEOF
956d6950 9250
956d6950
JL
9251fi
9252done
9253
6885fc87 9254
39f6c4c8 9255if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
9256 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9257echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
9258if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9259 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9260else
9261 if test "$cross_compiling" = yes; then
9262 gcc_cv_func_mbstowcs_works=yes
9263else
ba479fd2 9264 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9265/* confdefs.h. */
9266_ACEOF
9267cat confdefs.h >>conftest.$ac_ext
9268cat >>conftest.$ac_ext <<_ACEOF
9269/* end confdefs.h. */
39f6c4c8
KW
9270#include <stdlib.h>
9271int main()
9272{
9273 mbstowcs(0, "", 0);
9274 return 0;
9275}
ba479fd2
NN
9276_ACEOF
9277rm -f conftest$ac_exeext
9278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9279 (eval $ac_link) 2>&5
9280 ac_status=$?
9281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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
39f6c4c8
KW
9288 gcc_cv_func_mbstowcs_works=yes
9289else
ba479fd2
NN
9290 echo "$as_me: program exited with status $ac_status" >&5
9291echo "$as_me: failed program was:" >&5
9292sed 's/^/| /' conftest.$ac_ext >&5
9293
9294( exit $ac_status )
9295gcc_cv_func_mbstowcs_works=no
39f6c4c8 9296fi
86da66b5 9297rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 9298fi
39f6c4c8 9299fi
ba479fd2
NN
9300echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9301echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 9302 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
9303
9304cat >>confdefs.h <<\_ACEOF
39f6c4c8 9305#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 9306_ACEOF
39f6c4c8
KW
9307
9308 fi
9309fi
9310
ba479fd2
NN
9311echo "$as_me:$LINENO: checking for ssize_t" >&5
9312echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
9313if test "${ac_cv_type_ssize_t+set}" = set; then
9314 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 9315else
ba479fd2 9316 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9317/* confdefs.h. */
9318_ACEOF
9319cat confdefs.h >>conftest.$ac_ext
9320cat >>conftest.$ac_ext <<_ACEOF
9321/* end confdefs.h. */
8b4fc07a
NN
9322$ac_includes_default
9323int
9324main ()
9325{
9326if ((ssize_t *) 0)
9327 return 0;
9328if (sizeof (ssize_t))
9329 return 0;
9330 ;
9331 return 0;
9332}
ba479fd2 9333_ACEOF
8b4fc07a
NN
9334rm -f conftest.$ac_objext
9335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9336 (eval $ac_compile) 2>conftest.er1
8b4fc07a 9337 ac_status=$?
86da66b5
HPN
9338 grep -v '^ *+' conftest.er1 >conftest.err
9339 rm -f conftest.er1
9340 cat conftest.err >&5
8b4fc07a
NN
9341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9342 (exit $ac_status); } &&
e8b05380 9343 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9345 (eval $ac_try) 2>&5
9346 ac_status=$?
9347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9348 (exit $ac_status); }; } &&
9349 { ac_try='test -s conftest.$ac_objext'
8b4fc07a
NN
9350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9351 (eval $ac_try) 2>&5
9352 ac_status=$?
9353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9354 (exit $ac_status); }; }; then
cb65112a 9355 ac_cv_type_ssize_t=yes
f12bc141 9356else
8b4fc07a
NN
9357 echo "$as_me: failed program was:" >&5
9358sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9359
8b4fc07a
NN
9360ac_cv_type_ssize_t=no
9361fi
86da66b5 9362rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9363fi
ba479fd2
NN
9364echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9365echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
9366if test $ac_cv_type_ssize_t = yes; then
9367 :
9368else
ba479fd2 9369
8b4fc07a 9370cat >>confdefs.h <<_ACEOF
f12bc141 9371#define ssize_t int
ba479fd2 9372_ACEOF
f12bc141
ZW
9373
9374fi
9375
0b9d02c6 9376
e256b8b6
DA
9377# Try to determine the array type of the second argument of getgroups
9378# for the target system (int or gid_t).
ba479fd2
NN
9379echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9380echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
9381if test "${ac_cv_type_uid_t+set}" = set; then
9382 echo $ECHO_N "(cached) $ECHO_C" >&6
9383else
9384 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9385/* confdefs.h. */
9386_ACEOF
9387cat confdefs.h >>conftest.$ac_ext
9388cat >>conftest.$ac_ext <<_ACEOF
9389/* end confdefs.h. */
e256b8b6 9390#include <sys/types.h>
ba479fd2
NN
9391
9392_ACEOF
e256b8b6 9393if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9394 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
9395 ac_cv_type_uid_t=yes
9396else
e256b8b6
DA
9397 ac_cv_type_uid_t=no
9398fi
9399rm -f conftest*
9400
9401fi
ba479fd2
NN
9402echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9403echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 9404if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
9405
9406cat >>confdefs.h <<\_ACEOF
e256b8b6 9407#define uid_t int
ba479fd2 9408_ACEOF
cafe096b 9409
ba479fd2
NN
9410
9411cat >>confdefs.h <<\_ACEOF
e256b8b6 9412#define gid_t int
ba479fd2 9413_ACEOF
e256b8b6
DA
9414
9415fi
9416
ba479fd2
NN
9417echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9418echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
9419if test "${ac_cv_type_getgroups+set}" = set; then
9420 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
9421else
9422 if test "$cross_compiling" = yes; then
9423 ac_cv_type_getgroups=cross
9424else
ba479fd2 9425 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9426/* confdefs.h. */
9427_ACEOF
9428cat confdefs.h >>conftest.$ac_ext
9429cat >>conftest.$ac_ext <<_ACEOF
9430/* end confdefs.h. */
e256b8b6
DA
9431/* Thanks to Mike Rendell for this test. */
9432#include <sys/types.h>
9433#define NGID 256
9434#undef MAX
9435#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
9436
9437int
9438main ()
e256b8b6
DA
9439{
9440 gid_t gidset[NGID];
9441 int i, n;
9442 union { gid_t gval; long lval; } val;
9443
9444 val.lval = -1;
9445 for (i = 0; i < NGID; i++)
9446 gidset[i] = val.gval;
9447 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 9448 gidset);
e256b8b6
DA
9449 /* Exit non-zero if getgroups seems to require an array of ints. This
9450 happens when gid_t is short but getgroups modifies an array of ints. */
9451 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 9452}
ba479fd2
NN
9453_ACEOF
9454rm -f conftest$ac_exeext
9455if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9456 (eval $ac_link) 2>&5
9457 ac_status=$?
9458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9459 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9461 (eval $ac_try) 2>&5
9462 ac_status=$?
9463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9464 (exit $ac_status); }; }; then
9465 ac_cv_type_getgroups=gid_t
63cf211a 9466else
ba479fd2
NN
9467 echo "$as_me: program exited with status $ac_status" >&5
9468echo "$as_me: failed program was:" >&5
9469sed 's/^/| /' conftest.$ac_ext >&5
9470
9471( exit $ac_status )
9472ac_cv_type_getgroups=int
e256b8b6 9473fi
86da66b5 9474rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 9475fi
e256b8b6 9476if test $ac_cv_type_getgroups = cross; then
ba479fd2 9477 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9478/* confdefs.h. */
9479_ACEOF
9480cat confdefs.h >>conftest.$ac_ext
9481cat >>conftest.$ac_ext <<_ACEOF
9482/* end confdefs.h. */
e256b8b6 9483#include <unistd.h>
ba479fd2
NN
9484
9485_ACEOF
e256b8b6 9486if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9487 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
9488 ac_cv_type_getgroups=gid_t
9489else
e256b8b6
DA
9490 ac_cv_type_getgroups=int
9491fi
9492rm -f conftest*
9493
9494fi
9495fi
ba479fd2
NN
9496echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9497echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 9498
ba479fd2 9499cat >>confdefs.h <<_ACEOF
e256b8b6 9500#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 9501_ACEOF
e256b8b6
DA
9502
9503
9504if test "${target}" = "${build}"; then
9505 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9506else
9507 case "${target}" in
9508 # This condition may need some tweaking. It should include all
9509 # targets where the array type of the second argument of getgroups
9510 # is int and the type of gid_t is not equivalent to int.
9511 *-*-sunos* | *-*-ultrix*)
9512 TARGET_GETGROUPS_T=int
9513 ;;
9514 *)
9515 TARGET_GETGROUPS_T=gid_t
9516 ;;
9517 esac
9518fi
9519
9520
3b0727a0
MR
9521
9522echo "$as_me:$LINENO: checking for sys/mman.h" >&5
9523echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
9524if test "${ac_cv_header_sys_mman_h+set}" = set; then
9525 echo $ECHO_N "(cached) $ECHO_C" >&6
9526else
9527 cat >conftest.$ac_ext <<_ACEOF
9528/* confdefs.h. */
9529_ACEOF
9530cat confdefs.h >>conftest.$ac_ext
9531cat >>conftest.$ac_ext <<_ACEOF
9532/* end confdefs.h. */
9533#include <sys/mman.h>
9534_ACEOF
9535if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9536 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9537 ac_status=$?
9538 grep -v '^ *+' conftest.er1 >conftest.err
9539 rm -f conftest.er1
9540 cat conftest.err >&5
9541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9542 (exit $ac_status); } >/dev/null; then
9543 if test -s conftest.err; then
9544 ac_cpp_err=$ac_c_preproc_warn_flag
9545 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9546 else
9547 ac_cpp_err=
9548 fi
9549else
9550 ac_cpp_err=yes
9551fi
9552if test -z "$ac_cpp_err"; then
9553 ac_cv_header_sys_mman_h=yes
9554else
9555 echo "$as_me: failed program was:" >&5
9556sed 's/^/| /' conftest.$ac_ext >&5
9557
9558 ac_cv_header_sys_mman_h=no
9559fi
9560rm -f conftest.err conftest.$ac_ext
9561fi
9562echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9563echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
9564if test $ac_cv_header_sys_mman_h = yes; then
9565 gcc_header_sys_mman_h=yes
9566else
9567 gcc_header_sys_mman_h=no
9568fi
9569
9570echo "$as_me:$LINENO: checking for mmap" >&5
9571echo $ECHO_N "checking for mmap... $ECHO_C" >&6
9572if test "${ac_cv_func_mmap+set}" = set; then
9573 echo $ECHO_N "(cached) $ECHO_C" >&6
9574else
9575 cat >conftest.$ac_ext <<_ACEOF
9576/* confdefs.h. */
9577_ACEOF
9578cat confdefs.h >>conftest.$ac_ext
9579cat >>conftest.$ac_ext <<_ACEOF
9580/* end confdefs.h. */
9581/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9582 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9583#define mmap innocuous_mmap
9584
9585/* System header to define __stub macros and hopefully few prototypes,
9586 which can conflict with char mmap (); below.
9587 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9588 <limits.h> exists even on freestanding compilers. */
9589
9590#ifdef __STDC__
9591# include <limits.h>
9592#else
9593# include <assert.h>
9594#endif
9595
9596#undef mmap
9597
9598/* Override any gcc2 internal prototype to avoid an error. */
9599#ifdef __cplusplus
9600extern "C"
9601{
9602#endif
9603/* We use char because int might match the return type of a gcc2
9604 builtin and then its argument prototype would still apply. */
9605char mmap ();
9606/* The GNU C library defines this for functions which it implements
9607 to always fail with ENOSYS. Some functions are actually named
9608 something starting with __ and the normal name is an alias. */
9609#if defined (__stub_mmap) || defined (__stub___mmap)
9610choke me
9611#else
9612char (*f) () = mmap;
9613#endif
9614#ifdef __cplusplus
9615}
9616#endif
9617
9618int
9619main ()
9620{
9621return f != mmap;
9622 ;
9623 return 0;
9624}
9625_ACEOF
9626rm -f conftest.$ac_objext conftest$ac_exeext
9627if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9628 (eval $ac_link) 2>conftest.er1
9629 ac_status=$?
9630 grep -v '^ *+' conftest.er1 >conftest.err
9631 rm -f conftest.er1
9632 cat conftest.err >&5
9633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9634 (exit $ac_status); } &&
e8b05380 9635 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3b0727a0
MR
9636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9637 (eval $ac_try) 2>&5
9638 ac_status=$?
9639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9640 (exit $ac_status); }; } &&
9641 { ac_try='test -s conftest$ac_exeext'
9642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9643 (eval $ac_try) 2>&5
9644 ac_status=$?
9645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9646 (exit $ac_status); }; }; then
9647 ac_cv_func_mmap=yes
9648else
9649 echo "$as_me: failed program was:" >&5
9650sed 's/^/| /' conftest.$ac_ext >&5
9651
9652ac_cv_func_mmap=no
9653fi
9654rm -f conftest.err conftest.$ac_objext \
9655 conftest$ac_exeext conftest.$ac_ext
9656fi
9657echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9658echo "${ECHO_T}$ac_cv_func_mmap" >&6
9659if test $ac_cv_func_mmap = yes; then
9660 gcc_func_mmap=yes
9661else
9662 gcc_func_mmap=no
9663fi
9664
9665if test "$gcc_header_sys_mman_h" != yes \
9666 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
9667 gcc_cv_func_mmap_file=no
9668 gcc_cv_func_mmap_dev_zero=no
9669 gcc_cv_func_mmap_anon=no
9670else
ba479fd2
NN
9671 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9672echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
9673if test "${gcc_cv_func_mmap_file+set}" = set; then
9674 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 9675else
ba479fd2 9676 # Add a system to this blacklist if
1072ec3f
ZW
9677 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9678 # memory area containing the same data that you'd get if you applied
9679 # read() to the same fd. The only system known to have a problem here
9680 # is VMS, where text files have record structure.
9681 case "$host_os" in
ba479fd2 9682 vms* | ultrix*)
1072ec3f
ZW
9683 gcc_cv_func_mmap_file=no ;;
9684 *)
9685 gcc_cv_func_mmap_file=yes;;
9686 esac
9687fi
ba479fd2
NN
9688echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9689echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9690 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9691echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
9692if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9693 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9694else
9695 # Add a system to this blacklist if it has mmap() but /dev/zero
9696 # does not exist, or if mmapping /dev/zero does not give anonymous
9697 # zeroed pages with both the following properties:
9698 # 1. If you map N consecutive pages in with one call, and then
9699 # unmap any subset of those pages, the pages that were not
9700 # explicitly unmapped remain accessible.
9701 # 2. If you map two adjacent blocks of memory and then unmap them
9702 # both at once, they must both go away.
9703 # Systems known to be in this category are Windows (all variants),
9704 # VMS, and Darwin.
9705 case "$host_os" in
2ce240d3 9706 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
9707 gcc_cv_func_mmap_dev_zero=no ;;
9708 *)
9709 gcc_cv_func_mmap_dev_zero=yes;;
9710 esac
9711fi
ba479fd2
NN
9712echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9713echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
9714
9715 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
9716 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9717echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
9718if test "${gcc_cv_decl_map_anon+set}" = set; then
9719 echo $ECHO_N "(cached) $ECHO_C" >&6
9720else
9721 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9722/* confdefs.h. */
9723_ACEOF
9724cat confdefs.h >>conftest.$ac_ext
9725cat >>conftest.$ac_ext <<_ACEOF
9726/* end confdefs.h. */
1072ec3f
ZW
9727#include <sys/types.h>
9728#include <sys/mman.h>
9729#include <unistd.h>
9730
9731#ifndef MAP_ANONYMOUS
9732#define MAP_ANONYMOUS MAP_ANON
9733#endif
9734
ba479fd2
NN
9735int
9736main ()
9737{
1072ec3f 9738int n = MAP_ANONYMOUS;
ba479fd2
NN
9739 ;
9740 return 0;
9741}
9742_ACEOF
9743rm -f conftest.$ac_objext
9744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9745 (eval $ac_compile) 2>conftest.er1
ba479fd2 9746 ac_status=$?
86da66b5
HPN
9747 grep -v '^ *+' conftest.er1 >conftest.err
9748 rm -f conftest.er1
9749 cat conftest.err >&5
ba479fd2
NN
9750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9751 (exit $ac_status); } &&
e8b05380 9752 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9754 (eval $ac_try) 2>&5
9755 ac_status=$?
9756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9757 (exit $ac_status); }; } &&
9758 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9760 (eval $ac_try) 2>&5
9761 ac_status=$?
9762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9763 (exit $ac_status); }; }; then
1072ec3f
ZW
9764 gcc_cv_decl_map_anon=yes
9765else
ba479fd2
NN
9766 echo "$as_me: failed program was:" >&5
9767sed 's/^/| /' conftest.$ac_ext >&5
9768
9769gcc_cv_decl_map_anon=no
1072ec3f 9770fi
86da66b5 9771rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 9772fi
ba479fd2
NN
9773echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9774echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
9775
9776 if test $gcc_cv_decl_map_anon = no; then
9777 gcc_cv_func_mmap_anon=no
9778 else
ba479fd2
NN
9779 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9780echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
9781if test "${gcc_cv_func_mmap_anon+set}" = set; then
9782 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9783else
9784 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9785 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9786 # doesn't give anonymous zeroed pages with the same properties listed
9787 # above for use of /dev/zero.
9788 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9789 case "$host_os" in
9790 vms* | cygwin* | pe | mingw* | sco* | udk* )
9791 gcc_cv_func_mmap_anon=no ;;
9792 *)
9793 gcc_cv_func_mmap_anon=yes;;
9794 esac
9795fi
ba479fd2
NN
9796echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9797echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
9798 fi
9799fi
9800
9801if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
9802
9803cat >>confdefs.h <<\_ACEOF
1072ec3f 9804#define HAVE_MMAP_FILE 1
ba479fd2 9805_ACEOF
1072ec3f
ZW
9806
9807fi
9808if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
9809
9810cat >>confdefs.h <<\_ACEOF
1072ec3f 9811#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 9812_ACEOF
1072ec3f
ZW
9813
9814fi
9815if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
9816
9817cat >>confdefs.h <<\_ACEOF
1072ec3f 9818#define HAVE_MMAP_ANON 1
ba479fd2 9819_ACEOF
1072ec3f
ZW
9820
9821fi
9822
b27d2bd5
MK
9823
9824case "${host}" in
ee262b6f 9825*-*-*vms*)
ba479fd2 9826 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
9827 # won't work, and it isn't easily adaptable. It makes more sense to
9828 # just force it.
9829 ac_cv_func_vfork_works=yes
9830 ;;
b27d2bd5 9831esac
ba479fd2
NN
9832echo "$as_me:$LINENO: checking for pid_t" >&5
9833echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
9834if test "${ac_cv_type_pid_t+set}" = set; then
9835 echo $ECHO_N "(cached) $ECHO_C" >&6
9836else
9837 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9838/* confdefs.h. */
9839_ACEOF
9840cat confdefs.h >>conftest.$ac_ext
9841cat >>conftest.$ac_ext <<_ACEOF
9842/* end confdefs.h. */
9843$ac_includes_default
9844int
9845main ()
9846{
9847if ((pid_t *) 0)
9848 return 0;
9849if (sizeof (pid_t))
9850 return 0;
9851 ;
9852 return 0;
9853}
9854_ACEOF
9855rm -f conftest.$ac_objext
9856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9857 (eval $ac_compile) 2>conftest.er1
ba479fd2 9858 ac_status=$?
86da66b5
HPN
9859 grep -v '^ *+' conftest.er1 >conftest.err
9860 rm -f conftest.er1
9861 cat conftest.err >&5
ba479fd2
NN
9862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9863 (exit $ac_status); } &&
e8b05380 9864 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9866 (eval $ac_try) 2>&5
9867 ac_status=$?
9868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9869 (exit $ac_status); }; } &&
9870 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9872 (eval $ac_try) 2>&5
9873 ac_status=$?
9874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9875 (exit $ac_status); }; }; then
cb65112a 9876 ac_cv_type_pid_t=yes
c375c43b 9877else
ba479fd2
NN
9878 echo "$as_me: failed program was:" >&5
9879sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9880
ba479fd2
NN
9881ac_cv_type_pid_t=no
9882fi
86da66b5 9883rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9884fi
ba479fd2
NN
9885echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
9886echo "${ECHO_T}$ac_cv_type_pid_t" >&6
9887if test $ac_cv_type_pid_t = yes; then
9888 :
9889else
9890
9891cat >>confdefs.h <<_ACEOF
c375c43b 9892#define pid_t int
ba479fd2 9893_ACEOF
c375c43b
KG
9894
9895fi
9896
ba479fd2
NN
9897
9898
9899for ac_header in unistd.h vfork.h
9900do
9901as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 9902echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
9903echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9904if eval "test \"\${$as_ac_Header+set}\" = set"; then
9905 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9906else
ca9bc441 9907 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9908/* confdefs.h. */
9909_ACEOF
9910cat confdefs.h >>conftest.$ac_ext
9911cat >>conftest.$ac_ext <<_ACEOF
9912/* end confdefs.h. */
9913#include <$ac_header>
9914_ACEOF
9915if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9916 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9917 ac_status=$?
9918 grep -v '^ *+' conftest.er1 >conftest.err
9919 rm -f conftest.er1
9920 cat conftest.err >&5
9921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9922 (exit $ac_status); } >/dev/null; then
9923 if test -s conftest.err; then
9924 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 9925 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
9926 else
9927 ac_cpp_err=
9928 fi
093e61a6 9929else
ba479fd2
NN
9930 ac_cpp_err=yes
9931fi
9932if test -z "$ac_cpp_err"; then
ca9bc441 9933 eval "$as_ac_Header=yes"
ba479fd2
NN
9934else
9935 echo "$as_me: failed program was:" >&5
9936sed 's/^/| /' conftest.$ac_ext >&5
9937
ca9bc441 9938 eval "$as_ac_Header=no"
ba479fd2
NN
9939fi
9940rm -f conftest.err conftest.$ac_ext
c375c43b 9941fi
ba479fd2
NN
9942echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9943echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
9944if test `eval echo '${'$as_ac_Header'}'` = yes; then
9945 cat >>confdefs.h <<_ACEOF
9946#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9947_ACEOF
6e3f3080
NN
9948
9949fi
ba479fd2
NN
9950done
9951
9952
9953
9954for ac_func in fork vfork
9955do
9956as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9957echo "$as_me:$LINENO: checking for $ac_func" >&5
9958echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9959if eval "test \"\${$as_ac_var+set}\" = set"; then
9960 echo $ECHO_N "(cached) $ECHO_C" >&6
9961else
9962 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9963/* confdefs.h. */
9964_ACEOF
9965cat confdefs.h >>conftest.$ac_ext
9966cat >>conftest.$ac_ext <<_ACEOF
9967/* end confdefs.h. */
86da66b5
HPN
9968/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9969 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9970#define $ac_func innocuous_$ac_func
9971
c375c43b 9972/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9973 which can conflict with char $ac_func (); below.
9974 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9975 <limits.h> exists even on freestanding compilers. */
86da66b5 9976
ba479fd2
NN
9977#ifdef __STDC__
9978# include <limits.h>
9979#else
9980# include <assert.h>
9981#endif
86da66b5
HPN
9982
9983#undef $ac_func
9984
6e3f3080 9985/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9986#ifdef __cplusplus
9987extern "C"
9988{
9989#endif
6e3f3080 9990/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9991 builtin and then its argument prototype would still apply. */
9992char $ac_func ();
c375c43b
KG
9993/* The GNU C library defines this for functions which it implements
9994 to always fail with ENOSYS. Some functions are actually named
9995 something starting with __ and the normal name is an alias. */
ba479fd2 9996#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
9997choke me
9998#else
ba479fd2
NN
9999char (*f) () = $ac_func;
10000#endif
10001#ifdef __cplusplus
10002}
c375c43b
KG
10003#endif
10004
ba479fd2
NN
10005int
10006main ()
10007{
10008return f != $ac_func;
10009 ;
10010 return 0;
10011}
10012_ACEOF
10013rm -f conftest.$ac_objext conftest$ac_exeext
10014if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10015 (eval $ac_link) 2>conftest.er1
ba479fd2 10016 ac_status=$?
86da66b5
HPN
10017 grep -v '^ *+' conftest.er1 >conftest.err
10018 rm -f conftest.er1
10019 cat conftest.err >&5
ba479fd2
NN
10020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10021 (exit $ac_status); } &&
e8b05380 10022 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
10023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10024 (eval $ac_try) 2>&5
10025 ac_status=$?
10026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10027 (exit $ac_status); }; } &&
10028 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10030 (eval $ac_try) 2>&5
10031 ac_status=$?
10032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10033 (exit $ac_status); }; }; then
10034 eval "$as_ac_var=yes"
10035else
10036 echo "$as_me: failed program was:" >&5
10037sed 's/^/| /' conftest.$ac_ext >&5
10038
10039eval "$as_ac_var=no"
10040fi
86da66b5
HPN
10041rm -f conftest.err conftest.$ac_objext \
10042 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
10043fi
10044echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10045echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10046if test `eval echo '${'$as_ac_var'}'` = yes; then
10047 cat >>confdefs.h <<_ACEOF
10048#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10049_ACEOF
10050
c375c43b 10051fi
ba479fd2 10052done
c375c43b 10053
ba479fd2
NN
10054if test "x$ac_cv_func_fork" = xyes; then
10055 echo "$as_me:$LINENO: checking for working fork" >&5
10056echo $ECHO_N "checking for working fork... $ECHO_C" >&6
10057if test "${ac_cv_func_fork_works+set}" = set; then
10058 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10059else
ba479fd2
NN
10060 if test "$cross_compiling" = yes; then
10061 ac_cv_func_fork_works=cross
10062else
10063 cat >conftest.$ac_ext <<_ACEOF
e8b05380
PB
10064/* confdefs.h. */
10065_ACEOF
10066cat confdefs.h >>conftest.$ac_ext
10067cat >>conftest.$ac_ext <<_ACEOF
10068/* end confdefs.h. */
10069$ac_includes_default
10070int
10071main ()
10072{
10073
10074 /* By Ruediger Kuhlmann. */
10075 if (fork() < 0)
10076 exit (1);
10077 exit (0);
10078
10079 ;
10080 return 0;
10081}
ba479fd2
NN
10082_ACEOF
10083rm -f conftest$ac_exeext
10084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10085 (eval $ac_link) 2>&5
10086 ac_status=$?
10087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10088 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10090 (eval $ac_try) 2>&5
10091 ac_status=$?
10092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093 (exit $ac_status); }; }; then
10094 ac_cv_func_fork_works=yes
10095else
10096 echo "$as_me: program exited with status $ac_status" >&5
10097echo "$as_me: failed program was:" >&5
10098sed 's/^/| /' conftest.$ac_ext >&5
10099
10100( exit $ac_status )
10101ac_cv_func_fork_works=no
10102fi
86da66b5 10103rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
10104fi
10105fi
10106echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10107echo "${ECHO_T}$ac_cv_func_fork_works" >&6
10108
10109else
10110 ac_cv_func_fork_works=$ac_cv_func_fork
10111fi
10112if test "x$ac_cv_func_fork_works" = xcross; then
10113 case $host in
10114 *-*-amigaos* | *-*-msdosdjgpp*)
10115 # Override, as these systems have only a dummy fork() stub
10116 ac_cv_func_fork_works=no
10117 ;;
10118 *)
10119 ac_cv_func_fork_works=yes
10120 ;;
10121 esac
10122 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10123echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 10124fi
c375c43b 10125ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10126if test "x$ac_cv_func_vfork" = xyes; then
10127 echo "$as_me:$LINENO: checking for working vfork" >&5
10128echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
10129if test "${ac_cv_func_vfork_works+set}" = set; then
10130 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10131else
ba479fd2
NN
10132 if test "$cross_compiling" = yes; then
10133 ac_cv_func_vfork_works=cross
10134else
10135 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10136/* confdefs.h. */
10137_ACEOF
10138cat confdefs.h >>conftest.$ac_ext
10139cat >>conftest.$ac_ext <<_ACEOF
10140/* end confdefs.h. */
c375c43b
KG
10141/* Thanks to Paul Eggert for this test. */
10142#include <stdio.h>
ba479fd2 10143#include <stdlib.h>
c375c43b
KG
10144#include <sys/types.h>
10145#include <sys/stat.h>
ba479fd2
NN
10146#include <sys/wait.h>
10147#if HAVE_UNISTD_H
10148# include <unistd.h>
c375c43b 10149#endif
ba479fd2
NN
10150#if HAVE_VFORK_H
10151# include <vfork.h>
c375c43b
KG
10152#endif
10153/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
10154 argument registers are propagated back to the parent. The compiler
10155 is told about this with #include <vfork.h>, but some compilers
10156 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10157 static variable whose address is put into a register that is
10158 clobbered by the vfork. */
10159static void
c375c43b
KG
10160#ifdef __cplusplus
10161sparc_address_test (int arg)
ba479fd2 10162# else
c375c43b
KG
10163sparc_address_test (arg) int arg;
10164#endif
10165{
10166 static pid_t child;
10167 if (!child) {
10168 child = vfork ();
10169 if (child < 0) {
10170 perror ("vfork");
10171 _exit(2);
10172 }
10173 if (!child) {
10174 arg = getpid();
10175 write(-1, "", 0);
10176 _exit (arg);
10177 }
10178 }
10179}
ba479fd2
NN
10180
10181int
10182main ()
10183{
c375c43b
KG
10184 pid_t parent = getpid ();
10185 pid_t child;
10186
ba479fd2 10187 sparc_address_test (0);
c375c43b
KG
10188
10189 child = vfork ();
10190
10191 if (child == 0) {
ba479fd2
NN
10192 /* Here is another test for sparc vfork register problems. This
10193 test uses lots of local variables, at least as many local
10194 variables as main has allocated so far including compiler
10195 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10196 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10197 reuse the register of parent for one of the local variables,
10198 since it will think that parent can't possibly be used any more
10199 in this routine. Assigning to the local variable will thus
10200 munge parent in the parent process. */
c375c43b
KG
10201 pid_t
10202 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10203 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10204 /* Convince the compiler that p..p7 are live; otherwise, it might
10205 use the same hardware register for all 8 local variables. */
10206 if (p != p1 || p != p2 || p != p3 || p != p4
10207 || p != p5 || p != p6 || p != p7)
10208 _exit(1);
10209
ba479fd2
NN
10210 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10211 from child file descriptors. If the child closes a descriptor
10212 before it execs or exits, this munges the parent's descriptor
10213 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10214 _exit(close(fileno(stdout)) != 0);
10215 } else {
10216 int status;
10217 struct stat st;
10218
10219 while (wait(&status) != child)
10220 ;
10221 exit(
10222 /* Was there some problem with vforking? */
10223 child < 0
10224
10225 /* Did the child fail? (This shouldn't happen.) */
10226 || status
10227
10228 /* Did the vfork/compiler bug occur? */
10229 || parent != getpid()
10230
10231 /* Did the file descriptor bug occur? */
10232 || fstat(fileno(stdout), &st) != 0
10233 );
10234 }
10235}
ba479fd2
NN
10236_ACEOF
10237rm -f conftest$ac_exeext
10238if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10239 (eval $ac_link) 2>&5
10240 ac_status=$?
10241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10242 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10244 (eval $ac_try) 2>&5
10245 ac_status=$?
10246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10247 (exit $ac_status); }; }; then
c375c43b
KG
10248 ac_cv_func_vfork_works=yes
10249else
ba479fd2
NN
10250 echo "$as_me: program exited with status $ac_status" >&5
10251echo "$as_me: failed program was:" >&5
10252sed 's/^/| /' conftest.$ac_ext >&5
10253
10254( exit $ac_status )
10255ac_cv_func_vfork_works=no
cafe096b 10256fi
86da66b5 10257rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10258fi
ba479fd2
NN
10259fi
10260echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10261echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 10262
ba479fd2
NN
10263fi;
10264if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 10265 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10266 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10267echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
10268fi
10269
ba479fd2
NN
10270if test "x$ac_cv_func_vfork_works" = xyes; then
10271
10272cat >>confdefs.h <<\_ACEOF
10273#define HAVE_WORKING_VFORK 1
10274_ACEOF
10275
10276else
10277
10278cat >>confdefs.h <<\_ACEOF
c375c43b 10279#define vfork fork
ba479fd2 10280_ACEOF
c375c43b
KG
10281
10282fi
ba479fd2
NN
10283if test "x$ac_cv_func_fork_works" = xyes; then
10284
10285cat >>confdefs.h <<\_ACEOF
10286#define HAVE_WORKING_FORK 1
10287_ACEOF
10288
10289fi
10290
c375c43b 10291
81bf3d9e 10292
dfb77e37
KC
10293 if test "X$prefix" = "XNONE"; then
10294 acl_final_prefix="$ac_default_prefix"
10295 else
10296 acl_final_prefix="$prefix"
10297 fi
10298 if test "X$exec_prefix" = "XNONE"; then
10299 acl_final_exec_prefix='${prefix}'
10300 else
10301 acl_final_exec_prefix="$exec_prefix"
10302 fi
10303 acl_save_prefix="$prefix"
10304 prefix="$acl_final_prefix"
10305 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10306 prefix="$acl_save_prefix"
f91abfce
TT
10307
10308
dfb77e37
KC
10309# Check whether --with-gnu-ld or --without-gnu-ld was given.
10310if test "${with_gnu_ld+set}" = set; then
10311 withval="$with_gnu_ld"
10312 test "$withval" = no || with_gnu_ld=yes
ba479fd2 10313else
dfb77e37
KC
10314 with_gnu_ld=no
10315fi;
10316# Prepare PATH_SEPARATOR.
10317# The user is always right.
10318if test "${PATH_SEPARATOR+set}" != set; then
10319 echo "#! /bin/sh" >conf$$.sh
10320 echo "exit 0" >>conf$$.sh
10321 chmod +x conf$$.sh
10322 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10323 PATH_SEPARATOR=';'
ba479fd2 10324 else
dfb77e37 10325 PATH_SEPARATOR=:
ba479fd2 10326 fi
dfb77e37
KC
10327 rm -f conf$$.sh
10328fi
10329ac_prog=ld
10330if test "$GCC" = yes; then
10331 # Check if gcc -print-prog-name=ld gives a path.
10332 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10333echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10334 case $host in
10335 *-*-mingw*)
10336 # gcc leaves a trailing carriage return which upsets mingw
10337 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10338 *)
10339 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10340 esac
10341 case $ac_prog in
10342 # Accept absolute paths.
10343 [\\/]* | [A-Za-z]:[\\/]*)
10344 re_direlt='/[^/][^/]*/\.\./'
10345 # Canonicalize the path of ld
10346 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10347 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10348 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10349 done
10350 test -z "$LD" && LD="$ac_prog"
10351 ;;
10352 "")
10353 # If it fails, then pretend we aren't using GCC.
10354 ac_prog=ld
10355 ;;
10356 *)
10357 # If it is relative, then search for the first ld in PATH.
10358 with_gnu_ld=unknown
10359 ;;
10360 esac
10361elif test "$with_gnu_ld" = yes; then
10362 echo "$as_me:$LINENO: checking for GNU ld" >&5
10363echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 10364else
dfb77e37
KC
10365 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10366echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 10367fi
dfb77e37
KC
10368if test "${acl_cv_path_LD+set}" = set; then
10369 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 10370else
dfb77e37
KC
10371 if test -z "$LD"; then
10372 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10373 for ac_dir in $PATH; do
10374 test -z "$ac_dir" && ac_dir=.
10375 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10376 acl_cv_path_LD="$ac_dir/$ac_prog"
10377 # Check to see if the program is GNU ld. I'd rather use --version,
10378 # but apparently some GNU ld's only accept -v.
10379 # Break only if it was the GNU/non-GNU ld that we prefer.
10380 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10381 test "$with_gnu_ld" != no && break
10382 else
10383 test "$with_gnu_ld" != yes && break
10384 fi
10385 fi
10386 done
10387 IFS="$ac_save_ifs"
10388else
10389 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10390fi
10391fi
ba479fd2 10392
dfb77e37
KC
10393LD="$acl_cv_path_LD"
10394if test -n "$LD"; then
10395 echo "$as_me:$LINENO: result: $LD" >&5
10396echo "${ECHO_T}$LD" >&6
10397else
10398 echo "$as_me:$LINENO: result: no" >&5
10399echo "${ECHO_T}no" >&6
ba479fd2 10400fi
dfb77e37
KC
10401test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10402echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10403 { (exit 1); exit 1; }; }
10404echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10405echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10406if test "${acl_cv_prog_gnu_ld+set}" = set; then
10407 echo $ECHO_N "(cached) $ECHO_C" >&6
10408else
10409 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10410if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10411 acl_cv_prog_gnu_ld=yes
10412else
10413 acl_cv_prog_gnu_ld=no
6e3f3080 10414fi
dfb77e37
KC
10415fi
10416echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10417echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10418with_gnu_ld=$acl_cv_prog_gnu_ld
10419
10420
10421
10422 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10423echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10424if test "${acl_cv_rpath+set}" = set; then
10425 echo $ECHO_N "(cached) $ECHO_C" >&6
10426else
10427
10428 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10429 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10430 . ./conftest.sh
10431 rm -f ./conftest.sh
10432 acl_cv_rpath=done
ba479fd2 10433
eb158727 10434fi
dfb77e37
KC
10435echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10436echo "${ECHO_T}$acl_cv_rpath" >&6
10437 wl="$acl_cv_wl"
10438 libext="$acl_cv_libext"
10439 shlibext="$acl_cv_shlibext"
10440 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10441 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10442 hardcode_direct="$acl_cv_hardcode_direct"
10443 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10444 # Check whether --enable-rpath or --disable-rpath was given.
10445if test "${enable_rpath+set}" = set; then
10446 enableval="$enable_rpath"
10447 :
10448else
10449 enable_rpath=yes
10450fi;
10451
10452
10453
10454
10455
10456
10457
10458 use_additional=yes
10459
10460 acl_save_prefix="$prefix"
10461 prefix="$acl_final_prefix"
10462 acl_save_exec_prefix="$exec_prefix"
10463 exec_prefix="$acl_final_exec_prefix"
10464
10465 eval additional_includedir=\"$includedir\"
10466 eval additional_libdir=\"$libdir\"
10467
10468 exec_prefix="$acl_save_exec_prefix"
10469 prefix="$acl_save_prefix"
10470
10471
10472# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10473if test "${with_libiconv_prefix+set}" = set; then
10474 withval="$with_libiconv_prefix"
10475
10476 if test "X$withval" = "Xno"; then
10477 use_additional=no
10478 else
10479 if test "X$withval" = "X"; then
10480
10481 acl_save_prefix="$prefix"
10482 prefix="$acl_final_prefix"
10483 acl_save_exec_prefix="$exec_prefix"
10484 exec_prefix="$acl_final_exec_prefix"
10485
10486 eval additional_includedir=\"$includedir\"
10487 eval additional_libdir=\"$libdir\"
10488
10489 exec_prefix="$acl_save_exec_prefix"
10490 prefix="$acl_save_prefix"
10491
10492 else
10493 additional_includedir="$withval/include"
10494 additional_libdir="$withval/lib"
10495 fi
10496 fi
10497
10498fi;
10499 LIBICONV=
10500 LTLIBICONV=
10501 INCICONV=
10502 rpathdirs=
10503 ltrpathdirs=
10504 names_already_handled=
10505 names_next_round='iconv '
10506 while test -n "$names_next_round"; do
10507 names_this_round="$names_next_round"
10508 names_next_round=
10509 for name in $names_this_round; do
10510 already_handled=
10511 for n in $names_already_handled; do
10512 if test "$n" = "$name"; then
10513 already_handled=yes
10514 break
10515 fi
10516 done
10517 if test -z "$already_handled"; then
10518 names_already_handled="$names_already_handled $name"
10519 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10520 eval value=\"\$HAVE_LIB$uppername\"
10521 if test -n "$value"; then
10522 if test "$value" = yes; then
10523 eval value=\"\$LIB$uppername\"
10524 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10525 eval value=\"\$LTLIB$uppername\"
10526 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10527 else
10528 :
10529 fi
10530 else
10531 found_dir=
10532 found_la=
10533 found_so=
10534 found_a=
10535 if test $use_additional = yes; then
10536 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10537 found_dir="$additional_libdir"
10538 found_so="$additional_libdir/lib$name.$shlibext"
10539 if test -f "$additional_libdir/lib$name.la"; then
10540 found_la="$additional_libdir/lib$name.la"
10541 fi
10542 else
10543 if test -f "$additional_libdir/lib$name.$libext"; then
10544 found_dir="$additional_libdir"
10545 found_a="$additional_libdir/lib$name.$libext"
10546 if test -f "$additional_libdir/lib$name.la"; then
10547 found_la="$additional_libdir/lib$name.la"
10548 fi
10549 fi
10550 fi
10551 fi
10552 if test "X$found_dir" = "X"; then
10553 for x in $LDFLAGS $LTLIBICONV; do
10554
10555 acl_save_prefix="$prefix"
10556 prefix="$acl_final_prefix"
10557 acl_save_exec_prefix="$exec_prefix"
10558 exec_prefix="$acl_final_exec_prefix"
10559 eval x=\"$x\"
10560 exec_prefix="$acl_save_exec_prefix"
10561 prefix="$acl_save_prefix"
10562
10563 case "$x" in
10564 -L*)
10565 dir=`echo "X$x" | sed -e 's/^X-L//'`
10566 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10567 found_dir="$dir"
10568 found_so="$dir/lib$name.$shlibext"
10569 if test -f "$dir/lib$name.la"; then
10570 found_la="$dir/lib$name.la"
10571 fi
10572 else
10573 if test -f "$dir/lib$name.$libext"; then
10574 found_dir="$dir"
10575 found_a="$dir/lib$name.$libext"
10576 if test -f "$dir/lib$name.la"; then
10577 found_la="$dir/lib$name.la"
10578 fi
10579 fi
10580 fi
10581 ;;
10582 esac
10583 if test "X$found_dir" != "X"; then
10584 break
10585 fi
10586 done
10587 fi
10588 if test "X$found_dir" != "X"; then
10589 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10590 if test "X$found_so" != "X"; then
10591 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10592 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10593 else
10594 haveit=
10595 for x in $ltrpathdirs; do
10596 if test "X$x" = "X$found_dir"; then
10597 haveit=yes
10598 break
10599 fi
10600 done
10601 if test -z "$haveit"; then
10602 ltrpathdirs="$ltrpathdirs $found_dir"
10603 fi
10604 if test "$hardcode_direct" = yes; then
10605 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10606 else
10607 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10608 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10609 haveit=
10610 for x in $rpathdirs; do
10611 if test "X$x" = "X$found_dir"; then
10612 haveit=yes
10613 break
10614 fi
10615 done
10616 if test -z "$haveit"; then
10617 rpathdirs="$rpathdirs $found_dir"
10618 fi
10619 else
10620 haveit=
10621 for x in $LDFLAGS $LIBICONV; do
10622
10623 acl_save_prefix="$prefix"
10624 prefix="$acl_final_prefix"
10625 acl_save_exec_prefix="$exec_prefix"
10626 exec_prefix="$acl_final_exec_prefix"
10627 eval x=\"$x\"
10628 exec_prefix="$acl_save_exec_prefix"
10629 prefix="$acl_save_prefix"
10630
10631 if test "X$x" = "X-L$found_dir"; then
10632 haveit=yes
10633 break
10634 fi
10635 done
10636 if test -z "$haveit"; then
10637 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10638 fi
10639 if test "$hardcode_minus_L" != no; then
10640 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10641 else
10642 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10643 fi
10644 fi
10645 fi
10646 fi
10647 else
10648 if test "X$found_a" != "X"; then
10649 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10650 else
10651 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10652 fi
10653 fi
10654 additional_includedir=
10655 case "$found_dir" in
10656 */lib | */lib/)
10657 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10658 additional_includedir="$basedir/include"
10659 ;;
10660 esac
10661 if test "X$additional_includedir" != "X"; then
10662 if test "X$additional_includedir" != "X/usr/include"; then
10663 haveit=
10664 if test "X$additional_includedir" = "X/usr/local/include"; then
10665 if test -n "$GCC"; then
10666 case $host_os in
10667 linux*) haveit=yes;;
10668 esac
10669 fi
10670 fi
10671 if test -z "$haveit"; then
10672 for x in $CPPFLAGS $INCICONV; do
10673
10674 acl_save_prefix="$prefix"
10675 prefix="$acl_final_prefix"
10676 acl_save_exec_prefix="$exec_prefix"
10677 exec_prefix="$acl_final_exec_prefix"
10678 eval x=\"$x\"
10679 exec_prefix="$acl_save_exec_prefix"
10680 prefix="$acl_save_prefix"
10681
10682 if test "X$x" = "X-I$additional_includedir"; then
10683 haveit=yes
10684 break
10685 fi
10686 done
10687 if test -z "$haveit"; then
10688 if test -d "$additional_includedir"; then
10689 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10690 fi
10691 fi
10692 fi
10693 fi
10694 fi
10695 if test -n "$found_la"; then
10696 save_libdir="$libdir"
10697 case "$found_la" in
10698 */* | *\\*) . "$found_la" ;;
10699 *) . "./$found_la" ;;
10700 esac
10701 libdir="$save_libdir"
10702 for dep in $dependency_libs; do
10703 case "$dep" in
10704 -L*)
10705 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10706 if test "X$additional_libdir" != "X/usr/lib"; then
10707 haveit=
10708 if test "X$additional_libdir" = "X/usr/local/lib"; then
10709 if test -n "$GCC"; then
10710 case $host_os in
10711 linux*) haveit=yes;;
10712 esac
10713 fi
10714 fi
10715 if test -z "$haveit"; then
10716 haveit=
10717 for x in $LDFLAGS $LIBICONV; do
10718
10719 acl_save_prefix="$prefix"
10720 prefix="$acl_final_prefix"
10721 acl_save_exec_prefix="$exec_prefix"
10722 exec_prefix="$acl_final_exec_prefix"
10723 eval x=\"$x\"
10724 exec_prefix="$acl_save_exec_prefix"
10725 prefix="$acl_save_prefix"
10726
10727 if test "X$x" = "X-L$additional_libdir"; then
10728 haveit=yes
10729 break
10730 fi
10731 done
10732 if test -z "$haveit"; then
10733 if test -d "$additional_libdir"; then
10734 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10735 fi
10736 fi
10737 haveit=
10738 for x in $LDFLAGS $LTLIBICONV; do
10739
10740 acl_save_prefix="$prefix"
10741 prefix="$acl_final_prefix"
10742 acl_save_exec_prefix="$exec_prefix"
10743 exec_prefix="$acl_final_exec_prefix"
10744 eval x=\"$x\"
10745 exec_prefix="$acl_save_exec_prefix"
10746 prefix="$acl_save_prefix"
10747
10748 if test "X$x" = "X-L$additional_libdir"; then
10749 haveit=yes
10750 break
10751 fi
10752 done
10753 if test -z "$haveit"; then
10754 if test -d "$additional_libdir"; then
10755 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10756 fi
10757 fi
10758 fi
10759 fi
10760 ;;
10761 -R*)
10762 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10763 if test "$enable_rpath" != no; then
10764 haveit=
10765 for x in $rpathdirs; do
10766 if test "X$x" = "X$dir"; then
10767 haveit=yes
10768 break
10769 fi
10770 done
10771 if test -z "$haveit"; then
10772 rpathdirs="$rpathdirs $dir"
10773 fi
10774 haveit=
10775 for x in $ltrpathdirs; do
10776 if test "X$x" = "X$dir"; then
10777 haveit=yes
10778 break
10779 fi
10780 done
10781 if test -z "$haveit"; then
10782 ltrpathdirs="$ltrpathdirs $dir"
10783 fi
10784 fi
10785 ;;
10786 -l*)
10787 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10788 ;;
10789 *.la)
10790 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10791 ;;
10792 *)
10793 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10794 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10795 ;;
10796 esac
10797 done
10798 fi
10799 else
10800 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10801 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10802 fi
10803 fi
10804 fi
10805 done
10806 done
10807 if test "X$rpathdirs" != "X"; then
10808 if test -n "$hardcode_libdir_separator"; then
10809 alldirs=
10810 for found_dir in $rpathdirs; do
10811 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10812 done
10813 acl_save_libdir="$libdir"
10814 libdir="$alldirs"
10815 eval flag=\"$hardcode_libdir_flag_spec\"
10816 libdir="$acl_save_libdir"
10817 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10818 else
10819 for found_dir in $rpathdirs; do
10820 acl_save_libdir="$libdir"
10821 libdir="$found_dir"
10822 eval flag=\"$hardcode_libdir_flag_spec\"
10823 libdir="$acl_save_libdir"
10824 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10825 done
10826 fi
10827 fi
10828 if test "X$ltrpathdirs" != "X"; then
10829 for found_dir in $ltrpathdirs; do
10830 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10831 done
10832 fi
10833
10834
10835
10836
10837
10838
10839
10840 am_save_CPPFLAGS="$CPPFLAGS"
10841
10842 for element in $INCICONV; do
10843 haveit=
10844 for x in $CPPFLAGS; do
10845
10846 acl_save_prefix="$prefix"
10847 prefix="$acl_final_prefix"
10848 acl_save_exec_prefix="$exec_prefix"
10849 exec_prefix="$acl_final_exec_prefix"
10850 eval x=\"$x\"
10851 exec_prefix="$acl_save_exec_prefix"
10852 prefix="$acl_save_prefix"
10853
10854 if test "X$x" = "X$element"; then
10855 haveit=yes
10856 break
10857 fi
10858 done
10859 if test -z "$haveit"; then
10860 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10861 fi
10862 done
eb158727
ZW
10863
10864
ba479fd2
NN
10865 echo "$as_me:$LINENO: checking for iconv" >&5
10866echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10867if test "${am_cv_func_iconv+set}" = set; then
10868 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10869else
ba479fd2 10870
f91abfce
TT
10871 am_cv_func_iconv="no, consider installing GNU libiconv"
10872 am_cv_lib_iconv=no
ba479fd2 10873 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10874/* confdefs.h. */
10875_ACEOF
10876cat confdefs.h >>conftest.$ac_ext
10877cat >>conftest.$ac_ext <<_ACEOF
10878/* end confdefs.h. */
f91abfce
TT
10879#include <stdlib.h>
10880#include <iconv.h>
ba479fd2
NN
10881int
10882main ()
10883{
f91abfce
TT
10884iconv_t cd = iconv_open("","");
10885 iconv(cd,NULL,NULL,NULL,NULL);
10886 iconv_close(cd);
ba479fd2
NN
10887 ;
10888 return 0;
10889}
10890_ACEOF
10891rm -f conftest.$ac_objext conftest$ac_exeext
10892if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10893 (eval $ac_link) 2>conftest.er1
ba479fd2 10894 ac_status=$?
86da66b5
HPN
10895 grep -v '^ *+' conftest.er1 >conftest.err
10896 rm -f conftest.er1
10897 cat conftest.err >&5
ba479fd2
NN
10898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10899 (exit $ac_status); } &&
e8b05380 10900 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
10901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10902 (eval $ac_try) 2>&5
10903 ac_status=$?
10904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10905 (exit $ac_status); }; } &&
10906 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10908 (eval $ac_try) 2>&5
10909 ac_status=$?
10910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10911 (exit $ac_status); }; }; then
f91abfce
TT
10912 am_cv_func_iconv=yes
10913else
ba479fd2
NN
10914 echo "$as_me: failed program was:" >&5
10915sed 's/^/| /' conftest.$ac_ext >&5
10916
f91abfce 10917fi
86da66b5
HPN
10918rm -f conftest.err conftest.$ac_objext \
10919 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
10920 if test "$am_cv_func_iconv" != yes; then
10921 am_save_LIBS="$LIBS"
dfb77e37 10922 LIBS="$LIBS $LIBICONV"
ba479fd2 10923 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10924/* confdefs.h. */
10925_ACEOF
10926cat confdefs.h >>conftest.$ac_ext
10927cat >>conftest.$ac_ext <<_ACEOF
10928/* end confdefs.h. */
f91abfce
TT
10929#include <stdlib.h>
10930#include <iconv.h>
ba479fd2
NN
10931int
10932main ()
10933{
f91abfce
TT
10934iconv_t cd = iconv_open("","");
10935 iconv(cd,NULL,NULL,NULL,NULL);
10936 iconv_close(cd);
ba479fd2
NN
10937 ;
10938 return 0;
10939}
10940_ACEOF
10941rm -f conftest.$ac_objext conftest$ac_exeext
10942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10943 (eval $ac_link) 2>conftest.er1
ba479fd2 10944 ac_status=$?
86da66b5
HPN
10945 grep -v '^ *+' conftest.er1 >conftest.err
10946 rm -f conftest.er1
10947 cat conftest.err >&5
ba479fd2
NN
10948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10949 (exit $ac_status); } &&
e8b05380 10950 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
10951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10952 (eval $ac_try) 2>&5
10953 ac_status=$?
10954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10955 (exit $ac_status); }; } &&
10956 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10958 (eval $ac_try) 2>&5
10959 ac_status=$?
10960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10961 (exit $ac_status); }; }; then
f91abfce
TT
10962 am_cv_lib_iconv=yes
10963 am_cv_func_iconv=yes
10964else
ba479fd2
NN
10965 echo "$as_me: failed program was:" >&5
10966sed 's/^/| /' conftest.$ac_ext >&5
10967
f91abfce 10968fi
86da66b5
HPN
10969rm -f conftest.err conftest.$ac_objext \
10970 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
10971 LIBS="$am_save_LIBS"
10972 fi
6e3f3080 10973
ba479fd2
NN
10974fi
10975echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
10976echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 10977 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
10978
10979cat >>confdefs.h <<\_ACEOF
f91abfce 10980#define HAVE_ICONV 1
ba479fd2 10981_ACEOF
f91abfce 10982
dfb77e37
KC
10983 fi
10984 if test "$am_cv_lib_iconv" = yes; then
10985 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
10986echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
10987 echo "$as_me:$LINENO: result: $LIBICONV" >&5
10988echo "${ECHO_T}$LIBICONV" >&6
10989 else
10990 CPPFLAGS="$am_save_CPPFLAGS"
10991 LIBICONV=
10992 LTLIBICONV=
10993 fi
10994
10995
10996
10997 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
10998 echo "$as_me:$LINENO: checking for iconv declaration" >&5
10999echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
11000 if test "${am_cv_proto_iconv+set}" = set; then
11001 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11002else
ba479fd2
NN
11003
11004 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11005/* confdefs.h. */
11006_ACEOF
11007cat confdefs.h >>conftest.$ac_ext
11008cat >>conftest.$ac_ext <<_ACEOF
11009/* end confdefs.h. */
f91abfce
TT
11010
11011#include <stdlib.h>
11012#include <iconv.h>
11013extern
11014#ifdef __cplusplus
11015"C"
11016#endif
11017#if defined(__STDC__) || defined(__cplusplus)
11018size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11019#else
11020size_t iconv();
11021#endif
11022
ba479fd2
NN
11023int
11024main ()
11025{
f91abfce 11026
ba479fd2
NN
11027 ;
11028 return 0;
11029}
11030_ACEOF
11031rm -f conftest.$ac_objext
11032if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11033 (eval $ac_compile) 2>conftest.er1
ba479fd2 11034 ac_status=$?
86da66b5
HPN
11035 grep -v '^ *+' conftest.er1 >conftest.err
11036 rm -f conftest.er1
11037 cat conftest.err >&5
ba479fd2
NN
11038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11039 (exit $ac_status); } &&
e8b05380 11040 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11042 (eval $ac_try) 2>&5
11043 ac_status=$?
11044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11045 (exit $ac_status); }; } &&
11046 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11048 (eval $ac_try) 2>&5
11049 ac_status=$?
11050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11051 (exit $ac_status); }; }; then
f91abfce
TT
11052 am_cv_proto_iconv_arg1=""
11053else
ba479fd2
NN
11054 echo "$as_me: failed program was:" >&5
11055sed 's/^/| /' conftest.$ac_ext >&5
11056
11057am_cv_proto_iconv_arg1="const"
f91abfce 11058fi
86da66b5 11059rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
11060 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);"
11061fi
11062
11063 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
11064 echo "$as_me:$LINENO: result: ${ac_t:-
11065 }$am_cv_proto_iconv" >&5
11066echo "${ECHO_T}${ac_t:-
11067 }$am_cv_proto_iconv" >&6
11068
11069cat >>confdefs.h <<_ACEOF
f91abfce 11070#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 11071_ACEOF
f91abfce
TT
11072
11073 fi
f91abfce 11074
56694dd9
ZW
11075# Until we have in-tree GNU iconv:
11076LIBICONV_DEP=
11077
11078
11079
ba479fd2
NN
11080 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11081echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
11082if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11083 echo $ECHO_N "(cached) $ECHO_C" >&6
56694dd9 11084else
ba479fd2 11085 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11086/* confdefs.h. */
11087_ACEOF
11088cat confdefs.h >>conftest.$ac_ext
11089cat >>conftest.$ac_ext <<_ACEOF
11090/* end confdefs.h. */
56694dd9 11091#include <locale.h>
ba479fd2
NN
11092int
11093main ()
11094{
56694dd9 11095return LC_MESSAGES
ba479fd2
NN
11096 ;
11097 return 0;
11098}
11099_ACEOF
11100rm -f conftest.$ac_objext conftest$ac_exeext
11101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 11102 (eval $ac_link) 2>conftest.er1
ba479fd2 11103 ac_status=$?
86da66b5
HPN
11104 grep -v '^ *+' conftest.er1 >conftest.err
11105 rm -f conftest.er1
11106 cat conftest.err >&5
ba479fd2
NN
11107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11108 (exit $ac_status); } &&
e8b05380 11109 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11111 (eval $ac_try) 2>&5
11112 ac_status=$?
11113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11114 (exit $ac_status); }; } &&
11115 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
11116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11117 (eval $ac_try) 2>&5
11118 ac_status=$?
11119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11120 (exit $ac_status); }; }; then
56694dd9
ZW
11121 am_cv_val_LC_MESSAGES=yes
11122else
ba479fd2
NN
11123 echo "$as_me: failed program was:" >&5
11124sed 's/^/| /' conftest.$ac_ext >&5
11125
11126am_cv_val_LC_MESSAGES=no
56694dd9 11127fi
86da66b5
HPN
11128rm -f conftest.err conftest.$ac_objext \
11129 conftest$ac_exeext conftest.$ac_ext
56694dd9 11130fi
ba479fd2
NN
11131echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11132echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
63cf211a 11133 if test $am_cv_val_LC_MESSAGES = yes; then
ba479fd2
NN
11134
11135cat >>confdefs.h <<\_ACEOF
56694dd9 11136#define HAVE_LC_MESSAGES 1
ba479fd2 11137_ACEOF
56694dd9
ZW
11138
11139 fi
11140
f91abfce 11141
a03ea89b
BM
11142
11143 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11144echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11145if test "${am_cv_langinfo_codeset+set}" = set; then
11146 echo $ECHO_N "(cached) $ECHO_C" >&6
11147else
11148 cat >conftest.$ac_ext <<_ACEOF
11149/* confdefs.h. */
11150_ACEOF
11151cat confdefs.h >>conftest.$ac_ext
11152cat >>conftest.$ac_ext <<_ACEOF
11153/* end confdefs.h. */
11154#include <langinfo.h>
11155int
11156main ()
11157{
11158char* cs = nl_langinfo(CODESET);
11159 ;
11160 return 0;
11161}
11162_ACEOF
11163rm -f conftest.$ac_objext conftest$ac_exeext
11164if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11165 (eval $ac_link) 2>conftest.er1
11166 ac_status=$?
11167 grep -v '^ *+' conftest.er1 >conftest.err
11168 rm -f conftest.er1
11169 cat conftest.err >&5
11170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11171 (exit $ac_status); } &&
e8b05380 11172 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
a03ea89b
BM
11173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11174 (eval $ac_try) 2>&5
11175 ac_status=$?
11176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11177 (exit $ac_status); }; } &&
11178 { ac_try='test -s conftest$ac_exeext'
11179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11180 (eval $ac_try) 2>&5
11181 ac_status=$?
11182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11183 (exit $ac_status); }; }; then
11184 am_cv_langinfo_codeset=yes
11185else
11186 echo "$as_me: failed program was:" >&5
11187sed 's/^/| /' conftest.$ac_ext >&5
11188
11189am_cv_langinfo_codeset=no
11190fi
11191rm -f conftest.err conftest.$ac_objext \
11192 conftest$ac_exeext conftest.$ac_ext
11193
11194fi
11195echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11196echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11197 if test $am_cv_langinfo_codeset = yes; then
11198
11199cat >>confdefs.h <<\_ACEOF
11200#define HAVE_LANGINFO_CODESET 1
11201_ACEOF
11202
11203 fi
11204
11205
86cf1cbd
KG
11206# We will need to find libiberty.h and ansidecl.h
11207saved_CFLAGS="$CFLAGS"
11208CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
6a257778 11230
ad6717df
PB
11231
11232
0d667716
KG
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
367e8319 11243
0d667716
KG
11244
11245
7391b66c 11246
ed5b9f96
GK
11247
11248for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
11249 strsignal strstr strverscmp \
11250 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 11251 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 11252do
ad6717df 11253 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11254echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11255echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11256if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11257 echo $ECHO_N "(cached) $ECHO_C" >&6
11258else
11259 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11260/* confdefs.h. */
11261_ACEOF
11262cat confdefs.h >>conftest.$ac_ext
11263cat >>conftest.$ac_ext <<_ACEOF
11264/* end confdefs.h. */
7afe8c41
KG
11265#undef $ac_tr_decl
11266#define $ac_tr_decl 1
ba479fd2 11267
d02af173 11268#include "ansidecl.h"
86cf1cbd 11269#include "system.h"
f31e826b 11270
ba479fd2
NN
11271int
11272main ()
11273{
86cf1cbd
KG
11274#ifndef $ac_func
11275char *(*pfn) = (char *(*)) $ac_func ;
11276#endif
ba479fd2
NN
11277 ;
11278 return 0;
11279}
11280_ACEOF
11281rm -f conftest.$ac_objext
11282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11283 (eval $ac_compile) 2>conftest.er1
ba479fd2 11284 ac_status=$?
86da66b5
HPN
11285 grep -v '^ *+' conftest.er1 >conftest.err
11286 rm -f conftest.er1
11287 cat conftest.err >&5
ba479fd2
NN
11288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11289 (exit $ac_status); } &&
e8b05380 11290 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11292 (eval $ac_try) 2>&5
11293 ac_status=$?
11294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11295 (exit $ac_status); }; } &&
11296 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11298 (eval $ac_try) 2>&5
11299 ac_status=$?
11300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11301 (exit $ac_status); }; }; then
f31e826b 11302 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11303else
ba479fd2
NN
11304 echo "$as_me: failed program was:" >&5
11305sed 's/^/| /' conftest.$ac_ext >&5
11306
11307eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11308fi
86da66b5 11309rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11310fi
11311
f31e826b 11312if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11313 echo "$as_me:$LINENO: result: yes" >&5
11314echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11315#define $ac_tr_decl 1
ba479fd2
NN
11316_ACEOF
11317
81bf3d9e 11318else
ba479fd2
NN
11319 echo "$as_me:$LINENO: result: no" >&5
11320echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11321#define $ac_tr_decl 0
ba479fd2
NN
11322_ACEOF
11323
81bf3d9e
RH
11324fi
11325
11326done
ba479fd2 11327
ba479fd2 11328
ba479fd2 11329
81bf3d9e 11330
81bf3d9e
RH
11331
11332for ac_func in getrlimit setrlimit getrusage
11333do
ad6717df 11334 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11335echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11336echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11337if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11338 echo $ECHO_N "(cached) $ECHO_C" >&6
11339else
11340 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11341/* confdefs.h. */
11342_ACEOF
11343cat confdefs.h >>conftest.$ac_ext
11344cat >>conftest.$ac_ext <<_ACEOF
11345/* end confdefs.h. */
7afe8c41
KG
11346#undef $ac_tr_decl
11347#define $ac_tr_decl 1
ba479fd2 11348
d02af173 11349#include "ansidecl.h"
86cf1cbd 11350#include "system.h"
81bf3d9e
RH
11351#ifdef HAVE_SYS_RESOURCE_H
11352#include <sys/resource.h>
11353#endif
11354
f31e826b 11355
ba479fd2
NN
11356int
11357main ()
11358{
86cf1cbd
KG
11359#ifndef $ac_func
11360char *(*pfn) = (char *(*)) $ac_func ;
11361#endif
ba479fd2
NN
11362 ;
11363 return 0;
11364}
11365_ACEOF
11366rm -f conftest.$ac_objext
11367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11368 (eval $ac_compile) 2>conftest.er1
ba479fd2 11369 ac_status=$?
86da66b5
HPN
11370 grep -v '^ *+' conftest.er1 >conftest.err
11371 rm -f conftest.er1
11372 cat conftest.err >&5
ba479fd2
NN
11373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11374 (exit $ac_status); } &&
e8b05380 11375 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11377 (eval $ac_try) 2>&5
11378 ac_status=$?
11379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11380 (exit $ac_status); }; } &&
11381 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11383 (eval $ac_try) 2>&5
11384 ac_status=$?
11385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11386 (exit $ac_status); }; }; then
f31e826b 11387 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11388else
ba479fd2
NN
11389 echo "$as_me: failed program was:" >&5
11390sed 's/^/| /' conftest.$ac_ext >&5
11391
11392eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11393fi
86da66b5 11394rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11395fi
11396
f31e826b 11397if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11398 echo "$as_me:$LINENO: result: yes" >&5
11399echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11400#define $ac_tr_decl 1
ba479fd2
NN
11401_ACEOF
11402
81bf3d9e 11403else
ba479fd2
NN
11404 echo "$as_me:$LINENO: result: no" >&5
11405echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11406#define $ac_tr_decl 0
ba479fd2
NN
11407_ACEOF
11408
81bf3d9e
RH
11409fi
11410
11411done
86cf1cbd 11412
81bf3d9e 11413
ba479fd2 11414cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11415/* confdefs.h. */
11416_ACEOF
11417cat confdefs.h >>conftest.$ac_ext
11418cat >>conftest.$ac_ext <<_ACEOF
11419/* end confdefs.h. */
b2522d2b
HPN
11420
11421#include "ansidecl.h"
11422#include "system.h"
11423#ifdef HAVE_SYS_RESOURCE_H
11424#include <sys/resource.h>
11425#endif
11426
ba479fd2
NN
11427int
11428main ()
11429{
b2522d2b 11430rlim_t l = 0;
ba479fd2
NN
11431 ;
11432 return 0;
11433}
11434_ACEOF
11435rm -f conftest.$ac_objext
11436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11437 (eval $ac_compile) 2>conftest.er1
ba479fd2 11438 ac_status=$?
86da66b5
HPN
11439 grep -v '^ *+' conftest.er1 >conftest.err
11440 rm -f conftest.er1
11441 cat conftest.err >&5
ba479fd2
NN
11442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11443 (exit $ac_status); } &&
e8b05380 11444 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11446 (eval $ac_try) 2>&5
11447 ac_status=$?
11448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11449 (exit $ac_status); }; } &&
11450 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11452 (eval $ac_try) 2>&5
11453 ac_status=$?
11454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11455 (exit $ac_status); }; }; then
b2522d2b
HPN
11456 :
11457else
ba479fd2
NN
11458 echo "$as_me: failed program was:" >&5
11459sed 's/^/| /' conftest.$ac_ext >&5
11460
11461
11462cat >>confdefs.h <<\_ACEOF
b2522d2b 11463#define rlim_t long
ba479fd2 11464_ACEOF
b2522d2b
HPN
11465
11466fi
86da66b5 11467rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 11468
2102b2fe
RS
11469# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11470# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11471# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11472# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 11473
351df804 11474for ac_func in ldgetname
c1800ec8 11475do
ad6717df 11476 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11477echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11478echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11479if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11480 echo $ECHO_N "(cached) $ECHO_C" >&6
11481else
11482 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11483/* confdefs.h. */
11484_ACEOF
11485cat confdefs.h >>conftest.$ac_ext
11486cat >>conftest.$ac_ext <<_ACEOF
11487/* end confdefs.h. */
c1800ec8
ZW
11488#undef $ac_tr_decl
11489#define $ac_tr_decl 1
ba479fd2 11490
351df804
KG
11491#include "ansidecl.h"
11492#include "system.h"
11493#ifdef HAVE_LDFCN_H
2102b2fe
RS
11494#undef FREAD
11495#undef FWRITE
351df804
KG
11496#include <ldfcn.h>
11497#endif
11498
11499
ba479fd2
NN
11500int
11501main ()
11502{
351df804
KG
11503#ifndef $ac_func
11504char *(*pfn) = (char *(*)) $ac_func ;
11505#endif
ba479fd2
NN
11506 ;
11507 return 0;
11508}
11509_ACEOF
11510rm -f conftest.$ac_objext
11511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11512 (eval $ac_compile) 2>conftest.er1
ba479fd2 11513 ac_status=$?
86da66b5
HPN
11514 grep -v '^ *+' conftest.er1 >conftest.err
11515 rm -f conftest.er1
11516 cat conftest.err >&5
ba479fd2
NN
11517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11518 (exit $ac_status); } &&
e8b05380 11519 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11521 (eval $ac_try) 2>&5
11522 ac_status=$?
11523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11524 (exit $ac_status); }; } &&
11525 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11527 (eval $ac_try) 2>&5
11528 ac_status=$?
11529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11530 (exit $ac_status); }; }; then
351df804
KG
11531 eval "gcc_cv_have_decl_$ac_func=yes"
11532else
ba479fd2
NN
11533 echo "$as_me: failed program was:" >&5
11534sed 's/^/| /' conftest.$ac_ext >&5
11535
11536eval "gcc_cv_have_decl_$ac_func=no"
351df804 11537fi
86da66b5 11538rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
11539fi
11540
11541if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11542 echo "$as_me:$LINENO: result: yes" >&5
11543echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11544#define $ac_tr_decl 1
ba479fd2
NN
11545_ACEOF
11546
351df804 11547else
ba479fd2
NN
11548 echo "$as_me:$LINENO: result: no" >&5
11549echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11550#define $ac_tr_decl 0
ba479fd2
NN
11551_ACEOF
11552
351df804
KG
11553fi
11554
11555done
ba479fd2 11556
351df804
KG
11557
11558
11559for ac_func in times
11560do
ad6717df 11561 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11562echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11563echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11564if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11565 echo $ECHO_N "(cached) $ECHO_C" >&6
11566else
11567 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11568/* confdefs.h. */
11569_ACEOF
11570cat confdefs.h >>conftest.$ac_ext
11571cat >>conftest.$ac_ext <<_ACEOF
11572/* end confdefs.h. */
351df804
KG
11573#undef $ac_tr_decl
11574#define $ac_tr_decl 1
ba479fd2 11575
c1800ec8
ZW
11576#include "ansidecl.h"
11577#include "system.h"
11578#ifdef HAVE_SYS_TIMES_H
11579#include <sys/times.h>
11580#endif
11581
11582
ba479fd2
NN
11583int
11584main ()
11585{
c1800ec8
ZW
11586#ifndef $ac_func
11587char *(*pfn) = (char *(*)) $ac_func ;
11588#endif
ba479fd2
NN
11589 ;
11590 return 0;
11591}
11592_ACEOF
11593rm -f conftest.$ac_objext
11594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11595 (eval $ac_compile) 2>conftest.er1
ba479fd2 11596 ac_status=$?
86da66b5
HPN
11597 grep -v '^ *+' conftest.er1 >conftest.err
11598 rm -f conftest.er1
11599 cat conftest.err >&5
ba479fd2
NN
11600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11601 (exit $ac_status); } &&
e8b05380 11602 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11604 (eval $ac_try) 2>&5
11605 ac_status=$?
11606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11607 (exit $ac_status); }; } &&
11608 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11610 (eval $ac_try) 2>&5
11611 ac_status=$?
11612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11613 (exit $ac_status); }; }; then
c1800ec8
ZW
11614 eval "gcc_cv_have_decl_$ac_func=yes"
11615else
ba479fd2
NN
11616 echo "$as_me: failed program was:" >&5
11617sed 's/^/| /' conftest.$ac_ext >&5
11618
11619eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 11620fi
86da66b5 11621rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
11622fi
11623
11624if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11625 echo "$as_me:$LINENO: result: yes" >&5
11626echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11627#define $ac_tr_decl 1
ba479fd2
NN
11628_ACEOF
11629
c1800ec8 11630else
ba479fd2
NN
11631 echo "$as_me:$LINENO: result: no" >&5
11632echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11633#define $ac_tr_decl 0
ba479fd2
NN
11634_ACEOF
11635
c1800ec8
ZW
11636fi
11637
11638done
c1800ec8
ZW
11639
11640
11641# More time-related stuff.
ba479fd2
NN
11642echo "$as_me:$LINENO: checking for struct tms" >&5
11643echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
11644if test "${ac_cv_struct_tms+set}" = set; then
11645 echo $ECHO_N "(cached) $ECHO_C" >&6
11646else
11647
11648cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11649/* confdefs.h. */
11650_ACEOF
11651cat confdefs.h >>conftest.$ac_ext
11652cat >>conftest.$ac_ext <<_ACEOF
11653/* end confdefs.h. */
c1800ec8
ZW
11654
11655#include "ansidecl.h"
11656#include "system.h"
11657#ifdef HAVE_SYS_TIMES_H
11658#include <sys/times.h>
11659#endif
11660
ba479fd2
NN
11661int
11662main ()
11663{
c1800ec8 11664struct tms tms;
ba479fd2
NN
11665 ;
11666 return 0;
11667}
11668_ACEOF
11669rm -f conftest.$ac_objext
11670if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11671 (eval $ac_compile) 2>conftest.er1
ba479fd2 11672 ac_status=$?
86da66b5
HPN
11673 grep -v '^ *+' conftest.er1 >conftest.err
11674 rm -f conftest.er1
11675 cat conftest.err >&5
ba479fd2
NN
11676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11677 (exit $ac_status); } &&
e8b05380 11678 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11680 (eval $ac_try) 2>&5
11681 ac_status=$?
11682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11683 (exit $ac_status); }; } &&
11684 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11686 (eval $ac_try) 2>&5
11687 ac_status=$?
11688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11689 (exit $ac_status); }; }; then
c1800ec8
ZW
11690 ac_cv_struct_tms=yes
11691else
ba479fd2
NN
11692 echo "$as_me: failed program was:" >&5
11693sed 's/^/| /' conftest.$ac_ext >&5
11694
11695ac_cv_struct_tms=no
c1800ec8 11696fi
86da66b5 11697rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11698fi
ba479fd2
NN
11699echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11700echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 11701if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
11702
11703cat >>confdefs.h <<\_ACEOF
c1800ec8 11704#define HAVE_STRUCT_TMS 1
ba479fd2 11705_ACEOF
c1800ec8
ZW
11706
11707fi
11708
11709# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11710# revisit after autoconf 2.50.
ba479fd2
NN
11711echo "$as_me:$LINENO: checking for clock_t" >&5
11712echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
11713if test "${gcc_cv_type_clock_t+set}" = set; then
11714 echo $ECHO_N "(cached) $ECHO_C" >&6
11715else
11716
11717cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11718/* confdefs.h. */
11719_ACEOF
11720cat confdefs.h >>conftest.$ac_ext
11721cat >>conftest.$ac_ext <<_ACEOF
11722/* end confdefs.h. */
c1800ec8
ZW
11723
11724#include "ansidecl.h"
11725#include "system.h"
11726
ba479fd2
NN
11727int
11728main ()
11729{
c1800ec8 11730clock_t x;
ba479fd2
NN
11731 ;
11732 return 0;
11733}
11734_ACEOF
11735rm -f conftest.$ac_objext
11736if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11737 (eval $ac_compile) 2>conftest.er1
ba479fd2 11738 ac_status=$?
86da66b5
HPN
11739 grep -v '^ *+' conftest.er1 >conftest.err
11740 rm -f conftest.er1
11741 cat conftest.err >&5
ba479fd2
NN
11742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11743 (exit $ac_status); } &&
e8b05380 11744 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11746 (eval $ac_try) 2>&5
11747 ac_status=$?
11748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11749 (exit $ac_status); }; } &&
11750 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11752 (eval $ac_try) 2>&5
11753 ac_status=$?
11754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11755 (exit $ac_status); }; }; then
c1800ec8
ZW
11756 gcc_cv_type_clock_t=yes
11757else
ba479fd2
NN
11758 echo "$as_me: failed program was:" >&5
11759sed 's/^/| /' conftest.$ac_ext >&5
11760
11761gcc_cv_type_clock_t=no
c1800ec8 11762fi
86da66b5 11763rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11764fi
ba479fd2
NN
11765echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
11766echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 11767if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
11768
11769cat >>confdefs.h <<\_ACEOF
c1800ec8 11770#define HAVE_CLOCK_T 1
ba479fd2 11771_ACEOF
c1800ec8
ZW
11772
11773fi
11774
eb70d86d
AS
11775# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
11776CFLAGS="$saved_CFLAGS"
11777
07cf4226
DM
11778# Check whether --enable-initfini-array or --disable-initfini-array was given.
11779if test "${enable_initfini_array+set}" = set; then
11780 enableval="$enable_initfini_array"
ba479fd2 11781
07cf4226 11782else
ba479fd2
NN
11783
11784echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
11785echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
11786if test "${gcc_cv_initfini_array+set}" = set; then
11787 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 11788else
eb70d86d 11789 if test "$cross_compiling" = yes; then
918c4fe4 11790 gcc_cv_initfini_array=no
eb70d86d 11791else
ba479fd2 11792 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11793/* confdefs.h. */
11794_ACEOF
11795cat confdefs.h >>conftest.$ac_ext
11796cat >>conftest.$ac_ext <<_ACEOF
11797/* end confdefs.h. */
eb70d86d 11798
07cf4226
DM
11799static int x = -1;
11800int main (void) { return x; }
11801int foo (void) { x = 0; }
11802int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
11803_ACEOF
11804rm -f conftest$ac_exeext
11805if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11806 (eval $ac_link) 2>&5
11807 ac_status=$?
11808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11809 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11811 (eval $ac_try) 2>&5
11812 ac_status=$?
11813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11814 (exit $ac_status); }; }; then
918c4fe4 11815 gcc_cv_initfini_array=yes
eb70d86d 11816else
ba479fd2
NN
11817 echo "$as_me: program exited with status $ac_status" >&5
11818echo "$as_me: failed program was:" >&5
11819sed 's/^/| /' conftest.$ac_ext >&5
11820
11821( exit $ac_status )
11822gcc_cv_initfini_array=no
eb70d86d 11823fi
86da66b5 11824rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 11825fi
07cf4226 11826fi
ba479fd2
NN
11827echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
11828echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 11829 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 11830
ba479fd2 11831fi;
63cf211a 11832if test $enable_initfini_array = yes; then
ba479fd2
NN
11833
11834cat >>confdefs.h <<\_ACEOF
eb70d86d 11835#define HAVE_INITFINI_ARRAY 1
ba479fd2 11836_ACEOF
07cf4226 11837
eb70d86d 11838fi
81bf3d9e 11839
ba479fd2
NN
11840# mkdir takes a single argument on some systems.
11841echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
11842echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
11843if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
11844 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 11845else
ba479fd2 11846 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11847/* confdefs.h. */
11848_ACEOF
11849cat confdefs.h >>conftest.$ac_ext
11850cat >>conftest.$ac_ext <<_ACEOF
11851/* end confdefs.h. */
75923b2f
MK
11852
11853#include <sys/types.h>
11854#ifdef HAVE_SYS_STAT_H
11855# include <sys/stat.h>
11856#endif
11857#ifdef HAVE_UNISTD_H
11858# include <unistd.h>
11859#endif
11860#ifdef HAVE_DIRECT_H
11861# include <direct.h>
11862#endif
ba479fd2
NN
11863int
11864main ()
11865{
75923b2f 11866mkdir ("foo", 0);
ba479fd2
NN
11867 ;
11868 return 0;
11869}
11870_ACEOF
11871rm -f conftest.$ac_objext
11872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11873 (eval $ac_compile) 2>conftest.er1
ba479fd2 11874 ac_status=$?
86da66b5
HPN
11875 grep -v '^ *+' conftest.er1 >conftest.err
11876 rm -f conftest.er1
11877 cat conftest.err >&5
ba479fd2
NN
11878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11879 (exit $ac_status); } &&
e8b05380 11880 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11882 (eval $ac_try) 2>&5
11883 ac_status=$?
11884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11885 (exit $ac_status); }; } &&
11886 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11888 (eval $ac_try) 2>&5
11889 ac_status=$?
11890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11891 (exit $ac_status); }; }; then
75923b2f
MK
11892 gcc_cv_mkdir_takes_one_arg=no
11893else
ba479fd2
NN
11894 echo "$as_me: failed program was:" >&5
11895sed 's/^/| /' conftest.$ac_ext >&5
11896
11897gcc_cv_mkdir_takes_one_arg=yes
75923b2f 11898fi
86da66b5 11899rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 11900fi
ba479fd2
NN
11901echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
11902echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 11903if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
11904
11905cat >>confdefs.h <<\_ACEOF
75923b2f 11906#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 11907_ACEOF
75923b2f
MK
11908
11909fi
11910
11911
861bb6c1
JL
11912# File extensions
11913manext='.1'
11914objext='.o'
11915
11916
11917
4977bab6
ZW
11918# With Setjmp/Longjmp based exception handling.
11919# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
11920if test "${enable_sjlj_exceptions+set}" = set; then
11921 enableval="$enable_sjlj_exceptions"
11922 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 11923
ba479fd2
NN
11924cat >>confdefs.h <<_ACEOF
11925#define CONFIG_SJLJ_EXCEPTIONS $sjlj
11926_ACEOF
4977bab6 11927
ba479fd2 11928fi;
4977bab6 11929
443728bb
L
11930# For platforms with the unwind ABI which includes an unwind library,
11931# libunwind, we can choose to use the system libunwind.
4977bab6 11932
443728bb
L
11933# Check whether --with-system-libunwind or --without-system-libunwind was given.
11934if test "${with_system_libunwind+set}" = set; then
11935 withval="$with_system_libunwind"
4977bab6 11936
ba479fd2 11937fi;
4977bab6 11938
34a86c2b
NN
11939# --------------------------------------------------------
11940# Build, host, and target specific configuration fragments
11941# --------------------------------------------------------
11942
5b28c537
NN
11943# Collect build-machine-specific information.
11944. ${srcdir}/config.build
11945
a89ea0df
NN
11946# Collect host-machine-specific information.
11947. ${srcdir}/config.host
11948
ef69da62 11949target_gtfiles=
a89ea0df
NN
11950
11951# Collect target-machine-specific information.
8ad9fb33 11952. ${srcdir}/config.gcc
861bb6c1
JL
11953
11954extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 11955extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
11956
11957# Default the target-machine variables that were not explicitly set.
75bffa71 11958if test x"$tm_file" = x
861bb6c1
JL
11959then tm_file=$cpu_type/$cpu_type.h; fi
11960
6b2adea9 11961if test x"$extra_headers" = x
861bb6c1
JL
11962then extra_headers=; fi
11963
75bffa71 11964if test x$md_file = x
e98e406f 11965then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 11966
75bffa71 11967if test x$out_file = x
861bb6c1
JL
11968then out_file=$cpu_type/$cpu_type.c; fi
11969
75bffa71 11970if test x"$tmake_file" = x
861bb6c1
JL
11971then tmake_file=$cpu_type/t-$cpu_type
11972fi
11973
90e6a802 11974if test x"$dwarf2" = xyes
756ee602 11975then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
11976fi
11977
861bb6c1 11978# Say what files are being used for the output code and MD file.
11642c3a 11979echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
11980echo "Using \`$srcdir/config/$md_file' as machine description file."
11981
11642c3a 11982# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
11983# about them and drop them.
11984
11642c3a
ZW
11985bx=
11986for x in $build_xm_file; do
11987 if test -f $srcdir/config/$x
11988 then bx="$bx $x"
ba479fd2
NN
11989 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11990echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11991 fi
11992done
11993build_xm_file="$bx"
11994
11995hx=
11996for x in $host_xm_file; do
11997 if test -f $srcdir/config/$x
11998 then hx="$hx $x"
ba479fd2
NN
11999 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12000echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12001 fi
12002done
12003host_xm_file="$hx"
12004
12005tx=
12006for x in $xm_file; do
12007 if test -f $srcdir/config/$x
12008 then tx="$tx $x"
ba479fd2
NN
12009 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12010echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12011 fi
12012done
12013xm_file="$tx"
12014
861bb6c1
JL
12015count=a
12016for f in $tm_file; do
12017 count=${count}x
12018done
75bffa71 12019if test $count = ax; then
861bb6c1
JL
12020 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
12021else
12022 echo "Using the following target machine macro files:"
12023 for f in $tm_file; do
12024 echo " $srcdir/config/$f"
12025 done
12026fi
12027
4977bab6 12028if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
12029
12030cat >>confdefs.h <<\_ACEOF
4977bab6 12031#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 12032_ACEOF
4977bab6
ZW
12033
12034fi
12035
99fa8911
AP
12036if test x$use_long_long_for_widest_fast_int = xyes; then
12037
12038cat >>confdefs.h <<\_ACEOF
12039#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12040_ACEOF
12041
12042fi
12043
861bb6c1
JL
12044count=a
12045for f in $host_xm_file; do
12046 count=${count}x
12047done
11642c3a
ZW
12048if test $count = a; then
12049 :
12050elif test $count = ax; then
861bb6c1
JL
12051 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12052else
12053 echo "Using the following host machine macro files:"
12054 for f in $host_xm_file; do
12055 echo " $srcdir/config/$f"
12056 done
12057fi
476d9098 12058echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 12059
75bffa71 12060if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
12061 count=a
12062 for f in $build_xm_file; do
12063 count=${count}x
12064 done
11642c3a
ZW
12065 if test $count = a; then
12066 :
12067 elif test $count = ax; then
861bb6c1
JL
12068 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12069 else
12070 echo "Using the following build machine macro files:"
12071 for f in $build_xm_file; do
12072 echo " $srcdir/config/$f"
12073 done
12074 fi
12075fi
12076
8bb915b6
NN
12077# ---------
12078# Threading
12079# ---------
12080
c2e494a8 12081# Check if a valid thread package
615be2cf 12082case ${enable_threads} in
c2e494a8
NN
12083 "" | no)
12084 # No threads
12085 target_thread_file='single'
12086 ;;
12087 yes)
12088 # default
12089 target_thread_file='single'
12090 ;;
18167442 12091 aix | dce | gnat | irix | posix | posix95 | rtems | \
769e49eb 12092 single | solaris | vxworks | win32 )
615be2cf 12093 target_thread_file=${enable_threads}
c2e494a8
NN
12094 ;;
12095 *)
615be2cf 12096 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
12097 exit 1
12098 ;;
12099esac
12100
12101if test x${thread_file} = x; then
12102 # No thread file set by target-specific clauses in config.gcc,
12103 # so use file chosen by default logic above
12104 thread_file=${target_thread_file}
861bb6c1
JL
12105fi
12106
8bb915b6
NN
12107# Make gthr-default.h if we have a thread file.
12108gthread_flags=
12109if test $thread_file != single; then
12110 rm -f gthr-default.h
12111 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12112 gthread_flags=-DHAVE_GTHR_DEFAULT
12113fi
12114
12115
12116# --------
12117# UNSORTED
12118# --------
12119
18fbf599 12120use_cxa_atexit=no
2121a768
JT
12121if test x$enable___cxa_atexit = xyes || \
12122 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599
PB
12123 if test x$host = x$target; then
12124 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
354b7da5
DH
12125echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
12126if test "${ac_cv_func___cxa_atexit+set}" = set; then
12127 echo $ECHO_N "(cached) $ECHO_C" >&6
12128else
12129 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
12130/* confdefs.h. */
12131_ACEOF
12132cat confdefs.h >>conftest.$ac_ext
12133cat >>conftest.$ac_ext <<_ACEOF
12134/* end confdefs.h. */
86da66b5
HPN
12135/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12136 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12137#define __cxa_atexit innocuous___cxa_atexit
12138
354b7da5
DH
12139/* System header to define __stub macros and hopefully few prototypes,
12140 which can conflict with char __cxa_atexit (); below.
12141 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12142 <limits.h> exists even on freestanding compilers. */
86da66b5 12143
354b7da5
DH
12144#ifdef __STDC__
12145# include <limits.h>
12146#else
12147# include <assert.h>
12148#endif
86da66b5
HPN
12149
12150#undef __cxa_atexit
12151
354b7da5
DH
12152/* Override any gcc2 internal prototype to avoid an error. */
12153#ifdef __cplusplus
12154extern "C"
12155{
12156#endif
12157/* We use char because int might match the return type of a gcc2
12158 builtin and then its argument prototype would still apply. */
12159char __cxa_atexit ();
12160/* The GNU C library defines this for functions which it implements
12161 to always fail with ENOSYS. Some functions are actually named
12162 something starting with __ and the normal name is an alias. */
12163#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
12164choke me
12165#else
12166char (*f) () = __cxa_atexit;
12167#endif
12168#ifdef __cplusplus
12169}
12170#endif
12171
12172int
12173main ()
12174{
12175return f != __cxa_atexit;
12176 ;
12177 return 0;
12178}
12179_ACEOF
12180rm -f conftest.$ac_objext conftest$ac_exeext
12181if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12182 (eval $ac_link) 2>conftest.er1
354b7da5 12183 ac_status=$?
86da66b5
HPN
12184 grep -v '^ *+' conftest.er1 >conftest.err
12185 rm -f conftest.er1
12186 cat conftest.err >&5
354b7da5
DH
12187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12188 (exit $ac_status); } &&
e8b05380 12189 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
12190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12191 (eval $ac_try) 2>&5
12192 ac_status=$?
12193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12194 (exit $ac_status); }; } &&
12195 { ac_try='test -s conftest$ac_exeext'
354b7da5
DH
12196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12197 (eval $ac_try) 2>&5
12198 ac_status=$?
12199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12200 (exit $ac_status); }; }; then
12201 ac_cv_func___cxa_atexit=yes
12202else
12203 echo "$as_me: failed program was:" >&5
12204sed 's/^/| /' conftest.$ac_ext >&5
12205
12206ac_cv_func___cxa_atexit=no
12207fi
86da66b5
HPN
12208rm -f conftest.err conftest.$ac_objext \
12209 conftest$ac_exeext conftest.$ac_ext
354b7da5
DH
12210fi
12211echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12212echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
12213if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
12214 use_cxa_atexit=yes
12215else
12216 echo "__cxa_atexit can't be enabled on this target"
12217fi
12218
12219 else
12220 # We can't check for __cxa_atexit when building a cross, so assume
12221 # it is available
12222 use_cxa_atexit=yes
12223 fi
12224 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
12225
12226cat >>confdefs.h <<\_ACEOF
2121a768 12227#define DEFAULT_USE_CXA_ATEXIT 1
ba479fd2 12228_ACEOF
2121a768 12229
18fbf599 12230 fi
2121a768
JT
12231fi
12232
a5381466 12233# Look for a file containing extra machine modes.
1c0ca89d
ZW
12234if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12235 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
12236
12237
12238cat >>confdefs.h <<_ACEOF
e22340b0 12239#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 12240_ACEOF
a5381466
ZW
12241
12242fi
12243
75685792
RS
12244# Convert extra_options into a form suitable for Makefile use.
12245extra_opt_files=
12246for f in $extra_options; do
12247 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12248done
12249
12250
b7cb92ad 12251# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 12252# the first file included by config.h.
4977bab6 12253# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 12254# as well. If host!=build, we are in error and need to do more
db81d74a 12255# work to find out the build config parameters.
75bffa71 12256if test x$host = x$build
db81d74a 12257then
eaf4e618 12258 build_auto=auto-host.h
b7cb92ad
JL
12259else
12260 # We create a subdir, then run autoconf in the subdir.
12261 # To prevent recursion we set host and build for the new
12262 # invocation of configure to the build for this invocation
ba479fd2 12263 # of configure.
b7cb92ad
JL
12264 tempdir=build.$$
12265 rm -rf $tempdir
12266 mkdir $tempdir
12267 cd $tempdir
12268 case ${srcdir} in
255b8a49 12269 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
12270 *) realsrcdir=../${srcdir};;
12271 esac
d920e825
L
12272 saved_CFLAGS="${CFLAGS}"
12273 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12274 ${realsrcdir}/configure \
33e70558 12275 --enable-languages=${enable_languages-all} \
534d0cc0 12276 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 12277 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
12278
12279 # We just finished tests for the build machine, so rename
12280 # the file auto-build.h in the gcc directory.
12281 mv auto-host.h ../auto-build.h
12282 cd ..
12283 rm -rf $tempdir
eaf4e618 12284 build_auto=auto-build.h
db81d74a
RH
12285fi
12286
06f0b04c 12287
eaf4e618 12288tm_file="${tm_file} defaults.h"
4977bab6
ZW
12289tm_p_file="${tm_p_file} tm-preds.h"
12290host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12291build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 12292# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 12293# put this back in temporarily.
232b67d9 12294xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 12295
34a86c2b
NN
12296# --------
12297# UNSORTED
12298# --------
12299
cc1e60ea 12300# Compile in configure arguments.
8105825d 12301if test -f configargs.h ; then
cc1e60ea 12302 # Being re-configured.
022dae81 12303 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
12304 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12305else
12306 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12307fi
eeae7b41
DJ
12308
12309# Double all backslashes and backslash all quotes to turn
12310# gcc_config_arguments into a C string.
12311sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12312$gcc_config_arguments
12313EOF
12314gcc_config_arguments_str=`cat conftest.out`
12315rm -f conftest.out
12316
cc1e60ea
JM
12317cat > configargs.h <<EOF
12318/* Generated automatically. */
eeae7b41 12319static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 12320static const char thread_model[] = "$thread_file";
7816bea0
DJ
12321
12322static const struct {
12323 const char *name, *value;
12324} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
12325EOF
12326
ab87f8c8 12327# Internationalization
56694dd9
ZW
12328# If we haven't got the data from the intl directory,
12329# assume NLS is disabled.
ba479fd2
NN
12330USE_NLS=no
12331LIBINTL=
12332LIBINTL_DEP=
12333INCINTL=
12334XGETTEXT=
12335GMSGFMT=
12336POSUB=
56694dd9
ZW
12337if test -f ../intl/config.intl; then
12338 . ../intl/config.intl
093e61a6 12339fi
ba479fd2
NN
12340echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12341echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
56694dd9 12342if test x"$USE_NLS" != xyes; then
ba479fd2
NN
12343 echo "$as_me:$LINENO: result: no" >&5
12344echo "${ECHO_T}no" >&6
56694dd9 12345else
ba479fd2
NN
12346 echo "$as_me:$LINENO: result: yes" >&5
12347echo "${ECHO_T}yes" >&6
12348
12349cat >>confdefs.h <<\_ACEOF
56694dd9 12350#define ENABLE_NLS 1
ba479fd2 12351_ACEOF
56694dd9 12352
093e61a6 12353
ba479fd2
NN
12354 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12355echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
56694dd9 12356 # Look for .po and .gmo files in the source directory.
ba479fd2 12357 CATALOGS=
56694dd9
ZW
12358 XLINGUAS=
12359 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12360 # If there aren't any .gmo files the shell will give us the
12361 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12362 # weeded out.
12363 case "$cat" in *\**)
12364 continue;;
12365 esac
12366 # The quadruple backslash is collapsed to a double backslash
12367 # by the backticks, then collapsed again by the double quotes,
12368 # leaving us with one backslash in the sed expression (right
12369 # before the dot that mustn't act as a wildcard).
12370 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
12371 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
12372 # The user is allowed to set LINGUAS to a list of languages to
12373 # install catalogs for. If it's empty that means "all of them."
12374 if test "x$LINGUAS" = x; then
12375 CATALOGS="$CATALOGS $cat"
12376 XLINGUAS="$XLINGUAS $lang"
12377 else
12378 case "$LINGUAS" in *$lang*)
12379 CATALOGS="$CATALOGS $cat"
12380 XLINGUAS="$XLINGUAS $lang"
12381 ;;
12382 esac
12383 fi
12384 done
12385 LINGUAS="$XLINGUAS"
ba479fd2
NN
12386 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12387echo "${ECHO_T}$LINGUAS" >&6
56694dd9 12388fi
861bb6c1 12389
56694dd9
ZW
12390# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12391# -liconv on the link line twice.
12392case "$LIBINTL" in *$LIBICONV*)
12393 LIBICONV= ;;
12394esac
dc6746e7 12395
7f970b70
AM
12396# Check whether --enable-secureplt or --disable-secureplt was given.
12397if test "${enable_secureplt+set}" = set; then
12398 enableval="$enable_secureplt"
12399
12400fi;
12401
56694dd9
ZW
12402# Windows32 Registry support for specifying GCC installation paths.
12403# Check whether --enable-win32-registry or --disable-win32-registry was given.
12404if test "${enable_win32_registry+set}" = set; then
12405 enableval="$enable_win32_registry"
dc6746e7 12406
ba479fd2 12407fi;
ba479fd2 12408
a1286ef5
ZW
12409case $host_os in
12410 win32 | pe | cygwin* | mingw32* | uwin*)
12411 if test "x$enable_win32_registry" != xno; then
12412 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
ba479fd2
NN
12413echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
12414if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12415 echo $ECHO_N "(cached) $ECHO_C" >&6
12416else
12417 ac_func_search_save_LIBS=$LIBS
12418ac_cv_search_RegOpenKeyExA=no
12419cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12420/* confdefs.h. */
12421_ACEOF
12422cat confdefs.h >>conftest.$ac_ext
12423cat >>conftest.$ac_ext <<_ACEOF
12424/* end confdefs.h. */
861bb6c1 12425
ab87f8c8 12426/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12427#ifdef __cplusplus
12428extern "C"
12429#endif
ab87f8c8 12430/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12431 builtin and then its argument prototype would still apply. */
12432char RegOpenKeyExA ();
12433int
12434main ()
12435{
12436RegOpenKeyExA ();
12437 ;
12438 return 0;
12439}
12440_ACEOF
12441rm -f conftest.$ac_objext conftest$ac_exeext
12442if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12443 (eval $ac_link) 2>conftest.er1
ba479fd2 12444 ac_status=$?
86da66b5
HPN
12445 grep -v '^ *+' conftest.er1 >conftest.err
12446 rm -f conftest.er1
12447 cat conftest.err >&5
ba479fd2
NN
12448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12449 (exit $ac_status); } &&
e8b05380 12450 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
12451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12452 (eval $ac_try) 2>&5
12453 ac_status=$?
12454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12455 (exit $ac_status); }; } &&
12456 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12458 (eval $ac_try) 2>&5
12459 ac_status=$?
12460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12461 (exit $ac_status); }; }; then
56694dd9 12462 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 12463else
ba479fd2
NN
12464 echo "$as_me: failed program was:" >&5
12465sed 's/^/| /' conftest.$ac_ext >&5
12466
861bb6c1 12467fi
86da66b5
HPN
12468rm -f conftest.err conftest.$ac_objext \
12469 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
12470if test "$ac_cv_search_RegOpenKeyExA" = no; then
12471 for ac_lib in advapi32; do
12472 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12473 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12474/* confdefs.h. */
12475_ACEOF
12476cat confdefs.h >>conftest.$ac_ext
12477cat >>conftest.$ac_ext <<_ACEOF
12478/* end confdefs.h. */
12479
56694dd9 12480/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12481#ifdef __cplusplus
12482extern "C"
12483#endif
56694dd9 12484/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12485 builtin and then its argument prototype would still apply. */
12486char RegOpenKeyExA ();
12487int
12488main ()
12489{
12490RegOpenKeyExA ();
12491 ;
12492 return 0;
12493}
12494_ACEOF
12495rm -f conftest.$ac_objext conftest$ac_exeext
12496if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12497 (eval $ac_link) 2>conftest.er1
ba479fd2 12498 ac_status=$?
86da66b5
HPN
12499 grep -v '^ *+' conftest.er1 >conftest.err
12500 rm -f conftest.er1
12501 cat conftest.err >&5
ba479fd2
NN
12502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12503 (exit $ac_status); } &&
e8b05380 12504 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
12505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12506 (eval $ac_try) 2>&5
12507 ac_status=$?
12508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12509 (exit $ac_status); }; } &&
12510 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12512 (eval $ac_try) 2>&5
12513 ac_status=$?
12514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12515 (exit $ac_status); }; }; then
12516 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 12517break
861bb6c1 12518else
ba479fd2
NN
12519 echo "$as_me: failed program was:" >&5
12520sed 's/^/| /' conftest.$ac_ext >&5
12521
861bb6c1 12522fi
86da66b5
HPN
12523rm -f conftest.err conftest.$ac_objext \
12524 conftest$ac_exeext conftest.$ac_ext
ba479fd2 12525 done
6e3f3080 12526fi
ba479fd2
NN
12527LIBS=$ac_func_search_save_LIBS
12528fi
12529echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
12530echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
12531if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 12532 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 12533
cafe096b 12534else
a1286ef5 12535 enable_win32_registry=no
093e61a6 12536fi
ab87f8c8 12537
a1286ef5
ZW
12538 fi
12539
12540 if test "x$enable_win32_registry" != xno; then
12541
12542cat >>confdefs.h <<\_ACEOF
12543#define ENABLE_WIN32_REGISTRY 1
12544_ACEOF
ab87f8c8 12545
a1286ef5
ZW
12546
12547 if test "x$enable_win32_registry" != xyes \
12548 && test "x$enable_win32_registry" != x; then
ba479fd2
NN
12549
12550cat >>confdefs.h <<_ACEOF
a1286ef5 12551#define WIN32_REGISTRY_KEY "$enable_win32_registry"
ba479fd2 12552_ACEOF
cafe096b 12553
a1286ef5
ZW
12554 fi
12555 fi
12556 ;;
56694dd9 12557esac
ab87f8c8 12558
56694dd9
ZW
12559# Get an absolute path to the GCC top-level source directory
12560holddir=`${PWDCMD-pwd}`
12561cd $srcdir
12562topdir=`${PWDCMD-pwd}`
12563cd $holddir
ab87f8c8 12564
56694dd9 12565# Conditionalize the makefile for this host machine.
2ed26f6b 12566xmake_file=
c406e779 12567for f in ${host_xmake_file}
56694dd9
ZW
12568do
12569 if test -f ${srcdir}/config/$f
12570 then
2ed26f6b 12571 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
12572 fi
12573done
093e61a6 12574
56694dd9 12575# Conditionalize the makefile for this target machine.
2ed26f6b 12576tmake_file_=
c406e779 12577for f in ${tmake_file}
56694dd9
ZW
12578do
12579 if test -f ${srcdir}/config/$f
12580 then
2ed26f6b 12581 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
12582 fi
12583done
2ed26f6b 12584tmake_file="${tmake_file_}"
71a94577 12585
ab87f8c8
JL
12586# If the host doesn't support symlinks, modify CC in
12587# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
12588# Otherwise, we can use "CC=$(CC)".
12589rm -f symtest.tem
35f06ae4
PB
12590case "$LN_S" in
12591 *-s*)
12592 cc_set_by_configure="\$(CC)"
12593 quoted_cc_set_by_configure="\$(CC)"
12594 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12595 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12596 ;;
12597 *)
12598 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
12599 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
12600 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
12601 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
12602 ;;
12603esac
ab87f8c8 12604
5395b47b
NN
12605# This is a terrible hack which will go away some day.
12606host_cc_for_libada=${CC}
1e3fad21
NN
12607
12608
ab87f8c8
JL
12609out_object_file=`basename $out_file .c`.o
12610
75685792
RS
12611tm_file_list="options.h"
12612tm_include_list="options.h"
ab87f8c8 12613for f in $tm_file; do
64ccbc99 12614 case $f in
d02af173 12615 defaults.h )
e22340b0
ZW
12616 tm_file_list="${tm_file_list} \$(srcdir)/$f"
12617 tm_include_list="${tm_include_list} $f"
12618 ;;
12619 * )
12620 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
12621 tm_include_list="${tm_include_list} config/$f"
12622 ;;
64ccbc99 12623 esac
ab87f8c8
JL
12624done
12625
11642c3a 12626tm_p_file_list=
e22340b0 12627tm_p_include_list=
11642c3a 12628for f in $tm_p_file; do
4977bab6
ZW
12629 case $f in
12630 tm-preds.h )
e22340b0
ZW
12631 tm_p_file_list="${tm_p_file_list} $f"
12632 tm_p_include_list="${tm_p_include_list} $f"
12633 ;;
12634 * )
12635 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
12636 tm_p_include_list="${tm_p_include_list} config/$f"
12637 esac
12638done
12639
12640xm_file_list=
12641xm_include_list=
12642for f in $xm_file; do
12643 case $f in
12644 ansidecl.h )
12645 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
12646 xm_include_list="${xm_include_list} $f"
12647 ;;
12648 auto-host.h )
12649 xm_file_list="${xm_file_list} $f"
12650 xm_include_list="${xm_include_list} $f"
12651 ;;
12652 * )
12653 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
12654 xm_include_list="${xm_include_list} config/$f"
12655 ;;
4977bab6 12656 esac
11642c3a
ZW
12657done
12658
ab87f8c8 12659host_xm_file_list=
e22340b0 12660host_xm_include_list=
ab87f8c8 12661for f in $host_xm_file; do
64ccbc99 12662 case $f in
d02af173 12663 ansidecl.h )
e22340b0
ZW
12664 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
12665 host_xm_include_list="${host_xm_include_list} $f"
12666 ;;
e2500fed 12667 auto-host.h )
e22340b0
ZW
12668 host_xm_file_list="${host_xm_file_list} $f"
12669 host_xm_include_list="${host_xm_include_list} $f"
12670 ;;
12671 * )
12672 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
12673 host_xm_include_list="${host_xm_include_list} config/$f"
12674 ;;
64ccbc99 12675 esac
ab87f8c8
JL
12676done
12677
12678build_xm_file_list=
12679for f in $build_xm_file; do
64ccbc99 12680 case $f in
d02af173 12681 ansidecl.h )
e22340b0
ZW
12682 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
12683 build_xm_include_list="${build_xm_include_list} $f"
12684 ;;
e2500fed 12685 auto-build.h | auto-host.h )
e22340b0
ZW
12686 build_xm_file_list="${build_xm_file_list} $f"
12687 build_xm_include_list="${build_xm_include_list} $f"
12688 ;;
12689 * )
12690 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
12691 build_xm_include_list="${build_xm_include_list} config/$f"
12692 ;;
64ccbc99 12693 esac
ab87f8c8
JL
12694done
12695
a078a589
ZW
12696# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
12697# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
12698CROSS=
12699ALL=all.internal
12700SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
12701
12702if test "x$with_build_sysroot" != x; then
12703 build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)'
12704else
12705 # This value is used, even on a native system, because
12706 # CROSS_SYSTEM_HEADER_DIR is just
12707 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
12708 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
12709fi
12710
ab87f8c8
JL
12711if test x$host != x$target
12712then
a078a589
ZW
12713 CROSS="-DCROSS_COMPILE"
12714 ALL=all.cross
160633c6 12715 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 12716 case "$host","$target" in
3a7e8b87
GK
12717 # Darwin crosses can use the host system's libraries and headers,
12718 # because of the fat library support. Of course, it must be the
12719 # same version of Darwin on both sides. Allow the user to
12720 # just say --target=foo-darwin without a version number to mean
12721 # "the version on this system".
12722 *-*-darwin*,*-*-darwin*)
12723 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
12724 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
12725 if test $hostos = $targetos -o $targetos = darwin ; then
12726 CROSS=
12727 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
12728 with_headers=yes
12729 fi
12730 ;;
12731
343f59d9
AM
12732 i?86-*-*,x86_64-*-* \
12733 | powerpc*-*-*,powerpc64*-*-*)
12734 CROSS="$CROSS -DNATIVE_CROSS" ;;
12735 esac
7a615b25 12736elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 12737 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
12738fi
12739
b39d221a
EC
12740# If this is a cross-compiler that does not
12741# have its own set of headers then define
12742# inhibit_libc
12743
dc06db20
R
12744# If this is using newlib, without having the headers available now,
12745# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
12746# This prevents libgcc2 from containing any code which requires libc
12747# support.
160633c6 12748inhibit_libc=false
dc06db20
R
12749if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
12750 test x$with_newlib = xyes ; } &&
e50084fa 12751 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 12752 inhibit_libc=true
b39d221a
EC
12753fi
12754
12755
a078a589
ZW
12756# When building gcc with a cross-compiler, we need to adjust things so
12757# that the generator programs are still built with the native compiler.
12758# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
12759
12760# These are the normal (build=host) settings:
ba479fd2
NN
12761CC_FOR_BUILD='$(CC)'
12762BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 12763STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
12764
12765# Possibly disable fixproto, on a per-target basis.
12766case ${use_fixproto} in
12767 no)
12768 STMP_FIXPROTO=
12769 ;;
12770 yes)
12771 STMP_FIXPROTO=stmp-fixproto
12772 ;;
12773esac
12774
a078a589 12775
83599948
NS
12776# And these apply if build != host, or we are generating coverage data
12777if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 12778then
b11e4747 12779 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 12780
7a615b25 12781 if test "x$TARGET_SYSTEM_ROOT" = x; then
d8e5117d 12782 if test "x$STMP_FIXPROTO" != x; then
de253ca4
GK
12783 STMP_FIXPROTO=stmp-install-fixproto
12784 fi
7a615b25 12785 fi
ab87f8c8
JL
12786fi
12787
12788# Expand extra_headers to include complete path.
12789# This substitutes for lots of t-* files.
12790extra_headers_list=
b1ef58c8
NN
12791# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
12792for file in ${extra_headers} ; do
12793 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
12794done
ab87f8c8 12795
c38f02df
ILT
12796# Define collect2 in Makefile.
12797case $host_can_use_collect2 in
12798 no) collect2= ;;
12799 *) collect2='collect2$(exeext)' ;;
12800esac
12801
12802
ab87f8c8 12803# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
12804case $use_collect2 in
12805 no) use_collect2= ;;
12806 "") ;;
ba479fd2 12807 *)
34a86c2b
NN
12808 host_xm_defines="${host_xm_defines} USE_COLLECT2"
12809 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
12810 case $host_can_use_collect2 in
12811 no)
12812 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
12813echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
12814 { (exit 1); exit 1; }; }
12815 ;;
12816 esac
34a86c2b
NN
12817 ;;
12818esac
ab87f8c8 12819
8bb915b6
NN
12820# ---------------------------
12821# Assembler & linker features
12822# ---------------------------
12823
d869a8c4
NN
12824# Identify the assembler which will work hand-in-glove with the newly
12825# built GCC, so that we can examine its features. This is the assembler
12826# which will be driven by the driver program.
12827#
12828# If build != host, and we aren't building gas in-tree, we identify a
12829# build->target assembler and hope that it will have the same features
12830# as the host->target assembler we'll be using.
981d4858
JM
12831gcc_cv_gas_major_version=
12832gcc_cv_gas_minor_version=
ab87f8c8 12833gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
e8b05380
PB
12834
12835if test "${gcc_cv_as+set}" = set; then
12836 :
12837else
12838
ab87f8c8
JL
12839if test -x "$DEFAULT_ASSEMBLER"; then
12840 gcc_cv_as="$DEFAULT_ASSEMBLER"
34a86c2b 12841elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
12842 && test -f ../gas/Makefile \
12843 && test x$build = x$host; then
e8b05380
PB
12844 gcc_cv_as=../gas/as-new$build_exeext
12845elif test -x as$build_exeext; then
12846 # Build using assembler in the current directory.
12847 gcc_cv_as=./as$build_exeext
12848elif test -x $AS_FOR_TARGET; then
12849 gcc_cv_as="$AS_FOR_TARGET"
12850else
12851 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
12852set dummy $AS_FOR_TARGET; ac_word=$2
12853echo "$as_me:$LINENO: checking for $ac_word" >&5
12854echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12855if test "${ac_cv_path_gcc_cv_as+set}" = set; then
12856 echo $ECHO_N "(cached) $ECHO_C" >&6
12857else
12858 case $gcc_cv_as in
12859 [\\/]* | ?:[\\/]*)
12860 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
12861 ;;
12862 *)
12863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12864for as_dir in $PATH
12865do
12866 IFS=$as_save_IFS
12867 test -z "$as_dir" && as_dir=.
12868 for ac_exec_ext in '' $ac_executable_extensions; do
12869 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12870 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
12871 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12872 break 2
12873 fi
12874done
12875done
12876
12877 ;;
12878esac
12879fi
12880gcc_cv_as=$ac_cv_path_gcc_cv_as
12881
12882if test -n "$gcc_cv_as"; then
12883 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
12884echo "${ECHO_T}$gcc_cv_as" >&6
12885else
12886 echo "$as_me:$LINENO: result: no" >&5
12887echo "${ECHO_T}no" >&6
12888fi
12889
12890fi
12891fi
12892
12893
12894ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
12895
12896
12897echo "$as_me:$LINENO: checking what assembler to use" >&5
12898echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
12899if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
08d105fa
AO
12900 # Single tree build which includes gas. We want to prefer it
12901 # over whatever linker top-level may have detected, since
12902 # we'll use what we're building after installation anyway.
e8b05380
PB
12903 echo "$as_me:$LINENO: result: newly built gas" >&5
12904echo "${ECHO_T}newly built gas" >&6
ad9c4d9f
NN
12905 in_tree_gas=yes
12906 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
12907for f in $gcc_cv_as_bfd_srcdir/configure \
12908 $gcc_cv_as_gas_srcdir/configure \
12909 $gcc_cv_as_gas_srcdir/configure.in \
12910 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 12911 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
12912 if test x$gcc_cv_gas_version != x; then
12913 break
12914 fi
12915done
12916gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
12917gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
12918gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
12919case $gcc_cv_gas_patch_version in
12920 "") gcc_cv_gas_patch_version="0" ;;
12921esac
8ada417f
ZW
12922gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
12923 + $gcc_cv_gas_minor_version \) \* 1000 \
12924 + $gcc_cv_gas_patch_version`
ad9c4d9f 12925
5408ac6c
HPN
12926 in_tree_gas_is_elf=no
12927 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
12928 || (grep 'obj_format = multi' ../gas/Makefile \
12929 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
12930 then
12931 in_tree_gas_is_elf=yes
12932 fi
e8b05380
PB
12933else
12934 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
12935echo "${ECHO_T}$gcc_cv_as" >&6
12936 in_tree_gas=no
981d4858 12937fi
9e423e6d 12938
e8b05380
PB
12939# Identify the linker which will work hand-in-glove with the newly
12940# built GCC, so that we can examine its features. This is the linker
12941# which will be driven by the driver program.
9f18db39 12942#
e8b05380
PB
12943# If build != host, and we aren't building gas in-tree, we identify a
12944# build->target linker and hope that it will have the same features
12945# as the host->target linker we'll be using.
12946gcc_cv_gld_major_version=
12947gcc_cv_gld_minor_version=
12948gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
12949gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9f18db39 12950
e8b05380
PB
12951if test "${gcc_cv_ld+set}" = set; then
12952 :
9f18db39 12953else
9f18db39 12954
e8b05380
PB
12955if test -x "$DEFAULT_LINKER"; then
12956 gcc_cv_ld="$DEFAULT_LINKER"
12957elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
12958 && test -f ../ld/Makefile \
12959 && test x$build = x$host; then
12960 gcc_cv_ld=../ld/ld-new$build_exeext
12961elif test -x collect-ld$build_exeext; then
12962 # Build using linker in the current directory.
12963 gcc_cv_ld=./collect-ld$build_exeext
12964elif test -x $LD_FOR_TARGET; then
12965 gcc_cv_ld="$LD_FOR_TARGET"
12966else
12967 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
12968set dummy $LD_FOR_TARGET; ac_word=$2
d739199a
DJ
12969echo "$as_me:$LINENO: checking for $ac_word" >&5
12970echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 12971if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
d739199a
DJ
12972 echo $ECHO_N "(cached) $ECHO_C" >&6
12973else
e8b05380 12974 case $gcc_cv_ld in
d739199a 12975 [\\/]* | ?:[\\/]*)
e8b05380 12976 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
12977 ;;
12978 *)
12979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12980for as_dir in $PATH
12981do
12982 IFS=$as_save_IFS
12983 test -z "$as_dir" && as_dir=.
12984 for ac_exec_ext in '' $ac_executable_extensions; do
12985 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 12986 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
12987 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12988 break 2
12989 fi
12990done
12991done
12992
12993 ;;
12994esac
12995fi
e8b05380 12996gcc_cv_ld=$ac_cv_path_gcc_cv_ld
d739199a 12997
e8b05380
PB
12998if test -n "$gcc_cv_ld"; then
12999 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13000echo "${ECHO_T}$gcc_cv_ld" >&6
d739199a
DJ
13001else
13002 echo "$as_me:$LINENO: result: no" >&5
13003echo "${ECHO_T}no" >&6
13004fi
13005
13006fi
e8b05380
PB
13007fi
13008
13009
13010ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
13011
13012
13013echo "$as_me:$LINENO: checking what linker to use" >&5
13014echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
13015if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
13016 # Single tree build which includes ld. We want to prefer it
13017 # over whatever linker top-level may have detected, since
13018 # we'll use what we're building after installation anyway.
13019 echo "$as_me:$LINENO: result: newly built ld" >&5
13020echo "${ECHO_T}newly built ld" >&6
13021 in_tree_ld=yes
13022 in_tree_ld_is_elf=no
13023 if (grep 'EMUL = .*elf' ../ld/Makefile \
13024 || grep 'EMUL = .*linux' ../ld/Makefile \
13025 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
13026 in_tree_ld_is_elf=yes
13027 fi
13028 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
13029 do
13030 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
13031 if test x$gcc_cv_gld_version != x; then
13032 break
13033 fi
13034 done
13035 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
13036 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13037else
13038 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13039echo "${ECHO_T}$gcc_cv_ld" >&6
13040 in_tree_ld=no
13041fi
13042
13043# Figure out what nm we will be using.
13044gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
13045if test "${gcc_cv_nm+set}" = set; then
13046 :
13047else
13048
13049if test -f $gcc_cv_binutils_srcdir/configure.in \
13050 && test -f ../binutils/Makefile; then
13051 gcc_cv_nm=../binutils/nm-new$build_exeext
13052elif test -x nm$build_exeext; then
13053 gcc_cv_nm=./nm$build_exeext
13054elif test -x $NM_FOR_TARGET; then
13055 gcc_cv_nm="$NM_FOR_TARGET"
13056else
13057 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
13058set dummy $NM_FOR_TARGET; ac_word=$2
d739199a
DJ
13059echo "$as_me:$LINENO: checking for $ac_word" >&5
13060echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13061if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
d739199a
DJ
13062 echo $ECHO_N "(cached) $ECHO_C" >&6
13063else
e8b05380 13064 case $gcc_cv_nm in
d739199a 13065 [\\/]* | ?:[\\/]*)
e8b05380 13066 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
13067 ;;
13068 *)
13069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13070for as_dir in $PATH
13071do
13072 IFS=$as_save_IFS
13073 test -z "$as_dir" && as_dir=.
13074 for ac_exec_ext in '' $ac_executable_extensions; do
13075 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13076 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13077 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13078 break 2
13079 fi
13080done
13081done
13082
13083 ;;
13084esac
13085fi
e8b05380 13086gcc_cv_nm=$ac_cv_path_gcc_cv_nm
d739199a 13087
e8b05380
PB
13088if test -n "$gcc_cv_nm"; then
13089 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13090echo "${ECHO_T}$gcc_cv_nm" >&6
d739199a
DJ
13091else
13092 echo "$as_me:$LINENO: result: no" >&5
13093echo "${ECHO_T}no" >&6
13094fi
13095
13096fi
e8b05380 13097fi
d739199a 13098
e8b05380
PB
13099
13100echo "$as_me:$LINENO: checking what nm to use" >&5
13101echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
13102if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
13103 # Single tree build which includes binutils.
13104 echo "$as_me:$LINENO: result: newly built nm" >&5
13105echo "${ECHO_T}newly built nm" >&6
13106 in_tree_nm=yes
13107else
13108 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13109echo "${ECHO_T}$gcc_cv_nm" >&6
13110 in_tree_nm=no
13111fi
13112
13113ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
13114
13115
13116# Figure out what objdump we will be using.
13117if test "${gcc_cv_objdump+set}" = set; then
13118 :
13119else
13120
13121if test -f $gcc_cv_binutils_srcdir/configure.in \
13122 && test -f ../binutils/Makefile; then
13123 # Single tree build which includes binutils.
13124 gcc_cv_objdump=../binutils/objdump$build_exeext
13125elif test -x objdump$build_exeext; then
13126 gcc_cv_objdump=./objdump$build_exeext
13127elif test -x $OBJDUMP_FOR_TARGET; then
13128 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
13129else
13130 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
13131set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
9f18db39
PB
13132echo "$as_me:$LINENO: checking for $ac_word" >&5
13133echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13134if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
9f18db39
PB
13135 echo $ECHO_N "(cached) $ECHO_C" >&6
13136else
e8b05380 13137 case $gcc_cv_objdump in
9f18db39 13138 [\\/]* | ?:[\\/]*)
e8b05380 13139 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
13140 ;;
13141 *)
13142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 13143for as_dir in $PATH
9f18db39
PB
13144do
13145 IFS=$as_save_IFS
13146 test -z "$as_dir" && as_dir=.
13147 for ac_exec_ext in '' $ac_executable_extensions; do
13148 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13149 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
9f18db39
PB
13150 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13151 break 2
13152 fi
13153done
13154done
779243f7 13155
9f18db39
PB
13156 ;;
13157esac
13158fi
e8b05380 13159gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
9f18db39 13160
e8b05380
PB
13161if test -n "$gcc_cv_objdump"; then
13162 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13163echo "${ECHO_T}$gcc_cv_objdump" >&6
9f18db39
PB
13164else
13165 echo "$as_me:$LINENO: result: no" >&5
13166echo "${ECHO_T}no" >&6
13167fi
13168
e8b05380
PB
13169fi
13170fi
9f18db39 13171
e8b05380
PB
13172
13173echo "$as_me:$LINENO: checking what objdump to use" >&5
13174echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
13175if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
13176 # Single tree build which includes binutils.
13177 echo "$as_me:$LINENO: result: newly built objdump" >&5
13178echo "${ECHO_T}newly built objdump" >&6
13179elif test x$gcc_cv_objdump = x; then
13180 echo "$as_me:$LINENO: result: not found" >&5
13181echo "${ECHO_T}not found" >&6
13182else
13183 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13184echo "${ECHO_T}$gcc_cv_objdump" >&6
a2eafc76 13185fi
3cae5780 13186
981d4858 13187# Figure out what assembler alignment features are present.
ba479fd2
NN
13188echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13189echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
13190if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13191 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13192else
13193 gcc_cv_as_balign_and_p2align=no
13194 if test $in_tree_gas = yes; then
13195 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13196 then gcc_cv_as_balign_and_p2align=yes
13197fi
13198 elif test x$gcc_cv_as != x; then
6e3f3080 13199 echo '.balign 4
8ada417f 13200.p2align 2' > conftest.s
ba479fd2
NN
13201 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13203 (eval $ac_try) 2>&5
13204 ac_status=$?
13205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13206 (exit $ac_status); }; }
8ada417f
ZW
13207 then
13208 gcc_cv_as_balign_and_p2align=yes
13209 else
13210 echo "configure: failed program was" >&5
13211 cat conftest.s >&5
13212 fi
13213 rm -f conftest.o conftest.s
13214 fi
13215fi
ba479fd2
NN
13216echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13217echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 13218if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
13219
13220cat >>confdefs.h <<\_ACEOF
981d4858 13221#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 13222_ACEOF
981d4858 13223
ad9c4d9f
NN
13224fi
13225
ba479fd2
NN
13226echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13227echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
13228if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13229 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13230else
13231 gcc_cv_as_max_skip_p2align=no
13232 if test $in_tree_gas = yes; then
13233 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13234 then gcc_cv_as_max_skip_p2align=yes
13235fi
13236 elif test x$gcc_cv_as != x; then
6e3f3080 13237 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
13238 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13240 (eval $ac_try) 2>&5
13241 ac_status=$?
13242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13243 (exit $ac_status); }; }
8ada417f
ZW
13244 then
13245 gcc_cv_as_max_skip_p2align=yes
13246 else
13247 echo "configure: failed program was" >&5
13248 cat conftest.s >&5
13249 fi
13250 rm -f conftest.o conftest.s
13251 fi
ad9c4d9f 13252fi
ba479fd2
NN
13253echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13254echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 13255if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
13256
13257cat >>confdefs.h <<\_ACEOF
9e423e6d 13258#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 13259_ACEOF
9e423e6d 13260
9e423e6d 13261fi
ad9c4d9f 13262
ba479fd2
NN
13263echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13264echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
13265if test "${gcc_cv_as_subsection_m1+set}" = set; then
13266 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13267else
13268 gcc_cv_as_subsection_m1=no
13269 if test $in_tree_gas = yes; then
13270 if test $in_tree_gas_is_elf = yes \
13271 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13272 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 13273fi
8ada417f 13274 elif test x$gcc_cv_as != x; then
6e3f3080 13275 echo 'conftest_label1: .word 0
d1accaa3
JJ
13276.subsection -1
13277conftest_label2: .word 0
8ada417f 13278.previous' > conftest.s
ba479fd2
NN
13279 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13281 (eval $ac_try) 2>&5
13282 ac_status=$?
13283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13284 (exit $ac_status); }; }
8ada417f
ZW
13285 then
13286 if test x$gcc_cv_nm != x; then
13287 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13288 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13289 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13290 then :
13291 else gcc_cv_as_subsection_m1=yes
13292 fi
13293 rm -f conftest.nm1 conftest.nm2
13294 fi
13295 else
13296 echo "configure: failed program was" >&5
13297 cat conftest.s >&5
13298 fi
13299 rm -f conftest.o conftest.s
13300 fi
981d4858 13301fi
ba479fd2
NN
13302echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13303echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 13304if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
13305
13306cat >>confdefs.h <<\_ACEOF
981d4858 13307#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 13308_ACEOF
981d4858 13309
d1accaa3 13310fi
ad9c4d9f 13311
ba479fd2
NN
13312echo "$as_me:$LINENO: checking assembler for .weak" >&5
13313echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
13314if test "${gcc_cv_as_weak+set}" = set; then
13315 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13316else
13317 gcc_cv_as_weak=no
13318 if test $in_tree_gas = yes; then
13319 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13320 then gcc_cv_as_weak=yes
ad9c4d9f 13321fi
8ada417f 13322 elif test x$gcc_cv_as != x; then
6e3f3080 13323 echo ' .weak foobar' > conftest.s
ba479fd2
NN
13324 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13326 (eval $ac_try) 2>&5
13327 ac_status=$?
13328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13329 (exit $ac_status); }; }
8ada417f
ZW
13330 then
13331 gcc_cv_as_weak=yes
13332 else
13333 echo "configure: failed program was" >&5
13334 cat conftest.s >&5
13335 fi
13336 rm -f conftest.o conftest.s
13337 fi
981d4858 13338fi
ba479fd2
NN
13339echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13340echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 13341if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
13342
13343cat >>confdefs.h <<\_ACEOF
981d4858 13344#define HAVE_GAS_WEAK 1
ba479fd2 13345_ACEOF
981d4858 13346
12822146 13347fi
ad9c4d9f 13348
a0203ca7
AO
13349echo "$as_me:$LINENO: checking assembler for .weakref" >&5
13350echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
13351if test "${gcc_cv_as_weakref+set}" = set; then
13352 echo $ECHO_N "(cached) $ECHO_C" >&6
13353else
13354 gcc_cv_as_weakref=no
13355 if test $in_tree_gas = yes; then
13356 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
13357 then gcc_cv_as_weakref=yes
13358fi
13359 elif test x$gcc_cv_as != x; then
13360 echo ' .weakref foobar, barfnot' > conftest.s
13361 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13363 (eval $ac_try) 2>&5
13364 ac_status=$?
13365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13366 (exit $ac_status); }; }
13367 then
13368 gcc_cv_as_weakref=yes
13369 else
13370 echo "configure: failed program was" >&5
13371 cat conftest.s >&5
13372 fi
13373 rm -f conftest.o conftest.s
13374 fi
13375fi
13376echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
13377echo "${ECHO_T}$gcc_cv_as_weakref" >&6
13378if test $gcc_cv_as_weakref = yes; then
13379
13380cat >>confdefs.h <<\_ACEOF
13381#define HAVE_GAS_WEAKREF 1
13382_ACEOF
13383
13384fi
13385
e41f3691
JDA
13386echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13387echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
13388if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13389 echo $ECHO_N "(cached) $ECHO_C" >&6
13390else
13391 gcc_cv_as_nsubspa_comdat=no
13392 if test $in_tree_gas = yes; then
13393 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13394 then gcc_cv_as_nsubspa_comdat=yes
13395fi
13396 elif test x$gcc_cv_as != x; then
13397 echo ' .SPACE $TEXT$
13398 .NSUBSPA $CODE$,COMDAT' > conftest.s
13399 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13401 (eval $ac_try) 2>&5
13402 ac_status=$?
13403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13404 (exit $ac_status); }; }
13405 then
13406 gcc_cv_as_nsubspa_comdat=yes
13407 else
13408 echo "configure: failed program was" >&5
13409 cat conftest.s >&5
13410 fi
13411 rm -f conftest.o conftest.s
13412 fi
13413fi
13414echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13415echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
13416if test $gcc_cv_as_nsubspa_comdat = yes; then
13417
13418cat >>confdefs.h <<\_ACEOF
13419#define HAVE_GAS_NSUBSPA_COMDAT 1
13420_ACEOF
13421
13422fi
13423
8ada417f
ZW
13424# .hidden needs to be supported in both the assembler and the linker,
13425# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13426# This is irritatingly difficult to feature test for; we have to check the
13427# date string after the version number. If we've got an in-tree
13428# ld, we don't know its patchlevel version, so we set the baseline at 2.13
13429# to be safe.
13430# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
13431echo "$as_me:$LINENO: checking assembler for .hidden" >&5
13432echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
13433if test "${gcc_cv_as_hidden+set}" = set; then
13434 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13435else
13436 gcc_cv_as_hidden=no
13437 if test $in_tree_gas = yes; then
13438 if test $in_tree_gas_is_elf = yes \
13439 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
13440 then gcc_cv_as_hidden=yes
13441fi
13442 elif test x$gcc_cv_as != x; then
6e3f3080 13443 echo ' .hidden foobar
8ada417f 13444foobar:' > conftest.s
ba479fd2
NN
13445 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13447 (eval $ac_try) 2>&5
13448 ac_status=$?
13449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13450 (exit $ac_status); }; }
8ada417f
ZW
13451 then
13452 gcc_cv_as_hidden=yes
13453 else
13454 echo "configure: failed program was" >&5
13455 cat conftest.s >&5
13456 fi
13457 rm -f conftest.o conftest.s
13458 fi
13459fi
ba479fd2
NN
13460echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
13461echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 13462
ad9c4d9f 13463
ba479fd2
NN
13464echo "$as_me:$LINENO: checking linker for .hidden support" >&5
13465echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
13466if test "${gcc_cv_ld_hidden+set}" = set; then
13467 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13468else
13469 if test $in_tree_ld = yes ; then
13470 gcc_cv_ld_hidden=no
13471 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 \
13472 && test $in_tree_ld_is_elf = yes; then
13473 gcc_cv_ld_hidden=yes
13474 fi
13475else
13476 gcc_cv_ld_hidden=yes
bace148a 13477 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
13478 if echo "$ld_ver" | grep GNU > /dev/null; then
13479 ld_vers=`echo $ld_ver | sed -n \
13480 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13481 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13482 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13483 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13484 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
11176d2a
JB
13485 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13486 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
8ada417f 13487 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
13488 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
13489 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
13490 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
13491 if test 0"$ld_date" -lt 20020404; then
13492 if test -n "$ld_date"; then
13493 # If there was date string, but was earlier than 2002-04-04, fail
13494 gcc_cv_ld_hidden=no
13495 elif test -z "$ld_vers"; then
13496 # If there was no date string nor ld version number, something is wrong
13497 gcc_cv_ld_hidden=no
13498 else
8ada417f
ZW
13499 test -z "$ld_vers_patch" && ld_vers_patch=0
13500 if test "$ld_vers_major" -lt 2; then
13501 gcc_cv_ld_hidden=no
13502 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
13503 gcc_cv_ld_hidden="no"
13504 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
13505 gcc_cv_ld_hidden=no
c72931a6 13506 fi
8ada417f 13507 fi
789b7de5 13508 fi
8ada417f 13509 else
28690784 13510 case "${target}" in
b0fd7d27 13511 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
13512 gcc_cv_ld_hidden=yes
13513 ;;
13514 *)
13515 gcc_cv_ld_hidden=no
13516 ;;
13517 esac
8ada417f
ZW
13518 fi
13519fi
6d07784a 13520fi
ba479fd2
NN
13521echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
13522echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 13523libgcc_visibility=no
ad9c4d9f 13524
232b67d9 13525
8e3940b2 13526if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 13527 libgcc_visibility=yes
ba479fd2
NN
13528
13529cat >>confdefs.h <<\_ACEOF
8ada417f 13530#define HAVE_GAS_HIDDEN 1
ba479fd2 13531_ACEOF
ad9c4d9f
NN
13532
13533fi
13534
8ada417f 13535# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
13536echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
13537echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
13538if test "${gcc_cv_as_leb128+set}" = set; then
13539 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13540else
13541 gcc_cv_as_leb128=no
13542 if test $in_tree_gas = yes; then
13543 if test $in_tree_gas_is_elf = yes \
13544 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
13545 then gcc_cv_as_leb128=yes
13546fi
13547 elif test x$gcc_cv_as != x; then
6e3f3080 13548 echo ' .data
b7460f24
RH
13549 .uleb128 L2 - L1
13550L1:
13551 .uleb128 1280
13552 .sleb128 -1010
8ada417f 13553L2:' > conftest.s
ba479fd2
NN
13554 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13556 (eval $ac_try) 2>&5
13557 ac_status=$?
13558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13559 (exit $ac_status); }; }
8ada417f
ZW
13560 then
13561 # GAS versions before 2.11 do not support uleb128,
13562 # despite appearing to.
13563 # ??? There exists an elf-specific test that will crash
13564 # the assembler. Perhaps it's better to figure out whether
13565 # arbitrary sections are supported and try the test.
bace148a 13566 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
13567 if echo "$as_ver" | grep GNU > /dev/null; then
13568 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
13569 as_major=`echo $as_ver | sed 's/\..*//'`
13570 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
13571 if test $as_major -eq 2 && test $as_minor -lt 11
13572 then :
13573 else gcc_cv_as_leb128=yes
13574 fi
13575 fi
13576 else
13577 echo "configure: failed program was" >&5
13578 cat conftest.s >&5
13579 fi
13580 rm -f conftest.o conftest.s
13581 fi
b7460f24 13582fi
ba479fd2
NN
13583echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
13584echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 13585if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
13586
13587cat >>confdefs.h <<\_ACEOF
b7460f24 13588#define HAVE_AS_LEB128 1
ba479fd2 13589_ACEOF
b7460f24
RH
13590
13591fi
ad9c4d9f 13592
8ada417f
ZW
13593# GAS versions up to and including 2.11.0 may mis-optimize
13594# .eh_frame data.
ba479fd2
NN
13595echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
13596echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
13597if test "${gcc_cv_as_eh_frame+set}" = set; then
13598 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13599else
13600 gcc_cv_as_eh_frame=no
13601 if test $in_tree_gas = yes; then
13602 if test $in_tree_gas_is_elf = yes \
13603 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13604 then gcc_cv_as_eh_frame=yes
ad9c4d9f 13605fi
8ada417f 13606 elif test x$gcc_cv_as != x; then
6e3f3080 13607 echo ' .text
c64688ae
RH
13608.LFB1:
13609 .4byte 0
13610.L1:
13611 .4byte 0
13612.LFE1:
13613 .section .eh_frame,"aw",@progbits
13614__FRAME_BEGIN__:
13615 .4byte .LECIE1-.LSCIE1
13616.LSCIE1:
13617 .4byte 0x0
13618 .byte 0x1
13619 .ascii "z\0"
13620 .byte 0x1
13621 .byte 0x78
13622 .byte 0x1a
13623 .byte 0x0
13624 .byte 0x4
13625 .4byte 1
13626 .p2align 1
13627.LECIE1:
13628.LSFDE1:
13629 .4byte .LEFDE1-.LASFDE1
13630.LASFDE1:
13631 .4byte .LASFDE1-__FRAME_BEGIN__
13632 .4byte .LFB1
13633 .4byte .LFE1-.LFB1
13634 .byte 0x4
13635 .4byte .LFE1-.LFB1
13636 .byte 0x4
13637 .4byte .L1-.LFB1
8ada417f 13638.LEFDE1:' > conftest.s
ba479fd2
NN
13639 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13641 (eval $ac_try) 2>&5
13642 ac_status=$?
13643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13644 (exit $ac_status); }; }
8ada417f
ZW
13645 then
13646 cat > conftest.lit <<EOF
c64688ae
RH
13647 0000 10000000 00000000 017a0001 781a0004 .........z..x...
13648 0010 01000000 12000000 18000000 00000000 ................
093e61a6 13649 0020 08000000 04080000 0044 .........D
01efb963 13650EOF
ba479fd2 13651cat > conftest.big <<EOF
01efb963
AS
13652 0000 00000010 00000000 017a0001 781a0004 .........z..x...
13653 0010 00000001 00000012 00000018 00000000 ................
093e61a6 13654 0020 00000008 04000000 0844 .........D
c64688ae 13655EOF
8ada417f
ZW
13656 # If the assembler didn't choke, and we can objdump,
13657 # and we got the correct data, then succeed.
13658 if test x$gcc_cv_objdump != x \
13659 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
13660 | tail -3 > conftest.got \
13661 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
13662 || cmp conftest.big conftest.got > /dev/null 2>&1; }
13663 then
13664 gcc_cv_as_eh_frame=yes
ba479fd2
NN
13665 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
13666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13667 (eval $ac_try) 2>&5
13668 ac_status=$?
13669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13670 (exit $ac_status); }; }; then
8ada417f
ZW
13671 gcc_cv_as_eh_frame=buggy
13672 else
13673 # Uh oh, what do we do now?
13674 gcc_cv_as_eh_frame=no
13675 fi
13676 else
13677 echo "configure: failed program was" >&5
13678 cat conftest.s >&5
13679 fi
13680 rm -f conftest.o conftest.s
13681 fi
c64688ae 13682fi
ba479fd2
NN
13683echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
13684echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 13685
6e3f3080 13686
63cf211a 13687if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
13688
13689cat >>confdefs.h <<\_ACEOF
8ada417f 13690#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 13691_ACEOF
ad9c4d9f
NN
13692
13693fi
13694
ba479fd2
NN
13695echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13696echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13697if test "${gcc_cv_as_shf_merge+set}" = set; then
13698 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13699else
13700 gcc_cv_as_shf_merge=no
13701 if test $in_tree_gas = yes; then
13702 if test $in_tree_gas_is_elf = yes \
13703 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13704 then gcc_cv_as_shf_merge=yes
13705fi
13706 elif test x$gcc_cv_as != x; then
6e3f3080 13707 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
13708 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13710 (eval $ac_try) 2>&5
13711 ac_status=$?
13712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13713 (exit $ac_status); }; }
8ada417f
ZW
13714 then
13715 gcc_cv_as_shf_merge=yes
13716 else
13717 echo "configure: failed program was" >&5
13718 cat conftest.s >&5
13719 fi
13720 rm -f conftest.o conftest.s
13721 fi
201556f0 13722fi
ba479fd2
NN
13723echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13724echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 13725
c18a5b6c
MM
13726if test $gcc_cv_as_shf_merge = no; then
13727 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13728echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13729if test "${gcc_cv_as_shf_merge+set}" = set; then
13730 echo $ECHO_N "(cached) $ECHO_C" >&6
13731else
13732 gcc_cv_as_shf_merge=no
13733 if test $in_tree_gas = yes; then
13734 if test $in_tree_gas_is_elf = yes \
13735 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13736 then gcc_cv_as_shf_merge=yes
13737fi
13738 elif test x$gcc_cv_as != x; then
13739 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
13740 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13742 (eval $ac_try) 2>&5
13743 ac_status=$?
13744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13745 (exit $ac_status); }; }
13746 then
13747 gcc_cv_as_shf_merge=yes
13748 else
13749 echo "configure: failed program was" >&5
13750 cat conftest.s >&5
13751 fi
13752 rm -f conftest.o conftest.s
13753 fi
13754fi
13755echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13756echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
13757
13758fi
8ad9fb33 13759
ba479fd2 13760cat >>confdefs.h <<_ACEOF
8ad9fb33 13761#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 13762_ACEOF
201556f0 13763
201556f0 13764
c18a5b6c
MM
13765echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13766echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13767if test "${gcc_cv_as_comdat_group+set}" = set; then
13768 echo $ECHO_N "(cached) $ECHO_C" >&6
13769else
13770 gcc_cv_as_comdat_group=no
13771 if test $in_tree_gas = yes; then
13772 if test $in_tree_gas_is_elf = yes \
11176d2a 13773 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
13774 then gcc_cv_as_comdat_group=yes
13775fi
13776 elif test x$gcc_cv_as != x; then
13777 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
13778 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13780 (eval $ac_try) 2>&5
13781 ac_status=$?
13782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13783 (exit $ac_status); }; }
13784 then
13785 gcc_cv_as_comdat_group=yes
13786 else
13787 echo "configure: failed program was" >&5
13788 cat conftest.s >&5
13789 fi
13790 rm -f conftest.o conftest.s
13791 fi
13792fi
13793echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
13794echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
13795
13796if test $gcc_cv_as_comdat_group = yes; then
13797 gcc_cv_as_comdat_group_percent=no
13798else
13799 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13800echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13801if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
13802 echo $ECHO_N "(cached) $ECHO_C" >&6
13803else
13804 gcc_cv_as_comdat_group_percent=no
13805 if test $in_tree_gas = yes; then
13806 if test $in_tree_gas_is_elf = yes \
11176d2a 13807 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
13808 then gcc_cv_as_comdat_group_percent=yes
13809fi
13810 elif test x$gcc_cv_as != x; then
13811 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
13812 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13814 (eval $ac_try) 2>&5
13815 ac_status=$?
13816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13817 (exit $ac_status); }; }
13818 then
13819 gcc_cv_as_comdat_group_percent=yes
13820 else
13821 echo "configure: failed program was" >&5
13822 cat conftest.s >&5
13823 fi
13824 rm -f conftest.o conftest.s
13825 fi
13826fi
13827echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
13828echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
13829
13830fi
11176d2a
JB
13831if test $in_tree_ld != yes && test x"$ld_vers" != x; then
13832 comdat_group=yes
13833 if test 0"$ld_date" -lt 20050308; then
13834 if test -n "$ld_date"; then
13835 # If there was date string, but was earlier than 2005-03-08, fail
13836 comdat_group=no
13837 elif test "$ld_vers_major" -lt 2; then
13838 comdat_group=no
13839 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
13840 comdat_group=no
13841 fi
13842 fi
13843 if test $comdat_group = no; then
13844 gcc_cv_as_comdat_group=no
13845 gcc_cv_as_comdat_group_percent=no
13846 fi
13847fi
c18a5b6c
MM
13848
13849cat >>confdefs.h <<_ACEOF
11176d2a 13850#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
13851_ACEOF
13852
13853
8ada417f 13854# Thread-local storage - the check is heavily parametrized.
f996902d
RH
13855conftest_s=
13856tls_first_major=
13857tls_first_minor=
9739c90c 13858tls_as_opt=
f996902d 13859case "$target" in
6f9b006d
RH
13860 alpha*-*-*)
13861 conftest_s='
13862 .section ".tdata","awT",@progbits
13863foo: .long 25
13864 .text
13865 ldq $27,__tls_get_addr($29) !literal!1
13866 lda $16,foo($29) !tlsgd!1
13867 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
13868 ldq $27,__tls_get_addr($29) !literal!2
13869 lda $16,foo($29) !tlsldm!2
13870 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
13871 ldq $1,foo($29) !gotdtprel
13872 ldah $2,foo($29) !dtprelhi
13873 lda $3,foo($2) !dtprello
13874 lda $4,foo($29) !dtprel
13875 ldq $1,foo($29) !gottprel
13876 ldah $2,foo($29) !tprelhi
13877 lda $3,foo($2) !tprello
13878 lda $4,foo($29) !tprel'
13879 tls_first_major=2
13880 tls_first_minor=13
2f3321ca 13881 tls_as_opt=--fatal-warnings
6f9b006d 13882 ;;
e4dd71de
AH
13883 frv*-*-*)
13884 conftest_s='
13885 .section ".tdata","awT",@progbits
13886x: .long 25
13887 .text
13888 call #gettlsoff(x)'
13889 tls_first_major=2
13890 tls_first_minor=14
13891 ;;
51076f96
RC
13892 hppa*-*-linux*)
13893 conftest_s='
13894t1: .reg %r20
13895t2: .reg %r21
13896gp: .reg %r19
13897 .section ".tdata","awT",@progbits
13898foo: .long 25
13899 .text
13900 .align 4
13901 addil LT%foo-$tls_gdidx$,gp
13902 ldo RT%foo-$tls_gdidx$(%r1),%arg0
13903 b __tls_get_addr
13904 nop
13905 addil LT%foo-$tls_ldidx$,gp
13906 b __tls_get_addr
13907 ldo RT%foo-$tls_ldidx$(%r1),%arg0
13908 addil LR%foo-$tls_dtpoff$,%ret0
13909 ldo RR%foo-$tls_dtpoff$(%r1),%t1
13910 mfctl %cr27,%t1
13911 addil LT%foo-$tls_ieoff$,gp
13912 ldw RT%foo-$tls_ieoff$(%r1),%t2
13913 add %t1,%t2,%t3
13914 mfctl %cr27,%t1
13915 addil LR%foo-$tls_leoff$,%t1
13916 ldo RR%foo-$tls_leoff$(%r1),%t2'
13917 tls_first_major=2
13918 tls_first_minor=15
13919 tls_as_opt=--fatal-warnings
13920 ;;
d3585b76
DJ
13921 arm*-*-*)
13922 conftest_s='
13923 .section ".tdata","awT",%progbits
13924foo: .long 25
13925 .text
13926.word foo(gottpoff)
13927.word foo(tpoff)
13928.word foo(tlsgd)
13929.word foo(tlsldm)
13930.word foo(tlsldo)'
13931 tls_first_major=2
13932 tls_first_minor=17
13933 ;;
f996902d
RH
13934 i[34567]86-*-*)
13935 conftest_s='
13936 .section ".tdata","awT",@progbits
13937foo: .long 25
13938 .text
13939 movl %gs:0, %eax
13940 leal foo@TLSGD(,%ebx,1), %eax
13941 leal foo@TLSLDM(%ebx), %eax
13942 leal foo@DTPOFF(%eax), %edx
13943 movl foo@GOTTPOFF(%ebx), %eax
13944 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
13945 addl foo@GOTNTPOFF(%ebx), %eax
13946 movl foo@INDNTPOFF, %eax
f996902d
RH
13947 movl $foo@TPOFF, %eax
13948 subl $foo@TPOFF, %eax
13949 leal foo@NTPOFF(%ecx), %eax'
13950 tls_first_major=2
75d38379 13951 tls_first_minor=14
2f3321ca 13952 tls_as_opt=--fatal-warnings
75d38379
JJ
13953 ;;
13954 x86_64-*-*)
13955 conftest_s='
13956 .section ".tdata","awT",@progbits
13957foo: .long 25
13958 .text
13959 movq %fs:0, %rax
13960 leaq foo@TLSGD(%rip), %rdi
13961 leaq foo@TLSLD(%rip), %rdi
13962 leaq foo@DTPOFF(%rax), %rdx
13963 movq foo@GOTTPOFF(%rip), %rax
13964 movq $foo@TPOFF, %rax'
13965 tls_first_major=2
13966 tls_first_minor=14
2f3321ca 13967 tls_as_opt=--fatal-warnings
f996902d 13968 ;;
7b6e506e
RH
13969 ia64-*-*)
13970 conftest_s='
13971 .section ".tdata","awT",@progbits
13972foo: data8 25
13973 .text
13974 addl r16 = @ltoff(@dtpmod(foo#)), gp
13975 addl r17 = @ltoff(@dtprel(foo#)), gp
13976 addl r18 = @ltoff(@tprel(foo#)), gp
13977 addl r19 = @dtprel(foo#), gp
13978 adds r21 = @dtprel(foo#), r13
13979 movl r23 = @dtprel(foo#)
13980 addl r20 = @tprel(foo#), gp
13981 adds r22 = @tprel(foo#), r13
13982 movl r24 = @tprel(foo#)'
13983 tls_first_major=2
13984 tls_first_minor=13
2f3321ca 13985 tls_as_opt=--fatal-warnings
7b6e506e 13986 ;;
69229b81
DJ
13987 mips*-*-*)
13988 conftest_s='
13989 .section .tdata,"awT",@progbits
13990x:
13991 .word 2
13992 .text
13993 addiu $4, $28, %tlsgd(x)
13994 addiu $4, $28, %tlsldm(x)
13995 lui $4, %dtprel_hi(x)
13996 addiu $4, $4, %dtprel_lo(x)
13997 lw $4, %gottprel(x)($28)
13998 lui $4, %tprel_hi(x)
13999 addiu $4, $4, %tprel_lo(x)'
14000 tls_first_major=2
14001 tls_first_minor=16
14002 tls_as_opt='-32 --fatal-warnings'
14003 ;;
c4501e62
JJ
14004 powerpc-*-*)
14005 conftest_s='
14006 .section ".tdata","awT",@progbits
14007 .align 2
14008ld0: .space 4
14009ld1: .space 4
14010x1: .space 4
14011x2: .space 4
14012x3: .space 4
14013 .text
14014 addi 3,31,ld0@got@tlsgd
14015 bl __tls_get_addr
14016 addi 3,31,x1@got@tlsld
14017 bl __tls_get_addr
14018 addi 9,3,x1@dtprel
14019 addis 9,3,x2@dtprel@ha
14020 addi 9,9,x2@dtprel@l
14021 lwz 9,x3@got@tprel(31)
14022 add 9,9,x@tls
14023 addi 9,2,x1@tprel
14024 addis 9,2,x2@tprel@ha
14025 addi 9,9,x2@tprel@l'
14026 tls_first_major=2
14027 tls_first_minor=14
2f3321ca 14028 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
14029 ;;
14030 powerpc64-*-*)
14031 conftest_s='
14032 .section ".tdata","awT",@progbits
14033 .align 3
14034ld0: .space 8
14035ld1: .space 8
14036x1: .space 8
14037x2: .space 8
14038x3: .space 8
14039 .text
14040 addi 3,2,ld0@got@tlsgd
14041 bl .__tls_get_addr
14042 nop
14043 addi 3,2,ld1@toc
14044 bl .__tls_get_addr
14045 nop
14046 addi 3,2,x1@got@tlsld
14047 bl .__tls_get_addr
14048 nop
14049 addi 9,3,x1@dtprel
14050 bl .__tls_get_addr
14051 nop
14052 addis 9,3,x2@dtprel@ha
14053 addi 9,9,x2@dtprel@l
14054 bl .__tls_get_addr
14055 nop
14056 ld 9,x3@got@dtprel(2)
14057 add 9,9,3
14058 bl .__tls_get_addr
14059 nop'
14060 tls_first_major=2
14061 tls_first_minor=14
2f3321ca 14062 tls_as_opt="-a64 --fatal-warnings"
c4501e62 14063 ;;
fd3cd001
UW
14064 s390-*-*)
14065 conftest_s='
14066 .section ".tdata","awT",@progbits
14067foo: .long 25
14068 .text
14069 .long foo@TLSGD
14070 .long foo@TLSLDM
14071 .long foo@DTPOFF
14072 .long foo@NTPOFF
14073 .long foo@GOTNTPOFF
14074 .long foo@INDNTPOFF
14075 l %r1,foo@GOTNTPOFF(%r12)
14076 l %r1,0(%r1):tls_load:foo
14077 bas %r14,0(%r1,%r13):tls_gdcall:foo
14078 bas %r14,0(%r1,%r13):tls_ldcall:foo'
14079 tls_first_major=2
14080 tls_first_minor=14
2f3321ca 14081 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
14082 ;;
14083 s390x-*-*)
14084 conftest_s='
14085 .section ".tdata","awT",@progbits
14086foo: .long 25
14087 .text
14088 .quad foo@TLSGD
14089 .quad foo@TLSLDM
14090 .quad foo@DTPOFF
14091 .quad foo@NTPOFF
14092 .quad foo@GOTNTPOFF
14093 lg %r1,foo@GOTNTPOFF(%r12)
14094 larl %r1,foo@INDNTPOFF
14095 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
14096 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
14097 tls_first_major=2
14098 tls_first_minor=14
2f3321ca 14099 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 14100 ;;
9ff13962
KK
14101 sh-*-* | sh[34]-*-*)
14102 conftest_s='
14103 .section ".tdata","awT",@progbits
14104foo: .long 25
14105 .text
14106 .long foo@TLSGD
14107 .long foo@TLSLDM
14108 .long foo@DTPOFF
14109 .long foo@GOTTPOFF
14110 .long foo@TPOFF'
14111 tls_first_major=2
14112 tls_first_minor=13
2f3321ca 14113 tls_as_opt=--fatal-warnings
9ff13962 14114 ;;
5751a10b 14115 sparc*-*-*)
2f3321ca
EB
14116 case "$target" in
14117 sparc*-sun-solaris2.*)
14118 on_solaris=yes
14119 ;;
14120 *)
14121 on_solaris=no
14122 ;;
14123 esac
14124 if test x$on_solaris = xyes && test x$gas_flag = xno; then
14125 conftest_s='
14126 .section ".tdata",#alloc,#write,#tls
14127foo: .long 25
14128 .text
14129 sethi %tgd_hi22(foo), %o0
14130 add %o0, %tgd_lo10(foo), %o1
14131 add %l7, %o1, %o0, %tgd_add(foo)
14132 call __tls_get_addr, %tgd_call(foo)
14133 sethi %tldm_hi22(foo), %l1
14134 add %l1, %tldm_lo10(foo), %l2
14135 add %l7, %l2, %o0, %tldm_add(foo)
14136 call __tls_get_addr, %tldm_call(foo)
14137 sethi %tldo_hix22(foo), %l3
14138 xor %l3, %tldo_lox10(foo), %l4
14139 add %o0, %l4, %l5, %tldo_add(foo)
14140 sethi %tie_hi22(foo), %o3
14141 add %o3, %tie_lo10(foo), %o3
14142 ld [%l7 + %o3], %o2, %tie_ld(foo)
14143 add %g7, %o2, %o4, %tie_add(foo)
14144 sethi %tle_hix22(foo), %l1
14145 xor %l1, %tle_lox10(foo), %o5
14146 ld [%g7 + %o5], %o1'
14147 tls_first_major=0
14148 tls_first_minor=0
14149 else
14150 conftest_s='
5751a10b
JJ
14151 .section ".tdata","awT",@progbits
14152foo: .long 25
14153 .text
14154 sethi %tgd_hi22(foo), %o0
14155 add %o0, %tgd_lo10(foo), %o1
14156 add %l7, %o1, %o0, %tgd_add(foo)
14157 call __tls_get_addr, %tgd_call(foo)
14158 sethi %tldm_hi22(foo), %l1
14159 add %l1, %tldm_lo10(foo), %l2
14160 add %l7, %l2, %o0, %tldm_add(foo)
14161 call __tls_get_addr, %tldm_call(foo)
14162 sethi %tldo_hix22(foo), %l3
14163 xor %l3, %tldo_lox10(foo), %l4
14164 add %o0, %l4, %l5, %tldo_add(foo)
14165 sethi %tie_hi22(foo), %o3
14166 add %o3, %tie_lo10(foo), %o3
14167 ld [%l7 + %o3], %o2, %tie_ld(foo)
14168 add %g7, %o2, %o4, %tie_add(foo)
14169 sethi %tle_hix22(foo), %l1
14170 xor %l1, %tle_lox10(foo), %o5
14171 ld [%g7 + %o5], %o1'
14172 tls_first_major=2
14173 tls_first_minor=14
2f3321ca
EB
14174 tls_as_opt="-32 --fatal-warnings"
14175 fi
5751a10b 14176 ;;
f996902d 14177esac
8dea1cca
DD
14178set_have_as_tls=no
14179if test "x$enable_tls" = xno ; then
14180 : # TLS explicitly disabled.
14181elif test "x$enable_tls" = xyes ; then
14182 set_have_as_tls=yes # TLS explicitly enabled.
14183elif test -z "$tls_first_major"; then
8ada417f
ZW
14184 : # If we don't have a check, assume no support.
14185else
ba479fd2
NN
14186 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
14187echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
14188if test "${gcc_cv_as_tls+set}" = set; then
14189 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14190else
14191 gcc_cv_as_tls=no
14192 if test $in_tree_gas = yes; then
14193 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
14194 then gcc_cv_as_tls=yes
ad9c4d9f 14195fi
8ada417f 14196 elif test x$gcc_cv_as != x; then
6e3f3080 14197 echo "$conftest_s" > conftest.s
2f3321ca 14198 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
14199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14200 (eval $ac_try) 2>&5
14201 ac_status=$?
14202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14203 (exit $ac_status); }; }
8ada417f
ZW
14204 then
14205 gcc_cv_as_tls=yes
14206 else
14207 echo "configure: failed program was" >&5
14208 cat conftest.s >&5
14209 fi
14210 rm -f conftest.o conftest.s
f996902d 14211 fi
f996902d 14212fi
ba479fd2
NN
14213echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
14214echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 14215if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
14216 set_have_as_tls=yes
14217fi
14218fi
14219if test $set_have_as_tls = yes ; then
ba479fd2
NN
14220
14221cat >>confdefs.h <<\_ACEOF
f996902d 14222#define HAVE_AS_TLS 1
ba479fd2 14223_ACEOF
f996902d 14224
8ada417f
ZW
14225fi
14226
14227# Target-specific assembler checks.
f996902d 14228
7e9d8517
L
14229echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
14230echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
14231gcc_cv_ld_static_dynamic=no
14232if test $in_tree_ld = yes ; then
14233 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
14234 gcc_cv_ld_static_dynamic=yes
14235 fi
14236elif test x$gcc_cv_ld != x; then
14237 # Check if linker supports -Bstatic/-Bdynamic option
14238 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
14239 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
14240 gcc_cv_ld_static_dynamic=yes
14241 fi
14242fi
14243if test x"$gcc_cv_ld_static_dynamic" = xyes; then
14244
14245cat >>confdefs.h <<\_ACEOF
14246#define HAVE_LD_STATIC_DYNAMIC 1
14247_ACEOF
14248
14249fi
14250echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14251echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
14252
d594623a
L
14253if test x"$demangler_in_ld" = xyes; then
14254 echo "$as_me:$LINENO: checking linker --demangle support" >&5
14255echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
14256 gcc_cv_ld_demangle=no
14257 if test $in_tree_ld = yes; then
14258 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 \
14259 gcc_cv_ld_demangle=yes
14260 fi
14261 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14262 # Check if the GNU linker supports --demangle option
14263 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14264 gcc_cv_ld_demangle=yes
14265 fi
14266 fi
14267 if test x"$gcc_cv_ld_demangle" = xyes; then
14268
14269cat >>confdefs.h <<\_ACEOF
14270#define HAVE_LD_DEMANGLE 1
14271_ACEOF
14272
14273 fi
14274 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14275echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
14276fi
14277
3a37b08e
RH
14278case "$target" in
14279 # All TARGET_ABI_OSF targets.
14280 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
14281 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14282echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14283if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14284 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 14285else
8ada417f
ZW
14286 gcc_cv_as_alpha_explicit_relocs=no
14287 if test $in_tree_gas = yes; then
14288 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14289 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 14290fi
8ada417f 14291 elif test x$gcc_cv_as != x; then
6e3f3080 14292 echo ' .set nomacro
3a37b08e
RH
14293 .text
14294 extbl $3, $2, $3 !lituse_bytoff!1
14295 ldq $2, a($29) !literal!1
14296 ldq $4, b($29) !literal!2
14297 ldq_u $3, 0($2) !lituse_base!1
14298 ldq $27, f($29) !literal!5
14299 jsr $26, ($27), f !lituse_jsr!5
14300 ldah $29, 0($26) !gpdisp!3
14301 lda $0, c($29) !gprel
14302 ldah $1, d($29) !gprelhigh
14303 lda $1, d($1) !gprellow
8ada417f 14304 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
14305 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14307 (eval $ac_try) 2>&5
14308 ac_status=$?
14309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14310 (exit $ac_status); }; }
8ada417f
ZW
14311 then
14312 gcc_cv_as_alpha_explicit_relocs=yes
14313 else
14314 echo "configure: failed program was" >&5
14315 cat conftest.s >&5
14316 fi
14317 rm -f conftest.o conftest.s
14318 fi
cafe096b 14319fi
ba479fd2
NN
14320echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14321echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 14322if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
14323
14324cat >>confdefs.h <<\_ACEOF
3a37b08e 14325#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 14326_ACEOF
3a37b08e 14327
d006f5eb
RH
14328fi
14329 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
14330echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
14331if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
14332 echo $ECHO_N "(cached) $ECHO_C" >&6
14333else
14334 gcc_cv_as_alpha_jsrdirect_relocs=no
14335 if test $in_tree_gas = yes; then
14336 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
14337 then gcc_cv_as_alpha_jsrdirect_relocs=yes
14338fi
14339 elif test x$gcc_cv_as != x; then
14340 echo ' .set nomacro
14341 .text
14342 ldq $27, a($29) !literal!1
14343 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
14344 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14346 (eval $ac_try) 2>&5
14347 ac_status=$?
14348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14349 (exit $ac_status); }; }
14350 then
14351 gcc_cv_as_alpha_jsrdirect_relocs=yes
14352 else
14353 echo "configure: failed program was" >&5
14354 cat conftest.s >&5
14355 fi
14356 rm -f conftest.o conftest.s
14357 fi
14358fi
14359echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
14360echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
14361if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
14362
14363cat >>confdefs.h <<\_ACEOF
14364#define HAVE_AS_JSRDIRECT_RELOCS 1
14365_ACEOF
14366
86da66b5
HPN
14367fi
14368 ;;
14369
14370 cris-*-*)
14371 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14372echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
14373if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14374 echo $ECHO_N "(cached) $ECHO_C" >&6
14375else
14376 gcc_cv_as_cris_no_mul_bug=no
14377 if test $in_tree_gas = yes; then
14378 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14379 then gcc_cv_as_cris_no_mul_bug=yes
14380fi
14381 elif test x$gcc_cv_as != x; then
14382 echo '.text' > conftest.s
14383 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14385 (eval $ac_try) 2>&5
14386 ac_status=$?
14387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14388 (exit $ac_status); }; }
14389 then
14390 gcc_cv_as_cris_no_mul_bug=yes
14391 else
14392 echo "configure: failed program was" >&5
14393 cat conftest.s >&5
14394 fi
14395 rm -f conftest.o conftest.s
14396 fi
14397fi
14398echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14399echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
14400if test $gcc_cv_as_cris_no_mul_bug = yes; then
14401
14402cat >>confdefs.h <<\_ACEOF
14403#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14404_ACEOF
14405
8ada417f 14406fi
3a37b08e 14407 ;;
8ada417f 14408
1cb36a98 14409 sparc*-*-*)
ba479fd2
NN
14410 echo "$as_me:$LINENO: checking assembler for .register" >&5
14411echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
14412if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14413 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14414else
8ada417f
ZW
14415 gcc_cv_as_sparc_register_op=no
14416 if test x$gcc_cv_as != x; then
6e3f3080 14417 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
14418 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14420 (eval $ac_try) 2>&5
14421 ac_status=$?
14422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14423 (exit $ac_status); }; }
8ada417f
ZW
14424 then
14425 gcc_cv_as_sparc_register_op=yes
14426 else
14427 echo "configure: failed program was" >&5
14428 cat conftest.s >&5
14429 fi
14430 rm -f conftest.o conftest.s
14431 fi
cafe096b 14432fi
ba479fd2
NN
14433echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
14434echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 14435if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
14436
14437cat >>confdefs.h <<\_ACEOF
1cb36a98 14438#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 14439_ACEOF
1cb36a98 14440
8ada417f 14441fi
1cb36a98 14442
ba479fd2
NN
14443 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
14444echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
14445if test "${gcc_cv_as_sparc_relax+set}" = set; then
14446 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 14447else
8ada417f
ZW
14448 gcc_cv_as_sparc_relax=no
14449 if test x$gcc_cv_as != x; then
6e3f3080 14450 echo '.text' > conftest.s
ba479fd2
NN
14451 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
14452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14453 (eval $ac_try) 2>&5
14454 ac_status=$?
14455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14456 (exit $ac_status); }; }
8ada417f
ZW
14457 then
14458 gcc_cv_as_sparc_relax=yes
14459 else
14460 echo "configure: failed program was" >&5
14461 cat conftest.s >&5
14462 fi
14463 rm -f conftest.o conftest.s
14464 fi
cafe096b 14465fi
ba479fd2
NN
14466echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
14467echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 14468if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
14469
14470cat >>confdefs.h <<\_ACEOF
e95b1e6a 14471#define HAVE_AS_RELAX_OPTION 1
ba479fd2 14472_ACEOF
e95b1e6a 14473
8ada417f 14474fi
e95b1e6a 14475
ba479fd2
NN
14476 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
14477echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
14478if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
14479 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 14480else
8ada417f
ZW
14481 gcc_cv_as_sparc_ua_pcrel=no
14482 if test x$gcc_cv_as != x; then
6e3f3080 14483 echo '.text
8ada417f
ZW
14484foo:
14485 nop
14486.data
14487.align 4
14488.byte 0
14489.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
14490 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14492 (eval $ac_try) 2>&5
14493 ac_status=$?
14494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14495 (exit $ac_status); }; }
8ada417f
ZW
14496 then
14497 if test x$gcc_cv_ld != x \
14498 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
14499 gcc_cv_as_sparc_ua_pcrel=yes
14500 fi
14501 rm -f conftest
14502 else
14503 echo "configure: failed program was" >&5
14504 cat conftest.s >&5
14505 fi
14506 rm -f conftest.o conftest.s
14507 fi
cafe096b 14508fi
ba479fd2
NN
14509echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
14510echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 14511if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
14512
14513cat >>confdefs.h <<\_ACEOF
17e9e88c 14514#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 14515_ACEOF
17e9e88c 14516
17e9e88c 14517
ba479fd2
NN
14518 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
14519echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
14520if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
14521 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 14522else
8ada417f
ZW
14523 gcc_cv_as_sparc_ua_pcrel_hidden=no
14524 if test x$gcc_cv_as != x; then
6e3f3080 14525 echo '.data
8ada417f
ZW
14526.align 4
14527.byte 0x31
14528.uaword %r_disp32(foo)
14529.byte 0x32, 0x33, 0x34
14530.global foo
14531.hidden foo
14532foo:
14533.skip 4' > conftest.s
ba479fd2
NN
14534 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14536 (eval $ac_try) 2>&5
14537 ac_status=$?
14538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14539 (exit $ac_status); }; }
8ada417f
ZW
14540 then
14541 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
14542 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
14543 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
14544 | grep ' 31000000 07323334' > /dev/null 2>&1; then
14545 if $gcc_cv_objdump -R conftest 2> /dev/null \
14546 | grep 'DISP32' > /dev/null 2>&1; then
14547 :
14548 else
14549 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 14550 fi
8ada417f
ZW
14551 fi
14552 rm -f conftest
14553 else
14554 echo "configure: failed program was" >&5
14555 cat conftest.s >&5
14556 fi
14557 rm -f conftest.o conftest.s
14558 fi
cafe096b 14559fi
ba479fd2
NN
14560echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
14561echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 14562if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
14563
14564cat >>confdefs.h <<\_ACEOF
cf7b8b0d 14565#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 14566_ACEOF
cf7b8b0d 14567
8ada417f 14568fi
ba479fd2 14569
8ada417f 14570fi # unaligned pcrel relocs
cf7b8b0d 14571
ba479fd2
NN
14572 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
14573echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
14574if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
14575 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14576else
8ada417f
ZW
14577 gcc_cv_as_sparc_offsetable_lo10=no
14578 if test x$gcc_cv_as != x; then
6e3f3080 14579 echo '.text
8ada417f
ZW
14580 or %g1, %lo(ab) + 12, %g1
14581 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
14582 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
14583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14584 (eval $ac_try) 2>&5
14585 ac_status=$?
14586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14587 (exit $ac_status); }; }
8ada417f
ZW
14588 then
14589 if test x$gcc_cv_objdump != x \
ecb0ccbc 14590 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 14591 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 14592 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
14593 fi
14594 else
14595 echo "configure: failed program was" >&5
14596 cat conftest.s >&5
14597 fi
14598 rm -f conftest.o conftest.s
14599 fi
cafe096b 14600fi
ba479fd2
NN
14601echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
14602echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 14603if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
14604
14605cat >>confdefs.h <<\_ACEOF
1cb36a98 14606#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 14607_ACEOF
1cb36a98 14608
8ada417f 14609fi
1cb36a98
RH
14610 ;;
14611
c307e6dd 14612 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
14613 case $target_os in
14614 cygwin* | pe | mingw32*)
14615 # Used for DWARF 2 in PE
14616 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
14617echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
14618if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
14619 echo $ECHO_N "(cached) $ECHO_C" >&6
14620else
14621 gcc_cv_as_ix86_pe_secrel32=no
14622 if test $in_tree_gas = yes; then
14623 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14624 then gcc_cv_as_ix86_pe_secrel32=yes
14625fi
14626 elif test x$gcc_cv_as != x; then
14627 echo '.text
14628foo: nop
14629.data
14630 .secrel32 foo' > conftest.s
14631 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14633 (eval $ac_try) 2>&5
14634 ac_status=$?
14635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14636 (exit $ac_status); }; }
14637 then
14638 if test x$gcc_cv_ld != x \
14639 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
14640 gcc_cv_as_ix86_pe_secrel32=yes
14641 fi
14642 rm -f conftest
14643 else
14644 echo "configure: failed program was" >&5
14645 cat conftest.s >&5
14646 fi
14647 rm -f conftest.o conftest.s
14648 fi
14649fi
14650echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
14651echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
14652if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
14653
14654cat >>confdefs.h <<\_ACEOF
14655#define HAVE_GAS_PE_SECREL32_RELOC 1
14656_ACEOF
14657
14658fi
14659 ;;
14660 esac
14661
ba479fd2
NN
14662 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
14663echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
14664if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
14665 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14666else
14667 gcc_cv_as_ix86_filds_fists=no
14668 if test $in_tree_gas = yes; then
14669 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
14670 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 14671fi
8ada417f 14672 elif test x$gcc_cv_as != x; then
6e3f3080 14673 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
14674 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14676 (eval $ac_try) 2>&5
14677 ac_status=$?
14678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14679 (exit $ac_status); }; }
8ada417f
ZW
14680 then
14681 gcc_cv_as_ix86_filds_fists=yes
14682 else
14683 echo "configure: failed program was" >&5
14684 cat conftest.s >&5
981d4858 14685 fi
8ada417f
ZW
14686 rm -f conftest.o conftest.s
14687 fi
14688fi
ba479fd2
NN
14689echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
14690echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 14691if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
14692
14693cat >>confdefs.h <<\_ACEOF
8ada417f 14694#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 14695_ACEOF
ad9c4d9f 14696
f6f5dff2
RO
14697fi
14698
ba479fd2
NN
14699 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
14700echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
14701if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
14702 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
14703else
14704 gcc_cv_as_ix86_cmov_sun_syntax=no
14705 if test x$gcc_cv_as != x; then
6e3f3080 14706 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
14707 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14709 (eval $ac_try) 2>&5
14710 ac_status=$?
14711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14712 (exit $ac_status); }; }
f6f5dff2
RO
14713 then
14714 gcc_cv_as_ix86_cmov_sun_syntax=yes
14715 else
14716 echo "configure: failed program was" >&5
14717 cat conftest.s >&5
14718 fi
14719 rm -f conftest.o conftest.s
14720 fi
14721fi
ba479fd2
NN
14722echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
14723echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 14724if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
14725
14726cat >>confdefs.h <<\_ACEOF
f6f5dff2 14727#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 14728_ACEOF
f6f5dff2 14729
ad9c4d9f
NN
14730fi
14731
6f3ca281
ZW
14732 # This one is used unconditionally by i386.[ch]; it is to be defined
14733 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
14734 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
14735echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
14736if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
14737 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14738else
14739 gcc_cv_as_ix86_gotoff_in_data=no
14740 if test $in_tree_gas = yes; then
14741 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14742 then gcc_cv_as_ix86_gotoff_in_data=yes
14743fi
14744 elif test x$gcc_cv_as != x; then
6e3f3080 14745 echo ' .text
f88c65f7
RH
14746.L0:
14747 nop
14748 .data
8ada417f 14749 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
14750 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14752 (eval $ac_try) 2>&5
14753 ac_status=$?
14754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14755 (exit $ac_status); }; }
8ada417f
ZW
14756 then
14757 gcc_cv_as_ix86_gotoff_in_data=yes
14758 else
14759 echo "configure: failed program was" >&5
14760 cat conftest.s >&5
f88c65f7 14761 fi
8ada417f
ZW
14762 rm -f conftest.o conftest.s
14763 fi
14764fi
ba479fd2
NN
14765echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
14766echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 14767
6f3ca281 14768
ba479fd2 14769cat >>confdefs.h <<_ACEOF
6f3ca281 14770#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 14771_ACEOF
f88c65f7 14772
1cb36a98 14773 ;;
ef1ecf87
RH
14774
14775 ia64*-*-*)
ba479fd2
NN
14776 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
14777echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
14778if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
14779 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 14780else
8ada417f
ZW
14781 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
14782 if test $in_tree_gas = yes; then
14783 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14784 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 14785fi
8ada417f 14786 elif test x$gcc_cv_as != x; then
6e3f3080 14787 echo ' .text
ef1ecf87
RH
14788 addl r15 = @ltoffx(x#), gp
14789 ;;
cfa9ee99 14790 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
14791 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14793 (eval $ac_try) 2>&5
14794 ac_status=$?
14795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14796 (exit $ac_status); }; }
8ada417f 14797 then
cfa9ee99 14798 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
14799 else
14800 echo "configure: failed program was" >&5
14801 cat conftest.s >&5
2c4a9cff 14802 fi
8ada417f
ZW
14803 rm -f conftest.o conftest.s
14804 fi
14805fi
ba479fd2
NN
14806echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
14807echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 14808if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
14809
14810cat >>confdefs.h <<\_ACEOF
cfa9ee99 14811#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 14812_ACEOF
8ada417f 14813
cfa9ee99 14814fi
8ada417f 14815
2c4a9cff 14816 ;;
8ada417f 14817
2c4a9cff 14818 powerpc*-*-*)
8ada417f 14819 case $target in
432218ba
DE
14820 *-*-aix*) conftest_s=' .machine "pwr5"
14821 .csect .text[PR]
6b37db3c 14822 mfcr 3,128';;
8af4d362
PB
14823 *-*-darwin*)
14824 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
14825echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
14826if test "${gcc_cv_as_machine_directive+set}" = set; then
14827 echo $ECHO_N "(cached) $ECHO_C" >&6
14828else
14829 gcc_cv_as_machine_directive=no
14830 if test x$gcc_cv_as != x; then
14831 echo ' .machine ppc7400' > conftest.s
14832 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14834 (eval $ac_try) 2>&5
14835 ac_status=$?
14836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14837 (exit $ac_status); }; }
14838 then
14839 gcc_cv_as_machine_directive=yes
14840 else
14841 echo "configure: failed program was" >&5
14842 cat conftest.s >&5
14843 fi
14844 rm -f conftest.o conftest.s
14845 fi
14846fi
14847echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
14848echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
14849
14850 if test x$gcc_cv_as_machine_directive != xyes; then
14851 echo "*** This target requires an assembler supporting \".machine\"" >&2
14852 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
14853 test x$build = x$target && exit 1
14854 fi
14855 conftest_s=' .text
6b37db3c 14856 mfcr r3,128';;
4c67db14 14857 *) conftest_s=' .machine power4
d2ab3e37 14858 .text
6b37db3c 14859 mfcr 3,128';;
8ada417f 14860 esac
8ada417f 14861
ba479fd2
NN
14862 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
14863echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
14864if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
14865 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 14866else
8ada417f
ZW
14867 gcc_cv_as_powerpc_mfcrf=no
14868 if test $in_tree_gas = yes; then
14869 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14870 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 14871fi
8ada417f 14872 elif test x$gcc_cv_as != x; then
6e3f3080 14873 echo "$conftest_s" > conftest.s
ba479fd2
NN
14874 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14876 (eval $ac_try) 2>&5
14877 ac_status=$?
14878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14879 (exit $ac_status); }; }
8ada417f
ZW
14880 then
14881 gcc_cv_as_powerpc_mfcrf=yes
14882 else
14883 echo "configure: failed program was" >&5
14884 cat conftest.s >&5
14885 fi
14886 rm -f conftest.o conftest.s
14887 fi
2c4a9cff 14888fi
ba479fd2
NN
14889echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
14890echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 14891if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
14892
14893cat >>confdefs.h <<\_ACEOF
2c4a9cff 14894#define HAVE_AS_MFCRF 1
ba479fd2 14895_ACEOF
ef1ecf87 14896
8ada417f 14897fi
432218ba
DE
14898
14899 case $target in
14900 *-*-aix*) conftest_s=' .machine "pwr5"
14901 .csect .text[PR]
14902 popcntb 3,3';;
14903 *) conftest_s=' .machine power5
14904 .text
14905 popcntb 3,3';;
14906 esac
14907
14908 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
14909echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
14910if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
14911 echo $ECHO_N "(cached) $ECHO_C" >&6
14912else
14913 gcc_cv_as_powerpc_popcntb=no
14914 if test $in_tree_gas = yes; then
14915 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
14916 then gcc_cv_as_powerpc_popcntb=yes
14917fi
14918 elif test x$gcc_cv_as != x; then
14919 echo "$conftest_s" > conftest.s
14920 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14922 (eval $ac_try) 2>&5
14923 ac_status=$?
14924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14925 (exit $ac_status); }; }
14926 then
14927 gcc_cv_as_powerpc_popcntb=yes
14928 else
14929 echo "configure: failed program was" >&5
14930 cat conftest.s >&5
14931 fi
14932 rm -f conftest.o conftest.s
14933 fi
14934fi
14935echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
14936echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
14937if test $gcc_cv_as_powerpc_popcntb = yes; then
14938
14939cat >>confdefs.h <<\_ACEOF
14940#define HAVE_AS_POPCNTB 1
14941_ACEOF
14942
9719f3b7
DE
14943fi
14944
14945 case $target in
14946 *-*-aix*) conftest_s=' .machine "pwr5x"
14947 .csect .text[PR]
14948 frin 1,1';;
1e04bfdc 14949 *) conftest_s=' .machine power5
9719f3b7
DE
14950 .text
14951 frin 1,1';;
14952 esac
14953
14954 echo "$as_me:$LINENO: checking assembler for fp round support" >&5
14955echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
14956if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
14957 echo $ECHO_N "(cached) $ECHO_C" >&6
14958else
14959 gcc_cv_as_powerpc_fprnd=no
14960 if test $in_tree_gas = yes; then
14961 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
14962 then gcc_cv_as_powerpc_fprnd=yes
14963fi
14964 elif test x$gcc_cv_as != x; then
14965 echo "$conftest_s" > conftest.s
14966 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14968 (eval $ac_try) 2>&5
14969 ac_status=$?
14970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14971 (exit $ac_status); }; }
14972 then
14973 gcc_cv_as_powerpc_fprnd=yes
14974 else
14975 echo "configure: failed program was" >&5
14976 cat conftest.s >&5
14977 fi
14978 rm -f conftest.o conftest.s
14979 fi
14980fi
14981echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
14982echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
14983if test $gcc_cv_as_powerpc_fprnd = yes; then
14984
14985cat >>confdefs.h <<\_ACEOF
14986#define HAVE_AS_FPRND 1
14987_ACEOF
14988
432218ba
DE
14989fi
14990
7f970b70
AM
14991 case $target in
14992 *-*-aix*) conftest_s=' .csect .text[PR]
14993LCF..0:
14994 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
14995 *-*-darwin*)
14996 conftest_s=' .text
14997LCF0:
14998 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
14999 *) conftest_s=' .text
15000.LCF0:
15001 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
15002 esac
15003
15004 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
15005echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
15006if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
15007 echo $ECHO_N "(cached) $ECHO_C" >&6
15008else
15009 gcc_cv_as_powerpc_rel16=no
15010 if test $in_tree_gas = yes; then
15011 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15012 then gcc_cv_as_powerpc_rel16=yes
15013fi
15014 elif test x$gcc_cv_as != x; then
15015 echo "$conftest_s" > conftest.s
15016 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15018 (eval $ac_try) 2>&5
15019 ac_status=$?
15020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15021 (exit $ac_status); }; }
15022 then
15023 gcc_cv_as_powerpc_rel16=yes
15024 else
15025 echo "configure: failed program was" >&5
15026 cat conftest.s >&5
15027 fi
15028 rm -f conftest.o conftest.s
15029 fi
15030fi
15031echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
15032echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
15033if test $gcc_cv_as_powerpc_rel16 = yes; then
15034
15035cat >>confdefs.h <<\_ACEOF
15036#define HAVE_AS_REL16 1
15037_ACEOF
15038
15039fi
8ada417f
ZW
15040 ;;
15041
15042 mips*-*-*)
ba479fd2
NN
15043 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
15044echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
15045if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
15046 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15047else
15048 gcc_cv_as_mips_explicit_relocs=no
15049 if test $in_tree_gas = yes; then
15050 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15051 then gcc_cv_as_mips_explicit_relocs=yes
15052fi
15053 elif test x$gcc_cv_as != x; then
6e3f3080 15054 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
15055 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15057 (eval $ac_try) 2>&5
15058 ac_status=$?
15059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15060 (exit $ac_status); }; }
8ada417f
ZW
15061 then
15062 gcc_cv_as_mips_explicit_relocs=yes
15063 else
15064 echo "configure: failed program was" >&5
15065 cat conftest.s >&5
ef1ecf87 15066 fi
8ada417f
ZW
15067 rm -f conftest.o conftest.s
15068 fi
15069fi
ba479fd2
NN
15070echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
15071echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
15072if test $gcc_cv_as_mips_explicit_relocs = yes; then
15073 if test x$target_cpu_default = x
15074 then target_cpu_default=MASK_EXPLICIT_RELOCS
15075 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
15076 fi
15077fi
dbad5e72
SE
15078 ;;
15079esac
8ada417f 15080
dbad5e72
SE
15081# Mips and HP-UX need the GNU assembler.
15082# Linux on IA64 might be able to use the Intel assembler.
15083
15084case "$target" in
15085 mips*-*-* | *-*-hpux* )
82563d35
RS
15086 if test x$gas_flag = xyes \
15087 || test x"$host" != x"$build" \
15088 || test ! -x "$gcc_cv_as" \
15089 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
15090 :
15091 else
15092 echo "*** This configuration requires the GNU assembler" >&2
15093 exit 1
15094 fi
ef1ecf87 15095 ;;
1cb36a98 15096esac
dbad5e72 15097
9d147085
RH
15098# ??? Not all targets support dwarf2 debug_line, even within a version
15099# of gas. Moreover, we need to emit a valid instruction to trigger any
15100# info to the output file. So, as supported targets are added to gas 2.11,
15101# add some instruction here to (also) show we expect this might work.
15102# ??? Once 2.11 is released, probably need to add first known working
15103# version to the per-target configury.
15104case "$target" in
80486e06 15105 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 15106 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
6afdc741 15107 | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-*)
9d147085
RH
15108 insn="nop"
15109 ;;
57116d8d 15110 ia64*-*-* | s390*-*-*)
9d147085
RH
15111 insn="nop 0"
15112 ;;
2853bc5a
HPN
15113 mmix-*-*)
15114 insn="swym 0"
15115 ;;
8ada417f
ZW
15116esac
15117if test x"$insn" != x; then
15118 conftest_s="\
15119 .file 1 \"conftest.s\"
15120 .loc 1 3 0
15121 $insn"
ba479fd2
NN
15122 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
15123echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
15124if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
15125 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15126else
15127 gcc_cv_as_dwarf2_debug_line=no
15128 if test $in_tree_gas = yes; then
15129 if test $in_tree_gas_is_elf = yes \
15130 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15131 then gcc_cv_as_dwarf2_debug_line=yes
15132fi
15133 elif test x$gcc_cv_as != x; then
6e3f3080 15134 echo "$conftest_s" > conftest.s
ba479fd2
NN
15135 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15137 (eval $ac_try) 2>&5
15138 ac_status=$?
15139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15140 (exit $ac_status); }; }
8ada417f 15141 then
080a5bb0
EB
15142 if test x$gcc_cv_objdump != x \
15143 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
15144 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
15145 gcc_cv_as_dwarf2_debug_line=yes
15146 fi
15147 else
15148 echo "configure: failed program was" >&5
15149 cat conftest.s >&5
15150 fi
15151 rm -f conftest.o conftest.s
15152 fi
15153fi
ba479fd2
NN
15154echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
15155echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 15156
ad9c4d9f 15157
8ada417f
ZW
15158# The .debug_line file table must be in the exact order that
15159# we specified the files, since these indices are also used
15160# by DW_AT_decl_file. Approximate this test by testing if
15161# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
15162 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
15163echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
15164if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
15165 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15166else
15167 gcc_cv_as_dwarf2_file_buggy=no
15168 if test x$gcc_cv_as != x; then
6e3f3080 15169 echo ' .file 1 "foo.s"
8ada417f 15170 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
15171 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15173 (eval $ac_try) 2>&5
15174 ac_status=$?
15175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15176 (exit $ac_status); }; }
8ada417f
ZW
15177 then
15178 gcc_cv_as_dwarf2_file_buggy=yes
15179 else
15180 echo "configure: failed program was" >&5
15181 cat conftest.s >&5
15182 fi
15183 rm -f conftest.o conftest.s
15184 fi
ad9c4d9f 15185fi
ba479fd2
NN
15186echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
15187echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
15188
15189
15190 if test $gcc_cv_as_dwarf2_debug_line = yes \
15191 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
15192
15193cat >>confdefs.h <<\_ACEOF
9d147085 15194#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 15195_ACEOF
9d147085 15196
8ada417f 15197 fi
ad9c4d9f 15198
ba479fd2
NN
15199 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
15200echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
15201if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
15202 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15203else
15204 gcc_cv_as_gdwarf2_flag=no
15205 if test $in_tree_gas = yes; then
15206 if test $in_tree_gas_is_elf = yes \
15207 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15208 then gcc_cv_as_gdwarf2_flag=yes
15209fi
15210 elif test x$gcc_cv_as != x; then
6e3f3080 15211 echo "$insn" > conftest.s
ba479fd2
NN
15212 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
15213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15214 (eval $ac_try) 2>&5
15215 ac_status=$?
15216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15217 (exit $ac_status); }; }
8ada417f
ZW
15218 then
15219 gcc_cv_as_gdwarf2_flag=yes
15220 else
15221 echo "configure: failed program was" >&5
15222 cat conftest.s >&5
15223 fi
15224 rm -f conftest.o conftest.s
15225 fi
ad9c4d9f 15226fi
ba479fd2
NN
15227echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
15228echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 15229if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
15230
15231cat >>confdefs.h <<\_ACEOF
5f0e9ea2 15232#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 15233_ACEOF
5f0e9ea2
GK
15234
15235fi
ad9c4d9f 15236
ba479fd2
NN
15237 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
15238echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
15239if test "${gcc_cv_as_gstabs_flag+set}" = set; then
15240 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15241else
15242 gcc_cv_as_gstabs_flag=no
15243 if test $in_tree_gas = yes; then
15244 if test $in_tree_gas_is_elf = yes \
15245 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15246 then gcc_cv_as_gstabs_flag=yes
15247fi
15248 elif test x$gcc_cv_as != x; then
6e3f3080 15249 echo "$insn" > conftest.s
ba479fd2
NN
15250 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
15251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15252 (eval $ac_try) 2>&5
15253 ac_status=$?
15254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15255 (exit $ac_status); }; }
8ada417f
ZW
15256 then
15257 # The native Solaris 9/Intel assembler doesn't understand --gstabs
15258 # and warns about it, but still exits successfully. So check for
15259 # this.
ba479fd2
NN
15260 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
15261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15262 (eval $ac_try) 2>&5
15263 ac_status=$?
15264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15265 (exit $ac_status); }; }
8ada417f
ZW
15266 then :
15267 else gcc_cv_as_gstabs_flag=yes
15268 fi
15269 else
15270 echo "configure: failed program was" >&5
15271 cat conftest.s >&5
15272 fi
15273 rm -f conftest.o conftest.s
15274 fi
ad9c4d9f 15275fi
ba479fd2
NN
15276echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
15277echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 15278if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
15279
15280cat >>confdefs.h <<\_ACEOF
5f0e9ea2 15281#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 15282_ACEOF
5f0e9ea2
GK
15283
15284fi
8ada417f 15285fi
5f0e9ea2 15286
ba479fd2
NN
15287echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
15288echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 15289gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 15290if test $in_tree_ld = yes ; then
5408ac6c
HPN
15291 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 \
15292 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
15293 gcc_cv_ld_ro_rw_mix=read-write
15294 fi
15295elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
15296 echo '.section myfoosect, "a"' > conftest1.s
15297 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 15298 echo '.byte 1' >> conftest2.s
90e145da 15299 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 15300 echo '.byte 0' >> conftest3.s
6cd656d0
KC
15301 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
15302 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
15303 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 15304 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 15305 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 15306 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 15307 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
15308 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
15309 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
15310 gcc_cv_ld_ro_rw_mix=read-only
15311 else
15312 gcc_cv_ld_ro_rw_mix=read-write
15313 fi
15314 fi
15315 fi
15316 rm -f conftest.* conftest[123].*
15317fi
15318if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
15319
15320cat >>confdefs.h <<\_ACEOF
96d0f4dc 15321#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 15322_ACEOF
96d0f4dc
JJ
15323
15324fi
ba479fd2
NN
15325echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
15326echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 15327
ba479fd2
NN
15328echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
15329echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 15330gcc_cv_ld_eh_frame_hdr=no
34a86c2b 15331if test $in_tree_ld = yes ; then
5408ac6c
HPN
15332 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 \
15333 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
15334 gcc_cv_ld_eh_frame_hdr=yes
15335 fi
15336elif test x$gcc_cv_ld != x; then
15337 # Check if linker supports --eh-frame-hdr option
15338 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
15339 gcc_cv_ld_eh_frame_hdr=yes
15340 fi
15341fi
232b67d9 15342
275b60d6 15343if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
15344
15345cat >>confdefs.h <<\_ACEOF
275b60d6 15346#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 15347_ACEOF
275b60d6
JJ
15348
15349fi
ba479fd2
NN
15350echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
15351echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 15352
ba479fd2
NN
15353echo "$as_me:$LINENO: checking linker position independent executable support" >&5
15354echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
15355gcc_cv_ld_pie=no
15356if test $in_tree_ld = yes ; then
5408ac6c
HPN
15357 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 \
15358 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
15359 gcc_cv_ld_pie=yes
15360 fi
15361elif test x$gcc_cv_ld != x; then
15362 # Check if linker supports -pie option
15363 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
15364 gcc_cv_ld_pie=yes
15365 fi
15366fi
15367if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
15368
15369cat >>confdefs.h <<\_ACEOF
24a4dd31 15370#define HAVE_LD_PIE 1
ba479fd2 15371_ACEOF
24a4dd31
JJ
15372
15373fi
ba479fd2
NN
15374echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
15375echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 15376
8bb915b6
NN
15377# --------
15378# UNSORTED
15379# --------
15380
765f1bf9
AM
15381echo "$as_me:$LINENO: checking linker --as-needed support" >&5
15382echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
15383if test "${gcc_cv_ld_as_needed+set}" = set; then
15384 echo $ECHO_N "(cached) $ECHO_C" >&6
15385else
15386 gcc_cv_ld_as_needed=no
765f1bf9
AM
15387if test $in_tree_ld = yes ; then
15388 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 \
15389 && test $in_tree_ld_is_elf = yes; then
15390 gcc_cv_ld_as_needed=yes
15391 fi
15392elif test x$gcc_cv_ld != x; then
15393 # Check if linker supports --as-needed and --no-as-needed options
15394 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
15395 gcc_cv_ld_as_needed=yes
15396 fi
15397fi
82e923f6
RS
15398
15399fi
15400echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
15401echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
15402if test x"$gcc_cv_ld_as_needed" = xyes; then
15403
15404cat >>confdefs.h <<\_ACEOF
15405#define HAVE_LD_AS_NEEDED 1
15406_ACEOF
15407
15408fi
765f1bf9 15409
d82bf747
AM
15410case "$target:$tm_file" in
15411 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
85b776df
AM
15412 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
15413echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
15414if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
15415 echo $ECHO_N "(cached) $ECHO_C" >&6
15416else
15417 gcc_cv_ld_no_dot_syms=no
15418 if test $in_tree_ld = yes ; then
15419 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
15420 gcc_cv_ld_no_dot_syms=yes
15421 fi
15422 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
15423 cat > conftest1.s <<EOF
15424 .text
15425 bl .foo
15426EOF
15427 cat > conftest2.s <<EOF
15428 .section ".opd","aw"
15429 .align 3
15430 .globl foo
15431 .type foo,@function
15432foo:
15433 .quad .LEfoo,.TOC.@tocbase,0
15434 .text
15435.LEfoo:
15436 blr
15437 .size foo,.-.LEfoo
15438EOF
15439 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
15440 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
15441 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
15442 gcc_cv_ld_no_dot_syms=yes
15443 fi
15444 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
15445 fi
15446
15447fi
15448echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
15449echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
15450 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
15451
15452cat >>confdefs.h <<\_ACEOF
15453#define HAVE_LD_NO_DOT_SYMS 1
15454_ACEOF
15455
15456 fi
15457 ;;
15458esac
15459
380e5ca4
MM
15460echo "$as_me:$LINENO: checking linker --sysroot support" >&5
15461echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
15462if test "${gcc_cv_ld_sysroot+set}" = set; then
15463 echo $ECHO_N "(cached) $ECHO_C" >&6
15464else
15465 gcc_cv_ld_sysroot=no
15466 if test $in_tree_ld = yes ; then
15467 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 15468 gcc_cv_ld_sysroot=yes
380e5ca4
MM
15469 fi
15470 elif test x$gcc_cv_ld != x; then
15471 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
15472 gcc_cv_ld_sysroot=yes
15473 fi
15474 fi
15475fi
15476echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
15477echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
15478if test x"$gcc_cv_ld_sysroot" = xyes; then
15479
15480cat >>confdefs.h <<\_ACEOF
15481#define HAVE_LD_SYSROOT 1
15482_ACEOF
15483
15484fi
15485
9fb28a67 15486if test x$with_sysroot = x && test x$host = x$target \
047d636f 15487 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
15488
15489cat >>confdefs.h <<_ACEOF
793e9558 15490#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 15491_ACEOF
793e9558
PB
15492
15493fi
15494
77008252
JJ
15495# Test for stack protector support in target C library.
15496case "$target" in
15497 *-*-linux*)
15498 echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5
15499echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6
15500if test "${gcc_cv_libc_provides_ssp+set}" = set; then
15501 echo $ECHO_N "(cached) $ECHO_C" >&6
15502else
15503 gcc_cv_libc_provides_ssp=no
15504 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
15505 if test "x$with_sysroot" = x; then
15506 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
15507 elif test "x$with_sysroot" = xyes; then
15508 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
15509 else
15510 glibc_header_dir="${with_sysroot}/usr/include"
15511 fi
15512 else
15513 glibc_header_dir=/usr/include
15514 fi
15515 # glibc 2.4 and later provides __stack_chk_fail and
15516 # either __stack_chk_guard, or TLS access to stack guard canary.
15517 if test -f $glibc_header_dir/features.h \
15518 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
15519 $glibc_header_dir/features.h > /dev/null; then
15520 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
15521 $glibc_header_dir/features.h > /dev/null; then
15522 gcc_cv_libc_provides_ssp=yes
15523 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
15524 $glibc_header_dir/features.h > /dev/null \
15525 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
15526 $glibc_header_dir/features.h > /dev/null; then
15527 gcc_cv_libc_provides_ssp=yes
15528 fi
15529 fi
15530fi
15531echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
15532echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;;
15533 *) gcc_cv_libc_provides_ssp=no ;;
15534esac
15535if test x$gcc_cv_libc_provides_ssp = xyes; then
15536
15537cat >>confdefs.h <<\_ACEOF
15538#define TARGET_LIBC_PROVIDES_SSP 1
15539_ACEOF
15540
15541fi
15542
81bf3d9e 15543# Find out what GC implementation we want, or may, use.
ba479fd2 15544
81bf3d9e
RH
15545# Check whether --with-gc or --without-gc was given.
15546if test "${with_gc+set}" = set; then
15547 withval="$with_gc"
15548 case "$withval" in
08cee789 15549 page)
81bf3d9e 15550 GGC=ggc-$withval
08cee789
DJ
15551 ;;
15552 zone)
15553 GGC=ggc-$withval
15554
15555cat >>confdefs.h <<\_ACEOF
15556#define GGC_ZONE 1
15557_ACEOF
15558
81bf3d9e
RH
15559 ;;
15560 *)
ba479fd2
NN
15561 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
15562echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
15563 { (exit 1); exit 1; }; }
81bf3d9e
RH
15564 ;;
15565esac
15566else
005537df 15567 GGC=ggc-page
ba479fd2 15568fi;
81bf3d9e
RH
15569
15570echo "Using $GGC for garbage collection."
15571
3c809ba4 15572# Use the system's zlib library.
b8dad04b
ZW
15573zlibdir=-L../zlib
15574zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 15575
3c809ba4
AG
15576# Check whether --with-system-zlib or --without-system-zlib was given.
15577if test "${with_system_zlib+set}" = set; then
15578 withval="$with_system_zlib"
15579 zlibdir=
15580zlibinc=
15581
ba479fd2 15582fi;
3c809ba4
AG
15583
15584
15585
dc6746e7 15586
ba479fd2
NN
15587echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
15588echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
15589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
15590if test "${enable_maintainer_mode+set}" = set; then
15591 enableval="$enable_maintainer_mode"
15592 maintainer_mode=$enableval
15593else
15594 maintainer_mode=no
ba479fd2 15595fi;
63cf211a 15596
ba479fd2
NN
15597echo "$as_me:$LINENO: result: $maintainer_mode" >&5
15598echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
15599
15600if test "$maintainer_mode" = "yes"; then
15601 MAINT=''
15602else
15603 MAINT='#'
15604fi
15605
8bb915b6
NN
15606# --------------
15607# Language hooks
15608# --------------
15609
861bb6c1
JL
15610# Make empty files to contain the specs and options for each language.
15611# Then add #include lines to for a compiler that has specs and/or options.
15612
d7b42618 15613lang_opt_files=
861bb6c1 15614lang_specs_files=
3103b7db 15615lang_tree_files=
861bb6c1
JL
15616for subdir in . $subdirs
15617do
d7b42618
NB
15618 if test -f $srcdir/$subdir/lang.opt; then
15619 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
15620 fi
75bffa71 15621 if test -f $srcdir/$subdir/lang-specs.h; then
0d24f4d1 15622 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
861bb6c1 15623 fi
3103b7db 15624 if test -f $srcdir/$subdir/$subdir-tree.def; then
0d24f4d1 15625 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
3103b7db 15626 fi
861bb6c1
JL
15627done
15628
15629# These (without "all_") are set in each config-lang.in.
15630# `language' must be a single word so is spelled singularly.
15631all_languages=
15632all_boot_languages=
15633all_compilers=
15634all_stagestuff=
53c7ffe7 15635all_outputs='Makefile gccbug mklibgcc libada-mk'
861bb6c1 15636# List of language makefile fragments.
2ed26f6b
ZW
15637all_lang_makefrags=
15638# List of language subdirectory makefiles. Deprecated.
861bb6c1 15639all_lang_makefiles=
e2500fed 15640# Files for gengtype
ef69da62 15641all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
15642# Files for gengtype with language
15643all_gtfiles_files_langs=
15644all_gtfiles_files_files=
861bb6c1
JL
15645
15646# Add the language fragments.
15647# Languages are added via two mechanisms. Some information must be
15648# recorded in makefile variables, these are defined in config-lang.in.
15649# We accumulate them and plug them into the main Makefile.
15650# The other mechanism is a set of hooks for each of the main targets
15651# like `clean', `install', etc.
15652
861bb6c1 15653language_hooks="Make-hooks"
861bb6c1 15654
c406e779 15655for s in $subdirs
861bb6c1 15656do
861bb6c1
JL
15657 language=
15658 boot_language=
15659 compilers=
15660 stagestuff=
861bb6c1 15661 outputs=
e2500fed 15662 gtfiles=
861bb6c1 15663 . ${srcdir}/$s/config-lang.in
75bffa71 15664 if test "x$language" = x
861bb6c1
JL
15665 then
15666 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
15667 exit 1
15668 fi
2ed26f6b 15669 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
72aaffbd 15670 if test -f ${srcdir}/$s/Makefile.in
2ed26f6b 15671 then all_lang_makefiles="$s/Makefile"
72aaffbd 15672 fi
861bb6c1 15673 all_languages="$all_languages $language"
75bffa71 15674 if test "x$boot_language" = xyes
861bb6c1
JL
15675 then
15676 all_boot_languages="$all_boot_languages $language"
15677 fi
15678 all_compilers="$all_compilers $compilers"
15679 all_stagestuff="$all_stagestuff $stagestuff"
861bb6c1 15680 all_outputs="$all_outputs $outputs"
e2500fed 15681 all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15682 for f in $gtfiles
8ac9d31f 15683 do
8ac9d31f
TJ
15684 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
15685 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f 15686 done
861bb6c1
JL
15687done
15688
8ac9d31f
TJ
15689# Pick up gtfiles for c
15690gtfiles=
15691s="c"
15692. ${srcdir}/c-config-lang.in
15693all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15694for f in $gtfiles
8ac9d31f 15695do
8ac9d31f
TJ
15696 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
15697 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
15698done
15699
cbc59f01 15700check_languages=
c406e779 15701for language in $all_languages
cbc59f01 15702do
cbc59f01 15703 check_languages="$check_languages check-$language"
cbc59f01
DD
15704done
15705
62b81e45
MM
15706# We link each language in with a set of hooks, reached indirectly via
15707# lang.${target}.
861bb6c1
JL
15708
15709rm -f Make-hooks
15710touch Make-hooks
bd97af06
RÁE
15711target_list="all.cross start.encap rest.encap tags \
15712 install-common install-man \
a541f69d 15713 uninstall info man srcextra srcman srcinfo \
a03ad584 15714 mostlyclean clean distclean maintainer-clean \
8f231b5d 15715 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
861bb6c1
JL
15716for t in $target_list
15717do
15718 x=
c406e779 15719 for lang in $all_languages
861bb6c1 15720 do
ab87f8c8 15721 x="$x $lang.$t"
861bb6c1
JL
15722 done
15723 echo "lang.$t: $x" >> Make-hooks
15724done
15725
8bb915b6
NN
15726# --------
15727# UNSORTED
15728# --------
15729
cc06d68c 15730# Create .gdbinit.
861bb6c1 15731
cc06d68c
GP
15732echo "dir ." > .gdbinit
15733echo "dir ${srcdir}" >> .gdbinit
15734if test x$gdb_needs_out_file_path = xyes
15735then
15736 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
15737fi
15738if test "x$subdirs" != x; then
15739 for s in $subdirs
15740 do
15741 echo "dir ${srcdir}/$s" >> .gdbinit
15742 done
861bb6c1 15743fi
cc06d68c 15744echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 15745
8f8d3278
NC
15746# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
15747# absolute path for gcc_tooldir based on inserting the number of up-directory
15748# movements required to get from $(exec_prefix) to $(prefix) into the basic
15749# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
15750# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
15751# make and thus we'd get different behavior depending on where we built the
15752# sources.
5949a9fc 15753if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 15754 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 15755else
8f8d3278
NC
15756# An explanation of the sed strings:
15757# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
15758# -e 's|/$||' match a trailing forward slash and eliminates it
15759# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 15760# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
15761#
15762# (*) Note this pattern overwrites the first character of the string
15763# with a forward slash if one is not already present. This is not a
15764# problem because the exact names of the sub-directories concerned is
15765# unimportant, just the number of them matters.
15766#
15767# The practical upshot of these patterns is like this:
15768#
15769# prefix exec_prefix result
15770# ------ ----------- ------
15771# /foo /foo/bar ../
15772# /foo/ /foo/bar ../
15773# /foo /foo/bar/ ../
15774# /foo/ /foo/bar/ ../
15775# /foo /foo/bar/ugg ../../
15776#
4c112cda 15777 dollar='$$'
caa55b1e 15778 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
15779fi
15780
15781
2ce3c6c6 15782
2bbea3a6
RH
15783# Find a directory in which to install a shared libgcc.
15784
15785# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
15786if test "${enable_version_specific_runtime_libs+set}" = set; then
15787 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
15788
15789fi;
2bbea3a6
RH
15790
15791
5b15f277
RH
15792# Check whether --with-slibdir or --without-slibdir was given.
15793if test "${with_slibdir+set}" = set; then
15794 withval="$with_slibdir"
15795 slibdir="$with_slibdir"
15796else
15797 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 15798 slibdir='$(libsubdir)'
5b15f277 15799elif test "$host" != "$target"; then
2bbea3a6
RH
15800 slibdir='$(build_tooldir)/lib'
15801else
5b15f277 15802 slibdir='$(libdir)'
2bbea3a6 15803fi
ba479fd2 15804fi;
2bbea3a6
RH
15805
15806
1e6347d8 15807objdir=`${PWDCMD-pwd}`
7e717196
JL
15808
15809
861bb6c1
JL
15810# Substitute configuration variables
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
9b16d2c4 15857
e9a25f70 15858
6e26218f 15859
c8724862 15860
e061d1ce 15861
d8bb17c8 15862
11642c3a
ZW
15863
15864
15865
15866
15867
15868
15869
3d9d2476 15870
e2500fed 15871
51b9ff45 15872
861bb6c1 15873
6e3f3080
NN
15874# Echo link setup.
15875if test x${build} = x${host} ; then
15876 if test x${host} = x${target} ; then
15877 echo "Links are now set up to build a native compiler for ${target}." 1>&2
15878 else
15879 echo "Links are now set up to build a cross-compiler" 1>&2
15880 echo " from ${host} to ${target}." 1>&2
15881 fi
15882else
15883 if test x${host} = x${target} ; then
15884 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
15885 echo " for ${target}." 1>&2
15886 else
15887 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
15888 echo " from ${host} to ${target}." 1>&2
15889 fi
15890fi
15891
6de9cd9a
DN
15892
15893
15894
6e3f3080
NN
15895# Configure the subdirectories
15896# AC_CONFIG_SUBDIRS($subdirs)
15897
15898# Create the Makefile
15899# and configure language subdirectories
ba479fd2 15900 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
15901
15902
ba479fd2 15903 ac_config_commands="$ac_config_commands default"
914c5af7 15904
ba479fd2 15905cat >confcache <<\_ACEOF
6e3f3080
NN
15906# This file is a shell script that caches the results of configure
15907# tests run on this system so they can be shared between configure
ba479fd2
NN
15908# scripts and configure runs, see configure's option --config-cache.
15909# It is not useful on other systems. If it contains results you don't
15910# want to keep, you may remove or edit it.
6e3f3080 15911#
ba479fd2
NN
15912# config.status only pays attention to the cache file if you give it
15913# the --recheck option to rerun configure.
6e3f3080 15914#
ba479fd2
NN
15915# `ac_cv_env_foo' variables (set or unset) will be overridden when
15916# loading this file, other *unset* `ac_cv_foo' will be assigned the
15917# following values.
15918
15919_ACEOF
15920
6e3f3080
NN
15921# The following way of writing the cache mishandles newlines in values,
15922# but we know of no workaround that is simple, portable, and efficient.
15923# So, don't put newlines in cache variables' values.
15924# Ultrix sh set writes to stderr and can't be redirected directly,
15925# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
15926{
15927 (set) 2>&1 |
15928 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15929 *ac_space=\ *)
15930 # `set' does not quote correctly, so add quotes (double-quote
15931 # substitution turns \\\\ into \\, and sed turns \\ into \).
15932 sed -n \
86da66b5
HPN
15933 "s/'/'\\\\''/g;
15934 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ba479fd2
NN
15935 ;;
15936 *)
15937 # `set' quotes correctly as required by POSIX, so do not add quotes.
15938 sed -n \
86da66b5 15939 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
15940 ;;
15941 esac;
15942} |
15943 sed '
15944 t clear
15945 : clear
15946 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15947 t end
15948 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15949 : end' >>confcache
15950if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 15951 if test -w $cache_file; then
ba479fd2
NN
15952 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15953 cat confcache >$cache_file
6e3f3080
NN
15954 else
15955 echo "not updating unwritable cache $cache_file"
15956 fi
15957fi
15958rm -f confcache
15959
15960test "x$prefix" = xNONE && prefix=$ac_default_prefix
15961# Let make expand exec_prefix.
15962test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15963
ba479fd2
NN
15964# VPATH may cause trouble with some makes, so we remove $(srcdir),
15965# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15966# trailing colons and then remove the whole line if VPATH becomes empty
15967# (actually we leave an empty line to preserve line numbers).
6e3f3080 15968if test "x$srcdir" = x.; then
86da66b5 15969 ac_vpsub='/^[ ]*VPATH[ ]*=/{
ba479fd2
NN
15970s/:*\$(srcdir):*/:/;
15971s/:*\${srcdir}:*/:/;
15972s/:*@srcdir@:*/:/;
86da66b5 15973s/^\([^=]*=[ ]*\):*/\1/;
ba479fd2 15974s/:*$//;
86da66b5 15975s/^[^=]*=[ ]*$//;
ba479fd2 15976}'
6e3f3080
NN
15977fi
15978
63cf211a 15979DEFS=-DHAVE_CONFIG_H
6e3f3080 15980
ba479fd2
NN
15981ac_libobjs=
15982ac_ltlibobjs=
15983for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15984 # 1. Remove the extension, and $U if already installed.
15985 ac_i=`echo "$ac_i" |
86da66b5 15986 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
ba479fd2
NN
15987 # 2. Add them.
15988 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
15989 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
15990done
15991LIBOBJS=$ac_libobjs
63cf211a 15992
ba479fd2
NN
15993LTLIBOBJS=$ac_ltlibobjs
15994
15995
15996
15997: ${CONFIG_STATUS=./config.status}
15998ac_clean_files_save=$ac_clean_files
15999ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16000{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16001echo "$as_me: creating $CONFIG_STATUS" >&6;}
16002cat >$CONFIG_STATUS <<_ACEOF
16003#! $SHELL
16004# Generated by $as_me.
6e3f3080
NN
16005# Run this file to recreate the current configuration.
16006# Compiler output produced by configure, useful for debugging
ba479fd2 16007# configure, is in config.log if it exists.
6e3f3080 16008
ba479fd2
NN
16009debug=false
16010ac_cs_recheck=false
16011ac_cs_silent=false
16012SHELL=\${CONFIG_SHELL-$SHELL}
16013_ACEOF
16014
16015cat >>$CONFIG_STATUS <<\_ACEOF
16016## --------------------- ##
16017## M4sh Initialization. ##
16018## --------------------- ##
16019
16020# Be Bourne compatible
16021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16022 emulate sh
16023 NULLCMD=:
16024 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
16025 # is contrary to our usage. Disable this feature.
16026 alias -g '${1+"$@"}'='"$@"'
16027elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16028 set -o posix
16029fi
86da66b5 16030DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
16031
16032# Support unset when possible.
86da66b5 16033if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
16034 as_unset=unset
16035else
16036 as_unset=false
16037fi
16038
16039
16040# Work around bugs in pre-3.0 UWIN ksh.
16041$as_unset ENV MAIL MAILPATH
16042PS1='$ '
16043PS2='> '
16044PS4='+ '
16045
16046# NLS nuisances.
16047for as_var in \
16048 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
16049 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
16050 LC_TELEPHONE LC_TIME
6e3f3080 16051do
86da66b5 16052 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
16053 eval $as_var=C; export $as_var
16054 else
16055 $as_unset $as_var
16056 fi
6e3f3080
NN
16057done
16058
ba479fd2
NN
16059# Required to use basename.
16060if expr a : '\(a\)' >/dev/null 2>&1; then
16061 as_expr=expr
16062else
16063 as_expr=false
16064fi
6e3f3080 16065
ba479fd2
NN
16066if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
16067 as_basename=basename
16068else
16069 as_basename=false
16070fi
6e3f3080
NN
16071
16072
ba479fd2
NN
16073# Name of the executable.
16074as_me=`$as_basename "$0" ||
16075$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16076 X"$0" : 'X\(//\)$' \| \
16077 X"$0" : 'X\(/\)$' \| \
16078 . : '\(.\)' 2>/dev/null ||
16079echo X/"$0" |
16080 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16081 /^X\/\(\/\/\)$/{ s//\1/; q; }
16082 /^X\/\(\/\).*/{ s//\1/; q; }
16083 s/.*/./; q'`
16084
6e3f3080 16085
ba479fd2
NN
16086# PATH needs CR, and LINENO needs CR and PATH.
16087# Avoid depending upon Character Ranges.
16088as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16089as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16090as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16091as_cr_digits='0123456789'
16092as_cr_alnum=$as_cr_Letters$as_cr_digits
16093
16094# The user is always right.
16095if test "${PATH_SEPARATOR+set}" != set; then
16096 echo "#! /bin/sh" >conf$$.sh
16097 echo "exit 0" >>conf$$.sh
16098 chmod +x conf$$.sh
16099 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
16100 PATH_SEPARATOR=';'
6e3f3080 16101 else
ba479fd2
NN
16102 PATH_SEPARATOR=:
16103 fi
16104 rm -f conf$$.sh
16105fi
16106
16107
16108 as_lineno_1=$LINENO
16109 as_lineno_2=$LINENO
16110 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16111 test "x$as_lineno_1" != "x$as_lineno_2" &&
16112 test "x$as_lineno_3" = "x$as_lineno_2" || {
16113 # Find who we are. Look in the path if we contain no path at all
16114 # relative or not.
16115 case $0 in
16116 *[\\/]* ) as_myself=$0 ;;
16117 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16118for as_dir in $PATH
16119do
16120 IFS=$as_save_IFS
16121 test -z "$as_dir" && as_dir=.
16122 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16123done
16124
16125 ;;
16126 esac
16127 # We did not find ourselves, most probably we were run as `sh COMMAND'
16128 # in which case we are not to be found in the path.
16129 if test "x$as_myself" = x; then
16130 as_myself=$0
16131 fi
16132 if test ! -f "$as_myself"; then
16133 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16134echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16135 { (exit 1); exit 1; }; }
6e3f3080 16136 fi
ba479fd2
NN
16137 case $CONFIG_SHELL in
16138 '')
16139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16140for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16141do
16142 IFS=$as_save_IFS
16143 test -z "$as_dir" && as_dir=.
16144 for as_base in sh bash ksh sh5; do
16145 case $as_dir in
16146 /*)
16147 if ("$as_dir/$as_base" -c '
16148 as_lineno_1=$LINENO
16149 as_lineno_2=$LINENO
16150 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16151 test "x$as_lineno_1" != "x$as_lineno_2" &&
16152 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16153 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
16154 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
16155 CONFIG_SHELL=$as_dir/$as_base
16156 export CONFIG_SHELL
16157 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16158 fi;;
16159 esac
16160 done
16161done
16162;;
16163 esac
16164
16165 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16166 # uniformly replaced by the line number. The first 'sed' inserts a
16167 # line-number line before each line; the second 'sed' does the real
16168 # work. The second script uses 'N' to pair each line-number line
16169 # with the numbered line, and appends trailing '-' during
16170 # substitution so that $LINENO is not a special case at line end.
16171 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16172 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16173 sed '=' <$as_myself |
16174 sed '
16175 N
16176 s,$,-,
16177 : loop
16178 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16179 t loop
16180 s,-$,,
16181 s,^['$as_cr_digits']*\n,,
16182 ' >$as_me.lineno &&
16183 chmod +x $as_me.lineno ||
16184 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16185echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16186 { (exit 1); exit 1; }; }
16187
16188 # Don't try to exec as it changes $[0], causing all sort of problems
16189 # (the dirname of $[0] is not the place where we might find the
16190 # original and so on. Autoconf is especially sensible to this).
16191 . ./$as_me.lineno
16192 # Exit status is that of the last command.
16193 exit
16194}
16195
16196
16197case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16198 *c*,-n*) ECHO_N= ECHO_C='
16199' ECHO_T=' ' ;;
16200 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16201 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16202esac
16203
16204if expr a : '\(a\)' >/dev/null 2>&1; then
16205 as_expr=expr
16206else
16207 as_expr=false
16208fi
16209
16210rm -f conf$$ conf$$.exe conf$$.file
16211echo >conf$$.file
16212if ln -s conf$$.file conf$$ 2>/dev/null; then
16213 # We could just check for DJGPP; but this test a) works b) is more generic
16214 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16215 if test -f conf$$.exe; then
16216 # Don't use ln at all; we don't have any links
16217 as_ln_s='cp -p'
6e3f3080 16218 else
ba479fd2 16219 as_ln_s='ln -s'
6e3f3080 16220 fi
ba479fd2
NN
16221elif ln conf$$.file conf$$ 2>/dev/null; then
16222 as_ln_s=ln
16223else
16224 as_ln_s='cp -p'
16225fi
16226rm -f conf$$ conf$$.exe conf$$.file
16227
16228if mkdir -p . 2>/dev/null; then
16229 as_mkdir_p=:
16230else
86da66b5 16231 test -d ./-p && rmdir ./-p
ba479fd2
NN
16232 as_mkdir_p=false
16233fi
16234
16235as_executable_p="test -f"
16236
16237# Sed expression to map a string onto a valid CPP name.
86da66b5 16238as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
16239
16240# Sed expression to map a string onto a valid variable name.
86da66b5 16241as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
16242
16243
16244# IFS
16245# We need space, tab and new line, in precisely that order.
16246as_nl='
16247'
16248IFS=" $as_nl"
16249
16250# CDPATH.
16251$as_unset CDPATH
16252
16253exec 6>&1
16254
16255# Open the log real soon, to keep \$[0] and so on meaningful, and to
16256# report actual input values of CONFIG_FILES etc. instead of their
16257# values after options handling. Logging --version etc. is OK.
16258exec 5>>config.log
16259{
16260 echo
16261 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16262## Running $as_me. ##
16263_ASBOX
16264} >&5
16265cat >&5 <<_CSEOF
16266
16267This file was extended by $as_me, which was
8ab705be 16268generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
16269
16270 CONFIG_FILES = $CONFIG_FILES
16271 CONFIG_HEADERS = $CONFIG_HEADERS
16272 CONFIG_LINKS = $CONFIG_LINKS
16273 CONFIG_COMMANDS = $CONFIG_COMMANDS
16274 $ $0 $@
16275
16276_CSEOF
16277echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16278echo >&5
16279_ACEOF
16280
16281# Files that config.status was made for.
16282if test -n "$ac_config_files"; then
16283 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16284fi
16285
16286if test -n "$ac_config_headers"; then
16287 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16288fi
16289
16290if test -n "$ac_config_links"; then
16291 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16292fi
16293
16294if test -n "$ac_config_commands"; then
16295 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16296fi
16297
16298cat >>$CONFIG_STATUS <<\_ACEOF
16299
16300ac_cs_usage="\
16301\`$as_me' instantiates files from templates according to the
16302current configuration.
16303
16304Usage: $0 [OPTIONS] [FILE]...
16305
16306 -h, --help print this help, then exit
16307 -V, --version print version number, then exit
16308 -q, --quiet do not print progress messages
16309 -d, --debug don't remove temporary files
16310 --recheck update $as_me by reconfiguring in the same conditions
16311 --file=FILE[:TEMPLATE]
86da66b5 16312 instantiate the configuration file FILE
ba479fd2 16313 --header=FILE[:TEMPLATE]
86da66b5 16314 instantiate the configuration header FILE
ba479fd2
NN
16315
16316Configuration files:
16317$config_files
16318
16319Configuration headers:
16320$config_headers
16321
16322Configuration commands:
16323$config_commands
16324
16325Report bugs to <bug-autoconf@gnu.org>."
16326_ACEOF
16327
16328cat >>$CONFIG_STATUS <<_ACEOF
16329ac_cs_version="\\
16330config.status
8ab705be 16331configured by $0, generated by GNU Autoconf 2.59,
ba479fd2
NN
16332 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16333
86da66b5 16334Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
16335This config.status script is free software; the Free Software Foundation
16336gives unlimited permission to copy, distribute and modify it."
16337srcdir=$srcdir
16338_ACEOF
16339
16340cat >>$CONFIG_STATUS <<\_ACEOF
16341# If no file are specified by the user, then we need to provide default
16342# value. By we need to know if files were specified by the user.
16343ac_need_defaults=:
16344while test $# != 0
16345do
16346 case $1 in
16347 --*=*)
16348 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16349 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16350 ac_shift=:
16351 ;;
16352 -*)
16353 ac_option=$1
16354 ac_optarg=$2
16355 ac_shift=shift
16356 ;;
16357 *) # This is not an option, so the user has probably given explicit
16358 # arguments.
16359 ac_option=$1
16360 ac_need_defaults=false;;
16361 esac
16362
16363 case $ac_option in
16364 # Handling of the options.
16365_ACEOF
16366cat >>$CONFIG_STATUS <<\_ACEOF
16367 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16368 ac_cs_recheck=: ;;
16369 --version | --vers* | -V )
16370 echo "$ac_cs_version"; exit 0 ;;
16371 --he | --h)
16372 # Conflict between --help and --header
16373 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16374Try \`$0 --help' for more information." >&5
16375echo "$as_me: error: ambiguous option: $1
16376Try \`$0 --help' for more information." >&2;}
16377 { (exit 1); exit 1; }; };;
16378 --help | --hel | -h )
16379 echo "$ac_cs_usage"; exit 0 ;;
16380 --debug | --d* | -d )
16381 debug=: ;;
16382 --file | --fil | --fi | --f )
16383 $ac_shift
16384 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
16385 ac_need_defaults=false;;
16386 --header | --heade | --head | --hea )
16387 $ac_shift
16388 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
16389 ac_need_defaults=false;;
16390 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16391 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16392 ac_cs_silent=: ;;
16393
16394 # This is an error.
16395 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16396Try \`$0 --help' for more information." >&5
16397echo "$as_me: error: unrecognized option: $1
16398Try \`$0 --help' for more information." >&2;}
16399 { (exit 1); exit 1; }; } ;;
16400
16401 *) ac_config_targets="$ac_config_targets $1" ;;
16402
16403 esac
16404 shift
6e3f3080 16405done
ba479fd2
NN
16406
16407ac_configure_extra_args=
16408
16409if $ac_cs_silent; then
16410 exec 6>/dev/null
16411 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
16412fi
16413
ba479fd2
NN
16414_ACEOF
16415cat >>$CONFIG_STATUS <<_ACEOF
16416if \$ac_cs_recheck; then
16417 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
16418 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16419fi
861bb6c1 16420
ba479fd2
NN
16421_ACEOF
16422
16423cat >>$CONFIG_STATUS <<_ACEOF
16424#
16425# INIT-COMMANDS section.
16426#
16427
16428subdirs='$subdirs'
ba479fd2
NN
16429
16430_ACEOF
16431
16432
16433
16434cat >>$CONFIG_STATUS <<\_ACEOF
16435for ac_config_target in $ac_config_targets
16436do
16437 case "$ac_config_target" in
16438 # Handling of arguments.
16439 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
16440 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16441 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
16442 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16443echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16444 { (exit 1); exit 1; }; };;
861bb6c1 16445 esac
ba479fd2
NN
16446done
16447
16448# If the user did not use the arguments to specify the items to instantiate,
16449# then the envvar interface is used. Set only those that are not.
16450# We use the long form for the default assignment because of an extremely
16451# bizarre bug on SunOS 4.1.3.
16452if $ac_need_defaults; then
16453 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16454 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16455 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16456fi
16457
16458# Have a temporary directory for convenience. Make it in the build tree
16459# simply because there is no reason to put it here, and in addition,
16460# creating and moving files from /tmp can sometimes cause problems.
16461# Create a temporary directory, and hook for its removal unless debugging.
16462$debug ||
16463{
16464 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16465 trap '{ (exit 1); exit 1; }' 1 2 13 15
16466}
861bb6c1 16467
ba479fd2 16468# Create a (secure) tmp directory for tmp files.
6e3f3080 16469
ba479fd2
NN
16470{
16471 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
16472 test -n "$tmp" && test -d "$tmp"
16473} ||
16474{
16475 tmp=./confstat$$-$RANDOM
16476 (umask 077 && mkdir $tmp)
16477} ||
16478{
16479 echo "$me: cannot create a temporary directory in ." >&2
16480 { (exit 1); exit 1; }
16481}
16482
16483_ACEOF
16484
16485cat >>$CONFIG_STATUS <<_ACEOF
16486
16487#
16488# CONFIG_FILES section.
16489#
16490
16491# No need to generate the scripts if there are no CONFIG_FILES.
16492# This happens for instance when ./config.status config.h
16493if test -n "\$CONFIG_FILES"; then
16494 # Protect against being on the right side of a sed subst in config.status.
16495 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16496 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16497s,@SHELL@,$SHELL,;t t
16498s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16499s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16500s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16501s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16502s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16503s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16504s,@exec_prefix@,$exec_prefix,;t t
16505s,@prefix@,$prefix,;t t
16506s,@program_transform_name@,$program_transform_name,;t t
16507s,@bindir@,$bindir,;t t
16508s,@sbindir@,$sbindir,;t t
16509s,@libexecdir@,$libexecdir,;t t
16510s,@datadir@,$datadir,;t t
16511s,@sysconfdir@,$sysconfdir,;t t
16512s,@sharedstatedir@,$sharedstatedir,;t t
16513s,@localstatedir@,$localstatedir,;t t
16514s,@libdir@,$libdir,;t t
16515s,@includedir@,$includedir,;t t
16516s,@oldincludedir@,$oldincludedir,;t t
16517s,@infodir@,$infodir,;t t
16518s,@mandir@,$mandir,;t t
16519s,@build_alias@,$build_alias,;t t
16520s,@host_alias@,$host_alias,;t t
16521s,@target_alias@,$target_alias,;t t
16522s,@DEFS@,$DEFS,;t t
16523s,@ECHO_C@,$ECHO_C,;t t
16524s,@ECHO_N@,$ECHO_N,;t t
16525s,@ECHO_T@,$ECHO_T,;t t
16526s,@LIBS@,$LIBS,;t t
16527s,@build@,$build,;t t
16528s,@build_cpu@,$build_cpu,;t t
16529s,@build_vendor@,$build_vendor,;t t
16530s,@build_os@,$build_os,;t t
16531s,@host@,$host,;t t
16532s,@host_cpu@,$host_cpu,;t t
16533s,@host_vendor@,$host_vendor,;t t
16534s,@host_os@,$host_os,;t t
16535s,@target@,$target,;t t
16536s,@target_cpu@,$target_cpu,;t t
16537s,@target_vendor@,$target_vendor,;t t
16538s,@target_os@,$target_os,;t t
8f1529e6 16539s,@target_noncanonical@,$target_noncanonical,;t t
ba479fd2
NN
16540s,@build_subdir@,$build_subdir,;t t
16541s,@host_subdir@,$host_subdir,;t t
16542s,@target_subdir@,$target_subdir,;t t
03787dfd 16543s,@GENINSRC@,$GENINSRC,;t t
ba479fd2
NN
16544s,@CC@,$CC,;t t
16545s,@CFLAGS@,$CFLAGS,;t t
16546s,@LDFLAGS@,$LDFLAGS,;t t
16547s,@CPPFLAGS@,$CPPFLAGS,;t t
16548s,@ac_ct_CC@,$ac_ct_CC,;t t
16549s,@EXEEXT@,$EXEEXT,;t t
16550s,@OBJEXT@,$OBJEXT,;t t
16551s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
16552s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
16553s,@CPP@,$CPP,;t t
bf3b7cd3 16554s,@EGREP@,$EGREP,;t t
ba479fd2
NN
16555s,@strict1_warn@,$strict1_warn,;t t
16556s,@warn_cflags@,$warn_cflags,;t t
16557s,@WERROR@,$WERROR,;t t
16558s,@nocommon_flag@,$nocommon_flag,;t t
13f05fd0 16559s,@TREEBROWSER@,$TREEBROWSER,;t t
ba479fd2
NN
16560s,@valgrind_path@,$valgrind_path,;t t
16561s,@valgrind_path_defines@,$valgrind_path_defines,;t t
16562s,@valgrind_command@,$valgrind_command,;t t
16563s,@coverage_flags@,$coverage_flags,;t t
16564s,@enable_multilib@,$enable_multilib,;t t
486aa804 16565s,@enable_decimal_float@,$enable_decimal_float,;t t
ba479fd2
NN
16566s,@enable_shared@,$enable_shared,;t t
16567s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
16568s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
16569s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
16570s,@onestep@,$onestep,;t t
16571s,@SET_MAKE@,$SET_MAKE,;t t
16572s,@AWK@,$AWK,;t t
ba479fd2 16573s,@LN_S@,$LN_S,;t t
41e622a8 16574s,@LN@,$LN,;t t
ba479fd2
NN
16575s,@RANLIB@,$RANLIB,;t t
16576s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
343a6100 16577s,@ranlib_flags@,$ranlib_flags,;t t
ba479fd2
NN
16578s,@INSTALL@,$INSTALL,;t t
16579s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16580s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16581s,@make_compare_target@,$make_compare_target,;t t
16582s,@have_mktemp_command@,$have_mktemp_command,;t t
16583s,@MAKEINFO@,$MAKEINFO,;t t
16584s,@BUILD_INFO@,$BUILD_INFO,;t t
16585s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
16586s,@FLEX@,$FLEX,;t t
16587s,@BISON@,$BISON,;t t
f6a874ac
JW
16588s,@NM@,$NM,;t t
16589s,@AR@,$AR,;t t
ba479fd2
NN
16590s,@stage1_cflags@,$stage1_cflags,;t t
16591s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
16592s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
16593s,@LDEXP_LIB@,$LDEXP_LIB,;t t
16594s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
16595s,@LIBICONV@,$LIBICONV,;t t
dfb77e37 16596s,@LTLIBICONV@,$LTLIBICONV,;t t
ba479fd2
NN
16597s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
16598s,@manext@,$manext,;t t
16599s,@objext@,$objext,;t t
8bb915b6 16600s,@gthread_flags@,$gthread_flags,;t t
ba479fd2 16601s,@extra_modes_file@,$extra_modes_file,;t t
75685792 16602s,@extra_opt_files@,$extra_opt_files,;t t
ba479fd2
NN
16603s,@USE_NLS@,$USE_NLS,;t t
16604s,@LIBINTL@,$LIBINTL,;t t
16605s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
16606s,@INCINTL@,$INCINTL,;t t
16607s,@XGETTEXT@,$XGETTEXT,;t t
16608s,@GMSGFMT@,$GMSGFMT,;t t
16609s,@POSUB@,$POSUB,;t t
16610s,@CATALOGS@,$CATALOGS,;t t
5395b47b 16611s,@host_cc_for_libada@,$host_cc_for_libada,;t t
ba479fd2
NN
16612s,@CROSS@,$CROSS,;t t
16613s,@ALL@,$ALL,;t t
16614s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
16615s,@inhibit_libc@,$inhibit_libc,;t t
ba479fd2
NN
16616s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
16617s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16618s,@STMP_FIXINC@,$STMP_FIXINC,;t t
16619s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
c38f02df 16620s,@collect2@,$collect2,;t t
9f18db39
PB
16621s,@gcc_cv_as@,$gcc_cv_as,;t t
16622s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
16623s,@gcc_cv_ld@,$gcc_cv_ld,;t t
16624s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
16625s,@gcc_cv_nm@,$gcc_cv_nm,;t t
16626s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
d739199a 16627s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
ba479fd2 16628s,@libgcc_visibility@,$libgcc_visibility,;t t
ba479fd2
NN
16629s,@GGC@,$GGC,;t t
16630s,@zlibdir@,$zlibdir,;t t
16631s,@zlibinc@,$zlibinc,;t t
16632s,@MAINT@,$MAINT,;t t
16633s,@gcc_tooldir@,$gcc_tooldir,;t t
16634s,@dollar@,$dollar,;t t
16635s,@slibdir@,$slibdir,;t t
16636s,@objdir@,$objdir,;t t
16637s,@subdirs@,$subdirs,;t t
16638s,@srcdir@,$srcdir,;t t
ba479fd2
NN
16639s,@all_boot_languages@,$all_boot_languages,;t t
16640s,@all_compilers@,$all_compilers,;t t
16641s,@all_gtfiles@,$all_gtfiles,;t t
16642s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
16643s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
16644s,@all_lang_makefrags@,$all_lang_makefrags,;t t
16645s,@all_lang_makefiles@,$all_lang_makefiles,;t t
16646s,@all_languages@,$all_languages,;t t
16647s,@all_stagestuff@,$all_stagestuff,;t t
16648s,@build_exeext@,$build_exeext,;t t
16649s,@build_install_headers_dir@,$build_install_headers_dir,;t t
16650s,@build_xm_file_list@,$build_xm_file_list,;t t
16651s,@build_xm_include_list@,$build_xm_include_list,;t t
16652s,@build_xm_defines@,$build_xm_defines,;t t
16653s,@check_languages@,$check_languages,;t t
16654s,@cc_set_by_configure@,$cc_set_by_configure,;t t
16655s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
16656s,@cpp_install_dir@,$cpp_install_dir,;t t
16657s,@xmake_file@,$xmake_file,;t t
16658s,@tmake_file@,$tmake_file,;t t
30500d84 16659s,@extra_gcc_objs@,$extra_gcc_objs,;t t
ba479fd2
NN
16660s,@extra_headers_list@,$extra_headers_list,;t t
16661s,@extra_objs@,$extra_objs,;t t
16662s,@extra_parts@,$extra_parts,;t t
16663s,@extra_passes@,$extra_passes,;t t
16664s,@extra_programs@,$extra_programs,;t t
16665s,@float_h_file@,$float_h_file,;t t
16666s,@gcc_config_arguments@,$gcc_config_arguments,;t t
16667s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
16668s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
ba479fd2 16669s,@host_exeext@,$host_exeext,;t t
ba479fd2
NN
16670s,@host_xm_file_list@,$host_xm_file_list,;t t
16671s,@host_xm_include_list@,$host_xm_include_list,;t t
16672s,@host_xm_defines@,$host_xm_defines,;t t
16673s,@out_host_hook_obj@,$out_host_hook_obj,;t t
16674s,@install@,$install,;t t
16675s,@lang_opt_files@,$lang_opt_files,;t t
16676s,@lang_specs_files@,$lang_specs_files,;t t
16677s,@lang_tree_files@,$lang_tree_files,;t t
16678s,@local_prefix@,$local_prefix,;t t
16679s,@md_file@,$md_file,;t t
16680s,@objc_boehm_gc@,$objc_boehm_gc,;t t
16681s,@out_file@,$out_file,;t t
16682s,@out_object_file@,$out_object_file,;t t
16683s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
16684s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
ba479fd2
NN
16685s,@thread_file@,$thread_file,;t t
16686s,@tm_file_list@,$tm_file_list,;t t
16687s,@tm_include_list@,$tm_include_list,;t t
16688s,@tm_defines@,$tm_defines,;t t
16689s,@tm_p_file_list@,$tm_p_file_list,;t t
16690s,@tm_p_include_list@,$tm_p_include_list,;t t
16691s,@xm_file_list@,$xm_file_list,;t t
16692s,@xm_include_list@,$xm_include_list,;t t
16693s,@xm_defines@,$xm_defines,;t t
ba479fd2
NN
16694s,@c_target_objs@,$c_target_objs,;t t
16695s,@cxx_target_objs@,$cxx_target_objs,;t t
16696s,@target_cpu_default@,$target_cpu_default,;t t
6de9cd9a
DN
16697s,@GMPLIBS@,$GMPLIBS,;t t
16698s,@GMPINC@,$GMPINC,;t t
ba479fd2
NN
16699s,@LIBOBJS@,$LIBOBJS,;t t
16700s,@LTLIBOBJS@,$LTLIBOBJS,;t t
16701/@language_hooks@/r $language_hooks
16702s,@language_hooks@,,;t t
16703CEOF
16704
16705_ACEOF
16706
16707 cat >>$CONFIG_STATUS <<\_ACEOF
16708 # Split the substitutions into bite-sized pieces for seds with
16709 # small command number limits, like on Digital OSF/1 and HP-UX.
16710 ac_max_sed_lines=48
16711 ac_sed_frag=1 # Number of current file.
16712 ac_beg=1 # First line for current file.
16713 ac_end=$ac_max_sed_lines # Line after last line for current file.
16714 ac_more_lines=:
16715 ac_sed_cmds=
16716 while $ac_more_lines; do
16717 if test $ac_beg -gt 1; then
16718 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16719 else
16720 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16721 fi
16722 if test ! -s $tmp/subs.frag; then
16723 ac_more_lines=false
16724 else
16725 # The purpose of the label and of the branching condition is to
16726 # speed up the sed processing (if there are no `@' at all, there
16727 # is no need to browse any of the substitutions).
16728 # These are the two extra sed commands mentioned above.
16729 (echo ':t
16730 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16731 if test -z "$ac_sed_cmds"; then
86da66b5 16732 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2 16733 else
86da66b5 16734 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2
NN
16735 fi
16736 ac_sed_frag=`expr $ac_sed_frag + 1`
16737 ac_beg=$ac_end
16738 ac_end=`expr $ac_end + $ac_max_sed_lines`
16739 fi
16740 done
16741 if test -z "$ac_sed_cmds"; then
16742 ac_sed_cmds=cat
63cf211a 16743 fi
ba479fd2 16744fi # test -n "$CONFIG_FILES"
cafe096b 16745
ba479fd2
NN
16746_ACEOF
16747cat >>$CONFIG_STATUS <<\_ACEOF
16748for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16749 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16750 case $ac_file in
16751 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
16752 cat >$tmp/stdin
16753 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16754 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16755 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 16756 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16757 * ) ac_file_in=$ac_file.in ;;
63cf211a 16758 esac
cafe096b 16759
ba479fd2
NN
16760 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16761 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16762$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16763 X"$ac_file" : 'X\(//\)[^/]' \| \
16764 X"$ac_file" : 'X\(//\)$' \| \
16765 X"$ac_file" : 'X\(/\)' \| \
16766 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16767echo X"$ac_file" |
16768 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16769 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16770 /^X\(\/\/\)$/{ s//\1/; q; }
16771 /^X\(\/\).*/{ s//\1/; q; }
16772 s/.*/./; q'`
16773 { if $as_mkdir_p; then
16774 mkdir -p "$ac_dir"
16775 else
16776 as_dir="$ac_dir"
16777 as_dirs=
16778 while test ! -d "$as_dir"; do
16779 as_dirs="$as_dir $as_dirs"
16780 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16781$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16782 X"$as_dir" : 'X\(//\)[^/]' \| \
16783 X"$as_dir" : 'X\(//\)$' \| \
16784 X"$as_dir" : 'X\(/\)' \| \
16785 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16786echo X"$as_dir" |
16787 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16788 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16789 /^X\(\/\/\)$/{ s//\1/; q; }
16790 /^X\(\/\).*/{ s//\1/; q; }
16791 s/.*/./; q'`
16792 done
16793 test ! -n "$as_dirs" || mkdir $as_dirs
16794 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16795echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16796 { (exit 1); exit 1; }; }; }
6e3f3080 16797
ba479fd2
NN
16798 ac_builddir=.
16799
16800if test "$ac_dir" != .; then
16801 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16802 # A "../" for each directory in $ac_dir_suffix.
16803 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16804else
16805 ac_dir_suffix= ac_top_builddir=
16806fi
16807
16808case $srcdir in
16809 .) # No --srcdir option. We are building in place.
16810 ac_srcdir=.
16811 if test -z "$ac_top_builddir"; then
16812 ac_top_srcdir=.
16813 else
16814 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16815 fi ;;
16816 [\\/]* | ?:[\\/]* ) # Absolute path.
16817 ac_srcdir=$srcdir$ac_dir_suffix;
16818 ac_top_srcdir=$srcdir ;;
16819 *) # Relative path.
16820 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16821 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16822esac
8ab705be
KC
16823
16824# Do not use `cd foo && pwd` to compute absolute paths, because
16825# the directories may not exist.
16826case `pwd` in
16827.) ac_abs_builddir="$ac_dir";;
86da66b5 16828*)
8ab705be
KC
16829 case "$ac_dir" in
16830 .) ac_abs_builddir=`pwd`;;
16831 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
16832 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
16833 esac;;
16834esac
8ab705be 16835case $ac_abs_builddir in
86da66b5
HPN
16836.) ac_abs_top_builddir=${ac_top_builddir}.;;
16837*)
16838 case ${ac_top_builddir}. in
8ab705be 16839 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 16840 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 16841 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
16842 esac;;
16843esac
8ab705be 16844case $ac_abs_builddir in
86da66b5
HPN
16845.) ac_abs_srcdir=$ac_srcdir;;
16846*)
16847 case $ac_srcdir in
8ab705be 16848 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 16849 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 16850 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
16851 esac;;
16852esac
8ab705be 16853case $ac_abs_builddir in
86da66b5
HPN
16854.) ac_abs_top_srcdir=$ac_top_srcdir;;
16855*)
16856 case $ac_top_srcdir in
8ab705be 16857 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 16858 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 16859 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
16860 esac;;
16861esac
ba479fd2
NN
16862
16863
16864
ba479fd2
NN
16865 # Let's still pretend it is `configure' which instantiates (i.e., don't
16866 # use $as_me), people would be surprised to read:
16867 # /* config.h. Generated by config.status. */
16868 if test x"$ac_file" = x-; then
16869 configure_input=
16870 else
16871 configure_input="$ac_file. "
16872 fi
16873 configure_input=$configure_input"Generated from `echo $ac_file_in |
86da66b5 16874 sed 's,.*/,,'` by configure."
ba479fd2
NN
16875
16876 # First look for the input files in the build tree, otherwise in the
16877 # src tree.
16878 ac_file_inputs=`IFS=:
16879 for f in $ac_file_in; do
16880 case $f in
16881 -) echo $tmp/stdin ;;
16882 [\\/$]*)
86da66b5
HPN
16883 # Absolute (can't be DOS-style, as IFS=:)
16884 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16885echo "$as_me: error: cannot find input file: $f" >&2;}
16886 { (exit 1); exit 1; }; }
86da66b5 16887 echo "$f";;
ba479fd2 16888 *) # Relative
86da66b5
HPN
16889 if test -f "$f"; then
16890 # Build tree
16891 echo "$f"
16892 elif test -f "$srcdir/$f"; then
16893 # Source tree
16894 echo "$srcdir/$f"
16895 else
16896 # /dev/null tree
16897 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16898echo "$as_me: error: cannot find input file: $f" >&2;}
16899 { (exit 1); exit 1; }; }
86da66b5 16900 fi;;
ba479fd2
NN
16901 esac
16902 done` || { (exit 1); exit 1; }
e8b05380
PB
16903
16904 if test x"$ac_file" != x-; then
16905 { echo "$as_me:$LINENO: creating $ac_file" >&5
16906echo "$as_me: creating $ac_file" >&6;}
16907 rm -f "$ac_file"
16908 fi
ba479fd2
NN
16909_ACEOF
16910cat >>$CONFIG_STATUS <<_ACEOF
16911 sed "$ac_vpsub
16912$extrasub
16913_ACEOF
16914cat >>$CONFIG_STATUS <<\_ACEOF
16915:t
16916/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16917s,@configure_input@,$configure_input,;t t
16918s,@srcdir@,$ac_srcdir,;t t
16919s,@abs_srcdir@,$ac_abs_srcdir,;t t
16920s,@top_srcdir@,$ac_top_srcdir,;t t
16921s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16922s,@builddir@,$ac_builddir,;t t
16923s,@abs_builddir@,$ac_abs_builddir,;t t
16924s,@top_builddir@,$ac_top_builddir,;t t
16925s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16926" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16927 rm -f $tmp/stdin
16928 if test x"$ac_file" != x-; then
16929 mv $tmp/out $ac_file
16930 else
16931 cat $tmp/out
16932 rm -f $tmp/out
16933 fi
16934
16935done
16936_ACEOF
16937cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 16938
ba479fd2
NN
16939#
16940# CONFIG_HEADER section.
16941#
861bb6c1
JL
16942
16943# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16944# NAME is the cpp macro being defined and VALUE is the value it is being given.
16945#
16946# ac_d sets the value in "#define NAME VALUE" lines.
86da66b5
HPN
16947ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16948ac_dB='[ ].*$,\1#\2'
ba479fd2
NN
16949ac_dC=' '
16950ac_dD=',;t'
16951# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
86da66b5 16952ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ba479fd2 16953ac_uB='$,\1#\2define\3'
861bb6c1 16954ac_uC=' '
ba479fd2
NN
16955ac_uD=',;t'
16956
16957for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 16958 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
16959 case $ac_file in
16960 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
16961 cat >$tmp/stdin
16962 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16963 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16964 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 16965 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16966 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
16967 esac
16968
ba479fd2
NN
16969 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16970echo "$as_me: creating $ac_file" >&6;}
16971
16972 # First look for the input files in the build tree, otherwise in the
16973 # src tree.
16974 ac_file_inputs=`IFS=:
16975 for f in $ac_file_in; do
16976 case $f in
16977 -) echo $tmp/stdin ;;
16978 [\\/$]*)
86da66b5
HPN
16979 # Absolute (can't be DOS-style, as IFS=:)
16980 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16981echo "$as_me: error: cannot find input file: $f" >&2;}
16982 { (exit 1); exit 1; }; }
86da66b5
HPN
16983 # Do quote $f, to prevent DOS paths from being IFS'd.
16984 echo "$f";;
ba479fd2 16985 *) # Relative
86da66b5
HPN
16986 if test -f "$f"; then
16987 # Build tree
16988 echo "$f"
16989 elif test -f "$srcdir/$f"; then
16990 # Source tree
16991 echo "$srcdir/$f"
16992 else
16993 # /dev/null tree
16994 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16995echo "$as_me: error: cannot find input file: $f" >&2;}
16996 { (exit 1); exit 1; }; }
86da66b5 16997 fi;;
ba479fd2
NN
16998 esac
16999 done` || { (exit 1); exit 1; }
17000 # Remove the trailing spaces.
86da66b5 17001 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
ba479fd2
NN
17002
17003_ACEOF
17004
17005# Transform confdefs.h into two sed scripts, `conftest.defines' and
17006# `conftest.undefs', that substitutes the proper values into
17007# config.h.in to produce config.h. The first handles `#define'
17008# templates, and the second `#undef' templates.
17009# And first: Protect against being on the right side of a sed subst in
17010# config.status. Protect against being in an unquoted here document
17011# in config.status.
17012rm -f conftest.defines conftest.undefs
17013# Using a here document instead of a string reduces the quoting nightmare.
17014# Putting comments in sed scripts is not portable.
17015#
17016# `end' is used to avoid that the second main sed command (meant for
17017# 0-ary CPP macros) applies to n-ary macro definitions.
17018# See the Autoconf documentation for `clear'.
17019cat >confdef2sed.sed <<\_ACEOF
17020s/[\\&,]/\\&/g
17021s,[\\$`],\\&,g
17022t clear
17023: clear
86da66b5 17024s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
ba479fd2 17025t end
86da66b5 17026s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
ba479fd2
NN
17027: end
17028_ACEOF
17029# If some macros were called several times there might be several times
17030# the same #defines, which is useless. Nevertheless, we may not want to
17031# sort them, since we want the *last* AC-DEFINE to be honored.
17032uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17033sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17034rm -f confdef2sed.sed
861bb6c1
JL
17035
17036# This sed command replaces #undef with comments. This is necessary, for
17037# example, in the case of _POSIX_SOURCE, which is predefined and required
17038# on some systems where configure will not decide to define it.
ba479fd2 17039cat >>conftest.undefs <<\_ACEOF
86da66b5 17040s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
ba479fd2
NN
17041_ACEOF
17042
17043# Break up conftest.defines because some shells have a limit on the size
17044# of here documents, and old seds have small limits too (100 cmds).
17045echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
86da66b5 17046echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
ba479fd2
NN
17047echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17048echo ' :' >>$CONFIG_STATUS
17049rm -f conftest.tail
17050while grep . conftest.defines >/dev/null
17051do
17052 # Write a limited-size here document to $tmp/defines.sed.
17053 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17054 # Speed up: don't consider the non `#define' lines.
86da66b5 17055 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
ba479fd2
NN
17056 # Work around the forget-to-reset-the-flag bug.
17057 echo 't clr' >>$CONFIG_STATUS
17058 echo ': clr' >>$CONFIG_STATUS
17059 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
17060 echo 'CEOF
17061 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17062 rm -f $tmp/in
17063 mv $tmp/out $tmp/in
17064' >>$CONFIG_STATUS
17065 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17066 rm -f conftest.defines
17067 mv conftest.tail conftest.defines
17068done
17069rm -f conftest.defines
17070echo ' fi # grep' >>$CONFIG_STATUS
17071echo >>$CONFIG_STATUS
861bb6c1 17072
ba479fd2
NN
17073# Break up conftest.undefs because some shells have a limit on the size
17074# of here documents, and old seds have small limits too (100 cmds).
17075echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 17076rm -f conftest.tail
ba479fd2 17077while grep . conftest.undefs >/dev/null
861bb6c1 17078do
ba479fd2
NN
17079 # Write a limited-size here document to $tmp/undefs.sed.
17080 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17081 # Speed up: don't consider the non `#undef'
86da66b5 17082 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
ba479fd2
NN
17083 # Work around the forget-to-reset-the-flag bug.
17084 echo 't clr' >>$CONFIG_STATUS
17085 echo ': clr' >>$CONFIG_STATUS
17086 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 17087 echo 'CEOF
ba479fd2
NN
17088 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17089 rm -f $tmp/in
17090 mv $tmp/out $tmp/in
17091' >>$CONFIG_STATUS
17092 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17093 rm -f conftest.undefs
17094 mv conftest.tail conftest.undefs
861bb6c1 17095done
ba479fd2
NN
17096rm -f conftest.undefs
17097
17098cat >>$CONFIG_STATUS <<\_ACEOF
17099 # Let's still pretend it is `configure' which instantiates (i.e., don't
17100 # use $as_me), people would be surprised to read:
17101 # /* config.h. Generated by config.status. */
17102 if test x"$ac_file" = x-; then
17103 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 17104 else
ba479fd2 17105 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 17106 fi
ba479fd2
NN
17107 cat $tmp/in >>$tmp/config.h
17108 rm -f $tmp/in
17109 if test x"$ac_file" != x-; then
17110 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
17111 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17112echo "$as_me: $ac_file is unchanged" >&6;}
17113 else
17114 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17115$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17116 X"$ac_file" : 'X\(//\)[^/]' \| \
17117 X"$ac_file" : 'X\(//\)$' \| \
17118 X"$ac_file" : 'X\(/\)' \| \
17119 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17120echo X"$ac_file" |
17121 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17122 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17123 /^X\(\/\/\)$/{ s//\1/; q; }
17124 /^X\(\/\).*/{ s//\1/; q; }
17125 s/.*/./; q'`
17126 { if $as_mkdir_p; then
17127 mkdir -p "$ac_dir"
17128 else
17129 as_dir="$ac_dir"
17130 as_dirs=
17131 while test ! -d "$as_dir"; do
17132 as_dirs="$as_dir $as_dirs"
17133 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17134$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17135 X"$as_dir" : 'X\(//\)[^/]' \| \
17136 X"$as_dir" : 'X\(//\)$' \| \
17137 X"$as_dir" : 'X\(/\)' \| \
17138 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17139echo X"$as_dir" |
17140 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17141 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17142 /^X\(\/\/\)$/{ s//\1/; q; }
17143 /^X\(\/\).*/{ s//\1/; q; }
17144 s/.*/./; q'`
17145 done
17146 test ! -n "$as_dirs" || mkdir $as_dirs
17147 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17148echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17149 { (exit 1); exit 1; }; }; }
63cf211a 17150
ba479fd2
NN
17151 rm -f $ac_file
17152 mv $tmp/config.h $ac_file
17153 fi
17154 else
17155 cat $tmp/config.h
17156 rm -f $tmp/config.h
17157 fi
17158done
17159_ACEOF
17160cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 17161
ba479fd2
NN
17162#
17163# CONFIG_COMMANDS section.
17164#
17165for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17166 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17167 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17168 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
17169$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17170 X"$ac_dest" : 'X\(//\)[^/]' \| \
17171 X"$ac_dest" : 'X\(//\)$' \| \
17172 X"$ac_dest" : 'X\(/\)' \| \
17173 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17174echo X"$ac_dest" |
17175 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17176 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17177 /^X\(\/\/\)$/{ s//\1/; q; }
17178 /^X\(\/\).*/{ s//\1/; q; }
17179 s/.*/./; q'`
86da66b5
HPN
17180 { if $as_mkdir_p; then
17181 mkdir -p "$ac_dir"
17182 else
17183 as_dir="$ac_dir"
17184 as_dirs=
17185 while test ! -d "$as_dir"; do
17186 as_dirs="$as_dir $as_dirs"
17187 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17188$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17189 X"$as_dir" : 'X\(//\)[^/]' \| \
17190 X"$as_dir" : 'X\(//\)$' \| \
17191 X"$as_dir" : 'X\(/\)' \| \
17192 . : '\(.\)' 2>/dev/null ||
17193echo X"$as_dir" |
17194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17195 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17196 /^X\(\/\/\)$/{ s//\1/; q; }
17197 /^X\(\/\).*/{ s//\1/; q; }
17198 s/.*/./; q'`
17199 done
17200 test ! -n "$as_dirs" || mkdir $as_dirs
17201 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17202echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17203 { (exit 1); exit 1; }; }; }
17204
ba479fd2
NN
17205 ac_builddir=.
17206
17207if test "$ac_dir" != .; then
17208 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17209 # A "../" for each directory in $ac_dir_suffix.
17210 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17211else
17212 ac_dir_suffix= ac_top_builddir=
17213fi
17214
17215case $srcdir in
17216 .) # No --srcdir option. We are building in place.
17217 ac_srcdir=.
17218 if test -z "$ac_top_builddir"; then
17219 ac_top_srcdir=.
17220 else
17221 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17222 fi ;;
17223 [\\/]* | ?:[\\/]* ) # Absolute path.
17224 ac_srcdir=$srcdir$ac_dir_suffix;
17225 ac_top_srcdir=$srcdir ;;
17226 *) # Relative path.
17227 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17228 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17229esac
8ab705be
KC
17230
17231# Do not use `cd foo && pwd` to compute absolute paths, because
17232# the directories may not exist.
17233case `pwd` in
17234.) ac_abs_builddir="$ac_dir";;
86da66b5 17235*)
8ab705be
KC
17236 case "$ac_dir" in
17237 .) ac_abs_builddir=`pwd`;;
17238 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17239 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
17240 esac;;
17241esac
8ab705be 17242case $ac_abs_builddir in
86da66b5
HPN
17243.) ac_abs_top_builddir=${ac_top_builddir}.;;
17244*)
17245 case ${ac_top_builddir}. in
8ab705be 17246 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 17247 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 17248 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
17249 esac;;
17250esac
8ab705be 17251case $ac_abs_builddir in
86da66b5
HPN
17252.) ac_abs_srcdir=$ac_srcdir;;
17253*)
17254 case $ac_srcdir in
8ab705be 17255 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 17256 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 17257 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
17258 esac;;
17259esac
8ab705be 17260case $ac_abs_builddir in
86da66b5
HPN
17261.) ac_abs_top_srcdir=$ac_top_srcdir;;
17262*)
17263 case $ac_top_srcdir in
8ab705be 17264 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 17265 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 17266 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
17267 esac;;
17268esac
ba479fd2
NN
17269
17270
17271 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
17272echo "$as_me: executing $ac_dest commands" >&6;}
17273 case $ac_dest in
17274 default )
f1faaabd
NN
17275case ${CONFIG_HEADERS} in
17276 *auto-host.h:config.in*)
17277 echo > cstamp-h ;;
861bb6c1 17278esac
2ed26f6b 17279# Make sure all the subdirs exist.
3b620440 17280for d in $subdirs doc build
2ed26f6b 17281do
2ed26f6b 17282 test -d $d || mkdir $d
2ed26f6b 17283done
93cf819d
BK
17284# If the host supports symlinks, point stage[1234] at ../stage[1234] so
17285# bootstrapping and the installation procedure can still use
17286# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
17287# FLAGS_TO_PASS has been modified to solve the problem there.
17288# This is virtually a duplicate of what happens in configure.lang; we do
17289# an extra check to make sure this only happens if ln -s can be used.
35f06ae4
PB
17290case "$LN_S" in
17291 *-s*)
17292 for d in ${subdirs} ; do
1e6347d8 17293 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 17294 cd $d
6a1b7268 17295 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
17296 do
17297 rm -f $t
35f06ae4 17298 $LN_S ../$t $t 2>/dev/null
4e8a434e
BK
17299 done
17300 cd $STARTDIR
35f06ae4
PB
17301 done
17302 ;;
17303esac
ba479fd2
NN
17304 ;;
17305 esac
17306done
17307_ACEOF
cafe096b 17308
ba479fd2
NN
17309cat >>$CONFIG_STATUS <<\_ACEOF
17310
17311{ (exit 0); exit 0; }
17312_ACEOF
861bb6c1 17313chmod +x $CONFIG_STATUS
ba479fd2
NN
17314ac_clean_files=$ac_clean_files_save
17315
17316
17317# configure is writing to config.log, and then calls config.status.
17318# config.status does its own redirection, appending to config.log.
17319# Unfortunately, on DOS this fails, as config.log is still kept open
17320# by configure, so config.status won't be able to write to it; its
17321# output is simply discarded. So we exec the FD to /dev/null,
17322# effectively closing config.log, so it can be properly (re)opened and
17323# appended to by config.status. When coming back to configure, we
17324# need to make the FD available again.
17325if test "$no_create" != yes; then
17326 ac_cs_success=:
17327 ac_config_status_args=
17328 test "$silent" = yes &&
17329 ac_config_status_args="$ac_config_status_args --quiet"
17330 exec 5>/dev/null
17331 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17332 exec 5>>config.log
17333 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17334 # would make configure fail if this is the last instruction.
17335 $ac_cs_success || { (exit 1); exit 1; }
17336fi
861bb6c1 17337