]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
re PR tree-optimization/17454 (ICE with --enable-checking=fold)
[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
75685792 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 gcc_version_trigger gcc_version_full gcc_version 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 PACKAGE VERSION 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 set_gcc_lib_path 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
NS
870 Categories are: assert,fold,gc,gcac,misc,
871 rtlflag,rtl,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
b095fe2c 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
06c37c96
NS
1386#Set to 1 on a release branch
1387is_release=
1388
ba479fd2
NN
1389# Determine the host, build, and target systems
1390ac_aux_dir=
1391for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1392 if test -f $ac_dir/install-sh; then
1393 ac_aux_dir=$ac_dir
1394 ac_install_sh="$ac_aux_dir/install-sh -c"
1395 break
1396 elif test -f $ac_dir/install.sh; then
1397 ac_aux_dir=$ac_dir
1398 ac_install_sh="$ac_aux_dir/install.sh -c"
1399 break
1400 elif test -f $ac_dir/shtool; then
1401 ac_aux_dir=$ac_dir
1402 ac_install_sh="$ac_aux_dir/shtool install -c"
1403 break
1404 fi
1405done
1406if test -z "$ac_aux_dir"; then
1407 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1408echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1409 { (exit 1); exit 1; }; }
1410fi
1411ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1412ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1413ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1414
1415# Make sure we can run config.sub.
1416$ac_config_sub sun4 >/dev/null 2>&1 ||
1417 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1418echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1419 { (exit 1); exit 1; }; }
1420
1421echo "$as_me:$LINENO: checking build system type" >&5
1422echo $ECHO_N "checking build system type... $ECHO_C" >&6
1423if test "${ac_cv_build+set}" = set; then
1424 echo $ECHO_N "(cached) $ECHO_C" >&6
1425else
1426 ac_cv_build_alias=$build_alias
1427test -z "$ac_cv_build_alias" &&
1428 ac_cv_build_alias=`$ac_config_guess`
1429test -z "$ac_cv_build_alias" &&
1430 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1431echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1432 { (exit 1); exit 1; }; }
1433ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1434 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1435echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1436 { (exit 1); exit 1; }; }
1437
1438fi
1439echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1440echo "${ECHO_T}$ac_cv_build" >&6
1441build=$ac_cv_build
1442build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1443build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1444build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1445
1446
1447echo "$as_me:$LINENO: checking host system type" >&5
1448echo $ECHO_N "checking host system type... $ECHO_C" >&6
1449if test "${ac_cv_host+set}" = set; then
1450 echo $ECHO_N "(cached) $ECHO_C" >&6
1451else
1452 ac_cv_host_alias=$host_alias
1453test -z "$ac_cv_host_alias" &&
1454 ac_cv_host_alias=$ac_cv_build_alias
1455ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1456 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1457echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1458 { (exit 1); exit 1; }; }
1459
1460fi
1461echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1462echo "${ECHO_T}$ac_cv_host" >&6
1463host=$ac_cv_host
1464host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1465host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1466host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1467
1468
1469echo "$as_me:$LINENO: checking target system type" >&5
1470echo $ECHO_N "checking target system type... $ECHO_C" >&6
1471if test "${ac_cv_target+set}" = set; then
1472 echo $ECHO_N "(cached) $ECHO_C" >&6
1473else
1474 ac_cv_target_alias=$target_alias
1475test "x$ac_cv_target_alias" = "x" &&
1476 ac_cv_target_alias=$ac_cv_host_alias
1477ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1478 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1479echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1480 { (exit 1); exit 1; }; }
1481
1482fi
1483echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1484echo "${ECHO_T}$ac_cv_target" >&6
1485target=$ac_cv_target
1486target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1487target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1488target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1489
1490
1491# The aliases save the names the user supplied, while $host etc.
1492# will get canonicalized.
1493test -n "$target_alias" &&
1494 test "$program_prefix$program_suffix$program_transform_name" = \
1495 NONENONEs,x,x, &&
1496 program_prefix=${target_alias}-
1497
1498# Determine the noncanonical target name, for directory use.
1499 case ${build_alias} in
1500 "") build_noncanonical=${build} ;;
6e3f3080
NN
1501 *) build_noncanonical=${build_alias} ;;
1502esac
73458fb7 1503
4665e56c
NN
1504 case ${host_alias} in
1505 "") host_noncanonical=${build_noncanonical} ;;
1506 *) host_noncanonical=${host_alias} ;;
1507esac
73458fb7 1508
4665e56c
NN
1509 case ${target_alias} in
1510 "") target_noncanonical=${host_noncanonical} ;;
1511 *) target_noncanonical=${target_alias} ;;
1512esac
093e61a6 1513
8f1529e6
L
1514
1515
1516
1517# Determine the target- and build-specific subdirectories
4665e56c
NN
1518 # Prefix 'build-' so this never conflicts with target_subdir.
1519build_subdir="build-${build_noncanonical}"
215c351a
PB
1520# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1521if ( test $srcdir = . && test -d gcc ) \
1522 || test -d $srcdir/../host-${host_noncanonical}; then
1523 host_subdir="host-${host_noncanonical}"
1524else
1525 host_subdir=.
1526fi
4665e56c
NN
1527# No prefix.
1528target_subdir=${target_noncanonical}
ba479fd2 1529
73458fb7 1530
093e61a6 1531# Set program_transform_name
13c22933 1532test "$program_prefix" != NONE &&
ba479fd2 1533 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1534# Use a double $ so make ignores it.
1535test "$program_suffix" != NONE &&
ba479fd2
NN
1536 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1537# Double any \ or $. echo might interpret backslashes.
1538# By default was `s,x,x', remove it if useless.
1539cat <<\_ACEOF >conftest.sed
1540s/[\\$]/&&/g;s/;s,x,x,$//
1541_ACEOF
1542program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1543rm conftest.sed
13c22933
JJ
1544
1545
34a86c2b
NN
1546# Check for bogus environment variables.
1547# Test if LIBRARY_PATH contains the notation for the current directory
1548# since this would lead to problems installing/building glibc.
1549# LIBRARY_PATH contains the current directory if one of the following
1550# is true:
1551# - one of the terminals (":" and ";") is the first or last sign
1552# - two terminals occur directly after each other
1553# - the path contains an element with a dot in it
ba479fd2
NN
1554echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1555echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1556case ${LIBRARY_PATH} in
1557 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1558 library_path_setting="contains current directory"
1559 ;;
1560 *)
1561 library_path_setting="ok"
1562 ;;
1563esac
ba479fd2
NN
1564echo "$as_me:$LINENO: result: $library_path_setting" >&5
1565echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1566if test "$library_path_setting" != "ok"; then
ba479fd2 1567{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1568*** LIBRARY_PATH shouldn't contain the current directory when
1569*** building gcc. Please change the environment variable
ba479fd2
NN
1570*** and run configure again." >&5
1571echo "$as_me: error:
1572*** LIBRARY_PATH shouldn't contain the current directory when
1573*** building gcc. Please change the environment variable
1574*** and run configure again." >&2;}
1575 { (exit 1); exit 1; }; }
e9a25f70
JL
1576fi
1577
34a86c2b
NN
1578# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1579# since this would lead to problems installing/building glibc.
1580# GCC_EXEC_PREFIX contains the current directory if one of the following
1581# is true:
1582# - one of the terminals (":" and ";") is the first or last sign
1583# - two terminals occur directly after each other
1584# - the path contains an element with a dot in it
ba479fd2
NN
1585echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1586echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1587case ${GCC_EXEC_PREFIX} in
1588 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1589 gcc_exec_prefix_setting="contains current directory"
1590 ;;
1591 *)
1592 gcc_exec_prefix_setting="ok"
1593 ;;
1594esac
ba479fd2
NN
1595echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1596echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1597if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1598{ { echo "$as_me:$LINENO: error:
1599*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1600*** building gcc. Please change the environment variable
1601*** and run configure again." >&5
1602echo "$as_me: error:
cafe096b
EC
1603*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1604*** building gcc. Please change the environment variable
ba479fd2
NN
1605*** and run configure again." >&2;}
1606 { (exit 1); exit 1; }; }
34a86c2b
NN
1607fi
1608
4982adbe
RS
1609
1610if test "${with_gcc_version_trigger+set}" = set; then
1611 gcc_version_trigger=$with_gcc_version_trigger
1612else
1613 gcc_version_trigger=$srcdir/../gcc/version.c
1614fi
1615if test -f "${gcc_version_trigger}"; then
1616 gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'`
1617else
1618 gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'`
1619fi
1620gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
1621
1622
1623
1624
1625
34a86c2b
NN
1626# -----------
1627# Directories
1628# -----------
1629
1630# Specify the local prefix
1631local_prefix=
ba479fd2 1632
34a86c2b
NN
1633# Check whether --with-local-prefix or --without-local-prefix was given.
1634if test "${with_local_prefix+set}" = set; then
1635 withval="$with_local_prefix"
1636 case "${withval}" in
ba479fd2
NN
1637yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1638echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1639 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1640no) ;;
1641*) local_prefix=$with_local_prefix ;;
1642esac
ba479fd2 1643fi;
34a86c2b
NN
1644
1645# Default local prefix if it is empty
1646if test x$local_prefix = x; then
1647 local_prefix=/usr/local
1648fi
1649
1650# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1651# passed in by the toplevel make and thus we'd get different behavior
1652# depending on where we built the sources.
1653gcc_gxx_include_dir=
1654# Specify the g++ header file directory
ba479fd2 1655
34a86c2b
NN
1656# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1657if test "${with_gxx_include_dir+set}" = set; then
1658 withval="$with_gxx_include_dir"
1659 case "${withval}" in
ba479fd2
NN
1660yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1661echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1662 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1663no) ;;
1664*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1665esac
ba479fd2 1666fi;
34a86c2b
NN
1667
1668if test x${gcc_gxx_include_dir} = x; then
1669 if test x${enable_version_specific_runtime_libs} = xyes; then
1670 gcc_gxx_include_dir='${libsubdir}/include/c++'
1671 else
4982adbe 1672 libstdcxx_incdir=c++/${gcc_version}
34a86c2b
NN
1673 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
1674 fi
1675fi
1676
ba479fd2 1677
34a86c2b
NN
1678# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1679if test "${with_cpp_install_dir+set}" = set; then
1680 withval="$with_cpp_install_dir"
1681 if test x$withval = xyes; then
ba479fd2
NN
1682 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1683echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1684 { (exit 1); exit 1; }; }
34a86c2b
NN
1685elif test x$withval != xno; then
1686 cpp_install_dir=$withval
1687fi
ba479fd2 1688fi;
34a86c2b 1689
51b9ff45 1690# We would like to our source tree to be readonly. However when releases or
ba479fd2 1691# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1692# various formats of manuals need to be included along with the rest of the
ba479fd2 1693# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1694# just that.
1695
03787dfd
KC
1696echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1697echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1698 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45
KC
1699if test "${enable_generated_files_in_srcdir+set}" = set; then
1700 enableval="$enable_generated_files_in_srcdir"
03787dfd 1701 generated_files_in_srcdir=$enableval
51b9ff45 1702else
03787dfd 1703 generated_files_in_srcdir=no
ba479fd2 1704fi;
51b9ff45 1705
03787dfd
KC
1706echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1707echo "${ECHO_T}$generated_files_in_srcdir" >&6
1708
1709if test "$generated_files_in_srcdir" = "yes"; then
1710 GENINSRC=''
03787dfd
KC
1711else
1712 GENINSRC='#'
03787dfd
KC
1713fi
1714
1715
34a86c2b
NN
1716# -------------------
1717# Find default linker
1718# -------------------
1719
1720# With GNU ld
ba479fd2 1721
34a86c2b
NN
1722# Check whether --with-gnu-ld or --without-gnu-ld was given.
1723if test "${with_gnu_ld+set}" = set; then
1724 withval="$with_gnu_ld"
1725 gnu_ld_flag="$with_gnu_ld"
1726else
1727 gnu_ld_flag=no
ba479fd2 1728fi;
6e3f3080 1729
63cf211a 1730# With pre-defined ld
ba479fd2 1731
34a86c2b
NN
1732# Check whether --with-ld or --without-ld was given.
1733if test "${with_ld+set}" = set; then
1734 withval="$with_ld"
1735 DEFAULT_LINKER="$with_ld"
ba479fd2 1736fi;
34a86c2b
NN
1737if test x"${DEFAULT_LINKER+set}" = x"set"; then
1738 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1739 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1740echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1741 { (exit 1); exit 1; }; }
34a86c2b
NN
1742 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1743 gnu_ld_flag=yes
1744 fi
ba479fd2
NN
1745
1746cat >>confdefs.h <<_ACEOF
34a86c2b 1747#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1748_ACEOF
34a86c2b
NN
1749
1750fi
1751
ba479fd2
NN
1752echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1753echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1754if test x"${DEFAULT_LINKER+set}" = x"set"; then
1755 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1756 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1757echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1758 else
ba479fd2
NN
1759 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1760echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1761 fi
1762else
ba479fd2
NN
1763 echo "$as_me:$LINENO: result: no" >&5
1764echo "${ECHO_T}no" >&6
34a86c2b
NN
1765fi
1766
d594623a
L
1767# With demangler in GNU ld
1768
1769# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
1770if test "${with_demangler_in_ld+set}" = set; then
1771 withval="$with_demangler_in_ld"
1772 demangler_in_ld="$with_demangler_in_ld"
1773else
1774 demangler_in_ld=no
1775fi;
1776
34a86c2b
NN
1777# ----------------------
1778# Find default assembler
1779# ----------------------
1780
1781# With GNU as
ba479fd2 1782
34a86c2b
NN
1783# Check whether --with-gnu-as or --without-gnu-as was given.
1784if test "${with_gnu_as+set}" = set; then
1785 withval="$with_gnu_as"
1786 gas_flag="$with_gnu_as"
1787else
1788 gas_flag=no
ba479fd2 1789fi;
34a86c2b
NN
1790
1791
1792# Check whether --with-as or --without-as was given.
1793if test "${with_as+set}" = set; then
1794 withval="$with_as"
1795 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1796fi;
34a86c2b
NN
1797if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1798 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1799 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1800echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1801 { (exit 1); exit 1; }; }
34a86c2b
NN
1802 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1803 gas_flag=yes
1804 fi
ba479fd2
NN
1805
1806cat >>confdefs.h <<_ACEOF
34a86c2b 1807#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1808_ACEOF
34a86c2b
NN
1809
1810fi
1811
ba479fd2
NN
1812echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1813echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1814if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1815 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1816 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1817echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1818 else
ba479fd2
NN
1819 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1820echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1821 fi
1822else
ba479fd2
NN
1823 echo "$as_me:$LINENO: result: no" >&5
1824echo "${ECHO_T}no" >&6
34a86c2b
NN
1825fi
1826
1827# ---------------
1828# Find C compiler
1829# ---------------
1830
426ca3ca
RO
1831# If a non-executable a.out is present (e.g. created by GNU as above even if
1832# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1833# file, even when creating an executable, so an execution test fails.
1834# Remove possible default executable files to avoid this.
1835#
1836# FIXME: This really belongs into AC_PROG_CC and can be removed once
1837# Autoconf includes it.
1838rm -f a.out a.exe b.out
1839
34a86c2b 1840# Find the native compiler
ba479fd2
NN
1841ac_ext=c
1842ac_cpp='$CPP $CPPFLAGS'
1843ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1844ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1845ac_compiler_gnu=$ac_cv_c_compiler_gnu
1846if test -n "$ac_tool_prefix"; then
1847 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1848set dummy ${ac_tool_prefix}gcc; ac_word=$2
1849echo "$as_me:$LINENO: checking for $ac_word" >&5
1850echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1851if test "${ac_cv_prog_CC+set}" = set; then
1852 echo $ECHO_N "(cached) $ECHO_C" >&6
1853else
1854 if test -n "$CC"; then
1855 ac_cv_prog_CC="$CC" # Let the user override the test.
1856else
1857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1858for as_dir in $PATH
1859do
1860 IFS=$as_save_IFS
1861 test -z "$as_dir" && as_dir=.
1862 for ac_exec_ext in '' $ac_executable_extensions; do
1863 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1864 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1865 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1866 break 2
1867 fi
1868done
1869done
1870
1871fi
1872fi
1873CC=$ac_cv_prog_CC
1874if test -n "$CC"; then
1875 echo "$as_me:$LINENO: result: $CC" >&5
1876echo "${ECHO_T}$CC" >&6
1877else
1878 echo "$as_me:$LINENO: result: no" >&5
1879echo "${ECHO_T}no" >&6
1880fi
1881
1882fi
1883if test -z "$ac_cv_prog_CC"; then
1884 ac_ct_CC=$CC
1885 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1886set dummy gcc; ac_word=$2
ba479fd2
NN
1887echo "$as_me:$LINENO: checking for $ac_word" >&5
1888echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1889if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1890 echo $ECHO_N "(cached) $ECHO_C" >&6
1891else
1892 if test -n "$ac_ct_CC"; then
1893 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1894else
1895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1896for as_dir in $PATH
1897do
1898 IFS=$as_save_IFS
1899 test -z "$as_dir" && as_dir=.
1900 for ac_exec_ext in '' $ac_executable_extensions; do
1901 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1902 ac_cv_prog_ac_ct_CC="gcc"
1903 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1904 break 2
1905 fi
1906done
1907done
1908
1909fi
1910fi
1911ac_ct_CC=$ac_cv_prog_ac_ct_CC
1912if test -n "$ac_ct_CC"; then
1913 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1914echo "${ECHO_T}$ac_ct_CC" >&6
1915else
1916 echo "$as_me:$LINENO: result: no" >&5
1917echo "${ECHO_T}no" >&6
1918fi
1919
1920 CC=$ac_ct_CC
1921else
1922 CC="$ac_cv_prog_CC"
1923fi
1924
1925if test -z "$CC"; then
1926 if test -n "$ac_tool_prefix"; then
1927 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1928set dummy ${ac_tool_prefix}cc; ac_word=$2
1929echo "$as_me:$LINENO: checking for $ac_word" >&5
1930echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1931if test "${ac_cv_prog_CC+set}" = set; then
1932 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1933else
1934 if test -n "$CC"; then
1935 ac_cv_prog_CC="$CC" # Let the user override the test.
1936else
ba479fd2
NN
1937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1938for as_dir in $PATH
1939do
1940 IFS=$as_save_IFS
1941 test -z "$as_dir" && as_dir=.
1942 for ac_exec_ext in '' $ac_executable_extensions; do
1943 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1944 ac_cv_prog_CC="${ac_tool_prefix}cc"
1945 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1946 break 2
1947 fi
1948done
1949done
1950
cd9e5e7c
MK
1951fi
1952fi
ba479fd2 1953CC=$ac_cv_prog_CC
cd9e5e7c 1954if test -n "$CC"; then
ba479fd2
NN
1955 echo "$as_me:$LINENO: result: $CC" >&5
1956echo "${ECHO_T}$CC" >&6
1957else
1958 echo "$as_me:$LINENO: result: no" >&5
1959echo "${ECHO_T}no" >&6
1960fi
1961
1962fi
1963if test -z "$ac_cv_prog_CC"; then
1964 ac_ct_CC=$CC
1965 # Extract the first word of "cc", so it can be a program name with args.
1966set dummy cc; ac_word=$2
1967echo "$as_me:$LINENO: checking for $ac_word" >&5
1968echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1969if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1970 echo $ECHO_N "(cached) $ECHO_C" >&6
1971else
1972 if test -n "$ac_ct_CC"; then
1973 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1974else
1975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1976for as_dir in $PATH
1977do
1978 IFS=$as_save_IFS
1979 test -z "$as_dir" && as_dir=.
1980 for ac_exec_ext in '' $ac_executable_extensions; do
1981 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1982 ac_cv_prog_ac_ct_CC="cc"
1983 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1984 break 2
1985 fi
1986done
1987done
1988
1989fi
1990fi
1991ac_ct_CC=$ac_cv_prog_ac_ct_CC
1992if test -n "$ac_ct_CC"; then
1993 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1994echo "${ECHO_T}$ac_ct_CC" >&6
1995else
1996 echo "$as_me:$LINENO: result: no" >&5
1997echo "${ECHO_T}no" >&6
1998fi
1999
2000 CC=$ac_ct_CC
cd9e5e7c 2001else
ba479fd2 2002 CC="$ac_cv_prog_CC"
e9a25f70 2003fi
6e3f3080 2004
ba479fd2 2005fi
6e3f3080
NN
2006if test -z "$CC"; then
2007 # Extract the first word of "cc", so it can be a program name with args.
2008set dummy cc; ac_word=$2
ba479fd2
NN
2009echo "$as_me:$LINENO: checking for $ac_word" >&5
2010echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2011if test "${ac_cv_prog_CC+set}" = set; then
2012 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2013else
2014 if test -n "$CC"; then
2015 ac_cv_prog_CC="$CC" # Let the user override the test.
2016else
2017 ac_prog_rejected=no
ba479fd2
NN
2018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2019for as_dir in $PATH
2020do
2021 IFS=$as_save_IFS
2022 test -z "$as_dir" && as_dir=.
2023 for ac_exec_ext in '' $ac_executable_extensions; do
2024 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2025 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2026 ac_prog_rejected=yes
2027 continue
2028 fi
2029 ac_cv_prog_CC="cc"
2030 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2031 break 2
2032 fi
2033done
2034done
2035
6e3f3080
NN
2036if test $ac_prog_rejected = yes; then
2037 # We found a bogon in the path, so make sure we never use it.
2038 set dummy $ac_cv_prog_CC
2039 shift
ba479fd2 2040 if test $# != 0; then
6e3f3080
NN
2041 # We chose a different compiler from the bogus one.
2042 # However, it has the same basename, so the bogon will be chosen
2043 # first if we set CC to just the basename; use the full file name.
2044 shift
ba479fd2 2045 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2046 fi
6e3f3080
NN
2047fi
2048fi
2049fi
ba479fd2 2050CC=$ac_cv_prog_CC
6e3f3080 2051if test -n "$CC"; then
ba479fd2
NN
2052 echo "$as_me:$LINENO: result: $CC" >&5
2053echo "${ECHO_T}$CC" >&6
e9a25f70 2054else
ba479fd2
NN
2055 echo "$as_me:$LINENO: result: no" >&5
2056echo "${ECHO_T}no" >&6
e9a25f70 2057fi
6e3f3080 2058
ba479fd2
NN
2059fi
2060if test -z "$CC"; then
2061 if test -n "$ac_tool_prefix"; then
2062 for ac_prog in cl
2063 do
2064 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2065set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2066echo "$as_me:$LINENO: checking for $ac_word" >&5
2067echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2068if test "${ac_cv_prog_CC+set}" = set; then
2069 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2070else
6e3f3080
NN
2071 if test -n "$CC"; then
2072 ac_cv_prog_CC="$CC" # Let the user override the test.
2073else
ba479fd2
NN
2074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2075for as_dir in $PATH
2076do
2077 IFS=$as_save_IFS
2078 test -z "$as_dir" && as_dir=.
2079 for ac_exec_ext in '' $ac_executable_extensions; do
2080 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2081 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2082 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2083 break 2
2084 fi
2085done
2086done
2087
093e61a6 2088fi
6e3f3080 2089fi
ba479fd2 2090CC=$ac_cv_prog_CC
6e3f3080 2091if test -n "$CC"; then
ba479fd2
NN
2092 echo "$as_me:$LINENO: result: $CC" >&5
2093echo "${ECHO_T}$CC" >&6
6e3f3080 2094else
ba479fd2
NN
2095 echo "$as_me:$LINENO: result: no" >&5
2096echo "${ECHO_T}no" >&6
093e61a6 2097fi
cafe096b 2098
ba479fd2
NN
2099 test -n "$CC" && break
2100 done
2101fi
2102if test -z "$CC"; then
2103 ac_ct_CC=$CC
2104 for ac_prog in cl
2105do
2106 # Extract the first word of "$ac_prog", so it can be a program name with args.
2107set dummy $ac_prog; ac_word=$2
2108echo "$as_me:$LINENO: checking for $ac_word" >&5
2109echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2110if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2111 echo $ECHO_N "(cached) $ECHO_C" >&6
2112else
2113 if test -n "$ac_ct_CC"; then
2114 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2115else
2116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2117for as_dir in $PATH
2118do
2119 IFS=$as_save_IFS
2120 test -z "$as_dir" && as_dir=.
2121 for ac_exec_ext in '' $ac_executable_extensions; do
2122 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2123 ac_cv_prog_ac_ct_CC="$ac_prog"
2124 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2125 break 2
2126 fi
2127done
2128done
6e3f3080 2129
ba479fd2
NN
2130fi
2131fi
2132ac_ct_CC=$ac_cv_prog_ac_ct_CC
2133if test -n "$ac_ct_CC"; then
2134 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2135echo "${ECHO_T}$ac_ct_CC" >&6
2136else
2137 echo "$as_me:$LINENO: result: no" >&5
2138echo "${ECHO_T}no" >&6
2139fi
6e3f3080 2140
ba479fd2
NN
2141 test -n "$ac_ct_CC" && break
2142done
63cf211a 2143
ba479fd2
NN
2144 CC=$ac_ct_CC
2145fi
2146
2147fi
2148
2149
2150test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2151See \`config.log' for more details." >&5
2152echo "$as_me: error: no acceptable C compiler found in \$PATH
2153See \`config.log' for more details." >&2;}
2154 { (exit 1); exit 1; }; }
2155
2156# Provide some information about the compiler.
2157echo "$as_me:$LINENO:" \
2158 "checking for C compiler version" >&5
2159ac_compiler=`set X $ac_compile; echo $2`
2160{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2161 (eval $ac_compiler --version </dev/null >&5) 2>&5
2162 ac_status=$?
2163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2164 (exit $ac_status); }
2165{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2166 (eval $ac_compiler -v </dev/null >&5) 2>&5
2167 ac_status=$?
2168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2169 (exit $ac_status); }
2170{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2171 (eval $ac_compiler -V </dev/null >&5) 2>&5
2172 ac_status=$?
2173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2174 (exit $ac_status); }
2175
2176cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2177/* confdefs.h. */
2178_ACEOF
2179cat confdefs.h >>conftest.$ac_ext
2180cat >>conftest.$ac_ext <<_ACEOF
2181/* end confdefs.h. */
2182
2183int
2184main ()
2185{
63cf211a 2186
ba479fd2
NN
2187 ;
2188 return 0;
2189}
2190_ACEOF
2191ac_clean_files_save=$ac_clean_files
2192ac_clean_files="$ac_clean_files a.out a.exe b.out"
2193# Try to create an executable without -o first, disregard a.out.
2194# It will help us diagnose broken compilers, and finding out an intuition
2195# of exeext.
86da66b5
HPN
2196echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2197echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2
NN
2198ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2199if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2200 (eval $ac_link_default) 2>&5
2201 ac_status=$?
2202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2203 (exit $ac_status); }; then
2204 # Find the output, starting from the most likely. This scheme is
2205# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2206# resort.
2207
2208# Be careful to initialize this variable, since it used to be cached.
2209# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2210ac_cv_exeext=
2211# b.out is created by i960 compilers.
2212for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2213do
2214 test -f "$ac_file" || continue
2215 case $ac_file in
2216 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
86da66b5 2217 ;;
ba479fd2 2218 conftest.$ac_ext )
86da66b5
HPN
2219 # This is the source file.
2220 ;;
ba479fd2 2221 [ab].out )
86da66b5
HPN
2222 # We found the default executable, but exeext='' is most
2223 # certainly right.
2224 break;;
ba479fd2 2225 *.* )
86da66b5
HPN
2226 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2227 # FIXME: I believe we export ac_cv_exeext for Libtool,
2228 # but it would be cool to find out if it's true. Does anybody
2229 # maintain Libtool? --akim.
2230 export ac_cv_exeext
2231 break;;
ba479fd2 2232 * )
86da66b5 2233 break;;
ba479fd2
NN
2234 esac
2235done
2236else
2237 echo "$as_me: failed program was:" >&5
2238sed 's/^/| /' conftest.$ac_ext >&5
2239
2240{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2241See \`config.log' for more details." >&5
2242echo "$as_me: error: C compiler cannot create executables
2243See \`config.log' for more details." >&2;}
2244 { (exit 77); exit 77; }; }
2245fi
2246
2247ac_exeext=$ac_cv_exeext
2248echo "$as_me:$LINENO: result: $ac_file" >&5
2249echo "${ECHO_T}$ac_file" >&6
2250
2251# Check the compiler produces executables we can run. If not, either
2252# the compiler is broken, or we cross compile.
2253echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2254echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2255# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2256# If not cross compiling, check that we can run a simple program.
2257if test "$cross_compiling" != yes; then
2258 if { ac_try='./$ac_file'
2259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2260 (eval $ac_try) 2>&5
2261 ac_status=$?
2262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2263 (exit $ac_status); }; }; then
2264 cross_compiling=no
6e3f3080 2265 else
ba479fd2
NN
2266 if test "$cross_compiling" = maybe; then
2267 cross_compiling=yes
2268 else
2269 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2270If you meant to cross compile, use \`--host'.
2271See \`config.log' for more details." >&5
2272echo "$as_me: error: cannot run C compiled programs.
2273If you meant to cross compile, use \`--host'.
2274See \`config.log' for more details." >&2;}
2275 { (exit 1); exit 1; }; }
2276 fi
6e3f3080
NN
2277 fi
2278fi
ba479fd2
NN
2279echo "$as_me:$LINENO: result: yes" >&5
2280echo "${ECHO_T}yes" >&6
2281
2282rm -f a.out a.exe conftest$ac_cv_exeext b.out
2283ac_clean_files=$ac_clean_files_save
2284# Check the compiler produces executables we can run. If not, either
2285# the compiler is broken, or we cross compile.
2286echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2287echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2288echo "$as_me:$LINENO: result: $cross_compiling" >&5
2289echo "${ECHO_T}$cross_compiling" >&6
2290
2291echo "$as_me:$LINENO: checking for suffix of executables" >&5
2292echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2293if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2294 (eval $ac_link) 2>&5
2295 ac_status=$?
2296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2297 (exit $ac_status); }; then
2298 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2299# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2300# work properly (i.e., refer to `conftest.exe'), while it won't with
2301# `rm'.
2302for ac_file in conftest.exe conftest conftest.*; do
2303 test -f "$ac_file" || continue
2304 case $ac_file in
2305 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2306 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
86da66b5
HPN
2307 export ac_cv_exeext
2308 break;;
ba479fd2
NN
2309 * ) break;;
2310 esac
2311done
e9a25f70 2312else
ba479fd2
NN
2313 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2314See \`config.log' for more details." >&5
2315echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2316See \`config.log' for more details." >&2;}
2317 { (exit 1); exit 1; }; }
2318fi
2319
2320rm -f conftest$ac_cv_exeext
2321echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2322echo "${ECHO_T}$ac_cv_exeext" >&6
2323
2324rm -f conftest.$ac_ext
2325EXEEXT=$ac_cv_exeext
2326ac_exeext=$EXEEXT
2327echo "$as_me:$LINENO: checking for suffix of object files" >&5
2328echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2329if test "${ac_cv_objext+set}" = set; then
2330 echo $ECHO_N "(cached) $ECHO_C" >&6
2331else
2332 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2333/* confdefs.h. */
2334_ACEOF
2335cat confdefs.h >>conftest.$ac_ext
2336cat >>conftest.$ac_ext <<_ACEOF
2337/* end confdefs.h. */
2338
2339int
2340main ()
2341{
6e3f3080 2342
ba479fd2
NN
2343 ;
2344 return 0;
2345}
2346_ACEOF
2347rm -f conftest.o conftest.obj
2348if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2349 (eval $ac_compile) 2>&5
2350 ac_status=$?
2351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2352 (exit $ac_status); }; then
2353 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2354 case $ac_file in
2355 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2356 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2357 break;;
2358 esac
2359done
63cf211a 2360else
ba479fd2
NN
2361 echo "$as_me: failed program was:" >&5
2362sed 's/^/| /' conftest.$ac_ext >&5
2363
2364{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2365See \`config.log' for more details." >&5
2366echo "$as_me: error: cannot compute suffix of object files: cannot compile
2367See \`config.log' for more details." >&2;}
2368 { (exit 1); exit 1; }; }
2369fi
2370
2371rm -f conftest.$ac_cv_objext conftest.$ac_ext
2372fi
2373echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2374echo "${ECHO_T}$ac_cv_objext" >&6
2375OBJEXT=$ac_cv_objext
2376ac_objext=$OBJEXT
2377echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2378echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2379if test "${ac_cv_c_compiler_gnu+set}" = set; then
2380 echo $ECHO_N "(cached) $ECHO_C" >&6
2381else
2382 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2383/* confdefs.h. */
2384_ACEOF
2385cat confdefs.h >>conftest.$ac_ext
2386cat >>conftest.$ac_ext <<_ACEOF
2387/* end confdefs.h. */
2388
2389int
2390main ()
2391{
2392#ifndef __GNUC__
2393 choke me
2394#endif
6e3f3080 2395
ba479fd2
NN
2396 ;
2397 return 0;
2398}
2399_ACEOF
2400rm -f conftest.$ac_objext
2401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2402 (eval $ac_compile) 2>conftest.er1
ba479fd2 2403 ac_status=$?
86da66b5
HPN
2404 grep -v '^ *+' conftest.er1 >conftest.err
2405 rm -f conftest.er1
2406 cat conftest.err >&5
ba479fd2
NN
2407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2408 (exit $ac_status); } &&
b095fe2c 2409 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2411 (eval $ac_try) 2>&5
2412 ac_status=$?
2413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2414 (exit $ac_status); }; } &&
2415 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2417 (eval $ac_try) 2>&5
2418 ac_status=$?
2419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2420 (exit $ac_status); }; }; then
2421 ac_compiler_gnu=yes
2422else
2423 echo "$as_me: failed program was:" >&5
2424sed 's/^/| /' conftest.$ac_ext >&5
2425
2426ac_compiler_gnu=no
2427fi
86da66b5 2428rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2429ac_cv_c_compiler_gnu=$ac_compiler_gnu
2430
2431fi
2432echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2433echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2434GCC=`test $ac_compiler_gnu = yes && echo yes`
2435ac_test_CFLAGS=${CFLAGS+set}
2436ac_save_CFLAGS=$CFLAGS
2437CFLAGS="-g"
2438echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2439echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2440if test "${ac_cv_prog_cc_g+set}" = set; then
2441 echo $ECHO_N "(cached) $ECHO_C" >&6
2442else
2443 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2444/* confdefs.h. */
2445_ACEOF
2446cat confdefs.h >>conftest.$ac_ext
2447cat >>conftest.$ac_ext <<_ACEOF
2448/* end confdefs.h. */
2449
2450int
2451main ()
2452{
2453
2454 ;
2455 return 0;
2456}
2457_ACEOF
2458rm -f conftest.$ac_objext
2459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2460 (eval $ac_compile) 2>conftest.er1
ba479fd2 2461 ac_status=$?
86da66b5
HPN
2462 grep -v '^ *+' conftest.er1 >conftest.err
2463 rm -f conftest.er1
2464 cat conftest.err >&5
ba479fd2
NN
2465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2466 (exit $ac_status); } &&
b095fe2c 2467 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2469 (eval $ac_try) 2>&5
2470 ac_status=$?
2471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2472 (exit $ac_status); }; } &&
2473 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2475 (eval $ac_try) 2>&5
2476 ac_status=$?
2477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2478 (exit $ac_status); }; }; then
6e3f3080
NN
2479 ac_cv_prog_cc_g=yes
2480else
ba479fd2
NN
2481 echo "$as_me: failed program was:" >&5
2482sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2483
ba479fd2 2484ac_cv_prog_cc_g=no
6e3f3080 2485fi
86da66b5 2486rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2487fi
2488echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2489echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2490if test "$ac_test_CFLAGS" = set; then
ba479fd2 2491 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2492elif test $ac_cv_prog_cc_g = yes; then
2493 if test "$GCC" = yes; then
e9a25f70
JL
2494 CFLAGS="-g -O2"
2495 else
cd9e5e7c 2496 CFLAGS="-g"
81814e35 2497 fi
3723cad9 2498else
cd9e5e7c
MK
2499 if test "$GCC" = yes; then
2500 CFLAGS="-O2"
2501 else
2502 CFLAGS=
2503 fi
e9a25f70 2504fi
ba479fd2
NN
2505echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2506echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2507if test "${ac_cv_prog_cc_stdc+set}" = set; then
2508 echo $ECHO_N "(cached) $ECHO_C" >&6
2509else
2510 ac_cv_prog_cc_stdc=no
2511ac_save_CC=$CC
2512cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2513/* confdefs.h. */
2514_ACEOF
2515cat confdefs.h >>conftest.$ac_ext
2516cat >>conftest.$ac_ext <<_ACEOF
2517/* end confdefs.h. */
2518#include <stdarg.h>
2519#include <stdio.h>
2520#include <sys/types.h>
2521#include <sys/stat.h>
2522/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2523struct buf { int x; };
2524FILE * (*rcsopen) (struct buf *, struct stat *, int);
2525static char *e (p, i)
2526 char **p;
2527 int i;
2528{
2529 return p[i];
2530}
2531static char *f (char * (*g) (char **, int), char **p, ...)
2532{
2533 char *s;
2534 va_list v;
2535 va_start (v,p);
2536 s = g (p, va_arg (v,int));
2537 va_end (v);
2538 return s;
2539}
86da66b5
HPN
2540
2541/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2542 function prototypes and stuff, but not '\xHH' hex character constants.
2543 These don't provoke an error unfortunately, instead are silently treated
2544 as 'x'. The following induces an error, until -std1 is added to get
2545 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2546 array size at least. It's necessary to write '\x00'==0 to get something
2547 that's true only with -std1. */
2548int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2549
ba479fd2
NN
2550int test (int i, double x);
2551struct s1 {int (*f) (int a);};
2552struct s2 {int (*f) (double a);};
2553int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2554int argc;
2555char **argv;
2556int
2557main ()
2558{
2559return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2560 ;
2561 return 0;
2562}
2563_ACEOF
2564# Don't try gcc -ansi; that turns off useful extensions and
2565# breaks some systems' header files.
2566# AIX -qlanglvl=ansi
2567# Ultrix and OSF/1 -std1
2568# HP-UX 10.20 and later -Ae
2569# HP-UX older versions -Aa -D_HPUX_SOURCE
2570# SVR4 -Xc -D__EXTENSIONS__
2571for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2572do
2573 CC="$ac_save_CC $ac_arg"
2574 rm -f conftest.$ac_objext
2575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2576 (eval $ac_compile) 2>conftest.er1
ba479fd2 2577 ac_status=$?
86da66b5
HPN
2578 grep -v '^ *+' conftest.er1 >conftest.err
2579 rm -f conftest.er1
2580 cat conftest.err >&5
ba479fd2
NN
2581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2582 (exit $ac_status); } &&
b095fe2c 2583 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2585 (eval $ac_try) 2>&5
2586 ac_status=$?
2587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2588 (exit $ac_status); }; } &&
2589 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2591 (eval $ac_try) 2>&5
2592 ac_status=$?
2593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2594 (exit $ac_status); }; }; then
2595 ac_cv_prog_cc_stdc=$ac_arg
2596break
2597else
2598 echo "$as_me: failed program was:" >&5
2599sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2600
ba479fd2 2601fi
86da66b5 2602rm -f conftest.err conftest.$ac_objext
ba479fd2
NN
2603done
2604rm -f conftest.$ac_ext conftest.$ac_objext
2605CC=$ac_save_CC
2606
2607fi
2608
2609case "x$ac_cv_prog_cc_stdc" in
2610 x|xno)
2611 echo "$as_me:$LINENO: result: none needed" >&5
2612echo "${ECHO_T}none needed" >&6 ;;
2613 *)
2614 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2615echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2616 CC="$CC $ac_cv_prog_cc_stdc" ;;
2617esac
2618
2619# Some people use a C++ compiler to compile C. Since we use `exit',
2620# in C++ we need to declare it. In case someone uses the same compiler
2621# for both compiling C and C++ we need to have the C++ compiler decide
2622# the declaration of exit, since it's the most demanding environment.
2623cat >conftest.$ac_ext <<_ACEOF
2624#ifndef __cplusplus
2625 choke me
2626#endif
2627_ACEOF
2628rm -f conftest.$ac_objext
2629if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2630 (eval $ac_compile) 2>conftest.er1
ba479fd2 2631 ac_status=$?
86da66b5
HPN
2632 grep -v '^ *+' conftest.er1 >conftest.err
2633 rm -f conftest.er1
2634 cat conftest.err >&5
ba479fd2
NN
2635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2636 (exit $ac_status); } &&
b095fe2c 2637 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2639 (eval $ac_try) 2>&5
2640 ac_status=$?
2641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2642 (exit $ac_status); }; } &&
2643 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2645 (eval $ac_try) 2>&5
2646 ac_status=$?
2647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2648 (exit $ac_status); }; }; then
2649 for ac_declaration in \
86da66b5 2650 '' \
ba479fd2
NN
2651 'extern "C" void std::exit (int) throw (); using std::exit;' \
2652 'extern "C" void std::exit (int); using std::exit;' \
2653 'extern "C" void exit (int) throw ();' \
2654 'extern "C" void exit (int);' \
2655 'void exit (int);'
2656do
2657 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2658/* confdefs.h. */
2659_ACEOF
2660cat confdefs.h >>conftest.$ac_ext
2661cat >>conftest.$ac_ext <<_ACEOF
2662/* end confdefs.h. */
33e70558 2663$ac_declaration
86da66b5 2664#include <stdlib.h>
ba479fd2
NN
2665int
2666main ()
2667{
2668exit (42);
2669 ;
2670 return 0;
2671}
2672_ACEOF
2673rm -f conftest.$ac_objext
2674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2675 (eval $ac_compile) 2>conftest.er1
ba479fd2 2676 ac_status=$?
86da66b5
HPN
2677 grep -v '^ *+' conftest.er1 >conftest.err
2678 rm -f conftest.er1
2679 cat conftest.err >&5
ba479fd2
NN
2680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2681 (exit $ac_status); } &&
b095fe2c 2682 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2684 (eval $ac_try) 2>&5
2685 ac_status=$?
2686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2687 (exit $ac_status); }; } &&
2688 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2690 (eval $ac_try) 2>&5
2691 ac_status=$?
2692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2693 (exit $ac_status); }; }; then
2694 :
2695else
2696 echo "$as_me: failed program was:" >&5
2697sed 's/^/| /' conftest.$ac_ext >&5
2698
2699continue
2700fi
86da66b5 2701rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 2702 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2703/* confdefs.h. */
2704_ACEOF
2705cat confdefs.h >>conftest.$ac_ext
2706cat >>conftest.$ac_ext <<_ACEOF
2707/* end confdefs.h. */
2708$ac_declaration
2709int
2710main ()
2711{
2712exit (42);
2713 ;
2714 return 0;
2715}
2716_ACEOF
2717rm -f conftest.$ac_objext
2718if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2719 (eval $ac_compile) 2>conftest.er1
ba479fd2 2720 ac_status=$?
86da66b5
HPN
2721 grep -v '^ *+' conftest.er1 >conftest.err
2722 rm -f conftest.er1
2723 cat conftest.err >&5
ba479fd2
NN
2724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2725 (exit $ac_status); } &&
b095fe2c 2726 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
2727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2728 (eval $ac_try) 2>&5
2729 ac_status=$?
2730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2731 (exit $ac_status); }; } &&
2732 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2734 (eval $ac_try) 2>&5
2735 ac_status=$?
2736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2737 (exit $ac_status); }; }; then
2738 break
3ec83fc2 2739else
ba479fd2
NN
2740 echo "$as_me: failed program was:" >&5
2741sed 's/^/| /' conftest.$ac_ext >&5
2742
6e3f3080 2743fi
86da66b5 2744rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2745done
2746rm -f conftest*
2747if test -n "$ac_declaration"; then
2748 echo '#ifdef __cplusplus' >>confdefs.h
2749 echo $ac_declaration >>confdefs.h
2750 echo '#endif' >>confdefs.h
2751fi
2752
3ec83fc2 2753else
ba479fd2
NN
2754 echo "$as_me: failed program was:" >&5
2755sed 's/^/| /' conftest.$ac_ext >&5
2756
2757fi
86da66b5 2758rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2759ac_ext=c
2760ac_cpp='$CPP $CPPFLAGS'
2761ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2762ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2763ac_compiler_gnu=$ac_cv_c_compiler_gnu
2764
2765if test "x$CC" != xcc; then
2766 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2767echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2768else
2769 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2770echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2771fi
2772set dummy $CC; ac_cc=`echo $2 |
2773 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2774if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2775 echo $ECHO_N "(cached) $ECHO_C" >&6
2776else
2777 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2778/* confdefs.h. */
2779_ACEOF
2780cat confdefs.h >>conftest.$ac_ext
2781cat >>conftest.$ac_ext <<_ACEOF
2782/* end confdefs.h. */
2783
2784int
2785main ()
2786{
2787
2788 ;
2789 return 0;
2790}
2791_ACEOF
3ec83fc2
RH
2792# Make sure it works both with $CC and with simple cc.
2793# We do the test twice because some compilers refuse to overwrite an
2794# existing .o file with -o, though they will create one.
ba479fd2
NN
2795ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2796if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2797 (eval $ac_try) 2>&5
2798 ac_status=$?
2799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2800 (exit $ac_status); } &&
2801 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2802 (eval $ac_try) 2>&5
2803 ac_status=$?
2804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2805 (exit $ac_status); };
3ec83fc2
RH
2806then
2807 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2808 if test "x$CC" != xcc; then
2809 # Test first that cc exists at all.
ba479fd2
NN
2810 if { ac_try='cc -c conftest.$ac_ext >&5'
2811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2812 (eval $ac_try) 2>&5
2813 ac_status=$?
2814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2815 (exit $ac_status); }; }; then
2816 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2817 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2818 (eval $ac_try) 2>&5
2819 ac_status=$?
2820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2821 (exit $ac_status); } &&
2822 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2823 (eval $ac_try) 2>&5
2824 ac_status=$?
2825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2826 (exit $ac_status); };
3ec83fc2 2827 then
86da66b5
HPN
2828 # cc works too.
2829 :
3ec83fc2 2830 else
86da66b5
HPN
2831 # cc exists but doesn't like -o.
2832 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2833 fi
2834 fi
2835 fi
2836else
2837 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2838fi
2839rm -f conftest*
2840
2841fi
2842if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2843 echo "$as_me:$LINENO: result: yes" >&5
2844echo "${ECHO_T}yes" >&6
3ec83fc2 2845else
ba479fd2
NN
2846 echo "$as_me:$LINENO: result: no" >&5
2847echo "${ECHO_T}no" >&6
2848
2849cat >>confdefs.h <<\_ACEOF
3ec83fc2 2850#define NO_MINUS_C_MINUS_O 1
ba479fd2 2851_ACEOF
3ec83fc2
RH
2852
2853fi
2854
3b620440
KC
2855# expand $ac_aux_dir to an absolute path
2856am_aux_dir=`cd $ac_aux_dir && pwd`
2857
2858# FIXME: we rely on the cache variable name because
2859# there is no other way.
2860set dummy $CC
2861ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2862if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2863 # Losing compiler, so override with the script.
2864 # FIXME: It is wrong to rewrite CC.
2865 # But if we don't then we get into trouble of one sort or another.
2866 # A longer-term fix would be to have automake use am__CC in this case,
2867 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2868 CC="$am_aux_dir/compile $CC"
2869fi
2870
414d23ae
HPN
2871# autoconf is lame and doesn't give us any substitution variable for this.
2872if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2873 NO_MINUS_C_MINUS_O=yes
2874else
2875 OUTPUT_OPTION='-o $@'
2876fi
2877
2878
2879
73458fb7
NN
2880# -------------------------
2881# Check C compiler features
2882# -------------------------
2883
ba479fd2
NN
2884ac_ext=c
2885ac_cpp='$CPP $CPPFLAGS'
2886ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2887ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2888ac_compiler_gnu=$ac_cv_c_compiler_gnu
2889echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2890echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2891# On Suns, sometimes $CPP names a directory.
2892if test -n "$CPP" && test -d "$CPP"; then
2893 CPP=
2894fi
2895if test -z "$CPP"; then
ba479fd2
NN
2896 if test "${ac_cv_prog_CPP+set}" = set; then
2897 echo $ECHO_N "(cached) $ECHO_C" >&6
2898else
2899 # Double quotes because CPP needs to be expanded
2900 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2901 do
2902 ac_preproc_ok=false
2903for ac_c_preproc_warn_flag in '' yes
2904do
2905 # Use a header file that comes with gcc, so configuring glibc
2906 # with a fresh cross-compiler works.
2907 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2908 # <limits.h> exists even on freestanding compilers.
84c041a1 2909 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2910 # not just through cpp. "Syntax error" is here to catch this case.
2911 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2912/* confdefs.h. */
2913_ACEOF
2914cat confdefs.h >>conftest.$ac_ext
2915cat >>conftest.$ac_ext <<_ACEOF
2916/* end confdefs.h. */
2917#ifdef __STDC__
2918# include <limits.h>
2919#else
2920# include <assert.h>
2921#endif
86da66b5 2922 Syntax error
ba479fd2
NN
2923_ACEOF
2924if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2925 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2926 ac_status=$?
2927 grep -v '^ *+' conftest.er1 >conftest.err
2928 rm -f conftest.er1
2929 cat conftest.err >&5
2930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2931 (exit $ac_status); } >/dev/null; then
2932 if test -s conftest.err; then
2933 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2934 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2935 else
2936 ac_cpp_err=
2937 fi
2938else
2939 ac_cpp_err=yes
2940fi
2941if test -z "$ac_cpp_err"; then
093e61a6 2942 :
cafe096b 2943else
ba479fd2
NN
2944 echo "$as_me: failed program was:" >&5
2945sed 's/^/| /' conftest.$ac_ext >&5
2946
2947 # Broken: fails on valid input.
2948continue
2949fi
2950rm -f conftest.err conftest.$ac_ext
2951
2952 # OK, works on sane cases. Now check whether non-existent headers
2953 # can be detected and how.
2954 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2955/* confdefs.h. */
2956_ACEOF
2957cat confdefs.h >>conftest.$ac_ext
2958cat >>conftest.$ac_ext <<_ACEOF
2959/* end confdefs.h. */
2960#include <ac_nonexistent.h>
2961_ACEOF
2962if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2963 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2964 ac_status=$?
2965 grep -v '^ *+' conftest.er1 >conftest.err
2966 rm -f conftest.er1
2967 cat conftest.err >&5
2968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2969 (exit $ac_status); } >/dev/null; then
2970 if test -s conftest.err; then
2971 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2972 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2973 else
2974 ac_cpp_err=
2975 fi
2976else
2977 ac_cpp_err=yes
2978fi
2979if test -z "$ac_cpp_err"; then
2980 # Broken: success on invalid input.
2981continue
2982else
2983 echo "$as_me: failed program was:" >&5
2984sed 's/^/| /' conftest.$ac_ext >&5
2985
2986 # Passes both tests.
2987ac_preproc_ok=:
2988break
2989fi
2990rm -f conftest.err conftest.$ac_ext
2991
2992done
2993# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2994rm -f conftest.err conftest.$ac_ext
2995if $ac_preproc_ok; then
2996 break
2997fi
2998
2999 done
3000 ac_cv_prog_CPP=$CPP
3001
3002fi
3003 CPP=$ac_cv_prog_CPP
3004else
3005 ac_cv_prog_CPP=$CPP
3006fi
3007echo "$as_me:$LINENO: result: $CPP" >&5
3008echo "${ECHO_T}$CPP" >&6
3009ac_preproc_ok=false
3010for ac_c_preproc_warn_flag in '' yes
3011do
3012 # Use a header file that comes with gcc, so configuring glibc
3013 # with a fresh cross-compiler works.
3014 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3015 # <limits.h> exists even on freestanding compilers.
3016 # On the NeXT, cc -E runs the code through the compiler's parser,
3017 # not just through cpp. "Syntax error" is here to catch this case.
3018 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3019/* confdefs.h. */
3020_ACEOF
3021cat confdefs.h >>conftest.$ac_ext
3022cat >>conftest.$ac_ext <<_ACEOF
3023/* end confdefs.h. */
3024#ifdef __STDC__
3025# include <limits.h>
3026#else
3027# include <assert.h>
3028#endif
86da66b5 3029 Syntax error
ba479fd2
NN
3030_ACEOF
3031if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3032 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3033 ac_status=$?
3034 grep -v '^ *+' conftest.er1 >conftest.err
3035 rm -f conftest.er1
3036 cat conftest.err >&5
3037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3038 (exit $ac_status); } >/dev/null; then
3039 if test -s conftest.err; then
3040 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3041 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3042 else
3043 ac_cpp_err=
3044 fi
3045else
3046 ac_cpp_err=yes
3047fi
3048if test -z "$ac_cpp_err"; then
6e3f3080 3049 :
414d23ae 3050else
ba479fd2
NN
3051 echo "$as_me: failed program was:" >&5
3052sed 's/^/| /' conftest.$ac_ext >&5
3053
3054 # Broken: fails on valid input.
3055continue
3056fi
3057rm -f conftest.err conftest.$ac_ext
3058
3059 # OK, works on sane cases. Now check whether non-existent headers
3060 # can be detected and how.
3061 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3062/* confdefs.h. */
3063_ACEOF
3064cat confdefs.h >>conftest.$ac_ext
3065cat >>conftest.$ac_ext <<_ACEOF
3066/* end confdefs.h. */
3067#include <ac_nonexistent.h>
3068_ACEOF
3069if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3070 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3071 ac_status=$?
3072 grep -v '^ *+' conftest.er1 >conftest.err
3073 rm -f conftest.er1
3074 cat conftest.err >&5
3075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3076 (exit $ac_status); } >/dev/null; then
3077 if test -s conftest.err; then
3078 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3079 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3080 else
3081 ac_cpp_err=
3082 fi
6e3f3080 3083else
ba479fd2 3084 ac_cpp_err=yes
63cf211a 3085fi
ba479fd2
NN
3086if test -z "$ac_cpp_err"; then
3087 # Broken: success on invalid input.
3088continue
3089else
3090 echo "$as_me: failed program was:" >&5
3091sed 's/^/| /' conftest.$ac_ext >&5
3092
3093 # Passes both tests.
3094ac_preproc_ok=:
3095break
63cf211a 3096fi
ba479fd2
NN
3097rm -f conftest.err conftest.$ac_ext
3098
3099done
3100# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3101rm -f conftest.err conftest.$ac_ext
3102if $ac_preproc_ok; then
3103 :
6e3f3080 3104else
ba479fd2
NN
3105 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3106See \`config.log' for more details." >&5
3107echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3108See \`config.log' for more details." >&2;}
3109 { (exit 1); exit 1; }; }
6e3f3080
NN
3110fi
3111
ba479fd2
NN
3112ac_ext=c
3113ac_cpp='$CPP $CPPFLAGS'
3114ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3115ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3116ac_compiler_gnu=$ac_cv_c_compiler_gnu
3117
b5472e1d 3118
ba479fd2
NN
3119echo "$as_me:$LINENO: checking for inline" >&5
3120echo $ECHO_N "checking for inline... $ECHO_C" >&6
3121if test "${ac_cv_c_inline+set}" = set; then
3122 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3123else
3124 ac_cv_c_inline=no
3125for ac_kw in inline __inline__ __inline; do
ba479fd2 3126 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3127/* confdefs.h. */
3128_ACEOF
3129cat confdefs.h >>conftest.$ac_ext
3130cat >>conftest.$ac_ext <<_ACEOF
3131/* end confdefs.h. */
3132#ifndef __cplusplus
3133typedef int foo_t;
3134static $ac_kw foo_t static_foo () {return 0; }
3135$ac_kw foo_t foo () {return 0; }
3136#endif
414d23ae 3137
ba479fd2
NN
3138_ACEOF
3139rm -f conftest.$ac_objext
3140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3141 (eval $ac_compile) 2>conftest.er1
ba479fd2 3142 ac_status=$?
86da66b5
HPN
3143 grep -v '^ *+' conftest.er1 >conftest.err
3144 rm -f conftest.er1
3145 cat conftest.err >&5
ba479fd2
NN
3146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3147 (exit $ac_status); } &&
b095fe2c 3148 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
3149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3150 (eval $ac_try) 2>&5
3151 ac_status=$?
3152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3153 (exit $ac_status); }; } &&
3154 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3156 (eval $ac_try) 2>&5
3157 ac_status=$?
3158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3159 (exit $ac_status); }; }; then
414d23ae
HPN
3160 ac_cv_c_inline=$ac_kw; break
3161else
ba479fd2
NN
3162 echo "$as_me: failed program was:" >&5
3163sed 's/^/| /' conftest.$ac_ext >&5
3164
414d23ae 3165fi
86da66b5 3166rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3167done
3168
3169fi
ba479fd2
NN
3170echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3171echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3172
3173
ba479fd2 3174case $ac_cv_c_inline in
414d23ae 3175 inline | yes) ;;
86da66b5
HPN
3176 *)
3177 case $ac_cv_c_inline in
3178 no) ac_val=;;
3179 *) ac_val=$ac_cv_c_inline;;
3180 esac
3181 cat >>confdefs.h <<_ACEOF
3182#ifndef __cplusplus
3183#define inline $ac_val
3184#endif
ba479fd2 3185_ACEOF
86da66b5 3186 ;;
414d23ae
HPN
3187esac
3188
414d23ae 3189
ba479fd2
NN
3190echo "$as_me:$LINENO: checking for long long int" >&5
3191echo $ECHO_N "checking for long long int... $ECHO_C" >&6
3192if test "${ac_cv_c_long_long+set}" = set; then
3193 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3194else
ba479fd2 3195 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3196/* confdefs.h. */
3197_ACEOF
3198cat confdefs.h >>conftest.$ac_ext
3199cat >>conftest.$ac_ext <<_ACEOF
3200/* end confdefs.h. */
414d23ae 3201
ba479fd2
NN
3202int
3203main ()
3204{
414d23ae 3205long long int i;
ba479fd2
NN
3206 ;
3207 return 0;
3208}
3209_ACEOF
3210rm -f conftest.$ac_objext
3211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3212 (eval $ac_compile) 2>conftest.er1
ba479fd2 3213 ac_status=$?
86da66b5
HPN
3214 grep -v '^ *+' conftest.er1 >conftest.err
3215 rm -f conftest.er1
3216 cat conftest.err >&5
ba479fd2
NN
3217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3218 (exit $ac_status); } &&
b095fe2c 3219 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
3220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3221 (eval $ac_try) 2>&5
3222 ac_status=$?
3223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3224 (exit $ac_status); }; } &&
3225 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3227 (eval $ac_try) 2>&5
3228 ac_status=$?
3229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3230 (exit $ac_status); }; }; then
414d23ae
HPN
3231 ac_cv_c_long_long=yes
3232else
ba479fd2
NN
3233 echo "$as_me: failed program was:" >&5
3234sed 's/^/| /' conftest.$ac_ext >&5
3235
3236ac_cv_c_long_long=no
414d23ae 3237fi
86da66b5 3238rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3239fi
ba479fd2
NN
3240echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5
3241echo "${ECHO_T}$ac_cv_c_long_long" >&6
63cf211a 3242 if test $ac_cv_c_long_long = yes; then
ba479fd2
NN
3243
3244cat >>confdefs.h <<\_ACEOF
414d23ae 3245#define HAVE_LONG_LONG 1
ba479fd2 3246_ACEOF
414d23ae
HPN
3247
3248 fi
ba479fd2
NN
3249echo "$as_me:$LINENO: checking for __int64" >&5
3250echo $ECHO_N "checking for __int64... $ECHO_C" >&6
3251if test "${ac_cv_c___int64+set}" = set; then
3252 echo $ECHO_N "(cached) $ECHO_C" >&6
3253else
3254 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3255/* confdefs.h. */
3256_ACEOF
3257cat confdefs.h >>conftest.$ac_ext
3258cat >>conftest.$ac_ext <<_ACEOF
3259/* end confdefs.h. */
3260
3261int
3262main ()
3263{
414d23ae 3264__int64 i;
ba479fd2
NN
3265 ;
3266 return 0;
3267}
3268_ACEOF
3269rm -f conftest.$ac_objext
3270if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3271 (eval $ac_compile) 2>conftest.er1
ba479fd2 3272 ac_status=$?
86da66b5
HPN
3273 grep -v '^ *+' conftest.er1 >conftest.err
3274 rm -f conftest.er1
3275 cat conftest.err >&5
ba479fd2
NN
3276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3277 (exit $ac_status); } &&
b095fe2c 3278 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
3279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3280 (eval $ac_try) 2>&5
3281 ac_status=$?
3282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3283 (exit $ac_status); }; } &&
3284 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3286 (eval $ac_try) 2>&5
3287 ac_status=$?
3288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3289 (exit $ac_status); }; }; then
414d23ae
HPN
3290 ac_cv_c___int64=yes
3291else
ba479fd2
NN
3292 echo "$as_me: failed program was:" >&5
3293sed 's/^/| /' conftest.$ac_ext >&5
3294
3295ac_cv_c___int64=no
414d23ae 3296fi
86da66b5 3297rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3298fi
ba479fd2
NN
3299echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5
3300echo "${ECHO_T}$ac_cv_c___int64" >&6
63cf211a 3301 if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3302
3303cat >>confdefs.h <<\_ACEOF
414d23ae 3304#define HAVE___INT64 1
ba479fd2 3305_ACEOF
414d23ae
HPN
3306
3307 fi
3308
414d23ae
HPN
3309
3310# sizeof(char) is 1 by definition.
bf3b7cd3
JD
3311
3312echo "$as_me:$LINENO: checking for egrep" >&5
3313echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3314if test "${ac_cv_prog_egrep+set}" = set; then
3315 echo $ECHO_N "(cached) $ECHO_C" >&6
3316else
3317 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3318 then ac_cv_prog_egrep='grep -E'
3319 else ac_cv_prog_egrep='egrep'
3320 fi
3321fi
3322echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3323echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3324 EGREP=$ac_cv_prog_egrep
3325
3326
3327echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3328echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3329if test "${ac_cv_header_stdc+set}" = set; then
3330 echo $ECHO_N "(cached) $ECHO_C" >&6
3331else
3332 cat >conftest.$ac_ext <<_ACEOF
3333/* confdefs.h. */
3334_ACEOF
3335cat confdefs.h >>conftest.$ac_ext
3336cat >>conftest.$ac_ext <<_ACEOF
3337/* end confdefs.h. */
3338#include <stdlib.h>
3339#include <stdarg.h>
3340#include <string.h>
3341#include <float.h>
3342
3343int
3344main ()
3345{
3346
3347 ;
3348 return 0;
3349}
3350_ACEOF
3351rm -f conftest.$ac_objext
3352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3353 (eval $ac_compile) 2>conftest.er1
3354 ac_status=$?
3355 grep -v '^ *+' conftest.er1 >conftest.err
3356 rm -f conftest.er1
3357 cat conftest.err >&5
3358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3359 (exit $ac_status); } &&
b095fe2c 3360 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3362 (eval $ac_try) 2>&5
3363 ac_status=$?
3364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3365 (exit $ac_status); }; } &&
3366 { ac_try='test -s conftest.$ac_objext'
3367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3368 (eval $ac_try) 2>&5
3369 ac_status=$?
3370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3371 (exit $ac_status); }; }; then
3372 ac_cv_header_stdc=yes
3373else
3374 echo "$as_me: failed program was:" >&5
3375sed 's/^/| /' conftest.$ac_ext >&5
3376
3377ac_cv_header_stdc=no
3378fi
3379rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3380
3381if test $ac_cv_header_stdc = yes; then
3382 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3383 cat >conftest.$ac_ext <<_ACEOF
3384/* confdefs.h. */
3385_ACEOF
3386cat confdefs.h >>conftest.$ac_ext
3387cat >>conftest.$ac_ext <<_ACEOF
3388/* end confdefs.h. */
3389#include <string.h>
3390
3391_ACEOF
3392if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3393 $EGREP "memchr" >/dev/null 2>&1; then
3394 :
3395else
3396 ac_cv_header_stdc=no
3397fi
3398rm -f conftest*
3399
3400fi
3401
3402if test $ac_cv_header_stdc = yes; then
3403 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3404 cat >conftest.$ac_ext <<_ACEOF
3405/* confdefs.h. */
3406_ACEOF
3407cat confdefs.h >>conftest.$ac_ext
3408cat >>conftest.$ac_ext <<_ACEOF
3409/* end confdefs.h. */
3410#include <stdlib.h>
3411
3412_ACEOF
3413if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3414 $EGREP "free" >/dev/null 2>&1; then
3415 :
3416else
3417 ac_cv_header_stdc=no
3418fi
3419rm -f conftest*
3420
3421fi
3422
3423if test $ac_cv_header_stdc = yes; then
3424 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3425 if test "$cross_compiling" = yes; then
3426 :
3427else
3428 cat >conftest.$ac_ext <<_ACEOF
3429/* confdefs.h. */
3430_ACEOF
3431cat confdefs.h >>conftest.$ac_ext
3432cat >>conftest.$ac_ext <<_ACEOF
3433/* end confdefs.h. */
3434#include <ctype.h>
3435#if ((' ' & 0x0FF) == 0x020)
3436# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3437# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3438#else
3439# define ISLOWER(c) \
3440 (('a' <= (c) && (c) <= 'i') \
3441 || ('j' <= (c) && (c) <= 'r') \
3442 || ('s' <= (c) && (c) <= 'z'))
3443# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3444#endif
3445
3446#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3447int
3448main ()
3449{
3450 int i;
3451 for (i = 0; i < 256; i++)
3452 if (XOR (islower (i), ISLOWER (i))
3453 || toupper (i) != TOUPPER (i))
3454 exit(2);
3455 exit (0);
3456}
3457_ACEOF
3458rm -f conftest$ac_exeext
3459if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3460 (eval $ac_link) 2>&5
3461 ac_status=$?
3462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3463 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3465 (eval $ac_try) 2>&5
3466 ac_status=$?
3467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3468 (exit $ac_status); }; }; then
3469 :
3470else
3471 echo "$as_me: program exited with status $ac_status" >&5
3472echo "$as_me: failed program was:" >&5
3473sed 's/^/| /' conftest.$ac_ext >&5
3474
3475( exit $ac_status )
3476ac_cv_header_stdc=no
3477fi
3478rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3479fi
3480fi
3481fi
3482echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3483echo "${ECHO_T}$ac_cv_header_stdc" >&6
3484if test $ac_cv_header_stdc = yes; then
3485
3486cat >>confdefs.h <<\_ACEOF
3487#define STDC_HEADERS 1
3488_ACEOF
3489
3490fi
3491
3492# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3503 inttypes.h stdint.h unistd.h
3504do
3505as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3506echo "$as_me:$LINENO: checking for $ac_header" >&5
3507echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3508if eval "test \"\${$as_ac_Header+set}\" = set"; then
3509 echo $ECHO_N "(cached) $ECHO_C" >&6
3510else
3511 cat >conftest.$ac_ext <<_ACEOF
3512/* confdefs.h. */
3513_ACEOF
3514cat confdefs.h >>conftest.$ac_ext
3515cat >>conftest.$ac_ext <<_ACEOF
3516/* end confdefs.h. */
3517$ac_includes_default
3518
3519#include <$ac_header>
3520_ACEOF
3521rm -f conftest.$ac_objext
3522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3523 (eval $ac_compile) 2>conftest.er1
3524 ac_status=$?
3525 grep -v '^ *+' conftest.er1 >conftest.err
3526 rm -f conftest.er1
3527 cat conftest.err >&5
3528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3529 (exit $ac_status); } &&
b095fe2c 3530 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3532 (eval $ac_try) 2>&5
3533 ac_status=$?
3534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3535 (exit $ac_status); }; } &&
3536 { ac_try='test -s conftest.$ac_objext'
3537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3538 (eval $ac_try) 2>&5
3539 ac_status=$?
3540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3541 (exit $ac_status); }; }; then
3542 eval "$as_ac_Header=yes"
3543else
3544 echo "$as_me: failed program was:" >&5
3545sed 's/^/| /' conftest.$ac_ext >&5
3546
3547eval "$as_ac_Header=no"
3548fi
3549rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3550fi
3551echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3552echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3553if test `eval echo '${'$as_ac_Header'}'` = yes; then
3554 cat >>confdefs.h <<_ACEOF
3555#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3556_ACEOF
3557
3558fi
3559
3560done
3561
3562
3563echo "$as_me:$LINENO: checking for void *" >&5
3564echo $ECHO_N "checking for void *... $ECHO_C" >&6
3565if test "${ac_cv_type_void_p+set}" = set; then
3566 echo $ECHO_N "(cached) $ECHO_C" >&6
3567else
3568 cat >conftest.$ac_ext <<_ACEOF
3569/* confdefs.h. */
3570_ACEOF
3571cat confdefs.h >>conftest.$ac_ext
3572cat >>conftest.$ac_ext <<_ACEOF
3573/* end confdefs.h. */
3574$ac_includes_default
3575int
3576main ()
3577{
3578if ((void * *) 0)
3579 return 0;
3580if (sizeof (void *))
3581 return 0;
3582 ;
3583 return 0;
3584}
3585_ACEOF
3586rm -f conftest.$ac_objext
3587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3588 (eval $ac_compile) 2>conftest.er1
3589 ac_status=$?
3590 grep -v '^ *+' conftest.er1 >conftest.err
3591 rm -f conftest.er1
3592 cat conftest.err >&5
3593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3594 (exit $ac_status); } &&
b095fe2c 3595 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3597 (eval $ac_try) 2>&5
3598 ac_status=$?
3599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3600 (exit $ac_status); }; } &&
3601 { ac_try='test -s conftest.$ac_objext'
3602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3603 (eval $ac_try) 2>&5
3604 ac_status=$?
3605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3606 (exit $ac_status); }; }; then
3607 ac_cv_type_void_p=yes
3608else
3609 echo "$as_me: failed program was:" >&5
3610sed 's/^/| /' conftest.$ac_ext >&5
3611
3612ac_cv_type_void_p=no
3613fi
3614rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3615fi
3616echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3617echo "${ECHO_T}$ac_cv_type_void_p" >&6
3618
ba479fd2
NN
3619echo "$as_me:$LINENO: checking size of void *" >&5
3620echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3621if test "${ac_cv_sizeof_void_p+set}" = set; then
3622 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 3623else
bf3b7cd3
JD
3624 if test "$ac_cv_type_void_p" = yes; then
3625 # The cast to unsigned long works around a bug in the HP C Compiler
3626 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3627 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3628 # This bug is HP SR number 8606223364.
3629 if test "$cross_compiling" = yes; then
3630 # Depending upon the size, compute the lo and hi bounds.
3631cat >conftest.$ac_ext <<_ACEOF
3632/* confdefs.h. */
3633_ACEOF
3634cat confdefs.h >>conftest.$ac_ext
3635cat >>conftest.$ac_ext <<_ACEOF
3636/* end confdefs.h. */
3637$ac_includes_default
3638int
3639main ()
3640{
3641static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
3642test_array [0] = 0
3643
3644 ;
3645 return 0;
3646}
3647_ACEOF
3648rm -f conftest.$ac_objext
3649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3650 (eval $ac_compile) 2>conftest.er1
3651 ac_status=$?
3652 grep -v '^ *+' conftest.er1 >conftest.err
3653 rm -f conftest.er1
3654 cat conftest.err >&5
3655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3656 (exit $ac_status); } &&
b095fe2c 3657 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3659 (eval $ac_try) 2>&5
3660 ac_status=$?
3661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3662 (exit $ac_status); }; } &&
3663 { ac_try='test -s conftest.$ac_objext'
3664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3665 (eval $ac_try) 2>&5
3666 ac_status=$?
3667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3668 (exit $ac_status); }; }; then
3669 ac_lo=0 ac_mid=0
3670 while :; do
3671 cat >conftest.$ac_ext <<_ACEOF
3672/* confdefs.h. */
3673_ACEOF
3674cat confdefs.h >>conftest.$ac_ext
3675cat >>conftest.$ac_ext <<_ACEOF
3676/* end confdefs.h. */
3677$ac_includes_default
3678int
3679main ()
3680{
3681static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3682test_array [0] = 0
3683
3684 ;
3685 return 0;
3686}
3687_ACEOF
3688rm -f conftest.$ac_objext
3689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3690 (eval $ac_compile) 2>conftest.er1
3691 ac_status=$?
3692 grep -v '^ *+' conftest.er1 >conftest.err
3693 rm -f conftest.er1
3694 cat conftest.err >&5
3695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3696 (exit $ac_status); } &&
b095fe2c 3697 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
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); }; } &&
3703 { ac_try='test -s conftest.$ac_objext'
3704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3705 (eval $ac_try) 2>&5
3706 ac_status=$?
3707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3708 (exit $ac_status); }; }; then
3709 ac_hi=$ac_mid; break
3710else
3711 echo "$as_me: failed program was:" >&5
3712sed 's/^/| /' conftest.$ac_ext >&5
3713
3714ac_lo=`expr $ac_mid + 1`
3715 if test $ac_lo -le $ac_mid; then
3716 ac_lo= ac_hi=
3717 break
3718 fi
3719 ac_mid=`expr 2 '*' $ac_mid + 1`
3720fi
3721rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3722 done
3723else
3724 echo "$as_me: failed program was:" >&5
3725sed 's/^/| /' conftest.$ac_ext >&5
3726
3727cat >conftest.$ac_ext <<_ACEOF
3728/* confdefs.h. */
3729_ACEOF
3730cat confdefs.h >>conftest.$ac_ext
3731cat >>conftest.$ac_ext <<_ACEOF
3732/* end confdefs.h. */
3733$ac_includes_default
3734int
3735main ()
3736{
3737static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
3738test_array [0] = 0
3739
3740 ;
3741 return 0;
3742}
3743_ACEOF
3744rm -f conftest.$ac_objext
3745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3746 (eval $ac_compile) 2>conftest.er1
3747 ac_status=$?
3748 grep -v '^ *+' conftest.er1 >conftest.err
3749 rm -f conftest.er1
3750 cat conftest.err >&5
3751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3752 (exit $ac_status); } &&
b095fe2c 3753 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3755 (eval $ac_try) 2>&5
3756 ac_status=$?
3757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3758 (exit $ac_status); }; } &&
3759 { ac_try='test -s conftest.$ac_objext'
3760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3761 (eval $ac_try) 2>&5
3762 ac_status=$?
3763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3764 (exit $ac_status); }; }; then
3765 ac_hi=-1 ac_mid=-1
3766 while :; do
3767 cat >conftest.$ac_ext <<_ACEOF
3768/* confdefs.h. */
3769_ACEOF
3770cat confdefs.h >>conftest.$ac_ext
3771cat >>conftest.$ac_ext <<_ACEOF
3772/* end confdefs.h. */
3773$ac_includes_default
3774int
3775main ()
3776{
3777static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
3778test_array [0] = 0
3779
3780 ;
3781 return 0;
3782}
3783_ACEOF
3784rm -f conftest.$ac_objext
3785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3786 (eval $ac_compile) 2>conftest.er1
3787 ac_status=$?
3788 grep -v '^ *+' conftest.er1 >conftest.err
3789 rm -f conftest.er1
3790 cat conftest.err >&5
3791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3792 (exit $ac_status); } &&
b095fe2c 3793 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3795 (eval $ac_try) 2>&5
3796 ac_status=$?
3797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3798 (exit $ac_status); }; } &&
3799 { ac_try='test -s conftest.$ac_objext'
3800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3801 (eval $ac_try) 2>&5
3802 ac_status=$?
3803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3804 (exit $ac_status); }; }; then
3805 ac_lo=$ac_mid; break
3806else
3807 echo "$as_me: failed program was:" >&5
3808sed 's/^/| /' conftest.$ac_ext >&5
3809
3810ac_hi=`expr '(' $ac_mid ')' - 1`
3811 if test $ac_mid -le $ac_hi; then
3812 ac_lo= ac_hi=
3813 break
3814 fi
3815 ac_mid=`expr 2 '*' $ac_mid`
3816fi
3817rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3818 done
3819else
3820 echo "$as_me: failed program was:" >&5
3821sed 's/^/| /' conftest.$ac_ext >&5
3822
3823ac_lo= ac_hi=
3824fi
3825rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3826fi
3827rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3828# Binary search between lo and hi bounds.
3829while test "x$ac_lo" != "x$ac_hi"; do
3830 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3831 cat >conftest.$ac_ext <<_ACEOF
3832/* confdefs.h. */
3833_ACEOF
3834cat confdefs.h >>conftest.$ac_ext
3835cat >>conftest.$ac_ext <<_ACEOF
3836/* end confdefs.h. */
3837$ac_includes_default
3838int
3839main ()
3840{
3841static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3842test_array [0] = 0
3843
3844 ;
3845 return 0;
3846}
3847_ACEOF
3848rm -f conftest.$ac_objext
3849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3850 (eval $ac_compile) 2>conftest.er1
3851 ac_status=$?
3852 grep -v '^ *+' conftest.er1 >conftest.err
3853 rm -f conftest.er1
3854 cat conftest.err >&5
3855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3856 (exit $ac_status); } &&
b095fe2c 3857 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
3858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3859 (eval $ac_try) 2>&5
3860 ac_status=$?
3861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3862 (exit $ac_status); }; } &&
3863 { ac_try='test -s conftest.$ac_objext'
3864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3865 (eval $ac_try) 2>&5
3866 ac_status=$?
3867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3868 (exit $ac_status); }; }; then
3869 ac_hi=$ac_mid
3870else
3871 echo "$as_me: failed program was:" >&5
3872sed 's/^/| /' conftest.$ac_ext >&5
3873
3874ac_lo=`expr '(' $ac_mid ')' + 1`
3875fi
3876rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3877done
3878case $ac_lo in
3879?*) ac_cv_sizeof_void_p=$ac_lo;;
3880'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3881See \`config.log' for more details." >&5
3882echo "$as_me: error: cannot compute sizeof (void *), 77
3883See \`config.log' for more details." >&2;}
3884 { (exit 1); exit 1; }; } ;;
3885esac
3886else
3887 if test "$cross_compiling" = yes; then
b095fe2c
DJ
3888 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
3889echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
bf3b7cd3
JD
3890 { (exit 1); exit 1; }; }
3891else
3892 cat >conftest.$ac_ext <<_ACEOF
3893/* confdefs.h. */
3894_ACEOF
3895cat confdefs.h >>conftest.$ac_ext
3896cat >>conftest.$ac_ext <<_ACEOF
3897/* end confdefs.h. */
3898$ac_includes_default
3899long longval () { return (long) (sizeof (void *)); }
3900unsigned long ulongval () { return (long) (sizeof (void *)); }
3901#include <stdio.h>
3902#include <stdlib.h>
3903int
3904main ()
3905{
3906
3907 FILE *f = fopen ("conftest.val", "w");
3908 if (! f)
3909 exit (1);
3910 if (((long) (sizeof (void *))) < 0)
3911 {
3912 long i = longval ();
3913 if (i != ((long) (sizeof (void *))))
3914 exit (1);
3915 fprintf (f, "%ld\n", i);
3916 }
3917 else
3918 {
3919 unsigned long i = ulongval ();
3920 if (i != ((long) (sizeof (void *))))
3921 exit (1);
3922 fprintf (f, "%lu\n", i);
3923 }
3924 exit (ferror (f) || fclose (f) != 0);
3925
3926 ;
3927 return 0;
3928}
3929_ACEOF
3930rm -f conftest$ac_exeext
3931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3932 (eval $ac_link) 2>&5
3933 ac_status=$?
3934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3935 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3937 (eval $ac_try) 2>&5
3938 ac_status=$?
3939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3940 (exit $ac_status); }; }; then
3941 ac_cv_sizeof_void_p=`cat conftest.val`
3942else
3943 echo "$as_me: program exited with status $ac_status" >&5
3944echo "$as_me: failed program was:" >&5
3945sed 's/^/| /' conftest.$ac_ext >&5
3946
3947( exit $ac_status )
3948{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3949See \`config.log' for more details." >&5
3950echo "$as_me: error: cannot compute sizeof (void *), 77
3951See \`config.log' for more details." >&2;}
3952 { (exit 1); exit 1; }; }
3953fi
3954rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3955fi
3956fi
3957rm -f conftest.val
3958else
3959 ac_cv_sizeof_void_p=0
3960fi
3961fi
3962echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3963echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3964cat >>confdefs.h <<_ACEOF
3965#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3966_ACEOF
3967
3968
3969echo "$as_me:$LINENO: checking for short" >&5
3970echo $ECHO_N "checking for short... $ECHO_C" >&6
3971if test "${ac_cv_type_short+set}" = set; then
3972 echo $ECHO_N "(cached) $ECHO_C" >&6
3973else
3974 cat >conftest.$ac_ext <<_ACEOF
3975/* confdefs.h. */
3976_ACEOF
3977cat confdefs.h >>conftest.$ac_ext
3978cat >>conftest.$ac_ext <<_ACEOF
3979/* end confdefs.h. */
3980$ac_includes_default
3981int
3982main ()
3983{
3984if ((short *) 0)
3985 return 0;
3986if (sizeof (short))
3987 return 0;
3988 ;
3989 return 0;
3990}
3991_ACEOF
3992rm -f conftest.$ac_objext
3993if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3994 (eval $ac_compile) 2>conftest.er1
3995 ac_status=$?
3996 grep -v '^ *+' conftest.er1 >conftest.err
3997 rm -f conftest.er1
3998 cat conftest.err >&5
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); } &&
b095fe2c 4001 { ac_try='test -z "$ac_c_werror_flag" || 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); } &&
b095fe2c 4063 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4065 (eval $ac_try) 2>&5
4066 ac_status=$?
4067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4068 (exit $ac_status); }; } &&
4069 { ac_try='test -s conftest.$ac_objext'
4070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4071 (eval $ac_try) 2>&5
4072 ac_status=$?
4073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4074 (exit $ac_status); }; }; then
4075 ac_lo=0 ac_mid=0
4076 while :; do
4077 cat >conftest.$ac_ext <<_ACEOF
4078/* confdefs.h. */
4079_ACEOF
4080cat confdefs.h >>conftest.$ac_ext
4081cat >>conftest.$ac_ext <<_ACEOF
4082/* end confdefs.h. */
4083$ac_includes_default
4084int
4085main ()
4086{
4087static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4088test_array [0] = 0
4089
4090 ;
4091 return 0;
4092}
4093_ACEOF
4094rm -f conftest.$ac_objext
4095if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4096 (eval $ac_compile) 2>conftest.er1
4097 ac_status=$?
4098 grep -v '^ *+' conftest.er1 >conftest.err
4099 rm -f conftest.er1
4100 cat conftest.err >&5
4101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4102 (exit $ac_status); } &&
b095fe2c 4103 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4105 (eval $ac_try) 2>&5
4106 ac_status=$?
4107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4108 (exit $ac_status); }; } &&
4109 { ac_try='test -s conftest.$ac_objext'
4110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4111 (eval $ac_try) 2>&5
4112 ac_status=$?
4113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4114 (exit $ac_status); }; }; then
4115 ac_hi=$ac_mid; break
4116else
4117 echo "$as_me: failed program was:" >&5
4118sed 's/^/| /' conftest.$ac_ext >&5
4119
4120ac_lo=`expr $ac_mid + 1`
4121 if test $ac_lo -le $ac_mid; then
4122 ac_lo= ac_hi=
4123 break
4124 fi
4125 ac_mid=`expr 2 '*' $ac_mid + 1`
4126fi
4127rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4128 done
4129else
4130 echo "$as_me: failed program was:" >&5
4131sed 's/^/| /' conftest.$ac_ext >&5
4132
4133cat >conftest.$ac_ext <<_ACEOF
4134/* confdefs.h. */
4135_ACEOF
4136cat confdefs.h >>conftest.$ac_ext
4137cat >>conftest.$ac_ext <<_ACEOF
4138/* end confdefs.h. */
4139$ac_includes_default
4140int
4141main ()
4142{
4143static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
4144test_array [0] = 0
4145
4146 ;
4147 return 0;
4148}
4149_ACEOF
4150rm -f conftest.$ac_objext
4151if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4152 (eval $ac_compile) 2>conftest.er1
4153 ac_status=$?
4154 grep -v '^ *+' conftest.er1 >conftest.err
4155 rm -f conftest.er1
4156 cat conftest.err >&5
4157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4158 (exit $ac_status); } &&
b095fe2c 4159 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4161 (eval $ac_try) 2>&5
4162 ac_status=$?
4163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4164 (exit $ac_status); }; } &&
4165 { ac_try='test -s conftest.$ac_objext'
4166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4167 (eval $ac_try) 2>&5
4168 ac_status=$?
4169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4170 (exit $ac_status); }; }; then
4171 ac_hi=-1 ac_mid=-1
4172 while :; do
4173 cat >conftest.$ac_ext <<_ACEOF
4174/* confdefs.h. */
4175_ACEOF
4176cat confdefs.h >>conftest.$ac_ext
4177cat >>conftest.$ac_ext <<_ACEOF
4178/* end confdefs.h. */
4179$ac_includes_default
4180int
4181main ()
4182{
4183static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
4184test_array [0] = 0
4185
4186 ;
4187 return 0;
4188}
4189_ACEOF
4190rm -f conftest.$ac_objext
4191if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4192 (eval $ac_compile) 2>conftest.er1
4193 ac_status=$?
4194 grep -v '^ *+' conftest.er1 >conftest.err
4195 rm -f conftest.er1
4196 cat conftest.err >&5
4197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4198 (exit $ac_status); } &&
b095fe2c 4199 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4201 (eval $ac_try) 2>&5
4202 ac_status=$?
4203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4204 (exit $ac_status); }; } &&
4205 { ac_try='test -s conftest.$ac_objext'
4206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4207 (eval $ac_try) 2>&5
4208 ac_status=$?
4209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4210 (exit $ac_status); }; }; then
4211 ac_lo=$ac_mid; break
4212else
4213 echo "$as_me: failed program was:" >&5
4214sed 's/^/| /' conftest.$ac_ext >&5
4215
4216ac_hi=`expr '(' $ac_mid ')' - 1`
4217 if test $ac_mid -le $ac_hi; then
4218 ac_lo= ac_hi=
4219 break
4220 fi
4221 ac_mid=`expr 2 '*' $ac_mid`
4222fi
4223rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4224 done
4225else
4226 echo "$as_me: failed program was:" >&5
4227sed 's/^/| /' conftest.$ac_ext >&5
4228
4229ac_lo= ac_hi=
4230fi
4231rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4232fi
4233rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4234# Binary search between lo and hi bounds.
4235while test "x$ac_lo" != "x$ac_hi"; do
4236 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4237 cat >conftest.$ac_ext <<_ACEOF
4238/* confdefs.h. */
4239_ACEOF
4240cat confdefs.h >>conftest.$ac_ext
4241cat >>conftest.$ac_ext <<_ACEOF
4242/* end confdefs.h. */
4243$ac_includes_default
4244int
4245main ()
4246{
4247static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4248test_array [0] = 0
4249
4250 ;
4251 return 0;
4252}
4253_ACEOF
4254rm -f conftest.$ac_objext
4255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4256 (eval $ac_compile) 2>conftest.er1
4257 ac_status=$?
4258 grep -v '^ *+' conftest.er1 >conftest.err
4259 rm -f conftest.er1
4260 cat conftest.err >&5
4261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4262 (exit $ac_status); } &&
b095fe2c 4263 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4265 (eval $ac_try) 2>&5
4266 ac_status=$?
4267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4268 (exit $ac_status); }; } &&
4269 { ac_try='test -s conftest.$ac_objext'
4270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4271 (eval $ac_try) 2>&5
4272 ac_status=$?
4273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4274 (exit $ac_status); }; }; then
4275 ac_hi=$ac_mid
4276else
4277 echo "$as_me: failed program was:" >&5
4278sed 's/^/| /' conftest.$ac_ext >&5
4279
4280ac_lo=`expr '(' $ac_mid ')' + 1`
4281fi
4282rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4283done
4284case $ac_lo in
4285?*) ac_cv_sizeof_short=$ac_lo;;
4286'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4287See \`config.log' for more details." >&5
4288echo "$as_me: error: cannot compute sizeof (short), 77
4289See \`config.log' for more details." >&2;}
4290 { (exit 1); exit 1; }; } ;;
4291esac
4292else
4293 if test "$cross_compiling" = yes; then
b095fe2c
DJ
4294 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
4295echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
bf3b7cd3
JD
4296 { (exit 1); exit 1; }; }
4297else
4298 cat >conftest.$ac_ext <<_ACEOF
4299/* confdefs.h. */
4300_ACEOF
4301cat confdefs.h >>conftest.$ac_ext
4302cat >>conftest.$ac_ext <<_ACEOF
4303/* end confdefs.h. */
4304$ac_includes_default
4305long longval () { return (long) (sizeof (short)); }
4306unsigned long ulongval () { return (long) (sizeof (short)); }
4307#include <stdio.h>
4308#include <stdlib.h>
4309int
4310main ()
4311{
4312
4313 FILE *f = fopen ("conftest.val", "w");
4314 if (! f)
4315 exit (1);
4316 if (((long) (sizeof (short))) < 0)
4317 {
4318 long i = longval ();
4319 if (i != ((long) (sizeof (short))))
4320 exit (1);
4321 fprintf (f, "%ld\n", i);
4322 }
4323 else
4324 {
4325 unsigned long i = ulongval ();
4326 if (i != ((long) (sizeof (short))))
4327 exit (1);
4328 fprintf (f, "%lu\n", i);
4329 }
4330 exit (ferror (f) || fclose (f) != 0);
4331
4332 ;
4333 return 0;
4334}
4335_ACEOF
4336rm -f conftest$ac_exeext
4337if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4338 (eval $ac_link) 2>&5
4339 ac_status=$?
4340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4341 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4343 (eval $ac_try) 2>&5
4344 ac_status=$?
4345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4346 (exit $ac_status); }; }; then
4347 ac_cv_sizeof_short=`cat conftest.val`
4348else
4349 echo "$as_me: program exited with status $ac_status" >&5
4350echo "$as_me: failed program was:" >&5
4351sed 's/^/| /' conftest.$ac_ext >&5
4352
4353( exit $ac_status )
4354{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4355See \`config.log' for more details." >&5
4356echo "$as_me: error: cannot compute sizeof (short), 77
4357See \`config.log' for more details." >&2;}
4358 { (exit 1); exit 1; }; }
4359fi
4360rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4361fi
4362fi
4363rm -f conftest.val
4364else
4365 ac_cv_sizeof_short=0
4366fi
4367fi
4368echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4369echo "${ECHO_T}$ac_cv_sizeof_short" >&6
4370cat >>confdefs.h <<_ACEOF
4371#define SIZEOF_SHORT $ac_cv_sizeof_short
4372_ACEOF
4373
4374
4375echo "$as_me:$LINENO: checking for int" >&5
4376echo $ECHO_N "checking for int... $ECHO_C" >&6
4377if test "${ac_cv_type_int+set}" = set; then
4378 echo $ECHO_N "(cached) $ECHO_C" >&6
4379else
4380 cat >conftest.$ac_ext <<_ACEOF
4381/* confdefs.h. */
4382_ACEOF
4383cat confdefs.h >>conftest.$ac_ext
4384cat >>conftest.$ac_ext <<_ACEOF
4385/* end confdefs.h. */
4386$ac_includes_default
4387int
4388main ()
4389{
4390if ((int *) 0)
4391 return 0;
4392if (sizeof (int))
4393 return 0;
4394 ;
4395 return 0;
4396}
4397_ACEOF
4398rm -f conftest.$ac_objext
4399if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4400 (eval $ac_compile) 2>conftest.er1
4401 ac_status=$?
4402 grep -v '^ *+' conftest.er1 >conftest.err
4403 rm -f conftest.er1
4404 cat conftest.err >&5
4405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4406 (exit $ac_status); } &&
b095fe2c 4407 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4409 (eval $ac_try) 2>&5
4410 ac_status=$?
4411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4412 (exit $ac_status); }; } &&
4413 { ac_try='test -s conftest.$ac_objext'
4414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4415 (eval $ac_try) 2>&5
4416 ac_status=$?
4417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4418 (exit $ac_status); }; }; then
4419 ac_cv_type_int=yes
4420else
4421 echo "$as_me: failed program was:" >&5
4422sed 's/^/| /' conftest.$ac_ext >&5
4423
4424ac_cv_type_int=no
4425fi
4426rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4427fi
4428echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4429echo "${ECHO_T}$ac_cv_type_int" >&6
4430
4431echo "$as_me:$LINENO: checking size of int" >&5
4432echo $ECHO_N "checking size of int... $ECHO_C" >&6
4433if test "${ac_cv_sizeof_int+set}" = set; then
4434 echo $ECHO_N "(cached) $ECHO_C" >&6
4435else
4436 if test "$ac_cv_type_int" = yes; then
4437 # The cast to unsigned long works around a bug in the HP C Compiler
4438 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4439 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4440 # This bug is HP SR number 8606223364.
4441 if test "$cross_compiling" = yes; then
4442 # Depending upon the size, compute the lo and hi bounds.
4443cat >conftest.$ac_ext <<_ACEOF
4444/* confdefs.h. */
4445_ACEOF
4446cat confdefs.h >>conftest.$ac_ext
4447cat >>conftest.$ac_ext <<_ACEOF
4448/* end confdefs.h. */
4449$ac_includes_default
4450int
4451main ()
4452{
4453static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4454test_array [0] = 0
4455
4456 ;
4457 return 0;
4458}
4459_ACEOF
4460rm -f conftest.$ac_objext
4461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4462 (eval $ac_compile) 2>conftest.er1
4463 ac_status=$?
4464 grep -v '^ *+' conftest.er1 >conftest.err
4465 rm -f conftest.er1
4466 cat conftest.err >&5
4467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4468 (exit $ac_status); } &&
b095fe2c 4469 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4471 (eval $ac_try) 2>&5
4472 ac_status=$?
4473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4474 (exit $ac_status); }; } &&
4475 { ac_try='test -s conftest.$ac_objext'
4476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4477 (eval $ac_try) 2>&5
4478 ac_status=$?
4479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4480 (exit $ac_status); }; }; then
4481 ac_lo=0 ac_mid=0
4482 while :; do
4483 cat >conftest.$ac_ext <<_ACEOF
4484/* confdefs.h. */
4485_ACEOF
4486cat confdefs.h >>conftest.$ac_ext
4487cat >>conftest.$ac_ext <<_ACEOF
4488/* end confdefs.h. */
4489$ac_includes_default
4490int
4491main ()
4492{
4493static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4494test_array [0] = 0
4495
4496 ;
4497 return 0;
4498}
4499_ACEOF
4500rm -f conftest.$ac_objext
4501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4502 (eval $ac_compile) 2>conftest.er1
4503 ac_status=$?
4504 grep -v '^ *+' conftest.er1 >conftest.err
4505 rm -f conftest.er1
4506 cat conftest.err >&5
4507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4508 (exit $ac_status); } &&
b095fe2c 4509 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4511 (eval $ac_try) 2>&5
4512 ac_status=$?
4513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4514 (exit $ac_status); }; } &&
4515 { ac_try='test -s conftest.$ac_objext'
4516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4517 (eval $ac_try) 2>&5
4518 ac_status=$?
4519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4520 (exit $ac_status); }; }; then
4521 ac_hi=$ac_mid; break
4522else
4523 echo "$as_me: failed program was:" >&5
4524sed 's/^/| /' conftest.$ac_ext >&5
4525
4526ac_lo=`expr $ac_mid + 1`
4527 if test $ac_lo -le $ac_mid; then
4528 ac_lo= ac_hi=
4529 break
4530 fi
4531 ac_mid=`expr 2 '*' $ac_mid + 1`
4532fi
4533rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4534 done
4535else
4536 echo "$as_me: failed program was:" >&5
4537sed 's/^/| /' conftest.$ac_ext >&5
4538
4539cat >conftest.$ac_ext <<_ACEOF
4540/* confdefs.h. */
4541_ACEOF
4542cat confdefs.h >>conftest.$ac_ext
4543cat >>conftest.$ac_ext <<_ACEOF
4544/* end confdefs.h. */
4545$ac_includes_default
4546int
4547main ()
4548{
4549static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4550test_array [0] = 0
4551
4552 ;
4553 return 0;
4554}
4555_ACEOF
4556rm -f conftest.$ac_objext
4557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4558 (eval $ac_compile) 2>conftest.er1
4559 ac_status=$?
4560 grep -v '^ *+' conftest.er1 >conftest.err
4561 rm -f conftest.er1
4562 cat conftest.err >&5
4563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4564 (exit $ac_status); } &&
b095fe2c 4565 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4567 (eval $ac_try) 2>&5
4568 ac_status=$?
4569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4570 (exit $ac_status); }; } &&
4571 { ac_try='test -s conftest.$ac_objext'
4572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4573 (eval $ac_try) 2>&5
4574 ac_status=$?
4575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4576 (exit $ac_status); }; }; then
4577 ac_hi=-1 ac_mid=-1
4578 while :; do
4579 cat >conftest.$ac_ext <<_ACEOF
4580/* confdefs.h. */
4581_ACEOF
4582cat confdefs.h >>conftest.$ac_ext
4583cat >>conftest.$ac_ext <<_ACEOF
4584/* end confdefs.h. */
4585$ac_includes_default
4586int
4587main ()
4588{
4589static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4590test_array [0] = 0
4591
4592 ;
4593 return 0;
4594}
4595_ACEOF
4596rm -f conftest.$ac_objext
4597if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4598 (eval $ac_compile) 2>conftest.er1
4599 ac_status=$?
4600 grep -v '^ *+' conftest.er1 >conftest.err
4601 rm -f conftest.er1
4602 cat conftest.err >&5
4603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4604 (exit $ac_status); } &&
b095fe2c 4605 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4607 (eval $ac_try) 2>&5
4608 ac_status=$?
4609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4610 (exit $ac_status); }; } &&
4611 { ac_try='test -s conftest.$ac_objext'
4612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4613 (eval $ac_try) 2>&5
4614 ac_status=$?
4615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4616 (exit $ac_status); }; }; then
4617 ac_lo=$ac_mid; break
4618else
4619 echo "$as_me: failed program was:" >&5
4620sed 's/^/| /' conftest.$ac_ext >&5
4621
4622ac_hi=`expr '(' $ac_mid ')' - 1`
4623 if test $ac_mid -le $ac_hi; then
4624 ac_lo= ac_hi=
4625 break
4626 fi
4627 ac_mid=`expr 2 '*' $ac_mid`
4628fi
4629rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4630 done
4631else
4632 echo "$as_me: failed program was:" >&5
4633sed 's/^/| /' conftest.$ac_ext >&5
4634
4635ac_lo= ac_hi=
4636fi
4637rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4638fi
4639rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4640# Binary search between lo and hi bounds.
4641while test "x$ac_lo" != "x$ac_hi"; do
4642 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4643 cat >conftest.$ac_ext <<_ACEOF
4644/* confdefs.h. */
4645_ACEOF
4646cat confdefs.h >>conftest.$ac_ext
4647cat >>conftest.$ac_ext <<_ACEOF
4648/* end confdefs.h. */
4649$ac_includes_default
4650int
4651main ()
4652{
4653static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4654test_array [0] = 0
4655
4656 ;
4657 return 0;
4658}
4659_ACEOF
4660rm -f conftest.$ac_objext
4661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4662 (eval $ac_compile) 2>conftest.er1
4663 ac_status=$?
4664 grep -v '^ *+' conftest.er1 >conftest.err
4665 rm -f conftest.er1
4666 cat conftest.err >&5
4667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4668 (exit $ac_status); } &&
b095fe2c 4669 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4671 (eval $ac_try) 2>&5
4672 ac_status=$?
4673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4674 (exit $ac_status); }; } &&
4675 { ac_try='test -s conftest.$ac_objext'
4676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4677 (eval $ac_try) 2>&5
4678 ac_status=$?
4679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4680 (exit $ac_status); }; }; then
4681 ac_hi=$ac_mid
4682else
4683 echo "$as_me: failed program was:" >&5
4684sed 's/^/| /' conftest.$ac_ext >&5
4685
4686ac_lo=`expr '(' $ac_mid ')' + 1`
4687fi
4688rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4689done
4690case $ac_lo in
4691?*) ac_cv_sizeof_int=$ac_lo;;
4692'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4693See \`config.log' for more details." >&5
4694echo "$as_me: error: cannot compute sizeof (int), 77
4695See \`config.log' for more details." >&2;}
4696 { (exit 1); exit 1; }; } ;;
4697esac
4698else
4699 if test "$cross_compiling" = yes; then
b095fe2c
DJ
4700 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
4701echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
bf3b7cd3
JD
4702 { (exit 1); exit 1; }; }
4703else
4704 cat >conftest.$ac_ext <<_ACEOF
4705/* confdefs.h. */
4706_ACEOF
4707cat confdefs.h >>conftest.$ac_ext
4708cat >>conftest.$ac_ext <<_ACEOF
4709/* end confdefs.h. */
4710$ac_includes_default
4711long longval () { return (long) (sizeof (int)); }
4712unsigned long ulongval () { return (long) (sizeof (int)); }
4713#include <stdio.h>
4714#include <stdlib.h>
4715int
4716main ()
4717{
4718
4719 FILE *f = fopen ("conftest.val", "w");
4720 if (! f)
4721 exit (1);
4722 if (((long) (sizeof (int))) < 0)
4723 {
4724 long i = longval ();
4725 if (i != ((long) (sizeof (int))))
4726 exit (1);
4727 fprintf (f, "%ld\n", i);
4728 }
4729 else
4730 {
4731 unsigned long i = ulongval ();
4732 if (i != ((long) (sizeof (int))))
4733 exit (1);
4734 fprintf (f, "%lu\n", i);
4735 }
4736 exit (ferror (f) || fclose (f) != 0);
4737
4738 ;
4739 return 0;
4740}
4741_ACEOF
4742rm -f conftest$ac_exeext
4743if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4744 (eval $ac_link) 2>&5
4745 ac_status=$?
4746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4747 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4749 (eval $ac_try) 2>&5
4750 ac_status=$?
4751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4752 (exit $ac_status); }; }; then
4753 ac_cv_sizeof_int=`cat conftest.val`
4754else
4755 echo "$as_me: program exited with status $ac_status" >&5
4756echo "$as_me: failed program was:" >&5
4757sed 's/^/| /' conftest.$ac_ext >&5
4758
4759( exit $ac_status )
4760{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4761See \`config.log' for more details." >&5
4762echo "$as_me: error: cannot compute sizeof (int), 77
4763See \`config.log' for more details." >&2;}
4764 { (exit 1); exit 1; }; }
4765fi
4766rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4767fi
4768fi
4769rm -f conftest.val
4770else
4771 ac_cv_sizeof_int=0
4772fi
4773fi
4774echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4775echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4776cat >>confdefs.h <<_ACEOF
4777#define SIZEOF_INT $ac_cv_sizeof_int
4778_ACEOF
4779
4780
4781echo "$as_me:$LINENO: checking for long" >&5
4782echo $ECHO_N "checking for long... $ECHO_C" >&6
4783if test "${ac_cv_type_long+set}" = set; then
4784 echo $ECHO_N "(cached) $ECHO_C" >&6
4785else
4786 cat >conftest.$ac_ext <<_ACEOF
4787/* confdefs.h. */
4788_ACEOF
4789cat confdefs.h >>conftest.$ac_ext
4790cat >>conftest.$ac_ext <<_ACEOF
4791/* end confdefs.h. */
4792$ac_includes_default
4793int
4794main ()
4795{
4796if ((long *) 0)
4797 return 0;
4798if (sizeof (long))
4799 return 0;
4800 ;
4801 return 0;
4802}
4803_ACEOF
4804rm -f conftest.$ac_objext
4805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4806 (eval $ac_compile) 2>conftest.er1
4807 ac_status=$?
4808 grep -v '^ *+' conftest.er1 >conftest.err
4809 rm -f conftest.er1
4810 cat conftest.err >&5
4811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4812 (exit $ac_status); } &&
b095fe2c 4813 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4815 (eval $ac_try) 2>&5
4816 ac_status=$?
4817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4818 (exit $ac_status); }; } &&
4819 { ac_try='test -s conftest.$ac_objext'
4820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4821 (eval $ac_try) 2>&5
4822 ac_status=$?
4823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4824 (exit $ac_status); }; }; then
4825 ac_cv_type_long=yes
4826else
4827 echo "$as_me: failed program was:" >&5
4828sed 's/^/| /' conftest.$ac_ext >&5
4829
4830ac_cv_type_long=no
4831fi
4832rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4833fi
4834echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4835echo "${ECHO_T}$ac_cv_type_long" >&6
4836
4837echo "$as_me:$LINENO: checking size of long" >&5
4838echo $ECHO_N "checking size of long... $ECHO_C" >&6
4839if test "${ac_cv_sizeof_long+set}" = set; then
4840 echo $ECHO_N "(cached) $ECHO_C" >&6
4841else
4842 if test "$ac_cv_type_long" = yes; then
4843 # The cast to unsigned long works around a bug in the HP C Compiler
4844 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4845 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4846 # This bug is HP SR number 8606223364.
4847 if test "$cross_compiling" = yes; then
4848 # Depending upon the size, compute the lo and hi bounds.
4849cat >conftest.$ac_ext <<_ACEOF
4850/* confdefs.h. */
4851_ACEOF
4852cat confdefs.h >>conftest.$ac_ext
4853cat >>conftest.$ac_ext <<_ACEOF
4854/* end confdefs.h. */
4855$ac_includes_default
4856int
4857main ()
4858{
4859static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
4860test_array [0] = 0
4861
4862 ;
4863 return 0;
4864}
4865_ACEOF
4866rm -f conftest.$ac_objext
4867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4868 (eval $ac_compile) 2>conftest.er1
4869 ac_status=$?
4870 grep -v '^ *+' conftest.er1 >conftest.err
4871 rm -f conftest.er1
4872 cat conftest.err >&5
4873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4874 (exit $ac_status); } &&
b095fe2c 4875 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4877 (eval $ac_try) 2>&5
4878 ac_status=$?
4879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4880 (exit $ac_status); }; } &&
4881 { ac_try='test -s conftest.$ac_objext'
4882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4883 (eval $ac_try) 2>&5
4884 ac_status=$?
4885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4886 (exit $ac_status); }; }; then
4887 ac_lo=0 ac_mid=0
4888 while :; do
4889 cat >conftest.$ac_ext <<_ACEOF
4890/* confdefs.h. */
4891_ACEOF
4892cat confdefs.h >>conftest.$ac_ext
4893cat >>conftest.$ac_ext <<_ACEOF
4894/* end confdefs.h. */
4895$ac_includes_default
4896int
4897main ()
4898{
4899static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4900test_array [0] = 0
4901
4902 ;
4903 return 0;
4904}
4905_ACEOF
4906rm -f conftest.$ac_objext
4907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4908 (eval $ac_compile) 2>conftest.er1
4909 ac_status=$?
4910 grep -v '^ *+' conftest.er1 >conftest.err
4911 rm -f conftest.er1
4912 cat conftest.err >&5
4913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4914 (exit $ac_status); } &&
b095fe2c 4915 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4917 (eval $ac_try) 2>&5
4918 ac_status=$?
4919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4920 (exit $ac_status); }; } &&
4921 { ac_try='test -s conftest.$ac_objext'
4922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4923 (eval $ac_try) 2>&5
4924 ac_status=$?
4925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4926 (exit $ac_status); }; }; then
4927 ac_hi=$ac_mid; break
4928else
4929 echo "$as_me: failed program was:" >&5
4930sed 's/^/| /' conftest.$ac_ext >&5
4931
4932ac_lo=`expr $ac_mid + 1`
4933 if test $ac_lo -le $ac_mid; then
4934 ac_lo= ac_hi=
4935 break
4936 fi
4937 ac_mid=`expr 2 '*' $ac_mid + 1`
4938fi
4939rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4940 done
4941else
4942 echo "$as_me: failed program was:" >&5
4943sed 's/^/| /' conftest.$ac_ext >&5
4944
4945cat >conftest.$ac_ext <<_ACEOF
4946/* confdefs.h. */
4947_ACEOF
4948cat confdefs.h >>conftest.$ac_ext
4949cat >>conftest.$ac_ext <<_ACEOF
4950/* end confdefs.h. */
4951$ac_includes_default
4952int
4953main ()
4954{
4955static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
4956test_array [0] = 0
4957
4958 ;
4959 return 0;
4960}
4961_ACEOF
4962rm -f conftest.$ac_objext
4963if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4964 (eval $ac_compile) 2>conftest.er1
4965 ac_status=$?
4966 grep -v '^ *+' conftest.er1 >conftest.err
4967 rm -f conftest.er1
4968 cat conftest.err >&5
4969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4970 (exit $ac_status); } &&
b095fe2c 4971 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
4972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4973 (eval $ac_try) 2>&5
4974 ac_status=$?
4975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4976 (exit $ac_status); }; } &&
4977 { ac_try='test -s conftest.$ac_objext'
4978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4979 (eval $ac_try) 2>&5
4980 ac_status=$?
4981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4982 (exit $ac_status); }; }; then
4983 ac_hi=-1 ac_mid=-1
4984 while :; do
4985 cat >conftest.$ac_ext <<_ACEOF
4986/* confdefs.h. */
4987_ACEOF
4988cat confdefs.h >>conftest.$ac_ext
4989cat >>conftest.$ac_ext <<_ACEOF
4990/* end confdefs.h. */
4991$ac_includes_default
4992int
4993main ()
4994{
4995static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
4996test_array [0] = 0
4997
4998 ;
4999 return 0;
5000}
5001_ACEOF
5002rm -f conftest.$ac_objext
5003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5004 (eval $ac_compile) 2>conftest.er1
5005 ac_status=$?
5006 grep -v '^ *+' conftest.er1 >conftest.err
5007 rm -f conftest.er1
5008 cat conftest.err >&5
5009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5010 (exit $ac_status); } &&
b095fe2c 5011 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
5012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5013 (eval $ac_try) 2>&5
5014 ac_status=$?
5015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5016 (exit $ac_status); }; } &&
5017 { ac_try='test -s conftest.$ac_objext'
5018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5019 (eval $ac_try) 2>&5
5020 ac_status=$?
5021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5022 (exit $ac_status); }; }; then
5023 ac_lo=$ac_mid; break
5024else
5025 echo "$as_me: failed program was:" >&5
5026sed 's/^/| /' conftest.$ac_ext >&5
5027
5028ac_hi=`expr '(' $ac_mid ')' - 1`
5029 if test $ac_mid -le $ac_hi; then
5030 ac_lo= ac_hi=
5031 break
5032 fi
5033 ac_mid=`expr 2 '*' $ac_mid`
5034fi
5035rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5036 done
5037else
5038 echo "$as_me: failed program was:" >&5
5039sed 's/^/| /' conftest.$ac_ext >&5
5040
5041ac_lo= ac_hi=
5042fi
5043rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5044fi
5045rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5046# Binary search between lo and hi bounds.
5047while test "x$ac_lo" != "x$ac_hi"; do
5048 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5049 cat >conftest.$ac_ext <<_ACEOF
5050/* confdefs.h. */
5051_ACEOF
5052cat confdefs.h >>conftest.$ac_ext
5053cat >>conftest.$ac_ext <<_ACEOF
5054/* end confdefs.h. */
5055$ac_includes_default
5056int
5057main ()
5058{
5059static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5060test_array [0] = 0
5061
5062 ;
5063 return 0;
5064}
5065_ACEOF
5066rm -f conftest.$ac_objext
5067if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5068 (eval $ac_compile) 2>conftest.er1
5069 ac_status=$?
5070 grep -v '^ *+' conftest.er1 >conftest.err
5071 rm -f conftest.er1
5072 cat conftest.err >&5
5073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5074 (exit $ac_status); } &&
b095fe2c 5075 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
5076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5077 (eval $ac_try) 2>&5
5078 ac_status=$?
5079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5080 (exit $ac_status); }; } &&
5081 { ac_try='test -s conftest.$ac_objext'
5082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5083 (eval $ac_try) 2>&5
5084 ac_status=$?
5085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5086 (exit $ac_status); }; }; then
5087 ac_hi=$ac_mid
5088else
5089 echo "$as_me: failed program was:" >&5
5090sed 's/^/| /' conftest.$ac_ext >&5
5091
5092ac_lo=`expr '(' $ac_mid ')' + 1`
5093fi
5094rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5095done
5096case $ac_lo in
5097?*) ac_cv_sizeof_long=$ac_lo;;
5098'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5099See \`config.log' for more details." >&5
5100echo "$as_me: error: cannot compute sizeof (long), 77
5101See \`config.log' for more details." >&2;}
5102 { (exit 1); exit 1; }; } ;;
5103esac
5104else
5105 if test "$cross_compiling" = yes; then
b095fe2c
DJ
5106 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
5107echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
bf3b7cd3
JD
5108 { (exit 1); exit 1; }; }
5109else
5110 cat >conftest.$ac_ext <<_ACEOF
5111/* confdefs.h. */
5112_ACEOF
5113cat confdefs.h >>conftest.$ac_ext
5114cat >>conftest.$ac_ext <<_ACEOF
5115/* end confdefs.h. */
5116$ac_includes_default
5117long longval () { return (long) (sizeof (long)); }
5118unsigned long ulongval () { return (long) (sizeof (long)); }
5119#include <stdio.h>
5120#include <stdlib.h>
5121int
5122main ()
5123{
5124
5125 FILE *f = fopen ("conftest.val", "w");
5126 if (! f)
5127 exit (1);
5128 if (((long) (sizeof (long))) < 0)
5129 {
5130 long i = longval ();
5131 if (i != ((long) (sizeof (long))))
5132 exit (1);
5133 fprintf (f, "%ld\n", i);
5134 }
5135 else
5136 {
5137 unsigned long i = ulongval ();
5138 if (i != ((long) (sizeof (long))))
5139 exit (1);
5140 fprintf (f, "%lu\n", i);
5141 }
5142 exit (ferror (f) || fclose (f) != 0);
5143
5144 ;
5145 return 0;
5146}
5147_ACEOF
5148rm -f conftest$ac_exeext
5149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5150 (eval $ac_link) 2>&5
5151 ac_status=$?
5152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5153 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5155 (eval $ac_try) 2>&5
5156 ac_status=$?
5157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5158 (exit $ac_status); }; }; then
5159 ac_cv_sizeof_long=`cat conftest.val`
5160else
5161 echo "$as_me: program exited with status $ac_status" >&5
5162echo "$as_me: failed program was:" >&5
5163sed 's/^/| /' conftest.$ac_ext >&5
5164
5165( exit $ac_status )
5166{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5167See \`config.log' for more details." >&5
5168echo "$as_me: error: cannot compute sizeof (long), 77
5169See \`config.log' for more details." >&2;}
5170 { (exit 1); exit 1; }; }
5171fi
5172rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5173fi
5174fi
5175rm -f conftest.val
5176else
5177 ac_cv_sizeof_long=0
5178fi
5179fi
5180echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5181echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5182cat >>confdefs.h <<_ACEOF
5183#define SIZEOF_LONG $ac_cv_sizeof_long
5184_ACEOF
5185
5186
5187if test $ac_cv_c_long_long = yes; then
5188 echo "$as_me:$LINENO: checking for long long" >&5
5189echo $ECHO_N "checking for long long... $ECHO_C" >&6
5190if test "${ac_cv_type_long_long+set}" = set; then
5191 echo $ECHO_N "(cached) $ECHO_C" >&6
5192else
5193 cat >conftest.$ac_ext <<_ACEOF
5194/* confdefs.h. */
5195_ACEOF
5196cat confdefs.h >>conftest.$ac_ext
5197cat >>conftest.$ac_ext <<_ACEOF
5198/* end confdefs.h. */
5199$ac_includes_default
5200int
5201main ()
5202{
5203if ((long long *) 0)
5204 return 0;
5205if (sizeof (long long))
5206 return 0;
5207 ;
5208 return 0;
5209}
5210_ACEOF
5211rm -f conftest.$ac_objext
5212if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5213 (eval $ac_compile) 2>conftest.er1
5214 ac_status=$?
5215 grep -v '^ *+' conftest.er1 >conftest.err
5216 rm -f conftest.er1
5217 cat conftest.err >&5
5218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5219 (exit $ac_status); } &&
b095fe2c 5220 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
5221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5222 (eval $ac_try) 2>&5
5223 ac_status=$?
5224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5225 (exit $ac_status); }; } &&
5226 { ac_try='test -s conftest.$ac_objext'
5227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5228 (eval $ac_try) 2>&5
5229 ac_status=$?
5230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5231 (exit $ac_status); }; }; then
5232 ac_cv_type_long_long=yes
5233else
5234 echo "$as_me: failed program was:" >&5
5235sed 's/^/| /' conftest.$ac_ext >&5
5236
5237ac_cv_type_long_long=no
5238fi
5239rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5240fi
5241echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5242echo "${ECHO_T}$ac_cv_type_long_long" >&6
5243
5244echo "$as_me:$LINENO: checking size of long long" >&5
5245echo $ECHO_N "checking size of long long... $ECHO_C" >&6
5246if test "${ac_cv_sizeof_long_long+set}" = set; then
5247 echo $ECHO_N "(cached) $ECHO_C" >&6
5248else
5249 if test "$ac_cv_type_long_long" = yes; then
5250 # The cast to unsigned long works around a bug in the HP C Compiler
5251 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5252 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5253 # This bug is HP SR number 8606223364.
5254 if test "$cross_compiling" = yes; then
5255 # Depending upon the size, compute the lo and hi bounds.
5256cat >conftest.$ac_ext <<_ACEOF
5257/* confdefs.h. */
5258_ACEOF
5259cat confdefs.h >>conftest.$ac_ext
5260cat >>conftest.$ac_ext <<_ACEOF
5261/* end confdefs.h. */
5262$ac_includes_default
5263int
5264main ()
5265{
5266static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
5267test_array [0] = 0
5268
5269 ;
5270 return 0;
5271}
5272_ACEOF
5273rm -f conftest.$ac_objext
5274if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5275 (eval $ac_compile) 2>conftest.er1
5276 ac_status=$?
5277 grep -v '^ *+' conftest.er1 >conftest.err
5278 rm -f conftest.er1
5279 cat conftest.err >&5
5280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5281 (exit $ac_status); } &&
b095fe2c 5282 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
5283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5284 (eval $ac_try) 2>&5
5285 ac_status=$?
5286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5287 (exit $ac_status); }; } &&
5288 { ac_try='test -s conftest.$ac_objext'
5289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5290 (eval $ac_try) 2>&5
5291 ac_status=$?
5292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5293 (exit $ac_status); }; }; then
5294 ac_lo=0 ac_mid=0
5295 while :; do
5296 cat >conftest.$ac_ext <<_ACEOF
5297/* confdefs.h. */
5298_ACEOF
5299cat confdefs.h >>conftest.$ac_ext
5300cat >>conftest.$ac_ext <<_ACEOF
5301/* end confdefs.h. */
5302$ac_includes_default
5303int
5304main ()
5305{
5306static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5307test_array [0] = 0
5308
5309 ;
5310 return 0;
5311}
5312_ACEOF
5313rm -f conftest.$ac_objext
5314if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5315 (eval $ac_compile) 2>conftest.er1
5316 ac_status=$?
5317 grep -v '^ *+' conftest.er1 >conftest.err
5318 rm -f conftest.er1
5319 cat conftest.err >&5
5320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5321 (exit $ac_status); } &&
b095fe2c 5322 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
5323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5324 (eval $ac_try) 2>&5
5325 ac_status=$?
5326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5327 (exit $ac_status); }; } &&
5328 { ac_try='test -s conftest.$ac_objext'
5329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5330 (eval $ac_try) 2>&5
5331 ac_status=$?
5332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5333 (exit $ac_status); }; }; then
5334 ac_hi=$ac_mid; break
5335else
5336 echo "$as_me: failed program was:" >&5
5337sed 's/^/| /' conftest.$ac_ext >&5
5338
5339ac_lo=`expr $ac_mid + 1`
5340 if test $ac_lo -le $ac_mid; then
5341 ac_lo= ac_hi=
5342 break
5343 fi
5344 ac_mid=`expr 2 '*' $ac_mid + 1`
5345fi
5346rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5347 done
5348else
5349 echo "$as_me: failed program was:" >&5
5350sed 's/^/| /' conftest.$ac_ext >&5
5351
5352cat >conftest.$ac_ext <<_ACEOF
5353/* confdefs.h. */
5354_ACEOF
5355cat confdefs.h >>conftest.$ac_ext
5356cat >>conftest.$ac_ext <<_ACEOF
5357/* end confdefs.h. */
5358$ac_includes_default
5359int
5360main ()
5361{
5362static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
5363test_array [0] = 0
5364
5365 ;
5366 return 0;
5367}
5368_ACEOF
5369rm -f conftest.$ac_objext
5370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5371 (eval $ac_compile) 2>conftest.er1
5372 ac_status=$?
5373 grep -v '^ *+' conftest.er1 >conftest.err
5374 rm -f conftest.er1
5375 cat conftest.err >&5
5376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5377 (exit $ac_status); } &&
b095fe2c 5378 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
5379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5380 (eval $ac_try) 2>&5
5381 ac_status=$?
5382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5383 (exit $ac_status); }; } &&
5384 { ac_try='test -s conftest.$ac_objext'
5385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5386 (eval $ac_try) 2>&5
5387 ac_status=$?
5388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5389 (exit $ac_status); }; }; then
5390 ac_hi=-1 ac_mid=-1
5391 while :; do
5392 cat >conftest.$ac_ext <<_ACEOF
5393/* confdefs.h. */
5394_ACEOF
5395cat confdefs.h >>conftest.$ac_ext
5396cat >>conftest.$ac_ext <<_ACEOF
5397/* end confdefs.h. */
5398$ac_includes_default
5399int
5400main ()
5401{
5402static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
5403test_array [0] = 0
5404
5405 ;
5406 return 0;
5407}
5408_ACEOF
5409rm -f conftest.$ac_objext
5410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5411 (eval $ac_compile) 2>conftest.er1
5412 ac_status=$?
5413 grep -v '^ *+' conftest.er1 >conftest.err
5414 rm -f conftest.er1
5415 cat conftest.err >&5
5416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5417 (exit $ac_status); } &&
b095fe2c 5418 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
5419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5420 (eval $ac_try) 2>&5
5421 ac_status=$?
5422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5423 (exit $ac_status); }; } &&
5424 { ac_try='test -s conftest.$ac_objext'
5425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5426 (eval $ac_try) 2>&5
5427 ac_status=$?
5428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5429 (exit $ac_status); }; }; then
5430 ac_lo=$ac_mid; break
5431else
5432 echo "$as_me: failed program was:" >&5
5433sed 's/^/| /' conftest.$ac_ext >&5
5434
5435ac_hi=`expr '(' $ac_mid ')' - 1`
5436 if test $ac_mid -le $ac_hi; then
5437 ac_lo= ac_hi=
5438 break
5439 fi
5440 ac_mid=`expr 2 '*' $ac_mid`
5441fi
5442rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5443 done
5444else
5445 echo "$as_me: failed program was:" >&5
5446sed 's/^/| /' conftest.$ac_ext >&5
5447
5448ac_lo= ac_hi=
5449fi
5450rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5451fi
5452rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5453# Binary search between lo and hi bounds.
5454while test "x$ac_lo" != "x$ac_hi"; do
5455 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5456 cat >conftest.$ac_ext <<_ACEOF
5457/* confdefs.h. */
5458_ACEOF
5459cat confdefs.h >>conftest.$ac_ext
5460cat >>conftest.$ac_ext <<_ACEOF
5461/* end confdefs.h. */
5462$ac_includes_default
5463int
5464main ()
5465{
5466static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5467test_array [0] = 0
5468
5469 ;
5470 return 0;
5471}
5472_ACEOF
5473rm -f conftest.$ac_objext
5474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5475 (eval $ac_compile) 2>conftest.er1
5476 ac_status=$?
5477 grep -v '^ *+' conftest.er1 >conftest.err
5478 rm -f conftest.er1
5479 cat conftest.err >&5
5480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5481 (exit $ac_status); } &&
b095fe2c 5482 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
bf3b7cd3
JD
5483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5484 (eval $ac_try) 2>&5
5485 ac_status=$?
5486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5487 (exit $ac_status); }; } &&
5488 { ac_try='test -s conftest.$ac_objext'
5489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5490 (eval $ac_try) 2>&5
5491 ac_status=$?
5492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5493 (exit $ac_status); }; }; then
5494 ac_hi=$ac_mid
5495else
5496 echo "$as_me: failed program was:" >&5
5497sed 's/^/| /' conftest.$ac_ext >&5
5498
5499ac_lo=`expr '(' $ac_mid ')' + 1`
5500fi
5501rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5502done
5503case $ac_lo in
5504?*) ac_cv_sizeof_long_long=$ac_lo;;
5505'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5506See \`config.log' for more details." >&5
5507echo "$as_me: error: cannot compute sizeof (long long), 77
5508See \`config.log' for more details." >&2;}
5509 { (exit 1); exit 1; }; } ;;
5510esac
5511else
5512 if test "$cross_compiling" = yes; then
b095fe2c
DJ
5513 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
5514echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
bf3b7cd3
JD
5515 { (exit 1); exit 1; }; }
5516else
5517 cat >conftest.$ac_ext <<_ACEOF
5518/* confdefs.h. */
5519_ACEOF
5520cat confdefs.h >>conftest.$ac_ext
5521cat >>conftest.$ac_ext <<_ACEOF
5522/* end confdefs.h. */
5523$ac_includes_default
5524long longval () { return (long) (sizeof (long long)); }
5525unsigned long ulongval () { return (long) (sizeof (long long)); }
5526#include <stdio.h>
5527#include <stdlib.h>
5528int
5529main ()
5530{
5531
5532 FILE *f = fopen ("conftest.val", "w");
5533 if (! f)
5534 exit (1);
5535 if (((long) (sizeof (long long))) < 0)
5536 {
5537 long i = longval ();
5538 if (i != ((long) (sizeof (long long))))
5539 exit (1);
5540 fprintf (f, "%ld\n", i);
5541 }
5542 else
5543 {
5544 unsigned long i = ulongval ();
5545 if (i != ((long) (sizeof (long long))))
5546 exit (1);
5547 fprintf (f, "%lu\n", i);
5548 }
5549 exit (ferror (f) || fclose (f) != 0);
5550
5551 ;
5552 return 0;
5553}
5554_ACEOF
5555rm -f conftest$ac_exeext
5556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5557 (eval $ac_link) 2>&5
5558 ac_status=$?
5559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5560 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5562 (eval $ac_try) 2>&5
5563 ac_status=$?
5564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5565 (exit $ac_status); }; }; then
5566 ac_cv_sizeof_long_long=`cat conftest.val`
5567else
5568 echo "$as_me: program exited with status $ac_status" >&5
5569echo "$as_me: failed program was:" >&5
5570sed 's/^/| /' conftest.$ac_ext >&5
5571
5572( exit $ac_status )
5573{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5574See \`config.log' for more details." >&5
5575echo "$as_me: error: cannot compute sizeof (long long), 77
5576See \`config.log' for more details." >&2;}
5577 { (exit 1); exit 1; }; }
5578fi
5579rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5580fi
5581fi
5582rm -f conftest.val
5583else
5584 ac_cv_sizeof_long_long=0
5585fi
5586fi
5587echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5588echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
5589cat >>confdefs.h <<_ACEOF
5590#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5591_ACEOF
5592
5593
5594fi
5595if test $ac_cv_c___int64 = yes; then
5596 echo "$as_me:$LINENO: checking for __int64" >&5
5597echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5598if test "${ac_cv_type___int64+set}" = set; then
5599 echo $ECHO_N "(cached) $ECHO_C" >&6
5600else
ba479fd2 5601 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5602/* confdefs.h. */
5603_ACEOF
5604cat confdefs.h >>conftest.$ac_ext
5605cat >>conftest.$ac_ext <<_ACEOF
5606/* end confdefs.h. */
bf3b7cd3 5607$ac_includes_default
ba479fd2
NN
5608int
5609main ()
5610{
bf3b7cd3
JD
5611if ((__int64 *) 0)
5612 return 0;
5613if (sizeof (__int64))
5614 return 0;
ba479fd2
NN
5615 ;
5616 return 0;
5617}
5618_ACEOF
5619rm -f conftest.$ac_objext
5620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5621 (eval $ac_compile) 2>conftest.er1
ba479fd2 5622 ac_status=$?
86da66b5
HPN
5623 grep -v '^ *+' conftest.er1 >conftest.err
5624 rm -f conftest.er1
5625 cat conftest.err >&5
ba479fd2
NN
5626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5627 (exit $ac_status); } &&
b095fe2c 5628 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5630 (eval $ac_try) 2>&5
5631 ac_status=$?
5632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5633 (exit $ac_status); }; } &&
5634 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5636 (eval $ac_try) 2>&5
5637 ac_status=$?
5638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5639 (exit $ac_status); }; }; then
bf3b7cd3 5640 ac_cv_type___int64=yes
75b6f3fd 5641else
ba479fd2
NN
5642 echo "$as_me: failed program was:" >&5
5643sed 's/^/| /' conftest.$ac_ext >&5
5644
bf3b7cd3 5645ac_cv_type___int64=no
75b6f3fd 5646fi
86da66b5 5647rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5648fi
bf3b7cd3
JD
5649echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5650echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 5651
bf3b7cd3
JD
5652echo "$as_me:$LINENO: checking size of __int64" >&5
5653echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
5654if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 5655 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 5656else
bf3b7cd3
JD
5657 if test "$ac_cv_type___int64" = yes; then
5658 # The cast to unsigned long works around a bug in the HP C Compiler
5659 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5660 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5661 # This bug is HP SR number 8606223364.
5662 if test "$cross_compiling" = yes; then
5663 # Depending upon the size, compute the lo and hi bounds.
5664cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5665/* confdefs.h. */
5666_ACEOF
5667cat confdefs.h >>conftest.$ac_ext
5668cat >>conftest.$ac_ext <<_ACEOF
5669/* end confdefs.h. */
bf3b7cd3 5670$ac_includes_default
ba479fd2
NN
5671int
5672main ()
5673{
bf3b7cd3
JD
5674static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
5675test_array [0] = 0
5676
ba479fd2
NN
5677 ;
5678 return 0;
5679}
5680_ACEOF
5681rm -f conftest.$ac_objext
5682if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5683 (eval $ac_compile) 2>conftest.er1
ba479fd2 5684 ac_status=$?
86da66b5
HPN
5685 grep -v '^ *+' conftest.er1 >conftest.err
5686 rm -f conftest.er1
5687 cat conftest.err >&5
ba479fd2
NN
5688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5689 (exit $ac_status); } &&
b095fe2c 5690 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5692 (eval $ac_try) 2>&5
5693 ac_status=$?
5694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5695 (exit $ac_status); }; } &&
5696 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5698 (eval $ac_try) 2>&5
5699 ac_status=$?
5700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5701 (exit $ac_status); }; }; then
bf3b7cd3
JD
5702 ac_lo=0 ac_mid=0
5703 while :; do
5704 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5705/* confdefs.h. */
5706_ACEOF
5707cat confdefs.h >>conftest.$ac_ext
5708cat >>conftest.$ac_ext <<_ACEOF
5709/* end confdefs.h. */
bf3b7cd3 5710$ac_includes_default
ba479fd2
NN
5711int
5712main ()
5713{
bf3b7cd3
JD
5714static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5715test_array [0] = 0
5716
ba479fd2
NN
5717 ;
5718 return 0;
5719}
5720_ACEOF
5721rm -f conftest.$ac_objext
5722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5723 (eval $ac_compile) 2>conftest.er1
ba479fd2 5724 ac_status=$?
86da66b5
HPN
5725 grep -v '^ *+' conftest.er1 >conftest.err
5726 rm -f conftest.er1
5727 cat conftest.err >&5
ba479fd2
NN
5728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5729 (exit $ac_status); } &&
b095fe2c 5730 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5732 (eval $ac_try) 2>&5
5733 ac_status=$?
5734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5735 (exit $ac_status); }; } &&
5736 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5738 (eval $ac_try) 2>&5
5739 ac_status=$?
5740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5741 (exit $ac_status); }; }; then
bf3b7cd3 5742 ac_hi=$ac_mid; break
75e93faa 5743else
ba479fd2
NN
5744 echo "$as_me: failed program was:" >&5
5745sed 's/^/| /' conftest.$ac_ext >&5
5746
bf3b7cd3
JD
5747ac_lo=`expr $ac_mid + 1`
5748 if test $ac_lo -le $ac_mid; then
5749 ac_lo= ac_hi=
5750 break
5751 fi
5752 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 5753fi
86da66b5 5754rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5755 done
75e93faa 5756else
bf3b7cd3
JD
5757 echo "$as_me: failed program was:" >&5
5758sed 's/^/| /' conftest.$ac_ext >&5
5759
5760cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5761/* confdefs.h. */
5762_ACEOF
5763cat confdefs.h >>conftest.$ac_ext
5764cat >>conftest.$ac_ext <<_ACEOF
5765/* end confdefs.h. */
bf3b7cd3 5766$ac_includes_default
ba479fd2
NN
5767int
5768main ()
5769{
bf3b7cd3
JD
5770static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
5771test_array [0] = 0
5772
ba479fd2
NN
5773 ;
5774 return 0;
5775}
5776_ACEOF
5777rm -f conftest.$ac_objext
5778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5779 (eval $ac_compile) 2>conftest.er1
ba479fd2 5780 ac_status=$?
86da66b5
HPN
5781 grep -v '^ *+' conftest.er1 >conftest.err
5782 rm -f conftest.er1
5783 cat conftest.err >&5
ba479fd2
NN
5784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5785 (exit $ac_status); } &&
b095fe2c 5786 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5788 (eval $ac_try) 2>&5
5789 ac_status=$?
5790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5791 (exit $ac_status); }; } &&
5792 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5794 (eval $ac_try) 2>&5
5795 ac_status=$?
5796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5797 (exit $ac_status); }; }; then
bf3b7cd3
JD
5798 ac_hi=-1 ac_mid=-1
5799 while :; do
5800 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5801/* confdefs.h. */
5802_ACEOF
5803cat confdefs.h >>conftest.$ac_ext
5804cat >>conftest.$ac_ext <<_ACEOF
5805/* end confdefs.h. */
bf3b7cd3 5806$ac_includes_default
ba479fd2
NN
5807int
5808main ()
5809{
bf3b7cd3
JD
5810static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
5811test_array [0] = 0
5812
ba479fd2
NN
5813 ;
5814 return 0;
5815}
5816_ACEOF
5817rm -f conftest.$ac_objext
5818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5819 (eval $ac_compile) 2>conftest.er1
ba479fd2 5820 ac_status=$?
86da66b5
HPN
5821 grep -v '^ *+' conftest.er1 >conftest.err
5822 rm -f conftest.er1
5823 cat conftest.err >&5
ba479fd2
NN
5824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5825 (exit $ac_status); } &&
b095fe2c 5826 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5828 (eval $ac_try) 2>&5
5829 ac_status=$?
5830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5831 (exit $ac_status); }; } &&
5832 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5834 (eval $ac_try) 2>&5
5835 ac_status=$?
5836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5837 (exit $ac_status); }; }; then
bf3b7cd3 5838 ac_lo=$ac_mid; break
04cabffc 5839else
ba479fd2
NN
5840 echo "$as_me: failed program was:" >&5
5841sed 's/^/| /' conftest.$ac_ext >&5
5842
bf3b7cd3
JD
5843ac_hi=`expr '(' $ac_mid ')' - 1`
5844 if test $ac_mid -le $ac_hi; then
5845 ac_lo= ac_hi=
5846 break
5847 fi
5848 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 5849fi
86da66b5 5850rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5851 done
5852else
5853 echo "$as_me: failed program was:" >&5
5854sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 5855
bf3b7cd3 5856ac_lo= ac_hi=
414d23ae 5857fi
bf3b7cd3 5858rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5859fi
bf3b7cd3
JD
5860rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5861# Binary search between lo and hi bounds.
5862while test "x$ac_lo" != "x$ac_hi"; do
5863 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 5864 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5865/* confdefs.h. */
5866_ACEOF
5867cat confdefs.h >>conftest.$ac_ext
5868cat >>conftest.$ac_ext <<_ACEOF
5869/* end confdefs.h. */
bf3b7cd3 5870$ac_includes_default
ba479fd2
NN
5871int
5872main ()
5873{
bf3b7cd3
JD
5874static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5875test_array [0] = 0
5876
ba479fd2
NN
5877 ;
5878 return 0;
5879}
5880_ACEOF
5881rm -f conftest.$ac_objext
5882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5883 (eval $ac_compile) 2>conftest.er1
ba479fd2 5884 ac_status=$?
86da66b5
HPN
5885 grep -v '^ *+' conftest.er1 >conftest.err
5886 rm -f conftest.er1
5887 cat conftest.err >&5
ba479fd2
NN
5888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5889 (exit $ac_status); } &&
b095fe2c 5890 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
5891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5892 (eval $ac_try) 2>&5
5893 ac_status=$?
5894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5895 (exit $ac_status); }; } &&
5896 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5898 (eval $ac_try) 2>&5
5899 ac_status=$?
5900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5901 (exit $ac_status); }; }; then
bf3b7cd3 5902 ac_hi=$ac_mid
75e93faa 5903else
ba479fd2
NN
5904 echo "$as_me: failed program was:" >&5
5905sed 's/^/| /' conftest.$ac_ext >&5
5906
bf3b7cd3 5907ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 5908fi
86da66b5 5909rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5910done
bf3b7cd3
JD
5911case $ac_lo in
5912?*) ac_cv_sizeof___int64=$ac_lo;;
5913'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
5914See \`config.log' for more details." >&5
5915echo "$as_me: error: cannot compute sizeof (__int64), 77
5916See \`config.log' for more details." >&2;}
5917 { (exit 1); exit 1; }; } ;;
5918esac
5919else
5920 if test "$cross_compiling" = yes; then
b095fe2c
DJ
5921 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
5922echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
bf3b7cd3
JD
5923 { (exit 1); exit 1; }; }
5924else
5925 cat >conftest.$ac_ext <<_ACEOF
5926/* confdefs.h. */
5927_ACEOF
5928cat confdefs.h >>conftest.$ac_ext
5929cat >>conftest.$ac_ext <<_ACEOF
5930/* end confdefs.h. */
5931$ac_includes_default
5932long longval () { return (long) (sizeof (__int64)); }
5933unsigned long ulongval () { return (long) (sizeof (__int64)); }
5934#include <stdio.h>
5935#include <stdlib.h>
5936int
5937main ()
5938{
414d23ae 5939
bf3b7cd3
JD
5940 FILE *f = fopen ("conftest.val", "w");
5941 if (! f)
5942 exit (1);
5943 if (((long) (sizeof (__int64))) < 0)
5944 {
5945 long i = longval ();
5946 if (i != ((long) (sizeof (__int64))))
5947 exit (1);
5948 fprintf (f, "%ld\n", i);
5949 }
5950 else
5951 {
5952 unsigned long i = ulongval ();
5953 if (i != ((long) (sizeof (__int64))))
5954 exit (1);
5955 fprintf (f, "%lu\n", i);
5956 }
5957 exit (ferror (f) || fclose (f) != 0);
5958
5959 ;
5960 return 0;
5961}
5962_ACEOF
5963rm -f conftest$ac_exeext
5964if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5965 (eval $ac_link) 2>&5
5966 ac_status=$?
5967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5968 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5970 (eval $ac_try) 2>&5
5971 ac_status=$?
5972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5973 (exit $ac_status); }; }; then
5974 ac_cv_sizeof___int64=`cat conftest.val`
5975else
5976 echo "$as_me: program exited with status $ac_status" >&5
5977echo "$as_me: failed program was:" >&5
5978sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 5979
bf3b7cd3
JD
5980( exit $ac_status )
5981{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
5982See \`config.log' for more details." >&5
5983echo "$as_me: error: cannot compute sizeof (__int64), 77
5984See \`config.log' for more details." >&2;}
ba479fd2 5985 { (exit 1); exit 1; }; }
414d23ae 5986fi
bf3b7cd3
JD
5987rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5988fi
5989fi
5990rm -f conftest.val
5991else
5992 ac_cv_sizeof___int64=0
5993fi
5994fi
ba479fd2
NN
5995echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
5996echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 5997cat >>confdefs.h <<_ACEOF
414d23ae 5998#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 5999_ACEOF
414d23ae 6000
cafe096b 6001
414d23ae
HPN
6002fi
6003
34a86c2b
NN
6004# ---------------------
6005# Warnings and checking
6006# ---------------------
6007
b5472e1d
NN
6008# Check $CC warning features (if it's GCC).
6009# We want to use -pedantic, but we don't want warnings about
6010# * 'long long'
6011# * variadic macros
6012# So, we only use -pedantic if we can disable those warnings.
6013
6014echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6015echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
6016if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6017 echo $ECHO_N "(cached) $ECHO_C" >&6
6018else
6019 save_CFLAGS="$CFLAGS"
6020 CFLAGS="-Wno-long-long"
6021 cat >conftest.$ac_ext <<_ACEOF
6022/* confdefs.h. */
6023_ACEOF
6024cat confdefs.h >>conftest.$ac_ext
6025cat >>conftest.$ac_ext <<_ACEOF
6026/* end confdefs.h. */
6027
6028_ACEOF
6029rm -f conftest.$ac_objext
6030if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6031 (eval $ac_compile) 2>conftest.er1
6032 ac_status=$?
6033 grep -v '^ *+' conftest.er1 >conftest.err
6034 rm -f conftest.er1
6035 cat conftest.err >&5
6036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6037 (exit $ac_status); } &&
b095fe2c 6038 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
b5472e1d
NN
6039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6040 (eval $ac_try) 2>&5
6041 ac_status=$?
6042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6043 (exit $ac_status); }; } &&
6044 { ac_try='test -s conftest.$ac_objext'
6045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6046 (eval $ac_try) 2>&5
6047 ac_status=$?
6048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6049 (exit $ac_status); }; }; then
6050 ac_cv_prog_cc_w_no_long_long=yes
6051else
6052 echo "$as_me: failed program was:" >&5
6053sed 's/^/| /' conftest.$ac_ext >&5
6054
6055ac_cv_prog_cc_w_no_long_long=no
6056fi
6057rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6058 CFLAGS="$save_CFLAGS"
6059
6060fi
6061echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6062echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
6063
6064echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6065echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
6066if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6067 echo $ECHO_N "(cached) $ECHO_C" >&6
6068else
6069 save_CFLAGS="$CFLAGS"
6070 CFLAGS="-Wno-variadic-macros"
6071 cat >conftest.$ac_ext <<_ACEOF
6072/* confdefs.h. */
6073_ACEOF
6074cat confdefs.h >>conftest.$ac_ext
6075cat >>conftest.$ac_ext <<_ACEOF
6076/* end confdefs.h. */
6077
6078_ACEOF
6079rm -f conftest.$ac_objext
6080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6081 (eval $ac_compile) 2>conftest.er1
6082 ac_status=$?
6083 grep -v '^ *+' conftest.er1 >conftest.err
6084 rm -f conftest.er1
6085 cat conftest.err >&5
6086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6087 (exit $ac_status); } &&
b095fe2c 6088 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
b5472e1d
NN
6089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6090 (eval $ac_try) 2>&5
6091 ac_status=$?
6092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093 (exit $ac_status); }; } &&
6094 { ac_try='test -s conftest.$ac_objext'
6095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6096 (eval $ac_try) 2>&5
6097 ac_status=$?
6098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6099 (exit $ac_status); }; }; then
6100 ac_cv_prog_cc_w_no_variadic_macros=yes
6101else
6102 echo "$as_me: failed program was:" >&5
6103sed 's/^/| /' conftest.$ac_ext >&5
6104
6105ac_cv_prog_cc_w_no_variadic_macros=no
6106fi
6107rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6108 CFLAGS="$save_CFLAGS"
6109
6110fi
6111echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6112echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
6113
34a86c2b 6114strict1_warn=
b5472e1d
NN
6115if test $ac_cv_prog_cc_w_no_long_long = yes \
6116 && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then
6117 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros"
34a86c2b
NN
6118fi
6119
6120
643d3bd2
NN
6121# Add -Wold-style-definition if it's accepted
6122echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6123echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
6124if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6125 echo $ECHO_N "(cached) $ECHO_C" >&6
6126else
6127 save_CFLAGS="$CFLAGS"
6128 CFLAGS="-Wold-style-definition"
6129 cat >conftest.$ac_ext <<_ACEOF
6130/* confdefs.h. */
6131_ACEOF
6132cat confdefs.h >>conftest.$ac_ext
6133cat >>conftest.$ac_ext <<_ACEOF
6134/* end confdefs.h. */
6135
6136_ACEOF
6137rm -f conftest.$ac_objext
6138if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6139 (eval $ac_compile) 2>conftest.er1
6140 ac_status=$?
6141 grep -v '^ *+' conftest.er1 >conftest.err
6142 rm -f conftest.er1
6143 cat conftest.err >&5
6144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6145 (exit $ac_status); } &&
b095fe2c 6146 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
643d3bd2
NN
6147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6148 (eval $ac_try) 2>&5
6149 ac_status=$?
6150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6151 (exit $ac_status); }; } &&
6152 { ac_try='test -s conftest.$ac_objext'
6153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6154 (eval $ac_try) 2>&5
6155 ac_status=$?
6156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6157 (exit $ac_status); }; }; then
6158 ac_cv_prog_cc_w_old_style_definition=yes
6159else
6160 echo "$as_me: failed program was:" >&5
6161sed 's/^/| /' conftest.$ac_ext >&5
6162
6163ac_cv_prog_cc_w_old_style_definition=no
6164fi
6165rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6166 CFLAGS="$save_CFLAGS"
6167
6168fi
6169echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
6170echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
6171if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
6172 strict1_warn="${strict1_warn} -Wold-style-definition"
6173fi
6174
09a9c095
NN
6175# Enable -Werror, period.
6176# Check whether --enable-werror_always or --disable-werror_always was given.
6177if test "${enable_werror_always+set}" = set; then
6178 enableval="$enable_werror_always"
6179
6180else
6181 enable_werror_always=no
6182fi;
6183if test x${enable_werror_always} = xyes ; then
6184 strict1_warn="${strict1_warn} -Werror"
6185 WERROR=-Werror
6186fi
6187
ba479fd2 6188# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
6189# That's useful for people building cross-compilers, or just running a
6190# quick `make'.
6191warn_cflags=
6192if test "x$GCC" = "xyes"; then
6193 warn_cflags='$(GCC_WARN_CFLAGS)'
6194fi
6195
6196
dd859b8a 6197# Enable -Werror in bootstrap stage2 and later.
dd859b8a
KG
6198# Check whether --enable-werror or --disable-werror was given.
6199if test "${enable_werror+set}" = set; then
6200 enableval="$enable_werror"
ba479fd2 6201
dd859b8a 6202else
06c37c96
NS
6203 if test x$is_release = x ; then
6204 # Default to "yes" on development branches.
dd859b8a 6205 enable_werror=yes
06c37c96
NS
6206else
6207 # Default to "no" on release branches.
6208 enable_werror=no
6209fi
ba479fd2 6210fi;
dd859b8a
KG
6211if test x$enable_werror = xyes ; then
6212 WERROR=-Werror
6213fi
6214
6215
414d23ae
HPN
6216# Enable expensive internal checks
6217# Check whether --enable-checking or --disable-checking was given.
6218if test "${enable_checking+set}" = set; then
6219 enableval="$enable_checking"
e1bbfc5c
NS
6220 ac_checking_flags="${enableval}"
6221else
6222
6223# Determine the default checks.
6224if test x$is_release = x ; then
6225 ac_checking_flags=yes
6226else
6227 ac_checking_flags=release
6228fi
6229fi;
6230ac_assert_checking=1
6231ac_checking=
414d23ae
HPN
6232ac_tree_checking=
6233ac_rtl_checking=
6234ac_rtlflag_checking=
6235ac_gc_checking=
6236ac_gc_always_collect=
5dfa45d0 6237ac_fold_checking=
e1bbfc5c
NS
6238IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6239for check in $ac_checking_flags
6240do
6241 case $check in
6242 yes) ac_assert_checking=1 ; ac_checking=1 ;
6243 ac_tree_checking=1 ; ac_gc_checking=1 ;
6244 ac_rtlflag_checking=1 ;;
6245 no) ac_assert_checking= ; ac_checking= ;
6246 ac_tree_checking= ; ac_rtl_checking= ;
6247 ac_rtlflag_checking= ; ac_gc_checking= ;
6248 ac_gc_always_collect= ; ac_fold_checking= ;;
6249 all) ac_assert_checking=1 ; ac_checking=1 ;
6250 ac_tree_checking=1 ; ac_rtl_checking=1 ;
6251 ac_rtlflag_checking=1 ; ac_gc_checking=1 ;
6252 ac_gc_always_collect=1 ; ac_fold_checking=1 ;;
6253 release) ac_assert_checking=1 ;;
6254 assert) ac_assert_checking=1 ;;
6255 fold) ac_fold_checking=1 ;;
6256 gc) ac_gc_checking=1 ;;
6257 gcac) ac_gc_always_collect=1 ;;
6258 misc) ac_checking=1 ;;
6259 rtlflag) ac_rtlflag_checking=1 ;;
6260 rtl) ac_rtl_checking=1 ;;
6261 tree) ac_tree_checking=1 ;;
6262 valgrind) ac_checking_valgrind=1 ;;
6263 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
6264echo "$as_me: error: unknown check category $check" >&2;}
6265 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
6266 esac
6267done
6268IFS="$ac_save_IFS"
06c37c96 6269
ba479fd2
NN
6270nocommon_flag=""
6271if test x$ac_checking != x ; then
6272
6273cat >>confdefs.h <<\_ACEOF
6274#define ENABLE_CHECKING 1
6275_ACEOF
6276
6277 nocommon_flag=-fno-common
6278fi
6279
06c37c96
NS
6280if test x$ac_assert_checking != x ; then
6281
6282cat >>confdefs.h <<\_ACEOF
6283#define ENABLE_ASSERT_CHECKING 1
6284_ACEOF
6285
6286fi
ba479fd2
NN
6287if test x$ac_tree_checking != x ; then
6288
6289cat >>confdefs.h <<\_ACEOF
6290#define ENABLE_TREE_CHECKING 1
6291_ACEOF
6292
13f05fd0 6293 TREEBROWSER=tree-browser.o
ba479fd2 6294fi
13f05fd0 6295
ba479fd2
NN
6296if test x$ac_rtl_checking != x ; then
6297
6298cat >>confdefs.h <<\_ACEOF
6299#define ENABLE_RTL_CHECKING 1
6300_ACEOF
6301
6302fi
6303if test x$ac_rtlflag_checking != x ; then
6304
6305cat >>confdefs.h <<\_ACEOF
6306#define ENABLE_RTL_FLAG_CHECKING 1
6307_ACEOF
6308
6309fi
6310if test x$ac_gc_checking != x ; then
6311
6312cat >>confdefs.h <<\_ACEOF
6313#define ENABLE_GC_CHECKING 1
6314_ACEOF
6315
6316fi
6317if test x$ac_gc_always_collect != x ; then
6318
6319cat >>confdefs.h <<\_ACEOF
6320#define ENABLE_GC_ALWAYS_COLLECT 1
6321_ACEOF
6322
6323fi
6324if test x$ac_fold_checking != x ; then
6325
6326cat >>confdefs.h <<\_ACEOF
6327#define ENABLE_FOLD_CHECKING 1
6328_ACEOF
6329
6330fi
6331valgrind_path_defines=
6332valgrind_command=
6333
ba479fd2
NN
6334if test "${ac_cv_header_valgrind_h+set}" = set; then
6335 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6336echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6337if test "${ac_cv_header_valgrind_h+set}" = set; then
6338 echo $ECHO_N "(cached) $ECHO_C" >&6
6339fi
6340echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6341echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6342else
6343 # Is the header compilable?
6344echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6345echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
6346cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6347/* confdefs.h. */
6348_ACEOF
6349cat confdefs.h >>conftest.$ac_ext
6350cat >>conftest.$ac_ext <<_ACEOF
6351/* end confdefs.h. */
6352$ac_includes_default
63cf211a 6353#include <valgrind.h>
ba479fd2
NN
6354_ACEOF
6355rm -f conftest.$ac_objext
6356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6357 (eval $ac_compile) 2>conftest.er1
ba479fd2 6358 ac_status=$?
86da66b5
HPN
6359 grep -v '^ *+' conftest.er1 >conftest.err
6360 rm -f conftest.er1
6361 cat conftest.err >&5
ba479fd2
NN
6362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6363 (exit $ac_status); } &&
b095fe2c 6364 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
6365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6366 (eval $ac_try) 2>&5
6367 ac_status=$?
6368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6369 (exit $ac_status); }; } &&
6370 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6372 (eval $ac_try) 2>&5
6373 ac_status=$?
6374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6375 (exit $ac_status); }; }; then
6376 ac_header_compiler=yes
6377else
6378 echo "$as_me: failed program was:" >&5
6379sed 's/^/| /' conftest.$ac_ext >&5
6380
6381ac_header_compiler=no
6382fi
86da66b5 6383rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
6384echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6385echo "${ECHO_T}$ac_header_compiler" >&6
6386
6387# Is the header present?
6388echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6389echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
6390cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6391/* confdefs.h. */
6392_ACEOF
6393cat confdefs.h >>conftest.$ac_ext
6394cat >>conftest.$ac_ext <<_ACEOF
6395/* end confdefs.h. */
6396#include <valgrind.h>
6397_ACEOF
6398if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6399 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6400 ac_status=$?
6401 grep -v '^ *+' conftest.er1 >conftest.err
6402 rm -f conftest.er1
6403 cat conftest.err >&5
6404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6405 (exit $ac_status); } >/dev/null; then
6406 if test -s conftest.err; then
6407 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6408 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6409 else
6410 ac_cpp_err=
6411 fi
6412else
6413 ac_cpp_err=yes
6414fi
6415if test -z "$ac_cpp_err"; then
6416 ac_header_preproc=yes
6417else
6418 echo "$as_me: failed program was:" >&5
6419sed 's/^/| /' conftest.$ac_ext >&5
6420
6421 ac_header_preproc=no
6422fi
6423rm -f conftest.err conftest.$ac_ext
6424echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6425echo "${ECHO_T}$ac_header_preproc" >&6
6426
6427# So? What about this header?
86da66b5
HPN
6428case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6429 yes:no: )
ba479fd2
NN
6430 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6431echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
6432 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6433echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6434 ac_header_preproc=yes
ba479fd2 6435 ;;
86da66b5 6436 no:yes:* )
ba479fd2
NN
6437 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6438echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
6439 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6440echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6441 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6442echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6443 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6444echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
6445 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6446echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
6447 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6448echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
ba479fd2
NN
6449 (
6450 cat <<\_ASBOX
86da66b5
HPN
6451## ------------------------------------------ ##
6452## Report this to the AC_PACKAGE_NAME lists. ##
6453## ------------------------------------------ ##
ba479fd2
NN
6454_ASBOX
6455 ) |
6456 sed "s/^/$as_me: WARNING: /" >&2
6457 ;;
6458esac
6459echo "$as_me:$LINENO: checking for valgrind.h" >&5
6460echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6461if test "${ac_cv_header_valgrind_h+set}" = set; then
6462 echo $ECHO_N "(cached) $ECHO_C" >&6
6463else
6464 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 6465fi
ba479fd2
NN
6466echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6467echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6468
6e3f3080 6469fi
ba479fd2 6470if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
6471 have_valgrind_h=yes
6472else
ba479fd2 6473 have_valgrind_h=no
6938ec6c
NN
6474fi
6475
6476
ba479fd2 6477
414d23ae
HPN
6478if test x$ac_checking_valgrind != x ; then
6479 # It is certainly possible that there's valgrind but no valgrind.h.
6480 # GCC relies on making annotations so we must have both.
ba479fd2
NN
6481 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6482echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
6483 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6484/* confdefs.h. */
6485_ACEOF
6486cat confdefs.h >>conftest.$ac_ext
6487cat >>conftest.$ac_ext <<_ACEOF
6488/* end confdefs.h. */
a207b594 6489#include <valgrind/memcheck.h>
14011ca4
AJ
6490#ifndef VALGRIND_DISCARD
6491#error VALGRIND_DISCARD not defined
6492#endif
ba479fd2
NN
6493_ACEOF
6494if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6495 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6496 ac_status=$?
6497 grep -v '^ *+' conftest.er1 >conftest.err
6498 rm -f conftest.er1
6499 cat conftest.err >&5
6500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6501 (exit $ac_status); } >/dev/null; then
6502 if test -s conftest.err; then
6503 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6504 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6505 else
6506 ac_cpp_err=
6507 fi
6508else
6509 ac_cpp_err=yes
6510fi
6511if test -z "$ac_cpp_err"; then
a207b594
HPN
6512 gcc_cv_header_valgrind_memcheck_h=yes
6513else
ba479fd2
NN
6514 echo "$as_me: failed program was:" >&5
6515sed 's/^/| /' conftest.$ac_ext >&5
6516
a207b594
HPN
6517 gcc_cv_header_valgrind_memcheck_h=no
6518fi
ba479fd2
NN
6519rm -f conftest.err conftest.$ac_ext
6520 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6521echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6522 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6523echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
6524 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6525/* confdefs.h. */
6526_ACEOF
6527cat confdefs.h >>conftest.$ac_ext
6528cat >>conftest.$ac_ext <<_ACEOF
6529/* end confdefs.h. */
a207b594
HPN
6530#include <memcheck.h>
6531#ifndef VALGRIND_DISCARD
6532#error VALGRIND_DISCARD not defined
6533#endif
ba479fd2
NN
6534_ACEOF
6535if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6536 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6537 ac_status=$?
6538 grep -v '^ *+' conftest.er1 >conftest.err
6539 rm -f conftest.er1
6540 cat conftest.err >&5
6541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6542 (exit $ac_status); } >/dev/null; then
6543 if test -s conftest.err; then
6544 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6545 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6546 else
6547 ac_cpp_err=
6548 fi
6549else
6550 ac_cpp_err=yes
6551fi
6552if test -z "$ac_cpp_err"; then
14011ca4
AJ
6553 gcc_cv_header_memcheck_h=yes
6554else
ba479fd2
NN
6555 echo "$as_me: failed program was:" >&5
6556sed 's/^/| /' conftest.$ac_ext >&5
6557
cafe096b
EC
6558 gcc_cv_header_memcheck_h=no
6559fi
ba479fd2
NN
6560rm -f conftest.err conftest.$ac_ext
6561 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6562echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
6563
56694dd9
ZW
6564# Prepare PATH_SEPARATOR.
6565# The user is always right.
6566if test "${PATH_SEPARATOR+set}" != set; then
6567 echo "#! /bin/sh" >conf$$.sh
6568 echo "exit 0" >>conf$$.sh
6569 chmod +x conf$$.sh
6570 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6571 PATH_SEPARATOR=';'
6572 else
6573 PATH_SEPARATOR=:
6574 fi
6575 rm -f conf$$.sh
6576fi
6577
6578# Find out how to test for executable files. Don't use a zero-byte file,
6579# as systems may use methods other than mode bits to determine executability.
6580cat >conf$$.file <<_ASEOF
6581#! /bin/sh
6582exit 0
6583_ASEOF
6584chmod +x conf$$.file
6585if test -x conf$$.file >/dev/null 2>&1; then
6586 ac_executable_p="test -x"
6587else
6588 ac_executable_p="test -f"
6589fi
6590rm -f conf$$.file
6591
6592# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 6593set dummy valgrind; ac_word=$2
ba479fd2
NN
6594echo "$as_me:$LINENO: checking for $ac_word" >&5
6595echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6596if test "${ac_cv_path_valgrind_path+set}" = set; then
6597 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
6598else
6599 case "$valgrind_path" in
56694dd9
ZW
6600 [\\/]* | ?:[\\/]*)
6601 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6602 ;;
414d23ae 6603 *)
56694dd9
ZW
6604 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6605 for ac_dir in $PATH; do
6606 IFS="$ac_save_IFS"
6607 test -z "$ac_dir" && ac_dir=.
6608 for ac_exec_ext in '' $ac_executable_extensions; do
6609 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6610 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6611 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6612 break 2
6613 fi
6614 fi
6615 done
6616 done
6617 IFS="$ac_save_IFS"
6618 ;;
414d23ae 6619esac
75e93faa 6620fi
414d23ae
HPN
6621valgrind_path="$ac_cv_path_valgrind_path"
6622if test -n "$valgrind_path"; then
ba479fd2
NN
6623 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6624echo "${ECHO_T}$valgrind_path" >&6
414d23ae 6625else
ba479fd2
NN
6626 echo "$as_me:$LINENO: result: no" >&5
6627echo "${ECHO_T}no" >&6
414d23ae
HPN
6628fi
6629
a207b594
HPN
6630 if test "x$valgrind_path" = "x" \
6631 || (test $have_valgrind_h = no \
6632 && test $gcc_cv_header_memcheck_h = no \
6633 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
6634 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6635echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6636 { (exit 1); exit 1; }; }
414d23ae
HPN
6637 fi
6638 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6639 valgrind_command="$valgrind_path -q"
ba479fd2
NN
6640
6641cat >>confdefs.h <<\_ACEOF
414d23ae 6642#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 6643_ACEOF
75e93faa 6644
a207b594 6645 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
6646
6647cat >>confdefs.h <<\_ACEOF
a207b594 6648#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 6649_ACEOF
a207b594
HPN
6650
6651 fi
14011ca4 6652 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
6653
6654cat >>confdefs.h <<\_ACEOF
14011ca4 6655#define HAVE_MEMCHECK_H 1
ba479fd2 6656_ACEOF
14011ca4
AJ
6657
6658 fi
414d23ae 6659fi
75e93faa 6660
75e93faa
ZW
6661
6662
74ee1642
PB
6663# Check whether --enable-mapped-location or --disable-mapped-location was given.
6664if test "${enable_mapped_location+set}" = set; then
6665 enableval="$enable_mapped_location"
6666
6667else
6668 enable_mapped_location=no
6669fi;
6670
6671if test "$enable_mapped_location" = yes ; then
6672
6673cat >>confdefs.h <<\_ACEOF
6674#define USE_MAPPED_LOCATION 1
6675_ACEOF
6676
6677fi
6678
414d23ae
HPN
6679# Enable code coverage collection
6680# Check whether --enable-coverage or --disable-coverage was given.
6681if test "${enable_coverage+set}" = set; then
6682 enableval="$enable_coverage"
6683 case "${enableval}" in
6dd297da
NN
6684 yes|noopt)
6685 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6686 ;;
6687 opt)
6688 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6689 ;;
6690 no)
6691 # a.k.a. --disable-coverage
6692 coverage_flags=""
6693 ;;
6694 *)
6695 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
6696echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6697 { (exit 1); exit 1; }; }
6dd297da 6698 ;;
414d23ae 6699esac
75e93faa 6700else
414d23ae 6701 coverage_flags=""
ba479fd2 6702fi;
5c3bc9fb 6703
414d23ae 6704
439a7e54
DN
6705# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
6706if test "${enable_gather_detailed_mem_stats+set}" = set; then
6707 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 6708
439a7e54
DN
6709else
6710 enable_gather_detailed_mem_stats=no
ba479fd2 6711fi;
439a7e54 6712if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
6713
6714cat >>confdefs.h <<\_ACEOF
439a7e54 6715#define GATHER_STATISTICS 1
ba479fd2 6716_ACEOF
439a7e54
DN
6717
6718fi
6719
73458fb7
NN
6720# -------------------------------
6721# Miscenalleous configure options
6722# -------------------------------
34a86c2b
NN
6723
6724# With stabs
ba479fd2 6725
34a86c2b
NN
6726# Check whether --with-stabs or --without-stabs was given.
6727if test "${with_stabs+set}" = set; then
6728 withval="$with_stabs"
6729 stabs="$with_stabs"
6730else
6731 stabs=no
ba479fd2 6732fi;
cafe096b 6733
34a86c2b
NN
6734# Determine whether or not multilibs are enabled.
6735# Check whether --enable-multilib or --disable-multilib was given.
6736if test "${enable_multilib+set}" = set; then
6737 enableval="$enable_multilib"
ba479fd2 6738
34a86c2b
NN
6739else
6740 enable_multilib=yes
ba479fd2 6741fi;
75e93faa 6742
34a86c2b 6743
414d23ae
HPN
6744# Enable __cxa_atexit for C++.
6745# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
6746if test "${enable___cxa_atexit+set}" = set; then
6747 enableval="$enable___cxa_atexit"
75e93faa 6748
ba479fd2 6749fi;
75e93faa 6750
414d23ae
HPN
6751# Enable threads
6752# Pass with no value to take the default
6753# Pass with a value to specify a thread package
6754# Check whether --enable-threads or --disable-threads was given.
6755if test "${enable_threads+set}" = set; then
6756 enableval="$enable_threads"
ba479fd2 6757
414d23ae
HPN
6758else
6759 enable_threads=''
ba479fd2 6760fi;
414d23ae
HPN
6761
6762# Check whether --enable-objc-gc or --disable-objc-gc was given.
6763if test "${enable_objc_gc+set}" = set; then
6764 enableval="$enable_objc_gc"
6765 if test x$enable_objc_gc = xno; then
6766 objc_boehm_gc=''
6767else
6768 objc_boehm_gc=1
6769fi
6770else
6771 objc_boehm_gc=''
ba479fd2 6772fi;
75e93faa
ZW
6773
6774
414d23ae
HPN
6775# Check whether --with-dwarf2 or --without-dwarf2 was given.
6776if test "${with_dwarf2+set}" = set; then
6777 withval="$with_dwarf2"
6778 dwarf2="$with_dwarf2"
75e93faa 6779else
414d23ae 6780 dwarf2=no
ba479fd2 6781fi;
75e93faa 6782
414d23ae
HPN
6783# Check whether --enable-shared or --disable-shared was given.
6784if test "${enable_shared+set}" = set; then
6785 enableval="$enable_shared"
ba479fd2 6786
414d23ae
HPN
6787 case $enable_shared in
6788 yes | no) ;;
6789 *)
6790 enable_shared=no
6791 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6792 for pkg in $enableval; do
6793 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
6794 enable_shared=yes
6795 fi
6796 done
6797 IFS="$ac_save_ifs"
6798 ;;
6799 esac
6800
75e93faa 6801else
414d23ae 6802 enable_shared=yes
ba479fd2 6803fi;
75e93faa 6804
75e93faa 6805
75e93faa 6806
4977bab6
ZW
6807# Check whether --with-sysroot or --without-sysroot was given.
6808if test "${with_sysroot+set}" = set; then
6809 withval="$with_sysroot"
ba479fd2 6810
4977bab6 6811 case ${with_sysroot} in
caa55b1e 6812 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
6813 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
6814 esac
ba479fd2 6815
4977bab6
ZW
6816 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
6817 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
6818
047d636f
DJ
6819 if test "x$exec_prefix" = xNONE; then
6820 if test "x$prefix" = xNONE; then
6821 test_prefix=/usr/local
6822 else
6823 test_prefix=$prefix
6824 fi
6825 else
6826 test_prefix=$exec_prefix
6827 fi
6828 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
6829 "${test_prefix}"|"${test_prefix}/"*|\
6830 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
6831 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
6832 TARGET_SYSTEM_ROOT_DEFINE="$t"
6833 ;;
6834 esac
6835
4977bab6 6836else
ba479fd2 6837
4977bab6 6838 TARGET_SYSTEM_ROOT=
db720d9a 6839 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
6840 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
6841
ba479fd2 6842fi;
4977bab6
ZW
6843
6844
6845
6846
d1bd0ded 6847# Build with intermodule optimisations
d1bd0ded
GK
6848# Check whether --enable-intermodule or --disable-intermodule was given.
6849if test "${enable_intermodule+set}" = set; then
6850 enableval="$enable_intermodule"
0c46c5c7
KC
6851 case ${enable_intermodule} in
6852 yes) onestep="-onestep";;
6853 *) onestep="";;
d1bd0ded 6854esac
0c46c5c7
KC
6855else
6856 onestep=""
ba479fd2 6857fi;
d1bd0ded
GK
6858
6859
f3c9f174
NN
6860# Sanity check enable_languages in case someone does not run the toplevel
6861# configure # script.
6862# Check whether --enable-languages or --disable-languages was given.
6863if test "${enable_languages+set}" = set; then
6864 enableval="$enable_languages"
6865 case ,${enable_languages}, in
6866 ,,|,yes,)
6867 # go safe -- we cannot be much sure without the toplevel
6868 # configure's
6869 # analysis of which target libs are present and usable
6870 enable_languages=c
6871 ;;
6872 *,all,*)
6873 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
6874echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
6875 { (exit 1); exit 1; }; }
6876 ;;
6877 *,c,*)
6878 ;;
6879 *)
6880 enable_languages=c,${enable_languages}
6881 ;;
6882esac
6883else
6884 enable_languages=c
6885fi;
6886
6887subdirs=
6888for lang in ${srcdir}/*/config-lang.in
6889do
6890 case $lang in
6891 # The odd quoting in the next line works around
6892 # an apparent bug in bash 1.12 on linux.
6893 ${srcdir}/[*]/config-lang.in) ;;
6894 *)
6895 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6896 if test "x$lang_alias" = x
6897 then
6898 echo "$lang doesn't set \$language." 1>&2
6899 exit 1
6900 fi
6901 case ",$enable_languages," in
6902 *,$lang_alias,*)
6903 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
6904 esac
6905 ;;
6906 esac
6907done
6908
6909
73458fb7
NN
6910# -------------------------
6911# Checks for other programs
6912# -------------------------
5b67ad6f 6913
ba479fd2
NN
6914echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6915echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
86da66b5 6916set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
ba479fd2
NN
6917if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
6918 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 6919else
ba479fd2 6920 cat >conftest.make <<\_ACEOF
e9a25f70 6921all:
ba479fd2
NN
6922 @echo 'ac_maketemp="$(MAKE)"'
6923_ACEOF
e9a25f70 6924# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 6925eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
6926if test -n "$ac_maketemp"; then
6927 eval ac_cv_prog_make_${ac_make}_set=yes
6928else
6929 eval ac_cv_prog_make_${ac_make}_set=no
6930fi
ba479fd2 6931rm -f conftest.make
e9a25f70
JL
6932fi
6933if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
6934 echo "$as_me:$LINENO: result: yes" >&5
6935echo "${ECHO_T}yes" >&6
e9a25f70
JL
6936 SET_MAKE=
6937else
ba479fd2
NN
6938 echo "$as_me:$LINENO: result: no" >&5
6939echo "${ECHO_T}no" >&6
e9a25f70
JL
6940 SET_MAKE="MAKE=${MAKE-make}"
6941fi
6942
6943
861bb6c1 6944# Find some useful tools
ba479fd2 6945for ac_prog in gawk mawk nawk awk
861bb6c1 6946do
ba479fd2 6947 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 6948set dummy $ac_prog; ac_word=$2
ba479fd2
NN
6949echo "$as_me:$LINENO: checking for $ac_word" >&5
6950echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6951if test "${ac_cv_prog_AWK+set}" = set; then
6952 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
6953else
6954 if test -n "$AWK"; then
6955 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6956else
ba479fd2
NN
6957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6958for as_dir in $PATH
6959do
6960 IFS=$as_save_IFS
6961 test -z "$as_dir" && as_dir=.
6962 for ac_exec_ext in '' $ac_executable_extensions; do
6963 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6964 ac_cv_prog_AWK="$ac_prog"
6965 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6966 break 2
6967 fi
6968done
6969done
6970
861bb6c1
JL
6971fi
6972fi
ba479fd2 6973AWK=$ac_cv_prog_AWK
861bb6c1 6974if test -n "$AWK"; then
ba479fd2
NN
6975 echo "$as_me:$LINENO: result: $AWK" >&5
6976echo "${ECHO_T}$AWK" >&6
861bb6c1 6977else
ba479fd2
NN
6978 echo "$as_me:$LINENO: result: no" >&5
6979echo "${ECHO_T}no" >&6
861bb6c1
JL
6980fi
6981
ba479fd2 6982 test -n "$AWK" && break
861bb6c1
JL
6983done
6984
776dc15d 6985# We need awk to create options.c and options.h.
2c4902b9
NN
6986# Bail out if it's missing.
6987case ${AWK} in
ba479fd2
NN
6988 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
6989echo "$as_me: error: can't build without awk, bailing out" >&2;}
6990 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
6991esac
6992
ba479fd2
NN
6993echo "$as_me:$LINENO: checking whether ln -s works" >&5
6994echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
6995if test "${gcc_cv_prog_LN_S+set}" = set; then
6996 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
6997else
6998 rm -f conftestdata_t
6999echo >conftestdata_f
7000if ln -s conftestdata_f conftestdata_t 2>/dev/null
7001then
7002 gcc_cv_prog_LN_S="ln -s"
7003else
7004 if ln conftestdata_f conftestdata_t 2>/dev/null
7005 then
7006 gcc_cv_prog_LN_S=ln
7007 else
35f06ae4
PB
7008 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7009 then
06c3418c 7010 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
7011 else
7012 gcc_cv_prog_LN_S=cp
7013 fi
0a4b6309
RL
7014 fi
7015fi
7016rm -f conftestdata_f conftestdata_t
7017
7018fi
7019LN_S="$gcc_cv_prog_LN_S"
7020if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
7021 echo "$as_me:$LINENO: result: yes" >&5
7022echo "${ECHO_T}yes" >&6
0a4b6309
RL
7023else
7024 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
7025 echo "$as_me:$LINENO: result: no, using ln" >&5
7026echo "${ECHO_T}no, using ln" >&6
0a4b6309 7027 else
35f06ae4
PB
7028 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7029echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
7030 fi
7031fi
7032
41e622a8
AP
7033echo "$as_me:$LINENO: checking whether ln works" >&5
7034echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
7035if test "${acx_cv_prog_LN+set}" = set; then
7036 echo $ECHO_N "(cached) $ECHO_C" >&6
7037else
7038 rm -f conftestdata_t
7039echo >conftestdata_f
7040if ln conftestdata_f conftestdata_t 2>/dev/null
7041then
7042 acx_cv_prog_LN=ln
7043else
7044 acx_cv_prog_LN=no
7045fi
7046rm -f conftestdata_f conftestdata_t
7047
7048fi
7049if test $acx_cv_prog_LN = no; then
7050 LN="$LN_S"
7051 echo "$as_me:$LINENO: result: no, using $LN" >&5
7052echo "${ECHO_T}no, using $LN" >&6
7053else
7054 LN="$acx_cv_prog_LN"
7055 echo "$as_me:$LINENO: result: yes" >&5
7056echo "${ECHO_T}yes" >&6
7057fi
7058
ba479fd2
NN
7059if test -n "$ac_tool_prefix"; then
7060 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7061set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7062echo "$as_me:$LINENO: checking for $ac_word" >&5
7063echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7064if test "${ac_cv_prog_RANLIB+set}" = set; then
7065 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7066else
7067 if test -n "$RANLIB"; then
7068 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7069else
ba479fd2
NN
7070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7071for as_dir in $PATH
7072do
7073 IFS=$as_save_IFS
7074 test -z "$as_dir" && as_dir=.
7075 for ac_exec_ext in '' $ac_executable_extensions; do
7076 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7077 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7078 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7079 break 2
7080 fi
7081done
7082done
7083
6e3f3080
NN
7084fi
7085fi
ba479fd2 7086RANLIB=$ac_cv_prog_RANLIB
6e3f3080 7087if test -n "$RANLIB"; then
ba479fd2
NN
7088 echo "$as_me:$LINENO: result: $RANLIB" >&5
7089echo "${ECHO_T}$RANLIB" >&6
7090else
7091 echo "$as_me:$LINENO: result: no" >&5
7092echo "${ECHO_T}no" >&6
7093fi
7094
7095fi
7096if test -z "$ac_cv_prog_RANLIB"; then
7097 ac_ct_RANLIB=$RANLIB
7098 # Extract the first word of "ranlib", so it can be a program name with args.
7099set dummy ranlib; ac_word=$2
7100echo "$as_me:$LINENO: checking for $ac_word" >&5
7101echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7102if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7103 echo $ECHO_N "(cached) $ECHO_C" >&6
7104else
7105 if test -n "$ac_ct_RANLIB"; then
7106 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7107else
7108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7109for as_dir in $PATH
7110do
7111 IFS=$as_save_IFS
7112 test -z "$as_dir" && as_dir=.
7113 for ac_exec_ext in '' $ac_executable_extensions; do
7114 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7115 ac_cv_prog_ac_ct_RANLIB="ranlib"
7116 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7117 break 2
7118 fi
7119done
7120done
7121
7122 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7123fi
7124fi
7125ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7126if test -n "$ac_ct_RANLIB"; then
7127 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7128echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 7129else
ba479fd2
NN
7130 echo "$as_me:$LINENO: result: no" >&5
7131echo "${ECHO_T}no" >&6
7132fi
7133
7134 RANLIB=$ac_ct_RANLIB
7135else
7136 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
7137fi
7138
343a6100
MM
7139case "${host}" in
7140*-*-darwin*)
7141 # By default, the Darwin ranlib will not treat common symbols as
7142 # definitions when building the archive table of contents. Other
7143 # ranlibs do that; pass an option to the Darwin ranlib that makes
7144 # it behave similarly.
7145 ranlib_flags="-c"
7146 ;;
7147*)
7148 ranlib_flags=""
7149esac
7150
7151
0a4b6309
RL
7152# Find a good install program. We prefer a C program (faster),
7153# so one script is as good as another. But avoid the broken or
7154# incompatible versions:
7155# SysV /etc/install, /usr/sbin/install
7156# SunOS /usr/etc/install
7157# IRIX /sbin/install
7158# AIX /bin/install
7159# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7160# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7161# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
7162echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7163echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 7164if test -z "$INSTALL"; then
ba479fd2
NN
7165if test "${ac_cv_path_install+set}" = set; then
7166 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7167else
7168 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7169 for ac_dir in $PATH; do
7170 # Account for people who put trailing slashes in PATH elements.
7171 case "$ac_dir/" in
7172 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7173 *)
7174 # OSF1 and SCO ODT 3.0 have their own names for install.
7175 for ac_prog in ginstall scoinst install; do
7176 if test -f $ac_dir/$ac_prog; then
7177 if test $ac_prog = install &&
7178 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7179 # AIX install. It has an incompatible calling convention.
7180 # OSF/1 installbsd also uses dspmsg, but is usable.
7181 :
7182 else
7183 ac_cv_path_install="$ac_dir/$ac_prog -c"
7184 break 2
7185 fi
7186 fi
7187 done
7188 ;;
7189 esac
7190 done
7191 IFS="$ac_save_IFS"
7192
7193fi
7194 if test "${ac_cv_path_install+set}" = set; then
7195 INSTALL="$ac_cv_path_install"
7196 else
7197 # As a last resort, use the slow shell script. We don't cache a
7198 # path for INSTALL within a source directory, because that will
7199 # break other packages using the cache if that directory is
7200 # removed, or if the path is relative.
7201 INSTALL="$ac_install_sh"
7202 fi
7203fi
ba479fd2
NN
7204echo "$as_me:$LINENO: result: $INSTALL" >&5
7205echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
7206
7207# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7208# It thinks the first close brace ends the variable substitution.
7209test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7210
7211test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7212
861bb6c1 7213
3a000df0 7214# See if cmp has --ignore-initial.
ba479fd2
NN
7215echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7216echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
7217if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7218 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
7219else
7220 echo abfoo >t1
7221 echo cdfoo >t2
269a7343 7222 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
7223 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7224 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 7225 :
3a000df0
KC
7226 else
7227 gcc_cv_prog_cmp_skip=gnucompare
7228 fi
269a7343
KG
7229 fi
7230 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7231 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7232 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7233 :
7234 else
7235 gcc_cv_prog_cmp_skip=fastcompare
7236 fi
7237 fi
3a000df0
KC
7238 fi
7239 rm t1 t2
7240
7241fi
ba479fd2
NN
7242echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7243echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
7244make_compare_target=$gcc_cv_prog_cmp_skip
7245
7246
7247
73458fb7
NN
7248# See if we have the mktemp command.
7249# Extract the first word of "mktemp", so it can be a program name with args.
7250set dummy mktemp; ac_word=$2
ba479fd2
NN
7251echo "$as_me:$LINENO: checking for $ac_word" >&5
7252echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7253if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7254 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7255else
7256 if test -n "$have_mktemp_command"; then
7257 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7258else
ba479fd2
NN
7259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7260for as_dir in $PATH
7261do
7262 IFS=$as_save_IFS
7263 test -z "$as_dir" && as_dir=.
7264 for ac_exec_ext in '' $ac_executable_extensions; do
7265 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7266 ac_cv_prog_have_mktemp_command="yes"
7267 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7268 break 2
7269 fi
7270done
7271done
7272
73458fb7
NN
7273 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7274fi
7275fi
ba479fd2 7276have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 7277if test -n "$have_mktemp_command"; then
ba479fd2
NN
7278 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7279echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 7280else
ba479fd2
NN
7281 echo "$as_me:$LINENO: result: no" >&5
7282echo "${ECHO_T}no" >&6
73458fb7
NN
7283fi
7284
7285
7c27e184
PB
7286MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
7287
7288# See if makeinfo has been installed and is modern enough
7289# that we can use it.
7290# Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 7291set dummy makeinfo; ac_word=$2
ba479fd2
NN
7292echo "$as_me:$LINENO: checking for $ac_word" >&5
7293echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7294if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7295 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7296else
7297 if test -n "$MAKEINFO"; then
7298 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7299else
ba479fd2
NN
7300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7301for as_dir in $PATH
7302do
7303 IFS=$as_save_IFS
7304 test -z "$as_dir" && as_dir=.
7305 for ac_exec_ext in '' $ac_executable_extensions; do
7306 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7307 ac_cv_prog_MAKEINFO="makeinfo"
7308 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7309 break 2
7310 fi
7311done
7312done
7313
73458fb7
NN
7314fi
7315fi
ba479fd2 7316MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 7317if test -n "$MAKEINFO"; then
ba479fd2
NN
7318 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7319echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 7320else
ba479fd2
NN
7321 echo "$as_me:$LINENO: result: no" >&5
7322echo "${ECHO_T}no" >&6
73458fb7
NN
7323fi
7324
7325if test -n "$MAKEINFO"; then
7326 # Found it, now check the version.
ba479fd2
NN
7327 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7328echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
7329if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7330 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7331else
7332 ac_prog_version=`$MAKEINFO --version 2>&1 |
7333 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
b095fe2c 7334 echo "configure:7334: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
7335 case $ac_prog_version in
7336 '') gcc_cv_prog_makeinfo_modern=no;;
7337 4.[2-9]*)
7338 gcc_cv_prog_makeinfo_modern=yes;;
7339 *) gcc_cv_prog_makeinfo_modern=no;;
7340 esac
7341
7342fi
ba479fd2
NN
7343echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7344echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
7345else
7346 gcc_cv_prog_makeinfo_modern=no
7347fi
7348
73458fb7 7349if test $gcc_cv_prog_makeinfo_modern = no; then
7c27e184 7350 MAKEINFO="$MISSING makeinfo"
ba479fd2
NN
7351 { echo "$as_me:$LINENO: WARNING:
7352*** Makeinfo is missing or too old.
7353*** Info documentation will not be built." >&5
7354echo "$as_me: WARNING:
cafe096b 7355*** Makeinfo is missing or too old.
ba479fd2 7356*** Info documentation will not be built." >&2;}
73458fb7
NN
7357 BUILD_INFO=
7358else
ba479fd2 7359 BUILD_INFO=info
73458fb7
NN
7360fi
7361
7c27e184 7362
73458fb7 7363# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
7364echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7365echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 7366if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
7367 echo "$as_me:$LINENO: result: yes" >&5
7368echo "${ECHO_T}yes" >&6
7369 GENERATED_MANPAGES=generated-manpages
73458fb7 7370else
ba479fd2
NN
7371 echo "$as_me:$LINENO: result: no" >&5
7372echo "${ECHO_T}no" >&6
73458fb7
NN
7373 GENERATED_MANPAGES=
7374fi
7375
7c27e184 7376
73458fb7 7377# How about lex?
7c27e184
PB
7378for ac_prog in flex
7379do
7380 # Extract the first word of "$ac_prog", so it can be a program name with args.
7381set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7382echo "$as_me:$LINENO: checking for $ac_word" >&5
7383echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7384if test "${ac_cv_prog_FLEX+set}" = set; then
7385 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7386else
7387 if test -n "$FLEX"; then
7388 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7389else
ba479fd2
NN
7390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7391for as_dir in $PATH
7392do
7393 IFS=$as_save_IFS
7394 test -z "$as_dir" && as_dir=.
7395 for ac_exec_ext in '' $ac_executable_extensions; do
7396 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7397 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
7398 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7399 break 2
7400 fi
7401done
7402done
7403
73458fb7
NN
7404fi
7405fi
ba479fd2 7406FLEX=$ac_cv_prog_FLEX
73458fb7 7407if test -n "$FLEX"; then
ba479fd2
NN
7408 echo "$as_me:$LINENO: result: $FLEX" >&5
7409echo "${ECHO_T}$FLEX" >&6
73458fb7 7410else
ba479fd2
NN
7411 echo "$as_me:$LINENO: result: no" >&5
7412echo "${ECHO_T}no" >&6
73458fb7
NN
7413fi
7414
7c27e184
PB
7415 test -n "$FLEX" && break
7416done
7417test -n "$FLEX" || FLEX="$MISSING flex"
7418
73458fb7
NN
7419
7420# Bison?
7c27e184
PB
7421for ac_prog in bison
7422do
7423 # Extract the first word of "$ac_prog", so it can be a program name with args.
7424set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7425echo "$as_me:$LINENO: checking for $ac_word" >&5
7426echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7427if test "${ac_cv_prog_BISON+set}" = set; then
7428 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7429else
7430 if test -n "$BISON"; then
7431 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7432else
ba479fd2
NN
7433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7434for as_dir in $PATH
7435do
7436 IFS=$as_save_IFS
7437 test -z "$as_dir" && as_dir=.
7438 for ac_exec_ext in '' $ac_executable_extensions; do
7439 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7440 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
7441 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7442 break 2
7443 fi
7444done
7445done
7446
73458fb7
NN
7447fi
7448fi
ba479fd2 7449BISON=$ac_cv_prog_BISON
73458fb7 7450if test -n "$BISON"; then
ba479fd2
NN
7451 echo "$as_me:$LINENO: result: $BISON" >&5
7452echo "${ECHO_T}$BISON" >&6
73458fb7 7453else
ba479fd2
NN
7454 echo "$as_me:$LINENO: result: no" >&5
7455echo "${ECHO_T}no" >&6
73458fb7
NN
7456fi
7457
7c27e184
PB
7458 test -n "$BISON" && break
7459done
7460test -n "$BISON" || BISON="$MISSING bison"
7461
7462
7463# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7464# check for build == host before using them.
73458fb7 7465
f6a874ac 7466# NM
414adbdd
GK
7467if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7468 && test -d ../binutils ; then
f6a874ac
JW
7469 NM='$(objdir)/../binutils/nm-new'
7470else
7471 # Extract the first word of "nm", so it can be a program name with args.
7472set dummy nm; ac_word=$2
7473echo "$as_me:$LINENO: checking for $ac_word" >&5
7474echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7475if test "${ac_cv_prog_NM+set}" = set; then
7476 echo $ECHO_N "(cached) $ECHO_C" >&6
7477else
7478 if test -n "$NM"; then
7479 ac_cv_prog_NM="$NM" # Let the user override the test.
7480else
7481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7482for as_dir in $PATH
7483do
7484 IFS=$as_save_IFS
7485 test -z "$as_dir" && as_dir=.
7486 for ac_exec_ext in '' $ac_executable_extensions; do
7487 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7488 ac_cv_prog_NM="nm"
7489 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7490 break 2
7491 fi
7492done
7493done
7494
7495 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7496fi
7497fi
7498NM=$ac_cv_prog_NM
7499if test -n "$NM"; then
7500 echo "$as_me:$LINENO: result: $NM" >&5
7501echo "${ECHO_T}$NM" >&6
7502else
7503 echo "$as_me:$LINENO: result: no" >&5
7504echo "${ECHO_T}no" >&6
7505fi
7506
7507fi
7508
7509# AR
414adbdd
GK
7510if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7511 && test -d ../binutils ; then
f6a874ac
JW
7512 AR='$(objdir)/../binutils/ar'
7513else
7514 # Extract the first word of "ar", so it can be a program name with args.
7515set dummy ar; ac_word=$2
7516echo "$as_me:$LINENO: checking for $ac_word" >&5
7517echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7518if test "${ac_cv_prog_AR+set}" = set; then
7519 echo $ECHO_N "(cached) $ECHO_C" >&6
7520else
7521 if test -n "$AR"; then
7522 ac_cv_prog_AR="$AR" # Let the user override the test.
7523else
7524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7525for as_dir in $PATH
7526do
7527 IFS=$as_save_IFS
7528 test -z "$as_dir" && as_dir=.
7529 for ac_exec_ext in '' $ac_executable_extensions; do
7530 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7531 ac_cv_prog_AR="ar"
7532 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7533 break 2
7534 fi
7535done
7536done
7537
7538 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7539fi
7540fi
7541AR=$ac_cv_prog_AR
7542if test -n "$AR"; then
7543 echo "$as_me:$LINENO: result: $AR" >&5
7544echo "${ECHO_T}$AR" >&6
7545else
7546 echo "$as_me:$LINENO: result: no" >&5
7547echo "${ECHO_T}no" >&6
7548fi
7549
7550fi
7551
7552
73458fb7
NN
7553# --------------------
7554# Checks for C headers
7555# --------------------
7556
ba479fd2
NN
7557echo "$as_me:$LINENO: checking for GNU C library" >&5
7558echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
7559if test "${gcc_cv_glibc+set}" = set; then
7560 echo $ECHO_N "(cached) $ECHO_C" >&6
7561else
7562 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7563/* confdefs.h. */
7564_ACEOF
7565cat confdefs.h >>conftest.$ac_ext
7566cat >>conftest.$ac_ext <<_ACEOF
7567/* end confdefs.h. */
73458fb7 7568#include <features.h>
ba479fd2
NN
7569int
7570main ()
7571{
73458fb7
NN
7572
7573#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7574#error Not a GNU C library system
7575#endif
ba479fd2
NN
7576 ;
7577 return 0;
7578}
7579_ACEOF
7580rm -f conftest.$ac_objext
7581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7582 (eval $ac_compile) 2>conftest.er1
ba479fd2 7583 ac_status=$?
86da66b5
HPN
7584 grep -v '^ *+' conftest.er1 >conftest.err
7585 rm -f conftest.er1
7586 cat conftest.err >&5
ba479fd2
NN
7587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7588 (exit $ac_status); } &&
b095fe2c 7589 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
7590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7591 (eval $ac_try) 2>&5
7592 ac_status=$?
7593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7594 (exit $ac_status); }; } &&
7595 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7597 (eval $ac_try) 2>&5
7598 ac_status=$?
7599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7600 (exit $ac_status); }; }; then
73458fb7
NN
7601 gcc_cv_glibc=yes
7602else
ba479fd2
NN
7603 echo "$as_me: failed program was:" >&5
7604sed 's/^/| /' conftest.$ac_ext >&5
7605
7606gcc_cv_glibc=no
73458fb7 7607fi
86da66b5 7608rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
7609fi
7610
ba479fd2
NN
7611echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7612echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 7613if test $gcc_cv_glibc = yes; then
ba479fd2
NN
7614
7615cat >>confdefs.h <<\_ACEOF
73458fb7 7616#define _GNU_SOURCE 1
ba479fd2 7617_ACEOF
73458fb7
NN
7618
7619fi
7620
ca9bc441
NN
7621# Need to reject headers which give warnings, so that the -Werror bootstrap
7622# works later. *sigh* This needs to come before all header checks.
7623
7624ac_c_preproc_warn_flag=yes
7625
ba479fd2
NN
7626echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7627echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7628if test "${ac_cv_header_stdc+set}" = set; then
7629 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7630else
ba479fd2 7631 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7632/* confdefs.h. */
7633_ACEOF
7634cat confdefs.h >>conftest.$ac_ext
7635cat >>conftest.$ac_ext <<_ACEOF
7636/* end confdefs.h. */
956d6950
JL
7637#include <stdlib.h>
7638#include <stdarg.h>
7639#include <string.h>
7640#include <float.h>
ba479fd2
NN
7641
7642int
7643main ()
7644{
7645
7646 ;
7647 return 0;
7648}
7649_ACEOF
7650rm -f conftest.$ac_objext
7651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7652 (eval $ac_compile) 2>conftest.er1
ba479fd2 7653 ac_status=$?
86da66b5
HPN
7654 grep -v '^ *+' conftest.er1 >conftest.err
7655 rm -f conftest.er1
7656 cat conftest.err >&5
ba479fd2
NN
7657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7658 (exit $ac_status); } &&
b095fe2c 7659 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
7660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7661 (eval $ac_try) 2>&5
7662 ac_status=$?
7663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7664 (exit $ac_status); }; } &&
7665 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7667 (eval $ac_try) 2>&5
7668 ac_status=$?
7669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7670 (exit $ac_status); }; }; then
956d6950
JL
7671 ac_cv_header_stdc=yes
7672else
ba479fd2
NN
7673 echo "$as_me: failed program was:" >&5
7674sed 's/^/| /' conftest.$ac_ext >&5
7675
7676ac_cv_header_stdc=no
956d6950 7677fi
86da66b5 7678rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
7679
7680if test $ac_cv_header_stdc = yes; then
7681 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 7682 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7683/* confdefs.h. */
7684_ACEOF
7685cat confdefs.h >>conftest.$ac_ext
7686cat >>conftest.$ac_ext <<_ACEOF
7687/* end confdefs.h. */
956d6950 7688#include <string.h>
ba479fd2
NN
7689
7690_ACEOF
956d6950 7691if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7692 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
7693 :
7694else
956d6950
JL
7695 ac_cv_header_stdc=no
7696fi
7697rm -f conftest*
7698
7699fi
7700
7701if test $ac_cv_header_stdc = yes; then
7702 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 7703 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7704/* confdefs.h. */
7705_ACEOF
7706cat confdefs.h >>conftest.$ac_ext
7707cat >>conftest.$ac_ext <<_ACEOF
7708/* end confdefs.h. */
956d6950 7709#include <stdlib.h>
ba479fd2
NN
7710
7711_ACEOF
956d6950 7712if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7713 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
7714 :
7715else
956d6950
JL
7716 ac_cv_header_stdc=no
7717fi
7718rm -f conftest*
7719
7720fi
7721
7722if test $ac_cv_header_stdc = yes; then
7723 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 7724 if test "$cross_compiling" = yes; then
956d6950
JL
7725 :
7726else
ba479fd2 7727 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7728/* confdefs.h. */
7729_ACEOF
7730cat confdefs.h >>conftest.$ac_ext
7731cat >>conftest.$ac_ext <<_ACEOF
7732/* end confdefs.h. */
956d6950 7733#include <ctype.h>
ba479fd2
NN
7734#if ((' ' & 0x0FF) == 0x020)
7735# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7736# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7737#else
7738# define ISLOWER(c) \
86da66b5
HPN
7739 (('a' <= (c) && (c) <= 'i') \
7740 || ('j' <= (c) && (c) <= 'r') \
7741 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
7742# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7743#endif
63cf211a 7744
ba479fd2
NN
7745#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7746int
7747main ()
7748{
7749 int i;
7750 for (i = 0; i < 256; i++)
7751 if (XOR (islower (i), ISLOWER (i))
86da66b5 7752 || toupper (i) != TOUPPER (i))
ba479fd2
NN
7753 exit(2);
7754 exit (0);
7755}
7756_ACEOF
7757rm -f conftest$ac_exeext
7758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7759 (eval $ac_link) 2>&5
7760 ac_status=$?
7761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7762 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7764 (eval $ac_try) 2>&5
7765 ac_status=$?
7766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7767 (exit $ac_status); }; }; then
956d6950
JL
7768 :
7769else
ba479fd2
NN
7770 echo "$as_me: program exited with status $ac_status" >&5
7771echo "$as_me: failed program was:" >&5
7772sed 's/^/| /' conftest.$ac_ext >&5
7773
7774( exit $ac_status )
7775ac_cv_header_stdc=no
956d6950 7776fi
86da66b5 7777rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 7778fi
956d6950
JL
7779fi
7780fi
ba479fd2
NN
7781echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7782echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 7783if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
7784
7785cat >>confdefs.h <<\_ACEOF
956d6950 7786#define STDC_HEADERS 1
ba479fd2 7787_ACEOF
956d6950
JL
7788
7789fi
7790
ba479fd2
NN
7791echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7792echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
7793if test "${ac_cv_header_time+set}" = set; then
7794 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7795else
ba479fd2 7796 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7797/* confdefs.h. */
7798_ACEOF
7799cat confdefs.h >>conftest.$ac_ext
7800cat >>conftest.$ac_ext <<_ACEOF
7801/* end confdefs.h. */
956d6950
JL
7802#include <sys/types.h>
7803#include <sys/time.h>
7804#include <time.h>
ba479fd2
NN
7805
7806int
7807main ()
7808{
7809if ((struct tm *) 0)
7810return 0;
7811 ;
7812 return 0;
7813}
7814_ACEOF
7815rm -f conftest.$ac_objext
7816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7817 (eval $ac_compile) 2>conftest.er1
ba479fd2 7818 ac_status=$?
86da66b5
HPN
7819 grep -v '^ *+' conftest.er1 >conftest.err
7820 rm -f conftest.er1
7821 cat conftest.err >&5
ba479fd2
NN
7822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7823 (exit $ac_status); } &&
b095fe2c 7824 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
7825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7826 (eval $ac_try) 2>&5
7827 ac_status=$?
7828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7829 (exit $ac_status); }; } &&
7830 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7832 (eval $ac_try) 2>&5
7833 ac_status=$?
7834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7835 (exit $ac_status); }; }; then
956d6950
JL
7836 ac_cv_header_time=yes
7837else
ba479fd2
NN
7838 echo "$as_me: failed program was:" >&5
7839sed 's/^/| /' conftest.$ac_ext >&5
7840
7841ac_cv_header_time=no
956d6950 7842fi
86da66b5 7843rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 7844fi
ba479fd2
NN
7845echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7846echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 7847if test $ac_cv_header_time = yes; then
ba479fd2
NN
7848
7849cat >>confdefs.h <<\_ACEOF
956d6950 7850#define TIME_WITH_SYS_TIME 1
ba479fd2 7851_ACEOF
956d6950
JL
7852
7853fi
7854
41e622a8
AP
7855echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
7856echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
7857if test "${gcc_cv_header_string+set}" = set; then
7858 echo $ECHO_N "(cached) $ECHO_C" >&6
7859else
7860 cat >conftest.$ac_ext <<_ACEOF
7861/* confdefs.h. */
7862_ACEOF
7863cat confdefs.h >>conftest.$ac_ext
7864cat >>conftest.$ac_ext <<_ACEOF
7865/* end confdefs.h. */
7866#include <string.h>
7867#include <strings.h>
7868int
7869main ()
7870{
7871
7872 ;
7873 return 0;
7874}
7875_ACEOF
7876rm -f conftest.$ac_objext
7877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7878 (eval $ac_compile) 2>conftest.er1
7879 ac_status=$?
7880 grep -v '^ *+' conftest.er1 >conftest.err
7881 rm -f conftest.er1
7882 cat conftest.err >&5
7883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7884 (exit $ac_status); } &&
b095fe2c 7885 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
41e622a8
AP
7886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7887 (eval $ac_try) 2>&5
7888 ac_status=$?
7889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7890 (exit $ac_status); }; } &&
7891 { ac_try='test -s conftest.$ac_objext'
7892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7893 (eval $ac_try) 2>&5
7894 ac_status=$?
7895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7896 (exit $ac_status); }; }; then
7897 gcc_cv_header_string=yes
7898else
7899 echo "$as_me: failed program was:" >&5
7900sed 's/^/| /' conftest.$ac_ext >&5
7901
7902gcc_cv_header_string=no
7903fi
7904rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7905fi
7906echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
7907echo "${ECHO_T}$gcc_cv_header_string" >&6
7908if test $gcc_cv_header_string = yes; then
7909
7910cat >>confdefs.h <<\_ACEOF
7911#define STRING_WITH_STRINGS 1
7912_ACEOF
7913
7914fi
7915
ba479fd2
NN
7916echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7917echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
7918if test "${ac_cv_header_sys_wait_h+set}" = set; then
7919 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 7920else
ba479fd2 7921 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7922/* confdefs.h. */
7923_ACEOF
7924cat confdefs.h >>conftest.$ac_ext
7925cat >>conftest.$ac_ext <<_ACEOF
7926/* end confdefs.h. */
e9831ca0
KG
7927#include <sys/types.h>
7928#include <sys/wait.h>
7929#ifndef WEXITSTATUS
ba479fd2 7930# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
7931#endif
7932#ifndef WIFEXITED
ba479fd2 7933# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 7934#endif
ba479fd2
NN
7935
7936int
7937main ()
7938{
7939 int s;
7940 wait (&s);
7941 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7942 ;
7943 return 0;
7944}
7945_ACEOF
7946rm -f conftest.$ac_objext
7947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7948 (eval $ac_compile) 2>conftest.er1
ba479fd2 7949 ac_status=$?
86da66b5
HPN
7950 grep -v '^ *+' conftest.er1 >conftest.err
7951 rm -f conftest.er1
7952 cat conftest.err >&5
ba479fd2
NN
7953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7954 (exit $ac_status); } &&
b095fe2c 7955 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
7956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7957 (eval $ac_try) 2>&5
7958 ac_status=$?
7959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7960 (exit $ac_status); }; } &&
7961 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7963 (eval $ac_try) 2>&5
7964 ac_status=$?
7965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7966 (exit $ac_status); }; }; then
e9831ca0
KG
7967 ac_cv_header_sys_wait_h=yes
7968else
ba479fd2
NN
7969 echo "$as_me: failed program was:" >&5
7970sed 's/^/| /' conftest.$ac_ext >&5
7971
7972ac_cv_header_sys_wait_h=no
e9831ca0 7973fi
86da66b5 7974rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 7975fi
ba479fd2
NN
7976echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7977echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 7978if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
7979
7980cat >>confdefs.h <<\_ACEOF
e9831ca0 7981#define HAVE_SYS_WAIT_H 1
ba479fd2 7982_ACEOF
6e3f3080 7983
63cf211a 7984fi
6e3f3080 7985
ba479fd2
NN
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
dfb77e37
KC
8007
8008for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 8009 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 8010 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 8011 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 8012do
ba479fd2 8013as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 8014echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
8015echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8016if eval "test \"\${$as_ac_Header+set}\" = set"; then
8017 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8018else
ca9bc441 8019 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8020/* confdefs.h. */
8021_ACEOF
8022cat confdefs.h >>conftest.$ac_ext
8023cat >>conftest.$ac_ext <<_ACEOF
8024/* end confdefs.h. */
8025#include <$ac_header>
8026_ACEOF
8027if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8028 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8029 ac_status=$?
8030 grep -v '^ *+' conftest.er1 >conftest.err
8031 rm -f conftest.er1
8032 cat conftest.err >&5
8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8034 (exit $ac_status); } >/dev/null; then
8035 if test -s conftest.err; then
8036 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8037 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8038 else
8039 ac_cpp_err=
8040 fi
8041else
8042 ac_cpp_err=yes
8043fi
8044if test -z "$ac_cpp_err"; then
ca9bc441 8045 eval "$as_ac_Header=yes"
ba479fd2
NN
8046else
8047 echo "$as_me: failed program was:" >&5
8048sed 's/^/| /' conftest.$ac_ext >&5
8049
ca9bc441 8050 eval "$as_ac_Header=no"
ba479fd2
NN
8051fi
8052rm -f conftest.err conftest.$ac_ext
6e3f3080 8053fi
ba479fd2
NN
8054echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8055echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
8056if test `eval echo '${'$as_ac_Header'}'` = yes; then
8057 cat >>confdefs.h <<_ACEOF
8058#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8059_ACEOF
8060
956d6950
JL
8061fi
8062done
8063
8064
f24af81b 8065# Check for thread headers.
ca9bc441 8066echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
8067echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
8068if test "${ac_cv_header_thread_h+set}" = set; then
8069 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8070else
ca9bc441 8071 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8072/* confdefs.h. */
8073_ACEOF
8074cat confdefs.h >>conftest.$ac_ext
8075cat >>conftest.$ac_ext <<_ACEOF
8076/* end confdefs.h. */
8077#include <thread.h>
8078_ACEOF
8079if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8080 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8081 ac_status=$?
8082 grep -v '^ *+' conftest.er1 >conftest.err
8083 rm -f conftest.er1
8084 cat conftest.err >&5
8085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8086 (exit $ac_status); } >/dev/null; then
8087 if test -s conftest.err; then
8088 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8089 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8090 else
8091 ac_cpp_err=
8092 fi
8093else
8094 ac_cpp_err=yes
8095fi
8096if test -z "$ac_cpp_err"; then
ca9bc441 8097 ac_cv_header_thread_h=yes
ba479fd2
NN
8098else
8099 echo "$as_me: failed program was:" >&5
8100sed 's/^/| /' conftest.$ac_ext >&5
8101
ca9bc441 8102 ac_cv_header_thread_h=no
ba479fd2
NN
8103fi
8104rm -f conftest.err conftest.$ac_ext
6e3f3080 8105fi
ba479fd2
NN
8106echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8107echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 8108if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
8109 have_thread_h=yes
8110else
ba479fd2 8111 have_thread_h=
f24af81b
TT
8112fi
8113
ca9bc441 8114echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
8115echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8116if test "${ac_cv_header_pthread_h+set}" = set; then
8117 echo $ECHO_N "(cached) $ECHO_C" >&6
f24af81b 8118else
ca9bc441 8119 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8120/* confdefs.h. */
8121_ACEOF
8122cat confdefs.h >>conftest.$ac_ext
8123cat >>conftest.$ac_ext <<_ACEOF
8124/* end confdefs.h. */
8125#include <pthread.h>
8126_ACEOF
8127if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8128 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8129 ac_status=$?
8130 grep -v '^ *+' conftest.er1 >conftest.err
8131 rm -f conftest.er1
8132 cat conftest.err >&5
8133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8134 (exit $ac_status); } >/dev/null; then
8135 if test -s conftest.err; then
8136 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8137 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8138 else
8139 ac_cpp_err=
8140 fi
8141else
8142 ac_cpp_err=yes
8143fi
8144if test -z "$ac_cpp_err"; then
ca9bc441 8145 ac_cv_header_pthread_h=yes
ba479fd2
NN
8146else
8147 echo "$as_me: failed program was:" >&5
8148sed 's/^/| /' conftest.$ac_ext >&5
8149
ca9bc441 8150 ac_cv_header_pthread_h=no
ba479fd2
NN
8151fi
8152rm -f conftest.err conftest.$ac_ext
6e3f3080 8153fi
ba479fd2
NN
8154echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8155echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 8156if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
8157 have_pthread_h=yes
8158else
ba479fd2 8159 have_pthread_h=
f24af81b
TT
8160fi
8161
8162
84c041a1 8163# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
8164echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8165echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
8166if test "${gcc_cv_decl_char_bit+set}" = set; then
8167 echo $ECHO_N "(cached) $ECHO_C" >&6
8168else
8169 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8170/* confdefs.h. */
8171_ACEOF
8172cat confdefs.h >>conftest.$ac_ext
8173cat >>conftest.$ac_ext <<_ACEOF
8174/* end confdefs.h. */
75e93faa
ZW
8175#ifdef HAVE_LIMITS_H
8176#include <limits.h>
8177#endif
8178#ifdef CHAR_BIT
8179found
8180#endif
ba479fd2 8181_ACEOF
75e93faa 8182if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8183 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
8184 gcc_cv_decl_char_bit=yes
8185else
75e93faa
ZW
8186 gcc_cv_decl_char_bit=no
8187fi
8188rm -f conftest*
8189
8190
8191fi
ba479fd2
NN
8192echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8193echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 8194if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
8195 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8196echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
8197if test "${gcc_cv_c_nbby+set}" = set; then
8198 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
8199else
8200 i=8
8201 gcc_cv_c_nbby=
8202 while test $i -lt 65; do
ba479fd2 8203 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8204/* confdefs.h. */
8205_ACEOF
8206cat confdefs.h >>conftest.$ac_ext
8207cat >>conftest.$ac_ext <<_ACEOF
8208/* end confdefs.h. */
8209
8210int
8211main ()
8212{
4e70264f
ZW
8213switch(0) {
8214 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8215 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8216 ; }
ba479fd2
NN
8217 ;
8218 return 0;
8219}
8220_ACEOF
8221rm -f conftest.$ac_objext
8222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8223 (eval $ac_compile) 2>conftest.er1
ba479fd2 8224 ac_status=$?
86da66b5
HPN
8225 grep -v '^ *+' conftest.er1 >conftest.err
8226 rm -f conftest.er1
8227 cat conftest.err >&5
ba479fd2
NN
8228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8229 (exit $ac_status); } &&
b095fe2c 8230 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8232 (eval $ac_try) 2>&5
8233 ac_status=$?
8234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8235 (exit $ac_status); }; } &&
8236 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8238 (eval $ac_try) 2>&5
8239 ac_status=$?
8240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8241 (exit $ac_status); }; }; then
4e70264f 8242 gcc_cv_c_nbby=$i; break
75e93faa 8243else
ba479fd2
NN
8244 echo "$as_me: failed program was:" >&5
8245sed 's/^/| /' conftest.$ac_ext >&5
8246
75e93faa 8247fi
86da66b5 8248rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
8249 i=`expr $i + 1`
8250 done
8251 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8252
8253fi
ba479fd2
NN
8254echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8255echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 8256if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
8257 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8258echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8259 { (exit 1); exit 1; }; }
75e93faa 8260else
ba479fd2
NN
8261
8262cat >>confdefs.h <<_ACEOF
75e93faa 8263#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 8264_ACEOF
75e93faa
ZW
8265
8266fi
8267fi
ba479fd2
NN
8268echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8269echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
8270if test "${ac_cv_c_bigendian+set}" = set; then
8271 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 8272else
4977bab6
ZW
8273 ac_cv_c_bigendian=unknown
8274# See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 8275cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8276/* confdefs.h. */
8277_ACEOF
8278cat confdefs.h >>conftest.$ac_ext
8279cat >>conftest.$ac_ext <<_ACEOF
8280/* end confdefs.h. */
4977bab6
ZW
8281#include <sys/types.h>
8282#include <sys/param.h>
ba479fd2
NN
8283int
8284main ()
8285{
2d6eb5bf 8286
4977bab6
ZW
8287#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8288 bogus endian macros
84c041a1 8289#endif
ba479fd2
NN
8290 ;
8291 return 0;
8292}
8293_ACEOF
8294rm -f conftest.$ac_objext
8295if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8296 (eval $ac_compile) 2>conftest.er1
ba479fd2 8297 ac_status=$?
86da66b5
HPN
8298 grep -v '^ *+' conftest.er1 >conftest.err
8299 rm -f conftest.er1
8300 cat conftest.err >&5
ba479fd2
NN
8301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8302 (exit $ac_status); } &&
b095fe2c 8303 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8305 (eval $ac_try) 2>&5
8306 ac_status=$?
8307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8308 (exit $ac_status); }; } &&
8309 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8311 (eval $ac_try) 2>&5
8312 ac_status=$?
8313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8314 (exit $ac_status); }; }; then
4977bab6 8315 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 8316cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8317/* confdefs.h. */
8318_ACEOF
8319cat confdefs.h >>conftest.$ac_ext
8320cat >>conftest.$ac_ext <<_ACEOF
8321/* end confdefs.h. */
4977bab6
ZW
8322#include <sys/types.h>
8323#include <sys/param.h>
ba479fd2
NN
8324int
8325main ()
8326{
4977bab6
ZW
8327
8328#if BYTE_ORDER != BIG_ENDIAN
8329 not big endian
84c041a1 8330#endif
ba479fd2
NN
8331 ;
8332 return 0;
8333}
8334_ACEOF
8335rm -f conftest.$ac_objext
8336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8337 (eval $ac_compile) 2>conftest.er1
ba479fd2 8338 ac_status=$?
86da66b5
HPN
8339 grep -v '^ *+' conftest.er1 >conftest.err
8340 rm -f conftest.er1
8341 cat conftest.err >&5
ba479fd2
NN
8342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8343 (exit $ac_status); } &&
b095fe2c 8344 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8346 (eval $ac_try) 2>&5
8347 ac_status=$?
8348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8349 (exit $ac_status); }; } &&
8350 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8352 (eval $ac_try) 2>&5
8353 ac_status=$?
8354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8355 (exit $ac_status); }; }; then
4977bab6
ZW
8356 ac_cv_c_bigendian=yes
8357else
ba479fd2
NN
8358 echo "$as_me: failed program was:" >&5
8359sed 's/^/| /' conftest.$ac_ext >&5
8360
8361ac_cv_c_bigendian=no
4977bab6 8362fi
86da66b5 8363rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8364else
ba479fd2
NN
8365 echo "$as_me: failed program was:" >&5
8366sed 's/^/| /' conftest.$ac_ext >&5
8367
4977bab6 8368fi
86da66b5 8369rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6
ZW
8370if test $ac_cv_c_bigendian = unknown; then
8371if test "$cross_compiling" = yes; then
ba479fd2
NN
8372 echo $ac_n "cross-compiling... " 2>&6
8373else
8374 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8375/* confdefs.h. */
8376_ACEOF
8377cat confdefs.h >>conftest.$ac_ext
8378cat >>conftest.$ac_ext <<_ACEOF
8379/* end confdefs.h. */
4977bab6
ZW
8380main () {
8381 /* Are we little or big endian? From Harbison&Steele. */
8382 union
8383 {
8384 long l;
8385 char c[sizeof (long)];
8386 } u;
8387 u.l = 1;
8388 exit (u.c[sizeof (long) - 1] == 1);
8389}
ba479fd2
NN
8390_ACEOF
8391rm -f conftest$ac_exeext
8392if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8393 (eval $ac_link) 2>&5
8394 ac_status=$?
8395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8396 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8398 (eval $ac_try) 2>&5
8399 ac_status=$?
8400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8401 (exit $ac_status); }; }; then
4977bab6
ZW
8402 ac_cv_c_bigendian=no
8403else
ba479fd2
NN
8404 echo "$as_me: program exited with status $ac_status" >&5
8405echo "$as_me: failed program was:" >&5
8406sed 's/^/| /' conftest.$ac_ext >&5
8407
8408( exit $ac_status )
8409ac_cv_c_bigendian=yes
4977bab6 8410fi
86da66b5 8411rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 8412fi
4977bab6
ZW
8413fi
8414fi
ba479fd2
NN
8415echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8416echo "${ECHO_T}$ac_cv_c_bigendian" >&6
4977bab6 8417if test $ac_cv_c_bigendian = unknown; then
ba479fd2
NN
8418echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
8419echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
2d6eb5bf 8420
4977bab6
ZW
8421cat >conftest.c <<EOF
8422short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8423short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8424void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
8425short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8426short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8427void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
8428int main() { _ascii (); _ebcdic (); return 0; }
8429EOF
8430 if test -f conftest.c ; then
3beb1315 8431 if ${CC-cc} ${CFLAGS} -c conftest.c -o conftest.o && test -f conftest.o ; then
4977bab6
ZW
8432 if test `grep -l BIGenDianSyS conftest.o` ; then
8433 echo $ac_n ' big endian probe OK, ' 1>&6
8434 ac_cv_c_bigendian=yes
8435 fi
8436 if test `grep -l LiTTleEnDian conftest.o` ; then
8437 echo $ac_n ' little endian probe OK, ' 1>&6
8438 if test $ac_cv_c_bigendian = yes ; then
8439 ac_cv_c_bigendian=unknown;
8440 else
8441 ac_cv_c_bigendian=no
8442 fi
8443 fi
8444 echo $ac_n 'guessing bigendian ... ' >&6
8445 fi
8446 fi
ba479fd2
NN
8447echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8448echo "${ECHO_T}$ac_cv_c_bigendian" >&6
84c041a1 8449fi
4977bab6 8450if test $ac_cv_c_bigendian = yes; then
ba479fd2
NN
8451
8452cat >>confdefs.h <<\_ACEOF
4977bab6 8453#define WORDS_BIGENDIAN 1
ba479fd2 8454_ACEOF
cafe096b 8455
ba479fd2
NN
8456
8457cat >>confdefs.h <<\_ACEOF
84c041a1 8458#define HOST_WORDS_BIG_ENDIAN 1
ba479fd2 8459_ACEOF
84c041a1 8460
4977bab6
ZW
8461 BYTEORDER=4321
8462else
8463 BYTEORDER=1234
8464fi
ba479fd2
NN
8465
8466cat >>confdefs.h <<_ACEOF
4977bab6 8467#define BYTEORDER $BYTEORDER
ba479fd2 8468_ACEOF
4977bab6
ZW
8469
8470if test $ac_cv_c_bigendian = unknown; then
3beb1315
HPN
8471 { { echo "$as_me:$LINENO: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&5
8472echo "$as_me: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&2;}
8473 { (exit 1); exit 1; }; }
84c041a1
ZW
8474fi
8475
75e93faa 8476
73458fb7
NN
8477# --------
8478# UNSORTED
8479# --------
1e608388 8480
73458fb7
NN
8481# Stage specific cflags for build.
8482stage1_cflags=
8483case $build in
8484vax-*-*)
8485 if test x$GCC = xyes
8486 then
8487 stage1_cflags="-Wa,-J"
8488 else
8489 stage1_cflags="-J"
8490 fi
8491 ;;
8492powerpc-*-darwin*)
8493 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
8494 # sources; use -no-cpp-precomp to get to GNU cpp.
8495 # Apple's GCC has bugs in designated initializer handling, so disable
8496 # that too.
8497 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
8498 ;;
8499esac
1e608388 8500
1e608388 8501
4e70264f
ZW
8502# These libraries may be used by collect2.
8503# We may need a special search path to get them linked.
ba479fd2
NN
8504echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8505echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
8506if test "${gcc_cv_collect2_libs+set}" = set; then
8507 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
8508else
8509 save_LIBS="$LIBS"
7f2749d4 8510for libs in '' -lld -lmld \
4e70264f
ZW
8511 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8512 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8513do
8514 LIBS="$libs"
ba479fd2 8515 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8516/* confdefs.h. */
8517_ACEOF
8518cat confdefs.h >>conftest.$ac_ext
8519cat >>conftest.$ac_ext <<_ACEOF
8520/* end confdefs.h. */
8521
4e70264f 8522/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8523#ifdef __cplusplus
8524extern "C"
8525#endif
4e70264f 8526/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8527 builtin and then its argument prototype would still apply. */
8528char ldopen ();
8529int
8530main ()
8531{
8532ldopen ();
8533 ;
8534 return 0;
8535}
8536_ACEOF
8537rm -f conftest.$ac_objext conftest$ac_exeext
8538if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8539 (eval $ac_link) 2>conftest.er1
ba479fd2 8540 ac_status=$?
86da66b5
HPN
8541 grep -v '^ *+' conftest.er1 >conftest.err
8542 rm -f conftest.er1
8543 cat conftest.err >&5
ba479fd2
NN
8544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8545 (exit $ac_status); } &&
b095fe2c 8546 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8548 (eval $ac_try) 2>&5
8549 ac_status=$?
8550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8551 (exit $ac_status); }; } &&
8552 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8554 (eval $ac_try) 2>&5
8555 ac_status=$?
8556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8557 (exit $ac_status); }; }; then
4e70264f
ZW
8558 gcc_cv_collect2_libs="$libs"; break
8559else
ba479fd2
NN
8560 echo "$as_me: failed program was:" >&5
8561sed 's/^/| /' conftest.$ac_ext >&5
8562
4e70264f 8563fi
86da66b5
HPN
8564rm -f conftest.err conftest.$ac_objext \
8565 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8566done
8567LIBS="$save_LIBS"
8568test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8569fi
ba479fd2
NN
8570echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8571echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
8572case $gcc_cv_collect2_libs in
8573 "none required") ;;
8574 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8575esac
8576
8577
7f2749d4
RK
8578# When building Ada code on Alpha, we need exc_resume which is usually in
8579# -lexc. So test for it.
8580save_LIBS="$LIBS"
8581LIBS=
ba479fd2
NN
8582echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8583echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
8584if test "${ac_cv_search_exc_resume+set}" = set; then
8585 echo $ECHO_N "(cached) $ECHO_C" >&6
8586else
8587 ac_func_search_save_LIBS=$LIBS
8588ac_cv_search_exc_resume=no
8589cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8590/* confdefs.h. */
8591_ACEOF
8592cat confdefs.h >>conftest.$ac_ext
8593cat >>conftest.$ac_ext <<_ACEOF
8594/* end confdefs.h. */
7f2749d4 8595
7f2749d4 8596/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8597#ifdef __cplusplus
8598extern "C"
8599#endif
7f2749d4 8600/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8601 builtin and then its argument prototype would still apply. */
8602char exc_resume ();
8603int
8604main ()
8605{
8606exc_resume ();
8607 ;
8608 return 0;
8609}
8610_ACEOF
8611rm -f conftest.$ac_objext conftest$ac_exeext
8612if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8613 (eval $ac_link) 2>conftest.er1
ba479fd2 8614 ac_status=$?
86da66b5
HPN
8615 grep -v '^ *+' conftest.er1 >conftest.err
8616 rm -f conftest.er1
8617 cat conftest.err >&5
ba479fd2
NN
8618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8619 (exit $ac_status); } &&
b095fe2c 8620 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8622 (eval $ac_try) 2>&5
8623 ac_status=$?
8624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8625 (exit $ac_status); }; } &&
8626 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8628 (eval $ac_try) 2>&5
8629 ac_status=$?
8630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8631 (exit $ac_status); }; }; then
7f2749d4
RK
8632 ac_cv_search_exc_resume="none required"
8633else
ba479fd2
NN
8634 echo "$as_me: failed program was:" >&5
8635sed 's/^/| /' conftest.$ac_ext >&5
8636
7f2749d4 8637fi
86da66b5
HPN
8638rm -f conftest.err conftest.$ac_objext \
8639 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8640if test "$ac_cv_search_exc_resume" = no; then
8641 for ac_lib in exc; do
8642 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8643 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8644/* confdefs.h. */
8645_ACEOF
8646cat confdefs.h >>conftest.$ac_ext
8647cat >>conftest.$ac_ext <<_ACEOF
8648/* end confdefs.h. */
8649
7f2749d4 8650/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8651#ifdef __cplusplus
8652extern "C"
8653#endif
7f2749d4 8654/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8655 builtin and then its argument prototype would still apply. */
8656char exc_resume ();
8657int
8658main ()
8659{
8660exc_resume ();
8661 ;
8662 return 0;
8663}
8664_ACEOF
8665rm -f conftest.$ac_objext conftest$ac_exeext
8666if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8667 (eval $ac_link) 2>conftest.er1
ba479fd2 8668 ac_status=$?
86da66b5
HPN
8669 grep -v '^ *+' conftest.er1 >conftest.err
8670 rm -f conftest.er1
8671 cat conftest.err >&5
ba479fd2
NN
8672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8673 (exit $ac_status); } &&
b095fe2c 8674 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8676 (eval $ac_try) 2>&5
8677 ac_status=$?
8678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8679 (exit $ac_status); }; } &&
8680 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8682 (eval $ac_try) 2>&5
8683 ac_status=$?
8684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8685 (exit $ac_status); }; }; then
8686 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
8687break
8688else
ba479fd2
NN
8689 echo "$as_me: failed program was:" >&5
8690sed 's/^/| /' conftest.$ac_ext >&5
8691
cafe096b 8692fi
86da66b5
HPN
8693rm -f conftest.err conftest.$ac_objext \
8694 conftest$ac_exeext conftest.$ac_ext
ba479fd2 8695 done
6e3f3080 8696fi
ba479fd2
NN
8697LIBS=$ac_func_search_save_LIBS
8698fi
8699echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
8700echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
8701if test "$ac_cv_search_exc_resume" != no; then
63cf211a 8702 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 8703
7f2749d4 8704fi
ba479fd2 8705
7f2749d4
RK
8706GNAT_LIBEXC="$LIBS"
8707LIBS="$save_LIBS"
8708
8709
62c9aa5f
ZW
8710# Some systems put ldexp and frexp in libm instead of libc; assume
8711# they're both in the same place. jcf-dump needs them.
8712save_LIBS="$LIBS"
8713LIBS=
ba479fd2
NN
8714echo "$as_me:$LINENO: checking for library containing ldexp" >&5
8715echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
8716if test "${ac_cv_search_ldexp+set}" = set; then
8717 echo $ECHO_N "(cached) $ECHO_C" >&6
8718else
8719 ac_func_search_save_LIBS=$LIBS
8720ac_cv_search_ldexp=no
8721cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8722/* confdefs.h. */
8723_ACEOF
8724cat confdefs.h >>conftest.$ac_ext
8725cat >>conftest.$ac_ext <<_ACEOF
8726/* end confdefs.h. */
62c9aa5f 8727
62c9aa5f 8728/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8729#ifdef __cplusplus
8730extern "C"
8731#endif
62c9aa5f 8732/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8733 builtin and then its argument prototype would still apply. */
8734char ldexp ();
8735int
8736main ()
8737{
8738ldexp ();
8739 ;
8740 return 0;
8741}
8742_ACEOF
8743rm -f conftest.$ac_objext conftest$ac_exeext
8744if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8745 (eval $ac_link) 2>conftest.er1
ba479fd2 8746 ac_status=$?
86da66b5
HPN
8747 grep -v '^ *+' conftest.er1 >conftest.err
8748 rm -f conftest.er1
8749 cat conftest.err >&5
ba479fd2
NN
8750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8751 (exit $ac_status); } &&
b095fe2c 8752 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8754 (eval $ac_try) 2>&5
8755 ac_status=$?
8756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8757 (exit $ac_status); }; } &&
8758 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8760 (eval $ac_try) 2>&5
8761 ac_status=$?
8762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8763 (exit $ac_status); }; }; then
62c9aa5f
ZW
8764 ac_cv_search_ldexp="none required"
8765else
ba479fd2
NN
8766 echo "$as_me: failed program was:" >&5
8767sed 's/^/| /' conftest.$ac_ext >&5
8768
62c9aa5f 8769fi
86da66b5
HPN
8770rm -f conftest.err conftest.$ac_objext \
8771 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8772if test "$ac_cv_search_ldexp" = no; then
8773 for ac_lib in m; do
8774 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8775 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8776/* confdefs.h. */
8777_ACEOF
8778cat confdefs.h >>conftest.$ac_ext
8779cat >>conftest.$ac_ext <<_ACEOF
8780/* end confdefs.h. */
8781
62c9aa5f 8782/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8783#ifdef __cplusplus
8784extern "C"
8785#endif
62c9aa5f 8786/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8787 builtin and then its argument prototype would still apply. */
8788char ldexp ();
8789int
8790main ()
8791{
8792ldexp ();
8793 ;
8794 return 0;
8795}
8796_ACEOF
8797rm -f conftest.$ac_objext conftest$ac_exeext
8798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8799 (eval $ac_link) 2>conftest.er1
ba479fd2 8800 ac_status=$?
86da66b5
HPN
8801 grep -v '^ *+' conftest.er1 >conftest.err
8802 rm -f conftest.er1
8803 cat conftest.err >&5
ba479fd2
NN
8804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8805 (exit $ac_status); } &&
b095fe2c 8806 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8808 (eval $ac_try) 2>&5
8809 ac_status=$?
8810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8811 (exit $ac_status); }; } &&
8812 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8814 (eval $ac_try) 2>&5
8815 ac_status=$?
8816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8817 (exit $ac_status); }; }; then
8818 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
8819break
8820else
ba479fd2
NN
8821 echo "$as_me: failed program was:" >&5
8822sed 's/^/| /' conftest.$ac_ext >&5
8823
cafe096b 8824fi
86da66b5
HPN
8825rm -f conftest.err conftest.$ac_objext \
8826 conftest$ac_exeext conftest.$ac_ext
ba479fd2 8827 done
6e3f3080 8828fi
ba479fd2
NN
8829LIBS=$ac_func_search_save_LIBS
8830fi
8831echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
8832echo "${ECHO_T}$ac_cv_search_ldexp" >&6
8833if test "$ac_cv_search_ldexp" != no; then
63cf211a 8834 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 8835
62c9aa5f 8836fi
ba479fd2 8837
62c9aa5f
ZW
8838LDEXP_LIB="$LIBS"
8839LIBS="$save_LIBS"
8840
8841
956d6950
JL
8842# Use <inttypes.h> only if it exists,
8843# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
8844echo "$as_me:$LINENO: checking for inttypes.h" >&5
8845echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
8846if test "${gcc_cv_header_inttypes_h+set}" = set; then
8847 echo $ECHO_N "(cached) $ECHO_C" >&6
8848else
8849 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8850/* confdefs.h. */
8851_ACEOF
8852cat confdefs.h >>conftest.$ac_ext
8853cat >>conftest.$ac_ext <<_ACEOF
8854/* end confdefs.h. */
956d6950
JL
8855#include <sys/types.h>
8856#include <inttypes.h>
ba479fd2
NN
8857int
8858main ()
8859{
956d6950 8860intmax_t i = -1;
ba479fd2
NN
8861 ;
8862 return 0;
8863}
8864_ACEOF
8865rm -f conftest.$ac_objext
8866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8867 (eval $ac_compile) 2>conftest.er1
ba479fd2 8868 ac_status=$?
86da66b5
HPN
8869 grep -v '^ *+' conftest.er1 >conftest.err
8870 rm -f conftest.er1
8871 cat conftest.err >&5
ba479fd2
NN
8872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8873 (exit $ac_status); } &&
b095fe2c 8874 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
8875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8876 (eval $ac_try) 2>&5
8877 ac_status=$?
8878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8879 (exit $ac_status); }; } &&
8880 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8882 (eval $ac_try) 2>&5
8883 ac_status=$?
8884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8885 (exit $ac_status); }; }; then
0056a9b5 8886 gcc_cv_header_inttypes_h=yes
956d6950 8887else
ba479fd2
NN
8888 echo "$as_me: failed program was:" >&5
8889sed 's/^/| /' conftest.$ac_ext >&5
8890
8891gcc_cv_header_inttypes_h=no
956d6950 8892fi
86da66b5 8893rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
8894fi
8895
ba479fd2
NN
8896echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
8897echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 8898if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
8899
8900cat >>confdefs.h <<\_ACEOF
0056a9b5 8901#define HAVE_INTTYPES_H 1
ba479fd2 8902_ACEOF
0056a9b5
KG
8903
8904fi
956d6950 8905
c149cc37 8906
ba479fd2
NN
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
6af8c740
KG
8932for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
8933 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
4e87a651 8934 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
56694dd9
ZW
8935 scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \
8936 setlocale
956d6950 8937do
ba479fd2
NN
8938as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8939echo "$as_me:$LINENO: checking for $ac_func" >&5
8940echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8941if eval "test \"\${$as_ac_var+set}\" = set"; then
8942 echo $ECHO_N "(cached) $ECHO_C" >&6
8943else
8944 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8945/* confdefs.h. */
8946_ACEOF
8947cat confdefs.h >>conftest.$ac_ext
8948cat >>conftest.$ac_ext <<_ACEOF
8949/* end confdefs.h. */
86da66b5
HPN
8950/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8951 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8952#define $ac_func innocuous_$ac_func
8953
956d6950 8954/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
8955 which can conflict with char $ac_func (); below.
8956 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8957 <limits.h> exists even on freestanding compilers. */
86da66b5 8958
ba479fd2
NN
8959#ifdef __STDC__
8960# include <limits.h>
8961#else
8962# include <assert.h>
8963#endif
86da66b5
HPN
8964
8965#undef $ac_func
8966
6e3f3080 8967/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8968#ifdef __cplusplus
8969extern "C"
8970{
8971#endif
6e3f3080 8972/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8973 builtin and then its argument prototype would still apply. */
8974char $ac_func ();
956d6950
JL
8975/* The GNU C library defines this for functions which it implements
8976 to always fail with ENOSYS. Some functions are actually named
8977 something starting with __ and the normal name is an alias. */
8978#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8979choke me
8980#else
ba479fd2
NN
8981char (*f) () = $ac_func;
8982#endif
8983#ifdef __cplusplus
8984}
956d6950
JL
8985#endif
8986
ba479fd2
NN
8987int
8988main ()
8989{
8990return f != $ac_func;
8991 ;
8992 return 0;
8993}
8994_ACEOF
8995rm -f conftest.$ac_objext conftest$ac_exeext
8996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8997 (eval $ac_link) 2>conftest.er1
ba479fd2 8998 ac_status=$?
86da66b5
HPN
8999 grep -v '^ *+' conftest.er1 >conftest.err
9000 rm -f conftest.er1
9001 cat conftest.err >&5
ba479fd2
NN
9002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9003 (exit $ac_status); } &&
b095fe2c 9004 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9006 (eval $ac_try) 2>&5
9007 ac_status=$?
9008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9009 (exit $ac_status); }; } &&
9010 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9012 (eval $ac_try) 2>&5
9013 ac_status=$?
9014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9015 (exit $ac_status); }; }; then
9016 eval "$as_ac_var=yes"
9017else
9018 echo "$as_me: failed program was:" >&5
9019sed 's/^/| /' conftest.$ac_ext >&5
9020
9021eval "$as_ac_var=no"
9022fi
86da66b5
HPN
9023rm -f conftest.err conftest.$ac_objext \
9024 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9025fi
9026echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9027echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9028if test `eval echo '${'$as_ac_var'}'` = yes; then
9029 cat >>confdefs.h <<_ACEOF
9030#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9031_ACEOF
956d6950 9032
956d6950
JL
9033fi
9034done
9035
6885fc87 9036
39f6c4c8 9037if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
9038 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9039echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
9040if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9041 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9042else
9043 if test "$cross_compiling" = yes; then
9044 gcc_cv_func_mbstowcs_works=yes
9045else
ba479fd2 9046 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9047/* confdefs.h. */
9048_ACEOF
9049cat confdefs.h >>conftest.$ac_ext
9050cat >>conftest.$ac_ext <<_ACEOF
9051/* end confdefs.h. */
39f6c4c8
KW
9052#include <stdlib.h>
9053int main()
9054{
9055 mbstowcs(0, "", 0);
9056 return 0;
9057}
ba479fd2
NN
9058_ACEOF
9059rm -f conftest$ac_exeext
9060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9061 (eval $ac_link) 2>&5
9062 ac_status=$?
9063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9066 (eval $ac_try) 2>&5
9067 ac_status=$?
9068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9069 (exit $ac_status); }; }; then
39f6c4c8
KW
9070 gcc_cv_func_mbstowcs_works=yes
9071else
ba479fd2
NN
9072 echo "$as_me: program exited with status $ac_status" >&5
9073echo "$as_me: failed program was:" >&5
9074sed 's/^/| /' conftest.$ac_ext >&5
9075
9076( exit $ac_status )
9077gcc_cv_func_mbstowcs_works=no
39f6c4c8 9078fi
86da66b5 9079rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 9080fi
39f6c4c8 9081fi
ba479fd2
NN
9082echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9083echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 9084 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
9085
9086cat >>confdefs.h <<\_ACEOF
39f6c4c8 9087#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 9088_ACEOF
39f6c4c8
KW
9089
9090 fi
9091fi
9092
ba479fd2
NN
9093echo "$as_me:$LINENO: checking for ssize_t" >&5
9094echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
9095if test "${ac_cv_type_ssize_t+set}" = set; then
9096 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 9097else
ba479fd2 9098 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9099/* confdefs.h. */
9100_ACEOF
9101cat confdefs.h >>conftest.$ac_ext
9102cat >>conftest.$ac_ext <<_ACEOF
9103/* end confdefs.h. */
8b4fc07a
NN
9104$ac_includes_default
9105int
9106main ()
9107{
9108if ((ssize_t *) 0)
9109 return 0;
9110if (sizeof (ssize_t))
9111 return 0;
9112 ;
9113 return 0;
9114}
ba479fd2 9115_ACEOF
8b4fc07a
NN
9116rm -f conftest.$ac_objext
9117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9118 (eval $ac_compile) 2>conftest.er1
8b4fc07a 9119 ac_status=$?
86da66b5
HPN
9120 grep -v '^ *+' conftest.er1 >conftest.err
9121 rm -f conftest.er1
9122 cat conftest.err >&5
8b4fc07a
NN
9123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9124 (exit $ac_status); } &&
b095fe2c 9125 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9127 (eval $ac_try) 2>&5
9128 ac_status=$?
9129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9130 (exit $ac_status); }; } &&
9131 { ac_try='test -s conftest.$ac_objext'
8b4fc07a
NN
9132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9133 (eval $ac_try) 2>&5
9134 ac_status=$?
9135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9136 (exit $ac_status); }; }; then
cb65112a 9137 ac_cv_type_ssize_t=yes
f12bc141 9138else
8b4fc07a
NN
9139 echo "$as_me: failed program was:" >&5
9140sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9141
8b4fc07a
NN
9142ac_cv_type_ssize_t=no
9143fi
86da66b5 9144rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9145fi
ba479fd2
NN
9146echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9147echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
9148if test $ac_cv_type_ssize_t = yes; then
9149 :
9150else
ba479fd2 9151
8b4fc07a 9152cat >>confdefs.h <<_ACEOF
f12bc141 9153#define ssize_t int
ba479fd2 9154_ACEOF
f12bc141
ZW
9155
9156fi
9157
0b9d02c6 9158
e256b8b6
DA
9159# Try to determine the array type of the second argument of getgroups
9160# for the target system (int or gid_t).
ba479fd2
NN
9161echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9162echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
9163if test "${ac_cv_type_uid_t+set}" = set; then
9164 echo $ECHO_N "(cached) $ECHO_C" >&6
9165else
9166 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9167/* confdefs.h. */
9168_ACEOF
9169cat confdefs.h >>conftest.$ac_ext
9170cat >>conftest.$ac_ext <<_ACEOF
9171/* end confdefs.h. */
e256b8b6 9172#include <sys/types.h>
ba479fd2
NN
9173
9174_ACEOF
e256b8b6 9175if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9176 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
9177 ac_cv_type_uid_t=yes
9178else
e256b8b6
DA
9179 ac_cv_type_uid_t=no
9180fi
9181rm -f conftest*
9182
9183fi
ba479fd2
NN
9184echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9185echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 9186if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
9187
9188cat >>confdefs.h <<\_ACEOF
e256b8b6 9189#define uid_t int
ba479fd2 9190_ACEOF
cafe096b 9191
ba479fd2
NN
9192
9193cat >>confdefs.h <<\_ACEOF
e256b8b6 9194#define gid_t int
ba479fd2 9195_ACEOF
e256b8b6
DA
9196
9197fi
9198
ba479fd2
NN
9199echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9200echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
9201if test "${ac_cv_type_getgroups+set}" = set; then
9202 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
9203else
9204 if test "$cross_compiling" = yes; then
9205 ac_cv_type_getgroups=cross
9206else
ba479fd2 9207 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9208/* confdefs.h. */
9209_ACEOF
9210cat confdefs.h >>conftest.$ac_ext
9211cat >>conftest.$ac_ext <<_ACEOF
9212/* end confdefs.h. */
e256b8b6
DA
9213/* Thanks to Mike Rendell for this test. */
9214#include <sys/types.h>
9215#define NGID 256
9216#undef MAX
9217#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
9218
9219int
9220main ()
e256b8b6
DA
9221{
9222 gid_t gidset[NGID];
9223 int i, n;
9224 union { gid_t gval; long lval; } val;
9225
9226 val.lval = -1;
9227 for (i = 0; i < NGID; i++)
9228 gidset[i] = val.gval;
9229 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 9230 gidset);
e256b8b6
DA
9231 /* Exit non-zero if getgroups seems to require an array of ints. This
9232 happens when gid_t is short but getgroups modifies an array of ints. */
9233 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 9234}
ba479fd2
NN
9235_ACEOF
9236rm -f conftest$ac_exeext
9237if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9238 (eval $ac_link) 2>&5
9239 ac_status=$?
9240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9241 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9243 (eval $ac_try) 2>&5
9244 ac_status=$?
9245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9246 (exit $ac_status); }; }; then
9247 ac_cv_type_getgroups=gid_t
63cf211a 9248else
ba479fd2
NN
9249 echo "$as_me: program exited with status $ac_status" >&5
9250echo "$as_me: failed program was:" >&5
9251sed 's/^/| /' conftest.$ac_ext >&5
9252
9253( exit $ac_status )
9254ac_cv_type_getgroups=int
e256b8b6 9255fi
86da66b5 9256rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 9257fi
e256b8b6 9258if test $ac_cv_type_getgroups = cross; then
ba479fd2 9259 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9260/* confdefs.h. */
9261_ACEOF
9262cat confdefs.h >>conftest.$ac_ext
9263cat >>conftest.$ac_ext <<_ACEOF
9264/* end confdefs.h. */
e256b8b6 9265#include <unistd.h>
ba479fd2
NN
9266
9267_ACEOF
e256b8b6 9268if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9269 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
9270 ac_cv_type_getgroups=gid_t
9271else
e256b8b6
DA
9272 ac_cv_type_getgroups=int
9273fi
9274rm -f conftest*
9275
9276fi
9277fi
ba479fd2
NN
9278echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9279echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 9280
ba479fd2 9281cat >>confdefs.h <<_ACEOF
e256b8b6 9282#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 9283_ACEOF
e256b8b6
DA
9284
9285
9286if test "${target}" = "${build}"; then
9287 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9288else
9289 case "${target}" in
9290 # This condition may need some tweaking. It should include all
9291 # targets where the array type of the second argument of getgroups
9292 # is int and the type of gid_t is not equivalent to int.
9293 *-*-sunos* | *-*-ultrix*)
9294 TARGET_GETGROUPS_T=int
9295 ;;
9296 *)
9297 TARGET_GETGROUPS_T=gid_t
9298 ;;
9299 esac
9300fi
9301
9302
ba479fd2
NN
9303echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5
9304echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6
9305if test "${gcc_cv_func_printf_ptr+set}" = set; then
9306 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
9307else
9308 if test "$cross_compiling" = yes; then
9309 gcc_cv_func_printf_ptr=no
9310else
ba479fd2 9311 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9312/* confdefs.h. */
9313_ACEOF
9314cat confdefs.h >>conftest.$ac_ext
9315cat >>conftest.$ac_ext <<_ACEOF
9316/* end confdefs.h. */
0a4b6309
RL
9317#include <stdio.h>
9318
86cf1cbd 9319int main()
0a4b6309
RL
9320{
9321 char buf[64];
9322 char *p = buf, *q = NULL;
9323 sprintf(buf, "%p", p);
9324 sscanf(buf, "%p", &q);
86cf1cbd 9325 return (p != q);
0a4b6309 9326}
ba479fd2
NN
9327_ACEOF
9328rm -f conftest$ac_exeext
9329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9330 (eval $ac_link) 2>&5
9331 ac_status=$?
9332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9333 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9335 (eval $ac_try) 2>&5
9336 ac_status=$?
9337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9338 (exit $ac_status); }; }; then
0a4b6309
RL
9339 gcc_cv_func_printf_ptr=yes
9340else
ba479fd2
NN
9341 echo "$as_me: program exited with status $ac_status" >&5
9342echo "$as_me: failed program was:" >&5
9343sed 's/^/| /' conftest.$ac_ext >&5
9344
9345( exit $ac_status )
9346gcc_cv_func_printf_ptr=no
0a4b6309 9347fi
86da66b5 9348rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0a4b6309 9349fi
0a4b6309
RL
9350rm -f core core.* *.core
9351fi
ba479fd2
NN
9352echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5
9353echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6
63cf211a 9354if test $gcc_cv_func_printf_ptr = yes ; then
ba479fd2
NN
9355
9356cat >>confdefs.h <<\_ACEOF
0a4b6309 9357#define HAVE_PRINTF_PTR 1
ba479fd2 9358_ACEOF
0a4b6309
RL
9359
9360fi
9361
3b0727a0
MR
9362
9363echo "$as_me:$LINENO: checking for sys/mman.h" >&5
9364echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
9365if test "${ac_cv_header_sys_mman_h+set}" = set; then
9366 echo $ECHO_N "(cached) $ECHO_C" >&6
9367else
9368 cat >conftest.$ac_ext <<_ACEOF
9369/* confdefs.h. */
9370_ACEOF
9371cat confdefs.h >>conftest.$ac_ext
9372cat >>conftest.$ac_ext <<_ACEOF
9373/* end confdefs.h. */
9374#include <sys/mman.h>
9375_ACEOF
9376if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9377 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9378 ac_status=$?
9379 grep -v '^ *+' conftest.er1 >conftest.err
9380 rm -f conftest.er1
9381 cat conftest.err >&5
9382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9383 (exit $ac_status); } >/dev/null; then
9384 if test -s conftest.err; then
9385 ac_cpp_err=$ac_c_preproc_warn_flag
9386 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9387 else
9388 ac_cpp_err=
9389 fi
9390else
9391 ac_cpp_err=yes
9392fi
9393if test -z "$ac_cpp_err"; then
9394 ac_cv_header_sys_mman_h=yes
9395else
9396 echo "$as_me: failed program was:" >&5
9397sed 's/^/| /' conftest.$ac_ext >&5
9398
9399 ac_cv_header_sys_mman_h=no
9400fi
9401rm -f conftest.err conftest.$ac_ext
9402fi
9403echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9404echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
9405if test $ac_cv_header_sys_mman_h = yes; then
9406 gcc_header_sys_mman_h=yes
9407else
9408 gcc_header_sys_mman_h=no
9409fi
9410
9411echo "$as_me:$LINENO: checking for mmap" >&5
9412echo $ECHO_N "checking for mmap... $ECHO_C" >&6
9413if test "${ac_cv_func_mmap+set}" = set; then
9414 echo $ECHO_N "(cached) $ECHO_C" >&6
9415else
9416 cat >conftest.$ac_ext <<_ACEOF
9417/* confdefs.h. */
9418_ACEOF
9419cat confdefs.h >>conftest.$ac_ext
9420cat >>conftest.$ac_ext <<_ACEOF
9421/* end confdefs.h. */
9422/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9423 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9424#define mmap innocuous_mmap
9425
9426/* System header to define __stub macros and hopefully few prototypes,
9427 which can conflict with char mmap (); below.
9428 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9429 <limits.h> exists even on freestanding compilers. */
9430
9431#ifdef __STDC__
9432# include <limits.h>
9433#else
9434# include <assert.h>
9435#endif
9436
9437#undef mmap
9438
9439/* Override any gcc2 internal prototype to avoid an error. */
9440#ifdef __cplusplus
9441extern "C"
9442{
9443#endif
9444/* We use char because int might match the return type of a gcc2
9445 builtin and then its argument prototype would still apply. */
9446char mmap ();
9447/* The GNU C library defines this for functions which it implements
9448 to always fail with ENOSYS. Some functions are actually named
9449 something starting with __ and the normal name is an alias. */
9450#if defined (__stub_mmap) || defined (__stub___mmap)
9451choke me
9452#else
9453char (*f) () = mmap;
9454#endif
9455#ifdef __cplusplus
9456}
9457#endif
9458
9459int
9460main ()
9461{
9462return f != mmap;
9463 ;
9464 return 0;
9465}
9466_ACEOF
9467rm -f conftest.$ac_objext conftest$ac_exeext
9468if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9469 (eval $ac_link) 2>conftest.er1
9470 ac_status=$?
9471 grep -v '^ *+' conftest.er1 >conftest.err
9472 rm -f conftest.er1
9473 cat conftest.err >&5
9474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9475 (exit $ac_status); } &&
b095fe2c 9476 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3b0727a0
MR
9477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9478 (eval $ac_try) 2>&5
9479 ac_status=$?
9480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9481 (exit $ac_status); }; } &&
9482 { ac_try='test -s conftest$ac_exeext'
9483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9484 (eval $ac_try) 2>&5
9485 ac_status=$?
9486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9487 (exit $ac_status); }; }; then
9488 ac_cv_func_mmap=yes
9489else
9490 echo "$as_me: failed program was:" >&5
9491sed 's/^/| /' conftest.$ac_ext >&5
9492
9493ac_cv_func_mmap=no
9494fi
9495rm -f conftest.err conftest.$ac_objext \
9496 conftest$ac_exeext conftest.$ac_ext
9497fi
9498echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9499echo "${ECHO_T}$ac_cv_func_mmap" >&6
9500if test $ac_cv_func_mmap = yes; then
9501 gcc_func_mmap=yes
9502else
9503 gcc_func_mmap=no
9504fi
9505
9506if test "$gcc_header_sys_mman_h" != yes \
9507 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
9508 gcc_cv_func_mmap_file=no
9509 gcc_cv_func_mmap_dev_zero=no
9510 gcc_cv_func_mmap_anon=no
9511else
ba479fd2
NN
9512 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9513echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
9514if test "${gcc_cv_func_mmap_file+set}" = set; then
9515 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 9516else
ba479fd2 9517 # Add a system to this blacklist if
1072ec3f
ZW
9518 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9519 # memory area containing the same data that you'd get if you applied
9520 # read() to the same fd. The only system known to have a problem here
9521 # is VMS, where text files have record structure.
9522 case "$host_os" in
ba479fd2 9523 vms* | ultrix*)
1072ec3f
ZW
9524 gcc_cv_func_mmap_file=no ;;
9525 *)
9526 gcc_cv_func_mmap_file=yes;;
9527 esac
9528fi
ba479fd2
NN
9529echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9530echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9531 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9532echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
9533if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9534 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9535else
9536 # Add a system to this blacklist if it has mmap() but /dev/zero
9537 # does not exist, or if mmapping /dev/zero does not give anonymous
9538 # zeroed pages with both the following properties:
9539 # 1. If you map N consecutive pages in with one call, and then
9540 # unmap any subset of those pages, the pages that were not
9541 # explicitly unmapped remain accessible.
9542 # 2. If you map two adjacent blocks of memory and then unmap them
9543 # both at once, they must both go away.
9544 # Systems known to be in this category are Windows (all variants),
9545 # VMS, and Darwin.
9546 case "$host_os" in
2ce240d3 9547 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
9548 gcc_cv_func_mmap_dev_zero=no ;;
9549 *)
9550 gcc_cv_func_mmap_dev_zero=yes;;
9551 esac
9552fi
ba479fd2
NN
9553echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9554echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
9555
9556 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
9557 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9558echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
9559if test "${gcc_cv_decl_map_anon+set}" = set; then
9560 echo $ECHO_N "(cached) $ECHO_C" >&6
9561else
9562 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9563/* confdefs.h. */
9564_ACEOF
9565cat confdefs.h >>conftest.$ac_ext
9566cat >>conftest.$ac_ext <<_ACEOF
9567/* end confdefs.h. */
1072ec3f
ZW
9568#include <sys/types.h>
9569#include <sys/mman.h>
9570#include <unistd.h>
9571
9572#ifndef MAP_ANONYMOUS
9573#define MAP_ANONYMOUS MAP_ANON
9574#endif
9575
ba479fd2
NN
9576int
9577main ()
9578{
1072ec3f 9579int n = MAP_ANONYMOUS;
ba479fd2
NN
9580 ;
9581 return 0;
9582}
9583_ACEOF
9584rm -f conftest.$ac_objext
9585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9586 (eval $ac_compile) 2>conftest.er1
ba479fd2 9587 ac_status=$?
86da66b5
HPN
9588 grep -v '^ *+' conftest.er1 >conftest.err
9589 rm -f conftest.er1
9590 cat conftest.err >&5
ba479fd2
NN
9591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9592 (exit $ac_status); } &&
b095fe2c 9593 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9595 (eval $ac_try) 2>&5
9596 ac_status=$?
9597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9598 (exit $ac_status); }; } &&
9599 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9601 (eval $ac_try) 2>&5
9602 ac_status=$?
9603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9604 (exit $ac_status); }; }; then
1072ec3f
ZW
9605 gcc_cv_decl_map_anon=yes
9606else
ba479fd2
NN
9607 echo "$as_me: failed program was:" >&5
9608sed 's/^/| /' conftest.$ac_ext >&5
9609
9610gcc_cv_decl_map_anon=no
1072ec3f 9611fi
86da66b5 9612rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 9613fi
ba479fd2
NN
9614echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9615echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
9616
9617 if test $gcc_cv_decl_map_anon = no; then
9618 gcc_cv_func_mmap_anon=no
9619 else
ba479fd2
NN
9620 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9621echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
9622if test "${gcc_cv_func_mmap_anon+set}" = set; then
9623 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9624else
9625 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9626 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9627 # doesn't give anonymous zeroed pages with the same properties listed
9628 # above for use of /dev/zero.
9629 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9630 case "$host_os" in
9631 vms* | cygwin* | pe | mingw* | sco* | udk* )
9632 gcc_cv_func_mmap_anon=no ;;
9633 *)
9634 gcc_cv_func_mmap_anon=yes;;
9635 esac
9636fi
ba479fd2
NN
9637echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9638echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
9639 fi
9640fi
9641
9642if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
9643
9644cat >>confdefs.h <<\_ACEOF
1072ec3f 9645#define HAVE_MMAP_FILE 1
ba479fd2 9646_ACEOF
1072ec3f
ZW
9647
9648fi
9649if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
9650
9651cat >>confdefs.h <<\_ACEOF
1072ec3f 9652#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 9653_ACEOF
1072ec3f
ZW
9654
9655fi
9656if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
9657
9658cat >>confdefs.h <<\_ACEOF
1072ec3f 9659#define HAVE_MMAP_ANON 1
ba479fd2 9660_ACEOF
1072ec3f
ZW
9661
9662fi
9663
b27d2bd5
MK
9664
9665case "${host}" in
ee262b6f 9666*-*-*vms*)
ba479fd2 9667 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
9668 # won't work, and it isn't easily adaptable. It makes more sense to
9669 # just force it.
9670 ac_cv_func_vfork_works=yes
9671 ;;
b27d2bd5 9672esac
ba479fd2
NN
9673echo "$as_me:$LINENO: checking for pid_t" >&5
9674echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
9675if test "${ac_cv_type_pid_t+set}" = set; then
9676 echo $ECHO_N "(cached) $ECHO_C" >&6
9677else
9678 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9679/* confdefs.h. */
9680_ACEOF
9681cat confdefs.h >>conftest.$ac_ext
9682cat >>conftest.$ac_ext <<_ACEOF
9683/* end confdefs.h. */
9684$ac_includes_default
9685int
9686main ()
9687{
9688if ((pid_t *) 0)
9689 return 0;
9690if (sizeof (pid_t))
9691 return 0;
9692 ;
9693 return 0;
9694}
9695_ACEOF
9696rm -f conftest.$ac_objext
9697if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9698 (eval $ac_compile) 2>conftest.er1
ba479fd2 9699 ac_status=$?
86da66b5
HPN
9700 grep -v '^ *+' conftest.er1 >conftest.err
9701 rm -f conftest.er1
9702 cat conftest.err >&5
ba479fd2
NN
9703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9704 (exit $ac_status); } &&
b095fe2c 9705 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9707 (eval $ac_try) 2>&5
9708 ac_status=$?
9709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9710 (exit $ac_status); }; } &&
9711 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9713 (eval $ac_try) 2>&5
9714 ac_status=$?
9715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9716 (exit $ac_status); }; }; then
cb65112a 9717 ac_cv_type_pid_t=yes
c375c43b 9718else
ba479fd2
NN
9719 echo "$as_me: failed program was:" >&5
9720sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9721
ba479fd2
NN
9722ac_cv_type_pid_t=no
9723fi
86da66b5 9724rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9725fi
ba479fd2
NN
9726echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
9727echo "${ECHO_T}$ac_cv_type_pid_t" >&6
9728if test $ac_cv_type_pid_t = yes; then
9729 :
9730else
9731
9732cat >>confdefs.h <<_ACEOF
c375c43b 9733#define pid_t int
ba479fd2 9734_ACEOF
c375c43b
KG
9735
9736fi
9737
ba479fd2
NN
9738
9739
9740for ac_header in unistd.h vfork.h
9741do
9742as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 9743echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
9744echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9745if eval "test \"\${$as_ac_Header+set}\" = set"; then
9746 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9747else
ca9bc441 9748 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9749/* confdefs.h. */
9750_ACEOF
9751cat confdefs.h >>conftest.$ac_ext
9752cat >>conftest.$ac_ext <<_ACEOF
9753/* end confdefs.h. */
9754#include <$ac_header>
9755_ACEOF
9756if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9757 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9758 ac_status=$?
9759 grep -v '^ *+' conftest.er1 >conftest.err
9760 rm -f conftest.er1
9761 cat conftest.err >&5
9762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9763 (exit $ac_status); } >/dev/null; then
9764 if test -s conftest.err; then
9765 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 9766 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
9767 else
9768 ac_cpp_err=
9769 fi
093e61a6 9770else
ba479fd2
NN
9771 ac_cpp_err=yes
9772fi
9773if test -z "$ac_cpp_err"; then
ca9bc441 9774 eval "$as_ac_Header=yes"
ba479fd2
NN
9775else
9776 echo "$as_me: failed program was:" >&5
9777sed 's/^/| /' conftest.$ac_ext >&5
9778
ca9bc441 9779 eval "$as_ac_Header=no"
ba479fd2
NN
9780fi
9781rm -f conftest.err conftest.$ac_ext
c375c43b 9782fi
ba479fd2
NN
9783echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9784echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
9785if test `eval echo '${'$as_ac_Header'}'` = yes; then
9786 cat >>confdefs.h <<_ACEOF
9787#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9788_ACEOF
6e3f3080
NN
9789
9790fi
ba479fd2
NN
9791done
9792
9793
9794
9795for ac_func in fork vfork
9796do
9797as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9798echo "$as_me:$LINENO: checking for $ac_func" >&5
9799echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9800if eval "test \"\${$as_ac_var+set}\" = set"; then
9801 echo $ECHO_N "(cached) $ECHO_C" >&6
9802else
9803 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9804/* confdefs.h. */
9805_ACEOF
9806cat confdefs.h >>conftest.$ac_ext
9807cat >>conftest.$ac_ext <<_ACEOF
9808/* end confdefs.h. */
86da66b5
HPN
9809/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9810 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9811#define $ac_func innocuous_$ac_func
9812
c375c43b 9813/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9814 which can conflict with char $ac_func (); below.
9815 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9816 <limits.h> exists even on freestanding compilers. */
86da66b5 9817
ba479fd2
NN
9818#ifdef __STDC__
9819# include <limits.h>
9820#else
9821# include <assert.h>
9822#endif
86da66b5
HPN
9823
9824#undef $ac_func
9825
6e3f3080 9826/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9827#ifdef __cplusplus
9828extern "C"
9829{
9830#endif
6e3f3080 9831/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9832 builtin and then its argument prototype would still apply. */
9833char $ac_func ();
c375c43b
KG
9834/* The GNU C library defines this for functions which it implements
9835 to always fail with ENOSYS. Some functions are actually named
9836 something starting with __ and the normal name is an alias. */
ba479fd2 9837#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
9838choke me
9839#else
ba479fd2
NN
9840char (*f) () = $ac_func;
9841#endif
9842#ifdef __cplusplus
9843}
c375c43b
KG
9844#endif
9845
ba479fd2
NN
9846int
9847main ()
9848{
9849return f != $ac_func;
9850 ;
9851 return 0;
9852}
9853_ACEOF
9854rm -f conftest.$ac_objext conftest$ac_exeext
9855if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9856 (eval $ac_link) 2>conftest.er1
ba479fd2 9857 ac_status=$?
86da66b5
HPN
9858 grep -v '^ *+' conftest.er1 >conftest.err
9859 rm -f conftest.er1
9860 cat conftest.err >&5
ba479fd2
NN
9861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9862 (exit $ac_status); } &&
b095fe2c 9863 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
9864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9865 (eval $ac_try) 2>&5
9866 ac_status=$?
9867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9868 (exit $ac_status); }; } &&
9869 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9871 (eval $ac_try) 2>&5
9872 ac_status=$?
9873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9874 (exit $ac_status); }; }; then
9875 eval "$as_ac_var=yes"
9876else
9877 echo "$as_me: failed program was:" >&5
9878sed 's/^/| /' conftest.$ac_ext >&5
9879
9880eval "$as_ac_var=no"
9881fi
86da66b5
HPN
9882rm -f conftest.err conftest.$ac_objext \
9883 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9884fi
9885echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9886echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9887if test `eval echo '${'$as_ac_var'}'` = yes; then
9888 cat >>confdefs.h <<_ACEOF
9889#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9890_ACEOF
9891
c375c43b 9892fi
ba479fd2 9893done
c375c43b 9894
ba479fd2
NN
9895if test "x$ac_cv_func_fork" = xyes; then
9896 echo "$as_me:$LINENO: checking for working fork" >&5
9897echo $ECHO_N "checking for working fork... $ECHO_C" >&6
9898if test "${ac_cv_func_fork_works+set}" = set; then
9899 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 9900else
ba479fd2
NN
9901 if test "$cross_compiling" = yes; then
9902 ac_cv_func_fork_works=cross
9903else
9904 cat >conftest.$ac_ext <<_ACEOF
9905/* By Ruediger Kuhlmann. */
9906 #include <sys/types.h>
9907 #if HAVE_UNISTD_H
9908 # include <unistd.h>
9909 #endif
9910 /* Some systems only have a dummy stub for fork() */
9911 int main ()
9912 {
86da66b5
HPN
9913 if (fork() < 0)
9914 exit (1);
9915 exit (0);
ba479fd2
NN
9916 }
9917_ACEOF
9918rm -f conftest$ac_exeext
9919if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9920 (eval $ac_link) 2>&5
9921 ac_status=$?
9922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9923 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9925 (eval $ac_try) 2>&5
9926 ac_status=$?
9927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9928 (exit $ac_status); }; }; then
9929 ac_cv_func_fork_works=yes
9930else
9931 echo "$as_me: program exited with status $ac_status" >&5
9932echo "$as_me: failed program was:" >&5
9933sed 's/^/| /' conftest.$ac_ext >&5
9934
9935( exit $ac_status )
9936ac_cv_func_fork_works=no
9937fi
86da66b5 9938rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
9939fi
9940fi
9941echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
9942echo "${ECHO_T}$ac_cv_func_fork_works" >&6
9943
9944else
9945 ac_cv_func_fork_works=$ac_cv_func_fork
9946fi
9947if test "x$ac_cv_func_fork_works" = xcross; then
9948 case $host in
9949 *-*-amigaos* | *-*-msdosdjgpp*)
9950 # Override, as these systems have only a dummy fork() stub
9951 ac_cv_func_fork_works=no
9952 ;;
9953 *)
9954 ac_cv_func_fork_works=yes
9955 ;;
9956 esac
9957 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
9958echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 9959fi
c375c43b 9960ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
9961if test "x$ac_cv_func_vfork" = xyes; then
9962 echo "$as_me:$LINENO: checking for working vfork" >&5
9963echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
9964if test "${ac_cv_func_vfork_works+set}" = set; then
9965 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 9966else
ba479fd2
NN
9967 if test "$cross_compiling" = yes; then
9968 ac_cv_func_vfork_works=cross
9969else
9970 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9971/* confdefs.h. */
9972_ACEOF
9973cat confdefs.h >>conftest.$ac_ext
9974cat >>conftest.$ac_ext <<_ACEOF
9975/* end confdefs.h. */
c375c43b
KG
9976/* Thanks to Paul Eggert for this test. */
9977#include <stdio.h>
ba479fd2 9978#include <stdlib.h>
c375c43b
KG
9979#include <sys/types.h>
9980#include <sys/stat.h>
ba479fd2
NN
9981#include <sys/wait.h>
9982#if HAVE_UNISTD_H
9983# include <unistd.h>
c375c43b 9984#endif
ba479fd2
NN
9985#if HAVE_VFORK_H
9986# include <vfork.h>
c375c43b
KG
9987#endif
9988/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
9989 argument registers are propagated back to the parent. The compiler
9990 is told about this with #include <vfork.h>, but some compilers
9991 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
9992 static variable whose address is put into a register that is
9993 clobbered by the vfork. */
9994static void
c375c43b
KG
9995#ifdef __cplusplus
9996sparc_address_test (int arg)
ba479fd2 9997# else
c375c43b
KG
9998sparc_address_test (arg) int arg;
9999#endif
10000{
10001 static pid_t child;
10002 if (!child) {
10003 child = vfork ();
10004 if (child < 0) {
10005 perror ("vfork");
10006 _exit(2);
10007 }
10008 if (!child) {
10009 arg = getpid();
10010 write(-1, "", 0);
10011 _exit (arg);
10012 }
10013 }
10014}
ba479fd2
NN
10015
10016int
10017main ()
10018{
c375c43b
KG
10019 pid_t parent = getpid ();
10020 pid_t child;
10021
ba479fd2 10022 sparc_address_test (0);
c375c43b
KG
10023
10024 child = vfork ();
10025
10026 if (child == 0) {
ba479fd2
NN
10027 /* Here is another test for sparc vfork register problems. This
10028 test uses lots of local variables, at least as many local
10029 variables as main has allocated so far including compiler
10030 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10031 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10032 reuse the register of parent for one of the local variables,
10033 since it will think that parent can't possibly be used any more
10034 in this routine. Assigning to the local variable will thus
10035 munge parent in the parent process. */
c375c43b
KG
10036 pid_t
10037 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10038 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10039 /* Convince the compiler that p..p7 are live; otherwise, it might
10040 use the same hardware register for all 8 local variables. */
10041 if (p != p1 || p != p2 || p != p3 || p != p4
10042 || p != p5 || p != p6 || p != p7)
10043 _exit(1);
10044
ba479fd2
NN
10045 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10046 from child file descriptors. If the child closes a descriptor
10047 before it execs or exits, this munges the parent's descriptor
10048 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10049 _exit(close(fileno(stdout)) != 0);
10050 } else {
10051 int status;
10052 struct stat st;
10053
10054 while (wait(&status) != child)
10055 ;
10056 exit(
10057 /* Was there some problem with vforking? */
10058 child < 0
10059
10060 /* Did the child fail? (This shouldn't happen.) */
10061 || status
10062
10063 /* Did the vfork/compiler bug occur? */
10064 || parent != getpid()
10065
10066 /* Did the file descriptor bug occur? */
10067 || fstat(fileno(stdout), &st) != 0
10068 );
10069 }
10070}
ba479fd2
NN
10071_ACEOF
10072rm -f conftest$ac_exeext
10073if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10074 (eval $ac_link) 2>&5
10075 ac_status=$?
10076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10077 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10079 (eval $ac_try) 2>&5
10080 ac_status=$?
10081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082 (exit $ac_status); }; }; then
c375c43b
KG
10083 ac_cv_func_vfork_works=yes
10084else
ba479fd2
NN
10085 echo "$as_me: program exited with status $ac_status" >&5
10086echo "$as_me: failed program was:" >&5
10087sed 's/^/| /' conftest.$ac_ext >&5
10088
10089( exit $ac_status )
10090ac_cv_func_vfork_works=no
cafe096b 10091fi
86da66b5 10092rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10093fi
ba479fd2
NN
10094fi
10095echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10096echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 10097
ba479fd2
NN
10098fi;
10099if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 10100 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10101 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10102echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
10103fi
10104
ba479fd2
NN
10105if test "x$ac_cv_func_vfork_works" = xyes; then
10106
10107cat >>confdefs.h <<\_ACEOF
10108#define HAVE_WORKING_VFORK 1
10109_ACEOF
10110
10111else
10112
10113cat >>confdefs.h <<\_ACEOF
c375c43b 10114#define vfork fork
ba479fd2 10115_ACEOF
c375c43b
KG
10116
10117fi
ba479fd2
NN
10118if test "x$ac_cv_func_fork_works" = xyes; then
10119
10120cat >>confdefs.h <<\_ACEOF
10121#define HAVE_WORKING_FORK 1
10122_ACEOF
10123
10124fi
10125
c375c43b 10126
81bf3d9e 10127
dfb77e37
KC
10128 if test "X$prefix" = "XNONE"; then
10129 acl_final_prefix="$ac_default_prefix"
10130 else
10131 acl_final_prefix="$prefix"
10132 fi
10133 if test "X$exec_prefix" = "XNONE"; then
10134 acl_final_exec_prefix='${prefix}'
10135 else
10136 acl_final_exec_prefix="$exec_prefix"
10137 fi
10138 acl_save_prefix="$prefix"
10139 prefix="$acl_final_prefix"
10140 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10141 prefix="$acl_save_prefix"
f91abfce
TT
10142
10143
dfb77e37
KC
10144# Check whether --with-gnu-ld or --without-gnu-ld was given.
10145if test "${with_gnu_ld+set}" = set; then
10146 withval="$with_gnu_ld"
10147 test "$withval" = no || with_gnu_ld=yes
ba479fd2 10148else
dfb77e37
KC
10149 with_gnu_ld=no
10150fi;
10151# Prepare PATH_SEPARATOR.
10152# The user is always right.
10153if test "${PATH_SEPARATOR+set}" != set; then
10154 echo "#! /bin/sh" >conf$$.sh
10155 echo "exit 0" >>conf$$.sh
10156 chmod +x conf$$.sh
10157 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10158 PATH_SEPARATOR=';'
ba479fd2 10159 else
dfb77e37 10160 PATH_SEPARATOR=:
ba479fd2 10161 fi
dfb77e37
KC
10162 rm -f conf$$.sh
10163fi
10164ac_prog=ld
10165if test "$GCC" = yes; then
10166 # Check if gcc -print-prog-name=ld gives a path.
10167 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10168echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10169 case $host in
10170 *-*-mingw*)
10171 # gcc leaves a trailing carriage return which upsets mingw
10172 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10173 *)
10174 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10175 esac
10176 case $ac_prog in
10177 # Accept absolute paths.
10178 [\\/]* | [A-Za-z]:[\\/]*)
10179 re_direlt='/[^/][^/]*/\.\./'
10180 # Canonicalize the path of ld
10181 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10182 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10183 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10184 done
10185 test -z "$LD" && LD="$ac_prog"
10186 ;;
10187 "")
10188 # If it fails, then pretend we aren't using GCC.
10189 ac_prog=ld
10190 ;;
10191 *)
10192 # If it is relative, then search for the first ld in PATH.
10193 with_gnu_ld=unknown
10194 ;;
10195 esac
10196elif test "$with_gnu_ld" = yes; then
10197 echo "$as_me:$LINENO: checking for GNU ld" >&5
10198echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 10199else
dfb77e37
KC
10200 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10201echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 10202fi
dfb77e37
KC
10203if test "${acl_cv_path_LD+set}" = set; then
10204 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 10205else
dfb77e37
KC
10206 if test -z "$LD"; then
10207 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10208 for ac_dir in $PATH; do
10209 test -z "$ac_dir" && ac_dir=.
10210 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10211 acl_cv_path_LD="$ac_dir/$ac_prog"
10212 # Check to see if the program is GNU ld. I'd rather use --version,
10213 # but apparently some GNU ld's only accept -v.
10214 # Break only if it was the GNU/non-GNU ld that we prefer.
10215 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10216 test "$with_gnu_ld" != no && break
10217 else
10218 test "$with_gnu_ld" != yes && break
10219 fi
10220 fi
10221 done
10222 IFS="$ac_save_ifs"
10223else
10224 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10225fi
10226fi
ba479fd2 10227
dfb77e37
KC
10228LD="$acl_cv_path_LD"
10229if test -n "$LD"; then
10230 echo "$as_me:$LINENO: result: $LD" >&5
10231echo "${ECHO_T}$LD" >&6
10232else
10233 echo "$as_me:$LINENO: result: no" >&5
10234echo "${ECHO_T}no" >&6
ba479fd2 10235fi
dfb77e37
KC
10236test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10237echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10238 { (exit 1); exit 1; }; }
10239echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10240echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10241if test "${acl_cv_prog_gnu_ld+set}" = set; then
10242 echo $ECHO_N "(cached) $ECHO_C" >&6
10243else
10244 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10245if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10246 acl_cv_prog_gnu_ld=yes
10247else
10248 acl_cv_prog_gnu_ld=no
6e3f3080 10249fi
dfb77e37
KC
10250fi
10251echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10252echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10253with_gnu_ld=$acl_cv_prog_gnu_ld
10254
10255
10256
10257 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10258echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10259if test "${acl_cv_rpath+set}" = set; then
10260 echo $ECHO_N "(cached) $ECHO_C" >&6
10261else
10262
10263 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10264 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10265 . ./conftest.sh
10266 rm -f ./conftest.sh
10267 acl_cv_rpath=done
ba479fd2 10268
eb158727 10269fi
dfb77e37
KC
10270echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10271echo "${ECHO_T}$acl_cv_rpath" >&6
10272 wl="$acl_cv_wl"
10273 libext="$acl_cv_libext"
10274 shlibext="$acl_cv_shlibext"
10275 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10276 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10277 hardcode_direct="$acl_cv_hardcode_direct"
10278 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10279 # Check whether --enable-rpath or --disable-rpath was given.
10280if test "${enable_rpath+set}" = set; then
10281 enableval="$enable_rpath"
10282 :
10283else
10284 enable_rpath=yes
10285fi;
10286
10287
10288
10289
10290
10291
10292
10293 use_additional=yes
10294
10295 acl_save_prefix="$prefix"
10296 prefix="$acl_final_prefix"
10297 acl_save_exec_prefix="$exec_prefix"
10298 exec_prefix="$acl_final_exec_prefix"
10299
10300 eval additional_includedir=\"$includedir\"
10301 eval additional_libdir=\"$libdir\"
10302
10303 exec_prefix="$acl_save_exec_prefix"
10304 prefix="$acl_save_prefix"
10305
10306
10307# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10308if test "${with_libiconv_prefix+set}" = set; then
10309 withval="$with_libiconv_prefix"
10310
10311 if test "X$withval" = "Xno"; then
10312 use_additional=no
10313 else
10314 if test "X$withval" = "X"; then
10315
10316 acl_save_prefix="$prefix"
10317 prefix="$acl_final_prefix"
10318 acl_save_exec_prefix="$exec_prefix"
10319 exec_prefix="$acl_final_exec_prefix"
10320
10321 eval additional_includedir=\"$includedir\"
10322 eval additional_libdir=\"$libdir\"
10323
10324 exec_prefix="$acl_save_exec_prefix"
10325 prefix="$acl_save_prefix"
10326
10327 else
10328 additional_includedir="$withval/include"
10329 additional_libdir="$withval/lib"
10330 fi
10331 fi
10332
10333fi;
10334 LIBICONV=
10335 LTLIBICONV=
10336 INCICONV=
10337 rpathdirs=
10338 ltrpathdirs=
10339 names_already_handled=
10340 names_next_round='iconv '
10341 while test -n "$names_next_round"; do
10342 names_this_round="$names_next_round"
10343 names_next_round=
10344 for name in $names_this_round; do
10345 already_handled=
10346 for n in $names_already_handled; do
10347 if test "$n" = "$name"; then
10348 already_handled=yes
10349 break
10350 fi
10351 done
10352 if test -z "$already_handled"; then
10353 names_already_handled="$names_already_handled $name"
10354 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10355 eval value=\"\$HAVE_LIB$uppername\"
10356 if test -n "$value"; then
10357 if test "$value" = yes; then
10358 eval value=\"\$LIB$uppername\"
10359 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10360 eval value=\"\$LTLIB$uppername\"
10361 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10362 else
10363 :
10364 fi
10365 else
10366 found_dir=
10367 found_la=
10368 found_so=
10369 found_a=
10370 if test $use_additional = yes; then
10371 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10372 found_dir="$additional_libdir"
10373 found_so="$additional_libdir/lib$name.$shlibext"
10374 if test -f "$additional_libdir/lib$name.la"; then
10375 found_la="$additional_libdir/lib$name.la"
10376 fi
10377 else
10378 if test -f "$additional_libdir/lib$name.$libext"; then
10379 found_dir="$additional_libdir"
10380 found_a="$additional_libdir/lib$name.$libext"
10381 if test -f "$additional_libdir/lib$name.la"; then
10382 found_la="$additional_libdir/lib$name.la"
10383 fi
10384 fi
10385 fi
10386 fi
10387 if test "X$found_dir" = "X"; then
10388 for x in $LDFLAGS $LTLIBICONV; do
10389
10390 acl_save_prefix="$prefix"
10391 prefix="$acl_final_prefix"
10392 acl_save_exec_prefix="$exec_prefix"
10393 exec_prefix="$acl_final_exec_prefix"
10394 eval x=\"$x\"
10395 exec_prefix="$acl_save_exec_prefix"
10396 prefix="$acl_save_prefix"
10397
10398 case "$x" in
10399 -L*)
10400 dir=`echo "X$x" | sed -e 's/^X-L//'`
10401 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10402 found_dir="$dir"
10403 found_so="$dir/lib$name.$shlibext"
10404 if test -f "$dir/lib$name.la"; then
10405 found_la="$dir/lib$name.la"
10406 fi
10407 else
10408 if test -f "$dir/lib$name.$libext"; then
10409 found_dir="$dir"
10410 found_a="$dir/lib$name.$libext"
10411 if test -f "$dir/lib$name.la"; then
10412 found_la="$dir/lib$name.la"
10413 fi
10414 fi
10415 fi
10416 ;;
10417 esac
10418 if test "X$found_dir" != "X"; then
10419 break
10420 fi
10421 done
10422 fi
10423 if test "X$found_dir" != "X"; then
10424 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10425 if test "X$found_so" != "X"; then
10426 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10427 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10428 else
10429 haveit=
10430 for x in $ltrpathdirs; do
10431 if test "X$x" = "X$found_dir"; then
10432 haveit=yes
10433 break
10434 fi
10435 done
10436 if test -z "$haveit"; then
10437 ltrpathdirs="$ltrpathdirs $found_dir"
10438 fi
10439 if test "$hardcode_direct" = yes; then
10440 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10441 else
10442 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10443 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10444 haveit=
10445 for x in $rpathdirs; do
10446 if test "X$x" = "X$found_dir"; then
10447 haveit=yes
10448 break
10449 fi
10450 done
10451 if test -z "$haveit"; then
10452 rpathdirs="$rpathdirs $found_dir"
10453 fi
10454 else
10455 haveit=
10456 for x in $LDFLAGS $LIBICONV; do
10457
10458 acl_save_prefix="$prefix"
10459 prefix="$acl_final_prefix"
10460 acl_save_exec_prefix="$exec_prefix"
10461 exec_prefix="$acl_final_exec_prefix"
10462 eval x=\"$x\"
10463 exec_prefix="$acl_save_exec_prefix"
10464 prefix="$acl_save_prefix"
10465
10466 if test "X$x" = "X-L$found_dir"; then
10467 haveit=yes
10468 break
10469 fi
10470 done
10471 if test -z "$haveit"; then
10472 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10473 fi
10474 if test "$hardcode_minus_L" != no; then
10475 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10476 else
10477 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10478 fi
10479 fi
10480 fi
10481 fi
10482 else
10483 if test "X$found_a" != "X"; then
10484 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10485 else
10486 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10487 fi
10488 fi
10489 additional_includedir=
10490 case "$found_dir" in
10491 */lib | */lib/)
10492 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10493 additional_includedir="$basedir/include"
10494 ;;
10495 esac
10496 if test "X$additional_includedir" != "X"; then
10497 if test "X$additional_includedir" != "X/usr/include"; then
10498 haveit=
10499 if test "X$additional_includedir" = "X/usr/local/include"; then
10500 if test -n "$GCC"; then
10501 case $host_os in
10502 linux*) haveit=yes;;
10503 esac
10504 fi
10505 fi
10506 if test -z "$haveit"; then
10507 for x in $CPPFLAGS $INCICONV; do
10508
10509 acl_save_prefix="$prefix"
10510 prefix="$acl_final_prefix"
10511 acl_save_exec_prefix="$exec_prefix"
10512 exec_prefix="$acl_final_exec_prefix"
10513 eval x=\"$x\"
10514 exec_prefix="$acl_save_exec_prefix"
10515 prefix="$acl_save_prefix"
10516
10517 if test "X$x" = "X-I$additional_includedir"; then
10518 haveit=yes
10519 break
10520 fi
10521 done
10522 if test -z "$haveit"; then
10523 if test -d "$additional_includedir"; then
10524 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10525 fi
10526 fi
10527 fi
10528 fi
10529 fi
10530 if test -n "$found_la"; then
10531 save_libdir="$libdir"
10532 case "$found_la" in
10533 */* | *\\*) . "$found_la" ;;
10534 *) . "./$found_la" ;;
10535 esac
10536 libdir="$save_libdir"
10537 for dep in $dependency_libs; do
10538 case "$dep" in
10539 -L*)
10540 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10541 if test "X$additional_libdir" != "X/usr/lib"; then
10542 haveit=
10543 if test "X$additional_libdir" = "X/usr/local/lib"; then
10544 if test -n "$GCC"; then
10545 case $host_os in
10546 linux*) haveit=yes;;
10547 esac
10548 fi
10549 fi
10550 if test -z "$haveit"; then
10551 haveit=
10552 for x in $LDFLAGS $LIBICONV; do
10553
10554 acl_save_prefix="$prefix"
10555 prefix="$acl_final_prefix"
10556 acl_save_exec_prefix="$exec_prefix"
10557 exec_prefix="$acl_final_exec_prefix"
10558 eval x=\"$x\"
10559 exec_prefix="$acl_save_exec_prefix"
10560 prefix="$acl_save_prefix"
10561
10562 if test "X$x" = "X-L$additional_libdir"; then
10563 haveit=yes
10564 break
10565 fi
10566 done
10567 if test -z "$haveit"; then
10568 if test -d "$additional_libdir"; then
10569 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10570 fi
10571 fi
10572 haveit=
10573 for x in $LDFLAGS $LTLIBICONV; do
10574
10575 acl_save_prefix="$prefix"
10576 prefix="$acl_final_prefix"
10577 acl_save_exec_prefix="$exec_prefix"
10578 exec_prefix="$acl_final_exec_prefix"
10579 eval x=\"$x\"
10580 exec_prefix="$acl_save_exec_prefix"
10581 prefix="$acl_save_prefix"
10582
10583 if test "X$x" = "X-L$additional_libdir"; then
10584 haveit=yes
10585 break
10586 fi
10587 done
10588 if test -z "$haveit"; then
10589 if test -d "$additional_libdir"; then
10590 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10591 fi
10592 fi
10593 fi
10594 fi
10595 ;;
10596 -R*)
10597 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10598 if test "$enable_rpath" != no; then
10599 haveit=
10600 for x in $rpathdirs; do
10601 if test "X$x" = "X$dir"; then
10602 haveit=yes
10603 break
10604 fi
10605 done
10606 if test -z "$haveit"; then
10607 rpathdirs="$rpathdirs $dir"
10608 fi
10609 haveit=
10610 for x in $ltrpathdirs; do
10611 if test "X$x" = "X$dir"; then
10612 haveit=yes
10613 break
10614 fi
10615 done
10616 if test -z "$haveit"; then
10617 ltrpathdirs="$ltrpathdirs $dir"
10618 fi
10619 fi
10620 ;;
10621 -l*)
10622 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10623 ;;
10624 *.la)
10625 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10626 ;;
10627 *)
10628 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10629 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10630 ;;
10631 esac
10632 done
10633 fi
10634 else
10635 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10636 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10637 fi
10638 fi
10639 fi
10640 done
10641 done
10642 if test "X$rpathdirs" != "X"; then
10643 if test -n "$hardcode_libdir_separator"; then
10644 alldirs=
10645 for found_dir in $rpathdirs; do
10646 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10647 done
10648 acl_save_libdir="$libdir"
10649 libdir="$alldirs"
10650 eval flag=\"$hardcode_libdir_flag_spec\"
10651 libdir="$acl_save_libdir"
10652 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10653 else
10654 for found_dir in $rpathdirs; do
10655 acl_save_libdir="$libdir"
10656 libdir="$found_dir"
10657 eval flag=\"$hardcode_libdir_flag_spec\"
10658 libdir="$acl_save_libdir"
10659 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10660 done
10661 fi
10662 fi
10663 if test "X$ltrpathdirs" != "X"; then
10664 for found_dir in $ltrpathdirs; do
10665 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10666 done
10667 fi
10668
10669
10670
10671
10672
10673
10674
10675 am_save_CPPFLAGS="$CPPFLAGS"
10676
10677 for element in $INCICONV; do
10678 haveit=
10679 for x in $CPPFLAGS; do
10680
10681 acl_save_prefix="$prefix"
10682 prefix="$acl_final_prefix"
10683 acl_save_exec_prefix="$exec_prefix"
10684 exec_prefix="$acl_final_exec_prefix"
10685 eval x=\"$x\"
10686 exec_prefix="$acl_save_exec_prefix"
10687 prefix="$acl_save_prefix"
10688
10689 if test "X$x" = "X$element"; then
10690 haveit=yes
10691 break
10692 fi
10693 done
10694 if test -z "$haveit"; then
10695 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10696 fi
10697 done
eb158727
ZW
10698
10699
ba479fd2
NN
10700 echo "$as_me:$LINENO: checking for iconv" >&5
10701echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10702if test "${am_cv_func_iconv+set}" = set; then
10703 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10704else
ba479fd2 10705
f91abfce
TT
10706 am_cv_func_iconv="no, consider installing GNU libiconv"
10707 am_cv_lib_iconv=no
ba479fd2 10708 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10709/* confdefs.h. */
10710_ACEOF
10711cat confdefs.h >>conftest.$ac_ext
10712cat >>conftest.$ac_ext <<_ACEOF
10713/* end confdefs.h. */
f91abfce
TT
10714#include <stdlib.h>
10715#include <iconv.h>
ba479fd2
NN
10716int
10717main ()
10718{
f91abfce
TT
10719iconv_t cd = iconv_open("","");
10720 iconv(cd,NULL,NULL,NULL,NULL);
10721 iconv_close(cd);
ba479fd2
NN
10722 ;
10723 return 0;
10724}
10725_ACEOF
10726rm -f conftest.$ac_objext conftest$ac_exeext
10727if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10728 (eval $ac_link) 2>conftest.er1
ba479fd2 10729 ac_status=$?
86da66b5
HPN
10730 grep -v '^ *+' conftest.er1 >conftest.err
10731 rm -f conftest.er1
10732 cat conftest.err >&5
ba479fd2
NN
10733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10734 (exit $ac_status); } &&
b095fe2c 10735 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
10736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10737 (eval $ac_try) 2>&5
10738 ac_status=$?
10739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10740 (exit $ac_status); }; } &&
10741 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10743 (eval $ac_try) 2>&5
10744 ac_status=$?
10745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10746 (exit $ac_status); }; }; then
f91abfce
TT
10747 am_cv_func_iconv=yes
10748else
ba479fd2
NN
10749 echo "$as_me: failed program was:" >&5
10750sed 's/^/| /' conftest.$ac_ext >&5
10751
f91abfce 10752fi
86da66b5
HPN
10753rm -f conftest.err conftest.$ac_objext \
10754 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
10755 if test "$am_cv_func_iconv" != yes; then
10756 am_save_LIBS="$LIBS"
dfb77e37 10757 LIBS="$LIBS $LIBICONV"
ba479fd2 10758 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10759/* confdefs.h. */
10760_ACEOF
10761cat confdefs.h >>conftest.$ac_ext
10762cat >>conftest.$ac_ext <<_ACEOF
10763/* end confdefs.h. */
f91abfce
TT
10764#include <stdlib.h>
10765#include <iconv.h>
ba479fd2
NN
10766int
10767main ()
10768{
f91abfce
TT
10769iconv_t cd = iconv_open("","");
10770 iconv(cd,NULL,NULL,NULL,NULL);
10771 iconv_close(cd);
ba479fd2
NN
10772 ;
10773 return 0;
10774}
10775_ACEOF
10776rm -f conftest.$ac_objext conftest$ac_exeext
10777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10778 (eval $ac_link) 2>conftest.er1
ba479fd2 10779 ac_status=$?
86da66b5
HPN
10780 grep -v '^ *+' conftest.er1 >conftest.err
10781 rm -f conftest.er1
10782 cat conftest.err >&5
ba479fd2
NN
10783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10784 (exit $ac_status); } &&
b095fe2c 10785 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
10786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10787 (eval $ac_try) 2>&5
10788 ac_status=$?
10789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10790 (exit $ac_status); }; } &&
10791 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10793 (eval $ac_try) 2>&5
10794 ac_status=$?
10795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10796 (exit $ac_status); }; }; then
f91abfce
TT
10797 am_cv_lib_iconv=yes
10798 am_cv_func_iconv=yes
10799else
ba479fd2
NN
10800 echo "$as_me: failed program was:" >&5
10801sed 's/^/| /' conftest.$ac_ext >&5
10802
f91abfce 10803fi
86da66b5
HPN
10804rm -f conftest.err conftest.$ac_objext \
10805 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
10806 LIBS="$am_save_LIBS"
10807 fi
6e3f3080 10808
ba479fd2
NN
10809fi
10810echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
10811echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 10812 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
10813
10814cat >>confdefs.h <<\_ACEOF
f91abfce 10815#define HAVE_ICONV 1
ba479fd2 10816_ACEOF
f91abfce 10817
dfb77e37
KC
10818 fi
10819 if test "$am_cv_lib_iconv" = yes; then
10820 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
10821echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
10822 echo "$as_me:$LINENO: result: $LIBICONV" >&5
10823echo "${ECHO_T}$LIBICONV" >&6
10824 else
10825 CPPFLAGS="$am_save_CPPFLAGS"
10826 LIBICONV=
10827 LTLIBICONV=
10828 fi
10829
10830
10831
10832 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
10833 echo "$as_me:$LINENO: checking for iconv declaration" >&5
10834echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
10835 if test "${am_cv_proto_iconv+set}" = set; then
10836 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10837else
ba479fd2
NN
10838
10839 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10840/* confdefs.h. */
10841_ACEOF
10842cat confdefs.h >>conftest.$ac_ext
10843cat >>conftest.$ac_ext <<_ACEOF
10844/* end confdefs.h. */
f91abfce
TT
10845
10846#include <stdlib.h>
10847#include <iconv.h>
10848extern
10849#ifdef __cplusplus
10850"C"
10851#endif
10852#if defined(__STDC__) || defined(__cplusplus)
10853size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10854#else
10855size_t iconv();
10856#endif
10857
ba479fd2
NN
10858int
10859main ()
10860{
f91abfce 10861
ba479fd2
NN
10862 ;
10863 return 0;
10864}
10865_ACEOF
10866rm -f conftest.$ac_objext
10867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 10868 (eval $ac_compile) 2>conftest.er1
ba479fd2 10869 ac_status=$?
86da66b5
HPN
10870 grep -v '^ *+' conftest.er1 >conftest.err
10871 rm -f conftest.er1
10872 cat conftest.err >&5
ba479fd2
NN
10873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10874 (exit $ac_status); } &&
b095fe2c 10875 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
10876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10877 (eval $ac_try) 2>&5
10878 ac_status=$?
10879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10880 (exit $ac_status); }; } &&
10881 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
10882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10883 (eval $ac_try) 2>&5
10884 ac_status=$?
10885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10886 (exit $ac_status); }; }; then
f91abfce
TT
10887 am_cv_proto_iconv_arg1=""
10888else
ba479fd2
NN
10889 echo "$as_me: failed program was:" >&5
10890sed 's/^/| /' conftest.$ac_ext >&5
10891
10892am_cv_proto_iconv_arg1="const"
f91abfce 10893fi
86da66b5 10894rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
10895 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);"
10896fi
10897
10898 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
10899 echo "$as_me:$LINENO: result: ${ac_t:-
10900 }$am_cv_proto_iconv" >&5
10901echo "${ECHO_T}${ac_t:-
10902 }$am_cv_proto_iconv" >&6
10903
10904cat >>confdefs.h <<_ACEOF
f91abfce 10905#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 10906_ACEOF
f91abfce
TT
10907
10908 fi
f91abfce 10909
56694dd9
ZW
10910# Until we have in-tree GNU iconv:
10911LIBICONV_DEP=
10912
10913
10914
ba479fd2
NN
10915 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
10916echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
10917if test "${am_cv_val_LC_MESSAGES+set}" = set; then
10918 echo $ECHO_N "(cached) $ECHO_C" >&6
56694dd9 10919else
ba479fd2 10920 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10921/* confdefs.h. */
10922_ACEOF
10923cat confdefs.h >>conftest.$ac_ext
10924cat >>conftest.$ac_ext <<_ACEOF
10925/* end confdefs.h. */
56694dd9 10926#include <locale.h>
ba479fd2
NN
10927int
10928main ()
10929{
56694dd9 10930return LC_MESSAGES
ba479fd2
NN
10931 ;
10932 return 0;
10933}
10934_ACEOF
10935rm -f conftest.$ac_objext conftest$ac_exeext
10936if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10937 (eval $ac_link) 2>conftest.er1
ba479fd2 10938 ac_status=$?
86da66b5
HPN
10939 grep -v '^ *+' conftest.er1 >conftest.err
10940 rm -f conftest.er1
10941 cat conftest.err >&5
ba479fd2
NN
10942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10943 (exit $ac_status); } &&
b095fe2c 10944 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
10945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10946 (eval $ac_try) 2>&5
10947 ac_status=$?
10948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10949 (exit $ac_status); }; } &&
10950 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10952 (eval $ac_try) 2>&5
10953 ac_status=$?
10954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10955 (exit $ac_status); }; }; then
56694dd9
ZW
10956 am_cv_val_LC_MESSAGES=yes
10957else
ba479fd2
NN
10958 echo "$as_me: failed program was:" >&5
10959sed 's/^/| /' conftest.$ac_ext >&5
10960
10961am_cv_val_LC_MESSAGES=no
56694dd9 10962fi
86da66b5
HPN
10963rm -f conftest.err conftest.$ac_objext \
10964 conftest$ac_exeext conftest.$ac_ext
56694dd9 10965fi
ba479fd2
NN
10966echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
10967echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
63cf211a 10968 if test $am_cv_val_LC_MESSAGES = yes; then
ba479fd2
NN
10969
10970cat >>confdefs.h <<\_ACEOF
56694dd9 10971#define HAVE_LC_MESSAGES 1
ba479fd2 10972_ACEOF
56694dd9
ZW
10973
10974 fi
10975
f91abfce 10976
a03ea89b
BM
10977
10978 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
10979echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
10980if test "${am_cv_langinfo_codeset+set}" = set; then
10981 echo $ECHO_N "(cached) $ECHO_C" >&6
10982else
10983 cat >conftest.$ac_ext <<_ACEOF
10984/* confdefs.h. */
10985_ACEOF
10986cat confdefs.h >>conftest.$ac_ext
10987cat >>conftest.$ac_ext <<_ACEOF
10988/* end confdefs.h. */
10989#include <langinfo.h>
10990int
10991main ()
10992{
10993char* cs = nl_langinfo(CODESET);
10994 ;
10995 return 0;
10996}
10997_ACEOF
10998rm -f conftest.$ac_objext conftest$ac_exeext
10999if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11000 (eval $ac_link) 2>conftest.er1
11001 ac_status=$?
11002 grep -v '^ *+' conftest.er1 >conftest.err
11003 rm -f conftest.er1
11004 cat conftest.err >&5
11005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11006 (exit $ac_status); } &&
b095fe2c 11007 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
a03ea89b
BM
11008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11009 (eval $ac_try) 2>&5
11010 ac_status=$?
11011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11012 (exit $ac_status); }; } &&
11013 { ac_try='test -s conftest$ac_exeext'
11014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11015 (eval $ac_try) 2>&5
11016 ac_status=$?
11017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11018 (exit $ac_status); }; }; then
11019 am_cv_langinfo_codeset=yes
11020else
11021 echo "$as_me: failed program was:" >&5
11022sed 's/^/| /' conftest.$ac_ext >&5
11023
11024am_cv_langinfo_codeset=no
11025fi
11026rm -f conftest.err conftest.$ac_objext \
11027 conftest$ac_exeext conftest.$ac_ext
11028
11029fi
11030echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11031echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11032 if test $am_cv_langinfo_codeset = yes; then
11033
11034cat >>confdefs.h <<\_ACEOF
11035#define HAVE_LANGINFO_CODESET 1
11036_ACEOF
11037
11038 fi
11039
11040
86cf1cbd
KG
11041# We will need to find libiberty.h and ansidecl.h
11042saved_CFLAGS="$CFLAGS"
11043CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
6a257778 11065
ad6717df
PB
11066
11067
8e944909 11068for ac_func in getenv atol sbrk abort atof getcwd getwd \
3b681e9d 11069 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
236ce4b2 11070 fprintf_unlocked strstr errno snprintf vasprintf \
6a257778 11071 malloc realloc calloc free basename getopt clock getpagesize
81bf3d9e 11072do
ad6717df 11073 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11074echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11075echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11076if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11077 echo $ECHO_N "(cached) $ECHO_C" >&6
11078else
11079 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11080/* confdefs.h. */
11081_ACEOF
11082cat confdefs.h >>conftest.$ac_ext
11083cat >>conftest.$ac_ext <<_ACEOF
11084/* end confdefs.h. */
7afe8c41
KG
11085#undef $ac_tr_decl
11086#define $ac_tr_decl 1
ba479fd2 11087
d02af173 11088#include "ansidecl.h"
86cf1cbd 11089#include "system.h"
f31e826b 11090
ba479fd2
NN
11091int
11092main ()
11093{
86cf1cbd
KG
11094#ifndef $ac_func
11095char *(*pfn) = (char *(*)) $ac_func ;
11096#endif
ba479fd2
NN
11097 ;
11098 return 0;
11099}
11100_ACEOF
11101rm -f conftest.$ac_objext
11102if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11103 (eval $ac_compile) 2>conftest.er1
ba479fd2 11104 ac_status=$?
86da66b5
HPN
11105 grep -v '^ *+' conftest.er1 >conftest.err
11106 rm -f conftest.er1
11107 cat conftest.err >&5
ba479fd2
NN
11108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11109 (exit $ac_status); } &&
b095fe2c 11110 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11112 (eval $ac_try) 2>&5
11113 ac_status=$?
11114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11115 (exit $ac_status); }; } &&
11116 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11118 (eval $ac_try) 2>&5
11119 ac_status=$?
11120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11121 (exit $ac_status); }; }; then
f31e826b 11122 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11123else
ba479fd2
NN
11124 echo "$as_me: failed program was:" >&5
11125sed 's/^/| /' conftest.$ac_ext >&5
11126
11127eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11128fi
86da66b5 11129rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11130fi
11131
f31e826b 11132if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11133 echo "$as_me:$LINENO: result: yes" >&5
11134echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11135#define $ac_tr_decl 1
ba479fd2
NN
11136_ACEOF
11137
81bf3d9e 11138else
ba479fd2
NN
11139 echo "$as_me:$LINENO: result: no" >&5
11140echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11141#define $ac_tr_decl 0
ba479fd2
NN
11142_ACEOF
11143
81bf3d9e
RH
11144fi
11145
11146done
ba479fd2 11147
ba479fd2 11148
ba479fd2 11149
81bf3d9e 11150
81bf3d9e
RH
11151
11152for ac_func in getrlimit setrlimit getrusage
11153do
ad6717df 11154 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11155echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11156echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11157if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11158 echo $ECHO_N "(cached) $ECHO_C" >&6
11159else
11160 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11161/* confdefs.h. */
11162_ACEOF
11163cat confdefs.h >>conftest.$ac_ext
11164cat >>conftest.$ac_ext <<_ACEOF
11165/* end confdefs.h. */
7afe8c41
KG
11166#undef $ac_tr_decl
11167#define $ac_tr_decl 1
ba479fd2 11168
d02af173 11169#include "ansidecl.h"
86cf1cbd 11170#include "system.h"
81bf3d9e
RH
11171#ifdef HAVE_SYS_RESOURCE_H
11172#include <sys/resource.h>
11173#endif
11174
f31e826b 11175
ba479fd2
NN
11176int
11177main ()
11178{
86cf1cbd
KG
11179#ifndef $ac_func
11180char *(*pfn) = (char *(*)) $ac_func ;
11181#endif
ba479fd2
NN
11182 ;
11183 return 0;
11184}
11185_ACEOF
11186rm -f conftest.$ac_objext
11187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11188 (eval $ac_compile) 2>conftest.er1
ba479fd2 11189 ac_status=$?
86da66b5
HPN
11190 grep -v '^ *+' conftest.er1 >conftest.err
11191 rm -f conftest.er1
11192 cat conftest.err >&5
ba479fd2
NN
11193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194 (exit $ac_status); } &&
b095fe2c 11195 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11197 (eval $ac_try) 2>&5
11198 ac_status=$?
11199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11200 (exit $ac_status); }; } &&
11201 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11203 (eval $ac_try) 2>&5
11204 ac_status=$?
11205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11206 (exit $ac_status); }; }; then
f31e826b 11207 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11208else
ba479fd2
NN
11209 echo "$as_me: failed program was:" >&5
11210sed 's/^/| /' conftest.$ac_ext >&5
11211
11212eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11213fi
86da66b5 11214rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11215fi
11216
f31e826b 11217if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11218 echo "$as_me:$LINENO: result: yes" >&5
11219echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11220#define $ac_tr_decl 1
ba479fd2
NN
11221_ACEOF
11222
81bf3d9e 11223else
ba479fd2
NN
11224 echo "$as_me:$LINENO: result: no" >&5
11225echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11226#define $ac_tr_decl 0
ba479fd2
NN
11227_ACEOF
11228
81bf3d9e
RH
11229fi
11230
11231done
86cf1cbd 11232
81bf3d9e 11233
ba479fd2 11234cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11235/* confdefs.h. */
11236_ACEOF
11237cat confdefs.h >>conftest.$ac_ext
11238cat >>conftest.$ac_ext <<_ACEOF
11239/* end confdefs.h. */
b2522d2b
HPN
11240
11241#include "ansidecl.h"
11242#include "system.h"
11243#ifdef HAVE_SYS_RESOURCE_H
11244#include <sys/resource.h>
11245#endif
11246
ba479fd2
NN
11247int
11248main ()
11249{
b2522d2b 11250rlim_t l = 0;
ba479fd2
NN
11251 ;
11252 return 0;
11253}
11254_ACEOF
11255rm -f conftest.$ac_objext
11256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11257 (eval $ac_compile) 2>conftest.er1
ba479fd2 11258 ac_status=$?
86da66b5
HPN
11259 grep -v '^ *+' conftest.er1 >conftest.err
11260 rm -f conftest.er1
11261 cat conftest.err >&5
ba479fd2
NN
11262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11263 (exit $ac_status); } &&
b095fe2c 11264 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11266 (eval $ac_try) 2>&5
11267 ac_status=$?
11268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11269 (exit $ac_status); }; } &&
11270 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11272 (eval $ac_try) 2>&5
11273 ac_status=$?
11274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11275 (exit $ac_status); }; }; then
b2522d2b
HPN
11276 :
11277else
ba479fd2
NN
11278 echo "$as_me: failed program was:" >&5
11279sed 's/^/| /' conftest.$ac_ext >&5
11280
11281
11282cat >>confdefs.h <<\_ACEOF
b2522d2b 11283#define rlim_t long
ba479fd2 11284_ACEOF
b2522d2b
HPN
11285
11286fi
86da66b5 11287rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 11288
2102b2fe
RS
11289# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11290# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11291# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11292# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 11293
351df804 11294for ac_func in ldgetname
c1800ec8 11295do
ad6717df 11296 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11297echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11298echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11299if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11300 echo $ECHO_N "(cached) $ECHO_C" >&6
11301else
11302 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11303/* confdefs.h. */
11304_ACEOF
11305cat confdefs.h >>conftest.$ac_ext
11306cat >>conftest.$ac_ext <<_ACEOF
11307/* end confdefs.h. */
c1800ec8
ZW
11308#undef $ac_tr_decl
11309#define $ac_tr_decl 1
ba479fd2 11310
351df804
KG
11311#include "ansidecl.h"
11312#include "system.h"
11313#ifdef HAVE_LDFCN_H
2102b2fe
RS
11314#undef FREAD
11315#undef FWRITE
351df804
KG
11316#include <ldfcn.h>
11317#endif
11318
11319
ba479fd2
NN
11320int
11321main ()
11322{
351df804
KG
11323#ifndef $ac_func
11324char *(*pfn) = (char *(*)) $ac_func ;
11325#endif
ba479fd2
NN
11326 ;
11327 return 0;
11328}
11329_ACEOF
11330rm -f conftest.$ac_objext
11331if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11332 (eval $ac_compile) 2>conftest.er1
ba479fd2 11333 ac_status=$?
86da66b5
HPN
11334 grep -v '^ *+' conftest.er1 >conftest.err
11335 rm -f conftest.er1
11336 cat conftest.err >&5
ba479fd2
NN
11337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11338 (exit $ac_status); } &&
b095fe2c 11339 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11341 (eval $ac_try) 2>&5
11342 ac_status=$?
11343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11344 (exit $ac_status); }; } &&
11345 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11347 (eval $ac_try) 2>&5
11348 ac_status=$?
11349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11350 (exit $ac_status); }; }; then
351df804
KG
11351 eval "gcc_cv_have_decl_$ac_func=yes"
11352else
ba479fd2
NN
11353 echo "$as_me: failed program was:" >&5
11354sed 's/^/| /' conftest.$ac_ext >&5
11355
11356eval "gcc_cv_have_decl_$ac_func=no"
351df804 11357fi
86da66b5 11358rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
11359fi
11360
11361if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11362 echo "$as_me:$LINENO: result: yes" >&5
11363echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11364#define $ac_tr_decl 1
ba479fd2
NN
11365_ACEOF
11366
351df804 11367else
ba479fd2
NN
11368 echo "$as_me:$LINENO: result: no" >&5
11369echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11370#define $ac_tr_decl 0
ba479fd2
NN
11371_ACEOF
11372
351df804
KG
11373fi
11374
11375done
ba479fd2 11376
351df804
KG
11377
11378
11379for ac_func in times
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. */
351df804
KG
11393#undef $ac_tr_decl
11394#define $ac_tr_decl 1
ba479fd2 11395
c1800ec8
ZW
11396#include "ansidecl.h"
11397#include "system.h"
11398#ifdef HAVE_SYS_TIMES_H
11399#include <sys/times.h>
11400#endif
11401
11402
ba479fd2
NN
11403int
11404main ()
11405{
c1800ec8
ZW
11406#ifndef $ac_func
11407char *(*pfn) = (char *(*)) $ac_func ;
11408#endif
ba479fd2
NN
11409 ;
11410 return 0;
11411}
11412_ACEOF
11413rm -f conftest.$ac_objext
11414if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11415 (eval $ac_compile) 2>conftest.er1
ba479fd2 11416 ac_status=$?
86da66b5
HPN
11417 grep -v '^ *+' conftest.er1 >conftest.err
11418 rm -f conftest.er1
11419 cat conftest.err >&5
ba479fd2
NN
11420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11421 (exit $ac_status); } &&
b095fe2c 11422 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11424 (eval $ac_try) 2>&5
11425 ac_status=$?
11426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11427 (exit $ac_status); }; } &&
11428 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11430 (eval $ac_try) 2>&5
11431 ac_status=$?
11432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11433 (exit $ac_status); }; }; then
c1800ec8
ZW
11434 eval "gcc_cv_have_decl_$ac_func=yes"
11435else
ba479fd2
NN
11436 echo "$as_me: failed program was:" >&5
11437sed 's/^/| /' conftest.$ac_ext >&5
11438
11439eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 11440fi
86da66b5 11441rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
11442fi
11443
11444if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11445 echo "$as_me:$LINENO: result: yes" >&5
11446echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11447#define $ac_tr_decl 1
ba479fd2
NN
11448_ACEOF
11449
c1800ec8 11450else
ba479fd2
NN
11451 echo "$as_me:$LINENO: result: no" >&5
11452echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11453#define $ac_tr_decl 0
ba479fd2
NN
11454_ACEOF
11455
c1800ec8
ZW
11456fi
11457
11458done
c1800ec8
ZW
11459
11460
11461# More time-related stuff.
ba479fd2
NN
11462echo "$as_me:$LINENO: checking for struct tms" >&5
11463echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
11464if test "${ac_cv_struct_tms+set}" = set; then
11465 echo $ECHO_N "(cached) $ECHO_C" >&6
11466else
11467
11468cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11469/* confdefs.h. */
11470_ACEOF
11471cat confdefs.h >>conftest.$ac_ext
11472cat >>conftest.$ac_ext <<_ACEOF
11473/* end confdefs.h. */
c1800ec8
ZW
11474
11475#include "ansidecl.h"
11476#include "system.h"
11477#ifdef HAVE_SYS_TIMES_H
11478#include <sys/times.h>
11479#endif
11480
ba479fd2
NN
11481int
11482main ()
11483{
c1800ec8 11484struct tms tms;
ba479fd2
NN
11485 ;
11486 return 0;
11487}
11488_ACEOF
11489rm -f conftest.$ac_objext
11490if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11491 (eval $ac_compile) 2>conftest.er1
ba479fd2 11492 ac_status=$?
86da66b5
HPN
11493 grep -v '^ *+' conftest.er1 >conftest.err
11494 rm -f conftest.er1
11495 cat conftest.err >&5
ba479fd2
NN
11496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11497 (exit $ac_status); } &&
b095fe2c 11498 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11500 (eval $ac_try) 2>&5
11501 ac_status=$?
11502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11503 (exit $ac_status); }; } &&
11504 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11506 (eval $ac_try) 2>&5
11507 ac_status=$?
11508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11509 (exit $ac_status); }; }; then
c1800ec8
ZW
11510 ac_cv_struct_tms=yes
11511else
ba479fd2
NN
11512 echo "$as_me: failed program was:" >&5
11513sed 's/^/| /' conftest.$ac_ext >&5
11514
11515ac_cv_struct_tms=no
c1800ec8 11516fi
86da66b5 11517rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11518fi
ba479fd2
NN
11519echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11520echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 11521if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
11522
11523cat >>confdefs.h <<\_ACEOF
c1800ec8 11524#define HAVE_STRUCT_TMS 1
ba479fd2 11525_ACEOF
c1800ec8
ZW
11526
11527fi
11528
11529# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11530# revisit after autoconf 2.50.
ba479fd2
NN
11531echo "$as_me:$LINENO: checking for clock_t" >&5
11532echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
11533if test "${gcc_cv_type_clock_t+set}" = set; then
11534 echo $ECHO_N "(cached) $ECHO_C" >&6
11535else
11536
11537cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11538/* confdefs.h. */
11539_ACEOF
11540cat confdefs.h >>conftest.$ac_ext
11541cat >>conftest.$ac_ext <<_ACEOF
11542/* end confdefs.h. */
c1800ec8
ZW
11543
11544#include "ansidecl.h"
11545#include "system.h"
11546
ba479fd2
NN
11547int
11548main ()
11549{
c1800ec8 11550clock_t x;
ba479fd2
NN
11551 ;
11552 return 0;
11553}
11554_ACEOF
11555rm -f conftest.$ac_objext
11556if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11557 (eval $ac_compile) 2>conftest.er1
ba479fd2 11558 ac_status=$?
86da66b5
HPN
11559 grep -v '^ *+' conftest.er1 >conftest.err
11560 rm -f conftest.er1
11561 cat conftest.err >&5
ba479fd2
NN
11562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11563 (exit $ac_status); } &&
b095fe2c 11564 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11566 (eval $ac_try) 2>&5
11567 ac_status=$?
11568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11569 (exit $ac_status); }; } &&
11570 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11572 (eval $ac_try) 2>&5
11573 ac_status=$?
11574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11575 (exit $ac_status); }; }; then
c1800ec8
ZW
11576 gcc_cv_type_clock_t=yes
11577else
ba479fd2
NN
11578 echo "$as_me: failed program was:" >&5
11579sed 's/^/| /' conftest.$ac_ext >&5
11580
11581gcc_cv_type_clock_t=no
c1800ec8 11582fi
86da66b5 11583rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11584fi
ba479fd2
NN
11585echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
11586echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 11587if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
11588
11589cat >>confdefs.h <<\_ACEOF
c1800ec8 11590#define HAVE_CLOCK_T 1
ba479fd2 11591_ACEOF
c1800ec8
ZW
11592
11593fi
11594
eb70d86d
AS
11595# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
11596CFLAGS="$saved_CFLAGS"
11597
07cf4226
DM
11598# Check whether --enable-initfini-array or --disable-initfini-array was given.
11599if test "${enable_initfini_array+set}" = set; then
11600 enableval="$enable_initfini_array"
ba479fd2 11601
07cf4226 11602else
ba479fd2
NN
11603
11604echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
11605echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
11606if test "${gcc_cv_initfini_array+set}" = set; then
11607 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 11608else
eb70d86d 11609 if test "$cross_compiling" = yes; then
918c4fe4 11610 gcc_cv_initfini_array=no
eb70d86d 11611else
ba479fd2 11612 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11613/* confdefs.h. */
11614_ACEOF
11615cat confdefs.h >>conftest.$ac_ext
11616cat >>conftest.$ac_ext <<_ACEOF
11617/* end confdefs.h. */
eb70d86d 11618
07cf4226
DM
11619static int x = -1;
11620int main (void) { return x; }
11621int foo (void) { x = 0; }
11622int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
11623_ACEOF
11624rm -f conftest$ac_exeext
11625if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11626 (eval $ac_link) 2>&5
11627 ac_status=$?
11628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11629 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11631 (eval $ac_try) 2>&5
11632 ac_status=$?
11633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11634 (exit $ac_status); }; }; then
918c4fe4 11635 gcc_cv_initfini_array=yes
eb70d86d 11636else
ba479fd2
NN
11637 echo "$as_me: program exited with status $ac_status" >&5
11638echo "$as_me: failed program was:" >&5
11639sed 's/^/| /' conftest.$ac_ext >&5
11640
11641( exit $ac_status )
11642gcc_cv_initfini_array=no
eb70d86d 11643fi
86da66b5 11644rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 11645fi
07cf4226 11646fi
ba479fd2
NN
11647echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
11648echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 11649 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 11650
ba479fd2 11651fi;
63cf211a 11652if test $enable_initfini_array = yes; then
ba479fd2
NN
11653
11654cat >>confdefs.h <<\_ACEOF
eb70d86d 11655#define HAVE_INITFINI_ARRAY 1
ba479fd2 11656_ACEOF
07cf4226 11657
eb70d86d 11658fi
81bf3d9e 11659
ba479fd2
NN
11660# mkdir takes a single argument on some systems.
11661echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
11662echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
11663if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
11664 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 11665else
ba479fd2 11666 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11667/* confdefs.h. */
11668_ACEOF
11669cat confdefs.h >>conftest.$ac_ext
11670cat >>conftest.$ac_ext <<_ACEOF
11671/* end confdefs.h. */
75923b2f
MK
11672
11673#include <sys/types.h>
11674#ifdef HAVE_SYS_STAT_H
11675# include <sys/stat.h>
11676#endif
11677#ifdef HAVE_UNISTD_H
11678# include <unistd.h>
11679#endif
11680#ifdef HAVE_DIRECT_H
11681# include <direct.h>
11682#endif
ba479fd2
NN
11683int
11684main ()
11685{
75923b2f 11686mkdir ("foo", 0);
ba479fd2
NN
11687 ;
11688 return 0;
11689}
11690_ACEOF
11691rm -f conftest.$ac_objext
11692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11693 (eval $ac_compile) 2>conftest.er1
ba479fd2 11694 ac_status=$?
86da66b5
HPN
11695 grep -v '^ *+' conftest.er1 >conftest.err
11696 rm -f conftest.er1
11697 cat conftest.err >&5
ba479fd2
NN
11698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11699 (exit $ac_status); } &&
b095fe2c 11700 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
11701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11702 (eval $ac_try) 2>&5
11703 ac_status=$?
11704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11705 (exit $ac_status); }; } &&
11706 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11708 (eval $ac_try) 2>&5
11709 ac_status=$?
11710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11711 (exit $ac_status); }; }; then
75923b2f
MK
11712 gcc_cv_mkdir_takes_one_arg=no
11713else
ba479fd2
NN
11714 echo "$as_me: failed program was:" >&5
11715sed 's/^/| /' conftest.$ac_ext >&5
11716
11717gcc_cv_mkdir_takes_one_arg=yes
75923b2f 11718fi
86da66b5 11719rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 11720fi
ba479fd2
NN
11721echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
11722echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 11723if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
11724
11725cat >>confdefs.h <<\_ACEOF
75923b2f 11726#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 11727_ACEOF
75923b2f
MK
11728
11729fi
11730
11731
861bb6c1
JL
11732# File extensions
11733manext='.1'
11734objext='.o'
11735
11736
11737
4977bab6
ZW
11738# With Setjmp/Longjmp based exception handling.
11739# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
11740if test "${enable_sjlj_exceptions+set}" = set; then
11741 enableval="$enable_sjlj_exceptions"
11742 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 11743
ba479fd2
NN
11744cat >>confdefs.h <<_ACEOF
11745#define CONFIG_SJLJ_EXCEPTIONS $sjlj
11746_ACEOF
4977bab6 11747
ba479fd2 11748fi;
4977bab6 11749
443728bb
L
11750# For platforms with the unwind ABI which includes an unwind library,
11751# libunwind, we can choose to use the system libunwind.
4977bab6 11752
443728bb
L
11753# Check whether --with-system-libunwind or --without-system-libunwind was given.
11754if test "${with_system_libunwind+set}" = set; then
11755 withval="$with_system_libunwind"
4977bab6 11756
ba479fd2 11757fi;
4977bab6 11758
34a86c2b
NN
11759# --------------------------------------------------------
11760# Build, host, and target specific configuration fragments
11761# --------------------------------------------------------
11762
5b28c537
NN
11763# Collect build-machine-specific information.
11764. ${srcdir}/config.build
11765
a89ea0df
NN
11766# Collect host-machine-specific information.
11767. ${srcdir}/config.host
11768
ef69da62 11769target_gtfiles=
a89ea0df
NN
11770
11771# Collect target-machine-specific information.
8ad9fb33 11772. ${srcdir}/config.gcc
861bb6c1
JL
11773
11774extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 11775extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
11776
11777# Default the target-machine variables that were not explicitly set.
75bffa71 11778if test x"$tm_file" = x
861bb6c1
JL
11779then tm_file=$cpu_type/$cpu_type.h; fi
11780
6b2adea9 11781if test x"$extra_headers" = x
861bb6c1
JL
11782then extra_headers=; fi
11783
75bffa71 11784if test x$md_file = x
e98e406f 11785then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 11786
75bffa71 11787if test x$out_file = x
861bb6c1
JL
11788then out_file=$cpu_type/$cpu_type.c; fi
11789
75bffa71 11790if test x"$tmake_file" = x
861bb6c1
JL
11791then tmake_file=$cpu_type/t-$cpu_type
11792fi
11793
90e6a802 11794if test x"$dwarf2" = xyes
756ee602 11795then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
11796fi
11797
861bb6c1 11798# Say what files are being used for the output code and MD file.
11642c3a 11799echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
11800echo "Using \`$srcdir/config/$md_file' as machine description file."
11801
11642c3a 11802# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
11803# about them and drop them.
11804
11642c3a
ZW
11805bx=
11806for x in $build_xm_file; do
11807 if test -f $srcdir/config/$x
11808 then bx="$bx $x"
ba479fd2
NN
11809 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11810echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11811 fi
11812done
11813build_xm_file="$bx"
11814
11815hx=
11816for x in $host_xm_file; do
11817 if test -f $srcdir/config/$x
11818 then hx="$hx $x"
ba479fd2
NN
11819 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11820echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11821 fi
11822done
11823host_xm_file="$hx"
11824
11825tx=
11826for x in $xm_file; do
11827 if test -f $srcdir/config/$x
11828 then tx="$tx $x"
ba479fd2
NN
11829 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11830echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11831 fi
11832done
11833xm_file="$tx"
11834
861bb6c1
JL
11835count=a
11836for f in $tm_file; do
11837 count=${count}x
11838done
75bffa71 11839if test $count = ax; then
861bb6c1
JL
11840 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
11841else
11842 echo "Using the following target machine macro files:"
11843 for f in $tm_file; do
11844 echo " $srcdir/config/$f"
11845 done
11846fi
11847
4977bab6 11848if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
11849
11850cat >>confdefs.h <<\_ACEOF
4977bab6 11851#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 11852_ACEOF
4977bab6
ZW
11853
11854fi
11855
99fa8911
AP
11856if test x$use_long_long_for_widest_fast_int = xyes; then
11857
11858cat >>confdefs.h <<\_ACEOF
11859#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
11860_ACEOF
11861
11862fi
11863
861bb6c1
JL
11864count=a
11865for f in $host_xm_file; do
11866 count=${count}x
11867done
11642c3a
ZW
11868if test $count = a; then
11869 :
11870elif test $count = ax; then
861bb6c1
JL
11871 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
11872else
11873 echo "Using the following host machine macro files:"
11874 for f in $host_xm_file; do
11875 echo " $srcdir/config/$f"
11876 done
11877fi
476d9098 11878echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 11879
75bffa71 11880if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
11881 count=a
11882 for f in $build_xm_file; do
11883 count=${count}x
11884 done
11642c3a
ZW
11885 if test $count = a; then
11886 :
11887 elif test $count = ax; then
861bb6c1
JL
11888 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
11889 else
11890 echo "Using the following build machine macro files:"
11891 for f in $build_xm_file; do
11892 echo " $srcdir/config/$f"
11893 done
11894 fi
11895fi
11896
8bb915b6
NN
11897# ---------
11898# Threading
11899# ---------
11900
c2e494a8 11901# Check if a valid thread package
615be2cf 11902case ${enable_threads} in
c2e494a8
NN
11903 "" | no)
11904 # No threads
11905 target_thread_file='single'
11906 ;;
11907 yes)
11908 # default
11909 target_thread_file='single'
11910 ;;
18167442 11911 aix | dce | gnat | irix | posix | posix95 | rtems | \
769e49eb 11912 single | solaris | vxworks | win32 )
615be2cf 11913 target_thread_file=${enable_threads}
c2e494a8
NN
11914 ;;
11915 *)
615be2cf 11916 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
11917 exit 1
11918 ;;
11919esac
11920
11921if test x${thread_file} = x; then
11922 # No thread file set by target-specific clauses in config.gcc,
11923 # so use file chosen by default logic above
11924 thread_file=${target_thread_file}
861bb6c1
JL
11925fi
11926
8bb915b6
NN
11927# Make gthr-default.h if we have a thread file.
11928gthread_flags=
11929if test $thread_file != single; then
11930 rm -f gthr-default.h
11931 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
11932 gthread_flags=-DHAVE_GTHR_DEFAULT
11933fi
11934
11935
11936# --------
11937# UNSORTED
11938# --------
11939
18fbf599 11940use_cxa_atexit=no
2121a768
JT
11941if test x$enable___cxa_atexit = xyes || \
11942 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599
PB
11943 if test x$host = x$target; then
11944 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
354b7da5
DH
11945echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
11946if test "${ac_cv_func___cxa_atexit+set}" = set; then
11947 echo $ECHO_N "(cached) $ECHO_C" >&6
11948else
11949 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
11950/* confdefs.h. */
11951_ACEOF
11952cat confdefs.h >>conftest.$ac_ext
11953cat >>conftest.$ac_ext <<_ACEOF
11954/* end confdefs.h. */
86da66b5
HPN
11955/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
11956 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11957#define __cxa_atexit innocuous___cxa_atexit
11958
354b7da5
DH
11959/* System header to define __stub macros and hopefully few prototypes,
11960 which can conflict with char __cxa_atexit (); below.
11961 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11962 <limits.h> exists even on freestanding compilers. */
86da66b5 11963
354b7da5
DH
11964#ifdef __STDC__
11965# include <limits.h>
11966#else
11967# include <assert.h>
11968#endif
86da66b5
HPN
11969
11970#undef __cxa_atexit
11971
354b7da5
DH
11972/* Override any gcc2 internal prototype to avoid an error. */
11973#ifdef __cplusplus
11974extern "C"
11975{
11976#endif
11977/* We use char because int might match the return type of a gcc2
11978 builtin and then its argument prototype would still apply. */
11979char __cxa_atexit ();
11980/* The GNU C library defines this for functions which it implements
11981 to always fail with ENOSYS. Some functions are actually named
11982 something starting with __ and the normal name is an alias. */
11983#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
11984choke me
11985#else
11986char (*f) () = __cxa_atexit;
11987#endif
11988#ifdef __cplusplus
11989}
11990#endif
11991
11992int
11993main ()
11994{
11995return f != __cxa_atexit;
11996 ;
11997 return 0;
11998}
11999_ACEOF
12000rm -f conftest.$ac_objext conftest$ac_exeext
12001if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12002 (eval $ac_link) 2>conftest.er1
354b7da5 12003 ac_status=$?
86da66b5
HPN
12004 grep -v '^ *+' conftest.er1 >conftest.err
12005 rm -f conftest.er1
12006 cat conftest.err >&5
354b7da5
DH
12007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12008 (exit $ac_status); } &&
b095fe2c 12009 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
12010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12011 (eval $ac_try) 2>&5
12012 ac_status=$?
12013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12014 (exit $ac_status); }; } &&
12015 { ac_try='test -s conftest$ac_exeext'
354b7da5
DH
12016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12017 (eval $ac_try) 2>&5
12018 ac_status=$?
12019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12020 (exit $ac_status); }; }; then
12021 ac_cv_func___cxa_atexit=yes
12022else
12023 echo "$as_me: failed program was:" >&5
12024sed 's/^/| /' conftest.$ac_ext >&5
12025
12026ac_cv_func___cxa_atexit=no
12027fi
86da66b5
HPN
12028rm -f conftest.err conftest.$ac_objext \
12029 conftest$ac_exeext conftest.$ac_ext
354b7da5
DH
12030fi
12031echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12032echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
12033if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
12034 use_cxa_atexit=yes
12035else
12036 echo "__cxa_atexit can't be enabled on this target"
12037fi
12038
12039 else
12040 # We can't check for __cxa_atexit when building a cross, so assume
12041 # it is available
12042 use_cxa_atexit=yes
12043 fi
12044 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
12045
12046cat >>confdefs.h <<\_ACEOF
2121a768 12047#define DEFAULT_USE_CXA_ATEXIT 1
ba479fd2 12048_ACEOF
2121a768 12049
18fbf599 12050 fi
2121a768
JT
12051fi
12052
a5381466 12053# Look for a file containing extra machine modes.
1c0ca89d
ZW
12054if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12055 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
12056
12057
12058cat >>confdefs.h <<_ACEOF
e22340b0 12059#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 12060_ACEOF
a5381466
ZW
12061
12062fi
12063
75685792
RS
12064# Convert extra_options into a form suitable for Makefile use.
12065extra_opt_files=
12066for f in $extra_options; do
12067 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12068done
12069
12070
b7cb92ad 12071# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 12072# the first file included by config.h.
4977bab6 12073# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 12074# as well. If host!=build, we are in error and need to do more
db81d74a 12075# work to find out the build config parameters.
75bffa71 12076if test x$host = x$build
db81d74a 12077then
eaf4e618 12078 build_auto=auto-host.h
b7cb92ad
JL
12079else
12080 # We create a subdir, then run autoconf in the subdir.
12081 # To prevent recursion we set host and build for the new
12082 # invocation of configure to the build for this invocation
ba479fd2 12083 # of configure.
b7cb92ad
JL
12084 tempdir=build.$$
12085 rm -rf $tempdir
12086 mkdir $tempdir
12087 cd $tempdir
12088 case ${srcdir} in
255b8a49 12089 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
12090 *) realsrcdir=../${srcdir};;
12091 esac
d920e825
L
12092 saved_CFLAGS="${CFLAGS}"
12093 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12094 ${realsrcdir}/configure \
33e70558 12095 --enable-languages=${enable_languages-all} \
534d0cc0 12096 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 12097 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
12098
12099 # We just finished tests for the build machine, so rename
12100 # the file auto-build.h in the gcc directory.
12101 mv auto-host.h ../auto-build.h
12102 cd ..
12103 rm -rf $tempdir
eaf4e618 12104 build_auto=auto-build.h
db81d74a
RH
12105fi
12106
06f0b04c 12107
eaf4e618 12108tm_file="${tm_file} defaults.h"
4977bab6
ZW
12109tm_p_file="${tm_p_file} tm-preds.h"
12110host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12111build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 12112# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477
KG
12113# put this back in temporarily.
12114xm_file="ansidecl.h ${xm_file}"
0056a9b5 12115
34a86c2b
NN
12116# --------
12117# UNSORTED
12118# --------
12119
cc1e60ea 12120# Compile in configure arguments.
8105825d 12121if test -f configargs.h ; then
cc1e60ea 12122 # Being re-configured.
022dae81 12123 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
12124 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12125else
12126 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12127fi
eeae7b41
DJ
12128
12129# Double all backslashes and backslash all quotes to turn
12130# gcc_config_arguments into a C string.
12131sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12132$gcc_config_arguments
12133EOF
12134gcc_config_arguments_str=`cat conftest.out`
12135rm -f conftest.out
12136
cc1e60ea
JM
12137cat > configargs.h <<EOF
12138/* Generated automatically. */
eeae7b41 12139static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 12140static const char thread_model[] = "$thread_file";
7816bea0
DJ
12141
12142static const struct {
12143 const char *name, *value;
12144} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
12145EOF
12146
ab87f8c8
JL
12147# Internationalization
12148PACKAGE=gcc
12149VERSION="$gcc_version"
861bb6c1 12150
c2c36d38
MK
12151cat >>confdefs.h <<_ACEOF
12152#define PACKAGE "$PACKAGE"
12153_ACEOF
12154
12155
ab87f8c8
JL
12156
12157
56694dd9
ZW
12158# If we haven't got the data from the intl directory,
12159# assume NLS is disabled.
ba479fd2
NN
12160USE_NLS=no
12161LIBINTL=
12162LIBINTL_DEP=
12163INCINTL=
12164XGETTEXT=
12165GMSGFMT=
12166POSUB=
56694dd9
ZW
12167if test -f ../intl/config.intl; then
12168 . ../intl/config.intl
093e61a6 12169fi
ba479fd2
NN
12170echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12171echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
56694dd9 12172if test x"$USE_NLS" != xyes; then
ba479fd2
NN
12173 echo "$as_me:$LINENO: result: no" >&5
12174echo "${ECHO_T}no" >&6
56694dd9 12175else
ba479fd2
NN
12176 echo "$as_me:$LINENO: result: yes" >&5
12177echo "${ECHO_T}yes" >&6
12178
12179cat >>confdefs.h <<\_ACEOF
56694dd9 12180#define ENABLE_NLS 1
ba479fd2 12181_ACEOF
56694dd9 12182
093e61a6 12183
ba479fd2
NN
12184 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12185echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
56694dd9 12186 # Look for .po and .gmo files in the source directory.
ba479fd2 12187 CATALOGS=
56694dd9
ZW
12188 XLINGUAS=
12189 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12190 # If there aren't any .gmo files the shell will give us the
12191 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12192 # weeded out.
12193 case "$cat" in *\**)
12194 continue;;
12195 esac
12196 # The quadruple backslash is collapsed to a double backslash
12197 # by the backticks, then collapsed again by the double quotes,
12198 # leaving us with one backslash in the sed expression (right
12199 # before the dot that mustn't act as a wildcard).
12200 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
12201 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
12202 # The user is allowed to set LINGUAS to a list of languages to
12203 # install catalogs for. If it's empty that means "all of them."
12204 if test "x$LINGUAS" = x; then
12205 CATALOGS="$CATALOGS $cat"
12206 XLINGUAS="$XLINGUAS $lang"
12207 else
12208 case "$LINGUAS" in *$lang*)
12209 CATALOGS="$CATALOGS $cat"
12210 XLINGUAS="$XLINGUAS $lang"
12211 ;;
12212 esac
12213 fi
12214 done
12215 LINGUAS="$XLINGUAS"
ba479fd2
NN
12216 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12217echo "${ECHO_T}$LINGUAS" >&6
56694dd9 12218fi
861bb6c1 12219
56694dd9
ZW
12220# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12221# -liconv on the link line twice.
12222case "$LIBINTL" in *$LIBICONV*)
12223 LIBICONV= ;;
12224esac
dc6746e7 12225
56694dd9
ZW
12226# Windows32 Registry support for specifying GCC installation paths.
12227# Check whether --enable-win32-registry or --disable-win32-registry was given.
12228if test "${enable_win32_registry+set}" = set; then
12229 enableval="$enable_win32_registry"
dc6746e7 12230
ba479fd2 12231fi;
56694dd9
ZW
12232case $host_os in
12233 win32 | pe | cygwin* | mingw32* | uwin*)
ba479fd2
NN
12234echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5
12235echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6
56694dd9 12236if test "x$enable_win32_registry" != xno; then
ba479fd2
NN
12237
12238cat >>confdefs.h <<\_ACEOF
56694dd9 12239#define ENABLE_WIN32_REGISTRY 1
ba479fd2
NN
12240_ACEOF
12241
12242 echo "$as_me:$LINENO: result: yes" >&5
12243echo "${ECHO_T}yes" >&6
12244 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
12245echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
12246if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12247 echo $ECHO_N "(cached) $ECHO_C" >&6
12248else
12249 ac_func_search_save_LIBS=$LIBS
12250ac_cv_search_RegOpenKeyExA=no
12251cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12252/* confdefs.h. */
12253_ACEOF
12254cat confdefs.h >>conftest.$ac_ext
12255cat >>conftest.$ac_ext <<_ACEOF
12256/* end confdefs.h. */
861bb6c1 12257
ab87f8c8 12258/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12259#ifdef __cplusplus
12260extern "C"
12261#endif
ab87f8c8 12262/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12263 builtin and then its argument prototype would still apply. */
12264char RegOpenKeyExA ();
12265int
12266main ()
12267{
12268RegOpenKeyExA ();
12269 ;
12270 return 0;
12271}
12272_ACEOF
12273rm -f conftest.$ac_objext conftest$ac_exeext
12274if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12275 (eval $ac_link) 2>conftest.er1
ba479fd2 12276 ac_status=$?
86da66b5
HPN
12277 grep -v '^ *+' conftest.er1 >conftest.err
12278 rm -f conftest.er1
12279 cat conftest.err >&5
ba479fd2
NN
12280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12281 (exit $ac_status); } &&
b095fe2c 12282 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
12283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12284 (eval $ac_try) 2>&5
12285 ac_status=$?
12286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12287 (exit $ac_status); }; } &&
12288 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12290 (eval $ac_try) 2>&5
12291 ac_status=$?
12292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12293 (exit $ac_status); }; }; then
56694dd9 12294 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 12295else
ba479fd2
NN
12296 echo "$as_me: failed program was:" >&5
12297sed 's/^/| /' conftest.$ac_ext >&5
12298
861bb6c1 12299fi
86da66b5
HPN
12300rm -f conftest.err conftest.$ac_objext \
12301 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
12302if test "$ac_cv_search_RegOpenKeyExA" = no; then
12303 for ac_lib in advapi32; do
12304 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12305 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12306/* confdefs.h. */
12307_ACEOF
12308cat confdefs.h >>conftest.$ac_ext
12309cat >>conftest.$ac_ext <<_ACEOF
12310/* end confdefs.h. */
12311
56694dd9 12312/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12313#ifdef __cplusplus
12314extern "C"
12315#endif
56694dd9 12316/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12317 builtin and then its argument prototype would still apply. */
12318char RegOpenKeyExA ();
12319int
12320main ()
12321{
12322RegOpenKeyExA ();
12323 ;
12324 return 0;
12325}
12326_ACEOF
12327rm -f conftest.$ac_objext conftest$ac_exeext
12328if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12329 (eval $ac_link) 2>conftest.er1
ba479fd2 12330 ac_status=$?
86da66b5
HPN
12331 grep -v '^ *+' conftest.er1 >conftest.err
12332 rm -f conftest.er1
12333 cat conftest.err >&5
ba479fd2
NN
12334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12335 (exit $ac_status); } &&
b095fe2c 12336 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
86da66b5
HPN
12337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12338 (eval $ac_try) 2>&5
12339 ac_status=$?
12340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12341 (exit $ac_status); }; } &&
12342 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12344 (eval $ac_try) 2>&5
12345 ac_status=$?
12346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12347 (exit $ac_status); }; }; then
12348 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 12349break
861bb6c1 12350else
ba479fd2
NN
12351 echo "$as_me: failed program was:" >&5
12352sed 's/^/| /' conftest.$ac_ext >&5
12353
861bb6c1 12354fi
86da66b5
HPN
12355rm -f conftest.err conftest.$ac_objext \
12356 conftest$ac_exeext conftest.$ac_ext
ba479fd2 12357 done
6e3f3080 12358fi
ba479fd2
NN
12359LIBS=$ac_func_search_save_LIBS
12360fi
12361echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
12362echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
12363if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 12364 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 12365
ab87f8c8 12366fi
ba479fd2 12367
cafe096b 12368else
ba479fd2
NN
12369 echo "$as_me:$LINENO: result: no" >&5
12370echo "${ECHO_T}no" >&6
093e61a6 12371fi
ab87f8c8 12372
56694dd9
ZW
12373# Check if user specified a different registry key.
12374case "x${enable_win32_registry}" in
12375x | xyes)
12376 # default.
12377 gcc_cv_win32_registry_key="$VERSION"
12378 ;;
12379xno)
12380 # no registry lookup.
12381 gcc_cv_win32_registry_key=''
12382 ;;
12383*)
12384 # user-specified key.
12385 gcc_cv_win32_registry_key="$enable_win32_registry"
12386 ;;
12387esac
ab87f8c8 12388
56694dd9 12389if test "x$enable_win32_registry" != xno; then
ba479fd2
NN
12390 echo "$as_me:$LINENO: checking registry key on windows hosts" >&5
12391echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6
12392
12393cat >>confdefs.h <<_ACEOF
56694dd9 12394#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
ba479fd2 12395_ACEOF
cafe096b 12396
ba479fd2
NN
12397 echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5
12398echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6
093e61a6 12399fi
56694dd9
ZW
12400;;
12401esac
ab87f8c8 12402
56694dd9
ZW
12403# Get an absolute path to the GCC top-level source directory
12404holddir=`${PWDCMD-pwd}`
12405cd $srcdir
12406topdir=`${PWDCMD-pwd}`
12407cd $holddir
ab87f8c8 12408
56694dd9 12409# Conditionalize the makefile for this host machine.
2ed26f6b 12410xmake_file=
c406e779 12411for f in ${host_xmake_file}
56694dd9
ZW
12412do
12413 if test -f ${srcdir}/config/$f
12414 then
2ed26f6b 12415 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
12416 fi
12417done
093e61a6 12418
56694dd9 12419# Conditionalize the makefile for this target machine.
2ed26f6b 12420tmake_file_=
c406e779 12421for f in ${tmake_file}
56694dd9
ZW
12422do
12423 if test -f ${srcdir}/config/$f
12424 then
2ed26f6b 12425 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
12426 fi
12427done
2ed26f6b 12428tmake_file="${tmake_file_}"
71a94577 12429
ab87f8c8
JL
12430# If the host doesn't support symlinks, modify CC in
12431# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
12432# Otherwise, we can use "CC=$(CC)".
12433rm -f symtest.tem
35f06ae4
PB
12434case "$LN_S" in
12435 *-s*)
12436 cc_set_by_configure="\$(CC)"
12437 quoted_cc_set_by_configure="\$(CC)"
12438 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12439 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12440 ;;
12441 *)
12442 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
12443 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
12444 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
12445 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
12446 ;;
12447esac
ab87f8c8 12448
5395b47b
NN
12449# This is a terrible hack which will go away some day.
12450host_cc_for_libada=${CC}
1e3fad21
NN
12451
12452
ab87f8c8
JL
12453out_object_file=`basename $out_file .c`.o
12454
75685792
RS
12455tm_file_list="options.h"
12456tm_include_list="options.h"
ab87f8c8 12457for f in $tm_file; do
64ccbc99 12458 case $f in
d02af173 12459 defaults.h )
e22340b0
ZW
12460 tm_file_list="${tm_file_list} \$(srcdir)/$f"
12461 tm_include_list="${tm_include_list} $f"
12462 ;;
12463 * )
12464 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
12465 tm_include_list="${tm_include_list} config/$f"
12466 ;;
64ccbc99 12467 esac
ab87f8c8
JL
12468done
12469
11642c3a 12470tm_p_file_list=
e22340b0 12471tm_p_include_list=
11642c3a 12472for f in $tm_p_file; do
4977bab6
ZW
12473 case $f in
12474 tm-preds.h )
e22340b0
ZW
12475 tm_p_file_list="${tm_p_file_list} $f"
12476 tm_p_include_list="${tm_p_include_list} $f"
12477 ;;
12478 * )
12479 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
12480 tm_p_include_list="${tm_p_include_list} config/$f"
12481 esac
12482done
12483
12484xm_file_list=
12485xm_include_list=
12486for f in $xm_file; do
12487 case $f in
12488 ansidecl.h )
12489 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
12490 xm_include_list="${xm_include_list} $f"
12491 ;;
12492 auto-host.h )
12493 xm_file_list="${xm_file_list} $f"
12494 xm_include_list="${xm_include_list} $f"
12495 ;;
12496 * )
12497 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
12498 xm_include_list="${xm_include_list} config/$f"
12499 ;;
4977bab6 12500 esac
11642c3a
ZW
12501done
12502
ab87f8c8 12503host_xm_file_list=
e22340b0 12504host_xm_include_list=
ab87f8c8 12505for f in $host_xm_file; do
64ccbc99 12506 case $f in
d02af173 12507 ansidecl.h )
e22340b0
ZW
12508 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
12509 host_xm_include_list="${host_xm_include_list} $f"
12510 ;;
e2500fed 12511 auto-host.h )
e22340b0
ZW
12512 host_xm_file_list="${host_xm_file_list} $f"
12513 host_xm_include_list="${host_xm_include_list} $f"
12514 ;;
12515 * )
12516 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
12517 host_xm_include_list="${host_xm_include_list} config/$f"
12518 ;;
64ccbc99 12519 esac
ab87f8c8
JL
12520done
12521
12522build_xm_file_list=
12523for f in $build_xm_file; do
64ccbc99 12524 case $f in
d02af173 12525 ansidecl.h )
e22340b0
ZW
12526 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
12527 build_xm_include_list="${build_xm_include_list} $f"
12528 ;;
e2500fed 12529 auto-build.h | auto-host.h )
e22340b0
ZW
12530 build_xm_file_list="${build_xm_file_list} $f"
12531 build_xm_include_list="${build_xm_include_list} $f"
12532 ;;
12533 * )
12534 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
12535 build_xm_include_list="${build_xm_include_list} config/$f"
12536 ;;
64ccbc99 12537 esac
ab87f8c8
JL
12538done
12539
a078a589
ZW
12540# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
12541# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
12542CROSS=
12543ALL=all.internal
12544SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
12545if test x$host != x$target
12546then
a078a589
ZW
12547 CROSS="-DCROSS_COMPILE"
12548 ALL=all.cross
12549 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
343f59d9 12550 case "$host","$target" in
3a7e8b87
GK
12551 # Darwin crosses can use the host system's libraries and headers,
12552 # because of the fat library support. Of course, it must be the
12553 # same version of Darwin on both sides. Allow the user to
12554 # just say --target=foo-darwin without a version number to mean
12555 # "the version on this system".
12556 *-*-darwin*,*-*-darwin*)
12557 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
12558 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
12559 if test $hostos = $targetos -o $targetos = darwin ; then
12560 CROSS=
12561 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
12562 with_headers=yes
12563 fi
12564 ;;
12565
343f59d9
AM
12566 i?86-*-*,x86_64-*-* \
12567 | powerpc*-*-*,powerpc64*-*-*)
12568 CROSS="$CROSS -DNATIVE_CROSS" ;;
12569 esac
7a615b25
AO
12570elif test "x$TARGET_SYSTEM_ROOT" != x; then
12571 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
12572 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
12573fi
12574
b39d221a
EC
12575# If this is a cross-compiler that does not
12576# have its own set of headers then define
12577# inhibit_libc
12578
dc06db20
R
12579# If this is using newlib, without having the headers available now,
12580# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
12581# This prevents libgcc2 from containing any code which requires libc
12582# support.
b39d221a 12583inhibit_libc=
dc06db20
R
12584if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
12585 test x$with_newlib = xyes ; } &&
e50084fa 12586 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
b39d221a 12587 inhibit_libc=-Dinhibit_libc
b39d221a
EC
12588fi
12589
12590
a078a589
ZW
12591# When building gcc with a cross-compiler, we need to adjust things so
12592# that the generator programs are still built with the native compiler.
12593# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
12594
12595# These are the normal (build=host) settings:
ba479fd2
NN
12596CC_FOR_BUILD='$(CC)'
12597BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 12598STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
12599
12600# Possibly disable fixproto, on a per-target basis.
12601case ${use_fixproto} in
12602 no)
12603 STMP_FIXPROTO=
12604 ;;
12605 yes)
12606 STMP_FIXPROTO=stmp-fixproto
12607 ;;
12608esac
12609
a078a589 12610
83599948
NS
12611# And these apply if build != host, or we are generating coverage data
12612if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 12613then
b11e4747 12614 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 12615
7a615b25 12616 if test "x$TARGET_SYSTEM_ROOT" = x; then
de253ca4
GK
12617 if "x$STMP_FIXPROTO" != x ; then
12618 STMP_FIXPROTO=stmp-install-fixproto
12619 fi
7a615b25 12620 fi
ab87f8c8
JL
12621fi
12622
12623# Expand extra_headers to include complete path.
12624# This substitutes for lots of t-* files.
12625extra_headers_list=
b1ef58c8
NN
12626# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
12627for file in ${extra_headers} ; do
12628 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
12629done
ab87f8c8 12630
c38f02df
ILT
12631# Define collect2 in Makefile.
12632case $host_can_use_collect2 in
12633 no) collect2= ;;
12634 *) collect2='collect2$(exeext)' ;;
12635esac
12636
12637
ab87f8c8 12638# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
12639case $use_collect2 in
12640 no) use_collect2= ;;
12641 "") ;;
ba479fd2 12642 *)
34a86c2b
NN
12643 host_xm_defines="${host_xm_defines} USE_COLLECT2"
12644 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
12645 case $host_can_use_collect2 in
12646 no)
12647 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
12648echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
12649 { (exit 1); exit 1; }; }
12650 ;;
12651 esac
34a86c2b
NN
12652 ;;
12653esac
ab87f8c8 12654
8bb915b6
NN
12655# ---------------------------
12656# Assembler & linker features
12657# ---------------------------
12658
d869a8c4
NN
12659# Identify the assembler which will work hand-in-glove with the newly
12660# built GCC, so that we can examine its features. This is the assembler
12661# which will be driven by the driver program.
12662#
12663# If build != host, and we aren't building gas in-tree, we identify a
12664# build->target assembler and hope that it will have the same features
12665# as the host->target assembler we'll be using.
ba479fd2
NN
12666echo "$as_me:$LINENO: checking what assembler to use" >&5
12667echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
34a86c2b 12668in_tree_gas=no
ab87f8c8 12669gcc_cv_as=
981d4858
JM
12670gcc_cv_gas_major_version=
12671gcc_cv_gas_minor_version=
ab87f8c8
JL
12672gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
12673if test -x "$DEFAULT_ASSEMBLER"; then
12674 gcc_cv_as="$DEFAULT_ASSEMBLER"
57991eba 12675elif test -x as$build_exeext; then
ab87f8c8 12676 # Build using assembler in the current directory.
57991eba 12677 gcc_cv_as=./as$build_exeext
34a86c2b 12678elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
12679 && test -f ../gas/Makefile \
12680 && test x$build = x$host; then
12681 # Single tree build which includes gas. We want to prefer it
12682 # over whatever linker top-level may have detected, since
12683 # we'll use what we're building after installation anyway.
ad9c4d9f
NN
12684 in_tree_gas=yes
12685 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
12686for f in $gcc_cv_as_bfd_srcdir/configure \
12687 $gcc_cv_as_gas_srcdir/configure \
12688 $gcc_cv_as_gas_srcdir/configure.in \
12689 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 12690 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
12691 if test x$gcc_cv_gas_version != x; then
12692 break
12693 fi
12694done
12695gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
12696gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
12697gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
12698case $gcc_cv_gas_patch_version in
12699 "") gcc_cv_gas_patch_version="0" ;;
12700esac
8ada417f
ZW
12701gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
12702 + $gcc_cv_gas_minor_version \) \* 1000 \
12703 + $gcc_cv_gas_patch_version`
ad9c4d9f 12704
57991eba
PB
12705 rm -f as$build_exeext
12706 $LN_S ../gas/as-new$build_exeext as$build_exeext 2>/dev/null
5408ac6c
HPN
12707 in_tree_gas_is_elf=no
12708 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
12709 || (grep 'obj_format = multi' ../gas/Makefile \
12710 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
12711 then
12712 in_tree_gas_is_elf=yes
12713 fi
08d105fa
AO
12714elif test -x "$AS_FOR_TARGET"; then
12715 gcc_cv_as="$AS_FOR_TARGET"
12716elif test -x "$AS" && test x$host = x$target; then
12717 gcc_cv_as="$AS"
981d4858 12718fi
9e423e6d 12719
534d0cc0 12720if test "x$gcc_cv_as" = x; then
779243f7
JL
12721 # Search the same directories that the installed compiler will
12722 # search. Else we may find the wrong assembler and lose. If we
12723 # do not find a suitable assembler binary, then try the user's
12724 # path.
12725 #
12726 # Also note we have to check MD_EXEC_PREFIX before checking the
12727 # user's path. Unfortunately, there is no good way to get at the
12728 # value of MD_EXEC_PREFIX here. So we do a brute force search
12729 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
12730 # to be fixed as part of the make/configure rewrite too.
12731
12732 if test "x$exec_prefix" = xNONE; then
12733 if test "x$prefix" = xNONE; then
12734 test_prefix=/usr/local
12735 else
12736 test_prefix=$prefix
12737 fi
12738 else
12739 test_prefix=$exec_prefix
12740 fi
12741
12742 # If the loop below does not find an assembler, then use whatever
b095fe2c
DJ
12743 # one we can find in the users's path. We are looking for a
12744 # ${build} -> ${target} assembler.
55a2ea2a 12745 if test "x$program_prefix" != xNONE; then
57991eba 12746 gcc_cv_as=${program_prefix}as$build_exeext
b095fe2c
DJ
12747 elif test x$build != x$host && test x$build != x$target; then
12748 gcc_cv_as=${target_noncanonical}-as$build_exeext
55a2ea2a 12749 else
57991eba 12750 gcc_cv_as=`echo as | sed "${program_transform_name}"`$build_exeext
55a2ea2a
AM
12751 fi
12752
21addcd9
PB
12753 if test x$host = x$build; then
12754 test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
12755 $test_prefix/libexec/gcc/$target_noncanonical \
12756 /usr/lib/gcc/$target_noncanonical/$gcc_version \
12757 /usr/lib/gcc/$target_noncanonical \
12758 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
12759 $test_prefix/$target_noncanonical/bin"
12760 else
12761 test_dirs=
12762 fi
55a2ea2a 12763
b095fe2c 12764 if test x$build = x$target; then
55a2ea2a 12765 test_dirs="$test_dirs \
779243f7
JL
12766 /usr/libexec \
12767 /usr/ccs/gcc \
12768 /usr/ccs/bin \
12769 /udk/usr/ccs/bin \
12770 /bsd43/usr/lib/cmplrs/cc \
12771 /usr/cross64/usr/bin \
12772 /usr/lib/cmplrs/cc \
12773 /sysv/usr/lib/cmplrs/cc \
12774 /svr4/usr/lib/cmplrs/cc \
12775 /usr/bin"
55a2ea2a 12776 fi
779243f7
JL
12777
12778 for dir in $test_dirs; do
57991eba
PB
12779 if test -x $dir/as$build_exeext; then
12780 gcc_cv_as=$dir/as$build_exeext
779243f7
JL
12781 break;
12782 fi
12783 done
9e423e6d 12784fi
34a86c2b
NN
12785case $in_tree_gas in
12786 yes)
ba479fd2
NN
12787 echo "$as_me:$LINENO: result: \"newly built gas\"" >&5
12788echo "${ECHO_T}\"newly built gas\"" >&6
34a86c2b
NN
12789 ;;
12790 no)
ba479fd2
NN
12791 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
12792echo "${ECHO_T}$gcc_cv_as" >&6
34a86c2b
NN
12793 ;;
12794esac
981d4858 12795
d869a8c4
NN
12796# Identify the linker which will work hand-in-glove with the newly
12797# built GCC, so that we can examine its features. This is the linker
12798# which will be driven by the driver program.
12799#
12800# If build != host, and we aren't building gas in-tree, we identify a
12801# build->target linker and hope that it will have the same features
12802# as the host->target linker we'll be using.
ba479fd2
NN
12803echo "$as_me:$LINENO: checking what linker to use" >&5
12804echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
34a86c2b 12805in_tree_ld=no
275b60d6
JJ
12806gcc_cv_ld=
12807gcc_cv_gld_major_version=
12808gcc_cv_gld_minor_version=
12809gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
12810gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
12811if test -x "$DEFAULT_LINKER"; then
12812 gcc_cv_ld="$DEFAULT_LINKER"
57991eba 12813elif test -x collect-ld$build_exeext; then
275b60d6 12814 # Build using linker in the current directory.
57991eba 12815 gcc_cv_ld=./collect-ld$build_exeext
34a86c2b 12816elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
08d105fa
AO
12817 && test -f ../ld/Makefile \
12818 && test x$build = x$host; then
12819 # Single tree build which includes ld. We want to prefer it
12820 # over whatever linker top-level may have detected, since
12821 # we'll use what we're building after installation anyway.
34a86c2b 12822 in_tree_ld=yes
5408ac6c
HPN
12823 in_tree_ld_is_elf=no
12824 if (grep 'EMUL = .*elf' ../ld/Makefile \
8a45d680
AN
12825 || grep 'EMUL = .*linux' ../ld/Makefile \
12826 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
5408ac6c
HPN
12827 in_tree_ld_is_elf=yes
12828 fi
275b60d6
JJ
12829 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
12830 do
58ea87a9 12831 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
275b60d6
JJ
12832 if test x$gcc_cv_gld_version != x; then
12833 break
12834 fi
12835 done
12836 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
12837 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
57991eba
PB
12838 rm -f collect-ld$build_exeext
12839 $LN_S ../ld/ld-new$build_exeext collect-ld$build_exeext 2>/dev/null
08d105fa
AO
12840elif test -x "$LD_FOR_TARGET"; then
12841 gcc_cv_ld="$LD_FOR_TARGET"
12842elif test -x "$LD" && test x$host = x$target; then
12843 gcc_cv_ld="$LD"
275b60d6
JJ
12844fi
12845
534d0cc0 12846if test "x$gcc_cv_ld" = x; then
275b60d6
JJ
12847 # Search the same directories that the installed compiler will
12848 # search. Else we may find the wrong linker and lose. If we
12849 # do not find a suitable linker binary, then try the user's
12850 # path.
12851 #
12852 # Also note we have to check MD_EXEC_PREFIX before checking the
12853 # user's path. Unfortunately, there is no good way to get at the
12854 # value of MD_EXEC_PREFIX here. So we do a brute force search
12855 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
12856 # to be fixed as part of the make/configure rewrite too.
12857
12858 if test "x$exec_prefix" = xNONE; then
12859 if test "x$prefix" = xNONE; then
12860 test_prefix=/usr/local
12861 else
12862 test_prefix=$prefix
12863 fi
12864 else
12865 test_prefix=$exec_prefix
12866 fi
12867
b095fe2c
DJ
12868 # If the loop below does not find a linker, then use whatever
12869 # one we can find in the users's path. We are looking for a
12870 # ${build} -> ${target} linker.
55a2ea2a 12871 if test "x$program_prefix" != xNONE; then
57991eba 12872 gcc_cv_ld=${program_prefix}ld$build_exeext
b095fe2c
DJ
12873 elif test x$build != x$host && test x$build != x$target; then
12874 gcc_cv_ld=${target_noncanonical}-ld$build_exeext
55a2ea2a 12875 else
57991eba 12876 gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$build_exeext
55a2ea2a
AM
12877 fi
12878
21addcd9
PB
12879 if test x$host = x$build; then
12880 test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
12881 $test_prefix/libexec/gcc/$target_noncanonical \
12882 /usr/lib/gcc/$target_noncanonical/$gcc_version \
12883 /usr/lib/gcc/$target_noncanonical \
12884 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
12885 $test_prefix/$target_noncanonical/bin"
12886 else
12887 test_dirs=
12888 fi
55a2ea2a 12889
b095fe2c 12890 if test x$build = x$target; then
55a2ea2a 12891 test_dirs="$test_dirs \
275b60d6
JJ
12892 /usr/libexec \
12893 /usr/ccs/gcc \
12894 /usr/ccs/bin \
12895 /udk/usr/ccs/bin \
12896 /bsd43/usr/lib/cmplrs/cc \
12897 /usr/cross64/usr/bin \
12898 /usr/lib/cmplrs/cc \
12899 /sysv/usr/lib/cmplrs/cc \
12900 /svr4/usr/lib/cmplrs/cc \
12901 /usr/bin"
55a2ea2a 12902 fi
275b60d6
JJ
12903
12904 for dir in $test_dirs; do
57991eba
PB
12905 if test -x $dir/ld$build_exeext; then
12906 gcc_cv_ld=$dir/ld$build_exeext
275b60d6
JJ
12907 break;
12908 fi
12909 done
12910fi
34a86c2b
NN
12911case $in_tree_ld in
12912 yes)
ba479fd2
NN
12913 echo "$as_me:$LINENO: result: \"newly built ld\"" >&5
12914echo "${ECHO_T}\"newly built ld\"" >&6
34a86c2b
NN
12915 ;;
12916 no)
ba479fd2
NN
12917 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
12918echo "${ECHO_T}$gcc_cv_ld" >&6
34a86c2b
NN
12919 ;;
12920esac
275b60d6 12921
981d4858 12922# Figure out what nm we will be using.
f9c1196a 12923gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
ba479fd2
NN
12924echo "$as_me:$LINENO: checking what nm to use" >&5
12925echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
f9c1196a 12926in_tree_nm=no
57991eba
PB
12927if test -x nm$build_exeext; then
12928 gcc_cv_nm=./nm$build_exeext
f9c1196a
ZW
12929elif test -f $gcc_cv_binutils_srcdir/configure.in \
12930 && test -f ../binutils/Makefile; then
12931 # Single tree build which includes binutils.
12932 in_tree_nm=yes
57991eba
PB
12933 gcc_cv_nm=./nm$build_exeext
12934 rm -f nm$build_exeext
12935 $LN_S ../binutils/nm-new$build_exeext nm$build_exeext 2>/dev/null
534d0cc0 12936elif test "x$program_prefix" != xNONE; then
57991eba 12937 gcc_cv_nm=${program_prefix}nm$build_exeext
b095fe2c
DJ
12938elif test x$build != x$host && test x$build != x$target; then
12939 gcc_cv_nm=${target_noncanonical}-nm$build_exeext
534d0cc0 12940else
57991eba 12941 gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$build_exeext
981d4858 12942fi
f9c1196a 12943case $in_tree_nm in
ba479fd2
NN
12944 yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5
12945echo "${ECHO_T}\"newly built nm\"" >&6 ;;
12946 no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
12947echo "${ECHO_T}$gcc_cv_nm" >&6 ;;
f9c1196a 12948esac
981d4858 12949
3cae5780 12950# Figure out what objdump we will be using.
ba479fd2
NN
12951echo "$as_me:$LINENO: checking what objdump to use" >&5
12952echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
f9c1196a 12953in_tree_objdump=no
57991eba
PB
12954if test -x objdump$build_exeext; then
12955 gcc_cv_objdump=./objdump$build_exeext
f9c1196a
ZW
12956elif test -f $gcc_cv_binutils_srcdir/configure.in \
12957 && test -f ../binutils/Makefile; then
12958 # Single tree build which includes binutils.
12959 in_tree_objdump=yes
57991eba
PB
12960 gcc_cv_objdump=./objdump$build_exeext
12961 rm -f objdump$build_exeext
12962 $LN_S ../binutils/objdump$build_exeext objdump$build_exeext 2>/dev/null
534d0cc0 12963elif test "x$program_prefix" != xNONE; then
57991eba 12964 gcc_cv_objdump=${program_prefix}objdump$build_exeext
b095fe2c
DJ
12965elif test x$build != x$host && test x$build != x$target; then
12966 gcc_cv_objdump=${target_noncanonical}-objdump$build_exeext
534d0cc0 12967else
f9c1196a 12968 gcc_cv_objdump=`echo objdump | \
57991eba 12969 sed "${program_transform_name}"`$build_exeext
3cae5780 12970fi
f9c1196a 12971case $in_tree_objdump in
ba479fd2
NN
12972 yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5
12973echo "${ECHO_T}\"newly built objdump\"" >&6 ;;
12974 no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
12975echo "${ECHO_T}$gcc_cv_objdump" >&6 ;;
f9c1196a 12976esac
3cae5780 12977
981d4858 12978# Figure out what assembler alignment features are present.
ba479fd2
NN
12979echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
12980echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
12981if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
12982 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
12983else
12984 gcc_cv_as_balign_and_p2align=no
12985 if test $in_tree_gas = yes; then
12986 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
12987 then gcc_cv_as_balign_and_p2align=yes
12988fi
12989 elif test x$gcc_cv_as != x; then
6e3f3080 12990 echo '.balign 4
8ada417f 12991.p2align 2' > conftest.s
ba479fd2
NN
12992 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
12993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12994 (eval $ac_try) 2>&5
12995 ac_status=$?
12996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12997 (exit $ac_status); }; }
8ada417f
ZW
12998 then
12999 gcc_cv_as_balign_and_p2align=yes
13000 else
13001 echo "configure: failed program was" >&5
13002 cat conftest.s >&5
13003 fi
13004 rm -f conftest.o conftest.s
13005 fi
13006fi
ba479fd2
NN
13007echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13008echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 13009if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
13010
13011cat >>confdefs.h <<\_ACEOF
981d4858 13012#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 13013_ACEOF
981d4858 13014
ad9c4d9f
NN
13015fi
13016
ba479fd2
NN
13017echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13018echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
13019if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13020 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13021else
13022 gcc_cv_as_max_skip_p2align=no
13023 if test $in_tree_gas = yes; then
13024 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13025 then gcc_cv_as_max_skip_p2align=yes
13026fi
13027 elif test x$gcc_cv_as != x; then
6e3f3080 13028 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
13029 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13031 (eval $ac_try) 2>&5
13032 ac_status=$?
13033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13034 (exit $ac_status); }; }
8ada417f
ZW
13035 then
13036 gcc_cv_as_max_skip_p2align=yes
13037 else
13038 echo "configure: failed program was" >&5
13039 cat conftest.s >&5
13040 fi
13041 rm -f conftest.o conftest.s
13042 fi
ad9c4d9f 13043fi
ba479fd2
NN
13044echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13045echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 13046if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
13047
13048cat >>confdefs.h <<\_ACEOF
9e423e6d 13049#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 13050_ACEOF
9e423e6d 13051
9e423e6d 13052fi
ad9c4d9f 13053
ba479fd2
NN
13054echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13055echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
13056if test "${gcc_cv_as_subsection_m1+set}" = set; then
13057 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13058else
13059 gcc_cv_as_subsection_m1=no
13060 if test $in_tree_gas = yes; then
13061 if test $in_tree_gas_is_elf = yes \
13062 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13063 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 13064fi
8ada417f 13065 elif test x$gcc_cv_as != x; then
6e3f3080 13066 echo 'conftest_label1: .word 0
d1accaa3
JJ
13067.subsection -1
13068conftest_label2: .word 0
8ada417f 13069.previous' > conftest.s
ba479fd2
NN
13070 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13072 (eval $ac_try) 2>&5
13073 ac_status=$?
13074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13075 (exit $ac_status); }; }
8ada417f
ZW
13076 then
13077 if test x$gcc_cv_nm != x; then
13078 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13079 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13080 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13081 then :
13082 else gcc_cv_as_subsection_m1=yes
13083 fi
13084 rm -f conftest.nm1 conftest.nm2
13085 fi
13086 else
13087 echo "configure: failed program was" >&5
13088 cat conftest.s >&5
13089 fi
13090 rm -f conftest.o conftest.s
13091 fi
981d4858 13092fi
ba479fd2
NN
13093echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13094echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 13095if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
13096
13097cat >>confdefs.h <<\_ACEOF
981d4858 13098#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 13099_ACEOF
981d4858 13100
d1accaa3 13101fi
ad9c4d9f 13102
ba479fd2
NN
13103echo "$as_me:$LINENO: checking assembler for .weak" >&5
13104echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
13105if test "${gcc_cv_as_weak+set}" = set; then
13106 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13107else
13108 gcc_cv_as_weak=no
13109 if test $in_tree_gas = yes; then
13110 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13111 then gcc_cv_as_weak=yes
ad9c4d9f 13112fi
8ada417f 13113 elif test x$gcc_cv_as != x; then
6e3f3080 13114 echo ' .weak foobar' > conftest.s
ba479fd2
NN
13115 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13117 (eval $ac_try) 2>&5
13118 ac_status=$?
13119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13120 (exit $ac_status); }; }
8ada417f
ZW
13121 then
13122 gcc_cv_as_weak=yes
13123 else
13124 echo "configure: failed program was" >&5
13125 cat conftest.s >&5
13126 fi
13127 rm -f conftest.o conftest.s
13128 fi
981d4858 13129fi
ba479fd2
NN
13130echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13131echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 13132if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
13133
13134cat >>confdefs.h <<\_ACEOF
981d4858 13135#define HAVE_GAS_WEAK 1
ba479fd2 13136_ACEOF
981d4858 13137
12822146 13138fi
ad9c4d9f 13139
e41f3691
JDA
13140echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13141echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
13142if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13143 echo $ECHO_N "(cached) $ECHO_C" >&6
13144else
13145 gcc_cv_as_nsubspa_comdat=no
13146 if test $in_tree_gas = yes; then
13147 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13148 then gcc_cv_as_nsubspa_comdat=yes
13149fi
13150 elif test x$gcc_cv_as != x; then
13151 echo ' .SPACE $TEXT$
13152 .NSUBSPA $CODE$,COMDAT' > conftest.s
13153 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13155 (eval $ac_try) 2>&5
13156 ac_status=$?
13157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13158 (exit $ac_status); }; }
13159 then
13160 gcc_cv_as_nsubspa_comdat=yes
13161 else
13162 echo "configure: failed program was" >&5
13163 cat conftest.s >&5
13164 fi
13165 rm -f conftest.o conftest.s
13166 fi
13167fi
13168echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13169echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
13170if test $gcc_cv_as_nsubspa_comdat = yes; then
13171
13172cat >>confdefs.h <<\_ACEOF
13173#define HAVE_GAS_NSUBSPA_COMDAT 1
13174_ACEOF
13175
13176fi
13177
8ada417f
ZW
13178# .hidden needs to be supported in both the assembler and the linker,
13179# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13180# This is irritatingly difficult to feature test for; we have to check the
13181# date string after the version number. If we've got an in-tree
13182# ld, we don't know its patchlevel version, so we set the baseline at 2.13
13183# to be safe.
13184# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
13185echo "$as_me:$LINENO: checking assembler for .hidden" >&5
13186echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
13187if test "${gcc_cv_as_hidden+set}" = set; then
13188 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13189else
13190 gcc_cv_as_hidden=no
13191 if test $in_tree_gas = yes; then
13192 if test $in_tree_gas_is_elf = yes \
13193 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
13194 then gcc_cv_as_hidden=yes
13195fi
13196 elif test x$gcc_cv_as != x; then
6e3f3080 13197 echo ' .hidden foobar
8ada417f 13198foobar:' > conftest.s
ba479fd2
NN
13199 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13201 (eval $ac_try) 2>&5
13202 ac_status=$?
13203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13204 (exit $ac_status); }; }
8ada417f
ZW
13205 then
13206 gcc_cv_as_hidden=yes
13207 else
13208 echo "configure: failed program was" >&5
13209 cat conftest.s >&5
13210 fi
13211 rm -f conftest.o conftest.s
13212 fi
13213fi
ba479fd2
NN
13214echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
13215echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 13216
ad9c4d9f 13217
ba479fd2
NN
13218echo "$as_me:$LINENO: checking linker for .hidden support" >&5
13219echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
13220if test "${gcc_cv_ld_hidden+set}" = set; then
13221 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13222else
13223 if test $in_tree_ld = yes ; then
13224 gcc_cv_ld_hidden=no
13225 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 \
13226 && test $in_tree_ld_is_elf = yes; then
13227 gcc_cv_ld_hidden=yes
13228 fi
13229else
13230 gcc_cv_ld_hidden=yes
bace148a 13231 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
13232 if echo "$ld_ver" | grep GNU > /dev/null; then
13233 ld_vers=`echo $ld_ver | sed -n \
13234 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13235 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13236 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13237 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13238 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13239 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
13240 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'`
13241 if test 0"$ld_date" -lt 20020404; then
13242 if test -n "$ld_date"; then
13243 # If there was date string, but was earlier than 2002-04-04, fail
13244 gcc_cv_ld_hidden=no
13245 elif test -z "$ld_vers"; then
13246 # If there was no date string nor ld version number, something is wrong
13247 gcc_cv_ld_hidden=no
13248 else
13249 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
13250 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
13251 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
13252 test -z "$ld_vers_patch" && ld_vers_patch=0
13253 if test "$ld_vers_major" -lt 2; then
13254 gcc_cv_ld_hidden=no
13255 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
13256 gcc_cv_ld_hidden="no"
13257 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
13258 gcc_cv_ld_hidden=no
c72931a6 13259 fi
8ada417f 13260 fi
789b7de5 13261 fi
8ada417f 13262 else
28690784 13263 case "${target}" in
b0fd7d27 13264 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
13265 gcc_cv_ld_hidden=yes
13266 ;;
13267 *)
13268 gcc_cv_ld_hidden=no
13269 ;;
13270 esac
8ada417f
ZW
13271 fi
13272fi
6d07784a 13273fi
ba479fd2
NN
13274echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
13275echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 13276libgcc_visibility=no
ad9c4d9f 13277
8e3940b2 13278if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 13279 libgcc_visibility=yes
ba479fd2
NN
13280
13281cat >>confdefs.h <<\_ACEOF
8ada417f 13282#define HAVE_GAS_HIDDEN 1
ba479fd2 13283_ACEOF
ad9c4d9f
NN
13284
13285fi
13286
8ada417f 13287# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
13288echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
13289echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
13290if test "${gcc_cv_as_leb128+set}" = set; then
13291 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13292else
13293 gcc_cv_as_leb128=no
13294 if test $in_tree_gas = yes; then
13295 if test $in_tree_gas_is_elf = yes \
13296 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
13297 then gcc_cv_as_leb128=yes
13298fi
13299 elif test x$gcc_cv_as != x; then
6e3f3080 13300 echo ' .data
b7460f24
RH
13301 .uleb128 L2 - L1
13302L1:
13303 .uleb128 1280
13304 .sleb128 -1010
8ada417f 13305L2:' > conftest.s
ba479fd2
NN
13306 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13308 (eval $ac_try) 2>&5
13309 ac_status=$?
13310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13311 (exit $ac_status); }; }
8ada417f
ZW
13312 then
13313 # GAS versions before 2.11 do not support uleb128,
13314 # despite appearing to.
13315 # ??? There exists an elf-specific test that will crash
13316 # the assembler. Perhaps it's better to figure out whether
13317 # arbitrary sections are supported and try the test.
bace148a 13318 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
13319 if echo "$as_ver" | grep GNU > /dev/null; then
13320 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
13321 as_major=`echo $as_ver | sed 's/\..*//'`
13322 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
13323 if test $as_major -eq 2 && test $as_minor -lt 11
13324 then :
13325 else gcc_cv_as_leb128=yes
13326 fi
13327 fi
13328 else
13329 echo "configure: failed program was" >&5
13330 cat conftest.s >&5
13331 fi
13332 rm -f conftest.o conftest.s
13333 fi
b7460f24 13334fi
ba479fd2
NN
13335echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
13336echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 13337if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
13338
13339cat >>confdefs.h <<\_ACEOF
b7460f24 13340#define HAVE_AS_LEB128 1
ba479fd2 13341_ACEOF
b7460f24
RH
13342
13343fi
ad9c4d9f 13344
8ada417f
ZW
13345# GAS versions up to and including 2.11.0 may mis-optimize
13346# .eh_frame data.
ba479fd2
NN
13347echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
13348echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
13349if test "${gcc_cv_as_eh_frame+set}" = set; then
13350 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13351else
13352 gcc_cv_as_eh_frame=no
13353 if test $in_tree_gas = yes; then
13354 if test $in_tree_gas_is_elf = yes \
13355 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13356 then gcc_cv_as_eh_frame=yes
ad9c4d9f 13357fi
8ada417f 13358 elif test x$gcc_cv_as != x; then
6e3f3080 13359 echo ' .text
c64688ae
RH
13360.LFB1:
13361 .4byte 0
13362.L1:
13363 .4byte 0
13364.LFE1:
13365 .section .eh_frame,"aw",@progbits
13366__FRAME_BEGIN__:
13367 .4byte .LECIE1-.LSCIE1
13368.LSCIE1:
13369 .4byte 0x0
13370 .byte 0x1
13371 .ascii "z\0"
13372 .byte 0x1
13373 .byte 0x78
13374 .byte 0x1a
13375 .byte 0x0
13376 .byte 0x4
13377 .4byte 1
13378 .p2align 1
13379.LECIE1:
13380.LSFDE1:
13381 .4byte .LEFDE1-.LASFDE1
13382.LASFDE1:
13383 .4byte .LASFDE1-__FRAME_BEGIN__
13384 .4byte .LFB1
13385 .4byte .LFE1-.LFB1
13386 .byte 0x4
13387 .4byte .LFE1-.LFB1
13388 .byte 0x4
13389 .4byte .L1-.LFB1
8ada417f 13390.LEFDE1:' > conftest.s
ba479fd2
NN
13391 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13393 (eval $ac_try) 2>&5
13394 ac_status=$?
13395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13396 (exit $ac_status); }; }
8ada417f
ZW
13397 then
13398 cat > conftest.lit <<EOF
c64688ae
RH
13399 0000 10000000 00000000 017a0001 781a0004 .........z..x...
13400 0010 01000000 12000000 18000000 00000000 ................
093e61a6 13401 0020 08000000 04080000 0044 .........D
01efb963 13402EOF
ba479fd2 13403cat > conftest.big <<EOF
01efb963
AS
13404 0000 00000010 00000000 017a0001 781a0004 .........z..x...
13405 0010 00000001 00000012 00000018 00000000 ................
093e61a6 13406 0020 00000008 04000000 0844 .........D
c64688ae 13407EOF
8ada417f
ZW
13408 # If the assembler didn't choke, and we can objdump,
13409 # and we got the correct data, then succeed.
13410 if test x$gcc_cv_objdump != x \
13411 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
13412 | tail -3 > conftest.got \
13413 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
13414 || cmp conftest.big conftest.got > /dev/null 2>&1; }
13415 then
13416 gcc_cv_as_eh_frame=yes
ba479fd2
NN
13417 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
13418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13419 (eval $ac_try) 2>&5
13420 ac_status=$?
13421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13422 (exit $ac_status); }; }; then
8ada417f
ZW
13423 gcc_cv_as_eh_frame=buggy
13424 else
13425 # Uh oh, what do we do now?
13426 gcc_cv_as_eh_frame=no
13427 fi
13428 else
13429 echo "configure: failed program was" >&5
13430 cat conftest.s >&5
13431 fi
13432 rm -f conftest.o conftest.s
13433 fi
c64688ae 13434fi
ba479fd2
NN
13435echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
13436echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 13437
6e3f3080 13438
63cf211a 13439if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
13440
13441cat >>confdefs.h <<\_ACEOF
8ada417f 13442#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 13443_ACEOF
ad9c4d9f
NN
13444
13445fi
13446
ba479fd2
NN
13447echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13448echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13449if test "${gcc_cv_as_shf_merge+set}" = set; then
13450 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13451else
13452 gcc_cv_as_shf_merge=no
13453 if test $in_tree_gas = yes; then
13454 if test $in_tree_gas_is_elf = yes \
13455 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13456 then gcc_cv_as_shf_merge=yes
13457fi
13458 elif test x$gcc_cv_as != x; then
6e3f3080 13459 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
13460 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13462 (eval $ac_try) 2>&5
13463 ac_status=$?
13464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13465 (exit $ac_status); }; }
8ada417f
ZW
13466 then
13467 gcc_cv_as_shf_merge=yes
13468 else
13469 echo "configure: failed program was" >&5
13470 cat conftest.s >&5
13471 fi
13472 rm -f conftest.o conftest.s
13473 fi
201556f0 13474fi
ba479fd2
NN
13475echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13476echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 13477
c18a5b6c
MM
13478if test $gcc_cv_as_shf_merge = no; then
13479 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13480echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13481if test "${gcc_cv_as_shf_merge+set}" = set; then
13482 echo $ECHO_N "(cached) $ECHO_C" >&6
13483else
13484 gcc_cv_as_shf_merge=no
13485 if test $in_tree_gas = yes; then
13486 if test $in_tree_gas_is_elf = yes \
13487 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13488 then gcc_cv_as_shf_merge=yes
13489fi
13490 elif test x$gcc_cv_as != x; then
13491 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
13492 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13494 (eval $ac_try) 2>&5
13495 ac_status=$?
13496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13497 (exit $ac_status); }; }
13498 then
13499 gcc_cv_as_shf_merge=yes
13500 else
13501 echo "configure: failed program was" >&5
13502 cat conftest.s >&5
13503 fi
13504 rm -f conftest.o conftest.s
13505 fi
13506fi
13507echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13508echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
13509
13510fi
8ad9fb33 13511
ba479fd2 13512cat >>confdefs.h <<_ACEOF
8ad9fb33 13513#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 13514_ACEOF
201556f0 13515
201556f0 13516
c18a5b6c
MM
13517echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13518echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13519if test "${gcc_cv_as_comdat_group+set}" = set; then
13520 echo $ECHO_N "(cached) $ECHO_C" >&6
13521else
13522 gcc_cv_as_comdat_group=no
13523 if test $in_tree_gas = yes; then
13524 if test $in_tree_gas_is_elf = yes \
13525 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13526 then gcc_cv_as_comdat_group=yes
13527fi
13528 elif test x$gcc_cv_as != x; then
13529 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
13530 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13532 (eval $ac_try) 2>&5
13533 ac_status=$?
13534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13535 (exit $ac_status); }; }
13536 then
13537 gcc_cv_as_comdat_group=yes
13538 else
13539 echo "configure: failed program was" >&5
13540 cat conftest.s >&5
13541 fi
13542 rm -f conftest.o conftest.s
13543 fi
13544fi
13545echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
13546echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
13547
13548if test $gcc_cv_as_comdat_group = yes; then
13549 gcc_cv_as_comdat_group_percent=no
13550else
13551 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13552echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13553if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
13554 echo $ECHO_N "(cached) $ECHO_C" >&6
13555else
13556 gcc_cv_as_comdat_group_percent=no
13557 if test $in_tree_gas = yes; then
13558 if test $in_tree_gas_is_elf = yes \
13559 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13560 then gcc_cv_as_comdat_group_percent=yes
13561fi
13562 elif test x$gcc_cv_as != x; then
13563 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
13564 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13566 (eval $ac_try) 2>&5
13567 ac_status=$?
13568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13569 (exit $ac_status); }; }
13570 then
13571 gcc_cv_as_comdat_group_percent=yes
13572 else
13573 echo "configure: failed program was" >&5
13574 cat conftest.s >&5
13575 fi
13576 rm -f conftest.o conftest.s
13577 fi
13578fi
13579echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
13580echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
13581
13582fi
13583
13584cat >>confdefs.h <<_ACEOF
13585#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`
13586_ACEOF
13587
13588
8ada417f 13589# Thread-local storage - the check is heavily parametrized.
f996902d
RH
13590conftest_s=
13591tls_first_major=
13592tls_first_minor=
9739c90c 13593tls_as_opt=
f996902d 13594case "$target" in
6f9b006d
RH
13595 alpha*-*-*)
13596 conftest_s='
13597 .section ".tdata","awT",@progbits
13598foo: .long 25
13599 .text
13600 ldq $27,__tls_get_addr($29) !literal!1
13601 lda $16,foo($29) !tlsgd!1
13602 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
13603 ldq $27,__tls_get_addr($29) !literal!2
13604 lda $16,foo($29) !tlsldm!2
13605 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
13606 ldq $1,foo($29) !gotdtprel
13607 ldah $2,foo($29) !dtprelhi
13608 lda $3,foo($2) !dtprello
13609 lda $4,foo($29) !dtprel
13610 ldq $1,foo($29) !gottprel
13611 ldah $2,foo($29) !tprelhi
13612 lda $3,foo($2) !tprello
13613 lda $4,foo($29) !tprel'
13614 tls_first_major=2
13615 tls_first_minor=13
2f3321ca 13616 tls_as_opt=--fatal-warnings
6f9b006d 13617 ;;
e4dd71de
AH
13618 frv*-*-*)
13619 conftest_s='
13620 .section ".tdata","awT",@progbits
13621x: .long 25
13622 .text
13623 call #gettlsoff(x)'
13624 tls_first_major=2
13625 tls_first_minor=14
13626 ;;
f996902d
RH
13627 i[34567]86-*-*)
13628 conftest_s='
13629 .section ".tdata","awT",@progbits
13630foo: .long 25
13631 .text
13632 movl %gs:0, %eax
13633 leal foo@TLSGD(,%ebx,1), %eax
13634 leal foo@TLSLDM(%ebx), %eax
13635 leal foo@DTPOFF(%eax), %edx
13636 movl foo@GOTTPOFF(%ebx), %eax
13637 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
13638 addl foo@GOTNTPOFF(%ebx), %eax
13639 movl foo@INDNTPOFF, %eax
f996902d
RH
13640 movl $foo@TPOFF, %eax
13641 subl $foo@TPOFF, %eax
13642 leal foo@NTPOFF(%ecx), %eax'
13643 tls_first_major=2
75d38379 13644 tls_first_minor=14
2f3321ca 13645 tls_as_opt=--fatal-warnings
75d38379
JJ
13646 ;;
13647 x86_64-*-*)
13648 conftest_s='
13649 .section ".tdata","awT",@progbits
13650foo: .long 25
13651 .text
13652 movq %fs:0, %rax
13653 leaq foo@TLSGD(%rip), %rdi
13654 leaq foo@TLSLD(%rip), %rdi
13655 leaq foo@DTPOFF(%rax), %rdx
13656 movq foo@GOTTPOFF(%rip), %rax
13657 movq $foo@TPOFF, %rax'
13658 tls_first_major=2
13659 tls_first_minor=14
2f3321ca 13660 tls_as_opt=--fatal-warnings
f996902d 13661 ;;
7b6e506e
RH
13662 ia64-*-*)
13663 conftest_s='
13664 .section ".tdata","awT",@progbits
13665foo: data8 25
13666 .text
13667 addl r16 = @ltoff(@dtpmod(foo#)), gp
13668 addl r17 = @ltoff(@dtprel(foo#)), gp
13669 addl r18 = @ltoff(@tprel(foo#)), gp
13670 addl r19 = @dtprel(foo#), gp
13671 adds r21 = @dtprel(foo#), r13
13672 movl r23 = @dtprel(foo#)
13673 addl r20 = @tprel(foo#), gp
13674 adds r22 = @tprel(foo#), r13
13675 movl r24 = @tprel(foo#)'
13676 tls_first_major=2
13677 tls_first_minor=13
2f3321ca 13678 tls_as_opt=--fatal-warnings
7b6e506e 13679 ;;
69229b81
DJ
13680 mips*-*-*)
13681 conftest_s='
13682 .section .tdata,"awT",@progbits
13683x:
13684 .word 2
13685 .text
13686 addiu $4, $28, %tlsgd(x)
13687 addiu $4, $28, %tlsldm(x)
13688 lui $4, %dtprel_hi(x)
13689 addiu $4, $4, %dtprel_lo(x)
13690 lw $4, %gottprel(x)($28)
13691 lui $4, %tprel_hi(x)
13692 addiu $4, $4, %tprel_lo(x)'
13693 tls_first_major=2
13694 tls_first_minor=16
13695 tls_as_opt='-32 --fatal-warnings'
13696 ;;
c4501e62
JJ
13697 powerpc-*-*)
13698 conftest_s='
13699 .section ".tdata","awT",@progbits
13700 .align 2
13701ld0: .space 4
13702ld1: .space 4
13703x1: .space 4
13704x2: .space 4
13705x3: .space 4
13706 .text
13707 addi 3,31,ld0@got@tlsgd
13708 bl __tls_get_addr
13709 addi 3,31,x1@got@tlsld
13710 bl __tls_get_addr
13711 addi 9,3,x1@dtprel
13712 addis 9,3,x2@dtprel@ha
13713 addi 9,9,x2@dtprel@l
13714 lwz 9,x3@got@tprel(31)
13715 add 9,9,x@tls
13716 addi 9,2,x1@tprel
13717 addis 9,2,x2@tprel@ha
13718 addi 9,9,x2@tprel@l'
13719 tls_first_major=2
13720 tls_first_minor=14
2f3321ca 13721 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
13722 ;;
13723 powerpc64-*-*)
13724 conftest_s='
13725 .section ".tdata","awT",@progbits
13726 .align 3
13727ld0: .space 8
13728ld1: .space 8
13729x1: .space 8
13730x2: .space 8
13731x3: .space 8
13732 .text
13733 addi 3,2,ld0@got@tlsgd
13734 bl .__tls_get_addr
13735 nop
13736 addi 3,2,ld1@toc
13737 bl .__tls_get_addr
13738 nop
13739 addi 3,2,x1@got@tlsld
13740 bl .__tls_get_addr
13741 nop
13742 addi 9,3,x1@dtprel
13743 bl .__tls_get_addr
13744 nop
13745 addis 9,3,x2@dtprel@ha
13746 addi 9,9,x2@dtprel@l
13747 bl .__tls_get_addr
13748 nop
13749 ld 9,x3@got@dtprel(2)
13750 add 9,9,3
13751 bl .__tls_get_addr
13752 nop'
13753 tls_first_major=2
13754 tls_first_minor=14
2f3321ca 13755 tls_as_opt="-a64 --fatal-warnings"
c4501e62 13756 ;;
fd3cd001
UW
13757 s390-*-*)
13758 conftest_s='
13759 .section ".tdata","awT",@progbits
13760foo: .long 25
13761 .text
13762 .long foo@TLSGD
13763 .long foo@TLSLDM
13764 .long foo@DTPOFF
13765 .long foo@NTPOFF
13766 .long foo@GOTNTPOFF
13767 .long foo@INDNTPOFF
13768 l %r1,foo@GOTNTPOFF(%r12)
13769 l %r1,0(%r1):tls_load:foo
13770 bas %r14,0(%r1,%r13):tls_gdcall:foo
13771 bas %r14,0(%r1,%r13):tls_ldcall:foo'
13772 tls_first_major=2
13773 tls_first_minor=14
2f3321ca 13774 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
13775 ;;
13776 s390x-*-*)
13777 conftest_s='
13778 .section ".tdata","awT",@progbits
13779foo: .long 25
13780 .text
13781 .quad foo@TLSGD
13782 .quad foo@TLSLDM
13783 .quad foo@DTPOFF
13784 .quad foo@NTPOFF
13785 .quad foo@GOTNTPOFF
13786 lg %r1,foo@GOTNTPOFF(%r12)
13787 larl %r1,foo@INDNTPOFF
13788 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
13789 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
13790 tls_first_major=2
13791 tls_first_minor=14
2f3321ca 13792 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 13793 ;;
9ff13962
KK
13794 sh-*-* | sh[34]-*-*)
13795 conftest_s='
13796 .section ".tdata","awT",@progbits
13797foo: .long 25
13798 .text
13799 .long foo@TLSGD
13800 .long foo@TLSLDM
13801 .long foo@DTPOFF
13802 .long foo@GOTTPOFF
13803 .long foo@TPOFF'
13804 tls_first_major=2
13805 tls_first_minor=13
2f3321ca 13806 tls_as_opt=--fatal-warnings
9ff13962 13807 ;;
5751a10b 13808 sparc*-*-*)
2f3321ca
EB
13809 case "$target" in
13810 sparc*-sun-solaris2.*)
13811 on_solaris=yes
13812 ;;
13813 *)
13814 on_solaris=no
13815 ;;
13816 esac
13817 if test x$on_solaris = xyes && test x$gas_flag = xno; then
13818 conftest_s='
13819 .section ".tdata",#alloc,#write,#tls
13820foo: .long 25
13821 .text
13822 sethi %tgd_hi22(foo), %o0
13823 add %o0, %tgd_lo10(foo), %o1
13824 add %l7, %o1, %o0, %tgd_add(foo)
13825 call __tls_get_addr, %tgd_call(foo)
13826 sethi %tldm_hi22(foo), %l1
13827 add %l1, %tldm_lo10(foo), %l2
13828 add %l7, %l2, %o0, %tldm_add(foo)
13829 call __tls_get_addr, %tldm_call(foo)
13830 sethi %tldo_hix22(foo), %l3
13831 xor %l3, %tldo_lox10(foo), %l4
13832 add %o0, %l4, %l5, %tldo_add(foo)
13833 sethi %tie_hi22(foo), %o3
13834 add %o3, %tie_lo10(foo), %o3
13835 ld [%l7 + %o3], %o2, %tie_ld(foo)
13836 add %g7, %o2, %o4, %tie_add(foo)
13837 sethi %tle_hix22(foo), %l1
13838 xor %l1, %tle_lox10(foo), %o5
13839 ld [%g7 + %o5], %o1'
13840 tls_first_major=0
13841 tls_first_minor=0
13842 else
13843 conftest_s='
5751a10b
JJ
13844 .section ".tdata","awT",@progbits
13845foo: .long 25
13846 .text
13847 sethi %tgd_hi22(foo), %o0
13848 add %o0, %tgd_lo10(foo), %o1
13849 add %l7, %o1, %o0, %tgd_add(foo)
13850 call __tls_get_addr, %tgd_call(foo)
13851 sethi %tldm_hi22(foo), %l1
13852 add %l1, %tldm_lo10(foo), %l2
13853 add %l7, %l2, %o0, %tldm_add(foo)
13854 call __tls_get_addr, %tldm_call(foo)
13855 sethi %tldo_hix22(foo), %l3
13856 xor %l3, %tldo_lox10(foo), %l4
13857 add %o0, %l4, %l5, %tldo_add(foo)
13858 sethi %tie_hi22(foo), %o3
13859 add %o3, %tie_lo10(foo), %o3
13860 ld [%l7 + %o3], %o2, %tie_ld(foo)
13861 add %g7, %o2, %o4, %tie_add(foo)
13862 sethi %tle_hix22(foo), %l1
13863 xor %l1, %tle_lox10(foo), %o5
13864 ld [%g7 + %o5], %o1'
13865 tls_first_major=2
13866 tls_first_minor=14
2f3321ca
EB
13867 tls_as_opt="-32 --fatal-warnings"
13868 fi
5751a10b 13869 ;;
f996902d
RH
13870esac
13871if test -z "$tls_first_major"; then
8ada417f
ZW
13872 : # If we don't have a check, assume no support.
13873else
ba479fd2
NN
13874 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
13875echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
13876if test "${gcc_cv_as_tls+set}" = set; then
13877 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13878else
13879 gcc_cv_as_tls=no
13880 if test $in_tree_gas = yes; then
13881 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
13882 then gcc_cv_as_tls=yes
ad9c4d9f 13883fi
8ada417f 13884 elif test x$gcc_cv_as != x; then
6e3f3080 13885 echo "$conftest_s" > conftest.s
2f3321ca 13886 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
13887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13888 (eval $ac_try) 2>&5
13889 ac_status=$?
13890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13891 (exit $ac_status); }; }
8ada417f
ZW
13892 then
13893 gcc_cv_as_tls=yes
13894 else
13895 echo "configure: failed program was" >&5
13896 cat conftest.s >&5
13897 fi
13898 rm -f conftest.o conftest.s
f996902d 13899 fi
f996902d 13900fi
ba479fd2
NN
13901echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
13902echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 13903if test $gcc_cv_as_tls = yes; then
ba479fd2
NN
13904
13905cat >>confdefs.h <<\_ACEOF
f996902d 13906#define HAVE_AS_TLS 1
ba479fd2 13907_ACEOF
f996902d
RH
13908
13909fi
8ada417f
ZW
13910fi
13911
13912# Target-specific assembler checks.
f996902d 13913
7e9d8517
L
13914echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
13915echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
13916gcc_cv_ld_static_dynamic=no
13917if test $in_tree_ld = yes ; then
13918 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
13919 gcc_cv_ld_static_dynamic=yes
13920 fi
13921elif test x$gcc_cv_ld != x; then
13922 # Check if linker supports -Bstatic/-Bdynamic option
13923 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
13924 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
13925 gcc_cv_ld_static_dynamic=yes
13926 fi
13927fi
13928if test x"$gcc_cv_ld_static_dynamic" = xyes; then
13929
13930cat >>confdefs.h <<\_ACEOF
13931#define HAVE_LD_STATIC_DYNAMIC 1
13932_ACEOF
13933
13934fi
13935echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
13936echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
13937
d594623a
L
13938if test x"$demangler_in_ld" = xyes; then
13939 echo "$as_me:$LINENO: checking linker --demangle support" >&5
13940echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
13941 gcc_cv_ld_demangle=no
13942 if test $in_tree_ld = yes; then
13943 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 \
13944 gcc_cv_ld_demangle=yes
13945 fi
13946 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
13947 # Check if the GNU linker supports --demangle option
13948 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
13949 gcc_cv_ld_demangle=yes
13950 fi
13951 fi
13952 if test x"$gcc_cv_ld_demangle" = xyes; then
13953
13954cat >>confdefs.h <<\_ACEOF
13955#define HAVE_LD_DEMANGLE 1
13956_ACEOF
13957
13958 fi
13959 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
13960echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
13961fi
13962
3a37b08e
RH
13963case "$target" in
13964 # All TARGET_ABI_OSF targets.
13965 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
13966 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
13967echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
13968if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
13969 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 13970else
8ada417f
ZW
13971 gcc_cv_as_alpha_explicit_relocs=no
13972 if test $in_tree_gas = yes; then
13973 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13974 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 13975fi
8ada417f 13976 elif test x$gcc_cv_as != x; then
6e3f3080 13977 echo ' .set nomacro
3a37b08e
RH
13978 .text
13979 extbl $3, $2, $3 !lituse_bytoff!1
13980 ldq $2, a($29) !literal!1
13981 ldq $4, b($29) !literal!2
13982 ldq_u $3, 0($2) !lituse_base!1
13983 ldq $27, f($29) !literal!5
13984 jsr $26, ($27), f !lituse_jsr!5
13985 ldah $29, 0($26) !gpdisp!3
13986 lda $0, c($29) !gprel
13987 ldah $1, d($29) !gprelhigh
13988 lda $1, d($1) !gprellow
8ada417f 13989 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
13990 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13992 (eval $ac_try) 2>&5
13993 ac_status=$?
13994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13995 (exit $ac_status); }; }
8ada417f
ZW
13996 then
13997 gcc_cv_as_alpha_explicit_relocs=yes
13998 else
13999 echo "configure: failed program was" >&5
14000 cat conftest.s >&5
14001 fi
14002 rm -f conftest.o conftest.s
14003 fi
cafe096b 14004fi
ba479fd2
NN
14005echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14006echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 14007if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
14008
14009cat >>confdefs.h <<\_ACEOF
3a37b08e 14010#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 14011_ACEOF
3a37b08e 14012
86da66b5
HPN
14013fi
14014 ;;
14015
14016 cris-*-*)
14017 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14018echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
14019if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14020 echo $ECHO_N "(cached) $ECHO_C" >&6
14021else
14022 gcc_cv_as_cris_no_mul_bug=no
14023 if test $in_tree_gas = yes; then
14024 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14025 then gcc_cv_as_cris_no_mul_bug=yes
14026fi
14027 elif test x$gcc_cv_as != x; then
14028 echo '.text' > conftest.s
14029 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14031 (eval $ac_try) 2>&5
14032 ac_status=$?
14033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14034 (exit $ac_status); }; }
14035 then
14036 gcc_cv_as_cris_no_mul_bug=yes
14037 else
14038 echo "configure: failed program was" >&5
14039 cat conftest.s >&5
14040 fi
14041 rm -f conftest.o conftest.s
14042 fi
14043fi
14044echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14045echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
14046if test $gcc_cv_as_cris_no_mul_bug = yes; then
14047
14048cat >>confdefs.h <<\_ACEOF
14049#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14050_ACEOF
14051
8ada417f 14052fi
3a37b08e 14053 ;;
8ada417f 14054
1cb36a98 14055 sparc*-*-*)
ba479fd2
NN
14056 echo "$as_me:$LINENO: checking assembler for .register" >&5
14057echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
14058if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14059 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14060else
8ada417f
ZW
14061 gcc_cv_as_sparc_register_op=no
14062 if test x$gcc_cv_as != x; then
6e3f3080 14063 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
14064 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14066 (eval $ac_try) 2>&5
14067 ac_status=$?
14068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14069 (exit $ac_status); }; }
8ada417f
ZW
14070 then
14071 gcc_cv_as_sparc_register_op=yes
14072 else
14073 echo "configure: failed program was" >&5
14074 cat conftest.s >&5
14075 fi
14076 rm -f conftest.o conftest.s
14077 fi
cafe096b 14078fi
ba479fd2
NN
14079echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
14080echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 14081if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
14082
14083cat >>confdefs.h <<\_ACEOF
1cb36a98 14084#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 14085_ACEOF
1cb36a98 14086
8ada417f 14087fi
1cb36a98 14088
ba479fd2
NN
14089 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
14090echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
14091if test "${gcc_cv_as_sparc_relax+set}" = set; then
14092 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 14093else
8ada417f
ZW
14094 gcc_cv_as_sparc_relax=no
14095 if test x$gcc_cv_as != x; then
6e3f3080 14096 echo '.text' > conftest.s
ba479fd2
NN
14097 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
14098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14099 (eval $ac_try) 2>&5
14100 ac_status=$?
14101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14102 (exit $ac_status); }; }
8ada417f
ZW
14103 then
14104 gcc_cv_as_sparc_relax=yes
14105 else
14106 echo "configure: failed program was" >&5
14107 cat conftest.s >&5
14108 fi
14109 rm -f conftest.o conftest.s
14110 fi
cafe096b 14111fi
ba479fd2
NN
14112echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
14113echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 14114if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
14115
14116cat >>confdefs.h <<\_ACEOF
e95b1e6a 14117#define HAVE_AS_RELAX_OPTION 1
ba479fd2 14118_ACEOF
e95b1e6a 14119
8ada417f 14120fi
e95b1e6a 14121
ba479fd2
NN
14122 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
14123echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
14124if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
14125 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 14126else
8ada417f
ZW
14127 gcc_cv_as_sparc_ua_pcrel=no
14128 if test x$gcc_cv_as != x; then
6e3f3080 14129 echo '.text
8ada417f
ZW
14130foo:
14131 nop
14132.data
14133.align 4
14134.byte 0
14135.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
14136 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14138 (eval $ac_try) 2>&5
14139 ac_status=$?
14140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14141 (exit $ac_status); }; }
8ada417f
ZW
14142 then
14143 if test x$gcc_cv_ld != x \
14144 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
14145 gcc_cv_as_sparc_ua_pcrel=yes
14146 fi
14147 rm -f conftest
14148 else
14149 echo "configure: failed program was" >&5
14150 cat conftest.s >&5
14151 fi
14152 rm -f conftest.o conftest.s
14153 fi
cafe096b 14154fi
ba479fd2
NN
14155echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
14156echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 14157if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
14158
14159cat >>confdefs.h <<\_ACEOF
17e9e88c 14160#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 14161_ACEOF
17e9e88c 14162
17e9e88c 14163
ba479fd2
NN
14164 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
14165echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
14166if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
14167 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 14168else
8ada417f
ZW
14169 gcc_cv_as_sparc_ua_pcrel_hidden=no
14170 if test x$gcc_cv_as != x; then
6e3f3080 14171 echo '.data
8ada417f
ZW
14172.align 4
14173.byte 0x31
14174.uaword %r_disp32(foo)
14175.byte 0x32, 0x33, 0x34
14176.global foo
14177.hidden foo
14178foo:
14179.skip 4' > conftest.s
ba479fd2
NN
14180 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14182 (eval $ac_try) 2>&5
14183 ac_status=$?
14184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14185 (exit $ac_status); }; }
8ada417f
ZW
14186 then
14187 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
14188 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
14189 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
14190 | grep ' 31000000 07323334' > /dev/null 2>&1; then
14191 if $gcc_cv_objdump -R conftest 2> /dev/null \
14192 | grep 'DISP32' > /dev/null 2>&1; then
14193 :
14194 else
14195 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 14196 fi
8ada417f
ZW
14197 fi
14198 rm -f conftest
14199 else
14200 echo "configure: failed program was" >&5
14201 cat conftest.s >&5
14202 fi
14203 rm -f conftest.o conftest.s
14204 fi
cafe096b 14205fi
ba479fd2
NN
14206echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
14207echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 14208if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
14209
14210cat >>confdefs.h <<\_ACEOF
cf7b8b0d 14211#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 14212_ACEOF
cf7b8b0d 14213
8ada417f 14214fi
ba479fd2 14215
8ada417f 14216fi # unaligned pcrel relocs
cf7b8b0d 14217
ba479fd2
NN
14218 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
14219echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
14220if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
14221 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14222else
8ada417f
ZW
14223 gcc_cv_as_sparc_offsetable_lo10=no
14224 if test x$gcc_cv_as != x; then
6e3f3080 14225 echo '.text
8ada417f
ZW
14226 or %g1, %lo(ab) + 12, %g1
14227 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
14228 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
14229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14230 (eval $ac_try) 2>&5
14231 ac_status=$?
14232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14233 (exit $ac_status); }; }
8ada417f
ZW
14234 then
14235 if test x$gcc_cv_objdump != x \
ecb0ccbc 14236 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 14237 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 14238 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
14239 fi
14240 else
14241 echo "configure: failed program was" >&5
14242 cat conftest.s >&5
14243 fi
14244 rm -f conftest.o conftest.s
14245 fi
cafe096b 14246fi
ba479fd2
NN
14247echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
14248echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 14249if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
14250
14251cat >>confdefs.h <<\_ACEOF
1cb36a98 14252#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 14253_ACEOF
1cb36a98 14254
8ada417f 14255fi
1cb36a98
RH
14256 ;;
14257
c307e6dd 14258 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
14259 case $target_os in
14260 cygwin* | pe | mingw32*)
14261 # Used for DWARF 2 in PE
14262 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
14263echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
14264if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
14265 echo $ECHO_N "(cached) $ECHO_C" >&6
14266else
14267 gcc_cv_as_ix86_pe_secrel32=no
14268 if test $in_tree_gas = yes; then
14269 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14270 then gcc_cv_as_ix86_pe_secrel32=yes
14271fi
14272 elif test x$gcc_cv_as != x; then
14273 echo '.text
14274foo: nop
14275.data
14276 .secrel32 foo' > conftest.s
14277 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14279 (eval $ac_try) 2>&5
14280 ac_status=$?
14281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14282 (exit $ac_status); }; }
14283 then
14284 if test x$gcc_cv_ld != x \
14285 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
14286 gcc_cv_as_ix86_pe_secrel32=yes
14287 fi
14288 rm -f conftest
14289 else
14290 echo "configure: failed program was" >&5
14291 cat conftest.s >&5
14292 fi
14293 rm -f conftest.o conftest.s
14294 fi
14295fi
14296echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
14297echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
14298if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
14299
14300cat >>confdefs.h <<\_ACEOF
14301#define HAVE_GAS_PE_SECREL32_RELOC 1
14302_ACEOF
14303
14304fi
14305 ;;
14306 esac
14307
ba479fd2
NN
14308 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
14309echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
14310if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
14311 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14312else
14313 gcc_cv_as_ix86_filds_fists=no
14314 if test $in_tree_gas = yes; then
14315 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
14316 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 14317fi
8ada417f 14318 elif test x$gcc_cv_as != x; then
6e3f3080 14319 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
14320 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14322 (eval $ac_try) 2>&5
14323 ac_status=$?
14324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14325 (exit $ac_status); }; }
8ada417f
ZW
14326 then
14327 gcc_cv_as_ix86_filds_fists=yes
14328 else
14329 echo "configure: failed program was" >&5
14330 cat conftest.s >&5
981d4858 14331 fi
8ada417f
ZW
14332 rm -f conftest.o conftest.s
14333 fi
14334fi
ba479fd2
NN
14335echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
14336echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 14337if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
14338
14339cat >>confdefs.h <<\_ACEOF
8ada417f 14340#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 14341_ACEOF
ad9c4d9f 14342
f6f5dff2
RO
14343fi
14344
ba479fd2
NN
14345 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
14346echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
14347if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
14348 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
14349else
14350 gcc_cv_as_ix86_cmov_sun_syntax=no
14351 if test x$gcc_cv_as != x; then
6e3f3080 14352 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
14353 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14355 (eval $ac_try) 2>&5
14356 ac_status=$?
14357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14358 (exit $ac_status); }; }
f6f5dff2
RO
14359 then
14360 gcc_cv_as_ix86_cmov_sun_syntax=yes
14361 else
14362 echo "configure: failed program was" >&5
14363 cat conftest.s >&5
14364 fi
14365 rm -f conftest.o conftest.s
14366 fi
14367fi
ba479fd2
NN
14368echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
14369echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 14370if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
14371
14372cat >>confdefs.h <<\_ACEOF
f6f5dff2 14373#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 14374_ACEOF
f6f5dff2 14375
ad9c4d9f
NN
14376fi
14377
6f3ca281
ZW
14378 # This one is used unconditionally by i386.[ch]; it is to be defined
14379 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
14380 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
14381echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
14382if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
14383 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14384else
14385 gcc_cv_as_ix86_gotoff_in_data=no
14386 if test $in_tree_gas = yes; then
14387 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14388 then gcc_cv_as_ix86_gotoff_in_data=yes
14389fi
14390 elif test x$gcc_cv_as != x; then
6e3f3080 14391 echo ' .text
f88c65f7
RH
14392.L0:
14393 nop
14394 .data
8ada417f 14395 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
14396 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14398 (eval $ac_try) 2>&5
14399 ac_status=$?
14400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14401 (exit $ac_status); }; }
8ada417f
ZW
14402 then
14403 gcc_cv_as_ix86_gotoff_in_data=yes
14404 else
14405 echo "configure: failed program was" >&5
14406 cat conftest.s >&5
f88c65f7 14407 fi
8ada417f
ZW
14408 rm -f conftest.o conftest.s
14409 fi
14410fi
ba479fd2
NN
14411echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
14412echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 14413
6f3ca281 14414
ba479fd2 14415cat >>confdefs.h <<_ACEOF
6f3ca281 14416#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 14417_ACEOF
f88c65f7 14418
1cb36a98 14419 ;;
ef1ecf87
RH
14420
14421 ia64*-*-*)
ba479fd2
NN
14422 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
14423echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
14424if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
14425 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 14426else
8ada417f
ZW
14427 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
14428 if test $in_tree_gas = yes; then
14429 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14430 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 14431fi
8ada417f 14432 elif test x$gcc_cv_as != x; then
6e3f3080 14433 echo ' .text
ef1ecf87
RH
14434 addl r15 = @ltoffx(x#), gp
14435 ;;
cfa9ee99 14436 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
14437 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14439 (eval $ac_try) 2>&5
14440 ac_status=$?
14441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14442 (exit $ac_status); }; }
8ada417f 14443 then
cfa9ee99 14444 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
14445 else
14446 echo "configure: failed program was" >&5
14447 cat conftest.s >&5
2c4a9cff 14448 fi
8ada417f
ZW
14449 rm -f conftest.o conftest.s
14450 fi
14451fi
ba479fd2
NN
14452echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
14453echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 14454if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
14455
14456cat >>confdefs.h <<\_ACEOF
cfa9ee99 14457#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 14458_ACEOF
8ada417f 14459
cfa9ee99 14460fi
8ada417f 14461
2c4a9cff 14462 ;;
8ada417f 14463
2c4a9cff 14464 powerpc*-*-*)
8ada417f 14465 case $target in
6b37db3c
DE
14466 *-*-aix*) conftest_s=' .csect .text[PR]
14467 mfcr 3,128';;
8af4d362
PB
14468 *-*-darwin*)
14469 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
14470echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
14471if test "${gcc_cv_as_machine_directive+set}" = set; then
14472 echo $ECHO_N "(cached) $ECHO_C" >&6
14473else
14474 gcc_cv_as_machine_directive=no
14475 if test x$gcc_cv_as != x; then
14476 echo ' .machine ppc7400' > conftest.s
14477 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14479 (eval $ac_try) 2>&5
14480 ac_status=$?
14481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14482 (exit $ac_status); }; }
14483 then
14484 gcc_cv_as_machine_directive=yes
14485 else
14486 echo "configure: failed program was" >&5
14487 cat conftest.s >&5
14488 fi
14489 rm -f conftest.o conftest.s
14490 fi
14491fi
14492echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
14493echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
14494
14495 if test x$gcc_cv_as_machine_directive != xyes; then
14496 echo "*** This target requires an assembler supporting \".machine\"" >&2
14497 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
14498 test x$build = x$target && exit 1
14499 fi
14500 conftest_s=' .text
6b37db3c 14501 mfcr r3,128';;
4c67db14 14502 *) conftest_s=' .machine power4
d2ab3e37 14503 .text
6b37db3c 14504 mfcr 3,128';;
8ada417f 14505 esac
8ada417f 14506
ba479fd2
NN
14507 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
14508echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
14509if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
14510 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 14511else
8ada417f
ZW
14512 gcc_cv_as_powerpc_mfcrf=no
14513 if test $in_tree_gas = yes; then
14514 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14515 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 14516fi
8ada417f 14517 elif test x$gcc_cv_as != x; then
6e3f3080 14518 echo "$conftest_s" > conftest.s
ba479fd2
NN
14519 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14521 (eval $ac_try) 2>&5
14522 ac_status=$?
14523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14524 (exit $ac_status); }; }
8ada417f
ZW
14525 then
14526 gcc_cv_as_powerpc_mfcrf=yes
14527 else
14528 echo "configure: failed program was" >&5
14529 cat conftest.s >&5
14530 fi
14531 rm -f conftest.o conftest.s
14532 fi
2c4a9cff 14533fi
ba479fd2
NN
14534echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
14535echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 14536if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
14537
14538cat >>confdefs.h <<\_ACEOF
2c4a9cff 14539#define HAVE_AS_MFCRF 1
ba479fd2 14540_ACEOF
ef1ecf87 14541
8ada417f
ZW
14542fi
14543 ;;
14544
14545 mips*-*-*)
ba479fd2
NN
14546 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14547echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14548if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
14549 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14550else
14551 gcc_cv_as_mips_explicit_relocs=no
14552 if test $in_tree_gas = yes; then
14553 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14554 then gcc_cv_as_mips_explicit_relocs=yes
14555fi
14556 elif test x$gcc_cv_as != x; then
6e3f3080 14557 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
14558 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14560 (eval $ac_try) 2>&5
14561 ac_status=$?
14562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14563 (exit $ac_status); }; }
8ada417f
ZW
14564 then
14565 gcc_cv_as_mips_explicit_relocs=yes
14566 else
14567 echo "configure: failed program was" >&5
14568 cat conftest.s >&5
ef1ecf87 14569 fi
8ada417f
ZW
14570 rm -f conftest.o conftest.s
14571 fi
14572fi
ba479fd2
NN
14573echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
14574echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
14575if test $gcc_cv_as_mips_explicit_relocs = yes; then
14576 if test x$target_cpu_default = x
14577 then target_cpu_default=MASK_EXPLICIT_RELOCS
14578 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
14579 fi
14580fi
14581
82563d35
RS
14582 if test x$gas_flag = xyes \
14583 || test x"$host" != x"$build" \
14584 || test ! -x "$gcc_cv_as" \
14585 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
14586 :
14587 else
14588 echo "*** This configuration requires the GNU assembler" >&2
14589 exit 1
14590 fi
ef1ecf87 14591 ;;
1cb36a98 14592esac
9d147085
RH
14593# ??? Not all targets support dwarf2 debug_line, even within a version
14594# of gas. Moreover, we need to emit a valid instruction to trigger any
14595# info to the output file. So, as supported targets are added to gas 2.11,
14596# add some instruction here to (also) show we expect this might work.
14597# ??? Once 2.11 is released, probably need to add first known working
14598# version to the per-target configury.
14599case "$target" in
80486e06 14600 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 14601 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
d116bdf8 14602 | xstormy16*-*-* | cris-*-* | xtensa-*-*)
9d147085
RH
14603 insn="nop"
14604 ;;
57116d8d 14605 ia64*-*-* | s390*-*-*)
9d147085
RH
14606 insn="nop 0"
14607 ;;
2853bc5a
HPN
14608 mmix-*-*)
14609 insn="swym 0"
14610 ;;
8ada417f
ZW
14611esac
14612if test x"$insn" != x; then
14613 conftest_s="\
14614 .file 1 \"conftest.s\"
14615 .loc 1 3 0
14616 $insn"
ba479fd2
NN
14617 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
14618echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
14619if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
14620 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14621else
14622 gcc_cv_as_dwarf2_debug_line=no
14623 if test $in_tree_gas = yes; then
14624 if test $in_tree_gas_is_elf = yes \
14625 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14626 then gcc_cv_as_dwarf2_debug_line=yes
14627fi
14628 elif test x$gcc_cv_as != x; then
6e3f3080 14629 echo "$conftest_s" > conftest.s
ba479fd2
NN
14630 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14632 (eval $ac_try) 2>&5
14633 ac_status=$?
14634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14635 (exit $ac_status); }; }
8ada417f 14636 then
080a5bb0
EB
14637 if test x$gcc_cv_objdump != x \
14638 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
14639 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
14640 gcc_cv_as_dwarf2_debug_line=yes
14641 fi
14642 else
14643 echo "configure: failed program was" >&5
14644 cat conftest.s >&5
14645 fi
14646 rm -f conftest.o conftest.s
14647 fi
14648fi
ba479fd2
NN
14649echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
14650echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 14651
ad9c4d9f 14652
8ada417f
ZW
14653# The .debug_line file table must be in the exact order that
14654# we specified the files, since these indices are also used
14655# by DW_AT_decl_file. Approximate this test by testing if
14656# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
14657 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
14658echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
14659if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
14660 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14661else
14662 gcc_cv_as_dwarf2_file_buggy=no
14663 if test x$gcc_cv_as != x; then
6e3f3080 14664 echo ' .file 1 "foo.s"
8ada417f 14665 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
14666 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14668 (eval $ac_try) 2>&5
14669 ac_status=$?
14670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14671 (exit $ac_status); }; }
8ada417f
ZW
14672 then
14673 gcc_cv_as_dwarf2_file_buggy=yes
14674 else
14675 echo "configure: failed program was" >&5
14676 cat conftest.s >&5
14677 fi
14678 rm -f conftest.o conftest.s
14679 fi
ad9c4d9f 14680fi
ba479fd2
NN
14681echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
14682echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
14683
14684
14685 if test $gcc_cv_as_dwarf2_debug_line = yes \
14686 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
14687
14688cat >>confdefs.h <<\_ACEOF
9d147085 14689#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 14690_ACEOF
9d147085 14691
8ada417f 14692 fi
ad9c4d9f 14693
ba479fd2
NN
14694 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
14695echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
14696if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
14697 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14698else
14699 gcc_cv_as_gdwarf2_flag=no
14700 if test $in_tree_gas = yes; then
14701 if test $in_tree_gas_is_elf = yes \
14702 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14703 then gcc_cv_as_gdwarf2_flag=yes
14704fi
14705 elif test x$gcc_cv_as != x; then
6e3f3080 14706 echo "$insn" > conftest.s
ba479fd2
NN
14707 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
14708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14709 (eval $ac_try) 2>&5
14710 ac_status=$?
14711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14712 (exit $ac_status); }; }
8ada417f
ZW
14713 then
14714 gcc_cv_as_gdwarf2_flag=yes
14715 else
14716 echo "configure: failed program was" >&5
14717 cat conftest.s >&5
14718 fi
14719 rm -f conftest.o conftest.s
14720 fi
ad9c4d9f 14721fi
ba479fd2
NN
14722echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
14723echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 14724if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
14725
14726cat >>confdefs.h <<\_ACEOF
5f0e9ea2 14727#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 14728_ACEOF
5f0e9ea2
GK
14729
14730fi
ad9c4d9f 14731
ba479fd2
NN
14732 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
14733echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
14734if test "${gcc_cv_as_gstabs_flag+set}" = set; then
14735 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14736else
14737 gcc_cv_as_gstabs_flag=no
14738 if test $in_tree_gas = yes; then
14739 if test $in_tree_gas_is_elf = yes \
14740 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14741 then gcc_cv_as_gstabs_flag=yes
14742fi
14743 elif test x$gcc_cv_as != x; then
6e3f3080 14744 echo "$insn" > conftest.s
ba479fd2
NN
14745 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
14746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14747 (eval $ac_try) 2>&5
14748 ac_status=$?
14749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14750 (exit $ac_status); }; }
8ada417f
ZW
14751 then
14752 # The native Solaris 9/Intel assembler doesn't understand --gstabs
14753 # and warns about it, but still exits successfully. So check for
14754 # this.
ba479fd2
NN
14755 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
14756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14757 (eval $ac_try) 2>&5
14758 ac_status=$?
14759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14760 (exit $ac_status); }; }
8ada417f
ZW
14761 then :
14762 else gcc_cv_as_gstabs_flag=yes
14763 fi
14764 else
14765 echo "configure: failed program was" >&5
14766 cat conftest.s >&5
14767 fi
14768 rm -f conftest.o conftest.s
14769 fi
ad9c4d9f 14770fi
ba479fd2
NN
14771echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
14772echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 14773if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
14774
14775cat >>confdefs.h <<\_ACEOF
5f0e9ea2 14776#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 14777_ACEOF
5f0e9ea2
GK
14778
14779fi
8ada417f 14780fi
5f0e9ea2 14781
ba479fd2
NN
14782echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
14783echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 14784gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 14785if test $in_tree_ld = yes ; then
5408ac6c
HPN
14786 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 \
14787 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
14788 gcc_cv_ld_ro_rw_mix=read-write
14789 fi
14790elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
14791 echo '.section myfoosect, "a"' > conftest1.s
14792 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 14793 echo '.byte 1' >> conftest2.s
90e145da 14794 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 14795 echo '.byte 0' >> conftest3.s
6cd656d0
KC
14796 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
14797 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
14798 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 14799 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 14800 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 14801 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 14802 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
14803 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
14804 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
14805 gcc_cv_ld_ro_rw_mix=read-only
14806 else
14807 gcc_cv_ld_ro_rw_mix=read-write
14808 fi
14809 fi
14810 fi
14811 rm -f conftest.* conftest[123].*
14812fi
14813if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
14814
14815cat >>confdefs.h <<\_ACEOF
96d0f4dc 14816#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 14817_ACEOF
96d0f4dc
JJ
14818
14819fi
ba479fd2
NN
14820echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
14821echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 14822
ba479fd2
NN
14823echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
14824echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 14825gcc_cv_ld_eh_frame_hdr=no
34a86c2b 14826if test $in_tree_ld = yes ; then
5408ac6c
HPN
14827 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 \
14828 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
14829 gcc_cv_ld_eh_frame_hdr=yes
14830 fi
14831elif test x$gcc_cv_ld != x; then
14832 # Check if linker supports --eh-frame-hdr option
14833 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
14834 gcc_cv_ld_eh_frame_hdr=yes
14835 fi
14836fi
14837if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
14838
14839cat >>confdefs.h <<\_ACEOF
275b60d6 14840#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 14841_ACEOF
275b60d6
JJ
14842
14843fi
ba479fd2
NN
14844echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
14845echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 14846
ba479fd2
NN
14847echo "$as_me:$LINENO: checking linker position independent executable support" >&5
14848echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
14849gcc_cv_ld_pie=no
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 15 -o "$gcc_cv_gld_major_version" -gt 2 \
14852 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
14853 gcc_cv_ld_pie=yes
14854 fi
14855elif test x$gcc_cv_ld != x; then
14856 # Check if linker supports -pie option
14857 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
14858 gcc_cv_ld_pie=yes
14859 fi
14860fi
14861if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
14862
14863cat >>confdefs.h <<\_ACEOF
24a4dd31 14864#define HAVE_LD_PIE 1
ba479fd2 14865_ACEOF
24a4dd31
JJ
14866
14867fi
ba479fd2
NN
14868echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
14869echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 14870
8bb915b6
NN
14871# --------
14872# UNSORTED
14873# --------
14874
765f1bf9
AM
14875echo "$as_me:$LINENO: checking linker --as-needed support" >&5
14876echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
14877if test "${gcc_cv_ld_as_needed+set}" = set; then
14878 echo $ECHO_N "(cached) $ECHO_C" >&6
14879else
14880 gcc_cv_ld_as_needed=no
765f1bf9
AM
14881if test $in_tree_ld = yes ; then
14882 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 \
14883 && test $in_tree_ld_is_elf = yes; then
14884 gcc_cv_ld_as_needed=yes
14885 fi
14886elif test x$gcc_cv_ld != x; then
14887 # Check if linker supports --as-needed and --no-as-needed options
14888 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
14889 gcc_cv_ld_as_needed=yes
14890 fi
14891fi
82e923f6
RS
14892
14893fi
14894echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
14895echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
14896if test x"$gcc_cv_ld_as_needed" = xyes; then
14897
14898cat >>confdefs.h <<\_ACEOF
14899#define HAVE_LD_AS_NEEDED 1
14900_ACEOF
14901
14902fi
765f1bf9 14903
85b776df
AM
14904case "$target" in
14905 powerpc64*-*-linux*)
14906 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
14907echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
14908if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
14909 echo $ECHO_N "(cached) $ECHO_C" >&6
14910else
14911 gcc_cv_ld_no_dot_syms=no
14912 if test $in_tree_ld = yes ; then
14913 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
14914 gcc_cv_ld_no_dot_syms=yes
14915 fi
14916 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
14917 cat > conftest1.s <<EOF
14918 .text
14919 bl .foo
14920EOF
14921 cat > conftest2.s <<EOF
14922 .section ".opd","aw"
14923 .align 3
14924 .globl foo
14925 .type foo,@function
14926foo:
14927 .quad .LEfoo,.TOC.@tocbase,0
14928 .text
14929.LEfoo:
14930 blr
14931 .size foo,.-.LEfoo
14932EOF
14933 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
14934 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
14935 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
14936 gcc_cv_ld_no_dot_syms=yes
14937 fi
14938 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
14939 fi
14940
14941fi
14942echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
14943echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
14944 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
14945
14946cat >>confdefs.h <<\_ACEOF
14947#define HAVE_LD_NO_DOT_SYMS 1
14948_ACEOF
14949
14950 fi
14951 ;;
14952esac
14953
9fb28a67 14954if test x$with_sysroot = x && test x$host = x$target \
047d636f 14955 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
14956
14957cat >>confdefs.h <<_ACEOF
793e9558 14958#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 14959_ACEOF
793e9558
PB
14960
14961fi
14962
81bf3d9e 14963# Find out what GC implementation we want, or may, use.
ba479fd2 14964
81bf3d9e
RH
14965# Check whether --with-gc or --without-gc was given.
14966if test "${with_gc+set}" = set; then
14967 withval="$with_gc"
14968 case "$withval" in
08cee789 14969 page)
81bf3d9e 14970 GGC=ggc-$withval
08cee789
DJ
14971 ;;
14972 zone)
14973 GGC=ggc-$withval
14974
14975cat >>confdefs.h <<\_ACEOF
14976#define GGC_ZONE 1
14977_ACEOF
14978
81bf3d9e
RH
14979 ;;
14980 *)
ba479fd2
NN
14981 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
14982echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
14983 { (exit 1); exit 1; }; }
81bf3d9e
RH
14984 ;;
14985esac
14986else
005537df 14987 GGC=ggc-page
ba479fd2 14988fi;
81bf3d9e
RH
14989
14990echo "Using $GGC for garbage collection."
14991
3c809ba4 14992# Use the system's zlib library.
b8dad04b
ZW
14993zlibdir=-L../zlib
14994zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 14995
3c809ba4
AG
14996# Check whether --with-system-zlib or --without-system-zlib was given.
14997if test "${with_system_zlib+set}" = set; then
14998 withval="$with_system_zlib"
14999 zlibdir=
15000zlibinc=
15001
ba479fd2 15002fi;
3c809ba4
AG
15003
15004
15005
dc6746e7 15006
ba479fd2
NN
15007echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
15008echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
15009 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
15010if test "${enable_maintainer_mode+set}" = set; then
15011 enableval="$enable_maintainer_mode"
15012 maintainer_mode=$enableval
15013else
15014 maintainer_mode=no
ba479fd2 15015fi;
63cf211a 15016
ba479fd2
NN
15017echo "$as_me:$LINENO: result: $maintainer_mode" >&5
15018echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
15019
15020if test "$maintainer_mode" = "yes"; then
15021 MAINT=''
15022else
15023 MAINT='#'
15024fi
15025
8bb915b6
NN
15026# --------------
15027# Language hooks
15028# --------------
15029
861bb6c1
JL
15030# Make empty files to contain the specs and options for each language.
15031# Then add #include lines to for a compiler that has specs and/or options.
15032
d7b42618 15033lang_opt_files=
861bb6c1 15034lang_specs_files=
3103b7db 15035lang_tree_files=
861bb6c1
JL
15036for subdir in . $subdirs
15037do
d7b42618
NB
15038 if test -f $srcdir/$subdir/lang.opt; then
15039 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
15040 fi
75bffa71 15041 if test -f $srcdir/$subdir/lang-specs.h; then
0d24f4d1 15042 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
861bb6c1 15043 fi
3103b7db 15044 if test -f $srcdir/$subdir/$subdir-tree.def; then
0d24f4d1 15045 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
3103b7db 15046 fi
861bb6c1
JL
15047done
15048
15049# These (without "all_") are set in each config-lang.in.
15050# `language' must be a single word so is spelled singularly.
15051all_languages=
15052all_boot_languages=
15053all_compilers=
15054all_stagestuff=
53c7ffe7 15055all_outputs='Makefile gccbug mklibgcc libada-mk'
861bb6c1 15056# List of language makefile fragments.
2ed26f6b
ZW
15057all_lang_makefrags=
15058# List of language subdirectory makefiles. Deprecated.
861bb6c1 15059all_lang_makefiles=
e2500fed 15060# Files for gengtype
ef69da62 15061all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
15062# Files for gengtype with language
15063all_gtfiles_files_langs=
15064all_gtfiles_files_files=
861bb6c1
JL
15065
15066# Add the language fragments.
15067# Languages are added via two mechanisms. Some information must be
15068# recorded in makefile variables, these are defined in config-lang.in.
15069# We accumulate them and plug them into the main Makefile.
15070# The other mechanism is a set of hooks for each of the main targets
15071# like `clean', `install', etc.
15072
861bb6c1 15073language_hooks="Make-hooks"
861bb6c1 15074
c406e779 15075for s in $subdirs
861bb6c1 15076do
861bb6c1
JL
15077 language=
15078 boot_language=
15079 compilers=
15080 stagestuff=
861bb6c1 15081 outputs=
e2500fed 15082 gtfiles=
861bb6c1 15083 . ${srcdir}/$s/config-lang.in
75bffa71 15084 if test "x$language" = x
861bb6c1
JL
15085 then
15086 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
15087 exit 1
15088 fi
2ed26f6b 15089 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
72aaffbd 15090 if test -f ${srcdir}/$s/Makefile.in
2ed26f6b 15091 then all_lang_makefiles="$s/Makefile"
72aaffbd 15092 fi
861bb6c1 15093 all_languages="$all_languages $language"
75bffa71 15094 if test "x$boot_language" = xyes
861bb6c1
JL
15095 then
15096 all_boot_languages="$all_boot_languages $language"
15097 fi
15098 all_compilers="$all_compilers $compilers"
15099 all_stagestuff="$all_stagestuff $stagestuff"
861bb6c1 15100 all_outputs="$all_outputs $outputs"
e2500fed 15101 all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15102 for f in $gtfiles
8ac9d31f 15103 do
8ac9d31f
TJ
15104 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
15105 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f 15106 done
861bb6c1
JL
15107done
15108
8ac9d31f
TJ
15109# Pick up gtfiles for c
15110gtfiles=
15111s="c"
15112. ${srcdir}/c-config-lang.in
15113all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15114for f in $gtfiles
8ac9d31f 15115do
8ac9d31f
TJ
15116 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
15117 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
15118done
15119
cbc59f01 15120check_languages=
c406e779 15121for language in $all_languages
cbc59f01 15122do
cbc59f01 15123 check_languages="$check_languages check-$language"
cbc59f01
DD
15124done
15125
62b81e45
MM
15126# We link each language in with a set of hooks, reached indirectly via
15127# lang.${target}.
861bb6c1
JL
15128
15129rm -f Make-hooks
15130touch Make-hooks
65ebbf81 15131target_list="all.build all.cross start.encap rest.encap tags \
a207b594 15132 install-normal install-common install-man \
a541f69d 15133 uninstall info man srcextra srcman srcinfo \
a03ad584 15134 mostlyclean clean distclean maintainer-clean \
8f231b5d 15135 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
861bb6c1
JL
15136for t in $target_list
15137do
15138 x=
c406e779 15139 for lang in $all_languages
861bb6c1 15140 do
ab87f8c8 15141 x="$x $lang.$t"
861bb6c1
JL
15142 done
15143 echo "lang.$t: $x" >> Make-hooks
15144done
15145
8bb915b6
NN
15146# --------
15147# UNSORTED
15148# --------
15149
cc06d68c 15150# Create .gdbinit.
861bb6c1 15151
cc06d68c
GP
15152echo "dir ." > .gdbinit
15153echo "dir ${srcdir}" >> .gdbinit
15154if test x$gdb_needs_out_file_path = xyes
15155then
15156 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
15157fi
15158if test "x$subdirs" != x; then
15159 for s in $subdirs
15160 do
15161 echo "dir ${srcdir}/$s" >> .gdbinit
15162 done
861bb6c1 15163fi
cc06d68c 15164echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 15165
8f8d3278
NC
15166# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
15167# absolute path for gcc_tooldir based on inserting the number of up-directory
15168# movements required to get from $(exec_prefix) to $(prefix) into the basic
15169# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
15170# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
15171# make and thus we'd get different behavior depending on where we built the
15172# sources.
5949a9fc 15173if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 15174 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 15175else
8f8d3278
NC
15176# An explanation of the sed strings:
15177# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
15178# -e 's|/$||' match a trailing forward slash and eliminates it
15179# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 15180# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
15181#
15182# (*) Note this pattern overwrites the first character of the string
15183# with a forward slash if one is not already present. This is not a
15184# problem because the exact names of the sub-directories concerned is
15185# unimportant, just the number of them matters.
15186#
15187# The practical upshot of these patterns is like this:
15188#
15189# prefix exec_prefix result
15190# ------ ----------- ------
15191# /foo /foo/bar ../
15192# /foo/ /foo/bar ../
15193# /foo /foo/bar/ ../
15194# /foo/ /foo/bar/ ../
15195# /foo /foo/bar/ugg ../../
15196#
4c112cda 15197 dollar='$$'
caa55b1e 15198 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
15199fi
15200
15201
2ce3c6c6 15202
2bbea3a6
RH
15203# Find a directory in which to install a shared libgcc.
15204
15205# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
15206if test "${enable_version_specific_runtime_libs+set}" = set; then
15207 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
15208
15209fi;
2bbea3a6
RH
15210
15211
5b15f277
RH
15212# Check whether --with-slibdir or --without-slibdir was given.
15213if test "${with_slibdir+set}" = set; then
15214 withval="$with_slibdir"
15215 slibdir="$with_slibdir"
15216else
15217 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 15218 slibdir='$(libsubdir)'
5b15f277 15219elif test "$host" != "$target"; then
2bbea3a6
RH
15220 slibdir='$(build_tooldir)/lib'
15221else
5b15f277 15222 slibdir='$(libdir)'
2bbea3a6 15223fi
ba479fd2 15224fi;
2bbea3a6
RH
15225
15226
1e6347d8 15227objdir=`${PWDCMD-pwd}`
7e717196
JL
15228
15229
861bb6c1
JL
15230# Substitute configuration variables
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
9b16d2c4 15277
e9a25f70 15278
6e26218f 15279
c8724862 15280
e061d1ce 15281
d8bb17c8 15282
11642c3a
ZW
15283
15284
15285
15286
15287
15288
15289
3d9d2476 15290
8ac9d31f 15291
4c4a5bbc 15292
4c4a5bbc
L
15293
15294
15295if test x"$SET_GCC_LIB_PATH_CMD" != x; then
15296 # SET_GCC_LIB_PATH_CMD is "XXX=path; export XXX;". It is expanded to
15297 #
15298 # eval "set_gcc_lib_path=XXX=path; export XXX;"
15299 #
15300 eval "set_gcc_lib_path=$SET_GCC_LIB_PATH_CMD"
15301 # It will set set_gcc_lib_path to "export XXX=path" for GNU make.
15302 set_gcc_lib_path="export $set_gcc_lib_path"
15303else
15304 set_gcc_lib_path=
15305fi
e2500fed 15306
51b9ff45 15307
861bb6c1 15308
6e3f3080
NN
15309# Echo link setup.
15310if test x${build} = x${host} ; then
15311 if test x${host} = x${target} ; then
15312 echo "Links are now set up to build a native compiler for ${target}." 1>&2
15313 else
15314 echo "Links are now set up to build a cross-compiler" 1>&2
15315 echo " from ${host} to ${target}." 1>&2
15316 fi
15317else
15318 if test x${host} = x${target} ; then
15319 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
15320 echo " for ${target}." 1>&2
15321 else
15322 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
15323 echo " from ${host} to ${target}." 1>&2
15324 fi
15325fi
15326
6de9cd9a
DN
15327
15328
15329
6e3f3080
NN
15330# Configure the subdirectories
15331# AC_CONFIG_SUBDIRS($subdirs)
15332
15333# Create the Makefile
15334# and configure language subdirectories
ba479fd2 15335 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
15336
15337
ba479fd2 15338 ac_config_commands="$ac_config_commands default"
914c5af7 15339
ba479fd2 15340cat >confcache <<\_ACEOF
6e3f3080
NN
15341# This file is a shell script that caches the results of configure
15342# tests run on this system so they can be shared between configure
ba479fd2
NN
15343# scripts and configure runs, see configure's option --config-cache.
15344# It is not useful on other systems. If it contains results you don't
15345# want to keep, you may remove or edit it.
6e3f3080 15346#
ba479fd2
NN
15347# config.status only pays attention to the cache file if you give it
15348# the --recheck option to rerun configure.
6e3f3080 15349#
ba479fd2
NN
15350# `ac_cv_env_foo' variables (set or unset) will be overridden when
15351# loading this file, other *unset* `ac_cv_foo' will be assigned the
15352# following values.
15353
15354_ACEOF
15355
6e3f3080
NN
15356# The following way of writing the cache mishandles newlines in values,
15357# but we know of no workaround that is simple, portable, and efficient.
15358# So, don't put newlines in cache variables' values.
15359# Ultrix sh set writes to stderr and can't be redirected directly,
15360# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
15361{
15362 (set) 2>&1 |
15363 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15364 *ac_space=\ *)
15365 # `set' does not quote correctly, so add quotes (double-quote
15366 # substitution turns \\\\ into \\, and sed turns \\ into \).
15367 sed -n \
86da66b5
HPN
15368 "s/'/'\\\\''/g;
15369 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ba479fd2
NN
15370 ;;
15371 *)
15372 # `set' quotes correctly as required by POSIX, so do not add quotes.
15373 sed -n \
86da66b5 15374 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
15375 ;;
15376 esac;
15377} |
15378 sed '
15379 t clear
15380 : clear
15381 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15382 t end
15383 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15384 : end' >>confcache
15385if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 15386 if test -w $cache_file; then
ba479fd2
NN
15387 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15388 cat confcache >$cache_file
6e3f3080
NN
15389 else
15390 echo "not updating unwritable cache $cache_file"
15391 fi
15392fi
15393rm -f confcache
15394
15395test "x$prefix" = xNONE && prefix=$ac_default_prefix
15396# Let make expand exec_prefix.
15397test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15398
ba479fd2
NN
15399# VPATH may cause trouble with some makes, so we remove $(srcdir),
15400# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15401# trailing colons and then remove the whole line if VPATH becomes empty
15402# (actually we leave an empty line to preserve line numbers).
6e3f3080 15403if test "x$srcdir" = x.; then
86da66b5 15404 ac_vpsub='/^[ ]*VPATH[ ]*=/{
ba479fd2
NN
15405s/:*\$(srcdir):*/:/;
15406s/:*\${srcdir}:*/:/;
15407s/:*@srcdir@:*/:/;
86da66b5 15408s/^\([^=]*=[ ]*\):*/\1/;
ba479fd2 15409s/:*$//;
86da66b5 15410s/^[^=]*=[ ]*$//;
ba479fd2 15411}'
6e3f3080
NN
15412fi
15413
63cf211a 15414DEFS=-DHAVE_CONFIG_H
6e3f3080 15415
ba479fd2
NN
15416ac_libobjs=
15417ac_ltlibobjs=
15418for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15419 # 1. Remove the extension, and $U if already installed.
15420 ac_i=`echo "$ac_i" |
86da66b5 15421 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
ba479fd2
NN
15422 # 2. Add them.
15423 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
15424 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
15425done
15426LIBOBJS=$ac_libobjs
63cf211a 15427
ba479fd2
NN
15428LTLIBOBJS=$ac_ltlibobjs
15429
15430
15431
15432: ${CONFIG_STATUS=./config.status}
15433ac_clean_files_save=$ac_clean_files
15434ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15435{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15436echo "$as_me: creating $CONFIG_STATUS" >&6;}
15437cat >$CONFIG_STATUS <<_ACEOF
15438#! $SHELL
15439# Generated by $as_me.
6e3f3080
NN
15440# Run this file to recreate the current configuration.
15441# Compiler output produced by configure, useful for debugging
ba479fd2 15442# configure, is in config.log if it exists.
6e3f3080 15443
ba479fd2
NN
15444debug=false
15445ac_cs_recheck=false
15446ac_cs_silent=false
15447SHELL=\${CONFIG_SHELL-$SHELL}
15448_ACEOF
15449
15450cat >>$CONFIG_STATUS <<\_ACEOF
15451## --------------------- ##
15452## M4sh Initialization. ##
15453## --------------------- ##
15454
15455# Be Bourne compatible
15456if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15457 emulate sh
15458 NULLCMD=:
15459 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
15460 # is contrary to our usage. Disable this feature.
15461 alias -g '${1+"$@"}'='"$@"'
15462elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15463 set -o posix
15464fi
86da66b5 15465DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
15466
15467# Support unset when possible.
86da66b5 15468if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
15469 as_unset=unset
15470else
15471 as_unset=false
15472fi
15473
15474
15475# Work around bugs in pre-3.0 UWIN ksh.
15476$as_unset ENV MAIL MAILPATH
15477PS1='$ '
15478PS2='> '
15479PS4='+ '
15480
15481# NLS nuisances.
15482for as_var in \
15483 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
15484 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
15485 LC_TELEPHONE LC_TIME
6e3f3080 15486do
86da66b5 15487 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
15488 eval $as_var=C; export $as_var
15489 else
15490 $as_unset $as_var
15491 fi
6e3f3080
NN
15492done
15493
ba479fd2
NN
15494# Required to use basename.
15495if expr a : '\(a\)' >/dev/null 2>&1; then
15496 as_expr=expr
15497else
15498 as_expr=false
15499fi
6e3f3080 15500
ba479fd2
NN
15501if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
15502 as_basename=basename
15503else
15504 as_basename=false
15505fi
6e3f3080
NN
15506
15507
ba479fd2
NN
15508# Name of the executable.
15509as_me=`$as_basename "$0" ||
15510$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15511 X"$0" : 'X\(//\)$' \| \
15512 X"$0" : 'X\(/\)$' \| \
15513 . : '\(.\)' 2>/dev/null ||
15514echo X/"$0" |
15515 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15516 /^X\/\(\/\/\)$/{ s//\1/; q; }
15517 /^X\/\(\/\).*/{ s//\1/; q; }
15518 s/.*/./; q'`
15519
6e3f3080 15520
ba479fd2
NN
15521# PATH needs CR, and LINENO needs CR and PATH.
15522# Avoid depending upon Character Ranges.
15523as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15524as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15525as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15526as_cr_digits='0123456789'
15527as_cr_alnum=$as_cr_Letters$as_cr_digits
15528
15529# The user is always right.
15530if test "${PATH_SEPARATOR+set}" != set; then
15531 echo "#! /bin/sh" >conf$$.sh
15532 echo "exit 0" >>conf$$.sh
15533 chmod +x conf$$.sh
15534 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
15535 PATH_SEPARATOR=';'
6e3f3080 15536 else
ba479fd2
NN
15537 PATH_SEPARATOR=:
15538 fi
15539 rm -f conf$$.sh
15540fi
15541
15542
15543 as_lineno_1=$LINENO
15544 as_lineno_2=$LINENO
15545 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15546 test "x$as_lineno_1" != "x$as_lineno_2" &&
15547 test "x$as_lineno_3" = "x$as_lineno_2" || {
15548 # Find who we are. Look in the path if we contain no path at all
15549 # relative or not.
15550 case $0 in
15551 *[\\/]* ) as_myself=$0 ;;
15552 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15553for as_dir in $PATH
15554do
15555 IFS=$as_save_IFS
15556 test -z "$as_dir" && as_dir=.
15557 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15558done
15559
15560 ;;
15561 esac
15562 # We did not find ourselves, most probably we were run as `sh COMMAND'
15563 # in which case we are not to be found in the path.
15564 if test "x$as_myself" = x; then
15565 as_myself=$0
15566 fi
15567 if test ! -f "$as_myself"; then
15568 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
15569echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
15570 { (exit 1); exit 1; }; }
6e3f3080 15571 fi
ba479fd2
NN
15572 case $CONFIG_SHELL in
15573 '')
15574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15575for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
15576do
15577 IFS=$as_save_IFS
15578 test -z "$as_dir" && as_dir=.
15579 for as_base in sh bash ksh sh5; do
15580 case $as_dir in
15581 /*)
15582 if ("$as_dir/$as_base" -c '
15583 as_lineno_1=$LINENO
15584 as_lineno_2=$LINENO
15585 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15586 test "x$as_lineno_1" != "x$as_lineno_2" &&
15587 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
15588 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
15589 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
15590 CONFIG_SHELL=$as_dir/$as_base
15591 export CONFIG_SHELL
15592 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
15593 fi;;
15594 esac
15595 done
15596done
15597;;
15598 esac
15599
15600 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
15601 # uniformly replaced by the line number. The first 'sed' inserts a
15602 # line-number line before each line; the second 'sed' does the real
15603 # work. The second script uses 'N' to pair each line-number line
15604 # with the numbered line, and appends trailing '-' during
15605 # substitution so that $LINENO is not a special case at line end.
15606 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
15607 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
15608 sed '=' <$as_myself |
15609 sed '
15610 N
15611 s,$,-,
15612 : loop
15613 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
15614 t loop
15615 s,-$,,
15616 s,^['$as_cr_digits']*\n,,
15617 ' >$as_me.lineno &&
15618 chmod +x $as_me.lineno ||
15619 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
15620echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
15621 { (exit 1); exit 1; }; }
15622
15623 # Don't try to exec as it changes $[0], causing all sort of problems
15624 # (the dirname of $[0] is not the place where we might find the
15625 # original and so on. Autoconf is especially sensible to this).
15626 . ./$as_me.lineno
15627 # Exit status is that of the last command.
15628 exit
15629}
15630
15631
15632case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
15633 *c*,-n*) ECHO_N= ECHO_C='
15634' ECHO_T=' ' ;;
15635 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
15636 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
15637esac
15638
15639if expr a : '\(a\)' >/dev/null 2>&1; then
15640 as_expr=expr
15641else
15642 as_expr=false
15643fi
15644
15645rm -f conf$$ conf$$.exe conf$$.file
15646echo >conf$$.file
15647if ln -s conf$$.file conf$$ 2>/dev/null; then
15648 # We could just check for DJGPP; but this test a) works b) is more generic
15649 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15650 if test -f conf$$.exe; then
15651 # Don't use ln at all; we don't have any links
15652 as_ln_s='cp -p'
6e3f3080 15653 else
ba479fd2 15654 as_ln_s='ln -s'
6e3f3080 15655 fi
ba479fd2
NN
15656elif ln conf$$.file conf$$ 2>/dev/null; then
15657 as_ln_s=ln
15658else
15659 as_ln_s='cp -p'
15660fi
15661rm -f conf$$ conf$$.exe conf$$.file
15662
15663if mkdir -p . 2>/dev/null; then
15664 as_mkdir_p=:
15665else
86da66b5 15666 test -d ./-p && rmdir ./-p
ba479fd2
NN
15667 as_mkdir_p=false
15668fi
15669
15670as_executable_p="test -f"
15671
15672# Sed expression to map a string onto a valid CPP name.
86da66b5 15673as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
15674
15675# Sed expression to map a string onto a valid variable name.
86da66b5 15676as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
15677
15678
15679# IFS
15680# We need space, tab and new line, in precisely that order.
15681as_nl='
15682'
15683IFS=" $as_nl"
15684
15685# CDPATH.
15686$as_unset CDPATH
15687
15688exec 6>&1
15689
15690# Open the log real soon, to keep \$[0] and so on meaningful, and to
15691# report actual input values of CONFIG_FILES etc. instead of their
15692# values after options handling. Logging --version etc. is OK.
15693exec 5>>config.log
15694{
15695 echo
15696 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15697## Running $as_me. ##
15698_ASBOX
15699} >&5
15700cat >&5 <<_CSEOF
15701
15702This file was extended by $as_me, which was
8ab705be 15703generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
15704
15705 CONFIG_FILES = $CONFIG_FILES
15706 CONFIG_HEADERS = $CONFIG_HEADERS
15707 CONFIG_LINKS = $CONFIG_LINKS
15708 CONFIG_COMMANDS = $CONFIG_COMMANDS
15709 $ $0 $@
15710
15711_CSEOF
15712echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
15713echo >&5
15714_ACEOF
15715
15716# Files that config.status was made for.
15717if test -n "$ac_config_files"; then
15718 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15719fi
15720
15721if test -n "$ac_config_headers"; then
15722 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15723fi
15724
15725if test -n "$ac_config_links"; then
15726 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15727fi
15728
15729if test -n "$ac_config_commands"; then
15730 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15731fi
15732
15733cat >>$CONFIG_STATUS <<\_ACEOF
15734
15735ac_cs_usage="\
15736\`$as_me' instantiates files from templates according to the
15737current configuration.
15738
15739Usage: $0 [OPTIONS] [FILE]...
15740
15741 -h, --help print this help, then exit
15742 -V, --version print version number, then exit
15743 -q, --quiet do not print progress messages
15744 -d, --debug don't remove temporary files
15745 --recheck update $as_me by reconfiguring in the same conditions
15746 --file=FILE[:TEMPLATE]
86da66b5 15747 instantiate the configuration file FILE
ba479fd2 15748 --header=FILE[:TEMPLATE]
86da66b5 15749 instantiate the configuration header FILE
ba479fd2
NN
15750
15751Configuration files:
15752$config_files
15753
15754Configuration headers:
15755$config_headers
15756
15757Configuration commands:
15758$config_commands
15759
15760Report bugs to <bug-autoconf@gnu.org>."
15761_ACEOF
15762
15763cat >>$CONFIG_STATUS <<_ACEOF
15764ac_cs_version="\\
15765config.status
8ab705be 15766configured by $0, generated by GNU Autoconf 2.59,
ba479fd2
NN
15767 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15768
86da66b5 15769Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
15770This config.status script is free software; the Free Software Foundation
15771gives unlimited permission to copy, distribute and modify it."
15772srcdir=$srcdir
15773_ACEOF
15774
15775cat >>$CONFIG_STATUS <<\_ACEOF
15776# If no file are specified by the user, then we need to provide default
15777# value. By we need to know if files were specified by the user.
15778ac_need_defaults=:
15779while test $# != 0
15780do
15781 case $1 in
15782 --*=*)
15783 ac_option=`expr "x$1" : 'x\([^=]*\)='`
15784 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15785 ac_shift=:
15786 ;;
15787 -*)
15788 ac_option=$1
15789 ac_optarg=$2
15790 ac_shift=shift
15791 ;;
15792 *) # This is not an option, so the user has probably given explicit
15793 # arguments.
15794 ac_option=$1
15795 ac_need_defaults=false;;
15796 esac
15797
15798 case $ac_option in
15799 # Handling of the options.
15800_ACEOF
15801cat >>$CONFIG_STATUS <<\_ACEOF
15802 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15803 ac_cs_recheck=: ;;
15804 --version | --vers* | -V )
15805 echo "$ac_cs_version"; exit 0 ;;
15806 --he | --h)
15807 # Conflict between --help and --header
15808 { { echo "$as_me:$LINENO: error: ambiguous option: $1
15809Try \`$0 --help' for more information." >&5
15810echo "$as_me: error: ambiguous option: $1
15811Try \`$0 --help' for more information." >&2;}
15812 { (exit 1); exit 1; }; };;
15813 --help | --hel | -h )
15814 echo "$ac_cs_usage"; exit 0 ;;
15815 --debug | --d* | -d )
15816 debug=: ;;
15817 --file | --fil | --fi | --f )
15818 $ac_shift
15819 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
15820 ac_need_defaults=false;;
15821 --header | --heade | --head | --hea )
15822 $ac_shift
15823 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
15824 ac_need_defaults=false;;
15825 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15826 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15827 ac_cs_silent=: ;;
15828
15829 # This is an error.
15830 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
15831Try \`$0 --help' for more information." >&5
15832echo "$as_me: error: unrecognized option: $1
15833Try \`$0 --help' for more information." >&2;}
15834 { (exit 1); exit 1; }; } ;;
15835
15836 *) ac_config_targets="$ac_config_targets $1" ;;
15837
15838 esac
15839 shift
6e3f3080 15840done
ba479fd2
NN
15841
15842ac_configure_extra_args=
15843
15844if $ac_cs_silent; then
15845 exec 6>/dev/null
15846 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
15847fi
15848
ba479fd2
NN
15849_ACEOF
15850cat >>$CONFIG_STATUS <<_ACEOF
15851if \$ac_cs_recheck; then
15852 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
15853 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15854fi
861bb6c1 15855
ba479fd2
NN
15856_ACEOF
15857
15858cat >>$CONFIG_STATUS <<_ACEOF
15859#
15860# INIT-COMMANDS section.
15861#
15862
15863subdirs='$subdirs'
ba479fd2
NN
15864
15865_ACEOF
15866
15867
15868
15869cat >>$CONFIG_STATUS <<\_ACEOF
15870for ac_config_target in $ac_config_targets
15871do
15872 case "$ac_config_target" in
15873 # Handling of arguments.
15874 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
15875 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15876 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
15877 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
15878echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15879 { (exit 1); exit 1; }; };;
861bb6c1 15880 esac
ba479fd2
NN
15881done
15882
15883# If the user did not use the arguments to specify the items to instantiate,
15884# then the envvar interface is used. Set only those that are not.
15885# We use the long form for the default assignment because of an extremely
15886# bizarre bug on SunOS 4.1.3.
15887if $ac_need_defaults; then
15888 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15889 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15890 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15891fi
15892
15893# Have a temporary directory for convenience. Make it in the build tree
15894# simply because there is no reason to put it here, and in addition,
15895# creating and moving files from /tmp can sometimes cause problems.
15896# Create a temporary directory, and hook for its removal unless debugging.
15897$debug ||
15898{
15899 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15900 trap '{ (exit 1); exit 1; }' 1 2 13 15
15901}
861bb6c1 15902
ba479fd2 15903# Create a (secure) tmp directory for tmp files.
6e3f3080 15904
ba479fd2
NN
15905{
15906 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
15907 test -n "$tmp" && test -d "$tmp"
15908} ||
15909{
15910 tmp=./confstat$$-$RANDOM
15911 (umask 077 && mkdir $tmp)
15912} ||
15913{
15914 echo "$me: cannot create a temporary directory in ." >&2
15915 { (exit 1); exit 1; }
15916}
15917
15918_ACEOF
15919
15920cat >>$CONFIG_STATUS <<_ACEOF
15921
15922#
15923# CONFIG_FILES section.
15924#
15925
15926# No need to generate the scripts if there are no CONFIG_FILES.
15927# This happens for instance when ./config.status config.h
15928if test -n "\$CONFIG_FILES"; then
15929 # Protect against being on the right side of a sed subst in config.status.
15930 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15931 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15932s,@SHELL@,$SHELL,;t t
15933s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15934s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15935s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15936s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15937s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15938s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15939s,@exec_prefix@,$exec_prefix,;t t
15940s,@prefix@,$prefix,;t t
15941s,@program_transform_name@,$program_transform_name,;t t
15942s,@bindir@,$bindir,;t t
15943s,@sbindir@,$sbindir,;t t
15944s,@libexecdir@,$libexecdir,;t t
15945s,@datadir@,$datadir,;t t
15946s,@sysconfdir@,$sysconfdir,;t t
15947s,@sharedstatedir@,$sharedstatedir,;t t
15948s,@localstatedir@,$localstatedir,;t t
15949s,@libdir@,$libdir,;t t
15950s,@includedir@,$includedir,;t t
15951s,@oldincludedir@,$oldincludedir,;t t
15952s,@infodir@,$infodir,;t t
15953s,@mandir@,$mandir,;t t
15954s,@build_alias@,$build_alias,;t t
15955s,@host_alias@,$host_alias,;t t
15956s,@target_alias@,$target_alias,;t t
15957s,@DEFS@,$DEFS,;t t
15958s,@ECHO_C@,$ECHO_C,;t t
15959s,@ECHO_N@,$ECHO_N,;t t
15960s,@ECHO_T@,$ECHO_T,;t t
15961s,@LIBS@,$LIBS,;t t
15962s,@build@,$build,;t t
15963s,@build_cpu@,$build_cpu,;t t
15964s,@build_vendor@,$build_vendor,;t t
15965s,@build_os@,$build_os,;t t
15966s,@host@,$host,;t t
15967s,@host_cpu@,$host_cpu,;t t
15968s,@host_vendor@,$host_vendor,;t t
15969s,@host_os@,$host_os,;t t
15970s,@target@,$target,;t t
15971s,@target_cpu@,$target_cpu,;t t
15972s,@target_vendor@,$target_vendor,;t t
15973s,@target_os@,$target_os,;t t
8f1529e6 15974s,@target_noncanonical@,$target_noncanonical,;t t
ba479fd2
NN
15975s,@build_subdir@,$build_subdir,;t t
15976s,@host_subdir@,$host_subdir,;t t
15977s,@target_subdir@,$target_subdir,;t t
4982adbe
RS
15978s,@gcc_version_trigger@,$gcc_version_trigger,;t t
15979s,@gcc_version_full@,$gcc_version_full,;t t
15980s,@gcc_version@,$gcc_version,;t t
03787dfd 15981s,@GENINSRC@,$GENINSRC,;t t
ba479fd2
NN
15982s,@CC@,$CC,;t t
15983s,@CFLAGS@,$CFLAGS,;t t
15984s,@LDFLAGS@,$LDFLAGS,;t t
15985s,@CPPFLAGS@,$CPPFLAGS,;t t
15986s,@ac_ct_CC@,$ac_ct_CC,;t t
15987s,@EXEEXT@,$EXEEXT,;t t
15988s,@OBJEXT@,$OBJEXT,;t t
15989s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
15990s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
15991s,@CPP@,$CPP,;t t
bf3b7cd3 15992s,@EGREP@,$EGREP,;t t
ba479fd2
NN
15993s,@strict1_warn@,$strict1_warn,;t t
15994s,@warn_cflags@,$warn_cflags,;t t
15995s,@WERROR@,$WERROR,;t t
15996s,@nocommon_flag@,$nocommon_flag,;t t
13f05fd0 15997s,@TREEBROWSER@,$TREEBROWSER,;t t
ba479fd2
NN
15998s,@valgrind_path@,$valgrind_path,;t t
15999s,@valgrind_path_defines@,$valgrind_path_defines,;t t
16000s,@valgrind_command@,$valgrind_command,;t t
16001s,@coverage_flags@,$coverage_flags,;t t
16002s,@enable_multilib@,$enable_multilib,;t t
16003s,@enable_shared@,$enable_shared,;t t
16004s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
16005s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
16006s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
16007s,@onestep@,$onestep,;t t
16008s,@SET_MAKE@,$SET_MAKE,;t t
16009s,@AWK@,$AWK,;t t
ba479fd2 16010s,@LN_S@,$LN_S,;t t
41e622a8 16011s,@LN@,$LN,;t t
ba479fd2
NN
16012s,@RANLIB@,$RANLIB,;t t
16013s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
343a6100 16014s,@ranlib_flags@,$ranlib_flags,;t t
ba479fd2
NN
16015s,@INSTALL@,$INSTALL,;t t
16016s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16017s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16018s,@make_compare_target@,$make_compare_target,;t t
16019s,@have_mktemp_command@,$have_mktemp_command,;t t
16020s,@MAKEINFO@,$MAKEINFO,;t t
16021s,@BUILD_INFO@,$BUILD_INFO,;t t
16022s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
16023s,@FLEX@,$FLEX,;t t
16024s,@BISON@,$BISON,;t t
f6a874ac
JW
16025s,@NM@,$NM,;t t
16026s,@AR@,$AR,;t t
ba479fd2
NN
16027s,@stage1_cflags@,$stage1_cflags,;t t
16028s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
16029s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
16030s,@LDEXP_LIB@,$LDEXP_LIB,;t t
16031s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
16032s,@LIBICONV@,$LIBICONV,;t t
dfb77e37 16033s,@LTLIBICONV@,$LTLIBICONV,;t t
ba479fd2
NN
16034s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
16035s,@manext@,$manext,;t t
16036s,@objext@,$objext,;t t
8bb915b6 16037s,@gthread_flags@,$gthread_flags,;t t
ba479fd2 16038s,@extra_modes_file@,$extra_modes_file,;t t
75685792 16039s,@extra_opt_files@,$extra_opt_files,;t t
ba479fd2
NN
16040s,@PACKAGE@,$PACKAGE,;t t
16041s,@VERSION@,$VERSION,;t t
16042s,@USE_NLS@,$USE_NLS,;t t
16043s,@LIBINTL@,$LIBINTL,;t t
16044s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
16045s,@INCINTL@,$INCINTL,;t t
16046s,@XGETTEXT@,$XGETTEXT,;t t
16047s,@GMSGFMT@,$GMSGFMT,;t t
16048s,@POSUB@,$POSUB,;t t
16049s,@CATALOGS@,$CATALOGS,;t t
5395b47b 16050s,@host_cc_for_libada@,$host_cc_for_libada,;t t
ba479fd2
NN
16051s,@CROSS@,$CROSS,;t t
16052s,@ALL@,$ALL,;t t
16053s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
16054s,@inhibit_libc@,$inhibit_libc,;t t
ba479fd2
NN
16055s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
16056s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16057s,@STMP_FIXINC@,$STMP_FIXINC,;t t
16058s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
c38f02df 16059s,@collect2@,$collect2,;t t
ba479fd2 16060s,@libgcc_visibility@,$libgcc_visibility,;t t
ba479fd2
NN
16061s,@GGC@,$GGC,;t t
16062s,@zlibdir@,$zlibdir,;t t
16063s,@zlibinc@,$zlibinc,;t t
16064s,@MAINT@,$MAINT,;t t
16065s,@gcc_tooldir@,$gcc_tooldir,;t t
16066s,@dollar@,$dollar,;t t
16067s,@slibdir@,$slibdir,;t t
16068s,@objdir@,$objdir,;t t
16069s,@subdirs@,$subdirs,;t t
16070s,@srcdir@,$srcdir,;t t
ba479fd2
NN
16071s,@all_boot_languages@,$all_boot_languages,;t t
16072s,@all_compilers@,$all_compilers,;t t
16073s,@all_gtfiles@,$all_gtfiles,;t t
16074s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
16075s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
16076s,@all_lang_makefrags@,$all_lang_makefrags,;t t
16077s,@all_lang_makefiles@,$all_lang_makefiles,;t t
16078s,@all_languages@,$all_languages,;t t
16079s,@all_stagestuff@,$all_stagestuff,;t t
16080s,@build_exeext@,$build_exeext,;t t
16081s,@build_install_headers_dir@,$build_install_headers_dir,;t t
16082s,@build_xm_file_list@,$build_xm_file_list,;t t
16083s,@build_xm_include_list@,$build_xm_include_list,;t t
16084s,@build_xm_defines@,$build_xm_defines,;t t
16085s,@check_languages@,$check_languages,;t t
16086s,@cc_set_by_configure@,$cc_set_by_configure,;t t
16087s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
16088s,@cpp_install_dir@,$cpp_install_dir,;t t
16089s,@xmake_file@,$xmake_file,;t t
16090s,@tmake_file@,$tmake_file,;t t
30500d84 16091s,@extra_gcc_objs@,$extra_gcc_objs,;t t
ba479fd2
NN
16092s,@extra_headers_list@,$extra_headers_list,;t t
16093s,@extra_objs@,$extra_objs,;t t
16094s,@extra_parts@,$extra_parts,;t t
16095s,@extra_passes@,$extra_passes,;t t
16096s,@extra_programs@,$extra_programs,;t t
16097s,@float_h_file@,$float_h_file,;t t
16098s,@gcc_config_arguments@,$gcc_config_arguments,;t t
16099s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
16100s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
ba479fd2 16101s,@host_exeext@,$host_exeext,;t t
ba479fd2
NN
16102s,@host_xm_file_list@,$host_xm_file_list,;t t
16103s,@host_xm_include_list@,$host_xm_include_list,;t t
16104s,@host_xm_defines@,$host_xm_defines,;t t
16105s,@out_host_hook_obj@,$out_host_hook_obj,;t t
16106s,@install@,$install,;t t
16107s,@lang_opt_files@,$lang_opt_files,;t t
16108s,@lang_specs_files@,$lang_specs_files,;t t
16109s,@lang_tree_files@,$lang_tree_files,;t t
16110s,@local_prefix@,$local_prefix,;t t
16111s,@md_file@,$md_file,;t t
16112s,@objc_boehm_gc@,$objc_boehm_gc,;t t
16113s,@out_file@,$out_file,;t t
16114s,@out_object_file@,$out_object_file,;t t
16115s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
16116s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
ba479fd2
NN
16117s,@thread_file@,$thread_file,;t t
16118s,@tm_file_list@,$tm_file_list,;t t
16119s,@tm_include_list@,$tm_include_list,;t t
16120s,@tm_defines@,$tm_defines,;t t
16121s,@tm_p_file_list@,$tm_p_file_list,;t t
16122s,@tm_p_include_list@,$tm_p_include_list,;t t
16123s,@xm_file_list@,$xm_file_list,;t t
16124s,@xm_include_list@,$xm_include_list,;t t
16125s,@xm_defines@,$xm_defines,;t t
ba479fd2
NN
16126s,@c_target_objs@,$c_target_objs,;t t
16127s,@cxx_target_objs@,$cxx_target_objs,;t t
16128s,@target_cpu_default@,$target_cpu_default,;t t
4c4a5bbc 16129s,@set_gcc_lib_path@,$set_gcc_lib_path,;t t
6de9cd9a
DN
16130s,@GMPLIBS@,$GMPLIBS,;t t
16131s,@GMPINC@,$GMPINC,;t t
ba479fd2
NN
16132s,@LIBOBJS@,$LIBOBJS,;t t
16133s,@LTLIBOBJS@,$LTLIBOBJS,;t t
16134/@language_hooks@/r $language_hooks
16135s,@language_hooks@,,;t t
16136CEOF
16137
16138_ACEOF
16139
16140 cat >>$CONFIG_STATUS <<\_ACEOF
16141 # Split the substitutions into bite-sized pieces for seds with
16142 # small command number limits, like on Digital OSF/1 and HP-UX.
16143 ac_max_sed_lines=48
16144 ac_sed_frag=1 # Number of current file.
16145 ac_beg=1 # First line for current file.
16146 ac_end=$ac_max_sed_lines # Line after last line for current file.
16147 ac_more_lines=:
16148 ac_sed_cmds=
16149 while $ac_more_lines; do
16150 if test $ac_beg -gt 1; then
16151 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16152 else
16153 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16154 fi
16155 if test ! -s $tmp/subs.frag; then
16156 ac_more_lines=false
16157 else
16158 # The purpose of the label and of the branching condition is to
16159 # speed up the sed processing (if there are no `@' at all, there
16160 # is no need to browse any of the substitutions).
16161 # These are the two extra sed commands mentioned above.
16162 (echo ':t
16163 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16164 if test -z "$ac_sed_cmds"; then
86da66b5 16165 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2 16166 else
86da66b5 16167 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2
NN
16168 fi
16169 ac_sed_frag=`expr $ac_sed_frag + 1`
16170 ac_beg=$ac_end
16171 ac_end=`expr $ac_end + $ac_max_sed_lines`
16172 fi
16173 done
16174 if test -z "$ac_sed_cmds"; then
16175 ac_sed_cmds=cat
63cf211a 16176 fi
ba479fd2 16177fi # test -n "$CONFIG_FILES"
cafe096b 16178
ba479fd2
NN
16179_ACEOF
16180cat >>$CONFIG_STATUS <<\_ACEOF
16181for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16182 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16183 case $ac_file in
16184 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
16185 cat >$tmp/stdin
16186 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16187 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16188 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 16189 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16190 * ) ac_file_in=$ac_file.in ;;
63cf211a 16191 esac
cafe096b 16192
ba479fd2
NN
16193 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16194 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16195$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16196 X"$ac_file" : 'X\(//\)[^/]' \| \
16197 X"$ac_file" : 'X\(//\)$' \| \
16198 X"$ac_file" : 'X\(/\)' \| \
16199 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16200echo X"$ac_file" |
16201 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16202 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16203 /^X\(\/\/\)$/{ s//\1/; q; }
16204 /^X\(\/\).*/{ s//\1/; q; }
16205 s/.*/./; q'`
16206 { if $as_mkdir_p; then
16207 mkdir -p "$ac_dir"
16208 else
16209 as_dir="$ac_dir"
16210 as_dirs=
16211 while test ! -d "$as_dir"; do
16212 as_dirs="$as_dir $as_dirs"
16213 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16214$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16215 X"$as_dir" : 'X\(//\)[^/]' \| \
16216 X"$as_dir" : 'X\(//\)$' \| \
16217 X"$as_dir" : 'X\(/\)' \| \
16218 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16219echo X"$as_dir" |
16220 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16221 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16222 /^X\(\/\/\)$/{ s//\1/; q; }
16223 /^X\(\/\).*/{ s//\1/; q; }
16224 s/.*/./; q'`
16225 done
16226 test ! -n "$as_dirs" || mkdir $as_dirs
16227 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16228echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16229 { (exit 1); exit 1; }; }; }
6e3f3080 16230
ba479fd2
NN
16231 ac_builddir=.
16232
16233if test "$ac_dir" != .; then
16234 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16235 # A "../" for each directory in $ac_dir_suffix.
16236 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16237else
16238 ac_dir_suffix= ac_top_builddir=
16239fi
16240
16241case $srcdir in
16242 .) # No --srcdir option. We are building in place.
16243 ac_srcdir=.
16244 if test -z "$ac_top_builddir"; then
16245 ac_top_srcdir=.
16246 else
16247 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16248 fi ;;
16249 [\\/]* | ?:[\\/]* ) # Absolute path.
16250 ac_srcdir=$srcdir$ac_dir_suffix;
16251 ac_top_srcdir=$srcdir ;;
16252 *) # Relative path.
16253 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16254 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16255esac
8ab705be
KC
16256
16257# Do not use `cd foo && pwd` to compute absolute paths, because
16258# the directories may not exist.
16259case `pwd` in
16260.) ac_abs_builddir="$ac_dir";;
86da66b5 16261*)
8ab705be
KC
16262 case "$ac_dir" in
16263 .) ac_abs_builddir=`pwd`;;
16264 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
16265 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
16266 esac;;
16267esac
8ab705be 16268case $ac_abs_builddir in
86da66b5
HPN
16269.) ac_abs_top_builddir=${ac_top_builddir}.;;
16270*)
16271 case ${ac_top_builddir}. in
8ab705be 16272 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 16273 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 16274 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
16275 esac;;
16276esac
8ab705be 16277case $ac_abs_builddir in
86da66b5
HPN
16278.) ac_abs_srcdir=$ac_srcdir;;
16279*)
16280 case $ac_srcdir in
8ab705be 16281 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 16282 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 16283 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
16284 esac;;
16285esac
8ab705be 16286case $ac_abs_builddir in
86da66b5
HPN
16287.) ac_abs_top_srcdir=$ac_top_srcdir;;
16288*)
16289 case $ac_top_srcdir in
8ab705be 16290 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 16291 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 16292 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
16293 esac;;
16294esac
ba479fd2
NN
16295
16296
16297
ba479fd2
NN
16298 # Let's still pretend it is `configure' which instantiates (i.e., don't
16299 # use $as_me), people would be surprised to read:
16300 # /* config.h. Generated by config.status. */
16301 if test x"$ac_file" = x-; then
16302 configure_input=
16303 else
16304 configure_input="$ac_file. "
16305 fi
16306 configure_input=$configure_input"Generated from `echo $ac_file_in |
86da66b5 16307 sed 's,.*/,,'` by configure."
ba479fd2
NN
16308
16309 # First look for the input files in the build tree, otherwise in the
16310 # src tree.
16311 ac_file_inputs=`IFS=:
16312 for f in $ac_file_in; do
16313 case $f in
16314 -) echo $tmp/stdin ;;
16315 [\\/$]*)
86da66b5
HPN
16316 # Absolute (can't be DOS-style, as IFS=:)
16317 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16318echo "$as_me: error: cannot find input file: $f" >&2;}
16319 { (exit 1); exit 1; }; }
86da66b5 16320 echo "$f";;
ba479fd2 16321 *) # Relative
86da66b5
HPN
16322 if test -f "$f"; then
16323 # Build tree
16324 echo "$f"
16325 elif test -f "$srcdir/$f"; then
16326 # Source tree
16327 echo "$srcdir/$f"
16328 else
16329 # /dev/null tree
16330 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16331echo "$as_me: error: cannot find input file: $f" >&2;}
16332 { (exit 1); exit 1; }; }
86da66b5 16333 fi;;
ba479fd2
NN
16334 esac
16335 done` || { (exit 1); exit 1; }
b095fe2c
DJ
16336
16337 if test x"$ac_file" != x-; then
16338 { echo "$as_me:$LINENO: creating $ac_file" >&5
16339echo "$as_me: creating $ac_file" >&6;}
16340 rm -f "$ac_file"
16341 fi
ba479fd2
NN
16342_ACEOF
16343cat >>$CONFIG_STATUS <<_ACEOF
16344 sed "$ac_vpsub
16345$extrasub
16346_ACEOF
16347cat >>$CONFIG_STATUS <<\_ACEOF
16348:t
16349/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16350s,@configure_input@,$configure_input,;t t
16351s,@srcdir@,$ac_srcdir,;t t
16352s,@abs_srcdir@,$ac_abs_srcdir,;t t
16353s,@top_srcdir@,$ac_top_srcdir,;t t
16354s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16355s,@builddir@,$ac_builddir,;t t
16356s,@abs_builddir@,$ac_abs_builddir,;t t
16357s,@top_builddir@,$ac_top_builddir,;t t
16358s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16359" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16360 rm -f $tmp/stdin
16361 if test x"$ac_file" != x-; then
16362 mv $tmp/out $ac_file
16363 else
16364 cat $tmp/out
16365 rm -f $tmp/out
16366 fi
16367
16368done
16369_ACEOF
16370cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 16371
ba479fd2
NN
16372#
16373# CONFIG_HEADER section.
16374#
861bb6c1
JL
16375
16376# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16377# NAME is the cpp macro being defined and VALUE is the value it is being given.
16378#
16379# ac_d sets the value in "#define NAME VALUE" lines.
86da66b5
HPN
16380ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16381ac_dB='[ ].*$,\1#\2'
ba479fd2
NN
16382ac_dC=' '
16383ac_dD=',;t'
16384# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
86da66b5 16385ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ba479fd2 16386ac_uB='$,\1#\2define\3'
861bb6c1 16387ac_uC=' '
ba479fd2
NN
16388ac_uD=',;t'
16389
16390for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 16391 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
16392 case $ac_file in
16393 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
16394 cat >$tmp/stdin
16395 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16396 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16397 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 16398 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16399 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
16400 esac
16401
ba479fd2
NN
16402 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16403echo "$as_me: creating $ac_file" >&6;}
16404
16405 # First look for the input files in the build tree, otherwise in the
16406 # src tree.
16407 ac_file_inputs=`IFS=:
16408 for f in $ac_file_in; do
16409 case $f in
16410 -) echo $tmp/stdin ;;
16411 [\\/$]*)
86da66b5
HPN
16412 # Absolute (can't be DOS-style, as IFS=:)
16413 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16414echo "$as_me: error: cannot find input file: $f" >&2;}
16415 { (exit 1); exit 1; }; }
86da66b5
HPN
16416 # Do quote $f, to prevent DOS paths from being IFS'd.
16417 echo "$f";;
ba479fd2 16418 *) # Relative
86da66b5
HPN
16419 if test -f "$f"; then
16420 # Build tree
16421 echo "$f"
16422 elif test -f "$srcdir/$f"; then
16423 # Source tree
16424 echo "$srcdir/$f"
16425 else
16426 # /dev/null tree
16427 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16428echo "$as_me: error: cannot find input file: $f" >&2;}
16429 { (exit 1); exit 1; }; }
86da66b5 16430 fi;;
ba479fd2
NN
16431 esac
16432 done` || { (exit 1); exit 1; }
16433 # Remove the trailing spaces.
86da66b5 16434 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
ba479fd2
NN
16435
16436_ACEOF
16437
16438# Transform confdefs.h into two sed scripts, `conftest.defines' and
16439# `conftest.undefs', that substitutes the proper values into
16440# config.h.in to produce config.h. The first handles `#define'
16441# templates, and the second `#undef' templates.
16442# And first: Protect against being on the right side of a sed subst in
16443# config.status. Protect against being in an unquoted here document
16444# in config.status.
16445rm -f conftest.defines conftest.undefs
16446# Using a here document instead of a string reduces the quoting nightmare.
16447# Putting comments in sed scripts is not portable.
16448#
16449# `end' is used to avoid that the second main sed command (meant for
16450# 0-ary CPP macros) applies to n-ary macro definitions.
16451# See the Autoconf documentation for `clear'.
16452cat >confdef2sed.sed <<\_ACEOF
16453s/[\\&,]/\\&/g
16454s,[\\$`],\\&,g
16455t clear
16456: clear
86da66b5 16457s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
ba479fd2 16458t end
86da66b5 16459s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
ba479fd2
NN
16460: end
16461_ACEOF
16462# If some macros were called several times there might be several times
16463# the same #defines, which is useless. Nevertheless, we may not want to
16464# sort them, since we want the *last* AC-DEFINE to be honored.
16465uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16466sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16467rm -f confdef2sed.sed
861bb6c1
JL
16468
16469# This sed command replaces #undef with comments. This is necessary, for
16470# example, in the case of _POSIX_SOURCE, which is predefined and required
16471# on some systems where configure will not decide to define it.
ba479fd2 16472cat >>conftest.undefs <<\_ACEOF
86da66b5 16473s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
ba479fd2
NN
16474_ACEOF
16475
16476# Break up conftest.defines because some shells have a limit on the size
16477# of here documents, and old seds have small limits too (100 cmds).
16478echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
86da66b5 16479echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
ba479fd2
NN
16480echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16481echo ' :' >>$CONFIG_STATUS
16482rm -f conftest.tail
16483while grep . conftest.defines >/dev/null
16484do
16485 # Write a limited-size here document to $tmp/defines.sed.
16486 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16487 # Speed up: don't consider the non `#define' lines.
86da66b5 16488 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
ba479fd2
NN
16489 # Work around the forget-to-reset-the-flag bug.
16490 echo 't clr' >>$CONFIG_STATUS
16491 echo ': clr' >>$CONFIG_STATUS
16492 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
16493 echo 'CEOF
16494 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16495 rm -f $tmp/in
16496 mv $tmp/out $tmp/in
16497' >>$CONFIG_STATUS
16498 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16499 rm -f conftest.defines
16500 mv conftest.tail conftest.defines
16501done
16502rm -f conftest.defines
16503echo ' fi # grep' >>$CONFIG_STATUS
16504echo >>$CONFIG_STATUS
861bb6c1 16505
ba479fd2
NN
16506# Break up conftest.undefs because some shells have a limit on the size
16507# of here documents, and old seds have small limits too (100 cmds).
16508echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 16509rm -f conftest.tail
ba479fd2 16510while grep . conftest.undefs >/dev/null
861bb6c1 16511do
ba479fd2
NN
16512 # Write a limited-size here document to $tmp/undefs.sed.
16513 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16514 # Speed up: don't consider the non `#undef'
86da66b5 16515 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
ba479fd2
NN
16516 # Work around the forget-to-reset-the-flag bug.
16517 echo 't clr' >>$CONFIG_STATUS
16518 echo ': clr' >>$CONFIG_STATUS
16519 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 16520 echo 'CEOF
ba479fd2
NN
16521 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16522 rm -f $tmp/in
16523 mv $tmp/out $tmp/in
16524' >>$CONFIG_STATUS
16525 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16526 rm -f conftest.undefs
16527 mv conftest.tail conftest.undefs
861bb6c1 16528done
ba479fd2
NN
16529rm -f conftest.undefs
16530
16531cat >>$CONFIG_STATUS <<\_ACEOF
16532 # Let's still pretend it is `configure' which instantiates (i.e., don't
16533 # use $as_me), people would be surprised to read:
16534 # /* config.h. Generated by config.status. */
16535 if test x"$ac_file" = x-; then
16536 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 16537 else
ba479fd2 16538 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 16539 fi
ba479fd2
NN
16540 cat $tmp/in >>$tmp/config.h
16541 rm -f $tmp/in
16542 if test x"$ac_file" != x-; then
16543 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
16544 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16545echo "$as_me: $ac_file is unchanged" >&6;}
16546 else
16547 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16548$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16549 X"$ac_file" : 'X\(//\)[^/]' \| \
16550 X"$ac_file" : 'X\(//\)$' \| \
16551 X"$ac_file" : 'X\(/\)' \| \
16552 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16553echo X"$ac_file" |
16554 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16555 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16556 /^X\(\/\/\)$/{ s//\1/; q; }
16557 /^X\(\/\).*/{ s//\1/; q; }
16558 s/.*/./; q'`
16559 { if $as_mkdir_p; then
16560 mkdir -p "$ac_dir"
16561 else
16562 as_dir="$ac_dir"
16563 as_dirs=
16564 while test ! -d "$as_dir"; do
16565 as_dirs="$as_dir $as_dirs"
16566 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16567$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16568 X"$as_dir" : 'X\(//\)[^/]' \| \
16569 X"$as_dir" : 'X\(//\)$' \| \
16570 X"$as_dir" : 'X\(/\)' \| \
16571 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16572echo X"$as_dir" |
16573 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16574 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16575 /^X\(\/\/\)$/{ s//\1/; q; }
16576 /^X\(\/\).*/{ s//\1/; q; }
16577 s/.*/./; q'`
16578 done
16579 test ! -n "$as_dirs" || mkdir $as_dirs
16580 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16581echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16582 { (exit 1); exit 1; }; }; }
63cf211a 16583
ba479fd2
NN
16584 rm -f $ac_file
16585 mv $tmp/config.h $ac_file
16586 fi
16587 else
16588 cat $tmp/config.h
16589 rm -f $tmp/config.h
16590 fi
16591done
16592_ACEOF
16593cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 16594
ba479fd2
NN
16595#
16596# CONFIG_COMMANDS section.
16597#
16598for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16599 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16600 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16601 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
16602$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16603 X"$ac_dest" : 'X\(//\)[^/]' \| \
16604 X"$ac_dest" : 'X\(//\)$' \| \
16605 X"$ac_dest" : 'X\(/\)' \| \
16606 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16607echo X"$ac_dest" |
16608 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16609 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16610 /^X\(\/\/\)$/{ s//\1/; q; }
16611 /^X\(\/\).*/{ s//\1/; q; }
16612 s/.*/./; q'`
86da66b5
HPN
16613 { if $as_mkdir_p; then
16614 mkdir -p "$ac_dir"
16615 else
16616 as_dir="$ac_dir"
16617 as_dirs=
16618 while test ! -d "$as_dir"; do
16619 as_dirs="$as_dir $as_dirs"
16620 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16621$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16622 X"$as_dir" : 'X\(//\)[^/]' \| \
16623 X"$as_dir" : 'X\(//\)$' \| \
16624 X"$as_dir" : 'X\(/\)' \| \
16625 . : '\(.\)' 2>/dev/null ||
16626echo X"$as_dir" |
16627 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16628 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16629 /^X\(\/\/\)$/{ s//\1/; q; }
16630 /^X\(\/\).*/{ s//\1/; q; }
16631 s/.*/./; q'`
16632 done
16633 test ! -n "$as_dirs" || mkdir $as_dirs
16634 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16635echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16636 { (exit 1); exit 1; }; }; }
16637
ba479fd2
NN
16638 ac_builddir=.
16639
16640if test "$ac_dir" != .; then
16641 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16642 # A "../" for each directory in $ac_dir_suffix.
16643 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16644else
16645 ac_dir_suffix= ac_top_builddir=
16646fi
16647
16648case $srcdir in
16649 .) # No --srcdir option. We are building in place.
16650 ac_srcdir=.
16651 if test -z "$ac_top_builddir"; then
16652 ac_top_srcdir=.
16653 else
16654 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16655 fi ;;
16656 [\\/]* | ?:[\\/]* ) # Absolute path.
16657 ac_srcdir=$srcdir$ac_dir_suffix;
16658 ac_top_srcdir=$srcdir ;;
16659 *) # Relative path.
16660 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16661 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16662esac
8ab705be
KC
16663
16664# Do not use `cd foo && pwd` to compute absolute paths, because
16665# the directories may not exist.
16666case `pwd` in
16667.) ac_abs_builddir="$ac_dir";;
86da66b5 16668*)
8ab705be
KC
16669 case "$ac_dir" in
16670 .) ac_abs_builddir=`pwd`;;
16671 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
16672 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
16673 esac;;
16674esac
8ab705be 16675case $ac_abs_builddir in
86da66b5
HPN
16676.) ac_abs_top_builddir=${ac_top_builddir}.;;
16677*)
16678 case ${ac_top_builddir}. in
8ab705be 16679 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 16680 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 16681 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
16682 esac;;
16683esac
8ab705be 16684case $ac_abs_builddir in
86da66b5
HPN
16685.) ac_abs_srcdir=$ac_srcdir;;
16686*)
16687 case $ac_srcdir in
8ab705be 16688 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 16689 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 16690 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
16691 esac;;
16692esac
8ab705be 16693case $ac_abs_builddir in
86da66b5
HPN
16694.) ac_abs_top_srcdir=$ac_top_srcdir;;
16695*)
16696 case $ac_top_srcdir in
8ab705be 16697 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 16698 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 16699 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
16700 esac;;
16701esac
ba479fd2
NN
16702
16703
16704 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
16705echo "$as_me: executing $ac_dest commands" >&6;}
16706 case $ac_dest in
16707 default )
f1faaabd
NN
16708case ${CONFIG_HEADERS} in
16709 *auto-host.h:config.in*)
16710 echo > cstamp-h ;;
861bb6c1 16711esac
2ed26f6b 16712# Make sure all the subdirs exist.
3b620440 16713for d in $subdirs doc build
2ed26f6b 16714do
2ed26f6b 16715 test -d $d || mkdir $d
2ed26f6b 16716done
93cf819d
BK
16717# If the host supports symlinks, point stage[1234] at ../stage[1234] so
16718# bootstrapping and the installation procedure can still use
16719# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
16720# FLAGS_TO_PASS has been modified to solve the problem there.
16721# This is virtually a duplicate of what happens in configure.lang; we do
16722# an extra check to make sure this only happens if ln -s can be used.
35f06ae4
PB
16723case "$LN_S" in
16724 *-s*)
16725 for d in ${subdirs} ; do
1e6347d8 16726 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 16727 cd $d
6a1b7268 16728 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
16729 do
16730 rm -f $t
35f06ae4 16731 $LN_S ../$t $t 2>/dev/null
4e8a434e
BK
16732 done
16733 cd $STARTDIR
35f06ae4
PB
16734 done
16735 ;;
16736esac
ba479fd2
NN
16737 ;;
16738 esac
16739done
16740_ACEOF
cafe096b 16741
ba479fd2
NN
16742cat >>$CONFIG_STATUS <<\_ACEOF
16743
16744{ (exit 0); exit 0; }
16745_ACEOF
861bb6c1 16746chmod +x $CONFIG_STATUS
ba479fd2
NN
16747ac_clean_files=$ac_clean_files_save
16748
16749
16750# configure is writing to config.log, and then calls config.status.
16751# config.status does its own redirection, appending to config.log.
16752# Unfortunately, on DOS this fails, as config.log is still kept open
16753# by configure, so config.status won't be able to write to it; its
16754# output is simply discarded. So we exec the FD to /dev/null,
16755# effectively closing config.log, so it can be properly (re)opened and
16756# appended to by config.status. When coming back to configure, we
16757# need to make the FD available again.
16758if test "$no_create" != yes; then
16759 ac_cs_success=:
16760 ac_config_status_args=
16761 test "$silent" = yes &&
16762 ac_config_status_args="$ac_config_status_args --quiet"
16763 exec 5>/dev/null
16764 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16765 exec 5>>config.log
16766 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16767 # would make configure fail if this is the last instruction.
16768 $ac_cs_success || { (exit 1); exit 1; }
16769fi
861bb6c1 16770