]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
tree-inline.c (copy_body_r): Use CONSTANT_CLASS_P where possible.
[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
0bff65e7 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_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 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.
e1bbfc5c 870 Categories are: assert,fold,gc,gcac,misc,
b53ef395 871 rtlflag,rtl,runtime,tree,valgrind,release,yes,all;
74ee1642 872 --enable-mapped-location location_t is fileline integer cookie
ba479fd2 873 --enable-coverage=LEVEL
fb38008e 874 enable compiler's code coverage collection.
ba479fd2
NN
875 Use to measure compiler performance and locate
876 unused parts of the compiler. With LEVEL, specify
877 optimization. Values are opt, noopt,
878 default is noopt
879 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
880 --enable-multilib enable library support for multiple ABIs
881 --enable-__cxa_atexit enable __cxa_atexit for C++
882 --enable-threads enable thread usage for target GCC
883 --enable-threads=LIB use LIB thread package for target GCC
884 --enable-objc-gc enable the use of Boehm's garbage collector with
885 the GNU Objective-C runtime
886 --disable-shared don't provide a shared libgcc
887 --enable-intermodule build the compiler in one step
f3c9f174 888 --enable-languages=LIST specify which front-ends to build
dfb77e37 889 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
890 --enable-initfini-array use .init_array/.fini_array sections
891 --enable-sjlj-exceptions
892 arrange to use setjmp/longjmp exception handling
ba479fd2
NN
893 --disable-win32-registry
894 disable lookup of installation paths in the
895 Registry on Windows hosts
896 --enable-win32-registry enable registry lookup (default)
897 --enable-win32-registry=KEY
898 use KEY instead of GCC version as the last portion
899 of the registry key
900 --enable-maintainer-mode
901 enable make rules and dependencies not useful
902 (and sometimes confusing) to the casual installer
903 --enable-version-specific-runtime-libs
904 specify that runtime libraries should be
905 installed in a compiler-specific directory
093e61a6 906
ba479fd2
NN
907Optional Packages:
908 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
909 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
910 --with-local-prefix=DIR specifies directory to put local include
911 --with-gxx-include-dir=DIR
912 specifies directory to put g++ header files
913 --with-cpp-install-dir=DIR
914 install the user visible C preprocessor in DIR
915 (relative to PREFIX) as well as PREFIX/bin
916 --with-gnu-ld arrange to work with GNU ld.
917 --with-ld arrange to use the specified ld (full pathname)
d594623a 918 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
919 --with-gnu-as arrange to work with GNU as
920 --with-as arrange to use the specified as (full pathname)
921 --with-stabs arrange to use stabs instead of host debug format
922 --with-dwarf2 force the default debug format to be DWARF 2
923 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
dfb77e37
KC
924 --with-gnu-ld assume the C compiler uses GNU ld default=no
925 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
926 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 927 --with-system-libunwind use installed libunwind
59415997 928 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
929 with the compiler
930 --with-system-zlib use installed libz
931 --with-slibdir=DIR shared libraries in DIR LIBDIR
13c22933 932
ba479fd2
NN
933Some influential environment variables:
934 CC C compiler command
935 CFLAGS C compiler flags
936 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
937 nonstandard directory <lib dir>
938 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
939 headers in a nonstandard directory <include dir>
940 CPP C preprocessor
6de9cd9a
DN
941 GMPLIBS How to link GMP
942 GMPINC How to find GMP include files
13c22933 943
ba479fd2
NN
944Use these variables to override the choices made by `configure' or to help
945it to find libraries and programs with nonstandard names/locations.
73458fb7 946
ba479fd2
NN
947_ACEOF
948fi
6e3f3080 949
ba479fd2
NN
950if test "$ac_init_help" = "recursive"; then
951 # If there are subdirs, report their specific --help.
952 ac_popdir=`pwd`
953 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
954 test -d $ac_dir || continue
955 ac_builddir=.
956
957if test "$ac_dir" != .; then
958 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
959 # A "../" for each directory in $ac_dir_suffix.
960 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
961else
962 ac_dir_suffix= ac_top_builddir=
963fi
964
965case $srcdir in
966 .) # No --srcdir option. We are building in place.
967 ac_srcdir=.
968 if test -z "$ac_top_builddir"; then
969 ac_top_srcdir=.
970 else
971 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
972 fi ;;
973 [\\/]* | ?:[\\/]* ) # Absolute path.
974 ac_srcdir=$srcdir$ac_dir_suffix;
975 ac_top_srcdir=$srcdir ;;
976 *) # Relative path.
977 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
978 ac_top_srcdir=$ac_top_builddir$srcdir ;;
979esac
8ab705be
KC
980
981# Do not use `cd foo && pwd` to compute absolute paths, because
982# the directories may not exist.
983case `pwd` in
984.) ac_abs_builddir="$ac_dir";;
86da66b5 985*)
8ab705be
KC
986 case "$ac_dir" in
987 .) ac_abs_builddir=`pwd`;;
988 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
989 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
990 esac;;
991esac
8ab705be 992case $ac_abs_builddir in
86da66b5
HPN
993.) ac_abs_top_builddir=${ac_top_builddir}.;;
994*)
995 case ${ac_top_builddir}. in
8ab705be 996 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 997 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 998 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
999 esac;;
1000esac
8ab705be 1001case $ac_abs_builddir in
86da66b5
HPN
1002.) ac_abs_srcdir=$ac_srcdir;;
1003*)
1004 case $ac_srcdir in
8ab705be 1005 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 1006 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 1007 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
1008 esac;;
1009esac
8ab705be 1010case $ac_abs_builddir in
86da66b5
HPN
1011.) ac_abs_top_srcdir=$ac_top_srcdir;;
1012*)
1013 case $ac_top_srcdir in
8ab705be 1014 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 1015 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 1016 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
1017 esac;;
1018esac
ba479fd2
NN
1019
1020 cd $ac_dir
1021 # Check for guested configure; otherwise get Cygnus style configure.
1022 if test -f $ac_srcdir/configure.gnu; then
1023 echo
1024 $SHELL $ac_srcdir/configure.gnu --help=recursive
1025 elif test -f $ac_srcdir/configure; then
1026 echo
1027 $SHELL $ac_srcdir/configure --help=recursive
1028 elif test -f $ac_srcdir/configure.ac ||
86da66b5 1029 test -f $ac_srcdir/configure.in; then
ba479fd2
NN
1030 echo
1031 $ac_configure --help
1032 else
1033 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1034 fi
a1286ef5 1035 cd $ac_popdir
ba479fd2
NN
1036 done
1037fi
1038
1039test -n "$ac_init_help" && exit 0
1040if $ac_init_version; then
1041 cat <<\_ACEOF
1042
86da66b5 1043Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1044This configure script is free software; the Free Software Foundation
1045gives unlimited permission to copy, distribute and modify it.
1046_ACEOF
1047 exit 0
1048fi
1049exec 5>config.log
1050cat >&5 <<_ACEOF
1051This file contains any messages produced by compilers while
1052running configure, to aid debugging if configure makes a mistake.
1053
1054It was created by $as_me, which was
8ab705be 1055generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1056
1057 $ $0 $@
1058
1059_ACEOF
1060{
1061cat <<_ASUNAME
1062## --------- ##
1063## Platform. ##
1064## --------- ##
1065
1066hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1067uname -m = `(uname -m) 2>/dev/null || echo unknown`
1068uname -r = `(uname -r) 2>/dev/null || echo unknown`
1069uname -s = `(uname -s) 2>/dev/null || echo unknown`
1070uname -v = `(uname -v) 2>/dev/null || echo unknown`
1071
1072/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1073/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1074
1075/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1076/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1077/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1078hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1079/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1080/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1081/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1082
1083_ASUNAME
1084
1085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1086for as_dir in $PATH
1087do
1088 IFS=$as_save_IFS
1089 test -z "$as_dir" && as_dir=.
1090 echo "PATH: $as_dir"
1091done
1092
1093} >&5
1094
1095cat >&5 <<_ACEOF
1096
1097
1098## ----------- ##
1099## Core tests. ##
1100## ----------- ##
1101
1102_ACEOF
1103
1104
1105# Keep a trace of the command line.
1106# Strip out --no-create and --no-recursion so they do not pile up.
1107# Strip out --silent because we don't want to record it for future runs.
1108# Also quote any args containing shell meta-characters.
1109# Make two passes to allow for proper duplicate-argument suppression.
1110ac_configure_args=
1111ac_configure_args0=
1112ac_configure_args1=
1113ac_sep=
1114ac_must_keep_next=false
1115for ac_pass in 1 2
1116do
1117 for ac_arg
1118 do
1119 case $ac_arg in
1120 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1121 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1122 | -silent | --silent | --silen | --sile | --sil)
1123 continue ;;
1124 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1125 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1126 esac
1127 case $ac_pass in
1128 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1129 2)
1130 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1131 if test $ac_must_keep_next = true; then
86da66b5 1132 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1133 else
86da66b5
HPN
1134 case $ac_arg in
1135 *=* | --config-cache | -C | -disable-* | --disable-* \
1136 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1137 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1138 | -with-* | --with-* | -without-* | --without-* | --x)
1139 case "$ac_configure_args0 " in
1140 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1141 esac
1142 ;;
1143 -* ) ac_must_keep_next=true ;;
1144 esac
ba479fd2
NN
1145 fi
1146 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1147 # Get rid of the leading space.
1148 ac_sep=" "
1149 ;;
1150 esac
1151 done
1152done
1153$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1154$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1155
1156# When interrupted or exit'd, cleanup temporary files, and complete
1157# config.log. We remove comments because anyway the quotes in there
1158# would cause problems or look ugly.
1159# WARNING: Be sure not to use single quotes in there, as some shells,
1160# such as our DU 5.0 friend, will then `close' the trap.
1161trap 'exit_status=$?
1162 # Save into config.log some information that might help in debugging.
1163 {
1164 echo
1165
1166 cat <<\_ASBOX
1167## ---------------- ##
1168## Cache variables. ##
1169## ---------------- ##
1170_ASBOX
1171 echo
1172 # The following way of writing the cache mishandles newlines in values,
1173{
1174 (set) 2>&1 |
1175 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1176 *ac_space=\ *)
1177 sed -n \
86da66b5
HPN
1178 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1179 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
ba479fd2
NN
1180 ;;
1181 *)
1182 sed -n \
86da66b5 1183 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
1184 ;;
1185 esac;
1186}
1187 echo
1188
1189 cat <<\_ASBOX
1190## ----------------- ##
1191## Output variables. ##
1192## ----------------- ##
1193_ASBOX
1194 echo
1195 for ac_var in $ac_subst_vars
1196 do
1197 eval ac_val=$`echo $ac_var`
1198 echo "$ac_var='"'"'$ac_val'"'"'"
1199 done | sort
1200 echo
1201
1202 if test -n "$ac_subst_files"; then
1203 cat <<\_ASBOX
1204## ------------- ##
1205## Output files. ##
1206## ------------- ##
1207_ASBOX
1208 echo
1209 for ac_var in $ac_subst_files
1210 do
1211 eval ac_val=$`echo $ac_var`
86da66b5 1212 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1213 done | sort
1214 echo
1215 fi
1216
1217 if test -s confdefs.h; then
1218 cat <<\_ASBOX
1219## ----------- ##
1220## confdefs.h. ##
1221## ----------- ##
1222_ASBOX
1223 echo
1224 sed "/^$/d" confdefs.h | sort
1225 echo
1226 fi
1227 test "$ac_signal" != 0 &&
1228 echo "$as_me: caught signal $ac_signal"
1229 echo "$as_me: exit $exit_status"
1230 } >&5
86da66b5 1231 rm -f core *.core &&
ba479fd2
NN
1232 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1233 exit $exit_status
1234 ' 0
1235for ac_signal in 1 2 13 15; do
1236 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1237done
1238ac_signal=0
1239
1240# confdefs.h avoids OS command line length limits that DEFS can exceed.
1241rm -rf conftest* confdefs.h
1242# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1243echo >confdefs.h
1244
1245# Predefined preprocessor variables.
1246
1247cat >>confdefs.h <<_ACEOF
1248#define PACKAGE_NAME "$PACKAGE_NAME"
1249_ACEOF
1250
1251
1252cat >>confdefs.h <<_ACEOF
1253#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1254_ACEOF
1255
1256
1257cat >>confdefs.h <<_ACEOF
1258#define PACKAGE_VERSION "$PACKAGE_VERSION"
1259_ACEOF
1260
1261
1262cat >>confdefs.h <<_ACEOF
1263#define PACKAGE_STRING "$PACKAGE_STRING"
1264_ACEOF
1265
1266
1267cat >>confdefs.h <<_ACEOF
1268#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1269_ACEOF
1270
1271
1272# Let the site file select an alternate cache file if it wants to.
1273# Prefer explicitly selected file to automatically selected ones.
1274if test -z "$CONFIG_SITE"; then
1275 if test "x$prefix" != xNONE; then
1276 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1277 else
1278 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1279 fi
1280fi
1281for ac_site_file in $CONFIG_SITE; do
1282 if test -r "$ac_site_file"; then
1283 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1284echo "$as_me: loading site script $ac_site_file" >&6;}
1285 sed 's/^/| /' "$ac_site_file" >&5
1286 . "$ac_site_file"
1287 fi
1288done
1289
1290if test -r "$cache_file"; then
1291 # Some versions of bash will fail to source /dev/null (special
1292 # files actually), so we avoid doing that.
1293 if test -f "$cache_file"; then
1294 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1295echo "$as_me: loading cache $cache_file" >&6;}
1296 case $cache_file in
1297 [\\/]* | ?:[\\/]* ) . $cache_file;;
1298 *) . ./$cache_file;;
1299 esac
1300 fi
1301else
1302 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1303echo "$as_me: creating cache $cache_file" >&6;}
1304 >$cache_file
1305fi
1306
1307# Check that the precious variables saved in the cache have kept the same
1308# value.
1309ac_cache_corrupted=false
1310for ac_var in `(set) 2>&1 |
86da66b5 1311 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1312 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1313 eval ac_new_set=\$ac_env_${ac_var}_set
1314 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1315 eval ac_new_val="\$ac_env_${ac_var}_value"
1316 case $ac_old_set,$ac_new_set in
1317 set,)
1318 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1319echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1320 ac_cache_corrupted=: ;;
1321 ,set)
1322 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1323echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1324 ac_cache_corrupted=: ;;
1325 ,);;
1326 *)
1327 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1328 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1329echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1330 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1331echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1332 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1333echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1334 ac_cache_corrupted=:
ba479fd2
NN
1335 fi;;
1336 esac
1337 # Pass precious variables to config.status.
1338 if test "$ac_new_set" = set; then
1339 case $ac_new_val in
1340 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1341 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1342 *) ac_arg=$ac_var=$ac_new_val ;;
1343 esac
1344 case " $ac_configure_args " in
1345 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1346 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1347 esac
1348 fi
1349done
1350if $ac_cache_corrupted; then
1351 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1352echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1353 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1354echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1355 { (exit 1); exit 1; }; }
1356fi
1357
1358ac_ext=c
1359ac_cpp='$CPP $CPPFLAGS'
1360ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1361ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1362ac_compiler_gnu=$ac_cv_c_compiler_gnu
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
914c5af7 1382
ba479fd2
NN
1383 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1384
1385
1386# Determine the host, build, and target systems
1387ac_aux_dir=
1388for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1389 if test -f $ac_dir/install-sh; then
1390 ac_aux_dir=$ac_dir
1391 ac_install_sh="$ac_aux_dir/install-sh -c"
1392 break
1393 elif test -f $ac_dir/install.sh; then
1394 ac_aux_dir=$ac_dir
1395 ac_install_sh="$ac_aux_dir/install.sh -c"
1396 break
1397 elif test -f $ac_dir/shtool; then
1398 ac_aux_dir=$ac_dir
1399 ac_install_sh="$ac_aux_dir/shtool install -c"
1400 break
1401 fi
1402done
1403if test -z "$ac_aux_dir"; then
1404 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1405echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1406 { (exit 1); exit 1; }; }
1407fi
1408ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1409ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1410ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1411
1412# Make sure we can run config.sub.
1413$ac_config_sub sun4 >/dev/null 2>&1 ||
1414 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1415echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1416 { (exit 1); exit 1; }; }
1417
1418echo "$as_me:$LINENO: checking build system type" >&5
1419echo $ECHO_N "checking build system type... $ECHO_C" >&6
1420if test "${ac_cv_build+set}" = set; then
1421 echo $ECHO_N "(cached) $ECHO_C" >&6
1422else
1423 ac_cv_build_alias=$build_alias
1424test -z "$ac_cv_build_alias" &&
1425 ac_cv_build_alias=`$ac_config_guess`
1426test -z "$ac_cv_build_alias" &&
1427 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1428echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1429 { (exit 1); exit 1; }; }
1430ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1431 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1432echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1433 { (exit 1); exit 1; }; }
1434
1435fi
1436echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1437echo "${ECHO_T}$ac_cv_build" >&6
1438build=$ac_cv_build
1439build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1440build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1441build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1442
1443
1444echo "$as_me:$LINENO: checking host system type" >&5
1445echo $ECHO_N "checking host system type... $ECHO_C" >&6
1446if test "${ac_cv_host+set}" = set; then
1447 echo $ECHO_N "(cached) $ECHO_C" >&6
1448else
1449 ac_cv_host_alias=$host_alias
1450test -z "$ac_cv_host_alias" &&
1451 ac_cv_host_alias=$ac_cv_build_alias
1452ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1453 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1454echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1455 { (exit 1); exit 1; }; }
1456
1457fi
1458echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1459echo "${ECHO_T}$ac_cv_host" >&6
1460host=$ac_cv_host
1461host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1462host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1463host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1464
1465
1466echo "$as_me:$LINENO: checking target system type" >&5
1467echo $ECHO_N "checking target system type... $ECHO_C" >&6
1468if test "${ac_cv_target+set}" = set; then
1469 echo $ECHO_N "(cached) $ECHO_C" >&6
1470else
1471 ac_cv_target_alias=$target_alias
1472test "x$ac_cv_target_alias" = "x" &&
1473 ac_cv_target_alias=$ac_cv_host_alias
1474ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1475 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1476echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1477 { (exit 1); exit 1; }; }
1478
1479fi
1480echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1481echo "${ECHO_T}$ac_cv_target" >&6
1482target=$ac_cv_target
1483target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1484target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1485target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1486
1487
1488# The aliases save the names the user supplied, while $host etc.
1489# will get canonicalized.
1490test -n "$target_alias" &&
1491 test "$program_prefix$program_suffix$program_transform_name" = \
1492 NONENONEs,x,x, &&
1493 program_prefix=${target_alias}-
1494
1495# Determine the noncanonical target name, for directory use.
1496 case ${build_alias} in
1497 "") build_noncanonical=${build} ;;
6e3f3080
NN
1498 *) build_noncanonical=${build_alias} ;;
1499esac
73458fb7 1500
4665e56c
NN
1501 case ${host_alias} in
1502 "") host_noncanonical=${build_noncanonical} ;;
1503 *) host_noncanonical=${host_alias} ;;
1504esac
73458fb7 1505
4665e56c
NN
1506 case ${target_alias} in
1507 "") target_noncanonical=${host_noncanonical} ;;
1508 *) target_noncanonical=${target_alias} ;;
1509esac
093e61a6 1510
8f1529e6
L
1511
1512
1513
1514# Determine the target- and build-specific subdirectories
4665e56c
NN
1515 # Prefix 'build-' so this never conflicts with target_subdir.
1516build_subdir="build-${build_noncanonical}"
215c351a
PB
1517# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1518if ( test $srcdir = . && test -d gcc ) \
1519 || test -d $srcdir/../host-${host_noncanonical}; then
1520 host_subdir="host-${host_noncanonical}"
1521else
1522 host_subdir=.
1523fi
4665e56c
NN
1524# No prefix.
1525target_subdir=${target_noncanonical}
ba479fd2 1526
73458fb7 1527
093e61a6 1528# Set program_transform_name
13c22933 1529test "$program_prefix" != NONE &&
ba479fd2 1530 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1531# Use a double $ so make ignores it.
1532test "$program_suffix" != NONE &&
ba479fd2
NN
1533 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1534# Double any \ or $. echo might interpret backslashes.
1535# By default was `s,x,x', remove it if useless.
1536cat <<\_ACEOF >conftest.sed
1537s/[\\$]/&&/g;s/;s,x,x,$//
1538_ACEOF
1539program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1540rm conftest.sed
13c22933
JJ
1541
1542
34a86c2b
NN
1543# Check for bogus environment variables.
1544# Test if LIBRARY_PATH contains the notation for the current directory
1545# since this would lead to problems installing/building glibc.
1546# LIBRARY_PATH contains the current directory if one of the following
1547# is true:
1548# - one of the terminals (":" and ";") is the first or last sign
1549# - two terminals occur directly after each other
1550# - the path contains an element with a dot in it
ba479fd2
NN
1551echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1552echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1553case ${LIBRARY_PATH} in
1554 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1555 library_path_setting="contains current directory"
1556 ;;
1557 *)
1558 library_path_setting="ok"
1559 ;;
1560esac
ba479fd2
NN
1561echo "$as_me:$LINENO: result: $library_path_setting" >&5
1562echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1563if test "$library_path_setting" != "ok"; then
ba479fd2 1564{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1565*** LIBRARY_PATH shouldn't contain the current directory when
1566*** building gcc. Please change the environment variable
ba479fd2
NN
1567*** and run configure again." >&5
1568echo "$as_me: error:
1569*** LIBRARY_PATH shouldn't contain the current directory when
1570*** building gcc. Please change the environment variable
1571*** and run configure again." >&2;}
1572 { (exit 1); exit 1; }; }
e9a25f70
JL
1573fi
1574
34a86c2b
NN
1575# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1576# since this would lead to problems installing/building glibc.
1577# GCC_EXEC_PREFIX contains the current directory if one of the following
1578# is true:
1579# - one of the terminals (":" and ";") is the first or last sign
1580# - two terminals occur directly after each other
1581# - the path contains an element with a dot in it
ba479fd2
NN
1582echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1583echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1584case ${GCC_EXEC_PREFIX} in
1585 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1586 gcc_exec_prefix_setting="contains current directory"
1587 ;;
1588 *)
1589 gcc_exec_prefix_setting="ok"
1590 ;;
1591esac
ba479fd2
NN
1592echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1593echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1594if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1595{ { echo "$as_me:$LINENO: error:
1596*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1597*** building gcc. Please change the environment variable
1598*** and run configure again." >&5
1599echo "$as_me: error:
cafe096b
EC
1600*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1601*** building gcc. Please change the environment variable
ba479fd2
NN
1602*** and run configure again." >&2;}
1603 { (exit 1); exit 1; }; }
34a86c2b
NN
1604fi
1605
1606# -----------
1607# Directories
1608# -----------
1609
1610# Specify the local prefix
1611local_prefix=
ba479fd2 1612
34a86c2b
NN
1613# Check whether --with-local-prefix or --without-local-prefix was given.
1614if test "${with_local_prefix+set}" = set; then
1615 withval="$with_local_prefix"
1616 case "${withval}" in
ba479fd2
NN
1617yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1618echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1619 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1620no) ;;
1621*) local_prefix=$with_local_prefix ;;
1622esac
ba479fd2 1623fi;
34a86c2b
NN
1624
1625# Default local prefix if it is empty
1626if test x$local_prefix = x; then
1627 local_prefix=/usr/local
1628fi
1629
1630# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1631# passed in by the toplevel make and thus we'd get different behavior
1632# depending on where we built the sources.
1633gcc_gxx_include_dir=
1634# Specify the g++ header file directory
ba479fd2 1635
34a86c2b
NN
1636# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1637if test "${with_gxx_include_dir+set}" = set; then
1638 withval="$with_gxx_include_dir"
1639 case "${withval}" in
ba479fd2
NN
1640yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1641echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1642 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1643no) ;;
1644*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1645esac
ba479fd2 1646fi;
34a86c2b
NN
1647
1648if test x${gcc_gxx_include_dir} = x; then
1649 if test x${enable_version_specific_runtime_libs} = xyes; then
1650 gcc_gxx_include_dir='${libsubdir}/include/c++'
1651 else
a1286ef5 1652 libstdcxx_incdir='c++/$(version)'
34a86c2b
NN
1653 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
1654 fi
1655fi
1656
ba479fd2 1657
34a86c2b
NN
1658# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1659if test "${with_cpp_install_dir+set}" = set; then
1660 withval="$with_cpp_install_dir"
1661 if test x$withval = xyes; then
ba479fd2
NN
1662 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1663echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1664 { (exit 1); exit 1; }; }
34a86c2b
NN
1665elif test x$withval != xno; then
1666 cpp_install_dir=$withval
1667fi
ba479fd2 1668fi;
34a86c2b 1669
51b9ff45 1670# We would like to our source tree to be readonly. However when releases or
ba479fd2 1671# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1672# various formats of manuals need to be included along with the rest of the
ba479fd2 1673# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1674# just that.
1675
03787dfd
KC
1676echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1677echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1678 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45
KC
1679if test "${enable_generated_files_in_srcdir+set}" = set; then
1680 enableval="$enable_generated_files_in_srcdir"
03787dfd 1681 generated_files_in_srcdir=$enableval
51b9ff45 1682else
03787dfd 1683 generated_files_in_srcdir=no
ba479fd2 1684fi;
51b9ff45 1685
03787dfd
KC
1686echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1687echo "${ECHO_T}$generated_files_in_srcdir" >&6
1688
1689if test "$generated_files_in_srcdir" = "yes"; then
1690 GENINSRC=''
03787dfd
KC
1691else
1692 GENINSRC='#'
03787dfd
KC
1693fi
1694
1695
34a86c2b
NN
1696# -------------------
1697# Find default linker
1698# -------------------
1699
1700# With GNU ld
ba479fd2 1701
34a86c2b
NN
1702# Check whether --with-gnu-ld or --without-gnu-ld was given.
1703if test "${with_gnu_ld+set}" = set; then
1704 withval="$with_gnu_ld"
1705 gnu_ld_flag="$with_gnu_ld"
1706else
1707 gnu_ld_flag=no
ba479fd2 1708fi;
6e3f3080 1709
63cf211a 1710# With pre-defined ld
ba479fd2 1711
34a86c2b
NN
1712# Check whether --with-ld or --without-ld was given.
1713if test "${with_ld+set}" = set; then
1714 withval="$with_ld"
1715 DEFAULT_LINKER="$with_ld"
ba479fd2 1716fi;
34a86c2b
NN
1717if test x"${DEFAULT_LINKER+set}" = x"set"; then
1718 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1719 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1720echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1721 { (exit 1); exit 1; }; }
34a86c2b
NN
1722 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1723 gnu_ld_flag=yes
1724 fi
ba479fd2
NN
1725
1726cat >>confdefs.h <<_ACEOF
34a86c2b 1727#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1728_ACEOF
34a86c2b
NN
1729
1730fi
1731
ba479fd2
NN
1732echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1733echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1734if test x"${DEFAULT_LINKER+set}" = x"set"; then
1735 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1736 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1737echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1738 else
ba479fd2
NN
1739 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1740echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1741 fi
1742else
ba479fd2
NN
1743 echo "$as_me:$LINENO: result: no" >&5
1744echo "${ECHO_T}no" >&6
34a86c2b
NN
1745fi
1746
d594623a
L
1747# With demangler in GNU ld
1748
1749# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
1750if test "${with_demangler_in_ld+set}" = set; then
1751 withval="$with_demangler_in_ld"
1752 demangler_in_ld="$with_demangler_in_ld"
1753else
1754 demangler_in_ld=no
1755fi;
1756
34a86c2b
NN
1757# ----------------------
1758# Find default assembler
1759# ----------------------
1760
1761# With GNU as
ba479fd2 1762
34a86c2b
NN
1763# Check whether --with-gnu-as or --without-gnu-as was given.
1764if test "${with_gnu_as+set}" = set; then
1765 withval="$with_gnu_as"
1766 gas_flag="$with_gnu_as"
1767else
1768 gas_flag=no
ba479fd2 1769fi;
34a86c2b
NN
1770
1771
1772# Check whether --with-as or --without-as was given.
1773if test "${with_as+set}" = set; then
1774 withval="$with_as"
1775 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1776fi;
34a86c2b
NN
1777if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1778 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1779 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1780echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1781 { (exit 1); exit 1; }; }
34a86c2b
NN
1782 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1783 gas_flag=yes
1784 fi
ba479fd2
NN
1785
1786cat >>confdefs.h <<_ACEOF
34a86c2b 1787#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1788_ACEOF
34a86c2b
NN
1789
1790fi
1791
ba479fd2
NN
1792echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1793echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1794if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1795 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1796 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1797echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1798 else
ba479fd2
NN
1799 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1800echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1801 fi
1802else
ba479fd2
NN
1803 echo "$as_me:$LINENO: result: no" >&5
1804echo "${ECHO_T}no" >&6
34a86c2b
NN
1805fi
1806
1807# ---------------
1808# Find C compiler
1809# ---------------
1810
426ca3ca
RO
1811# If a non-executable a.out is present (e.g. created by GNU as above even if
1812# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1813# file, even when creating an executable, so an execution test fails.
1814# Remove possible default executable files to avoid this.
1815#
1816# FIXME: This really belongs into AC_PROG_CC and can be removed once
1817# Autoconf includes it.
1818rm -f a.out a.exe b.out
1819
34a86c2b 1820# Find the native compiler
ba479fd2
NN
1821ac_ext=c
1822ac_cpp='$CPP $CPPFLAGS'
1823ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1824ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1825ac_compiler_gnu=$ac_cv_c_compiler_gnu
1826if test -n "$ac_tool_prefix"; then
1827 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1828set dummy ${ac_tool_prefix}gcc; ac_word=$2
1829echo "$as_me:$LINENO: checking for $ac_word" >&5
1830echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1831if test "${ac_cv_prog_CC+set}" = set; then
1832 echo $ECHO_N "(cached) $ECHO_C" >&6
1833else
1834 if test -n "$CC"; then
1835 ac_cv_prog_CC="$CC" # Let the user override the test.
1836else
1837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1838for as_dir in $PATH
1839do
1840 IFS=$as_save_IFS
1841 test -z "$as_dir" && as_dir=.
1842 for ac_exec_ext in '' $ac_executable_extensions; do
1843 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1844 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1845 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1846 break 2
1847 fi
1848done
1849done
1850
1851fi
1852fi
1853CC=$ac_cv_prog_CC
1854if test -n "$CC"; then
1855 echo "$as_me:$LINENO: result: $CC" >&5
1856echo "${ECHO_T}$CC" >&6
1857else
1858 echo "$as_me:$LINENO: result: no" >&5
1859echo "${ECHO_T}no" >&6
1860fi
1861
1862fi
1863if test -z "$ac_cv_prog_CC"; then
1864 ac_ct_CC=$CC
1865 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1866set dummy gcc; ac_word=$2
ba479fd2
NN
1867echo "$as_me:$LINENO: checking for $ac_word" >&5
1868echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1869if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1870 echo $ECHO_N "(cached) $ECHO_C" >&6
1871else
1872 if test -n "$ac_ct_CC"; then
1873 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1874else
1875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1876for as_dir in $PATH
1877do
1878 IFS=$as_save_IFS
1879 test -z "$as_dir" && as_dir=.
1880 for ac_exec_ext in '' $ac_executable_extensions; do
1881 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1882 ac_cv_prog_ac_ct_CC="gcc"
1883 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1884 break 2
1885 fi
1886done
1887done
1888
1889fi
1890fi
1891ac_ct_CC=$ac_cv_prog_ac_ct_CC
1892if test -n "$ac_ct_CC"; then
1893 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1894echo "${ECHO_T}$ac_ct_CC" >&6
1895else
1896 echo "$as_me:$LINENO: result: no" >&5
1897echo "${ECHO_T}no" >&6
1898fi
1899
1900 CC=$ac_ct_CC
1901else
1902 CC="$ac_cv_prog_CC"
1903fi
1904
1905if test -z "$CC"; then
1906 if test -n "$ac_tool_prefix"; then
1907 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1908set dummy ${ac_tool_prefix}cc; ac_word=$2
1909echo "$as_me:$LINENO: checking for $ac_word" >&5
1910echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1911if test "${ac_cv_prog_CC+set}" = set; then
1912 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1913else
1914 if test -n "$CC"; then
1915 ac_cv_prog_CC="$CC" # Let the user override the test.
1916else
ba479fd2
NN
1917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1918for as_dir in $PATH
1919do
1920 IFS=$as_save_IFS
1921 test -z "$as_dir" && as_dir=.
1922 for ac_exec_ext in '' $ac_executable_extensions; do
1923 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1924 ac_cv_prog_CC="${ac_tool_prefix}cc"
1925 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1926 break 2
1927 fi
1928done
1929done
1930
cd9e5e7c
MK
1931fi
1932fi
ba479fd2 1933CC=$ac_cv_prog_CC
cd9e5e7c 1934if test -n "$CC"; then
ba479fd2
NN
1935 echo "$as_me:$LINENO: result: $CC" >&5
1936echo "${ECHO_T}$CC" >&6
1937else
1938 echo "$as_me:$LINENO: result: no" >&5
1939echo "${ECHO_T}no" >&6
1940fi
1941
1942fi
1943if test -z "$ac_cv_prog_CC"; then
1944 ac_ct_CC=$CC
1945 # Extract the first word of "cc", so it can be a program name with args.
1946set dummy cc; ac_word=$2
1947echo "$as_me:$LINENO: checking for $ac_word" >&5
1948echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1949if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1950 echo $ECHO_N "(cached) $ECHO_C" >&6
1951else
1952 if test -n "$ac_ct_CC"; then
1953 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1954else
1955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1956for as_dir in $PATH
1957do
1958 IFS=$as_save_IFS
1959 test -z "$as_dir" && as_dir=.
1960 for ac_exec_ext in '' $ac_executable_extensions; do
1961 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1962 ac_cv_prog_ac_ct_CC="cc"
1963 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1964 break 2
1965 fi
1966done
1967done
1968
1969fi
1970fi
1971ac_ct_CC=$ac_cv_prog_ac_ct_CC
1972if test -n "$ac_ct_CC"; then
1973 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1974echo "${ECHO_T}$ac_ct_CC" >&6
1975else
1976 echo "$as_me:$LINENO: result: no" >&5
1977echo "${ECHO_T}no" >&6
1978fi
1979
1980 CC=$ac_ct_CC
cd9e5e7c 1981else
ba479fd2 1982 CC="$ac_cv_prog_CC"
e9a25f70 1983fi
6e3f3080 1984
ba479fd2 1985fi
6e3f3080
NN
1986if test -z "$CC"; then
1987 # Extract the first word of "cc", so it can be a program name with args.
1988set dummy cc; ac_word=$2
ba479fd2
NN
1989echo "$as_me:$LINENO: checking for $ac_word" >&5
1990echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1991if test "${ac_cv_prog_CC+set}" = set; then
1992 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
1993else
1994 if test -n "$CC"; then
1995 ac_cv_prog_CC="$CC" # Let the user override the test.
1996else
1997 ac_prog_rejected=no
ba479fd2
NN
1998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1999for as_dir in $PATH
2000do
2001 IFS=$as_save_IFS
2002 test -z "$as_dir" && as_dir=.
2003 for ac_exec_ext in '' $ac_executable_extensions; do
2004 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2005 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2006 ac_prog_rejected=yes
2007 continue
2008 fi
2009 ac_cv_prog_CC="cc"
2010 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2011 break 2
2012 fi
2013done
2014done
2015
6e3f3080
NN
2016if test $ac_prog_rejected = yes; then
2017 # We found a bogon in the path, so make sure we never use it.
2018 set dummy $ac_cv_prog_CC
2019 shift
ba479fd2 2020 if test $# != 0; then
6e3f3080
NN
2021 # We chose a different compiler from the bogus one.
2022 # However, it has the same basename, so the bogon will be chosen
2023 # first if we set CC to just the basename; use the full file name.
2024 shift
ba479fd2 2025 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2026 fi
6e3f3080
NN
2027fi
2028fi
2029fi
ba479fd2 2030CC=$ac_cv_prog_CC
6e3f3080 2031if test -n "$CC"; then
ba479fd2
NN
2032 echo "$as_me:$LINENO: result: $CC" >&5
2033echo "${ECHO_T}$CC" >&6
e9a25f70 2034else
ba479fd2
NN
2035 echo "$as_me:$LINENO: result: no" >&5
2036echo "${ECHO_T}no" >&6
e9a25f70 2037fi
6e3f3080 2038
ba479fd2
NN
2039fi
2040if test -z "$CC"; then
2041 if test -n "$ac_tool_prefix"; then
2042 for ac_prog in cl
2043 do
2044 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2045set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2046echo "$as_me:$LINENO: checking for $ac_word" >&5
2047echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2048if test "${ac_cv_prog_CC+set}" = set; then
2049 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2050else
6e3f3080
NN
2051 if test -n "$CC"; then
2052 ac_cv_prog_CC="$CC" # Let the user override the test.
2053else
ba479fd2
NN
2054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2055for as_dir in $PATH
2056do
2057 IFS=$as_save_IFS
2058 test -z "$as_dir" && as_dir=.
2059 for ac_exec_ext in '' $ac_executable_extensions; do
2060 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2061 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2062 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2063 break 2
2064 fi
2065done
2066done
2067
093e61a6 2068fi
6e3f3080 2069fi
ba479fd2 2070CC=$ac_cv_prog_CC
6e3f3080 2071if test -n "$CC"; then
ba479fd2
NN
2072 echo "$as_me:$LINENO: result: $CC" >&5
2073echo "${ECHO_T}$CC" >&6
6e3f3080 2074else
ba479fd2
NN
2075 echo "$as_me:$LINENO: result: no" >&5
2076echo "${ECHO_T}no" >&6
093e61a6 2077fi
cafe096b 2078
ba479fd2
NN
2079 test -n "$CC" && break
2080 done
2081fi
2082if test -z "$CC"; then
2083 ac_ct_CC=$CC
2084 for ac_prog in cl
2085do
2086 # Extract the first word of "$ac_prog", so it can be a program name with args.
2087set dummy $ac_prog; ac_word=$2
2088echo "$as_me:$LINENO: checking for $ac_word" >&5
2089echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2090if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2091 echo $ECHO_N "(cached) $ECHO_C" >&6
2092else
2093 if test -n "$ac_ct_CC"; then
2094 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2095else
2096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2097for as_dir in $PATH
2098do
2099 IFS=$as_save_IFS
2100 test -z "$as_dir" && as_dir=.
2101 for ac_exec_ext in '' $ac_executable_extensions; do
2102 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2103 ac_cv_prog_ac_ct_CC="$ac_prog"
2104 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2105 break 2
2106 fi
2107done
2108done
6e3f3080 2109
ba479fd2
NN
2110fi
2111fi
2112ac_ct_CC=$ac_cv_prog_ac_ct_CC
2113if test -n "$ac_ct_CC"; then
2114 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2115echo "${ECHO_T}$ac_ct_CC" >&6
2116else
2117 echo "$as_me:$LINENO: result: no" >&5
2118echo "${ECHO_T}no" >&6
2119fi
6e3f3080 2120
ba479fd2
NN
2121 test -n "$ac_ct_CC" && break
2122done
63cf211a 2123
ba479fd2
NN
2124 CC=$ac_ct_CC
2125fi
2126
2127fi
2128
2129
2130test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2131See \`config.log' for more details." >&5
2132echo "$as_me: error: no acceptable C compiler found in \$PATH
2133See \`config.log' for more details." >&2;}
2134 { (exit 1); exit 1; }; }
2135
2136# Provide some information about the compiler.
2137echo "$as_me:$LINENO:" \
2138 "checking for C compiler version" >&5
2139ac_compiler=`set X $ac_compile; echo $2`
2140{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2141 (eval $ac_compiler --version </dev/null >&5) 2>&5
2142 ac_status=$?
2143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2144 (exit $ac_status); }
2145{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2146 (eval $ac_compiler -v </dev/null >&5) 2>&5
2147 ac_status=$?
2148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2149 (exit $ac_status); }
2150{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2151 (eval $ac_compiler -V </dev/null >&5) 2>&5
2152 ac_status=$?
2153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2154 (exit $ac_status); }
2155
2156cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2157/* confdefs.h. */
2158_ACEOF
2159cat confdefs.h >>conftest.$ac_ext
2160cat >>conftest.$ac_ext <<_ACEOF
2161/* end confdefs.h. */
2162
2163int
2164main ()
2165{
63cf211a 2166
ba479fd2
NN
2167 ;
2168 return 0;
2169}
2170_ACEOF
2171ac_clean_files_save=$ac_clean_files
2172ac_clean_files="$ac_clean_files a.out a.exe b.out"
2173# Try to create an executable without -o first, disregard a.out.
2174# It will help us diagnose broken compilers, and finding out an intuition
2175# of exeext.
86da66b5
HPN
2176echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2177echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2
NN
2178ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2179if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2180 (eval $ac_link_default) 2>&5
2181 ac_status=$?
2182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2183 (exit $ac_status); }; then
2184 # Find the output, starting from the most likely. This scheme is
2185# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2186# resort.
2187
2188# Be careful to initialize this variable, since it used to be cached.
2189# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2190ac_cv_exeext=
2191# b.out is created by i960 compilers.
2192for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2193do
2194 test -f "$ac_file" || continue
2195 case $ac_file in
2196 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
86da66b5 2197 ;;
ba479fd2 2198 conftest.$ac_ext )
86da66b5
HPN
2199 # This is the source file.
2200 ;;
ba479fd2 2201 [ab].out )
86da66b5
HPN
2202 # We found the default executable, but exeext='' is most
2203 # certainly right.
2204 break;;
ba479fd2 2205 *.* )
86da66b5
HPN
2206 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2207 # FIXME: I believe we export ac_cv_exeext for Libtool,
2208 # but it would be cool to find out if it's true. Does anybody
2209 # maintain Libtool? --akim.
2210 export ac_cv_exeext
2211 break;;
ba479fd2 2212 * )
86da66b5 2213 break;;
ba479fd2
NN
2214 esac
2215done
2216else
2217 echo "$as_me: failed program was:" >&5
2218sed 's/^/| /' conftest.$ac_ext >&5
2219
2220{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2221See \`config.log' for more details." >&5
2222echo "$as_me: error: C compiler cannot create executables
2223See \`config.log' for more details." >&2;}
2224 { (exit 77); exit 77; }; }
2225fi
2226
2227ac_exeext=$ac_cv_exeext
2228echo "$as_me:$LINENO: result: $ac_file" >&5
2229echo "${ECHO_T}$ac_file" >&6
2230
2231# Check the compiler produces executables we can run. If not, either
2232# the compiler is broken, or we cross compile.
2233echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2234echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2235# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2236# If not cross compiling, check that we can run a simple program.
2237if test "$cross_compiling" != yes; then
2238 if { ac_try='./$ac_file'
2239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2240 (eval $ac_try) 2>&5
2241 ac_status=$?
2242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2243 (exit $ac_status); }; }; then
2244 cross_compiling=no
6e3f3080 2245 else
ba479fd2
NN
2246 if test "$cross_compiling" = maybe; then
2247 cross_compiling=yes
2248 else
2249 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2250If you meant to cross compile, use \`--host'.
2251See \`config.log' for more details." >&5
2252echo "$as_me: error: cannot run C compiled programs.
2253If you meant to cross compile, use \`--host'.
2254See \`config.log' for more details." >&2;}
2255 { (exit 1); exit 1; }; }
2256 fi
6e3f3080
NN
2257 fi
2258fi
ba479fd2
NN
2259echo "$as_me:$LINENO: result: yes" >&5
2260echo "${ECHO_T}yes" >&6
2261
2262rm -f a.out a.exe conftest$ac_cv_exeext b.out
2263ac_clean_files=$ac_clean_files_save
2264# Check the compiler produces executables we can run. If not, either
2265# the compiler is broken, or we cross compile.
2266echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2267echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2268echo "$as_me:$LINENO: result: $cross_compiling" >&5
2269echo "${ECHO_T}$cross_compiling" >&6
2270
2271echo "$as_me:$LINENO: checking for suffix of executables" >&5
2272echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2273if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2274 (eval $ac_link) 2>&5
2275 ac_status=$?
2276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2277 (exit $ac_status); }; then
2278 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2279# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2280# work properly (i.e., refer to `conftest.exe'), while it won't with
2281# `rm'.
2282for ac_file in conftest.exe conftest conftest.*; do
2283 test -f "$ac_file" || continue
2284 case $ac_file in
2285 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2286 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
86da66b5
HPN
2287 export ac_cv_exeext
2288 break;;
ba479fd2
NN
2289 * ) break;;
2290 esac
2291done
e9a25f70 2292else
ba479fd2
NN
2293 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2294See \`config.log' for more details." >&5
2295echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2296See \`config.log' for more details." >&2;}
2297 { (exit 1); exit 1; }; }
2298fi
2299
2300rm -f conftest$ac_cv_exeext
2301echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2302echo "${ECHO_T}$ac_cv_exeext" >&6
2303
2304rm -f conftest.$ac_ext
2305EXEEXT=$ac_cv_exeext
2306ac_exeext=$EXEEXT
2307echo "$as_me:$LINENO: checking for suffix of object files" >&5
2308echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2309if test "${ac_cv_objext+set}" = set; then
2310 echo $ECHO_N "(cached) $ECHO_C" >&6
2311else
2312 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2313/* confdefs.h. */
2314_ACEOF
2315cat confdefs.h >>conftest.$ac_ext
2316cat >>conftest.$ac_ext <<_ACEOF
2317/* end confdefs.h. */
2318
2319int
2320main ()
2321{
6e3f3080 2322
ba479fd2
NN
2323 ;
2324 return 0;
2325}
2326_ACEOF
2327rm -f conftest.o conftest.obj
2328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2329 (eval $ac_compile) 2>&5
2330 ac_status=$?
2331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2332 (exit $ac_status); }; then
2333 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2334 case $ac_file in
2335 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2336 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2337 break;;
2338 esac
2339done
63cf211a 2340else
ba479fd2
NN
2341 echo "$as_me: failed program was:" >&5
2342sed 's/^/| /' conftest.$ac_ext >&5
2343
2344{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2345See \`config.log' for more details." >&5
2346echo "$as_me: error: cannot compute suffix of object files: cannot compile
2347See \`config.log' for more details." >&2;}
2348 { (exit 1); exit 1; }; }
2349fi
2350
2351rm -f conftest.$ac_cv_objext conftest.$ac_ext
2352fi
2353echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2354echo "${ECHO_T}$ac_cv_objext" >&6
2355OBJEXT=$ac_cv_objext
2356ac_objext=$OBJEXT
2357echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2358echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2359if test "${ac_cv_c_compiler_gnu+set}" = set; then
2360 echo $ECHO_N "(cached) $ECHO_C" >&6
2361else
2362 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2363/* confdefs.h. */
2364_ACEOF
2365cat confdefs.h >>conftest.$ac_ext
2366cat >>conftest.$ac_ext <<_ACEOF
2367/* end confdefs.h. */
2368
2369int
2370main ()
2371{
2372#ifndef __GNUC__
2373 choke me
2374#endif
6e3f3080 2375
ba479fd2
NN
2376 ;
2377 return 0;
2378}
2379_ACEOF
2380rm -f conftest.$ac_objext
2381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2382 (eval $ac_compile) 2>conftest.er1
ba479fd2 2383 ac_status=$?
86da66b5
HPN
2384 grep -v '^ *+' conftest.er1 >conftest.err
2385 rm -f conftest.er1
2386 cat conftest.err >&5
ba479fd2
NN
2387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2388 (exit $ac_status); } &&
a1286ef5
ZW
2389 { ac_try='test -z "$ac_c_werror_flag"
2390 || test ! -s conftest.err'
86da66b5
HPN
2391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2392 (eval $ac_try) 2>&5
2393 ac_status=$?
2394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2395 (exit $ac_status); }; } &&
2396 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2398 (eval $ac_try) 2>&5
2399 ac_status=$?
2400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2401 (exit $ac_status); }; }; then
2402 ac_compiler_gnu=yes
2403else
2404 echo "$as_me: failed program was:" >&5
2405sed 's/^/| /' conftest.$ac_ext >&5
2406
2407ac_compiler_gnu=no
2408fi
86da66b5 2409rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2410ac_cv_c_compiler_gnu=$ac_compiler_gnu
2411
2412fi
2413echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2414echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2415GCC=`test $ac_compiler_gnu = yes && echo yes`
2416ac_test_CFLAGS=${CFLAGS+set}
2417ac_save_CFLAGS=$CFLAGS
2418CFLAGS="-g"
2419echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2420echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2421if test "${ac_cv_prog_cc_g+set}" = set; then
2422 echo $ECHO_N "(cached) $ECHO_C" >&6
2423else
2424 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2425/* confdefs.h. */
2426_ACEOF
2427cat confdefs.h >>conftest.$ac_ext
2428cat >>conftest.$ac_ext <<_ACEOF
2429/* end confdefs.h. */
2430
2431int
2432main ()
2433{
2434
2435 ;
2436 return 0;
2437}
2438_ACEOF
2439rm -f conftest.$ac_objext
2440if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2441 (eval $ac_compile) 2>conftest.er1
ba479fd2 2442 ac_status=$?
86da66b5
HPN
2443 grep -v '^ *+' conftest.er1 >conftest.err
2444 rm -f conftest.er1
2445 cat conftest.err >&5
ba479fd2
NN
2446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2447 (exit $ac_status); } &&
a1286ef5
ZW
2448 { ac_try='test -z "$ac_c_werror_flag"
2449 || test ! -s conftest.err'
86da66b5
HPN
2450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2451 (eval $ac_try) 2>&5
2452 ac_status=$?
2453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2454 (exit $ac_status); }; } &&
2455 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2457 (eval $ac_try) 2>&5
2458 ac_status=$?
2459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2460 (exit $ac_status); }; }; then
6e3f3080
NN
2461 ac_cv_prog_cc_g=yes
2462else
ba479fd2
NN
2463 echo "$as_me: failed program was:" >&5
2464sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2465
ba479fd2 2466ac_cv_prog_cc_g=no
6e3f3080 2467fi
86da66b5 2468rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2469fi
2470echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2471echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2472if test "$ac_test_CFLAGS" = set; then
ba479fd2 2473 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2474elif test $ac_cv_prog_cc_g = yes; then
2475 if test "$GCC" = yes; then
e9a25f70
JL
2476 CFLAGS="-g -O2"
2477 else
cd9e5e7c 2478 CFLAGS="-g"
81814e35 2479 fi
3723cad9 2480else
cd9e5e7c
MK
2481 if test "$GCC" = yes; then
2482 CFLAGS="-O2"
2483 else
2484 CFLAGS=
2485 fi
e9a25f70 2486fi
ba479fd2
NN
2487echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2488echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2489if test "${ac_cv_prog_cc_stdc+set}" = set; then
2490 echo $ECHO_N "(cached) $ECHO_C" >&6
2491else
2492 ac_cv_prog_cc_stdc=no
2493ac_save_CC=$CC
2494cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2495/* confdefs.h. */
2496_ACEOF
2497cat confdefs.h >>conftest.$ac_ext
2498cat >>conftest.$ac_ext <<_ACEOF
2499/* end confdefs.h. */
2500#include <stdarg.h>
2501#include <stdio.h>
2502#include <sys/types.h>
2503#include <sys/stat.h>
2504/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2505struct buf { int x; };
2506FILE * (*rcsopen) (struct buf *, struct stat *, int);
2507static char *e (p, i)
2508 char **p;
2509 int i;
2510{
2511 return p[i];
2512}
2513static char *f (char * (*g) (char **, int), char **p, ...)
2514{
2515 char *s;
2516 va_list v;
2517 va_start (v,p);
2518 s = g (p, va_arg (v,int));
2519 va_end (v);
2520 return s;
2521}
86da66b5
HPN
2522
2523/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2524 function prototypes and stuff, but not '\xHH' hex character constants.
2525 These don't provoke an error unfortunately, instead are silently treated
2526 as 'x'. The following induces an error, until -std1 is added to get
2527 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2528 array size at least. It's necessary to write '\x00'==0 to get something
2529 that's true only with -std1. */
2530int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2531
ba479fd2
NN
2532int test (int i, double x);
2533struct s1 {int (*f) (int a);};
2534struct s2 {int (*f) (double a);};
2535int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2536int argc;
2537char **argv;
2538int
2539main ()
2540{
2541return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2542 ;
2543 return 0;
2544}
2545_ACEOF
2546# Don't try gcc -ansi; that turns off useful extensions and
2547# breaks some systems' header files.
2548# AIX -qlanglvl=ansi
2549# Ultrix and OSF/1 -std1
2550# HP-UX 10.20 and later -Ae
2551# HP-UX older versions -Aa -D_HPUX_SOURCE
2552# SVR4 -Xc -D__EXTENSIONS__
2553for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2554do
2555 CC="$ac_save_CC $ac_arg"
2556 rm -f conftest.$ac_objext
2557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2558 (eval $ac_compile) 2>conftest.er1
ba479fd2 2559 ac_status=$?
86da66b5
HPN
2560 grep -v '^ *+' conftest.er1 >conftest.err
2561 rm -f conftest.er1
2562 cat conftest.err >&5
ba479fd2
NN
2563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2564 (exit $ac_status); } &&
a1286ef5
ZW
2565 { ac_try='test -z "$ac_c_werror_flag"
2566 || test ! -s conftest.err'
86da66b5
HPN
2567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2568 (eval $ac_try) 2>&5
2569 ac_status=$?
2570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2571 (exit $ac_status); }; } &&
2572 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
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); }; }; then
2578 ac_cv_prog_cc_stdc=$ac_arg
2579break
2580else
2581 echo "$as_me: failed program was:" >&5
2582sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2583
ba479fd2 2584fi
86da66b5 2585rm -f conftest.err conftest.$ac_objext
ba479fd2
NN
2586done
2587rm -f conftest.$ac_ext conftest.$ac_objext
2588CC=$ac_save_CC
2589
2590fi
2591
2592case "x$ac_cv_prog_cc_stdc" in
2593 x|xno)
2594 echo "$as_me:$LINENO: result: none needed" >&5
2595echo "${ECHO_T}none needed" >&6 ;;
2596 *)
2597 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2598echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2599 CC="$CC $ac_cv_prog_cc_stdc" ;;
2600esac
2601
2602# Some people use a C++ compiler to compile C. Since we use `exit',
2603# in C++ we need to declare it. In case someone uses the same compiler
2604# for both compiling C and C++ we need to have the C++ compiler decide
2605# the declaration of exit, since it's the most demanding environment.
2606cat >conftest.$ac_ext <<_ACEOF
2607#ifndef __cplusplus
2608 choke me
2609#endif
2610_ACEOF
2611rm -f conftest.$ac_objext
2612if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2613 (eval $ac_compile) 2>conftest.er1
ba479fd2 2614 ac_status=$?
86da66b5
HPN
2615 grep -v '^ *+' conftest.er1 >conftest.err
2616 rm -f conftest.er1
2617 cat conftest.err >&5
ba479fd2
NN
2618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2619 (exit $ac_status); } &&
a1286ef5
ZW
2620 { ac_try='test -z "$ac_c_werror_flag"
2621 || test ! -s conftest.err'
86da66b5
HPN
2622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2623 (eval $ac_try) 2>&5
2624 ac_status=$?
2625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2626 (exit $ac_status); }; } &&
2627 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2629 (eval $ac_try) 2>&5
2630 ac_status=$?
2631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2632 (exit $ac_status); }; }; then
2633 for ac_declaration in \
86da66b5 2634 '' \
ba479fd2
NN
2635 'extern "C" void std::exit (int) throw (); using std::exit;' \
2636 'extern "C" void std::exit (int); using std::exit;' \
2637 'extern "C" void exit (int) throw ();' \
2638 'extern "C" void exit (int);' \
2639 'void exit (int);'
2640do
2641 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2642/* confdefs.h. */
2643_ACEOF
2644cat confdefs.h >>conftest.$ac_ext
2645cat >>conftest.$ac_ext <<_ACEOF
2646/* end confdefs.h. */
33e70558 2647$ac_declaration
86da66b5 2648#include <stdlib.h>
ba479fd2
NN
2649int
2650main ()
2651{
2652exit (42);
2653 ;
2654 return 0;
2655}
2656_ACEOF
2657rm -f conftest.$ac_objext
2658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2659 (eval $ac_compile) 2>conftest.er1
ba479fd2 2660 ac_status=$?
86da66b5
HPN
2661 grep -v '^ *+' conftest.er1 >conftest.err
2662 rm -f conftest.er1
2663 cat conftest.err >&5
ba479fd2
NN
2664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2665 (exit $ac_status); } &&
a1286ef5
ZW
2666 { ac_try='test -z "$ac_c_werror_flag"
2667 || test ! -s conftest.err'
86da66b5
HPN
2668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2669 (eval $ac_try) 2>&5
2670 ac_status=$?
2671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2672 (exit $ac_status); }; } &&
2673 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2675 (eval $ac_try) 2>&5
2676 ac_status=$?
2677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2678 (exit $ac_status); }; }; then
2679 :
2680else
2681 echo "$as_me: failed program was:" >&5
2682sed 's/^/| /' conftest.$ac_ext >&5
2683
2684continue
2685fi
86da66b5 2686rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 2687 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2688/* confdefs.h. */
2689_ACEOF
2690cat confdefs.h >>conftest.$ac_ext
2691cat >>conftest.$ac_ext <<_ACEOF
2692/* end confdefs.h. */
2693$ac_declaration
2694int
2695main ()
2696{
2697exit (42);
2698 ;
2699 return 0;
2700}
2701_ACEOF
2702rm -f conftest.$ac_objext
2703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2704 (eval $ac_compile) 2>conftest.er1
ba479fd2 2705 ac_status=$?
86da66b5
HPN
2706 grep -v '^ *+' conftest.er1 >conftest.err
2707 rm -f conftest.er1
2708 cat conftest.err >&5
ba479fd2
NN
2709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2710 (exit $ac_status); } &&
a1286ef5
ZW
2711 { ac_try='test -z "$ac_c_werror_flag"
2712 || test ! -s conftest.err'
86da66b5
HPN
2713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2714 (eval $ac_try) 2>&5
2715 ac_status=$?
2716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2717 (exit $ac_status); }; } &&
2718 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2720 (eval $ac_try) 2>&5
2721 ac_status=$?
2722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2723 (exit $ac_status); }; }; then
2724 break
3ec83fc2 2725else
ba479fd2
NN
2726 echo "$as_me: failed program was:" >&5
2727sed 's/^/| /' conftest.$ac_ext >&5
2728
6e3f3080 2729fi
86da66b5 2730rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2731done
2732rm -f conftest*
2733if test -n "$ac_declaration"; then
2734 echo '#ifdef __cplusplus' >>confdefs.h
2735 echo $ac_declaration >>confdefs.h
2736 echo '#endif' >>confdefs.h
2737fi
2738
3ec83fc2 2739else
ba479fd2
NN
2740 echo "$as_me: failed program was:" >&5
2741sed 's/^/| /' conftest.$ac_ext >&5
2742
2743fi
86da66b5 2744rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2745ac_ext=c
2746ac_cpp='$CPP $CPPFLAGS'
2747ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2748ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2749ac_compiler_gnu=$ac_cv_c_compiler_gnu
2750
2751if test "x$CC" != xcc; then
2752 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2753echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2754else
2755 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2756echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2757fi
2758set dummy $CC; ac_cc=`echo $2 |
2759 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2760if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2761 echo $ECHO_N "(cached) $ECHO_C" >&6
2762else
2763 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2764/* confdefs.h. */
2765_ACEOF
2766cat confdefs.h >>conftest.$ac_ext
2767cat >>conftest.$ac_ext <<_ACEOF
2768/* end confdefs.h. */
2769
2770int
2771main ()
2772{
2773
2774 ;
2775 return 0;
2776}
2777_ACEOF
3ec83fc2
RH
2778# Make sure it works both with $CC and with simple cc.
2779# We do the test twice because some compilers refuse to overwrite an
2780# existing .o file with -o, though they will create one.
ba479fd2
NN
2781ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2782if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2783 (eval $ac_try) 2>&5
2784 ac_status=$?
2785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2786 (exit $ac_status); } &&
2787 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2788 (eval $ac_try) 2>&5
2789 ac_status=$?
2790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2791 (exit $ac_status); };
3ec83fc2
RH
2792then
2793 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2794 if test "x$CC" != xcc; then
2795 # Test first that cc exists at all.
ba479fd2
NN
2796 if { ac_try='cc -c conftest.$ac_ext >&5'
2797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2798 (eval $ac_try) 2>&5
2799 ac_status=$?
2800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2801 (exit $ac_status); }; }; then
2802 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2803 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2804 (eval $ac_try) 2>&5
2805 ac_status=$?
2806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2807 (exit $ac_status); } &&
2808 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2809 (eval $ac_try) 2>&5
2810 ac_status=$?
2811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2812 (exit $ac_status); };
3ec83fc2 2813 then
86da66b5
HPN
2814 # cc works too.
2815 :
3ec83fc2 2816 else
86da66b5
HPN
2817 # cc exists but doesn't like -o.
2818 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2819 fi
2820 fi
2821 fi
2822else
2823 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2824fi
2825rm -f conftest*
2826
2827fi
2828if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2829 echo "$as_me:$LINENO: result: yes" >&5
2830echo "${ECHO_T}yes" >&6
3ec83fc2 2831else
ba479fd2
NN
2832 echo "$as_me:$LINENO: result: no" >&5
2833echo "${ECHO_T}no" >&6
2834
2835cat >>confdefs.h <<\_ACEOF
3ec83fc2 2836#define NO_MINUS_C_MINUS_O 1
ba479fd2 2837_ACEOF
3ec83fc2
RH
2838
2839fi
2840
3b620440
KC
2841# expand $ac_aux_dir to an absolute path
2842am_aux_dir=`cd $ac_aux_dir && pwd`
2843
2844# FIXME: we rely on the cache variable name because
2845# there is no other way.
2846set dummy $CC
2847ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2848if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2849 # Losing compiler, so override with the script.
2850 # FIXME: It is wrong to rewrite CC.
2851 # But if we don't then we get into trouble of one sort or another.
2852 # A longer-term fix would be to have automake use am__CC in this case,
2853 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2854 CC="$am_aux_dir/compile $CC"
2855fi
2856
414d23ae
HPN
2857# autoconf is lame and doesn't give us any substitution variable for this.
2858if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2859 NO_MINUS_C_MINUS_O=yes
2860else
2861 OUTPUT_OPTION='-o $@'
2862fi
2863
2864
2865
73458fb7
NN
2866# -------------------------
2867# Check C compiler features
2868# -------------------------
2869
ba479fd2
NN
2870ac_ext=c
2871ac_cpp='$CPP $CPPFLAGS'
2872ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2873ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2874ac_compiler_gnu=$ac_cv_c_compiler_gnu
2875echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2876echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2877# On Suns, sometimes $CPP names a directory.
2878if test -n "$CPP" && test -d "$CPP"; then
2879 CPP=
2880fi
2881if test -z "$CPP"; then
ba479fd2
NN
2882 if test "${ac_cv_prog_CPP+set}" = set; then
2883 echo $ECHO_N "(cached) $ECHO_C" >&6
2884else
2885 # Double quotes because CPP needs to be expanded
2886 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2887 do
2888 ac_preproc_ok=false
2889for ac_c_preproc_warn_flag in '' yes
2890do
2891 # Use a header file that comes with gcc, so configuring glibc
2892 # with a fresh cross-compiler works.
2893 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2894 # <limits.h> exists even on freestanding compilers.
84c041a1 2895 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2896 # not just through cpp. "Syntax error" is here to catch this case.
2897 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2898/* confdefs.h. */
2899_ACEOF
2900cat confdefs.h >>conftest.$ac_ext
2901cat >>conftest.$ac_ext <<_ACEOF
2902/* end confdefs.h. */
2903#ifdef __STDC__
2904# include <limits.h>
2905#else
2906# include <assert.h>
2907#endif
86da66b5 2908 Syntax error
ba479fd2
NN
2909_ACEOF
2910if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2911 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2912 ac_status=$?
2913 grep -v '^ *+' conftest.er1 >conftest.err
2914 rm -f conftest.er1
2915 cat conftest.err >&5
2916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2917 (exit $ac_status); } >/dev/null; then
2918 if test -s conftest.err; then
2919 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2920 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2921 else
2922 ac_cpp_err=
2923 fi
2924else
2925 ac_cpp_err=yes
2926fi
2927if test -z "$ac_cpp_err"; then
093e61a6 2928 :
cafe096b 2929else
ba479fd2
NN
2930 echo "$as_me: failed program was:" >&5
2931sed 's/^/| /' conftest.$ac_ext >&5
2932
2933 # Broken: fails on valid input.
2934continue
2935fi
2936rm -f conftest.err conftest.$ac_ext
2937
2938 # OK, works on sane cases. Now check whether non-existent headers
2939 # can be detected and how.
2940 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2941/* confdefs.h. */
2942_ACEOF
2943cat confdefs.h >>conftest.$ac_ext
2944cat >>conftest.$ac_ext <<_ACEOF
2945/* end confdefs.h. */
2946#include <ac_nonexistent.h>
2947_ACEOF
2948if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2949 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2950 ac_status=$?
2951 grep -v '^ *+' conftest.er1 >conftest.err
2952 rm -f conftest.er1
2953 cat conftest.err >&5
2954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2955 (exit $ac_status); } >/dev/null; then
2956 if test -s conftest.err; then
2957 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2958 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2959 else
2960 ac_cpp_err=
2961 fi
2962else
2963 ac_cpp_err=yes
2964fi
2965if test -z "$ac_cpp_err"; then
2966 # Broken: success on invalid input.
2967continue
2968else
2969 echo "$as_me: failed program was:" >&5
2970sed 's/^/| /' conftest.$ac_ext >&5
2971
2972 # Passes both tests.
2973ac_preproc_ok=:
2974break
2975fi
2976rm -f conftest.err conftest.$ac_ext
2977
2978done
2979# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2980rm -f conftest.err conftest.$ac_ext
2981if $ac_preproc_ok; then
2982 break
2983fi
2984
2985 done
2986 ac_cv_prog_CPP=$CPP
2987
2988fi
2989 CPP=$ac_cv_prog_CPP
2990else
2991 ac_cv_prog_CPP=$CPP
2992fi
2993echo "$as_me:$LINENO: result: $CPP" >&5
2994echo "${ECHO_T}$CPP" >&6
2995ac_preproc_ok=false
2996for ac_c_preproc_warn_flag in '' yes
2997do
2998 # Use a header file that comes with gcc, so configuring glibc
2999 # with a fresh cross-compiler works.
3000 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3001 # <limits.h> exists even on freestanding compilers.
3002 # On the NeXT, cc -E runs the code through the compiler's parser,
3003 # not just through cpp. "Syntax error" is here to catch this case.
3004 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3005/* confdefs.h. */
3006_ACEOF
3007cat confdefs.h >>conftest.$ac_ext
3008cat >>conftest.$ac_ext <<_ACEOF
3009/* end confdefs.h. */
3010#ifdef __STDC__
3011# include <limits.h>
3012#else
3013# include <assert.h>
3014#endif
86da66b5 3015 Syntax error
ba479fd2
NN
3016_ACEOF
3017if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3018 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3019 ac_status=$?
3020 grep -v '^ *+' conftest.er1 >conftest.err
3021 rm -f conftest.er1
3022 cat conftest.err >&5
3023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3024 (exit $ac_status); } >/dev/null; then
3025 if test -s conftest.err; then
3026 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3027 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3028 else
3029 ac_cpp_err=
3030 fi
3031else
3032 ac_cpp_err=yes
3033fi
3034if test -z "$ac_cpp_err"; then
6e3f3080 3035 :
414d23ae 3036else
ba479fd2
NN
3037 echo "$as_me: failed program was:" >&5
3038sed 's/^/| /' conftest.$ac_ext >&5
3039
3040 # Broken: fails on valid input.
3041continue
3042fi
3043rm -f conftest.err conftest.$ac_ext
3044
3045 # OK, works on sane cases. Now check whether non-existent headers
3046 # can be detected and how.
3047 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3048/* confdefs.h. */
3049_ACEOF
3050cat confdefs.h >>conftest.$ac_ext
3051cat >>conftest.$ac_ext <<_ACEOF
3052/* end confdefs.h. */
3053#include <ac_nonexistent.h>
3054_ACEOF
3055if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3056 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3057 ac_status=$?
3058 grep -v '^ *+' conftest.er1 >conftest.err
3059 rm -f conftest.er1
3060 cat conftest.err >&5
3061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3062 (exit $ac_status); } >/dev/null; then
3063 if test -s conftest.err; then
3064 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3065 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3066 else
3067 ac_cpp_err=
3068 fi
6e3f3080 3069else
ba479fd2 3070 ac_cpp_err=yes
63cf211a 3071fi
ba479fd2
NN
3072if test -z "$ac_cpp_err"; then
3073 # Broken: success on invalid input.
3074continue
3075else
3076 echo "$as_me: failed program was:" >&5
3077sed 's/^/| /' conftest.$ac_ext >&5
3078
3079 # Passes both tests.
3080ac_preproc_ok=:
3081break
63cf211a 3082fi
ba479fd2
NN
3083rm -f conftest.err conftest.$ac_ext
3084
3085done
3086# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3087rm -f conftest.err conftest.$ac_ext
3088if $ac_preproc_ok; then
3089 :
6e3f3080 3090else
ba479fd2
NN
3091 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3092See \`config.log' for more details." >&5
3093echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3094See \`config.log' for more details." >&2;}
3095 { (exit 1); exit 1; }; }
6e3f3080
NN
3096fi
3097
ba479fd2
NN
3098ac_ext=c
3099ac_cpp='$CPP $CPPFLAGS'
3100ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3101ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3102ac_compiler_gnu=$ac_cv_c_compiler_gnu
3103
b5472e1d 3104
ba479fd2
NN
3105echo "$as_me:$LINENO: checking for inline" >&5
3106echo $ECHO_N "checking for inline... $ECHO_C" >&6
3107if test "${ac_cv_c_inline+set}" = set; then
3108 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3109else
3110 ac_cv_c_inline=no
3111for ac_kw in inline __inline__ __inline; do
ba479fd2 3112 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3113/* confdefs.h. */
3114_ACEOF
3115cat confdefs.h >>conftest.$ac_ext
3116cat >>conftest.$ac_ext <<_ACEOF
3117/* end confdefs.h. */
3118#ifndef __cplusplus
3119typedef int foo_t;
3120static $ac_kw foo_t static_foo () {return 0; }
3121$ac_kw foo_t foo () {return 0; }
3122#endif
414d23ae 3123
ba479fd2
NN
3124_ACEOF
3125rm -f conftest.$ac_objext
3126if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3127 (eval $ac_compile) 2>conftest.er1
ba479fd2 3128 ac_status=$?
86da66b5
HPN
3129 grep -v '^ *+' conftest.er1 >conftest.err
3130 rm -f conftest.er1
3131 cat conftest.err >&5
ba479fd2
NN
3132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3133 (exit $ac_status); } &&
a1286ef5
ZW
3134 { ac_try='test -z "$ac_c_werror_flag"
3135 || test ! -s conftest.err'
86da66b5
HPN
3136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3137 (eval $ac_try) 2>&5
3138 ac_status=$?
3139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3140 (exit $ac_status); }; } &&
3141 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3143 (eval $ac_try) 2>&5
3144 ac_status=$?
3145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3146 (exit $ac_status); }; }; then
414d23ae
HPN
3147 ac_cv_c_inline=$ac_kw; break
3148else
ba479fd2
NN
3149 echo "$as_me: failed program was:" >&5
3150sed 's/^/| /' conftest.$ac_ext >&5
3151
414d23ae 3152fi
86da66b5 3153rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3154done
3155
3156fi
ba479fd2
NN
3157echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3158echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3159
3160
ba479fd2 3161case $ac_cv_c_inline in
414d23ae 3162 inline | yes) ;;
86da66b5
HPN
3163 *)
3164 case $ac_cv_c_inline in
3165 no) ac_val=;;
3166 *) ac_val=$ac_cv_c_inline;;
3167 esac
3168 cat >>confdefs.h <<_ACEOF
3169#ifndef __cplusplus
3170#define inline $ac_val
3171#endif
ba479fd2 3172_ACEOF
86da66b5 3173 ;;
414d23ae
HPN
3174esac
3175
414d23ae 3176
ba479fd2
NN
3177echo "$as_me:$LINENO: checking for long long int" >&5
3178echo $ECHO_N "checking for long long int... $ECHO_C" >&6
3179if test "${ac_cv_c_long_long+set}" = set; then
3180 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3181else
ba479fd2 3182 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3183/* confdefs.h. */
3184_ACEOF
3185cat confdefs.h >>conftest.$ac_ext
3186cat >>conftest.$ac_ext <<_ACEOF
3187/* end confdefs.h. */
414d23ae 3188
ba479fd2
NN
3189int
3190main ()
3191{
414d23ae 3192long long int i;
ba479fd2
NN
3193 ;
3194 return 0;
3195}
3196_ACEOF
3197rm -f conftest.$ac_objext
3198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3199 (eval $ac_compile) 2>conftest.er1
ba479fd2 3200 ac_status=$?
86da66b5
HPN
3201 grep -v '^ *+' conftest.er1 >conftest.err
3202 rm -f conftest.er1
3203 cat conftest.err >&5
ba479fd2
NN
3204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3205 (exit $ac_status); } &&
a1286ef5
ZW
3206 { ac_try='test -z "$ac_c_werror_flag"
3207 || test ! -s conftest.err'
86da66b5
HPN
3208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3209 (eval $ac_try) 2>&5
3210 ac_status=$?
3211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3212 (exit $ac_status); }; } &&
3213 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3215 (eval $ac_try) 2>&5
3216 ac_status=$?
3217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3218 (exit $ac_status); }; }; then
414d23ae
HPN
3219 ac_cv_c_long_long=yes
3220else
ba479fd2
NN
3221 echo "$as_me: failed program was:" >&5
3222sed 's/^/| /' conftest.$ac_ext >&5
3223
3224ac_cv_c_long_long=no
414d23ae 3225fi
86da66b5 3226rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3227fi
ba479fd2
NN
3228echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5
3229echo "${ECHO_T}$ac_cv_c_long_long" >&6
63cf211a 3230 if test $ac_cv_c_long_long = yes; then
ba479fd2
NN
3231
3232cat >>confdefs.h <<\_ACEOF
414d23ae 3233#define HAVE_LONG_LONG 1
ba479fd2 3234_ACEOF
414d23ae
HPN
3235
3236 fi
ba479fd2
NN
3237echo "$as_me:$LINENO: checking for __int64" >&5
3238echo $ECHO_N "checking for __int64... $ECHO_C" >&6
3239if test "${ac_cv_c___int64+set}" = set; then
3240 echo $ECHO_N "(cached) $ECHO_C" >&6
3241else
3242 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3243/* confdefs.h. */
3244_ACEOF
3245cat confdefs.h >>conftest.$ac_ext
3246cat >>conftest.$ac_ext <<_ACEOF
3247/* end confdefs.h. */
3248
3249int
3250main ()
3251{
414d23ae 3252__int64 i;
ba479fd2
NN
3253 ;
3254 return 0;
3255}
3256_ACEOF
3257rm -f conftest.$ac_objext
3258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3259 (eval $ac_compile) 2>conftest.er1
ba479fd2 3260 ac_status=$?
86da66b5
HPN
3261 grep -v '^ *+' conftest.er1 >conftest.err
3262 rm -f conftest.er1
3263 cat conftest.err >&5
ba479fd2
NN
3264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3265 (exit $ac_status); } &&
a1286ef5
ZW
3266 { ac_try='test -z "$ac_c_werror_flag"
3267 || test ! -s conftest.err'
86da66b5
HPN
3268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3269 (eval $ac_try) 2>&5
3270 ac_status=$?
3271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3272 (exit $ac_status); }; } &&
3273 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3275 (eval $ac_try) 2>&5
3276 ac_status=$?
3277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3278 (exit $ac_status); }; }; then
414d23ae
HPN
3279 ac_cv_c___int64=yes
3280else
ba479fd2
NN
3281 echo "$as_me: failed program was:" >&5
3282sed 's/^/| /' conftest.$ac_ext >&5
3283
3284ac_cv_c___int64=no
414d23ae 3285fi
86da66b5 3286rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3287fi
ba479fd2
NN
3288echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5
3289echo "${ECHO_T}$ac_cv_c___int64" >&6
63cf211a 3290 if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3291
3292cat >>confdefs.h <<\_ACEOF
414d23ae 3293#define HAVE___INT64 1
ba479fd2 3294_ACEOF
414d23ae
HPN
3295
3296 fi
3297
414d23ae
HPN
3298
3299# sizeof(char) is 1 by definition.
bf3b7cd3
JD
3300
3301echo "$as_me:$LINENO: checking for egrep" >&5
3302echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3303if test "${ac_cv_prog_egrep+set}" = set; then
3304 echo $ECHO_N "(cached) $ECHO_C" >&6
3305else
3306 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3307 then ac_cv_prog_egrep='grep -E'
3308 else ac_cv_prog_egrep='egrep'
3309 fi
3310fi
3311echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3312echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3313 EGREP=$ac_cv_prog_egrep
3314
3315
3316echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3317echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3318if test "${ac_cv_header_stdc+set}" = set; then
3319 echo $ECHO_N "(cached) $ECHO_C" >&6
3320else
3321 cat >conftest.$ac_ext <<_ACEOF
3322/* confdefs.h. */
3323_ACEOF
3324cat confdefs.h >>conftest.$ac_ext
3325cat >>conftest.$ac_ext <<_ACEOF
3326/* end confdefs.h. */
3327#include <stdlib.h>
3328#include <stdarg.h>
3329#include <string.h>
3330#include <float.h>
3331
3332int
3333main ()
3334{
3335
3336 ;
3337 return 0;
3338}
3339_ACEOF
3340rm -f conftest.$ac_objext
3341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3342 (eval $ac_compile) 2>conftest.er1
3343 ac_status=$?
3344 grep -v '^ *+' conftest.er1 >conftest.err
3345 rm -f conftest.er1
3346 cat conftest.err >&5
3347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3348 (exit $ac_status); } &&
a1286ef5
ZW
3349 { ac_try='test -z "$ac_c_werror_flag"
3350 || test ! -s conftest.err'
bf3b7cd3
JD
3351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3352 (eval $ac_try) 2>&5
3353 ac_status=$?
3354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3355 (exit $ac_status); }; } &&
3356 { ac_try='test -s conftest.$ac_objext'
3357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3358 (eval $ac_try) 2>&5
3359 ac_status=$?
3360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3361 (exit $ac_status); }; }; then
3362 ac_cv_header_stdc=yes
3363else
3364 echo "$as_me: failed program was:" >&5
3365sed 's/^/| /' conftest.$ac_ext >&5
3366
3367ac_cv_header_stdc=no
3368fi
3369rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3370
3371if test $ac_cv_header_stdc = yes; then
3372 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3373 cat >conftest.$ac_ext <<_ACEOF
3374/* confdefs.h. */
3375_ACEOF
3376cat confdefs.h >>conftest.$ac_ext
3377cat >>conftest.$ac_ext <<_ACEOF
3378/* end confdefs.h. */
3379#include <string.h>
3380
3381_ACEOF
3382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3383 $EGREP "memchr" >/dev/null 2>&1; then
3384 :
3385else
3386 ac_cv_header_stdc=no
3387fi
3388rm -f conftest*
3389
3390fi
3391
3392if test $ac_cv_header_stdc = yes; then
3393 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3394 cat >conftest.$ac_ext <<_ACEOF
3395/* confdefs.h. */
3396_ACEOF
3397cat confdefs.h >>conftest.$ac_ext
3398cat >>conftest.$ac_ext <<_ACEOF
3399/* end confdefs.h. */
3400#include <stdlib.h>
3401
3402_ACEOF
3403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3404 $EGREP "free" >/dev/null 2>&1; then
3405 :
3406else
3407 ac_cv_header_stdc=no
3408fi
3409rm -f conftest*
3410
3411fi
3412
3413if test $ac_cv_header_stdc = yes; then
3414 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3415 if test "$cross_compiling" = yes; then
3416 :
3417else
3418 cat >conftest.$ac_ext <<_ACEOF
3419/* confdefs.h. */
3420_ACEOF
3421cat confdefs.h >>conftest.$ac_ext
3422cat >>conftest.$ac_ext <<_ACEOF
3423/* end confdefs.h. */
3424#include <ctype.h>
3425#if ((' ' & 0x0FF) == 0x020)
3426# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3427# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3428#else
3429# define ISLOWER(c) \
3430 (('a' <= (c) && (c) <= 'i') \
3431 || ('j' <= (c) && (c) <= 'r') \
3432 || ('s' <= (c) && (c) <= 'z'))
3433# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3434#endif
3435
3436#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3437int
3438main ()
3439{
3440 int i;
3441 for (i = 0; i < 256; i++)
3442 if (XOR (islower (i), ISLOWER (i))
3443 || toupper (i) != TOUPPER (i))
3444 exit(2);
3445 exit (0);
3446}
3447_ACEOF
3448rm -f conftest$ac_exeext
3449if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3450 (eval $ac_link) 2>&5
3451 ac_status=$?
3452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3453 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3455 (eval $ac_try) 2>&5
3456 ac_status=$?
3457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3458 (exit $ac_status); }; }; then
3459 :
3460else
3461 echo "$as_me: program exited with status $ac_status" >&5
3462echo "$as_me: failed program was:" >&5
3463sed 's/^/| /' conftest.$ac_ext >&5
3464
3465( exit $ac_status )
3466ac_cv_header_stdc=no
3467fi
3468rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3469fi
3470fi
3471fi
3472echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3473echo "${ECHO_T}$ac_cv_header_stdc" >&6
3474if test $ac_cv_header_stdc = yes; then
3475
3476cat >>confdefs.h <<\_ACEOF
3477#define STDC_HEADERS 1
3478_ACEOF
3479
3480fi
3481
3482# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3493 inttypes.h stdint.h unistd.h
3494do
3495as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3496echo "$as_me:$LINENO: checking for $ac_header" >&5
3497echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3498if eval "test \"\${$as_ac_Header+set}\" = set"; then
3499 echo $ECHO_N "(cached) $ECHO_C" >&6
3500else
3501 cat >conftest.$ac_ext <<_ACEOF
3502/* confdefs.h. */
3503_ACEOF
3504cat confdefs.h >>conftest.$ac_ext
3505cat >>conftest.$ac_ext <<_ACEOF
3506/* end confdefs.h. */
3507$ac_includes_default
3508
3509#include <$ac_header>
3510_ACEOF
3511rm -f conftest.$ac_objext
3512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3513 (eval $ac_compile) 2>conftest.er1
3514 ac_status=$?
3515 grep -v '^ *+' conftest.er1 >conftest.err
3516 rm -f conftest.er1
3517 cat conftest.err >&5
3518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3519 (exit $ac_status); } &&
a1286ef5
ZW
3520 { ac_try='test -z "$ac_c_werror_flag"
3521 || test ! -s conftest.err'
bf3b7cd3
JD
3522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3523 (eval $ac_try) 2>&5
3524 ac_status=$?
3525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3526 (exit $ac_status); }; } &&
3527 { ac_try='test -s conftest.$ac_objext'
3528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3529 (eval $ac_try) 2>&5
3530 ac_status=$?
3531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3532 (exit $ac_status); }; }; then
3533 eval "$as_ac_Header=yes"
3534else
3535 echo "$as_me: failed program was:" >&5
3536sed 's/^/| /' conftest.$ac_ext >&5
3537
3538eval "$as_ac_Header=no"
3539fi
3540rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3541fi
3542echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3543echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3544if test `eval echo '${'$as_ac_Header'}'` = yes; then
3545 cat >>confdefs.h <<_ACEOF
3546#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3547_ACEOF
3548
3549fi
3550
3551done
3552
3553
3554echo "$as_me:$LINENO: checking for void *" >&5
3555echo $ECHO_N "checking for void *... $ECHO_C" >&6
3556if test "${ac_cv_type_void_p+set}" = set; then
3557 echo $ECHO_N "(cached) $ECHO_C" >&6
3558else
3559 cat >conftest.$ac_ext <<_ACEOF
3560/* confdefs.h. */
3561_ACEOF
3562cat confdefs.h >>conftest.$ac_ext
3563cat >>conftest.$ac_ext <<_ACEOF
3564/* end confdefs.h. */
3565$ac_includes_default
3566int
3567main ()
3568{
3569if ((void * *) 0)
3570 return 0;
3571if (sizeof (void *))
3572 return 0;
3573 ;
3574 return 0;
3575}
3576_ACEOF
3577rm -f conftest.$ac_objext
3578if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3579 (eval $ac_compile) 2>conftest.er1
3580 ac_status=$?
3581 grep -v '^ *+' conftest.er1 >conftest.err
3582 rm -f conftest.er1
3583 cat conftest.err >&5
3584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3585 (exit $ac_status); } &&
a1286ef5
ZW
3586 { ac_try='test -z "$ac_c_werror_flag"
3587 || test ! -s conftest.err'
bf3b7cd3
JD
3588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3589 (eval $ac_try) 2>&5
3590 ac_status=$?
3591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3592 (exit $ac_status); }; } &&
3593 { ac_try='test -s conftest.$ac_objext'
3594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3595 (eval $ac_try) 2>&5
3596 ac_status=$?
3597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3598 (exit $ac_status); }; }; then
3599 ac_cv_type_void_p=yes
3600else
3601 echo "$as_me: failed program was:" >&5
3602sed 's/^/| /' conftest.$ac_ext >&5
3603
3604ac_cv_type_void_p=no
3605fi
3606rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3607fi
3608echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3609echo "${ECHO_T}$ac_cv_type_void_p" >&6
3610
ba479fd2
NN
3611echo "$as_me:$LINENO: checking size of void *" >&5
3612echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3613if test "${ac_cv_sizeof_void_p+set}" = set; then
3614 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 3615else
bf3b7cd3
JD
3616 if test "$ac_cv_type_void_p" = yes; then
3617 # The cast to unsigned long works around a bug in the HP C Compiler
3618 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3619 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3620 # This bug is HP SR number 8606223364.
3621 if test "$cross_compiling" = yes; then
3622 # Depending upon the size, compute the lo and hi bounds.
3623cat >conftest.$ac_ext <<_ACEOF
3624/* confdefs.h. */
3625_ACEOF
3626cat confdefs.h >>conftest.$ac_ext
3627cat >>conftest.$ac_ext <<_ACEOF
3628/* end confdefs.h. */
3629$ac_includes_default
3630int
3631main ()
3632{
3633static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
3634test_array [0] = 0
3635
3636 ;
3637 return 0;
3638}
3639_ACEOF
3640rm -f conftest.$ac_objext
3641if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3642 (eval $ac_compile) 2>conftest.er1
3643 ac_status=$?
3644 grep -v '^ *+' conftest.er1 >conftest.err
3645 rm -f conftest.er1
3646 cat conftest.err >&5
3647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3648 (exit $ac_status); } &&
a1286ef5
ZW
3649 { ac_try='test -z "$ac_c_werror_flag"
3650 || test ! -s conftest.err'
bf3b7cd3
JD
3651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3652 (eval $ac_try) 2>&5
3653 ac_status=$?
3654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3655 (exit $ac_status); }; } &&
3656 { ac_try='test -s conftest.$ac_objext'
3657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3658 (eval $ac_try) 2>&5
3659 ac_status=$?
3660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3661 (exit $ac_status); }; }; then
3662 ac_lo=0 ac_mid=0
3663 while :; do
3664 cat >conftest.$ac_ext <<_ACEOF
3665/* confdefs.h. */
3666_ACEOF
3667cat confdefs.h >>conftest.$ac_ext
3668cat >>conftest.$ac_ext <<_ACEOF
3669/* end confdefs.h. */
3670$ac_includes_default
3671int
3672main ()
3673{
3674static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3675test_array [0] = 0
3676
3677 ;
3678 return 0;
3679}
3680_ACEOF
3681rm -f conftest.$ac_objext
3682if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3683 (eval $ac_compile) 2>conftest.er1
3684 ac_status=$?
3685 grep -v '^ *+' conftest.er1 >conftest.err
3686 rm -f conftest.er1
3687 cat conftest.err >&5
3688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3689 (exit $ac_status); } &&
a1286ef5
ZW
3690 { ac_try='test -z "$ac_c_werror_flag"
3691 || test ! -s conftest.err'
bf3b7cd3
JD
3692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3693 (eval $ac_try) 2>&5
3694 ac_status=$?
3695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3696 (exit $ac_status); }; } &&
3697 { ac_try='test -s conftest.$ac_objext'
3698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3699 (eval $ac_try) 2>&5
3700 ac_status=$?
3701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3702 (exit $ac_status); }; }; then
3703 ac_hi=$ac_mid; break
3704else
3705 echo "$as_me: failed program was:" >&5
3706sed 's/^/| /' conftest.$ac_ext >&5
3707
3708ac_lo=`expr $ac_mid + 1`
3709 if test $ac_lo -le $ac_mid; then
3710 ac_lo= ac_hi=
3711 break
3712 fi
3713 ac_mid=`expr 2 '*' $ac_mid + 1`
3714fi
3715rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3716 done
3717else
3718 echo "$as_me: failed program was:" >&5
3719sed 's/^/| /' conftest.$ac_ext >&5
3720
3721cat >conftest.$ac_ext <<_ACEOF
3722/* confdefs.h. */
3723_ACEOF
3724cat confdefs.h >>conftest.$ac_ext
3725cat >>conftest.$ac_ext <<_ACEOF
3726/* end confdefs.h. */
3727$ac_includes_default
3728int
3729main ()
3730{
3731static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
3732test_array [0] = 0
3733
3734 ;
3735 return 0;
3736}
3737_ACEOF
3738rm -f conftest.$ac_objext
3739if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3740 (eval $ac_compile) 2>conftest.er1
3741 ac_status=$?
3742 grep -v '^ *+' conftest.er1 >conftest.err
3743 rm -f conftest.er1
3744 cat conftest.err >&5
3745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3746 (exit $ac_status); } &&
a1286ef5
ZW
3747 { ac_try='test -z "$ac_c_werror_flag"
3748 || test ! -s conftest.err'
bf3b7cd3
JD
3749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3750 (eval $ac_try) 2>&5
3751 ac_status=$?
3752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3753 (exit $ac_status); }; } &&
3754 { ac_try='test -s conftest.$ac_objext'
3755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3756 (eval $ac_try) 2>&5
3757 ac_status=$?
3758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3759 (exit $ac_status); }; }; then
3760 ac_hi=-1 ac_mid=-1
3761 while :; do
3762 cat >conftest.$ac_ext <<_ACEOF
3763/* confdefs.h. */
3764_ACEOF
3765cat confdefs.h >>conftest.$ac_ext
3766cat >>conftest.$ac_ext <<_ACEOF
3767/* end confdefs.h. */
3768$ac_includes_default
3769int
3770main ()
3771{
3772static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
3773test_array [0] = 0
3774
3775 ;
3776 return 0;
3777}
3778_ACEOF
3779rm -f conftest.$ac_objext
3780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3781 (eval $ac_compile) 2>conftest.er1
3782 ac_status=$?
3783 grep -v '^ *+' conftest.er1 >conftest.err
3784 rm -f conftest.er1
3785 cat conftest.err >&5
3786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3787 (exit $ac_status); } &&
a1286ef5
ZW
3788 { ac_try='test -z "$ac_c_werror_flag"
3789 || test ! -s conftest.err'
bf3b7cd3
JD
3790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3791 (eval $ac_try) 2>&5
3792 ac_status=$?
3793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3794 (exit $ac_status); }; } &&
3795 { ac_try='test -s conftest.$ac_objext'
3796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3797 (eval $ac_try) 2>&5
3798 ac_status=$?
3799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3800 (exit $ac_status); }; }; then
3801 ac_lo=$ac_mid; break
3802else
3803 echo "$as_me: failed program was:" >&5
3804sed 's/^/| /' conftest.$ac_ext >&5
3805
3806ac_hi=`expr '(' $ac_mid ')' - 1`
3807 if test $ac_mid -le $ac_hi; then
3808 ac_lo= ac_hi=
3809 break
3810 fi
3811 ac_mid=`expr 2 '*' $ac_mid`
3812fi
3813rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3814 done
3815else
3816 echo "$as_me: failed program was:" >&5
3817sed 's/^/| /' conftest.$ac_ext >&5
3818
3819ac_lo= ac_hi=
3820fi
3821rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3822fi
3823rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3824# Binary search between lo and hi bounds.
3825while test "x$ac_lo" != "x$ac_hi"; do
3826 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3827 cat >conftest.$ac_ext <<_ACEOF
3828/* confdefs.h. */
3829_ACEOF
3830cat confdefs.h >>conftest.$ac_ext
3831cat >>conftest.$ac_ext <<_ACEOF
3832/* end confdefs.h. */
3833$ac_includes_default
3834int
3835main ()
3836{
3837static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3838test_array [0] = 0
3839
3840 ;
3841 return 0;
3842}
3843_ACEOF
3844rm -f conftest.$ac_objext
3845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3846 (eval $ac_compile) 2>conftest.er1
3847 ac_status=$?
3848 grep -v '^ *+' conftest.er1 >conftest.err
3849 rm -f conftest.er1
3850 cat conftest.err >&5
3851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3852 (exit $ac_status); } &&
a1286ef5
ZW
3853 { ac_try='test -z "$ac_c_werror_flag"
3854 || test ! -s conftest.err'
bf3b7cd3
JD
3855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3856 (eval $ac_try) 2>&5
3857 ac_status=$?
3858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3859 (exit $ac_status); }; } &&
3860 { ac_try='test -s conftest.$ac_objext'
3861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3862 (eval $ac_try) 2>&5
3863 ac_status=$?
3864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3865 (exit $ac_status); }; }; then
3866 ac_hi=$ac_mid
3867else
3868 echo "$as_me: failed program was:" >&5
3869sed 's/^/| /' conftest.$ac_ext >&5
3870
3871ac_lo=`expr '(' $ac_mid ')' + 1`
3872fi
3873rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3874done
3875case $ac_lo in
3876?*) ac_cv_sizeof_void_p=$ac_lo;;
3877'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3878See \`config.log' for more details." >&5
3879echo "$as_me: error: cannot compute sizeof (void *), 77
3880See \`config.log' for more details." >&2;}
3881 { (exit 1); exit 1; }; } ;;
3882esac
3883else
3884 if test "$cross_compiling" = yes; then
a1286ef5
ZW
3885 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
3886See \`config.log' for more details." >&5
3887echo "$as_me: error: cannot run test program while cross compiling
3888See \`config.log' for more details." >&2;}
bf3b7cd3
JD
3889 { (exit 1); exit 1; }; }
3890else
3891 cat >conftest.$ac_ext <<_ACEOF
3892/* confdefs.h. */
3893_ACEOF
3894cat confdefs.h >>conftest.$ac_ext
3895cat >>conftest.$ac_ext <<_ACEOF
3896/* end confdefs.h. */
3897$ac_includes_default
3898long longval () { return (long) (sizeof (void *)); }
3899unsigned long ulongval () { return (long) (sizeof (void *)); }
3900#include <stdio.h>
3901#include <stdlib.h>
3902int
3903main ()
3904{
3905
3906 FILE *f = fopen ("conftest.val", "w");
3907 if (! f)
3908 exit (1);
3909 if (((long) (sizeof (void *))) < 0)
3910 {
3911 long i = longval ();
3912 if (i != ((long) (sizeof (void *))))
3913 exit (1);
3914 fprintf (f, "%ld\n", i);
3915 }
3916 else
3917 {
3918 unsigned long i = ulongval ();
3919 if (i != ((long) (sizeof (void *))))
3920 exit (1);
3921 fprintf (f, "%lu\n", i);
3922 }
3923 exit (ferror (f) || fclose (f) != 0);
3924
3925 ;
3926 return 0;
3927}
3928_ACEOF
3929rm -f conftest$ac_exeext
3930if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3931 (eval $ac_link) 2>&5
3932 ac_status=$?
3933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3934 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3936 (eval $ac_try) 2>&5
3937 ac_status=$?
3938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3939 (exit $ac_status); }; }; then
3940 ac_cv_sizeof_void_p=`cat conftest.val`
3941else
3942 echo "$as_me: program exited with status $ac_status" >&5
3943echo "$as_me: failed program was:" >&5
3944sed 's/^/| /' conftest.$ac_ext >&5
3945
3946( exit $ac_status )
3947{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3948See \`config.log' for more details." >&5
3949echo "$as_me: error: cannot compute sizeof (void *), 77
3950See \`config.log' for more details." >&2;}
3951 { (exit 1); exit 1; }; }
3952fi
3953rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3954fi
3955fi
3956rm -f conftest.val
3957else
3958 ac_cv_sizeof_void_p=0
3959fi
3960fi
3961echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3962echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3963cat >>confdefs.h <<_ACEOF
3964#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3965_ACEOF
3966
3967
3968echo "$as_me:$LINENO: checking for short" >&5
3969echo $ECHO_N "checking for short... $ECHO_C" >&6
3970if test "${ac_cv_type_short+set}" = set; then
3971 echo $ECHO_N "(cached) $ECHO_C" >&6
3972else
3973 cat >conftest.$ac_ext <<_ACEOF
3974/* confdefs.h. */
3975_ACEOF
3976cat confdefs.h >>conftest.$ac_ext
3977cat >>conftest.$ac_ext <<_ACEOF
3978/* end confdefs.h. */
3979$ac_includes_default
3980int
3981main ()
3982{
3983if ((short *) 0)
3984 return 0;
3985if (sizeof (short))
3986 return 0;
3987 ;
3988 return 0;
3989}
3990_ACEOF
3991rm -f conftest.$ac_objext
3992if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3993 (eval $ac_compile) 2>conftest.er1
3994 ac_status=$?
3995 grep -v '^ *+' conftest.er1 >conftest.err
3996 rm -f conftest.er1
3997 cat conftest.err >&5
3998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3999 (exit $ac_status); } &&
a1286ef5
ZW
4000 { ac_try='test -z "$ac_c_werror_flag"
4001 || test ! -s conftest.err'
bf3b7cd3
JD
4002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4003 (eval $ac_try) 2>&5
4004 ac_status=$?
4005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4006 (exit $ac_status); }; } &&
4007 { ac_try='test -s conftest.$ac_objext'
4008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4009 (eval $ac_try) 2>&5
4010 ac_status=$?
4011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4012 (exit $ac_status); }; }; then
4013 ac_cv_type_short=yes
4014else
4015 echo "$as_me: failed program was:" >&5
4016sed 's/^/| /' conftest.$ac_ext >&5
4017
4018ac_cv_type_short=no
4019fi
4020rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4021fi
4022echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
4023echo "${ECHO_T}$ac_cv_type_short" >&6
4024
4025echo "$as_me:$LINENO: checking size of short" >&5
4026echo $ECHO_N "checking size of short... $ECHO_C" >&6
4027if test "${ac_cv_sizeof_short+set}" = set; then
4028 echo $ECHO_N "(cached) $ECHO_C" >&6
4029else
4030 if test "$ac_cv_type_short" = yes; then
4031 # The cast to unsigned long works around a bug in the HP C Compiler
4032 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4033 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4034 # This bug is HP SR number 8606223364.
4035 if test "$cross_compiling" = yes; then
4036 # Depending upon the size, compute the lo and hi bounds.
4037cat >conftest.$ac_ext <<_ACEOF
4038/* confdefs.h. */
4039_ACEOF
4040cat confdefs.h >>conftest.$ac_ext
4041cat >>conftest.$ac_ext <<_ACEOF
4042/* end confdefs.h. */
4043$ac_includes_default
4044int
4045main ()
4046{
4047static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
4048test_array [0] = 0
4049
4050 ;
4051 return 0;
4052}
4053_ACEOF
4054rm -f conftest.$ac_objext
4055if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4056 (eval $ac_compile) 2>conftest.er1
4057 ac_status=$?
4058 grep -v '^ *+' conftest.er1 >conftest.err
4059 rm -f conftest.er1
4060 cat conftest.err >&5
4061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4062 (exit $ac_status); } &&
a1286ef5
ZW
4063 { ac_try='test -z "$ac_c_werror_flag"
4064 || test ! -s conftest.err'
bf3b7cd3
JD
4065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4066 (eval $ac_try) 2>&5
4067 ac_status=$?
4068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4069 (exit $ac_status); }; } &&
4070 { ac_try='test -s conftest.$ac_objext'
4071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4072 (eval $ac_try) 2>&5
4073 ac_status=$?
4074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4075 (exit $ac_status); }; }; then
4076 ac_lo=0 ac_mid=0
4077 while :; do
4078 cat >conftest.$ac_ext <<_ACEOF
4079/* confdefs.h. */
4080_ACEOF
4081cat confdefs.h >>conftest.$ac_ext
4082cat >>conftest.$ac_ext <<_ACEOF
4083/* end confdefs.h. */
4084$ac_includes_default
4085int
4086main ()
4087{
4088static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4089test_array [0] = 0
4090
4091 ;
4092 return 0;
4093}
4094_ACEOF
4095rm -f conftest.$ac_objext
4096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4097 (eval $ac_compile) 2>conftest.er1
4098 ac_status=$?
4099 grep -v '^ *+' conftest.er1 >conftest.err
4100 rm -f conftest.er1
4101 cat conftest.err >&5
4102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4103 (exit $ac_status); } &&
a1286ef5
ZW
4104 { ac_try='test -z "$ac_c_werror_flag"
4105 || test ! -s conftest.err'
bf3b7cd3
JD
4106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4107 (eval $ac_try) 2>&5
4108 ac_status=$?
4109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4110 (exit $ac_status); }; } &&
4111 { ac_try='test -s conftest.$ac_objext'
4112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4113 (eval $ac_try) 2>&5
4114 ac_status=$?
4115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4116 (exit $ac_status); }; }; then
4117 ac_hi=$ac_mid; break
4118else
4119 echo "$as_me: failed program was:" >&5
4120sed 's/^/| /' conftest.$ac_ext >&5
4121
4122ac_lo=`expr $ac_mid + 1`
4123 if test $ac_lo -le $ac_mid; then
4124 ac_lo= ac_hi=
4125 break
4126 fi
4127 ac_mid=`expr 2 '*' $ac_mid + 1`
4128fi
4129rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4130 done
4131else
4132 echo "$as_me: failed program was:" >&5
4133sed 's/^/| /' conftest.$ac_ext >&5
4134
4135cat >conftest.$ac_ext <<_ACEOF
4136/* confdefs.h. */
4137_ACEOF
4138cat confdefs.h >>conftest.$ac_ext
4139cat >>conftest.$ac_ext <<_ACEOF
4140/* end confdefs.h. */
4141$ac_includes_default
4142int
4143main ()
4144{
4145static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
4146test_array [0] = 0
4147
4148 ;
4149 return 0;
4150}
4151_ACEOF
4152rm -f conftest.$ac_objext
4153if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4154 (eval $ac_compile) 2>conftest.er1
4155 ac_status=$?
4156 grep -v '^ *+' conftest.er1 >conftest.err
4157 rm -f conftest.er1
4158 cat conftest.err >&5
4159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4160 (exit $ac_status); } &&
a1286ef5
ZW
4161 { ac_try='test -z "$ac_c_werror_flag"
4162 || test ! -s conftest.err'
bf3b7cd3
JD
4163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4164 (eval $ac_try) 2>&5
4165 ac_status=$?
4166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4167 (exit $ac_status); }; } &&
4168 { ac_try='test -s conftest.$ac_objext'
4169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4170 (eval $ac_try) 2>&5
4171 ac_status=$?
4172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4173 (exit $ac_status); }; }; then
4174 ac_hi=-1 ac_mid=-1
4175 while :; do
4176 cat >conftest.$ac_ext <<_ACEOF
4177/* confdefs.h. */
4178_ACEOF
4179cat confdefs.h >>conftest.$ac_ext
4180cat >>conftest.$ac_ext <<_ACEOF
4181/* end confdefs.h. */
4182$ac_includes_default
4183int
4184main ()
4185{
4186static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
4187test_array [0] = 0
4188
4189 ;
4190 return 0;
4191}
4192_ACEOF
4193rm -f conftest.$ac_objext
4194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4195 (eval $ac_compile) 2>conftest.er1
4196 ac_status=$?
4197 grep -v '^ *+' conftest.er1 >conftest.err
4198 rm -f conftest.er1
4199 cat conftest.err >&5
4200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4201 (exit $ac_status); } &&
a1286ef5
ZW
4202 { ac_try='test -z "$ac_c_werror_flag"
4203 || test ! -s conftest.err'
bf3b7cd3
JD
4204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4205 (eval $ac_try) 2>&5
4206 ac_status=$?
4207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4208 (exit $ac_status); }; } &&
4209 { ac_try='test -s conftest.$ac_objext'
4210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4211 (eval $ac_try) 2>&5
4212 ac_status=$?
4213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4214 (exit $ac_status); }; }; then
4215 ac_lo=$ac_mid; break
4216else
4217 echo "$as_me: failed program was:" >&5
4218sed 's/^/| /' conftest.$ac_ext >&5
4219
4220ac_hi=`expr '(' $ac_mid ')' - 1`
4221 if test $ac_mid -le $ac_hi; then
4222 ac_lo= ac_hi=
4223 break
4224 fi
4225 ac_mid=`expr 2 '*' $ac_mid`
4226fi
4227rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4228 done
4229else
4230 echo "$as_me: failed program was:" >&5
4231sed 's/^/| /' conftest.$ac_ext >&5
4232
4233ac_lo= ac_hi=
4234fi
4235rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4236fi
4237rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4238# Binary search between lo and hi bounds.
4239while test "x$ac_lo" != "x$ac_hi"; do
4240 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4241 cat >conftest.$ac_ext <<_ACEOF
4242/* confdefs.h. */
4243_ACEOF
4244cat confdefs.h >>conftest.$ac_ext
4245cat >>conftest.$ac_ext <<_ACEOF
4246/* end confdefs.h. */
4247$ac_includes_default
4248int
4249main ()
4250{
4251static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4252test_array [0] = 0
4253
4254 ;
4255 return 0;
4256}
4257_ACEOF
4258rm -f conftest.$ac_objext
4259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4260 (eval $ac_compile) 2>conftest.er1
4261 ac_status=$?
4262 grep -v '^ *+' conftest.er1 >conftest.err
4263 rm -f conftest.er1
4264 cat conftest.err >&5
4265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4266 (exit $ac_status); } &&
a1286ef5
ZW
4267 { ac_try='test -z "$ac_c_werror_flag"
4268 || test ! -s conftest.err'
bf3b7cd3
JD
4269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4270 (eval $ac_try) 2>&5
4271 ac_status=$?
4272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4273 (exit $ac_status); }; } &&
4274 { ac_try='test -s conftest.$ac_objext'
4275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4276 (eval $ac_try) 2>&5
4277 ac_status=$?
4278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4279 (exit $ac_status); }; }; then
4280 ac_hi=$ac_mid
4281else
4282 echo "$as_me: failed program was:" >&5
4283sed 's/^/| /' conftest.$ac_ext >&5
4284
4285ac_lo=`expr '(' $ac_mid ')' + 1`
4286fi
4287rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4288done
4289case $ac_lo in
4290?*) ac_cv_sizeof_short=$ac_lo;;
4291'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4292See \`config.log' for more details." >&5
4293echo "$as_me: error: cannot compute sizeof (short), 77
4294See \`config.log' for more details." >&2;}
4295 { (exit 1); exit 1; }; } ;;
4296esac
4297else
4298 if test "$cross_compiling" = yes; then
a1286ef5
ZW
4299 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4300See \`config.log' for more details." >&5
4301echo "$as_me: error: cannot run test program while cross compiling
4302See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4303 { (exit 1); exit 1; }; }
4304else
4305 cat >conftest.$ac_ext <<_ACEOF
4306/* confdefs.h. */
4307_ACEOF
4308cat confdefs.h >>conftest.$ac_ext
4309cat >>conftest.$ac_ext <<_ACEOF
4310/* end confdefs.h. */
4311$ac_includes_default
4312long longval () { return (long) (sizeof (short)); }
4313unsigned long ulongval () { return (long) (sizeof (short)); }
4314#include <stdio.h>
4315#include <stdlib.h>
4316int
4317main ()
4318{
4319
4320 FILE *f = fopen ("conftest.val", "w");
4321 if (! f)
4322 exit (1);
4323 if (((long) (sizeof (short))) < 0)
4324 {
4325 long i = longval ();
4326 if (i != ((long) (sizeof (short))))
4327 exit (1);
4328 fprintf (f, "%ld\n", i);
4329 }
4330 else
4331 {
4332 unsigned long i = ulongval ();
4333 if (i != ((long) (sizeof (short))))
4334 exit (1);
4335 fprintf (f, "%lu\n", i);
4336 }
4337 exit (ferror (f) || fclose (f) != 0);
4338
4339 ;
4340 return 0;
4341}
4342_ACEOF
4343rm -f conftest$ac_exeext
4344if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4345 (eval $ac_link) 2>&5
4346 ac_status=$?
4347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4348 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4350 (eval $ac_try) 2>&5
4351 ac_status=$?
4352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4353 (exit $ac_status); }; }; then
4354 ac_cv_sizeof_short=`cat conftest.val`
4355else
4356 echo "$as_me: program exited with status $ac_status" >&5
4357echo "$as_me: failed program was:" >&5
4358sed 's/^/| /' conftest.$ac_ext >&5
4359
4360( exit $ac_status )
4361{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4362See \`config.log' for more details." >&5
4363echo "$as_me: error: cannot compute sizeof (short), 77
4364See \`config.log' for more details." >&2;}
4365 { (exit 1); exit 1; }; }
4366fi
4367rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4368fi
4369fi
4370rm -f conftest.val
4371else
4372 ac_cv_sizeof_short=0
4373fi
4374fi
4375echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4376echo "${ECHO_T}$ac_cv_sizeof_short" >&6
4377cat >>confdefs.h <<_ACEOF
4378#define SIZEOF_SHORT $ac_cv_sizeof_short
4379_ACEOF
4380
4381
4382echo "$as_me:$LINENO: checking for int" >&5
4383echo $ECHO_N "checking for int... $ECHO_C" >&6
4384if test "${ac_cv_type_int+set}" = set; then
4385 echo $ECHO_N "(cached) $ECHO_C" >&6
4386else
4387 cat >conftest.$ac_ext <<_ACEOF
4388/* confdefs.h. */
4389_ACEOF
4390cat confdefs.h >>conftest.$ac_ext
4391cat >>conftest.$ac_ext <<_ACEOF
4392/* end confdefs.h. */
4393$ac_includes_default
4394int
4395main ()
4396{
4397if ((int *) 0)
4398 return 0;
4399if (sizeof (int))
4400 return 0;
4401 ;
4402 return 0;
4403}
4404_ACEOF
4405rm -f conftest.$ac_objext
4406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4407 (eval $ac_compile) 2>conftest.er1
4408 ac_status=$?
4409 grep -v '^ *+' conftest.er1 >conftest.err
4410 rm -f conftest.er1
4411 cat conftest.err >&5
4412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4413 (exit $ac_status); } &&
a1286ef5
ZW
4414 { ac_try='test -z "$ac_c_werror_flag"
4415 || test ! -s conftest.err'
bf3b7cd3
JD
4416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4417 (eval $ac_try) 2>&5
4418 ac_status=$?
4419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4420 (exit $ac_status); }; } &&
4421 { ac_try='test -s conftest.$ac_objext'
4422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4423 (eval $ac_try) 2>&5
4424 ac_status=$?
4425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4426 (exit $ac_status); }; }; then
4427 ac_cv_type_int=yes
4428else
4429 echo "$as_me: failed program was:" >&5
4430sed 's/^/| /' conftest.$ac_ext >&5
4431
4432ac_cv_type_int=no
4433fi
4434rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4435fi
4436echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4437echo "${ECHO_T}$ac_cv_type_int" >&6
4438
4439echo "$as_me:$LINENO: checking size of int" >&5
4440echo $ECHO_N "checking size of int... $ECHO_C" >&6
4441if test "${ac_cv_sizeof_int+set}" = set; then
4442 echo $ECHO_N "(cached) $ECHO_C" >&6
4443else
4444 if test "$ac_cv_type_int" = yes; then
4445 # The cast to unsigned long works around a bug in the HP C Compiler
4446 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4447 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4448 # This bug is HP SR number 8606223364.
4449 if test "$cross_compiling" = yes; then
4450 # Depending upon the size, compute the lo and hi bounds.
4451cat >conftest.$ac_ext <<_ACEOF
4452/* confdefs.h. */
4453_ACEOF
4454cat confdefs.h >>conftest.$ac_ext
4455cat >>conftest.$ac_ext <<_ACEOF
4456/* end confdefs.h. */
4457$ac_includes_default
4458int
4459main ()
4460{
4461static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4462test_array [0] = 0
4463
4464 ;
4465 return 0;
4466}
4467_ACEOF
4468rm -f conftest.$ac_objext
4469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4470 (eval $ac_compile) 2>conftest.er1
4471 ac_status=$?
4472 grep -v '^ *+' conftest.er1 >conftest.err
4473 rm -f conftest.er1
4474 cat conftest.err >&5
4475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4476 (exit $ac_status); } &&
a1286ef5
ZW
4477 { ac_try='test -z "$ac_c_werror_flag"
4478 || test ! -s conftest.err'
bf3b7cd3
JD
4479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4480 (eval $ac_try) 2>&5
4481 ac_status=$?
4482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4483 (exit $ac_status); }; } &&
4484 { ac_try='test -s conftest.$ac_objext'
4485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4486 (eval $ac_try) 2>&5
4487 ac_status=$?
4488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4489 (exit $ac_status); }; }; then
4490 ac_lo=0 ac_mid=0
4491 while :; do
4492 cat >conftest.$ac_ext <<_ACEOF
4493/* confdefs.h. */
4494_ACEOF
4495cat confdefs.h >>conftest.$ac_ext
4496cat >>conftest.$ac_ext <<_ACEOF
4497/* end confdefs.h. */
4498$ac_includes_default
4499int
4500main ()
4501{
4502static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4503test_array [0] = 0
4504
4505 ;
4506 return 0;
4507}
4508_ACEOF
4509rm -f conftest.$ac_objext
4510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4511 (eval $ac_compile) 2>conftest.er1
4512 ac_status=$?
4513 grep -v '^ *+' conftest.er1 >conftest.err
4514 rm -f conftest.er1
4515 cat conftest.err >&5
4516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4517 (exit $ac_status); } &&
a1286ef5
ZW
4518 { ac_try='test -z "$ac_c_werror_flag"
4519 || test ! -s conftest.err'
bf3b7cd3
JD
4520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4521 (eval $ac_try) 2>&5
4522 ac_status=$?
4523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4524 (exit $ac_status); }; } &&
4525 { ac_try='test -s conftest.$ac_objext'
4526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4527 (eval $ac_try) 2>&5
4528 ac_status=$?
4529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4530 (exit $ac_status); }; }; then
4531 ac_hi=$ac_mid; break
4532else
4533 echo "$as_me: failed program was:" >&5
4534sed 's/^/| /' conftest.$ac_ext >&5
4535
4536ac_lo=`expr $ac_mid + 1`
4537 if test $ac_lo -le $ac_mid; then
4538 ac_lo= ac_hi=
4539 break
4540 fi
4541 ac_mid=`expr 2 '*' $ac_mid + 1`
4542fi
4543rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4544 done
4545else
4546 echo "$as_me: failed program was:" >&5
4547sed 's/^/| /' conftest.$ac_ext >&5
4548
4549cat >conftest.$ac_ext <<_ACEOF
4550/* confdefs.h. */
4551_ACEOF
4552cat confdefs.h >>conftest.$ac_ext
4553cat >>conftest.$ac_ext <<_ACEOF
4554/* end confdefs.h. */
4555$ac_includes_default
4556int
4557main ()
4558{
4559static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4560test_array [0] = 0
4561
4562 ;
4563 return 0;
4564}
4565_ACEOF
4566rm -f conftest.$ac_objext
4567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4568 (eval $ac_compile) 2>conftest.er1
4569 ac_status=$?
4570 grep -v '^ *+' conftest.er1 >conftest.err
4571 rm -f conftest.er1
4572 cat conftest.err >&5
4573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4574 (exit $ac_status); } &&
a1286ef5
ZW
4575 { ac_try='test -z "$ac_c_werror_flag"
4576 || test ! -s conftest.err'
bf3b7cd3
JD
4577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4578 (eval $ac_try) 2>&5
4579 ac_status=$?
4580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4581 (exit $ac_status); }; } &&
4582 { ac_try='test -s conftest.$ac_objext'
4583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4584 (eval $ac_try) 2>&5
4585 ac_status=$?
4586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4587 (exit $ac_status); }; }; then
4588 ac_hi=-1 ac_mid=-1
4589 while :; do
4590 cat >conftest.$ac_ext <<_ACEOF
4591/* confdefs.h. */
4592_ACEOF
4593cat confdefs.h >>conftest.$ac_ext
4594cat >>conftest.$ac_ext <<_ACEOF
4595/* end confdefs.h. */
4596$ac_includes_default
4597int
4598main ()
4599{
4600static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4601test_array [0] = 0
4602
4603 ;
4604 return 0;
4605}
4606_ACEOF
4607rm -f conftest.$ac_objext
4608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4609 (eval $ac_compile) 2>conftest.er1
4610 ac_status=$?
4611 grep -v '^ *+' conftest.er1 >conftest.err
4612 rm -f conftest.er1
4613 cat conftest.err >&5
4614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4615 (exit $ac_status); } &&
a1286ef5
ZW
4616 { ac_try='test -z "$ac_c_werror_flag"
4617 || test ! -s conftest.err'
bf3b7cd3
JD
4618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4619 (eval $ac_try) 2>&5
4620 ac_status=$?
4621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4622 (exit $ac_status); }; } &&
4623 { ac_try='test -s conftest.$ac_objext'
4624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4625 (eval $ac_try) 2>&5
4626 ac_status=$?
4627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4628 (exit $ac_status); }; }; then
4629 ac_lo=$ac_mid; break
4630else
4631 echo "$as_me: failed program was:" >&5
4632sed 's/^/| /' conftest.$ac_ext >&5
4633
4634ac_hi=`expr '(' $ac_mid ')' - 1`
4635 if test $ac_mid -le $ac_hi; then
4636 ac_lo= ac_hi=
4637 break
4638 fi
4639 ac_mid=`expr 2 '*' $ac_mid`
4640fi
4641rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4642 done
4643else
4644 echo "$as_me: failed program was:" >&5
4645sed 's/^/| /' conftest.$ac_ext >&5
4646
4647ac_lo= ac_hi=
4648fi
4649rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4650fi
4651rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4652# Binary search between lo and hi bounds.
4653while test "x$ac_lo" != "x$ac_hi"; do
4654 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
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{
4665static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4666test_array [0] = 0
4667
4668 ;
4669 return 0;
4670}
4671_ACEOF
4672rm -f conftest.$ac_objext
4673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4674 (eval $ac_compile) 2>conftest.er1
4675 ac_status=$?
4676 grep -v '^ *+' conftest.er1 >conftest.err
4677 rm -f conftest.er1
4678 cat conftest.err >&5
4679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4680 (exit $ac_status); } &&
a1286ef5
ZW
4681 { ac_try='test -z "$ac_c_werror_flag"
4682 || 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_hi=$ac_mid
4695else
4696 echo "$as_me: failed program was:" >&5
4697sed 's/^/| /' conftest.$ac_ext >&5
4698
4699ac_lo=`expr '(' $ac_mid ')' + 1`
4700fi
4701rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4702done
4703case $ac_lo in
4704?*) ac_cv_sizeof_int=$ac_lo;;
4705'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4706See \`config.log' for more details." >&5
4707echo "$as_me: error: cannot compute sizeof (int), 77
4708See \`config.log' for more details." >&2;}
4709 { (exit 1); exit 1; }; } ;;
4710esac
4711else
4712 if test "$cross_compiling" = yes; then
a1286ef5
ZW
4713 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4714See \`config.log' for more details." >&5
4715echo "$as_me: error: cannot run test program while cross compiling
4716See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4717 { (exit 1); exit 1; }; }
4718else
4719 cat >conftest.$ac_ext <<_ACEOF
4720/* confdefs.h. */
4721_ACEOF
4722cat confdefs.h >>conftest.$ac_ext
4723cat >>conftest.$ac_ext <<_ACEOF
4724/* end confdefs.h. */
4725$ac_includes_default
4726long longval () { return (long) (sizeof (int)); }
4727unsigned long ulongval () { return (long) (sizeof (int)); }
4728#include <stdio.h>
4729#include <stdlib.h>
4730int
4731main ()
4732{
4733
4734 FILE *f = fopen ("conftest.val", "w");
4735 if (! f)
4736 exit (1);
4737 if (((long) (sizeof (int))) < 0)
4738 {
4739 long i = longval ();
4740 if (i != ((long) (sizeof (int))))
4741 exit (1);
4742 fprintf (f, "%ld\n", i);
4743 }
4744 else
4745 {
4746 unsigned long i = ulongval ();
4747 if (i != ((long) (sizeof (int))))
4748 exit (1);
4749 fprintf (f, "%lu\n", i);
4750 }
4751 exit (ferror (f) || fclose (f) != 0);
4752
4753 ;
4754 return 0;
4755}
4756_ACEOF
4757rm -f conftest$ac_exeext
4758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4759 (eval $ac_link) 2>&5
4760 ac_status=$?
4761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4762 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4764 (eval $ac_try) 2>&5
4765 ac_status=$?
4766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4767 (exit $ac_status); }; }; then
4768 ac_cv_sizeof_int=`cat conftest.val`
4769else
4770 echo "$as_me: program exited with status $ac_status" >&5
4771echo "$as_me: failed program was:" >&5
4772sed 's/^/| /' conftest.$ac_ext >&5
4773
4774( exit $ac_status )
4775{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4776See \`config.log' for more details." >&5
4777echo "$as_me: error: cannot compute sizeof (int), 77
4778See \`config.log' for more details." >&2;}
4779 { (exit 1); exit 1; }; }
4780fi
4781rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4782fi
4783fi
4784rm -f conftest.val
4785else
4786 ac_cv_sizeof_int=0
4787fi
4788fi
4789echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4790echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4791cat >>confdefs.h <<_ACEOF
4792#define SIZEOF_INT $ac_cv_sizeof_int
4793_ACEOF
4794
4795
4796echo "$as_me:$LINENO: checking for long" >&5
4797echo $ECHO_N "checking for long... $ECHO_C" >&6
4798if test "${ac_cv_type_long+set}" = set; then
4799 echo $ECHO_N "(cached) $ECHO_C" >&6
4800else
4801 cat >conftest.$ac_ext <<_ACEOF
4802/* confdefs.h. */
4803_ACEOF
4804cat confdefs.h >>conftest.$ac_ext
4805cat >>conftest.$ac_ext <<_ACEOF
4806/* end confdefs.h. */
4807$ac_includes_default
4808int
4809main ()
4810{
4811if ((long *) 0)
4812 return 0;
4813if (sizeof (long))
4814 return 0;
4815 ;
4816 return 0;
4817}
4818_ACEOF
4819rm -f conftest.$ac_objext
4820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4821 (eval $ac_compile) 2>conftest.er1
4822 ac_status=$?
4823 grep -v '^ *+' conftest.er1 >conftest.err
4824 rm -f conftest.er1
4825 cat conftest.err >&5
4826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4827 (exit $ac_status); } &&
a1286ef5
ZW
4828 { ac_try='test -z "$ac_c_werror_flag"
4829 || test ! -s conftest.err'
bf3b7cd3
JD
4830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4831 (eval $ac_try) 2>&5
4832 ac_status=$?
4833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4834 (exit $ac_status); }; } &&
4835 { ac_try='test -s conftest.$ac_objext'
4836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4837 (eval $ac_try) 2>&5
4838 ac_status=$?
4839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4840 (exit $ac_status); }; }; then
4841 ac_cv_type_long=yes
4842else
4843 echo "$as_me: failed program was:" >&5
4844sed 's/^/| /' conftest.$ac_ext >&5
4845
4846ac_cv_type_long=no
4847fi
4848rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4849fi
4850echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4851echo "${ECHO_T}$ac_cv_type_long" >&6
4852
4853echo "$as_me:$LINENO: checking size of long" >&5
4854echo $ECHO_N "checking size of long... $ECHO_C" >&6
4855if test "${ac_cv_sizeof_long+set}" = set; then
4856 echo $ECHO_N "(cached) $ECHO_C" >&6
4857else
4858 if test "$ac_cv_type_long" = yes; then
4859 # The cast to unsigned long works around a bug in the HP C Compiler
4860 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4861 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4862 # This bug is HP SR number 8606223364.
4863 if test "$cross_compiling" = yes; then
4864 # Depending upon the size, compute the lo and hi bounds.
4865cat >conftest.$ac_ext <<_ACEOF
4866/* confdefs.h. */
4867_ACEOF
4868cat confdefs.h >>conftest.$ac_ext
4869cat >>conftest.$ac_ext <<_ACEOF
4870/* end confdefs.h. */
4871$ac_includes_default
4872int
4873main ()
4874{
4875static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
4876test_array [0] = 0
4877
4878 ;
4879 return 0;
4880}
4881_ACEOF
4882rm -f conftest.$ac_objext
4883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4884 (eval $ac_compile) 2>conftest.er1
4885 ac_status=$?
4886 grep -v '^ *+' conftest.er1 >conftest.err
4887 rm -f conftest.er1
4888 cat conftest.err >&5
4889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4890 (exit $ac_status); } &&
a1286ef5
ZW
4891 { ac_try='test -z "$ac_c_werror_flag"
4892 || test ! -s conftest.err'
bf3b7cd3
JD
4893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4894 (eval $ac_try) 2>&5
4895 ac_status=$?
4896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4897 (exit $ac_status); }; } &&
4898 { ac_try='test -s conftest.$ac_objext'
4899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4900 (eval $ac_try) 2>&5
4901 ac_status=$?
4902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4903 (exit $ac_status); }; }; then
4904 ac_lo=0 ac_mid=0
4905 while :; do
4906 cat >conftest.$ac_ext <<_ACEOF
4907/* confdefs.h. */
4908_ACEOF
4909cat confdefs.h >>conftest.$ac_ext
4910cat >>conftest.$ac_ext <<_ACEOF
4911/* end confdefs.h. */
4912$ac_includes_default
4913int
4914main ()
4915{
4916static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4917test_array [0] = 0
4918
4919 ;
4920 return 0;
4921}
4922_ACEOF
4923rm -f conftest.$ac_objext
4924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4925 (eval $ac_compile) 2>conftest.er1
4926 ac_status=$?
4927 grep -v '^ *+' conftest.er1 >conftest.err
4928 rm -f conftest.er1
4929 cat conftest.err >&5
4930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4931 (exit $ac_status); } &&
a1286ef5
ZW
4932 { ac_try='test -z "$ac_c_werror_flag"
4933 || test ! -s conftest.err'
bf3b7cd3
JD
4934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4935 (eval $ac_try) 2>&5
4936 ac_status=$?
4937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4938 (exit $ac_status); }; } &&
4939 { ac_try='test -s conftest.$ac_objext'
4940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4941 (eval $ac_try) 2>&5
4942 ac_status=$?
4943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4944 (exit $ac_status); }; }; then
4945 ac_hi=$ac_mid; break
4946else
4947 echo "$as_me: failed program was:" >&5
4948sed 's/^/| /' conftest.$ac_ext >&5
4949
4950ac_lo=`expr $ac_mid + 1`
4951 if test $ac_lo -le $ac_mid; then
4952 ac_lo= ac_hi=
4953 break
4954 fi
4955 ac_mid=`expr 2 '*' $ac_mid + 1`
4956fi
4957rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4958 done
4959else
4960 echo "$as_me: failed program was:" >&5
4961sed 's/^/| /' conftest.$ac_ext >&5
4962
4963cat >conftest.$ac_ext <<_ACEOF
4964/* confdefs.h. */
4965_ACEOF
4966cat confdefs.h >>conftest.$ac_ext
4967cat >>conftest.$ac_ext <<_ACEOF
4968/* end confdefs.h. */
4969$ac_includes_default
4970int
4971main ()
4972{
4973static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
4974test_array [0] = 0
4975
4976 ;
4977 return 0;
4978}
4979_ACEOF
4980rm -f conftest.$ac_objext
4981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4982 (eval $ac_compile) 2>conftest.er1
4983 ac_status=$?
4984 grep -v '^ *+' conftest.er1 >conftest.err
4985 rm -f conftest.er1
4986 cat conftest.err >&5
4987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4988 (exit $ac_status); } &&
a1286ef5
ZW
4989 { ac_try='test -z "$ac_c_werror_flag"
4990 || test ! -s conftest.err'
bf3b7cd3
JD
4991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4992 (eval $ac_try) 2>&5
4993 ac_status=$?
4994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4995 (exit $ac_status); }; } &&
4996 { ac_try='test -s conftest.$ac_objext'
4997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4998 (eval $ac_try) 2>&5
4999 ac_status=$?
5000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5001 (exit $ac_status); }; }; then
5002 ac_hi=-1 ac_mid=-1
5003 while :; do
5004 cat >conftest.$ac_ext <<_ACEOF
5005/* confdefs.h. */
5006_ACEOF
5007cat confdefs.h >>conftest.$ac_ext
5008cat >>conftest.$ac_ext <<_ACEOF
5009/* end confdefs.h. */
5010$ac_includes_default
5011int
5012main ()
5013{
5014static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5015test_array [0] = 0
5016
5017 ;
5018 return 0;
5019}
5020_ACEOF
5021rm -f conftest.$ac_objext
5022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5023 (eval $ac_compile) 2>conftest.er1
5024 ac_status=$?
5025 grep -v '^ *+' conftest.er1 >conftest.err
5026 rm -f conftest.er1
5027 cat conftest.err >&5
5028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5029 (exit $ac_status); } &&
a1286ef5
ZW
5030 { ac_try='test -z "$ac_c_werror_flag"
5031 || test ! -s conftest.err'
bf3b7cd3
JD
5032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5033 (eval $ac_try) 2>&5
5034 ac_status=$?
5035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5036 (exit $ac_status); }; } &&
5037 { ac_try='test -s conftest.$ac_objext'
5038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5039 (eval $ac_try) 2>&5
5040 ac_status=$?
5041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5042 (exit $ac_status); }; }; then
5043 ac_lo=$ac_mid; break
5044else
5045 echo "$as_me: failed program was:" >&5
5046sed 's/^/| /' conftest.$ac_ext >&5
5047
5048ac_hi=`expr '(' $ac_mid ')' - 1`
5049 if test $ac_mid -le $ac_hi; then
5050 ac_lo= ac_hi=
5051 break
5052 fi
5053 ac_mid=`expr 2 '*' $ac_mid`
5054fi
5055rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5056 done
5057else
5058 echo "$as_me: failed program was:" >&5
5059sed 's/^/| /' conftest.$ac_ext >&5
5060
5061ac_lo= ac_hi=
5062fi
5063rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5064fi
5065rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5066# Binary search between lo and hi bounds.
5067while test "x$ac_lo" != "x$ac_hi"; do
5068 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5069 cat >conftest.$ac_ext <<_ACEOF
5070/* confdefs.h. */
5071_ACEOF
5072cat confdefs.h >>conftest.$ac_ext
5073cat >>conftest.$ac_ext <<_ACEOF
5074/* end confdefs.h. */
5075$ac_includes_default
5076int
5077main ()
5078{
5079static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5080test_array [0] = 0
5081
5082 ;
5083 return 0;
5084}
5085_ACEOF
5086rm -f conftest.$ac_objext
5087if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5088 (eval $ac_compile) 2>conftest.er1
5089 ac_status=$?
5090 grep -v '^ *+' conftest.er1 >conftest.err
5091 rm -f conftest.er1
5092 cat conftest.err >&5
5093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5094 (exit $ac_status); } &&
a1286ef5
ZW
5095 { ac_try='test -z "$ac_c_werror_flag"
5096 || test ! -s conftest.err'
bf3b7cd3
JD
5097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5098 (eval $ac_try) 2>&5
5099 ac_status=$?
5100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101 (exit $ac_status); }; } &&
5102 { ac_try='test -s conftest.$ac_objext'
5103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5104 (eval $ac_try) 2>&5
5105 ac_status=$?
5106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5107 (exit $ac_status); }; }; then
5108 ac_hi=$ac_mid
5109else
5110 echo "$as_me: failed program was:" >&5
5111sed 's/^/| /' conftest.$ac_ext >&5
5112
5113ac_lo=`expr '(' $ac_mid ')' + 1`
5114fi
5115rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5116done
5117case $ac_lo in
5118?*) ac_cv_sizeof_long=$ac_lo;;
5119'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5120See \`config.log' for more details." >&5
5121echo "$as_me: error: cannot compute sizeof (long), 77
5122See \`config.log' for more details." >&2;}
5123 { (exit 1); exit 1; }; } ;;
5124esac
5125else
5126 if test "$cross_compiling" = yes; then
a1286ef5
ZW
5127 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5128See \`config.log' for more details." >&5
5129echo "$as_me: error: cannot run test program while cross compiling
5130See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5131 { (exit 1); exit 1; }; }
5132else
5133 cat >conftest.$ac_ext <<_ACEOF
5134/* confdefs.h. */
5135_ACEOF
5136cat confdefs.h >>conftest.$ac_ext
5137cat >>conftest.$ac_ext <<_ACEOF
5138/* end confdefs.h. */
5139$ac_includes_default
5140long longval () { return (long) (sizeof (long)); }
5141unsigned long ulongval () { return (long) (sizeof (long)); }
5142#include <stdio.h>
5143#include <stdlib.h>
5144int
5145main ()
5146{
5147
5148 FILE *f = fopen ("conftest.val", "w");
5149 if (! f)
5150 exit (1);
5151 if (((long) (sizeof (long))) < 0)
5152 {
5153 long i = longval ();
5154 if (i != ((long) (sizeof (long))))
5155 exit (1);
5156 fprintf (f, "%ld\n", i);
5157 }
5158 else
5159 {
5160 unsigned long i = ulongval ();
5161 if (i != ((long) (sizeof (long))))
5162 exit (1);
5163 fprintf (f, "%lu\n", i);
5164 }
5165 exit (ferror (f) || fclose (f) != 0);
5166
5167 ;
5168 return 0;
5169}
5170_ACEOF
5171rm -f conftest$ac_exeext
5172if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5173 (eval $ac_link) 2>&5
5174 ac_status=$?
5175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5176 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5178 (eval $ac_try) 2>&5
5179 ac_status=$?
5180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5181 (exit $ac_status); }; }; then
5182 ac_cv_sizeof_long=`cat conftest.val`
5183else
5184 echo "$as_me: program exited with status $ac_status" >&5
5185echo "$as_me: failed program was:" >&5
5186sed 's/^/| /' conftest.$ac_ext >&5
5187
5188( exit $ac_status )
5189{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5190See \`config.log' for more details." >&5
5191echo "$as_me: error: cannot compute sizeof (long), 77
5192See \`config.log' for more details." >&2;}
5193 { (exit 1); exit 1; }; }
5194fi
5195rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5196fi
5197fi
5198rm -f conftest.val
5199else
5200 ac_cv_sizeof_long=0
5201fi
5202fi
5203echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5204echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5205cat >>confdefs.h <<_ACEOF
5206#define SIZEOF_LONG $ac_cv_sizeof_long
5207_ACEOF
5208
5209
5210if test $ac_cv_c_long_long = yes; then
5211 echo "$as_me:$LINENO: checking for long long" >&5
5212echo $ECHO_N "checking for long long... $ECHO_C" >&6
5213if test "${ac_cv_type_long_long+set}" = set; then
5214 echo $ECHO_N "(cached) $ECHO_C" >&6
5215else
5216 cat >conftest.$ac_ext <<_ACEOF
5217/* confdefs.h. */
5218_ACEOF
5219cat confdefs.h >>conftest.$ac_ext
5220cat >>conftest.$ac_ext <<_ACEOF
5221/* end confdefs.h. */
5222$ac_includes_default
5223int
5224main ()
5225{
5226if ((long long *) 0)
5227 return 0;
5228if (sizeof (long long))
5229 return 0;
5230 ;
5231 return 0;
5232}
5233_ACEOF
5234rm -f conftest.$ac_objext
5235if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5236 (eval $ac_compile) 2>conftest.er1
5237 ac_status=$?
5238 grep -v '^ *+' conftest.er1 >conftest.err
5239 rm -f conftest.er1
5240 cat conftest.err >&5
5241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5242 (exit $ac_status); } &&
a1286ef5
ZW
5243 { ac_try='test -z "$ac_c_werror_flag"
5244 || test ! -s conftest.err'
bf3b7cd3
JD
5245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5246 (eval $ac_try) 2>&5
5247 ac_status=$?
5248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5249 (exit $ac_status); }; } &&
5250 { ac_try='test -s conftest.$ac_objext'
5251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5252 (eval $ac_try) 2>&5
5253 ac_status=$?
5254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5255 (exit $ac_status); }; }; then
5256 ac_cv_type_long_long=yes
5257else
5258 echo "$as_me: failed program was:" >&5
5259sed 's/^/| /' conftest.$ac_ext >&5
5260
5261ac_cv_type_long_long=no
5262fi
5263rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5264fi
5265echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5266echo "${ECHO_T}$ac_cv_type_long_long" >&6
5267
5268echo "$as_me:$LINENO: checking size of long long" >&5
5269echo $ECHO_N "checking size of long long... $ECHO_C" >&6
5270if test "${ac_cv_sizeof_long_long+set}" = set; then
5271 echo $ECHO_N "(cached) $ECHO_C" >&6
5272else
5273 if test "$ac_cv_type_long_long" = yes; then
5274 # The cast to unsigned long works around a bug in the HP C Compiler
5275 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5276 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5277 # This bug is HP SR number 8606223364.
5278 if test "$cross_compiling" = yes; then
5279 # Depending upon the size, compute the lo and hi bounds.
5280cat >conftest.$ac_ext <<_ACEOF
5281/* confdefs.h. */
5282_ACEOF
5283cat confdefs.h >>conftest.$ac_ext
5284cat >>conftest.$ac_ext <<_ACEOF
5285/* end confdefs.h. */
5286$ac_includes_default
5287int
5288main ()
5289{
5290static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
5291test_array [0] = 0
5292
5293 ;
5294 return 0;
5295}
5296_ACEOF
5297rm -f conftest.$ac_objext
5298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5299 (eval $ac_compile) 2>conftest.er1
5300 ac_status=$?
5301 grep -v '^ *+' conftest.er1 >conftest.err
5302 rm -f conftest.er1
5303 cat conftest.err >&5
5304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5305 (exit $ac_status); } &&
a1286ef5
ZW
5306 { ac_try='test -z "$ac_c_werror_flag"
5307 || 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_lo=0 ac_mid=0
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); } &&
a1286ef5
ZW
5347 { ac_try='test -z "$ac_c_werror_flag"
5348 || test ! -s conftest.err'
bf3b7cd3
JD
5349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5350 (eval $ac_try) 2>&5
5351 ac_status=$?
5352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5353 (exit $ac_status); }; } &&
5354 { ac_try='test -s conftest.$ac_objext'
5355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5356 (eval $ac_try) 2>&5
5357 ac_status=$?
5358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5359 (exit $ac_status); }; }; then
5360 ac_hi=$ac_mid; break
5361else
5362 echo "$as_me: failed program was:" >&5
5363sed 's/^/| /' conftest.$ac_ext >&5
5364
5365ac_lo=`expr $ac_mid + 1`
5366 if test $ac_lo -le $ac_mid; then
5367 ac_lo= ac_hi=
5368 break
5369 fi
5370 ac_mid=`expr 2 '*' $ac_mid + 1`
5371fi
5372rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5373 done
5374else
5375 echo "$as_me: failed program was:" >&5
5376sed 's/^/| /' conftest.$ac_ext >&5
5377
5378cat >conftest.$ac_ext <<_ACEOF
5379/* confdefs.h. */
5380_ACEOF
5381cat confdefs.h >>conftest.$ac_ext
5382cat >>conftest.$ac_ext <<_ACEOF
5383/* end confdefs.h. */
5384$ac_includes_default
5385int
5386main ()
5387{
5388static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
5389test_array [0] = 0
5390
5391 ;
5392 return 0;
5393}
5394_ACEOF
5395rm -f conftest.$ac_objext
5396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5397 (eval $ac_compile) 2>conftest.er1
5398 ac_status=$?
5399 grep -v '^ *+' conftest.er1 >conftest.err
5400 rm -f conftest.er1
5401 cat conftest.err >&5
5402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5403 (exit $ac_status); } &&
a1286ef5
ZW
5404 { ac_try='test -z "$ac_c_werror_flag"
5405 || test ! -s conftest.err'
bf3b7cd3
JD
5406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5407 (eval $ac_try) 2>&5
5408 ac_status=$?
5409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5410 (exit $ac_status); }; } &&
5411 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
5417 ac_hi=-1 ac_mid=-1
5418 while :; do
5419 cat >conftest.$ac_ext <<_ACEOF
5420/* confdefs.h. */
5421_ACEOF
5422cat confdefs.h >>conftest.$ac_ext
5423cat >>conftest.$ac_ext <<_ACEOF
5424/* end confdefs.h. */
5425$ac_includes_default
5426int
5427main ()
5428{
5429static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
5430test_array [0] = 0
5431
5432 ;
5433 return 0;
5434}
5435_ACEOF
5436rm -f conftest.$ac_objext
5437if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5438 (eval $ac_compile) 2>conftest.er1
5439 ac_status=$?
5440 grep -v '^ *+' conftest.er1 >conftest.err
5441 rm -f conftest.er1
5442 cat conftest.err >&5
5443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5444 (exit $ac_status); } &&
a1286ef5
ZW
5445 { ac_try='test -z "$ac_c_werror_flag"
5446 || test ! -s conftest.err'
bf3b7cd3
JD
5447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5448 (eval $ac_try) 2>&5
5449 ac_status=$?
5450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5451 (exit $ac_status); }; } &&
5452 { ac_try='test -s conftest.$ac_objext'
5453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5454 (eval $ac_try) 2>&5
5455 ac_status=$?
5456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5457 (exit $ac_status); }; }; then
5458 ac_lo=$ac_mid; break
5459else
5460 echo "$as_me: failed program was:" >&5
5461sed 's/^/| /' conftest.$ac_ext >&5
5462
5463ac_hi=`expr '(' $ac_mid ')' - 1`
5464 if test $ac_mid -le $ac_hi; then
5465 ac_lo= ac_hi=
5466 break
5467 fi
5468 ac_mid=`expr 2 '*' $ac_mid`
5469fi
5470rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5471 done
5472else
5473 echo "$as_me: failed program was:" >&5
5474sed 's/^/| /' conftest.$ac_ext >&5
5475
5476ac_lo= ac_hi=
5477fi
5478rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5479fi
5480rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5481# Binary search between lo and hi bounds.
5482while test "x$ac_lo" != "x$ac_hi"; do
5483 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5484 cat >conftest.$ac_ext <<_ACEOF
5485/* confdefs.h. */
5486_ACEOF
5487cat confdefs.h >>conftest.$ac_ext
5488cat >>conftest.$ac_ext <<_ACEOF
5489/* end confdefs.h. */
5490$ac_includes_default
5491int
5492main ()
5493{
5494static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5495test_array [0] = 0
5496
5497 ;
5498 return 0;
5499}
5500_ACEOF
5501rm -f conftest.$ac_objext
5502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5503 (eval $ac_compile) 2>conftest.er1
5504 ac_status=$?
5505 grep -v '^ *+' conftest.er1 >conftest.err
5506 rm -f conftest.er1
5507 cat conftest.err >&5
5508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5509 (exit $ac_status); } &&
a1286ef5
ZW
5510 { ac_try='test -z "$ac_c_werror_flag"
5511 || test ! -s conftest.err'
bf3b7cd3
JD
5512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5513 (eval $ac_try) 2>&5
5514 ac_status=$?
5515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5516 (exit $ac_status); }; } &&
5517 { ac_try='test -s conftest.$ac_objext'
5518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5519 (eval $ac_try) 2>&5
5520 ac_status=$?
5521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5522 (exit $ac_status); }; }; then
5523 ac_hi=$ac_mid
5524else
5525 echo "$as_me: failed program was:" >&5
5526sed 's/^/| /' conftest.$ac_ext >&5
5527
5528ac_lo=`expr '(' $ac_mid ')' + 1`
5529fi
5530rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5531done
5532case $ac_lo in
5533?*) ac_cv_sizeof_long_long=$ac_lo;;
5534'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5535See \`config.log' for more details." >&5
5536echo "$as_me: error: cannot compute sizeof (long long), 77
5537See \`config.log' for more details." >&2;}
5538 { (exit 1); exit 1; }; } ;;
5539esac
5540else
5541 if test "$cross_compiling" = yes; then
a1286ef5
ZW
5542 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5543See \`config.log' for more details." >&5
5544echo "$as_me: error: cannot run test program while cross compiling
5545See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5546 { (exit 1); exit 1; }; }
5547else
5548 cat >conftest.$ac_ext <<_ACEOF
5549/* confdefs.h. */
5550_ACEOF
5551cat confdefs.h >>conftest.$ac_ext
5552cat >>conftest.$ac_ext <<_ACEOF
5553/* end confdefs.h. */
5554$ac_includes_default
5555long longval () { return (long) (sizeof (long long)); }
5556unsigned long ulongval () { return (long) (sizeof (long long)); }
5557#include <stdio.h>
5558#include <stdlib.h>
5559int
5560main ()
5561{
5562
5563 FILE *f = fopen ("conftest.val", "w");
5564 if (! f)
5565 exit (1);
5566 if (((long) (sizeof (long long))) < 0)
5567 {
5568 long i = longval ();
5569 if (i != ((long) (sizeof (long long))))
5570 exit (1);
5571 fprintf (f, "%ld\n", i);
5572 }
5573 else
5574 {
5575 unsigned long i = ulongval ();
5576 if (i != ((long) (sizeof (long long))))
5577 exit (1);
5578 fprintf (f, "%lu\n", i);
5579 }
5580 exit (ferror (f) || fclose (f) != 0);
5581
5582 ;
5583 return 0;
5584}
5585_ACEOF
5586rm -f conftest$ac_exeext
5587if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5588 (eval $ac_link) 2>&5
5589 ac_status=$?
5590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5591 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5593 (eval $ac_try) 2>&5
5594 ac_status=$?
5595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5596 (exit $ac_status); }; }; then
5597 ac_cv_sizeof_long_long=`cat conftest.val`
5598else
5599 echo "$as_me: program exited with status $ac_status" >&5
5600echo "$as_me: failed program was:" >&5
5601sed 's/^/| /' conftest.$ac_ext >&5
5602
5603( exit $ac_status )
5604{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5605See \`config.log' for more details." >&5
5606echo "$as_me: error: cannot compute sizeof (long long), 77
5607See \`config.log' for more details." >&2;}
5608 { (exit 1); exit 1; }; }
5609fi
5610rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5611fi
5612fi
5613rm -f conftest.val
5614else
5615 ac_cv_sizeof_long_long=0
5616fi
5617fi
5618echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5619echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
5620cat >>confdefs.h <<_ACEOF
5621#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5622_ACEOF
5623
5624
5625fi
5626if test $ac_cv_c___int64 = yes; then
5627 echo "$as_me:$LINENO: checking for __int64" >&5
5628echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5629if test "${ac_cv_type___int64+set}" = set; then
5630 echo $ECHO_N "(cached) $ECHO_C" >&6
5631else
ba479fd2 5632 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5633/* confdefs.h. */
5634_ACEOF
5635cat confdefs.h >>conftest.$ac_ext
5636cat >>conftest.$ac_ext <<_ACEOF
5637/* end confdefs.h. */
bf3b7cd3 5638$ac_includes_default
ba479fd2
NN
5639int
5640main ()
5641{
bf3b7cd3
JD
5642if ((__int64 *) 0)
5643 return 0;
5644if (sizeof (__int64))
5645 return 0;
ba479fd2
NN
5646 ;
5647 return 0;
5648}
5649_ACEOF
5650rm -f conftest.$ac_objext
5651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5652 (eval $ac_compile) 2>conftest.er1
ba479fd2 5653 ac_status=$?
86da66b5
HPN
5654 grep -v '^ *+' conftest.er1 >conftest.err
5655 rm -f conftest.er1
5656 cat conftest.err >&5
ba479fd2
NN
5657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5658 (exit $ac_status); } &&
a1286ef5
ZW
5659 { ac_try='test -z "$ac_c_werror_flag"
5660 || test ! -s conftest.err'
86da66b5
HPN
5661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5662 (eval $ac_try) 2>&5
5663 ac_status=$?
5664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5665 (exit $ac_status); }; } &&
5666 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5668 (eval $ac_try) 2>&5
5669 ac_status=$?
5670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5671 (exit $ac_status); }; }; then
bf3b7cd3 5672 ac_cv_type___int64=yes
75b6f3fd 5673else
ba479fd2
NN
5674 echo "$as_me: failed program was:" >&5
5675sed 's/^/| /' conftest.$ac_ext >&5
5676
bf3b7cd3 5677ac_cv_type___int64=no
75b6f3fd 5678fi
86da66b5 5679rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5680fi
bf3b7cd3
JD
5681echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5682echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 5683
bf3b7cd3
JD
5684echo "$as_me:$LINENO: checking size of __int64" >&5
5685echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
5686if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 5687 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 5688else
bf3b7cd3
JD
5689 if test "$ac_cv_type___int64" = yes; then
5690 # The cast to unsigned long works around a bug in the HP C Compiler
5691 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5692 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5693 # This bug is HP SR number 8606223364.
5694 if test "$cross_compiling" = yes; then
5695 # Depending upon the size, compute the lo and hi bounds.
5696cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5697/* confdefs.h. */
5698_ACEOF
5699cat confdefs.h >>conftest.$ac_ext
5700cat >>conftest.$ac_ext <<_ACEOF
5701/* end confdefs.h. */
bf3b7cd3 5702$ac_includes_default
ba479fd2
NN
5703int
5704main ()
5705{
bf3b7cd3
JD
5706static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
5707test_array [0] = 0
5708
ba479fd2
NN
5709 ;
5710 return 0;
5711}
5712_ACEOF
5713rm -f conftest.$ac_objext
5714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5715 (eval $ac_compile) 2>conftest.er1
ba479fd2 5716 ac_status=$?
86da66b5
HPN
5717 grep -v '^ *+' conftest.er1 >conftest.err
5718 rm -f conftest.er1
5719 cat conftest.err >&5
ba479fd2
NN
5720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5721 (exit $ac_status); } &&
a1286ef5
ZW
5722 { ac_try='test -z "$ac_c_werror_flag"
5723 || test ! -s conftest.err'
86da66b5
HPN
5724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5725 (eval $ac_try) 2>&5
5726 ac_status=$?
5727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5728 (exit $ac_status); }; } &&
5729 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5731 (eval $ac_try) 2>&5
5732 ac_status=$?
5733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5734 (exit $ac_status); }; }; then
bf3b7cd3
JD
5735 ac_lo=0 ac_mid=0
5736 while :; do
5737 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5738/* confdefs.h. */
5739_ACEOF
5740cat confdefs.h >>conftest.$ac_ext
5741cat >>conftest.$ac_ext <<_ACEOF
5742/* end confdefs.h. */
bf3b7cd3 5743$ac_includes_default
ba479fd2
NN
5744int
5745main ()
5746{
bf3b7cd3
JD
5747static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5748test_array [0] = 0
5749
ba479fd2
NN
5750 ;
5751 return 0;
5752}
5753_ACEOF
5754rm -f conftest.$ac_objext
5755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5756 (eval $ac_compile) 2>conftest.er1
ba479fd2 5757 ac_status=$?
86da66b5
HPN
5758 grep -v '^ *+' conftest.er1 >conftest.err
5759 rm -f conftest.er1
5760 cat conftest.err >&5
ba479fd2
NN
5761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5762 (exit $ac_status); } &&
a1286ef5
ZW
5763 { ac_try='test -z "$ac_c_werror_flag"
5764 || test ! -s conftest.err'
86da66b5
HPN
5765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5766 (eval $ac_try) 2>&5
5767 ac_status=$?
5768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5769 (exit $ac_status); }; } &&
5770 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5772 (eval $ac_try) 2>&5
5773 ac_status=$?
5774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5775 (exit $ac_status); }; }; then
bf3b7cd3 5776 ac_hi=$ac_mid; break
75e93faa 5777else
ba479fd2
NN
5778 echo "$as_me: failed program was:" >&5
5779sed 's/^/| /' conftest.$ac_ext >&5
5780
bf3b7cd3
JD
5781ac_lo=`expr $ac_mid + 1`
5782 if test $ac_lo -le $ac_mid; then
5783 ac_lo= ac_hi=
5784 break
5785 fi
5786 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 5787fi
86da66b5 5788rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5789 done
75e93faa 5790else
bf3b7cd3
JD
5791 echo "$as_me: failed program was:" >&5
5792sed 's/^/| /' conftest.$ac_ext >&5
5793
5794cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5795/* confdefs.h. */
5796_ACEOF
5797cat confdefs.h >>conftest.$ac_ext
5798cat >>conftest.$ac_ext <<_ACEOF
5799/* end confdefs.h. */
bf3b7cd3 5800$ac_includes_default
ba479fd2
NN
5801int
5802main ()
5803{
bf3b7cd3
JD
5804static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
5805test_array [0] = 0
5806
ba479fd2
NN
5807 ;
5808 return 0;
5809}
5810_ACEOF
5811rm -f conftest.$ac_objext
5812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5813 (eval $ac_compile) 2>conftest.er1
ba479fd2 5814 ac_status=$?
86da66b5
HPN
5815 grep -v '^ *+' conftest.er1 >conftest.err
5816 rm -f conftest.er1
5817 cat conftest.err >&5
ba479fd2
NN
5818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5819 (exit $ac_status); } &&
a1286ef5
ZW
5820 { ac_try='test -z "$ac_c_werror_flag"
5821 || test ! -s conftest.err'
86da66b5
HPN
5822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5823 (eval $ac_try) 2>&5
5824 ac_status=$?
5825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5826 (exit $ac_status); }; } &&
5827 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5829 (eval $ac_try) 2>&5
5830 ac_status=$?
5831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5832 (exit $ac_status); }; }; then
bf3b7cd3
JD
5833 ac_hi=-1 ac_mid=-1
5834 while :; do
5835 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5836/* confdefs.h. */
5837_ACEOF
5838cat confdefs.h >>conftest.$ac_ext
5839cat >>conftest.$ac_ext <<_ACEOF
5840/* end confdefs.h. */
bf3b7cd3 5841$ac_includes_default
ba479fd2
NN
5842int
5843main ()
5844{
bf3b7cd3
JD
5845static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
5846test_array [0] = 0
5847
ba479fd2
NN
5848 ;
5849 return 0;
5850}
5851_ACEOF
5852rm -f conftest.$ac_objext
5853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5854 (eval $ac_compile) 2>conftest.er1
ba479fd2 5855 ac_status=$?
86da66b5
HPN
5856 grep -v '^ *+' conftest.er1 >conftest.err
5857 rm -f conftest.er1
5858 cat conftest.err >&5
ba479fd2
NN
5859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5860 (exit $ac_status); } &&
a1286ef5
ZW
5861 { ac_try='test -z "$ac_c_werror_flag"
5862 || test ! -s conftest.err'
86da66b5
HPN
5863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5864 (eval $ac_try) 2>&5
5865 ac_status=$?
5866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867 (exit $ac_status); }; } &&
5868 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5870 (eval $ac_try) 2>&5
5871 ac_status=$?
5872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5873 (exit $ac_status); }; }; then
bf3b7cd3 5874 ac_lo=$ac_mid; break
04cabffc 5875else
ba479fd2
NN
5876 echo "$as_me: failed program was:" >&5
5877sed 's/^/| /' conftest.$ac_ext >&5
5878
bf3b7cd3
JD
5879ac_hi=`expr '(' $ac_mid ')' - 1`
5880 if test $ac_mid -le $ac_hi; then
5881 ac_lo= ac_hi=
5882 break
5883 fi
5884 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 5885fi
86da66b5 5886rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5887 done
5888else
5889 echo "$as_me: failed program was:" >&5
5890sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 5891
bf3b7cd3 5892ac_lo= ac_hi=
414d23ae 5893fi
bf3b7cd3 5894rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5895fi
bf3b7cd3
JD
5896rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5897# Binary search between lo and hi bounds.
5898while test "x$ac_lo" != "x$ac_hi"; do
5899 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 5900 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5901/* confdefs.h. */
5902_ACEOF
5903cat confdefs.h >>conftest.$ac_ext
5904cat >>conftest.$ac_ext <<_ACEOF
5905/* end confdefs.h. */
bf3b7cd3 5906$ac_includes_default
ba479fd2
NN
5907int
5908main ()
5909{
bf3b7cd3
JD
5910static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5911test_array [0] = 0
5912
ba479fd2
NN
5913 ;
5914 return 0;
5915}
5916_ACEOF
5917rm -f conftest.$ac_objext
5918if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5919 (eval $ac_compile) 2>conftest.er1
ba479fd2 5920 ac_status=$?
86da66b5
HPN
5921 grep -v '^ *+' conftest.er1 >conftest.err
5922 rm -f conftest.er1
5923 cat conftest.err >&5
ba479fd2
NN
5924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5925 (exit $ac_status); } &&
a1286ef5
ZW
5926 { ac_try='test -z "$ac_c_werror_flag"
5927 || test ! -s conftest.err'
86da66b5
HPN
5928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5929 (eval $ac_try) 2>&5
5930 ac_status=$?
5931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5932 (exit $ac_status); }; } &&
5933 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5935 (eval $ac_try) 2>&5
5936 ac_status=$?
5937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5938 (exit $ac_status); }; }; then
bf3b7cd3 5939 ac_hi=$ac_mid
75e93faa 5940else
ba479fd2
NN
5941 echo "$as_me: failed program was:" >&5
5942sed 's/^/| /' conftest.$ac_ext >&5
5943
bf3b7cd3 5944ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 5945fi
86da66b5 5946rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5947done
bf3b7cd3
JD
5948case $ac_lo in
5949?*) ac_cv_sizeof___int64=$ac_lo;;
5950'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
5951See \`config.log' for more details." >&5
5952echo "$as_me: error: cannot compute sizeof (__int64), 77
5953See \`config.log' for more details." >&2;}
5954 { (exit 1); exit 1; }; } ;;
5955esac
5956else
5957 if test "$cross_compiling" = yes; then
a1286ef5
ZW
5958 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5959See \`config.log' for more details." >&5
5960echo "$as_me: error: cannot run test program while cross compiling
5961See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5962 { (exit 1); exit 1; }; }
5963else
5964 cat >conftest.$ac_ext <<_ACEOF
5965/* confdefs.h. */
5966_ACEOF
5967cat confdefs.h >>conftest.$ac_ext
5968cat >>conftest.$ac_ext <<_ACEOF
5969/* end confdefs.h. */
5970$ac_includes_default
5971long longval () { return (long) (sizeof (__int64)); }
5972unsigned long ulongval () { return (long) (sizeof (__int64)); }
5973#include <stdio.h>
5974#include <stdlib.h>
5975int
5976main ()
5977{
414d23ae 5978
bf3b7cd3
JD
5979 FILE *f = fopen ("conftest.val", "w");
5980 if (! f)
5981 exit (1);
5982 if (((long) (sizeof (__int64))) < 0)
5983 {
5984 long i = longval ();
5985 if (i != ((long) (sizeof (__int64))))
5986 exit (1);
5987 fprintf (f, "%ld\n", i);
5988 }
5989 else
5990 {
5991 unsigned long i = ulongval ();
5992 if (i != ((long) (sizeof (__int64))))
5993 exit (1);
5994 fprintf (f, "%lu\n", i);
5995 }
5996 exit (ferror (f) || fclose (f) != 0);
5997
5998 ;
5999 return 0;
6000}
6001_ACEOF
6002rm -f conftest$ac_exeext
6003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6004 (eval $ac_link) 2>&5
6005 ac_status=$?
6006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6007 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6009 (eval $ac_try) 2>&5
6010 ac_status=$?
6011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6012 (exit $ac_status); }; }; then
6013 ac_cv_sizeof___int64=`cat conftest.val`
6014else
6015 echo "$as_me: program exited with status $ac_status" >&5
6016echo "$as_me: failed program was:" >&5
6017sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6018
bf3b7cd3
JD
6019( exit $ac_status )
6020{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
6021See \`config.log' for more details." >&5
6022echo "$as_me: error: cannot compute sizeof (__int64), 77
6023See \`config.log' for more details." >&2;}
ba479fd2 6024 { (exit 1); exit 1; }; }
414d23ae 6025fi
bf3b7cd3
JD
6026rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6027fi
6028fi
6029rm -f conftest.val
6030else
6031 ac_cv_sizeof___int64=0
6032fi
6033fi
ba479fd2
NN
6034echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6035echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 6036cat >>confdefs.h <<_ACEOF
414d23ae 6037#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6038_ACEOF
414d23ae 6039
cafe096b 6040
414d23ae
HPN
6041fi
6042
34a86c2b
NN
6043# ---------------------
6044# Warnings and checking
6045# ---------------------
6046
b5472e1d
NN
6047# Check $CC warning features (if it's GCC).
6048# We want to use -pedantic, but we don't want warnings about
6049# * 'long long'
6050# * variadic macros
6051# So, we only use -pedantic if we can disable those warnings.
6052
6053echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6054echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
6055if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6056 echo $ECHO_N "(cached) $ECHO_C" >&6
6057else
6058 save_CFLAGS="$CFLAGS"
6059 CFLAGS="-Wno-long-long"
6060 cat >conftest.$ac_ext <<_ACEOF
6061/* confdefs.h. */
6062_ACEOF
6063cat confdefs.h >>conftest.$ac_ext
6064cat >>conftest.$ac_ext <<_ACEOF
6065/* end confdefs.h. */
6066
6067_ACEOF
6068rm -f conftest.$ac_objext
6069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6070 (eval $ac_compile) 2>conftest.er1
6071 ac_status=$?
6072 grep -v '^ *+' conftest.er1 >conftest.err
6073 rm -f conftest.er1
6074 cat conftest.err >&5
6075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6076 (exit $ac_status); } &&
a1286ef5
ZW
6077 { ac_try='test -z "$ac_c_werror_flag"
6078 || test ! -s conftest.err'
b5472e1d
NN
6079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6080 (eval $ac_try) 2>&5
6081 ac_status=$?
6082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6083 (exit $ac_status); }; } &&
6084 { ac_try='test -s conftest.$ac_objext'
6085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6086 (eval $ac_try) 2>&5
6087 ac_status=$?
6088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6089 (exit $ac_status); }; }; then
6090 ac_cv_prog_cc_w_no_long_long=yes
6091else
6092 echo "$as_me: failed program was:" >&5
6093sed 's/^/| /' conftest.$ac_ext >&5
6094
6095ac_cv_prog_cc_w_no_long_long=no
6096fi
6097rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6098 CFLAGS="$save_CFLAGS"
6099
6100fi
6101echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6102echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
6103
6104echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6105echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
6106if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6107 echo $ECHO_N "(cached) $ECHO_C" >&6
6108else
6109 save_CFLAGS="$CFLAGS"
6110 CFLAGS="-Wno-variadic-macros"
6111 cat >conftest.$ac_ext <<_ACEOF
6112/* confdefs.h. */
6113_ACEOF
6114cat confdefs.h >>conftest.$ac_ext
6115cat >>conftest.$ac_ext <<_ACEOF
6116/* end confdefs.h. */
6117
6118_ACEOF
6119rm -f conftest.$ac_objext
6120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6121 (eval $ac_compile) 2>conftest.er1
6122 ac_status=$?
6123 grep -v '^ *+' conftest.er1 >conftest.err
6124 rm -f conftest.er1
6125 cat conftest.err >&5
6126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6127 (exit $ac_status); } &&
a1286ef5
ZW
6128 { ac_try='test -z "$ac_c_werror_flag"
6129 || test ! -s conftest.err'
b5472e1d
NN
6130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6131 (eval $ac_try) 2>&5
6132 ac_status=$?
6133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6134 (exit $ac_status); }; } &&
6135 { ac_try='test -s conftest.$ac_objext'
6136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6137 (eval $ac_try) 2>&5
6138 ac_status=$?
6139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6140 (exit $ac_status); }; }; then
6141 ac_cv_prog_cc_w_no_variadic_macros=yes
6142else
6143 echo "$as_me: failed program was:" >&5
6144sed 's/^/| /' conftest.$ac_ext >&5
6145
6146ac_cv_prog_cc_w_no_variadic_macros=no
6147fi
6148rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6149 CFLAGS="$save_CFLAGS"
6150
6151fi
6152echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6153echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
6154
34a86c2b 6155strict1_warn=
b5472e1d
NN
6156if test $ac_cv_prog_cc_w_no_long_long = yes \
6157 && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then
6158 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros"
34a86c2b
NN
6159fi
6160
6161
643d3bd2
NN
6162# Add -Wold-style-definition if it's accepted
6163echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6164echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
6165if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6166 echo $ECHO_N "(cached) $ECHO_C" >&6
6167else
6168 save_CFLAGS="$CFLAGS"
6169 CFLAGS="-Wold-style-definition"
6170 cat >conftest.$ac_ext <<_ACEOF
6171/* confdefs.h. */
6172_ACEOF
6173cat confdefs.h >>conftest.$ac_ext
6174cat >>conftest.$ac_ext <<_ACEOF
6175/* end confdefs.h. */
6176
6177_ACEOF
6178rm -f conftest.$ac_objext
6179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6180 (eval $ac_compile) 2>conftest.er1
6181 ac_status=$?
6182 grep -v '^ *+' conftest.er1 >conftest.err
6183 rm -f conftest.er1
6184 cat conftest.err >&5
6185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6186 (exit $ac_status); } &&
a1286ef5
ZW
6187 { ac_try='test -z "$ac_c_werror_flag"
6188 || 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
09a9c095
NN
6217# Enable -Werror, period.
6218# Check whether --enable-werror_always or --disable-werror_always was given.
6219if test "${enable_werror_always+set}" = set; then
6220 enableval="$enable_werror_always"
6221
6222else
6223 enable_werror_always=no
6224fi;
6225if test x${enable_werror_always} = xyes ; then
6226 strict1_warn="${strict1_warn} -Werror"
6227 WERROR=-Werror
6228fi
6229
ba479fd2 6230# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
6231# That's useful for people building cross-compilers, or just running a
6232# quick `make'.
6233warn_cflags=
6234if test "x$GCC" = "xyes"; then
6235 warn_cflags='$(GCC_WARN_CFLAGS)'
6236fi
6237
6238
dd859b8a 6239# Enable -Werror in bootstrap stage2 and later.
a1286ef5
ZW
6240is_release=
6241if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6242 is_release=yes
6243fi
dd859b8a
KG
6244# Check whether --enable-werror or --disable-werror was given.
6245if test "${enable_werror+set}" = set; then
6246 enableval="$enable_werror"
ba479fd2 6247
dd859b8a 6248else
06c37c96
NS
6249 if test x$is_release = x ; then
6250 # Default to "yes" on development branches.
dd859b8a 6251 enable_werror=yes
06c37c96
NS
6252else
6253 # Default to "no" on release branches.
6254 enable_werror=no
6255fi
ba479fd2 6256fi;
dd859b8a
KG
6257if test x$enable_werror = xyes ; then
6258 WERROR=-Werror
6259fi
6260
6261
414d23ae
HPN
6262# Enable expensive internal checks
6263# Check whether --enable-checking or --disable-checking was given.
6264if test "${enable_checking+set}" = set; then
6265 enableval="$enable_checking"
e1bbfc5c
NS
6266 ac_checking_flags="${enableval}"
6267else
6268
6269# Determine the default checks.
6270if test x$is_release = x ; then
6271 ac_checking_flags=yes
6272else
6273 ac_checking_flags=release
6274fi
6275fi;
6276ac_assert_checking=1
6277ac_checking=
414d23ae
HPN
6278ac_tree_checking=
6279ac_rtl_checking=
6280ac_rtlflag_checking=
b53ef395 6281ac_runtime_checking=1
414d23ae
HPN
6282ac_gc_checking=
6283ac_gc_always_collect=
5dfa45d0 6284ac_fold_checking=
e1bbfc5c
NS
6285IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6286for check in $ac_checking_flags
6287do
6288 case $check in
6289 yes) ac_assert_checking=1 ; ac_checking=1 ;
6290 ac_tree_checking=1 ; ac_gc_checking=1 ;
b53ef395 6291 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;;
e1bbfc5c
NS
6292 no) ac_assert_checking= ; ac_checking= ;
6293 ac_tree_checking= ; ac_rtl_checking= ;
6294 ac_rtlflag_checking= ; ac_gc_checking= ;
6295 ac_gc_always_collect= ; ac_fold_checking= ;;
6296 all) ac_assert_checking=1 ; ac_checking=1 ;
6297 ac_tree_checking=1 ; ac_rtl_checking=1 ;
b53ef395
NS
6298 ac_rtlflag_checking=1 ; ac_runtime_checking=1;
6299 ac_gc_checking=1 ; ac_gc_always_collect=1 ;
6300 ac_fold_checking=1 ;;
6301 release) ac_assert_checking=1 ; ac_runtime_checking=1 ;;
e1bbfc5c
NS
6302 assert) ac_assert_checking=1 ;;
6303 fold) ac_fold_checking=1 ;;
6304 gc) ac_gc_checking=1 ;;
6305 gcac) ac_gc_always_collect=1 ;;
6306 misc) ac_checking=1 ;;
6307 rtlflag) ac_rtlflag_checking=1 ;;
6308 rtl) ac_rtl_checking=1 ;;
b53ef395 6309 runtime) ac_runtime_checking=1 ;;
e1bbfc5c
NS
6310 tree) ac_tree_checking=1 ;;
6311 valgrind) ac_checking_valgrind=1 ;;
6312 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
6313echo "$as_me: error: unknown check category $check" >&2;}
6314 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
6315 esac
6316done
6317IFS="$ac_save_IFS"
06c37c96 6318
ba479fd2
NN
6319nocommon_flag=""
6320if test x$ac_checking != x ; then
6321
6322cat >>confdefs.h <<\_ACEOF
6323#define ENABLE_CHECKING 1
6324_ACEOF
6325
6326 nocommon_flag=-fno-common
6327fi
6328
06c37c96
NS
6329if test x$ac_assert_checking != x ; then
6330
6331cat >>confdefs.h <<\_ACEOF
6332#define ENABLE_ASSERT_CHECKING 1
6333_ACEOF
6334
b53ef395
NS
6335fi
6336if test x$ac_runtime_checking != x ; then
6337
6338cat >>confdefs.h <<\_ACEOF
6339#define ENABLE_RUNTIME_CHECKING 1
6340_ACEOF
6341
06c37c96 6342fi
ba479fd2
NN
6343if test x$ac_tree_checking != x ; then
6344
6345cat >>confdefs.h <<\_ACEOF
6346#define ENABLE_TREE_CHECKING 1
6347_ACEOF
6348
13f05fd0 6349 TREEBROWSER=tree-browser.o
ba479fd2 6350fi
13f05fd0 6351
ba479fd2
NN
6352if test x$ac_rtl_checking != x ; then
6353
6354cat >>confdefs.h <<\_ACEOF
6355#define ENABLE_RTL_CHECKING 1
6356_ACEOF
6357
6358fi
6359if test x$ac_rtlflag_checking != x ; then
6360
6361cat >>confdefs.h <<\_ACEOF
6362#define ENABLE_RTL_FLAG_CHECKING 1
6363_ACEOF
6364
6365fi
6366if test x$ac_gc_checking != x ; then
6367
6368cat >>confdefs.h <<\_ACEOF
6369#define ENABLE_GC_CHECKING 1
6370_ACEOF
6371
6372fi
6373if test x$ac_gc_always_collect != x ; then
6374
6375cat >>confdefs.h <<\_ACEOF
6376#define ENABLE_GC_ALWAYS_COLLECT 1
6377_ACEOF
6378
6379fi
6380if test x$ac_fold_checking != x ; then
6381
6382cat >>confdefs.h <<\_ACEOF
6383#define ENABLE_FOLD_CHECKING 1
6384_ACEOF
6385
6386fi
6387valgrind_path_defines=
6388valgrind_command=
6389
ba479fd2
NN
6390if test "${ac_cv_header_valgrind_h+set}" = set; then
6391 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6392echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6393if test "${ac_cv_header_valgrind_h+set}" = set; then
6394 echo $ECHO_N "(cached) $ECHO_C" >&6
6395fi
6396echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6397echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6398else
6399 # Is the header compilable?
6400echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6401echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
6402cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6403/* confdefs.h. */
6404_ACEOF
6405cat confdefs.h >>conftest.$ac_ext
6406cat >>conftest.$ac_ext <<_ACEOF
6407/* end confdefs.h. */
6408$ac_includes_default
63cf211a 6409#include <valgrind.h>
ba479fd2
NN
6410_ACEOF
6411rm -f conftest.$ac_objext
6412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6413 (eval $ac_compile) 2>conftest.er1
ba479fd2 6414 ac_status=$?
86da66b5
HPN
6415 grep -v '^ *+' conftest.er1 >conftest.err
6416 rm -f conftest.er1
6417 cat conftest.err >&5
ba479fd2
NN
6418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6419 (exit $ac_status); } &&
a1286ef5
ZW
6420 { ac_try='test -z "$ac_c_werror_flag"
6421 || test ! -s conftest.err'
86da66b5
HPN
6422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6423 (eval $ac_try) 2>&5
6424 ac_status=$?
6425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6426 (exit $ac_status); }; } &&
6427 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6429 (eval $ac_try) 2>&5
6430 ac_status=$?
6431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6432 (exit $ac_status); }; }; then
6433 ac_header_compiler=yes
6434else
6435 echo "$as_me: failed program was:" >&5
6436sed 's/^/| /' conftest.$ac_ext >&5
6437
6438ac_header_compiler=no
6439fi
86da66b5 6440rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
6441echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6442echo "${ECHO_T}$ac_header_compiler" >&6
6443
6444# Is the header present?
6445echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6446echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
6447cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6448/* confdefs.h. */
6449_ACEOF
6450cat confdefs.h >>conftest.$ac_ext
6451cat >>conftest.$ac_ext <<_ACEOF
6452/* end confdefs.h. */
6453#include <valgrind.h>
6454_ACEOF
6455if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6456 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6457 ac_status=$?
6458 grep -v '^ *+' conftest.er1 >conftest.err
6459 rm -f conftest.er1
6460 cat conftest.err >&5
6461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6462 (exit $ac_status); } >/dev/null; then
6463 if test -s conftest.err; then
6464 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6465 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6466 else
6467 ac_cpp_err=
6468 fi
6469else
6470 ac_cpp_err=yes
6471fi
6472if test -z "$ac_cpp_err"; then
6473 ac_header_preproc=yes
6474else
6475 echo "$as_me: failed program was:" >&5
6476sed 's/^/| /' conftest.$ac_ext >&5
6477
6478 ac_header_preproc=no
6479fi
6480rm -f conftest.err conftest.$ac_ext
6481echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6482echo "${ECHO_T}$ac_header_preproc" >&6
6483
6484# So? What about this header?
86da66b5
HPN
6485case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6486 yes:no: )
ba479fd2
NN
6487 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6488echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
6489 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6490echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6491 ac_header_preproc=yes
ba479fd2 6492 ;;
86da66b5 6493 no:yes:* )
ba479fd2
NN
6494 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6495echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
6496 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6497echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6498 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6499echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6500 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6501echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
6502 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6503echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
6504 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6505echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
ba479fd2
NN
6506 (
6507 cat <<\_ASBOX
86da66b5
HPN
6508## ------------------------------------------ ##
6509## Report this to the AC_PACKAGE_NAME lists. ##
6510## ------------------------------------------ ##
ba479fd2
NN
6511_ASBOX
6512 ) |
6513 sed "s/^/$as_me: WARNING: /" >&2
6514 ;;
6515esac
6516echo "$as_me:$LINENO: checking for valgrind.h" >&5
6517echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6518if test "${ac_cv_header_valgrind_h+set}" = set; then
6519 echo $ECHO_N "(cached) $ECHO_C" >&6
6520else
6521 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 6522fi
ba479fd2
NN
6523echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6524echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6525
6e3f3080 6526fi
ba479fd2 6527if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
6528 have_valgrind_h=yes
6529else
ba479fd2 6530 have_valgrind_h=no
6938ec6c
NN
6531fi
6532
6533
ba479fd2 6534
414d23ae
HPN
6535if test x$ac_checking_valgrind != x ; then
6536 # It is certainly possible that there's valgrind but no valgrind.h.
6537 # GCC relies on making annotations so we must have both.
ba479fd2
NN
6538 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6539echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
6540 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6541/* confdefs.h. */
6542_ACEOF
6543cat confdefs.h >>conftest.$ac_ext
6544cat >>conftest.$ac_ext <<_ACEOF
6545/* end confdefs.h. */
a207b594 6546#include <valgrind/memcheck.h>
14011ca4
AJ
6547#ifndef VALGRIND_DISCARD
6548#error VALGRIND_DISCARD not defined
6549#endif
ba479fd2
NN
6550_ACEOF
6551if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6552 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6553 ac_status=$?
6554 grep -v '^ *+' conftest.er1 >conftest.err
6555 rm -f conftest.er1
6556 cat conftest.err >&5
6557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6558 (exit $ac_status); } >/dev/null; then
6559 if test -s conftest.err; then
6560 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6561 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6562 else
6563 ac_cpp_err=
6564 fi
6565else
6566 ac_cpp_err=yes
6567fi
6568if test -z "$ac_cpp_err"; then
a207b594
HPN
6569 gcc_cv_header_valgrind_memcheck_h=yes
6570else
ba479fd2
NN
6571 echo "$as_me: failed program was:" >&5
6572sed 's/^/| /' conftest.$ac_ext >&5
6573
a207b594
HPN
6574 gcc_cv_header_valgrind_memcheck_h=no
6575fi
ba479fd2
NN
6576rm -f conftest.err conftest.$ac_ext
6577 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6578echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6579 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6580echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
6581 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6582/* confdefs.h. */
6583_ACEOF
6584cat confdefs.h >>conftest.$ac_ext
6585cat >>conftest.$ac_ext <<_ACEOF
6586/* end confdefs.h. */
a207b594
HPN
6587#include <memcheck.h>
6588#ifndef VALGRIND_DISCARD
6589#error VALGRIND_DISCARD not defined
6590#endif
ba479fd2
NN
6591_ACEOF
6592if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6593 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6594 ac_status=$?
6595 grep -v '^ *+' conftest.er1 >conftest.err
6596 rm -f conftest.er1
6597 cat conftest.err >&5
6598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6599 (exit $ac_status); } >/dev/null; then
6600 if test -s conftest.err; then
6601 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6602 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6603 else
6604 ac_cpp_err=
6605 fi
6606else
6607 ac_cpp_err=yes
6608fi
6609if test -z "$ac_cpp_err"; then
14011ca4
AJ
6610 gcc_cv_header_memcheck_h=yes
6611else
ba479fd2
NN
6612 echo "$as_me: failed program was:" >&5
6613sed 's/^/| /' conftest.$ac_ext >&5
6614
cafe096b
EC
6615 gcc_cv_header_memcheck_h=no
6616fi
ba479fd2
NN
6617rm -f conftest.err conftest.$ac_ext
6618 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6619echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
6620
56694dd9
ZW
6621# Prepare PATH_SEPARATOR.
6622# The user is always right.
6623if test "${PATH_SEPARATOR+set}" != set; then
6624 echo "#! /bin/sh" >conf$$.sh
6625 echo "exit 0" >>conf$$.sh
6626 chmod +x conf$$.sh
6627 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6628 PATH_SEPARATOR=';'
6629 else
6630 PATH_SEPARATOR=:
6631 fi
6632 rm -f conf$$.sh
6633fi
6634
6635# Find out how to test for executable files. Don't use a zero-byte file,
6636# as systems may use methods other than mode bits to determine executability.
6637cat >conf$$.file <<_ASEOF
6638#! /bin/sh
6639exit 0
6640_ASEOF
6641chmod +x conf$$.file
6642if test -x conf$$.file >/dev/null 2>&1; then
6643 ac_executable_p="test -x"
6644else
6645 ac_executable_p="test -f"
6646fi
6647rm -f conf$$.file
6648
6649# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 6650set dummy valgrind; ac_word=$2
ba479fd2
NN
6651echo "$as_me:$LINENO: checking for $ac_word" >&5
6652echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6653if test "${ac_cv_path_valgrind_path+set}" = set; then
6654 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
6655else
6656 case "$valgrind_path" in
56694dd9
ZW
6657 [\\/]* | ?:[\\/]*)
6658 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6659 ;;
414d23ae 6660 *)
56694dd9
ZW
6661 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6662 for ac_dir in $PATH; do
6663 IFS="$ac_save_IFS"
6664 test -z "$ac_dir" && ac_dir=.
6665 for ac_exec_ext in '' $ac_executable_extensions; do
6666 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6667 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6668 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6669 break 2
6670 fi
6671 fi
6672 done
6673 done
6674 IFS="$ac_save_IFS"
6675 ;;
414d23ae 6676esac
75e93faa 6677fi
414d23ae
HPN
6678valgrind_path="$ac_cv_path_valgrind_path"
6679if test -n "$valgrind_path"; then
ba479fd2
NN
6680 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6681echo "${ECHO_T}$valgrind_path" >&6
414d23ae 6682else
ba479fd2
NN
6683 echo "$as_me:$LINENO: result: no" >&5
6684echo "${ECHO_T}no" >&6
414d23ae
HPN
6685fi
6686
a207b594
HPN
6687 if test "x$valgrind_path" = "x" \
6688 || (test $have_valgrind_h = no \
6689 && test $gcc_cv_header_memcheck_h = no \
6690 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
6691 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6692echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6693 { (exit 1); exit 1; }; }
414d23ae
HPN
6694 fi
6695 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6696 valgrind_command="$valgrind_path -q"
ba479fd2
NN
6697
6698cat >>confdefs.h <<\_ACEOF
414d23ae 6699#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 6700_ACEOF
75e93faa 6701
a207b594 6702 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
6703
6704cat >>confdefs.h <<\_ACEOF
a207b594 6705#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 6706_ACEOF
a207b594
HPN
6707
6708 fi
14011ca4 6709 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
6710
6711cat >>confdefs.h <<\_ACEOF
14011ca4 6712#define HAVE_MEMCHECK_H 1
ba479fd2 6713_ACEOF
14011ca4
AJ
6714
6715 fi
414d23ae 6716fi
75e93faa 6717
75e93faa
ZW
6718
6719
74ee1642
PB
6720# Check whether --enable-mapped-location or --disable-mapped-location was given.
6721if test "${enable_mapped_location+set}" = set; then
6722 enableval="$enable_mapped_location"
6723
6724else
6725 enable_mapped_location=no
6726fi;
6727
6728if test "$enable_mapped_location" = yes ; then
6729
6730cat >>confdefs.h <<\_ACEOF
6731#define USE_MAPPED_LOCATION 1
6732_ACEOF
6733
6734fi
6735
414d23ae
HPN
6736# Enable code coverage collection
6737# Check whether --enable-coverage or --disable-coverage was given.
6738if test "${enable_coverage+set}" = set; then
6739 enableval="$enable_coverage"
6740 case "${enableval}" in
6dd297da
NN
6741 yes|noopt)
6742 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6743 ;;
6744 opt)
6745 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6746 ;;
6747 no)
6748 # a.k.a. --disable-coverage
6749 coverage_flags=""
6750 ;;
6751 *)
6752 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
6753echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6754 { (exit 1); exit 1; }; }
6dd297da 6755 ;;
414d23ae 6756esac
75e93faa 6757else
414d23ae 6758 coverage_flags=""
ba479fd2 6759fi;
5c3bc9fb 6760
414d23ae 6761
439a7e54
DN
6762# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
6763if test "${enable_gather_detailed_mem_stats+set}" = set; then
6764 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 6765
439a7e54
DN
6766else
6767 enable_gather_detailed_mem_stats=no
ba479fd2 6768fi;
439a7e54 6769if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
6770
6771cat >>confdefs.h <<\_ACEOF
439a7e54 6772#define GATHER_STATISTICS 1
ba479fd2 6773_ACEOF
439a7e54
DN
6774
6775fi
6776
73458fb7
NN
6777# -------------------------------
6778# Miscenalleous configure options
6779# -------------------------------
34a86c2b
NN
6780
6781# With stabs
ba479fd2 6782
34a86c2b
NN
6783# Check whether --with-stabs or --without-stabs was given.
6784if test "${with_stabs+set}" = set; then
6785 withval="$with_stabs"
6786 stabs="$with_stabs"
6787else
6788 stabs=no
ba479fd2 6789fi;
cafe096b 6790
34a86c2b
NN
6791# Determine whether or not multilibs are enabled.
6792# Check whether --enable-multilib or --disable-multilib was given.
6793if test "${enable_multilib+set}" = set; then
6794 enableval="$enable_multilib"
ba479fd2 6795
34a86c2b
NN
6796else
6797 enable_multilib=yes
ba479fd2 6798fi;
75e93faa 6799
34a86c2b 6800
414d23ae
HPN
6801# Enable __cxa_atexit for C++.
6802# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
6803if test "${enable___cxa_atexit+set}" = set; then
6804 enableval="$enable___cxa_atexit"
75e93faa 6805
ba479fd2 6806fi;
75e93faa 6807
414d23ae
HPN
6808# Enable threads
6809# Pass with no value to take the default
6810# Pass with a value to specify a thread package
6811# Check whether --enable-threads or --disable-threads was given.
6812if test "${enable_threads+set}" = set; then
6813 enableval="$enable_threads"
ba479fd2 6814
414d23ae
HPN
6815else
6816 enable_threads=''
ba479fd2 6817fi;
414d23ae
HPN
6818
6819# Check whether --enable-objc-gc or --disable-objc-gc was given.
6820if test "${enable_objc_gc+set}" = set; then
6821 enableval="$enable_objc_gc"
6822 if test x$enable_objc_gc = xno; then
6823 objc_boehm_gc=''
6824else
6825 objc_boehm_gc=1
6826fi
6827else
6828 objc_boehm_gc=''
ba479fd2 6829fi;
75e93faa
ZW
6830
6831
414d23ae
HPN
6832# Check whether --with-dwarf2 or --without-dwarf2 was given.
6833if test "${with_dwarf2+set}" = set; then
6834 withval="$with_dwarf2"
6835 dwarf2="$with_dwarf2"
75e93faa 6836else
414d23ae 6837 dwarf2=no
ba479fd2 6838fi;
75e93faa 6839
414d23ae
HPN
6840# Check whether --enable-shared or --disable-shared was given.
6841if test "${enable_shared+set}" = set; then
6842 enableval="$enable_shared"
ba479fd2 6843
414d23ae
HPN
6844 case $enable_shared in
6845 yes | no) ;;
6846 *)
6847 enable_shared=no
6848 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6849 for pkg in $enableval; do
6850 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
6851 enable_shared=yes
6852 fi
6853 done
6854 IFS="$ac_save_ifs"
6855 ;;
6856 esac
6857
75e93faa 6858else
414d23ae 6859 enable_shared=yes
ba479fd2 6860fi;
75e93faa 6861
75e93faa 6862
75e93faa 6863
4977bab6
ZW
6864# Check whether --with-sysroot or --without-sysroot was given.
6865if test "${with_sysroot+set}" = set; then
6866 withval="$with_sysroot"
ba479fd2 6867
4977bab6 6868 case ${with_sysroot} in
caa55b1e 6869 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
6870 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
6871 esac
ba479fd2 6872
4977bab6
ZW
6873 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
6874 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
6875
047d636f
DJ
6876 if test "x$exec_prefix" = xNONE; then
6877 if test "x$prefix" = xNONE; then
6878 test_prefix=/usr/local
6879 else
6880 test_prefix=$prefix
6881 fi
6882 else
6883 test_prefix=$exec_prefix
6884 fi
6885 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
6886 "${test_prefix}"|"${test_prefix}/"*|\
6887 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
6888 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
6889 TARGET_SYSTEM_ROOT_DEFINE="$t"
6890 ;;
6891 esac
6892
4977bab6 6893else
ba479fd2 6894
4977bab6 6895 TARGET_SYSTEM_ROOT=
db720d9a 6896 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
6897 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
6898
ba479fd2 6899fi;
4977bab6
ZW
6900
6901
6902
6903
d1bd0ded 6904# Build with intermodule optimisations
d1bd0ded
GK
6905# Check whether --enable-intermodule or --disable-intermodule was given.
6906if test "${enable_intermodule+set}" = set; then
6907 enableval="$enable_intermodule"
0c46c5c7
KC
6908 case ${enable_intermodule} in
6909 yes) onestep="-onestep";;
6910 *) onestep="";;
d1bd0ded 6911esac
0c46c5c7
KC
6912else
6913 onestep=""
ba479fd2 6914fi;
d1bd0ded
GK
6915
6916
f3c9f174
NN
6917# Sanity check enable_languages in case someone does not run the toplevel
6918# configure # script.
6919# Check whether --enable-languages or --disable-languages was given.
6920if test "${enable_languages+set}" = set; then
6921 enableval="$enable_languages"
6922 case ,${enable_languages}, in
6923 ,,|,yes,)
6924 # go safe -- we cannot be much sure without the toplevel
6925 # configure's
6926 # analysis of which target libs are present and usable
6927 enable_languages=c
6928 ;;
6929 *,all,*)
6930 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
6931echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
6932 { (exit 1); exit 1; }; }
6933 ;;
6934 *,c,*)
6935 ;;
6936 *)
6937 enable_languages=c,${enable_languages}
6938 ;;
6939esac
6940else
6941 enable_languages=c
6942fi;
6943
6944subdirs=
6945for lang in ${srcdir}/*/config-lang.in
6946do
6947 case $lang in
6948 # The odd quoting in the next line works around
6949 # an apparent bug in bash 1.12 on linux.
6950 ${srcdir}/[*]/config-lang.in) ;;
6951 *)
6952 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6953 if test "x$lang_alias" = x
6954 then
6955 echo "$lang doesn't set \$language." 1>&2
6956 exit 1
6957 fi
6958 case ",$enable_languages," in
6959 *,$lang_alias,*)
6960 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
6961 esac
6962 ;;
6963 esac
6964done
6965
6966
73458fb7
NN
6967# -------------------------
6968# Checks for other programs
6969# -------------------------
5b67ad6f 6970
ba479fd2
NN
6971echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6972echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
86da66b5 6973set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
ba479fd2
NN
6974if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
6975 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 6976else
ba479fd2 6977 cat >conftest.make <<\_ACEOF
e9a25f70 6978all:
ba479fd2
NN
6979 @echo 'ac_maketemp="$(MAKE)"'
6980_ACEOF
e9a25f70 6981# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 6982eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
6983if test -n "$ac_maketemp"; then
6984 eval ac_cv_prog_make_${ac_make}_set=yes
6985else
6986 eval ac_cv_prog_make_${ac_make}_set=no
6987fi
ba479fd2 6988rm -f conftest.make
e9a25f70
JL
6989fi
6990if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
6991 echo "$as_me:$LINENO: result: yes" >&5
6992echo "${ECHO_T}yes" >&6
e9a25f70
JL
6993 SET_MAKE=
6994else
ba479fd2
NN
6995 echo "$as_me:$LINENO: result: no" >&5
6996echo "${ECHO_T}no" >&6
e9a25f70
JL
6997 SET_MAKE="MAKE=${MAKE-make}"
6998fi
6999
7000
861bb6c1 7001# Find some useful tools
ba479fd2 7002for ac_prog in gawk mawk nawk awk
861bb6c1 7003do
ba479fd2 7004 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 7005set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7006echo "$as_me:$LINENO: checking for $ac_word" >&5
7007echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7008if test "${ac_cv_prog_AWK+set}" = set; then
7009 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7010else
7011 if test -n "$AWK"; then
7012 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7013else
ba479fd2
NN
7014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7015for as_dir in $PATH
7016do
7017 IFS=$as_save_IFS
7018 test -z "$as_dir" && as_dir=.
7019 for ac_exec_ext in '' $ac_executable_extensions; do
7020 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7021 ac_cv_prog_AWK="$ac_prog"
7022 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7023 break 2
7024 fi
7025done
7026done
7027
861bb6c1
JL
7028fi
7029fi
ba479fd2 7030AWK=$ac_cv_prog_AWK
861bb6c1 7031if test -n "$AWK"; then
ba479fd2
NN
7032 echo "$as_me:$LINENO: result: $AWK" >&5
7033echo "${ECHO_T}$AWK" >&6
861bb6c1 7034else
ba479fd2
NN
7035 echo "$as_me:$LINENO: result: no" >&5
7036echo "${ECHO_T}no" >&6
861bb6c1
JL
7037fi
7038
ba479fd2 7039 test -n "$AWK" && break
861bb6c1
JL
7040done
7041
776dc15d 7042# We need awk to create options.c and options.h.
2c4902b9
NN
7043# Bail out if it's missing.
7044case ${AWK} in
ba479fd2
NN
7045 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7046echo "$as_me: error: can't build without awk, bailing out" >&2;}
7047 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
7048esac
7049
ba479fd2
NN
7050echo "$as_me:$LINENO: checking whether ln -s works" >&5
7051echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
7052if test "${gcc_cv_prog_LN_S+set}" = set; then
7053 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7054else
7055 rm -f conftestdata_t
7056echo >conftestdata_f
7057if ln -s conftestdata_f conftestdata_t 2>/dev/null
7058then
7059 gcc_cv_prog_LN_S="ln -s"
7060else
7061 if ln conftestdata_f conftestdata_t 2>/dev/null
7062 then
7063 gcc_cv_prog_LN_S=ln
7064 else
35f06ae4
PB
7065 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7066 then
06c3418c 7067 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
7068 else
7069 gcc_cv_prog_LN_S=cp
7070 fi
0a4b6309
RL
7071 fi
7072fi
7073rm -f conftestdata_f conftestdata_t
7074
7075fi
7076LN_S="$gcc_cv_prog_LN_S"
7077if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
7078 echo "$as_me:$LINENO: result: yes" >&5
7079echo "${ECHO_T}yes" >&6
0a4b6309
RL
7080else
7081 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
7082 echo "$as_me:$LINENO: result: no, using ln" >&5
7083echo "${ECHO_T}no, using ln" >&6
0a4b6309 7084 else
35f06ae4
PB
7085 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7086echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
7087 fi
7088fi
7089
41e622a8
AP
7090echo "$as_me:$LINENO: checking whether ln works" >&5
7091echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
7092if test "${acx_cv_prog_LN+set}" = set; then
7093 echo $ECHO_N "(cached) $ECHO_C" >&6
7094else
7095 rm -f conftestdata_t
7096echo >conftestdata_f
7097if ln conftestdata_f conftestdata_t 2>/dev/null
7098then
7099 acx_cv_prog_LN=ln
7100else
7101 acx_cv_prog_LN=no
7102fi
7103rm -f conftestdata_f conftestdata_t
7104
7105fi
7106if test $acx_cv_prog_LN = no; then
7107 LN="$LN_S"
7108 echo "$as_me:$LINENO: result: no, using $LN" >&5
7109echo "${ECHO_T}no, using $LN" >&6
7110else
7111 LN="$acx_cv_prog_LN"
7112 echo "$as_me:$LINENO: result: yes" >&5
7113echo "${ECHO_T}yes" >&6
7114fi
7115
ba479fd2
NN
7116if test -n "$ac_tool_prefix"; then
7117 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7118set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7119echo "$as_me:$LINENO: checking for $ac_word" >&5
7120echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7121if test "${ac_cv_prog_RANLIB+set}" = set; then
7122 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7123else
7124 if test -n "$RANLIB"; then
7125 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7126else
ba479fd2
NN
7127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7128for as_dir in $PATH
7129do
7130 IFS=$as_save_IFS
7131 test -z "$as_dir" && as_dir=.
7132 for ac_exec_ext in '' $ac_executable_extensions; do
7133 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7134 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7135 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7136 break 2
7137 fi
7138done
7139done
7140
6e3f3080
NN
7141fi
7142fi
ba479fd2 7143RANLIB=$ac_cv_prog_RANLIB
6e3f3080 7144if test -n "$RANLIB"; then
ba479fd2
NN
7145 echo "$as_me:$LINENO: result: $RANLIB" >&5
7146echo "${ECHO_T}$RANLIB" >&6
7147else
7148 echo "$as_me:$LINENO: result: no" >&5
7149echo "${ECHO_T}no" >&6
7150fi
7151
7152fi
7153if test -z "$ac_cv_prog_RANLIB"; then
7154 ac_ct_RANLIB=$RANLIB
7155 # Extract the first word of "ranlib", so it can be a program name with args.
7156set dummy ranlib; ac_word=$2
7157echo "$as_me:$LINENO: checking for $ac_word" >&5
7158echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7159if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7160 echo $ECHO_N "(cached) $ECHO_C" >&6
7161else
7162 if test -n "$ac_ct_RANLIB"; then
7163 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7164else
7165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7166for as_dir in $PATH
7167do
7168 IFS=$as_save_IFS
7169 test -z "$as_dir" && as_dir=.
7170 for ac_exec_ext in '' $ac_executable_extensions; do
7171 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7172 ac_cv_prog_ac_ct_RANLIB="ranlib"
7173 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7174 break 2
7175 fi
7176done
7177done
7178
7179 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7180fi
7181fi
7182ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7183if test -n "$ac_ct_RANLIB"; then
7184 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7185echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 7186else
ba479fd2
NN
7187 echo "$as_me:$LINENO: result: no" >&5
7188echo "${ECHO_T}no" >&6
7189fi
7190
7191 RANLIB=$ac_ct_RANLIB
7192else
7193 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
7194fi
7195
343a6100
MM
7196case "${host}" in
7197*-*-darwin*)
7198 # By default, the Darwin ranlib will not treat common symbols as
7199 # definitions when building the archive table of contents. Other
7200 # ranlibs do that; pass an option to the Darwin ranlib that makes
7201 # it behave similarly.
7202 ranlib_flags="-c"
7203 ;;
7204*)
7205 ranlib_flags=""
7206esac
7207
7208
0a4b6309
RL
7209# Find a good install program. We prefer a C program (faster),
7210# so one script is as good as another. But avoid the broken or
7211# incompatible versions:
7212# SysV /etc/install, /usr/sbin/install
7213# SunOS /usr/etc/install
7214# IRIX /sbin/install
7215# AIX /bin/install
7216# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7217# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7218# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
7219echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7220echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 7221if test -z "$INSTALL"; then
ba479fd2
NN
7222if test "${ac_cv_path_install+set}" = set; then
7223 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7224else
7225 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7226 for ac_dir in $PATH; do
7227 # Account for people who put trailing slashes in PATH elements.
7228 case "$ac_dir/" in
7229 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7230 *)
7231 # OSF1 and SCO ODT 3.0 have their own names for install.
7232 for ac_prog in ginstall scoinst install; do
7233 if test -f $ac_dir/$ac_prog; then
7234 if test $ac_prog = install &&
7235 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7236 # AIX install. It has an incompatible calling convention.
7237 # OSF/1 installbsd also uses dspmsg, but is usable.
7238 :
7239 else
7240 ac_cv_path_install="$ac_dir/$ac_prog -c"
7241 break 2
7242 fi
7243 fi
7244 done
7245 ;;
7246 esac
7247 done
7248 IFS="$ac_save_IFS"
7249
7250fi
7251 if test "${ac_cv_path_install+set}" = set; then
7252 INSTALL="$ac_cv_path_install"
7253 else
7254 # As a last resort, use the slow shell script. We don't cache a
7255 # path for INSTALL within a source directory, because that will
7256 # break other packages using the cache if that directory is
7257 # removed, or if the path is relative.
7258 INSTALL="$ac_install_sh"
7259 fi
7260fi
ba479fd2
NN
7261echo "$as_me:$LINENO: result: $INSTALL" >&5
7262echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
7263
7264# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7265# It thinks the first close brace ends the variable substitution.
7266test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7267
7268test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7269
861bb6c1 7270
3a000df0 7271# See if cmp has --ignore-initial.
ba479fd2
NN
7272echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7273echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
7274if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7275 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
7276else
7277 echo abfoo >t1
7278 echo cdfoo >t2
269a7343 7279 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
7280 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7281 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 7282 :
3a000df0
KC
7283 else
7284 gcc_cv_prog_cmp_skip=gnucompare
7285 fi
269a7343
KG
7286 fi
7287 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7288 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7289 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7290 :
7291 else
7292 gcc_cv_prog_cmp_skip=fastcompare
7293 fi
7294 fi
3a000df0
KC
7295 fi
7296 rm t1 t2
7297
7298fi
ba479fd2
NN
7299echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7300echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
7301make_compare_target=$gcc_cv_prog_cmp_skip
7302
7303
7304
73458fb7
NN
7305# See if we have the mktemp command.
7306# Extract the first word of "mktemp", so it can be a program name with args.
7307set dummy mktemp; ac_word=$2
ba479fd2
NN
7308echo "$as_me:$LINENO: checking for $ac_word" >&5
7309echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7310if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7311 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7312else
7313 if test -n "$have_mktemp_command"; then
7314 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7315else
ba479fd2
NN
7316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7317for as_dir in $PATH
7318do
7319 IFS=$as_save_IFS
7320 test -z "$as_dir" && as_dir=.
7321 for ac_exec_ext in '' $ac_executable_extensions; do
7322 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7323 ac_cv_prog_have_mktemp_command="yes"
7324 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7325 break 2
7326 fi
7327done
7328done
7329
73458fb7
NN
7330 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7331fi
7332fi
ba479fd2 7333have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 7334if test -n "$have_mktemp_command"; then
ba479fd2
NN
7335 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7336echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 7337else
ba479fd2
NN
7338 echo "$as_me:$LINENO: result: no" >&5
7339echo "${ECHO_T}no" >&6
73458fb7
NN
7340fi
7341
7342
7c27e184
PB
7343MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
7344
7345# See if makeinfo has been installed and is modern enough
7346# that we can use it.
7347# Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 7348set dummy makeinfo; ac_word=$2
ba479fd2
NN
7349echo "$as_me:$LINENO: checking for $ac_word" >&5
7350echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7351if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7352 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7353else
7354 if test -n "$MAKEINFO"; then
7355 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7356else
ba479fd2
NN
7357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7358for as_dir in $PATH
7359do
7360 IFS=$as_save_IFS
7361 test -z "$as_dir" && as_dir=.
7362 for ac_exec_ext in '' $ac_executable_extensions; do
7363 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7364 ac_cv_prog_MAKEINFO="makeinfo"
7365 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7366 break 2
7367 fi
7368done
7369done
7370
73458fb7
NN
7371fi
7372fi
ba479fd2 7373MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 7374if test -n "$MAKEINFO"; then
ba479fd2
NN
7375 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7376echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 7377else
ba479fd2
NN
7378 echo "$as_me:$LINENO: result: no" >&5
7379echo "${ECHO_T}no" >&6
73458fb7
NN
7380fi
7381
7382if test -n "$MAKEINFO"; then
7383 # Found it, now check the version.
ba479fd2
NN
7384 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7385echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
7386if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7387 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7388else
7389 ac_prog_version=`$MAKEINFO --version 2>&1 |
7390 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
a1286ef5 7391 echo "configure:7381: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
7392 case $ac_prog_version in
7393 '') gcc_cv_prog_makeinfo_modern=no;;
7394 4.[2-9]*)
7395 gcc_cv_prog_makeinfo_modern=yes;;
7396 *) gcc_cv_prog_makeinfo_modern=no;;
7397 esac
7398
7399fi
ba479fd2
NN
7400echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7401echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
7402else
7403 gcc_cv_prog_makeinfo_modern=no
7404fi
7405
73458fb7 7406if test $gcc_cv_prog_makeinfo_modern = no; then
7c27e184 7407 MAKEINFO="$MISSING makeinfo"
ba479fd2
NN
7408 { echo "$as_me:$LINENO: WARNING:
7409*** Makeinfo is missing or too old.
7410*** Info documentation will not be built." >&5
7411echo "$as_me: WARNING:
cafe096b 7412*** Makeinfo is missing or too old.
ba479fd2 7413*** Info documentation will not be built." >&2;}
73458fb7
NN
7414 BUILD_INFO=
7415else
ba479fd2 7416 BUILD_INFO=info
73458fb7
NN
7417fi
7418
7c27e184 7419
73458fb7 7420# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
7421echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7422echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 7423if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
7424 echo "$as_me:$LINENO: result: yes" >&5
7425echo "${ECHO_T}yes" >&6
7426 GENERATED_MANPAGES=generated-manpages
73458fb7 7427else
ba479fd2
NN
7428 echo "$as_me:$LINENO: result: no" >&5
7429echo "${ECHO_T}no" >&6
73458fb7
NN
7430 GENERATED_MANPAGES=
7431fi
7432
7c27e184 7433
73458fb7 7434# How about lex?
7c27e184
PB
7435for ac_prog in flex
7436do
7437 # Extract the first word of "$ac_prog", so it can be a program name with args.
7438set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7439echo "$as_me:$LINENO: checking for $ac_word" >&5
7440echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7441if test "${ac_cv_prog_FLEX+set}" = set; then
7442 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7443else
7444 if test -n "$FLEX"; then
7445 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7446else
ba479fd2
NN
7447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7448for as_dir in $PATH
7449do
7450 IFS=$as_save_IFS
7451 test -z "$as_dir" && as_dir=.
7452 for ac_exec_ext in '' $ac_executable_extensions; do
7453 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7454 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
7455 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7456 break 2
7457 fi
7458done
7459done
7460
73458fb7
NN
7461fi
7462fi
ba479fd2 7463FLEX=$ac_cv_prog_FLEX
73458fb7 7464if test -n "$FLEX"; then
ba479fd2
NN
7465 echo "$as_me:$LINENO: result: $FLEX" >&5
7466echo "${ECHO_T}$FLEX" >&6
73458fb7 7467else
ba479fd2
NN
7468 echo "$as_me:$LINENO: result: no" >&5
7469echo "${ECHO_T}no" >&6
73458fb7
NN
7470fi
7471
7c27e184
PB
7472 test -n "$FLEX" && break
7473done
7474test -n "$FLEX" || FLEX="$MISSING flex"
7475
73458fb7
NN
7476
7477# Bison?
7c27e184
PB
7478for ac_prog in bison
7479do
7480 # Extract the first word of "$ac_prog", so it can be a program name with args.
7481set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7482echo "$as_me:$LINENO: checking for $ac_word" >&5
7483echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7484if test "${ac_cv_prog_BISON+set}" = set; then
7485 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7486else
7487 if test -n "$BISON"; then
7488 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7489else
ba479fd2
NN
7490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7491for as_dir in $PATH
7492do
7493 IFS=$as_save_IFS
7494 test -z "$as_dir" && as_dir=.
7495 for ac_exec_ext in '' $ac_executable_extensions; do
7496 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7497 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
7498 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7499 break 2
7500 fi
7501done
7502done
7503
73458fb7
NN
7504fi
7505fi
ba479fd2 7506BISON=$ac_cv_prog_BISON
73458fb7 7507if test -n "$BISON"; then
ba479fd2
NN
7508 echo "$as_me:$LINENO: result: $BISON" >&5
7509echo "${ECHO_T}$BISON" >&6
73458fb7 7510else
ba479fd2
NN
7511 echo "$as_me:$LINENO: result: no" >&5
7512echo "${ECHO_T}no" >&6
73458fb7
NN
7513fi
7514
7c27e184
PB
7515 test -n "$BISON" && break
7516done
7517test -n "$BISON" || BISON="$MISSING bison"
7518
7519
7520# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7521# check for build == host before using them.
73458fb7 7522
f6a874ac 7523# NM
414adbdd
GK
7524if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7525 && test -d ../binutils ; then
f6a874ac
JW
7526 NM='$(objdir)/../binutils/nm-new'
7527else
7528 # Extract the first word of "nm", so it can be a program name with args.
7529set dummy nm; ac_word=$2
7530echo "$as_me:$LINENO: checking for $ac_word" >&5
7531echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7532if test "${ac_cv_prog_NM+set}" = set; then
7533 echo $ECHO_N "(cached) $ECHO_C" >&6
7534else
7535 if test -n "$NM"; then
7536 ac_cv_prog_NM="$NM" # Let the user override the test.
7537else
7538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7539for as_dir in $PATH
7540do
7541 IFS=$as_save_IFS
7542 test -z "$as_dir" && as_dir=.
7543 for ac_exec_ext in '' $ac_executable_extensions; do
7544 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7545 ac_cv_prog_NM="nm"
7546 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7547 break 2
7548 fi
7549done
7550done
7551
7552 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7553fi
7554fi
7555NM=$ac_cv_prog_NM
7556if test -n "$NM"; then
7557 echo "$as_me:$LINENO: result: $NM" >&5
7558echo "${ECHO_T}$NM" >&6
7559else
7560 echo "$as_me:$LINENO: result: no" >&5
7561echo "${ECHO_T}no" >&6
7562fi
7563
7564fi
7565
7566# AR
414adbdd
GK
7567if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7568 && test -d ../binutils ; then
f6a874ac
JW
7569 AR='$(objdir)/../binutils/ar'
7570else
7571 # Extract the first word of "ar", so it can be a program name with args.
7572set dummy ar; ac_word=$2
7573echo "$as_me:$LINENO: checking for $ac_word" >&5
7574echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7575if test "${ac_cv_prog_AR+set}" = set; then
7576 echo $ECHO_N "(cached) $ECHO_C" >&6
7577else
7578 if test -n "$AR"; then
7579 ac_cv_prog_AR="$AR" # Let the user override the test.
7580else
7581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7582for as_dir in $PATH
7583do
7584 IFS=$as_save_IFS
7585 test -z "$as_dir" && as_dir=.
7586 for ac_exec_ext in '' $ac_executable_extensions; do
7587 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7588 ac_cv_prog_AR="ar"
7589 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7590 break 2
7591 fi
7592done
7593done
7594
7595 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7596fi
7597fi
7598AR=$ac_cv_prog_AR
7599if test -n "$AR"; then
7600 echo "$as_me:$LINENO: result: $AR" >&5
7601echo "${ECHO_T}$AR" >&6
7602else
7603 echo "$as_me:$LINENO: result: no" >&5
7604echo "${ECHO_T}no" >&6
7605fi
7606
7607fi
7608
7609
73458fb7
NN
7610# --------------------
7611# Checks for C headers
7612# --------------------
7613
ba479fd2
NN
7614echo "$as_me:$LINENO: checking for GNU C library" >&5
7615echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
7616if test "${gcc_cv_glibc+set}" = set; then
7617 echo $ECHO_N "(cached) $ECHO_C" >&6
7618else
7619 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7620/* confdefs.h. */
7621_ACEOF
7622cat confdefs.h >>conftest.$ac_ext
7623cat >>conftest.$ac_ext <<_ACEOF
7624/* end confdefs.h. */
73458fb7 7625#include <features.h>
ba479fd2
NN
7626int
7627main ()
7628{
73458fb7
NN
7629
7630#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7631#error Not a GNU C library system
7632#endif
ba479fd2
NN
7633 ;
7634 return 0;
7635}
7636_ACEOF
7637rm -f conftest.$ac_objext
7638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7639 (eval $ac_compile) 2>conftest.er1
ba479fd2 7640 ac_status=$?
86da66b5
HPN
7641 grep -v '^ *+' conftest.er1 >conftest.err
7642 rm -f conftest.er1
7643 cat conftest.err >&5
ba479fd2
NN
7644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7645 (exit $ac_status); } &&
a1286ef5
ZW
7646 { ac_try='test -z "$ac_c_werror_flag"
7647 || test ! -s conftest.err'
86da66b5
HPN
7648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7649 (eval $ac_try) 2>&5
7650 ac_status=$?
7651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7652 (exit $ac_status); }; } &&
7653 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7655 (eval $ac_try) 2>&5
7656 ac_status=$?
7657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7658 (exit $ac_status); }; }; then
73458fb7
NN
7659 gcc_cv_glibc=yes
7660else
ba479fd2
NN
7661 echo "$as_me: failed program was:" >&5
7662sed 's/^/| /' conftest.$ac_ext >&5
7663
7664gcc_cv_glibc=no
73458fb7 7665fi
86da66b5 7666rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
7667fi
7668
ba479fd2
NN
7669echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7670echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 7671if test $gcc_cv_glibc = yes; then
ba479fd2
NN
7672
7673cat >>confdefs.h <<\_ACEOF
73458fb7 7674#define _GNU_SOURCE 1
ba479fd2 7675_ACEOF
73458fb7
NN
7676
7677fi
7678
ca9bc441
NN
7679# Need to reject headers which give warnings, so that the -Werror bootstrap
7680# works later. *sigh* This needs to come before all header checks.
7681
7682ac_c_preproc_warn_flag=yes
7683
ba479fd2
NN
7684echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7685echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7686if test "${ac_cv_header_stdc+set}" = set; then
7687 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7688else
ba479fd2 7689 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7690/* confdefs.h. */
7691_ACEOF
7692cat confdefs.h >>conftest.$ac_ext
7693cat >>conftest.$ac_ext <<_ACEOF
7694/* end confdefs.h. */
956d6950
JL
7695#include <stdlib.h>
7696#include <stdarg.h>
7697#include <string.h>
7698#include <float.h>
ba479fd2
NN
7699
7700int
7701main ()
7702{
7703
7704 ;
7705 return 0;
7706}
7707_ACEOF
7708rm -f conftest.$ac_objext
7709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7710 (eval $ac_compile) 2>conftest.er1
ba479fd2 7711 ac_status=$?
86da66b5
HPN
7712 grep -v '^ *+' conftest.er1 >conftest.err
7713 rm -f conftest.er1
7714 cat conftest.err >&5
ba479fd2
NN
7715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7716 (exit $ac_status); } &&
a1286ef5
ZW
7717 { ac_try='test -z "$ac_c_werror_flag"
7718 || test ! -s conftest.err'
86da66b5
HPN
7719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7720 (eval $ac_try) 2>&5
7721 ac_status=$?
7722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7723 (exit $ac_status); }; } &&
7724 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7726 (eval $ac_try) 2>&5
7727 ac_status=$?
7728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7729 (exit $ac_status); }; }; then
956d6950
JL
7730 ac_cv_header_stdc=yes
7731else
ba479fd2
NN
7732 echo "$as_me: failed program was:" >&5
7733sed 's/^/| /' conftest.$ac_ext >&5
7734
7735ac_cv_header_stdc=no
956d6950 7736fi
86da66b5 7737rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
7738
7739if test $ac_cv_header_stdc = yes; then
7740 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 7741 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7742/* confdefs.h. */
7743_ACEOF
7744cat confdefs.h >>conftest.$ac_ext
7745cat >>conftest.$ac_ext <<_ACEOF
7746/* end confdefs.h. */
956d6950 7747#include <string.h>
ba479fd2
NN
7748
7749_ACEOF
956d6950 7750if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7751 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
7752 :
7753else
956d6950
JL
7754 ac_cv_header_stdc=no
7755fi
7756rm -f conftest*
7757
7758fi
7759
7760if test $ac_cv_header_stdc = yes; then
7761 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 7762 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7763/* confdefs.h. */
7764_ACEOF
7765cat confdefs.h >>conftest.$ac_ext
7766cat >>conftest.$ac_ext <<_ACEOF
7767/* end confdefs.h. */
956d6950 7768#include <stdlib.h>
ba479fd2
NN
7769
7770_ACEOF
956d6950 7771if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7772 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
7773 :
7774else
956d6950
JL
7775 ac_cv_header_stdc=no
7776fi
7777rm -f conftest*
7778
7779fi
7780
7781if test $ac_cv_header_stdc = yes; then
7782 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 7783 if test "$cross_compiling" = yes; then
956d6950
JL
7784 :
7785else
ba479fd2 7786 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7787/* confdefs.h. */
7788_ACEOF
7789cat confdefs.h >>conftest.$ac_ext
7790cat >>conftest.$ac_ext <<_ACEOF
7791/* end confdefs.h. */
956d6950 7792#include <ctype.h>
ba479fd2
NN
7793#if ((' ' & 0x0FF) == 0x020)
7794# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7795# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7796#else
7797# define ISLOWER(c) \
86da66b5
HPN
7798 (('a' <= (c) && (c) <= 'i') \
7799 || ('j' <= (c) && (c) <= 'r') \
7800 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
7801# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7802#endif
63cf211a 7803
ba479fd2
NN
7804#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7805int
7806main ()
7807{
7808 int i;
7809 for (i = 0; i < 256; i++)
7810 if (XOR (islower (i), ISLOWER (i))
86da66b5 7811 || toupper (i) != TOUPPER (i))
ba479fd2
NN
7812 exit(2);
7813 exit (0);
7814}
7815_ACEOF
7816rm -f conftest$ac_exeext
7817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7818 (eval $ac_link) 2>&5
7819 ac_status=$?
7820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7821 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7823 (eval $ac_try) 2>&5
7824 ac_status=$?
7825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7826 (exit $ac_status); }; }; then
956d6950
JL
7827 :
7828else
ba479fd2
NN
7829 echo "$as_me: program exited with status $ac_status" >&5
7830echo "$as_me: failed program was:" >&5
7831sed 's/^/| /' conftest.$ac_ext >&5
7832
7833( exit $ac_status )
7834ac_cv_header_stdc=no
956d6950 7835fi
86da66b5 7836rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 7837fi
956d6950
JL
7838fi
7839fi
ba479fd2
NN
7840echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7841echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 7842if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
7843
7844cat >>confdefs.h <<\_ACEOF
956d6950 7845#define STDC_HEADERS 1
ba479fd2 7846_ACEOF
956d6950
JL
7847
7848fi
7849
ba479fd2
NN
7850echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7851echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
7852if test "${ac_cv_header_time+set}" = set; then
7853 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7854else
ba479fd2 7855 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7856/* confdefs.h. */
7857_ACEOF
7858cat confdefs.h >>conftest.$ac_ext
7859cat >>conftest.$ac_ext <<_ACEOF
7860/* end confdefs.h. */
956d6950
JL
7861#include <sys/types.h>
7862#include <sys/time.h>
7863#include <time.h>
ba479fd2
NN
7864
7865int
7866main ()
7867{
7868if ((struct tm *) 0)
7869return 0;
7870 ;
7871 return 0;
7872}
7873_ACEOF
7874rm -f conftest.$ac_objext
7875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7876 (eval $ac_compile) 2>conftest.er1
ba479fd2 7877 ac_status=$?
86da66b5
HPN
7878 grep -v '^ *+' conftest.er1 >conftest.err
7879 rm -f conftest.er1
7880 cat conftest.err >&5
ba479fd2
NN
7881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7882 (exit $ac_status); } &&
a1286ef5
ZW
7883 { ac_try='test -z "$ac_c_werror_flag"
7884 || test ! -s conftest.err'
86da66b5
HPN
7885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7886 (eval $ac_try) 2>&5
7887 ac_status=$?
7888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7889 (exit $ac_status); }; } &&
7890 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7892 (eval $ac_try) 2>&5
7893 ac_status=$?
7894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7895 (exit $ac_status); }; }; then
956d6950
JL
7896 ac_cv_header_time=yes
7897else
ba479fd2
NN
7898 echo "$as_me: failed program was:" >&5
7899sed 's/^/| /' conftest.$ac_ext >&5
7900
7901ac_cv_header_time=no
956d6950 7902fi
86da66b5 7903rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 7904fi
ba479fd2
NN
7905echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7906echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 7907if test $ac_cv_header_time = yes; then
ba479fd2
NN
7908
7909cat >>confdefs.h <<\_ACEOF
956d6950 7910#define TIME_WITH_SYS_TIME 1
ba479fd2 7911_ACEOF
956d6950
JL
7912
7913fi
7914
41e622a8
AP
7915echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
7916echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
7917if test "${gcc_cv_header_string+set}" = set; then
7918 echo $ECHO_N "(cached) $ECHO_C" >&6
7919else
7920 cat >conftest.$ac_ext <<_ACEOF
7921/* confdefs.h. */
7922_ACEOF
7923cat confdefs.h >>conftest.$ac_ext
7924cat >>conftest.$ac_ext <<_ACEOF
7925/* end confdefs.h. */
7926#include <string.h>
7927#include <strings.h>
7928int
7929main ()
7930{
7931
7932 ;
7933 return 0;
7934}
7935_ACEOF
7936rm -f conftest.$ac_objext
7937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7938 (eval $ac_compile) 2>conftest.er1
7939 ac_status=$?
7940 grep -v '^ *+' conftest.er1 >conftest.err
7941 rm -f conftest.er1
7942 cat conftest.err >&5
7943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7944 (exit $ac_status); } &&
a1286ef5
ZW
7945 { ac_try='test -z "$ac_c_werror_flag"
7946 || test ! -s conftest.err'
41e622a8
AP
7947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7948 (eval $ac_try) 2>&5
7949 ac_status=$?
7950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7951 (exit $ac_status); }; } &&
7952 { ac_try='test -s conftest.$ac_objext'
7953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7954 (eval $ac_try) 2>&5
7955 ac_status=$?
7956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7957 (exit $ac_status); }; }; then
7958 gcc_cv_header_string=yes
7959else
7960 echo "$as_me: failed program was:" >&5
7961sed 's/^/| /' conftest.$ac_ext >&5
7962
7963gcc_cv_header_string=no
7964fi
7965rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7966fi
7967echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
7968echo "${ECHO_T}$gcc_cv_header_string" >&6
7969if test $gcc_cv_header_string = yes; then
7970
7971cat >>confdefs.h <<\_ACEOF
7972#define STRING_WITH_STRINGS 1
7973_ACEOF
7974
7975fi
7976
ba479fd2
NN
7977echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7978echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
7979if test "${ac_cv_header_sys_wait_h+set}" = set; then
7980 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 7981else
ba479fd2 7982 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7983/* confdefs.h. */
7984_ACEOF
7985cat confdefs.h >>conftest.$ac_ext
7986cat >>conftest.$ac_ext <<_ACEOF
7987/* end confdefs.h. */
e9831ca0
KG
7988#include <sys/types.h>
7989#include <sys/wait.h>
7990#ifndef WEXITSTATUS
ba479fd2 7991# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
7992#endif
7993#ifndef WIFEXITED
ba479fd2 7994# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 7995#endif
ba479fd2
NN
7996
7997int
7998main ()
7999{
8000 int s;
8001 wait (&s);
8002 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8003 ;
8004 return 0;
8005}
8006_ACEOF
8007rm -f conftest.$ac_objext
8008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8009 (eval $ac_compile) 2>conftest.er1
ba479fd2 8010 ac_status=$?
86da66b5
HPN
8011 grep -v '^ *+' conftest.er1 >conftest.err
8012 rm -f conftest.er1
8013 cat conftest.err >&5
ba479fd2
NN
8014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8015 (exit $ac_status); } &&
a1286ef5
ZW
8016 { ac_try='test -z "$ac_c_werror_flag"
8017 || test ! -s conftest.err'
86da66b5
HPN
8018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8019 (eval $ac_try) 2>&5
8020 ac_status=$?
8021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8022 (exit $ac_status); }; } &&
8023 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8025 (eval $ac_try) 2>&5
8026 ac_status=$?
8027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 (exit $ac_status); }; }; then
e9831ca0
KG
8029 ac_cv_header_sys_wait_h=yes
8030else
ba479fd2
NN
8031 echo "$as_me: failed program was:" >&5
8032sed 's/^/| /' conftest.$ac_ext >&5
8033
8034ac_cv_header_sys_wait_h=no
e9831ca0 8035fi
86da66b5 8036rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 8037fi
ba479fd2
NN
8038echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8039echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 8040if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
8041
8042cat >>confdefs.h <<\_ACEOF
e9831ca0 8043#define HAVE_SYS_WAIT_H 1
ba479fd2 8044_ACEOF
6e3f3080 8045
63cf211a 8046fi
6e3f3080 8047
ba479fd2
NN
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
dfb77e37
KC
8069
8070for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 8071 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 8072 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 8073 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 8074do
ba479fd2 8075as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 8076echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
8077echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8078if eval "test \"\${$as_ac_Header+set}\" = set"; then
8079 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8080else
ca9bc441 8081 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8082/* confdefs.h. */
8083_ACEOF
8084cat confdefs.h >>conftest.$ac_ext
8085cat >>conftest.$ac_ext <<_ACEOF
8086/* end confdefs.h. */
8087#include <$ac_header>
8088_ACEOF
8089if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8090 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8091 ac_status=$?
8092 grep -v '^ *+' conftest.er1 >conftest.err
8093 rm -f conftest.er1
8094 cat conftest.err >&5
8095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8096 (exit $ac_status); } >/dev/null; then
8097 if test -s conftest.err; then
8098 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8099 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8100 else
8101 ac_cpp_err=
8102 fi
8103else
8104 ac_cpp_err=yes
8105fi
8106if test -z "$ac_cpp_err"; then
ca9bc441 8107 eval "$as_ac_Header=yes"
ba479fd2
NN
8108else
8109 echo "$as_me: failed program was:" >&5
8110sed 's/^/| /' conftest.$ac_ext >&5
8111
ca9bc441 8112 eval "$as_ac_Header=no"
ba479fd2
NN
8113fi
8114rm -f conftest.err conftest.$ac_ext
6e3f3080 8115fi
ba479fd2
NN
8116echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8117echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
8118if test `eval echo '${'$as_ac_Header'}'` = yes; then
8119 cat >>confdefs.h <<_ACEOF
8120#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8121_ACEOF
8122
956d6950
JL
8123fi
8124done
8125
8126
f24af81b 8127# Check for thread headers.
ca9bc441 8128echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
8129echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
8130if test "${ac_cv_header_thread_h+set}" = set; then
8131 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8132else
ca9bc441 8133 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8134/* confdefs.h. */
8135_ACEOF
8136cat confdefs.h >>conftest.$ac_ext
8137cat >>conftest.$ac_ext <<_ACEOF
8138/* end confdefs.h. */
8139#include <thread.h>
8140_ACEOF
8141if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8142 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8143 ac_status=$?
8144 grep -v '^ *+' conftest.er1 >conftest.err
8145 rm -f conftest.er1
8146 cat conftest.err >&5
8147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8148 (exit $ac_status); } >/dev/null; then
8149 if test -s conftest.err; then
8150 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8151 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8152 else
8153 ac_cpp_err=
8154 fi
8155else
8156 ac_cpp_err=yes
8157fi
8158if test -z "$ac_cpp_err"; then
ca9bc441 8159 ac_cv_header_thread_h=yes
ba479fd2
NN
8160else
8161 echo "$as_me: failed program was:" >&5
8162sed 's/^/| /' conftest.$ac_ext >&5
8163
ca9bc441 8164 ac_cv_header_thread_h=no
ba479fd2
NN
8165fi
8166rm -f conftest.err conftest.$ac_ext
6e3f3080 8167fi
ba479fd2
NN
8168echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8169echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 8170if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
8171 have_thread_h=yes
8172else
ba479fd2 8173 have_thread_h=
f24af81b
TT
8174fi
8175
ca9bc441 8176echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
8177echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8178if test "${ac_cv_header_pthread_h+set}" = set; then
8179 echo $ECHO_N "(cached) $ECHO_C" >&6
f24af81b 8180else
ca9bc441 8181 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8182/* confdefs.h. */
8183_ACEOF
8184cat confdefs.h >>conftest.$ac_ext
8185cat >>conftest.$ac_ext <<_ACEOF
8186/* end confdefs.h. */
8187#include <pthread.h>
8188_ACEOF
8189if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8190 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8191 ac_status=$?
8192 grep -v '^ *+' conftest.er1 >conftest.err
8193 rm -f conftest.er1
8194 cat conftest.err >&5
8195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8196 (exit $ac_status); } >/dev/null; then
8197 if test -s conftest.err; then
8198 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8199 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8200 else
8201 ac_cpp_err=
8202 fi
8203else
8204 ac_cpp_err=yes
8205fi
8206if test -z "$ac_cpp_err"; then
ca9bc441 8207 ac_cv_header_pthread_h=yes
ba479fd2
NN
8208else
8209 echo "$as_me: failed program was:" >&5
8210sed 's/^/| /' conftest.$ac_ext >&5
8211
ca9bc441 8212 ac_cv_header_pthread_h=no
ba479fd2
NN
8213fi
8214rm -f conftest.err conftest.$ac_ext
6e3f3080 8215fi
ba479fd2
NN
8216echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8217echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 8218if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
8219 have_pthread_h=yes
8220else
ba479fd2 8221 have_pthread_h=
f24af81b
TT
8222fi
8223
8224
84c041a1 8225# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
8226echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8227echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
8228if test "${gcc_cv_decl_char_bit+set}" = set; then
8229 echo $ECHO_N "(cached) $ECHO_C" >&6
8230else
8231 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8232/* confdefs.h. */
8233_ACEOF
8234cat confdefs.h >>conftest.$ac_ext
8235cat >>conftest.$ac_ext <<_ACEOF
8236/* end confdefs.h. */
75e93faa
ZW
8237#ifdef HAVE_LIMITS_H
8238#include <limits.h>
8239#endif
8240#ifdef CHAR_BIT
8241found
8242#endif
ba479fd2 8243_ACEOF
75e93faa 8244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8245 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
8246 gcc_cv_decl_char_bit=yes
8247else
75e93faa
ZW
8248 gcc_cv_decl_char_bit=no
8249fi
8250rm -f conftest*
8251
8252
8253fi
ba479fd2
NN
8254echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8255echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 8256if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
8257 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8258echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
8259if test "${gcc_cv_c_nbby+set}" = set; then
8260 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
8261else
8262 i=8
8263 gcc_cv_c_nbby=
8264 while test $i -lt 65; do
ba479fd2 8265 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8266/* confdefs.h. */
8267_ACEOF
8268cat confdefs.h >>conftest.$ac_ext
8269cat >>conftest.$ac_ext <<_ACEOF
8270/* end confdefs.h. */
8271
8272int
8273main ()
8274{
4e70264f
ZW
8275switch(0) {
8276 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8277 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8278 ; }
ba479fd2
NN
8279 ;
8280 return 0;
8281}
8282_ACEOF
8283rm -f conftest.$ac_objext
8284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8285 (eval $ac_compile) 2>conftest.er1
ba479fd2 8286 ac_status=$?
86da66b5
HPN
8287 grep -v '^ *+' conftest.er1 >conftest.err
8288 rm -f conftest.er1
8289 cat conftest.err >&5
ba479fd2
NN
8290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8291 (exit $ac_status); } &&
a1286ef5
ZW
8292 { ac_try='test -z "$ac_c_werror_flag"
8293 || test ! -s conftest.err'
86da66b5
HPN
8294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8295 (eval $ac_try) 2>&5
8296 ac_status=$?
8297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8298 (exit $ac_status); }; } &&
8299 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8301 (eval $ac_try) 2>&5
8302 ac_status=$?
8303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8304 (exit $ac_status); }; }; then
4e70264f 8305 gcc_cv_c_nbby=$i; break
75e93faa 8306else
ba479fd2
NN
8307 echo "$as_me: failed program was:" >&5
8308sed 's/^/| /' conftest.$ac_ext >&5
8309
75e93faa 8310fi
86da66b5 8311rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
8312 i=`expr $i + 1`
8313 done
8314 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8315
8316fi
ba479fd2
NN
8317echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8318echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 8319if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
8320 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8321echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8322 { (exit 1); exit 1; }; }
75e93faa 8323else
ba479fd2
NN
8324
8325cat >>confdefs.h <<_ACEOF
75e93faa 8326#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 8327_ACEOF
75e93faa
ZW
8328
8329fi
8330fi
ba479fd2
NN
8331echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8332echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
8333if test "${ac_cv_c_bigendian+set}" = set; then
8334 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 8335else
4977bab6
ZW
8336 ac_cv_c_bigendian=unknown
8337# See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 8338cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8339/* confdefs.h. */
8340_ACEOF
8341cat confdefs.h >>conftest.$ac_ext
8342cat >>conftest.$ac_ext <<_ACEOF
8343/* end confdefs.h. */
4977bab6
ZW
8344#include <sys/types.h>
8345#include <sys/param.h>
ba479fd2
NN
8346int
8347main ()
8348{
2d6eb5bf 8349
4977bab6
ZW
8350#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8351 bogus endian macros
84c041a1 8352#endif
ba479fd2
NN
8353 ;
8354 return 0;
8355}
8356_ACEOF
8357rm -f conftest.$ac_objext
8358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8359 (eval $ac_compile) 2>conftest.er1
ba479fd2 8360 ac_status=$?
86da66b5
HPN
8361 grep -v '^ *+' conftest.er1 >conftest.err
8362 rm -f conftest.er1
8363 cat conftest.err >&5
ba479fd2
NN
8364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8365 (exit $ac_status); } &&
a1286ef5
ZW
8366 { ac_try='test -z "$ac_c_werror_flag"
8367 || test ! -s conftest.err'
86da66b5
HPN
8368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8369 (eval $ac_try) 2>&5
8370 ac_status=$?
8371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8372 (exit $ac_status); }; } &&
8373 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8375 (eval $ac_try) 2>&5
8376 ac_status=$?
8377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8378 (exit $ac_status); }; }; then
4977bab6 8379 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 8380cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8381/* confdefs.h. */
8382_ACEOF
8383cat confdefs.h >>conftest.$ac_ext
8384cat >>conftest.$ac_ext <<_ACEOF
8385/* end confdefs.h. */
4977bab6
ZW
8386#include <sys/types.h>
8387#include <sys/param.h>
ba479fd2
NN
8388int
8389main ()
8390{
4977bab6
ZW
8391
8392#if BYTE_ORDER != BIG_ENDIAN
8393 not big endian
84c041a1 8394#endif
ba479fd2
NN
8395 ;
8396 return 0;
8397}
8398_ACEOF
8399rm -f conftest.$ac_objext
8400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8401 (eval $ac_compile) 2>conftest.er1
ba479fd2 8402 ac_status=$?
86da66b5
HPN
8403 grep -v '^ *+' conftest.er1 >conftest.err
8404 rm -f conftest.er1
8405 cat conftest.err >&5
ba479fd2
NN
8406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8407 (exit $ac_status); } &&
a1286ef5
ZW
8408 { ac_try='test -z "$ac_c_werror_flag"
8409 || test ! -s conftest.err'
86da66b5
HPN
8410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8411 (eval $ac_try) 2>&5
8412 ac_status=$?
8413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8414 (exit $ac_status); }; } &&
8415 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8417 (eval $ac_try) 2>&5
8418 ac_status=$?
8419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8420 (exit $ac_status); }; }; then
4977bab6
ZW
8421 ac_cv_c_bigendian=yes
8422else
ba479fd2
NN
8423 echo "$as_me: failed program was:" >&5
8424sed 's/^/| /' conftest.$ac_ext >&5
8425
8426ac_cv_c_bigendian=no
4977bab6 8427fi
86da66b5 8428rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8429else
ba479fd2
NN
8430 echo "$as_me: failed program was:" >&5
8431sed 's/^/| /' conftest.$ac_ext >&5
8432
4977bab6 8433fi
86da66b5 8434rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6
ZW
8435if test $ac_cv_c_bigendian = unknown; then
8436if test "$cross_compiling" = yes; then
ba479fd2
NN
8437 echo $ac_n "cross-compiling... " 2>&6
8438else
8439 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8440/* confdefs.h. */
8441_ACEOF
8442cat confdefs.h >>conftest.$ac_ext
8443cat >>conftest.$ac_ext <<_ACEOF
8444/* end confdefs.h. */
4977bab6
ZW
8445main () {
8446 /* Are we little or big endian? From Harbison&Steele. */
8447 union
8448 {
8449 long l;
8450 char c[sizeof (long)];
8451 } u;
8452 u.l = 1;
8453 exit (u.c[sizeof (long) - 1] == 1);
8454}
ba479fd2
NN
8455_ACEOF
8456rm -f conftest$ac_exeext
8457if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8458 (eval $ac_link) 2>&5
8459 ac_status=$?
8460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8461 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8463 (eval $ac_try) 2>&5
8464 ac_status=$?
8465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8466 (exit $ac_status); }; }; then
4977bab6
ZW
8467 ac_cv_c_bigendian=no
8468else
ba479fd2
NN
8469 echo "$as_me: program exited with status $ac_status" >&5
8470echo "$as_me: failed program was:" >&5
8471sed 's/^/| /' conftest.$ac_ext >&5
8472
8473( exit $ac_status )
8474ac_cv_c_bigendian=yes
4977bab6 8475fi
86da66b5 8476rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 8477fi
4977bab6
ZW
8478fi
8479fi
ba479fd2
NN
8480echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8481echo "${ECHO_T}$ac_cv_c_bigendian" >&6
4977bab6 8482if test $ac_cv_c_bigendian = unknown; then
ba479fd2
NN
8483echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
8484echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
2d6eb5bf 8485
4977bab6
ZW
8486cat >conftest.c <<EOF
8487short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8488short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8489void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
8490short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8491short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8492void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
8493int main() { _ascii (); _ebcdic (); return 0; }
8494EOF
8495 if test -f conftest.c ; then
3beb1315 8496 if ${CC-cc} ${CFLAGS} -c conftest.c -o conftest.o && test -f conftest.o ; then
4977bab6
ZW
8497 if test `grep -l BIGenDianSyS conftest.o` ; then
8498 echo $ac_n ' big endian probe OK, ' 1>&6
8499 ac_cv_c_bigendian=yes
8500 fi
8501 if test `grep -l LiTTleEnDian conftest.o` ; then
8502 echo $ac_n ' little endian probe OK, ' 1>&6
8503 if test $ac_cv_c_bigendian = yes ; then
8504 ac_cv_c_bigendian=unknown;
8505 else
8506 ac_cv_c_bigendian=no
8507 fi
8508 fi
8509 echo $ac_n 'guessing bigendian ... ' >&6
8510 fi
8511 fi
ba479fd2
NN
8512echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8513echo "${ECHO_T}$ac_cv_c_bigendian" >&6
84c041a1 8514fi
4977bab6 8515if test $ac_cv_c_bigendian = yes; then
ba479fd2
NN
8516
8517cat >>confdefs.h <<\_ACEOF
4977bab6 8518#define WORDS_BIGENDIAN 1
ba479fd2 8519_ACEOF
cafe096b 8520
ba479fd2
NN
8521
8522cat >>confdefs.h <<\_ACEOF
84c041a1 8523#define HOST_WORDS_BIG_ENDIAN 1
ba479fd2 8524_ACEOF
84c041a1 8525
4977bab6
ZW
8526 BYTEORDER=4321
8527else
8528 BYTEORDER=1234
8529fi
ba479fd2
NN
8530
8531cat >>confdefs.h <<_ACEOF
4977bab6 8532#define BYTEORDER $BYTEORDER
ba479fd2 8533_ACEOF
4977bab6
ZW
8534
8535if test $ac_cv_c_bigendian = unknown; then
3beb1315
HPN
8536 { { echo "$as_me:$LINENO: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&5
8537echo "$as_me: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&2;}
8538 { (exit 1); exit 1; }; }
84c041a1
ZW
8539fi
8540
75e93faa 8541
73458fb7
NN
8542# --------
8543# UNSORTED
8544# --------
1e608388 8545
73458fb7
NN
8546# Stage specific cflags for build.
8547stage1_cflags=
8548case $build in
8549vax-*-*)
8550 if test x$GCC = xyes
8551 then
8552 stage1_cflags="-Wa,-J"
8553 else
8554 stage1_cflags="-J"
8555 fi
8556 ;;
8557powerpc-*-darwin*)
8558 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
8559 # sources; use -no-cpp-precomp to get to GNU cpp.
8560 # Apple's GCC has bugs in designated initializer handling, so disable
8561 # that too.
8562 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
8563 ;;
8564esac
1e608388 8565
1e608388 8566
4e70264f
ZW
8567# These libraries may be used by collect2.
8568# We may need a special search path to get them linked.
ba479fd2
NN
8569echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8570echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
8571if test "${gcc_cv_collect2_libs+set}" = set; then
8572 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
8573else
8574 save_LIBS="$LIBS"
7f2749d4 8575for libs in '' -lld -lmld \
4e70264f
ZW
8576 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8577 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8578do
8579 LIBS="$libs"
ba479fd2 8580 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8581/* confdefs.h. */
8582_ACEOF
8583cat confdefs.h >>conftest.$ac_ext
8584cat >>conftest.$ac_ext <<_ACEOF
8585/* end confdefs.h. */
8586
4e70264f 8587/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8588#ifdef __cplusplus
8589extern "C"
8590#endif
4e70264f 8591/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8592 builtin and then its argument prototype would still apply. */
8593char ldopen ();
8594int
8595main ()
8596{
8597ldopen ();
8598 ;
8599 return 0;
8600}
8601_ACEOF
8602rm -f conftest.$ac_objext conftest$ac_exeext
8603if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8604 (eval $ac_link) 2>conftest.er1
ba479fd2 8605 ac_status=$?
86da66b5
HPN
8606 grep -v '^ *+' conftest.er1 >conftest.err
8607 rm -f conftest.er1
8608 cat conftest.err >&5
ba479fd2
NN
8609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8610 (exit $ac_status); } &&
a1286ef5
ZW
8611 { ac_try='test -z "$ac_c_werror_flag"
8612 || test ! -s conftest.err'
86da66b5
HPN
8613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8614 (eval $ac_try) 2>&5
8615 ac_status=$?
8616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8617 (exit $ac_status); }; } &&
8618 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8620 (eval $ac_try) 2>&5
8621 ac_status=$?
8622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8623 (exit $ac_status); }; }; then
4e70264f
ZW
8624 gcc_cv_collect2_libs="$libs"; break
8625else
ba479fd2
NN
8626 echo "$as_me: failed program was:" >&5
8627sed 's/^/| /' conftest.$ac_ext >&5
8628
4e70264f 8629fi
86da66b5
HPN
8630rm -f conftest.err conftest.$ac_objext \
8631 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8632done
8633LIBS="$save_LIBS"
8634test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8635fi
ba479fd2
NN
8636echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8637echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
8638case $gcc_cv_collect2_libs in
8639 "none required") ;;
8640 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8641esac
8642
8643
7f2749d4
RK
8644# When building Ada code on Alpha, we need exc_resume which is usually in
8645# -lexc. So test for it.
8646save_LIBS="$LIBS"
8647LIBS=
ba479fd2
NN
8648echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8649echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
8650if test "${ac_cv_search_exc_resume+set}" = set; then
8651 echo $ECHO_N "(cached) $ECHO_C" >&6
8652else
8653 ac_func_search_save_LIBS=$LIBS
8654ac_cv_search_exc_resume=no
8655cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8656/* confdefs.h. */
8657_ACEOF
8658cat confdefs.h >>conftest.$ac_ext
8659cat >>conftest.$ac_ext <<_ACEOF
8660/* end confdefs.h. */
7f2749d4 8661
7f2749d4 8662/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8663#ifdef __cplusplus
8664extern "C"
8665#endif
7f2749d4 8666/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8667 builtin and then its argument prototype would still apply. */
8668char exc_resume ();
8669int
8670main ()
8671{
8672exc_resume ();
8673 ;
8674 return 0;
8675}
8676_ACEOF
8677rm -f conftest.$ac_objext conftest$ac_exeext
8678if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8679 (eval $ac_link) 2>conftest.er1
ba479fd2 8680 ac_status=$?
86da66b5
HPN
8681 grep -v '^ *+' conftest.er1 >conftest.err
8682 rm -f conftest.er1
8683 cat conftest.err >&5
ba479fd2
NN
8684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8685 (exit $ac_status); } &&
a1286ef5
ZW
8686 { ac_try='test -z "$ac_c_werror_flag"
8687 || test ! -s conftest.err'
86da66b5
HPN
8688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8689 (eval $ac_try) 2>&5
8690 ac_status=$?
8691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8692 (exit $ac_status); }; } &&
8693 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8695 (eval $ac_try) 2>&5
8696 ac_status=$?
8697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8698 (exit $ac_status); }; }; then
7f2749d4
RK
8699 ac_cv_search_exc_resume="none required"
8700else
ba479fd2
NN
8701 echo "$as_me: failed program was:" >&5
8702sed 's/^/| /' conftest.$ac_ext >&5
8703
7f2749d4 8704fi
86da66b5
HPN
8705rm -f conftest.err conftest.$ac_objext \
8706 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8707if test "$ac_cv_search_exc_resume" = no; then
8708 for ac_lib in exc; do
8709 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8710 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8711/* confdefs.h. */
8712_ACEOF
8713cat confdefs.h >>conftest.$ac_ext
8714cat >>conftest.$ac_ext <<_ACEOF
8715/* end confdefs.h. */
8716
7f2749d4 8717/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8718#ifdef __cplusplus
8719extern "C"
8720#endif
7f2749d4 8721/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8722 builtin and then its argument prototype would still apply. */
8723char exc_resume ();
8724int
8725main ()
8726{
8727exc_resume ();
8728 ;
8729 return 0;
8730}
8731_ACEOF
8732rm -f conftest.$ac_objext conftest$ac_exeext
8733if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8734 (eval $ac_link) 2>conftest.er1
ba479fd2 8735 ac_status=$?
86da66b5
HPN
8736 grep -v '^ *+' conftest.er1 >conftest.err
8737 rm -f conftest.er1
8738 cat conftest.err >&5
ba479fd2
NN
8739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8740 (exit $ac_status); } &&
a1286ef5
ZW
8741 { ac_try='test -z "$ac_c_werror_flag"
8742 || test ! -s conftest.err'
86da66b5
HPN
8743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8744 (eval $ac_try) 2>&5
8745 ac_status=$?
8746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8747 (exit $ac_status); }; } &&
8748 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8750 (eval $ac_try) 2>&5
8751 ac_status=$?
8752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8753 (exit $ac_status); }; }; then
8754 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
8755break
8756else
ba479fd2
NN
8757 echo "$as_me: failed program was:" >&5
8758sed 's/^/| /' conftest.$ac_ext >&5
8759
cafe096b 8760fi
86da66b5
HPN
8761rm -f conftest.err conftest.$ac_objext \
8762 conftest$ac_exeext conftest.$ac_ext
ba479fd2 8763 done
6e3f3080 8764fi
ba479fd2
NN
8765LIBS=$ac_func_search_save_LIBS
8766fi
8767echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
8768echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
8769if test "$ac_cv_search_exc_resume" != no; then
63cf211a 8770 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 8771
7f2749d4 8772fi
ba479fd2 8773
7f2749d4
RK
8774GNAT_LIBEXC="$LIBS"
8775LIBS="$save_LIBS"
8776
8777
62c9aa5f
ZW
8778# Some systems put ldexp and frexp in libm instead of libc; assume
8779# they're both in the same place. jcf-dump needs them.
8780save_LIBS="$LIBS"
8781LIBS=
ba479fd2
NN
8782echo "$as_me:$LINENO: checking for library containing ldexp" >&5
8783echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
8784if test "${ac_cv_search_ldexp+set}" = set; then
8785 echo $ECHO_N "(cached) $ECHO_C" >&6
8786else
8787 ac_func_search_save_LIBS=$LIBS
8788ac_cv_search_ldexp=no
8789cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8790/* confdefs.h. */
8791_ACEOF
8792cat confdefs.h >>conftest.$ac_ext
8793cat >>conftest.$ac_ext <<_ACEOF
8794/* end confdefs.h. */
62c9aa5f 8795
62c9aa5f 8796/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8797#ifdef __cplusplus
8798extern "C"
8799#endif
62c9aa5f 8800/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8801 builtin and then its argument prototype would still apply. */
8802char ldexp ();
8803int
8804main ()
8805{
8806ldexp ();
8807 ;
8808 return 0;
8809}
8810_ACEOF
8811rm -f conftest.$ac_objext conftest$ac_exeext
8812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8813 (eval $ac_link) 2>conftest.er1
ba479fd2 8814 ac_status=$?
86da66b5
HPN
8815 grep -v '^ *+' conftest.er1 >conftest.err
8816 rm -f conftest.er1
8817 cat conftest.err >&5
ba479fd2
NN
8818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8819 (exit $ac_status); } &&
a1286ef5
ZW
8820 { ac_try='test -z "$ac_c_werror_flag"
8821 || test ! -s conftest.err'
86da66b5
HPN
8822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8823 (eval $ac_try) 2>&5
8824 ac_status=$?
8825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8826 (exit $ac_status); }; } &&
8827 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8829 (eval $ac_try) 2>&5
8830 ac_status=$?
8831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8832 (exit $ac_status); }; }; then
62c9aa5f
ZW
8833 ac_cv_search_ldexp="none required"
8834else
ba479fd2
NN
8835 echo "$as_me: failed program was:" >&5
8836sed 's/^/| /' conftest.$ac_ext >&5
8837
62c9aa5f 8838fi
86da66b5
HPN
8839rm -f conftest.err conftest.$ac_objext \
8840 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8841if test "$ac_cv_search_ldexp" = no; then
8842 for ac_lib in m; do
8843 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8844 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8845/* confdefs.h. */
8846_ACEOF
8847cat confdefs.h >>conftest.$ac_ext
8848cat >>conftest.$ac_ext <<_ACEOF
8849/* end confdefs.h. */
8850
62c9aa5f 8851/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8852#ifdef __cplusplus
8853extern "C"
8854#endif
62c9aa5f 8855/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8856 builtin and then its argument prototype would still apply. */
8857char ldexp ();
8858int
8859main ()
8860{
8861ldexp ();
8862 ;
8863 return 0;
8864}
8865_ACEOF
8866rm -f conftest.$ac_objext conftest$ac_exeext
8867if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8868 (eval $ac_link) 2>conftest.er1
ba479fd2 8869 ac_status=$?
86da66b5
HPN
8870 grep -v '^ *+' conftest.er1 >conftest.err
8871 rm -f conftest.er1
8872 cat conftest.err >&5
ba479fd2
NN
8873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8874 (exit $ac_status); } &&
a1286ef5
ZW
8875 { ac_try='test -z "$ac_c_werror_flag"
8876 || test ! -s conftest.err'
86da66b5
HPN
8877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8878 (eval $ac_try) 2>&5
8879 ac_status=$?
8880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8881 (exit $ac_status); }; } &&
8882 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
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); }; }; then
8888 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
8889break
8890else
ba479fd2
NN
8891 echo "$as_me: failed program was:" >&5
8892sed 's/^/| /' conftest.$ac_ext >&5
8893
cafe096b 8894fi
86da66b5
HPN
8895rm -f conftest.err conftest.$ac_objext \
8896 conftest$ac_exeext conftest.$ac_ext
ba479fd2 8897 done
6e3f3080 8898fi
ba479fd2
NN
8899LIBS=$ac_func_search_save_LIBS
8900fi
8901echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
8902echo "${ECHO_T}$ac_cv_search_ldexp" >&6
8903if test "$ac_cv_search_ldexp" != no; then
63cf211a 8904 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 8905
62c9aa5f 8906fi
ba479fd2 8907
62c9aa5f
ZW
8908LDEXP_LIB="$LIBS"
8909LIBS="$save_LIBS"
8910
8911
956d6950
JL
8912# Use <inttypes.h> only if it exists,
8913# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
8914echo "$as_me:$LINENO: checking for inttypes.h" >&5
8915echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
8916if test "${gcc_cv_header_inttypes_h+set}" = set; then
8917 echo $ECHO_N "(cached) $ECHO_C" >&6
8918else
8919 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8920/* confdefs.h. */
8921_ACEOF
8922cat confdefs.h >>conftest.$ac_ext
8923cat >>conftest.$ac_ext <<_ACEOF
8924/* end confdefs.h. */
956d6950
JL
8925#include <sys/types.h>
8926#include <inttypes.h>
ba479fd2
NN
8927int
8928main ()
8929{
956d6950 8930intmax_t i = -1;
ba479fd2
NN
8931 ;
8932 return 0;
8933}
8934_ACEOF
8935rm -f conftest.$ac_objext
8936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8937 (eval $ac_compile) 2>conftest.er1
ba479fd2 8938 ac_status=$?
86da66b5
HPN
8939 grep -v '^ *+' conftest.er1 >conftest.err
8940 rm -f conftest.er1
8941 cat conftest.err >&5
ba479fd2
NN
8942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8943 (exit $ac_status); } &&
a1286ef5
ZW
8944 { ac_try='test -z "$ac_c_werror_flag"
8945 || test ! -s conftest.err'
86da66b5
HPN
8946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8947 (eval $ac_try) 2>&5
8948 ac_status=$?
8949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8950 (exit $ac_status); }; } &&
8951 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8953 (eval $ac_try) 2>&5
8954 ac_status=$?
8955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8956 (exit $ac_status); }; }; then
0056a9b5 8957 gcc_cv_header_inttypes_h=yes
956d6950 8958else
ba479fd2
NN
8959 echo "$as_me: failed program was:" >&5
8960sed 's/^/| /' conftest.$ac_ext >&5
8961
8962gcc_cv_header_inttypes_h=no
956d6950 8963fi
86da66b5 8964rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
8965fi
8966
ba479fd2
NN
8967echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
8968echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 8969if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
8970
8971cat >>confdefs.h <<\_ACEOF
0056a9b5 8972#define HAVE_INTTYPES_H 1
ba479fd2 8973_ACEOF
0056a9b5
KG
8974
8975fi
956d6950 8976
c149cc37 8977
ba479fd2
NN
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
6af8c740
KG
9003for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
9004 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
4e87a651 9005 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
56694dd9
ZW
9006 scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \
9007 setlocale
956d6950 9008do
ba479fd2
NN
9009as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9010echo "$as_me:$LINENO: checking for $ac_func" >&5
9011echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9012if eval "test \"\${$as_ac_var+set}\" = set"; then
9013 echo $ECHO_N "(cached) $ECHO_C" >&6
9014else
9015 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9016/* confdefs.h. */
9017_ACEOF
9018cat confdefs.h >>conftest.$ac_ext
9019cat >>conftest.$ac_ext <<_ACEOF
9020/* end confdefs.h. */
86da66b5
HPN
9021/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9022 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9023#define $ac_func innocuous_$ac_func
9024
956d6950 9025/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9026 which can conflict with char $ac_func (); below.
9027 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9028 <limits.h> exists even on freestanding compilers. */
86da66b5 9029
ba479fd2
NN
9030#ifdef __STDC__
9031# include <limits.h>
9032#else
9033# include <assert.h>
9034#endif
86da66b5
HPN
9035
9036#undef $ac_func
9037
6e3f3080 9038/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9039#ifdef __cplusplus
9040extern "C"
9041{
9042#endif
6e3f3080 9043/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9044 builtin and then its argument prototype would still apply. */
9045char $ac_func ();
956d6950
JL
9046/* The GNU C library defines this for functions which it implements
9047 to always fail with ENOSYS. Some functions are actually named
9048 something starting with __ and the normal name is an alias. */
9049#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9050choke me
9051#else
ba479fd2
NN
9052char (*f) () = $ac_func;
9053#endif
9054#ifdef __cplusplus
9055}
956d6950
JL
9056#endif
9057
ba479fd2
NN
9058int
9059main ()
9060{
9061return f != $ac_func;
9062 ;
9063 return 0;
9064}
9065_ACEOF
9066rm -f conftest.$ac_objext conftest$ac_exeext
9067if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9068 (eval $ac_link) 2>conftest.er1
ba479fd2 9069 ac_status=$?
86da66b5
HPN
9070 grep -v '^ *+' conftest.er1 >conftest.err
9071 rm -f conftest.er1
9072 cat conftest.err >&5
ba479fd2
NN
9073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9074 (exit $ac_status); } &&
a1286ef5
ZW
9075 { ac_try='test -z "$ac_c_werror_flag"
9076 || test ! -s conftest.err'
86da66b5
HPN
9077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9078 (eval $ac_try) 2>&5
9079 ac_status=$?
9080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9081 (exit $ac_status); }; } &&
9082 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
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); }; }; then
9088 eval "$as_ac_var=yes"
9089else
9090 echo "$as_me: failed program was:" >&5
9091sed 's/^/| /' conftest.$ac_ext >&5
9092
9093eval "$as_ac_var=no"
9094fi
86da66b5
HPN
9095rm -f conftest.err conftest.$ac_objext \
9096 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9097fi
9098echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9099echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9100if test `eval echo '${'$as_ac_var'}'` = yes; then
9101 cat >>confdefs.h <<_ACEOF
9102#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9103_ACEOF
956d6950 9104
956d6950
JL
9105fi
9106done
9107
6885fc87 9108
39f6c4c8 9109if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
9110 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9111echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
9112if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9113 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9114else
9115 if test "$cross_compiling" = yes; then
9116 gcc_cv_func_mbstowcs_works=yes
9117else
ba479fd2 9118 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9119/* confdefs.h. */
9120_ACEOF
9121cat confdefs.h >>conftest.$ac_ext
9122cat >>conftest.$ac_ext <<_ACEOF
9123/* end confdefs.h. */
39f6c4c8
KW
9124#include <stdlib.h>
9125int main()
9126{
9127 mbstowcs(0, "", 0);
9128 return 0;
9129}
ba479fd2
NN
9130_ACEOF
9131rm -f conftest$ac_exeext
9132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9133 (eval $ac_link) 2>&5
9134 ac_status=$?
9135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9138 (eval $ac_try) 2>&5
9139 ac_status=$?
9140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9141 (exit $ac_status); }; }; then
39f6c4c8
KW
9142 gcc_cv_func_mbstowcs_works=yes
9143else
ba479fd2
NN
9144 echo "$as_me: program exited with status $ac_status" >&5
9145echo "$as_me: failed program was:" >&5
9146sed 's/^/| /' conftest.$ac_ext >&5
9147
9148( exit $ac_status )
9149gcc_cv_func_mbstowcs_works=no
39f6c4c8 9150fi
86da66b5 9151rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 9152fi
39f6c4c8 9153fi
ba479fd2
NN
9154echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9155echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 9156 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
9157
9158cat >>confdefs.h <<\_ACEOF
39f6c4c8 9159#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 9160_ACEOF
39f6c4c8
KW
9161
9162 fi
9163fi
9164
ba479fd2
NN
9165echo "$as_me:$LINENO: checking for ssize_t" >&5
9166echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
9167if test "${ac_cv_type_ssize_t+set}" = set; then
9168 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 9169else
ba479fd2 9170 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9171/* confdefs.h. */
9172_ACEOF
9173cat confdefs.h >>conftest.$ac_ext
9174cat >>conftest.$ac_ext <<_ACEOF
9175/* end confdefs.h. */
8b4fc07a
NN
9176$ac_includes_default
9177int
9178main ()
9179{
9180if ((ssize_t *) 0)
9181 return 0;
9182if (sizeof (ssize_t))
9183 return 0;
9184 ;
9185 return 0;
9186}
ba479fd2 9187_ACEOF
8b4fc07a
NN
9188rm -f conftest.$ac_objext
9189if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9190 (eval $ac_compile) 2>conftest.er1
8b4fc07a 9191 ac_status=$?
86da66b5
HPN
9192 grep -v '^ *+' conftest.er1 >conftest.err
9193 rm -f conftest.er1
9194 cat conftest.err >&5
8b4fc07a
NN
9195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9196 (exit $ac_status); } &&
a1286ef5
ZW
9197 { ac_try='test -z "$ac_c_werror_flag"
9198 || test ! -s conftest.err'
86da66b5
HPN
9199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9200 (eval $ac_try) 2>&5
9201 ac_status=$?
9202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9203 (exit $ac_status); }; } &&
9204 { ac_try='test -s conftest.$ac_objext'
8b4fc07a
NN
9205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9206 (eval $ac_try) 2>&5
9207 ac_status=$?
9208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9209 (exit $ac_status); }; }; then
cb65112a 9210 ac_cv_type_ssize_t=yes
f12bc141 9211else
8b4fc07a
NN
9212 echo "$as_me: failed program was:" >&5
9213sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9214
8b4fc07a
NN
9215ac_cv_type_ssize_t=no
9216fi
86da66b5 9217rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9218fi
ba479fd2
NN
9219echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9220echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
9221if test $ac_cv_type_ssize_t = yes; then
9222 :
9223else
ba479fd2 9224
8b4fc07a 9225cat >>confdefs.h <<_ACEOF
f12bc141 9226#define ssize_t int
ba479fd2 9227_ACEOF
f12bc141
ZW
9228
9229fi
9230
0b9d02c6 9231
e256b8b6
DA
9232# Try to determine the array type of the second argument of getgroups
9233# for the target system (int or gid_t).
ba479fd2
NN
9234echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9235echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
9236if test "${ac_cv_type_uid_t+set}" = set; then
9237 echo $ECHO_N "(cached) $ECHO_C" >&6
9238else
9239 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9240/* confdefs.h. */
9241_ACEOF
9242cat confdefs.h >>conftest.$ac_ext
9243cat >>conftest.$ac_ext <<_ACEOF
9244/* end confdefs.h. */
e256b8b6 9245#include <sys/types.h>
ba479fd2
NN
9246
9247_ACEOF
e256b8b6 9248if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9249 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
9250 ac_cv_type_uid_t=yes
9251else
e256b8b6
DA
9252 ac_cv_type_uid_t=no
9253fi
9254rm -f conftest*
9255
9256fi
ba479fd2
NN
9257echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9258echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 9259if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
9260
9261cat >>confdefs.h <<\_ACEOF
e256b8b6 9262#define uid_t int
ba479fd2 9263_ACEOF
cafe096b 9264
ba479fd2
NN
9265
9266cat >>confdefs.h <<\_ACEOF
e256b8b6 9267#define gid_t int
ba479fd2 9268_ACEOF
e256b8b6
DA
9269
9270fi
9271
ba479fd2
NN
9272echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9273echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
9274if test "${ac_cv_type_getgroups+set}" = set; then
9275 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
9276else
9277 if test "$cross_compiling" = yes; then
9278 ac_cv_type_getgroups=cross
9279else
ba479fd2 9280 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9281/* confdefs.h. */
9282_ACEOF
9283cat confdefs.h >>conftest.$ac_ext
9284cat >>conftest.$ac_ext <<_ACEOF
9285/* end confdefs.h. */
e256b8b6
DA
9286/* Thanks to Mike Rendell for this test. */
9287#include <sys/types.h>
9288#define NGID 256
9289#undef MAX
9290#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
9291
9292int
9293main ()
e256b8b6
DA
9294{
9295 gid_t gidset[NGID];
9296 int i, n;
9297 union { gid_t gval; long lval; } val;
9298
9299 val.lval = -1;
9300 for (i = 0; i < NGID; i++)
9301 gidset[i] = val.gval;
9302 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 9303 gidset);
e256b8b6
DA
9304 /* Exit non-zero if getgroups seems to require an array of ints. This
9305 happens when gid_t is short but getgroups modifies an array of ints. */
9306 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 9307}
ba479fd2
NN
9308_ACEOF
9309rm -f conftest$ac_exeext
9310if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9311 (eval $ac_link) 2>&5
9312 ac_status=$?
9313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9314 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9316 (eval $ac_try) 2>&5
9317 ac_status=$?
9318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9319 (exit $ac_status); }; }; then
9320 ac_cv_type_getgroups=gid_t
63cf211a 9321else
ba479fd2
NN
9322 echo "$as_me: program exited with status $ac_status" >&5
9323echo "$as_me: failed program was:" >&5
9324sed 's/^/| /' conftest.$ac_ext >&5
9325
9326( exit $ac_status )
9327ac_cv_type_getgroups=int
e256b8b6 9328fi
86da66b5 9329rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 9330fi
e256b8b6 9331if test $ac_cv_type_getgroups = cross; then
ba479fd2 9332 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9333/* confdefs.h. */
9334_ACEOF
9335cat confdefs.h >>conftest.$ac_ext
9336cat >>conftest.$ac_ext <<_ACEOF
9337/* end confdefs.h. */
e256b8b6 9338#include <unistd.h>
ba479fd2
NN
9339
9340_ACEOF
e256b8b6 9341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9342 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
9343 ac_cv_type_getgroups=gid_t
9344else
e256b8b6
DA
9345 ac_cv_type_getgroups=int
9346fi
9347rm -f conftest*
9348
9349fi
9350fi
ba479fd2
NN
9351echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9352echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 9353
ba479fd2 9354cat >>confdefs.h <<_ACEOF
e256b8b6 9355#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 9356_ACEOF
e256b8b6
DA
9357
9358
9359if test "${target}" = "${build}"; then
9360 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9361else
9362 case "${target}" in
9363 # This condition may need some tweaking. It should include all
9364 # targets where the array type of the second argument of getgroups
9365 # is int and the type of gid_t is not equivalent to int.
9366 *-*-sunos* | *-*-ultrix*)
9367 TARGET_GETGROUPS_T=int
9368 ;;
9369 *)
9370 TARGET_GETGROUPS_T=gid_t
9371 ;;
9372 esac
9373fi
9374
9375
ba479fd2
NN
9376echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5
9377echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6
9378if test "${gcc_cv_func_printf_ptr+set}" = set; then
9379 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
9380else
9381 if test "$cross_compiling" = yes; then
9382 gcc_cv_func_printf_ptr=no
9383else
ba479fd2 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. */
0a4b6309
RL
9390#include <stdio.h>
9391
86cf1cbd 9392int main()
0a4b6309
RL
9393{
9394 char buf[64];
9395 char *p = buf, *q = NULL;
9396 sprintf(buf, "%p", p);
9397 sscanf(buf, "%p", &q);
86cf1cbd 9398 return (p != q);
0a4b6309 9399}
ba479fd2
NN
9400_ACEOF
9401rm -f conftest$ac_exeext
9402if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9403 (eval $ac_link) 2>&5
9404 ac_status=$?
9405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9406 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9408 (eval $ac_try) 2>&5
9409 ac_status=$?
9410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9411 (exit $ac_status); }; }; then
0a4b6309
RL
9412 gcc_cv_func_printf_ptr=yes
9413else
ba479fd2
NN
9414 echo "$as_me: program exited with status $ac_status" >&5
9415echo "$as_me: failed program was:" >&5
9416sed 's/^/| /' conftest.$ac_ext >&5
9417
9418( exit $ac_status )
9419gcc_cv_func_printf_ptr=no
0a4b6309 9420fi
86da66b5 9421rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0a4b6309 9422fi
0a4b6309
RL
9423rm -f core core.* *.core
9424fi
ba479fd2
NN
9425echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5
9426echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6
63cf211a 9427if test $gcc_cv_func_printf_ptr = yes ; then
ba479fd2
NN
9428
9429cat >>confdefs.h <<\_ACEOF
0a4b6309 9430#define HAVE_PRINTF_PTR 1
ba479fd2 9431_ACEOF
0a4b6309
RL
9432
9433fi
9434
3b0727a0
MR
9435
9436echo "$as_me:$LINENO: checking for sys/mman.h" >&5
9437echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
9438if test "${ac_cv_header_sys_mman_h+set}" = set; then
9439 echo $ECHO_N "(cached) $ECHO_C" >&6
9440else
9441 cat >conftest.$ac_ext <<_ACEOF
9442/* confdefs.h. */
9443_ACEOF
9444cat confdefs.h >>conftest.$ac_ext
9445cat >>conftest.$ac_ext <<_ACEOF
9446/* end confdefs.h. */
9447#include <sys/mman.h>
9448_ACEOF
9449if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9450 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9451 ac_status=$?
9452 grep -v '^ *+' conftest.er1 >conftest.err
9453 rm -f conftest.er1
9454 cat conftest.err >&5
9455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9456 (exit $ac_status); } >/dev/null; then
9457 if test -s conftest.err; then
9458 ac_cpp_err=$ac_c_preproc_warn_flag
9459 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9460 else
9461 ac_cpp_err=
9462 fi
9463else
9464 ac_cpp_err=yes
9465fi
9466if test -z "$ac_cpp_err"; then
9467 ac_cv_header_sys_mman_h=yes
9468else
9469 echo "$as_me: failed program was:" >&5
9470sed 's/^/| /' conftest.$ac_ext >&5
9471
9472 ac_cv_header_sys_mman_h=no
9473fi
9474rm -f conftest.err conftest.$ac_ext
9475fi
9476echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9477echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
9478if test $ac_cv_header_sys_mman_h = yes; then
9479 gcc_header_sys_mman_h=yes
9480else
9481 gcc_header_sys_mman_h=no
9482fi
9483
9484echo "$as_me:$LINENO: checking for mmap" >&5
9485echo $ECHO_N "checking for mmap... $ECHO_C" >&6
9486if test "${ac_cv_func_mmap+set}" = set; then
9487 echo $ECHO_N "(cached) $ECHO_C" >&6
9488else
9489 cat >conftest.$ac_ext <<_ACEOF
9490/* confdefs.h. */
9491_ACEOF
9492cat confdefs.h >>conftest.$ac_ext
9493cat >>conftest.$ac_ext <<_ACEOF
9494/* end confdefs.h. */
9495/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9496 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9497#define mmap innocuous_mmap
9498
9499/* System header to define __stub macros and hopefully few prototypes,
9500 which can conflict with char mmap (); below.
9501 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9502 <limits.h> exists even on freestanding compilers. */
9503
9504#ifdef __STDC__
9505# include <limits.h>
9506#else
9507# include <assert.h>
9508#endif
9509
9510#undef mmap
9511
9512/* Override any gcc2 internal prototype to avoid an error. */
9513#ifdef __cplusplus
9514extern "C"
9515{
9516#endif
9517/* We use char because int might match the return type of a gcc2
9518 builtin and then its argument prototype would still apply. */
9519char mmap ();
9520/* The GNU C library defines this for functions which it implements
9521 to always fail with ENOSYS. Some functions are actually named
9522 something starting with __ and the normal name is an alias. */
9523#if defined (__stub_mmap) || defined (__stub___mmap)
9524choke me
9525#else
9526char (*f) () = mmap;
9527#endif
9528#ifdef __cplusplus
9529}
9530#endif
9531
9532int
9533main ()
9534{
9535return f != mmap;
9536 ;
9537 return 0;
9538}
9539_ACEOF
9540rm -f conftest.$ac_objext conftest$ac_exeext
9541if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9542 (eval $ac_link) 2>conftest.er1
9543 ac_status=$?
9544 grep -v '^ *+' conftest.er1 >conftest.err
9545 rm -f conftest.er1
9546 cat conftest.err >&5
9547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9548 (exit $ac_status); } &&
a1286ef5
ZW
9549 { ac_try='test -z "$ac_c_werror_flag"
9550 || test ! -s conftest.err'
3b0727a0
MR
9551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9552 (eval $ac_try) 2>&5
9553 ac_status=$?
9554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9555 (exit $ac_status); }; } &&
9556 { ac_try='test -s conftest$ac_exeext'
9557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9558 (eval $ac_try) 2>&5
9559 ac_status=$?
9560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9561 (exit $ac_status); }; }; then
9562 ac_cv_func_mmap=yes
9563else
9564 echo "$as_me: failed program was:" >&5
9565sed 's/^/| /' conftest.$ac_ext >&5
9566
9567ac_cv_func_mmap=no
9568fi
9569rm -f conftest.err conftest.$ac_objext \
9570 conftest$ac_exeext conftest.$ac_ext
9571fi
9572echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9573echo "${ECHO_T}$ac_cv_func_mmap" >&6
9574if test $ac_cv_func_mmap = yes; then
9575 gcc_func_mmap=yes
9576else
9577 gcc_func_mmap=no
9578fi
9579
9580if test "$gcc_header_sys_mman_h" != yes \
9581 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
9582 gcc_cv_func_mmap_file=no
9583 gcc_cv_func_mmap_dev_zero=no
9584 gcc_cv_func_mmap_anon=no
9585else
ba479fd2
NN
9586 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9587echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
9588if test "${gcc_cv_func_mmap_file+set}" = set; then
9589 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 9590else
ba479fd2 9591 # Add a system to this blacklist if
1072ec3f
ZW
9592 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9593 # memory area containing the same data that you'd get if you applied
9594 # read() to the same fd. The only system known to have a problem here
9595 # is VMS, where text files have record structure.
9596 case "$host_os" in
ba479fd2 9597 vms* | ultrix*)
1072ec3f
ZW
9598 gcc_cv_func_mmap_file=no ;;
9599 *)
9600 gcc_cv_func_mmap_file=yes;;
9601 esac
9602fi
ba479fd2
NN
9603echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9604echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9605 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9606echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
9607if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9608 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9609else
9610 # Add a system to this blacklist if it has mmap() but /dev/zero
9611 # does not exist, or if mmapping /dev/zero does not give anonymous
9612 # zeroed pages with both the following properties:
9613 # 1. If you map N consecutive pages in with one call, and then
9614 # unmap any subset of those pages, the pages that were not
9615 # explicitly unmapped remain accessible.
9616 # 2. If you map two adjacent blocks of memory and then unmap them
9617 # both at once, they must both go away.
9618 # Systems known to be in this category are Windows (all variants),
9619 # VMS, and Darwin.
9620 case "$host_os" in
2ce240d3 9621 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
9622 gcc_cv_func_mmap_dev_zero=no ;;
9623 *)
9624 gcc_cv_func_mmap_dev_zero=yes;;
9625 esac
9626fi
ba479fd2
NN
9627echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9628echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
9629
9630 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
9631 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9632echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
9633if test "${gcc_cv_decl_map_anon+set}" = set; then
9634 echo $ECHO_N "(cached) $ECHO_C" >&6
9635else
9636 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9637/* confdefs.h. */
9638_ACEOF
9639cat confdefs.h >>conftest.$ac_ext
9640cat >>conftest.$ac_ext <<_ACEOF
9641/* end confdefs.h. */
1072ec3f
ZW
9642#include <sys/types.h>
9643#include <sys/mman.h>
9644#include <unistd.h>
9645
9646#ifndef MAP_ANONYMOUS
9647#define MAP_ANONYMOUS MAP_ANON
9648#endif
9649
ba479fd2
NN
9650int
9651main ()
9652{
1072ec3f 9653int n = MAP_ANONYMOUS;
ba479fd2
NN
9654 ;
9655 return 0;
9656}
9657_ACEOF
9658rm -f conftest.$ac_objext
9659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9660 (eval $ac_compile) 2>conftest.er1
ba479fd2 9661 ac_status=$?
86da66b5
HPN
9662 grep -v '^ *+' conftest.er1 >conftest.err
9663 rm -f conftest.er1
9664 cat conftest.err >&5
ba479fd2
NN
9665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9666 (exit $ac_status); } &&
a1286ef5
ZW
9667 { ac_try='test -z "$ac_c_werror_flag"
9668 || test ! -s conftest.err'
86da66b5
HPN
9669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9670 (eval $ac_try) 2>&5
9671 ac_status=$?
9672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9673 (exit $ac_status); }; } &&
9674 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9676 (eval $ac_try) 2>&5
9677 ac_status=$?
9678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9679 (exit $ac_status); }; }; then
1072ec3f
ZW
9680 gcc_cv_decl_map_anon=yes
9681else
ba479fd2
NN
9682 echo "$as_me: failed program was:" >&5
9683sed 's/^/| /' conftest.$ac_ext >&5
9684
9685gcc_cv_decl_map_anon=no
1072ec3f 9686fi
86da66b5 9687rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 9688fi
ba479fd2
NN
9689echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9690echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
9691
9692 if test $gcc_cv_decl_map_anon = no; then
9693 gcc_cv_func_mmap_anon=no
9694 else
ba479fd2
NN
9695 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9696echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
9697if test "${gcc_cv_func_mmap_anon+set}" = set; then
9698 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9699else
9700 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9701 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9702 # doesn't give anonymous zeroed pages with the same properties listed
9703 # above for use of /dev/zero.
9704 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9705 case "$host_os" in
9706 vms* | cygwin* | pe | mingw* | sco* | udk* )
9707 gcc_cv_func_mmap_anon=no ;;
9708 *)
9709 gcc_cv_func_mmap_anon=yes;;
9710 esac
9711fi
ba479fd2
NN
9712echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9713echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
9714 fi
9715fi
9716
9717if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
9718
9719cat >>confdefs.h <<\_ACEOF
1072ec3f 9720#define HAVE_MMAP_FILE 1
ba479fd2 9721_ACEOF
1072ec3f
ZW
9722
9723fi
9724if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
9725
9726cat >>confdefs.h <<\_ACEOF
1072ec3f 9727#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 9728_ACEOF
1072ec3f
ZW
9729
9730fi
9731if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
9732
9733cat >>confdefs.h <<\_ACEOF
1072ec3f 9734#define HAVE_MMAP_ANON 1
ba479fd2 9735_ACEOF
1072ec3f
ZW
9736
9737fi
9738
b27d2bd5
MK
9739
9740case "${host}" in
ee262b6f 9741*-*-*vms*)
ba479fd2 9742 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
9743 # won't work, and it isn't easily adaptable. It makes more sense to
9744 # just force it.
9745 ac_cv_func_vfork_works=yes
9746 ;;
b27d2bd5 9747esac
ba479fd2
NN
9748echo "$as_me:$LINENO: checking for pid_t" >&5
9749echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
9750if test "${ac_cv_type_pid_t+set}" = set; then
9751 echo $ECHO_N "(cached) $ECHO_C" >&6
9752else
9753 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9754/* confdefs.h. */
9755_ACEOF
9756cat confdefs.h >>conftest.$ac_ext
9757cat >>conftest.$ac_ext <<_ACEOF
9758/* end confdefs.h. */
9759$ac_includes_default
9760int
9761main ()
9762{
9763if ((pid_t *) 0)
9764 return 0;
9765if (sizeof (pid_t))
9766 return 0;
9767 ;
9768 return 0;
9769}
9770_ACEOF
9771rm -f conftest.$ac_objext
9772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9773 (eval $ac_compile) 2>conftest.er1
ba479fd2 9774 ac_status=$?
86da66b5
HPN
9775 grep -v '^ *+' conftest.er1 >conftest.err
9776 rm -f conftest.er1
9777 cat conftest.err >&5
ba479fd2
NN
9778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9779 (exit $ac_status); } &&
a1286ef5
ZW
9780 { ac_try='test -z "$ac_c_werror_flag"
9781 || test ! -s conftest.err'
86da66b5
HPN
9782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9783 (eval $ac_try) 2>&5
9784 ac_status=$?
9785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9786 (exit $ac_status); }; } &&
9787 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9789 (eval $ac_try) 2>&5
9790 ac_status=$?
9791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9792 (exit $ac_status); }; }; then
cb65112a 9793 ac_cv_type_pid_t=yes
c375c43b 9794else
ba479fd2
NN
9795 echo "$as_me: failed program was:" >&5
9796sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9797
ba479fd2
NN
9798ac_cv_type_pid_t=no
9799fi
86da66b5 9800rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9801fi
ba479fd2
NN
9802echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
9803echo "${ECHO_T}$ac_cv_type_pid_t" >&6
9804if test $ac_cv_type_pid_t = yes; then
9805 :
9806else
9807
9808cat >>confdefs.h <<_ACEOF
c375c43b 9809#define pid_t int
ba479fd2 9810_ACEOF
c375c43b
KG
9811
9812fi
9813
ba479fd2
NN
9814
9815
9816for ac_header in unistd.h vfork.h
9817do
9818as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 9819echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
9820echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9821if eval "test \"\${$as_ac_Header+set}\" = set"; then
9822 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9823else
ca9bc441 9824 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9825/* confdefs.h. */
9826_ACEOF
9827cat confdefs.h >>conftest.$ac_ext
9828cat >>conftest.$ac_ext <<_ACEOF
9829/* end confdefs.h. */
9830#include <$ac_header>
9831_ACEOF
9832if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9833 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9834 ac_status=$?
9835 grep -v '^ *+' conftest.er1 >conftest.err
9836 rm -f conftest.er1
9837 cat conftest.err >&5
9838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9839 (exit $ac_status); } >/dev/null; then
9840 if test -s conftest.err; then
9841 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 9842 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
9843 else
9844 ac_cpp_err=
9845 fi
093e61a6 9846else
ba479fd2
NN
9847 ac_cpp_err=yes
9848fi
9849if test -z "$ac_cpp_err"; then
ca9bc441 9850 eval "$as_ac_Header=yes"
ba479fd2
NN
9851else
9852 echo "$as_me: failed program was:" >&5
9853sed 's/^/| /' conftest.$ac_ext >&5
9854
ca9bc441 9855 eval "$as_ac_Header=no"
ba479fd2
NN
9856fi
9857rm -f conftest.err conftest.$ac_ext
c375c43b 9858fi
ba479fd2
NN
9859echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9860echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
9861if test `eval echo '${'$as_ac_Header'}'` = yes; then
9862 cat >>confdefs.h <<_ACEOF
9863#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9864_ACEOF
6e3f3080
NN
9865
9866fi
ba479fd2
NN
9867done
9868
9869
9870
9871for ac_func in fork vfork
9872do
9873as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9874echo "$as_me:$LINENO: checking for $ac_func" >&5
9875echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9876if eval "test \"\${$as_ac_var+set}\" = set"; then
9877 echo $ECHO_N "(cached) $ECHO_C" >&6
9878else
9879 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9880/* confdefs.h. */
9881_ACEOF
9882cat confdefs.h >>conftest.$ac_ext
9883cat >>conftest.$ac_ext <<_ACEOF
9884/* end confdefs.h. */
86da66b5
HPN
9885/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9886 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9887#define $ac_func innocuous_$ac_func
9888
c375c43b 9889/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9890 which can conflict with char $ac_func (); below.
9891 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9892 <limits.h> exists even on freestanding compilers. */
86da66b5 9893
ba479fd2
NN
9894#ifdef __STDC__
9895# include <limits.h>
9896#else
9897# include <assert.h>
9898#endif
86da66b5
HPN
9899
9900#undef $ac_func
9901
6e3f3080 9902/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9903#ifdef __cplusplus
9904extern "C"
9905{
9906#endif
6e3f3080 9907/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9908 builtin and then its argument prototype would still apply. */
9909char $ac_func ();
c375c43b
KG
9910/* The GNU C library defines this for functions which it implements
9911 to always fail with ENOSYS. Some functions are actually named
9912 something starting with __ and the normal name is an alias. */
ba479fd2 9913#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
9914choke me
9915#else
ba479fd2
NN
9916char (*f) () = $ac_func;
9917#endif
9918#ifdef __cplusplus
9919}
c375c43b
KG
9920#endif
9921
ba479fd2
NN
9922int
9923main ()
9924{
9925return f != $ac_func;
9926 ;
9927 return 0;
9928}
9929_ACEOF
9930rm -f conftest.$ac_objext conftest$ac_exeext
9931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9932 (eval $ac_link) 2>conftest.er1
ba479fd2 9933 ac_status=$?
86da66b5
HPN
9934 grep -v '^ *+' conftest.er1 >conftest.err
9935 rm -f conftest.er1
9936 cat conftest.err >&5
ba479fd2
NN
9937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9938 (exit $ac_status); } &&
a1286ef5
ZW
9939 { ac_try='test -z "$ac_c_werror_flag"
9940 || test ! -s conftest.err'
86da66b5
HPN
9941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9942 (eval $ac_try) 2>&5
9943 ac_status=$?
9944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9945 (exit $ac_status); }; } &&
9946 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9948 (eval $ac_try) 2>&5
9949 ac_status=$?
9950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9951 (exit $ac_status); }; }; then
9952 eval "$as_ac_var=yes"
9953else
9954 echo "$as_me: failed program was:" >&5
9955sed 's/^/| /' conftest.$ac_ext >&5
9956
9957eval "$as_ac_var=no"
9958fi
86da66b5
HPN
9959rm -f conftest.err conftest.$ac_objext \
9960 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9961fi
9962echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9963echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9964if test `eval echo '${'$as_ac_var'}'` = yes; then
9965 cat >>confdefs.h <<_ACEOF
9966#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9967_ACEOF
9968
c375c43b 9969fi
ba479fd2 9970done
c375c43b 9971
ba479fd2
NN
9972if test "x$ac_cv_func_fork" = xyes; then
9973 echo "$as_me:$LINENO: checking for working fork" >&5
9974echo $ECHO_N "checking for working fork... $ECHO_C" >&6
9975if test "${ac_cv_func_fork_works+set}" = set; then
9976 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 9977else
ba479fd2
NN
9978 if test "$cross_compiling" = yes; then
9979 ac_cv_func_fork_works=cross
9980else
9981 cat >conftest.$ac_ext <<_ACEOF
9982/* By Ruediger Kuhlmann. */
9983 #include <sys/types.h>
9984 #if HAVE_UNISTD_H
9985 # include <unistd.h>
9986 #endif
9987 /* Some systems only have a dummy stub for fork() */
9988 int main ()
9989 {
86da66b5
HPN
9990 if (fork() < 0)
9991 exit (1);
9992 exit (0);
ba479fd2
NN
9993 }
9994_ACEOF
9995rm -f conftest$ac_exeext
9996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9997 (eval $ac_link) 2>&5
9998 ac_status=$?
9999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10002 (eval $ac_try) 2>&5
10003 ac_status=$?
10004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10005 (exit $ac_status); }; }; then
10006 ac_cv_func_fork_works=yes
10007else
10008 echo "$as_me: program exited with status $ac_status" >&5
10009echo "$as_me: failed program was:" >&5
10010sed 's/^/| /' conftest.$ac_ext >&5
10011
10012( exit $ac_status )
10013ac_cv_func_fork_works=no
10014fi
86da66b5 10015rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
10016fi
10017fi
10018echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10019echo "${ECHO_T}$ac_cv_func_fork_works" >&6
10020
10021else
10022 ac_cv_func_fork_works=$ac_cv_func_fork
10023fi
10024if test "x$ac_cv_func_fork_works" = xcross; then
10025 case $host in
10026 *-*-amigaos* | *-*-msdosdjgpp*)
10027 # Override, as these systems have only a dummy fork() stub
10028 ac_cv_func_fork_works=no
10029 ;;
10030 *)
10031 ac_cv_func_fork_works=yes
10032 ;;
10033 esac
10034 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10035echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 10036fi
c375c43b 10037ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10038if test "x$ac_cv_func_vfork" = xyes; then
10039 echo "$as_me:$LINENO: checking for working vfork" >&5
10040echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
10041if test "${ac_cv_func_vfork_works+set}" = set; then
10042 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10043else
ba479fd2
NN
10044 if test "$cross_compiling" = yes; then
10045 ac_cv_func_vfork_works=cross
10046else
10047 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10048/* confdefs.h. */
10049_ACEOF
10050cat confdefs.h >>conftest.$ac_ext
10051cat >>conftest.$ac_ext <<_ACEOF
10052/* end confdefs.h. */
c375c43b
KG
10053/* Thanks to Paul Eggert for this test. */
10054#include <stdio.h>
ba479fd2 10055#include <stdlib.h>
c375c43b
KG
10056#include <sys/types.h>
10057#include <sys/stat.h>
ba479fd2
NN
10058#include <sys/wait.h>
10059#if HAVE_UNISTD_H
10060# include <unistd.h>
c375c43b 10061#endif
ba479fd2
NN
10062#if HAVE_VFORK_H
10063# include <vfork.h>
c375c43b
KG
10064#endif
10065/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
10066 argument registers are propagated back to the parent. The compiler
10067 is told about this with #include <vfork.h>, but some compilers
10068 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10069 static variable whose address is put into a register that is
10070 clobbered by the vfork. */
10071static void
c375c43b
KG
10072#ifdef __cplusplus
10073sparc_address_test (int arg)
ba479fd2 10074# else
c375c43b
KG
10075sparc_address_test (arg) int arg;
10076#endif
10077{
10078 static pid_t child;
10079 if (!child) {
10080 child = vfork ();
10081 if (child < 0) {
10082 perror ("vfork");
10083 _exit(2);
10084 }
10085 if (!child) {
10086 arg = getpid();
10087 write(-1, "", 0);
10088 _exit (arg);
10089 }
10090 }
10091}
ba479fd2
NN
10092
10093int
10094main ()
10095{
c375c43b
KG
10096 pid_t parent = getpid ();
10097 pid_t child;
10098
ba479fd2 10099 sparc_address_test (0);
c375c43b
KG
10100
10101 child = vfork ();
10102
10103 if (child == 0) {
ba479fd2
NN
10104 /* Here is another test for sparc vfork register problems. This
10105 test uses lots of local variables, at least as many local
10106 variables as main has allocated so far including compiler
10107 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10108 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10109 reuse the register of parent for one of the local variables,
10110 since it will think that parent can't possibly be used any more
10111 in this routine. Assigning to the local variable will thus
10112 munge parent in the parent process. */
c375c43b
KG
10113 pid_t
10114 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10115 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10116 /* Convince the compiler that p..p7 are live; otherwise, it might
10117 use the same hardware register for all 8 local variables. */
10118 if (p != p1 || p != p2 || p != p3 || p != p4
10119 || p != p5 || p != p6 || p != p7)
10120 _exit(1);
10121
ba479fd2
NN
10122 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10123 from child file descriptors. If the child closes a descriptor
10124 before it execs or exits, this munges the parent's descriptor
10125 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10126 _exit(close(fileno(stdout)) != 0);
10127 } else {
10128 int status;
10129 struct stat st;
10130
10131 while (wait(&status) != child)
10132 ;
10133 exit(
10134 /* Was there some problem with vforking? */
10135 child < 0
10136
10137 /* Did the child fail? (This shouldn't happen.) */
10138 || status
10139
10140 /* Did the vfork/compiler bug occur? */
10141 || parent != getpid()
10142
10143 /* Did the file descriptor bug occur? */
10144 || fstat(fileno(stdout), &st) != 0
10145 );
10146 }
10147}
ba479fd2
NN
10148_ACEOF
10149rm -f conftest$ac_exeext
10150if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10151 (eval $ac_link) 2>&5
10152 ac_status=$?
10153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10154 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10156 (eval $ac_try) 2>&5
10157 ac_status=$?
10158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10159 (exit $ac_status); }; }; then
c375c43b
KG
10160 ac_cv_func_vfork_works=yes
10161else
ba479fd2
NN
10162 echo "$as_me: program exited with status $ac_status" >&5
10163echo "$as_me: failed program was:" >&5
10164sed 's/^/| /' conftest.$ac_ext >&5
10165
10166( exit $ac_status )
10167ac_cv_func_vfork_works=no
cafe096b 10168fi
86da66b5 10169rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10170fi
ba479fd2
NN
10171fi
10172echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10173echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 10174
ba479fd2
NN
10175fi;
10176if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 10177 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10178 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10179echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
10180fi
10181
ba479fd2
NN
10182if test "x$ac_cv_func_vfork_works" = xyes; then
10183
10184cat >>confdefs.h <<\_ACEOF
10185#define HAVE_WORKING_VFORK 1
10186_ACEOF
10187
10188else
10189
10190cat >>confdefs.h <<\_ACEOF
c375c43b 10191#define vfork fork
ba479fd2 10192_ACEOF
c375c43b
KG
10193
10194fi
ba479fd2
NN
10195if test "x$ac_cv_func_fork_works" = xyes; then
10196
10197cat >>confdefs.h <<\_ACEOF
10198#define HAVE_WORKING_FORK 1
10199_ACEOF
10200
10201fi
10202
c375c43b 10203
81bf3d9e 10204
dfb77e37
KC
10205 if test "X$prefix" = "XNONE"; then
10206 acl_final_prefix="$ac_default_prefix"
10207 else
10208 acl_final_prefix="$prefix"
10209 fi
10210 if test "X$exec_prefix" = "XNONE"; then
10211 acl_final_exec_prefix='${prefix}'
10212 else
10213 acl_final_exec_prefix="$exec_prefix"
10214 fi
10215 acl_save_prefix="$prefix"
10216 prefix="$acl_final_prefix"
10217 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10218 prefix="$acl_save_prefix"
f91abfce
TT
10219
10220
dfb77e37
KC
10221# Check whether --with-gnu-ld or --without-gnu-ld was given.
10222if test "${with_gnu_ld+set}" = set; then
10223 withval="$with_gnu_ld"
10224 test "$withval" = no || with_gnu_ld=yes
ba479fd2 10225else
dfb77e37
KC
10226 with_gnu_ld=no
10227fi;
10228# Prepare PATH_SEPARATOR.
10229# The user is always right.
10230if test "${PATH_SEPARATOR+set}" != set; then
10231 echo "#! /bin/sh" >conf$$.sh
10232 echo "exit 0" >>conf$$.sh
10233 chmod +x conf$$.sh
10234 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10235 PATH_SEPARATOR=';'
ba479fd2 10236 else
dfb77e37 10237 PATH_SEPARATOR=:
ba479fd2 10238 fi
dfb77e37
KC
10239 rm -f conf$$.sh
10240fi
10241ac_prog=ld
10242if test "$GCC" = yes; then
10243 # Check if gcc -print-prog-name=ld gives a path.
10244 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10245echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10246 case $host in
10247 *-*-mingw*)
10248 # gcc leaves a trailing carriage return which upsets mingw
10249 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10250 *)
10251 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10252 esac
10253 case $ac_prog in
10254 # Accept absolute paths.
10255 [\\/]* | [A-Za-z]:[\\/]*)
10256 re_direlt='/[^/][^/]*/\.\./'
10257 # Canonicalize the path of ld
10258 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10259 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10260 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10261 done
10262 test -z "$LD" && LD="$ac_prog"
10263 ;;
10264 "")
10265 # If it fails, then pretend we aren't using GCC.
10266 ac_prog=ld
10267 ;;
10268 *)
10269 # If it is relative, then search for the first ld in PATH.
10270 with_gnu_ld=unknown
10271 ;;
10272 esac
10273elif test "$with_gnu_ld" = yes; then
10274 echo "$as_me:$LINENO: checking for GNU ld" >&5
10275echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 10276else
dfb77e37
KC
10277 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10278echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 10279fi
dfb77e37
KC
10280if test "${acl_cv_path_LD+set}" = set; then
10281 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 10282else
dfb77e37
KC
10283 if test -z "$LD"; then
10284 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10285 for ac_dir in $PATH; do
10286 test -z "$ac_dir" && ac_dir=.
10287 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10288 acl_cv_path_LD="$ac_dir/$ac_prog"
10289 # Check to see if the program is GNU ld. I'd rather use --version,
10290 # but apparently some GNU ld's only accept -v.
10291 # Break only if it was the GNU/non-GNU ld that we prefer.
10292 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10293 test "$with_gnu_ld" != no && break
10294 else
10295 test "$with_gnu_ld" != yes && break
10296 fi
10297 fi
10298 done
10299 IFS="$ac_save_ifs"
10300else
10301 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10302fi
10303fi
ba479fd2 10304
dfb77e37
KC
10305LD="$acl_cv_path_LD"
10306if test -n "$LD"; then
10307 echo "$as_me:$LINENO: result: $LD" >&5
10308echo "${ECHO_T}$LD" >&6
10309else
10310 echo "$as_me:$LINENO: result: no" >&5
10311echo "${ECHO_T}no" >&6
ba479fd2 10312fi
dfb77e37
KC
10313test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10314echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10315 { (exit 1); exit 1; }; }
10316echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10317echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10318if test "${acl_cv_prog_gnu_ld+set}" = set; then
10319 echo $ECHO_N "(cached) $ECHO_C" >&6
10320else
10321 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10322if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10323 acl_cv_prog_gnu_ld=yes
10324else
10325 acl_cv_prog_gnu_ld=no
6e3f3080 10326fi
dfb77e37
KC
10327fi
10328echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10329echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10330with_gnu_ld=$acl_cv_prog_gnu_ld
10331
10332
10333
10334 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10335echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10336if test "${acl_cv_rpath+set}" = set; then
10337 echo $ECHO_N "(cached) $ECHO_C" >&6
10338else
10339
10340 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10341 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10342 . ./conftest.sh
10343 rm -f ./conftest.sh
10344 acl_cv_rpath=done
ba479fd2 10345
eb158727 10346fi
dfb77e37
KC
10347echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10348echo "${ECHO_T}$acl_cv_rpath" >&6
10349 wl="$acl_cv_wl"
10350 libext="$acl_cv_libext"
10351 shlibext="$acl_cv_shlibext"
10352 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10353 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10354 hardcode_direct="$acl_cv_hardcode_direct"
10355 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10356 # Check whether --enable-rpath or --disable-rpath was given.
10357if test "${enable_rpath+set}" = set; then
10358 enableval="$enable_rpath"
10359 :
10360else
10361 enable_rpath=yes
10362fi;
10363
10364
10365
10366
10367
10368
10369
10370 use_additional=yes
10371
10372 acl_save_prefix="$prefix"
10373 prefix="$acl_final_prefix"
10374 acl_save_exec_prefix="$exec_prefix"
10375 exec_prefix="$acl_final_exec_prefix"
10376
10377 eval additional_includedir=\"$includedir\"
10378 eval additional_libdir=\"$libdir\"
10379
10380 exec_prefix="$acl_save_exec_prefix"
10381 prefix="$acl_save_prefix"
10382
10383
10384# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10385if test "${with_libiconv_prefix+set}" = set; then
10386 withval="$with_libiconv_prefix"
10387
10388 if test "X$withval" = "Xno"; then
10389 use_additional=no
10390 else
10391 if test "X$withval" = "X"; then
10392
10393 acl_save_prefix="$prefix"
10394 prefix="$acl_final_prefix"
10395 acl_save_exec_prefix="$exec_prefix"
10396 exec_prefix="$acl_final_exec_prefix"
10397
10398 eval additional_includedir=\"$includedir\"
10399 eval additional_libdir=\"$libdir\"
10400
10401 exec_prefix="$acl_save_exec_prefix"
10402 prefix="$acl_save_prefix"
10403
10404 else
10405 additional_includedir="$withval/include"
10406 additional_libdir="$withval/lib"
10407 fi
10408 fi
10409
10410fi;
10411 LIBICONV=
10412 LTLIBICONV=
10413 INCICONV=
10414 rpathdirs=
10415 ltrpathdirs=
10416 names_already_handled=
10417 names_next_round='iconv '
10418 while test -n "$names_next_round"; do
10419 names_this_round="$names_next_round"
10420 names_next_round=
10421 for name in $names_this_round; do
10422 already_handled=
10423 for n in $names_already_handled; do
10424 if test "$n" = "$name"; then
10425 already_handled=yes
10426 break
10427 fi
10428 done
10429 if test -z "$already_handled"; then
10430 names_already_handled="$names_already_handled $name"
10431 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10432 eval value=\"\$HAVE_LIB$uppername\"
10433 if test -n "$value"; then
10434 if test "$value" = yes; then
10435 eval value=\"\$LIB$uppername\"
10436 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10437 eval value=\"\$LTLIB$uppername\"
10438 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10439 else
10440 :
10441 fi
10442 else
10443 found_dir=
10444 found_la=
10445 found_so=
10446 found_a=
10447 if test $use_additional = yes; then
10448 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10449 found_dir="$additional_libdir"
10450 found_so="$additional_libdir/lib$name.$shlibext"
10451 if test -f "$additional_libdir/lib$name.la"; then
10452 found_la="$additional_libdir/lib$name.la"
10453 fi
10454 else
10455 if test -f "$additional_libdir/lib$name.$libext"; then
10456 found_dir="$additional_libdir"
10457 found_a="$additional_libdir/lib$name.$libext"
10458 if test -f "$additional_libdir/lib$name.la"; then
10459 found_la="$additional_libdir/lib$name.la"
10460 fi
10461 fi
10462 fi
10463 fi
10464 if test "X$found_dir" = "X"; then
10465 for x in $LDFLAGS $LTLIBICONV; do
10466
10467 acl_save_prefix="$prefix"
10468 prefix="$acl_final_prefix"
10469 acl_save_exec_prefix="$exec_prefix"
10470 exec_prefix="$acl_final_exec_prefix"
10471 eval x=\"$x\"
10472 exec_prefix="$acl_save_exec_prefix"
10473 prefix="$acl_save_prefix"
10474
10475 case "$x" in
10476 -L*)
10477 dir=`echo "X$x" | sed -e 's/^X-L//'`
10478 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10479 found_dir="$dir"
10480 found_so="$dir/lib$name.$shlibext"
10481 if test -f "$dir/lib$name.la"; then
10482 found_la="$dir/lib$name.la"
10483 fi
10484 else
10485 if test -f "$dir/lib$name.$libext"; then
10486 found_dir="$dir"
10487 found_a="$dir/lib$name.$libext"
10488 if test -f "$dir/lib$name.la"; then
10489 found_la="$dir/lib$name.la"
10490 fi
10491 fi
10492 fi
10493 ;;
10494 esac
10495 if test "X$found_dir" != "X"; then
10496 break
10497 fi
10498 done
10499 fi
10500 if test "X$found_dir" != "X"; then
10501 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10502 if test "X$found_so" != "X"; then
10503 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10504 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10505 else
10506 haveit=
10507 for x in $ltrpathdirs; do
10508 if test "X$x" = "X$found_dir"; then
10509 haveit=yes
10510 break
10511 fi
10512 done
10513 if test -z "$haveit"; then
10514 ltrpathdirs="$ltrpathdirs $found_dir"
10515 fi
10516 if test "$hardcode_direct" = yes; then
10517 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10518 else
10519 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10520 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10521 haveit=
10522 for x in $rpathdirs; do
10523 if test "X$x" = "X$found_dir"; then
10524 haveit=yes
10525 break
10526 fi
10527 done
10528 if test -z "$haveit"; then
10529 rpathdirs="$rpathdirs $found_dir"
10530 fi
10531 else
10532 haveit=
10533 for x in $LDFLAGS $LIBICONV; do
10534
10535 acl_save_prefix="$prefix"
10536 prefix="$acl_final_prefix"
10537 acl_save_exec_prefix="$exec_prefix"
10538 exec_prefix="$acl_final_exec_prefix"
10539 eval x=\"$x\"
10540 exec_prefix="$acl_save_exec_prefix"
10541 prefix="$acl_save_prefix"
10542
10543 if test "X$x" = "X-L$found_dir"; then
10544 haveit=yes
10545 break
10546 fi
10547 done
10548 if test -z "$haveit"; then
10549 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10550 fi
10551 if test "$hardcode_minus_L" != no; then
10552 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10553 else
10554 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10555 fi
10556 fi
10557 fi
10558 fi
10559 else
10560 if test "X$found_a" != "X"; then
10561 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10562 else
10563 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10564 fi
10565 fi
10566 additional_includedir=
10567 case "$found_dir" in
10568 */lib | */lib/)
10569 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10570 additional_includedir="$basedir/include"
10571 ;;
10572 esac
10573 if test "X$additional_includedir" != "X"; then
10574 if test "X$additional_includedir" != "X/usr/include"; then
10575 haveit=
10576 if test "X$additional_includedir" = "X/usr/local/include"; then
10577 if test -n "$GCC"; then
10578 case $host_os in
10579 linux*) haveit=yes;;
10580 esac
10581 fi
10582 fi
10583 if test -z "$haveit"; then
10584 for x in $CPPFLAGS $INCICONV; do
10585
10586 acl_save_prefix="$prefix"
10587 prefix="$acl_final_prefix"
10588 acl_save_exec_prefix="$exec_prefix"
10589 exec_prefix="$acl_final_exec_prefix"
10590 eval x=\"$x\"
10591 exec_prefix="$acl_save_exec_prefix"
10592 prefix="$acl_save_prefix"
10593
10594 if test "X$x" = "X-I$additional_includedir"; then
10595 haveit=yes
10596 break
10597 fi
10598 done
10599 if test -z "$haveit"; then
10600 if test -d "$additional_includedir"; then
10601 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10602 fi
10603 fi
10604 fi
10605 fi
10606 fi
10607 if test -n "$found_la"; then
10608 save_libdir="$libdir"
10609 case "$found_la" in
10610 */* | *\\*) . "$found_la" ;;
10611 *) . "./$found_la" ;;
10612 esac
10613 libdir="$save_libdir"
10614 for dep in $dependency_libs; do
10615 case "$dep" in
10616 -L*)
10617 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10618 if test "X$additional_libdir" != "X/usr/lib"; then
10619 haveit=
10620 if test "X$additional_libdir" = "X/usr/local/lib"; then
10621 if test -n "$GCC"; then
10622 case $host_os in
10623 linux*) haveit=yes;;
10624 esac
10625 fi
10626 fi
10627 if test -z "$haveit"; then
10628 haveit=
10629 for x in $LDFLAGS $LIBICONV; do
10630
10631 acl_save_prefix="$prefix"
10632 prefix="$acl_final_prefix"
10633 acl_save_exec_prefix="$exec_prefix"
10634 exec_prefix="$acl_final_exec_prefix"
10635 eval x=\"$x\"
10636 exec_prefix="$acl_save_exec_prefix"
10637 prefix="$acl_save_prefix"
10638
10639 if test "X$x" = "X-L$additional_libdir"; then
10640 haveit=yes
10641 break
10642 fi
10643 done
10644 if test -z "$haveit"; then
10645 if test -d "$additional_libdir"; then
10646 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10647 fi
10648 fi
10649 haveit=
10650 for x in $LDFLAGS $LTLIBICONV; do
10651
10652 acl_save_prefix="$prefix"
10653 prefix="$acl_final_prefix"
10654 acl_save_exec_prefix="$exec_prefix"
10655 exec_prefix="$acl_final_exec_prefix"
10656 eval x=\"$x\"
10657 exec_prefix="$acl_save_exec_prefix"
10658 prefix="$acl_save_prefix"
10659
10660 if test "X$x" = "X-L$additional_libdir"; then
10661 haveit=yes
10662 break
10663 fi
10664 done
10665 if test -z "$haveit"; then
10666 if test -d "$additional_libdir"; then
10667 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10668 fi
10669 fi
10670 fi
10671 fi
10672 ;;
10673 -R*)
10674 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10675 if test "$enable_rpath" != no; then
10676 haveit=
10677 for x in $rpathdirs; do
10678 if test "X$x" = "X$dir"; then
10679 haveit=yes
10680 break
10681 fi
10682 done
10683 if test -z "$haveit"; then
10684 rpathdirs="$rpathdirs $dir"
10685 fi
10686 haveit=
10687 for x in $ltrpathdirs; do
10688 if test "X$x" = "X$dir"; then
10689 haveit=yes
10690 break
10691 fi
10692 done
10693 if test -z "$haveit"; then
10694 ltrpathdirs="$ltrpathdirs $dir"
10695 fi
10696 fi
10697 ;;
10698 -l*)
10699 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10700 ;;
10701 *.la)
10702 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10703 ;;
10704 *)
10705 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10706 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10707 ;;
10708 esac
10709 done
10710 fi
10711 else
10712 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10713 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10714 fi
10715 fi
10716 fi
10717 done
10718 done
10719 if test "X$rpathdirs" != "X"; then
10720 if test -n "$hardcode_libdir_separator"; then
10721 alldirs=
10722 for found_dir in $rpathdirs; do
10723 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10724 done
10725 acl_save_libdir="$libdir"
10726 libdir="$alldirs"
10727 eval flag=\"$hardcode_libdir_flag_spec\"
10728 libdir="$acl_save_libdir"
10729 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10730 else
10731 for found_dir in $rpathdirs; do
10732 acl_save_libdir="$libdir"
10733 libdir="$found_dir"
10734 eval flag=\"$hardcode_libdir_flag_spec\"
10735 libdir="$acl_save_libdir"
10736 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10737 done
10738 fi
10739 fi
10740 if test "X$ltrpathdirs" != "X"; then
10741 for found_dir in $ltrpathdirs; do
10742 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10743 done
10744 fi
10745
10746
10747
10748
10749
10750
10751
10752 am_save_CPPFLAGS="$CPPFLAGS"
10753
10754 for element in $INCICONV; do
10755 haveit=
10756 for x in $CPPFLAGS; do
10757
10758 acl_save_prefix="$prefix"
10759 prefix="$acl_final_prefix"
10760 acl_save_exec_prefix="$exec_prefix"
10761 exec_prefix="$acl_final_exec_prefix"
10762 eval x=\"$x\"
10763 exec_prefix="$acl_save_exec_prefix"
10764 prefix="$acl_save_prefix"
10765
10766 if test "X$x" = "X$element"; then
10767 haveit=yes
10768 break
10769 fi
10770 done
10771 if test -z "$haveit"; then
10772 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10773 fi
10774 done
eb158727
ZW
10775
10776
ba479fd2
NN
10777 echo "$as_me:$LINENO: checking for iconv" >&5
10778echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10779if test "${am_cv_func_iconv+set}" = set; then
10780 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10781else
ba479fd2 10782
f91abfce
TT
10783 am_cv_func_iconv="no, consider installing GNU libiconv"
10784 am_cv_lib_iconv=no
ba479fd2 10785 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10786/* confdefs.h. */
10787_ACEOF
10788cat confdefs.h >>conftest.$ac_ext
10789cat >>conftest.$ac_ext <<_ACEOF
10790/* end confdefs.h. */
f91abfce
TT
10791#include <stdlib.h>
10792#include <iconv.h>
ba479fd2
NN
10793int
10794main ()
10795{
f91abfce
TT
10796iconv_t cd = iconv_open("","");
10797 iconv(cd,NULL,NULL,NULL,NULL);
10798 iconv_close(cd);
ba479fd2
NN
10799 ;
10800 return 0;
10801}
10802_ACEOF
10803rm -f conftest.$ac_objext conftest$ac_exeext
10804if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10805 (eval $ac_link) 2>conftest.er1
ba479fd2 10806 ac_status=$?
86da66b5
HPN
10807 grep -v '^ *+' conftest.er1 >conftest.err
10808 rm -f conftest.er1
10809 cat conftest.err >&5
ba479fd2
NN
10810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10811 (exit $ac_status); } &&
a1286ef5
ZW
10812 { ac_try='test -z "$ac_c_werror_flag"
10813 || test ! -s conftest.err'
86da66b5
HPN
10814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10815 (eval $ac_try) 2>&5
10816 ac_status=$?
10817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10818 (exit $ac_status); }; } &&
10819 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10821 (eval $ac_try) 2>&5
10822 ac_status=$?
10823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10824 (exit $ac_status); }; }; then
f91abfce
TT
10825 am_cv_func_iconv=yes
10826else
ba479fd2
NN
10827 echo "$as_me: failed program was:" >&5
10828sed 's/^/| /' conftest.$ac_ext >&5
10829
f91abfce 10830fi
86da66b5
HPN
10831rm -f conftest.err conftest.$ac_objext \
10832 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
10833 if test "$am_cv_func_iconv" != yes; then
10834 am_save_LIBS="$LIBS"
dfb77e37 10835 LIBS="$LIBS $LIBICONV"
ba479fd2 10836 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10837/* confdefs.h. */
10838_ACEOF
10839cat confdefs.h >>conftest.$ac_ext
10840cat >>conftest.$ac_ext <<_ACEOF
10841/* end confdefs.h. */
f91abfce
TT
10842#include <stdlib.h>
10843#include <iconv.h>
ba479fd2
NN
10844int
10845main ()
10846{
f91abfce
TT
10847iconv_t cd = iconv_open("","");
10848 iconv(cd,NULL,NULL,NULL,NULL);
10849 iconv_close(cd);
ba479fd2
NN
10850 ;
10851 return 0;
10852}
10853_ACEOF
10854rm -f conftest.$ac_objext conftest$ac_exeext
10855if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10856 (eval $ac_link) 2>conftest.er1
ba479fd2 10857 ac_status=$?
86da66b5
HPN
10858 grep -v '^ *+' conftest.er1 >conftest.err
10859 rm -f conftest.er1
10860 cat conftest.err >&5
ba479fd2
NN
10861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10862 (exit $ac_status); } &&
a1286ef5
ZW
10863 { ac_try='test -z "$ac_c_werror_flag"
10864 || test ! -s conftest.err'
86da66b5
HPN
10865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10866 (eval $ac_try) 2>&5
10867 ac_status=$?
10868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10869 (exit $ac_status); }; } &&
10870 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10872 (eval $ac_try) 2>&5
10873 ac_status=$?
10874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10875 (exit $ac_status); }; }; then
f91abfce
TT
10876 am_cv_lib_iconv=yes
10877 am_cv_func_iconv=yes
10878else
ba479fd2
NN
10879 echo "$as_me: failed program was:" >&5
10880sed 's/^/| /' conftest.$ac_ext >&5
10881
f91abfce 10882fi
86da66b5
HPN
10883rm -f conftest.err conftest.$ac_objext \
10884 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
10885 LIBS="$am_save_LIBS"
10886 fi
6e3f3080 10887
ba479fd2
NN
10888fi
10889echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
10890echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 10891 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
10892
10893cat >>confdefs.h <<\_ACEOF
f91abfce 10894#define HAVE_ICONV 1
ba479fd2 10895_ACEOF
f91abfce 10896
dfb77e37
KC
10897 fi
10898 if test "$am_cv_lib_iconv" = yes; then
10899 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
10900echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
10901 echo "$as_me:$LINENO: result: $LIBICONV" >&5
10902echo "${ECHO_T}$LIBICONV" >&6
10903 else
10904 CPPFLAGS="$am_save_CPPFLAGS"
10905 LIBICONV=
10906 LTLIBICONV=
10907 fi
10908
10909
10910
10911 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
10912 echo "$as_me:$LINENO: checking for iconv declaration" >&5
10913echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
10914 if test "${am_cv_proto_iconv+set}" = set; then
10915 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10916else
ba479fd2
NN
10917
10918 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10919/* confdefs.h. */
10920_ACEOF
10921cat confdefs.h >>conftest.$ac_ext
10922cat >>conftest.$ac_ext <<_ACEOF
10923/* end confdefs.h. */
f91abfce
TT
10924
10925#include <stdlib.h>
10926#include <iconv.h>
10927extern
10928#ifdef __cplusplus
10929"C"
10930#endif
10931#if defined(__STDC__) || defined(__cplusplus)
10932size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10933#else
10934size_t iconv();
10935#endif
10936
ba479fd2
NN
10937int
10938main ()
10939{
f91abfce 10940
ba479fd2
NN
10941 ;
10942 return 0;
10943}
10944_ACEOF
10945rm -f conftest.$ac_objext
10946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 10947 (eval $ac_compile) 2>conftest.er1
ba479fd2 10948 ac_status=$?
86da66b5
HPN
10949 grep -v '^ *+' conftest.er1 >conftest.err
10950 rm -f conftest.er1
10951 cat conftest.err >&5
ba479fd2
NN
10952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10953 (exit $ac_status); } &&
a1286ef5
ZW
10954 { ac_try='test -z "$ac_c_werror_flag"
10955 || test ! -s conftest.err'
86da66b5
HPN
10956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10957 (eval $ac_try) 2>&5
10958 ac_status=$?
10959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10960 (exit $ac_status); }; } &&
10961 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
10962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10963 (eval $ac_try) 2>&5
10964 ac_status=$?
10965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10966 (exit $ac_status); }; }; then
f91abfce
TT
10967 am_cv_proto_iconv_arg1=""
10968else
ba479fd2
NN
10969 echo "$as_me: failed program was:" >&5
10970sed 's/^/| /' conftest.$ac_ext >&5
10971
10972am_cv_proto_iconv_arg1="const"
f91abfce 10973fi
86da66b5 10974rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
10975 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);"
10976fi
10977
10978 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
10979 echo "$as_me:$LINENO: result: ${ac_t:-
10980 }$am_cv_proto_iconv" >&5
10981echo "${ECHO_T}${ac_t:-
10982 }$am_cv_proto_iconv" >&6
10983
10984cat >>confdefs.h <<_ACEOF
f91abfce 10985#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 10986_ACEOF
f91abfce
TT
10987
10988 fi
f91abfce 10989
56694dd9
ZW
10990# Until we have in-tree GNU iconv:
10991LIBICONV_DEP=
10992
10993
10994
ba479fd2
NN
10995 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
10996echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
10997if test "${am_cv_val_LC_MESSAGES+set}" = set; then
10998 echo $ECHO_N "(cached) $ECHO_C" >&6
56694dd9 10999else
ba479fd2 11000 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11001/* confdefs.h. */
11002_ACEOF
11003cat confdefs.h >>conftest.$ac_ext
11004cat >>conftest.$ac_ext <<_ACEOF
11005/* end confdefs.h. */
56694dd9 11006#include <locale.h>
ba479fd2
NN
11007int
11008main ()
11009{
56694dd9 11010return LC_MESSAGES
ba479fd2
NN
11011 ;
11012 return 0;
11013}
11014_ACEOF
11015rm -f conftest.$ac_objext conftest$ac_exeext
11016if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 11017 (eval $ac_link) 2>conftest.er1
ba479fd2 11018 ac_status=$?
86da66b5
HPN
11019 grep -v '^ *+' conftest.er1 >conftest.err
11020 rm -f conftest.er1
11021 cat conftest.err >&5
ba479fd2
NN
11022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11023 (exit $ac_status); } &&
a1286ef5
ZW
11024 { ac_try='test -z "$ac_c_werror_flag"
11025 || test ! -s conftest.err'
86da66b5
HPN
11026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11027 (eval $ac_try) 2>&5
11028 ac_status=$?
11029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11030 (exit $ac_status); }; } &&
11031 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
11032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11033 (eval $ac_try) 2>&5
11034 ac_status=$?
11035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11036 (exit $ac_status); }; }; then
56694dd9
ZW
11037 am_cv_val_LC_MESSAGES=yes
11038else
ba479fd2
NN
11039 echo "$as_me: failed program was:" >&5
11040sed 's/^/| /' conftest.$ac_ext >&5
11041
11042am_cv_val_LC_MESSAGES=no
56694dd9 11043fi
86da66b5
HPN
11044rm -f conftest.err conftest.$ac_objext \
11045 conftest$ac_exeext conftest.$ac_ext
56694dd9 11046fi
ba479fd2
NN
11047echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11048echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
63cf211a 11049 if test $am_cv_val_LC_MESSAGES = yes; then
ba479fd2
NN
11050
11051cat >>confdefs.h <<\_ACEOF
56694dd9 11052#define HAVE_LC_MESSAGES 1
ba479fd2 11053_ACEOF
56694dd9
ZW
11054
11055 fi
11056
f91abfce 11057
a03ea89b
BM
11058
11059 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11060echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11061if test "${am_cv_langinfo_codeset+set}" = set; then
11062 echo $ECHO_N "(cached) $ECHO_C" >&6
11063else
11064 cat >conftest.$ac_ext <<_ACEOF
11065/* confdefs.h. */
11066_ACEOF
11067cat confdefs.h >>conftest.$ac_ext
11068cat >>conftest.$ac_ext <<_ACEOF
11069/* end confdefs.h. */
11070#include <langinfo.h>
11071int
11072main ()
11073{
11074char* cs = nl_langinfo(CODESET);
11075 ;
11076 return 0;
11077}
11078_ACEOF
11079rm -f conftest.$ac_objext conftest$ac_exeext
11080if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11081 (eval $ac_link) 2>conftest.er1
11082 ac_status=$?
11083 grep -v '^ *+' conftest.er1 >conftest.err
11084 rm -f conftest.er1
11085 cat conftest.err >&5
11086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11087 (exit $ac_status); } &&
a1286ef5
ZW
11088 { ac_try='test -z "$ac_c_werror_flag"
11089 || test ! -s conftest.err'
a03ea89b
BM
11090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11091 (eval $ac_try) 2>&5
11092 ac_status=$?
11093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11094 (exit $ac_status); }; } &&
11095 { ac_try='test -s conftest$ac_exeext'
11096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11097 (eval $ac_try) 2>&5
11098 ac_status=$?
11099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11100 (exit $ac_status); }; }; then
11101 am_cv_langinfo_codeset=yes
11102else
11103 echo "$as_me: failed program was:" >&5
11104sed 's/^/| /' conftest.$ac_ext >&5
11105
11106am_cv_langinfo_codeset=no
11107fi
11108rm -f conftest.err conftest.$ac_objext \
11109 conftest$ac_exeext conftest.$ac_ext
11110
11111fi
11112echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11113echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11114 if test $am_cv_langinfo_codeset = yes; then
11115
11116cat >>confdefs.h <<\_ACEOF
11117#define HAVE_LANGINFO_CODESET 1
11118_ACEOF
11119
11120 fi
11121
11122
86cf1cbd
KG
11123# We will need to find libiberty.h and ansidecl.h
11124saved_CFLAGS="$CFLAGS"
11125CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
6a257778 11147
ad6717df
PB
11148
11149
8e944909 11150for ac_func in getenv atol sbrk abort atof getcwd getwd \
3b681e9d 11151 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
236ce4b2 11152 fprintf_unlocked strstr errno snprintf vasprintf \
6a257778 11153 malloc realloc calloc free basename getopt clock getpagesize
81bf3d9e 11154do
ad6717df 11155 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11156echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11157echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11158if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11159 echo $ECHO_N "(cached) $ECHO_C" >&6
11160else
11161 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11162/* confdefs.h. */
11163_ACEOF
11164cat confdefs.h >>conftest.$ac_ext
11165cat >>conftest.$ac_ext <<_ACEOF
11166/* end confdefs.h. */
7afe8c41
KG
11167#undef $ac_tr_decl
11168#define $ac_tr_decl 1
ba479fd2 11169
d02af173 11170#include "ansidecl.h"
86cf1cbd 11171#include "system.h"
f31e826b 11172
ba479fd2
NN
11173int
11174main ()
11175{
86cf1cbd
KG
11176#ifndef $ac_func
11177char *(*pfn) = (char *(*)) $ac_func ;
11178#endif
ba479fd2
NN
11179 ;
11180 return 0;
11181}
11182_ACEOF
11183rm -f conftest.$ac_objext
11184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11185 (eval $ac_compile) 2>conftest.er1
ba479fd2 11186 ac_status=$?
86da66b5
HPN
11187 grep -v '^ *+' conftest.er1 >conftest.err
11188 rm -f conftest.er1
11189 cat conftest.err >&5
ba479fd2
NN
11190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11191 (exit $ac_status); } &&
a1286ef5
ZW
11192 { ac_try='test -z "$ac_c_werror_flag"
11193 || test ! -s conftest.err'
86da66b5
HPN
11194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11195 (eval $ac_try) 2>&5
11196 ac_status=$?
11197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11198 (exit $ac_status); }; } &&
11199 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11201 (eval $ac_try) 2>&5
11202 ac_status=$?
11203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11204 (exit $ac_status); }; }; then
f31e826b 11205 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11206else
ba479fd2
NN
11207 echo "$as_me: failed program was:" >&5
11208sed 's/^/| /' conftest.$ac_ext >&5
11209
11210eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11211fi
86da66b5 11212rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11213fi
11214
f31e826b 11215if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11216 echo "$as_me:$LINENO: result: yes" >&5
11217echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11218#define $ac_tr_decl 1
ba479fd2
NN
11219_ACEOF
11220
81bf3d9e 11221else
ba479fd2
NN
11222 echo "$as_me:$LINENO: result: no" >&5
11223echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11224#define $ac_tr_decl 0
ba479fd2
NN
11225_ACEOF
11226
81bf3d9e
RH
11227fi
11228
11229done
ba479fd2 11230
ba479fd2 11231
ba479fd2 11232
81bf3d9e 11233
81bf3d9e
RH
11234
11235for ac_func in getrlimit setrlimit getrusage
11236do
ad6717df 11237 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11238echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11239echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11240if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11241 echo $ECHO_N "(cached) $ECHO_C" >&6
11242else
11243 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11244/* confdefs.h. */
11245_ACEOF
11246cat confdefs.h >>conftest.$ac_ext
11247cat >>conftest.$ac_ext <<_ACEOF
11248/* end confdefs.h. */
7afe8c41
KG
11249#undef $ac_tr_decl
11250#define $ac_tr_decl 1
ba479fd2 11251
d02af173 11252#include "ansidecl.h"
86cf1cbd 11253#include "system.h"
81bf3d9e
RH
11254#ifdef HAVE_SYS_RESOURCE_H
11255#include <sys/resource.h>
11256#endif
11257
f31e826b 11258
ba479fd2
NN
11259int
11260main ()
11261{
86cf1cbd
KG
11262#ifndef $ac_func
11263char *(*pfn) = (char *(*)) $ac_func ;
11264#endif
ba479fd2
NN
11265 ;
11266 return 0;
11267}
11268_ACEOF
11269rm -f conftest.$ac_objext
11270if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11271 (eval $ac_compile) 2>conftest.er1
ba479fd2 11272 ac_status=$?
86da66b5
HPN
11273 grep -v '^ *+' conftest.er1 >conftest.err
11274 rm -f conftest.er1
11275 cat conftest.err >&5
ba479fd2
NN
11276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11277 (exit $ac_status); } &&
a1286ef5
ZW
11278 { ac_try='test -z "$ac_c_werror_flag"
11279 || test ! -s conftest.err'
86da66b5
HPN
11280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11281 (eval $ac_try) 2>&5
11282 ac_status=$?
11283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11284 (exit $ac_status); }; } &&
11285 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11287 (eval $ac_try) 2>&5
11288 ac_status=$?
11289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11290 (exit $ac_status); }; }; then
f31e826b 11291 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11292else
ba479fd2
NN
11293 echo "$as_me: failed program was:" >&5
11294sed 's/^/| /' conftest.$ac_ext >&5
11295
11296eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11297fi
86da66b5 11298rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11299fi
11300
f31e826b 11301if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11302 echo "$as_me:$LINENO: result: yes" >&5
11303echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11304#define $ac_tr_decl 1
ba479fd2
NN
11305_ACEOF
11306
81bf3d9e 11307else
ba479fd2
NN
11308 echo "$as_me:$LINENO: result: no" >&5
11309echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11310#define $ac_tr_decl 0
ba479fd2
NN
11311_ACEOF
11312
81bf3d9e
RH
11313fi
11314
11315done
86cf1cbd 11316
81bf3d9e 11317
ba479fd2 11318cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11319/* confdefs.h. */
11320_ACEOF
11321cat confdefs.h >>conftest.$ac_ext
11322cat >>conftest.$ac_ext <<_ACEOF
11323/* end confdefs.h. */
b2522d2b
HPN
11324
11325#include "ansidecl.h"
11326#include "system.h"
11327#ifdef HAVE_SYS_RESOURCE_H
11328#include <sys/resource.h>
11329#endif
11330
ba479fd2
NN
11331int
11332main ()
11333{
b2522d2b 11334rlim_t l = 0;
ba479fd2
NN
11335 ;
11336 return 0;
11337}
11338_ACEOF
11339rm -f conftest.$ac_objext
11340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11341 (eval $ac_compile) 2>conftest.er1
ba479fd2 11342 ac_status=$?
86da66b5
HPN
11343 grep -v '^ *+' conftest.er1 >conftest.err
11344 rm -f conftest.er1
11345 cat conftest.err >&5
ba479fd2
NN
11346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11347 (exit $ac_status); } &&
a1286ef5
ZW
11348 { ac_try='test -z "$ac_c_werror_flag"
11349 || test ! -s conftest.err'
86da66b5
HPN
11350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11351 (eval $ac_try) 2>&5
11352 ac_status=$?
11353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11354 (exit $ac_status); }; } &&
11355 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11357 (eval $ac_try) 2>&5
11358 ac_status=$?
11359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11360 (exit $ac_status); }; }; then
b2522d2b
HPN
11361 :
11362else
ba479fd2
NN
11363 echo "$as_me: failed program was:" >&5
11364sed 's/^/| /' conftest.$ac_ext >&5
11365
11366
11367cat >>confdefs.h <<\_ACEOF
b2522d2b 11368#define rlim_t long
ba479fd2 11369_ACEOF
b2522d2b
HPN
11370
11371fi
86da66b5 11372rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 11373
2102b2fe
RS
11374# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11375# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11376# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11377# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 11378
351df804 11379for ac_func in ldgetname
c1800ec8 11380do
ad6717df 11381 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11382echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11383echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11384if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11385 echo $ECHO_N "(cached) $ECHO_C" >&6
11386else
11387 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11388/* confdefs.h. */
11389_ACEOF
11390cat confdefs.h >>conftest.$ac_ext
11391cat >>conftest.$ac_ext <<_ACEOF
11392/* end confdefs.h. */
c1800ec8
ZW
11393#undef $ac_tr_decl
11394#define $ac_tr_decl 1
ba479fd2 11395
351df804
KG
11396#include "ansidecl.h"
11397#include "system.h"
11398#ifdef HAVE_LDFCN_H
2102b2fe
RS
11399#undef FREAD
11400#undef FWRITE
351df804
KG
11401#include <ldfcn.h>
11402#endif
11403
11404
ba479fd2
NN
11405int
11406main ()
11407{
351df804
KG
11408#ifndef $ac_func
11409char *(*pfn) = (char *(*)) $ac_func ;
11410#endif
ba479fd2
NN
11411 ;
11412 return 0;
11413}
11414_ACEOF
11415rm -f conftest.$ac_objext
11416if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11417 (eval $ac_compile) 2>conftest.er1
ba479fd2 11418 ac_status=$?
86da66b5
HPN
11419 grep -v '^ *+' conftest.er1 >conftest.err
11420 rm -f conftest.er1
11421 cat conftest.err >&5
ba479fd2
NN
11422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11423 (exit $ac_status); } &&
a1286ef5
ZW
11424 { ac_try='test -z "$ac_c_werror_flag"
11425 || test ! -s conftest.err'
86da66b5
HPN
11426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11427 (eval $ac_try) 2>&5
11428 ac_status=$?
11429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11430 (exit $ac_status); }; } &&
11431 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11433 (eval $ac_try) 2>&5
11434 ac_status=$?
11435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11436 (exit $ac_status); }; }; then
351df804
KG
11437 eval "gcc_cv_have_decl_$ac_func=yes"
11438else
ba479fd2
NN
11439 echo "$as_me: failed program was:" >&5
11440sed 's/^/| /' conftest.$ac_ext >&5
11441
11442eval "gcc_cv_have_decl_$ac_func=no"
351df804 11443fi
86da66b5 11444rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
11445fi
11446
11447if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11448 echo "$as_me:$LINENO: result: yes" >&5
11449echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11450#define $ac_tr_decl 1
ba479fd2
NN
11451_ACEOF
11452
351df804 11453else
ba479fd2
NN
11454 echo "$as_me:$LINENO: result: no" >&5
11455echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11456#define $ac_tr_decl 0
ba479fd2
NN
11457_ACEOF
11458
351df804
KG
11459fi
11460
11461done
ba479fd2 11462
351df804
KG
11463
11464
11465for ac_func in times
11466do
ad6717df 11467 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11468echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11469echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11470if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11471 echo $ECHO_N "(cached) $ECHO_C" >&6
11472else
11473 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11474/* confdefs.h. */
11475_ACEOF
11476cat confdefs.h >>conftest.$ac_ext
11477cat >>conftest.$ac_ext <<_ACEOF
11478/* end confdefs.h. */
351df804
KG
11479#undef $ac_tr_decl
11480#define $ac_tr_decl 1
ba479fd2 11481
c1800ec8
ZW
11482#include "ansidecl.h"
11483#include "system.h"
11484#ifdef HAVE_SYS_TIMES_H
11485#include <sys/times.h>
11486#endif
11487
11488
ba479fd2
NN
11489int
11490main ()
11491{
c1800ec8
ZW
11492#ifndef $ac_func
11493char *(*pfn) = (char *(*)) $ac_func ;
11494#endif
ba479fd2
NN
11495 ;
11496 return 0;
11497}
11498_ACEOF
11499rm -f conftest.$ac_objext
11500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11501 (eval $ac_compile) 2>conftest.er1
ba479fd2 11502 ac_status=$?
86da66b5
HPN
11503 grep -v '^ *+' conftest.er1 >conftest.err
11504 rm -f conftest.er1
11505 cat conftest.err >&5
ba479fd2
NN
11506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11507 (exit $ac_status); } &&
a1286ef5
ZW
11508 { ac_try='test -z "$ac_c_werror_flag"
11509 || test ! -s conftest.err'
86da66b5
HPN
11510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11511 (eval $ac_try) 2>&5
11512 ac_status=$?
11513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11514 (exit $ac_status); }; } &&
11515 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11517 (eval $ac_try) 2>&5
11518 ac_status=$?
11519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11520 (exit $ac_status); }; }; then
c1800ec8
ZW
11521 eval "gcc_cv_have_decl_$ac_func=yes"
11522else
ba479fd2
NN
11523 echo "$as_me: failed program was:" >&5
11524sed 's/^/| /' conftest.$ac_ext >&5
11525
11526eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 11527fi
86da66b5 11528rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
11529fi
11530
11531if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11532 echo "$as_me:$LINENO: result: yes" >&5
11533echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11534#define $ac_tr_decl 1
ba479fd2
NN
11535_ACEOF
11536
c1800ec8 11537else
ba479fd2
NN
11538 echo "$as_me:$LINENO: result: no" >&5
11539echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11540#define $ac_tr_decl 0
ba479fd2
NN
11541_ACEOF
11542
c1800ec8
ZW
11543fi
11544
11545done
c1800ec8
ZW
11546
11547
11548# More time-related stuff.
ba479fd2
NN
11549echo "$as_me:$LINENO: checking for struct tms" >&5
11550echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
11551if test "${ac_cv_struct_tms+set}" = set; then
11552 echo $ECHO_N "(cached) $ECHO_C" >&6
11553else
11554
11555cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11556/* confdefs.h. */
11557_ACEOF
11558cat confdefs.h >>conftest.$ac_ext
11559cat >>conftest.$ac_ext <<_ACEOF
11560/* end confdefs.h. */
c1800ec8
ZW
11561
11562#include "ansidecl.h"
11563#include "system.h"
11564#ifdef HAVE_SYS_TIMES_H
11565#include <sys/times.h>
11566#endif
11567
ba479fd2
NN
11568int
11569main ()
11570{
c1800ec8 11571struct tms tms;
ba479fd2
NN
11572 ;
11573 return 0;
11574}
11575_ACEOF
11576rm -f conftest.$ac_objext
11577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11578 (eval $ac_compile) 2>conftest.er1
ba479fd2 11579 ac_status=$?
86da66b5
HPN
11580 grep -v '^ *+' conftest.er1 >conftest.err
11581 rm -f conftest.er1
11582 cat conftest.err >&5
ba479fd2
NN
11583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11584 (exit $ac_status); } &&
a1286ef5
ZW
11585 { ac_try='test -z "$ac_c_werror_flag"
11586 || test ! -s conftest.err'
86da66b5
HPN
11587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11588 (eval $ac_try) 2>&5
11589 ac_status=$?
11590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11591 (exit $ac_status); }; } &&
11592 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11594 (eval $ac_try) 2>&5
11595 ac_status=$?
11596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11597 (exit $ac_status); }; }; then
c1800ec8
ZW
11598 ac_cv_struct_tms=yes
11599else
ba479fd2
NN
11600 echo "$as_me: failed program was:" >&5
11601sed 's/^/| /' conftest.$ac_ext >&5
11602
11603ac_cv_struct_tms=no
c1800ec8 11604fi
86da66b5 11605rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11606fi
ba479fd2
NN
11607echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11608echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 11609if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
11610
11611cat >>confdefs.h <<\_ACEOF
c1800ec8 11612#define HAVE_STRUCT_TMS 1
ba479fd2 11613_ACEOF
c1800ec8
ZW
11614
11615fi
11616
11617# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11618# revisit after autoconf 2.50.
ba479fd2
NN
11619echo "$as_me:$LINENO: checking for clock_t" >&5
11620echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
11621if test "${gcc_cv_type_clock_t+set}" = set; then
11622 echo $ECHO_N "(cached) $ECHO_C" >&6
11623else
11624
11625cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11626/* confdefs.h. */
11627_ACEOF
11628cat confdefs.h >>conftest.$ac_ext
11629cat >>conftest.$ac_ext <<_ACEOF
11630/* end confdefs.h. */
c1800ec8
ZW
11631
11632#include "ansidecl.h"
11633#include "system.h"
11634
ba479fd2
NN
11635int
11636main ()
11637{
c1800ec8 11638clock_t x;
ba479fd2
NN
11639 ;
11640 return 0;
11641}
11642_ACEOF
11643rm -f conftest.$ac_objext
11644if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11645 (eval $ac_compile) 2>conftest.er1
ba479fd2 11646 ac_status=$?
86da66b5
HPN
11647 grep -v '^ *+' conftest.er1 >conftest.err
11648 rm -f conftest.er1
11649 cat conftest.err >&5
ba479fd2
NN
11650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11651 (exit $ac_status); } &&
a1286ef5
ZW
11652 { ac_try='test -z "$ac_c_werror_flag"
11653 || test ! -s conftest.err'
86da66b5
HPN
11654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11655 (eval $ac_try) 2>&5
11656 ac_status=$?
11657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11658 (exit $ac_status); }; } &&
11659 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11661 (eval $ac_try) 2>&5
11662 ac_status=$?
11663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11664 (exit $ac_status); }; }; then
c1800ec8
ZW
11665 gcc_cv_type_clock_t=yes
11666else
ba479fd2
NN
11667 echo "$as_me: failed program was:" >&5
11668sed 's/^/| /' conftest.$ac_ext >&5
11669
11670gcc_cv_type_clock_t=no
c1800ec8 11671fi
86da66b5 11672rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11673fi
ba479fd2
NN
11674echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
11675echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 11676if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
11677
11678cat >>confdefs.h <<\_ACEOF
c1800ec8 11679#define HAVE_CLOCK_T 1
ba479fd2 11680_ACEOF
c1800ec8
ZW
11681
11682fi
11683
eb70d86d
AS
11684# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
11685CFLAGS="$saved_CFLAGS"
11686
07cf4226
DM
11687# Check whether --enable-initfini-array or --disable-initfini-array was given.
11688if test "${enable_initfini_array+set}" = set; then
11689 enableval="$enable_initfini_array"
ba479fd2 11690
07cf4226 11691else
ba479fd2
NN
11692
11693echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
11694echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
11695if test "${gcc_cv_initfini_array+set}" = set; then
11696 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 11697else
eb70d86d 11698 if test "$cross_compiling" = yes; then
918c4fe4 11699 gcc_cv_initfini_array=no
eb70d86d 11700else
ba479fd2 11701 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11702/* confdefs.h. */
11703_ACEOF
11704cat confdefs.h >>conftest.$ac_ext
11705cat >>conftest.$ac_ext <<_ACEOF
11706/* end confdefs.h. */
eb70d86d 11707
07cf4226
DM
11708static int x = -1;
11709int main (void) { return x; }
11710int foo (void) { x = 0; }
11711int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
11712_ACEOF
11713rm -f conftest$ac_exeext
11714if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11715 (eval $ac_link) 2>&5
11716 ac_status=$?
11717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11718 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11720 (eval $ac_try) 2>&5
11721 ac_status=$?
11722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11723 (exit $ac_status); }; }; then
918c4fe4 11724 gcc_cv_initfini_array=yes
eb70d86d 11725else
ba479fd2
NN
11726 echo "$as_me: program exited with status $ac_status" >&5
11727echo "$as_me: failed program was:" >&5
11728sed 's/^/| /' conftest.$ac_ext >&5
11729
11730( exit $ac_status )
11731gcc_cv_initfini_array=no
eb70d86d 11732fi
86da66b5 11733rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 11734fi
07cf4226 11735fi
ba479fd2
NN
11736echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
11737echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 11738 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 11739
ba479fd2 11740fi;
63cf211a 11741if test $enable_initfini_array = yes; then
ba479fd2
NN
11742
11743cat >>confdefs.h <<\_ACEOF
eb70d86d 11744#define HAVE_INITFINI_ARRAY 1
ba479fd2 11745_ACEOF
07cf4226 11746
eb70d86d 11747fi
81bf3d9e 11748
ba479fd2
NN
11749# mkdir takes a single argument on some systems.
11750echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
11751echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
11752if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
11753 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 11754else
ba479fd2 11755 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11756/* confdefs.h. */
11757_ACEOF
11758cat confdefs.h >>conftest.$ac_ext
11759cat >>conftest.$ac_ext <<_ACEOF
11760/* end confdefs.h. */
75923b2f
MK
11761
11762#include <sys/types.h>
11763#ifdef HAVE_SYS_STAT_H
11764# include <sys/stat.h>
11765#endif
11766#ifdef HAVE_UNISTD_H
11767# include <unistd.h>
11768#endif
11769#ifdef HAVE_DIRECT_H
11770# include <direct.h>
11771#endif
ba479fd2
NN
11772int
11773main ()
11774{
75923b2f 11775mkdir ("foo", 0);
ba479fd2
NN
11776 ;
11777 return 0;
11778}
11779_ACEOF
11780rm -f conftest.$ac_objext
11781if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11782 (eval $ac_compile) 2>conftest.er1
ba479fd2 11783 ac_status=$?
86da66b5
HPN
11784 grep -v '^ *+' conftest.er1 >conftest.err
11785 rm -f conftest.er1
11786 cat conftest.err >&5
ba479fd2
NN
11787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11788 (exit $ac_status); } &&
a1286ef5
ZW
11789 { ac_try='test -z "$ac_c_werror_flag"
11790 || test ! -s conftest.err'
86da66b5
HPN
11791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11792 (eval $ac_try) 2>&5
11793 ac_status=$?
11794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11795 (exit $ac_status); }; } &&
11796 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11798 (eval $ac_try) 2>&5
11799 ac_status=$?
11800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11801 (exit $ac_status); }; }; then
75923b2f
MK
11802 gcc_cv_mkdir_takes_one_arg=no
11803else
ba479fd2
NN
11804 echo "$as_me: failed program was:" >&5
11805sed 's/^/| /' conftest.$ac_ext >&5
11806
11807gcc_cv_mkdir_takes_one_arg=yes
75923b2f 11808fi
86da66b5 11809rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 11810fi
ba479fd2
NN
11811echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
11812echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 11813if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
11814
11815cat >>confdefs.h <<\_ACEOF
75923b2f 11816#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 11817_ACEOF
75923b2f
MK
11818
11819fi
11820
11821
861bb6c1
JL
11822# File extensions
11823manext='.1'
11824objext='.o'
11825
11826
11827
4977bab6
ZW
11828# With Setjmp/Longjmp based exception handling.
11829# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
11830if test "${enable_sjlj_exceptions+set}" = set; then
11831 enableval="$enable_sjlj_exceptions"
11832 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 11833
ba479fd2
NN
11834cat >>confdefs.h <<_ACEOF
11835#define CONFIG_SJLJ_EXCEPTIONS $sjlj
11836_ACEOF
4977bab6 11837
ba479fd2 11838fi;
4977bab6 11839
443728bb
L
11840# For platforms with the unwind ABI which includes an unwind library,
11841# libunwind, we can choose to use the system libunwind.
4977bab6 11842
443728bb
L
11843# Check whether --with-system-libunwind or --without-system-libunwind was given.
11844if test "${with_system_libunwind+set}" = set; then
11845 withval="$with_system_libunwind"
4977bab6 11846
ba479fd2 11847fi;
4977bab6 11848
34a86c2b
NN
11849# --------------------------------------------------------
11850# Build, host, and target specific configuration fragments
11851# --------------------------------------------------------
11852
5b28c537
NN
11853# Collect build-machine-specific information.
11854. ${srcdir}/config.build
11855
a89ea0df
NN
11856# Collect host-machine-specific information.
11857. ${srcdir}/config.host
11858
ef69da62 11859target_gtfiles=
a89ea0df
NN
11860
11861# Collect target-machine-specific information.
8ad9fb33 11862. ${srcdir}/config.gcc
861bb6c1
JL
11863
11864extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 11865extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
11866
11867# Default the target-machine variables that were not explicitly set.
75bffa71 11868if test x"$tm_file" = x
861bb6c1
JL
11869then tm_file=$cpu_type/$cpu_type.h; fi
11870
6b2adea9 11871if test x"$extra_headers" = x
861bb6c1
JL
11872then extra_headers=; fi
11873
75bffa71 11874if test x$md_file = x
e98e406f 11875then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 11876
75bffa71 11877if test x$out_file = x
861bb6c1
JL
11878then out_file=$cpu_type/$cpu_type.c; fi
11879
75bffa71 11880if test x"$tmake_file" = x
861bb6c1
JL
11881then tmake_file=$cpu_type/t-$cpu_type
11882fi
11883
90e6a802 11884if test x"$dwarf2" = xyes
756ee602 11885then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
11886fi
11887
861bb6c1 11888# Say what files are being used for the output code and MD file.
11642c3a 11889echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
11890echo "Using \`$srcdir/config/$md_file' as machine description file."
11891
11642c3a 11892# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
11893# about them and drop them.
11894
11642c3a
ZW
11895bx=
11896for x in $build_xm_file; do
11897 if test -f $srcdir/config/$x
11898 then bx="$bx $x"
ba479fd2
NN
11899 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11900echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11901 fi
11902done
11903build_xm_file="$bx"
11904
11905hx=
11906for x in $host_xm_file; do
11907 if test -f $srcdir/config/$x
11908 then hx="$hx $x"
ba479fd2
NN
11909 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11910echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11911 fi
11912done
11913host_xm_file="$hx"
11914
11915tx=
11916for x in $xm_file; do
11917 if test -f $srcdir/config/$x
11918 then tx="$tx $x"
ba479fd2
NN
11919 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11920echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11921 fi
11922done
11923xm_file="$tx"
11924
861bb6c1
JL
11925count=a
11926for f in $tm_file; do
11927 count=${count}x
11928done
75bffa71 11929if test $count = ax; then
861bb6c1
JL
11930 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
11931else
11932 echo "Using the following target machine macro files:"
11933 for f in $tm_file; do
11934 echo " $srcdir/config/$f"
11935 done
11936fi
11937
4977bab6 11938if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
11939
11940cat >>confdefs.h <<\_ACEOF
4977bab6 11941#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 11942_ACEOF
4977bab6
ZW
11943
11944fi
11945
99fa8911
AP
11946if test x$use_long_long_for_widest_fast_int = xyes; then
11947
11948cat >>confdefs.h <<\_ACEOF
11949#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
11950_ACEOF
11951
11952fi
11953
861bb6c1
JL
11954count=a
11955for f in $host_xm_file; do
11956 count=${count}x
11957done
11642c3a
ZW
11958if test $count = a; then
11959 :
11960elif test $count = ax; then
861bb6c1
JL
11961 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
11962else
11963 echo "Using the following host machine macro files:"
11964 for f in $host_xm_file; do
11965 echo " $srcdir/config/$f"
11966 done
11967fi
476d9098 11968echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 11969
75bffa71 11970if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
11971 count=a
11972 for f in $build_xm_file; do
11973 count=${count}x
11974 done
11642c3a
ZW
11975 if test $count = a; then
11976 :
11977 elif test $count = ax; then
861bb6c1
JL
11978 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
11979 else
11980 echo "Using the following build machine macro files:"
11981 for f in $build_xm_file; do
11982 echo " $srcdir/config/$f"
11983 done
11984 fi
11985fi
11986
8bb915b6
NN
11987# ---------
11988# Threading
11989# ---------
11990
c2e494a8 11991# Check if a valid thread package
615be2cf 11992case ${enable_threads} in
c2e494a8
NN
11993 "" | no)
11994 # No threads
11995 target_thread_file='single'
11996 ;;
11997 yes)
11998 # default
11999 target_thread_file='single'
12000 ;;
18167442 12001 aix | dce | gnat | irix | posix | posix95 | rtems | \
769e49eb 12002 single | solaris | vxworks | win32 )
615be2cf 12003 target_thread_file=${enable_threads}
c2e494a8
NN
12004 ;;
12005 *)
615be2cf 12006 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
12007 exit 1
12008 ;;
12009esac
12010
12011if test x${thread_file} = x; then
12012 # No thread file set by target-specific clauses in config.gcc,
12013 # so use file chosen by default logic above
12014 thread_file=${target_thread_file}
861bb6c1
JL
12015fi
12016
8bb915b6
NN
12017# Make gthr-default.h if we have a thread file.
12018gthread_flags=
12019if test $thread_file != single; then
12020 rm -f gthr-default.h
12021 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12022 gthread_flags=-DHAVE_GTHR_DEFAULT
12023fi
12024
12025
12026# --------
12027# UNSORTED
12028# --------
12029
18fbf599 12030use_cxa_atexit=no
2121a768
JT
12031if test x$enable___cxa_atexit = xyes || \
12032 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599
PB
12033 if test x$host = x$target; then
12034 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
354b7da5
DH
12035echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
12036if test "${ac_cv_func___cxa_atexit+set}" = set; then
12037 echo $ECHO_N "(cached) $ECHO_C" >&6
12038else
12039 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
12040/* confdefs.h. */
12041_ACEOF
12042cat confdefs.h >>conftest.$ac_ext
12043cat >>conftest.$ac_ext <<_ACEOF
12044/* end confdefs.h. */
86da66b5
HPN
12045/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12046 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12047#define __cxa_atexit innocuous___cxa_atexit
12048
354b7da5
DH
12049/* System header to define __stub macros and hopefully few prototypes,
12050 which can conflict with char __cxa_atexit (); below.
12051 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12052 <limits.h> exists even on freestanding compilers. */
86da66b5 12053
354b7da5
DH
12054#ifdef __STDC__
12055# include <limits.h>
12056#else
12057# include <assert.h>
12058#endif
86da66b5
HPN
12059
12060#undef __cxa_atexit
12061
354b7da5
DH
12062/* Override any gcc2 internal prototype to avoid an error. */
12063#ifdef __cplusplus
12064extern "C"
12065{
12066#endif
12067/* We use char because int might match the return type of a gcc2
12068 builtin and then its argument prototype would still apply. */
12069char __cxa_atexit ();
12070/* The GNU C library defines this for functions which it implements
12071 to always fail with ENOSYS. Some functions are actually named
12072 something starting with __ and the normal name is an alias. */
12073#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
12074choke me
12075#else
12076char (*f) () = __cxa_atexit;
12077#endif
12078#ifdef __cplusplus
12079}
12080#endif
12081
12082int
12083main ()
12084{
12085return f != __cxa_atexit;
12086 ;
12087 return 0;
12088}
12089_ACEOF
12090rm -f conftest.$ac_objext conftest$ac_exeext
12091if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12092 (eval $ac_link) 2>conftest.er1
354b7da5 12093 ac_status=$?
86da66b5
HPN
12094 grep -v '^ *+' conftest.er1 >conftest.err
12095 rm -f conftest.er1
12096 cat conftest.err >&5
354b7da5
DH
12097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12098 (exit $ac_status); } &&
a1286ef5
ZW
12099 { ac_try='test -z "$ac_c_werror_flag"
12100 || test ! -s conftest.err'
86da66b5
HPN
12101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12102 (eval $ac_try) 2>&5
12103 ac_status=$?
12104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12105 (exit $ac_status); }; } &&
12106 { ac_try='test -s conftest$ac_exeext'
354b7da5
DH
12107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12108 (eval $ac_try) 2>&5
12109 ac_status=$?
12110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12111 (exit $ac_status); }; }; then
12112 ac_cv_func___cxa_atexit=yes
12113else
12114 echo "$as_me: failed program was:" >&5
12115sed 's/^/| /' conftest.$ac_ext >&5
12116
12117ac_cv_func___cxa_atexit=no
12118fi
86da66b5
HPN
12119rm -f conftest.err conftest.$ac_objext \
12120 conftest$ac_exeext conftest.$ac_ext
354b7da5
DH
12121fi
12122echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12123echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
12124if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
12125 use_cxa_atexit=yes
12126else
12127 echo "__cxa_atexit can't be enabled on this target"
12128fi
12129
12130 else
12131 # We can't check for __cxa_atexit when building a cross, so assume
12132 # it is available
12133 use_cxa_atexit=yes
12134 fi
12135 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
12136
12137cat >>confdefs.h <<\_ACEOF
2121a768 12138#define DEFAULT_USE_CXA_ATEXIT 1
ba479fd2 12139_ACEOF
2121a768 12140
18fbf599 12141 fi
2121a768
JT
12142fi
12143
a5381466 12144# Look for a file containing extra machine modes.
1c0ca89d
ZW
12145if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12146 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
12147
12148
12149cat >>confdefs.h <<_ACEOF
e22340b0 12150#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 12151_ACEOF
a5381466
ZW
12152
12153fi
12154
75685792
RS
12155# Convert extra_options into a form suitable for Makefile use.
12156extra_opt_files=
12157for f in $extra_options; do
12158 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12159done
12160
12161
b7cb92ad 12162# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 12163# the first file included by config.h.
4977bab6 12164# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 12165# as well. If host!=build, we are in error and need to do more
db81d74a 12166# work to find out the build config parameters.
75bffa71 12167if test x$host = x$build
db81d74a 12168then
eaf4e618 12169 build_auto=auto-host.h
b7cb92ad
JL
12170else
12171 # We create a subdir, then run autoconf in the subdir.
12172 # To prevent recursion we set host and build for the new
12173 # invocation of configure to the build for this invocation
ba479fd2 12174 # of configure.
b7cb92ad
JL
12175 tempdir=build.$$
12176 rm -rf $tempdir
12177 mkdir $tempdir
12178 cd $tempdir
12179 case ${srcdir} in
255b8a49 12180 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
12181 *) realsrcdir=../${srcdir};;
12182 esac
d920e825
L
12183 saved_CFLAGS="${CFLAGS}"
12184 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12185 ${realsrcdir}/configure \
33e70558 12186 --enable-languages=${enable_languages-all} \
534d0cc0 12187 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 12188 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
12189
12190 # We just finished tests for the build machine, so rename
12191 # the file auto-build.h in the gcc directory.
12192 mv auto-host.h ../auto-build.h
12193 cd ..
12194 rm -rf $tempdir
eaf4e618 12195 build_auto=auto-build.h
db81d74a
RH
12196fi
12197
06f0b04c 12198
eaf4e618 12199tm_file="${tm_file} defaults.h"
4977bab6
ZW
12200tm_p_file="${tm_p_file} tm-preds.h"
12201host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12202build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 12203# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477
KG
12204# put this back in temporarily.
12205xm_file="ansidecl.h ${xm_file}"
0056a9b5 12206
34a86c2b
NN
12207# --------
12208# UNSORTED
12209# --------
12210
cc1e60ea 12211# Compile in configure arguments.
8105825d 12212if test -f configargs.h ; then
cc1e60ea 12213 # Being re-configured.
022dae81 12214 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
12215 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12216else
12217 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12218fi
eeae7b41
DJ
12219
12220# Double all backslashes and backslash all quotes to turn
12221# gcc_config_arguments into a C string.
12222sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12223$gcc_config_arguments
12224EOF
12225gcc_config_arguments_str=`cat conftest.out`
12226rm -f conftest.out
12227
cc1e60ea
JM
12228cat > configargs.h <<EOF
12229/* Generated automatically. */
eeae7b41 12230static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 12231static const char thread_model[] = "$thread_file";
7816bea0
DJ
12232
12233static const struct {
12234 const char *name, *value;
12235} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
12236EOF
12237
ab87f8c8 12238# Internationalization
56694dd9
ZW
12239# If we haven't got the data from the intl directory,
12240# assume NLS is disabled.
ba479fd2
NN
12241USE_NLS=no
12242LIBINTL=
12243LIBINTL_DEP=
12244INCINTL=
12245XGETTEXT=
12246GMSGFMT=
12247POSUB=
56694dd9
ZW
12248if test -f ../intl/config.intl; then
12249 . ../intl/config.intl
093e61a6 12250fi
ba479fd2
NN
12251echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12252echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
56694dd9 12253if test x"$USE_NLS" != xyes; then
ba479fd2
NN
12254 echo "$as_me:$LINENO: result: no" >&5
12255echo "${ECHO_T}no" >&6
56694dd9 12256else
ba479fd2
NN
12257 echo "$as_me:$LINENO: result: yes" >&5
12258echo "${ECHO_T}yes" >&6
12259
12260cat >>confdefs.h <<\_ACEOF
56694dd9 12261#define ENABLE_NLS 1
ba479fd2 12262_ACEOF
56694dd9 12263
093e61a6 12264
ba479fd2
NN
12265 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12266echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
56694dd9 12267 # Look for .po and .gmo files in the source directory.
ba479fd2 12268 CATALOGS=
56694dd9
ZW
12269 XLINGUAS=
12270 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12271 # If there aren't any .gmo files the shell will give us the
12272 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12273 # weeded out.
12274 case "$cat" in *\**)
12275 continue;;
12276 esac
12277 # The quadruple backslash is collapsed to a double backslash
12278 # by the backticks, then collapsed again by the double quotes,
12279 # leaving us with one backslash in the sed expression (right
12280 # before the dot that mustn't act as a wildcard).
12281 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
12282 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
12283 # The user is allowed to set LINGUAS to a list of languages to
12284 # install catalogs for. If it's empty that means "all of them."
12285 if test "x$LINGUAS" = x; then
12286 CATALOGS="$CATALOGS $cat"
12287 XLINGUAS="$XLINGUAS $lang"
12288 else
12289 case "$LINGUAS" in *$lang*)
12290 CATALOGS="$CATALOGS $cat"
12291 XLINGUAS="$XLINGUAS $lang"
12292 ;;
12293 esac
12294 fi
12295 done
12296 LINGUAS="$XLINGUAS"
ba479fd2
NN
12297 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12298echo "${ECHO_T}$LINGUAS" >&6
56694dd9 12299fi
861bb6c1 12300
56694dd9
ZW
12301# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12302# -liconv on the link line twice.
12303case "$LIBINTL" in *$LIBICONV*)
12304 LIBICONV= ;;
12305esac
dc6746e7 12306
56694dd9
ZW
12307# Windows32 Registry support for specifying GCC installation paths.
12308# Check whether --enable-win32-registry or --disable-win32-registry was given.
12309if test "${enable_win32_registry+set}" = set; then
12310 enableval="$enable_win32_registry"
dc6746e7 12311
ba479fd2 12312fi;
ba479fd2 12313
a1286ef5
ZW
12314case $host_os in
12315 win32 | pe | cygwin* | mingw32* | uwin*)
12316 if test "x$enable_win32_registry" != xno; then
12317 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
ba479fd2
NN
12318echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
12319if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12320 echo $ECHO_N "(cached) $ECHO_C" >&6
12321else
12322 ac_func_search_save_LIBS=$LIBS
12323ac_cv_search_RegOpenKeyExA=no
12324cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12325/* confdefs.h. */
12326_ACEOF
12327cat confdefs.h >>conftest.$ac_ext
12328cat >>conftest.$ac_ext <<_ACEOF
12329/* end confdefs.h. */
861bb6c1 12330
ab87f8c8 12331/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12332#ifdef __cplusplus
12333extern "C"
12334#endif
ab87f8c8 12335/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12336 builtin and then its argument prototype would still apply. */
12337char RegOpenKeyExA ();
12338int
12339main ()
12340{
12341RegOpenKeyExA ();
12342 ;
12343 return 0;
12344}
12345_ACEOF
12346rm -f conftest.$ac_objext conftest$ac_exeext
12347if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12348 (eval $ac_link) 2>conftest.er1
ba479fd2 12349 ac_status=$?
86da66b5
HPN
12350 grep -v '^ *+' conftest.er1 >conftest.err
12351 rm -f conftest.er1
12352 cat conftest.err >&5
ba479fd2
NN
12353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12354 (exit $ac_status); } &&
a1286ef5
ZW
12355 { ac_try='test -z "$ac_c_werror_flag"
12356 || test ! -s conftest.err'
86da66b5
HPN
12357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12358 (eval $ac_try) 2>&5
12359 ac_status=$?
12360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12361 (exit $ac_status); }; } &&
12362 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12364 (eval $ac_try) 2>&5
12365 ac_status=$?
12366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12367 (exit $ac_status); }; }; then
56694dd9 12368 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 12369else
ba479fd2
NN
12370 echo "$as_me: failed program was:" >&5
12371sed 's/^/| /' conftest.$ac_ext >&5
12372
861bb6c1 12373fi
86da66b5
HPN
12374rm -f conftest.err conftest.$ac_objext \
12375 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
12376if test "$ac_cv_search_RegOpenKeyExA" = no; then
12377 for ac_lib in advapi32; do
12378 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12379 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12380/* confdefs.h. */
12381_ACEOF
12382cat confdefs.h >>conftest.$ac_ext
12383cat >>conftest.$ac_ext <<_ACEOF
12384/* end confdefs.h. */
12385
56694dd9 12386/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12387#ifdef __cplusplus
12388extern "C"
12389#endif
56694dd9 12390/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12391 builtin and then its argument prototype would still apply. */
12392char RegOpenKeyExA ();
12393int
12394main ()
12395{
12396RegOpenKeyExA ();
12397 ;
12398 return 0;
12399}
12400_ACEOF
12401rm -f conftest.$ac_objext conftest$ac_exeext
12402if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12403 (eval $ac_link) 2>conftest.er1
ba479fd2 12404 ac_status=$?
86da66b5
HPN
12405 grep -v '^ *+' conftest.er1 >conftest.err
12406 rm -f conftest.er1
12407 cat conftest.err >&5
ba479fd2
NN
12408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12409 (exit $ac_status); } &&
a1286ef5
ZW
12410 { ac_try='test -z "$ac_c_werror_flag"
12411 || test ! -s conftest.err'
86da66b5
HPN
12412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12413 (eval $ac_try) 2>&5
12414 ac_status=$?
12415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12416 (exit $ac_status); }; } &&
12417 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12419 (eval $ac_try) 2>&5
12420 ac_status=$?
12421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12422 (exit $ac_status); }; }; then
12423 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 12424break
861bb6c1 12425else
ba479fd2
NN
12426 echo "$as_me: failed program was:" >&5
12427sed 's/^/| /' conftest.$ac_ext >&5
12428
861bb6c1 12429fi
86da66b5
HPN
12430rm -f conftest.err conftest.$ac_objext \
12431 conftest$ac_exeext conftest.$ac_ext
ba479fd2 12432 done
6e3f3080 12433fi
ba479fd2
NN
12434LIBS=$ac_func_search_save_LIBS
12435fi
12436echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
12437echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
12438if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 12439 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 12440
cafe096b 12441else
a1286ef5 12442 enable_win32_registry=no
093e61a6 12443fi
ab87f8c8 12444
a1286ef5
ZW
12445 fi
12446
12447 if test "x$enable_win32_registry" != xno; then
12448
12449cat >>confdefs.h <<\_ACEOF
12450#define ENABLE_WIN32_REGISTRY 1
12451_ACEOF
ab87f8c8 12452
a1286ef5
ZW
12453
12454 if test "x$enable_win32_registry" != xyes \
12455 && test "x$enable_win32_registry" != x; then
ba479fd2
NN
12456
12457cat >>confdefs.h <<_ACEOF
a1286ef5 12458#define WIN32_REGISTRY_KEY "$enable_win32_registry"
ba479fd2 12459_ACEOF
cafe096b 12460
a1286ef5
ZW
12461 fi
12462 fi
12463 ;;
56694dd9 12464esac
ab87f8c8 12465
56694dd9
ZW
12466# Get an absolute path to the GCC top-level source directory
12467holddir=`${PWDCMD-pwd}`
12468cd $srcdir
12469topdir=`${PWDCMD-pwd}`
12470cd $holddir
ab87f8c8 12471
56694dd9 12472# Conditionalize the makefile for this host machine.
2ed26f6b 12473xmake_file=
c406e779 12474for f in ${host_xmake_file}
56694dd9
ZW
12475do
12476 if test -f ${srcdir}/config/$f
12477 then
2ed26f6b 12478 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
12479 fi
12480done
093e61a6 12481
56694dd9 12482# Conditionalize the makefile for this target machine.
2ed26f6b 12483tmake_file_=
c406e779 12484for f in ${tmake_file}
56694dd9
ZW
12485do
12486 if test -f ${srcdir}/config/$f
12487 then
2ed26f6b 12488 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
12489 fi
12490done
2ed26f6b 12491tmake_file="${tmake_file_}"
71a94577 12492
ab87f8c8
JL
12493# If the host doesn't support symlinks, modify CC in
12494# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
12495# Otherwise, we can use "CC=$(CC)".
12496rm -f symtest.tem
35f06ae4
PB
12497case "$LN_S" in
12498 *-s*)
12499 cc_set_by_configure="\$(CC)"
12500 quoted_cc_set_by_configure="\$(CC)"
12501 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12502 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12503 ;;
12504 *)
12505 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
12506 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
12507 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
12508 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
12509 ;;
12510esac
ab87f8c8 12511
5395b47b
NN
12512# This is a terrible hack which will go away some day.
12513host_cc_for_libada=${CC}
1e3fad21
NN
12514
12515
ab87f8c8
JL
12516out_object_file=`basename $out_file .c`.o
12517
75685792
RS
12518tm_file_list="options.h"
12519tm_include_list="options.h"
ab87f8c8 12520for f in $tm_file; do
64ccbc99 12521 case $f in
d02af173 12522 defaults.h )
e22340b0
ZW
12523 tm_file_list="${tm_file_list} \$(srcdir)/$f"
12524 tm_include_list="${tm_include_list} $f"
12525 ;;
12526 * )
12527 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
12528 tm_include_list="${tm_include_list} config/$f"
12529 ;;
64ccbc99 12530 esac
ab87f8c8
JL
12531done
12532
11642c3a 12533tm_p_file_list=
e22340b0 12534tm_p_include_list=
11642c3a 12535for f in $tm_p_file; do
4977bab6
ZW
12536 case $f in
12537 tm-preds.h )
e22340b0
ZW
12538 tm_p_file_list="${tm_p_file_list} $f"
12539 tm_p_include_list="${tm_p_include_list} $f"
12540 ;;
12541 * )
12542 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
12543 tm_p_include_list="${tm_p_include_list} config/$f"
12544 esac
12545done
12546
12547xm_file_list=
12548xm_include_list=
12549for f in $xm_file; do
12550 case $f in
12551 ansidecl.h )
12552 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
12553 xm_include_list="${xm_include_list} $f"
12554 ;;
12555 auto-host.h )
12556 xm_file_list="${xm_file_list} $f"
12557 xm_include_list="${xm_include_list} $f"
12558 ;;
12559 * )
12560 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
12561 xm_include_list="${xm_include_list} config/$f"
12562 ;;
4977bab6 12563 esac
11642c3a
ZW
12564done
12565
ab87f8c8 12566host_xm_file_list=
e22340b0 12567host_xm_include_list=
ab87f8c8 12568for f in $host_xm_file; do
64ccbc99 12569 case $f in
d02af173 12570 ansidecl.h )
e22340b0
ZW
12571 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
12572 host_xm_include_list="${host_xm_include_list} $f"
12573 ;;
e2500fed 12574 auto-host.h )
e22340b0
ZW
12575 host_xm_file_list="${host_xm_file_list} $f"
12576 host_xm_include_list="${host_xm_include_list} $f"
12577 ;;
12578 * )
12579 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
12580 host_xm_include_list="${host_xm_include_list} config/$f"
12581 ;;
64ccbc99 12582 esac
ab87f8c8
JL
12583done
12584
12585build_xm_file_list=
12586for f in $build_xm_file; do
64ccbc99 12587 case $f in
d02af173 12588 ansidecl.h )
e22340b0
ZW
12589 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
12590 build_xm_include_list="${build_xm_include_list} $f"
12591 ;;
e2500fed 12592 auto-build.h | auto-host.h )
e22340b0
ZW
12593 build_xm_file_list="${build_xm_file_list} $f"
12594 build_xm_include_list="${build_xm_include_list} $f"
12595 ;;
12596 * )
12597 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
12598 build_xm_include_list="${build_xm_include_list} config/$f"
12599 ;;
64ccbc99 12600 esac
ab87f8c8
JL
12601done
12602
a078a589
ZW
12603# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
12604# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
12605CROSS=
12606ALL=all.internal
12607SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
12608if test x$host != x$target
12609then
a078a589
ZW
12610 CROSS="-DCROSS_COMPILE"
12611 ALL=all.cross
12612 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
343f59d9 12613 case "$host","$target" in
3a7e8b87
GK
12614 # Darwin crosses can use the host system's libraries and headers,
12615 # because of the fat library support. Of course, it must be the
12616 # same version of Darwin on both sides. Allow the user to
12617 # just say --target=foo-darwin without a version number to mean
12618 # "the version on this system".
12619 *-*-darwin*,*-*-darwin*)
12620 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
12621 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
12622 if test $hostos = $targetos -o $targetos = darwin ; then
12623 CROSS=
12624 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
12625 with_headers=yes
12626 fi
12627 ;;
12628
343f59d9
AM
12629 i?86-*-*,x86_64-*-* \
12630 | powerpc*-*-*,powerpc64*-*-*)
12631 CROSS="$CROSS -DNATIVE_CROSS" ;;
12632 esac
7a615b25
AO
12633elif test "x$TARGET_SYSTEM_ROOT" != x; then
12634 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
12635 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
12636fi
12637
b39d221a
EC
12638# If this is a cross-compiler that does not
12639# have its own set of headers then define
12640# inhibit_libc
12641
dc06db20
R
12642# If this is using newlib, without having the headers available now,
12643# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
12644# This prevents libgcc2 from containing any code which requires libc
12645# support.
b39d221a 12646inhibit_libc=
dc06db20
R
12647if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
12648 test x$with_newlib = xyes ; } &&
e50084fa 12649 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
b39d221a 12650 inhibit_libc=-Dinhibit_libc
b39d221a
EC
12651fi
12652
12653
a078a589
ZW
12654# When building gcc with a cross-compiler, we need to adjust things so
12655# that the generator programs are still built with the native compiler.
12656# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
12657
12658# These are the normal (build=host) settings:
ba479fd2
NN
12659CC_FOR_BUILD='$(CC)'
12660BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 12661STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
12662
12663# Possibly disable fixproto, on a per-target basis.
12664case ${use_fixproto} in
12665 no)
12666 STMP_FIXPROTO=
12667 ;;
12668 yes)
12669 STMP_FIXPROTO=stmp-fixproto
12670 ;;
12671esac
12672
a078a589 12673
83599948
NS
12674# And these apply if build != host, or we are generating coverage data
12675if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 12676then
b11e4747 12677 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 12678
7a615b25 12679 if test "x$TARGET_SYSTEM_ROOT" = x; then
de253ca4
GK
12680 if "x$STMP_FIXPROTO" != x ; then
12681 STMP_FIXPROTO=stmp-install-fixproto
12682 fi
7a615b25 12683 fi
ab87f8c8
JL
12684fi
12685
12686# Expand extra_headers to include complete path.
12687# This substitutes for lots of t-* files.
12688extra_headers_list=
b1ef58c8
NN
12689# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
12690for file in ${extra_headers} ; do
12691 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
12692done
ab87f8c8 12693
c38f02df
ILT
12694# Define collect2 in Makefile.
12695case $host_can_use_collect2 in
12696 no) collect2= ;;
12697 *) collect2='collect2$(exeext)' ;;
12698esac
12699
12700
ab87f8c8 12701# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
12702case $use_collect2 in
12703 no) use_collect2= ;;
12704 "") ;;
ba479fd2 12705 *)
34a86c2b
NN
12706 host_xm_defines="${host_xm_defines} USE_COLLECT2"
12707 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
12708 case $host_can_use_collect2 in
12709 no)
12710 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
12711echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
12712 { (exit 1); exit 1; }; }
12713 ;;
12714 esac
34a86c2b
NN
12715 ;;
12716esac
ab87f8c8 12717
8bb915b6
NN
12718# ---------------------------
12719# Assembler & linker features
12720# ---------------------------
12721
d869a8c4
NN
12722# Identify the assembler which will work hand-in-glove with the newly
12723# built GCC, so that we can examine its features. This is the assembler
12724# which will be driven by the driver program.
12725#
12726# If build != host, and we aren't building gas in-tree, we identify a
12727# build->target assembler and hope that it will have the same features
12728# as the host->target assembler we'll be using.
ba479fd2
NN
12729echo "$as_me:$LINENO: checking what assembler to use" >&5
12730echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
34a86c2b 12731in_tree_gas=no
ab87f8c8 12732gcc_cv_as=
981d4858
JM
12733gcc_cv_gas_major_version=
12734gcc_cv_gas_minor_version=
ab87f8c8
JL
12735gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
12736if test -x "$DEFAULT_ASSEMBLER"; then
12737 gcc_cv_as="$DEFAULT_ASSEMBLER"
57991eba 12738elif test -x as$build_exeext; then
ab87f8c8 12739 # Build using assembler in the current directory.
57991eba 12740 gcc_cv_as=./as$build_exeext
34a86c2b 12741elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
12742 && test -f ../gas/Makefile \
12743 && test x$build = x$host; then
12744 # Single tree build which includes gas. We want to prefer it
12745 # over whatever linker top-level may have detected, since
12746 # we'll use what we're building after installation anyway.
ad9c4d9f
NN
12747 in_tree_gas=yes
12748 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
12749for f in $gcc_cv_as_bfd_srcdir/configure \
12750 $gcc_cv_as_gas_srcdir/configure \
12751 $gcc_cv_as_gas_srcdir/configure.in \
12752 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 12753 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
12754 if test x$gcc_cv_gas_version != x; then
12755 break
12756 fi
12757done
12758gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
12759gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
12760gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
12761case $gcc_cv_gas_patch_version in
12762 "") gcc_cv_gas_patch_version="0" ;;
12763esac
8ada417f
ZW
12764gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
12765 + $gcc_cv_gas_minor_version \) \* 1000 \
12766 + $gcc_cv_gas_patch_version`
ad9c4d9f 12767
57991eba
PB
12768 rm -f as$build_exeext
12769 $LN_S ../gas/as-new$build_exeext as$build_exeext 2>/dev/null
5408ac6c
HPN
12770 in_tree_gas_is_elf=no
12771 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
12772 || (grep 'obj_format = multi' ../gas/Makefile \
12773 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
12774 then
12775 in_tree_gas_is_elf=yes
12776 fi
08d105fa
AO
12777elif test -x "$AS_FOR_TARGET"; then
12778 gcc_cv_as="$AS_FOR_TARGET"
12779elif test -x "$AS" && test x$host = x$target; then
12780 gcc_cv_as="$AS"
981d4858 12781fi
9e423e6d 12782
a1286ef5
ZW
12783gcc_version=`cat $srcdir/BASE-VER`
12784
534d0cc0 12785if test "x$gcc_cv_as" = x; then
779243f7
JL
12786 # Search the same directories that the installed compiler will
12787 # search. Else we may find the wrong assembler and lose. If we
12788 # do not find a suitable assembler binary, then try the user's
12789 # path.
12790 #
12791 # Also note we have to check MD_EXEC_PREFIX before checking the
12792 # user's path. Unfortunately, there is no good way to get at the
12793 # value of MD_EXEC_PREFIX here. So we do a brute force search
12794 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
12795 # to be fixed as part of the make/configure rewrite too.
12796
12797 if test "x$exec_prefix" = xNONE; then
12798 if test "x$prefix" = xNONE; then
12799 test_prefix=/usr/local
12800 else
12801 test_prefix=$prefix
12802 fi
12803 else
12804 test_prefix=$exec_prefix
12805 fi
12806
12807 # If the loop below does not find an assembler, then use whatever
b095fe2c
DJ
12808 # one we can find in the users's path. We are looking for a
12809 # ${build} -> ${target} assembler.
55a2ea2a 12810 if test "x$program_prefix" != xNONE; then
57991eba 12811 gcc_cv_as=${program_prefix}as$build_exeext
b095fe2c
DJ
12812 elif test x$build != x$host && test x$build != x$target; then
12813 gcc_cv_as=${target_noncanonical}-as$build_exeext
55a2ea2a 12814 else
57991eba 12815 gcc_cv_as=`echo as | sed "${program_transform_name}"`$build_exeext
55a2ea2a
AM
12816 fi
12817
21addcd9
PB
12818 if test x$host = x$build; then
12819 test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
12820 $test_prefix/libexec/gcc/$target_noncanonical \
12821 /usr/lib/gcc/$target_noncanonical/$gcc_version \
12822 /usr/lib/gcc/$target_noncanonical \
12823 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
12824 $test_prefix/$target_noncanonical/bin"
12825 else
12826 test_dirs=
12827 fi
55a2ea2a 12828
b095fe2c 12829 if test x$build = x$target; then
55a2ea2a 12830 test_dirs="$test_dirs \
779243f7
JL
12831 /usr/libexec \
12832 /usr/ccs/gcc \
12833 /usr/ccs/bin \
12834 /udk/usr/ccs/bin \
12835 /bsd43/usr/lib/cmplrs/cc \
12836 /usr/cross64/usr/bin \
12837 /usr/lib/cmplrs/cc \
12838 /sysv/usr/lib/cmplrs/cc \
12839 /svr4/usr/lib/cmplrs/cc \
12840 /usr/bin"
55a2ea2a 12841 fi
779243f7
JL
12842
12843 for dir in $test_dirs; do
57991eba
PB
12844 if test -x $dir/as$build_exeext; then
12845 gcc_cv_as=$dir/as$build_exeext
779243f7
JL
12846 break;
12847 fi
12848 done
9e423e6d 12849fi
34a86c2b
NN
12850case $in_tree_gas in
12851 yes)
ba479fd2
NN
12852 echo "$as_me:$LINENO: result: \"newly built gas\"" >&5
12853echo "${ECHO_T}\"newly built gas\"" >&6
34a86c2b
NN
12854 ;;
12855 no)
ba479fd2
NN
12856 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
12857echo "${ECHO_T}$gcc_cv_as" >&6
34a86c2b
NN
12858 ;;
12859esac
981d4858 12860
d869a8c4
NN
12861# Identify the linker which will work hand-in-glove with the newly
12862# built GCC, so that we can examine its features. This is the linker
12863# which will be driven by the driver program.
12864#
12865# If build != host, and we aren't building gas in-tree, we identify a
12866# build->target linker and hope that it will have the same features
12867# as the host->target linker we'll be using.
ba479fd2
NN
12868echo "$as_me:$LINENO: checking what linker to use" >&5
12869echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
34a86c2b 12870in_tree_ld=no
275b60d6
JJ
12871gcc_cv_ld=
12872gcc_cv_gld_major_version=
12873gcc_cv_gld_minor_version=
12874gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
12875gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
12876if test -x "$DEFAULT_LINKER"; then
12877 gcc_cv_ld="$DEFAULT_LINKER"
57991eba 12878elif test -x collect-ld$build_exeext; then
275b60d6 12879 # Build using linker in the current directory.
57991eba 12880 gcc_cv_ld=./collect-ld$build_exeext
34a86c2b 12881elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
08d105fa
AO
12882 && test -f ../ld/Makefile \
12883 && test x$build = x$host; then
12884 # Single tree build which includes ld. We want to prefer it
12885 # over whatever linker top-level may have detected, since
12886 # we'll use what we're building after installation anyway.
34a86c2b 12887 in_tree_ld=yes
5408ac6c
HPN
12888 in_tree_ld_is_elf=no
12889 if (grep 'EMUL = .*elf' ../ld/Makefile \
8a45d680
AN
12890 || grep 'EMUL = .*linux' ../ld/Makefile \
12891 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
5408ac6c
HPN
12892 in_tree_ld_is_elf=yes
12893 fi
275b60d6
JJ
12894 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
12895 do
58ea87a9 12896 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
275b60d6
JJ
12897 if test x$gcc_cv_gld_version != x; then
12898 break
12899 fi
12900 done
12901 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
12902 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
57991eba
PB
12903 rm -f collect-ld$build_exeext
12904 $LN_S ../ld/ld-new$build_exeext collect-ld$build_exeext 2>/dev/null
08d105fa
AO
12905elif test -x "$LD_FOR_TARGET"; then
12906 gcc_cv_ld="$LD_FOR_TARGET"
12907elif test -x "$LD" && test x$host = x$target; then
12908 gcc_cv_ld="$LD"
275b60d6
JJ
12909fi
12910
534d0cc0 12911if test "x$gcc_cv_ld" = x; then
275b60d6
JJ
12912 # Search the same directories that the installed compiler will
12913 # search. Else we may find the wrong linker and lose. If we
12914 # do not find a suitable linker binary, then try the user's
12915 # path.
12916 #
12917 # Also note we have to check MD_EXEC_PREFIX before checking the
12918 # user's path. Unfortunately, there is no good way to get at the
12919 # value of MD_EXEC_PREFIX here. So we do a brute force search
12920 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
12921 # to be fixed as part of the make/configure rewrite too.
12922
12923 if test "x$exec_prefix" = xNONE; then
12924 if test "x$prefix" = xNONE; then
12925 test_prefix=/usr/local
12926 else
12927 test_prefix=$prefix
12928 fi
12929 else
12930 test_prefix=$exec_prefix
12931 fi
12932
b095fe2c
DJ
12933 # If the loop below does not find a linker, then use whatever
12934 # one we can find in the users's path. We are looking for a
12935 # ${build} -> ${target} linker.
55a2ea2a 12936 if test "x$program_prefix" != xNONE; then
57991eba 12937 gcc_cv_ld=${program_prefix}ld$build_exeext
b095fe2c
DJ
12938 elif test x$build != x$host && test x$build != x$target; then
12939 gcc_cv_ld=${target_noncanonical}-ld$build_exeext
55a2ea2a 12940 else
57991eba 12941 gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$build_exeext
55a2ea2a
AM
12942 fi
12943
21addcd9
PB
12944 if test x$host = x$build; then
12945 test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
12946 $test_prefix/libexec/gcc/$target_noncanonical \
12947 /usr/lib/gcc/$target_noncanonical/$gcc_version \
12948 /usr/lib/gcc/$target_noncanonical \
12949 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
12950 $test_prefix/$target_noncanonical/bin"
12951 else
12952 test_dirs=
12953 fi
55a2ea2a 12954
b095fe2c 12955 if test x$build = x$target; then
55a2ea2a 12956 test_dirs="$test_dirs \
275b60d6
JJ
12957 /usr/libexec \
12958 /usr/ccs/gcc \
12959 /usr/ccs/bin \
12960 /udk/usr/ccs/bin \
12961 /bsd43/usr/lib/cmplrs/cc \
12962 /usr/cross64/usr/bin \
12963 /usr/lib/cmplrs/cc \
12964 /sysv/usr/lib/cmplrs/cc \
12965 /svr4/usr/lib/cmplrs/cc \
12966 /usr/bin"
55a2ea2a 12967 fi
275b60d6
JJ
12968
12969 for dir in $test_dirs; do
57991eba
PB
12970 if test -x $dir/ld$build_exeext; then
12971 gcc_cv_ld=$dir/ld$build_exeext
275b60d6
JJ
12972 break;
12973 fi
12974 done
12975fi
34a86c2b
NN
12976case $in_tree_ld in
12977 yes)
ba479fd2
NN
12978 echo "$as_me:$LINENO: result: \"newly built ld\"" >&5
12979echo "${ECHO_T}\"newly built ld\"" >&6
34a86c2b
NN
12980 ;;
12981 no)
ba479fd2
NN
12982 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
12983echo "${ECHO_T}$gcc_cv_ld" >&6
34a86c2b
NN
12984 ;;
12985esac
275b60d6 12986
981d4858 12987# Figure out what nm we will be using.
f9c1196a 12988gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
ba479fd2
NN
12989echo "$as_me:$LINENO: checking what nm to use" >&5
12990echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
f9c1196a 12991in_tree_nm=no
57991eba
PB
12992if test -x nm$build_exeext; then
12993 gcc_cv_nm=./nm$build_exeext
f9c1196a
ZW
12994elif test -f $gcc_cv_binutils_srcdir/configure.in \
12995 && test -f ../binutils/Makefile; then
12996 # Single tree build which includes binutils.
12997 in_tree_nm=yes
57991eba
PB
12998 gcc_cv_nm=./nm$build_exeext
12999 rm -f nm$build_exeext
13000 $LN_S ../binutils/nm-new$build_exeext nm$build_exeext 2>/dev/null
534d0cc0 13001elif test "x$program_prefix" != xNONE; then
57991eba 13002 gcc_cv_nm=${program_prefix}nm$build_exeext
b095fe2c
DJ
13003elif test x$build != x$host && test x$build != x$target; then
13004 gcc_cv_nm=${target_noncanonical}-nm$build_exeext
534d0cc0 13005else
57991eba 13006 gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$build_exeext
981d4858 13007fi
f9c1196a 13008case $in_tree_nm in
ba479fd2
NN
13009 yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5
13010echo "${ECHO_T}\"newly built nm\"" >&6 ;;
13011 no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13012echo "${ECHO_T}$gcc_cv_nm" >&6 ;;
f9c1196a 13013esac
981d4858 13014
3cae5780 13015# Figure out what objdump we will be using.
ba479fd2
NN
13016echo "$as_me:$LINENO: checking what objdump to use" >&5
13017echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
f9c1196a 13018in_tree_objdump=no
57991eba
PB
13019if test -x objdump$build_exeext; then
13020 gcc_cv_objdump=./objdump$build_exeext
f9c1196a
ZW
13021elif test -f $gcc_cv_binutils_srcdir/configure.in \
13022 && test -f ../binutils/Makefile; then
13023 # Single tree build which includes binutils.
13024 in_tree_objdump=yes
57991eba
PB
13025 gcc_cv_objdump=./objdump$build_exeext
13026 rm -f objdump$build_exeext
13027 $LN_S ../binutils/objdump$build_exeext objdump$build_exeext 2>/dev/null
534d0cc0 13028elif test "x$program_prefix" != xNONE; then
57991eba 13029 gcc_cv_objdump=${program_prefix}objdump$build_exeext
b095fe2c
DJ
13030elif test x$build != x$host && test x$build != x$target; then
13031 gcc_cv_objdump=${target_noncanonical}-objdump$build_exeext
534d0cc0 13032else
f9c1196a 13033 gcc_cv_objdump=`echo objdump | \
57991eba 13034 sed "${program_transform_name}"`$build_exeext
3cae5780 13035fi
f9c1196a 13036case $in_tree_objdump in
ba479fd2
NN
13037 yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5
13038echo "${ECHO_T}\"newly built objdump\"" >&6 ;;
13039 no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13040echo "${ECHO_T}$gcc_cv_objdump" >&6 ;;
f9c1196a 13041esac
3cae5780 13042
981d4858 13043# Figure out what assembler alignment features are present.
ba479fd2
NN
13044echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13045echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
13046if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13047 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13048else
13049 gcc_cv_as_balign_and_p2align=no
13050 if test $in_tree_gas = yes; then
13051 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13052 then gcc_cv_as_balign_and_p2align=yes
13053fi
13054 elif test x$gcc_cv_as != x; then
6e3f3080 13055 echo '.balign 4
8ada417f 13056.p2align 2' > conftest.s
ba479fd2
NN
13057 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13059 (eval $ac_try) 2>&5
13060 ac_status=$?
13061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13062 (exit $ac_status); }; }
8ada417f
ZW
13063 then
13064 gcc_cv_as_balign_and_p2align=yes
13065 else
13066 echo "configure: failed program was" >&5
13067 cat conftest.s >&5
13068 fi
13069 rm -f conftest.o conftest.s
13070 fi
13071fi
ba479fd2
NN
13072echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13073echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 13074if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
13075
13076cat >>confdefs.h <<\_ACEOF
981d4858 13077#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 13078_ACEOF
981d4858 13079
ad9c4d9f
NN
13080fi
13081
ba479fd2
NN
13082echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13083echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
13084if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13085 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13086else
13087 gcc_cv_as_max_skip_p2align=no
13088 if test $in_tree_gas = yes; then
13089 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13090 then gcc_cv_as_max_skip_p2align=yes
13091fi
13092 elif test x$gcc_cv_as != x; then
6e3f3080 13093 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
13094 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13096 (eval $ac_try) 2>&5
13097 ac_status=$?
13098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13099 (exit $ac_status); }; }
8ada417f
ZW
13100 then
13101 gcc_cv_as_max_skip_p2align=yes
13102 else
13103 echo "configure: failed program was" >&5
13104 cat conftest.s >&5
13105 fi
13106 rm -f conftest.o conftest.s
13107 fi
ad9c4d9f 13108fi
ba479fd2
NN
13109echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13110echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 13111if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
13112
13113cat >>confdefs.h <<\_ACEOF
9e423e6d 13114#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 13115_ACEOF
9e423e6d 13116
9e423e6d 13117fi
ad9c4d9f 13118
ba479fd2
NN
13119echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13120echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
13121if test "${gcc_cv_as_subsection_m1+set}" = set; then
13122 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13123else
13124 gcc_cv_as_subsection_m1=no
13125 if test $in_tree_gas = yes; then
13126 if test $in_tree_gas_is_elf = yes \
13127 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13128 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 13129fi
8ada417f 13130 elif test x$gcc_cv_as != x; then
6e3f3080 13131 echo 'conftest_label1: .word 0
d1accaa3
JJ
13132.subsection -1
13133conftest_label2: .word 0
8ada417f 13134.previous' > conftest.s
ba479fd2
NN
13135 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13137 (eval $ac_try) 2>&5
13138 ac_status=$?
13139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13140 (exit $ac_status); }; }
8ada417f
ZW
13141 then
13142 if test x$gcc_cv_nm != x; then
13143 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13144 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13145 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13146 then :
13147 else gcc_cv_as_subsection_m1=yes
13148 fi
13149 rm -f conftest.nm1 conftest.nm2
13150 fi
13151 else
13152 echo "configure: failed program was" >&5
13153 cat conftest.s >&5
13154 fi
13155 rm -f conftest.o conftest.s
13156 fi
981d4858 13157fi
ba479fd2
NN
13158echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13159echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 13160if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
13161
13162cat >>confdefs.h <<\_ACEOF
981d4858 13163#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 13164_ACEOF
981d4858 13165
d1accaa3 13166fi
ad9c4d9f 13167
ba479fd2
NN
13168echo "$as_me:$LINENO: checking assembler for .weak" >&5
13169echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
13170if test "${gcc_cv_as_weak+set}" = set; then
13171 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13172else
13173 gcc_cv_as_weak=no
13174 if test $in_tree_gas = yes; then
13175 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13176 then gcc_cv_as_weak=yes
ad9c4d9f 13177fi
8ada417f 13178 elif test x$gcc_cv_as != x; then
6e3f3080 13179 echo ' .weak foobar' > conftest.s
ba479fd2
NN
13180 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13182 (eval $ac_try) 2>&5
13183 ac_status=$?
13184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13185 (exit $ac_status); }; }
8ada417f
ZW
13186 then
13187 gcc_cv_as_weak=yes
13188 else
13189 echo "configure: failed program was" >&5
13190 cat conftest.s >&5
13191 fi
13192 rm -f conftest.o conftest.s
13193 fi
981d4858 13194fi
ba479fd2
NN
13195echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13196echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 13197if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
13198
13199cat >>confdefs.h <<\_ACEOF
981d4858 13200#define HAVE_GAS_WEAK 1
ba479fd2 13201_ACEOF
981d4858 13202
12822146 13203fi
ad9c4d9f 13204
e41f3691
JDA
13205echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13206echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
13207if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13208 echo $ECHO_N "(cached) $ECHO_C" >&6
13209else
13210 gcc_cv_as_nsubspa_comdat=no
13211 if test $in_tree_gas = yes; then
13212 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13213 then gcc_cv_as_nsubspa_comdat=yes
13214fi
13215 elif test x$gcc_cv_as != x; then
13216 echo ' .SPACE $TEXT$
13217 .NSUBSPA $CODE$,COMDAT' > conftest.s
13218 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13220 (eval $ac_try) 2>&5
13221 ac_status=$?
13222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13223 (exit $ac_status); }; }
13224 then
13225 gcc_cv_as_nsubspa_comdat=yes
13226 else
13227 echo "configure: failed program was" >&5
13228 cat conftest.s >&5
13229 fi
13230 rm -f conftest.o conftest.s
13231 fi
13232fi
13233echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13234echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
13235if test $gcc_cv_as_nsubspa_comdat = yes; then
13236
13237cat >>confdefs.h <<\_ACEOF
13238#define HAVE_GAS_NSUBSPA_COMDAT 1
13239_ACEOF
13240
13241fi
13242
8ada417f
ZW
13243# .hidden needs to be supported in both the assembler and the linker,
13244# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13245# This is irritatingly difficult to feature test for; we have to check the
13246# date string after the version number. If we've got an in-tree
13247# ld, we don't know its patchlevel version, so we set the baseline at 2.13
13248# to be safe.
13249# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
13250echo "$as_me:$LINENO: checking assembler for .hidden" >&5
13251echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
13252if test "${gcc_cv_as_hidden+set}" = set; then
13253 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13254else
13255 gcc_cv_as_hidden=no
13256 if test $in_tree_gas = yes; then
13257 if test $in_tree_gas_is_elf = yes \
13258 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
13259 then gcc_cv_as_hidden=yes
13260fi
13261 elif test x$gcc_cv_as != x; then
6e3f3080 13262 echo ' .hidden foobar
8ada417f 13263foobar:' > conftest.s
ba479fd2
NN
13264 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13266 (eval $ac_try) 2>&5
13267 ac_status=$?
13268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13269 (exit $ac_status); }; }
8ada417f
ZW
13270 then
13271 gcc_cv_as_hidden=yes
13272 else
13273 echo "configure: failed program was" >&5
13274 cat conftest.s >&5
13275 fi
13276 rm -f conftest.o conftest.s
13277 fi
13278fi
ba479fd2
NN
13279echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
13280echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 13281
ad9c4d9f 13282
ba479fd2
NN
13283echo "$as_me:$LINENO: checking linker for .hidden support" >&5
13284echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
13285if test "${gcc_cv_ld_hidden+set}" = set; then
13286 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13287else
13288 if test $in_tree_ld = yes ; then
13289 gcc_cv_ld_hidden=no
13290 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 \
13291 && test $in_tree_ld_is_elf = yes; then
13292 gcc_cv_ld_hidden=yes
13293 fi
13294else
13295 gcc_cv_ld_hidden=yes
bace148a 13296 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
13297 if echo "$ld_ver" | grep GNU > /dev/null; then
13298 ld_vers=`echo $ld_ver | sed -n \
13299 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13300 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13301 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13302 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13303 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13304 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
13305 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'`
13306 if test 0"$ld_date" -lt 20020404; then
13307 if test -n "$ld_date"; then
13308 # If there was date string, but was earlier than 2002-04-04, fail
13309 gcc_cv_ld_hidden=no
13310 elif test -z "$ld_vers"; then
13311 # If there was no date string nor ld version number, something is wrong
13312 gcc_cv_ld_hidden=no
13313 else
13314 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
13315 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
13316 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
13317 test -z "$ld_vers_patch" && ld_vers_patch=0
13318 if test "$ld_vers_major" -lt 2; then
13319 gcc_cv_ld_hidden=no
13320 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
13321 gcc_cv_ld_hidden="no"
13322 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
13323 gcc_cv_ld_hidden=no
c72931a6 13324 fi
8ada417f 13325 fi
789b7de5 13326 fi
8ada417f 13327 else
28690784 13328 case "${target}" in
b0fd7d27 13329 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
13330 gcc_cv_ld_hidden=yes
13331 ;;
13332 *)
13333 gcc_cv_ld_hidden=no
13334 ;;
13335 esac
8ada417f
ZW
13336 fi
13337fi
6d07784a 13338fi
ba479fd2
NN
13339echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
13340echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 13341libgcc_visibility=no
ad9c4d9f 13342
8e3940b2 13343if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 13344 libgcc_visibility=yes
ba479fd2
NN
13345
13346cat >>confdefs.h <<\_ACEOF
8ada417f 13347#define HAVE_GAS_HIDDEN 1
ba479fd2 13348_ACEOF
ad9c4d9f
NN
13349
13350fi
13351
8ada417f 13352# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
13353echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
13354echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
13355if test "${gcc_cv_as_leb128+set}" = set; then
13356 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13357else
13358 gcc_cv_as_leb128=no
13359 if test $in_tree_gas = yes; then
13360 if test $in_tree_gas_is_elf = yes \
13361 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
13362 then gcc_cv_as_leb128=yes
13363fi
13364 elif test x$gcc_cv_as != x; then
6e3f3080 13365 echo ' .data
b7460f24
RH
13366 .uleb128 L2 - L1
13367L1:
13368 .uleb128 1280
13369 .sleb128 -1010
8ada417f 13370L2:' > conftest.s
ba479fd2
NN
13371 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13373 (eval $ac_try) 2>&5
13374 ac_status=$?
13375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13376 (exit $ac_status); }; }
8ada417f
ZW
13377 then
13378 # GAS versions before 2.11 do not support uleb128,
13379 # despite appearing to.
13380 # ??? There exists an elf-specific test that will crash
13381 # the assembler. Perhaps it's better to figure out whether
13382 # arbitrary sections are supported and try the test.
bace148a 13383 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
13384 if echo "$as_ver" | grep GNU > /dev/null; then
13385 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
13386 as_major=`echo $as_ver | sed 's/\..*//'`
13387 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
13388 if test $as_major -eq 2 && test $as_minor -lt 11
13389 then :
13390 else gcc_cv_as_leb128=yes
13391 fi
13392 fi
13393 else
13394 echo "configure: failed program was" >&5
13395 cat conftest.s >&5
13396 fi
13397 rm -f conftest.o conftest.s
13398 fi
b7460f24 13399fi
ba479fd2
NN
13400echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
13401echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 13402if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
13403
13404cat >>confdefs.h <<\_ACEOF
b7460f24 13405#define HAVE_AS_LEB128 1
ba479fd2 13406_ACEOF
b7460f24
RH
13407
13408fi
ad9c4d9f 13409
8ada417f
ZW
13410# GAS versions up to and including 2.11.0 may mis-optimize
13411# .eh_frame data.
ba479fd2
NN
13412echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
13413echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
13414if test "${gcc_cv_as_eh_frame+set}" = set; then
13415 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13416else
13417 gcc_cv_as_eh_frame=no
13418 if test $in_tree_gas = yes; then
13419 if test $in_tree_gas_is_elf = yes \
13420 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13421 then gcc_cv_as_eh_frame=yes
ad9c4d9f 13422fi
8ada417f 13423 elif test x$gcc_cv_as != x; then
6e3f3080 13424 echo ' .text
c64688ae
RH
13425.LFB1:
13426 .4byte 0
13427.L1:
13428 .4byte 0
13429.LFE1:
13430 .section .eh_frame,"aw",@progbits
13431__FRAME_BEGIN__:
13432 .4byte .LECIE1-.LSCIE1
13433.LSCIE1:
13434 .4byte 0x0
13435 .byte 0x1
13436 .ascii "z\0"
13437 .byte 0x1
13438 .byte 0x78
13439 .byte 0x1a
13440 .byte 0x0
13441 .byte 0x4
13442 .4byte 1
13443 .p2align 1
13444.LECIE1:
13445.LSFDE1:
13446 .4byte .LEFDE1-.LASFDE1
13447.LASFDE1:
13448 .4byte .LASFDE1-__FRAME_BEGIN__
13449 .4byte .LFB1
13450 .4byte .LFE1-.LFB1
13451 .byte 0x4
13452 .4byte .LFE1-.LFB1
13453 .byte 0x4
13454 .4byte .L1-.LFB1
8ada417f 13455.LEFDE1:' > conftest.s
ba479fd2
NN
13456 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13458 (eval $ac_try) 2>&5
13459 ac_status=$?
13460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13461 (exit $ac_status); }; }
8ada417f
ZW
13462 then
13463 cat > conftest.lit <<EOF
c64688ae
RH
13464 0000 10000000 00000000 017a0001 781a0004 .........z..x...
13465 0010 01000000 12000000 18000000 00000000 ................
093e61a6 13466 0020 08000000 04080000 0044 .........D
01efb963 13467EOF
ba479fd2 13468cat > conftest.big <<EOF
01efb963
AS
13469 0000 00000010 00000000 017a0001 781a0004 .........z..x...
13470 0010 00000001 00000012 00000018 00000000 ................
093e61a6 13471 0020 00000008 04000000 0844 .........D
c64688ae 13472EOF
8ada417f
ZW
13473 # If the assembler didn't choke, and we can objdump,
13474 # and we got the correct data, then succeed.
13475 if test x$gcc_cv_objdump != x \
13476 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
13477 | tail -3 > conftest.got \
13478 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
13479 || cmp conftest.big conftest.got > /dev/null 2>&1; }
13480 then
13481 gcc_cv_as_eh_frame=yes
ba479fd2
NN
13482 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
13483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13484 (eval $ac_try) 2>&5
13485 ac_status=$?
13486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13487 (exit $ac_status); }; }; then
8ada417f
ZW
13488 gcc_cv_as_eh_frame=buggy
13489 else
13490 # Uh oh, what do we do now?
13491 gcc_cv_as_eh_frame=no
13492 fi
13493 else
13494 echo "configure: failed program was" >&5
13495 cat conftest.s >&5
13496 fi
13497 rm -f conftest.o conftest.s
13498 fi
c64688ae 13499fi
ba479fd2
NN
13500echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
13501echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 13502
6e3f3080 13503
63cf211a 13504if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
13505
13506cat >>confdefs.h <<\_ACEOF
8ada417f 13507#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 13508_ACEOF
ad9c4d9f
NN
13509
13510fi
13511
ba479fd2
NN
13512echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13513echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13514if test "${gcc_cv_as_shf_merge+set}" = set; then
13515 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13516else
13517 gcc_cv_as_shf_merge=no
13518 if test $in_tree_gas = yes; then
13519 if test $in_tree_gas_is_elf = yes \
13520 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13521 then gcc_cv_as_shf_merge=yes
13522fi
13523 elif test x$gcc_cv_as != x; then
6e3f3080 13524 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
13525 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13527 (eval $ac_try) 2>&5
13528 ac_status=$?
13529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530 (exit $ac_status); }; }
8ada417f
ZW
13531 then
13532 gcc_cv_as_shf_merge=yes
13533 else
13534 echo "configure: failed program was" >&5
13535 cat conftest.s >&5
13536 fi
13537 rm -f conftest.o conftest.s
13538 fi
201556f0 13539fi
ba479fd2
NN
13540echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13541echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 13542
c18a5b6c
MM
13543if test $gcc_cv_as_shf_merge = no; then
13544 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13545echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13546if test "${gcc_cv_as_shf_merge+set}" = set; then
13547 echo $ECHO_N "(cached) $ECHO_C" >&6
13548else
13549 gcc_cv_as_shf_merge=no
13550 if test $in_tree_gas = yes; then
13551 if test $in_tree_gas_is_elf = yes \
13552 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13553 then gcc_cv_as_shf_merge=yes
13554fi
13555 elif test x$gcc_cv_as != x; then
13556 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
13557 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13559 (eval $ac_try) 2>&5
13560 ac_status=$?
13561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13562 (exit $ac_status); }; }
13563 then
13564 gcc_cv_as_shf_merge=yes
13565 else
13566 echo "configure: failed program was" >&5
13567 cat conftest.s >&5
13568 fi
13569 rm -f conftest.o conftest.s
13570 fi
13571fi
13572echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13573echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
13574
13575fi
8ad9fb33 13576
ba479fd2 13577cat >>confdefs.h <<_ACEOF
8ad9fb33 13578#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 13579_ACEOF
201556f0 13580
201556f0 13581
c18a5b6c
MM
13582echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13583echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13584if test "${gcc_cv_as_comdat_group+set}" = set; then
13585 echo $ECHO_N "(cached) $ECHO_C" >&6
13586else
13587 gcc_cv_as_comdat_group=no
13588 if test $in_tree_gas = yes; then
13589 if test $in_tree_gas_is_elf = yes \
13590 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13591 then gcc_cv_as_comdat_group=yes
13592fi
13593 elif test x$gcc_cv_as != x; then
13594 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
13595 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13597 (eval $ac_try) 2>&5
13598 ac_status=$?
13599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13600 (exit $ac_status); }; }
13601 then
13602 gcc_cv_as_comdat_group=yes
13603 else
13604 echo "configure: failed program was" >&5
13605 cat conftest.s >&5
13606 fi
13607 rm -f conftest.o conftest.s
13608 fi
13609fi
13610echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
13611echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
13612
13613if test $gcc_cv_as_comdat_group = yes; then
13614 gcc_cv_as_comdat_group_percent=no
13615else
13616 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13617echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13618if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
13619 echo $ECHO_N "(cached) $ECHO_C" >&6
13620else
13621 gcc_cv_as_comdat_group_percent=no
13622 if test $in_tree_gas = yes; then
13623 if test $in_tree_gas_is_elf = yes \
13624 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13625 then gcc_cv_as_comdat_group_percent=yes
13626fi
13627 elif test x$gcc_cv_as != x; then
13628 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
13629 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13631 (eval $ac_try) 2>&5
13632 ac_status=$?
13633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13634 (exit $ac_status); }; }
13635 then
13636 gcc_cv_as_comdat_group_percent=yes
13637 else
13638 echo "configure: failed program was" >&5
13639 cat conftest.s >&5
13640 fi
13641 rm -f conftest.o conftest.s
13642 fi
13643fi
13644echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
13645echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
13646
13647fi
13648
13649cat >>confdefs.h <<_ACEOF
13650#define HAVE_GAS_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`
13651_ACEOF
13652
13653
8ada417f 13654# Thread-local storage - the check is heavily parametrized.
f996902d
RH
13655conftest_s=
13656tls_first_major=
13657tls_first_minor=
9739c90c 13658tls_as_opt=
f996902d 13659case "$target" in
6f9b006d
RH
13660 alpha*-*-*)
13661 conftest_s='
13662 .section ".tdata","awT",@progbits
13663foo: .long 25
13664 .text
13665 ldq $27,__tls_get_addr($29) !literal!1
13666 lda $16,foo($29) !tlsgd!1
13667 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
13668 ldq $27,__tls_get_addr($29) !literal!2
13669 lda $16,foo($29) !tlsldm!2
13670 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
13671 ldq $1,foo($29) !gotdtprel
13672 ldah $2,foo($29) !dtprelhi
13673 lda $3,foo($2) !dtprello
13674 lda $4,foo($29) !dtprel
13675 ldq $1,foo($29) !gottprel
13676 ldah $2,foo($29) !tprelhi
13677 lda $3,foo($2) !tprello
13678 lda $4,foo($29) !tprel'
13679 tls_first_major=2
13680 tls_first_minor=13
2f3321ca 13681 tls_as_opt=--fatal-warnings
6f9b006d 13682 ;;
e4dd71de
AH
13683 frv*-*-*)
13684 conftest_s='
13685 .section ".tdata","awT",@progbits
13686x: .long 25
13687 .text
13688 call #gettlsoff(x)'
13689 tls_first_major=2
13690 tls_first_minor=14
13691 ;;
f996902d
RH
13692 i[34567]86-*-*)
13693 conftest_s='
13694 .section ".tdata","awT",@progbits
13695foo: .long 25
13696 .text
13697 movl %gs:0, %eax
13698 leal foo@TLSGD(,%ebx,1), %eax
13699 leal foo@TLSLDM(%ebx), %eax
13700 leal foo@DTPOFF(%eax), %edx
13701 movl foo@GOTTPOFF(%ebx), %eax
13702 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
13703 addl foo@GOTNTPOFF(%ebx), %eax
13704 movl foo@INDNTPOFF, %eax
f996902d
RH
13705 movl $foo@TPOFF, %eax
13706 subl $foo@TPOFF, %eax
13707 leal foo@NTPOFF(%ecx), %eax'
13708 tls_first_major=2
75d38379 13709 tls_first_minor=14
2f3321ca 13710 tls_as_opt=--fatal-warnings
75d38379
JJ
13711 ;;
13712 x86_64-*-*)
13713 conftest_s='
13714 .section ".tdata","awT",@progbits
13715foo: .long 25
13716 .text
13717 movq %fs:0, %rax
13718 leaq foo@TLSGD(%rip), %rdi
13719 leaq foo@TLSLD(%rip), %rdi
13720 leaq foo@DTPOFF(%rax), %rdx
13721 movq foo@GOTTPOFF(%rip), %rax
13722 movq $foo@TPOFF, %rax'
13723 tls_first_major=2
13724 tls_first_minor=14
2f3321ca 13725 tls_as_opt=--fatal-warnings
f996902d 13726 ;;
7b6e506e
RH
13727 ia64-*-*)
13728 conftest_s='
13729 .section ".tdata","awT",@progbits
13730foo: data8 25
13731 .text
13732 addl r16 = @ltoff(@dtpmod(foo#)), gp
13733 addl r17 = @ltoff(@dtprel(foo#)), gp
13734 addl r18 = @ltoff(@tprel(foo#)), gp
13735 addl r19 = @dtprel(foo#), gp
13736 adds r21 = @dtprel(foo#), r13
13737 movl r23 = @dtprel(foo#)
13738 addl r20 = @tprel(foo#), gp
13739 adds r22 = @tprel(foo#), r13
13740 movl r24 = @tprel(foo#)'
13741 tls_first_major=2
13742 tls_first_minor=13
2f3321ca 13743 tls_as_opt=--fatal-warnings
7b6e506e 13744 ;;
69229b81
DJ
13745 mips*-*-*)
13746 conftest_s='
13747 .section .tdata,"awT",@progbits
13748x:
13749 .word 2
13750 .text
13751 addiu $4, $28, %tlsgd(x)
13752 addiu $4, $28, %tlsldm(x)
13753 lui $4, %dtprel_hi(x)
13754 addiu $4, $4, %dtprel_lo(x)
13755 lw $4, %gottprel(x)($28)
13756 lui $4, %tprel_hi(x)
13757 addiu $4, $4, %tprel_lo(x)'
13758 tls_first_major=2
13759 tls_first_minor=16
13760 tls_as_opt='-32 --fatal-warnings'
13761 ;;
c4501e62
JJ
13762 powerpc-*-*)
13763 conftest_s='
13764 .section ".tdata","awT",@progbits
13765 .align 2
13766ld0: .space 4
13767ld1: .space 4
13768x1: .space 4
13769x2: .space 4
13770x3: .space 4
13771 .text
13772 addi 3,31,ld0@got@tlsgd
13773 bl __tls_get_addr
13774 addi 3,31,x1@got@tlsld
13775 bl __tls_get_addr
13776 addi 9,3,x1@dtprel
13777 addis 9,3,x2@dtprel@ha
13778 addi 9,9,x2@dtprel@l
13779 lwz 9,x3@got@tprel(31)
13780 add 9,9,x@tls
13781 addi 9,2,x1@tprel
13782 addis 9,2,x2@tprel@ha
13783 addi 9,9,x2@tprel@l'
13784 tls_first_major=2
13785 tls_first_minor=14
2f3321ca 13786 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
13787 ;;
13788 powerpc64-*-*)
13789 conftest_s='
13790 .section ".tdata","awT",@progbits
13791 .align 3
13792ld0: .space 8
13793ld1: .space 8
13794x1: .space 8
13795x2: .space 8
13796x3: .space 8
13797 .text
13798 addi 3,2,ld0@got@tlsgd
13799 bl .__tls_get_addr
13800 nop
13801 addi 3,2,ld1@toc
13802 bl .__tls_get_addr
13803 nop
13804 addi 3,2,x1@got@tlsld
13805 bl .__tls_get_addr
13806 nop
13807 addi 9,3,x1@dtprel
13808 bl .__tls_get_addr
13809 nop
13810 addis 9,3,x2@dtprel@ha
13811 addi 9,9,x2@dtprel@l
13812 bl .__tls_get_addr
13813 nop
13814 ld 9,x3@got@dtprel(2)
13815 add 9,9,3
13816 bl .__tls_get_addr
13817 nop'
13818 tls_first_major=2
13819 tls_first_minor=14
2f3321ca 13820 tls_as_opt="-a64 --fatal-warnings"
c4501e62 13821 ;;
fd3cd001
UW
13822 s390-*-*)
13823 conftest_s='
13824 .section ".tdata","awT",@progbits
13825foo: .long 25
13826 .text
13827 .long foo@TLSGD
13828 .long foo@TLSLDM
13829 .long foo@DTPOFF
13830 .long foo@NTPOFF
13831 .long foo@GOTNTPOFF
13832 .long foo@INDNTPOFF
13833 l %r1,foo@GOTNTPOFF(%r12)
13834 l %r1,0(%r1):tls_load:foo
13835 bas %r14,0(%r1,%r13):tls_gdcall:foo
13836 bas %r14,0(%r1,%r13):tls_ldcall:foo'
13837 tls_first_major=2
13838 tls_first_minor=14
2f3321ca 13839 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
13840 ;;
13841 s390x-*-*)
13842 conftest_s='
13843 .section ".tdata","awT",@progbits
13844foo: .long 25
13845 .text
13846 .quad foo@TLSGD
13847 .quad foo@TLSLDM
13848 .quad foo@DTPOFF
13849 .quad foo@NTPOFF
13850 .quad foo@GOTNTPOFF
13851 lg %r1,foo@GOTNTPOFF(%r12)
13852 larl %r1,foo@INDNTPOFF
13853 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
13854 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
13855 tls_first_major=2
13856 tls_first_minor=14
2f3321ca 13857 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 13858 ;;
9ff13962
KK
13859 sh-*-* | sh[34]-*-*)
13860 conftest_s='
13861 .section ".tdata","awT",@progbits
13862foo: .long 25
13863 .text
13864 .long foo@TLSGD
13865 .long foo@TLSLDM
13866 .long foo@DTPOFF
13867 .long foo@GOTTPOFF
13868 .long foo@TPOFF'
13869 tls_first_major=2
13870 tls_first_minor=13
2f3321ca 13871 tls_as_opt=--fatal-warnings
9ff13962 13872 ;;
5751a10b 13873 sparc*-*-*)
2f3321ca
EB
13874 case "$target" in
13875 sparc*-sun-solaris2.*)
13876 on_solaris=yes
13877 ;;
13878 *)
13879 on_solaris=no
13880 ;;
13881 esac
13882 if test x$on_solaris = xyes && test x$gas_flag = xno; then
13883 conftest_s='
13884 .section ".tdata",#alloc,#write,#tls
13885foo: .long 25
13886 .text
13887 sethi %tgd_hi22(foo), %o0
13888 add %o0, %tgd_lo10(foo), %o1
13889 add %l7, %o1, %o0, %tgd_add(foo)
13890 call __tls_get_addr, %tgd_call(foo)
13891 sethi %tldm_hi22(foo), %l1
13892 add %l1, %tldm_lo10(foo), %l2
13893 add %l7, %l2, %o0, %tldm_add(foo)
13894 call __tls_get_addr, %tldm_call(foo)
13895 sethi %tldo_hix22(foo), %l3
13896 xor %l3, %tldo_lox10(foo), %l4
13897 add %o0, %l4, %l5, %tldo_add(foo)
13898 sethi %tie_hi22(foo), %o3
13899 add %o3, %tie_lo10(foo), %o3
13900 ld [%l7 + %o3], %o2, %tie_ld(foo)
13901 add %g7, %o2, %o4, %tie_add(foo)
13902 sethi %tle_hix22(foo), %l1
13903 xor %l1, %tle_lox10(foo), %o5
13904 ld [%g7 + %o5], %o1'
13905 tls_first_major=0
13906 tls_first_minor=0
13907 else
13908 conftest_s='
5751a10b
JJ
13909 .section ".tdata","awT",@progbits
13910foo: .long 25
13911 .text
13912 sethi %tgd_hi22(foo), %o0
13913 add %o0, %tgd_lo10(foo), %o1
13914 add %l7, %o1, %o0, %tgd_add(foo)
13915 call __tls_get_addr, %tgd_call(foo)
13916 sethi %tldm_hi22(foo), %l1
13917 add %l1, %tldm_lo10(foo), %l2
13918 add %l7, %l2, %o0, %tldm_add(foo)
13919 call __tls_get_addr, %tldm_call(foo)
13920 sethi %tldo_hix22(foo), %l3
13921 xor %l3, %tldo_lox10(foo), %l4
13922 add %o0, %l4, %l5, %tldo_add(foo)
13923 sethi %tie_hi22(foo), %o3
13924 add %o3, %tie_lo10(foo), %o3
13925 ld [%l7 + %o3], %o2, %tie_ld(foo)
13926 add %g7, %o2, %o4, %tie_add(foo)
13927 sethi %tle_hix22(foo), %l1
13928 xor %l1, %tle_lox10(foo), %o5
13929 ld [%g7 + %o5], %o1'
13930 tls_first_major=2
13931 tls_first_minor=14
2f3321ca
EB
13932 tls_as_opt="-32 --fatal-warnings"
13933 fi
5751a10b 13934 ;;
f996902d
RH
13935esac
13936if test -z "$tls_first_major"; then
8ada417f
ZW
13937 : # If we don't have a check, assume no support.
13938else
ba479fd2
NN
13939 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
13940echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
13941if test "${gcc_cv_as_tls+set}" = set; then
13942 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13943else
13944 gcc_cv_as_tls=no
13945 if test $in_tree_gas = yes; then
13946 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
13947 then gcc_cv_as_tls=yes
ad9c4d9f 13948fi
8ada417f 13949 elif test x$gcc_cv_as != x; then
6e3f3080 13950 echo "$conftest_s" > conftest.s
2f3321ca 13951 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
13952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13953 (eval $ac_try) 2>&5
13954 ac_status=$?
13955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13956 (exit $ac_status); }; }
8ada417f
ZW
13957 then
13958 gcc_cv_as_tls=yes
13959 else
13960 echo "configure: failed program was" >&5
13961 cat conftest.s >&5
13962 fi
13963 rm -f conftest.o conftest.s
f996902d 13964 fi
f996902d 13965fi
ba479fd2
NN
13966echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
13967echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 13968if test $gcc_cv_as_tls = yes; then
ba479fd2
NN
13969
13970cat >>confdefs.h <<\_ACEOF
f996902d 13971#define HAVE_AS_TLS 1
ba479fd2 13972_ACEOF
f996902d
RH
13973
13974fi
8ada417f
ZW
13975fi
13976
13977# Target-specific assembler checks.
f996902d 13978
7e9d8517
L
13979echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
13980echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
13981gcc_cv_ld_static_dynamic=no
13982if test $in_tree_ld = yes ; then
13983 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
13984 gcc_cv_ld_static_dynamic=yes
13985 fi
13986elif test x$gcc_cv_ld != x; then
13987 # Check if linker supports -Bstatic/-Bdynamic option
13988 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
13989 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
13990 gcc_cv_ld_static_dynamic=yes
13991 fi
13992fi
13993if test x"$gcc_cv_ld_static_dynamic" = xyes; then
13994
13995cat >>confdefs.h <<\_ACEOF
13996#define HAVE_LD_STATIC_DYNAMIC 1
13997_ACEOF
13998
13999fi
14000echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14001echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
14002
d594623a
L
14003if test x"$demangler_in_ld" = xyes; then
14004 echo "$as_me:$LINENO: checking linker --demangle support" >&5
14005echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
14006 gcc_cv_ld_demangle=no
14007 if test $in_tree_ld = yes; then
14008 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 \
14009 gcc_cv_ld_demangle=yes
14010 fi
14011 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14012 # Check if the GNU linker supports --demangle option
14013 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14014 gcc_cv_ld_demangle=yes
14015 fi
14016 fi
14017 if test x"$gcc_cv_ld_demangle" = xyes; then
14018
14019cat >>confdefs.h <<\_ACEOF
14020#define HAVE_LD_DEMANGLE 1
14021_ACEOF
14022
14023 fi
14024 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14025echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
14026fi
14027
3a37b08e
RH
14028case "$target" in
14029 # All TARGET_ABI_OSF targets.
14030 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
14031 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14032echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14033if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14034 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 14035else
8ada417f
ZW
14036 gcc_cv_as_alpha_explicit_relocs=no
14037 if test $in_tree_gas = yes; then
14038 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14039 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 14040fi
8ada417f 14041 elif test x$gcc_cv_as != x; then
6e3f3080 14042 echo ' .set nomacro
3a37b08e
RH
14043 .text
14044 extbl $3, $2, $3 !lituse_bytoff!1
14045 ldq $2, a($29) !literal!1
14046 ldq $4, b($29) !literal!2
14047 ldq_u $3, 0($2) !lituse_base!1
14048 ldq $27, f($29) !literal!5
14049 jsr $26, ($27), f !lituse_jsr!5
14050 ldah $29, 0($26) !gpdisp!3
14051 lda $0, c($29) !gprel
14052 ldah $1, d($29) !gprelhigh
14053 lda $1, d($1) !gprellow
8ada417f 14054 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
14055 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14057 (eval $ac_try) 2>&5
14058 ac_status=$?
14059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14060 (exit $ac_status); }; }
8ada417f
ZW
14061 then
14062 gcc_cv_as_alpha_explicit_relocs=yes
14063 else
14064 echo "configure: failed program was" >&5
14065 cat conftest.s >&5
14066 fi
14067 rm -f conftest.o conftest.s
14068 fi
cafe096b 14069fi
ba479fd2
NN
14070echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14071echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 14072if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
14073
14074cat >>confdefs.h <<\_ACEOF
3a37b08e 14075#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 14076_ACEOF
3a37b08e 14077
86da66b5
HPN
14078fi
14079 ;;
14080
14081 cris-*-*)
14082 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14083echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
14084if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14085 echo $ECHO_N "(cached) $ECHO_C" >&6
14086else
14087 gcc_cv_as_cris_no_mul_bug=no
14088 if test $in_tree_gas = yes; then
14089 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14090 then gcc_cv_as_cris_no_mul_bug=yes
14091fi
14092 elif test x$gcc_cv_as != x; then
14093 echo '.text' > conftest.s
14094 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14096 (eval $ac_try) 2>&5
14097 ac_status=$?
14098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14099 (exit $ac_status); }; }
14100 then
14101 gcc_cv_as_cris_no_mul_bug=yes
14102 else
14103 echo "configure: failed program was" >&5
14104 cat conftest.s >&5
14105 fi
14106 rm -f conftest.o conftest.s
14107 fi
14108fi
14109echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14110echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
14111if test $gcc_cv_as_cris_no_mul_bug = yes; then
14112
14113cat >>confdefs.h <<\_ACEOF
14114#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14115_ACEOF
14116
8ada417f 14117fi
3a37b08e 14118 ;;
8ada417f 14119
1cb36a98 14120 sparc*-*-*)
ba479fd2
NN
14121 echo "$as_me:$LINENO: checking assembler for .register" >&5
14122echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
14123if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14124 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14125else
8ada417f
ZW
14126 gcc_cv_as_sparc_register_op=no
14127 if test x$gcc_cv_as != x; then
6e3f3080 14128 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
14129 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14131 (eval $ac_try) 2>&5
14132 ac_status=$?
14133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14134 (exit $ac_status); }; }
8ada417f
ZW
14135 then
14136 gcc_cv_as_sparc_register_op=yes
14137 else
14138 echo "configure: failed program was" >&5
14139 cat conftest.s >&5
14140 fi
14141 rm -f conftest.o conftest.s
14142 fi
cafe096b 14143fi
ba479fd2
NN
14144echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
14145echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 14146if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
14147
14148cat >>confdefs.h <<\_ACEOF
1cb36a98 14149#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 14150_ACEOF
1cb36a98 14151
8ada417f 14152fi
1cb36a98 14153
ba479fd2
NN
14154 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
14155echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
14156if test "${gcc_cv_as_sparc_relax+set}" = set; then
14157 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 14158else
8ada417f
ZW
14159 gcc_cv_as_sparc_relax=no
14160 if test x$gcc_cv_as != x; then
6e3f3080 14161 echo '.text' > conftest.s
ba479fd2
NN
14162 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
14163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14164 (eval $ac_try) 2>&5
14165 ac_status=$?
14166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14167 (exit $ac_status); }; }
8ada417f
ZW
14168 then
14169 gcc_cv_as_sparc_relax=yes
14170 else
14171 echo "configure: failed program was" >&5
14172 cat conftest.s >&5
14173 fi
14174 rm -f conftest.o conftest.s
14175 fi
cafe096b 14176fi
ba479fd2
NN
14177echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
14178echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 14179if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
14180
14181cat >>confdefs.h <<\_ACEOF
e95b1e6a 14182#define HAVE_AS_RELAX_OPTION 1
ba479fd2 14183_ACEOF
e95b1e6a 14184
8ada417f 14185fi
e95b1e6a 14186
ba479fd2
NN
14187 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
14188echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
14189if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
14190 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 14191else
8ada417f
ZW
14192 gcc_cv_as_sparc_ua_pcrel=no
14193 if test x$gcc_cv_as != x; then
6e3f3080 14194 echo '.text
8ada417f
ZW
14195foo:
14196 nop
14197.data
14198.align 4
14199.byte 0
14200.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
14201 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14203 (eval $ac_try) 2>&5
14204 ac_status=$?
14205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14206 (exit $ac_status); }; }
8ada417f
ZW
14207 then
14208 if test x$gcc_cv_ld != x \
14209 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
14210 gcc_cv_as_sparc_ua_pcrel=yes
14211 fi
14212 rm -f conftest
14213 else
14214 echo "configure: failed program was" >&5
14215 cat conftest.s >&5
14216 fi
14217 rm -f conftest.o conftest.s
14218 fi
cafe096b 14219fi
ba479fd2
NN
14220echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
14221echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 14222if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
14223
14224cat >>confdefs.h <<\_ACEOF
17e9e88c 14225#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 14226_ACEOF
17e9e88c 14227
17e9e88c 14228
ba479fd2
NN
14229 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
14230echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
14231if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
14232 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 14233else
8ada417f
ZW
14234 gcc_cv_as_sparc_ua_pcrel_hidden=no
14235 if test x$gcc_cv_as != x; then
6e3f3080 14236 echo '.data
8ada417f
ZW
14237.align 4
14238.byte 0x31
14239.uaword %r_disp32(foo)
14240.byte 0x32, 0x33, 0x34
14241.global foo
14242.hidden foo
14243foo:
14244.skip 4' > conftest.s
ba479fd2
NN
14245 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14247 (eval $ac_try) 2>&5
14248 ac_status=$?
14249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14250 (exit $ac_status); }; }
8ada417f
ZW
14251 then
14252 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
14253 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
14254 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
14255 | grep ' 31000000 07323334' > /dev/null 2>&1; then
14256 if $gcc_cv_objdump -R conftest 2> /dev/null \
14257 | grep 'DISP32' > /dev/null 2>&1; then
14258 :
14259 else
14260 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 14261 fi
8ada417f
ZW
14262 fi
14263 rm -f conftest
14264 else
14265 echo "configure: failed program was" >&5
14266 cat conftest.s >&5
14267 fi
14268 rm -f conftest.o conftest.s
14269 fi
cafe096b 14270fi
ba479fd2
NN
14271echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
14272echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 14273if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
14274
14275cat >>confdefs.h <<\_ACEOF
cf7b8b0d 14276#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 14277_ACEOF
cf7b8b0d 14278
8ada417f 14279fi
ba479fd2 14280
8ada417f 14281fi # unaligned pcrel relocs
cf7b8b0d 14282
ba479fd2
NN
14283 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
14284echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
14285if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
14286 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14287else
8ada417f
ZW
14288 gcc_cv_as_sparc_offsetable_lo10=no
14289 if test x$gcc_cv_as != x; then
6e3f3080 14290 echo '.text
8ada417f
ZW
14291 or %g1, %lo(ab) + 12, %g1
14292 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
14293 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
14294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14295 (eval $ac_try) 2>&5
14296 ac_status=$?
14297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14298 (exit $ac_status); }; }
8ada417f
ZW
14299 then
14300 if test x$gcc_cv_objdump != x \
ecb0ccbc 14301 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 14302 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 14303 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
14304 fi
14305 else
14306 echo "configure: failed program was" >&5
14307 cat conftest.s >&5
14308 fi
14309 rm -f conftest.o conftest.s
14310 fi
cafe096b 14311fi
ba479fd2
NN
14312echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
14313echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 14314if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
14315
14316cat >>confdefs.h <<\_ACEOF
1cb36a98 14317#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 14318_ACEOF
1cb36a98 14319
8ada417f 14320fi
1cb36a98
RH
14321 ;;
14322
c307e6dd 14323 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
14324 case $target_os in
14325 cygwin* | pe | mingw32*)
14326 # Used for DWARF 2 in PE
14327 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
14328echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
14329if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
14330 echo $ECHO_N "(cached) $ECHO_C" >&6
14331else
14332 gcc_cv_as_ix86_pe_secrel32=no
14333 if test $in_tree_gas = yes; then
14334 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14335 then gcc_cv_as_ix86_pe_secrel32=yes
14336fi
14337 elif test x$gcc_cv_as != x; then
14338 echo '.text
14339foo: nop
14340.data
14341 .secrel32 foo' > conftest.s
14342 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14344 (eval $ac_try) 2>&5
14345 ac_status=$?
14346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14347 (exit $ac_status); }; }
14348 then
14349 if test x$gcc_cv_ld != x \
14350 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
14351 gcc_cv_as_ix86_pe_secrel32=yes
14352 fi
14353 rm -f conftest
14354 else
14355 echo "configure: failed program was" >&5
14356 cat conftest.s >&5
14357 fi
14358 rm -f conftest.o conftest.s
14359 fi
14360fi
14361echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
14362echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
14363if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
14364
14365cat >>confdefs.h <<\_ACEOF
14366#define HAVE_GAS_PE_SECREL32_RELOC 1
14367_ACEOF
14368
14369fi
14370 ;;
14371 esac
14372
ba479fd2
NN
14373 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
14374echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
14375if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
14376 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14377else
14378 gcc_cv_as_ix86_filds_fists=no
14379 if test $in_tree_gas = yes; then
14380 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
14381 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 14382fi
8ada417f 14383 elif test x$gcc_cv_as != x; then
6e3f3080 14384 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
14385 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14387 (eval $ac_try) 2>&5
14388 ac_status=$?
14389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14390 (exit $ac_status); }; }
8ada417f
ZW
14391 then
14392 gcc_cv_as_ix86_filds_fists=yes
14393 else
14394 echo "configure: failed program was" >&5
14395 cat conftest.s >&5
981d4858 14396 fi
8ada417f
ZW
14397 rm -f conftest.o conftest.s
14398 fi
14399fi
ba479fd2
NN
14400echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
14401echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 14402if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
14403
14404cat >>confdefs.h <<\_ACEOF
8ada417f 14405#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 14406_ACEOF
ad9c4d9f 14407
f6f5dff2
RO
14408fi
14409
ba479fd2
NN
14410 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
14411echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
14412if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
14413 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
14414else
14415 gcc_cv_as_ix86_cmov_sun_syntax=no
14416 if test x$gcc_cv_as != x; then
6e3f3080 14417 echo 'cmovl.l %edx, %eax' > 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); }; }
f6f5dff2
RO
14424 then
14425 gcc_cv_as_ix86_cmov_sun_syntax=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
14432fi
ba479fd2
NN
14433echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
14434echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 14435if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
14436
14437cat >>confdefs.h <<\_ACEOF
f6f5dff2 14438#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 14439_ACEOF
f6f5dff2 14440
ad9c4d9f
NN
14441fi
14442
6f3ca281
ZW
14443 # This one is used unconditionally by i386.[ch]; it is to be defined
14444 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
14445 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
14446echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
14447if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
14448 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14449else
14450 gcc_cv_as_ix86_gotoff_in_data=no
14451 if test $in_tree_gas = yes; then
14452 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14453 then gcc_cv_as_ix86_gotoff_in_data=yes
14454fi
14455 elif test x$gcc_cv_as != x; then
6e3f3080 14456 echo ' .text
f88c65f7
RH
14457.L0:
14458 nop
14459 .data
8ada417f 14460 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
14461 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14463 (eval $ac_try) 2>&5
14464 ac_status=$?
14465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14466 (exit $ac_status); }; }
8ada417f
ZW
14467 then
14468 gcc_cv_as_ix86_gotoff_in_data=yes
14469 else
14470 echo "configure: failed program was" >&5
14471 cat conftest.s >&5
f88c65f7 14472 fi
8ada417f
ZW
14473 rm -f conftest.o conftest.s
14474 fi
14475fi
ba479fd2
NN
14476echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
14477echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 14478
6f3ca281 14479
ba479fd2 14480cat >>confdefs.h <<_ACEOF
6f3ca281 14481#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 14482_ACEOF
f88c65f7 14483
1cb36a98 14484 ;;
ef1ecf87
RH
14485
14486 ia64*-*-*)
ba479fd2
NN
14487 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
14488echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
14489if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
14490 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 14491else
8ada417f
ZW
14492 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
14493 if test $in_tree_gas = yes; then
14494 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14495 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 14496fi
8ada417f 14497 elif test x$gcc_cv_as != x; then
6e3f3080 14498 echo ' .text
ef1ecf87
RH
14499 addl r15 = @ltoffx(x#), gp
14500 ;;
cfa9ee99 14501 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
14502 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14504 (eval $ac_try) 2>&5
14505 ac_status=$?
14506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14507 (exit $ac_status); }; }
8ada417f 14508 then
cfa9ee99 14509 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
14510 else
14511 echo "configure: failed program was" >&5
14512 cat conftest.s >&5
2c4a9cff 14513 fi
8ada417f
ZW
14514 rm -f conftest.o conftest.s
14515 fi
14516fi
ba479fd2
NN
14517echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
14518echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 14519if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
14520
14521cat >>confdefs.h <<\_ACEOF
cfa9ee99 14522#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 14523_ACEOF
8ada417f 14524
cfa9ee99 14525fi
8ada417f 14526
2c4a9cff 14527 ;;
8ada417f 14528
2c4a9cff 14529 powerpc*-*-*)
8ada417f 14530 case $target in
6b37db3c
DE
14531 *-*-aix*) conftest_s=' .csect .text[PR]
14532 mfcr 3,128';;
8af4d362
PB
14533 *-*-darwin*)
14534 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
14535echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
14536if test "${gcc_cv_as_machine_directive+set}" = set; then
14537 echo $ECHO_N "(cached) $ECHO_C" >&6
14538else
14539 gcc_cv_as_machine_directive=no
14540 if test x$gcc_cv_as != x; then
14541 echo ' .machine ppc7400' > conftest.s
14542 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14544 (eval $ac_try) 2>&5
14545 ac_status=$?
14546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14547 (exit $ac_status); }; }
14548 then
14549 gcc_cv_as_machine_directive=yes
14550 else
14551 echo "configure: failed program was" >&5
14552 cat conftest.s >&5
14553 fi
14554 rm -f conftest.o conftest.s
14555 fi
14556fi
14557echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
14558echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
14559
14560 if test x$gcc_cv_as_machine_directive != xyes; then
14561 echo "*** This target requires an assembler supporting \".machine\"" >&2
14562 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
14563 test x$build = x$target && exit 1
14564 fi
14565 conftest_s=' .text
6b37db3c 14566 mfcr r3,128';;
4c67db14 14567 *) conftest_s=' .machine power4
d2ab3e37 14568 .text
6b37db3c 14569 mfcr 3,128';;
8ada417f 14570 esac
8ada417f 14571
ba479fd2
NN
14572 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
14573echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
14574if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
14575 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 14576else
8ada417f
ZW
14577 gcc_cv_as_powerpc_mfcrf=no
14578 if test $in_tree_gas = yes; then
14579 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14580 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 14581fi
8ada417f 14582 elif test x$gcc_cv_as != x; then
6e3f3080 14583 echo "$conftest_s" > conftest.s
ba479fd2
NN
14584 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14586 (eval $ac_try) 2>&5
14587 ac_status=$?
14588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14589 (exit $ac_status); }; }
8ada417f
ZW
14590 then
14591 gcc_cv_as_powerpc_mfcrf=yes
14592 else
14593 echo "configure: failed program was" >&5
14594 cat conftest.s >&5
14595 fi
14596 rm -f conftest.o conftest.s
14597 fi
2c4a9cff 14598fi
ba479fd2
NN
14599echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
14600echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 14601if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
14602
14603cat >>confdefs.h <<\_ACEOF
2c4a9cff 14604#define HAVE_AS_MFCRF 1
ba479fd2 14605_ACEOF
ef1ecf87 14606
8ada417f
ZW
14607fi
14608 ;;
14609
14610 mips*-*-*)
ba479fd2
NN
14611 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14612echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14613if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
14614 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14615else
14616 gcc_cv_as_mips_explicit_relocs=no
14617 if test $in_tree_gas = yes; then
14618 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14619 then gcc_cv_as_mips_explicit_relocs=yes
14620fi
14621 elif test x$gcc_cv_as != x; then
6e3f3080 14622 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
14623 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14625 (eval $ac_try) 2>&5
14626 ac_status=$?
14627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14628 (exit $ac_status); }; }
8ada417f
ZW
14629 then
14630 gcc_cv_as_mips_explicit_relocs=yes
14631 else
14632 echo "configure: failed program was" >&5
14633 cat conftest.s >&5
ef1ecf87 14634 fi
8ada417f
ZW
14635 rm -f conftest.o conftest.s
14636 fi
14637fi
ba479fd2
NN
14638echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
14639echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
14640if test $gcc_cv_as_mips_explicit_relocs = yes; then
14641 if test x$target_cpu_default = x
14642 then target_cpu_default=MASK_EXPLICIT_RELOCS
14643 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
14644 fi
14645fi
14646
82563d35
RS
14647 if test x$gas_flag = xyes \
14648 || test x"$host" != x"$build" \
14649 || test ! -x "$gcc_cv_as" \
14650 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
14651 :
14652 else
14653 echo "*** This configuration requires the GNU assembler" >&2
14654 exit 1
14655 fi
ef1ecf87 14656 ;;
1cb36a98 14657esac
9d147085
RH
14658# ??? Not all targets support dwarf2 debug_line, even within a version
14659# of gas. Moreover, we need to emit a valid instruction to trigger any
14660# info to the output file. So, as supported targets are added to gas 2.11,
14661# add some instruction here to (also) show we expect this might work.
14662# ??? Once 2.11 is released, probably need to add first known working
14663# version to the per-target configury.
14664case "$target" in
80486e06 14665 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 14666 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
d116bdf8 14667 | xstormy16*-*-* | cris-*-* | xtensa-*-*)
9d147085
RH
14668 insn="nop"
14669 ;;
57116d8d 14670 ia64*-*-* | s390*-*-*)
9d147085
RH
14671 insn="nop 0"
14672 ;;
2853bc5a
HPN
14673 mmix-*-*)
14674 insn="swym 0"
14675 ;;
8ada417f
ZW
14676esac
14677if test x"$insn" != x; then
14678 conftest_s="\
14679 .file 1 \"conftest.s\"
14680 .loc 1 3 0
14681 $insn"
ba479fd2
NN
14682 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
14683echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
14684if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
14685 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14686else
14687 gcc_cv_as_dwarf2_debug_line=no
14688 if test $in_tree_gas = yes; then
14689 if test $in_tree_gas_is_elf = yes \
14690 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14691 then gcc_cv_as_dwarf2_debug_line=yes
14692fi
14693 elif test x$gcc_cv_as != x; then
6e3f3080 14694 echo "$conftest_s" > conftest.s
ba479fd2
NN
14695 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14697 (eval $ac_try) 2>&5
14698 ac_status=$?
14699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14700 (exit $ac_status); }; }
8ada417f 14701 then
080a5bb0
EB
14702 if test x$gcc_cv_objdump != x \
14703 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
14704 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
14705 gcc_cv_as_dwarf2_debug_line=yes
14706 fi
14707 else
14708 echo "configure: failed program was" >&5
14709 cat conftest.s >&5
14710 fi
14711 rm -f conftest.o conftest.s
14712 fi
14713fi
ba479fd2
NN
14714echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
14715echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 14716
ad9c4d9f 14717
8ada417f
ZW
14718# The .debug_line file table must be in the exact order that
14719# we specified the files, since these indices are also used
14720# by DW_AT_decl_file. Approximate this test by testing if
14721# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
14722 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
14723echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
14724if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
14725 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14726else
14727 gcc_cv_as_dwarf2_file_buggy=no
14728 if test x$gcc_cv_as != x; then
6e3f3080 14729 echo ' .file 1 "foo.s"
8ada417f 14730 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
14731 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14733 (eval $ac_try) 2>&5
14734 ac_status=$?
14735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14736 (exit $ac_status); }; }
8ada417f
ZW
14737 then
14738 gcc_cv_as_dwarf2_file_buggy=yes
14739 else
14740 echo "configure: failed program was" >&5
14741 cat conftest.s >&5
14742 fi
14743 rm -f conftest.o conftest.s
14744 fi
ad9c4d9f 14745fi
ba479fd2
NN
14746echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
14747echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
14748
14749
14750 if test $gcc_cv_as_dwarf2_debug_line = yes \
14751 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
14752
14753cat >>confdefs.h <<\_ACEOF
9d147085 14754#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 14755_ACEOF
9d147085 14756
8ada417f 14757 fi
ad9c4d9f 14758
ba479fd2
NN
14759 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
14760echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
14761if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
14762 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14763else
14764 gcc_cv_as_gdwarf2_flag=no
14765 if test $in_tree_gas = yes; then
14766 if test $in_tree_gas_is_elf = yes \
14767 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14768 then gcc_cv_as_gdwarf2_flag=yes
14769fi
14770 elif test x$gcc_cv_as != x; then
6e3f3080 14771 echo "$insn" > conftest.s
ba479fd2
NN
14772 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
14773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14774 (eval $ac_try) 2>&5
14775 ac_status=$?
14776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14777 (exit $ac_status); }; }
8ada417f
ZW
14778 then
14779 gcc_cv_as_gdwarf2_flag=yes
14780 else
14781 echo "configure: failed program was" >&5
14782 cat conftest.s >&5
14783 fi
14784 rm -f conftest.o conftest.s
14785 fi
ad9c4d9f 14786fi
ba479fd2
NN
14787echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
14788echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 14789if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
14790
14791cat >>confdefs.h <<\_ACEOF
5f0e9ea2 14792#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 14793_ACEOF
5f0e9ea2
GK
14794
14795fi
ad9c4d9f 14796
ba479fd2
NN
14797 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
14798echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
14799if test "${gcc_cv_as_gstabs_flag+set}" = set; then
14800 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14801else
14802 gcc_cv_as_gstabs_flag=no
14803 if test $in_tree_gas = yes; then
14804 if test $in_tree_gas_is_elf = yes \
14805 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14806 then gcc_cv_as_gstabs_flag=yes
14807fi
14808 elif test x$gcc_cv_as != x; then
6e3f3080 14809 echo "$insn" > conftest.s
ba479fd2
NN
14810 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
14811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14812 (eval $ac_try) 2>&5
14813 ac_status=$?
14814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14815 (exit $ac_status); }; }
8ada417f
ZW
14816 then
14817 # The native Solaris 9/Intel assembler doesn't understand --gstabs
14818 # and warns about it, but still exits successfully. So check for
14819 # this.
ba479fd2
NN
14820 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
14821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14822 (eval $ac_try) 2>&5
14823 ac_status=$?
14824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14825 (exit $ac_status); }; }
8ada417f
ZW
14826 then :
14827 else gcc_cv_as_gstabs_flag=yes
14828 fi
14829 else
14830 echo "configure: failed program was" >&5
14831 cat conftest.s >&5
14832 fi
14833 rm -f conftest.o conftest.s
14834 fi
ad9c4d9f 14835fi
ba479fd2
NN
14836echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
14837echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 14838if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
14839
14840cat >>confdefs.h <<\_ACEOF
5f0e9ea2 14841#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 14842_ACEOF
5f0e9ea2
GK
14843
14844fi
8ada417f 14845fi
5f0e9ea2 14846
ba479fd2
NN
14847echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
14848echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 14849gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 14850if test $in_tree_ld = yes ; then
5408ac6c
HPN
14851 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 \
14852 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
14853 gcc_cv_ld_ro_rw_mix=read-write
14854 fi
14855elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
14856 echo '.section myfoosect, "a"' > conftest1.s
14857 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 14858 echo '.byte 1' >> conftest2.s
90e145da 14859 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 14860 echo '.byte 0' >> conftest3.s
6cd656d0
KC
14861 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
14862 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
14863 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 14864 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 14865 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 14866 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 14867 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
14868 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
14869 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
14870 gcc_cv_ld_ro_rw_mix=read-only
14871 else
14872 gcc_cv_ld_ro_rw_mix=read-write
14873 fi
14874 fi
14875 fi
14876 rm -f conftest.* conftest[123].*
14877fi
14878if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
14879
14880cat >>confdefs.h <<\_ACEOF
96d0f4dc 14881#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 14882_ACEOF
96d0f4dc
JJ
14883
14884fi
ba479fd2
NN
14885echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
14886echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 14887
ba479fd2
NN
14888echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
14889echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 14890gcc_cv_ld_eh_frame_hdr=no
34a86c2b 14891if test $in_tree_ld = yes ; then
5408ac6c
HPN
14892 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 \
14893 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
14894 gcc_cv_ld_eh_frame_hdr=yes
14895 fi
14896elif test x$gcc_cv_ld != x; then
14897 # Check if linker supports --eh-frame-hdr option
14898 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
14899 gcc_cv_ld_eh_frame_hdr=yes
14900 fi
14901fi
14902if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
14903
14904cat >>confdefs.h <<\_ACEOF
275b60d6 14905#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 14906_ACEOF
275b60d6
JJ
14907
14908fi
ba479fd2
NN
14909echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
14910echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 14911
ba479fd2
NN
14912echo "$as_me:$LINENO: checking linker position independent executable support" >&5
14913echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
14914gcc_cv_ld_pie=no
14915if test $in_tree_ld = yes ; then
5408ac6c
HPN
14916 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 \
14917 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
14918 gcc_cv_ld_pie=yes
14919 fi
14920elif test x$gcc_cv_ld != x; then
14921 # Check if linker supports -pie option
14922 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
14923 gcc_cv_ld_pie=yes
14924 fi
14925fi
14926if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
14927
14928cat >>confdefs.h <<\_ACEOF
24a4dd31 14929#define HAVE_LD_PIE 1
ba479fd2 14930_ACEOF
24a4dd31
JJ
14931
14932fi
ba479fd2
NN
14933echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
14934echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 14935
8bb915b6
NN
14936# --------
14937# UNSORTED
14938# --------
14939
765f1bf9
AM
14940echo "$as_me:$LINENO: checking linker --as-needed support" >&5
14941echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
14942if test "${gcc_cv_ld_as_needed+set}" = set; then
14943 echo $ECHO_N "(cached) $ECHO_C" >&6
14944else
14945 gcc_cv_ld_as_needed=no
765f1bf9
AM
14946if test $in_tree_ld = yes ; then
14947 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 \
14948 && test $in_tree_ld_is_elf = yes; then
14949 gcc_cv_ld_as_needed=yes
14950 fi
14951elif test x$gcc_cv_ld != x; then
14952 # Check if linker supports --as-needed and --no-as-needed options
14953 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
14954 gcc_cv_ld_as_needed=yes
14955 fi
14956fi
82e923f6
RS
14957
14958fi
14959echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
14960echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
14961if test x"$gcc_cv_ld_as_needed" = xyes; then
14962
14963cat >>confdefs.h <<\_ACEOF
14964#define HAVE_LD_AS_NEEDED 1
14965_ACEOF
14966
14967fi
765f1bf9 14968
85b776df
AM
14969case "$target" in
14970 powerpc64*-*-linux*)
14971 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
14972echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
14973if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
14974 echo $ECHO_N "(cached) $ECHO_C" >&6
14975else
14976 gcc_cv_ld_no_dot_syms=no
14977 if test $in_tree_ld = yes ; then
14978 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
14979 gcc_cv_ld_no_dot_syms=yes
14980 fi
14981 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
14982 cat > conftest1.s <<EOF
14983 .text
14984 bl .foo
14985EOF
14986 cat > conftest2.s <<EOF
14987 .section ".opd","aw"
14988 .align 3
14989 .globl foo
14990 .type foo,@function
14991foo:
14992 .quad .LEfoo,.TOC.@tocbase,0
14993 .text
14994.LEfoo:
14995 blr
14996 .size foo,.-.LEfoo
14997EOF
14998 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
14999 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
15000 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
15001 gcc_cv_ld_no_dot_syms=yes
15002 fi
15003 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
15004 fi
15005
15006fi
15007echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
15008echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
15009 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
15010
15011cat >>confdefs.h <<\_ACEOF
15012#define HAVE_LD_NO_DOT_SYMS 1
15013_ACEOF
15014
15015 fi
15016 ;;
15017esac
15018
9fb28a67 15019if test x$with_sysroot = x && test x$host = x$target \
047d636f 15020 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
15021
15022cat >>confdefs.h <<_ACEOF
793e9558 15023#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 15024_ACEOF
793e9558
PB
15025
15026fi
15027
81bf3d9e 15028# Find out what GC implementation we want, or may, use.
ba479fd2 15029
81bf3d9e
RH
15030# Check whether --with-gc or --without-gc was given.
15031if test "${with_gc+set}" = set; then
15032 withval="$with_gc"
15033 case "$withval" in
08cee789 15034 page)
81bf3d9e 15035 GGC=ggc-$withval
08cee789
DJ
15036 ;;
15037 zone)
15038 GGC=ggc-$withval
15039
15040cat >>confdefs.h <<\_ACEOF
15041#define GGC_ZONE 1
15042_ACEOF
15043
81bf3d9e
RH
15044 ;;
15045 *)
ba479fd2
NN
15046 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
15047echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
15048 { (exit 1); exit 1; }; }
81bf3d9e
RH
15049 ;;
15050esac
15051else
005537df 15052 GGC=ggc-page
ba479fd2 15053fi;
81bf3d9e
RH
15054
15055echo "Using $GGC for garbage collection."
15056
3c809ba4 15057# Use the system's zlib library.
b8dad04b
ZW
15058zlibdir=-L../zlib
15059zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 15060
3c809ba4
AG
15061# Check whether --with-system-zlib or --without-system-zlib was given.
15062if test "${with_system_zlib+set}" = set; then
15063 withval="$with_system_zlib"
15064 zlibdir=
15065zlibinc=
15066
ba479fd2 15067fi;
3c809ba4
AG
15068
15069
15070
dc6746e7 15071
ba479fd2
NN
15072echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
15073echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
15074 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
15075if test "${enable_maintainer_mode+set}" = set; then
15076 enableval="$enable_maintainer_mode"
15077 maintainer_mode=$enableval
15078else
15079 maintainer_mode=no
ba479fd2 15080fi;
63cf211a 15081
ba479fd2
NN
15082echo "$as_me:$LINENO: result: $maintainer_mode" >&5
15083echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
15084
15085if test "$maintainer_mode" = "yes"; then
15086 MAINT=''
15087else
15088 MAINT='#'
15089fi
15090
8bb915b6
NN
15091# --------------
15092# Language hooks
15093# --------------
15094
861bb6c1
JL
15095# Make empty files to contain the specs and options for each language.
15096# Then add #include lines to for a compiler that has specs and/or options.
15097
d7b42618 15098lang_opt_files=
861bb6c1 15099lang_specs_files=
3103b7db 15100lang_tree_files=
861bb6c1
JL
15101for subdir in . $subdirs
15102do
d7b42618
NB
15103 if test -f $srcdir/$subdir/lang.opt; then
15104 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
15105 fi
75bffa71 15106 if test -f $srcdir/$subdir/lang-specs.h; then
0d24f4d1 15107 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
861bb6c1 15108 fi
3103b7db 15109 if test -f $srcdir/$subdir/$subdir-tree.def; then
0d24f4d1 15110 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
3103b7db 15111 fi
861bb6c1
JL
15112done
15113
15114# These (without "all_") are set in each config-lang.in.
15115# `language' must be a single word so is spelled singularly.
15116all_languages=
15117all_boot_languages=
15118all_compilers=
15119all_stagestuff=
53c7ffe7 15120all_outputs='Makefile gccbug mklibgcc libada-mk'
861bb6c1 15121# List of language makefile fragments.
2ed26f6b
ZW
15122all_lang_makefrags=
15123# List of language subdirectory makefiles. Deprecated.
861bb6c1 15124all_lang_makefiles=
e2500fed 15125# Files for gengtype
ef69da62 15126all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
15127# Files for gengtype with language
15128all_gtfiles_files_langs=
15129all_gtfiles_files_files=
861bb6c1
JL
15130
15131# Add the language fragments.
15132# Languages are added via two mechanisms. Some information must be
15133# recorded in makefile variables, these are defined in config-lang.in.
15134# We accumulate them and plug them into the main Makefile.
15135# The other mechanism is a set of hooks for each of the main targets
15136# like `clean', `install', etc.
15137
861bb6c1 15138language_hooks="Make-hooks"
861bb6c1 15139
c406e779 15140for s in $subdirs
861bb6c1 15141do
861bb6c1
JL
15142 language=
15143 boot_language=
15144 compilers=
15145 stagestuff=
861bb6c1 15146 outputs=
e2500fed 15147 gtfiles=
861bb6c1 15148 . ${srcdir}/$s/config-lang.in
75bffa71 15149 if test "x$language" = x
861bb6c1
JL
15150 then
15151 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
15152 exit 1
15153 fi
2ed26f6b 15154 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
72aaffbd 15155 if test -f ${srcdir}/$s/Makefile.in
2ed26f6b 15156 then all_lang_makefiles="$s/Makefile"
72aaffbd 15157 fi
861bb6c1 15158 all_languages="$all_languages $language"
75bffa71 15159 if test "x$boot_language" = xyes
861bb6c1
JL
15160 then
15161 all_boot_languages="$all_boot_languages $language"
15162 fi
15163 all_compilers="$all_compilers $compilers"
15164 all_stagestuff="$all_stagestuff $stagestuff"
861bb6c1 15165 all_outputs="$all_outputs $outputs"
e2500fed 15166 all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15167 for f in $gtfiles
8ac9d31f 15168 do
8ac9d31f
TJ
15169 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
15170 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f 15171 done
861bb6c1
JL
15172done
15173
8ac9d31f
TJ
15174# Pick up gtfiles for c
15175gtfiles=
15176s="c"
15177. ${srcdir}/c-config-lang.in
15178all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15179for f in $gtfiles
8ac9d31f 15180do
8ac9d31f
TJ
15181 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
15182 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
15183done
15184
cbc59f01 15185check_languages=
c406e779 15186for language in $all_languages
cbc59f01 15187do
cbc59f01 15188 check_languages="$check_languages check-$language"
cbc59f01
DD
15189done
15190
62b81e45
MM
15191# We link each language in with a set of hooks, reached indirectly via
15192# lang.${target}.
861bb6c1
JL
15193
15194rm -f Make-hooks
15195touch Make-hooks
65ebbf81 15196target_list="all.build all.cross start.encap rest.encap tags \
a207b594 15197 install-normal install-common install-man \
a541f69d 15198 uninstall info man srcextra srcman srcinfo \
a03ad584 15199 mostlyclean clean distclean maintainer-clean \
8f231b5d 15200 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
861bb6c1
JL
15201for t in $target_list
15202do
15203 x=
c406e779 15204 for lang in $all_languages
861bb6c1 15205 do
ab87f8c8 15206 x="$x $lang.$t"
861bb6c1
JL
15207 done
15208 echo "lang.$t: $x" >> Make-hooks
15209done
15210
8bb915b6
NN
15211# --------
15212# UNSORTED
15213# --------
15214
cc06d68c 15215# Create .gdbinit.
861bb6c1 15216
cc06d68c
GP
15217echo "dir ." > .gdbinit
15218echo "dir ${srcdir}" >> .gdbinit
15219if test x$gdb_needs_out_file_path = xyes
15220then
15221 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
15222fi
15223if test "x$subdirs" != x; then
15224 for s in $subdirs
15225 do
15226 echo "dir ${srcdir}/$s" >> .gdbinit
15227 done
861bb6c1 15228fi
cc06d68c 15229echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 15230
8f8d3278
NC
15231# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
15232# absolute path for gcc_tooldir based on inserting the number of up-directory
15233# movements required to get from $(exec_prefix) to $(prefix) into the basic
15234# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
15235# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
15236# make and thus we'd get different behavior depending on where we built the
15237# sources.
5949a9fc 15238if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 15239 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 15240else
8f8d3278
NC
15241# An explanation of the sed strings:
15242# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
15243# -e 's|/$||' match a trailing forward slash and eliminates it
15244# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 15245# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
15246#
15247# (*) Note this pattern overwrites the first character of the string
15248# with a forward slash if one is not already present. This is not a
15249# problem because the exact names of the sub-directories concerned is
15250# unimportant, just the number of them matters.
15251#
15252# The practical upshot of these patterns is like this:
15253#
15254# prefix exec_prefix result
15255# ------ ----------- ------
15256# /foo /foo/bar ../
15257# /foo/ /foo/bar ../
15258# /foo /foo/bar/ ../
15259# /foo/ /foo/bar/ ../
15260# /foo /foo/bar/ugg ../../
15261#
4c112cda 15262 dollar='$$'
caa55b1e 15263 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
15264fi
15265
15266
2ce3c6c6 15267
2bbea3a6
RH
15268# Find a directory in which to install a shared libgcc.
15269
15270# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
15271if test "${enable_version_specific_runtime_libs+set}" = set; then
15272 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
15273
15274fi;
2bbea3a6
RH
15275
15276
5b15f277
RH
15277# Check whether --with-slibdir or --without-slibdir was given.
15278if test "${with_slibdir+set}" = set; then
15279 withval="$with_slibdir"
15280 slibdir="$with_slibdir"
15281else
15282 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 15283 slibdir='$(libsubdir)'
5b15f277 15284elif test "$host" != "$target"; then
2bbea3a6
RH
15285 slibdir='$(build_tooldir)/lib'
15286else
5b15f277 15287 slibdir='$(libdir)'
2bbea3a6 15288fi
ba479fd2 15289fi;
2bbea3a6
RH
15290
15291
1e6347d8 15292objdir=`${PWDCMD-pwd}`
7e717196
JL
15293
15294
861bb6c1
JL
15295# Substitute configuration variables
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
9b16d2c4 15342
e9a25f70 15343
6e26218f 15344
c8724862 15345
e061d1ce 15346
d8bb17c8 15347
11642c3a
ZW
15348
15349
15350
15351
15352
15353
15354
3d9d2476 15355
e2500fed 15356
51b9ff45 15357
861bb6c1 15358
6e3f3080
NN
15359# Echo link setup.
15360if test x${build} = x${host} ; then
15361 if test x${host} = x${target} ; then
15362 echo "Links are now set up to build a native compiler for ${target}." 1>&2
15363 else
15364 echo "Links are now set up to build a cross-compiler" 1>&2
15365 echo " from ${host} to ${target}." 1>&2
15366 fi
15367else
15368 if test x${host} = x${target} ; then
15369 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
15370 echo " for ${target}." 1>&2
15371 else
15372 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
15373 echo " from ${host} to ${target}." 1>&2
15374 fi
15375fi
15376
6de9cd9a
DN
15377
15378
15379
6e3f3080
NN
15380# Configure the subdirectories
15381# AC_CONFIG_SUBDIRS($subdirs)
15382
15383# Create the Makefile
15384# and configure language subdirectories
ba479fd2 15385 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
15386
15387
ba479fd2 15388 ac_config_commands="$ac_config_commands default"
914c5af7 15389
ba479fd2 15390cat >confcache <<\_ACEOF
6e3f3080
NN
15391# This file is a shell script that caches the results of configure
15392# tests run on this system so they can be shared between configure
ba479fd2
NN
15393# scripts and configure runs, see configure's option --config-cache.
15394# It is not useful on other systems. If it contains results you don't
15395# want to keep, you may remove or edit it.
6e3f3080 15396#
ba479fd2
NN
15397# config.status only pays attention to the cache file if you give it
15398# the --recheck option to rerun configure.
6e3f3080 15399#
ba479fd2
NN
15400# `ac_cv_env_foo' variables (set or unset) will be overridden when
15401# loading this file, other *unset* `ac_cv_foo' will be assigned the
15402# following values.
15403
15404_ACEOF
15405
6e3f3080
NN
15406# The following way of writing the cache mishandles newlines in values,
15407# but we know of no workaround that is simple, portable, and efficient.
15408# So, don't put newlines in cache variables' values.
15409# Ultrix sh set writes to stderr and can't be redirected directly,
15410# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
15411{
15412 (set) 2>&1 |
15413 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15414 *ac_space=\ *)
15415 # `set' does not quote correctly, so add quotes (double-quote
15416 # substitution turns \\\\ into \\, and sed turns \\ into \).
15417 sed -n \
86da66b5
HPN
15418 "s/'/'\\\\''/g;
15419 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ba479fd2
NN
15420 ;;
15421 *)
15422 # `set' quotes correctly as required by POSIX, so do not add quotes.
15423 sed -n \
86da66b5 15424 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
15425 ;;
15426 esac;
15427} |
15428 sed '
15429 t clear
15430 : clear
15431 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15432 t end
15433 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15434 : end' >>confcache
15435if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 15436 if test -w $cache_file; then
ba479fd2
NN
15437 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15438 cat confcache >$cache_file
6e3f3080
NN
15439 else
15440 echo "not updating unwritable cache $cache_file"
15441 fi
15442fi
15443rm -f confcache
15444
15445test "x$prefix" = xNONE && prefix=$ac_default_prefix
15446# Let make expand exec_prefix.
15447test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15448
ba479fd2
NN
15449# VPATH may cause trouble with some makes, so we remove $(srcdir),
15450# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15451# trailing colons and then remove the whole line if VPATH becomes empty
15452# (actually we leave an empty line to preserve line numbers).
6e3f3080 15453if test "x$srcdir" = x.; then
86da66b5 15454 ac_vpsub='/^[ ]*VPATH[ ]*=/{
ba479fd2
NN
15455s/:*\$(srcdir):*/:/;
15456s/:*\${srcdir}:*/:/;
15457s/:*@srcdir@:*/:/;
86da66b5 15458s/^\([^=]*=[ ]*\):*/\1/;
ba479fd2 15459s/:*$//;
86da66b5 15460s/^[^=]*=[ ]*$//;
ba479fd2 15461}'
6e3f3080
NN
15462fi
15463
63cf211a 15464DEFS=-DHAVE_CONFIG_H
6e3f3080 15465
ba479fd2
NN
15466ac_libobjs=
15467ac_ltlibobjs=
15468for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15469 # 1. Remove the extension, and $U if already installed.
15470 ac_i=`echo "$ac_i" |
86da66b5 15471 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
ba479fd2
NN
15472 # 2. Add them.
15473 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
15474 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
15475done
15476LIBOBJS=$ac_libobjs
63cf211a 15477
ba479fd2
NN
15478LTLIBOBJS=$ac_ltlibobjs
15479
15480
15481
15482: ${CONFIG_STATUS=./config.status}
15483ac_clean_files_save=$ac_clean_files
15484ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15485{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15486echo "$as_me: creating $CONFIG_STATUS" >&6;}
15487cat >$CONFIG_STATUS <<_ACEOF
15488#! $SHELL
15489# Generated by $as_me.
6e3f3080
NN
15490# Run this file to recreate the current configuration.
15491# Compiler output produced by configure, useful for debugging
ba479fd2 15492# configure, is in config.log if it exists.
6e3f3080 15493
ba479fd2
NN
15494debug=false
15495ac_cs_recheck=false
15496ac_cs_silent=false
15497SHELL=\${CONFIG_SHELL-$SHELL}
15498_ACEOF
15499
15500cat >>$CONFIG_STATUS <<\_ACEOF
15501## --------------------- ##
15502## M4sh Initialization. ##
15503## --------------------- ##
15504
15505# Be Bourne compatible
15506if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15507 emulate sh
15508 NULLCMD=:
15509 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
15510 # is contrary to our usage. Disable this feature.
15511 alias -g '${1+"$@"}'='"$@"'
15512elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15513 set -o posix
15514fi
86da66b5 15515DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
15516
15517# Support unset when possible.
86da66b5 15518if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
15519 as_unset=unset
15520else
15521 as_unset=false
15522fi
15523
15524
15525# Work around bugs in pre-3.0 UWIN ksh.
15526$as_unset ENV MAIL MAILPATH
15527PS1='$ '
15528PS2='> '
15529PS4='+ '
15530
15531# NLS nuisances.
15532for as_var in \
15533 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
15534 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
15535 LC_TELEPHONE LC_TIME
6e3f3080 15536do
86da66b5 15537 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
15538 eval $as_var=C; export $as_var
15539 else
15540 $as_unset $as_var
15541 fi
6e3f3080
NN
15542done
15543
ba479fd2
NN
15544# Required to use basename.
15545if expr a : '\(a\)' >/dev/null 2>&1; then
15546 as_expr=expr
15547else
15548 as_expr=false
15549fi
6e3f3080 15550
ba479fd2
NN
15551if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
15552 as_basename=basename
15553else
15554 as_basename=false
15555fi
6e3f3080
NN
15556
15557
ba479fd2
NN
15558# Name of the executable.
15559as_me=`$as_basename "$0" ||
15560$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15561 X"$0" : 'X\(//\)$' \| \
15562 X"$0" : 'X\(/\)$' \| \
15563 . : '\(.\)' 2>/dev/null ||
15564echo X/"$0" |
15565 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15566 /^X\/\(\/\/\)$/{ s//\1/; q; }
15567 /^X\/\(\/\).*/{ s//\1/; q; }
15568 s/.*/./; q'`
15569
6e3f3080 15570
ba479fd2
NN
15571# PATH needs CR, and LINENO needs CR and PATH.
15572# Avoid depending upon Character Ranges.
15573as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15574as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15575as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15576as_cr_digits='0123456789'
15577as_cr_alnum=$as_cr_Letters$as_cr_digits
15578
15579# The user is always right.
15580if test "${PATH_SEPARATOR+set}" != set; then
15581 echo "#! /bin/sh" >conf$$.sh
15582 echo "exit 0" >>conf$$.sh
15583 chmod +x conf$$.sh
15584 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
15585 PATH_SEPARATOR=';'
6e3f3080 15586 else
ba479fd2
NN
15587 PATH_SEPARATOR=:
15588 fi
15589 rm -f conf$$.sh
15590fi
15591
15592
15593 as_lineno_1=$LINENO
15594 as_lineno_2=$LINENO
15595 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15596 test "x$as_lineno_1" != "x$as_lineno_2" &&
15597 test "x$as_lineno_3" = "x$as_lineno_2" || {
15598 # Find who we are. Look in the path if we contain no path at all
15599 # relative or not.
15600 case $0 in
15601 *[\\/]* ) as_myself=$0 ;;
15602 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15603for as_dir in $PATH
15604do
15605 IFS=$as_save_IFS
15606 test -z "$as_dir" && as_dir=.
15607 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15608done
15609
15610 ;;
15611 esac
15612 # We did not find ourselves, most probably we were run as `sh COMMAND'
15613 # in which case we are not to be found in the path.
15614 if test "x$as_myself" = x; then
15615 as_myself=$0
15616 fi
15617 if test ! -f "$as_myself"; then
15618 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
15619echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
15620 { (exit 1); exit 1; }; }
6e3f3080 15621 fi
ba479fd2
NN
15622 case $CONFIG_SHELL in
15623 '')
15624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15625for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
15626do
15627 IFS=$as_save_IFS
15628 test -z "$as_dir" && as_dir=.
15629 for as_base in sh bash ksh sh5; do
15630 case $as_dir in
15631 /*)
15632 if ("$as_dir/$as_base" -c '
15633 as_lineno_1=$LINENO
15634 as_lineno_2=$LINENO
15635 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15636 test "x$as_lineno_1" != "x$as_lineno_2" &&
15637 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
15638 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
15639 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
15640 CONFIG_SHELL=$as_dir/$as_base
15641 export CONFIG_SHELL
15642 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
15643 fi;;
15644 esac
15645 done
15646done
15647;;
15648 esac
15649
15650 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
15651 # uniformly replaced by the line number. The first 'sed' inserts a
15652 # line-number line before each line; the second 'sed' does the real
15653 # work. The second script uses 'N' to pair each line-number line
15654 # with the numbered line, and appends trailing '-' during
15655 # substitution so that $LINENO is not a special case at line end.
15656 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
15657 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
15658 sed '=' <$as_myself |
15659 sed '
15660 N
15661 s,$,-,
15662 : loop
15663 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
15664 t loop
15665 s,-$,,
15666 s,^['$as_cr_digits']*\n,,
15667 ' >$as_me.lineno &&
15668 chmod +x $as_me.lineno ||
15669 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
15670echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
15671 { (exit 1); exit 1; }; }
15672
15673 # Don't try to exec as it changes $[0], causing all sort of problems
15674 # (the dirname of $[0] is not the place where we might find the
15675 # original and so on. Autoconf is especially sensible to this).
15676 . ./$as_me.lineno
15677 # Exit status is that of the last command.
15678 exit
15679}
15680
15681
15682case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
15683 *c*,-n*) ECHO_N= ECHO_C='
15684' ECHO_T=' ' ;;
15685 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
15686 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
15687esac
15688
15689if expr a : '\(a\)' >/dev/null 2>&1; then
15690 as_expr=expr
15691else
15692 as_expr=false
15693fi
15694
15695rm -f conf$$ conf$$.exe conf$$.file
15696echo >conf$$.file
15697if ln -s conf$$.file conf$$ 2>/dev/null; then
15698 # We could just check for DJGPP; but this test a) works b) is more generic
15699 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15700 if test -f conf$$.exe; then
15701 # Don't use ln at all; we don't have any links
15702 as_ln_s='cp -p'
6e3f3080 15703 else
ba479fd2 15704 as_ln_s='ln -s'
6e3f3080 15705 fi
ba479fd2
NN
15706elif ln conf$$.file conf$$ 2>/dev/null; then
15707 as_ln_s=ln
15708else
15709 as_ln_s='cp -p'
15710fi
15711rm -f conf$$ conf$$.exe conf$$.file
15712
15713if mkdir -p . 2>/dev/null; then
15714 as_mkdir_p=:
15715else
86da66b5 15716 test -d ./-p && rmdir ./-p
ba479fd2
NN
15717 as_mkdir_p=false
15718fi
15719
15720as_executable_p="test -f"
15721
15722# Sed expression to map a string onto a valid CPP name.
86da66b5 15723as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
15724
15725# Sed expression to map a string onto a valid variable name.
86da66b5 15726as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
15727
15728
15729# IFS
15730# We need space, tab and new line, in precisely that order.
15731as_nl='
15732'
15733IFS=" $as_nl"
15734
15735# CDPATH.
15736$as_unset CDPATH
15737
15738exec 6>&1
15739
15740# Open the log real soon, to keep \$[0] and so on meaningful, and to
15741# report actual input values of CONFIG_FILES etc. instead of their
15742# values after options handling. Logging --version etc. is OK.
15743exec 5>>config.log
15744{
15745 echo
15746 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15747## Running $as_me. ##
15748_ASBOX
15749} >&5
15750cat >&5 <<_CSEOF
15751
15752This file was extended by $as_me, which was
8ab705be 15753generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
15754
15755 CONFIG_FILES = $CONFIG_FILES
15756 CONFIG_HEADERS = $CONFIG_HEADERS
15757 CONFIG_LINKS = $CONFIG_LINKS
15758 CONFIG_COMMANDS = $CONFIG_COMMANDS
15759 $ $0 $@
15760
15761_CSEOF
15762echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
15763echo >&5
15764_ACEOF
15765
15766# Files that config.status was made for.
15767if test -n "$ac_config_files"; then
15768 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15769fi
15770
15771if test -n "$ac_config_headers"; then
15772 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15773fi
15774
15775if test -n "$ac_config_links"; then
15776 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15777fi
15778
15779if test -n "$ac_config_commands"; then
15780 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15781fi
15782
15783cat >>$CONFIG_STATUS <<\_ACEOF
15784
15785ac_cs_usage="\
15786\`$as_me' instantiates files from templates according to the
15787current configuration.
15788
15789Usage: $0 [OPTIONS] [FILE]...
15790
15791 -h, --help print this help, then exit
15792 -V, --version print version number, then exit
15793 -q, --quiet do not print progress messages
15794 -d, --debug don't remove temporary files
15795 --recheck update $as_me by reconfiguring in the same conditions
15796 --file=FILE[:TEMPLATE]
86da66b5 15797 instantiate the configuration file FILE
ba479fd2 15798 --header=FILE[:TEMPLATE]
86da66b5 15799 instantiate the configuration header FILE
ba479fd2
NN
15800
15801Configuration files:
15802$config_files
15803
15804Configuration headers:
15805$config_headers
15806
15807Configuration commands:
15808$config_commands
15809
15810Report bugs to <bug-autoconf@gnu.org>."
15811_ACEOF
15812
15813cat >>$CONFIG_STATUS <<_ACEOF
15814ac_cs_version="\\
15815config.status
8ab705be 15816configured by $0, generated by GNU Autoconf 2.59,
ba479fd2
NN
15817 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15818
86da66b5 15819Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
15820This config.status script is free software; the Free Software Foundation
15821gives unlimited permission to copy, distribute and modify it."
15822srcdir=$srcdir
15823_ACEOF
15824
15825cat >>$CONFIG_STATUS <<\_ACEOF
15826# If no file are specified by the user, then we need to provide default
15827# value. By we need to know if files were specified by the user.
15828ac_need_defaults=:
15829while test $# != 0
15830do
15831 case $1 in
15832 --*=*)
15833 ac_option=`expr "x$1" : 'x\([^=]*\)='`
15834 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15835 ac_shift=:
15836 ;;
15837 -*)
15838 ac_option=$1
15839 ac_optarg=$2
15840 ac_shift=shift
15841 ;;
15842 *) # This is not an option, so the user has probably given explicit
15843 # arguments.
15844 ac_option=$1
15845 ac_need_defaults=false;;
15846 esac
15847
15848 case $ac_option in
15849 # Handling of the options.
15850_ACEOF
15851cat >>$CONFIG_STATUS <<\_ACEOF
15852 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15853 ac_cs_recheck=: ;;
15854 --version | --vers* | -V )
15855 echo "$ac_cs_version"; exit 0 ;;
15856 --he | --h)
15857 # Conflict between --help and --header
15858 { { echo "$as_me:$LINENO: error: ambiguous option: $1
15859Try \`$0 --help' for more information." >&5
15860echo "$as_me: error: ambiguous option: $1
15861Try \`$0 --help' for more information." >&2;}
15862 { (exit 1); exit 1; }; };;
15863 --help | --hel | -h )
15864 echo "$ac_cs_usage"; exit 0 ;;
15865 --debug | --d* | -d )
15866 debug=: ;;
15867 --file | --fil | --fi | --f )
15868 $ac_shift
15869 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
15870 ac_need_defaults=false;;
15871 --header | --heade | --head | --hea )
15872 $ac_shift
15873 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
15874 ac_need_defaults=false;;
15875 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15876 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15877 ac_cs_silent=: ;;
15878
15879 # This is an error.
15880 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
15881Try \`$0 --help' for more information." >&5
15882echo "$as_me: error: unrecognized option: $1
15883Try \`$0 --help' for more information." >&2;}
15884 { (exit 1); exit 1; }; } ;;
15885
15886 *) ac_config_targets="$ac_config_targets $1" ;;
15887
15888 esac
15889 shift
6e3f3080 15890done
ba479fd2
NN
15891
15892ac_configure_extra_args=
15893
15894if $ac_cs_silent; then
15895 exec 6>/dev/null
15896 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
15897fi
15898
ba479fd2
NN
15899_ACEOF
15900cat >>$CONFIG_STATUS <<_ACEOF
15901if \$ac_cs_recheck; then
15902 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
15903 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15904fi
861bb6c1 15905
ba479fd2
NN
15906_ACEOF
15907
15908cat >>$CONFIG_STATUS <<_ACEOF
15909#
15910# INIT-COMMANDS section.
15911#
15912
15913subdirs='$subdirs'
ba479fd2
NN
15914
15915_ACEOF
15916
15917
15918
15919cat >>$CONFIG_STATUS <<\_ACEOF
15920for ac_config_target in $ac_config_targets
15921do
15922 case "$ac_config_target" in
15923 # Handling of arguments.
15924 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
15925 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15926 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
15927 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
15928echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15929 { (exit 1); exit 1; }; };;
861bb6c1 15930 esac
ba479fd2
NN
15931done
15932
15933# If the user did not use the arguments to specify the items to instantiate,
15934# then the envvar interface is used. Set only those that are not.
15935# We use the long form for the default assignment because of an extremely
15936# bizarre bug on SunOS 4.1.3.
15937if $ac_need_defaults; then
15938 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15939 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15940 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15941fi
15942
15943# Have a temporary directory for convenience. Make it in the build tree
15944# simply because there is no reason to put it here, and in addition,
15945# creating and moving files from /tmp can sometimes cause problems.
15946# Create a temporary directory, and hook for its removal unless debugging.
15947$debug ||
15948{
15949 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15950 trap '{ (exit 1); exit 1; }' 1 2 13 15
15951}
861bb6c1 15952
ba479fd2 15953# Create a (secure) tmp directory for tmp files.
6e3f3080 15954
ba479fd2
NN
15955{
15956 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
15957 test -n "$tmp" && test -d "$tmp"
15958} ||
15959{
15960 tmp=./confstat$$-$RANDOM
15961 (umask 077 && mkdir $tmp)
15962} ||
15963{
15964 echo "$me: cannot create a temporary directory in ." >&2
15965 { (exit 1); exit 1; }
15966}
15967
15968_ACEOF
15969
15970cat >>$CONFIG_STATUS <<_ACEOF
15971
15972#
15973# CONFIG_FILES section.
15974#
15975
15976# No need to generate the scripts if there are no CONFIG_FILES.
15977# This happens for instance when ./config.status config.h
15978if test -n "\$CONFIG_FILES"; then
15979 # Protect against being on the right side of a sed subst in config.status.
15980 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15981 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15982s,@SHELL@,$SHELL,;t t
15983s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15984s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15985s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15986s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15987s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15988s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15989s,@exec_prefix@,$exec_prefix,;t t
15990s,@prefix@,$prefix,;t t
15991s,@program_transform_name@,$program_transform_name,;t t
15992s,@bindir@,$bindir,;t t
15993s,@sbindir@,$sbindir,;t t
15994s,@libexecdir@,$libexecdir,;t t
15995s,@datadir@,$datadir,;t t
15996s,@sysconfdir@,$sysconfdir,;t t
15997s,@sharedstatedir@,$sharedstatedir,;t t
15998s,@localstatedir@,$localstatedir,;t t
15999s,@libdir@,$libdir,;t t
16000s,@includedir@,$includedir,;t t
16001s,@oldincludedir@,$oldincludedir,;t t
16002s,@infodir@,$infodir,;t t
16003s,@mandir@,$mandir,;t t
16004s,@build_alias@,$build_alias,;t t
16005s,@host_alias@,$host_alias,;t t
16006s,@target_alias@,$target_alias,;t t
16007s,@DEFS@,$DEFS,;t t
16008s,@ECHO_C@,$ECHO_C,;t t
16009s,@ECHO_N@,$ECHO_N,;t t
16010s,@ECHO_T@,$ECHO_T,;t t
16011s,@LIBS@,$LIBS,;t t
16012s,@build@,$build,;t t
16013s,@build_cpu@,$build_cpu,;t t
16014s,@build_vendor@,$build_vendor,;t t
16015s,@build_os@,$build_os,;t t
16016s,@host@,$host,;t t
16017s,@host_cpu@,$host_cpu,;t t
16018s,@host_vendor@,$host_vendor,;t t
16019s,@host_os@,$host_os,;t t
16020s,@target@,$target,;t t
16021s,@target_cpu@,$target_cpu,;t t
16022s,@target_vendor@,$target_vendor,;t t
16023s,@target_os@,$target_os,;t t
8f1529e6 16024s,@target_noncanonical@,$target_noncanonical,;t t
ba479fd2
NN
16025s,@build_subdir@,$build_subdir,;t t
16026s,@host_subdir@,$host_subdir,;t t
16027s,@target_subdir@,$target_subdir,;t t
03787dfd 16028s,@GENINSRC@,$GENINSRC,;t t
ba479fd2
NN
16029s,@CC@,$CC,;t t
16030s,@CFLAGS@,$CFLAGS,;t t
16031s,@LDFLAGS@,$LDFLAGS,;t t
16032s,@CPPFLAGS@,$CPPFLAGS,;t t
16033s,@ac_ct_CC@,$ac_ct_CC,;t t
16034s,@EXEEXT@,$EXEEXT,;t t
16035s,@OBJEXT@,$OBJEXT,;t t
16036s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
16037s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
16038s,@CPP@,$CPP,;t t
bf3b7cd3 16039s,@EGREP@,$EGREP,;t t
ba479fd2
NN
16040s,@strict1_warn@,$strict1_warn,;t t
16041s,@warn_cflags@,$warn_cflags,;t t
16042s,@WERROR@,$WERROR,;t t
16043s,@nocommon_flag@,$nocommon_flag,;t t
13f05fd0 16044s,@TREEBROWSER@,$TREEBROWSER,;t t
ba479fd2
NN
16045s,@valgrind_path@,$valgrind_path,;t t
16046s,@valgrind_path_defines@,$valgrind_path_defines,;t t
16047s,@valgrind_command@,$valgrind_command,;t t
16048s,@coverage_flags@,$coverage_flags,;t t
16049s,@enable_multilib@,$enable_multilib,;t t
16050s,@enable_shared@,$enable_shared,;t t
16051s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
16052s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
16053s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
16054s,@onestep@,$onestep,;t t
16055s,@SET_MAKE@,$SET_MAKE,;t t
16056s,@AWK@,$AWK,;t t
ba479fd2 16057s,@LN_S@,$LN_S,;t t
41e622a8 16058s,@LN@,$LN,;t t
ba479fd2
NN
16059s,@RANLIB@,$RANLIB,;t t
16060s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
343a6100 16061s,@ranlib_flags@,$ranlib_flags,;t t
ba479fd2
NN
16062s,@INSTALL@,$INSTALL,;t t
16063s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16064s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16065s,@make_compare_target@,$make_compare_target,;t t
16066s,@have_mktemp_command@,$have_mktemp_command,;t t
16067s,@MAKEINFO@,$MAKEINFO,;t t
16068s,@BUILD_INFO@,$BUILD_INFO,;t t
16069s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
16070s,@FLEX@,$FLEX,;t t
16071s,@BISON@,$BISON,;t t
f6a874ac
JW
16072s,@NM@,$NM,;t t
16073s,@AR@,$AR,;t t
ba479fd2
NN
16074s,@stage1_cflags@,$stage1_cflags,;t t
16075s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
16076s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
16077s,@LDEXP_LIB@,$LDEXP_LIB,;t t
16078s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
16079s,@LIBICONV@,$LIBICONV,;t t
dfb77e37 16080s,@LTLIBICONV@,$LTLIBICONV,;t t
ba479fd2
NN
16081s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
16082s,@manext@,$manext,;t t
16083s,@objext@,$objext,;t t
8bb915b6 16084s,@gthread_flags@,$gthread_flags,;t t
ba479fd2 16085s,@extra_modes_file@,$extra_modes_file,;t t
75685792 16086s,@extra_opt_files@,$extra_opt_files,;t t
ba479fd2
NN
16087s,@USE_NLS@,$USE_NLS,;t t
16088s,@LIBINTL@,$LIBINTL,;t t
16089s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
16090s,@INCINTL@,$INCINTL,;t t
16091s,@XGETTEXT@,$XGETTEXT,;t t
16092s,@GMSGFMT@,$GMSGFMT,;t t
16093s,@POSUB@,$POSUB,;t t
16094s,@CATALOGS@,$CATALOGS,;t t
5395b47b 16095s,@host_cc_for_libada@,$host_cc_for_libada,;t t
ba479fd2
NN
16096s,@CROSS@,$CROSS,;t t
16097s,@ALL@,$ALL,;t t
16098s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
16099s,@inhibit_libc@,$inhibit_libc,;t t
ba479fd2
NN
16100s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
16101s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16102s,@STMP_FIXINC@,$STMP_FIXINC,;t t
16103s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
c38f02df 16104s,@collect2@,$collect2,;t t
ba479fd2 16105s,@libgcc_visibility@,$libgcc_visibility,;t t
ba479fd2
NN
16106s,@GGC@,$GGC,;t t
16107s,@zlibdir@,$zlibdir,;t t
16108s,@zlibinc@,$zlibinc,;t t
16109s,@MAINT@,$MAINT,;t t
16110s,@gcc_tooldir@,$gcc_tooldir,;t t
16111s,@dollar@,$dollar,;t t
16112s,@slibdir@,$slibdir,;t t
16113s,@objdir@,$objdir,;t t
16114s,@subdirs@,$subdirs,;t t
16115s,@srcdir@,$srcdir,;t t
ba479fd2
NN
16116s,@all_boot_languages@,$all_boot_languages,;t t
16117s,@all_compilers@,$all_compilers,;t t
16118s,@all_gtfiles@,$all_gtfiles,;t t
16119s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
16120s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
16121s,@all_lang_makefrags@,$all_lang_makefrags,;t t
16122s,@all_lang_makefiles@,$all_lang_makefiles,;t t
16123s,@all_languages@,$all_languages,;t t
16124s,@all_stagestuff@,$all_stagestuff,;t t
16125s,@build_exeext@,$build_exeext,;t t
16126s,@build_install_headers_dir@,$build_install_headers_dir,;t t
16127s,@build_xm_file_list@,$build_xm_file_list,;t t
16128s,@build_xm_include_list@,$build_xm_include_list,;t t
16129s,@build_xm_defines@,$build_xm_defines,;t t
16130s,@check_languages@,$check_languages,;t t
16131s,@cc_set_by_configure@,$cc_set_by_configure,;t t
16132s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
16133s,@cpp_install_dir@,$cpp_install_dir,;t t
16134s,@xmake_file@,$xmake_file,;t t
16135s,@tmake_file@,$tmake_file,;t t
30500d84 16136s,@extra_gcc_objs@,$extra_gcc_objs,;t t
ba479fd2
NN
16137s,@extra_headers_list@,$extra_headers_list,;t t
16138s,@extra_objs@,$extra_objs,;t t
16139s,@extra_parts@,$extra_parts,;t t
16140s,@extra_passes@,$extra_passes,;t t
16141s,@extra_programs@,$extra_programs,;t t
16142s,@float_h_file@,$float_h_file,;t t
16143s,@gcc_config_arguments@,$gcc_config_arguments,;t t
16144s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
16145s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
ba479fd2 16146s,@host_exeext@,$host_exeext,;t t
ba479fd2
NN
16147s,@host_xm_file_list@,$host_xm_file_list,;t t
16148s,@host_xm_include_list@,$host_xm_include_list,;t t
16149s,@host_xm_defines@,$host_xm_defines,;t t
16150s,@out_host_hook_obj@,$out_host_hook_obj,;t t
16151s,@install@,$install,;t t
16152s,@lang_opt_files@,$lang_opt_files,;t t
16153s,@lang_specs_files@,$lang_specs_files,;t t
16154s,@lang_tree_files@,$lang_tree_files,;t t
16155s,@local_prefix@,$local_prefix,;t t
16156s,@md_file@,$md_file,;t t
16157s,@objc_boehm_gc@,$objc_boehm_gc,;t t
16158s,@out_file@,$out_file,;t t
16159s,@out_object_file@,$out_object_file,;t t
16160s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
16161s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
ba479fd2
NN
16162s,@thread_file@,$thread_file,;t t
16163s,@tm_file_list@,$tm_file_list,;t t
16164s,@tm_include_list@,$tm_include_list,;t t
16165s,@tm_defines@,$tm_defines,;t t
16166s,@tm_p_file_list@,$tm_p_file_list,;t t
16167s,@tm_p_include_list@,$tm_p_include_list,;t t
16168s,@xm_file_list@,$xm_file_list,;t t
16169s,@xm_include_list@,$xm_include_list,;t t
16170s,@xm_defines@,$xm_defines,;t t
ba479fd2
NN
16171s,@c_target_objs@,$c_target_objs,;t t
16172s,@cxx_target_objs@,$cxx_target_objs,;t t
16173s,@target_cpu_default@,$target_cpu_default,;t t
6de9cd9a
DN
16174s,@GMPLIBS@,$GMPLIBS,;t t
16175s,@GMPINC@,$GMPINC,;t t
ba479fd2
NN
16176s,@LIBOBJS@,$LIBOBJS,;t t
16177s,@LTLIBOBJS@,$LTLIBOBJS,;t t
16178/@language_hooks@/r $language_hooks
16179s,@language_hooks@,,;t t
16180CEOF
16181
16182_ACEOF
16183
16184 cat >>$CONFIG_STATUS <<\_ACEOF
16185 # Split the substitutions into bite-sized pieces for seds with
16186 # small command number limits, like on Digital OSF/1 and HP-UX.
16187 ac_max_sed_lines=48
16188 ac_sed_frag=1 # Number of current file.
16189 ac_beg=1 # First line for current file.
16190 ac_end=$ac_max_sed_lines # Line after last line for current file.
16191 ac_more_lines=:
16192 ac_sed_cmds=
16193 while $ac_more_lines; do
16194 if test $ac_beg -gt 1; then
16195 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16196 else
16197 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16198 fi
16199 if test ! -s $tmp/subs.frag; then
16200 ac_more_lines=false
16201 else
16202 # The purpose of the label and of the branching condition is to
16203 # speed up the sed processing (if there are no `@' at all, there
16204 # is no need to browse any of the substitutions).
16205 # These are the two extra sed commands mentioned above.
16206 (echo ':t
16207 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16208 if test -z "$ac_sed_cmds"; then
86da66b5 16209 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2 16210 else
86da66b5 16211 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2
NN
16212 fi
16213 ac_sed_frag=`expr $ac_sed_frag + 1`
16214 ac_beg=$ac_end
16215 ac_end=`expr $ac_end + $ac_max_sed_lines`
16216 fi
16217 done
16218 if test -z "$ac_sed_cmds"; then
16219 ac_sed_cmds=cat
63cf211a 16220 fi
ba479fd2 16221fi # test -n "$CONFIG_FILES"
cafe096b 16222
ba479fd2
NN
16223_ACEOF
16224cat >>$CONFIG_STATUS <<\_ACEOF
16225for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16226 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16227 case $ac_file in
16228 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
16229 cat >$tmp/stdin
16230 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16231 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16232 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 16233 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16234 * ) ac_file_in=$ac_file.in ;;
63cf211a 16235 esac
cafe096b 16236
ba479fd2
NN
16237 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16238 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16239$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16240 X"$ac_file" : 'X\(//\)[^/]' \| \
16241 X"$ac_file" : 'X\(//\)$' \| \
16242 X"$ac_file" : 'X\(/\)' \| \
16243 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16244echo X"$ac_file" |
16245 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16246 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16247 /^X\(\/\/\)$/{ s//\1/; q; }
16248 /^X\(\/\).*/{ s//\1/; q; }
16249 s/.*/./; q'`
16250 { if $as_mkdir_p; then
16251 mkdir -p "$ac_dir"
16252 else
16253 as_dir="$ac_dir"
16254 as_dirs=
16255 while test ! -d "$as_dir"; do
16256 as_dirs="$as_dir $as_dirs"
16257 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16258$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16259 X"$as_dir" : 'X\(//\)[^/]' \| \
16260 X"$as_dir" : 'X\(//\)$' \| \
16261 X"$as_dir" : 'X\(/\)' \| \
16262 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16263echo X"$as_dir" |
16264 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16265 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16266 /^X\(\/\/\)$/{ s//\1/; q; }
16267 /^X\(\/\).*/{ s//\1/; q; }
16268 s/.*/./; q'`
16269 done
16270 test ! -n "$as_dirs" || mkdir $as_dirs
16271 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16272echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16273 { (exit 1); exit 1; }; }; }
6e3f3080 16274
ba479fd2
NN
16275 ac_builddir=.
16276
16277if test "$ac_dir" != .; then
16278 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16279 # A "../" for each directory in $ac_dir_suffix.
16280 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16281else
16282 ac_dir_suffix= ac_top_builddir=
16283fi
16284
16285case $srcdir in
16286 .) # No --srcdir option. We are building in place.
16287 ac_srcdir=.
16288 if test -z "$ac_top_builddir"; then
16289 ac_top_srcdir=.
16290 else
16291 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16292 fi ;;
16293 [\\/]* | ?:[\\/]* ) # Absolute path.
16294 ac_srcdir=$srcdir$ac_dir_suffix;
16295 ac_top_srcdir=$srcdir ;;
16296 *) # Relative path.
16297 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16298 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16299esac
8ab705be
KC
16300
16301# Do not use `cd foo && pwd` to compute absolute paths, because
16302# the directories may not exist.
16303case `pwd` in
16304.) ac_abs_builddir="$ac_dir";;
86da66b5 16305*)
8ab705be
KC
16306 case "$ac_dir" in
16307 .) ac_abs_builddir=`pwd`;;
16308 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
16309 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
16310 esac;;
16311esac
8ab705be 16312case $ac_abs_builddir in
86da66b5
HPN
16313.) ac_abs_top_builddir=${ac_top_builddir}.;;
16314*)
16315 case ${ac_top_builddir}. in
8ab705be 16316 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 16317 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 16318 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
16319 esac;;
16320esac
8ab705be 16321case $ac_abs_builddir in
86da66b5
HPN
16322.) ac_abs_srcdir=$ac_srcdir;;
16323*)
16324 case $ac_srcdir in
8ab705be 16325 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 16326 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 16327 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
16328 esac;;
16329esac
8ab705be 16330case $ac_abs_builddir in
86da66b5
HPN
16331.) ac_abs_top_srcdir=$ac_top_srcdir;;
16332*)
16333 case $ac_top_srcdir in
8ab705be 16334 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 16335 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 16336 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
16337 esac;;
16338esac
ba479fd2
NN
16339
16340
16341
a1286ef5
ZW
16342 if test x"$ac_file" != x-; then
16343 { echo "$as_me:$LINENO: creating $ac_file" >&5
16344echo "$as_me: creating $ac_file" >&6;}
16345 rm -f "$ac_file"
16346 fi
ba479fd2
NN
16347 # Let's still pretend it is `configure' which instantiates (i.e., don't
16348 # use $as_me), people would be surprised to read:
16349 # /* config.h. Generated by config.status. */
16350 if test x"$ac_file" = x-; then
16351 configure_input=
16352 else
16353 configure_input="$ac_file. "
16354 fi
16355 configure_input=$configure_input"Generated from `echo $ac_file_in |
86da66b5 16356 sed 's,.*/,,'` by configure."
ba479fd2
NN
16357
16358 # First look for the input files in the build tree, otherwise in the
16359 # src tree.
16360 ac_file_inputs=`IFS=:
16361 for f in $ac_file_in; do
16362 case $f in
16363 -) echo $tmp/stdin ;;
16364 [\\/$]*)
86da66b5
HPN
16365 # Absolute (can't be DOS-style, as IFS=:)
16366 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16367echo "$as_me: error: cannot find input file: $f" >&2;}
16368 { (exit 1); exit 1; }; }
86da66b5 16369 echo "$f";;
ba479fd2 16370 *) # Relative
86da66b5
HPN
16371 if test -f "$f"; then
16372 # Build tree
16373 echo "$f"
16374 elif test -f "$srcdir/$f"; then
16375 # Source tree
16376 echo "$srcdir/$f"
16377 else
16378 # /dev/null tree
16379 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16380echo "$as_me: error: cannot find input file: $f" >&2;}
16381 { (exit 1); exit 1; }; }
86da66b5 16382 fi;;
ba479fd2
NN
16383 esac
16384 done` || { (exit 1); exit 1; }
16385_ACEOF
16386cat >>$CONFIG_STATUS <<_ACEOF
16387 sed "$ac_vpsub
16388$extrasub
16389_ACEOF
16390cat >>$CONFIG_STATUS <<\_ACEOF
16391:t
16392/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16393s,@configure_input@,$configure_input,;t t
16394s,@srcdir@,$ac_srcdir,;t t
16395s,@abs_srcdir@,$ac_abs_srcdir,;t t
16396s,@top_srcdir@,$ac_top_srcdir,;t t
16397s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16398s,@builddir@,$ac_builddir,;t t
16399s,@abs_builddir@,$ac_abs_builddir,;t t
16400s,@top_builddir@,$ac_top_builddir,;t t
16401s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16402" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16403 rm -f $tmp/stdin
16404 if test x"$ac_file" != x-; then
16405 mv $tmp/out $ac_file
16406 else
16407 cat $tmp/out
16408 rm -f $tmp/out
16409 fi
16410
16411done
16412_ACEOF
16413cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 16414
ba479fd2
NN
16415#
16416# CONFIG_HEADER section.
16417#
861bb6c1
JL
16418
16419# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16420# NAME is the cpp macro being defined and VALUE is the value it is being given.
16421#
16422# ac_d sets the value in "#define NAME VALUE" lines.
86da66b5
HPN
16423ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16424ac_dB='[ ].*$,\1#\2'
ba479fd2
NN
16425ac_dC=' '
16426ac_dD=',;t'
16427# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
86da66b5 16428ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ba479fd2 16429ac_uB='$,\1#\2define\3'
861bb6c1 16430ac_uC=' '
ba479fd2
NN
16431ac_uD=',;t'
16432
16433for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 16434 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
16435 case $ac_file in
16436 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
16437 cat >$tmp/stdin
16438 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16439 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16440 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 16441 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16442 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
16443 esac
16444
ba479fd2
NN
16445 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16446echo "$as_me: creating $ac_file" >&6;}
16447
16448 # First look for the input files in the build tree, otherwise in the
16449 # src tree.
16450 ac_file_inputs=`IFS=:
16451 for f in $ac_file_in; do
16452 case $f in
16453 -) echo $tmp/stdin ;;
16454 [\\/$]*)
86da66b5
HPN
16455 # Absolute (can't be DOS-style, as IFS=:)
16456 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16457echo "$as_me: error: cannot find input file: $f" >&2;}
16458 { (exit 1); exit 1; }; }
86da66b5
HPN
16459 # Do quote $f, to prevent DOS paths from being IFS'd.
16460 echo "$f";;
ba479fd2 16461 *) # Relative
86da66b5
HPN
16462 if test -f "$f"; then
16463 # Build tree
16464 echo "$f"
16465 elif test -f "$srcdir/$f"; then
16466 # Source tree
16467 echo "$srcdir/$f"
16468 else
16469 # /dev/null tree
16470 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16471echo "$as_me: error: cannot find input file: $f" >&2;}
16472 { (exit 1); exit 1; }; }
86da66b5 16473 fi;;
ba479fd2
NN
16474 esac
16475 done` || { (exit 1); exit 1; }
16476 # Remove the trailing spaces.
86da66b5 16477 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
ba479fd2
NN
16478
16479_ACEOF
16480
16481# Transform confdefs.h into two sed scripts, `conftest.defines' and
16482# `conftest.undefs', that substitutes the proper values into
16483# config.h.in to produce config.h. The first handles `#define'
16484# templates, and the second `#undef' templates.
16485# And first: Protect against being on the right side of a sed subst in
16486# config.status. Protect against being in an unquoted here document
16487# in config.status.
16488rm -f conftest.defines conftest.undefs
16489# Using a here document instead of a string reduces the quoting nightmare.
16490# Putting comments in sed scripts is not portable.
16491#
16492# `end' is used to avoid that the second main sed command (meant for
16493# 0-ary CPP macros) applies to n-ary macro definitions.
16494# See the Autoconf documentation for `clear'.
16495cat >confdef2sed.sed <<\_ACEOF
16496s/[\\&,]/\\&/g
16497s,[\\$`],\\&,g
16498t clear
16499: clear
86da66b5 16500s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
ba479fd2 16501t end
86da66b5 16502s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
ba479fd2
NN
16503: end
16504_ACEOF
16505# If some macros were called several times there might be several times
16506# the same #defines, which is useless. Nevertheless, we may not want to
16507# sort them, since we want the *last* AC-DEFINE to be honored.
16508uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16509sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16510rm -f confdef2sed.sed
861bb6c1
JL
16511
16512# This sed command replaces #undef with comments. This is necessary, for
16513# example, in the case of _POSIX_SOURCE, which is predefined and required
16514# on some systems where configure will not decide to define it.
ba479fd2 16515cat >>conftest.undefs <<\_ACEOF
86da66b5 16516s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
ba479fd2
NN
16517_ACEOF
16518
16519# Break up conftest.defines because some shells have a limit on the size
16520# of here documents, and old seds have small limits too (100 cmds).
16521echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
86da66b5 16522echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
ba479fd2
NN
16523echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16524echo ' :' >>$CONFIG_STATUS
16525rm -f conftest.tail
16526while grep . conftest.defines >/dev/null
16527do
16528 # Write a limited-size here document to $tmp/defines.sed.
16529 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16530 # Speed up: don't consider the non `#define' lines.
86da66b5 16531 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
ba479fd2
NN
16532 # Work around the forget-to-reset-the-flag bug.
16533 echo 't clr' >>$CONFIG_STATUS
16534 echo ': clr' >>$CONFIG_STATUS
16535 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
16536 echo 'CEOF
16537 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16538 rm -f $tmp/in
16539 mv $tmp/out $tmp/in
16540' >>$CONFIG_STATUS
16541 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16542 rm -f conftest.defines
16543 mv conftest.tail conftest.defines
16544done
16545rm -f conftest.defines
16546echo ' fi # grep' >>$CONFIG_STATUS
16547echo >>$CONFIG_STATUS
861bb6c1 16548
ba479fd2
NN
16549# Break up conftest.undefs because some shells have a limit on the size
16550# of here documents, and old seds have small limits too (100 cmds).
16551echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 16552rm -f conftest.tail
ba479fd2 16553while grep . conftest.undefs >/dev/null
861bb6c1 16554do
ba479fd2
NN
16555 # Write a limited-size here document to $tmp/undefs.sed.
16556 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16557 # Speed up: don't consider the non `#undef'
86da66b5 16558 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
ba479fd2
NN
16559 # Work around the forget-to-reset-the-flag bug.
16560 echo 't clr' >>$CONFIG_STATUS
16561 echo ': clr' >>$CONFIG_STATUS
16562 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 16563 echo 'CEOF
ba479fd2
NN
16564 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16565 rm -f $tmp/in
16566 mv $tmp/out $tmp/in
16567' >>$CONFIG_STATUS
16568 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16569 rm -f conftest.undefs
16570 mv conftest.tail conftest.undefs
861bb6c1 16571done
ba479fd2
NN
16572rm -f conftest.undefs
16573
16574cat >>$CONFIG_STATUS <<\_ACEOF
16575 # Let's still pretend it is `configure' which instantiates (i.e., don't
16576 # use $as_me), people would be surprised to read:
16577 # /* config.h. Generated by config.status. */
16578 if test x"$ac_file" = x-; then
16579 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 16580 else
ba479fd2 16581 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 16582 fi
ba479fd2
NN
16583 cat $tmp/in >>$tmp/config.h
16584 rm -f $tmp/in
16585 if test x"$ac_file" != x-; then
16586 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
16587 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16588echo "$as_me: $ac_file is unchanged" >&6;}
16589 else
16590 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16591$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16592 X"$ac_file" : 'X\(//\)[^/]' \| \
16593 X"$ac_file" : 'X\(//\)$' \| \
16594 X"$ac_file" : 'X\(/\)' \| \
16595 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16596echo X"$ac_file" |
16597 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16598 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16599 /^X\(\/\/\)$/{ s//\1/; q; }
16600 /^X\(\/\).*/{ s//\1/; q; }
16601 s/.*/./; q'`
16602 { if $as_mkdir_p; then
16603 mkdir -p "$ac_dir"
16604 else
16605 as_dir="$ac_dir"
16606 as_dirs=
16607 while test ! -d "$as_dir"; do
16608 as_dirs="$as_dir $as_dirs"
16609 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16610$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16611 X"$as_dir" : 'X\(//\)[^/]' \| \
16612 X"$as_dir" : 'X\(//\)$' \| \
16613 X"$as_dir" : 'X\(/\)' \| \
16614 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16615echo X"$as_dir" |
16616 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16617 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16618 /^X\(\/\/\)$/{ s//\1/; q; }
16619 /^X\(\/\).*/{ s//\1/; q; }
16620 s/.*/./; q'`
16621 done
16622 test ! -n "$as_dirs" || mkdir $as_dirs
16623 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16624echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16625 { (exit 1); exit 1; }; }; }
63cf211a 16626
ba479fd2
NN
16627 rm -f $ac_file
16628 mv $tmp/config.h $ac_file
16629 fi
16630 else
16631 cat $tmp/config.h
16632 rm -f $tmp/config.h
16633 fi
16634done
16635_ACEOF
16636cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 16637
ba479fd2
NN
16638#
16639# CONFIG_COMMANDS section.
16640#
16641for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16642 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16643 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16644 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
16645$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16646 X"$ac_dest" : 'X\(//\)[^/]' \| \
16647 X"$ac_dest" : 'X\(//\)$' \| \
16648 X"$ac_dest" : 'X\(/\)' \| \
16649 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16650echo X"$ac_dest" |
16651 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16652 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16653 /^X\(\/\/\)$/{ s//\1/; q; }
16654 /^X\(\/\).*/{ s//\1/; q; }
16655 s/.*/./; q'`
86da66b5
HPN
16656 { if $as_mkdir_p; then
16657 mkdir -p "$ac_dir"
16658 else
16659 as_dir="$ac_dir"
16660 as_dirs=
16661 while test ! -d "$as_dir"; do
16662 as_dirs="$as_dir $as_dirs"
16663 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16664$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16665 X"$as_dir" : 'X\(//\)[^/]' \| \
16666 X"$as_dir" : 'X\(//\)$' \| \
16667 X"$as_dir" : 'X\(/\)' \| \
16668 . : '\(.\)' 2>/dev/null ||
16669echo X"$as_dir" |
16670 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16671 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16672 /^X\(\/\/\)$/{ s//\1/; q; }
16673 /^X\(\/\).*/{ s//\1/; q; }
16674 s/.*/./; q'`
16675 done
16676 test ! -n "$as_dirs" || mkdir $as_dirs
16677 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16678echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16679 { (exit 1); exit 1; }; }; }
16680
ba479fd2
NN
16681 ac_builddir=.
16682
16683if test "$ac_dir" != .; then
16684 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16685 # A "../" for each directory in $ac_dir_suffix.
16686 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16687else
16688 ac_dir_suffix= ac_top_builddir=
16689fi
16690
16691case $srcdir in
16692 .) # No --srcdir option. We are building in place.
16693 ac_srcdir=.
16694 if test -z "$ac_top_builddir"; then
16695 ac_top_srcdir=.
16696 else
16697 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16698 fi ;;
16699 [\\/]* | ?:[\\/]* ) # Absolute path.
16700 ac_srcdir=$srcdir$ac_dir_suffix;
16701 ac_top_srcdir=$srcdir ;;
16702 *) # Relative path.
16703 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16704 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16705esac
8ab705be
KC
16706
16707# Do not use `cd foo && pwd` to compute absolute paths, because
16708# the directories may not exist.
16709case `pwd` in
16710.) ac_abs_builddir="$ac_dir";;
86da66b5 16711*)
8ab705be
KC
16712 case "$ac_dir" in
16713 .) ac_abs_builddir=`pwd`;;
16714 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
16715 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
16716 esac;;
16717esac
8ab705be 16718case $ac_abs_builddir in
86da66b5
HPN
16719.) ac_abs_top_builddir=${ac_top_builddir}.;;
16720*)
16721 case ${ac_top_builddir}. in
8ab705be 16722 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 16723 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 16724 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
16725 esac;;
16726esac
8ab705be 16727case $ac_abs_builddir in
86da66b5
HPN
16728.) ac_abs_srcdir=$ac_srcdir;;
16729*)
16730 case $ac_srcdir in
8ab705be 16731 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 16732 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 16733 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
16734 esac;;
16735esac
8ab705be 16736case $ac_abs_builddir in
86da66b5
HPN
16737.) ac_abs_top_srcdir=$ac_top_srcdir;;
16738*)
16739 case $ac_top_srcdir in
8ab705be 16740 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 16741 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 16742 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
16743 esac;;
16744esac
ba479fd2
NN
16745
16746
16747 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
16748echo "$as_me: executing $ac_dest commands" >&6;}
16749 case $ac_dest in
16750 default )
f1faaabd
NN
16751case ${CONFIG_HEADERS} in
16752 *auto-host.h:config.in*)
16753 echo > cstamp-h ;;
861bb6c1 16754esac
2ed26f6b 16755# Make sure all the subdirs exist.
3b620440 16756for d in $subdirs doc build
2ed26f6b 16757do
2ed26f6b 16758 test -d $d || mkdir $d
2ed26f6b 16759done
93cf819d
BK
16760# If the host supports symlinks, point stage[1234] at ../stage[1234] so
16761# bootstrapping and the installation procedure can still use
16762# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
16763# FLAGS_TO_PASS has been modified to solve the problem there.
16764# This is virtually a duplicate of what happens in configure.lang; we do
16765# an extra check to make sure this only happens if ln -s can be used.
35f06ae4
PB
16766case "$LN_S" in
16767 *-s*)
16768 for d in ${subdirs} ; do
1e6347d8 16769 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 16770 cd $d
6a1b7268 16771 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
16772 do
16773 rm -f $t
35f06ae4 16774 $LN_S ../$t $t 2>/dev/null
4e8a434e
BK
16775 done
16776 cd $STARTDIR
35f06ae4
PB
16777 done
16778 ;;
16779esac
ba479fd2
NN
16780 ;;
16781 esac
16782done
16783_ACEOF
cafe096b 16784
ba479fd2
NN
16785cat >>$CONFIG_STATUS <<\_ACEOF
16786
16787{ (exit 0); exit 0; }
16788_ACEOF
861bb6c1 16789chmod +x $CONFIG_STATUS
ba479fd2
NN
16790ac_clean_files=$ac_clean_files_save
16791
16792
16793# configure is writing to config.log, and then calls config.status.
16794# config.status does its own redirection, appending to config.log.
16795# Unfortunately, on DOS this fails, as config.log is still kept open
16796# by configure, so config.status won't be able to write to it; its
16797# output is simply discarded. So we exec the FD to /dev/null,
16798# effectively closing config.log, so it can be properly (re)opened and
16799# appended to by config.status. When coming back to configure, we
16800# need to make the FD available again.
16801if test "$no_create" != yes; then
16802 ac_cs_success=:
16803 ac_config_status_args=
16804 test "$silent" = yes &&
16805 ac_config_status_args="$ac_config_status_args --quiet"
16806 exec 5>/dev/null
16807 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16808 exec 5>>config.log
16809 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16810 # would make configure fail if this is the last instruction.
16811 $ac_cs_success || { (exit 1); exit 1; }
16812fi
861bb6c1 16813