]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
* Makefile.in (c-gimplify.o): Depend on $(RTL_H) instead of rtl.h.
[thirdparty/gcc.git] / gcc / configure
CommitLineData
005537df 1#! /bin/sh
861bb6c1 2# Guess values for system-dependent variables and create Makefiles.
8ab705be 3# Generated by GNU Autoconf 2.59.
861bb6c1 4#
86da66b5 5# Copyright (C) 2003 Free Software Foundation, Inc.
861bb6c1
JL
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
ba479fd2
NN
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
11
12# Be Bourne compatible
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
21fi
86da66b5 22DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
23
24# Support unset when possible.
86da66b5 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
43do
86da66b5 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
48 fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54else
55 as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
66as_me=`$as_basename "$0" ||
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
76
77
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
96 rm -f conf$$.sh
97fi
98
99
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
116
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
137 /*)
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
166 N
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
210 fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
861bb6c1 217
ba479fd2
NN
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
86da66b5 221 test -d ./-p && rmdir ./-p
ba479fd2
NN
222 as_mkdir_p=false
223fi
224
225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
86da66b5 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
229
230# Sed expression to map a string onto a valid variable name.
86da66b5 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
241$as_unset CDPATH
242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
861bb6c1 254ac_default_prefix=/usr/local
ba479fd2
NN
255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
274ac_unique_file="tree.c"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
0bff65e7 312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
ba479fd2 313ac_subst_files='language_hooks'
861bb6c1
JL
314
315# Initialize some variables set by options.
ba479fd2
NN
316ac_init_help=
317ac_init_version=false
861bb6c1
JL
318# The variables have the same names as the options, with
319# dashes changed to underlines.
ba479fd2 320cache_file=/dev/null
861bb6c1 321exec_prefix=NONE
861bb6c1 322no_create=
861bb6c1
JL
323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
861bb6c1
JL
331verbose=
332x_includes=NONE
333x_libraries=NONE
ba479fd2
NN
334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
861bb6c1
JL
340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
861bb6c1
JL
353ac_prev=
354for ac_option
355do
861bb6c1
JL
356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
361 fi
362
ba479fd2 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
861bb6c1
JL
364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
ba479fd2 367 case $ac_option in
861bb6c1
JL
368
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 372 bindir=$ac_optarg ;;
861bb6c1
JL
373
374 -build | --build | --buil | --bui | --bu)
ba479fd2 375 ac_prev=build_alias ;;
861bb6c1 376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 377 build_alias=$ac_optarg ;;
861bb6c1
JL
378
379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
861bb6c1
JL
388
389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
ba479fd2 393 datadir=$ac_optarg ;;
861bb6c1
JL
394
395 -disable-* | --disable-*)
ba479fd2 396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 397 # Reject names that are not valid shell variable names.
ba479fd2
NN
398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
861bb6c1
JL
403
404 -enable-* | --enable-*)
ba479fd2 405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 406 # Reject names that are not valid shell variable names.
ba479fd2
NN
407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
413 *) ac_optarg=yes ;;
414 esac
ba479fd2 415 eval "enable_$ac_feature='$ac_optarg'" ;;
861bb6c1
JL
416
417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
ba479fd2 424 exec_prefix=$ac_optarg ;;
861bb6c1
JL
425
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
429
ba479fd2
NN
430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
861bb6c1
JL
436
437 -host | --host | --hos | --ho)
ba479fd2 438 ac_prev=host_alias ;;
861bb6c1 439 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 440 host_alias=$ac_optarg ;;
861bb6c1
JL
441
442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 447 includedir=$ac_optarg ;;
861bb6c1
JL
448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 452 infodir=$ac_optarg ;;
861bb6c1
JL
453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 457 libdir=$ac_optarg ;;
861bb6c1
JL
458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
ba479fd2 464 libexecdir=$ac_optarg ;;
861bb6c1
JL
465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
ba479fd2 473 localstatedir=$ac_optarg ;;
861bb6c1
JL
474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 478 mandir=$ac_optarg ;;
861bb6c1
JL
479
480 -nfp | --nfp | --nf)
481 # Obsolete; use --without-fp.
482 with_fp=no ;;
483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 485 | --no-cr | --no-c | -n)
861bb6c1
JL
486 no_create=yes ;;
487
488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
491
492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 499 oldincludedir=$ac_optarg ;;
861bb6c1
JL
500
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 504 prefix=$ac_optarg ;;
861bb6c1
JL
505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 511 program_prefix=$ac_optarg ;;
861bb6c1
JL
512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 518 program_suffix=$ac_optarg ;;
861bb6c1
JL
519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 535 program_transform_name=$ac_optarg ;;
861bb6c1
JL
536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
ba479fd2 545 sbindir=$ac_optarg ;;
861bb6c1
JL
546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
ba479fd2 556 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
557
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
ba479fd2 561 site=$ac_optarg ;;
861bb6c1
JL
562
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 566 srcdir=$ac_optarg ;;
861bb6c1
JL
567
568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 573 sysconfdir=$ac_optarg ;;
861bb6c1
JL
574
575 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 576 ac_prev=target_alias ;;
861bb6c1 577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 578 target_alias=$ac_optarg ;;
861bb6c1
JL
579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
ba479fd2
NN
583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
861bb6c1
JL
585
586 -with-* | --with-*)
ba479fd2 587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 588 # Reject names that are not valid shell variable names.
ba479fd2
NN
589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
861bb6c1 592 ac_package=`echo $ac_package| sed 's/-/_/g'`
ba479fd2
NN
593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
595 *) ac_optarg=yes ;;
596 esac
ba479fd2 597 eval "with_$ac_package='$ac_optarg'" ;;
861bb6c1
JL
598
599 -without-* | --without-*)
ba479fd2 600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 601 # Reject names that are not valid shell variable names.
ba479fd2
NN
602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
861bb6c1
JL
607
608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 617 x_includes=$ac_optarg ;;
861bb6c1
JL
618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 624 x_libraries=$ac_optarg ;;
861bb6c1 625
ba479fd2
NN
626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
861bb6c1
JL
629 ;;
630
ba479fd2
NN
631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
861bb6c1 641 *)
ba479fd2
NN
642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
647 ;;
648
649 esac
650done
651
652if test -n "$ac_prev"; then
ba479fd2
NN
653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
63cf211a 656fi
63cf211a 657
ba479fd2
NN
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
666 esac
667done
093e61a6 668
ba479fd2
NN
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
86da66b5 671 localstatedir libdir includedir oldincludedir infodir mandir
861bb6c1 672do
ba479fd2
NN
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
861bb6c1
JL
678 esac
679done
680
ba479fd2
NN
681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
687
688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
6e3f3080 698
ba479fd2
NN
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
861bb6c1 703
861bb6c1
JL
704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707 ac_srcdir_defaulted=yes
708 # Try the directory containing this script, then its parent.
ba479fd2
NN
709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
861bb6c1
JL
721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
ba479fd2
NN
730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
63cf211a 732 else
ba479fd2
NN
733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
63cf211a
NN
735 fi
736fi
ba479fd2
NN
737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
6de9cd9a
DN
773ac_env_GMPLIBS_set=${GMPLIBS+set}
774ac_env_GMPLIBS_value=$GMPLIBS
775ac_cv_env_GMPLIBS_set=${GMPLIBS+set}
776ac_cv_env_GMPLIBS_value=$GMPLIBS
777ac_env_GMPINC_set=${GMPINC+set}
778ac_env_GMPINC_value=$GMPINC
779ac_cv_env_GMPINC_set=${GMPINC+set}
780ac_cv_env_GMPINC_value=$GMPINC
63cf211a 781
ba479fd2
NN
782#
783# Report the --help message.
784#
785if test "$ac_init_help" = "long"; then
786 # Omit some internal or obsolete options to make the list less imposing.
787 # This message is too long to be a string in the A/UX 3.1 sh.
788 cat <<_ACEOF
789\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 790
ba479fd2 791Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 792
ba479fd2
NN
793To assign environment variables (e.g., CC, CFLAGS...), specify them as
794VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 795
ba479fd2 796Defaults for the options are specified in brackets.
861bb6c1 797
ba479fd2
NN
798Configuration:
799 -h, --help display this help and exit
800 --help=short display options specific to this package
801 --help=recursive display the short help of all the included packages
802 -V, --version display version information and exit
803 -q, --quiet, --silent do not print \`checking...' messages
804 --cache-file=FILE cache test results in FILE [disabled]
805 -C, --config-cache alias for \`--cache-file=config.cache'
806 -n, --no-create do not create output files
807 --srcdir=DIR find the sources in DIR [configure dir or \`..']
808
809_ACEOF
810
811 cat <<_ACEOF
812Installation directories:
813 --prefix=PREFIX install architecture-independent files in PREFIX
86da66b5 814 [$ac_default_prefix]
ba479fd2 815 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
86da66b5 816 [PREFIX]
861bb6c1 817
ba479fd2
NN
818By default, \`make install' will install all the files in
819\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
820an installation prefix other than \`$ac_default_prefix' using \`--prefix',
821for instance \`--prefix=\$HOME'.
13c22933 822
ba479fd2 823For better control, use the options below.
13c22933 824
ba479fd2
NN
825Fine tuning of the installation directories:
826 --bindir=DIR user executables [EPREFIX/bin]
827 --sbindir=DIR system admin executables [EPREFIX/sbin]
828 --libexecdir=DIR program executables [EPREFIX/libexec]
829 --datadir=DIR read-only architecture-independent data [PREFIX/share]
830 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
831 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
832 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
833 --libdir=DIR object code libraries [EPREFIX/lib]
834 --includedir=DIR C header files [PREFIX/include]
835 --oldincludedir=DIR C header files for non-gcc [/usr/include]
836 --infodir=DIR info documentation [PREFIX/info]
837 --mandir=DIR man documentation [PREFIX/man]
838_ACEOF
13c22933 839
ba479fd2 840 cat <<\_ACEOF
13c22933 841
ba479fd2
NN
842Program names:
843 --program-prefix=PREFIX prepend PREFIX to installed program names
844 --program-suffix=SUFFIX append SUFFIX to installed program names
845 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 846
ba479fd2
NN
847System types:
848 --build=BUILD configure for building on BUILD [guessed]
849 --host=HOST cross-compile to build programs to run on HOST [BUILD]
850 --target=TARGET configure for building compilers for TARGET [HOST]
851_ACEOF
13c22933
JJ
852fi
853
ba479fd2 854if test -n "$ac_init_help"; then
13c22933 855
ba479fd2 856 cat <<\_ACEOF
13c22933 857
ba479fd2
NN
858Optional Features:
859 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
860 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
861 --enable-generated-files-in-srcdir
862 put copies of generated files in source dir
863 intended for creating source tarballs for users
864 without texinfo bison or flex.
09a9c095 865 --enable-werror-always enable -Werror always
ba479fd2
NN
866 --enable-werror enable -Werror in bootstrap stage2 and later
867 --enable-checking=LIST
868 enable expensive run-time checks. With LIST,
869 enable only specific categories of checks.
cdce5c16
NS
870 Categories are: yes,no,all,none,release.
871 Flags are: assert,fold,gc,gcac,misc,
872 rtlflag,rtl,runtime,tree,valgrind.
74ee1642 873 --enable-mapped-location location_t is fileline integer cookie
ba479fd2 874 --enable-coverage=LEVEL
fb38008e 875 enable compiler's code coverage collection.
ba479fd2
NN
876 Use to measure compiler performance and locate
877 unused parts of the compiler. With LEVEL, specify
878 optimization. Values are opt, noopt,
879 default is noopt
880 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
881 --enable-multilib enable library support for multiple ABIs
882 --enable-__cxa_atexit enable __cxa_atexit for C++
883 --enable-threads enable thread usage for target GCC
884 --enable-threads=LIB use LIB thread package for target GCC
885 --enable-objc-gc enable the use of Boehm's garbage collector with
886 the GNU Objective-C runtime
887 --disable-shared don't provide a shared libgcc
888 --enable-intermodule build the compiler in one step
f3c9f174 889 --enable-languages=LIST specify which front-ends to build
dfb77e37 890 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
891 --enable-initfini-array use .init_array/.fini_array sections
892 --enable-sjlj-exceptions
893 arrange to use setjmp/longjmp exception handling
ba479fd2
NN
894 --disable-win32-registry
895 disable lookup of installation paths in the
896 Registry on Windows hosts
897 --enable-win32-registry enable registry lookup (default)
898 --enable-win32-registry=KEY
899 use KEY instead of GCC version as the last portion
900 of the registry key
901 --enable-maintainer-mode
902 enable make rules and dependencies not useful
903 (and sometimes confusing) to the casual installer
904 --enable-version-specific-runtime-libs
905 specify that runtime libraries should be
906 installed in a compiler-specific directory
093e61a6 907
ba479fd2
NN
908Optional Packages:
909 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
910 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
911 --with-local-prefix=DIR specifies directory to put local include
912 --with-gxx-include-dir=DIR
913 specifies directory to put g++ header files
914 --with-cpp-install-dir=DIR
915 install the user visible C preprocessor in DIR
916 (relative to PREFIX) as well as PREFIX/bin
917 --with-gnu-ld arrange to work with GNU ld.
918 --with-ld arrange to use the specified ld (full pathname)
d594623a 919 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
920 --with-gnu-as arrange to work with GNU as
921 --with-as arrange to use the specified as (full pathname)
922 --with-stabs arrange to use stabs instead of host debug format
923 --with-dwarf2 force the default debug format to be DWARF 2
924 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
dfb77e37
KC
925 --with-gnu-ld assume the C compiler uses GNU ld default=no
926 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
927 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 928 --with-system-libunwind use installed libunwind
59415997 929 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
930 with the compiler
931 --with-system-zlib use installed libz
932 --with-slibdir=DIR shared libraries in DIR LIBDIR
13c22933 933
ba479fd2
NN
934Some influential environment variables:
935 CC C compiler command
936 CFLAGS C compiler flags
937 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
938 nonstandard directory <lib dir>
939 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
940 headers in a nonstandard directory <include dir>
941 CPP C preprocessor
6de9cd9a
DN
942 GMPLIBS How to link GMP
943 GMPINC How to find GMP include files
13c22933 944
ba479fd2
NN
945Use these variables to override the choices made by `configure' or to help
946it to find libraries and programs with nonstandard names/locations.
73458fb7 947
ba479fd2
NN
948_ACEOF
949fi
6e3f3080 950
ba479fd2
NN
951if test "$ac_init_help" = "recursive"; then
952 # If there are subdirs, report their specific --help.
953 ac_popdir=`pwd`
954 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
955 test -d $ac_dir || continue
956 ac_builddir=.
957
958if test "$ac_dir" != .; then
959 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
960 # A "../" for each directory in $ac_dir_suffix.
961 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
962else
963 ac_dir_suffix= ac_top_builddir=
964fi
965
966case $srcdir in
967 .) # No --srcdir option. We are building in place.
968 ac_srcdir=.
969 if test -z "$ac_top_builddir"; then
970 ac_top_srcdir=.
971 else
972 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
973 fi ;;
974 [\\/]* | ?:[\\/]* ) # Absolute path.
975 ac_srcdir=$srcdir$ac_dir_suffix;
976 ac_top_srcdir=$srcdir ;;
977 *) # Relative path.
978 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
979 ac_top_srcdir=$ac_top_builddir$srcdir ;;
980esac
8ab705be
KC
981
982# Do not use `cd foo && pwd` to compute absolute paths, because
983# the directories may not exist.
984case `pwd` in
985.) ac_abs_builddir="$ac_dir";;
86da66b5 986*)
8ab705be
KC
987 case "$ac_dir" in
988 .) ac_abs_builddir=`pwd`;;
989 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
990 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
991 esac;;
992esac
8ab705be 993case $ac_abs_builddir in
86da66b5
HPN
994.) ac_abs_top_builddir=${ac_top_builddir}.;;
995*)
996 case ${ac_top_builddir}. in
8ab705be 997 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 998 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 999 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
1000 esac;;
1001esac
8ab705be 1002case $ac_abs_builddir in
86da66b5
HPN
1003.) ac_abs_srcdir=$ac_srcdir;;
1004*)
1005 case $ac_srcdir in
8ab705be 1006 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 1007 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 1008 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
1009 esac;;
1010esac
8ab705be 1011case $ac_abs_builddir in
86da66b5
HPN
1012.) ac_abs_top_srcdir=$ac_top_srcdir;;
1013*)
1014 case $ac_top_srcdir in
8ab705be 1015 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 1016 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 1017 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
1018 esac;;
1019esac
ba479fd2
NN
1020
1021 cd $ac_dir
1022 # Check for guested configure; otherwise get Cygnus style configure.
1023 if test -f $ac_srcdir/configure.gnu; then
1024 echo
1025 $SHELL $ac_srcdir/configure.gnu --help=recursive
1026 elif test -f $ac_srcdir/configure; then
1027 echo
1028 $SHELL $ac_srcdir/configure --help=recursive
1029 elif test -f $ac_srcdir/configure.ac ||
86da66b5 1030 test -f $ac_srcdir/configure.in; then
ba479fd2
NN
1031 echo
1032 $ac_configure --help
1033 else
1034 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1035 fi
a1286ef5 1036 cd $ac_popdir
ba479fd2
NN
1037 done
1038fi
1039
1040test -n "$ac_init_help" && exit 0
1041if $ac_init_version; then
1042 cat <<\_ACEOF
1043
86da66b5 1044Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1045This configure script is free software; the Free Software Foundation
1046gives unlimited permission to copy, distribute and modify it.
1047_ACEOF
1048 exit 0
1049fi
1050exec 5>config.log
1051cat >&5 <<_ACEOF
1052This file contains any messages produced by compilers while
1053running configure, to aid debugging if configure makes a mistake.
1054
1055It was created by $as_me, which was
8ab705be 1056generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1057
1058 $ $0 $@
1059
1060_ACEOF
1061{
1062cat <<_ASUNAME
1063## --------- ##
1064## Platform. ##
1065## --------- ##
1066
1067hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1068uname -m = `(uname -m) 2>/dev/null || echo unknown`
1069uname -r = `(uname -r) 2>/dev/null || echo unknown`
1070uname -s = `(uname -s) 2>/dev/null || echo unknown`
1071uname -v = `(uname -v) 2>/dev/null || echo unknown`
1072
1073/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1074/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1075
1076/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1077/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1078/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1079hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1080/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1081/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1082/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1083
1084_ASUNAME
1085
1086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1087for as_dir in $PATH
1088do
1089 IFS=$as_save_IFS
1090 test -z "$as_dir" && as_dir=.
1091 echo "PATH: $as_dir"
1092done
1093
1094} >&5
1095
1096cat >&5 <<_ACEOF
1097
1098
1099## ----------- ##
1100## Core tests. ##
1101## ----------- ##
1102
1103_ACEOF
1104
1105
1106# Keep a trace of the command line.
1107# Strip out --no-create and --no-recursion so they do not pile up.
1108# Strip out --silent because we don't want to record it for future runs.
1109# Also quote any args containing shell meta-characters.
1110# Make two passes to allow for proper duplicate-argument suppression.
1111ac_configure_args=
1112ac_configure_args0=
1113ac_configure_args1=
1114ac_sep=
1115ac_must_keep_next=false
1116for ac_pass in 1 2
1117do
1118 for ac_arg
1119 do
1120 case $ac_arg in
1121 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1122 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1123 | -silent | --silent | --silen | --sile | --sil)
1124 continue ;;
1125 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1126 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1127 esac
1128 case $ac_pass in
1129 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1130 2)
1131 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1132 if test $ac_must_keep_next = true; then
86da66b5 1133 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1134 else
86da66b5
HPN
1135 case $ac_arg in
1136 *=* | --config-cache | -C | -disable-* | --disable-* \
1137 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1138 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1139 | -with-* | --with-* | -without-* | --without-* | --x)
1140 case "$ac_configure_args0 " in
1141 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1142 esac
1143 ;;
1144 -* ) ac_must_keep_next=true ;;
1145 esac
ba479fd2
NN
1146 fi
1147 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1148 # Get rid of the leading space.
1149 ac_sep=" "
1150 ;;
1151 esac
1152 done
1153done
1154$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1155$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1156
1157# When interrupted or exit'd, cleanup temporary files, and complete
1158# config.log. We remove comments because anyway the quotes in there
1159# would cause problems or look ugly.
1160# WARNING: Be sure not to use single quotes in there, as some shells,
1161# such as our DU 5.0 friend, will then `close' the trap.
1162trap 'exit_status=$?
1163 # Save into config.log some information that might help in debugging.
1164 {
1165 echo
1166
1167 cat <<\_ASBOX
1168## ---------------- ##
1169## Cache variables. ##
1170## ---------------- ##
1171_ASBOX
1172 echo
1173 # The following way of writing the cache mishandles newlines in values,
1174{
1175 (set) 2>&1 |
1176 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1177 *ac_space=\ *)
1178 sed -n \
86da66b5
HPN
1179 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1180 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
ba479fd2
NN
1181 ;;
1182 *)
1183 sed -n \
86da66b5 1184 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
1185 ;;
1186 esac;
1187}
1188 echo
1189
1190 cat <<\_ASBOX
1191## ----------------- ##
1192## Output variables. ##
1193## ----------------- ##
1194_ASBOX
1195 echo
1196 for ac_var in $ac_subst_vars
1197 do
1198 eval ac_val=$`echo $ac_var`
1199 echo "$ac_var='"'"'$ac_val'"'"'"
1200 done | sort
1201 echo
1202
1203 if test -n "$ac_subst_files"; then
1204 cat <<\_ASBOX
1205## ------------- ##
1206## Output files. ##
1207## ------------- ##
1208_ASBOX
1209 echo
1210 for ac_var in $ac_subst_files
1211 do
1212 eval ac_val=$`echo $ac_var`
86da66b5 1213 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1214 done | sort
1215 echo
1216 fi
1217
1218 if test -s confdefs.h; then
1219 cat <<\_ASBOX
1220## ----------- ##
1221## confdefs.h. ##
1222## ----------- ##
1223_ASBOX
1224 echo
1225 sed "/^$/d" confdefs.h | sort
1226 echo
1227 fi
1228 test "$ac_signal" != 0 &&
1229 echo "$as_me: caught signal $ac_signal"
1230 echo "$as_me: exit $exit_status"
1231 } >&5
86da66b5 1232 rm -f core *.core &&
ba479fd2
NN
1233 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1234 exit $exit_status
1235 ' 0
1236for ac_signal in 1 2 13 15; do
1237 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1238done
1239ac_signal=0
1240
1241# confdefs.h avoids OS command line length limits that DEFS can exceed.
1242rm -rf conftest* confdefs.h
1243# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1244echo >confdefs.h
1245
1246# Predefined preprocessor variables.
1247
1248cat >>confdefs.h <<_ACEOF
1249#define PACKAGE_NAME "$PACKAGE_NAME"
1250_ACEOF
1251
1252
1253cat >>confdefs.h <<_ACEOF
1254#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1255_ACEOF
1256
1257
1258cat >>confdefs.h <<_ACEOF
1259#define PACKAGE_VERSION "$PACKAGE_VERSION"
1260_ACEOF
1261
1262
1263cat >>confdefs.h <<_ACEOF
1264#define PACKAGE_STRING "$PACKAGE_STRING"
1265_ACEOF
1266
1267
1268cat >>confdefs.h <<_ACEOF
1269#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1270_ACEOF
1271
1272
1273# Let the site file select an alternate cache file if it wants to.
1274# Prefer explicitly selected file to automatically selected ones.
1275if test -z "$CONFIG_SITE"; then
1276 if test "x$prefix" != xNONE; then
1277 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1278 else
1279 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1280 fi
1281fi
1282for ac_site_file in $CONFIG_SITE; do
1283 if test -r "$ac_site_file"; then
1284 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1285echo "$as_me: loading site script $ac_site_file" >&6;}
1286 sed 's/^/| /' "$ac_site_file" >&5
1287 . "$ac_site_file"
1288 fi
1289done
1290
1291if test -r "$cache_file"; then
1292 # Some versions of bash will fail to source /dev/null (special
1293 # files actually), so we avoid doing that.
1294 if test -f "$cache_file"; then
1295 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1296echo "$as_me: loading cache $cache_file" >&6;}
1297 case $cache_file in
1298 [\\/]* | ?:[\\/]* ) . $cache_file;;
1299 *) . ./$cache_file;;
1300 esac
1301 fi
1302else
1303 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1304echo "$as_me: creating cache $cache_file" >&6;}
1305 >$cache_file
1306fi
1307
1308# Check that the precious variables saved in the cache have kept the same
1309# value.
1310ac_cache_corrupted=false
1311for ac_var in `(set) 2>&1 |
86da66b5 1312 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1313 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1314 eval ac_new_set=\$ac_env_${ac_var}_set
1315 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1316 eval ac_new_val="\$ac_env_${ac_var}_value"
1317 case $ac_old_set,$ac_new_set in
1318 set,)
1319 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1320echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1321 ac_cache_corrupted=: ;;
1322 ,set)
1323 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1324echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1325 ac_cache_corrupted=: ;;
1326 ,);;
1327 *)
1328 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1329 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1330echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1331 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1332echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1333 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1334echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1335 ac_cache_corrupted=:
ba479fd2
NN
1336 fi;;
1337 esac
1338 # Pass precious variables to config.status.
1339 if test "$ac_new_set" = set; then
1340 case $ac_new_val in
1341 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1342 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1343 *) ac_arg=$ac_var=$ac_new_val ;;
1344 esac
1345 case " $ac_configure_args " in
1346 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1347 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1348 esac
1349 fi
1350done
1351if $ac_cache_corrupted; then
1352 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1353echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1354 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1355echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1356 { (exit 1); exit 1; }; }
1357fi
1358
1359ac_ext=c
1360ac_cpp='$CPP $CPPFLAGS'
1361ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1362ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1363ac_compiler_gnu=$ac_cv_c_compiler_gnu
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
914c5af7 1383
ba479fd2
NN
1384 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1385
1386
1387# Determine the host, build, and target systems
1388ac_aux_dir=
1389for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1390 if test -f $ac_dir/install-sh; then
1391 ac_aux_dir=$ac_dir
1392 ac_install_sh="$ac_aux_dir/install-sh -c"
1393 break
1394 elif test -f $ac_dir/install.sh; then
1395 ac_aux_dir=$ac_dir
1396 ac_install_sh="$ac_aux_dir/install.sh -c"
1397 break
1398 elif test -f $ac_dir/shtool; then
1399 ac_aux_dir=$ac_dir
1400 ac_install_sh="$ac_aux_dir/shtool install -c"
1401 break
1402 fi
1403done
1404if test -z "$ac_aux_dir"; then
1405 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1406echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1407 { (exit 1); exit 1; }; }
1408fi
1409ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1410ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1411ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1412
1413# Make sure we can run config.sub.
1414$ac_config_sub sun4 >/dev/null 2>&1 ||
1415 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1416echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1417 { (exit 1); exit 1; }; }
1418
1419echo "$as_me:$LINENO: checking build system type" >&5
1420echo $ECHO_N "checking build system type... $ECHO_C" >&6
1421if test "${ac_cv_build+set}" = set; then
1422 echo $ECHO_N "(cached) $ECHO_C" >&6
1423else
1424 ac_cv_build_alias=$build_alias
1425test -z "$ac_cv_build_alias" &&
1426 ac_cv_build_alias=`$ac_config_guess`
1427test -z "$ac_cv_build_alias" &&
1428 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1429echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1430 { (exit 1); exit 1; }; }
1431ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1432 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1433echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1434 { (exit 1); exit 1; }; }
1435
1436fi
1437echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1438echo "${ECHO_T}$ac_cv_build" >&6
1439build=$ac_cv_build
1440build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1441build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1442build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1443
1444
1445echo "$as_me:$LINENO: checking host system type" >&5
1446echo $ECHO_N "checking host system type... $ECHO_C" >&6
1447if test "${ac_cv_host+set}" = set; then
1448 echo $ECHO_N "(cached) $ECHO_C" >&6
1449else
1450 ac_cv_host_alias=$host_alias
1451test -z "$ac_cv_host_alias" &&
1452 ac_cv_host_alias=$ac_cv_build_alias
1453ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1454 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1455echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1456 { (exit 1); exit 1; }; }
1457
1458fi
1459echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1460echo "${ECHO_T}$ac_cv_host" >&6
1461host=$ac_cv_host
1462host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1463host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1464host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1465
1466
1467echo "$as_me:$LINENO: checking target system type" >&5
1468echo $ECHO_N "checking target system type... $ECHO_C" >&6
1469if test "${ac_cv_target+set}" = set; then
1470 echo $ECHO_N "(cached) $ECHO_C" >&6
1471else
1472 ac_cv_target_alias=$target_alias
1473test "x$ac_cv_target_alias" = "x" &&
1474 ac_cv_target_alias=$ac_cv_host_alias
1475ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1476 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1477echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1478 { (exit 1); exit 1; }; }
1479
1480fi
1481echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1482echo "${ECHO_T}$ac_cv_target" >&6
1483target=$ac_cv_target
1484target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1485target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1486target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1487
1488
1489# The aliases save the names the user supplied, while $host etc.
1490# will get canonicalized.
1491test -n "$target_alias" &&
1492 test "$program_prefix$program_suffix$program_transform_name" = \
1493 NONENONEs,x,x, &&
1494 program_prefix=${target_alias}-
1495
1496# Determine the noncanonical target name, for directory use.
1497 case ${build_alias} in
1498 "") build_noncanonical=${build} ;;
6e3f3080
NN
1499 *) build_noncanonical=${build_alias} ;;
1500esac
73458fb7 1501
4665e56c
NN
1502 case ${host_alias} in
1503 "") host_noncanonical=${build_noncanonical} ;;
1504 *) host_noncanonical=${host_alias} ;;
1505esac
73458fb7 1506
4665e56c
NN
1507 case ${target_alias} in
1508 "") target_noncanonical=${host_noncanonical} ;;
1509 *) target_noncanonical=${target_alias} ;;
1510esac
093e61a6 1511
8f1529e6
L
1512
1513
1514
1515# Determine the target- and build-specific subdirectories
4665e56c
NN
1516 # Prefix 'build-' so this never conflicts with target_subdir.
1517build_subdir="build-${build_noncanonical}"
215c351a
PB
1518# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1519if ( test $srcdir = . && test -d gcc ) \
1520 || test -d $srcdir/../host-${host_noncanonical}; then
1521 host_subdir="host-${host_noncanonical}"
1522else
1523 host_subdir=.
1524fi
4665e56c
NN
1525# No prefix.
1526target_subdir=${target_noncanonical}
ba479fd2 1527
73458fb7 1528
093e61a6 1529# Set program_transform_name
13c22933 1530test "$program_prefix" != NONE &&
ba479fd2 1531 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1532# Use a double $ so make ignores it.
1533test "$program_suffix" != NONE &&
ba479fd2
NN
1534 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1535# Double any \ or $. echo might interpret backslashes.
1536# By default was `s,x,x', remove it if useless.
1537cat <<\_ACEOF >conftest.sed
1538s/[\\$]/&&/g;s/;s,x,x,$//
1539_ACEOF
1540program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1541rm conftest.sed
13c22933
JJ
1542
1543
34a86c2b
NN
1544# Check for bogus environment variables.
1545# Test if LIBRARY_PATH contains the notation for the current directory
1546# since this would lead to problems installing/building glibc.
1547# LIBRARY_PATH contains the current directory if one of the following
1548# is true:
1549# - one of the terminals (":" and ";") is the first or last sign
1550# - two terminals occur directly after each other
1551# - the path contains an element with a dot in it
ba479fd2
NN
1552echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1553echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1554case ${LIBRARY_PATH} in
1555 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1556 library_path_setting="contains current directory"
1557 ;;
1558 *)
1559 library_path_setting="ok"
1560 ;;
1561esac
ba479fd2
NN
1562echo "$as_me:$LINENO: result: $library_path_setting" >&5
1563echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1564if test "$library_path_setting" != "ok"; then
ba479fd2 1565{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1566*** LIBRARY_PATH shouldn't contain the current directory when
1567*** building gcc. Please change the environment variable
ba479fd2
NN
1568*** and run configure again." >&5
1569echo "$as_me: error:
1570*** LIBRARY_PATH shouldn't contain the current directory when
1571*** building gcc. Please change the environment variable
1572*** and run configure again." >&2;}
1573 { (exit 1); exit 1; }; }
e9a25f70
JL
1574fi
1575
34a86c2b
NN
1576# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1577# since this would lead to problems installing/building glibc.
1578# GCC_EXEC_PREFIX contains the current directory if one of the following
1579# is true:
1580# - one of the terminals (":" and ";") is the first or last sign
1581# - two terminals occur directly after each other
1582# - the path contains an element with a dot in it
ba479fd2
NN
1583echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1584echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1585case ${GCC_EXEC_PREFIX} in
1586 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1587 gcc_exec_prefix_setting="contains current directory"
1588 ;;
1589 *)
1590 gcc_exec_prefix_setting="ok"
1591 ;;
1592esac
ba479fd2
NN
1593echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1594echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1595if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1596{ { echo "$as_me:$LINENO: error:
1597*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1598*** building gcc. Please change the environment variable
1599*** and run configure again." >&5
1600echo "$as_me: error:
cafe096b
EC
1601*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1602*** building gcc. Please change the environment variable
ba479fd2
NN
1603*** and run configure again." >&2;}
1604 { (exit 1); exit 1; }; }
34a86c2b
NN
1605fi
1606
1607# -----------
1608# Directories
1609# -----------
1610
1611# Specify the local prefix
1612local_prefix=
ba479fd2 1613
34a86c2b
NN
1614# Check whether --with-local-prefix or --without-local-prefix was given.
1615if test "${with_local_prefix+set}" = set; then
1616 withval="$with_local_prefix"
1617 case "${withval}" in
ba479fd2
NN
1618yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1619echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1620 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1621no) ;;
1622*) local_prefix=$with_local_prefix ;;
1623esac
ba479fd2 1624fi;
34a86c2b
NN
1625
1626# Default local prefix if it is empty
1627if test x$local_prefix = x; then
1628 local_prefix=/usr/local
1629fi
1630
1631# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1632# passed in by the toplevel make and thus we'd get different behavior
1633# depending on where we built the sources.
1634gcc_gxx_include_dir=
1635# Specify the g++ header file directory
ba479fd2 1636
34a86c2b
NN
1637# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1638if test "${with_gxx_include_dir+set}" = set; then
1639 withval="$with_gxx_include_dir"
1640 case "${withval}" in
ba479fd2
NN
1641yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1642echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1643 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1644no) ;;
1645*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1646esac
ba479fd2 1647fi;
34a86c2b
NN
1648
1649if test x${gcc_gxx_include_dir} = x; then
1650 if test x${enable_version_specific_runtime_libs} = xyes; then
1651 gcc_gxx_include_dir='${libsubdir}/include/c++'
1652 else
a1286ef5 1653 libstdcxx_incdir='c++/$(version)'
34a86c2b
NN
1654 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
1655 fi
1656fi
1657
ba479fd2 1658
34a86c2b
NN
1659# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1660if test "${with_cpp_install_dir+set}" = set; then
1661 withval="$with_cpp_install_dir"
1662 if test x$withval = xyes; then
ba479fd2
NN
1663 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1664echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1665 { (exit 1); exit 1; }; }
34a86c2b
NN
1666elif test x$withval != xno; then
1667 cpp_install_dir=$withval
1668fi
ba479fd2 1669fi;
34a86c2b 1670
51b9ff45 1671# We would like to our source tree to be readonly. However when releases or
ba479fd2 1672# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1673# various formats of manuals need to be included along with the rest of the
ba479fd2 1674# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1675# just that.
1676
03787dfd
KC
1677echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1678echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1679 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45
KC
1680if test "${enable_generated_files_in_srcdir+set}" = set; then
1681 enableval="$enable_generated_files_in_srcdir"
03787dfd 1682 generated_files_in_srcdir=$enableval
51b9ff45 1683else
03787dfd 1684 generated_files_in_srcdir=no
ba479fd2 1685fi;
51b9ff45 1686
03787dfd
KC
1687echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1688echo "${ECHO_T}$generated_files_in_srcdir" >&6
1689
1690if test "$generated_files_in_srcdir" = "yes"; then
1691 GENINSRC=''
03787dfd
KC
1692else
1693 GENINSRC='#'
03787dfd
KC
1694fi
1695
1696
34a86c2b
NN
1697# -------------------
1698# Find default linker
1699# -------------------
1700
1701# With GNU ld
ba479fd2 1702
34a86c2b
NN
1703# Check whether --with-gnu-ld or --without-gnu-ld was given.
1704if test "${with_gnu_ld+set}" = set; then
1705 withval="$with_gnu_ld"
1706 gnu_ld_flag="$with_gnu_ld"
1707else
1708 gnu_ld_flag=no
ba479fd2 1709fi;
6e3f3080 1710
63cf211a 1711# With pre-defined ld
ba479fd2 1712
34a86c2b
NN
1713# Check whether --with-ld or --without-ld was given.
1714if test "${with_ld+set}" = set; then
1715 withval="$with_ld"
1716 DEFAULT_LINKER="$with_ld"
ba479fd2 1717fi;
34a86c2b
NN
1718if test x"${DEFAULT_LINKER+set}" = x"set"; then
1719 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1720 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1721echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1722 { (exit 1); exit 1; }; }
34a86c2b
NN
1723 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1724 gnu_ld_flag=yes
1725 fi
ba479fd2
NN
1726
1727cat >>confdefs.h <<_ACEOF
34a86c2b 1728#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1729_ACEOF
34a86c2b
NN
1730
1731fi
1732
ba479fd2
NN
1733echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1734echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1735if test x"${DEFAULT_LINKER+set}" = x"set"; then
1736 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1737 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1738echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1739 else
ba479fd2
NN
1740 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1741echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1742 fi
1743else
ba479fd2
NN
1744 echo "$as_me:$LINENO: result: no" >&5
1745echo "${ECHO_T}no" >&6
34a86c2b
NN
1746fi
1747
d594623a
L
1748# With demangler in GNU ld
1749
1750# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
1751if test "${with_demangler_in_ld+set}" = set; then
1752 withval="$with_demangler_in_ld"
1753 demangler_in_ld="$with_demangler_in_ld"
1754else
1755 demangler_in_ld=no
1756fi;
1757
34a86c2b
NN
1758# ----------------------
1759# Find default assembler
1760# ----------------------
1761
1762# With GNU as
ba479fd2 1763
34a86c2b
NN
1764# Check whether --with-gnu-as or --without-gnu-as was given.
1765if test "${with_gnu_as+set}" = set; then
1766 withval="$with_gnu_as"
1767 gas_flag="$with_gnu_as"
1768else
1769 gas_flag=no
ba479fd2 1770fi;
34a86c2b
NN
1771
1772
1773# Check whether --with-as or --without-as was given.
1774if test "${with_as+set}" = set; then
1775 withval="$with_as"
1776 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1777fi;
34a86c2b
NN
1778if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1779 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1780 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1781echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1782 { (exit 1); exit 1; }; }
34a86c2b
NN
1783 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1784 gas_flag=yes
1785 fi
ba479fd2
NN
1786
1787cat >>confdefs.h <<_ACEOF
34a86c2b 1788#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1789_ACEOF
34a86c2b
NN
1790
1791fi
1792
ba479fd2
NN
1793echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1794echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1795if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1796 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1797 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1798echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1799 else
ba479fd2
NN
1800 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1801echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1802 fi
1803else
ba479fd2
NN
1804 echo "$as_me:$LINENO: result: no" >&5
1805echo "${ECHO_T}no" >&6
34a86c2b
NN
1806fi
1807
1808# ---------------
1809# Find C compiler
1810# ---------------
1811
426ca3ca
RO
1812# If a non-executable a.out is present (e.g. created by GNU as above even if
1813# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1814# file, even when creating an executable, so an execution test fails.
1815# Remove possible default executable files to avoid this.
1816#
1817# FIXME: This really belongs into AC_PROG_CC and can be removed once
1818# Autoconf includes it.
1819rm -f a.out a.exe b.out
1820
34a86c2b 1821# Find the native compiler
ba479fd2
NN
1822ac_ext=c
1823ac_cpp='$CPP $CPPFLAGS'
1824ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1825ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1826ac_compiler_gnu=$ac_cv_c_compiler_gnu
1827if test -n "$ac_tool_prefix"; then
1828 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1829set dummy ${ac_tool_prefix}gcc; ac_word=$2
1830echo "$as_me:$LINENO: checking for $ac_word" >&5
1831echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1832if test "${ac_cv_prog_CC+set}" = set; then
1833 echo $ECHO_N "(cached) $ECHO_C" >&6
1834else
1835 if test -n "$CC"; then
1836 ac_cv_prog_CC="$CC" # Let the user override the test.
1837else
1838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1839for as_dir in $PATH
1840do
1841 IFS=$as_save_IFS
1842 test -z "$as_dir" && as_dir=.
1843 for ac_exec_ext in '' $ac_executable_extensions; do
1844 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1845 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1846 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1847 break 2
1848 fi
1849done
1850done
1851
1852fi
1853fi
1854CC=$ac_cv_prog_CC
1855if test -n "$CC"; then
1856 echo "$as_me:$LINENO: result: $CC" >&5
1857echo "${ECHO_T}$CC" >&6
1858else
1859 echo "$as_me:$LINENO: result: no" >&5
1860echo "${ECHO_T}no" >&6
1861fi
1862
1863fi
1864if test -z "$ac_cv_prog_CC"; then
1865 ac_ct_CC=$CC
1866 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1867set dummy gcc; ac_word=$2
ba479fd2
NN
1868echo "$as_me:$LINENO: checking for $ac_word" >&5
1869echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1870if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1871 echo $ECHO_N "(cached) $ECHO_C" >&6
1872else
1873 if test -n "$ac_ct_CC"; then
1874 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1875else
1876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1877for as_dir in $PATH
1878do
1879 IFS=$as_save_IFS
1880 test -z "$as_dir" && as_dir=.
1881 for ac_exec_ext in '' $ac_executable_extensions; do
1882 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1883 ac_cv_prog_ac_ct_CC="gcc"
1884 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1885 break 2
1886 fi
1887done
1888done
1889
1890fi
1891fi
1892ac_ct_CC=$ac_cv_prog_ac_ct_CC
1893if test -n "$ac_ct_CC"; then
1894 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1895echo "${ECHO_T}$ac_ct_CC" >&6
1896else
1897 echo "$as_me:$LINENO: result: no" >&5
1898echo "${ECHO_T}no" >&6
1899fi
1900
1901 CC=$ac_ct_CC
1902else
1903 CC="$ac_cv_prog_CC"
1904fi
1905
1906if test -z "$CC"; then
1907 if test -n "$ac_tool_prefix"; then
1908 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1909set dummy ${ac_tool_prefix}cc; ac_word=$2
1910echo "$as_me:$LINENO: checking for $ac_word" >&5
1911echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1912if test "${ac_cv_prog_CC+set}" = set; then
1913 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1914else
1915 if test -n "$CC"; then
1916 ac_cv_prog_CC="$CC" # Let the user override the test.
1917else
ba479fd2
NN
1918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1919for as_dir in $PATH
1920do
1921 IFS=$as_save_IFS
1922 test -z "$as_dir" && as_dir=.
1923 for ac_exec_ext in '' $ac_executable_extensions; do
1924 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1925 ac_cv_prog_CC="${ac_tool_prefix}cc"
1926 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1927 break 2
1928 fi
1929done
1930done
1931
cd9e5e7c
MK
1932fi
1933fi
ba479fd2 1934CC=$ac_cv_prog_CC
cd9e5e7c 1935if test -n "$CC"; then
ba479fd2
NN
1936 echo "$as_me:$LINENO: result: $CC" >&5
1937echo "${ECHO_T}$CC" >&6
1938else
1939 echo "$as_me:$LINENO: result: no" >&5
1940echo "${ECHO_T}no" >&6
1941fi
1942
1943fi
1944if test -z "$ac_cv_prog_CC"; then
1945 ac_ct_CC=$CC
1946 # Extract the first word of "cc", so it can be a program name with args.
1947set dummy cc; ac_word=$2
1948echo "$as_me:$LINENO: checking for $ac_word" >&5
1949echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1950if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1951 echo $ECHO_N "(cached) $ECHO_C" >&6
1952else
1953 if test -n "$ac_ct_CC"; then
1954 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1955else
1956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1957for as_dir in $PATH
1958do
1959 IFS=$as_save_IFS
1960 test -z "$as_dir" && as_dir=.
1961 for ac_exec_ext in '' $ac_executable_extensions; do
1962 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1963 ac_cv_prog_ac_ct_CC="cc"
1964 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1965 break 2
1966 fi
1967done
1968done
1969
1970fi
1971fi
1972ac_ct_CC=$ac_cv_prog_ac_ct_CC
1973if test -n "$ac_ct_CC"; then
1974 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1975echo "${ECHO_T}$ac_ct_CC" >&6
1976else
1977 echo "$as_me:$LINENO: result: no" >&5
1978echo "${ECHO_T}no" >&6
1979fi
1980
1981 CC=$ac_ct_CC
cd9e5e7c 1982else
ba479fd2 1983 CC="$ac_cv_prog_CC"
e9a25f70 1984fi
6e3f3080 1985
ba479fd2 1986fi
6e3f3080
NN
1987if test -z "$CC"; then
1988 # Extract the first word of "cc", so it can be a program name with args.
1989set dummy cc; ac_word=$2
ba479fd2
NN
1990echo "$as_me:$LINENO: checking for $ac_word" >&5
1991echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1992if test "${ac_cv_prog_CC+set}" = set; then
1993 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
1994else
1995 if test -n "$CC"; then
1996 ac_cv_prog_CC="$CC" # Let the user override the test.
1997else
1998 ac_prog_rejected=no
ba479fd2
NN
1999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2000for as_dir in $PATH
2001do
2002 IFS=$as_save_IFS
2003 test -z "$as_dir" && as_dir=.
2004 for ac_exec_ext in '' $ac_executable_extensions; do
2005 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2006 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2007 ac_prog_rejected=yes
2008 continue
2009 fi
2010 ac_cv_prog_CC="cc"
2011 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2012 break 2
2013 fi
2014done
2015done
2016
6e3f3080
NN
2017if test $ac_prog_rejected = yes; then
2018 # We found a bogon in the path, so make sure we never use it.
2019 set dummy $ac_cv_prog_CC
2020 shift
ba479fd2 2021 if test $# != 0; then
6e3f3080
NN
2022 # We chose a different compiler from the bogus one.
2023 # However, it has the same basename, so the bogon will be chosen
2024 # first if we set CC to just the basename; use the full file name.
2025 shift
ba479fd2 2026 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2027 fi
6e3f3080
NN
2028fi
2029fi
2030fi
ba479fd2 2031CC=$ac_cv_prog_CC
6e3f3080 2032if test -n "$CC"; then
ba479fd2
NN
2033 echo "$as_me:$LINENO: result: $CC" >&5
2034echo "${ECHO_T}$CC" >&6
e9a25f70 2035else
ba479fd2
NN
2036 echo "$as_me:$LINENO: result: no" >&5
2037echo "${ECHO_T}no" >&6
e9a25f70 2038fi
6e3f3080 2039
ba479fd2
NN
2040fi
2041if test -z "$CC"; then
2042 if test -n "$ac_tool_prefix"; then
2043 for ac_prog in cl
2044 do
2045 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2046set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2047echo "$as_me:$LINENO: checking for $ac_word" >&5
2048echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2049if test "${ac_cv_prog_CC+set}" = set; then
2050 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2051else
6e3f3080
NN
2052 if test -n "$CC"; then
2053 ac_cv_prog_CC="$CC" # Let the user override the test.
2054else
ba479fd2
NN
2055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2056for as_dir in $PATH
2057do
2058 IFS=$as_save_IFS
2059 test -z "$as_dir" && as_dir=.
2060 for ac_exec_ext in '' $ac_executable_extensions; do
2061 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2062 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2063 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2064 break 2
2065 fi
2066done
2067done
2068
093e61a6 2069fi
6e3f3080 2070fi
ba479fd2 2071CC=$ac_cv_prog_CC
6e3f3080 2072if test -n "$CC"; then
ba479fd2
NN
2073 echo "$as_me:$LINENO: result: $CC" >&5
2074echo "${ECHO_T}$CC" >&6
6e3f3080 2075else
ba479fd2
NN
2076 echo "$as_me:$LINENO: result: no" >&5
2077echo "${ECHO_T}no" >&6
093e61a6 2078fi
cafe096b 2079
ba479fd2
NN
2080 test -n "$CC" && break
2081 done
2082fi
2083if test -z "$CC"; then
2084 ac_ct_CC=$CC
2085 for ac_prog in cl
2086do
2087 # Extract the first word of "$ac_prog", so it can be a program name with args.
2088set dummy $ac_prog; ac_word=$2
2089echo "$as_me:$LINENO: checking for $ac_word" >&5
2090echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2091if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2092 echo $ECHO_N "(cached) $ECHO_C" >&6
2093else
2094 if test -n "$ac_ct_CC"; then
2095 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2096else
2097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2098for as_dir in $PATH
2099do
2100 IFS=$as_save_IFS
2101 test -z "$as_dir" && as_dir=.
2102 for ac_exec_ext in '' $ac_executable_extensions; do
2103 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2104 ac_cv_prog_ac_ct_CC="$ac_prog"
2105 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2106 break 2
2107 fi
2108done
2109done
6e3f3080 2110
ba479fd2
NN
2111fi
2112fi
2113ac_ct_CC=$ac_cv_prog_ac_ct_CC
2114if test -n "$ac_ct_CC"; then
2115 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2116echo "${ECHO_T}$ac_ct_CC" >&6
2117else
2118 echo "$as_me:$LINENO: result: no" >&5
2119echo "${ECHO_T}no" >&6
2120fi
6e3f3080 2121
ba479fd2
NN
2122 test -n "$ac_ct_CC" && break
2123done
63cf211a 2124
ba479fd2
NN
2125 CC=$ac_ct_CC
2126fi
2127
2128fi
2129
2130
2131test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2132See \`config.log' for more details." >&5
2133echo "$as_me: error: no acceptable C compiler found in \$PATH
2134See \`config.log' for more details." >&2;}
2135 { (exit 1); exit 1; }; }
2136
2137# Provide some information about the compiler.
2138echo "$as_me:$LINENO:" \
2139 "checking for C compiler version" >&5
2140ac_compiler=`set X $ac_compile; echo $2`
2141{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2142 (eval $ac_compiler --version </dev/null >&5) 2>&5
2143 ac_status=$?
2144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2145 (exit $ac_status); }
2146{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2147 (eval $ac_compiler -v </dev/null >&5) 2>&5
2148 ac_status=$?
2149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2150 (exit $ac_status); }
2151{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2152 (eval $ac_compiler -V </dev/null >&5) 2>&5
2153 ac_status=$?
2154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2155 (exit $ac_status); }
2156
2157cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2158/* confdefs.h. */
2159_ACEOF
2160cat confdefs.h >>conftest.$ac_ext
2161cat >>conftest.$ac_ext <<_ACEOF
2162/* end confdefs.h. */
2163
2164int
2165main ()
2166{
63cf211a 2167
ba479fd2
NN
2168 ;
2169 return 0;
2170}
2171_ACEOF
2172ac_clean_files_save=$ac_clean_files
2173ac_clean_files="$ac_clean_files a.out a.exe b.out"
2174# Try to create an executable without -o first, disregard a.out.
2175# It will help us diagnose broken compilers, and finding out an intuition
2176# of exeext.
86da66b5
HPN
2177echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2178echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2
NN
2179ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2180if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2181 (eval $ac_link_default) 2>&5
2182 ac_status=$?
2183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2184 (exit $ac_status); }; then
2185 # Find the output, starting from the most likely. This scheme is
2186# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2187# resort.
2188
2189# Be careful to initialize this variable, since it used to be cached.
2190# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2191ac_cv_exeext=
2192# b.out is created by i960 compilers.
2193for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2194do
2195 test -f "$ac_file" || continue
2196 case $ac_file in
2197 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
86da66b5 2198 ;;
ba479fd2 2199 conftest.$ac_ext )
86da66b5
HPN
2200 # This is the source file.
2201 ;;
ba479fd2 2202 [ab].out )
86da66b5
HPN
2203 # We found the default executable, but exeext='' is most
2204 # certainly right.
2205 break;;
ba479fd2 2206 *.* )
86da66b5
HPN
2207 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2208 # FIXME: I believe we export ac_cv_exeext for Libtool,
2209 # but it would be cool to find out if it's true. Does anybody
2210 # maintain Libtool? --akim.
2211 export ac_cv_exeext
2212 break;;
ba479fd2 2213 * )
86da66b5 2214 break;;
ba479fd2
NN
2215 esac
2216done
2217else
2218 echo "$as_me: failed program was:" >&5
2219sed 's/^/| /' conftest.$ac_ext >&5
2220
2221{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2222See \`config.log' for more details." >&5
2223echo "$as_me: error: C compiler cannot create executables
2224See \`config.log' for more details." >&2;}
2225 { (exit 77); exit 77; }; }
2226fi
2227
2228ac_exeext=$ac_cv_exeext
2229echo "$as_me:$LINENO: result: $ac_file" >&5
2230echo "${ECHO_T}$ac_file" >&6
2231
2232# Check the compiler produces executables we can run. If not, either
2233# the compiler is broken, or we cross compile.
2234echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2235echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2236# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2237# If not cross compiling, check that we can run a simple program.
2238if test "$cross_compiling" != yes; then
2239 if { ac_try='./$ac_file'
2240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2241 (eval $ac_try) 2>&5
2242 ac_status=$?
2243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2244 (exit $ac_status); }; }; then
2245 cross_compiling=no
6e3f3080 2246 else
ba479fd2
NN
2247 if test "$cross_compiling" = maybe; then
2248 cross_compiling=yes
2249 else
2250 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2251If you meant to cross compile, use \`--host'.
2252See \`config.log' for more details." >&5
2253echo "$as_me: error: cannot run C compiled programs.
2254If you meant to cross compile, use \`--host'.
2255See \`config.log' for more details." >&2;}
2256 { (exit 1); exit 1; }; }
2257 fi
6e3f3080
NN
2258 fi
2259fi
ba479fd2
NN
2260echo "$as_me:$LINENO: result: yes" >&5
2261echo "${ECHO_T}yes" >&6
2262
2263rm -f a.out a.exe conftest$ac_cv_exeext b.out
2264ac_clean_files=$ac_clean_files_save
2265# Check the compiler produces executables we can run. If not, either
2266# the compiler is broken, or we cross compile.
2267echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2268echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2269echo "$as_me:$LINENO: result: $cross_compiling" >&5
2270echo "${ECHO_T}$cross_compiling" >&6
2271
2272echo "$as_me:$LINENO: checking for suffix of executables" >&5
2273echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2274if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2275 (eval $ac_link) 2>&5
2276 ac_status=$?
2277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2278 (exit $ac_status); }; then
2279 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2280# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2281# work properly (i.e., refer to `conftest.exe'), while it won't with
2282# `rm'.
2283for ac_file in conftest.exe conftest conftest.*; do
2284 test -f "$ac_file" || continue
2285 case $ac_file in
2286 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2287 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
86da66b5
HPN
2288 export ac_cv_exeext
2289 break;;
ba479fd2
NN
2290 * ) break;;
2291 esac
2292done
e9a25f70 2293else
ba479fd2
NN
2294 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2295See \`config.log' for more details." >&5
2296echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2297See \`config.log' for more details." >&2;}
2298 { (exit 1); exit 1; }; }
2299fi
2300
2301rm -f conftest$ac_cv_exeext
2302echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2303echo "${ECHO_T}$ac_cv_exeext" >&6
2304
2305rm -f conftest.$ac_ext
2306EXEEXT=$ac_cv_exeext
2307ac_exeext=$EXEEXT
2308echo "$as_me:$LINENO: checking for suffix of object files" >&5
2309echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2310if test "${ac_cv_objext+set}" = set; then
2311 echo $ECHO_N "(cached) $ECHO_C" >&6
2312else
2313 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2314/* confdefs.h. */
2315_ACEOF
2316cat confdefs.h >>conftest.$ac_ext
2317cat >>conftest.$ac_ext <<_ACEOF
2318/* end confdefs.h. */
2319
2320int
2321main ()
2322{
6e3f3080 2323
ba479fd2
NN
2324 ;
2325 return 0;
2326}
2327_ACEOF
2328rm -f conftest.o conftest.obj
2329if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2330 (eval $ac_compile) 2>&5
2331 ac_status=$?
2332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2333 (exit $ac_status); }; then
2334 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2335 case $ac_file in
2336 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2337 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2338 break;;
2339 esac
2340done
63cf211a 2341else
ba479fd2
NN
2342 echo "$as_me: failed program was:" >&5
2343sed 's/^/| /' conftest.$ac_ext >&5
2344
2345{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2346See \`config.log' for more details." >&5
2347echo "$as_me: error: cannot compute suffix of object files: cannot compile
2348See \`config.log' for more details." >&2;}
2349 { (exit 1); exit 1; }; }
2350fi
2351
2352rm -f conftest.$ac_cv_objext conftest.$ac_ext
2353fi
2354echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2355echo "${ECHO_T}$ac_cv_objext" >&6
2356OBJEXT=$ac_cv_objext
2357ac_objext=$OBJEXT
2358echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2359echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2360if test "${ac_cv_c_compiler_gnu+set}" = set; then
2361 echo $ECHO_N "(cached) $ECHO_C" >&6
2362else
2363 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2364/* confdefs.h. */
2365_ACEOF
2366cat confdefs.h >>conftest.$ac_ext
2367cat >>conftest.$ac_ext <<_ACEOF
2368/* end confdefs.h. */
2369
2370int
2371main ()
2372{
2373#ifndef __GNUC__
2374 choke me
2375#endif
6e3f3080 2376
ba479fd2
NN
2377 ;
2378 return 0;
2379}
2380_ACEOF
2381rm -f conftest.$ac_objext
2382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2383 (eval $ac_compile) 2>conftest.er1
ba479fd2 2384 ac_status=$?
86da66b5
HPN
2385 grep -v '^ *+' conftest.er1 >conftest.err
2386 rm -f conftest.er1
2387 cat conftest.err >&5
ba479fd2
NN
2388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2389 (exit $ac_status); } &&
a1286ef5
ZW
2390 { ac_try='test -z "$ac_c_werror_flag"
2391 || test ! -s conftest.err'
86da66b5
HPN
2392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2393 (eval $ac_try) 2>&5
2394 ac_status=$?
2395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2396 (exit $ac_status); }; } &&
2397 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2399 (eval $ac_try) 2>&5
2400 ac_status=$?
2401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2402 (exit $ac_status); }; }; then
2403 ac_compiler_gnu=yes
2404else
2405 echo "$as_me: failed program was:" >&5
2406sed 's/^/| /' conftest.$ac_ext >&5
2407
2408ac_compiler_gnu=no
2409fi
86da66b5 2410rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2411ac_cv_c_compiler_gnu=$ac_compiler_gnu
2412
2413fi
2414echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2415echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2416GCC=`test $ac_compiler_gnu = yes && echo yes`
2417ac_test_CFLAGS=${CFLAGS+set}
2418ac_save_CFLAGS=$CFLAGS
2419CFLAGS="-g"
2420echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2421echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2422if test "${ac_cv_prog_cc_g+set}" = set; then
2423 echo $ECHO_N "(cached) $ECHO_C" >&6
2424else
2425 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2426/* confdefs.h. */
2427_ACEOF
2428cat confdefs.h >>conftest.$ac_ext
2429cat >>conftest.$ac_ext <<_ACEOF
2430/* end confdefs.h. */
2431
2432int
2433main ()
2434{
2435
2436 ;
2437 return 0;
2438}
2439_ACEOF
2440rm -f conftest.$ac_objext
2441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2442 (eval $ac_compile) 2>conftest.er1
ba479fd2 2443 ac_status=$?
86da66b5
HPN
2444 grep -v '^ *+' conftest.er1 >conftest.err
2445 rm -f conftest.er1
2446 cat conftest.err >&5
ba479fd2
NN
2447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2448 (exit $ac_status); } &&
a1286ef5
ZW
2449 { ac_try='test -z "$ac_c_werror_flag"
2450 || test ! -s conftest.err'
86da66b5
HPN
2451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2452 (eval $ac_try) 2>&5
2453 ac_status=$?
2454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2455 (exit $ac_status); }; } &&
2456 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2458 (eval $ac_try) 2>&5
2459 ac_status=$?
2460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2461 (exit $ac_status); }; }; then
6e3f3080
NN
2462 ac_cv_prog_cc_g=yes
2463else
ba479fd2
NN
2464 echo "$as_me: failed program was:" >&5
2465sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2466
ba479fd2 2467ac_cv_prog_cc_g=no
6e3f3080 2468fi
86da66b5 2469rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2470fi
2471echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2472echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2473if test "$ac_test_CFLAGS" = set; then
ba479fd2 2474 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2475elif test $ac_cv_prog_cc_g = yes; then
2476 if test "$GCC" = yes; then
e9a25f70
JL
2477 CFLAGS="-g -O2"
2478 else
cd9e5e7c 2479 CFLAGS="-g"
81814e35 2480 fi
3723cad9 2481else
cd9e5e7c
MK
2482 if test "$GCC" = yes; then
2483 CFLAGS="-O2"
2484 else
2485 CFLAGS=
2486 fi
e9a25f70 2487fi
ba479fd2
NN
2488echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2489echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2490if test "${ac_cv_prog_cc_stdc+set}" = set; then
2491 echo $ECHO_N "(cached) $ECHO_C" >&6
2492else
2493 ac_cv_prog_cc_stdc=no
2494ac_save_CC=$CC
2495cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2496/* confdefs.h. */
2497_ACEOF
2498cat confdefs.h >>conftest.$ac_ext
2499cat >>conftest.$ac_ext <<_ACEOF
2500/* end confdefs.h. */
2501#include <stdarg.h>
2502#include <stdio.h>
2503#include <sys/types.h>
2504#include <sys/stat.h>
2505/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2506struct buf { int x; };
2507FILE * (*rcsopen) (struct buf *, struct stat *, int);
2508static char *e (p, i)
2509 char **p;
2510 int i;
2511{
2512 return p[i];
2513}
2514static char *f (char * (*g) (char **, int), char **p, ...)
2515{
2516 char *s;
2517 va_list v;
2518 va_start (v,p);
2519 s = g (p, va_arg (v,int));
2520 va_end (v);
2521 return s;
2522}
86da66b5
HPN
2523
2524/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2525 function prototypes and stuff, but not '\xHH' hex character constants.
2526 These don't provoke an error unfortunately, instead are silently treated
2527 as 'x'. The following induces an error, until -std1 is added to get
2528 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2529 array size at least. It's necessary to write '\x00'==0 to get something
2530 that's true only with -std1. */
2531int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2532
ba479fd2
NN
2533int test (int i, double x);
2534struct s1 {int (*f) (int a);};
2535struct s2 {int (*f) (double a);};
2536int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2537int argc;
2538char **argv;
2539int
2540main ()
2541{
2542return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2543 ;
2544 return 0;
2545}
2546_ACEOF
2547# Don't try gcc -ansi; that turns off useful extensions and
2548# breaks some systems' header files.
2549# AIX -qlanglvl=ansi
2550# Ultrix and OSF/1 -std1
2551# HP-UX 10.20 and later -Ae
2552# HP-UX older versions -Aa -D_HPUX_SOURCE
2553# SVR4 -Xc -D__EXTENSIONS__
2554for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2555do
2556 CC="$ac_save_CC $ac_arg"
2557 rm -f conftest.$ac_objext
2558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2559 (eval $ac_compile) 2>conftest.er1
ba479fd2 2560 ac_status=$?
86da66b5
HPN
2561 grep -v '^ *+' conftest.er1 >conftest.err
2562 rm -f conftest.er1
2563 cat conftest.err >&5
ba479fd2
NN
2564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2565 (exit $ac_status); } &&
a1286ef5
ZW
2566 { ac_try='test -z "$ac_c_werror_flag"
2567 || test ! -s conftest.err'
86da66b5
HPN
2568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2569 (eval $ac_try) 2>&5
2570 ac_status=$?
2571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2572 (exit $ac_status); }; } &&
2573 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2575 (eval $ac_try) 2>&5
2576 ac_status=$?
2577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2578 (exit $ac_status); }; }; then
2579 ac_cv_prog_cc_stdc=$ac_arg
2580break
2581else
2582 echo "$as_me: failed program was:" >&5
2583sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2584
ba479fd2 2585fi
86da66b5 2586rm -f conftest.err conftest.$ac_objext
ba479fd2
NN
2587done
2588rm -f conftest.$ac_ext conftest.$ac_objext
2589CC=$ac_save_CC
2590
2591fi
2592
2593case "x$ac_cv_prog_cc_stdc" in
2594 x|xno)
2595 echo "$as_me:$LINENO: result: none needed" >&5
2596echo "${ECHO_T}none needed" >&6 ;;
2597 *)
2598 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2599echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2600 CC="$CC $ac_cv_prog_cc_stdc" ;;
2601esac
2602
2603# Some people use a C++ compiler to compile C. Since we use `exit',
2604# in C++ we need to declare it. In case someone uses the same compiler
2605# for both compiling C and C++ we need to have the C++ compiler decide
2606# the declaration of exit, since it's the most demanding environment.
2607cat >conftest.$ac_ext <<_ACEOF
2608#ifndef __cplusplus
2609 choke me
2610#endif
2611_ACEOF
2612rm -f conftest.$ac_objext
2613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2614 (eval $ac_compile) 2>conftest.er1
ba479fd2 2615 ac_status=$?
86da66b5
HPN
2616 grep -v '^ *+' conftest.er1 >conftest.err
2617 rm -f conftest.er1
2618 cat conftest.err >&5
ba479fd2
NN
2619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2620 (exit $ac_status); } &&
a1286ef5
ZW
2621 { ac_try='test -z "$ac_c_werror_flag"
2622 || test ! -s conftest.err'
86da66b5
HPN
2623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2624 (eval $ac_try) 2>&5
2625 ac_status=$?
2626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2627 (exit $ac_status); }; } &&
2628 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2630 (eval $ac_try) 2>&5
2631 ac_status=$?
2632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2633 (exit $ac_status); }; }; then
2634 for ac_declaration in \
86da66b5 2635 '' \
ba479fd2
NN
2636 'extern "C" void std::exit (int) throw (); using std::exit;' \
2637 'extern "C" void std::exit (int); using std::exit;' \
2638 'extern "C" void exit (int) throw ();' \
2639 'extern "C" void exit (int);' \
2640 'void exit (int);'
2641do
2642 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2643/* confdefs.h. */
2644_ACEOF
2645cat confdefs.h >>conftest.$ac_ext
2646cat >>conftest.$ac_ext <<_ACEOF
2647/* end confdefs.h. */
33e70558 2648$ac_declaration
86da66b5 2649#include <stdlib.h>
ba479fd2
NN
2650int
2651main ()
2652{
2653exit (42);
2654 ;
2655 return 0;
2656}
2657_ACEOF
2658rm -f conftest.$ac_objext
2659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2660 (eval $ac_compile) 2>conftest.er1
ba479fd2 2661 ac_status=$?
86da66b5
HPN
2662 grep -v '^ *+' conftest.er1 >conftest.err
2663 rm -f conftest.er1
2664 cat conftest.err >&5
ba479fd2
NN
2665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2666 (exit $ac_status); } &&
a1286ef5
ZW
2667 { ac_try='test -z "$ac_c_werror_flag"
2668 || test ! -s conftest.err'
86da66b5
HPN
2669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2670 (eval $ac_try) 2>&5
2671 ac_status=$?
2672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2673 (exit $ac_status); }; } &&
2674 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2676 (eval $ac_try) 2>&5
2677 ac_status=$?
2678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2679 (exit $ac_status); }; }; then
2680 :
2681else
2682 echo "$as_me: failed program was:" >&5
2683sed 's/^/| /' conftest.$ac_ext >&5
2684
2685continue
2686fi
86da66b5 2687rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 2688 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2689/* confdefs.h. */
2690_ACEOF
2691cat confdefs.h >>conftest.$ac_ext
2692cat >>conftest.$ac_ext <<_ACEOF
2693/* end confdefs.h. */
2694$ac_declaration
2695int
2696main ()
2697{
2698exit (42);
2699 ;
2700 return 0;
2701}
2702_ACEOF
2703rm -f conftest.$ac_objext
2704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2705 (eval $ac_compile) 2>conftest.er1
ba479fd2 2706 ac_status=$?
86da66b5
HPN
2707 grep -v '^ *+' conftest.er1 >conftest.err
2708 rm -f conftest.er1
2709 cat conftest.err >&5
ba479fd2
NN
2710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2711 (exit $ac_status); } &&
a1286ef5
ZW
2712 { ac_try='test -z "$ac_c_werror_flag"
2713 || test ! -s conftest.err'
86da66b5
HPN
2714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2715 (eval $ac_try) 2>&5
2716 ac_status=$?
2717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2718 (exit $ac_status); }; } &&
2719 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2721 (eval $ac_try) 2>&5
2722 ac_status=$?
2723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2724 (exit $ac_status); }; }; then
2725 break
3ec83fc2 2726else
ba479fd2
NN
2727 echo "$as_me: failed program was:" >&5
2728sed 's/^/| /' conftest.$ac_ext >&5
2729
6e3f3080 2730fi
86da66b5 2731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2732done
2733rm -f conftest*
2734if test -n "$ac_declaration"; then
2735 echo '#ifdef __cplusplus' >>confdefs.h
2736 echo $ac_declaration >>confdefs.h
2737 echo '#endif' >>confdefs.h
2738fi
2739
3ec83fc2 2740else
ba479fd2
NN
2741 echo "$as_me: failed program was:" >&5
2742sed 's/^/| /' conftest.$ac_ext >&5
2743
2744fi
86da66b5 2745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2746ac_ext=c
2747ac_cpp='$CPP $CPPFLAGS'
2748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2750ac_compiler_gnu=$ac_cv_c_compiler_gnu
2751
2752if test "x$CC" != xcc; then
2753 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2754echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2755else
2756 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2757echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2758fi
2759set dummy $CC; ac_cc=`echo $2 |
2760 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2761if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2762 echo $ECHO_N "(cached) $ECHO_C" >&6
2763else
2764 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2765/* confdefs.h. */
2766_ACEOF
2767cat confdefs.h >>conftest.$ac_ext
2768cat >>conftest.$ac_ext <<_ACEOF
2769/* end confdefs.h. */
2770
2771int
2772main ()
2773{
2774
2775 ;
2776 return 0;
2777}
2778_ACEOF
3ec83fc2
RH
2779# Make sure it works both with $CC and with simple cc.
2780# We do the test twice because some compilers refuse to overwrite an
2781# existing .o file with -o, though they will create one.
ba479fd2
NN
2782ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2783if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2784 (eval $ac_try) 2>&5
2785 ac_status=$?
2786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2787 (exit $ac_status); } &&
2788 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2789 (eval $ac_try) 2>&5
2790 ac_status=$?
2791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2792 (exit $ac_status); };
3ec83fc2
RH
2793then
2794 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2795 if test "x$CC" != xcc; then
2796 # Test first that cc exists at all.
ba479fd2
NN
2797 if { ac_try='cc -c conftest.$ac_ext >&5'
2798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2799 (eval $ac_try) 2>&5
2800 ac_status=$?
2801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2802 (exit $ac_status); }; }; then
2803 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2804 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2805 (eval $ac_try) 2>&5
2806 ac_status=$?
2807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2808 (exit $ac_status); } &&
2809 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2810 (eval $ac_try) 2>&5
2811 ac_status=$?
2812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2813 (exit $ac_status); };
3ec83fc2 2814 then
86da66b5
HPN
2815 # cc works too.
2816 :
3ec83fc2 2817 else
86da66b5
HPN
2818 # cc exists but doesn't like -o.
2819 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2820 fi
2821 fi
2822 fi
2823else
2824 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2825fi
2826rm -f conftest*
2827
2828fi
2829if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2830 echo "$as_me:$LINENO: result: yes" >&5
2831echo "${ECHO_T}yes" >&6
3ec83fc2 2832else
ba479fd2
NN
2833 echo "$as_me:$LINENO: result: no" >&5
2834echo "${ECHO_T}no" >&6
2835
2836cat >>confdefs.h <<\_ACEOF
3ec83fc2 2837#define NO_MINUS_C_MINUS_O 1
ba479fd2 2838_ACEOF
3ec83fc2
RH
2839
2840fi
2841
3b620440
KC
2842# expand $ac_aux_dir to an absolute path
2843am_aux_dir=`cd $ac_aux_dir && pwd`
2844
2845# FIXME: we rely on the cache variable name because
2846# there is no other way.
2847set dummy $CC
2848ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2849if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2850 # Losing compiler, so override with the script.
2851 # FIXME: It is wrong to rewrite CC.
2852 # But if we don't then we get into trouble of one sort or another.
2853 # A longer-term fix would be to have automake use am__CC in this case,
2854 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2855 CC="$am_aux_dir/compile $CC"
2856fi
2857
414d23ae
HPN
2858# autoconf is lame and doesn't give us any substitution variable for this.
2859if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2860 NO_MINUS_C_MINUS_O=yes
2861else
2862 OUTPUT_OPTION='-o $@'
2863fi
2864
2865
2866
73458fb7
NN
2867# -------------------------
2868# Check C compiler features
2869# -------------------------
2870
ba479fd2
NN
2871ac_ext=c
2872ac_cpp='$CPP $CPPFLAGS'
2873ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2874ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2875ac_compiler_gnu=$ac_cv_c_compiler_gnu
2876echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2877echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2878# On Suns, sometimes $CPP names a directory.
2879if test -n "$CPP" && test -d "$CPP"; then
2880 CPP=
2881fi
2882if test -z "$CPP"; then
ba479fd2
NN
2883 if test "${ac_cv_prog_CPP+set}" = set; then
2884 echo $ECHO_N "(cached) $ECHO_C" >&6
2885else
2886 # Double quotes because CPP needs to be expanded
2887 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2888 do
2889 ac_preproc_ok=false
2890for ac_c_preproc_warn_flag in '' yes
2891do
2892 # Use a header file that comes with gcc, so configuring glibc
2893 # with a fresh cross-compiler works.
2894 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2895 # <limits.h> exists even on freestanding compilers.
84c041a1 2896 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2897 # not just through cpp. "Syntax error" is here to catch this case.
2898 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2899/* confdefs.h. */
2900_ACEOF
2901cat confdefs.h >>conftest.$ac_ext
2902cat >>conftest.$ac_ext <<_ACEOF
2903/* end confdefs.h. */
2904#ifdef __STDC__
2905# include <limits.h>
2906#else
2907# include <assert.h>
2908#endif
86da66b5 2909 Syntax error
ba479fd2
NN
2910_ACEOF
2911if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2912 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2913 ac_status=$?
2914 grep -v '^ *+' conftest.er1 >conftest.err
2915 rm -f conftest.er1
2916 cat conftest.err >&5
2917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2918 (exit $ac_status); } >/dev/null; then
2919 if test -s conftest.err; then
2920 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2921 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2922 else
2923 ac_cpp_err=
2924 fi
2925else
2926 ac_cpp_err=yes
2927fi
2928if test -z "$ac_cpp_err"; then
093e61a6 2929 :
cafe096b 2930else
ba479fd2
NN
2931 echo "$as_me: failed program was:" >&5
2932sed 's/^/| /' conftest.$ac_ext >&5
2933
2934 # Broken: fails on valid input.
2935continue
2936fi
2937rm -f conftest.err conftest.$ac_ext
2938
2939 # OK, works on sane cases. Now check whether non-existent headers
2940 # can be detected and how.
2941 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2942/* confdefs.h. */
2943_ACEOF
2944cat confdefs.h >>conftest.$ac_ext
2945cat >>conftest.$ac_ext <<_ACEOF
2946/* end confdefs.h. */
2947#include <ac_nonexistent.h>
2948_ACEOF
2949if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2950 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2951 ac_status=$?
2952 grep -v '^ *+' conftest.er1 >conftest.err
2953 rm -f conftest.er1
2954 cat conftest.err >&5
2955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2956 (exit $ac_status); } >/dev/null; then
2957 if test -s conftest.err; then
2958 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2959 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2960 else
2961 ac_cpp_err=
2962 fi
2963else
2964 ac_cpp_err=yes
2965fi
2966if test -z "$ac_cpp_err"; then
2967 # Broken: success on invalid input.
2968continue
2969else
2970 echo "$as_me: failed program was:" >&5
2971sed 's/^/| /' conftest.$ac_ext >&5
2972
2973 # Passes both tests.
2974ac_preproc_ok=:
2975break
2976fi
2977rm -f conftest.err conftest.$ac_ext
2978
2979done
2980# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2981rm -f conftest.err conftest.$ac_ext
2982if $ac_preproc_ok; then
2983 break
2984fi
2985
2986 done
2987 ac_cv_prog_CPP=$CPP
2988
2989fi
2990 CPP=$ac_cv_prog_CPP
2991else
2992 ac_cv_prog_CPP=$CPP
2993fi
2994echo "$as_me:$LINENO: result: $CPP" >&5
2995echo "${ECHO_T}$CPP" >&6
2996ac_preproc_ok=false
2997for ac_c_preproc_warn_flag in '' yes
2998do
2999 # Use a header file that comes with gcc, so configuring glibc
3000 # with a fresh cross-compiler works.
3001 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3002 # <limits.h> exists even on freestanding compilers.
3003 # On the NeXT, cc -E runs the code through the compiler's parser,
3004 # not just through cpp. "Syntax error" is here to catch this case.
3005 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3006/* confdefs.h. */
3007_ACEOF
3008cat confdefs.h >>conftest.$ac_ext
3009cat >>conftest.$ac_ext <<_ACEOF
3010/* end confdefs.h. */
3011#ifdef __STDC__
3012# include <limits.h>
3013#else
3014# include <assert.h>
3015#endif
86da66b5 3016 Syntax error
ba479fd2
NN
3017_ACEOF
3018if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3019 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3020 ac_status=$?
3021 grep -v '^ *+' conftest.er1 >conftest.err
3022 rm -f conftest.er1
3023 cat conftest.err >&5
3024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3025 (exit $ac_status); } >/dev/null; then
3026 if test -s conftest.err; then
3027 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3028 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3029 else
3030 ac_cpp_err=
3031 fi
3032else
3033 ac_cpp_err=yes
3034fi
3035if test -z "$ac_cpp_err"; then
6e3f3080 3036 :
414d23ae 3037else
ba479fd2
NN
3038 echo "$as_me: failed program was:" >&5
3039sed 's/^/| /' conftest.$ac_ext >&5
3040
3041 # Broken: fails on valid input.
3042continue
3043fi
3044rm -f conftest.err conftest.$ac_ext
3045
3046 # OK, works on sane cases. Now check whether non-existent headers
3047 # can be detected and how.
3048 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3049/* confdefs.h. */
3050_ACEOF
3051cat confdefs.h >>conftest.$ac_ext
3052cat >>conftest.$ac_ext <<_ACEOF
3053/* end confdefs.h. */
3054#include <ac_nonexistent.h>
3055_ACEOF
3056if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3057 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3058 ac_status=$?
3059 grep -v '^ *+' conftest.er1 >conftest.err
3060 rm -f conftest.er1
3061 cat conftest.err >&5
3062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3063 (exit $ac_status); } >/dev/null; then
3064 if test -s conftest.err; then
3065 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3066 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3067 else
3068 ac_cpp_err=
3069 fi
6e3f3080 3070else
ba479fd2 3071 ac_cpp_err=yes
63cf211a 3072fi
ba479fd2
NN
3073if test -z "$ac_cpp_err"; then
3074 # Broken: success on invalid input.
3075continue
3076else
3077 echo "$as_me: failed program was:" >&5
3078sed 's/^/| /' conftest.$ac_ext >&5
3079
3080 # Passes both tests.
3081ac_preproc_ok=:
3082break
63cf211a 3083fi
ba479fd2
NN
3084rm -f conftest.err conftest.$ac_ext
3085
3086done
3087# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3088rm -f conftest.err conftest.$ac_ext
3089if $ac_preproc_ok; then
3090 :
6e3f3080 3091else
ba479fd2
NN
3092 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3093See \`config.log' for more details." >&5
3094echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3095See \`config.log' for more details." >&2;}
3096 { (exit 1); exit 1; }; }
6e3f3080
NN
3097fi
3098
ba479fd2
NN
3099ac_ext=c
3100ac_cpp='$CPP $CPPFLAGS'
3101ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3102ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3103ac_compiler_gnu=$ac_cv_c_compiler_gnu
3104
b5472e1d 3105
ba479fd2
NN
3106echo "$as_me:$LINENO: checking for inline" >&5
3107echo $ECHO_N "checking for inline... $ECHO_C" >&6
3108if test "${ac_cv_c_inline+set}" = set; then
3109 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3110else
3111 ac_cv_c_inline=no
3112for ac_kw in inline __inline__ __inline; do
ba479fd2 3113 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3114/* confdefs.h. */
3115_ACEOF
3116cat confdefs.h >>conftest.$ac_ext
3117cat >>conftest.$ac_ext <<_ACEOF
3118/* end confdefs.h. */
3119#ifndef __cplusplus
3120typedef int foo_t;
3121static $ac_kw foo_t static_foo () {return 0; }
3122$ac_kw foo_t foo () {return 0; }
3123#endif
414d23ae 3124
ba479fd2
NN
3125_ACEOF
3126rm -f conftest.$ac_objext
3127if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3128 (eval $ac_compile) 2>conftest.er1
ba479fd2 3129 ac_status=$?
86da66b5
HPN
3130 grep -v '^ *+' conftest.er1 >conftest.err
3131 rm -f conftest.er1
3132 cat conftest.err >&5
ba479fd2
NN
3133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3134 (exit $ac_status); } &&
a1286ef5
ZW
3135 { ac_try='test -z "$ac_c_werror_flag"
3136 || test ! -s conftest.err'
86da66b5
HPN
3137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3138 (eval $ac_try) 2>&5
3139 ac_status=$?
3140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3141 (exit $ac_status); }; } &&
3142 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3144 (eval $ac_try) 2>&5
3145 ac_status=$?
3146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3147 (exit $ac_status); }; }; then
414d23ae
HPN
3148 ac_cv_c_inline=$ac_kw; break
3149else
ba479fd2
NN
3150 echo "$as_me: failed program was:" >&5
3151sed 's/^/| /' conftest.$ac_ext >&5
3152
414d23ae 3153fi
86da66b5 3154rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3155done
3156
3157fi
ba479fd2
NN
3158echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3159echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3160
3161
ba479fd2 3162case $ac_cv_c_inline in
414d23ae 3163 inline | yes) ;;
86da66b5
HPN
3164 *)
3165 case $ac_cv_c_inline in
3166 no) ac_val=;;
3167 *) ac_val=$ac_cv_c_inline;;
3168 esac
3169 cat >>confdefs.h <<_ACEOF
3170#ifndef __cplusplus
3171#define inline $ac_val
3172#endif
ba479fd2 3173_ACEOF
86da66b5 3174 ;;
414d23ae
HPN
3175esac
3176
414d23ae 3177
ba479fd2
NN
3178echo "$as_me:$LINENO: checking for long long int" >&5
3179echo $ECHO_N "checking for long long int... $ECHO_C" >&6
3180if test "${ac_cv_c_long_long+set}" = set; then
3181 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3182else
ba479fd2 3183 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3184/* confdefs.h. */
3185_ACEOF
3186cat confdefs.h >>conftest.$ac_ext
3187cat >>conftest.$ac_ext <<_ACEOF
3188/* end confdefs.h. */
414d23ae 3189
ba479fd2
NN
3190int
3191main ()
3192{
414d23ae 3193long long int i;
ba479fd2
NN
3194 ;
3195 return 0;
3196}
3197_ACEOF
3198rm -f conftest.$ac_objext
3199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3200 (eval $ac_compile) 2>conftest.er1
ba479fd2 3201 ac_status=$?
86da66b5
HPN
3202 grep -v '^ *+' conftest.er1 >conftest.err
3203 rm -f conftest.er1
3204 cat conftest.err >&5
ba479fd2
NN
3205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3206 (exit $ac_status); } &&
a1286ef5
ZW
3207 { ac_try='test -z "$ac_c_werror_flag"
3208 || test ! -s conftest.err'
86da66b5
HPN
3209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3210 (eval $ac_try) 2>&5
3211 ac_status=$?
3212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3213 (exit $ac_status); }; } &&
3214 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3216 (eval $ac_try) 2>&5
3217 ac_status=$?
3218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3219 (exit $ac_status); }; }; then
414d23ae
HPN
3220 ac_cv_c_long_long=yes
3221else
ba479fd2
NN
3222 echo "$as_me: failed program was:" >&5
3223sed 's/^/| /' conftest.$ac_ext >&5
3224
3225ac_cv_c_long_long=no
414d23ae 3226fi
86da66b5 3227rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3228fi
ba479fd2
NN
3229echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5
3230echo "${ECHO_T}$ac_cv_c_long_long" >&6
63cf211a 3231 if test $ac_cv_c_long_long = yes; then
ba479fd2
NN
3232
3233cat >>confdefs.h <<\_ACEOF
414d23ae 3234#define HAVE_LONG_LONG 1
ba479fd2 3235_ACEOF
414d23ae
HPN
3236
3237 fi
ba479fd2
NN
3238echo "$as_me:$LINENO: checking for __int64" >&5
3239echo $ECHO_N "checking for __int64... $ECHO_C" >&6
3240if test "${ac_cv_c___int64+set}" = set; then
3241 echo $ECHO_N "(cached) $ECHO_C" >&6
3242else
3243 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3244/* confdefs.h. */
3245_ACEOF
3246cat confdefs.h >>conftest.$ac_ext
3247cat >>conftest.$ac_ext <<_ACEOF
3248/* end confdefs.h. */
3249
3250int
3251main ()
3252{
414d23ae 3253__int64 i;
ba479fd2
NN
3254 ;
3255 return 0;
3256}
3257_ACEOF
3258rm -f conftest.$ac_objext
3259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3260 (eval $ac_compile) 2>conftest.er1
ba479fd2 3261 ac_status=$?
86da66b5
HPN
3262 grep -v '^ *+' conftest.er1 >conftest.err
3263 rm -f conftest.er1
3264 cat conftest.err >&5
ba479fd2
NN
3265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3266 (exit $ac_status); } &&
a1286ef5
ZW
3267 { ac_try='test -z "$ac_c_werror_flag"
3268 || test ! -s conftest.err'
86da66b5
HPN
3269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3270 (eval $ac_try) 2>&5
3271 ac_status=$?
3272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3273 (exit $ac_status); }; } &&
3274 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3276 (eval $ac_try) 2>&5
3277 ac_status=$?
3278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3279 (exit $ac_status); }; }; then
414d23ae
HPN
3280 ac_cv_c___int64=yes
3281else
ba479fd2
NN
3282 echo "$as_me: failed program was:" >&5
3283sed 's/^/| /' conftest.$ac_ext >&5
3284
3285ac_cv_c___int64=no
414d23ae 3286fi
86da66b5 3287rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3288fi
ba479fd2
NN
3289echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5
3290echo "${ECHO_T}$ac_cv_c___int64" >&6
63cf211a 3291 if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3292
3293cat >>confdefs.h <<\_ACEOF
414d23ae 3294#define HAVE___INT64 1
ba479fd2 3295_ACEOF
414d23ae
HPN
3296
3297 fi
3298
414d23ae
HPN
3299
3300# sizeof(char) is 1 by definition.
bf3b7cd3
JD
3301
3302echo "$as_me:$LINENO: checking for egrep" >&5
3303echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3304if test "${ac_cv_prog_egrep+set}" = set; then
3305 echo $ECHO_N "(cached) $ECHO_C" >&6
3306else
3307 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3308 then ac_cv_prog_egrep='grep -E'
3309 else ac_cv_prog_egrep='egrep'
3310 fi
3311fi
3312echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3313echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3314 EGREP=$ac_cv_prog_egrep
3315
3316
3317echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3318echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3319if test "${ac_cv_header_stdc+set}" = set; then
3320 echo $ECHO_N "(cached) $ECHO_C" >&6
3321else
3322 cat >conftest.$ac_ext <<_ACEOF
3323/* confdefs.h. */
3324_ACEOF
3325cat confdefs.h >>conftest.$ac_ext
3326cat >>conftest.$ac_ext <<_ACEOF
3327/* end confdefs.h. */
3328#include <stdlib.h>
3329#include <stdarg.h>
3330#include <string.h>
3331#include <float.h>
3332
3333int
3334main ()
3335{
3336
3337 ;
3338 return 0;
3339}
3340_ACEOF
3341rm -f conftest.$ac_objext
3342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3343 (eval $ac_compile) 2>conftest.er1
3344 ac_status=$?
3345 grep -v '^ *+' conftest.er1 >conftest.err
3346 rm -f conftest.er1
3347 cat conftest.err >&5
3348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3349 (exit $ac_status); } &&
a1286ef5
ZW
3350 { ac_try='test -z "$ac_c_werror_flag"
3351 || test ! -s conftest.err'
bf3b7cd3
JD
3352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3353 (eval $ac_try) 2>&5
3354 ac_status=$?
3355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3356 (exit $ac_status); }; } &&
3357 { ac_try='test -s conftest.$ac_objext'
3358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3359 (eval $ac_try) 2>&5
3360 ac_status=$?
3361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3362 (exit $ac_status); }; }; then
3363 ac_cv_header_stdc=yes
3364else
3365 echo "$as_me: failed program was:" >&5
3366sed 's/^/| /' conftest.$ac_ext >&5
3367
3368ac_cv_header_stdc=no
3369fi
3370rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3371
3372if test $ac_cv_header_stdc = yes; then
3373 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3374 cat >conftest.$ac_ext <<_ACEOF
3375/* confdefs.h. */
3376_ACEOF
3377cat confdefs.h >>conftest.$ac_ext
3378cat >>conftest.$ac_ext <<_ACEOF
3379/* end confdefs.h. */
3380#include <string.h>
3381
3382_ACEOF
3383if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3384 $EGREP "memchr" >/dev/null 2>&1; then
3385 :
3386else
3387 ac_cv_header_stdc=no
3388fi
3389rm -f conftest*
3390
3391fi
3392
3393if test $ac_cv_header_stdc = yes; then
3394 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3395 cat >conftest.$ac_ext <<_ACEOF
3396/* confdefs.h. */
3397_ACEOF
3398cat confdefs.h >>conftest.$ac_ext
3399cat >>conftest.$ac_ext <<_ACEOF
3400/* end confdefs.h. */
3401#include <stdlib.h>
3402
3403_ACEOF
3404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3405 $EGREP "free" >/dev/null 2>&1; then
3406 :
3407else
3408 ac_cv_header_stdc=no
3409fi
3410rm -f conftest*
3411
3412fi
3413
3414if test $ac_cv_header_stdc = yes; then
3415 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3416 if test "$cross_compiling" = yes; then
3417 :
3418else
3419 cat >conftest.$ac_ext <<_ACEOF
3420/* confdefs.h. */
3421_ACEOF
3422cat confdefs.h >>conftest.$ac_ext
3423cat >>conftest.$ac_ext <<_ACEOF
3424/* end confdefs.h. */
3425#include <ctype.h>
3426#if ((' ' & 0x0FF) == 0x020)
3427# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3428# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3429#else
3430# define ISLOWER(c) \
3431 (('a' <= (c) && (c) <= 'i') \
3432 || ('j' <= (c) && (c) <= 'r') \
3433 || ('s' <= (c) && (c) <= 'z'))
3434# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3435#endif
3436
3437#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3438int
3439main ()
3440{
3441 int i;
3442 for (i = 0; i < 256; i++)
3443 if (XOR (islower (i), ISLOWER (i))
3444 || toupper (i) != TOUPPER (i))
3445 exit(2);
3446 exit (0);
3447}
3448_ACEOF
3449rm -f conftest$ac_exeext
3450if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3451 (eval $ac_link) 2>&5
3452 ac_status=$?
3453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3454 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3456 (eval $ac_try) 2>&5
3457 ac_status=$?
3458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3459 (exit $ac_status); }; }; then
3460 :
3461else
3462 echo "$as_me: program exited with status $ac_status" >&5
3463echo "$as_me: failed program was:" >&5
3464sed 's/^/| /' conftest.$ac_ext >&5
3465
3466( exit $ac_status )
3467ac_cv_header_stdc=no
3468fi
3469rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3470fi
3471fi
3472fi
3473echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3474echo "${ECHO_T}$ac_cv_header_stdc" >&6
3475if test $ac_cv_header_stdc = yes; then
3476
3477cat >>confdefs.h <<\_ACEOF
3478#define STDC_HEADERS 1
3479_ACEOF
3480
3481fi
3482
3483# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3494 inttypes.h stdint.h unistd.h
3495do
3496as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3497echo "$as_me:$LINENO: checking for $ac_header" >&5
3498echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3499if eval "test \"\${$as_ac_Header+set}\" = set"; then
3500 echo $ECHO_N "(cached) $ECHO_C" >&6
3501else
3502 cat >conftest.$ac_ext <<_ACEOF
3503/* confdefs.h. */
3504_ACEOF
3505cat confdefs.h >>conftest.$ac_ext
3506cat >>conftest.$ac_ext <<_ACEOF
3507/* end confdefs.h. */
3508$ac_includes_default
3509
3510#include <$ac_header>
3511_ACEOF
3512rm -f conftest.$ac_objext
3513if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3514 (eval $ac_compile) 2>conftest.er1
3515 ac_status=$?
3516 grep -v '^ *+' conftest.er1 >conftest.err
3517 rm -f conftest.er1
3518 cat conftest.err >&5
3519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3520 (exit $ac_status); } &&
a1286ef5
ZW
3521 { ac_try='test -z "$ac_c_werror_flag"
3522 || test ! -s conftest.err'
bf3b7cd3
JD
3523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3524 (eval $ac_try) 2>&5
3525 ac_status=$?
3526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3527 (exit $ac_status); }; } &&
3528 { ac_try='test -s conftest.$ac_objext'
3529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3530 (eval $ac_try) 2>&5
3531 ac_status=$?
3532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3533 (exit $ac_status); }; }; then
3534 eval "$as_ac_Header=yes"
3535else
3536 echo "$as_me: failed program was:" >&5
3537sed 's/^/| /' conftest.$ac_ext >&5
3538
3539eval "$as_ac_Header=no"
3540fi
3541rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3542fi
3543echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3544echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3545if test `eval echo '${'$as_ac_Header'}'` = yes; then
3546 cat >>confdefs.h <<_ACEOF
3547#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3548_ACEOF
3549
3550fi
3551
3552done
3553
3554
3555echo "$as_me:$LINENO: checking for void *" >&5
3556echo $ECHO_N "checking for void *... $ECHO_C" >&6
3557if test "${ac_cv_type_void_p+set}" = set; then
3558 echo $ECHO_N "(cached) $ECHO_C" >&6
3559else
3560 cat >conftest.$ac_ext <<_ACEOF
3561/* confdefs.h. */
3562_ACEOF
3563cat confdefs.h >>conftest.$ac_ext
3564cat >>conftest.$ac_ext <<_ACEOF
3565/* end confdefs.h. */
3566$ac_includes_default
3567int
3568main ()
3569{
3570if ((void * *) 0)
3571 return 0;
3572if (sizeof (void *))
3573 return 0;
3574 ;
3575 return 0;
3576}
3577_ACEOF
3578rm -f conftest.$ac_objext
3579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3580 (eval $ac_compile) 2>conftest.er1
3581 ac_status=$?
3582 grep -v '^ *+' conftest.er1 >conftest.err
3583 rm -f conftest.er1
3584 cat conftest.err >&5
3585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3586 (exit $ac_status); } &&
a1286ef5
ZW
3587 { ac_try='test -z "$ac_c_werror_flag"
3588 || test ! -s conftest.err'
bf3b7cd3
JD
3589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3590 (eval $ac_try) 2>&5
3591 ac_status=$?
3592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3593 (exit $ac_status); }; } &&
3594 { ac_try='test -s conftest.$ac_objext'
3595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3596 (eval $ac_try) 2>&5
3597 ac_status=$?
3598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3599 (exit $ac_status); }; }; then
3600 ac_cv_type_void_p=yes
3601else
3602 echo "$as_me: failed program was:" >&5
3603sed 's/^/| /' conftest.$ac_ext >&5
3604
3605ac_cv_type_void_p=no
3606fi
3607rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3608fi
3609echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3610echo "${ECHO_T}$ac_cv_type_void_p" >&6
3611
ba479fd2
NN
3612echo "$as_me:$LINENO: checking size of void *" >&5
3613echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3614if test "${ac_cv_sizeof_void_p+set}" = set; then
3615 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 3616else
bf3b7cd3
JD
3617 if test "$ac_cv_type_void_p" = yes; then
3618 # The cast to unsigned long works around a bug in the HP C Compiler
3619 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3620 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3621 # This bug is HP SR number 8606223364.
3622 if test "$cross_compiling" = yes; then
3623 # Depending upon the size, compute the lo and hi bounds.
3624cat >conftest.$ac_ext <<_ACEOF
3625/* confdefs.h. */
3626_ACEOF
3627cat confdefs.h >>conftest.$ac_ext
3628cat >>conftest.$ac_ext <<_ACEOF
3629/* end confdefs.h. */
3630$ac_includes_default
3631int
3632main ()
3633{
3634static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
3635test_array [0] = 0
3636
3637 ;
3638 return 0;
3639}
3640_ACEOF
3641rm -f conftest.$ac_objext
3642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3643 (eval $ac_compile) 2>conftest.er1
3644 ac_status=$?
3645 grep -v '^ *+' conftest.er1 >conftest.err
3646 rm -f conftest.er1
3647 cat conftest.err >&5
3648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3649 (exit $ac_status); } &&
a1286ef5
ZW
3650 { ac_try='test -z "$ac_c_werror_flag"
3651 || test ! -s conftest.err'
bf3b7cd3
JD
3652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3653 (eval $ac_try) 2>&5
3654 ac_status=$?
3655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3656 (exit $ac_status); }; } &&
3657 { ac_try='test -s conftest.$ac_objext'
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); }; }; then
3663 ac_lo=0 ac_mid=0
3664 while :; do
3665 cat >conftest.$ac_ext <<_ACEOF
3666/* confdefs.h. */
3667_ACEOF
3668cat confdefs.h >>conftest.$ac_ext
3669cat >>conftest.$ac_ext <<_ACEOF
3670/* end confdefs.h. */
3671$ac_includes_default
3672int
3673main ()
3674{
3675static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3676test_array [0] = 0
3677
3678 ;
3679 return 0;
3680}
3681_ACEOF
3682rm -f conftest.$ac_objext
3683if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3684 (eval $ac_compile) 2>conftest.er1
3685 ac_status=$?
3686 grep -v '^ *+' conftest.er1 >conftest.err
3687 rm -f conftest.er1
3688 cat conftest.err >&5
3689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3690 (exit $ac_status); } &&
a1286ef5
ZW
3691 { ac_try='test -z "$ac_c_werror_flag"
3692 || test ! -s conftest.err'
bf3b7cd3
JD
3693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3694 (eval $ac_try) 2>&5
3695 ac_status=$?
3696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3697 (exit $ac_status); }; } &&
3698 { ac_try='test -s conftest.$ac_objext'
3699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3700 (eval $ac_try) 2>&5
3701 ac_status=$?
3702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3703 (exit $ac_status); }; }; then
3704 ac_hi=$ac_mid; break
3705else
3706 echo "$as_me: failed program was:" >&5
3707sed 's/^/| /' conftest.$ac_ext >&5
3708
3709ac_lo=`expr $ac_mid + 1`
3710 if test $ac_lo -le $ac_mid; then
3711 ac_lo= ac_hi=
3712 break
3713 fi
3714 ac_mid=`expr 2 '*' $ac_mid + 1`
3715fi
3716rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3717 done
3718else
3719 echo "$as_me: failed program was:" >&5
3720sed 's/^/| /' conftest.$ac_ext >&5
3721
3722cat >conftest.$ac_ext <<_ACEOF
3723/* confdefs.h. */
3724_ACEOF
3725cat confdefs.h >>conftest.$ac_ext
3726cat >>conftest.$ac_ext <<_ACEOF
3727/* end confdefs.h. */
3728$ac_includes_default
3729int
3730main ()
3731{
3732static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
3733test_array [0] = 0
3734
3735 ;
3736 return 0;
3737}
3738_ACEOF
3739rm -f conftest.$ac_objext
3740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3741 (eval $ac_compile) 2>conftest.er1
3742 ac_status=$?
3743 grep -v '^ *+' conftest.er1 >conftest.err
3744 rm -f conftest.er1
3745 cat conftest.err >&5
3746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3747 (exit $ac_status); } &&
a1286ef5
ZW
3748 { ac_try='test -z "$ac_c_werror_flag"
3749 || test ! -s conftest.err'
bf3b7cd3
JD
3750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3751 (eval $ac_try) 2>&5
3752 ac_status=$?
3753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3754 (exit $ac_status); }; } &&
3755 { ac_try='test -s conftest.$ac_objext'
3756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3757 (eval $ac_try) 2>&5
3758 ac_status=$?
3759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3760 (exit $ac_status); }; }; then
3761 ac_hi=-1 ac_mid=-1
3762 while :; do
3763 cat >conftest.$ac_ext <<_ACEOF
3764/* confdefs.h. */
3765_ACEOF
3766cat confdefs.h >>conftest.$ac_ext
3767cat >>conftest.$ac_ext <<_ACEOF
3768/* end confdefs.h. */
3769$ac_includes_default
3770int
3771main ()
3772{
3773static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
3774test_array [0] = 0
3775
3776 ;
3777 return 0;
3778}
3779_ACEOF
3780rm -f conftest.$ac_objext
3781if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3782 (eval $ac_compile) 2>conftest.er1
3783 ac_status=$?
3784 grep -v '^ *+' conftest.er1 >conftest.err
3785 rm -f conftest.er1
3786 cat conftest.err >&5
3787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3788 (exit $ac_status); } &&
a1286ef5
ZW
3789 { ac_try='test -z "$ac_c_werror_flag"
3790 || test ! -s conftest.err'
bf3b7cd3
JD
3791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3792 (eval $ac_try) 2>&5
3793 ac_status=$?
3794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3795 (exit $ac_status); }; } &&
3796 { ac_try='test -s conftest.$ac_objext'
3797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3798 (eval $ac_try) 2>&5
3799 ac_status=$?
3800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3801 (exit $ac_status); }; }; then
3802 ac_lo=$ac_mid; break
3803else
3804 echo "$as_me: failed program was:" >&5
3805sed 's/^/| /' conftest.$ac_ext >&5
3806
3807ac_hi=`expr '(' $ac_mid ')' - 1`
3808 if test $ac_mid -le $ac_hi; then
3809 ac_lo= ac_hi=
3810 break
3811 fi
3812 ac_mid=`expr 2 '*' $ac_mid`
3813fi
3814rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3815 done
3816else
3817 echo "$as_me: failed program was:" >&5
3818sed 's/^/| /' conftest.$ac_ext >&5
3819
3820ac_lo= ac_hi=
3821fi
3822rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3823fi
3824rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3825# Binary search between lo and hi bounds.
3826while test "x$ac_lo" != "x$ac_hi"; do
3827 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3828 cat >conftest.$ac_ext <<_ACEOF
3829/* confdefs.h. */
3830_ACEOF
3831cat confdefs.h >>conftest.$ac_ext
3832cat >>conftest.$ac_ext <<_ACEOF
3833/* end confdefs.h. */
3834$ac_includes_default
3835int
3836main ()
3837{
3838static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3839test_array [0] = 0
3840
3841 ;
3842 return 0;
3843}
3844_ACEOF
3845rm -f conftest.$ac_objext
3846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3847 (eval $ac_compile) 2>conftest.er1
3848 ac_status=$?
3849 grep -v '^ *+' conftest.er1 >conftest.err
3850 rm -f conftest.er1
3851 cat conftest.err >&5
3852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3853 (exit $ac_status); } &&
a1286ef5
ZW
3854 { ac_try='test -z "$ac_c_werror_flag"
3855 || test ! -s conftest.err'
bf3b7cd3
JD
3856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3857 (eval $ac_try) 2>&5
3858 ac_status=$?
3859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3860 (exit $ac_status); }; } &&
3861 { ac_try='test -s conftest.$ac_objext'
3862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3863 (eval $ac_try) 2>&5
3864 ac_status=$?
3865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3866 (exit $ac_status); }; }; then
3867 ac_hi=$ac_mid
3868else
3869 echo "$as_me: failed program was:" >&5
3870sed 's/^/| /' conftest.$ac_ext >&5
3871
3872ac_lo=`expr '(' $ac_mid ')' + 1`
3873fi
3874rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3875done
3876case $ac_lo in
3877?*) ac_cv_sizeof_void_p=$ac_lo;;
3878'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3879See \`config.log' for more details." >&5
3880echo "$as_me: error: cannot compute sizeof (void *), 77
3881See \`config.log' for more details." >&2;}
3882 { (exit 1); exit 1; }; } ;;
3883esac
3884else
3885 if test "$cross_compiling" = yes; then
a1286ef5
ZW
3886 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
3887See \`config.log' for more details." >&5
3888echo "$as_me: error: cannot run test program while cross compiling
3889See \`config.log' for more details." >&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); } &&
a1286ef5
ZW
4001 { ac_try='test -z "$ac_c_werror_flag"
4002 || test ! -s conftest.err'
bf3b7cd3
JD
4003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4004 (eval $ac_try) 2>&5
4005 ac_status=$?
4006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4007 (exit $ac_status); }; } &&
4008 { ac_try='test -s conftest.$ac_objext'
4009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4010 (eval $ac_try) 2>&5
4011 ac_status=$?
4012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4013 (exit $ac_status); }; }; then
4014 ac_cv_type_short=yes
4015else
4016 echo "$as_me: failed program was:" >&5
4017sed 's/^/| /' conftest.$ac_ext >&5
4018
4019ac_cv_type_short=no
4020fi
4021rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4022fi
4023echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
4024echo "${ECHO_T}$ac_cv_type_short" >&6
4025
4026echo "$as_me:$LINENO: checking size of short" >&5
4027echo $ECHO_N "checking size of short... $ECHO_C" >&6
4028if test "${ac_cv_sizeof_short+set}" = set; then
4029 echo $ECHO_N "(cached) $ECHO_C" >&6
4030else
4031 if test "$ac_cv_type_short" = yes; then
4032 # The cast to unsigned long works around a bug in the HP C Compiler
4033 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4034 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4035 # This bug is HP SR number 8606223364.
4036 if test "$cross_compiling" = yes; then
4037 # Depending upon the size, compute the lo and hi bounds.
4038cat >conftest.$ac_ext <<_ACEOF
4039/* confdefs.h. */
4040_ACEOF
4041cat confdefs.h >>conftest.$ac_ext
4042cat >>conftest.$ac_ext <<_ACEOF
4043/* end confdefs.h. */
4044$ac_includes_default
4045int
4046main ()
4047{
4048static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
4049test_array [0] = 0
4050
4051 ;
4052 return 0;
4053}
4054_ACEOF
4055rm -f conftest.$ac_objext
4056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4057 (eval $ac_compile) 2>conftest.er1
4058 ac_status=$?
4059 grep -v '^ *+' conftest.er1 >conftest.err
4060 rm -f conftest.er1
4061 cat conftest.err >&5
4062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4063 (exit $ac_status); } &&
a1286ef5
ZW
4064 { ac_try='test -z "$ac_c_werror_flag"
4065 || test ! -s conftest.err'
bf3b7cd3
JD
4066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4067 (eval $ac_try) 2>&5
4068 ac_status=$?
4069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4070 (exit $ac_status); }; } &&
4071 { ac_try='test -s conftest.$ac_objext'
4072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4073 (eval $ac_try) 2>&5
4074 ac_status=$?
4075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4076 (exit $ac_status); }; }; then
4077 ac_lo=0 ac_mid=0
4078 while :; do
4079 cat >conftest.$ac_ext <<_ACEOF
4080/* confdefs.h. */
4081_ACEOF
4082cat confdefs.h >>conftest.$ac_ext
4083cat >>conftest.$ac_ext <<_ACEOF
4084/* end confdefs.h. */
4085$ac_includes_default
4086int
4087main ()
4088{
4089static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4090test_array [0] = 0
4091
4092 ;
4093 return 0;
4094}
4095_ACEOF
4096rm -f conftest.$ac_objext
4097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4098 (eval $ac_compile) 2>conftest.er1
4099 ac_status=$?
4100 grep -v '^ *+' conftest.er1 >conftest.err
4101 rm -f conftest.er1
4102 cat conftest.err >&5
4103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4104 (exit $ac_status); } &&
a1286ef5
ZW
4105 { ac_try='test -z "$ac_c_werror_flag"
4106 || test ! -s conftest.err'
bf3b7cd3
JD
4107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4108 (eval $ac_try) 2>&5
4109 ac_status=$?
4110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4111 (exit $ac_status); }; } &&
4112 { ac_try='test -s conftest.$ac_objext'
4113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4114 (eval $ac_try) 2>&5
4115 ac_status=$?
4116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4117 (exit $ac_status); }; }; then
4118 ac_hi=$ac_mid; break
4119else
4120 echo "$as_me: failed program was:" >&5
4121sed 's/^/| /' conftest.$ac_ext >&5
4122
4123ac_lo=`expr $ac_mid + 1`
4124 if test $ac_lo -le $ac_mid; then
4125 ac_lo= ac_hi=
4126 break
4127 fi
4128 ac_mid=`expr 2 '*' $ac_mid + 1`
4129fi
4130rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4131 done
4132else
4133 echo "$as_me: failed program was:" >&5
4134sed 's/^/| /' conftest.$ac_ext >&5
4135
4136cat >conftest.$ac_ext <<_ACEOF
4137/* confdefs.h. */
4138_ACEOF
4139cat confdefs.h >>conftest.$ac_ext
4140cat >>conftest.$ac_ext <<_ACEOF
4141/* end confdefs.h. */
4142$ac_includes_default
4143int
4144main ()
4145{
4146static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
4147test_array [0] = 0
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
4153rm -f conftest.$ac_objext
4154if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4155 (eval $ac_compile) 2>conftest.er1
4156 ac_status=$?
4157 grep -v '^ *+' conftest.er1 >conftest.err
4158 rm -f conftest.er1
4159 cat conftest.err >&5
4160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4161 (exit $ac_status); } &&
a1286ef5
ZW
4162 { ac_try='test -z "$ac_c_werror_flag"
4163 || test ! -s conftest.err'
bf3b7cd3
JD
4164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4165 (eval $ac_try) 2>&5
4166 ac_status=$?
4167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4168 (exit $ac_status); }; } &&
4169 { ac_try='test -s conftest.$ac_objext'
4170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4171 (eval $ac_try) 2>&5
4172 ac_status=$?
4173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4174 (exit $ac_status); }; }; then
4175 ac_hi=-1 ac_mid=-1
4176 while :; do
4177 cat >conftest.$ac_ext <<_ACEOF
4178/* confdefs.h. */
4179_ACEOF
4180cat confdefs.h >>conftest.$ac_ext
4181cat >>conftest.$ac_ext <<_ACEOF
4182/* end confdefs.h. */
4183$ac_includes_default
4184int
4185main ()
4186{
4187static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
4188test_array [0] = 0
4189
4190 ;
4191 return 0;
4192}
4193_ACEOF
4194rm -f conftest.$ac_objext
4195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4196 (eval $ac_compile) 2>conftest.er1
4197 ac_status=$?
4198 grep -v '^ *+' conftest.er1 >conftest.err
4199 rm -f conftest.er1
4200 cat conftest.err >&5
4201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4202 (exit $ac_status); } &&
a1286ef5
ZW
4203 { ac_try='test -z "$ac_c_werror_flag"
4204 || test ! -s conftest.err'
bf3b7cd3
JD
4205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4206 (eval $ac_try) 2>&5
4207 ac_status=$?
4208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4209 (exit $ac_status); }; } &&
4210 { ac_try='test -s conftest.$ac_objext'
4211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4212 (eval $ac_try) 2>&5
4213 ac_status=$?
4214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4215 (exit $ac_status); }; }; then
4216 ac_lo=$ac_mid; break
4217else
4218 echo "$as_me: failed program was:" >&5
4219sed 's/^/| /' conftest.$ac_ext >&5
4220
4221ac_hi=`expr '(' $ac_mid ')' - 1`
4222 if test $ac_mid -le $ac_hi; then
4223 ac_lo= ac_hi=
4224 break
4225 fi
4226 ac_mid=`expr 2 '*' $ac_mid`
4227fi
4228rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4229 done
4230else
4231 echo "$as_me: failed program was:" >&5
4232sed 's/^/| /' conftest.$ac_ext >&5
4233
4234ac_lo= ac_hi=
4235fi
4236rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4237fi
4238rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4239# Binary search between lo and hi bounds.
4240while test "x$ac_lo" != "x$ac_hi"; do
4241 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4242 cat >conftest.$ac_ext <<_ACEOF
4243/* confdefs.h. */
4244_ACEOF
4245cat confdefs.h >>conftest.$ac_ext
4246cat >>conftest.$ac_ext <<_ACEOF
4247/* end confdefs.h. */
4248$ac_includes_default
4249int
4250main ()
4251{
4252static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4253test_array [0] = 0
4254
4255 ;
4256 return 0;
4257}
4258_ACEOF
4259rm -f conftest.$ac_objext
4260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4261 (eval $ac_compile) 2>conftest.er1
4262 ac_status=$?
4263 grep -v '^ *+' conftest.er1 >conftest.err
4264 rm -f conftest.er1
4265 cat conftest.err >&5
4266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4267 (exit $ac_status); } &&
a1286ef5
ZW
4268 { ac_try='test -z "$ac_c_werror_flag"
4269 || test ! -s conftest.err'
bf3b7cd3
JD
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); }; } &&
4275 { ac_try='test -s conftest.$ac_objext'
4276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4277 (eval $ac_try) 2>&5
4278 ac_status=$?
4279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4280 (exit $ac_status); }; }; then
4281 ac_hi=$ac_mid
4282else
4283 echo "$as_me: failed program was:" >&5
4284sed 's/^/| /' conftest.$ac_ext >&5
4285
4286ac_lo=`expr '(' $ac_mid ')' + 1`
4287fi
4288rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4289done
4290case $ac_lo in
4291?*) ac_cv_sizeof_short=$ac_lo;;
4292'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4293See \`config.log' for more details." >&5
4294echo "$as_me: error: cannot compute sizeof (short), 77
4295See \`config.log' for more details." >&2;}
4296 { (exit 1); exit 1; }; } ;;
4297esac
4298else
4299 if test "$cross_compiling" = yes; then
a1286ef5
ZW
4300 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4301See \`config.log' for more details." >&5
4302echo "$as_me: error: cannot run test program while cross compiling
4303See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4304 { (exit 1); exit 1; }; }
4305else
4306 cat >conftest.$ac_ext <<_ACEOF
4307/* confdefs.h. */
4308_ACEOF
4309cat confdefs.h >>conftest.$ac_ext
4310cat >>conftest.$ac_ext <<_ACEOF
4311/* end confdefs.h. */
4312$ac_includes_default
4313long longval () { return (long) (sizeof (short)); }
4314unsigned long ulongval () { return (long) (sizeof (short)); }
4315#include <stdio.h>
4316#include <stdlib.h>
4317int
4318main ()
4319{
4320
4321 FILE *f = fopen ("conftest.val", "w");
4322 if (! f)
4323 exit (1);
4324 if (((long) (sizeof (short))) < 0)
4325 {
4326 long i = longval ();
4327 if (i != ((long) (sizeof (short))))
4328 exit (1);
4329 fprintf (f, "%ld\n", i);
4330 }
4331 else
4332 {
4333 unsigned long i = ulongval ();
4334 if (i != ((long) (sizeof (short))))
4335 exit (1);
4336 fprintf (f, "%lu\n", i);
4337 }
4338 exit (ferror (f) || fclose (f) != 0);
4339
4340 ;
4341 return 0;
4342}
4343_ACEOF
4344rm -f conftest$ac_exeext
4345if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4346 (eval $ac_link) 2>&5
4347 ac_status=$?
4348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4351 (eval $ac_try) 2>&5
4352 ac_status=$?
4353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4354 (exit $ac_status); }; }; then
4355 ac_cv_sizeof_short=`cat conftest.val`
4356else
4357 echo "$as_me: program exited with status $ac_status" >&5
4358echo "$as_me: failed program was:" >&5
4359sed 's/^/| /' conftest.$ac_ext >&5
4360
4361( exit $ac_status )
4362{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4363See \`config.log' for more details." >&5
4364echo "$as_me: error: cannot compute sizeof (short), 77
4365See \`config.log' for more details." >&2;}
4366 { (exit 1); exit 1; }; }
4367fi
4368rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4369fi
4370fi
4371rm -f conftest.val
4372else
4373 ac_cv_sizeof_short=0
4374fi
4375fi
4376echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4377echo "${ECHO_T}$ac_cv_sizeof_short" >&6
4378cat >>confdefs.h <<_ACEOF
4379#define SIZEOF_SHORT $ac_cv_sizeof_short
4380_ACEOF
4381
4382
4383echo "$as_me:$LINENO: checking for int" >&5
4384echo $ECHO_N "checking for int... $ECHO_C" >&6
4385if test "${ac_cv_type_int+set}" = set; then
4386 echo $ECHO_N "(cached) $ECHO_C" >&6
4387else
4388 cat >conftest.$ac_ext <<_ACEOF
4389/* confdefs.h. */
4390_ACEOF
4391cat confdefs.h >>conftest.$ac_ext
4392cat >>conftest.$ac_ext <<_ACEOF
4393/* end confdefs.h. */
4394$ac_includes_default
4395int
4396main ()
4397{
4398if ((int *) 0)
4399 return 0;
4400if (sizeof (int))
4401 return 0;
4402 ;
4403 return 0;
4404}
4405_ACEOF
4406rm -f conftest.$ac_objext
4407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4408 (eval $ac_compile) 2>conftest.er1
4409 ac_status=$?
4410 grep -v '^ *+' conftest.er1 >conftest.err
4411 rm -f conftest.er1
4412 cat conftest.err >&5
4413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4414 (exit $ac_status); } &&
a1286ef5
ZW
4415 { ac_try='test -z "$ac_c_werror_flag"
4416 || test ! -s conftest.err'
bf3b7cd3
JD
4417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4418 (eval $ac_try) 2>&5
4419 ac_status=$?
4420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4421 (exit $ac_status); }; } &&
4422 { ac_try='test -s conftest.$ac_objext'
4423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4424 (eval $ac_try) 2>&5
4425 ac_status=$?
4426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4427 (exit $ac_status); }; }; then
4428 ac_cv_type_int=yes
4429else
4430 echo "$as_me: failed program was:" >&5
4431sed 's/^/| /' conftest.$ac_ext >&5
4432
4433ac_cv_type_int=no
4434fi
4435rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4436fi
4437echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4438echo "${ECHO_T}$ac_cv_type_int" >&6
4439
4440echo "$as_me:$LINENO: checking size of int" >&5
4441echo $ECHO_N "checking size of int... $ECHO_C" >&6
4442if test "${ac_cv_sizeof_int+set}" = set; then
4443 echo $ECHO_N "(cached) $ECHO_C" >&6
4444else
4445 if test "$ac_cv_type_int" = yes; then
4446 # The cast to unsigned long works around a bug in the HP C Compiler
4447 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4448 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4449 # This bug is HP SR number 8606223364.
4450 if test "$cross_compiling" = yes; then
4451 # Depending upon the size, compute the lo and hi bounds.
4452cat >conftest.$ac_ext <<_ACEOF
4453/* confdefs.h. */
4454_ACEOF
4455cat confdefs.h >>conftest.$ac_ext
4456cat >>conftest.$ac_ext <<_ACEOF
4457/* end confdefs.h. */
4458$ac_includes_default
4459int
4460main ()
4461{
4462static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4463test_array [0] = 0
4464
4465 ;
4466 return 0;
4467}
4468_ACEOF
4469rm -f conftest.$ac_objext
4470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4471 (eval $ac_compile) 2>conftest.er1
4472 ac_status=$?
4473 grep -v '^ *+' conftest.er1 >conftest.err
4474 rm -f conftest.er1
4475 cat conftest.err >&5
4476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4477 (exit $ac_status); } &&
a1286ef5
ZW
4478 { ac_try='test -z "$ac_c_werror_flag"
4479 || test ! -s conftest.err'
bf3b7cd3
JD
4480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4481 (eval $ac_try) 2>&5
4482 ac_status=$?
4483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484 (exit $ac_status); }; } &&
4485 { ac_try='test -s conftest.$ac_objext'
4486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4487 (eval $ac_try) 2>&5
4488 ac_status=$?
4489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4490 (exit $ac_status); }; }; then
4491 ac_lo=0 ac_mid=0
4492 while :; do
4493 cat >conftest.$ac_ext <<_ACEOF
4494/* confdefs.h. */
4495_ACEOF
4496cat confdefs.h >>conftest.$ac_ext
4497cat >>conftest.$ac_ext <<_ACEOF
4498/* end confdefs.h. */
4499$ac_includes_default
4500int
4501main ()
4502{
4503static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4504test_array [0] = 0
4505
4506 ;
4507 return 0;
4508}
4509_ACEOF
4510rm -f conftest.$ac_objext
4511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4512 (eval $ac_compile) 2>conftest.er1
4513 ac_status=$?
4514 grep -v '^ *+' conftest.er1 >conftest.err
4515 rm -f conftest.er1
4516 cat conftest.err >&5
4517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4518 (exit $ac_status); } &&
a1286ef5
ZW
4519 { ac_try='test -z "$ac_c_werror_flag"
4520 || test ! -s conftest.err'
bf3b7cd3
JD
4521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4522 (eval $ac_try) 2>&5
4523 ac_status=$?
4524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4525 (exit $ac_status); }; } &&
4526 { ac_try='test -s conftest.$ac_objext'
4527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4528 (eval $ac_try) 2>&5
4529 ac_status=$?
4530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4531 (exit $ac_status); }; }; then
4532 ac_hi=$ac_mid; break
4533else
4534 echo "$as_me: failed program was:" >&5
4535sed 's/^/| /' conftest.$ac_ext >&5
4536
4537ac_lo=`expr $ac_mid + 1`
4538 if test $ac_lo -le $ac_mid; then
4539 ac_lo= ac_hi=
4540 break
4541 fi
4542 ac_mid=`expr 2 '*' $ac_mid + 1`
4543fi
4544rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4545 done
4546else
4547 echo "$as_me: failed program was:" >&5
4548sed 's/^/| /' conftest.$ac_ext >&5
4549
4550cat >conftest.$ac_ext <<_ACEOF
4551/* confdefs.h. */
4552_ACEOF
4553cat confdefs.h >>conftest.$ac_ext
4554cat >>conftest.$ac_ext <<_ACEOF
4555/* end confdefs.h. */
4556$ac_includes_default
4557int
4558main ()
4559{
4560static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4561test_array [0] = 0
4562
4563 ;
4564 return 0;
4565}
4566_ACEOF
4567rm -f conftest.$ac_objext
4568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4569 (eval $ac_compile) 2>conftest.er1
4570 ac_status=$?
4571 grep -v '^ *+' conftest.er1 >conftest.err
4572 rm -f conftest.er1
4573 cat conftest.err >&5
4574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4575 (exit $ac_status); } &&
a1286ef5
ZW
4576 { ac_try='test -z "$ac_c_werror_flag"
4577 || test ! -s conftest.err'
bf3b7cd3
JD
4578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4579 (eval $ac_try) 2>&5
4580 ac_status=$?
4581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4582 (exit $ac_status); }; } &&
4583 { ac_try='test -s conftest.$ac_objext'
4584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4585 (eval $ac_try) 2>&5
4586 ac_status=$?
4587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4588 (exit $ac_status); }; }; then
4589 ac_hi=-1 ac_mid=-1
4590 while :; do
4591 cat >conftest.$ac_ext <<_ACEOF
4592/* confdefs.h. */
4593_ACEOF
4594cat confdefs.h >>conftest.$ac_ext
4595cat >>conftest.$ac_ext <<_ACEOF
4596/* end confdefs.h. */
4597$ac_includes_default
4598int
4599main ()
4600{
4601static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4602test_array [0] = 0
4603
4604 ;
4605 return 0;
4606}
4607_ACEOF
4608rm -f conftest.$ac_objext
4609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4610 (eval $ac_compile) 2>conftest.er1
4611 ac_status=$?
4612 grep -v '^ *+' conftest.er1 >conftest.err
4613 rm -f conftest.er1
4614 cat conftest.err >&5
4615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4616 (exit $ac_status); } &&
a1286ef5
ZW
4617 { ac_try='test -z "$ac_c_werror_flag"
4618 || test ! -s conftest.err'
bf3b7cd3
JD
4619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4620 (eval $ac_try) 2>&5
4621 ac_status=$?
4622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4623 (exit $ac_status); }; } &&
4624 { ac_try='test -s conftest.$ac_objext'
4625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4626 (eval $ac_try) 2>&5
4627 ac_status=$?
4628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4629 (exit $ac_status); }; }; then
4630 ac_lo=$ac_mid; break
4631else
4632 echo "$as_me: failed program was:" >&5
4633sed 's/^/| /' conftest.$ac_ext >&5
4634
4635ac_hi=`expr '(' $ac_mid ')' - 1`
4636 if test $ac_mid -le $ac_hi; then
4637 ac_lo= ac_hi=
4638 break
4639 fi
4640 ac_mid=`expr 2 '*' $ac_mid`
4641fi
4642rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4643 done
4644else
4645 echo "$as_me: failed program was:" >&5
4646sed 's/^/| /' conftest.$ac_ext >&5
4647
4648ac_lo= ac_hi=
4649fi
4650rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4651fi
4652rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4653# Binary search between lo and hi bounds.
4654while test "x$ac_lo" != "x$ac_hi"; do
4655 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4656 cat >conftest.$ac_ext <<_ACEOF
4657/* confdefs.h. */
4658_ACEOF
4659cat confdefs.h >>conftest.$ac_ext
4660cat >>conftest.$ac_ext <<_ACEOF
4661/* end confdefs.h. */
4662$ac_includes_default
4663int
4664main ()
4665{
4666static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4667test_array [0] = 0
4668
4669 ;
4670 return 0;
4671}
4672_ACEOF
4673rm -f conftest.$ac_objext
4674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4675 (eval $ac_compile) 2>conftest.er1
4676 ac_status=$?
4677 grep -v '^ *+' conftest.er1 >conftest.err
4678 rm -f conftest.er1
4679 cat conftest.err >&5
4680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4681 (exit $ac_status); } &&
a1286ef5
ZW
4682 { ac_try='test -z "$ac_c_werror_flag"
4683 || test ! -s conftest.err'
bf3b7cd3
JD
4684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4685 (eval $ac_try) 2>&5
4686 ac_status=$?
4687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4688 (exit $ac_status); }; } &&
4689 { ac_try='test -s conftest.$ac_objext'
4690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4691 (eval $ac_try) 2>&5
4692 ac_status=$?
4693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4694 (exit $ac_status); }; }; then
4695 ac_hi=$ac_mid
4696else
4697 echo "$as_me: failed program was:" >&5
4698sed 's/^/| /' conftest.$ac_ext >&5
4699
4700ac_lo=`expr '(' $ac_mid ')' + 1`
4701fi
4702rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4703done
4704case $ac_lo in
4705?*) ac_cv_sizeof_int=$ac_lo;;
4706'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4707See \`config.log' for more details." >&5
4708echo "$as_me: error: cannot compute sizeof (int), 77
4709See \`config.log' for more details." >&2;}
4710 { (exit 1); exit 1; }; } ;;
4711esac
4712else
4713 if test "$cross_compiling" = yes; then
a1286ef5
ZW
4714 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4715See \`config.log' for more details." >&5
4716echo "$as_me: error: cannot run test program while cross compiling
4717See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4718 { (exit 1); exit 1; }; }
4719else
4720 cat >conftest.$ac_ext <<_ACEOF
4721/* confdefs.h. */
4722_ACEOF
4723cat confdefs.h >>conftest.$ac_ext
4724cat >>conftest.$ac_ext <<_ACEOF
4725/* end confdefs.h. */
4726$ac_includes_default
4727long longval () { return (long) (sizeof (int)); }
4728unsigned long ulongval () { return (long) (sizeof (int)); }
4729#include <stdio.h>
4730#include <stdlib.h>
4731int
4732main ()
4733{
4734
4735 FILE *f = fopen ("conftest.val", "w");
4736 if (! f)
4737 exit (1);
4738 if (((long) (sizeof (int))) < 0)
4739 {
4740 long i = longval ();
4741 if (i != ((long) (sizeof (int))))
4742 exit (1);
4743 fprintf (f, "%ld\n", i);
4744 }
4745 else
4746 {
4747 unsigned long i = ulongval ();
4748 if (i != ((long) (sizeof (int))))
4749 exit (1);
4750 fprintf (f, "%lu\n", i);
4751 }
4752 exit (ferror (f) || fclose (f) != 0);
4753
4754 ;
4755 return 0;
4756}
4757_ACEOF
4758rm -f conftest$ac_exeext
4759if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4760 (eval $ac_link) 2>&5
4761 ac_status=$?
4762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4763 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4765 (eval $ac_try) 2>&5
4766 ac_status=$?
4767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4768 (exit $ac_status); }; }; then
4769 ac_cv_sizeof_int=`cat conftest.val`
4770else
4771 echo "$as_me: program exited with status $ac_status" >&5
4772echo "$as_me: failed program was:" >&5
4773sed 's/^/| /' conftest.$ac_ext >&5
4774
4775( exit $ac_status )
4776{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4777See \`config.log' for more details." >&5
4778echo "$as_me: error: cannot compute sizeof (int), 77
4779See \`config.log' for more details." >&2;}
4780 { (exit 1); exit 1; }; }
4781fi
4782rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4783fi
4784fi
4785rm -f conftest.val
4786else
4787 ac_cv_sizeof_int=0
4788fi
4789fi
4790echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4791echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4792cat >>confdefs.h <<_ACEOF
4793#define SIZEOF_INT $ac_cv_sizeof_int
4794_ACEOF
4795
4796
4797echo "$as_me:$LINENO: checking for long" >&5
4798echo $ECHO_N "checking for long... $ECHO_C" >&6
4799if test "${ac_cv_type_long+set}" = set; then
4800 echo $ECHO_N "(cached) $ECHO_C" >&6
4801else
4802 cat >conftest.$ac_ext <<_ACEOF
4803/* confdefs.h. */
4804_ACEOF
4805cat confdefs.h >>conftest.$ac_ext
4806cat >>conftest.$ac_ext <<_ACEOF
4807/* end confdefs.h. */
4808$ac_includes_default
4809int
4810main ()
4811{
4812if ((long *) 0)
4813 return 0;
4814if (sizeof (long))
4815 return 0;
4816 ;
4817 return 0;
4818}
4819_ACEOF
4820rm -f conftest.$ac_objext
4821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4822 (eval $ac_compile) 2>conftest.er1
4823 ac_status=$?
4824 grep -v '^ *+' conftest.er1 >conftest.err
4825 rm -f conftest.er1
4826 cat conftest.err >&5
4827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4828 (exit $ac_status); } &&
a1286ef5
ZW
4829 { ac_try='test -z "$ac_c_werror_flag"
4830 || test ! -s conftest.err'
bf3b7cd3
JD
4831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4832 (eval $ac_try) 2>&5
4833 ac_status=$?
4834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4835 (exit $ac_status); }; } &&
4836 { ac_try='test -s conftest.$ac_objext'
4837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4838 (eval $ac_try) 2>&5
4839 ac_status=$?
4840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4841 (exit $ac_status); }; }; then
4842 ac_cv_type_long=yes
4843else
4844 echo "$as_me: failed program was:" >&5
4845sed 's/^/| /' conftest.$ac_ext >&5
4846
4847ac_cv_type_long=no
4848fi
4849rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4850fi
4851echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4852echo "${ECHO_T}$ac_cv_type_long" >&6
4853
4854echo "$as_me:$LINENO: checking size of long" >&5
4855echo $ECHO_N "checking size of long... $ECHO_C" >&6
4856if test "${ac_cv_sizeof_long+set}" = set; then
4857 echo $ECHO_N "(cached) $ECHO_C" >&6
4858else
4859 if test "$ac_cv_type_long" = yes; then
4860 # The cast to unsigned long works around a bug in the HP C Compiler
4861 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4862 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4863 # This bug is HP SR number 8606223364.
4864 if test "$cross_compiling" = yes; then
4865 # Depending upon the size, compute the lo and hi bounds.
4866cat >conftest.$ac_ext <<_ACEOF
4867/* confdefs.h. */
4868_ACEOF
4869cat confdefs.h >>conftest.$ac_ext
4870cat >>conftest.$ac_ext <<_ACEOF
4871/* end confdefs.h. */
4872$ac_includes_default
4873int
4874main ()
4875{
4876static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
4877test_array [0] = 0
4878
4879 ;
4880 return 0;
4881}
4882_ACEOF
4883rm -f conftest.$ac_objext
4884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4885 (eval $ac_compile) 2>conftest.er1
4886 ac_status=$?
4887 grep -v '^ *+' conftest.er1 >conftest.err
4888 rm -f conftest.er1
4889 cat conftest.err >&5
4890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4891 (exit $ac_status); } &&
a1286ef5
ZW
4892 { ac_try='test -z "$ac_c_werror_flag"
4893 || test ! -s conftest.err'
bf3b7cd3
JD
4894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4895 (eval $ac_try) 2>&5
4896 ac_status=$?
4897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4898 (exit $ac_status); }; } &&
4899 { ac_try='test -s conftest.$ac_objext'
4900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4901 (eval $ac_try) 2>&5
4902 ac_status=$?
4903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4904 (exit $ac_status); }; }; then
4905 ac_lo=0 ac_mid=0
4906 while :; do
4907 cat >conftest.$ac_ext <<_ACEOF
4908/* confdefs.h. */
4909_ACEOF
4910cat confdefs.h >>conftest.$ac_ext
4911cat >>conftest.$ac_ext <<_ACEOF
4912/* end confdefs.h. */
4913$ac_includes_default
4914int
4915main ()
4916{
4917static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4918test_array [0] = 0
4919
4920 ;
4921 return 0;
4922}
4923_ACEOF
4924rm -f conftest.$ac_objext
4925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4926 (eval $ac_compile) 2>conftest.er1
4927 ac_status=$?
4928 grep -v '^ *+' conftest.er1 >conftest.err
4929 rm -f conftest.er1
4930 cat conftest.err >&5
4931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4932 (exit $ac_status); } &&
a1286ef5
ZW
4933 { ac_try='test -z "$ac_c_werror_flag"
4934 || test ! -s conftest.err'
bf3b7cd3
JD
4935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4936 (eval $ac_try) 2>&5
4937 ac_status=$?
4938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4939 (exit $ac_status); }; } &&
4940 { ac_try='test -s conftest.$ac_objext'
4941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4942 (eval $ac_try) 2>&5
4943 ac_status=$?
4944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4945 (exit $ac_status); }; }; then
4946 ac_hi=$ac_mid; break
4947else
4948 echo "$as_me: failed program was:" >&5
4949sed 's/^/| /' conftest.$ac_ext >&5
4950
4951ac_lo=`expr $ac_mid + 1`
4952 if test $ac_lo -le $ac_mid; then
4953 ac_lo= ac_hi=
4954 break
4955 fi
4956 ac_mid=`expr 2 '*' $ac_mid + 1`
4957fi
4958rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4959 done
4960else
4961 echo "$as_me: failed program was:" >&5
4962sed 's/^/| /' conftest.$ac_ext >&5
4963
4964cat >conftest.$ac_ext <<_ACEOF
4965/* confdefs.h. */
4966_ACEOF
4967cat confdefs.h >>conftest.$ac_ext
4968cat >>conftest.$ac_ext <<_ACEOF
4969/* end confdefs.h. */
4970$ac_includes_default
4971int
4972main ()
4973{
4974static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
4975test_array [0] = 0
4976
4977 ;
4978 return 0;
4979}
4980_ACEOF
4981rm -f conftest.$ac_objext
4982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4983 (eval $ac_compile) 2>conftest.er1
4984 ac_status=$?
4985 grep -v '^ *+' conftest.er1 >conftest.err
4986 rm -f conftest.er1
4987 cat conftest.err >&5
4988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4989 (exit $ac_status); } &&
a1286ef5
ZW
4990 { ac_try='test -z "$ac_c_werror_flag"
4991 || test ! -s conftest.err'
bf3b7cd3
JD
4992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4993 (eval $ac_try) 2>&5
4994 ac_status=$?
4995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4996 (exit $ac_status); }; } &&
4997 { ac_try='test -s conftest.$ac_objext'
4998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4999 (eval $ac_try) 2>&5
5000 ac_status=$?
5001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5002 (exit $ac_status); }; }; then
5003 ac_hi=-1 ac_mid=-1
5004 while :; do
5005 cat >conftest.$ac_ext <<_ACEOF
5006/* confdefs.h. */
5007_ACEOF
5008cat confdefs.h >>conftest.$ac_ext
5009cat >>conftest.$ac_ext <<_ACEOF
5010/* end confdefs.h. */
5011$ac_includes_default
5012int
5013main ()
5014{
5015static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5016test_array [0] = 0
5017
5018 ;
5019 return 0;
5020}
5021_ACEOF
5022rm -f conftest.$ac_objext
5023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5024 (eval $ac_compile) 2>conftest.er1
5025 ac_status=$?
5026 grep -v '^ *+' conftest.er1 >conftest.err
5027 rm -f conftest.er1
5028 cat conftest.err >&5
5029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5030 (exit $ac_status); } &&
a1286ef5
ZW
5031 { ac_try='test -z "$ac_c_werror_flag"
5032 || test ! -s conftest.err'
bf3b7cd3
JD
5033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5034 (eval $ac_try) 2>&5
5035 ac_status=$?
5036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5037 (exit $ac_status); }; } &&
5038 { ac_try='test -s conftest.$ac_objext'
5039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5040 (eval $ac_try) 2>&5
5041 ac_status=$?
5042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5043 (exit $ac_status); }; }; then
5044 ac_lo=$ac_mid; break
5045else
5046 echo "$as_me: failed program was:" >&5
5047sed 's/^/| /' conftest.$ac_ext >&5
5048
5049ac_hi=`expr '(' $ac_mid ')' - 1`
5050 if test $ac_mid -le $ac_hi; then
5051 ac_lo= ac_hi=
5052 break
5053 fi
5054 ac_mid=`expr 2 '*' $ac_mid`
5055fi
5056rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5057 done
5058else
5059 echo "$as_me: failed program was:" >&5
5060sed 's/^/| /' conftest.$ac_ext >&5
5061
5062ac_lo= ac_hi=
5063fi
5064rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5065fi
5066rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5067# Binary search between lo and hi bounds.
5068while test "x$ac_lo" != "x$ac_hi"; do
5069 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5070 cat >conftest.$ac_ext <<_ACEOF
5071/* confdefs.h. */
5072_ACEOF
5073cat confdefs.h >>conftest.$ac_ext
5074cat >>conftest.$ac_ext <<_ACEOF
5075/* end confdefs.h. */
5076$ac_includes_default
5077int
5078main ()
5079{
5080static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5081test_array [0] = 0
5082
5083 ;
5084 return 0;
5085}
5086_ACEOF
5087rm -f conftest.$ac_objext
5088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5089 (eval $ac_compile) 2>conftest.er1
5090 ac_status=$?
5091 grep -v '^ *+' conftest.er1 >conftest.err
5092 rm -f conftest.er1
5093 cat conftest.err >&5
5094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5095 (exit $ac_status); } &&
a1286ef5
ZW
5096 { ac_try='test -z "$ac_c_werror_flag"
5097 || test ! -s conftest.err'
bf3b7cd3
JD
5098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5099 (eval $ac_try) 2>&5
5100 ac_status=$?
5101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5102 (exit $ac_status); }; } &&
5103 { ac_try='test -s conftest.$ac_objext'
5104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5105 (eval $ac_try) 2>&5
5106 ac_status=$?
5107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5108 (exit $ac_status); }; }; then
5109 ac_hi=$ac_mid
5110else
5111 echo "$as_me: failed program was:" >&5
5112sed 's/^/| /' conftest.$ac_ext >&5
5113
5114ac_lo=`expr '(' $ac_mid ')' + 1`
5115fi
5116rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5117done
5118case $ac_lo in
5119?*) ac_cv_sizeof_long=$ac_lo;;
5120'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5121See \`config.log' for more details." >&5
5122echo "$as_me: error: cannot compute sizeof (long), 77
5123See \`config.log' for more details." >&2;}
5124 { (exit 1); exit 1; }; } ;;
5125esac
5126else
5127 if test "$cross_compiling" = yes; then
a1286ef5
ZW
5128 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5129See \`config.log' for more details." >&5
5130echo "$as_me: error: cannot run test program while cross compiling
5131See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5132 { (exit 1); exit 1; }; }
5133else
5134 cat >conftest.$ac_ext <<_ACEOF
5135/* confdefs.h. */
5136_ACEOF
5137cat confdefs.h >>conftest.$ac_ext
5138cat >>conftest.$ac_ext <<_ACEOF
5139/* end confdefs.h. */
5140$ac_includes_default
5141long longval () { return (long) (sizeof (long)); }
5142unsigned long ulongval () { return (long) (sizeof (long)); }
5143#include <stdio.h>
5144#include <stdlib.h>
5145int
5146main ()
5147{
5148
5149 FILE *f = fopen ("conftest.val", "w");
5150 if (! f)
5151 exit (1);
5152 if (((long) (sizeof (long))) < 0)
5153 {
5154 long i = longval ();
5155 if (i != ((long) (sizeof (long))))
5156 exit (1);
5157 fprintf (f, "%ld\n", i);
5158 }
5159 else
5160 {
5161 unsigned long i = ulongval ();
5162 if (i != ((long) (sizeof (long))))
5163 exit (1);
5164 fprintf (f, "%lu\n", i);
5165 }
5166 exit (ferror (f) || fclose (f) != 0);
5167
5168 ;
5169 return 0;
5170}
5171_ACEOF
5172rm -f conftest$ac_exeext
5173if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5174 (eval $ac_link) 2>&5
5175 ac_status=$?
5176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5177 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5179 (eval $ac_try) 2>&5
5180 ac_status=$?
5181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5182 (exit $ac_status); }; }; then
5183 ac_cv_sizeof_long=`cat conftest.val`
5184else
5185 echo "$as_me: program exited with status $ac_status" >&5
5186echo "$as_me: failed program was:" >&5
5187sed 's/^/| /' conftest.$ac_ext >&5
5188
5189( exit $ac_status )
5190{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5191See \`config.log' for more details." >&5
5192echo "$as_me: error: cannot compute sizeof (long), 77
5193See \`config.log' for more details." >&2;}
5194 { (exit 1); exit 1; }; }
5195fi
5196rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5197fi
5198fi
5199rm -f conftest.val
5200else
5201 ac_cv_sizeof_long=0
5202fi
5203fi
5204echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5205echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5206cat >>confdefs.h <<_ACEOF
5207#define SIZEOF_LONG $ac_cv_sizeof_long
5208_ACEOF
5209
5210
5211if test $ac_cv_c_long_long = yes; then
5212 echo "$as_me:$LINENO: checking for long long" >&5
5213echo $ECHO_N "checking for long long... $ECHO_C" >&6
5214if test "${ac_cv_type_long_long+set}" = set; then
5215 echo $ECHO_N "(cached) $ECHO_C" >&6
5216else
5217 cat >conftest.$ac_ext <<_ACEOF
5218/* confdefs.h. */
5219_ACEOF
5220cat confdefs.h >>conftest.$ac_ext
5221cat >>conftest.$ac_ext <<_ACEOF
5222/* end confdefs.h. */
5223$ac_includes_default
5224int
5225main ()
5226{
5227if ((long long *) 0)
5228 return 0;
5229if (sizeof (long long))
5230 return 0;
5231 ;
5232 return 0;
5233}
5234_ACEOF
5235rm -f conftest.$ac_objext
5236if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5237 (eval $ac_compile) 2>conftest.er1
5238 ac_status=$?
5239 grep -v '^ *+' conftest.er1 >conftest.err
5240 rm -f conftest.er1
5241 cat conftest.err >&5
5242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5243 (exit $ac_status); } &&
a1286ef5
ZW
5244 { ac_try='test -z "$ac_c_werror_flag"
5245 || test ! -s conftest.err'
bf3b7cd3
JD
5246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5247 (eval $ac_try) 2>&5
5248 ac_status=$?
5249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5250 (exit $ac_status); }; } &&
5251 { ac_try='test -s conftest.$ac_objext'
5252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5253 (eval $ac_try) 2>&5
5254 ac_status=$?
5255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5256 (exit $ac_status); }; }; then
5257 ac_cv_type_long_long=yes
5258else
5259 echo "$as_me: failed program was:" >&5
5260sed 's/^/| /' conftest.$ac_ext >&5
5261
5262ac_cv_type_long_long=no
5263fi
5264rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5265fi
5266echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5267echo "${ECHO_T}$ac_cv_type_long_long" >&6
5268
5269echo "$as_me:$LINENO: checking size of long long" >&5
5270echo $ECHO_N "checking size of long long... $ECHO_C" >&6
5271if test "${ac_cv_sizeof_long_long+set}" = set; then
5272 echo $ECHO_N "(cached) $ECHO_C" >&6
5273else
5274 if test "$ac_cv_type_long_long" = yes; then
5275 # The cast to unsigned long works around a bug in the HP C Compiler
5276 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5277 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5278 # This bug is HP SR number 8606223364.
5279 if test "$cross_compiling" = yes; then
5280 # Depending upon the size, compute the lo and hi bounds.
5281cat >conftest.$ac_ext <<_ACEOF
5282/* confdefs.h. */
5283_ACEOF
5284cat confdefs.h >>conftest.$ac_ext
5285cat >>conftest.$ac_ext <<_ACEOF
5286/* end confdefs.h. */
5287$ac_includes_default
5288int
5289main ()
5290{
5291static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
5292test_array [0] = 0
5293
5294 ;
5295 return 0;
5296}
5297_ACEOF
5298rm -f conftest.$ac_objext
5299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5300 (eval $ac_compile) 2>conftest.er1
5301 ac_status=$?
5302 grep -v '^ *+' conftest.er1 >conftest.err
5303 rm -f conftest.er1
5304 cat conftest.err >&5
5305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5306 (exit $ac_status); } &&
a1286ef5
ZW
5307 { ac_try='test -z "$ac_c_werror_flag"
5308 || test ! -s conftest.err'
bf3b7cd3
JD
5309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5310 (eval $ac_try) 2>&5
5311 ac_status=$?
5312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5313 (exit $ac_status); }; } &&
5314 { ac_try='test -s conftest.$ac_objext'
5315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5316 (eval $ac_try) 2>&5
5317 ac_status=$?
5318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5319 (exit $ac_status); }; }; then
5320 ac_lo=0 ac_mid=0
5321 while :; do
5322 cat >conftest.$ac_ext <<_ACEOF
5323/* confdefs.h. */
5324_ACEOF
5325cat confdefs.h >>conftest.$ac_ext
5326cat >>conftest.$ac_ext <<_ACEOF
5327/* end confdefs.h. */
5328$ac_includes_default
5329int
5330main ()
5331{
5332static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5333test_array [0] = 0
5334
5335 ;
5336 return 0;
5337}
5338_ACEOF
5339rm -f conftest.$ac_objext
5340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5341 (eval $ac_compile) 2>conftest.er1
5342 ac_status=$?
5343 grep -v '^ *+' conftest.er1 >conftest.err
5344 rm -f conftest.er1
5345 cat conftest.err >&5
5346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5347 (exit $ac_status); } &&
a1286ef5
ZW
5348 { ac_try='test -z "$ac_c_werror_flag"
5349 || test ! -s conftest.err'
bf3b7cd3
JD
5350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5351 (eval $ac_try) 2>&5
5352 ac_status=$?
5353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5354 (exit $ac_status); }; } &&
5355 { ac_try='test -s conftest.$ac_objext'
5356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5357 (eval $ac_try) 2>&5
5358 ac_status=$?
5359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5360 (exit $ac_status); }; }; then
5361 ac_hi=$ac_mid; break
5362else
5363 echo "$as_me: failed program was:" >&5
5364sed 's/^/| /' conftest.$ac_ext >&5
5365
5366ac_lo=`expr $ac_mid + 1`
5367 if test $ac_lo -le $ac_mid; then
5368 ac_lo= ac_hi=
5369 break
5370 fi
5371 ac_mid=`expr 2 '*' $ac_mid + 1`
5372fi
5373rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5374 done
5375else
5376 echo "$as_me: failed program was:" >&5
5377sed 's/^/| /' conftest.$ac_ext >&5
5378
5379cat >conftest.$ac_ext <<_ACEOF
5380/* confdefs.h. */
5381_ACEOF
5382cat confdefs.h >>conftest.$ac_ext
5383cat >>conftest.$ac_ext <<_ACEOF
5384/* end confdefs.h. */
5385$ac_includes_default
5386int
5387main ()
5388{
5389static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
5390test_array [0] = 0
5391
5392 ;
5393 return 0;
5394}
5395_ACEOF
5396rm -f conftest.$ac_objext
5397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5398 (eval $ac_compile) 2>conftest.er1
5399 ac_status=$?
5400 grep -v '^ *+' conftest.er1 >conftest.err
5401 rm -f conftest.er1
5402 cat conftest.err >&5
5403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5404 (exit $ac_status); } &&
a1286ef5
ZW
5405 { ac_try='test -z "$ac_c_werror_flag"
5406 || test ! -s conftest.err'
bf3b7cd3
JD
5407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5408 (eval $ac_try) 2>&5
5409 ac_status=$?
5410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5411 (exit $ac_status); }; } &&
5412 { ac_try='test -s conftest.$ac_objext'
5413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5414 (eval $ac_try) 2>&5
5415 ac_status=$?
5416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5417 (exit $ac_status); }; }; then
5418 ac_hi=-1 ac_mid=-1
5419 while :; do
5420 cat >conftest.$ac_ext <<_ACEOF
5421/* confdefs.h. */
5422_ACEOF
5423cat confdefs.h >>conftest.$ac_ext
5424cat >>conftest.$ac_ext <<_ACEOF
5425/* end confdefs.h. */
5426$ac_includes_default
5427int
5428main ()
5429{
5430static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
5431test_array [0] = 0
5432
5433 ;
5434 return 0;
5435}
5436_ACEOF
5437rm -f conftest.$ac_objext
5438if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5439 (eval $ac_compile) 2>conftest.er1
5440 ac_status=$?
5441 grep -v '^ *+' conftest.er1 >conftest.err
5442 rm -f conftest.er1
5443 cat conftest.err >&5
5444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5445 (exit $ac_status); } &&
a1286ef5
ZW
5446 { ac_try='test -z "$ac_c_werror_flag"
5447 || test ! -s conftest.err'
bf3b7cd3
JD
5448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5449 (eval $ac_try) 2>&5
5450 ac_status=$?
5451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5452 (exit $ac_status); }; } &&
5453 { ac_try='test -s conftest.$ac_objext'
5454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5455 (eval $ac_try) 2>&5
5456 ac_status=$?
5457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5458 (exit $ac_status); }; }; then
5459 ac_lo=$ac_mid; break
5460else
5461 echo "$as_me: failed program was:" >&5
5462sed 's/^/| /' conftest.$ac_ext >&5
5463
5464ac_hi=`expr '(' $ac_mid ')' - 1`
5465 if test $ac_mid -le $ac_hi; then
5466 ac_lo= ac_hi=
5467 break
5468 fi
5469 ac_mid=`expr 2 '*' $ac_mid`
5470fi
5471rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5472 done
5473else
5474 echo "$as_me: failed program was:" >&5
5475sed 's/^/| /' conftest.$ac_ext >&5
5476
5477ac_lo= ac_hi=
5478fi
5479rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5480fi
5481rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5482# Binary search between lo and hi bounds.
5483while test "x$ac_lo" != "x$ac_hi"; do
5484 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5485 cat >conftest.$ac_ext <<_ACEOF
5486/* confdefs.h. */
5487_ACEOF
5488cat confdefs.h >>conftest.$ac_ext
5489cat >>conftest.$ac_ext <<_ACEOF
5490/* end confdefs.h. */
5491$ac_includes_default
5492int
5493main ()
5494{
5495static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5496test_array [0] = 0
5497
5498 ;
5499 return 0;
5500}
5501_ACEOF
5502rm -f conftest.$ac_objext
5503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5504 (eval $ac_compile) 2>conftest.er1
5505 ac_status=$?
5506 grep -v '^ *+' conftest.er1 >conftest.err
5507 rm -f conftest.er1
5508 cat conftest.err >&5
5509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5510 (exit $ac_status); } &&
a1286ef5
ZW
5511 { ac_try='test -z "$ac_c_werror_flag"
5512 || test ! -s conftest.err'
bf3b7cd3
JD
5513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5514 (eval $ac_try) 2>&5
5515 ac_status=$?
5516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5517 (exit $ac_status); }; } &&
5518 { ac_try='test -s conftest.$ac_objext'
5519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5520 (eval $ac_try) 2>&5
5521 ac_status=$?
5522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5523 (exit $ac_status); }; }; then
5524 ac_hi=$ac_mid
5525else
5526 echo "$as_me: failed program was:" >&5
5527sed 's/^/| /' conftest.$ac_ext >&5
5528
5529ac_lo=`expr '(' $ac_mid ')' + 1`
5530fi
5531rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5532done
5533case $ac_lo in
5534?*) ac_cv_sizeof_long_long=$ac_lo;;
5535'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5536See \`config.log' for more details." >&5
5537echo "$as_me: error: cannot compute sizeof (long long), 77
5538See \`config.log' for more details." >&2;}
5539 { (exit 1); exit 1; }; } ;;
5540esac
5541else
5542 if test "$cross_compiling" = yes; then
a1286ef5
ZW
5543 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5544See \`config.log' for more details." >&5
5545echo "$as_me: error: cannot run test program while cross compiling
5546See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5547 { (exit 1); exit 1; }; }
5548else
5549 cat >conftest.$ac_ext <<_ACEOF
5550/* confdefs.h. */
5551_ACEOF
5552cat confdefs.h >>conftest.$ac_ext
5553cat >>conftest.$ac_ext <<_ACEOF
5554/* end confdefs.h. */
5555$ac_includes_default
5556long longval () { return (long) (sizeof (long long)); }
5557unsigned long ulongval () { return (long) (sizeof (long long)); }
5558#include <stdio.h>
5559#include <stdlib.h>
5560int
5561main ()
5562{
5563
5564 FILE *f = fopen ("conftest.val", "w");
5565 if (! f)
5566 exit (1);
5567 if (((long) (sizeof (long long))) < 0)
5568 {
5569 long i = longval ();
5570 if (i != ((long) (sizeof (long long))))
5571 exit (1);
5572 fprintf (f, "%ld\n", i);
5573 }
5574 else
5575 {
5576 unsigned long i = ulongval ();
5577 if (i != ((long) (sizeof (long long))))
5578 exit (1);
5579 fprintf (f, "%lu\n", i);
5580 }
5581 exit (ferror (f) || fclose (f) != 0);
5582
5583 ;
5584 return 0;
5585}
5586_ACEOF
5587rm -f conftest$ac_exeext
5588if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5589 (eval $ac_link) 2>&5
5590 ac_status=$?
5591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5592 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5594 (eval $ac_try) 2>&5
5595 ac_status=$?
5596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5597 (exit $ac_status); }; }; then
5598 ac_cv_sizeof_long_long=`cat conftest.val`
5599else
5600 echo "$as_me: program exited with status $ac_status" >&5
5601echo "$as_me: failed program was:" >&5
5602sed 's/^/| /' conftest.$ac_ext >&5
5603
5604( exit $ac_status )
5605{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5606See \`config.log' for more details." >&5
5607echo "$as_me: error: cannot compute sizeof (long long), 77
5608See \`config.log' for more details." >&2;}
5609 { (exit 1); exit 1; }; }
5610fi
5611rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5612fi
5613fi
5614rm -f conftest.val
5615else
5616 ac_cv_sizeof_long_long=0
5617fi
5618fi
5619echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5620echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
5621cat >>confdefs.h <<_ACEOF
5622#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5623_ACEOF
5624
5625
5626fi
5627if test $ac_cv_c___int64 = yes; then
5628 echo "$as_me:$LINENO: checking for __int64" >&5
5629echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5630if test "${ac_cv_type___int64+set}" = set; then
5631 echo $ECHO_N "(cached) $ECHO_C" >&6
5632else
ba479fd2 5633 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5634/* confdefs.h. */
5635_ACEOF
5636cat confdefs.h >>conftest.$ac_ext
5637cat >>conftest.$ac_ext <<_ACEOF
5638/* end confdefs.h. */
bf3b7cd3 5639$ac_includes_default
ba479fd2
NN
5640int
5641main ()
5642{
bf3b7cd3
JD
5643if ((__int64 *) 0)
5644 return 0;
5645if (sizeof (__int64))
5646 return 0;
ba479fd2
NN
5647 ;
5648 return 0;
5649}
5650_ACEOF
5651rm -f conftest.$ac_objext
5652if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5653 (eval $ac_compile) 2>conftest.er1
ba479fd2 5654 ac_status=$?
86da66b5
HPN
5655 grep -v '^ *+' conftest.er1 >conftest.err
5656 rm -f conftest.er1
5657 cat conftest.err >&5
ba479fd2
NN
5658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5659 (exit $ac_status); } &&
a1286ef5
ZW
5660 { ac_try='test -z "$ac_c_werror_flag"
5661 || test ! -s conftest.err'
86da66b5
HPN
5662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5663 (eval $ac_try) 2>&5
5664 ac_status=$?
5665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5666 (exit $ac_status); }; } &&
5667 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5669 (eval $ac_try) 2>&5
5670 ac_status=$?
5671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5672 (exit $ac_status); }; }; then
bf3b7cd3 5673 ac_cv_type___int64=yes
75b6f3fd 5674else
ba479fd2
NN
5675 echo "$as_me: failed program was:" >&5
5676sed 's/^/| /' conftest.$ac_ext >&5
5677
bf3b7cd3 5678ac_cv_type___int64=no
75b6f3fd 5679fi
86da66b5 5680rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5681fi
bf3b7cd3
JD
5682echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5683echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 5684
bf3b7cd3
JD
5685echo "$as_me:$LINENO: checking size of __int64" >&5
5686echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
5687if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 5688 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 5689else
bf3b7cd3
JD
5690 if test "$ac_cv_type___int64" = yes; then
5691 # The cast to unsigned long works around a bug in the HP C Compiler
5692 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5693 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5694 # This bug is HP SR number 8606223364.
5695 if test "$cross_compiling" = yes; then
5696 # Depending upon the size, compute the lo and hi bounds.
5697cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5698/* confdefs.h. */
5699_ACEOF
5700cat confdefs.h >>conftest.$ac_ext
5701cat >>conftest.$ac_ext <<_ACEOF
5702/* end confdefs.h. */
bf3b7cd3 5703$ac_includes_default
ba479fd2
NN
5704int
5705main ()
5706{
bf3b7cd3
JD
5707static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
5708test_array [0] = 0
5709
ba479fd2
NN
5710 ;
5711 return 0;
5712}
5713_ACEOF
5714rm -f conftest.$ac_objext
5715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5716 (eval $ac_compile) 2>conftest.er1
ba479fd2 5717 ac_status=$?
86da66b5
HPN
5718 grep -v '^ *+' conftest.er1 >conftest.err
5719 rm -f conftest.er1
5720 cat conftest.err >&5
ba479fd2
NN
5721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5722 (exit $ac_status); } &&
a1286ef5
ZW
5723 { ac_try='test -z "$ac_c_werror_flag"
5724 || test ! -s conftest.err'
86da66b5
HPN
5725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5726 (eval $ac_try) 2>&5
5727 ac_status=$?
5728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5729 (exit $ac_status); }; } &&
5730 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5732 (eval $ac_try) 2>&5
5733 ac_status=$?
5734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5735 (exit $ac_status); }; }; then
bf3b7cd3
JD
5736 ac_lo=0 ac_mid=0
5737 while :; do
5738 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5739/* confdefs.h. */
5740_ACEOF
5741cat confdefs.h >>conftest.$ac_ext
5742cat >>conftest.$ac_ext <<_ACEOF
5743/* end confdefs.h. */
bf3b7cd3 5744$ac_includes_default
ba479fd2
NN
5745int
5746main ()
5747{
bf3b7cd3
JD
5748static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5749test_array [0] = 0
5750
ba479fd2
NN
5751 ;
5752 return 0;
5753}
5754_ACEOF
5755rm -f conftest.$ac_objext
5756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5757 (eval $ac_compile) 2>conftest.er1
ba479fd2 5758 ac_status=$?
86da66b5
HPN
5759 grep -v '^ *+' conftest.er1 >conftest.err
5760 rm -f conftest.er1
5761 cat conftest.err >&5
ba479fd2
NN
5762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5763 (exit $ac_status); } &&
a1286ef5
ZW
5764 { ac_try='test -z "$ac_c_werror_flag"
5765 || test ! -s conftest.err'
86da66b5
HPN
5766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5767 (eval $ac_try) 2>&5
5768 ac_status=$?
5769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5770 (exit $ac_status); }; } &&
5771 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5773 (eval $ac_try) 2>&5
5774 ac_status=$?
5775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5776 (exit $ac_status); }; }; then
bf3b7cd3 5777 ac_hi=$ac_mid; break
75e93faa 5778else
ba479fd2
NN
5779 echo "$as_me: failed program was:" >&5
5780sed 's/^/| /' conftest.$ac_ext >&5
5781
bf3b7cd3
JD
5782ac_lo=`expr $ac_mid + 1`
5783 if test $ac_lo -le $ac_mid; then
5784 ac_lo= ac_hi=
5785 break
5786 fi
5787 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 5788fi
86da66b5 5789rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5790 done
75e93faa 5791else
bf3b7cd3
JD
5792 echo "$as_me: failed program was:" >&5
5793sed 's/^/| /' conftest.$ac_ext >&5
5794
5795cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5796/* confdefs.h. */
5797_ACEOF
5798cat confdefs.h >>conftest.$ac_ext
5799cat >>conftest.$ac_ext <<_ACEOF
5800/* end confdefs.h. */
bf3b7cd3 5801$ac_includes_default
ba479fd2
NN
5802int
5803main ()
5804{
bf3b7cd3
JD
5805static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
5806test_array [0] = 0
5807
ba479fd2
NN
5808 ;
5809 return 0;
5810}
5811_ACEOF
5812rm -f conftest.$ac_objext
5813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5814 (eval $ac_compile) 2>conftest.er1
ba479fd2 5815 ac_status=$?
86da66b5
HPN
5816 grep -v '^ *+' conftest.er1 >conftest.err
5817 rm -f conftest.er1
5818 cat conftest.err >&5
ba479fd2
NN
5819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820 (exit $ac_status); } &&
a1286ef5
ZW
5821 { ac_try='test -z "$ac_c_werror_flag"
5822 || test ! -s conftest.err'
86da66b5
HPN
5823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5824 (eval $ac_try) 2>&5
5825 ac_status=$?
5826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5827 (exit $ac_status); }; } &&
5828 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5830 (eval $ac_try) 2>&5
5831 ac_status=$?
5832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5833 (exit $ac_status); }; }; then
bf3b7cd3
JD
5834 ac_hi=-1 ac_mid=-1
5835 while :; do
5836 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5837/* confdefs.h. */
5838_ACEOF
5839cat confdefs.h >>conftest.$ac_ext
5840cat >>conftest.$ac_ext <<_ACEOF
5841/* end confdefs.h. */
bf3b7cd3 5842$ac_includes_default
ba479fd2
NN
5843int
5844main ()
5845{
bf3b7cd3
JD
5846static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
5847test_array [0] = 0
5848
ba479fd2
NN
5849 ;
5850 return 0;
5851}
5852_ACEOF
5853rm -f conftest.$ac_objext
5854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5855 (eval $ac_compile) 2>conftest.er1
ba479fd2 5856 ac_status=$?
86da66b5
HPN
5857 grep -v '^ *+' conftest.er1 >conftest.err
5858 rm -f conftest.er1
5859 cat conftest.err >&5
ba479fd2
NN
5860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5861 (exit $ac_status); } &&
a1286ef5
ZW
5862 { ac_try='test -z "$ac_c_werror_flag"
5863 || test ! -s conftest.err'
86da66b5
HPN
5864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5865 (eval $ac_try) 2>&5
5866 ac_status=$?
5867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5868 (exit $ac_status); }; } &&
5869 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5871 (eval $ac_try) 2>&5
5872 ac_status=$?
5873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5874 (exit $ac_status); }; }; then
bf3b7cd3 5875 ac_lo=$ac_mid; break
04cabffc 5876else
ba479fd2
NN
5877 echo "$as_me: failed program was:" >&5
5878sed 's/^/| /' conftest.$ac_ext >&5
5879
bf3b7cd3
JD
5880ac_hi=`expr '(' $ac_mid ')' - 1`
5881 if test $ac_mid -le $ac_hi; then
5882 ac_lo= ac_hi=
5883 break
5884 fi
5885 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 5886fi
86da66b5 5887rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5888 done
5889else
5890 echo "$as_me: failed program was:" >&5
5891sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 5892
bf3b7cd3 5893ac_lo= ac_hi=
414d23ae 5894fi
bf3b7cd3 5895rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5896fi
bf3b7cd3
JD
5897rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5898# Binary search between lo and hi bounds.
5899while test "x$ac_lo" != "x$ac_hi"; do
5900 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 5901 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5902/* confdefs.h. */
5903_ACEOF
5904cat confdefs.h >>conftest.$ac_ext
5905cat >>conftest.$ac_ext <<_ACEOF
5906/* end confdefs.h. */
bf3b7cd3 5907$ac_includes_default
ba479fd2
NN
5908int
5909main ()
5910{
bf3b7cd3
JD
5911static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5912test_array [0] = 0
5913
ba479fd2
NN
5914 ;
5915 return 0;
5916}
5917_ACEOF
5918rm -f conftest.$ac_objext
5919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5920 (eval $ac_compile) 2>conftest.er1
ba479fd2 5921 ac_status=$?
86da66b5
HPN
5922 grep -v '^ *+' conftest.er1 >conftest.err
5923 rm -f conftest.er1
5924 cat conftest.err >&5
ba479fd2
NN
5925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5926 (exit $ac_status); } &&
a1286ef5
ZW
5927 { ac_try='test -z "$ac_c_werror_flag"
5928 || test ! -s conftest.err'
86da66b5
HPN
5929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5930 (eval $ac_try) 2>&5
5931 ac_status=$?
5932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5933 (exit $ac_status); }; } &&
5934 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5936 (eval $ac_try) 2>&5
5937 ac_status=$?
5938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5939 (exit $ac_status); }; }; then
bf3b7cd3 5940 ac_hi=$ac_mid
75e93faa 5941else
ba479fd2
NN
5942 echo "$as_me: failed program was:" >&5
5943sed 's/^/| /' conftest.$ac_ext >&5
5944
bf3b7cd3 5945ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 5946fi
86da66b5 5947rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5948done
bf3b7cd3
JD
5949case $ac_lo in
5950?*) ac_cv_sizeof___int64=$ac_lo;;
5951'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
5952See \`config.log' for more details." >&5
5953echo "$as_me: error: cannot compute sizeof (__int64), 77
5954See \`config.log' for more details." >&2;}
5955 { (exit 1); exit 1; }; } ;;
5956esac
5957else
5958 if test "$cross_compiling" = yes; then
a1286ef5
ZW
5959 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5960See \`config.log' for more details." >&5
5961echo "$as_me: error: cannot run test program while cross compiling
5962See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5963 { (exit 1); exit 1; }; }
5964else
5965 cat >conftest.$ac_ext <<_ACEOF
5966/* confdefs.h. */
5967_ACEOF
5968cat confdefs.h >>conftest.$ac_ext
5969cat >>conftest.$ac_ext <<_ACEOF
5970/* end confdefs.h. */
5971$ac_includes_default
5972long longval () { return (long) (sizeof (__int64)); }
5973unsigned long ulongval () { return (long) (sizeof (__int64)); }
5974#include <stdio.h>
5975#include <stdlib.h>
5976int
5977main ()
5978{
414d23ae 5979
bf3b7cd3
JD
5980 FILE *f = fopen ("conftest.val", "w");
5981 if (! f)
5982 exit (1);
5983 if (((long) (sizeof (__int64))) < 0)
5984 {
5985 long i = longval ();
5986 if (i != ((long) (sizeof (__int64))))
5987 exit (1);
5988 fprintf (f, "%ld\n", i);
5989 }
5990 else
5991 {
5992 unsigned long i = ulongval ();
5993 if (i != ((long) (sizeof (__int64))))
5994 exit (1);
5995 fprintf (f, "%lu\n", i);
5996 }
5997 exit (ferror (f) || fclose (f) != 0);
5998
5999 ;
6000 return 0;
6001}
6002_ACEOF
6003rm -f conftest$ac_exeext
6004if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6005 (eval $ac_link) 2>&5
6006 ac_status=$?
6007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6008 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6010 (eval $ac_try) 2>&5
6011 ac_status=$?
6012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6013 (exit $ac_status); }; }; then
6014 ac_cv_sizeof___int64=`cat conftest.val`
6015else
6016 echo "$as_me: program exited with status $ac_status" >&5
6017echo "$as_me: failed program was:" >&5
6018sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6019
bf3b7cd3
JD
6020( exit $ac_status )
6021{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
6022See \`config.log' for more details." >&5
6023echo "$as_me: error: cannot compute sizeof (__int64), 77
6024See \`config.log' for more details." >&2;}
ba479fd2 6025 { (exit 1); exit 1; }; }
414d23ae 6026fi
bf3b7cd3
JD
6027rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6028fi
6029fi
6030rm -f conftest.val
6031else
6032 ac_cv_sizeof___int64=0
6033fi
6034fi
ba479fd2
NN
6035echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6036echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 6037cat >>confdefs.h <<_ACEOF
414d23ae 6038#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6039_ACEOF
414d23ae 6040
cafe096b 6041
414d23ae
HPN
6042fi
6043
34a86c2b
NN
6044# ---------------------
6045# Warnings and checking
6046# ---------------------
6047
b5472e1d
NN
6048# Check $CC warning features (if it's GCC).
6049# We want to use -pedantic, but we don't want warnings about
6050# * 'long long'
6051# * variadic macros
6052# So, we only use -pedantic if we can disable those warnings.
6053
6054echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6055echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
6056if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6057 echo $ECHO_N "(cached) $ECHO_C" >&6
6058else
6059 save_CFLAGS="$CFLAGS"
6060 CFLAGS="-Wno-long-long"
6061 cat >conftest.$ac_ext <<_ACEOF
6062/* confdefs.h. */
6063_ACEOF
6064cat confdefs.h >>conftest.$ac_ext
6065cat >>conftest.$ac_ext <<_ACEOF
6066/* end confdefs.h. */
6067
6068_ACEOF
6069rm -f conftest.$ac_objext
6070if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6071 (eval $ac_compile) 2>conftest.er1
6072 ac_status=$?
6073 grep -v '^ *+' conftest.er1 >conftest.err
6074 rm -f conftest.er1
6075 cat conftest.err >&5
6076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6077 (exit $ac_status); } &&
a1286ef5
ZW
6078 { ac_try='test -z "$ac_c_werror_flag"
6079 || test ! -s conftest.err'
b5472e1d
NN
6080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6081 (eval $ac_try) 2>&5
6082 ac_status=$?
6083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6084 (exit $ac_status); }; } &&
6085 { ac_try='test -s conftest.$ac_objext'
6086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6087 (eval $ac_try) 2>&5
6088 ac_status=$?
6089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6090 (exit $ac_status); }; }; then
6091 ac_cv_prog_cc_w_no_long_long=yes
6092else
6093 echo "$as_me: failed program was:" >&5
6094sed 's/^/| /' conftest.$ac_ext >&5
6095
6096ac_cv_prog_cc_w_no_long_long=no
6097fi
6098rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6099 CFLAGS="$save_CFLAGS"
6100
6101fi
6102echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6103echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
6104
6105echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6106echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
6107if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6108 echo $ECHO_N "(cached) $ECHO_C" >&6
6109else
6110 save_CFLAGS="$CFLAGS"
6111 CFLAGS="-Wno-variadic-macros"
6112 cat >conftest.$ac_ext <<_ACEOF
6113/* confdefs.h. */
6114_ACEOF
6115cat confdefs.h >>conftest.$ac_ext
6116cat >>conftest.$ac_ext <<_ACEOF
6117/* end confdefs.h. */
6118
6119_ACEOF
6120rm -f conftest.$ac_objext
6121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6122 (eval $ac_compile) 2>conftest.er1
6123 ac_status=$?
6124 grep -v '^ *+' conftest.er1 >conftest.err
6125 rm -f conftest.er1
6126 cat conftest.err >&5
6127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6128 (exit $ac_status); } &&
a1286ef5
ZW
6129 { ac_try='test -z "$ac_c_werror_flag"
6130 || test ! -s conftest.err'
b5472e1d
NN
6131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6132 (eval $ac_try) 2>&5
6133 ac_status=$?
6134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6135 (exit $ac_status); }; } &&
6136 { ac_try='test -s conftest.$ac_objext'
6137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6138 (eval $ac_try) 2>&5
6139 ac_status=$?
6140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6141 (exit $ac_status); }; }; then
6142 ac_cv_prog_cc_w_no_variadic_macros=yes
6143else
6144 echo "$as_me: failed program was:" >&5
6145sed 's/^/| /' conftest.$ac_ext >&5
6146
6147ac_cv_prog_cc_w_no_variadic_macros=no
6148fi
6149rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6150 CFLAGS="$save_CFLAGS"
6151
6152fi
6153echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6154echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
6155
34a86c2b 6156strict1_warn=
b5472e1d
NN
6157if test $ac_cv_prog_cc_w_no_long_long = yes \
6158 && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then
6159 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros"
34a86c2b
NN
6160fi
6161
6162
643d3bd2
NN
6163# Add -Wold-style-definition if it's accepted
6164echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6165echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
6166if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6167 echo $ECHO_N "(cached) $ECHO_C" >&6
6168else
6169 save_CFLAGS="$CFLAGS"
6170 CFLAGS="-Wold-style-definition"
6171 cat >conftest.$ac_ext <<_ACEOF
6172/* confdefs.h. */
6173_ACEOF
6174cat confdefs.h >>conftest.$ac_ext
6175cat >>conftest.$ac_ext <<_ACEOF
6176/* end confdefs.h. */
6177
6178_ACEOF
6179rm -f conftest.$ac_objext
6180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6181 (eval $ac_compile) 2>conftest.er1
6182 ac_status=$?
6183 grep -v '^ *+' conftest.er1 >conftest.err
6184 rm -f conftest.er1
6185 cat conftest.err >&5
6186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6187 (exit $ac_status); } &&
a1286ef5
ZW
6188 { ac_try='test -z "$ac_c_werror_flag"
6189 || test ! -s conftest.err'
643d3bd2
NN
6190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6191 (eval $ac_try) 2>&5
6192 ac_status=$?
6193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6194 (exit $ac_status); }; } &&
6195 { ac_try='test -s conftest.$ac_objext'
6196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6197 (eval $ac_try) 2>&5
6198 ac_status=$?
6199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6200 (exit $ac_status); }; }; then
6201 ac_cv_prog_cc_w_old_style_definition=yes
6202else
6203 echo "$as_me: failed program was:" >&5
6204sed 's/^/| /' conftest.$ac_ext >&5
6205
6206ac_cv_prog_cc_w_old_style_definition=no
6207fi
6208rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6209 CFLAGS="$save_CFLAGS"
6210
6211fi
6212echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
6213echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
6214if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
6215 strict1_warn="${strict1_warn} -Wold-style-definition"
6216fi
6217
09a9c095
NN
6218# Enable -Werror, period.
6219# Check whether --enable-werror_always or --disable-werror_always was given.
6220if test "${enable_werror_always+set}" = set; then
6221 enableval="$enable_werror_always"
6222
6223else
6224 enable_werror_always=no
6225fi;
6226if test x${enable_werror_always} = xyes ; then
6227 strict1_warn="${strict1_warn} -Werror"
6228 WERROR=-Werror
6229fi
6230
ba479fd2 6231# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
6232# That's useful for people building cross-compilers, or just running a
6233# quick `make'.
6234warn_cflags=
6235if test "x$GCC" = "xyes"; then
6236 warn_cflags='$(GCC_WARN_CFLAGS)'
6237fi
6238
6239
dd859b8a 6240# Enable -Werror in bootstrap stage2 and later.
a1286ef5
ZW
6241is_release=
6242if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6243 is_release=yes
6244fi
dd859b8a
KG
6245# Check whether --enable-werror or --disable-werror was given.
6246if test "${enable_werror+set}" = set; then
6247 enableval="$enable_werror"
ba479fd2 6248
dd859b8a 6249else
06c37c96
NS
6250 if test x$is_release = x ; then
6251 # Default to "yes" on development branches.
dd859b8a 6252 enable_werror=yes
06c37c96
NS
6253else
6254 # Default to "no" on release branches.
6255 enable_werror=no
6256fi
ba479fd2 6257fi;
dd859b8a
KG
6258if test x$enable_werror = xyes ; then
6259 WERROR=-Werror
6260fi
6261
6262
414d23ae
HPN
6263# Enable expensive internal checks
6264# Check whether --enable-checking or --disable-checking was given.
6265if test "${enable_checking+set}" = set; then
6266 enableval="$enable_checking"
e1bbfc5c
NS
6267 ac_checking_flags="${enableval}"
6268else
6269
6270# Determine the default checks.
6271if test x$is_release = x ; then
6272 ac_checking_flags=yes
6273else
6274 ac_checking_flags=release
6275fi
6276fi;
6277ac_assert_checking=1
6278ac_checking=
cdce5c16
NS
6279ac_fold_checking=
6280ac_gc_checking=
6281ac_gc_always_collect=
414d23ae
HPN
6282ac_rtl_checking=
6283ac_rtlflag_checking=
b53ef395 6284ac_runtime_checking=1
cdce5c16
NS
6285ac_tree_checking=
6286ac_valgrind_checking=
e1bbfc5c
NS
6287IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6288for check in $ac_checking_flags
6289do
6290 case $check in
cdce5c16 6291 # these set all the flags to specific states
e1bbfc5c 6292 yes) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6293 ac_fold_checking= ; ac_gc_checking=1 ;
6294 ac_gc_always_collect= ; ac_rtl_checking= ;
6295 ac_rtlflag_checking=1 ; ac_runtime_chacking=1 ;
6296 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6297 no|none) ac_assert_checking= ; ac_checking= ;
6298 ac_fold_checking= ; ac_gc_checking= ;
6299 ac_gc_always_collect= ; ac_rtl_checking= ;
6300 ac_rtlflag_checking= ; ac_runtime_chacking= ;
6301 ac_tree_checking= ; ac_valgrind_checking= ;;
e1bbfc5c 6302 all) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6303 ac_fold_checking=1 ; ac_gc_checking=1 ;
6304 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
6305 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6306 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6307 release) ac_assert_checking=1 ; ac_checking= ;
6308 ac_fold_checking= ; ac_gc_checking= ;
6309 ac_gc_always_collect= ; ac_rtl_checking= ;
6310 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6311 ac_tree_checking= ; ac_valgrind_checking= ;;
6312 # these enable particular checks
e1bbfc5c
NS
6313 assert) ac_assert_checking=1 ;;
6314 fold) ac_fold_checking=1 ;;
6315 gc) ac_gc_checking=1 ;;
6316 gcac) ac_gc_always_collect=1 ;;
6317 misc) ac_checking=1 ;;
e1bbfc5c 6318 rtl) ac_rtl_checking=1 ;;
cdce5c16 6319 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 6320 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 6321 tree) ac_tree_checking=1 ;;
cdce5c16 6322 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 6323 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
6324echo "$as_me: error: unknown check category $check" >&2;}
6325 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
6326 esac
6327done
6328IFS="$ac_save_IFS"
06c37c96 6329
ba479fd2
NN
6330nocommon_flag=""
6331if test x$ac_checking != x ; then
6332
6333cat >>confdefs.h <<\_ACEOF
6334#define ENABLE_CHECKING 1
6335_ACEOF
6336
6337 nocommon_flag=-fno-common
6338fi
6339
06c37c96
NS
6340if test x$ac_assert_checking != x ; then
6341
6342cat >>confdefs.h <<\_ACEOF
6343#define ENABLE_ASSERT_CHECKING 1
6344_ACEOF
6345
b53ef395
NS
6346fi
6347if test x$ac_runtime_checking != x ; then
6348
6349cat >>confdefs.h <<\_ACEOF
6350#define ENABLE_RUNTIME_CHECKING 1
6351_ACEOF
6352
06c37c96 6353fi
ba479fd2
NN
6354if test x$ac_tree_checking != x ; then
6355
6356cat >>confdefs.h <<\_ACEOF
6357#define ENABLE_TREE_CHECKING 1
6358_ACEOF
6359
13f05fd0 6360 TREEBROWSER=tree-browser.o
ba479fd2 6361fi
13f05fd0 6362
ba479fd2
NN
6363if test x$ac_rtl_checking != x ; then
6364
6365cat >>confdefs.h <<\_ACEOF
6366#define ENABLE_RTL_CHECKING 1
6367_ACEOF
6368
6369fi
6370if test x$ac_rtlflag_checking != x ; then
6371
6372cat >>confdefs.h <<\_ACEOF
6373#define ENABLE_RTL_FLAG_CHECKING 1
6374_ACEOF
6375
6376fi
6377if test x$ac_gc_checking != x ; then
6378
6379cat >>confdefs.h <<\_ACEOF
6380#define ENABLE_GC_CHECKING 1
6381_ACEOF
6382
6383fi
6384if test x$ac_gc_always_collect != x ; then
6385
6386cat >>confdefs.h <<\_ACEOF
6387#define ENABLE_GC_ALWAYS_COLLECT 1
6388_ACEOF
6389
6390fi
6391if test x$ac_fold_checking != x ; then
6392
6393cat >>confdefs.h <<\_ACEOF
6394#define ENABLE_FOLD_CHECKING 1
6395_ACEOF
6396
6397fi
6398valgrind_path_defines=
6399valgrind_command=
6400
ba479fd2
NN
6401if test "${ac_cv_header_valgrind_h+set}" = set; then
6402 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6403echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6404if test "${ac_cv_header_valgrind_h+set}" = set; then
6405 echo $ECHO_N "(cached) $ECHO_C" >&6
6406fi
6407echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6408echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6409else
6410 # Is the header compilable?
6411echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6412echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
6413cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6414/* confdefs.h. */
6415_ACEOF
6416cat confdefs.h >>conftest.$ac_ext
6417cat >>conftest.$ac_ext <<_ACEOF
6418/* end confdefs.h. */
6419$ac_includes_default
63cf211a 6420#include <valgrind.h>
ba479fd2
NN
6421_ACEOF
6422rm -f conftest.$ac_objext
6423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6424 (eval $ac_compile) 2>conftest.er1
ba479fd2 6425 ac_status=$?
86da66b5
HPN
6426 grep -v '^ *+' conftest.er1 >conftest.err
6427 rm -f conftest.er1
6428 cat conftest.err >&5
ba479fd2
NN
6429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6430 (exit $ac_status); } &&
a1286ef5
ZW
6431 { ac_try='test -z "$ac_c_werror_flag"
6432 || test ! -s conftest.err'
86da66b5
HPN
6433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6434 (eval $ac_try) 2>&5
6435 ac_status=$?
6436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6437 (exit $ac_status); }; } &&
6438 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6440 (eval $ac_try) 2>&5
6441 ac_status=$?
6442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6443 (exit $ac_status); }; }; then
6444 ac_header_compiler=yes
6445else
6446 echo "$as_me: failed program was:" >&5
6447sed 's/^/| /' conftest.$ac_ext >&5
6448
6449ac_header_compiler=no
6450fi
86da66b5 6451rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
6452echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6453echo "${ECHO_T}$ac_header_compiler" >&6
6454
6455# Is the header present?
6456echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6457echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
6458cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6459/* confdefs.h. */
6460_ACEOF
6461cat confdefs.h >>conftest.$ac_ext
6462cat >>conftest.$ac_ext <<_ACEOF
6463/* end confdefs.h. */
6464#include <valgrind.h>
6465_ACEOF
6466if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6467 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6468 ac_status=$?
6469 grep -v '^ *+' conftest.er1 >conftest.err
6470 rm -f conftest.er1
6471 cat conftest.err >&5
6472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6473 (exit $ac_status); } >/dev/null; then
6474 if test -s conftest.err; then
6475 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6476 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6477 else
6478 ac_cpp_err=
6479 fi
6480else
6481 ac_cpp_err=yes
6482fi
6483if test -z "$ac_cpp_err"; then
6484 ac_header_preproc=yes
6485else
6486 echo "$as_me: failed program was:" >&5
6487sed 's/^/| /' conftest.$ac_ext >&5
6488
6489 ac_header_preproc=no
6490fi
6491rm -f conftest.err conftest.$ac_ext
6492echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6493echo "${ECHO_T}$ac_header_preproc" >&6
6494
6495# So? What about this header?
86da66b5
HPN
6496case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6497 yes:no: )
ba479fd2
NN
6498 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6499echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
6500 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6501echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6502 ac_header_preproc=yes
ba479fd2 6503 ;;
86da66b5 6504 no:yes:* )
ba479fd2
NN
6505 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6506echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
6507 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6508echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6509 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6510echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6511 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6512echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
6513 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6514echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
6515 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6516echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
ba479fd2
NN
6517 (
6518 cat <<\_ASBOX
86da66b5
HPN
6519## ------------------------------------------ ##
6520## Report this to the AC_PACKAGE_NAME lists. ##
6521## ------------------------------------------ ##
ba479fd2
NN
6522_ASBOX
6523 ) |
6524 sed "s/^/$as_me: WARNING: /" >&2
6525 ;;
6526esac
6527echo "$as_me:$LINENO: checking for valgrind.h" >&5
6528echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6529if test "${ac_cv_header_valgrind_h+set}" = set; then
6530 echo $ECHO_N "(cached) $ECHO_C" >&6
6531else
6532 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 6533fi
ba479fd2
NN
6534echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6535echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6536
6e3f3080 6537fi
ba479fd2 6538if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
6539 have_valgrind_h=yes
6540else
ba479fd2 6541 have_valgrind_h=no
6938ec6c
NN
6542fi
6543
6544
ba479fd2 6545
cdce5c16 6546if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
6547 # It is certainly possible that there's valgrind but no valgrind.h.
6548 # GCC relies on making annotations so we must have both.
ba479fd2
NN
6549 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6550echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
6551 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6552/* confdefs.h. */
6553_ACEOF
6554cat confdefs.h >>conftest.$ac_ext
6555cat >>conftest.$ac_ext <<_ACEOF
6556/* end confdefs.h. */
a207b594 6557#include <valgrind/memcheck.h>
14011ca4
AJ
6558#ifndef VALGRIND_DISCARD
6559#error VALGRIND_DISCARD not defined
6560#endif
ba479fd2
NN
6561_ACEOF
6562if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6563 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6564 ac_status=$?
6565 grep -v '^ *+' conftest.er1 >conftest.err
6566 rm -f conftest.er1
6567 cat conftest.err >&5
6568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6569 (exit $ac_status); } >/dev/null; then
6570 if test -s conftest.err; then
6571 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6572 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6573 else
6574 ac_cpp_err=
6575 fi
6576else
6577 ac_cpp_err=yes
6578fi
6579if test -z "$ac_cpp_err"; then
a207b594
HPN
6580 gcc_cv_header_valgrind_memcheck_h=yes
6581else
ba479fd2
NN
6582 echo "$as_me: failed program was:" >&5
6583sed 's/^/| /' conftest.$ac_ext >&5
6584
a207b594
HPN
6585 gcc_cv_header_valgrind_memcheck_h=no
6586fi
ba479fd2
NN
6587rm -f conftest.err conftest.$ac_ext
6588 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6589echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6590 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6591echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
6592 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6593/* confdefs.h. */
6594_ACEOF
6595cat confdefs.h >>conftest.$ac_ext
6596cat >>conftest.$ac_ext <<_ACEOF
6597/* end confdefs.h. */
a207b594
HPN
6598#include <memcheck.h>
6599#ifndef VALGRIND_DISCARD
6600#error VALGRIND_DISCARD not defined
6601#endif
ba479fd2
NN
6602_ACEOF
6603if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6604 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6605 ac_status=$?
6606 grep -v '^ *+' conftest.er1 >conftest.err
6607 rm -f conftest.er1
6608 cat conftest.err >&5
6609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6610 (exit $ac_status); } >/dev/null; then
6611 if test -s conftest.err; then
6612 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6613 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6614 else
6615 ac_cpp_err=
6616 fi
6617else
6618 ac_cpp_err=yes
6619fi
6620if test -z "$ac_cpp_err"; then
14011ca4
AJ
6621 gcc_cv_header_memcheck_h=yes
6622else
ba479fd2
NN
6623 echo "$as_me: failed program was:" >&5
6624sed 's/^/| /' conftest.$ac_ext >&5
6625
cafe096b
EC
6626 gcc_cv_header_memcheck_h=no
6627fi
ba479fd2
NN
6628rm -f conftest.err conftest.$ac_ext
6629 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6630echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
6631
56694dd9
ZW
6632# Prepare PATH_SEPARATOR.
6633# The user is always right.
6634if test "${PATH_SEPARATOR+set}" != set; then
6635 echo "#! /bin/sh" >conf$$.sh
6636 echo "exit 0" >>conf$$.sh
6637 chmod +x conf$$.sh
6638 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6639 PATH_SEPARATOR=';'
6640 else
6641 PATH_SEPARATOR=:
6642 fi
6643 rm -f conf$$.sh
6644fi
6645
6646# Find out how to test for executable files. Don't use a zero-byte file,
6647# as systems may use methods other than mode bits to determine executability.
6648cat >conf$$.file <<_ASEOF
6649#! /bin/sh
6650exit 0
6651_ASEOF
6652chmod +x conf$$.file
6653if test -x conf$$.file >/dev/null 2>&1; then
6654 ac_executable_p="test -x"
6655else
6656 ac_executable_p="test -f"
6657fi
6658rm -f conf$$.file
6659
6660# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 6661set dummy valgrind; ac_word=$2
ba479fd2
NN
6662echo "$as_me:$LINENO: checking for $ac_word" >&5
6663echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6664if test "${ac_cv_path_valgrind_path+set}" = set; then
6665 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
6666else
6667 case "$valgrind_path" in
56694dd9
ZW
6668 [\\/]* | ?:[\\/]*)
6669 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6670 ;;
414d23ae 6671 *)
56694dd9
ZW
6672 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6673 for ac_dir in $PATH; do
6674 IFS="$ac_save_IFS"
6675 test -z "$ac_dir" && ac_dir=.
6676 for ac_exec_ext in '' $ac_executable_extensions; do
6677 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6678 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6679 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6680 break 2
6681 fi
6682 fi
6683 done
6684 done
6685 IFS="$ac_save_IFS"
6686 ;;
414d23ae 6687esac
75e93faa 6688fi
414d23ae
HPN
6689valgrind_path="$ac_cv_path_valgrind_path"
6690if test -n "$valgrind_path"; then
ba479fd2
NN
6691 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6692echo "${ECHO_T}$valgrind_path" >&6
414d23ae 6693else
ba479fd2
NN
6694 echo "$as_me:$LINENO: result: no" >&5
6695echo "${ECHO_T}no" >&6
414d23ae
HPN
6696fi
6697
a207b594
HPN
6698 if test "x$valgrind_path" = "x" \
6699 || (test $have_valgrind_h = no \
6700 && test $gcc_cv_header_memcheck_h = no \
6701 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
6702 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6703echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6704 { (exit 1); exit 1; }; }
414d23ae
HPN
6705 fi
6706 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6707 valgrind_command="$valgrind_path -q"
ba479fd2
NN
6708
6709cat >>confdefs.h <<\_ACEOF
414d23ae 6710#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 6711_ACEOF
75e93faa 6712
a207b594 6713 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
6714
6715cat >>confdefs.h <<\_ACEOF
a207b594 6716#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 6717_ACEOF
a207b594
HPN
6718
6719 fi
14011ca4 6720 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
6721
6722cat >>confdefs.h <<\_ACEOF
14011ca4 6723#define HAVE_MEMCHECK_H 1
ba479fd2 6724_ACEOF
14011ca4
AJ
6725
6726 fi
414d23ae 6727fi
75e93faa 6728
75e93faa
ZW
6729
6730
74ee1642
PB
6731# Check whether --enable-mapped-location or --disable-mapped-location was given.
6732if test "${enable_mapped_location+set}" = set; then
6733 enableval="$enable_mapped_location"
6734
6735else
6736 enable_mapped_location=no
6737fi;
6738
6739if test "$enable_mapped_location" = yes ; then
6740
6741cat >>confdefs.h <<\_ACEOF
6742#define USE_MAPPED_LOCATION 1
6743_ACEOF
6744
6745fi
6746
414d23ae
HPN
6747# Enable code coverage collection
6748# Check whether --enable-coverage or --disable-coverage was given.
6749if test "${enable_coverage+set}" = set; then
6750 enableval="$enable_coverage"
6751 case "${enableval}" in
6dd297da
NN
6752 yes|noopt)
6753 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6754 ;;
6755 opt)
6756 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6757 ;;
6758 no)
6759 # a.k.a. --disable-coverage
6760 coverage_flags=""
6761 ;;
6762 *)
6763 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
6764echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6765 { (exit 1); exit 1; }; }
6dd297da 6766 ;;
414d23ae 6767esac
75e93faa 6768else
414d23ae 6769 coverage_flags=""
ba479fd2 6770fi;
5c3bc9fb 6771
414d23ae 6772
439a7e54
DN
6773# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
6774if test "${enable_gather_detailed_mem_stats+set}" = set; then
6775 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 6776
439a7e54
DN
6777else
6778 enable_gather_detailed_mem_stats=no
ba479fd2 6779fi;
439a7e54 6780if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
6781
6782cat >>confdefs.h <<\_ACEOF
439a7e54 6783#define GATHER_STATISTICS 1
ba479fd2 6784_ACEOF
439a7e54
DN
6785
6786fi
6787
73458fb7
NN
6788# -------------------------------
6789# Miscenalleous configure options
6790# -------------------------------
34a86c2b
NN
6791
6792# With stabs
ba479fd2 6793
34a86c2b
NN
6794# Check whether --with-stabs or --without-stabs was given.
6795if test "${with_stabs+set}" = set; then
6796 withval="$with_stabs"
6797 stabs="$with_stabs"
6798else
6799 stabs=no
ba479fd2 6800fi;
cafe096b 6801
34a86c2b
NN
6802# Determine whether or not multilibs are enabled.
6803# Check whether --enable-multilib or --disable-multilib was given.
6804if test "${enable_multilib+set}" = set; then
6805 enableval="$enable_multilib"
ba479fd2 6806
34a86c2b
NN
6807else
6808 enable_multilib=yes
ba479fd2 6809fi;
75e93faa 6810
34a86c2b 6811
414d23ae
HPN
6812# Enable __cxa_atexit for C++.
6813# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
6814if test "${enable___cxa_atexit+set}" = set; then
6815 enableval="$enable___cxa_atexit"
75e93faa 6816
ba479fd2 6817fi;
75e93faa 6818
414d23ae
HPN
6819# Enable threads
6820# Pass with no value to take the default
6821# Pass with a value to specify a thread package
6822# Check whether --enable-threads or --disable-threads was given.
6823if test "${enable_threads+set}" = set; then
6824 enableval="$enable_threads"
ba479fd2 6825
414d23ae
HPN
6826else
6827 enable_threads=''
ba479fd2 6828fi;
414d23ae
HPN
6829
6830# Check whether --enable-objc-gc or --disable-objc-gc was given.
6831if test "${enable_objc_gc+set}" = set; then
6832 enableval="$enable_objc_gc"
6833 if test x$enable_objc_gc = xno; then
6834 objc_boehm_gc=''
6835else
6836 objc_boehm_gc=1
6837fi
6838else
6839 objc_boehm_gc=''
ba479fd2 6840fi;
75e93faa
ZW
6841
6842
414d23ae
HPN
6843# Check whether --with-dwarf2 or --without-dwarf2 was given.
6844if test "${with_dwarf2+set}" = set; then
6845 withval="$with_dwarf2"
6846 dwarf2="$with_dwarf2"
75e93faa 6847else
414d23ae 6848 dwarf2=no
ba479fd2 6849fi;
75e93faa 6850
414d23ae
HPN
6851# Check whether --enable-shared or --disable-shared was given.
6852if test "${enable_shared+set}" = set; then
6853 enableval="$enable_shared"
ba479fd2 6854
414d23ae
HPN
6855 case $enable_shared in
6856 yes | no) ;;
6857 *)
6858 enable_shared=no
6859 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6860 for pkg in $enableval; do
6861 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
6862 enable_shared=yes
6863 fi
6864 done
6865 IFS="$ac_save_ifs"
6866 ;;
6867 esac
6868
75e93faa 6869else
414d23ae 6870 enable_shared=yes
ba479fd2 6871fi;
75e93faa 6872
75e93faa 6873
75e93faa 6874
4977bab6
ZW
6875# Check whether --with-sysroot or --without-sysroot was given.
6876if test "${with_sysroot+set}" = set; then
6877 withval="$with_sysroot"
ba479fd2 6878
4977bab6 6879 case ${with_sysroot} in
caa55b1e 6880 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
6881 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
6882 esac
ba479fd2 6883
4977bab6
ZW
6884 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
6885 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
6886
047d636f
DJ
6887 if test "x$exec_prefix" = xNONE; then
6888 if test "x$prefix" = xNONE; then
6889 test_prefix=/usr/local
6890 else
6891 test_prefix=$prefix
6892 fi
6893 else
6894 test_prefix=$exec_prefix
6895 fi
6896 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
6897 "${test_prefix}"|"${test_prefix}/"*|\
6898 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
6899 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
6900 TARGET_SYSTEM_ROOT_DEFINE="$t"
6901 ;;
6902 esac
6903
4977bab6 6904else
ba479fd2 6905
4977bab6 6906 TARGET_SYSTEM_ROOT=
db720d9a 6907 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
6908 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
6909
ba479fd2 6910fi;
4977bab6
ZW
6911
6912
6913
6914
d1bd0ded 6915# Build with intermodule optimisations
d1bd0ded
GK
6916# Check whether --enable-intermodule or --disable-intermodule was given.
6917if test "${enable_intermodule+set}" = set; then
6918 enableval="$enable_intermodule"
0c46c5c7
KC
6919 case ${enable_intermodule} in
6920 yes) onestep="-onestep";;
6921 *) onestep="";;
d1bd0ded 6922esac
0c46c5c7
KC
6923else
6924 onestep=""
ba479fd2 6925fi;
d1bd0ded
GK
6926
6927
f3c9f174
NN
6928# Sanity check enable_languages in case someone does not run the toplevel
6929# configure # script.
6930# Check whether --enable-languages or --disable-languages was given.
6931if test "${enable_languages+set}" = set; then
6932 enableval="$enable_languages"
6933 case ,${enable_languages}, in
6934 ,,|,yes,)
6935 # go safe -- we cannot be much sure without the toplevel
6936 # configure's
6937 # analysis of which target libs are present and usable
6938 enable_languages=c
6939 ;;
6940 *,all,*)
6941 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
6942echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
6943 { (exit 1); exit 1; }; }
6944 ;;
6945 *,c,*)
6946 ;;
6947 *)
6948 enable_languages=c,${enable_languages}
6949 ;;
6950esac
6951else
6952 enable_languages=c
6953fi;
6954
6955subdirs=
6956for lang in ${srcdir}/*/config-lang.in
6957do
6958 case $lang in
6959 # The odd quoting in the next line works around
6960 # an apparent bug in bash 1.12 on linux.
6961 ${srcdir}/[*]/config-lang.in) ;;
6962 *)
6963 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6964 if test "x$lang_alias" = x
6965 then
6966 echo "$lang doesn't set \$language." 1>&2
6967 exit 1
6968 fi
6969 case ",$enable_languages," in
6970 *,$lang_alias,*)
6971 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
6972 esac
6973 ;;
6974 esac
6975done
6976
6977
73458fb7
NN
6978# -------------------------
6979# Checks for other programs
6980# -------------------------
5b67ad6f 6981
ba479fd2
NN
6982echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6983echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
86da66b5 6984set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
ba479fd2
NN
6985if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
6986 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 6987else
ba479fd2 6988 cat >conftest.make <<\_ACEOF
e9a25f70 6989all:
ba479fd2
NN
6990 @echo 'ac_maketemp="$(MAKE)"'
6991_ACEOF
e9a25f70 6992# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 6993eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
6994if test -n "$ac_maketemp"; then
6995 eval ac_cv_prog_make_${ac_make}_set=yes
6996else
6997 eval ac_cv_prog_make_${ac_make}_set=no
6998fi
ba479fd2 6999rm -f conftest.make
e9a25f70
JL
7000fi
7001if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
7002 echo "$as_me:$LINENO: result: yes" >&5
7003echo "${ECHO_T}yes" >&6
e9a25f70
JL
7004 SET_MAKE=
7005else
ba479fd2
NN
7006 echo "$as_me:$LINENO: result: no" >&5
7007echo "${ECHO_T}no" >&6
e9a25f70
JL
7008 SET_MAKE="MAKE=${MAKE-make}"
7009fi
7010
7011
861bb6c1 7012# Find some useful tools
ba479fd2 7013for ac_prog in gawk mawk nawk awk
861bb6c1 7014do
ba479fd2 7015 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 7016set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7017echo "$as_me:$LINENO: checking for $ac_word" >&5
7018echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7019if test "${ac_cv_prog_AWK+set}" = set; then
7020 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7021else
7022 if test -n "$AWK"; then
7023 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7024else
ba479fd2
NN
7025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7026for as_dir in $PATH
7027do
7028 IFS=$as_save_IFS
7029 test -z "$as_dir" && as_dir=.
7030 for ac_exec_ext in '' $ac_executable_extensions; do
7031 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7032 ac_cv_prog_AWK="$ac_prog"
7033 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7034 break 2
7035 fi
7036done
7037done
7038
861bb6c1
JL
7039fi
7040fi
ba479fd2 7041AWK=$ac_cv_prog_AWK
861bb6c1 7042if test -n "$AWK"; then
ba479fd2
NN
7043 echo "$as_me:$LINENO: result: $AWK" >&5
7044echo "${ECHO_T}$AWK" >&6
861bb6c1 7045else
ba479fd2
NN
7046 echo "$as_me:$LINENO: result: no" >&5
7047echo "${ECHO_T}no" >&6
861bb6c1
JL
7048fi
7049
ba479fd2 7050 test -n "$AWK" && break
861bb6c1
JL
7051done
7052
776dc15d 7053# We need awk to create options.c and options.h.
2c4902b9
NN
7054# Bail out if it's missing.
7055case ${AWK} in
ba479fd2
NN
7056 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7057echo "$as_me: error: can't build without awk, bailing out" >&2;}
7058 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
7059esac
7060
ba479fd2
NN
7061echo "$as_me:$LINENO: checking whether ln -s works" >&5
7062echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
7063if test "${gcc_cv_prog_LN_S+set}" = set; then
7064 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7065else
7066 rm -f conftestdata_t
7067echo >conftestdata_f
7068if ln -s conftestdata_f conftestdata_t 2>/dev/null
7069then
7070 gcc_cv_prog_LN_S="ln -s"
7071else
7072 if ln conftestdata_f conftestdata_t 2>/dev/null
7073 then
7074 gcc_cv_prog_LN_S=ln
7075 else
35f06ae4
PB
7076 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7077 then
06c3418c 7078 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
7079 else
7080 gcc_cv_prog_LN_S=cp
7081 fi
0a4b6309
RL
7082 fi
7083fi
7084rm -f conftestdata_f conftestdata_t
7085
7086fi
7087LN_S="$gcc_cv_prog_LN_S"
7088if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
7089 echo "$as_me:$LINENO: result: yes" >&5
7090echo "${ECHO_T}yes" >&6
0a4b6309
RL
7091else
7092 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
7093 echo "$as_me:$LINENO: result: no, using ln" >&5
7094echo "${ECHO_T}no, using ln" >&6
0a4b6309 7095 else
35f06ae4
PB
7096 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7097echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
7098 fi
7099fi
7100
41e622a8
AP
7101echo "$as_me:$LINENO: checking whether ln works" >&5
7102echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
7103if test "${acx_cv_prog_LN+set}" = set; then
7104 echo $ECHO_N "(cached) $ECHO_C" >&6
7105else
7106 rm -f conftestdata_t
7107echo >conftestdata_f
7108if ln conftestdata_f conftestdata_t 2>/dev/null
7109then
7110 acx_cv_prog_LN=ln
7111else
7112 acx_cv_prog_LN=no
7113fi
7114rm -f conftestdata_f conftestdata_t
7115
7116fi
7117if test $acx_cv_prog_LN = no; then
7118 LN="$LN_S"
7119 echo "$as_me:$LINENO: result: no, using $LN" >&5
7120echo "${ECHO_T}no, using $LN" >&6
7121else
7122 LN="$acx_cv_prog_LN"
7123 echo "$as_me:$LINENO: result: yes" >&5
7124echo "${ECHO_T}yes" >&6
7125fi
7126
ba479fd2
NN
7127if test -n "$ac_tool_prefix"; then
7128 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7129set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7130echo "$as_me:$LINENO: checking for $ac_word" >&5
7131echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7132if test "${ac_cv_prog_RANLIB+set}" = set; then
7133 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7134else
7135 if test -n "$RANLIB"; then
7136 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7137else
ba479fd2
NN
7138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7139for as_dir in $PATH
7140do
7141 IFS=$as_save_IFS
7142 test -z "$as_dir" && as_dir=.
7143 for ac_exec_ext in '' $ac_executable_extensions; do
7144 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7145 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7146 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7147 break 2
7148 fi
7149done
7150done
7151
6e3f3080
NN
7152fi
7153fi
ba479fd2 7154RANLIB=$ac_cv_prog_RANLIB
6e3f3080 7155if test -n "$RANLIB"; then
ba479fd2
NN
7156 echo "$as_me:$LINENO: result: $RANLIB" >&5
7157echo "${ECHO_T}$RANLIB" >&6
7158else
7159 echo "$as_me:$LINENO: result: no" >&5
7160echo "${ECHO_T}no" >&6
7161fi
7162
7163fi
7164if test -z "$ac_cv_prog_RANLIB"; then
7165 ac_ct_RANLIB=$RANLIB
7166 # Extract the first word of "ranlib", so it can be a program name with args.
7167set dummy ranlib; ac_word=$2
7168echo "$as_me:$LINENO: checking for $ac_word" >&5
7169echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7170if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7171 echo $ECHO_N "(cached) $ECHO_C" >&6
7172else
7173 if test -n "$ac_ct_RANLIB"; then
7174 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7175else
7176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7177for as_dir in $PATH
7178do
7179 IFS=$as_save_IFS
7180 test -z "$as_dir" && as_dir=.
7181 for ac_exec_ext in '' $ac_executable_extensions; do
7182 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7183 ac_cv_prog_ac_ct_RANLIB="ranlib"
7184 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7185 break 2
7186 fi
7187done
7188done
7189
7190 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7191fi
7192fi
7193ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7194if test -n "$ac_ct_RANLIB"; then
7195 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7196echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 7197else
ba479fd2
NN
7198 echo "$as_me:$LINENO: result: no" >&5
7199echo "${ECHO_T}no" >&6
7200fi
7201
7202 RANLIB=$ac_ct_RANLIB
7203else
7204 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
7205fi
7206
343a6100
MM
7207case "${host}" in
7208*-*-darwin*)
7209 # By default, the Darwin ranlib will not treat common symbols as
7210 # definitions when building the archive table of contents. Other
7211 # ranlibs do that; pass an option to the Darwin ranlib that makes
7212 # it behave similarly.
7213 ranlib_flags="-c"
7214 ;;
7215*)
7216 ranlib_flags=""
7217esac
7218
7219
0a4b6309
RL
7220# Find a good install program. We prefer a C program (faster),
7221# so one script is as good as another. But avoid the broken or
7222# incompatible versions:
7223# SysV /etc/install, /usr/sbin/install
7224# SunOS /usr/etc/install
7225# IRIX /sbin/install
7226# AIX /bin/install
7227# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7228# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7229# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
7230echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7231echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 7232if test -z "$INSTALL"; then
ba479fd2
NN
7233if test "${ac_cv_path_install+set}" = set; then
7234 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7235else
7236 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7237 for ac_dir in $PATH; do
7238 # Account for people who put trailing slashes in PATH elements.
7239 case "$ac_dir/" in
7240 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7241 *)
7242 # OSF1 and SCO ODT 3.0 have their own names for install.
7243 for ac_prog in ginstall scoinst install; do
7244 if test -f $ac_dir/$ac_prog; then
7245 if test $ac_prog = install &&
7246 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7247 # AIX install. It has an incompatible calling convention.
7248 # OSF/1 installbsd also uses dspmsg, but is usable.
7249 :
7250 else
7251 ac_cv_path_install="$ac_dir/$ac_prog -c"
7252 break 2
7253 fi
7254 fi
7255 done
7256 ;;
7257 esac
7258 done
7259 IFS="$ac_save_IFS"
7260
7261fi
7262 if test "${ac_cv_path_install+set}" = set; then
7263 INSTALL="$ac_cv_path_install"
7264 else
7265 # As a last resort, use the slow shell script. We don't cache a
7266 # path for INSTALL within a source directory, because that will
7267 # break other packages using the cache if that directory is
7268 # removed, or if the path is relative.
7269 INSTALL="$ac_install_sh"
7270 fi
7271fi
ba479fd2
NN
7272echo "$as_me:$LINENO: result: $INSTALL" >&5
7273echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
7274
7275# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7276# It thinks the first close brace ends the variable substitution.
7277test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7278
7279test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7280
861bb6c1 7281
3a000df0 7282# See if cmp has --ignore-initial.
ba479fd2
NN
7283echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7284echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
7285if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7286 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
7287else
7288 echo abfoo >t1
7289 echo cdfoo >t2
269a7343 7290 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
7291 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7292 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 7293 :
3a000df0
KC
7294 else
7295 gcc_cv_prog_cmp_skip=gnucompare
7296 fi
269a7343
KG
7297 fi
7298 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7299 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7300 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7301 :
7302 else
7303 gcc_cv_prog_cmp_skip=fastcompare
7304 fi
7305 fi
3a000df0
KC
7306 fi
7307 rm t1 t2
7308
7309fi
ba479fd2
NN
7310echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7311echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
7312make_compare_target=$gcc_cv_prog_cmp_skip
7313
7314
7315
73458fb7
NN
7316# See if we have the mktemp command.
7317# Extract the first word of "mktemp", so it can be a program name with args.
7318set dummy mktemp; ac_word=$2
ba479fd2
NN
7319echo "$as_me:$LINENO: checking for $ac_word" >&5
7320echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7321if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7322 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7323else
7324 if test -n "$have_mktemp_command"; then
7325 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7326else
ba479fd2
NN
7327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7328for as_dir in $PATH
7329do
7330 IFS=$as_save_IFS
7331 test -z "$as_dir" && as_dir=.
7332 for ac_exec_ext in '' $ac_executable_extensions; do
7333 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7334 ac_cv_prog_have_mktemp_command="yes"
7335 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7336 break 2
7337 fi
7338done
7339done
7340
73458fb7
NN
7341 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7342fi
7343fi
ba479fd2 7344have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 7345if test -n "$have_mktemp_command"; then
ba479fd2
NN
7346 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7347echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 7348else
ba479fd2
NN
7349 echo "$as_me:$LINENO: result: no" >&5
7350echo "${ECHO_T}no" >&6
73458fb7
NN
7351fi
7352
7353
7c27e184
PB
7354MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
7355
7356# See if makeinfo has been installed and is modern enough
7357# that we can use it.
7358# Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 7359set dummy makeinfo; ac_word=$2
ba479fd2
NN
7360echo "$as_me:$LINENO: checking for $ac_word" >&5
7361echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7362if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7363 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7364else
7365 if test -n "$MAKEINFO"; then
7366 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7367else
ba479fd2
NN
7368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7369for as_dir in $PATH
7370do
7371 IFS=$as_save_IFS
7372 test -z "$as_dir" && as_dir=.
7373 for ac_exec_ext in '' $ac_executable_extensions; do
7374 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7375 ac_cv_prog_MAKEINFO="makeinfo"
7376 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7377 break 2
7378 fi
7379done
7380done
7381
73458fb7
NN
7382fi
7383fi
ba479fd2 7384MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 7385if test -n "$MAKEINFO"; then
ba479fd2
NN
7386 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7387echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 7388else
ba479fd2
NN
7389 echo "$as_me:$LINENO: result: no" >&5
7390echo "${ECHO_T}no" >&6
73458fb7
NN
7391fi
7392
7393if test -n "$MAKEINFO"; then
7394 # Found it, now check the version.
ba479fd2
NN
7395 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7396echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
7397if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7398 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7399else
7400 ac_prog_version=`$MAKEINFO --version 2>&1 |
7401 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
cdce5c16 7402 echo "configure:7402: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
7403 case $ac_prog_version in
7404 '') gcc_cv_prog_makeinfo_modern=no;;
7405 4.[2-9]*)
7406 gcc_cv_prog_makeinfo_modern=yes;;
7407 *) gcc_cv_prog_makeinfo_modern=no;;
7408 esac
7409
7410fi
ba479fd2
NN
7411echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7412echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
7413else
7414 gcc_cv_prog_makeinfo_modern=no
7415fi
7416
73458fb7 7417if test $gcc_cv_prog_makeinfo_modern = no; then
7c27e184 7418 MAKEINFO="$MISSING makeinfo"
ba479fd2
NN
7419 { echo "$as_me:$LINENO: WARNING:
7420*** Makeinfo is missing or too old.
7421*** Info documentation will not be built." >&5
7422echo "$as_me: WARNING:
cafe096b 7423*** Makeinfo is missing or too old.
ba479fd2 7424*** Info documentation will not be built." >&2;}
73458fb7
NN
7425 BUILD_INFO=
7426else
ba479fd2 7427 BUILD_INFO=info
73458fb7
NN
7428fi
7429
7c27e184 7430
73458fb7 7431# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
7432echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7433echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 7434if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
7435 echo "$as_me:$LINENO: result: yes" >&5
7436echo "${ECHO_T}yes" >&6
7437 GENERATED_MANPAGES=generated-manpages
73458fb7 7438else
ba479fd2
NN
7439 echo "$as_me:$LINENO: result: no" >&5
7440echo "${ECHO_T}no" >&6
73458fb7
NN
7441 GENERATED_MANPAGES=
7442fi
7443
7c27e184 7444
73458fb7 7445# How about lex?
7c27e184
PB
7446for ac_prog in flex
7447do
7448 # Extract the first word of "$ac_prog", so it can be a program name with args.
7449set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7450echo "$as_me:$LINENO: checking for $ac_word" >&5
7451echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7452if test "${ac_cv_prog_FLEX+set}" = set; then
7453 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7454else
7455 if test -n "$FLEX"; then
7456 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7457else
ba479fd2
NN
7458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7459for as_dir in $PATH
7460do
7461 IFS=$as_save_IFS
7462 test -z "$as_dir" && as_dir=.
7463 for ac_exec_ext in '' $ac_executable_extensions; do
7464 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7465 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
7466 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7467 break 2
7468 fi
7469done
7470done
7471
73458fb7
NN
7472fi
7473fi
ba479fd2 7474FLEX=$ac_cv_prog_FLEX
73458fb7 7475if test -n "$FLEX"; then
ba479fd2
NN
7476 echo "$as_me:$LINENO: result: $FLEX" >&5
7477echo "${ECHO_T}$FLEX" >&6
73458fb7 7478else
ba479fd2
NN
7479 echo "$as_me:$LINENO: result: no" >&5
7480echo "${ECHO_T}no" >&6
73458fb7
NN
7481fi
7482
7c27e184
PB
7483 test -n "$FLEX" && break
7484done
7485test -n "$FLEX" || FLEX="$MISSING flex"
7486
73458fb7
NN
7487
7488# Bison?
7c27e184
PB
7489for ac_prog in bison
7490do
7491 # Extract the first word of "$ac_prog", so it can be a program name with args.
7492set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7493echo "$as_me:$LINENO: checking for $ac_word" >&5
7494echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7495if test "${ac_cv_prog_BISON+set}" = set; then
7496 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7497else
7498 if test -n "$BISON"; then
7499 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7500else
ba479fd2
NN
7501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7502for as_dir in $PATH
7503do
7504 IFS=$as_save_IFS
7505 test -z "$as_dir" && as_dir=.
7506 for ac_exec_ext in '' $ac_executable_extensions; do
7507 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7508 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
7509 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7510 break 2
7511 fi
7512done
7513done
7514
73458fb7
NN
7515fi
7516fi
ba479fd2 7517BISON=$ac_cv_prog_BISON
73458fb7 7518if test -n "$BISON"; then
ba479fd2
NN
7519 echo "$as_me:$LINENO: result: $BISON" >&5
7520echo "${ECHO_T}$BISON" >&6
73458fb7 7521else
ba479fd2
NN
7522 echo "$as_me:$LINENO: result: no" >&5
7523echo "${ECHO_T}no" >&6
73458fb7
NN
7524fi
7525
7c27e184
PB
7526 test -n "$BISON" && break
7527done
7528test -n "$BISON" || BISON="$MISSING bison"
7529
7530
7531# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7532# check for build == host before using them.
73458fb7 7533
f6a874ac 7534# NM
414adbdd
GK
7535if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7536 && test -d ../binutils ; then
f6a874ac
JW
7537 NM='$(objdir)/../binutils/nm-new'
7538else
7539 # Extract the first word of "nm", so it can be a program name with args.
7540set dummy nm; ac_word=$2
7541echo "$as_me:$LINENO: checking for $ac_word" >&5
7542echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7543if test "${ac_cv_prog_NM+set}" = set; then
7544 echo $ECHO_N "(cached) $ECHO_C" >&6
7545else
7546 if test -n "$NM"; then
7547 ac_cv_prog_NM="$NM" # Let the user override the test.
7548else
7549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7550for as_dir in $PATH
7551do
7552 IFS=$as_save_IFS
7553 test -z "$as_dir" && as_dir=.
7554 for ac_exec_ext in '' $ac_executable_extensions; do
7555 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7556 ac_cv_prog_NM="nm"
7557 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7558 break 2
7559 fi
7560done
7561done
7562
7563 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7564fi
7565fi
7566NM=$ac_cv_prog_NM
7567if test -n "$NM"; then
7568 echo "$as_me:$LINENO: result: $NM" >&5
7569echo "${ECHO_T}$NM" >&6
7570else
7571 echo "$as_me:$LINENO: result: no" >&5
7572echo "${ECHO_T}no" >&6
7573fi
7574
7575fi
7576
7577# AR
414adbdd
GK
7578if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7579 && test -d ../binutils ; then
f6a874ac
JW
7580 AR='$(objdir)/../binutils/ar'
7581else
7582 # Extract the first word of "ar", so it can be a program name with args.
7583set dummy ar; ac_word=$2
7584echo "$as_me:$LINENO: checking for $ac_word" >&5
7585echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7586if test "${ac_cv_prog_AR+set}" = set; then
7587 echo $ECHO_N "(cached) $ECHO_C" >&6
7588else
7589 if test -n "$AR"; then
7590 ac_cv_prog_AR="$AR" # Let the user override the test.
7591else
7592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7593for as_dir in $PATH
7594do
7595 IFS=$as_save_IFS
7596 test -z "$as_dir" && as_dir=.
7597 for ac_exec_ext in '' $ac_executable_extensions; do
7598 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7599 ac_cv_prog_AR="ar"
7600 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7601 break 2
7602 fi
7603done
7604done
7605
7606 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7607fi
7608fi
7609AR=$ac_cv_prog_AR
7610if test -n "$AR"; then
7611 echo "$as_me:$LINENO: result: $AR" >&5
7612echo "${ECHO_T}$AR" >&6
7613else
7614 echo "$as_me:$LINENO: result: no" >&5
7615echo "${ECHO_T}no" >&6
7616fi
7617
7618fi
7619
7620
73458fb7
NN
7621# --------------------
7622# Checks for C headers
7623# --------------------
7624
ba479fd2
NN
7625echo "$as_me:$LINENO: checking for GNU C library" >&5
7626echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
7627if test "${gcc_cv_glibc+set}" = set; then
7628 echo $ECHO_N "(cached) $ECHO_C" >&6
7629else
7630 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7631/* confdefs.h. */
7632_ACEOF
7633cat confdefs.h >>conftest.$ac_ext
7634cat >>conftest.$ac_ext <<_ACEOF
7635/* end confdefs.h. */
73458fb7 7636#include <features.h>
ba479fd2
NN
7637int
7638main ()
7639{
73458fb7
NN
7640
7641#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7642#error Not a GNU C library system
7643#endif
ba479fd2
NN
7644 ;
7645 return 0;
7646}
7647_ACEOF
7648rm -f conftest.$ac_objext
7649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7650 (eval $ac_compile) 2>conftest.er1
ba479fd2 7651 ac_status=$?
86da66b5
HPN
7652 grep -v '^ *+' conftest.er1 >conftest.err
7653 rm -f conftest.er1
7654 cat conftest.err >&5
ba479fd2
NN
7655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7656 (exit $ac_status); } &&
a1286ef5
ZW
7657 { ac_try='test -z "$ac_c_werror_flag"
7658 || test ! -s conftest.err'
86da66b5
HPN
7659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7660 (eval $ac_try) 2>&5
7661 ac_status=$?
7662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7663 (exit $ac_status); }; } &&
7664 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7666 (eval $ac_try) 2>&5
7667 ac_status=$?
7668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7669 (exit $ac_status); }; }; then
73458fb7
NN
7670 gcc_cv_glibc=yes
7671else
ba479fd2
NN
7672 echo "$as_me: failed program was:" >&5
7673sed 's/^/| /' conftest.$ac_ext >&5
7674
7675gcc_cv_glibc=no
73458fb7 7676fi
86da66b5 7677rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
7678fi
7679
ba479fd2
NN
7680echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7681echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 7682if test $gcc_cv_glibc = yes; then
ba479fd2
NN
7683
7684cat >>confdefs.h <<\_ACEOF
73458fb7 7685#define _GNU_SOURCE 1
ba479fd2 7686_ACEOF
73458fb7
NN
7687
7688fi
7689
ca9bc441
NN
7690# Need to reject headers which give warnings, so that the -Werror bootstrap
7691# works later. *sigh* This needs to come before all header checks.
7692
7693ac_c_preproc_warn_flag=yes
7694
ba479fd2
NN
7695echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7696echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7697if test "${ac_cv_header_stdc+set}" = set; then
7698 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7699else
ba479fd2 7700 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7701/* confdefs.h. */
7702_ACEOF
7703cat confdefs.h >>conftest.$ac_ext
7704cat >>conftest.$ac_ext <<_ACEOF
7705/* end confdefs.h. */
956d6950
JL
7706#include <stdlib.h>
7707#include <stdarg.h>
7708#include <string.h>
7709#include <float.h>
ba479fd2
NN
7710
7711int
7712main ()
7713{
7714
7715 ;
7716 return 0;
7717}
7718_ACEOF
7719rm -f conftest.$ac_objext
7720if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7721 (eval $ac_compile) 2>conftest.er1
ba479fd2 7722 ac_status=$?
86da66b5
HPN
7723 grep -v '^ *+' conftest.er1 >conftest.err
7724 rm -f conftest.er1
7725 cat conftest.err >&5
ba479fd2
NN
7726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7727 (exit $ac_status); } &&
a1286ef5
ZW
7728 { ac_try='test -z "$ac_c_werror_flag"
7729 || test ! -s conftest.err'
86da66b5
HPN
7730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7731 (eval $ac_try) 2>&5
7732 ac_status=$?
7733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7734 (exit $ac_status); }; } &&
7735 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7737 (eval $ac_try) 2>&5
7738 ac_status=$?
7739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7740 (exit $ac_status); }; }; then
956d6950
JL
7741 ac_cv_header_stdc=yes
7742else
ba479fd2
NN
7743 echo "$as_me: failed program was:" >&5
7744sed 's/^/| /' conftest.$ac_ext >&5
7745
7746ac_cv_header_stdc=no
956d6950 7747fi
86da66b5 7748rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
7749
7750if test $ac_cv_header_stdc = yes; then
7751 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 7752 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7753/* confdefs.h. */
7754_ACEOF
7755cat confdefs.h >>conftest.$ac_ext
7756cat >>conftest.$ac_ext <<_ACEOF
7757/* end confdefs.h. */
956d6950 7758#include <string.h>
ba479fd2
NN
7759
7760_ACEOF
956d6950 7761if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7762 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
7763 :
7764else
956d6950
JL
7765 ac_cv_header_stdc=no
7766fi
7767rm -f conftest*
7768
7769fi
7770
7771if test $ac_cv_header_stdc = yes; then
7772 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 7773 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7774/* confdefs.h. */
7775_ACEOF
7776cat confdefs.h >>conftest.$ac_ext
7777cat >>conftest.$ac_ext <<_ACEOF
7778/* end confdefs.h. */
956d6950 7779#include <stdlib.h>
ba479fd2
NN
7780
7781_ACEOF
956d6950 7782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7783 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
7784 :
7785else
956d6950
JL
7786 ac_cv_header_stdc=no
7787fi
7788rm -f conftest*
7789
7790fi
7791
7792if test $ac_cv_header_stdc = yes; then
7793 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 7794 if test "$cross_compiling" = yes; then
956d6950
JL
7795 :
7796else
ba479fd2 7797 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7798/* confdefs.h. */
7799_ACEOF
7800cat confdefs.h >>conftest.$ac_ext
7801cat >>conftest.$ac_ext <<_ACEOF
7802/* end confdefs.h. */
956d6950 7803#include <ctype.h>
ba479fd2
NN
7804#if ((' ' & 0x0FF) == 0x020)
7805# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7806# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7807#else
7808# define ISLOWER(c) \
86da66b5
HPN
7809 (('a' <= (c) && (c) <= 'i') \
7810 || ('j' <= (c) && (c) <= 'r') \
7811 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
7812# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7813#endif
63cf211a 7814
ba479fd2
NN
7815#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7816int
7817main ()
7818{
7819 int i;
7820 for (i = 0; i < 256; i++)
7821 if (XOR (islower (i), ISLOWER (i))
86da66b5 7822 || toupper (i) != TOUPPER (i))
ba479fd2
NN
7823 exit(2);
7824 exit (0);
7825}
7826_ACEOF
7827rm -f conftest$ac_exeext
7828if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7829 (eval $ac_link) 2>&5
7830 ac_status=$?
7831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7832 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7834 (eval $ac_try) 2>&5
7835 ac_status=$?
7836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7837 (exit $ac_status); }; }; then
956d6950
JL
7838 :
7839else
ba479fd2
NN
7840 echo "$as_me: program exited with status $ac_status" >&5
7841echo "$as_me: failed program was:" >&5
7842sed 's/^/| /' conftest.$ac_ext >&5
7843
7844( exit $ac_status )
7845ac_cv_header_stdc=no
956d6950 7846fi
86da66b5 7847rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 7848fi
956d6950
JL
7849fi
7850fi
ba479fd2
NN
7851echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7852echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 7853if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
7854
7855cat >>confdefs.h <<\_ACEOF
956d6950 7856#define STDC_HEADERS 1
ba479fd2 7857_ACEOF
956d6950
JL
7858
7859fi
7860
ba479fd2
NN
7861echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7862echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
7863if test "${ac_cv_header_time+set}" = set; then
7864 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7865else
ba479fd2 7866 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7867/* confdefs.h. */
7868_ACEOF
7869cat confdefs.h >>conftest.$ac_ext
7870cat >>conftest.$ac_ext <<_ACEOF
7871/* end confdefs.h. */
956d6950
JL
7872#include <sys/types.h>
7873#include <sys/time.h>
7874#include <time.h>
ba479fd2
NN
7875
7876int
7877main ()
7878{
7879if ((struct tm *) 0)
7880return 0;
7881 ;
7882 return 0;
7883}
7884_ACEOF
7885rm -f conftest.$ac_objext
7886if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7887 (eval $ac_compile) 2>conftest.er1
ba479fd2 7888 ac_status=$?
86da66b5
HPN
7889 grep -v '^ *+' conftest.er1 >conftest.err
7890 rm -f conftest.er1
7891 cat conftest.err >&5
ba479fd2
NN
7892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7893 (exit $ac_status); } &&
a1286ef5
ZW
7894 { ac_try='test -z "$ac_c_werror_flag"
7895 || test ! -s conftest.err'
86da66b5
HPN
7896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7897 (eval $ac_try) 2>&5
7898 ac_status=$?
7899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7900 (exit $ac_status); }; } &&
7901 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7903 (eval $ac_try) 2>&5
7904 ac_status=$?
7905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7906 (exit $ac_status); }; }; then
956d6950
JL
7907 ac_cv_header_time=yes
7908else
ba479fd2
NN
7909 echo "$as_me: failed program was:" >&5
7910sed 's/^/| /' conftest.$ac_ext >&5
7911
7912ac_cv_header_time=no
956d6950 7913fi
86da66b5 7914rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 7915fi
ba479fd2
NN
7916echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7917echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 7918if test $ac_cv_header_time = yes; then
ba479fd2
NN
7919
7920cat >>confdefs.h <<\_ACEOF
956d6950 7921#define TIME_WITH_SYS_TIME 1
ba479fd2 7922_ACEOF
956d6950
JL
7923
7924fi
7925
41e622a8
AP
7926echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
7927echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
7928if test "${gcc_cv_header_string+set}" = set; then
7929 echo $ECHO_N "(cached) $ECHO_C" >&6
7930else
7931 cat >conftest.$ac_ext <<_ACEOF
7932/* confdefs.h. */
7933_ACEOF
7934cat confdefs.h >>conftest.$ac_ext
7935cat >>conftest.$ac_ext <<_ACEOF
7936/* end confdefs.h. */
7937#include <string.h>
7938#include <strings.h>
7939int
7940main ()
7941{
7942
7943 ;
7944 return 0;
7945}
7946_ACEOF
7947rm -f conftest.$ac_objext
7948if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7949 (eval $ac_compile) 2>conftest.er1
7950 ac_status=$?
7951 grep -v '^ *+' conftest.er1 >conftest.err
7952 rm -f conftest.er1
7953 cat conftest.err >&5
7954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7955 (exit $ac_status); } &&
a1286ef5
ZW
7956 { ac_try='test -z "$ac_c_werror_flag"
7957 || test ! -s conftest.err'
41e622a8
AP
7958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7959 (eval $ac_try) 2>&5
7960 ac_status=$?
7961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7962 (exit $ac_status); }; } &&
7963 { ac_try='test -s conftest.$ac_objext'
7964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7965 (eval $ac_try) 2>&5
7966 ac_status=$?
7967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7968 (exit $ac_status); }; }; then
7969 gcc_cv_header_string=yes
7970else
7971 echo "$as_me: failed program was:" >&5
7972sed 's/^/| /' conftest.$ac_ext >&5
7973
7974gcc_cv_header_string=no
7975fi
7976rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7977fi
7978echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
7979echo "${ECHO_T}$gcc_cv_header_string" >&6
7980if test $gcc_cv_header_string = yes; then
7981
7982cat >>confdefs.h <<\_ACEOF
7983#define STRING_WITH_STRINGS 1
7984_ACEOF
7985
7986fi
7987
ba479fd2
NN
7988echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7989echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
7990if test "${ac_cv_header_sys_wait_h+set}" = set; then
7991 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 7992else
ba479fd2 7993 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7994/* confdefs.h. */
7995_ACEOF
7996cat confdefs.h >>conftest.$ac_ext
7997cat >>conftest.$ac_ext <<_ACEOF
7998/* end confdefs.h. */
e9831ca0
KG
7999#include <sys/types.h>
8000#include <sys/wait.h>
8001#ifndef WEXITSTATUS
ba479fd2 8002# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
8003#endif
8004#ifndef WIFEXITED
ba479fd2 8005# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 8006#endif
ba479fd2
NN
8007
8008int
8009main ()
8010{
8011 int s;
8012 wait (&s);
8013 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8014 ;
8015 return 0;
8016}
8017_ACEOF
8018rm -f conftest.$ac_objext
8019if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8020 (eval $ac_compile) 2>conftest.er1
ba479fd2 8021 ac_status=$?
86da66b5
HPN
8022 grep -v '^ *+' conftest.er1 >conftest.err
8023 rm -f conftest.er1
8024 cat conftest.err >&5
ba479fd2
NN
8025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8026 (exit $ac_status); } &&
a1286ef5
ZW
8027 { ac_try='test -z "$ac_c_werror_flag"
8028 || test ! -s conftest.err'
86da66b5
HPN
8029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8030 (eval $ac_try) 2>&5
8031 ac_status=$?
8032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8033 (exit $ac_status); }; } &&
8034 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8036 (eval $ac_try) 2>&5
8037 ac_status=$?
8038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8039 (exit $ac_status); }; }; then
e9831ca0
KG
8040 ac_cv_header_sys_wait_h=yes
8041else
ba479fd2
NN
8042 echo "$as_me: failed program was:" >&5
8043sed 's/^/| /' conftest.$ac_ext >&5
8044
8045ac_cv_header_sys_wait_h=no
e9831ca0 8046fi
86da66b5 8047rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 8048fi
ba479fd2
NN
8049echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8050echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 8051if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
8052
8053cat >>confdefs.h <<\_ACEOF
e9831ca0 8054#define HAVE_SYS_WAIT_H 1
ba479fd2 8055_ACEOF
6e3f3080 8056
63cf211a 8057fi
6e3f3080 8058
ba479fd2
NN
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
dfb77e37
KC
8080
8081for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 8082 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 8083 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 8084 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 8085do
ba479fd2 8086as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 8087echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
8088echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8089if eval "test \"\${$as_ac_Header+set}\" = set"; then
8090 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8091else
ca9bc441 8092 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8093/* confdefs.h. */
8094_ACEOF
8095cat confdefs.h >>conftest.$ac_ext
8096cat >>conftest.$ac_ext <<_ACEOF
8097/* end confdefs.h. */
8098#include <$ac_header>
8099_ACEOF
8100if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8101 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8102 ac_status=$?
8103 grep -v '^ *+' conftest.er1 >conftest.err
8104 rm -f conftest.er1
8105 cat conftest.err >&5
8106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8107 (exit $ac_status); } >/dev/null; then
8108 if test -s conftest.err; then
8109 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8110 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8111 else
8112 ac_cpp_err=
8113 fi
8114else
8115 ac_cpp_err=yes
8116fi
8117if test -z "$ac_cpp_err"; then
ca9bc441 8118 eval "$as_ac_Header=yes"
ba479fd2
NN
8119else
8120 echo "$as_me: failed program was:" >&5
8121sed 's/^/| /' conftest.$ac_ext >&5
8122
ca9bc441 8123 eval "$as_ac_Header=no"
ba479fd2
NN
8124fi
8125rm -f conftest.err conftest.$ac_ext
6e3f3080 8126fi
ba479fd2
NN
8127echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8128echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
8129if test `eval echo '${'$as_ac_Header'}'` = yes; then
8130 cat >>confdefs.h <<_ACEOF
8131#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8132_ACEOF
8133
956d6950
JL
8134fi
8135done
8136
8137
f24af81b 8138# Check for thread headers.
ca9bc441 8139echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
8140echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
8141if test "${ac_cv_header_thread_h+set}" = set; then
8142 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8143else
ca9bc441 8144 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8145/* confdefs.h. */
8146_ACEOF
8147cat confdefs.h >>conftest.$ac_ext
8148cat >>conftest.$ac_ext <<_ACEOF
8149/* end confdefs.h. */
8150#include <thread.h>
8151_ACEOF
8152if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8153 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8154 ac_status=$?
8155 grep -v '^ *+' conftest.er1 >conftest.err
8156 rm -f conftest.er1
8157 cat conftest.err >&5
8158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8159 (exit $ac_status); } >/dev/null; then
8160 if test -s conftest.err; then
8161 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8162 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8163 else
8164 ac_cpp_err=
8165 fi
8166else
8167 ac_cpp_err=yes
8168fi
8169if test -z "$ac_cpp_err"; then
ca9bc441 8170 ac_cv_header_thread_h=yes
ba479fd2
NN
8171else
8172 echo "$as_me: failed program was:" >&5
8173sed 's/^/| /' conftest.$ac_ext >&5
8174
ca9bc441 8175 ac_cv_header_thread_h=no
ba479fd2
NN
8176fi
8177rm -f conftest.err conftest.$ac_ext
6e3f3080 8178fi
ba479fd2
NN
8179echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8180echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 8181if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
8182 have_thread_h=yes
8183else
ba479fd2 8184 have_thread_h=
f24af81b
TT
8185fi
8186
ca9bc441 8187echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
8188echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8189if test "${ac_cv_header_pthread_h+set}" = set; then
8190 echo $ECHO_N "(cached) $ECHO_C" >&6
f24af81b 8191else
ca9bc441 8192 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8193/* confdefs.h. */
8194_ACEOF
8195cat confdefs.h >>conftest.$ac_ext
8196cat >>conftest.$ac_ext <<_ACEOF
8197/* end confdefs.h. */
8198#include <pthread.h>
8199_ACEOF
8200if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8201 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8202 ac_status=$?
8203 grep -v '^ *+' conftest.er1 >conftest.err
8204 rm -f conftest.er1
8205 cat conftest.err >&5
8206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8207 (exit $ac_status); } >/dev/null; then
8208 if test -s conftest.err; then
8209 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8210 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8211 else
8212 ac_cpp_err=
8213 fi
8214else
8215 ac_cpp_err=yes
8216fi
8217if test -z "$ac_cpp_err"; then
ca9bc441 8218 ac_cv_header_pthread_h=yes
ba479fd2
NN
8219else
8220 echo "$as_me: failed program was:" >&5
8221sed 's/^/| /' conftest.$ac_ext >&5
8222
ca9bc441 8223 ac_cv_header_pthread_h=no
ba479fd2
NN
8224fi
8225rm -f conftest.err conftest.$ac_ext
6e3f3080 8226fi
ba479fd2
NN
8227echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8228echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 8229if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
8230 have_pthread_h=yes
8231else
ba479fd2 8232 have_pthread_h=
f24af81b
TT
8233fi
8234
8235
84c041a1 8236# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
8237echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8238echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
8239if test "${gcc_cv_decl_char_bit+set}" = set; then
8240 echo $ECHO_N "(cached) $ECHO_C" >&6
8241else
8242 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8243/* confdefs.h. */
8244_ACEOF
8245cat confdefs.h >>conftest.$ac_ext
8246cat >>conftest.$ac_ext <<_ACEOF
8247/* end confdefs.h. */
75e93faa
ZW
8248#ifdef HAVE_LIMITS_H
8249#include <limits.h>
8250#endif
8251#ifdef CHAR_BIT
8252found
8253#endif
ba479fd2 8254_ACEOF
75e93faa 8255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8256 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
8257 gcc_cv_decl_char_bit=yes
8258else
75e93faa
ZW
8259 gcc_cv_decl_char_bit=no
8260fi
8261rm -f conftest*
8262
8263
8264fi
ba479fd2
NN
8265echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8266echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 8267if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
8268 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8269echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
8270if test "${gcc_cv_c_nbby+set}" = set; then
8271 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
8272else
8273 i=8
8274 gcc_cv_c_nbby=
8275 while test $i -lt 65; do
ba479fd2 8276 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8277/* confdefs.h. */
8278_ACEOF
8279cat confdefs.h >>conftest.$ac_ext
8280cat >>conftest.$ac_ext <<_ACEOF
8281/* end confdefs.h. */
8282
8283int
8284main ()
8285{
4e70264f
ZW
8286switch(0) {
8287 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8288 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8289 ; }
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); } &&
a1286ef5
ZW
8303 { ac_try='test -z "$ac_c_werror_flag"
8304 || test ! -s conftest.err'
86da66b5
HPN
8305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8306 (eval $ac_try) 2>&5
8307 ac_status=$?
8308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8309 (exit $ac_status); }; } &&
8310 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8312 (eval $ac_try) 2>&5
8313 ac_status=$?
8314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8315 (exit $ac_status); }; }; then
4e70264f 8316 gcc_cv_c_nbby=$i; break
75e93faa 8317else
ba479fd2
NN
8318 echo "$as_me: failed program was:" >&5
8319sed 's/^/| /' conftest.$ac_ext >&5
8320
75e93faa 8321fi
86da66b5 8322rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
8323 i=`expr $i + 1`
8324 done
8325 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8326
8327fi
ba479fd2
NN
8328echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8329echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 8330if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
8331 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8332echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8333 { (exit 1); exit 1; }; }
75e93faa 8334else
ba479fd2
NN
8335
8336cat >>confdefs.h <<_ACEOF
75e93faa 8337#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 8338_ACEOF
75e93faa
ZW
8339
8340fi
8341fi
ba479fd2
NN
8342echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8343echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
8344if test "${ac_cv_c_bigendian+set}" = set; then
8345 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 8346else
9791c75c 8347 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 8348cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8349/* confdefs.h. */
8350_ACEOF
8351cat confdefs.h >>conftest.$ac_ext
8352cat >>conftest.$ac_ext <<_ACEOF
8353/* end confdefs.h. */
4977bab6
ZW
8354#include <sys/types.h>
8355#include <sys/param.h>
9791c75c 8356
ba479fd2
NN
8357int
8358main ()
8359{
4977bab6
ZW
8360#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8361 bogus endian macros
84c041a1 8362#endif
9791c75c 8363
ba479fd2
NN
8364 ;
8365 return 0;
8366}
8367_ACEOF
8368rm -f conftest.$ac_objext
8369if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8370 (eval $ac_compile) 2>conftest.er1
ba479fd2 8371 ac_status=$?
86da66b5
HPN
8372 grep -v '^ *+' conftest.er1 >conftest.err
8373 rm -f conftest.er1
8374 cat conftest.err >&5
ba479fd2
NN
8375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8376 (exit $ac_status); } &&
a1286ef5
ZW
8377 { ac_try='test -z "$ac_c_werror_flag"
8378 || test ! -s conftest.err'
86da66b5
HPN
8379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8380 (eval $ac_try) 2>&5
8381 ac_status=$?
8382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8383 (exit $ac_status); }; } &&
8384 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8386 (eval $ac_try) 2>&5
8387 ac_status=$?
8388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8389 (exit $ac_status); }; }; then
4977bab6 8390 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 8391cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8392/* confdefs.h. */
8393_ACEOF
8394cat confdefs.h >>conftest.$ac_ext
8395cat >>conftest.$ac_ext <<_ACEOF
8396/* end confdefs.h. */
4977bab6
ZW
8397#include <sys/types.h>
8398#include <sys/param.h>
9791c75c 8399
ba479fd2
NN
8400int
8401main ()
8402{
4977bab6
ZW
8403#if BYTE_ORDER != BIG_ENDIAN
8404 not big endian
84c041a1 8405#endif
9791c75c 8406
ba479fd2
NN
8407 ;
8408 return 0;
8409}
8410_ACEOF
8411rm -f conftest.$ac_objext
8412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8413 (eval $ac_compile) 2>conftest.er1
ba479fd2 8414 ac_status=$?
86da66b5
HPN
8415 grep -v '^ *+' conftest.er1 >conftest.err
8416 rm -f conftest.er1
8417 cat conftest.err >&5
ba479fd2
NN
8418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8419 (exit $ac_status); } &&
a1286ef5
ZW
8420 { ac_try='test -z "$ac_c_werror_flag"
8421 || test ! -s conftest.err'
86da66b5
HPN
8422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8423 (eval $ac_try) 2>&5
8424 ac_status=$?
8425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8426 (exit $ac_status); }; } &&
8427 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8429 (eval $ac_try) 2>&5
8430 ac_status=$?
8431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8432 (exit $ac_status); }; }; then
4977bab6
ZW
8433 ac_cv_c_bigendian=yes
8434else
ba479fd2
NN
8435 echo "$as_me: failed program was:" >&5
8436sed 's/^/| /' conftest.$ac_ext >&5
8437
8438ac_cv_c_bigendian=no
4977bab6 8439fi
86da66b5 8440rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8441else
ba479fd2
NN
8442 echo "$as_me: failed program was:" >&5
8443sed 's/^/| /' conftest.$ac_ext >&5
8444
9791c75c
KC
8445# It does not; compile a test program.
8446if test "$cross_compiling" = yes; then
8447 # try to guess the endianness by grepping values into an object file
8448 ac_cv_c_bigendian=unknown
8449 cat >conftest.$ac_ext <<_ACEOF
8450/* confdefs.h. */
8451_ACEOF
8452cat confdefs.h >>conftest.$ac_ext
8453cat >>conftest.$ac_ext <<_ACEOF
8454/* end confdefs.h. */
8455short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8456short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8457void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
8458short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8459short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8460void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
8461int
8462main ()
8463{
8464 _ascii (); _ebcdic ();
8465 ;
8466 return 0;
8467}
8468_ACEOF
8469rm -f conftest.$ac_objext
8470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8471 (eval $ac_compile) 2>conftest.er1
8472 ac_status=$?
8473 grep -v '^ *+' conftest.er1 >conftest.err
8474 rm -f conftest.er1
8475 cat conftest.err >&5
8476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8477 (exit $ac_status); } &&
8478 { ac_try='test -z "$ac_c_werror_flag"
8479 || test ! -s conftest.err'
8480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8481 (eval $ac_try) 2>&5
8482 ac_status=$?
8483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8484 (exit $ac_status); }; } &&
8485 { ac_try='test -s conftest.$ac_objext'
8486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8487 (eval $ac_try) 2>&5
8488 ac_status=$?
8489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8490 (exit $ac_status); }; }; then
8491 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
8492 ac_cv_c_bigendian=yes
8493fi
8494if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8495 if test "$ac_cv_c_bigendian" = unknown; then
8496 ac_cv_c_bigendian=no
8497 else
8498 # finding both strings is unlikely to happen, but who knows?
8499 ac_cv_c_bigendian=unknown
8500 fi
8501fi
8502else
8503 echo "$as_me: failed program was:" >&5
8504sed 's/^/| /' conftest.$ac_ext >&5
8505
4977bab6 8506fi
86da66b5 8507rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
8508else
8509 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8510/* confdefs.h. */
8511_ACEOF
8512cat confdefs.h >>conftest.$ac_ext
8513cat >>conftest.$ac_ext <<_ACEOF
8514/* end confdefs.h. */
9791c75c
KC
8515int
8516main ()
8517{
4977bab6
ZW
8518 /* Are we little or big endian? From Harbison&Steele. */
8519 union
8520 {
8521 long l;
8522 char c[sizeof (long)];
8523 } u;
8524 u.l = 1;
8525 exit (u.c[sizeof (long) - 1] == 1);
8526}
ba479fd2
NN
8527_ACEOF
8528rm -f conftest$ac_exeext
8529if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8530 (eval $ac_link) 2>&5
8531 ac_status=$?
8532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8533 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8535 (eval $ac_try) 2>&5
8536 ac_status=$?
8537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8538 (exit $ac_status); }; }; then
4977bab6
ZW
8539 ac_cv_c_bigendian=no
8540else
ba479fd2
NN
8541 echo "$as_me: program exited with status $ac_status" >&5
8542echo "$as_me: failed program was:" >&5
8543sed 's/^/| /' conftest.$ac_ext >&5
8544
8545( exit $ac_status )
8546ac_cv_c_bigendian=yes
4977bab6 8547fi
86da66b5 8548rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 8549fi
4977bab6 8550fi
9791c75c 8551rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8552fi
ba479fd2
NN
8553echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8554echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
8555case $ac_cv_c_bigendian in
8556 yes)
ba479fd2
NN
8557
8558cat >>confdefs.h <<\_ACEOF
4977bab6 8559#define WORDS_BIGENDIAN 1
ba479fd2 8560_ACEOF
9791c75c
KC
8561 ;;
8562 no)
8563 ;;
8564 *)
8565 { { echo "$as_me:$LINENO: error: unknown endianness
8566presetting ac_cv_c_bigendian=no (or yes) will help" >&5
8567echo "$as_me: error: unknown endianness
8568presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
8569 { (exit 1); exit 1; }; } ;;
8570esac
84c041a1 8571
75e93faa 8572
73458fb7
NN
8573# --------
8574# UNSORTED
8575# --------
1e608388 8576
73458fb7
NN
8577# Stage specific cflags for build.
8578stage1_cflags=
8579case $build in
8580vax-*-*)
8581 if test x$GCC = xyes
8582 then
8583 stage1_cflags="-Wa,-J"
8584 else
8585 stage1_cflags="-J"
8586 fi
8587 ;;
8588powerpc-*-darwin*)
8589 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
8590 # sources; use -no-cpp-precomp to get to GNU cpp.
8591 # Apple's GCC has bugs in designated initializer handling, so disable
8592 # that too.
8593 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
8594 ;;
8595esac
1e608388 8596
1e608388 8597
4e70264f
ZW
8598# These libraries may be used by collect2.
8599# We may need a special search path to get them linked.
ba479fd2
NN
8600echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8601echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
8602if test "${gcc_cv_collect2_libs+set}" = set; then
8603 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
8604else
8605 save_LIBS="$LIBS"
7f2749d4 8606for libs in '' -lld -lmld \
4e70264f
ZW
8607 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8608 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8609do
8610 LIBS="$libs"
ba479fd2 8611 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8612/* confdefs.h. */
8613_ACEOF
8614cat confdefs.h >>conftest.$ac_ext
8615cat >>conftest.$ac_ext <<_ACEOF
8616/* end confdefs.h. */
8617
4e70264f 8618/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8619#ifdef __cplusplus
8620extern "C"
8621#endif
4e70264f 8622/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8623 builtin and then its argument prototype would still apply. */
8624char ldopen ();
8625int
8626main ()
8627{
8628ldopen ();
8629 ;
8630 return 0;
8631}
8632_ACEOF
8633rm -f conftest.$ac_objext conftest$ac_exeext
8634if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8635 (eval $ac_link) 2>conftest.er1
ba479fd2 8636 ac_status=$?
86da66b5
HPN
8637 grep -v '^ *+' conftest.er1 >conftest.err
8638 rm -f conftest.er1
8639 cat conftest.err >&5
ba479fd2
NN
8640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8641 (exit $ac_status); } &&
a1286ef5
ZW
8642 { ac_try='test -z "$ac_c_werror_flag"
8643 || test ! -s conftest.err'
86da66b5
HPN
8644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8645 (eval $ac_try) 2>&5
8646 ac_status=$?
8647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8648 (exit $ac_status); }; } &&
8649 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8651 (eval $ac_try) 2>&5
8652 ac_status=$?
8653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8654 (exit $ac_status); }; }; then
4e70264f
ZW
8655 gcc_cv_collect2_libs="$libs"; break
8656else
ba479fd2
NN
8657 echo "$as_me: failed program was:" >&5
8658sed 's/^/| /' conftest.$ac_ext >&5
8659
4e70264f 8660fi
86da66b5
HPN
8661rm -f conftest.err conftest.$ac_objext \
8662 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8663done
8664LIBS="$save_LIBS"
8665test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8666fi
ba479fd2
NN
8667echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8668echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
8669case $gcc_cv_collect2_libs in
8670 "none required") ;;
8671 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8672esac
8673
8674
7f2749d4
RK
8675# When building Ada code on Alpha, we need exc_resume which is usually in
8676# -lexc. So test for it.
8677save_LIBS="$LIBS"
8678LIBS=
ba479fd2
NN
8679echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8680echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
8681if test "${ac_cv_search_exc_resume+set}" = set; then
8682 echo $ECHO_N "(cached) $ECHO_C" >&6
8683else
8684 ac_func_search_save_LIBS=$LIBS
8685ac_cv_search_exc_resume=no
8686cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8687/* confdefs.h. */
8688_ACEOF
8689cat confdefs.h >>conftest.$ac_ext
8690cat >>conftest.$ac_ext <<_ACEOF
8691/* end confdefs.h. */
7f2749d4 8692
7f2749d4 8693/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8694#ifdef __cplusplus
8695extern "C"
8696#endif
7f2749d4 8697/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8698 builtin and then its argument prototype would still apply. */
8699char exc_resume ();
8700int
8701main ()
8702{
8703exc_resume ();
8704 ;
8705 return 0;
8706}
8707_ACEOF
8708rm -f conftest.$ac_objext conftest$ac_exeext
8709if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8710 (eval $ac_link) 2>conftest.er1
ba479fd2 8711 ac_status=$?
86da66b5
HPN
8712 grep -v '^ *+' conftest.er1 >conftest.err
8713 rm -f conftest.er1
8714 cat conftest.err >&5
ba479fd2
NN
8715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8716 (exit $ac_status); } &&
a1286ef5
ZW
8717 { ac_try='test -z "$ac_c_werror_flag"
8718 || test ! -s conftest.err'
86da66b5
HPN
8719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8720 (eval $ac_try) 2>&5
8721 ac_status=$?
8722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8723 (exit $ac_status); }; } &&
8724 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8726 (eval $ac_try) 2>&5
8727 ac_status=$?
8728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8729 (exit $ac_status); }; }; then
7f2749d4
RK
8730 ac_cv_search_exc_resume="none required"
8731else
ba479fd2
NN
8732 echo "$as_me: failed program was:" >&5
8733sed 's/^/| /' conftest.$ac_ext >&5
8734
7f2749d4 8735fi
86da66b5
HPN
8736rm -f conftest.err conftest.$ac_objext \
8737 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8738if test "$ac_cv_search_exc_resume" = no; then
8739 for ac_lib in exc; do
8740 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8741 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8742/* confdefs.h. */
8743_ACEOF
8744cat confdefs.h >>conftest.$ac_ext
8745cat >>conftest.$ac_ext <<_ACEOF
8746/* end confdefs.h. */
8747
7f2749d4 8748/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8749#ifdef __cplusplus
8750extern "C"
8751#endif
7f2749d4 8752/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8753 builtin and then its argument prototype would still apply. */
8754char exc_resume ();
8755int
8756main ()
8757{
8758exc_resume ();
8759 ;
8760 return 0;
8761}
8762_ACEOF
8763rm -f conftest.$ac_objext conftest$ac_exeext
8764if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8765 (eval $ac_link) 2>conftest.er1
ba479fd2 8766 ac_status=$?
86da66b5
HPN
8767 grep -v '^ *+' conftest.er1 >conftest.err
8768 rm -f conftest.er1
8769 cat conftest.err >&5
ba479fd2
NN
8770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8771 (exit $ac_status); } &&
a1286ef5
ZW
8772 { ac_try='test -z "$ac_c_werror_flag"
8773 || test ! -s conftest.err'
86da66b5
HPN
8774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8775 (eval $ac_try) 2>&5
8776 ac_status=$?
8777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8778 (exit $ac_status); }; } &&
8779 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8781 (eval $ac_try) 2>&5
8782 ac_status=$?
8783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8784 (exit $ac_status); }; }; then
8785 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
8786break
8787else
ba479fd2
NN
8788 echo "$as_me: failed program was:" >&5
8789sed 's/^/| /' conftest.$ac_ext >&5
8790
cafe096b 8791fi
86da66b5
HPN
8792rm -f conftest.err conftest.$ac_objext \
8793 conftest$ac_exeext conftest.$ac_ext
ba479fd2 8794 done
6e3f3080 8795fi
ba479fd2
NN
8796LIBS=$ac_func_search_save_LIBS
8797fi
8798echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
8799echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
8800if test "$ac_cv_search_exc_resume" != no; then
63cf211a 8801 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 8802
7f2749d4 8803fi
ba479fd2 8804
7f2749d4
RK
8805GNAT_LIBEXC="$LIBS"
8806LIBS="$save_LIBS"
8807
8808
62c9aa5f
ZW
8809# Some systems put ldexp and frexp in libm instead of libc; assume
8810# they're both in the same place. jcf-dump needs them.
8811save_LIBS="$LIBS"
8812LIBS=
ba479fd2
NN
8813echo "$as_me:$LINENO: checking for library containing ldexp" >&5
8814echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
8815if test "${ac_cv_search_ldexp+set}" = set; then
8816 echo $ECHO_N "(cached) $ECHO_C" >&6
8817else
8818 ac_func_search_save_LIBS=$LIBS
8819ac_cv_search_ldexp=no
8820cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8821/* confdefs.h. */
8822_ACEOF
8823cat confdefs.h >>conftest.$ac_ext
8824cat >>conftest.$ac_ext <<_ACEOF
8825/* end confdefs.h. */
62c9aa5f 8826
62c9aa5f 8827/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8828#ifdef __cplusplus
8829extern "C"
8830#endif
62c9aa5f 8831/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8832 builtin and then its argument prototype would still apply. */
8833char ldexp ();
8834int
8835main ()
8836{
8837ldexp ();
8838 ;
8839 return 0;
8840}
8841_ACEOF
8842rm -f conftest.$ac_objext conftest$ac_exeext
8843if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8844 (eval $ac_link) 2>conftest.er1
ba479fd2 8845 ac_status=$?
86da66b5
HPN
8846 grep -v '^ *+' conftest.er1 >conftest.err
8847 rm -f conftest.er1
8848 cat conftest.err >&5
ba479fd2
NN
8849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8850 (exit $ac_status); } &&
a1286ef5
ZW
8851 { ac_try='test -z "$ac_c_werror_flag"
8852 || test ! -s conftest.err'
86da66b5
HPN
8853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8854 (eval $ac_try) 2>&5
8855 ac_status=$?
8856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8857 (exit $ac_status); }; } &&
8858 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8860 (eval $ac_try) 2>&5
8861 ac_status=$?
8862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8863 (exit $ac_status); }; }; then
62c9aa5f
ZW
8864 ac_cv_search_ldexp="none required"
8865else
ba479fd2
NN
8866 echo "$as_me: failed program was:" >&5
8867sed 's/^/| /' conftest.$ac_ext >&5
8868
62c9aa5f 8869fi
86da66b5
HPN
8870rm -f conftest.err conftest.$ac_objext \
8871 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8872if test "$ac_cv_search_ldexp" = no; then
8873 for ac_lib in m; do
8874 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8875 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8876/* confdefs.h. */
8877_ACEOF
8878cat confdefs.h >>conftest.$ac_ext
8879cat >>conftest.$ac_ext <<_ACEOF
8880/* end confdefs.h. */
8881
62c9aa5f 8882/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8883#ifdef __cplusplus
8884extern "C"
8885#endif
62c9aa5f 8886/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8887 builtin and then its argument prototype would still apply. */
8888char ldexp ();
8889int
8890main ()
8891{
8892ldexp ();
8893 ;
8894 return 0;
8895}
8896_ACEOF
8897rm -f conftest.$ac_objext conftest$ac_exeext
8898if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8899 (eval $ac_link) 2>conftest.er1
ba479fd2 8900 ac_status=$?
86da66b5
HPN
8901 grep -v '^ *+' conftest.er1 >conftest.err
8902 rm -f conftest.er1
8903 cat conftest.err >&5
ba479fd2
NN
8904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8905 (exit $ac_status); } &&
a1286ef5
ZW
8906 { ac_try='test -z "$ac_c_werror_flag"
8907 || test ! -s conftest.err'
86da66b5
HPN
8908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8909 (eval $ac_try) 2>&5
8910 ac_status=$?
8911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8912 (exit $ac_status); }; } &&
8913 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8915 (eval $ac_try) 2>&5
8916 ac_status=$?
8917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8918 (exit $ac_status); }; }; then
8919 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
8920break
8921else
ba479fd2
NN
8922 echo "$as_me: failed program was:" >&5
8923sed 's/^/| /' conftest.$ac_ext >&5
8924
cafe096b 8925fi
86da66b5
HPN
8926rm -f conftest.err conftest.$ac_objext \
8927 conftest$ac_exeext conftest.$ac_ext
ba479fd2 8928 done
6e3f3080 8929fi
ba479fd2
NN
8930LIBS=$ac_func_search_save_LIBS
8931fi
8932echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
8933echo "${ECHO_T}$ac_cv_search_ldexp" >&6
8934if test "$ac_cv_search_ldexp" != no; then
63cf211a 8935 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 8936
62c9aa5f 8937fi
ba479fd2 8938
62c9aa5f
ZW
8939LDEXP_LIB="$LIBS"
8940LIBS="$save_LIBS"
8941
8942
956d6950
JL
8943# Use <inttypes.h> only if it exists,
8944# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
8945echo "$as_me:$LINENO: checking for inttypes.h" >&5
8946echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
8947if test "${gcc_cv_header_inttypes_h+set}" = set; then
8948 echo $ECHO_N "(cached) $ECHO_C" >&6
8949else
8950 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8951/* confdefs.h. */
8952_ACEOF
8953cat confdefs.h >>conftest.$ac_ext
8954cat >>conftest.$ac_ext <<_ACEOF
8955/* end confdefs.h. */
956d6950
JL
8956#include <sys/types.h>
8957#include <inttypes.h>
ba479fd2
NN
8958int
8959main ()
8960{
956d6950 8961intmax_t i = -1;
ba479fd2
NN
8962 ;
8963 return 0;
8964}
8965_ACEOF
8966rm -f conftest.$ac_objext
8967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8968 (eval $ac_compile) 2>conftest.er1
ba479fd2 8969 ac_status=$?
86da66b5
HPN
8970 grep -v '^ *+' conftest.er1 >conftest.err
8971 rm -f conftest.er1
8972 cat conftest.err >&5
ba479fd2
NN
8973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8974 (exit $ac_status); } &&
a1286ef5
ZW
8975 { ac_try='test -z "$ac_c_werror_flag"
8976 || test ! -s conftest.err'
86da66b5
HPN
8977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8978 (eval $ac_try) 2>&5
8979 ac_status=$?
8980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8981 (exit $ac_status); }; } &&
8982 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8984 (eval $ac_try) 2>&5
8985 ac_status=$?
8986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8987 (exit $ac_status); }; }; then
0056a9b5 8988 gcc_cv_header_inttypes_h=yes
956d6950 8989else
ba479fd2
NN
8990 echo "$as_me: failed program was:" >&5
8991sed 's/^/| /' conftest.$ac_ext >&5
8992
8993gcc_cv_header_inttypes_h=no
956d6950 8994fi
86da66b5 8995rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
8996fi
8997
ba479fd2
NN
8998echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
8999echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 9000if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
9001
9002cat >>confdefs.h <<\_ACEOF
0056a9b5 9003#define HAVE_INTTYPES_H 1
ba479fd2 9004_ACEOF
0056a9b5
KG
9005
9006fi
956d6950 9007
c149cc37 9008
ba479fd2
NN
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
0d667716
KG
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
ba479fd2
NN
9037
9038
9039
9040
9041
9042
9043
9044
9045
6af8c740 9046for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
0d667716
KG
9047 sysconf strsignal getrusage nl_langinfo scandir alphasort \
9048 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9049 clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
956d6950 9050do
ba479fd2
NN
9051as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9052echo "$as_me:$LINENO: checking for $ac_func" >&5
9053echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9054if eval "test \"\${$as_ac_var+set}\" = set"; then
9055 echo $ECHO_N "(cached) $ECHO_C" >&6
9056else
9057 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9058/* confdefs.h. */
9059_ACEOF
9060cat confdefs.h >>conftest.$ac_ext
9061cat >>conftest.$ac_ext <<_ACEOF
9062/* end confdefs.h. */
86da66b5
HPN
9063/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9064 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9065#define $ac_func innocuous_$ac_func
9066
956d6950 9067/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9068 which can conflict with char $ac_func (); below.
9069 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9070 <limits.h> exists even on freestanding compilers. */
86da66b5 9071
ba479fd2
NN
9072#ifdef __STDC__
9073# include <limits.h>
9074#else
9075# include <assert.h>
9076#endif
86da66b5
HPN
9077
9078#undef $ac_func
9079
6e3f3080 9080/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9081#ifdef __cplusplus
9082extern "C"
9083{
9084#endif
6e3f3080 9085/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9086 builtin and then its argument prototype would still apply. */
9087char $ac_func ();
956d6950
JL
9088/* The GNU C library defines this for functions which it implements
9089 to always fail with ENOSYS. Some functions are actually named
9090 something starting with __ and the normal name is an alias. */
9091#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9092choke me
9093#else
ba479fd2
NN
9094char (*f) () = $ac_func;
9095#endif
9096#ifdef __cplusplus
9097}
956d6950
JL
9098#endif
9099
ba479fd2
NN
9100int
9101main ()
9102{
9103return f != $ac_func;
9104 ;
9105 return 0;
9106}
9107_ACEOF
9108rm -f conftest.$ac_objext conftest$ac_exeext
9109if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9110 (eval $ac_link) 2>conftest.er1
ba479fd2 9111 ac_status=$?
86da66b5
HPN
9112 grep -v '^ *+' conftest.er1 >conftest.err
9113 rm -f conftest.er1
9114 cat conftest.err >&5
ba479fd2
NN
9115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9116 (exit $ac_status); } &&
a1286ef5
ZW
9117 { ac_try='test -z "$ac_c_werror_flag"
9118 || test ! -s conftest.err'
86da66b5
HPN
9119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9120 (eval $ac_try) 2>&5
9121 ac_status=$?
9122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9123 (exit $ac_status); }; } &&
9124 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9126 (eval $ac_try) 2>&5
9127 ac_status=$?
9128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9129 (exit $ac_status); }; }; then
9130 eval "$as_ac_var=yes"
9131else
9132 echo "$as_me: failed program was:" >&5
9133sed 's/^/| /' conftest.$ac_ext >&5
9134
9135eval "$as_ac_var=no"
9136fi
86da66b5
HPN
9137rm -f conftest.err conftest.$ac_objext \
9138 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9139fi
9140echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9141echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9142if test `eval echo '${'$as_ac_var'}'` = yes; then
9143 cat >>confdefs.h <<_ACEOF
9144#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9145_ACEOF
956d6950 9146
956d6950
JL
9147fi
9148done
9149
6885fc87 9150
39f6c4c8 9151if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
9152 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9153echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
9154if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9155 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9156else
9157 if test "$cross_compiling" = yes; then
9158 gcc_cv_func_mbstowcs_works=yes
9159else
ba479fd2 9160 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9161/* confdefs.h. */
9162_ACEOF
9163cat confdefs.h >>conftest.$ac_ext
9164cat >>conftest.$ac_ext <<_ACEOF
9165/* end confdefs.h. */
39f6c4c8
KW
9166#include <stdlib.h>
9167int main()
9168{
9169 mbstowcs(0, "", 0);
9170 return 0;
9171}
ba479fd2
NN
9172_ACEOF
9173rm -f conftest$ac_exeext
9174if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9175 (eval $ac_link) 2>&5
9176 ac_status=$?
9177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9178 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9180 (eval $ac_try) 2>&5
9181 ac_status=$?
9182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9183 (exit $ac_status); }; }; then
39f6c4c8
KW
9184 gcc_cv_func_mbstowcs_works=yes
9185else
ba479fd2
NN
9186 echo "$as_me: program exited with status $ac_status" >&5
9187echo "$as_me: failed program was:" >&5
9188sed 's/^/| /' conftest.$ac_ext >&5
9189
9190( exit $ac_status )
9191gcc_cv_func_mbstowcs_works=no
39f6c4c8 9192fi
86da66b5 9193rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 9194fi
39f6c4c8 9195fi
ba479fd2
NN
9196echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9197echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 9198 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
9199
9200cat >>confdefs.h <<\_ACEOF
39f6c4c8 9201#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 9202_ACEOF
39f6c4c8
KW
9203
9204 fi
9205fi
9206
ba479fd2
NN
9207echo "$as_me:$LINENO: checking for ssize_t" >&5
9208echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
9209if test "${ac_cv_type_ssize_t+set}" = set; then
9210 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 9211else
ba479fd2 9212 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9213/* confdefs.h. */
9214_ACEOF
9215cat confdefs.h >>conftest.$ac_ext
9216cat >>conftest.$ac_ext <<_ACEOF
9217/* end confdefs.h. */
8b4fc07a
NN
9218$ac_includes_default
9219int
9220main ()
9221{
9222if ((ssize_t *) 0)
9223 return 0;
9224if (sizeof (ssize_t))
9225 return 0;
9226 ;
9227 return 0;
9228}
ba479fd2 9229_ACEOF
8b4fc07a
NN
9230rm -f conftest.$ac_objext
9231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9232 (eval $ac_compile) 2>conftest.er1
8b4fc07a 9233 ac_status=$?
86da66b5
HPN
9234 grep -v '^ *+' conftest.er1 >conftest.err
9235 rm -f conftest.er1
9236 cat conftest.err >&5
8b4fc07a
NN
9237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9238 (exit $ac_status); } &&
a1286ef5
ZW
9239 { ac_try='test -z "$ac_c_werror_flag"
9240 || test ! -s conftest.err'
86da66b5
HPN
9241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9242 (eval $ac_try) 2>&5
9243 ac_status=$?
9244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9245 (exit $ac_status); }; } &&
9246 { ac_try='test -s conftest.$ac_objext'
8b4fc07a
NN
9247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9248 (eval $ac_try) 2>&5
9249 ac_status=$?
9250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9251 (exit $ac_status); }; }; then
cb65112a 9252 ac_cv_type_ssize_t=yes
f12bc141 9253else
8b4fc07a
NN
9254 echo "$as_me: failed program was:" >&5
9255sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9256
8b4fc07a
NN
9257ac_cv_type_ssize_t=no
9258fi
86da66b5 9259rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9260fi
ba479fd2
NN
9261echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9262echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
9263if test $ac_cv_type_ssize_t = yes; then
9264 :
9265else
ba479fd2 9266
8b4fc07a 9267cat >>confdefs.h <<_ACEOF
f12bc141 9268#define ssize_t int
ba479fd2 9269_ACEOF
f12bc141
ZW
9270
9271fi
9272
0b9d02c6 9273
e256b8b6
DA
9274# Try to determine the array type of the second argument of getgroups
9275# for the target system (int or gid_t).
ba479fd2
NN
9276echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9277echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
9278if test "${ac_cv_type_uid_t+set}" = set; then
9279 echo $ECHO_N "(cached) $ECHO_C" >&6
9280else
9281 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9282/* confdefs.h. */
9283_ACEOF
9284cat confdefs.h >>conftest.$ac_ext
9285cat >>conftest.$ac_ext <<_ACEOF
9286/* end confdefs.h. */
e256b8b6 9287#include <sys/types.h>
ba479fd2
NN
9288
9289_ACEOF
e256b8b6 9290if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9291 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
9292 ac_cv_type_uid_t=yes
9293else
e256b8b6
DA
9294 ac_cv_type_uid_t=no
9295fi
9296rm -f conftest*
9297
9298fi
ba479fd2
NN
9299echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9300echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 9301if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
9302
9303cat >>confdefs.h <<\_ACEOF
e256b8b6 9304#define uid_t int
ba479fd2 9305_ACEOF
cafe096b 9306
ba479fd2
NN
9307
9308cat >>confdefs.h <<\_ACEOF
e256b8b6 9309#define gid_t int
ba479fd2 9310_ACEOF
e256b8b6
DA
9311
9312fi
9313
ba479fd2
NN
9314echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9315echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
9316if test "${ac_cv_type_getgroups+set}" = set; then
9317 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
9318else
9319 if test "$cross_compiling" = yes; then
9320 ac_cv_type_getgroups=cross
9321else
ba479fd2 9322 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9323/* confdefs.h. */
9324_ACEOF
9325cat confdefs.h >>conftest.$ac_ext
9326cat >>conftest.$ac_ext <<_ACEOF
9327/* end confdefs.h. */
e256b8b6
DA
9328/* Thanks to Mike Rendell for this test. */
9329#include <sys/types.h>
9330#define NGID 256
9331#undef MAX
9332#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
9333
9334int
9335main ()
e256b8b6
DA
9336{
9337 gid_t gidset[NGID];
9338 int i, n;
9339 union { gid_t gval; long lval; } val;
9340
9341 val.lval = -1;
9342 for (i = 0; i < NGID; i++)
9343 gidset[i] = val.gval;
9344 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 9345 gidset);
e256b8b6
DA
9346 /* Exit non-zero if getgroups seems to require an array of ints. This
9347 happens when gid_t is short but getgroups modifies an array of ints. */
9348 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 9349}
ba479fd2
NN
9350_ACEOF
9351rm -f conftest$ac_exeext
9352if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9353 (eval $ac_link) 2>&5
9354 ac_status=$?
9355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9356 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9358 (eval $ac_try) 2>&5
9359 ac_status=$?
9360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9361 (exit $ac_status); }; }; then
9362 ac_cv_type_getgroups=gid_t
63cf211a 9363else
ba479fd2
NN
9364 echo "$as_me: program exited with status $ac_status" >&5
9365echo "$as_me: failed program was:" >&5
9366sed 's/^/| /' conftest.$ac_ext >&5
9367
9368( exit $ac_status )
9369ac_cv_type_getgroups=int
e256b8b6 9370fi
86da66b5 9371rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 9372fi
e256b8b6 9373if test $ac_cv_type_getgroups = cross; then
ba479fd2 9374 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9375/* confdefs.h. */
9376_ACEOF
9377cat confdefs.h >>conftest.$ac_ext
9378cat >>conftest.$ac_ext <<_ACEOF
9379/* end confdefs.h. */
e256b8b6 9380#include <unistd.h>
ba479fd2
NN
9381
9382_ACEOF
e256b8b6 9383if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9384 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
9385 ac_cv_type_getgroups=gid_t
9386else
e256b8b6
DA
9387 ac_cv_type_getgroups=int
9388fi
9389rm -f conftest*
9390
9391fi
9392fi
ba479fd2
NN
9393echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9394echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 9395
ba479fd2 9396cat >>confdefs.h <<_ACEOF
e256b8b6 9397#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 9398_ACEOF
e256b8b6
DA
9399
9400
9401if test "${target}" = "${build}"; then
9402 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9403else
9404 case "${target}" in
9405 # This condition may need some tweaking. It should include all
9406 # targets where the array type of the second argument of getgroups
9407 # is int and the type of gid_t is not equivalent to int.
9408 *-*-sunos* | *-*-ultrix*)
9409 TARGET_GETGROUPS_T=int
9410 ;;
9411 *)
9412 TARGET_GETGROUPS_T=gid_t
9413 ;;
9414 esac
9415fi
9416
9417
ba479fd2
NN
9418echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5
9419echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6
9420if test "${gcc_cv_func_printf_ptr+set}" = set; then
9421 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
9422else
9423 if test "$cross_compiling" = yes; then
9424 gcc_cv_func_printf_ptr=no
9425else
ba479fd2 9426 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9427/* confdefs.h. */
9428_ACEOF
9429cat confdefs.h >>conftest.$ac_ext
9430cat >>conftest.$ac_ext <<_ACEOF
9431/* end confdefs.h. */
0a4b6309
RL
9432#include <stdio.h>
9433
86cf1cbd 9434int main()
0a4b6309
RL
9435{
9436 char buf[64];
9437 char *p = buf, *q = NULL;
9438 sprintf(buf, "%p", p);
9439 sscanf(buf, "%p", &q);
86cf1cbd 9440 return (p != q);
0a4b6309 9441}
ba479fd2
NN
9442_ACEOF
9443rm -f conftest$ac_exeext
9444if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9445 (eval $ac_link) 2>&5
9446 ac_status=$?
9447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9448 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9450 (eval $ac_try) 2>&5
9451 ac_status=$?
9452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9453 (exit $ac_status); }; }; then
0a4b6309
RL
9454 gcc_cv_func_printf_ptr=yes
9455else
ba479fd2
NN
9456 echo "$as_me: program exited with status $ac_status" >&5
9457echo "$as_me: failed program was:" >&5
9458sed 's/^/| /' conftest.$ac_ext >&5
9459
9460( exit $ac_status )
9461gcc_cv_func_printf_ptr=no
0a4b6309 9462fi
86da66b5 9463rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0a4b6309 9464fi
0a4b6309
RL
9465rm -f core core.* *.core
9466fi
ba479fd2
NN
9467echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5
9468echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6
63cf211a 9469if test $gcc_cv_func_printf_ptr = yes ; then
ba479fd2
NN
9470
9471cat >>confdefs.h <<\_ACEOF
0a4b6309 9472#define HAVE_PRINTF_PTR 1
ba479fd2 9473_ACEOF
0a4b6309
RL
9474
9475fi
9476
3b0727a0
MR
9477
9478echo "$as_me:$LINENO: checking for sys/mman.h" >&5
9479echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
9480if test "${ac_cv_header_sys_mman_h+set}" = set; then
9481 echo $ECHO_N "(cached) $ECHO_C" >&6
9482else
9483 cat >conftest.$ac_ext <<_ACEOF
9484/* confdefs.h. */
9485_ACEOF
9486cat confdefs.h >>conftest.$ac_ext
9487cat >>conftest.$ac_ext <<_ACEOF
9488/* end confdefs.h. */
9489#include <sys/mman.h>
9490_ACEOF
9491if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9492 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9493 ac_status=$?
9494 grep -v '^ *+' conftest.er1 >conftest.err
9495 rm -f conftest.er1
9496 cat conftest.err >&5
9497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9498 (exit $ac_status); } >/dev/null; then
9499 if test -s conftest.err; then
9500 ac_cpp_err=$ac_c_preproc_warn_flag
9501 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9502 else
9503 ac_cpp_err=
9504 fi
9505else
9506 ac_cpp_err=yes
9507fi
9508if test -z "$ac_cpp_err"; then
9509 ac_cv_header_sys_mman_h=yes
9510else
9511 echo "$as_me: failed program was:" >&5
9512sed 's/^/| /' conftest.$ac_ext >&5
9513
9514 ac_cv_header_sys_mman_h=no
9515fi
9516rm -f conftest.err conftest.$ac_ext
9517fi
9518echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9519echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
9520if test $ac_cv_header_sys_mman_h = yes; then
9521 gcc_header_sys_mman_h=yes
9522else
9523 gcc_header_sys_mman_h=no
9524fi
9525
9526echo "$as_me:$LINENO: checking for mmap" >&5
9527echo $ECHO_N "checking for mmap... $ECHO_C" >&6
9528if test "${ac_cv_func_mmap+set}" = set; then
9529 echo $ECHO_N "(cached) $ECHO_C" >&6
9530else
9531 cat >conftest.$ac_ext <<_ACEOF
9532/* confdefs.h. */
9533_ACEOF
9534cat confdefs.h >>conftest.$ac_ext
9535cat >>conftest.$ac_ext <<_ACEOF
9536/* end confdefs.h. */
9537/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9538 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9539#define mmap innocuous_mmap
9540
9541/* System header to define __stub macros and hopefully few prototypes,
9542 which can conflict with char mmap (); below.
9543 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9544 <limits.h> exists even on freestanding compilers. */
9545
9546#ifdef __STDC__
9547# include <limits.h>
9548#else
9549# include <assert.h>
9550#endif
9551
9552#undef mmap
9553
9554/* Override any gcc2 internal prototype to avoid an error. */
9555#ifdef __cplusplus
9556extern "C"
9557{
9558#endif
9559/* We use char because int might match the return type of a gcc2
9560 builtin and then its argument prototype would still apply. */
9561char mmap ();
9562/* The GNU C library defines this for functions which it implements
9563 to always fail with ENOSYS. Some functions are actually named
9564 something starting with __ and the normal name is an alias. */
9565#if defined (__stub_mmap) || defined (__stub___mmap)
9566choke me
9567#else
9568char (*f) () = mmap;
9569#endif
9570#ifdef __cplusplus
9571}
9572#endif
9573
9574int
9575main ()
9576{
9577return f != mmap;
9578 ;
9579 return 0;
9580}
9581_ACEOF
9582rm -f conftest.$ac_objext conftest$ac_exeext
9583if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9584 (eval $ac_link) 2>conftest.er1
9585 ac_status=$?
9586 grep -v '^ *+' conftest.er1 >conftest.err
9587 rm -f conftest.er1
9588 cat conftest.err >&5
9589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9590 (exit $ac_status); } &&
a1286ef5
ZW
9591 { ac_try='test -z "$ac_c_werror_flag"
9592 || test ! -s conftest.err'
3b0727a0
MR
9593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9594 (eval $ac_try) 2>&5
9595 ac_status=$?
9596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9597 (exit $ac_status); }; } &&
9598 { ac_try='test -s conftest$ac_exeext'
9599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9600 (eval $ac_try) 2>&5
9601 ac_status=$?
9602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9603 (exit $ac_status); }; }; then
9604 ac_cv_func_mmap=yes
9605else
9606 echo "$as_me: failed program was:" >&5
9607sed 's/^/| /' conftest.$ac_ext >&5
9608
9609ac_cv_func_mmap=no
9610fi
9611rm -f conftest.err conftest.$ac_objext \
9612 conftest$ac_exeext conftest.$ac_ext
9613fi
9614echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9615echo "${ECHO_T}$ac_cv_func_mmap" >&6
9616if test $ac_cv_func_mmap = yes; then
9617 gcc_func_mmap=yes
9618else
9619 gcc_func_mmap=no
9620fi
9621
9622if test "$gcc_header_sys_mman_h" != yes \
9623 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
9624 gcc_cv_func_mmap_file=no
9625 gcc_cv_func_mmap_dev_zero=no
9626 gcc_cv_func_mmap_anon=no
9627else
ba479fd2
NN
9628 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9629echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
9630if test "${gcc_cv_func_mmap_file+set}" = set; then
9631 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 9632else
ba479fd2 9633 # Add a system to this blacklist if
1072ec3f
ZW
9634 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9635 # memory area containing the same data that you'd get if you applied
9636 # read() to the same fd. The only system known to have a problem here
9637 # is VMS, where text files have record structure.
9638 case "$host_os" in
ba479fd2 9639 vms* | ultrix*)
1072ec3f
ZW
9640 gcc_cv_func_mmap_file=no ;;
9641 *)
9642 gcc_cv_func_mmap_file=yes;;
9643 esac
9644fi
ba479fd2
NN
9645echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9646echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9647 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9648echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
9649if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9650 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9651else
9652 # Add a system to this blacklist if it has mmap() but /dev/zero
9653 # does not exist, or if mmapping /dev/zero does not give anonymous
9654 # zeroed pages with both the following properties:
9655 # 1. If you map N consecutive pages in with one call, and then
9656 # unmap any subset of those pages, the pages that were not
9657 # explicitly unmapped remain accessible.
9658 # 2. If you map two adjacent blocks of memory and then unmap them
9659 # both at once, they must both go away.
9660 # Systems known to be in this category are Windows (all variants),
9661 # VMS, and Darwin.
9662 case "$host_os" in
2ce240d3 9663 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
9664 gcc_cv_func_mmap_dev_zero=no ;;
9665 *)
9666 gcc_cv_func_mmap_dev_zero=yes;;
9667 esac
9668fi
ba479fd2
NN
9669echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9670echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
9671
9672 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
9673 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9674echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
9675if test "${gcc_cv_decl_map_anon+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. */
1072ec3f
ZW
9684#include <sys/types.h>
9685#include <sys/mman.h>
9686#include <unistd.h>
9687
9688#ifndef MAP_ANONYMOUS
9689#define MAP_ANONYMOUS MAP_ANON
9690#endif
9691
ba479fd2
NN
9692int
9693main ()
9694{
1072ec3f 9695int n = MAP_ANONYMOUS;
ba479fd2
NN
9696 ;
9697 return 0;
9698}
9699_ACEOF
9700rm -f conftest.$ac_objext
9701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9702 (eval $ac_compile) 2>conftest.er1
ba479fd2 9703 ac_status=$?
86da66b5
HPN
9704 grep -v '^ *+' conftest.er1 >conftest.err
9705 rm -f conftest.er1
9706 cat conftest.err >&5
ba479fd2
NN
9707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9708 (exit $ac_status); } &&
a1286ef5
ZW
9709 { ac_try='test -z "$ac_c_werror_flag"
9710 || test ! -s conftest.err'
86da66b5
HPN
9711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9712 (eval $ac_try) 2>&5
9713 ac_status=$?
9714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9715 (exit $ac_status); }; } &&
9716 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9718 (eval $ac_try) 2>&5
9719 ac_status=$?
9720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9721 (exit $ac_status); }; }; then
1072ec3f
ZW
9722 gcc_cv_decl_map_anon=yes
9723else
ba479fd2
NN
9724 echo "$as_me: failed program was:" >&5
9725sed 's/^/| /' conftest.$ac_ext >&5
9726
9727gcc_cv_decl_map_anon=no
1072ec3f 9728fi
86da66b5 9729rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 9730fi
ba479fd2
NN
9731echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9732echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
9733
9734 if test $gcc_cv_decl_map_anon = no; then
9735 gcc_cv_func_mmap_anon=no
9736 else
ba479fd2
NN
9737 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9738echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
9739if test "${gcc_cv_func_mmap_anon+set}" = set; then
9740 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9741else
9742 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9743 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9744 # doesn't give anonymous zeroed pages with the same properties listed
9745 # above for use of /dev/zero.
9746 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9747 case "$host_os" in
9748 vms* | cygwin* | pe | mingw* | sco* | udk* )
9749 gcc_cv_func_mmap_anon=no ;;
9750 *)
9751 gcc_cv_func_mmap_anon=yes;;
9752 esac
9753fi
ba479fd2
NN
9754echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9755echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
9756 fi
9757fi
9758
9759if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
9760
9761cat >>confdefs.h <<\_ACEOF
1072ec3f 9762#define HAVE_MMAP_FILE 1
ba479fd2 9763_ACEOF
1072ec3f
ZW
9764
9765fi
9766if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
9767
9768cat >>confdefs.h <<\_ACEOF
1072ec3f 9769#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 9770_ACEOF
1072ec3f
ZW
9771
9772fi
9773if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
9774
9775cat >>confdefs.h <<\_ACEOF
1072ec3f 9776#define HAVE_MMAP_ANON 1
ba479fd2 9777_ACEOF
1072ec3f
ZW
9778
9779fi
9780
b27d2bd5
MK
9781
9782case "${host}" in
ee262b6f 9783*-*-*vms*)
ba479fd2 9784 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
9785 # won't work, and it isn't easily adaptable. It makes more sense to
9786 # just force it.
9787 ac_cv_func_vfork_works=yes
9788 ;;
b27d2bd5 9789esac
ba479fd2
NN
9790echo "$as_me:$LINENO: checking for pid_t" >&5
9791echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
9792if test "${ac_cv_type_pid_t+set}" = set; then
9793 echo $ECHO_N "(cached) $ECHO_C" >&6
9794else
9795 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9796/* confdefs.h. */
9797_ACEOF
9798cat confdefs.h >>conftest.$ac_ext
9799cat >>conftest.$ac_ext <<_ACEOF
9800/* end confdefs.h. */
9801$ac_includes_default
9802int
9803main ()
9804{
9805if ((pid_t *) 0)
9806 return 0;
9807if (sizeof (pid_t))
9808 return 0;
9809 ;
9810 return 0;
9811}
9812_ACEOF
9813rm -f conftest.$ac_objext
9814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9815 (eval $ac_compile) 2>conftest.er1
ba479fd2 9816 ac_status=$?
86da66b5
HPN
9817 grep -v '^ *+' conftest.er1 >conftest.err
9818 rm -f conftest.er1
9819 cat conftest.err >&5
ba479fd2
NN
9820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9821 (exit $ac_status); } &&
a1286ef5
ZW
9822 { ac_try='test -z "$ac_c_werror_flag"
9823 || test ! -s conftest.err'
86da66b5
HPN
9824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9825 (eval $ac_try) 2>&5
9826 ac_status=$?
9827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9828 (exit $ac_status); }; } &&
9829 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9831 (eval $ac_try) 2>&5
9832 ac_status=$?
9833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9834 (exit $ac_status); }; }; then
cb65112a 9835 ac_cv_type_pid_t=yes
c375c43b 9836else
ba479fd2
NN
9837 echo "$as_me: failed program was:" >&5
9838sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9839
ba479fd2
NN
9840ac_cv_type_pid_t=no
9841fi
86da66b5 9842rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9843fi
ba479fd2
NN
9844echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
9845echo "${ECHO_T}$ac_cv_type_pid_t" >&6
9846if test $ac_cv_type_pid_t = yes; then
9847 :
9848else
9849
9850cat >>confdefs.h <<_ACEOF
c375c43b 9851#define pid_t int
ba479fd2 9852_ACEOF
c375c43b
KG
9853
9854fi
9855
ba479fd2
NN
9856
9857
9858for ac_header in unistd.h vfork.h
9859do
9860as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 9861echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
9862echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9863if eval "test \"\${$as_ac_Header+set}\" = set"; then
9864 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9865else
ca9bc441 9866 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9867/* confdefs.h. */
9868_ACEOF
9869cat confdefs.h >>conftest.$ac_ext
9870cat >>conftest.$ac_ext <<_ACEOF
9871/* end confdefs.h. */
9872#include <$ac_header>
9873_ACEOF
9874if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9875 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9876 ac_status=$?
9877 grep -v '^ *+' conftest.er1 >conftest.err
9878 rm -f conftest.er1
9879 cat conftest.err >&5
9880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9881 (exit $ac_status); } >/dev/null; then
9882 if test -s conftest.err; then
9883 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 9884 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
9885 else
9886 ac_cpp_err=
9887 fi
093e61a6 9888else
ba479fd2
NN
9889 ac_cpp_err=yes
9890fi
9891if test -z "$ac_cpp_err"; then
ca9bc441 9892 eval "$as_ac_Header=yes"
ba479fd2
NN
9893else
9894 echo "$as_me: failed program was:" >&5
9895sed 's/^/| /' conftest.$ac_ext >&5
9896
ca9bc441 9897 eval "$as_ac_Header=no"
ba479fd2
NN
9898fi
9899rm -f conftest.err conftest.$ac_ext
c375c43b 9900fi
ba479fd2
NN
9901echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9902echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
9903if test `eval echo '${'$as_ac_Header'}'` = yes; then
9904 cat >>confdefs.h <<_ACEOF
9905#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9906_ACEOF
6e3f3080
NN
9907
9908fi
ba479fd2
NN
9909done
9910
9911
9912
9913for ac_func in fork vfork
9914do
9915as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9916echo "$as_me:$LINENO: checking for $ac_func" >&5
9917echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9918if eval "test \"\${$as_ac_var+set}\" = set"; then
9919 echo $ECHO_N "(cached) $ECHO_C" >&6
9920else
9921 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9922/* confdefs.h. */
9923_ACEOF
9924cat confdefs.h >>conftest.$ac_ext
9925cat >>conftest.$ac_ext <<_ACEOF
9926/* end confdefs.h. */
86da66b5
HPN
9927/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9928 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9929#define $ac_func innocuous_$ac_func
9930
c375c43b 9931/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9932 which can conflict with char $ac_func (); below.
9933 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9934 <limits.h> exists even on freestanding compilers. */
86da66b5 9935
ba479fd2
NN
9936#ifdef __STDC__
9937# include <limits.h>
9938#else
9939# include <assert.h>
9940#endif
86da66b5
HPN
9941
9942#undef $ac_func
9943
6e3f3080 9944/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9945#ifdef __cplusplus
9946extern "C"
9947{
9948#endif
6e3f3080 9949/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9950 builtin and then its argument prototype would still apply. */
9951char $ac_func ();
c375c43b
KG
9952/* The GNU C library defines this for functions which it implements
9953 to always fail with ENOSYS. Some functions are actually named
9954 something starting with __ and the normal name is an alias. */
ba479fd2 9955#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
9956choke me
9957#else
ba479fd2
NN
9958char (*f) () = $ac_func;
9959#endif
9960#ifdef __cplusplus
9961}
c375c43b
KG
9962#endif
9963
ba479fd2
NN
9964int
9965main ()
9966{
9967return f != $ac_func;
9968 ;
9969 return 0;
9970}
9971_ACEOF
9972rm -f conftest.$ac_objext conftest$ac_exeext
9973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9974 (eval $ac_link) 2>conftest.er1
ba479fd2 9975 ac_status=$?
86da66b5
HPN
9976 grep -v '^ *+' conftest.er1 >conftest.err
9977 rm -f conftest.er1
9978 cat conftest.err >&5
ba479fd2
NN
9979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9980 (exit $ac_status); } &&
a1286ef5
ZW
9981 { ac_try='test -z "$ac_c_werror_flag"
9982 || test ! -s conftest.err'
86da66b5
HPN
9983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9984 (eval $ac_try) 2>&5
9985 ac_status=$?
9986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9987 (exit $ac_status); }; } &&
9988 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9990 (eval $ac_try) 2>&5
9991 ac_status=$?
9992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9993 (exit $ac_status); }; }; then
9994 eval "$as_ac_var=yes"
9995else
9996 echo "$as_me: failed program was:" >&5
9997sed 's/^/| /' conftest.$ac_ext >&5
9998
9999eval "$as_ac_var=no"
10000fi
86da66b5
HPN
10001rm -f conftest.err conftest.$ac_objext \
10002 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
10003fi
10004echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10005echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10006if test `eval echo '${'$as_ac_var'}'` = yes; then
10007 cat >>confdefs.h <<_ACEOF
10008#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10009_ACEOF
10010
c375c43b 10011fi
ba479fd2 10012done
c375c43b 10013
ba479fd2
NN
10014if test "x$ac_cv_func_fork" = xyes; then
10015 echo "$as_me:$LINENO: checking for working fork" >&5
10016echo $ECHO_N "checking for working fork... $ECHO_C" >&6
10017if test "${ac_cv_func_fork_works+set}" = set; then
10018 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10019else
ba479fd2
NN
10020 if test "$cross_compiling" = yes; then
10021 ac_cv_func_fork_works=cross
10022else
10023 cat >conftest.$ac_ext <<_ACEOF
10024/* By Ruediger Kuhlmann. */
10025 #include <sys/types.h>
10026 #if HAVE_UNISTD_H
10027 # include <unistd.h>
10028 #endif
10029 /* Some systems only have a dummy stub for fork() */
10030 int main ()
10031 {
86da66b5
HPN
10032 if (fork() < 0)
10033 exit (1);
10034 exit (0);
ba479fd2
NN
10035 }
10036_ACEOF
10037rm -f conftest$ac_exeext
10038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10039 (eval $ac_link) 2>&5
10040 ac_status=$?
10041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10044 (eval $ac_try) 2>&5
10045 ac_status=$?
10046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10047 (exit $ac_status); }; }; then
10048 ac_cv_func_fork_works=yes
10049else
10050 echo "$as_me: program exited with status $ac_status" >&5
10051echo "$as_me: failed program was:" >&5
10052sed 's/^/| /' conftest.$ac_ext >&5
10053
10054( exit $ac_status )
10055ac_cv_func_fork_works=no
10056fi
86da66b5 10057rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
10058fi
10059fi
10060echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10061echo "${ECHO_T}$ac_cv_func_fork_works" >&6
10062
10063else
10064 ac_cv_func_fork_works=$ac_cv_func_fork
10065fi
10066if test "x$ac_cv_func_fork_works" = xcross; then
10067 case $host in
10068 *-*-amigaos* | *-*-msdosdjgpp*)
10069 # Override, as these systems have only a dummy fork() stub
10070 ac_cv_func_fork_works=no
10071 ;;
10072 *)
10073 ac_cv_func_fork_works=yes
10074 ;;
10075 esac
10076 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10077echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 10078fi
c375c43b 10079ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10080if test "x$ac_cv_func_vfork" = xyes; then
10081 echo "$as_me:$LINENO: checking for working vfork" >&5
10082echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
10083if test "${ac_cv_func_vfork_works+set}" = set; then
10084 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10085else
ba479fd2
NN
10086 if test "$cross_compiling" = yes; then
10087 ac_cv_func_vfork_works=cross
10088else
10089 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10090/* confdefs.h. */
10091_ACEOF
10092cat confdefs.h >>conftest.$ac_ext
10093cat >>conftest.$ac_ext <<_ACEOF
10094/* end confdefs.h. */
c375c43b
KG
10095/* Thanks to Paul Eggert for this test. */
10096#include <stdio.h>
ba479fd2 10097#include <stdlib.h>
c375c43b
KG
10098#include <sys/types.h>
10099#include <sys/stat.h>
ba479fd2
NN
10100#include <sys/wait.h>
10101#if HAVE_UNISTD_H
10102# include <unistd.h>
c375c43b 10103#endif
ba479fd2
NN
10104#if HAVE_VFORK_H
10105# include <vfork.h>
c375c43b
KG
10106#endif
10107/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
10108 argument registers are propagated back to the parent. The compiler
10109 is told about this with #include <vfork.h>, but some compilers
10110 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10111 static variable whose address is put into a register that is
10112 clobbered by the vfork. */
10113static void
c375c43b
KG
10114#ifdef __cplusplus
10115sparc_address_test (int arg)
ba479fd2 10116# else
c375c43b
KG
10117sparc_address_test (arg) int arg;
10118#endif
10119{
10120 static pid_t child;
10121 if (!child) {
10122 child = vfork ();
10123 if (child < 0) {
10124 perror ("vfork");
10125 _exit(2);
10126 }
10127 if (!child) {
10128 arg = getpid();
10129 write(-1, "", 0);
10130 _exit (arg);
10131 }
10132 }
10133}
ba479fd2
NN
10134
10135int
10136main ()
10137{
c375c43b
KG
10138 pid_t parent = getpid ();
10139 pid_t child;
10140
ba479fd2 10141 sparc_address_test (0);
c375c43b
KG
10142
10143 child = vfork ();
10144
10145 if (child == 0) {
ba479fd2
NN
10146 /* Here is another test for sparc vfork register problems. This
10147 test uses lots of local variables, at least as many local
10148 variables as main has allocated so far including compiler
10149 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10150 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10151 reuse the register of parent for one of the local variables,
10152 since it will think that parent can't possibly be used any more
10153 in this routine. Assigning to the local variable will thus
10154 munge parent in the parent process. */
c375c43b
KG
10155 pid_t
10156 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10157 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10158 /* Convince the compiler that p..p7 are live; otherwise, it might
10159 use the same hardware register for all 8 local variables. */
10160 if (p != p1 || p != p2 || p != p3 || p != p4
10161 || p != p5 || p != p6 || p != p7)
10162 _exit(1);
10163
ba479fd2
NN
10164 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10165 from child file descriptors. If the child closes a descriptor
10166 before it execs or exits, this munges the parent's descriptor
10167 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10168 _exit(close(fileno(stdout)) != 0);
10169 } else {
10170 int status;
10171 struct stat st;
10172
10173 while (wait(&status) != child)
10174 ;
10175 exit(
10176 /* Was there some problem with vforking? */
10177 child < 0
10178
10179 /* Did the child fail? (This shouldn't happen.) */
10180 || status
10181
10182 /* Did the vfork/compiler bug occur? */
10183 || parent != getpid()
10184
10185 /* Did the file descriptor bug occur? */
10186 || fstat(fileno(stdout), &st) != 0
10187 );
10188 }
10189}
ba479fd2
NN
10190_ACEOF
10191rm -f conftest$ac_exeext
10192if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10193 (eval $ac_link) 2>&5
10194 ac_status=$?
10195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10196 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10198 (eval $ac_try) 2>&5
10199 ac_status=$?
10200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10201 (exit $ac_status); }; }; then
c375c43b
KG
10202 ac_cv_func_vfork_works=yes
10203else
ba479fd2
NN
10204 echo "$as_me: program exited with status $ac_status" >&5
10205echo "$as_me: failed program was:" >&5
10206sed 's/^/| /' conftest.$ac_ext >&5
10207
10208( exit $ac_status )
10209ac_cv_func_vfork_works=no
cafe096b 10210fi
86da66b5 10211rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10212fi
ba479fd2
NN
10213fi
10214echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10215echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 10216
ba479fd2
NN
10217fi;
10218if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 10219 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10220 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10221echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
10222fi
10223
ba479fd2
NN
10224if test "x$ac_cv_func_vfork_works" = xyes; then
10225
10226cat >>confdefs.h <<\_ACEOF
10227#define HAVE_WORKING_VFORK 1
10228_ACEOF
10229
10230else
10231
10232cat >>confdefs.h <<\_ACEOF
c375c43b 10233#define vfork fork
ba479fd2 10234_ACEOF
c375c43b
KG
10235
10236fi
ba479fd2
NN
10237if test "x$ac_cv_func_fork_works" = xyes; then
10238
10239cat >>confdefs.h <<\_ACEOF
10240#define HAVE_WORKING_FORK 1
10241_ACEOF
10242
10243fi
10244
c375c43b 10245
81bf3d9e 10246
dfb77e37
KC
10247 if test "X$prefix" = "XNONE"; then
10248 acl_final_prefix="$ac_default_prefix"
10249 else
10250 acl_final_prefix="$prefix"
10251 fi
10252 if test "X$exec_prefix" = "XNONE"; then
10253 acl_final_exec_prefix='${prefix}'
10254 else
10255 acl_final_exec_prefix="$exec_prefix"
10256 fi
10257 acl_save_prefix="$prefix"
10258 prefix="$acl_final_prefix"
10259 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10260 prefix="$acl_save_prefix"
f91abfce
TT
10261
10262
dfb77e37
KC
10263# Check whether --with-gnu-ld or --without-gnu-ld was given.
10264if test "${with_gnu_ld+set}" = set; then
10265 withval="$with_gnu_ld"
10266 test "$withval" = no || with_gnu_ld=yes
ba479fd2 10267else
dfb77e37
KC
10268 with_gnu_ld=no
10269fi;
10270# Prepare PATH_SEPARATOR.
10271# The user is always right.
10272if test "${PATH_SEPARATOR+set}" != set; then
10273 echo "#! /bin/sh" >conf$$.sh
10274 echo "exit 0" >>conf$$.sh
10275 chmod +x conf$$.sh
10276 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10277 PATH_SEPARATOR=';'
ba479fd2 10278 else
dfb77e37 10279 PATH_SEPARATOR=:
ba479fd2 10280 fi
dfb77e37
KC
10281 rm -f conf$$.sh
10282fi
10283ac_prog=ld
10284if test "$GCC" = yes; then
10285 # Check if gcc -print-prog-name=ld gives a path.
10286 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10287echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10288 case $host in
10289 *-*-mingw*)
10290 # gcc leaves a trailing carriage return which upsets mingw
10291 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10292 *)
10293 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10294 esac
10295 case $ac_prog in
10296 # Accept absolute paths.
10297 [\\/]* | [A-Za-z]:[\\/]*)
10298 re_direlt='/[^/][^/]*/\.\./'
10299 # Canonicalize the path of ld
10300 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10301 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10302 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10303 done
10304 test -z "$LD" && LD="$ac_prog"
10305 ;;
10306 "")
10307 # If it fails, then pretend we aren't using GCC.
10308 ac_prog=ld
10309 ;;
10310 *)
10311 # If it is relative, then search for the first ld in PATH.
10312 with_gnu_ld=unknown
10313 ;;
10314 esac
10315elif test "$with_gnu_ld" = yes; then
10316 echo "$as_me:$LINENO: checking for GNU ld" >&5
10317echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 10318else
dfb77e37
KC
10319 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10320echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 10321fi
dfb77e37
KC
10322if test "${acl_cv_path_LD+set}" = set; then
10323 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 10324else
dfb77e37
KC
10325 if test -z "$LD"; then
10326 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10327 for ac_dir in $PATH; do
10328 test -z "$ac_dir" && ac_dir=.
10329 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10330 acl_cv_path_LD="$ac_dir/$ac_prog"
10331 # Check to see if the program is GNU ld. I'd rather use --version,
10332 # but apparently some GNU ld's only accept -v.
10333 # Break only if it was the GNU/non-GNU ld that we prefer.
10334 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10335 test "$with_gnu_ld" != no && break
10336 else
10337 test "$with_gnu_ld" != yes && break
10338 fi
10339 fi
10340 done
10341 IFS="$ac_save_ifs"
10342else
10343 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10344fi
10345fi
ba479fd2 10346
dfb77e37
KC
10347LD="$acl_cv_path_LD"
10348if test -n "$LD"; then
10349 echo "$as_me:$LINENO: result: $LD" >&5
10350echo "${ECHO_T}$LD" >&6
10351else
10352 echo "$as_me:$LINENO: result: no" >&5
10353echo "${ECHO_T}no" >&6
ba479fd2 10354fi
dfb77e37
KC
10355test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10356echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10357 { (exit 1); exit 1; }; }
10358echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10359echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10360if test "${acl_cv_prog_gnu_ld+set}" = set; then
10361 echo $ECHO_N "(cached) $ECHO_C" >&6
10362else
10363 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10364if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10365 acl_cv_prog_gnu_ld=yes
10366else
10367 acl_cv_prog_gnu_ld=no
6e3f3080 10368fi
dfb77e37
KC
10369fi
10370echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10371echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10372with_gnu_ld=$acl_cv_prog_gnu_ld
10373
10374
10375
10376 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10377echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10378if test "${acl_cv_rpath+set}" = set; then
10379 echo $ECHO_N "(cached) $ECHO_C" >&6
10380else
10381
10382 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10383 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10384 . ./conftest.sh
10385 rm -f ./conftest.sh
10386 acl_cv_rpath=done
ba479fd2 10387
eb158727 10388fi
dfb77e37
KC
10389echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10390echo "${ECHO_T}$acl_cv_rpath" >&6
10391 wl="$acl_cv_wl"
10392 libext="$acl_cv_libext"
10393 shlibext="$acl_cv_shlibext"
10394 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10395 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10396 hardcode_direct="$acl_cv_hardcode_direct"
10397 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10398 # Check whether --enable-rpath or --disable-rpath was given.
10399if test "${enable_rpath+set}" = set; then
10400 enableval="$enable_rpath"
10401 :
10402else
10403 enable_rpath=yes
10404fi;
10405
10406
10407
10408
10409
10410
10411
10412 use_additional=yes
10413
10414 acl_save_prefix="$prefix"
10415 prefix="$acl_final_prefix"
10416 acl_save_exec_prefix="$exec_prefix"
10417 exec_prefix="$acl_final_exec_prefix"
10418
10419 eval additional_includedir=\"$includedir\"
10420 eval additional_libdir=\"$libdir\"
10421
10422 exec_prefix="$acl_save_exec_prefix"
10423 prefix="$acl_save_prefix"
10424
10425
10426# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10427if test "${with_libiconv_prefix+set}" = set; then
10428 withval="$with_libiconv_prefix"
10429
10430 if test "X$withval" = "Xno"; then
10431 use_additional=no
10432 else
10433 if test "X$withval" = "X"; then
10434
10435 acl_save_prefix="$prefix"
10436 prefix="$acl_final_prefix"
10437 acl_save_exec_prefix="$exec_prefix"
10438 exec_prefix="$acl_final_exec_prefix"
10439
10440 eval additional_includedir=\"$includedir\"
10441 eval additional_libdir=\"$libdir\"
10442
10443 exec_prefix="$acl_save_exec_prefix"
10444 prefix="$acl_save_prefix"
10445
10446 else
10447 additional_includedir="$withval/include"
10448 additional_libdir="$withval/lib"
10449 fi
10450 fi
10451
10452fi;
10453 LIBICONV=
10454 LTLIBICONV=
10455 INCICONV=
10456 rpathdirs=
10457 ltrpathdirs=
10458 names_already_handled=
10459 names_next_round='iconv '
10460 while test -n "$names_next_round"; do
10461 names_this_round="$names_next_round"
10462 names_next_round=
10463 for name in $names_this_round; do
10464 already_handled=
10465 for n in $names_already_handled; do
10466 if test "$n" = "$name"; then
10467 already_handled=yes
10468 break
10469 fi
10470 done
10471 if test -z "$already_handled"; then
10472 names_already_handled="$names_already_handled $name"
10473 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10474 eval value=\"\$HAVE_LIB$uppername\"
10475 if test -n "$value"; then
10476 if test "$value" = yes; then
10477 eval value=\"\$LIB$uppername\"
10478 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10479 eval value=\"\$LTLIB$uppername\"
10480 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10481 else
10482 :
10483 fi
10484 else
10485 found_dir=
10486 found_la=
10487 found_so=
10488 found_a=
10489 if test $use_additional = yes; then
10490 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10491 found_dir="$additional_libdir"
10492 found_so="$additional_libdir/lib$name.$shlibext"
10493 if test -f "$additional_libdir/lib$name.la"; then
10494 found_la="$additional_libdir/lib$name.la"
10495 fi
10496 else
10497 if test -f "$additional_libdir/lib$name.$libext"; then
10498 found_dir="$additional_libdir"
10499 found_a="$additional_libdir/lib$name.$libext"
10500 if test -f "$additional_libdir/lib$name.la"; then
10501 found_la="$additional_libdir/lib$name.la"
10502 fi
10503 fi
10504 fi
10505 fi
10506 if test "X$found_dir" = "X"; then
10507 for x in $LDFLAGS $LTLIBICONV; 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 case "$x" in
10518 -L*)
10519 dir=`echo "X$x" | sed -e 's/^X-L//'`
10520 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10521 found_dir="$dir"
10522 found_so="$dir/lib$name.$shlibext"
10523 if test -f "$dir/lib$name.la"; then
10524 found_la="$dir/lib$name.la"
10525 fi
10526 else
10527 if test -f "$dir/lib$name.$libext"; then
10528 found_dir="$dir"
10529 found_a="$dir/lib$name.$libext"
10530 if test -f "$dir/lib$name.la"; then
10531 found_la="$dir/lib$name.la"
10532 fi
10533 fi
10534 fi
10535 ;;
10536 esac
10537 if test "X$found_dir" != "X"; then
10538 break
10539 fi
10540 done
10541 fi
10542 if test "X$found_dir" != "X"; then
10543 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10544 if test "X$found_so" != "X"; then
10545 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10546 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10547 else
10548 haveit=
10549 for x in $ltrpathdirs; do
10550 if test "X$x" = "X$found_dir"; then
10551 haveit=yes
10552 break
10553 fi
10554 done
10555 if test -z "$haveit"; then
10556 ltrpathdirs="$ltrpathdirs $found_dir"
10557 fi
10558 if test "$hardcode_direct" = yes; then
10559 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10560 else
10561 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10562 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10563 haveit=
10564 for x in $rpathdirs; do
10565 if test "X$x" = "X$found_dir"; then
10566 haveit=yes
10567 break
10568 fi
10569 done
10570 if test -z "$haveit"; then
10571 rpathdirs="$rpathdirs $found_dir"
10572 fi
10573 else
10574 haveit=
10575 for x in $LDFLAGS $LIBICONV; do
10576
10577 acl_save_prefix="$prefix"
10578 prefix="$acl_final_prefix"
10579 acl_save_exec_prefix="$exec_prefix"
10580 exec_prefix="$acl_final_exec_prefix"
10581 eval x=\"$x\"
10582 exec_prefix="$acl_save_exec_prefix"
10583 prefix="$acl_save_prefix"
10584
10585 if test "X$x" = "X-L$found_dir"; then
10586 haveit=yes
10587 break
10588 fi
10589 done
10590 if test -z "$haveit"; then
10591 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10592 fi
10593 if test "$hardcode_minus_L" != no; then
10594 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10595 else
10596 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10597 fi
10598 fi
10599 fi
10600 fi
10601 else
10602 if test "X$found_a" != "X"; then
10603 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10604 else
10605 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10606 fi
10607 fi
10608 additional_includedir=
10609 case "$found_dir" in
10610 */lib | */lib/)
10611 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10612 additional_includedir="$basedir/include"
10613 ;;
10614 esac
10615 if test "X$additional_includedir" != "X"; then
10616 if test "X$additional_includedir" != "X/usr/include"; then
10617 haveit=
10618 if test "X$additional_includedir" = "X/usr/local/include"; then
10619 if test -n "$GCC"; then
10620 case $host_os in
10621 linux*) haveit=yes;;
10622 esac
10623 fi
10624 fi
10625 if test -z "$haveit"; then
10626 for x in $CPPFLAGS $INCICONV; do
10627
10628 acl_save_prefix="$prefix"
10629 prefix="$acl_final_prefix"
10630 acl_save_exec_prefix="$exec_prefix"
10631 exec_prefix="$acl_final_exec_prefix"
10632 eval x=\"$x\"
10633 exec_prefix="$acl_save_exec_prefix"
10634 prefix="$acl_save_prefix"
10635
10636 if test "X$x" = "X-I$additional_includedir"; then
10637 haveit=yes
10638 break
10639 fi
10640 done
10641 if test -z "$haveit"; then
10642 if test -d "$additional_includedir"; then
10643 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10644 fi
10645 fi
10646 fi
10647 fi
10648 fi
10649 if test -n "$found_la"; then
10650 save_libdir="$libdir"
10651 case "$found_la" in
10652 */* | *\\*) . "$found_la" ;;
10653 *) . "./$found_la" ;;
10654 esac
10655 libdir="$save_libdir"
10656 for dep in $dependency_libs; do
10657 case "$dep" in
10658 -L*)
10659 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10660 if test "X$additional_libdir" != "X/usr/lib"; then
10661 haveit=
10662 if test "X$additional_libdir" = "X/usr/local/lib"; then
10663 if test -n "$GCC"; then
10664 case $host_os in
10665 linux*) haveit=yes;;
10666 esac
10667 fi
10668 fi
10669 if test -z "$haveit"; then
10670 haveit=
10671 for x in $LDFLAGS $LIBICONV; do
10672
10673 acl_save_prefix="$prefix"
10674 prefix="$acl_final_prefix"
10675 acl_save_exec_prefix="$exec_prefix"
10676 exec_prefix="$acl_final_exec_prefix"
10677 eval x=\"$x\"
10678 exec_prefix="$acl_save_exec_prefix"
10679 prefix="$acl_save_prefix"
10680
10681 if test "X$x" = "X-L$additional_libdir"; then
10682 haveit=yes
10683 break
10684 fi
10685 done
10686 if test -z "$haveit"; then
10687 if test -d "$additional_libdir"; then
10688 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10689 fi
10690 fi
10691 haveit=
10692 for x in $LDFLAGS $LTLIBICONV; do
10693
10694 acl_save_prefix="$prefix"
10695 prefix="$acl_final_prefix"
10696 acl_save_exec_prefix="$exec_prefix"
10697 exec_prefix="$acl_final_exec_prefix"
10698 eval x=\"$x\"
10699 exec_prefix="$acl_save_exec_prefix"
10700 prefix="$acl_save_prefix"
10701
10702 if test "X$x" = "X-L$additional_libdir"; then
10703 haveit=yes
10704 break
10705 fi
10706 done
10707 if test -z "$haveit"; then
10708 if test -d "$additional_libdir"; then
10709 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10710 fi
10711 fi
10712 fi
10713 fi
10714 ;;
10715 -R*)
10716 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10717 if test "$enable_rpath" != no; then
10718 haveit=
10719 for x in $rpathdirs; do
10720 if test "X$x" = "X$dir"; then
10721 haveit=yes
10722 break
10723 fi
10724 done
10725 if test -z "$haveit"; then
10726 rpathdirs="$rpathdirs $dir"
10727 fi
10728 haveit=
10729 for x in $ltrpathdirs; do
10730 if test "X$x" = "X$dir"; then
10731 haveit=yes
10732 break
10733 fi
10734 done
10735 if test -z "$haveit"; then
10736 ltrpathdirs="$ltrpathdirs $dir"
10737 fi
10738 fi
10739 ;;
10740 -l*)
10741 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10742 ;;
10743 *.la)
10744 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10745 ;;
10746 *)
10747 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10748 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10749 ;;
10750 esac
10751 done
10752 fi
10753 else
10754 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10755 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10756 fi
10757 fi
10758 fi
10759 done
10760 done
10761 if test "X$rpathdirs" != "X"; then
10762 if test -n "$hardcode_libdir_separator"; then
10763 alldirs=
10764 for found_dir in $rpathdirs; do
10765 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10766 done
10767 acl_save_libdir="$libdir"
10768 libdir="$alldirs"
10769 eval flag=\"$hardcode_libdir_flag_spec\"
10770 libdir="$acl_save_libdir"
10771 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10772 else
10773 for found_dir in $rpathdirs; do
10774 acl_save_libdir="$libdir"
10775 libdir="$found_dir"
10776 eval flag=\"$hardcode_libdir_flag_spec\"
10777 libdir="$acl_save_libdir"
10778 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10779 done
10780 fi
10781 fi
10782 if test "X$ltrpathdirs" != "X"; then
10783 for found_dir in $ltrpathdirs; do
10784 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10785 done
10786 fi
10787
10788
10789
10790
10791
10792
10793
10794 am_save_CPPFLAGS="$CPPFLAGS"
10795
10796 for element in $INCICONV; do
10797 haveit=
10798 for x in $CPPFLAGS; do
10799
10800 acl_save_prefix="$prefix"
10801 prefix="$acl_final_prefix"
10802 acl_save_exec_prefix="$exec_prefix"
10803 exec_prefix="$acl_final_exec_prefix"
10804 eval x=\"$x\"
10805 exec_prefix="$acl_save_exec_prefix"
10806 prefix="$acl_save_prefix"
10807
10808 if test "X$x" = "X$element"; then
10809 haveit=yes
10810 break
10811 fi
10812 done
10813 if test -z "$haveit"; then
10814 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10815 fi
10816 done
eb158727
ZW
10817
10818
ba479fd2
NN
10819 echo "$as_me:$LINENO: checking for iconv" >&5
10820echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10821if test "${am_cv_func_iconv+set}" = set; then
10822 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10823else
ba479fd2 10824
f91abfce
TT
10825 am_cv_func_iconv="no, consider installing GNU libiconv"
10826 am_cv_lib_iconv=no
ba479fd2 10827 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10828/* confdefs.h. */
10829_ACEOF
10830cat confdefs.h >>conftest.$ac_ext
10831cat >>conftest.$ac_ext <<_ACEOF
10832/* end confdefs.h. */
f91abfce
TT
10833#include <stdlib.h>
10834#include <iconv.h>
ba479fd2
NN
10835int
10836main ()
10837{
f91abfce
TT
10838iconv_t cd = iconv_open("","");
10839 iconv(cd,NULL,NULL,NULL,NULL);
10840 iconv_close(cd);
ba479fd2
NN
10841 ;
10842 return 0;
10843}
10844_ACEOF
10845rm -f conftest.$ac_objext conftest$ac_exeext
10846if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10847 (eval $ac_link) 2>conftest.er1
ba479fd2 10848 ac_status=$?
86da66b5
HPN
10849 grep -v '^ *+' conftest.er1 >conftest.err
10850 rm -f conftest.er1
10851 cat conftest.err >&5
ba479fd2
NN
10852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10853 (exit $ac_status); } &&
a1286ef5
ZW
10854 { ac_try='test -z "$ac_c_werror_flag"
10855 || test ! -s conftest.err'
86da66b5
HPN
10856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10857 (eval $ac_try) 2>&5
10858 ac_status=$?
10859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10860 (exit $ac_status); }; } &&
10861 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10863 (eval $ac_try) 2>&5
10864 ac_status=$?
10865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10866 (exit $ac_status); }; }; then
f91abfce
TT
10867 am_cv_func_iconv=yes
10868else
ba479fd2
NN
10869 echo "$as_me: failed program was:" >&5
10870sed 's/^/| /' conftest.$ac_ext >&5
10871
f91abfce 10872fi
86da66b5
HPN
10873rm -f conftest.err conftest.$ac_objext \
10874 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
10875 if test "$am_cv_func_iconv" != yes; then
10876 am_save_LIBS="$LIBS"
dfb77e37 10877 LIBS="$LIBS $LIBICONV"
ba479fd2 10878 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10879/* confdefs.h. */
10880_ACEOF
10881cat confdefs.h >>conftest.$ac_ext
10882cat >>conftest.$ac_ext <<_ACEOF
10883/* end confdefs.h. */
f91abfce
TT
10884#include <stdlib.h>
10885#include <iconv.h>
ba479fd2
NN
10886int
10887main ()
10888{
f91abfce
TT
10889iconv_t cd = iconv_open("","");
10890 iconv(cd,NULL,NULL,NULL,NULL);
10891 iconv_close(cd);
ba479fd2
NN
10892 ;
10893 return 0;
10894}
10895_ACEOF
10896rm -f conftest.$ac_objext conftest$ac_exeext
10897if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10898 (eval $ac_link) 2>conftest.er1
ba479fd2 10899 ac_status=$?
86da66b5
HPN
10900 grep -v '^ *+' conftest.er1 >conftest.err
10901 rm -f conftest.er1
10902 cat conftest.err >&5
ba479fd2
NN
10903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10904 (exit $ac_status); } &&
a1286ef5
ZW
10905 { ac_try='test -z "$ac_c_werror_flag"
10906 || test ! -s conftest.err'
86da66b5
HPN
10907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10908 (eval $ac_try) 2>&5
10909 ac_status=$?
10910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10911 (exit $ac_status); }; } &&
10912 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10914 (eval $ac_try) 2>&5
10915 ac_status=$?
10916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10917 (exit $ac_status); }; }; then
f91abfce
TT
10918 am_cv_lib_iconv=yes
10919 am_cv_func_iconv=yes
10920else
ba479fd2
NN
10921 echo "$as_me: failed program was:" >&5
10922sed 's/^/| /' conftest.$ac_ext >&5
10923
f91abfce 10924fi
86da66b5
HPN
10925rm -f conftest.err conftest.$ac_objext \
10926 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
10927 LIBS="$am_save_LIBS"
10928 fi
6e3f3080 10929
ba479fd2
NN
10930fi
10931echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
10932echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 10933 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
10934
10935cat >>confdefs.h <<\_ACEOF
f91abfce 10936#define HAVE_ICONV 1
ba479fd2 10937_ACEOF
f91abfce 10938
dfb77e37
KC
10939 fi
10940 if test "$am_cv_lib_iconv" = yes; then
10941 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
10942echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
10943 echo "$as_me:$LINENO: result: $LIBICONV" >&5
10944echo "${ECHO_T}$LIBICONV" >&6
10945 else
10946 CPPFLAGS="$am_save_CPPFLAGS"
10947 LIBICONV=
10948 LTLIBICONV=
10949 fi
10950
10951
10952
10953 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
10954 echo "$as_me:$LINENO: checking for iconv declaration" >&5
10955echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
10956 if test "${am_cv_proto_iconv+set}" = set; then
10957 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10958else
ba479fd2
NN
10959
10960 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10961/* confdefs.h. */
10962_ACEOF
10963cat confdefs.h >>conftest.$ac_ext
10964cat >>conftest.$ac_ext <<_ACEOF
10965/* end confdefs.h. */
f91abfce
TT
10966
10967#include <stdlib.h>
10968#include <iconv.h>
10969extern
10970#ifdef __cplusplus
10971"C"
10972#endif
10973#if defined(__STDC__) || defined(__cplusplus)
10974size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10975#else
10976size_t iconv();
10977#endif
10978
ba479fd2
NN
10979int
10980main ()
10981{
f91abfce 10982
ba479fd2
NN
10983 ;
10984 return 0;
10985}
10986_ACEOF
10987rm -f conftest.$ac_objext
10988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 10989 (eval $ac_compile) 2>conftest.er1
ba479fd2 10990 ac_status=$?
86da66b5
HPN
10991 grep -v '^ *+' conftest.er1 >conftest.err
10992 rm -f conftest.er1
10993 cat conftest.err >&5
ba479fd2
NN
10994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10995 (exit $ac_status); } &&
a1286ef5
ZW
10996 { ac_try='test -z "$ac_c_werror_flag"
10997 || test ! -s conftest.err'
86da66b5
HPN
10998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10999 (eval $ac_try) 2>&5
11000 ac_status=$?
11001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11002 (exit $ac_status); }; } &&
11003 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11005 (eval $ac_try) 2>&5
11006 ac_status=$?
11007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11008 (exit $ac_status); }; }; then
f91abfce
TT
11009 am_cv_proto_iconv_arg1=""
11010else
ba479fd2
NN
11011 echo "$as_me: failed program was:" >&5
11012sed 's/^/| /' conftest.$ac_ext >&5
11013
11014am_cv_proto_iconv_arg1="const"
f91abfce 11015fi
86da66b5 11016rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
11017 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);"
11018fi
11019
11020 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
11021 echo "$as_me:$LINENO: result: ${ac_t:-
11022 }$am_cv_proto_iconv" >&5
11023echo "${ECHO_T}${ac_t:-
11024 }$am_cv_proto_iconv" >&6
11025
11026cat >>confdefs.h <<_ACEOF
f91abfce 11027#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 11028_ACEOF
f91abfce
TT
11029
11030 fi
f91abfce 11031
56694dd9
ZW
11032# Until we have in-tree GNU iconv:
11033LIBICONV_DEP=
11034
11035
11036
ba479fd2
NN
11037 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11038echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
11039if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11040 echo $ECHO_N "(cached) $ECHO_C" >&6
56694dd9 11041else
ba479fd2 11042 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11043/* confdefs.h. */
11044_ACEOF
11045cat confdefs.h >>conftest.$ac_ext
11046cat >>conftest.$ac_ext <<_ACEOF
11047/* end confdefs.h. */
56694dd9 11048#include <locale.h>
ba479fd2
NN
11049int
11050main ()
11051{
56694dd9 11052return LC_MESSAGES
ba479fd2
NN
11053 ;
11054 return 0;
11055}
11056_ACEOF
11057rm -f conftest.$ac_objext conftest$ac_exeext
11058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 11059 (eval $ac_link) 2>conftest.er1
ba479fd2 11060 ac_status=$?
86da66b5
HPN
11061 grep -v '^ *+' conftest.er1 >conftest.err
11062 rm -f conftest.er1
11063 cat conftest.err >&5
ba479fd2
NN
11064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11065 (exit $ac_status); } &&
a1286ef5
ZW
11066 { ac_try='test -z "$ac_c_werror_flag"
11067 || test ! -s conftest.err'
86da66b5
HPN
11068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11069 (eval $ac_try) 2>&5
11070 ac_status=$?
11071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11072 (exit $ac_status); }; } &&
11073 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
11074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11075 (eval $ac_try) 2>&5
11076 ac_status=$?
11077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11078 (exit $ac_status); }; }; then
56694dd9
ZW
11079 am_cv_val_LC_MESSAGES=yes
11080else
ba479fd2
NN
11081 echo "$as_me: failed program was:" >&5
11082sed 's/^/| /' conftest.$ac_ext >&5
11083
11084am_cv_val_LC_MESSAGES=no
56694dd9 11085fi
86da66b5
HPN
11086rm -f conftest.err conftest.$ac_objext \
11087 conftest$ac_exeext conftest.$ac_ext
56694dd9 11088fi
ba479fd2
NN
11089echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11090echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
63cf211a 11091 if test $am_cv_val_LC_MESSAGES = yes; then
ba479fd2
NN
11092
11093cat >>confdefs.h <<\_ACEOF
56694dd9 11094#define HAVE_LC_MESSAGES 1
ba479fd2 11095_ACEOF
56694dd9
ZW
11096
11097 fi
11098
f91abfce 11099
a03ea89b
BM
11100
11101 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11102echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11103if test "${am_cv_langinfo_codeset+set}" = set; then
11104 echo $ECHO_N "(cached) $ECHO_C" >&6
11105else
11106 cat >conftest.$ac_ext <<_ACEOF
11107/* confdefs.h. */
11108_ACEOF
11109cat confdefs.h >>conftest.$ac_ext
11110cat >>conftest.$ac_ext <<_ACEOF
11111/* end confdefs.h. */
11112#include <langinfo.h>
11113int
11114main ()
11115{
11116char* cs = nl_langinfo(CODESET);
11117 ;
11118 return 0;
11119}
11120_ACEOF
11121rm -f conftest.$ac_objext conftest$ac_exeext
11122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11123 (eval $ac_link) 2>conftest.er1
11124 ac_status=$?
11125 grep -v '^ *+' conftest.er1 >conftest.err
11126 rm -f conftest.er1
11127 cat conftest.err >&5
11128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11129 (exit $ac_status); } &&
a1286ef5
ZW
11130 { ac_try='test -z "$ac_c_werror_flag"
11131 || test ! -s conftest.err'
a03ea89b
BM
11132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11133 (eval $ac_try) 2>&5
11134 ac_status=$?
11135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11136 (exit $ac_status); }; } &&
11137 { ac_try='test -s conftest$ac_exeext'
11138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11139 (eval $ac_try) 2>&5
11140 ac_status=$?
11141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11142 (exit $ac_status); }; }; then
11143 am_cv_langinfo_codeset=yes
11144else
11145 echo "$as_me: failed program was:" >&5
11146sed 's/^/| /' conftest.$ac_ext >&5
11147
11148am_cv_langinfo_codeset=no
11149fi
11150rm -f conftest.err conftest.$ac_objext \
11151 conftest$ac_exeext conftest.$ac_ext
11152
11153fi
11154echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11155echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11156 if test $am_cv_langinfo_codeset = yes; then
11157
11158cat >>confdefs.h <<\_ACEOF
11159#define HAVE_LANGINFO_CODESET 1
11160_ACEOF
11161
11162 fi
11163
11164
86cf1cbd
KG
11165# We will need to find libiberty.h and ansidecl.h
11166saved_CFLAGS="$CFLAGS"
11167CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
6a257778 11189
ad6717df
PB
11190
11191
0d667716
KG
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
367e8319 11202
0d667716
KG
11203
11204
11205for ac_func in getenv atol sbrk abort atof getcwd getwd strsignal \
367e8319
EB
11206 strstr errno snprintf vsnprintf vasprintf malloc realloc calloc \
11207 free basename getopt clock getpagesize clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
81bf3d9e 11208do
ad6717df 11209 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11210echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11211echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11212if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11213 echo $ECHO_N "(cached) $ECHO_C" >&6
11214else
11215 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11216/* confdefs.h. */
11217_ACEOF
11218cat confdefs.h >>conftest.$ac_ext
11219cat >>conftest.$ac_ext <<_ACEOF
11220/* end confdefs.h. */
7afe8c41
KG
11221#undef $ac_tr_decl
11222#define $ac_tr_decl 1
ba479fd2 11223
d02af173 11224#include "ansidecl.h"
86cf1cbd 11225#include "system.h"
f31e826b 11226
ba479fd2
NN
11227int
11228main ()
11229{
86cf1cbd
KG
11230#ifndef $ac_func
11231char *(*pfn) = (char *(*)) $ac_func ;
11232#endif
ba479fd2
NN
11233 ;
11234 return 0;
11235}
11236_ACEOF
11237rm -f conftest.$ac_objext
11238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11239 (eval $ac_compile) 2>conftest.er1
ba479fd2 11240 ac_status=$?
86da66b5
HPN
11241 grep -v '^ *+' conftest.er1 >conftest.err
11242 rm -f conftest.er1
11243 cat conftest.err >&5
ba479fd2
NN
11244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11245 (exit $ac_status); } &&
a1286ef5
ZW
11246 { ac_try='test -z "$ac_c_werror_flag"
11247 || test ! -s conftest.err'
86da66b5
HPN
11248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11249 (eval $ac_try) 2>&5
11250 ac_status=$?
11251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11252 (exit $ac_status); }; } &&
11253 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11255 (eval $ac_try) 2>&5
11256 ac_status=$?
11257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11258 (exit $ac_status); }; }; then
f31e826b 11259 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11260else
ba479fd2
NN
11261 echo "$as_me: failed program was:" >&5
11262sed 's/^/| /' conftest.$ac_ext >&5
11263
11264eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11265fi
86da66b5 11266rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11267fi
11268
f31e826b 11269if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11270 echo "$as_me:$LINENO: result: yes" >&5
11271echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11272#define $ac_tr_decl 1
ba479fd2
NN
11273_ACEOF
11274
81bf3d9e 11275else
ba479fd2
NN
11276 echo "$as_me:$LINENO: result: no" >&5
11277echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11278#define $ac_tr_decl 0
ba479fd2
NN
11279_ACEOF
11280
81bf3d9e
RH
11281fi
11282
11283done
ba479fd2 11284
ba479fd2 11285
ba479fd2 11286
81bf3d9e 11287
81bf3d9e
RH
11288
11289for ac_func in getrlimit setrlimit getrusage
11290do
ad6717df 11291 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11292echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11293echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11294if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11295 echo $ECHO_N "(cached) $ECHO_C" >&6
11296else
11297 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11298/* confdefs.h. */
11299_ACEOF
11300cat confdefs.h >>conftest.$ac_ext
11301cat >>conftest.$ac_ext <<_ACEOF
11302/* end confdefs.h. */
7afe8c41
KG
11303#undef $ac_tr_decl
11304#define $ac_tr_decl 1
ba479fd2 11305
d02af173 11306#include "ansidecl.h"
86cf1cbd 11307#include "system.h"
81bf3d9e
RH
11308#ifdef HAVE_SYS_RESOURCE_H
11309#include <sys/resource.h>
11310#endif
11311
f31e826b 11312
ba479fd2
NN
11313int
11314main ()
11315{
86cf1cbd
KG
11316#ifndef $ac_func
11317char *(*pfn) = (char *(*)) $ac_func ;
11318#endif
ba479fd2
NN
11319 ;
11320 return 0;
11321}
11322_ACEOF
11323rm -f conftest.$ac_objext
11324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11325 (eval $ac_compile) 2>conftest.er1
ba479fd2 11326 ac_status=$?
86da66b5
HPN
11327 grep -v '^ *+' conftest.er1 >conftest.err
11328 rm -f conftest.er1
11329 cat conftest.err >&5
ba479fd2
NN
11330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11331 (exit $ac_status); } &&
a1286ef5
ZW
11332 { ac_try='test -z "$ac_c_werror_flag"
11333 || test ! -s conftest.err'
86da66b5
HPN
11334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11335 (eval $ac_try) 2>&5
11336 ac_status=$?
11337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11338 (exit $ac_status); }; } &&
11339 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
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); }; }; then
f31e826b 11345 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11346else
ba479fd2
NN
11347 echo "$as_me: failed program was:" >&5
11348sed 's/^/| /' conftest.$ac_ext >&5
11349
11350eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11351fi
86da66b5 11352rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11353fi
11354
f31e826b 11355if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11356 echo "$as_me:$LINENO: result: yes" >&5
11357echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11358#define $ac_tr_decl 1
ba479fd2
NN
11359_ACEOF
11360
81bf3d9e 11361else
ba479fd2
NN
11362 echo "$as_me:$LINENO: result: no" >&5
11363echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11364#define $ac_tr_decl 0
ba479fd2
NN
11365_ACEOF
11366
81bf3d9e
RH
11367fi
11368
11369done
86cf1cbd 11370
81bf3d9e 11371
ba479fd2 11372cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11373/* confdefs.h. */
11374_ACEOF
11375cat confdefs.h >>conftest.$ac_ext
11376cat >>conftest.$ac_ext <<_ACEOF
11377/* end confdefs.h. */
b2522d2b
HPN
11378
11379#include "ansidecl.h"
11380#include "system.h"
11381#ifdef HAVE_SYS_RESOURCE_H
11382#include <sys/resource.h>
11383#endif
11384
ba479fd2
NN
11385int
11386main ()
11387{
b2522d2b 11388rlim_t l = 0;
ba479fd2
NN
11389 ;
11390 return 0;
11391}
11392_ACEOF
11393rm -f conftest.$ac_objext
11394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11395 (eval $ac_compile) 2>conftest.er1
ba479fd2 11396 ac_status=$?
86da66b5
HPN
11397 grep -v '^ *+' conftest.er1 >conftest.err
11398 rm -f conftest.er1
11399 cat conftest.err >&5
ba479fd2
NN
11400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11401 (exit $ac_status); } &&
a1286ef5
ZW
11402 { ac_try='test -z "$ac_c_werror_flag"
11403 || test ! -s conftest.err'
86da66b5
HPN
11404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11405 (eval $ac_try) 2>&5
11406 ac_status=$?
11407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11408 (exit $ac_status); }; } &&
11409 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11411 (eval $ac_try) 2>&5
11412 ac_status=$?
11413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11414 (exit $ac_status); }; }; then
b2522d2b
HPN
11415 :
11416else
ba479fd2
NN
11417 echo "$as_me: failed program was:" >&5
11418sed 's/^/| /' conftest.$ac_ext >&5
11419
11420
11421cat >>confdefs.h <<\_ACEOF
b2522d2b 11422#define rlim_t long
ba479fd2 11423_ACEOF
b2522d2b
HPN
11424
11425fi
86da66b5 11426rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 11427
2102b2fe
RS
11428# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11429# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11430# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11431# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 11432
351df804 11433for ac_func in ldgetname
c1800ec8 11434do
ad6717df 11435 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11436echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11437echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11438if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11439 echo $ECHO_N "(cached) $ECHO_C" >&6
11440else
11441 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11442/* confdefs.h. */
11443_ACEOF
11444cat confdefs.h >>conftest.$ac_ext
11445cat >>conftest.$ac_ext <<_ACEOF
11446/* end confdefs.h. */
c1800ec8
ZW
11447#undef $ac_tr_decl
11448#define $ac_tr_decl 1
ba479fd2 11449
351df804
KG
11450#include "ansidecl.h"
11451#include "system.h"
11452#ifdef HAVE_LDFCN_H
2102b2fe
RS
11453#undef FREAD
11454#undef FWRITE
351df804
KG
11455#include <ldfcn.h>
11456#endif
11457
11458
ba479fd2
NN
11459int
11460main ()
11461{
351df804
KG
11462#ifndef $ac_func
11463char *(*pfn) = (char *(*)) $ac_func ;
11464#endif
ba479fd2
NN
11465 ;
11466 return 0;
11467}
11468_ACEOF
11469rm -f conftest.$ac_objext
11470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11471 (eval $ac_compile) 2>conftest.er1
ba479fd2 11472 ac_status=$?
86da66b5
HPN
11473 grep -v '^ *+' conftest.er1 >conftest.err
11474 rm -f conftest.er1
11475 cat conftest.err >&5
ba479fd2
NN
11476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11477 (exit $ac_status); } &&
a1286ef5
ZW
11478 { ac_try='test -z "$ac_c_werror_flag"
11479 || test ! -s conftest.err'
86da66b5
HPN
11480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11481 (eval $ac_try) 2>&5
11482 ac_status=$?
11483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11484 (exit $ac_status); }; } &&
11485 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11487 (eval $ac_try) 2>&5
11488 ac_status=$?
11489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11490 (exit $ac_status); }; }; then
351df804
KG
11491 eval "gcc_cv_have_decl_$ac_func=yes"
11492else
ba479fd2
NN
11493 echo "$as_me: failed program was:" >&5
11494sed 's/^/| /' conftest.$ac_ext >&5
11495
11496eval "gcc_cv_have_decl_$ac_func=no"
351df804 11497fi
86da66b5 11498rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
11499fi
11500
11501if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11502 echo "$as_me:$LINENO: result: yes" >&5
11503echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11504#define $ac_tr_decl 1
ba479fd2
NN
11505_ACEOF
11506
351df804 11507else
ba479fd2
NN
11508 echo "$as_me:$LINENO: result: no" >&5
11509echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11510#define $ac_tr_decl 0
ba479fd2
NN
11511_ACEOF
11512
351df804
KG
11513fi
11514
11515done
ba479fd2 11516
351df804
KG
11517
11518
11519for ac_func in times
11520do
ad6717df 11521 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11522echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11523echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11524if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11525 echo $ECHO_N "(cached) $ECHO_C" >&6
11526else
11527 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11528/* confdefs.h. */
11529_ACEOF
11530cat confdefs.h >>conftest.$ac_ext
11531cat >>conftest.$ac_ext <<_ACEOF
11532/* end confdefs.h. */
351df804
KG
11533#undef $ac_tr_decl
11534#define $ac_tr_decl 1
ba479fd2 11535
c1800ec8
ZW
11536#include "ansidecl.h"
11537#include "system.h"
11538#ifdef HAVE_SYS_TIMES_H
11539#include <sys/times.h>
11540#endif
11541
11542
ba479fd2
NN
11543int
11544main ()
11545{
c1800ec8
ZW
11546#ifndef $ac_func
11547char *(*pfn) = (char *(*)) $ac_func ;
11548#endif
ba479fd2
NN
11549 ;
11550 return 0;
11551}
11552_ACEOF
11553rm -f conftest.$ac_objext
11554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11555 (eval $ac_compile) 2>conftest.er1
ba479fd2 11556 ac_status=$?
86da66b5
HPN
11557 grep -v '^ *+' conftest.er1 >conftest.err
11558 rm -f conftest.er1
11559 cat conftest.err >&5
ba479fd2
NN
11560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11561 (exit $ac_status); } &&
a1286ef5
ZW
11562 { ac_try='test -z "$ac_c_werror_flag"
11563 || test ! -s conftest.err'
86da66b5
HPN
11564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11565 (eval $ac_try) 2>&5
11566 ac_status=$?
11567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11568 (exit $ac_status); }; } &&
11569 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11571 (eval $ac_try) 2>&5
11572 ac_status=$?
11573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11574 (exit $ac_status); }; }; then
c1800ec8
ZW
11575 eval "gcc_cv_have_decl_$ac_func=yes"
11576else
ba479fd2
NN
11577 echo "$as_me: failed program was:" >&5
11578sed 's/^/| /' conftest.$ac_ext >&5
11579
11580eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 11581fi
86da66b5 11582rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
11583fi
11584
11585if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11586 echo "$as_me:$LINENO: result: yes" >&5
11587echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11588#define $ac_tr_decl 1
ba479fd2
NN
11589_ACEOF
11590
c1800ec8 11591else
ba479fd2
NN
11592 echo "$as_me:$LINENO: result: no" >&5
11593echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11594#define $ac_tr_decl 0
ba479fd2
NN
11595_ACEOF
11596
c1800ec8
ZW
11597fi
11598
11599done
c1800ec8
ZW
11600
11601
11602# More time-related stuff.
ba479fd2
NN
11603echo "$as_me:$LINENO: checking for struct tms" >&5
11604echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
11605if test "${ac_cv_struct_tms+set}" = set; then
11606 echo $ECHO_N "(cached) $ECHO_C" >&6
11607else
11608
11609cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11610/* confdefs.h. */
11611_ACEOF
11612cat confdefs.h >>conftest.$ac_ext
11613cat >>conftest.$ac_ext <<_ACEOF
11614/* end confdefs.h. */
c1800ec8
ZW
11615
11616#include "ansidecl.h"
11617#include "system.h"
11618#ifdef HAVE_SYS_TIMES_H
11619#include <sys/times.h>
11620#endif
11621
ba479fd2
NN
11622int
11623main ()
11624{
c1800ec8 11625struct tms tms;
ba479fd2
NN
11626 ;
11627 return 0;
11628}
11629_ACEOF
11630rm -f conftest.$ac_objext
11631if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11632 (eval $ac_compile) 2>conftest.er1
ba479fd2 11633 ac_status=$?
86da66b5
HPN
11634 grep -v '^ *+' conftest.er1 >conftest.err
11635 rm -f conftest.er1
11636 cat conftest.err >&5
ba479fd2
NN
11637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11638 (exit $ac_status); } &&
a1286ef5
ZW
11639 { ac_try='test -z "$ac_c_werror_flag"
11640 || test ! -s conftest.err'
86da66b5
HPN
11641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11642 (eval $ac_try) 2>&5
11643 ac_status=$?
11644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11645 (exit $ac_status); }; } &&
11646 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11648 (eval $ac_try) 2>&5
11649 ac_status=$?
11650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11651 (exit $ac_status); }; }; then
c1800ec8
ZW
11652 ac_cv_struct_tms=yes
11653else
ba479fd2
NN
11654 echo "$as_me: failed program was:" >&5
11655sed 's/^/| /' conftest.$ac_ext >&5
11656
11657ac_cv_struct_tms=no
c1800ec8 11658fi
86da66b5 11659rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11660fi
ba479fd2
NN
11661echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11662echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 11663if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
11664
11665cat >>confdefs.h <<\_ACEOF
c1800ec8 11666#define HAVE_STRUCT_TMS 1
ba479fd2 11667_ACEOF
c1800ec8
ZW
11668
11669fi
11670
11671# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11672# revisit after autoconf 2.50.
ba479fd2
NN
11673echo "$as_me:$LINENO: checking for clock_t" >&5
11674echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
11675if test "${gcc_cv_type_clock_t+set}" = set; then
11676 echo $ECHO_N "(cached) $ECHO_C" >&6
11677else
11678
11679cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11680/* confdefs.h. */
11681_ACEOF
11682cat confdefs.h >>conftest.$ac_ext
11683cat >>conftest.$ac_ext <<_ACEOF
11684/* end confdefs.h. */
c1800ec8
ZW
11685
11686#include "ansidecl.h"
11687#include "system.h"
11688
ba479fd2
NN
11689int
11690main ()
11691{
c1800ec8 11692clock_t x;
ba479fd2
NN
11693 ;
11694 return 0;
11695}
11696_ACEOF
11697rm -f conftest.$ac_objext
11698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11699 (eval $ac_compile) 2>conftest.er1
ba479fd2 11700 ac_status=$?
86da66b5
HPN
11701 grep -v '^ *+' conftest.er1 >conftest.err
11702 rm -f conftest.er1
11703 cat conftest.err >&5
ba479fd2
NN
11704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11705 (exit $ac_status); } &&
a1286ef5
ZW
11706 { ac_try='test -z "$ac_c_werror_flag"
11707 || test ! -s conftest.err'
86da66b5
HPN
11708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11709 (eval $ac_try) 2>&5
11710 ac_status=$?
11711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11712 (exit $ac_status); }; } &&
11713 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11715 (eval $ac_try) 2>&5
11716 ac_status=$?
11717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11718 (exit $ac_status); }; }; then
c1800ec8
ZW
11719 gcc_cv_type_clock_t=yes
11720else
ba479fd2
NN
11721 echo "$as_me: failed program was:" >&5
11722sed 's/^/| /' conftest.$ac_ext >&5
11723
11724gcc_cv_type_clock_t=no
c1800ec8 11725fi
86da66b5 11726rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11727fi
ba479fd2
NN
11728echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
11729echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 11730if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
11731
11732cat >>confdefs.h <<\_ACEOF
c1800ec8 11733#define HAVE_CLOCK_T 1
ba479fd2 11734_ACEOF
c1800ec8
ZW
11735
11736fi
11737
eb70d86d
AS
11738# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
11739CFLAGS="$saved_CFLAGS"
11740
07cf4226
DM
11741# Check whether --enable-initfini-array or --disable-initfini-array was given.
11742if test "${enable_initfini_array+set}" = set; then
11743 enableval="$enable_initfini_array"
ba479fd2 11744
07cf4226 11745else
ba479fd2
NN
11746
11747echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
11748echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
11749if test "${gcc_cv_initfini_array+set}" = set; then
11750 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 11751else
eb70d86d 11752 if test "$cross_compiling" = yes; then
918c4fe4 11753 gcc_cv_initfini_array=no
eb70d86d 11754else
ba479fd2 11755 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11756/* confdefs.h. */
11757_ACEOF
11758cat confdefs.h >>conftest.$ac_ext
11759cat >>conftest.$ac_ext <<_ACEOF
11760/* end confdefs.h. */
eb70d86d 11761
07cf4226
DM
11762static int x = -1;
11763int main (void) { return x; }
11764int foo (void) { x = 0; }
11765int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
11766_ACEOF
11767rm -f conftest$ac_exeext
11768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11769 (eval $ac_link) 2>&5
11770 ac_status=$?
11771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11772 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11774 (eval $ac_try) 2>&5
11775 ac_status=$?
11776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11777 (exit $ac_status); }; }; then
918c4fe4 11778 gcc_cv_initfini_array=yes
eb70d86d 11779else
ba479fd2
NN
11780 echo "$as_me: program exited with status $ac_status" >&5
11781echo "$as_me: failed program was:" >&5
11782sed 's/^/| /' conftest.$ac_ext >&5
11783
11784( exit $ac_status )
11785gcc_cv_initfini_array=no
eb70d86d 11786fi
86da66b5 11787rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 11788fi
07cf4226 11789fi
ba479fd2
NN
11790echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
11791echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 11792 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 11793
ba479fd2 11794fi;
63cf211a 11795if test $enable_initfini_array = yes; then
ba479fd2
NN
11796
11797cat >>confdefs.h <<\_ACEOF
eb70d86d 11798#define HAVE_INITFINI_ARRAY 1
ba479fd2 11799_ACEOF
07cf4226 11800
eb70d86d 11801fi
81bf3d9e 11802
ba479fd2
NN
11803# mkdir takes a single argument on some systems.
11804echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
11805echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
11806if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
11807 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 11808else
ba479fd2 11809 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11810/* confdefs.h. */
11811_ACEOF
11812cat confdefs.h >>conftest.$ac_ext
11813cat >>conftest.$ac_ext <<_ACEOF
11814/* end confdefs.h. */
75923b2f
MK
11815
11816#include <sys/types.h>
11817#ifdef HAVE_SYS_STAT_H
11818# include <sys/stat.h>
11819#endif
11820#ifdef HAVE_UNISTD_H
11821# include <unistd.h>
11822#endif
11823#ifdef HAVE_DIRECT_H
11824# include <direct.h>
11825#endif
ba479fd2
NN
11826int
11827main ()
11828{
75923b2f 11829mkdir ("foo", 0);
ba479fd2
NN
11830 ;
11831 return 0;
11832}
11833_ACEOF
11834rm -f conftest.$ac_objext
11835if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11836 (eval $ac_compile) 2>conftest.er1
ba479fd2 11837 ac_status=$?
86da66b5
HPN
11838 grep -v '^ *+' conftest.er1 >conftest.err
11839 rm -f conftest.er1
11840 cat conftest.err >&5
ba479fd2
NN
11841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11842 (exit $ac_status); } &&
a1286ef5
ZW
11843 { ac_try='test -z "$ac_c_werror_flag"
11844 || test ! -s conftest.err'
86da66b5
HPN
11845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11846 (eval $ac_try) 2>&5
11847 ac_status=$?
11848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11849 (exit $ac_status); }; } &&
11850 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11852 (eval $ac_try) 2>&5
11853 ac_status=$?
11854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11855 (exit $ac_status); }; }; then
75923b2f
MK
11856 gcc_cv_mkdir_takes_one_arg=no
11857else
ba479fd2
NN
11858 echo "$as_me: failed program was:" >&5
11859sed 's/^/| /' conftest.$ac_ext >&5
11860
11861gcc_cv_mkdir_takes_one_arg=yes
75923b2f 11862fi
86da66b5 11863rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 11864fi
ba479fd2
NN
11865echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
11866echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 11867if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
11868
11869cat >>confdefs.h <<\_ACEOF
75923b2f 11870#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 11871_ACEOF
75923b2f
MK
11872
11873fi
11874
11875
861bb6c1
JL
11876# File extensions
11877manext='.1'
11878objext='.o'
11879
11880
11881
4977bab6
ZW
11882# With Setjmp/Longjmp based exception handling.
11883# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
11884if test "${enable_sjlj_exceptions+set}" = set; then
11885 enableval="$enable_sjlj_exceptions"
11886 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 11887
ba479fd2
NN
11888cat >>confdefs.h <<_ACEOF
11889#define CONFIG_SJLJ_EXCEPTIONS $sjlj
11890_ACEOF
4977bab6 11891
ba479fd2 11892fi;
4977bab6 11893
443728bb
L
11894# For platforms with the unwind ABI which includes an unwind library,
11895# libunwind, we can choose to use the system libunwind.
4977bab6 11896
443728bb
L
11897# Check whether --with-system-libunwind or --without-system-libunwind was given.
11898if test "${with_system_libunwind+set}" = set; then
11899 withval="$with_system_libunwind"
4977bab6 11900
ba479fd2 11901fi;
4977bab6 11902
34a86c2b
NN
11903# --------------------------------------------------------
11904# Build, host, and target specific configuration fragments
11905# --------------------------------------------------------
11906
5b28c537
NN
11907# Collect build-machine-specific information.
11908. ${srcdir}/config.build
11909
a89ea0df
NN
11910# Collect host-machine-specific information.
11911. ${srcdir}/config.host
11912
ef69da62 11913target_gtfiles=
a89ea0df
NN
11914
11915# Collect target-machine-specific information.
8ad9fb33 11916. ${srcdir}/config.gcc
861bb6c1
JL
11917
11918extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 11919extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
11920
11921# Default the target-machine variables that were not explicitly set.
75bffa71 11922if test x"$tm_file" = x
861bb6c1
JL
11923then tm_file=$cpu_type/$cpu_type.h; fi
11924
6b2adea9 11925if test x"$extra_headers" = x
861bb6c1
JL
11926then extra_headers=; fi
11927
75bffa71 11928if test x$md_file = x
e98e406f 11929then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 11930
75bffa71 11931if test x$out_file = x
861bb6c1
JL
11932then out_file=$cpu_type/$cpu_type.c; fi
11933
75bffa71 11934if test x"$tmake_file" = x
861bb6c1
JL
11935then tmake_file=$cpu_type/t-$cpu_type
11936fi
11937
90e6a802 11938if test x"$dwarf2" = xyes
756ee602 11939then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
11940fi
11941
861bb6c1 11942# Say what files are being used for the output code and MD file.
11642c3a 11943echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
11944echo "Using \`$srcdir/config/$md_file' as machine description file."
11945
11642c3a 11946# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
11947# about them and drop them.
11948
11642c3a
ZW
11949bx=
11950for x in $build_xm_file; do
11951 if test -f $srcdir/config/$x
11952 then bx="$bx $x"
ba479fd2
NN
11953 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11954echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11955 fi
11956done
11957build_xm_file="$bx"
11958
11959hx=
11960for x in $host_xm_file; do
11961 if test -f $srcdir/config/$x
11962 then hx="$hx $x"
ba479fd2
NN
11963 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11964echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11965 fi
11966done
11967host_xm_file="$hx"
11968
11969tx=
11970for x in $xm_file; do
11971 if test -f $srcdir/config/$x
11972 then tx="$tx $x"
ba479fd2
NN
11973 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11974echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11975 fi
11976done
11977xm_file="$tx"
11978
861bb6c1
JL
11979count=a
11980for f in $tm_file; do
11981 count=${count}x
11982done
75bffa71 11983if test $count = ax; then
861bb6c1
JL
11984 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
11985else
11986 echo "Using the following target machine macro files:"
11987 for f in $tm_file; do
11988 echo " $srcdir/config/$f"
11989 done
11990fi
11991
4977bab6 11992if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
11993
11994cat >>confdefs.h <<\_ACEOF
4977bab6 11995#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 11996_ACEOF
4977bab6
ZW
11997
11998fi
11999
99fa8911
AP
12000if test x$use_long_long_for_widest_fast_int = xyes; then
12001
12002cat >>confdefs.h <<\_ACEOF
12003#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12004_ACEOF
12005
12006fi
12007
861bb6c1
JL
12008count=a
12009for f in $host_xm_file; do
12010 count=${count}x
12011done
11642c3a
ZW
12012if test $count = a; then
12013 :
12014elif test $count = ax; then
861bb6c1
JL
12015 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12016else
12017 echo "Using the following host machine macro files:"
12018 for f in $host_xm_file; do
12019 echo " $srcdir/config/$f"
12020 done
12021fi
476d9098 12022echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 12023
75bffa71 12024if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
12025 count=a
12026 for f in $build_xm_file; do
12027 count=${count}x
12028 done
11642c3a
ZW
12029 if test $count = a; then
12030 :
12031 elif test $count = ax; then
861bb6c1
JL
12032 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12033 else
12034 echo "Using the following build machine macro files:"
12035 for f in $build_xm_file; do
12036 echo " $srcdir/config/$f"
12037 done
12038 fi
12039fi
12040
8bb915b6
NN
12041# ---------
12042# Threading
12043# ---------
12044
c2e494a8 12045# Check if a valid thread package
615be2cf 12046case ${enable_threads} in
c2e494a8
NN
12047 "" | no)
12048 # No threads
12049 target_thread_file='single'
12050 ;;
12051 yes)
12052 # default
12053 target_thread_file='single'
12054 ;;
18167442 12055 aix | dce | gnat | irix | posix | posix95 | rtems | \
769e49eb 12056 single | solaris | vxworks | win32 )
615be2cf 12057 target_thread_file=${enable_threads}
c2e494a8
NN
12058 ;;
12059 *)
615be2cf 12060 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
12061 exit 1
12062 ;;
12063esac
12064
12065if test x${thread_file} = x; then
12066 # No thread file set by target-specific clauses in config.gcc,
12067 # so use file chosen by default logic above
12068 thread_file=${target_thread_file}
861bb6c1
JL
12069fi
12070
8bb915b6
NN
12071# Make gthr-default.h if we have a thread file.
12072gthread_flags=
12073if test $thread_file != single; then
12074 rm -f gthr-default.h
12075 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12076 gthread_flags=-DHAVE_GTHR_DEFAULT
12077fi
12078
12079
12080# --------
12081# UNSORTED
12082# --------
12083
18fbf599 12084use_cxa_atexit=no
2121a768
JT
12085if test x$enable___cxa_atexit = xyes || \
12086 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599
PB
12087 if test x$host = x$target; then
12088 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
354b7da5
DH
12089echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
12090if test "${ac_cv_func___cxa_atexit+set}" = set; then
12091 echo $ECHO_N "(cached) $ECHO_C" >&6
12092else
12093 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
12094/* confdefs.h. */
12095_ACEOF
12096cat confdefs.h >>conftest.$ac_ext
12097cat >>conftest.$ac_ext <<_ACEOF
12098/* end confdefs.h. */
86da66b5
HPN
12099/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12100 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12101#define __cxa_atexit innocuous___cxa_atexit
12102
354b7da5
DH
12103/* System header to define __stub macros and hopefully few prototypes,
12104 which can conflict with char __cxa_atexit (); below.
12105 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12106 <limits.h> exists even on freestanding compilers. */
86da66b5 12107
354b7da5
DH
12108#ifdef __STDC__
12109# include <limits.h>
12110#else
12111# include <assert.h>
12112#endif
86da66b5
HPN
12113
12114#undef __cxa_atexit
12115
354b7da5
DH
12116/* Override any gcc2 internal prototype to avoid an error. */
12117#ifdef __cplusplus
12118extern "C"
12119{
12120#endif
12121/* We use char because int might match the return type of a gcc2
12122 builtin and then its argument prototype would still apply. */
12123char __cxa_atexit ();
12124/* The GNU C library defines this for functions which it implements
12125 to always fail with ENOSYS. Some functions are actually named
12126 something starting with __ and the normal name is an alias. */
12127#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
12128choke me
12129#else
12130char (*f) () = __cxa_atexit;
12131#endif
12132#ifdef __cplusplus
12133}
12134#endif
12135
12136int
12137main ()
12138{
12139return f != __cxa_atexit;
12140 ;
12141 return 0;
12142}
12143_ACEOF
12144rm -f conftest.$ac_objext conftest$ac_exeext
12145if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12146 (eval $ac_link) 2>conftest.er1
354b7da5 12147 ac_status=$?
86da66b5
HPN
12148 grep -v '^ *+' conftest.er1 >conftest.err
12149 rm -f conftest.er1
12150 cat conftest.err >&5
354b7da5
DH
12151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12152 (exit $ac_status); } &&
a1286ef5
ZW
12153 { ac_try='test -z "$ac_c_werror_flag"
12154 || test ! -s conftest.err'
86da66b5
HPN
12155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12156 (eval $ac_try) 2>&5
12157 ac_status=$?
12158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12159 (exit $ac_status); }; } &&
12160 { ac_try='test -s conftest$ac_exeext'
354b7da5
DH
12161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12162 (eval $ac_try) 2>&5
12163 ac_status=$?
12164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12165 (exit $ac_status); }; }; then
12166 ac_cv_func___cxa_atexit=yes
12167else
12168 echo "$as_me: failed program was:" >&5
12169sed 's/^/| /' conftest.$ac_ext >&5
12170
12171ac_cv_func___cxa_atexit=no
12172fi
86da66b5
HPN
12173rm -f conftest.err conftest.$ac_objext \
12174 conftest$ac_exeext conftest.$ac_ext
354b7da5
DH
12175fi
12176echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12177echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
12178if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
12179 use_cxa_atexit=yes
12180else
12181 echo "__cxa_atexit can't be enabled on this target"
12182fi
12183
12184 else
12185 # We can't check for __cxa_atexit when building a cross, so assume
12186 # it is available
12187 use_cxa_atexit=yes
12188 fi
12189 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
12190
12191cat >>confdefs.h <<\_ACEOF
2121a768 12192#define DEFAULT_USE_CXA_ATEXIT 1
ba479fd2 12193_ACEOF
2121a768 12194
18fbf599 12195 fi
2121a768
JT
12196fi
12197
a5381466 12198# Look for a file containing extra machine modes.
1c0ca89d
ZW
12199if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12200 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
12201
12202
12203cat >>confdefs.h <<_ACEOF
e22340b0 12204#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 12205_ACEOF
a5381466
ZW
12206
12207fi
12208
75685792
RS
12209# Convert extra_options into a form suitable for Makefile use.
12210extra_opt_files=
12211for f in $extra_options; do
12212 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12213done
12214
12215
b7cb92ad 12216# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 12217# the first file included by config.h.
4977bab6 12218# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 12219# as well. If host!=build, we are in error and need to do more
db81d74a 12220# work to find out the build config parameters.
75bffa71 12221if test x$host = x$build
db81d74a 12222then
eaf4e618 12223 build_auto=auto-host.h
b7cb92ad
JL
12224else
12225 # We create a subdir, then run autoconf in the subdir.
12226 # To prevent recursion we set host and build for the new
12227 # invocation of configure to the build for this invocation
ba479fd2 12228 # of configure.
b7cb92ad
JL
12229 tempdir=build.$$
12230 rm -rf $tempdir
12231 mkdir $tempdir
12232 cd $tempdir
12233 case ${srcdir} in
255b8a49 12234 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
12235 *) realsrcdir=../${srcdir};;
12236 esac
d920e825
L
12237 saved_CFLAGS="${CFLAGS}"
12238 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12239 ${realsrcdir}/configure \
33e70558 12240 --enable-languages=${enable_languages-all} \
534d0cc0 12241 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 12242 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
12243
12244 # We just finished tests for the build machine, so rename
12245 # the file auto-build.h in the gcc directory.
12246 mv auto-host.h ../auto-build.h
12247 cd ..
12248 rm -rf $tempdir
eaf4e618 12249 build_auto=auto-build.h
db81d74a
RH
12250fi
12251
06f0b04c 12252
eaf4e618 12253tm_file="${tm_file} defaults.h"
4977bab6
ZW
12254tm_p_file="${tm_p_file} tm-preds.h"
12255host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12256build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 12257# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477
KG
12258# put this back in temporarily.
12259xm_file="ansidecl.h ${xm_file}"
0056a9b5 12260
34a86c2b
NN
12261# --------
12262# UNSORTED
12263# --------
12264
cc1e60ea 12265# Compile in configure arguments.
8105825d 12266if test -f configargs.h ; then
cc1e60ea 12267 # Being re-configured.
022dae81 12268 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
12269 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12270else
12271 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12272fi
eeae7b41
DJ
12273
12274# Double all backslashes and backslash all quotes to turn
12275# gcc_config_arguments into a C string.
12276sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12277$gcc_config_arguments
12278EOF
12279gcc_config_arguments_str=`cat conftest.out`
12280rm -f conftest.out
12281
cc1e60ea
JM
12282cat > configargs.h <<EOF
12283/* Generated automatically. */
eeae7b41 12284static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 12285static const char thread_model[] = "$thread_file";
7816bea0
DJ
12286
12287static const struct {
12288 const char *name, *value;
12289} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
12290EOF
12291
ab87f8c8 12292# Internationalization
56694dd9
ZW
12293# If we haven't got the data from the intl directory,
12294# assume NLS is disabled.
ba479fd2
NN
12295USE_NLS=no
12296LIBINTL=
12297LIBINTL_DEP=
12298INCINTL=
12299XGETTEXT=
12300GMSGFMT=
12301POSUB=
56694dd9
ZW
12302if test -f ../intl/config.intl; then
12303 . ../intl/config.intl
093e61a6 12304fi
ba479fd2
NN
12305echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12306echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
56694dd9 12307if test x"$USE_NLS" != xyes; then
ba479fd2
NN
12308 echo "$as_me:$LINENO: result: no" >&5
12309echo "${ECHO_T}no" >&6
56694dd9 12310else
ba479fd2
NN
12311 echo "$as_me:$LINENO: result: yes" >&5
12312echo "${ECHO_T}yes" >&6
12313
12314cat >>confdefs.h <<\_ACEOF
56694dd9 12315#define ENABLE_NLS 1
ba479fd2 12316_ACEOF
56694dd9 12317
093e61a6 12318
ba479fd2
NN
12319 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12320echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
56694dd9 12321 # Look for .po and .gmo files in the source directory.
ba479fd2 12322 CATALOGS=
56694dd9
ZW
12323 XLINGUAS=
12324 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12325 # If there aren't any .gmo files the shell will give us the
12326 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12327 # weeded out.
12328 case "$cat" in *\**)
12329 continue;;
12330 esac
12331 # The quadruple backslash is collapsed to a double backslash
12332 # by the backticks, then collapsed again by the double quotes,
12333 # leaving us with one backslash in the sed expression (right
12334 # before the dot that mustn't act as a wildcard).
12335 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
12336 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
12337 # The user is allowed to set LINGUAS to a list of languages to
12338 # install catalogs for. If it's empty that means "all of them."
12339 if test "x$LINGUAS" = x; then
12340 CATALOGS="$CATALOGS $cat"
12341 XLINGUAS="$XLINGUAS $lang"
12342 else
12343 case "$LINGUAS" in *$lang*)
12344 CATALOGS="$CATALOGS $cat"
12345 XLINGUAS="$XLINGUAS $lang"
12346 ;;
12347 esac
12348 fi
12349 done
12350 LINGUAS="$XLINGUAS"
ba479fd2
NN
12351 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12352echo "${ECHO_T}$LINGUAS" >&6
56694dd9 12353fi
861bb6c1 12354
56694dd9
ZW
12355# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12356# -liconv on the link line twice.
12357case "$LIBINTL" in *$LIBICONV*)
12358 LIBICONV= ;;
12359esac
dc6746e7 12360
56694dd9
ZW
12361# Windows32 Registry support for specifying GCC installation paths.
12362# Check whether --enable-win32-registry or --disable-win32-registry was given.
12363if test "${enable_win32_registry+set}" = set; then
12364 enableval="$enable_win32_registry"
dc6746e7 12365
ba479fd2 12366fi;
ba479fd2 12367
a1286ef5
ZW
12368case $host_os in
12369 win32 | pe | cygwin* | mingw32* | uwin*)
12370 if test "x$enable_win32_registry" != xno; then
12371 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
ba479fd2
NN
12372echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
12373if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12374 echo $ECHO_N "(cached) $ECHO_C" >&6
12375else
12376 ac_func_search_save_LIBS=$LIBS
12377ac_cv_search_RegOpenKeyExA=no
12378cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12379/* confdefs.h. */
12380_ACEOF
12381cat confdefs.h >>conftest.$ac_ext
12382cat >>conftest.$ac_ext <<_ACEOF
12383/* end confdefs.h. */
861bb6c1 12384
ab87f8c8 12385/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12386#ifdef __cplusplus
12387extern "C"
12388#endif
ab87f8c8 12389/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12390 builtin and then its argument prototype would still apply. */
12391char RegOpenKeyExA ();
12392int
12393main ()
12394{
12395RegOpenKeyExA ();
12396 ;
12397 return 0;
12398}
12399_ACEOF
12400rm -f conftest.$ac_objext conftest$ac_exeext
12401if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12402 (eval $ac_link) 2>conftest.er1
ba479fd2 12403 ac_status=$?
86da66b5
HPN
12404 grep -v '^ *+' conftest.er1 >conftest.err
12405 rm -f conftest.er1
12406 cat conftest.err >&5
ba479fd2
NN
12407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12408 (exit $ac_status); } &&
a1286ef5
ZW
12409 { ac_try='test -z "$ac_c_werror_flag"
12410 || test ! -s conftest.err'
86da66b5
HPN
12411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12412 (eval $ac_try) 2>&5
12413 ac_status=$?
12414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12415 (exit $ac_status); }; } &&
12416 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12418 (eval $ac_try) 2>&5
12419 ac_status=$?
12420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12421 (exit $ac_status); }; }; then
56694dd9 12422 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 12423else
ba479fd2
NN
12424 echo "$as_me: failed program was:" >&5
12425sed 's/^/| /' conftest.$ac_ext >&5
12426
861bb6c1 12427fi
86da66b5
HPN
12428rm -f conftest.err conftest.$ac_objext \
12429 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
12430if test "$ac_cv_search_RegOpenKeyExA" = no; then
12431 for ac_lib in advapi32; do
12432 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12433 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12434/* confdefs.h. */
12435_ACEOF
12436cat confdefs.h >>conftest.$ac_ext
12437cat >>conftest.$ac_ext <<_ACEOF
12438/* end confdefs.h. */
12439
56694dd9 12440/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12441#ifdef __cplusplus
12442extern "C"
12443#endif
56694dd9 12444/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12445 builtin and then its argument prototype would still apply. */
12446char RegOpenKeyExA ();
12447int
12448main ()
12449{
12450RegOpenKeyExA ();
12451 ;
12452 return 0;
12453}
12454_ACEOF
12455rm -f conftest.$ac_objext conftest$ac_exeext
12456if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12457 (eval $ac_link) 2>conftest.er1
ba479fd2 12458 ac_status=$?
86da66b5
HPN
12459 grep -v '^ *+' conftest.er1 >conftest.err
12460 rm -f conftest.er1
12461 cat conftest.err >&5
ba479fd2
NN
12462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12463 (exit $ac_status); } &&
a1286ef5
ZW
12464 { ac_try='test -z "$ac_c_werror_flag"
12465 || test ! -s conftest.err'
86da66b5
HPN
12466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12467 (eval $ac_try) 2>&5
12468 ac_status=$?
12469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12470 (exit $ac_status); }; } &&
12471 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12473 (eval $ac_try) 2>&5
12474 ac_status=$?
12475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12476 (exit $ac_status); }; }; then
12477 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 12478break
861bb6c1 12479else
ba479fd2
NN
12480 echo "$as_me: failed program was:" >&5
12481sed 's/^/| /' conftest.$ac_ext >&5
12482
861bb6c1 12483fi
86da66b5
HPN
12484rm -f conftest.err conftest.$ac_objext \
12485 conftest$ac_exeext conftest.$ac_ext
ba479fd2 12486 done
6e3f3080 12487fi
ba479fd2
NN
12488LIBS=$ac_func_search_save_LIBS
12489fi
12490echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
12491echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
12492if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 12493 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 12494
cafe096b 12495else
a1286ef5 12496 enable_win32_registry=no
093e61a6 12497fi
ab87f8c8 12498
a1286ef5
ZW
12499 fi
12500
12501 if test "x$enable_win32_registry" != xno; then
12502
12503cat >>confdefs.h <<\_ACEOF
12504#define ENABLE_WIN32_REGISTRY 1
12505_ACEOF
ab87f8c8 12506
a1286ef5
ZW
12507
12508 if test "x$enable_win32_registry" != xyes \
12509 && test "x$enable_win32_registry" != x; then
ba479fd2
NN
12510
12511cat >>confdefs.h <<_ACEOF
a1286ef5 12512#define WIN32_REGISTRY_KEY "$enable_win32_registry"
ba479fd2 12513_ACEOF
cafe096b 12514
a1286ef5
ZW
12515 fi
12516 fi
12517 ;;
56694dd9 12518esac
ab87f8c8 12519
56694dd9
ZW
12520# Get an absolute path to the GCC top-level source directory
12521holddir=`${PWDCMD-pwd}`
12522cd $srcdir
12523topdir=`${PWDCMD-pwd}`
12524cd $holddir
ab87f8c8 12525
56694dd9 12526# Conditionalize the makefile for this host machine.
2ed26f6b 12527xmake_file=
c406e779 12528for f in ${host_xmake_file}
56694dd9
ZW
12529do
12530 if test -f ${srcdir}/config/$f
12531 then
2ed26f6b 12532 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
12533 fi
12534done
093e61a6 12535
56694dd9 12536# Conditionalize the makefile for this target machine.
2ed26f6b 12537tmake_file_=
c406e779 12538for f in ${tmake_file}
56694dd9
ZW
12539do
12540 if test -f ${srcdir}/config/$f
12541 then
2ed26f6b 12542 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
12543 fi
12544done
2ed26f6b 12545tmake_file="${tmake_file_}"
71a94577 12546
ab87f8c8
JL
12547# If the host doesn't support symlinks, modify CC in
12548# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
12549# Otherwise, we can use "CC=$(CC)".
12550rm -f symtest.tem
35f06ae4
PB
12551case "$LN_S" in
12552 *-s*)
12553 cc_set_by_configure="\$(CC)"
12554 quoted_cc_set_by_configure="\$(CC)"
12555 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12556 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12557 ;;
12558 *)
12559 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
12560 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
12561 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
12562 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
12563 ;;
12564esac
ab87f8c8 12565
5395b47b
NN
12566# This is a terrible hack which will go away some day.
12567host_cc_for_libada=${CC}
1e3fad21
NN
12568
12569
ab87f8c8
JL
12570out_object_file=`basename $out_file .c`.o
12571
75685792
RS
12572tm_file_list="options.h"
12573tm_include_list="options.h"
ab87f8c8 12574for f in $tm_file; do
64ccbc99 12575 case $f in
d02af173 12576 defaults.h )
e22340b0
ZW
12577 tm_file_list="${tm_file_list} \$(srcdir)/$f"
12578 tm_include_list="${tm_include_list} $f"
12579 ;;
12580 * )
12581 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
12582 tm_include_list="${tm_include_list} config/$f"
12583 ;;
64ccbc99 12584 esac
ab87f8c8
JL
12585done
12586
11642c3a 12587tm_p_file_list=
e22340b0 12588tm_p_include_list=
11642c3a 12589for f in $tm_p_file; do
4977bab6
ZW
12590 case $f in
12591 tm-preds.h )
e22340b0
ZW
12592 tm_p_file_list="${tm_p_file_list} $f"
12593 tm_p_include_list="${tm_p_include_list} $f"
12594 ;;
12595 * )
12596 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
12597 tm_p_include_list="${tm_p_include_list} config/$f"
12598 esac
12599done
12600
12601xm_file_list=
12602xm_include_list=
12603for f in $xm_file; do
12604 case $f in
12605 ansidecl.h )
12606 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
12607 xm_include_list="${xm_include_list} $f"
12608 ;;
12609 auto-host.h )
12610 xm_file_list="${xm_file_list} $f"
12611 xm_include_list="${xm_include_list} $f"
12612 ;;
12613 * )
12614 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
12615 xm_include_list="${xm_include_list} config/$f"
12616 ;;
4977bab6 12617 esac
11642c3a
ZW
12618done
12619
ab87f8c8 12620host_xm_file_list=
e22340b0 12621host_xm_include_list=
ab87f8c8 12622for f in $host_xm_file; do
64ccbc99 12623 case $f in
d02af173 12624 ansidecl.h )
e22340b0
ZW
12625 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
12626 host_xm_include_list="${host_xm_include_list} $f"
12627 ;;
e2500fed 12628 auto-host.h )
e22340b0
ZW
12629 host_xm_file_list="${host_xm_file_list} $f"
12630 host_xm_include_list="${host_xm_include_list} $f"
12631 ;;
12632 * )
12633 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
12634 host_xm_include_list="${host_xm_include_list} config/$f"
12635 ;;
64ccbc99 12636 esac
ab87f8c8
JL
12637done
12638
12639build_xm_file_list=
12640for f in $build_xm_file; do
64ccbc99 12641 case $f in
d02af173 12642 ansidecl.h )
e22340b0
ZW
12643 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
12644 build_xm_include_list="${build_xm_include_list} $f"
12645 ;;
e2500fed 12646 auto-build.h | auto-host.h )
e22340b0
ZW
12647 build_xm_file_list="${build_xm_file_list} $f"
12648 build_xm_include_list="${build_xm_include_list} $f"
12649 ;;
12650 * )
12651 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
12652 build_xm_include_list="${build_xm_include_list} config/$f"
12653 ;;
64ccbc99 12654 esac
ab87f8c8
JL
12655done
12656
a078a589
ZW
12657# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
12658# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
12659CROSS=
12660ALL=all.internal
12661SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
12662if test x$host != x$target
12663then
a078a589
ZW
12664 CROSS="-DCROSS_COMPILE"
12665 ALL=all.cross
12666 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
343f59d9 12667 case "$host","$target" in
3a7e8b87
GK
12668 # Darwin crosses can use the host system's libraries and headers,
12669 # because of the fat library support. Of course, it must be the
12670 # same version of Darwin on both sides. Allow the user to
12671 # just say --target=foo-darwin without a version number to mean
12672 # "the version on this system".
12673 *-*-darwin*,*-*-darwin*)
12674 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
12675 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
12676 if test $hostos = $targetos -o $targetos = darwin ; then
12677 CROSS=
12678 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
12679 with_headers=yes
12680 fi
12681 ;;
12682
343f59d9
AM
12683 i?86-*-*,x86_64-*-* \
12684 | powerpc*-*-*,powerpc64*-*-*)
12685 CROSS="$CROSS -DNATIVE_CROSS" ;;
12686 esac
7a615b25
AO
12687elif test "x$TARGET_SYSTEM_ROOT" != x; then
12688 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
12689 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
12690fi
12691
b39d221a
EC
12692# If this is a cross-compiler that does not
12693# have its own set of headers then define
12694# inhibit_libc
12695
dc06db20
R
12696# If this is using newlib, without having the headers available now,
12697# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
12698# This prevents libgcc2 from containing any code which requires libc
12699# support.
b39d221a 12700inhibit_libc=
dc06db20
R
12701if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
12702 test x$with_newlib = xyes ; } &&
e50084fa 12703 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
b39d221a 12704 inhibit_libc=-Dinhibit_libc
b39d221a
EC
12705fi
12706
12707
a078a589
ZW
12708# When building gcc with a cross-compiler, we need to adjust things so
12709# that the generator programs are still built with the native compiler.
12710# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
12711
12712# These are the normal (build=host) settings:
ba479fd2
NN
12713CC_FOR_BUILD='$(CC)'
12714BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 12715STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
12716
12717# Possibly disable fixproto, on a per-target basis.
12718case ${use_fixproto} in
12719 no)
12720 STMP_FIXPROTO=
12721 ;;
12722 yes)
12723 STMP_FIXPROTO=stmp-fixproto
12724 ;;
12725esac
12726
a078a589 12727
83599948
NS
12728# And these apply if build != host, or we are generating coverage data
12729if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 12730then
b11e4747 12731 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 12732
7a615b25 12733 if test "x$TARGET_SYSTEM_ROOT" = x; then
de253ca4
GK
12734 if "x$STMP_FIXPROTO" != x ; then
12735 STMP_FIXPROTO=stmp-install-fixproto
12736 fi
7a615b25 12737 fi
ab87f8c8
JL
12738fi
12739
12740# Expand extra_headers to include complete path.
12741# This substitutes for lots of t-* files.
12742extra_headers_list=
b1ef58c8
NN
12743# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
12744for file in ${extra_headers} ; do
12745 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
12746done
ab87f8c8 12747
c38f02df
ILT
12748# Define collect2 in Makefile.
12749case $host_can_use_collect2 in
12750 no) collect2= ;;
12751 *) collect2='collect2$(exeext)' ;;
12752esac
12753
12754
ab87f8c8 12755# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
12756case $use_collect2 in
12757 no) use_collect2= ;;
12758 "") ;;
ba479fd2 12759 *)
34a86c2b
NN
12760 host_xm_defines="${host_xm_defines} USE_COLLECT2"
12761 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
12762 case $host_can_use_collect2 in
12763 no)
12764 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
12765echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
12766 { (exit 1); exit 1; }; }
12767 ;;
12768 esac
34a86c2b
NN
12769 ;;
12770esac
ab87f8c8 12771
8bb915b6
NN
12772# ---------------------------
12773# Assembler & linker features
12774# ---------------------------
12775
d869a8c4
NN
12776# Identify the assembler which will work hand-in-glove with the newly
12777# built GCC, so that we can examine its features. This is the assembler
12778# which will be driven by the driver program.
12779#
12780# If build != host, and we aren't building gas in-tree, we identify a
12781# build->target assembler and hope that it will have the same features
12782# as the host->target assembler we'll be using.
ba479fd2
NN
12783echo "$as_me:$LINENO: checking what assembler to use" >&5
12784echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
34a86c2b 12785in_tree_gas=no
ab87f8c8 12786gcc_cv_as=
981d4858
JM
12787gcc_cv_gas_major_version=
12788gcc_cv_gas_minor_version=
ab87f8c8
JL
12789gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
12790if test -x "$DEFAULT_ASSEMBLER"; then
12791 gcc_cv_as="$DEFAULT_ASSEMBLER"
57991eba 12792elif test -x as$build_exeext; then
ab87f8c8 12793 # Build using assembler in the current directory.
57991eba 12794 gcc_cv_as=./as$build_exeext
34a86c2b 12795elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
12796 && test -f ../gas/Makefile \
12797 && test x$build = x$host; then
12798 # Single tree build which includes gas. We want to prefer it
12799 # over whatever linker top-level may have detected, since
12800 # we'll use what we're building after installation anyway.
ad9c4d9f
NN
12801 in_tree_gas=yes
12802 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
12803for f in $gcc_cv_as_bfd_srcdir/configure \
12804 $gcc_cv_as_gas_srcdir/configure \
12805 $gcc_cv_as_gas_srcdir/configure.in \
12806 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 12807 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
12808 if test x$gcc_cv_gas_version != x; then
12809 break
12810 fi
12811done
12812gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
12813gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
12814gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
12815case $gcc_cv_gas_patch_version in
12816 "") gcc_cv_gas_patch_version="0" ;;
12817esac
8ada417f
ZW
12818gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
12819 + $gcc_cv_gas_minor_version \) \* 1000 \
12820 + $gcc_cv_gas_patch_version`
ad9c4d9f 12821
57991eba
PB
12822 rm -f as$build_exeext
12823 $LN_S ../gas/as-new$build_exeext as$build_exeext 2>/dev/null
5408ac6c
HPN
12824 in_tree_gas_is_elf=no
12825 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
12826 || (grep 'obj_format = multi' ../gas/Makefile \
12827 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
12828 then
12829 in_tree_gas_is_elf=yes
12830 fi
08d105fa
AO
12831elif test -x "$AS_FOR_TARGET"; then
12832 gcc_cv_as="$AS_FOR_TARGET"
12833elif test -x "$AS" && test x$host = x$target; then
12834 gcc_cv_as="$AS"
981d4858 12835fi
9e423e6d 12836
a1286ef5
ZW
12837gcc_version=`cat $srcdir/BASE-VER`
12838
534d0cc0 12839if test "x$gcc_cv_as" = x; then
779243f7
JL
12840 # Search the same directories that the installed compiler will
12841 # search. Else we may find the wrong assembler and lose. If we
12842 # do not find a suitable assembler binary, then try the user's
12843 # path.
12844 #
12845 # Also note we have to check MD_EXEC_PREFIX before checking the
12846 # user's path. Unfortunately, there is no good way to get at the
12847 # value of MD_EXEC_PREFIX here. So we do a brute force search
12848 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
12849 # to be fixed as part of the make/configure rewrite too.
12850
12851 if test "x$exec_prefix" = xNONE; then
12852 if test "x$prefix" = xNONE; then
12853 test_prefix=/usr/local
12854 else
12855 test_prefix=$prefix
12856 fi
12857 else
12858 test_prefix=$exec_prefix
12859 fi
12860
12861 # If the loop below does not find an assembler, then use whatever
b095fe2c
DJ
12862 # one we can find in the users's path. We are looking for a
12863 # ${build} -> ${target} assembler.
55a2ea2a 12864 if test "x$program_prefix" != xNONE; then
57991eba 12865 gcc_cv_as=${program_prefix}as$build_exeext
b095fe2c
DJ
12866 elif test x$build != x$host && test x$build != x$target; then
12867 gcc_cv_as=${target_noncanonical}-as$build_exeext
55a2ea2a 12868 else
57991eba 12869 gcc_cv_as=`echo as | sed "${program_transform_name}"`$build_exeext
55a2ea2a
AM
12870 fi
12871
21addcd9
PB
12872 if test x$host = x$build; then
12873 test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
12874 $test_prefix/libexec/gcc/$target_noncanonical \
12875 /usr/lib/gcc/$target_noncanonical/$gcc_version \
12876 /usr/lib/gcc/$target_noncanonical \
12877 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
12878 $test_prefix/$target_noncanonical/bin"
12879 else
12880 test_dirs=
12881 fi
55a2ea2a 12882
b095fe2c 12883 if test x$build = x$target; then
55a2ea2a 12884 test_dirs="$test_dirs \
779243f7
JL
12885 /usr/libexec \
12886 /usr/ccs/gcc \
12887 /usr/ccs/bin \
12888 /udk/usr/ccs/bin \
12889 /bsd43/usr/lib/cmplrs/cc \
12890 /usr/cross64/usr/bin \
12891 /usr/lib/cmplrs/cc \
12892 /sysv/usr/lib/cmplrs/cc \
12893 /svr4/usr/lib/cmplrs/cc \
12894 /usr/bin"
55a2ea2a 12895 fi
779243f7
JL
12896
12897 for dir in $test_dirs; do
57991eba
PB
12898 if test -x $dir/as$build_exeext; then
12899 gcc_cv_as=$dir/as$build_exeext
779243f7
JL
12900 break;
12901 fi
12902 done
9e423e6d 12903fi
34a86c2b
NN
12904case $in_tree_gas in
12905 yes)
ba479fd2
NN
12906 echo "$as_me:$LINENO: result: \"newly built gas\"" >&5
12907echo "${ECHO_T}\"newly built gas\"" >&6
34a86c2b
NN
12908 ;;
12909 no)
ba479fd2
NN
12910 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
12911echo "${ECHO_T}$gcc_cv_as" >&6
34a86c2b
NN
12912 ;;
12913esac
981d4858 12914
d869a8c4
NN
12915# Identify the linker which will work hand-in-glove with the newly
12916# built GCC, so that we can examine its features. This is the linker
12917# which will be driven by the driver program.
12918#
12919# If build != host, and we aren't building gas in-tree, we identify a
12920# build->target linker and hope that it will have the same features
12921# as the host->target linker we'll be using.
ba479fd2
NN
12922echo "$as_me:$LINENO: checking what linker to use" >&5
12923echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
34a86c2b 12924in_tree_ld=no
275b60d6
JJ
12925gcc_cv_ld=
12926gcc_cv_gld_major_version=
12927gcc_cv_gld_minor_version=
12928gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
12929gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
12930if test -x "$DEFAULT_LINKER"; then
12931 gcc_cv_ld="$DEFAULT_LINKER"
57991eba 12932elif test -x collect-ld$build_exeext; then
275b60d6 12933 # Build using linker in the current directory.
57991eba 12934 gcc_cv_ld=./collect-ld$build_exeext
34a86c2b 12935elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
08d105fa
AO
12936 && test -f ../ld/Makefile \
12937 && test x$build = x$host; then
12938 # Single tree build which includes ld. We want to prefer it
12939 # over whatever linker top-level may have detected, since
12940 # we'll use what we're building after installation anyway.
34a86c2b 12941 in_tree_ld=yes
5408ac6c
HPN
12942 in_tree_ld_is_elf=no
12943 if (grep 'EMUL = .*elf' ../ld/Makefile \
8a45d680
AN
12944 || grep 'EMUL = .*linux' ../ld/Makefile \
12945 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
5408ac6c
HPN
12946 in_tree_ld_is_elf=yes
12947 fi
275b60d6
JJ
12948 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
12949 do
58ea87a9 12950 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
275b60d6
JJ
12951 if test x$gcc_cv_gld_version != x; then
12952 break
12953 fi
12954 done
12955 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
12956 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
57991eba
PB
12957 rm -f collect-ld$build_exeext
12958 $LN_S ../ld/ld-new$build_exeext collect-ld$build_exeext 2>/dev/null
08d105fa
AO
12959elif test -x "$LD_FOR_TARGET"; then
12960 gcc_cv_ld="$LD_FOR_TARGET"
12961elif test -x "$LD" && test x$host = x$target; then
12962 gcc_cv_ld="$LD"
275b60d6
JJ
12963fi
12964
534d0cc0 12965if test "x$gcc_cv_ld" = x; then
275b60d6
JJ
12966 # Search the same directories that the installed compiler will
12967 # search. Else we may find the wrong linker and lose. If we
12968 # do not find a suitable linker binary, then try the user's
12969 # path.
12970 #
12971 # Also note we have to check MD_EXEC_PREFIX before checking the
12972 # user's path. Unfortunately, there is no good way to get at the
12973 # value of MD_EXEC_PREFIX here. So we do a brute force search
12974 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
12975 # to be fixed as part of the make/configure rewrite too.
12976
12977 if test "x$exec_prefix" = xNONE; then
12978 if test "x$prefix" = xNONE; then
12979 test_prefix=/usr/local
12980 else
12981 test_prefix=$prefix
12982 fi
12983 else
12984 test_prefix=$exec_prefix
12985 fi
12986
b095fe2c
DJ
12987 # If the loop below does not find a linker, then use whatever
12988 # one we can find in the users's path. We are looking for a
12989 # ${build} -> ${target} linker.
55a2ea2a 12990 if test "x$program_prefix" != xNONE; then
57991eba 12991 gcc_cv_ld=${program_prefix}ld$build_exeext
b095fe2c
DJ
12992 elif test x$build != x$host && test x$build != x$target; then
12993 gcc_cv_ld=${target_noncanonical}-ld$build_exeext
55a2ea2a 12994 else
57991eba 12995 gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$build_exeext
55a2ea2a
AM
12996 fi
12997
21addcd9
PB
12998 if test x$host = x$build; then
12999 test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
13000 $test_prefix/libexec/gcc/$target_noncanonical \
13001 /usr/lib/gcc/$target_noncanonical/$gcc_version \
13002 /usr/lib/gcc/$target_noncanonical \
13003 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
13004 $test_prefix/$target_noncanonical/bin"
13005 else
13006 test_dirs=
13007 fi
55a2ea2a 13008
b095fe2c 13009 if test x$build = x$target; then
55a2ea2a 13010 test_dirs="$test_dirs \
275b60d6
JJ
13011 /usr/libexec \
13012 /usr/ccs/gcc \
13013 /usr/ccs/bin \
13014 /udk/usr/ccs/bin \
13015 /bsd43/usr/lib/cmplrs/cc \
13016 /usr/cross64/usr/bin \
13017 /usr/lib/cmplrs/cc \
13018 /sysv/usr/lib/cmplrs/cc \
13019 /svr4/usr/lib/cmplrs/cc \
13020 /usr/bin"
55a2ea2a 13021 fi
275b60d6
JJ
13022
13023 for dir in $test_dirs; do
57991eba
PB
13024 if test -x $dir/ld$build_exeext; then
13025 gcc_cv_ld=$dir/ld$build_exeext
275b60d6
JJ
13026 break;
13027 fi
13028 done
13029fi
34a86c2b
NN
13030case $in_tree_ld in
13031 yes)
ba479fd2
NN
13032 echo "$as_me:$LINENO: result: \"newly built ld\"" >&5
13033echo "${ECHO_T}\"newly built ld\"" >&6
34a86c2b
NN
13034 ;;
13035 no)
ba479fd2
NN
13036 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13037echo "${ECHO_T}$gcc_cv_ld" >&6
34a86c2b
NN
13038 ;;
13039esac
275b60d6 13040
981d4858 13041# Figure out what nm we will be using.
f9c1196a 13042gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
ba479fd2
NN
13043echo "$as_me:$LINENO: checking what nm to use" >&5
13044echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
f9c1196a 13045in_tree_nm=no
57991eba
PB
13046if test -x nm$build_exeext; then
13047 gcc_cv_nm=./nm$build_exeext
f9c1196a
ZW
13048elif test -f $gcc_cv_binutils_srcdir/configure.in \
13049 && test -f ../binutils/Makefile; then
13050 # Single tree build which includes binutils.
13051 in_tree_nm=yes
57991eba
PB
13052 gcc_cv_nm=./nm$build_exeext
13053 rm -f nm$build_exeext
13054 $LN_S ../binutils/nm-new$build_exeext nm$build_exeext 2>/dev/null
534d0cc0 13055elif test "x$program_prefix" != xNONE; then
57991eba 13056 gcc_cv_nm=${program_prefix}nm$build_exeext
b095fe2c
DJ
13057elif test x$build != x$host && test x$build != x$target; then
13058 gcc_cv_nm=${target_noncanonical}-nm$build_exeext
534d0cc0 13059else
57991eba 13060 gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$build_exeext
981d4858 13061fi
f9c1196a 13062case $in_tree_nm in
ba479fd2
NN
13063 yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5
13064echo "${ECHO_T}\"newly built nm\"" >&6 ;;
13065 no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13066echo "${ECHO_T}$gcc_cv_nm" >&6 ;;
f9c1196a 13067esac
981d4858 13068
3cae5780 13069# Figure out what objdump we will be using.
ba479fd2
NN
13070echo "$as_me:$LINENO: checking what objdump to use" >&5
13071echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
f9c1196a 13072in_tree_objdump=no
57991eba
PB
13073if test -x objdump$build_exeext; then
13074 gcc_cv_objdump=./objdump$build_exeext
f9c1196a
ZW
13075elif test -f $gcc_cv_binutils_srcdir/configure.in \
13076 && test -f ../binutils/Makefile; then
13077 # Single tree build which includes binutils.
13078 in_tree_objdump=yes
57991eba
PB
13079 gcc_cv_objdump=./objdump$build_exeext
13080 rm -f objdump$build_exeext
13081 $LN_S ../binutils/objdump$build_exeext objdump$build_exeext 2>/dev/null
534d0cc0 13082elif test "x$program_prefix" != xNONE; then
57991eba 13083 gcc_cv_objdump=${program_prefix}objdump$build_exeext
b095fe2c
DJ
13084elif test x$build != x$host && test x$build != x$target; then
13085 gcc_cv_objdump=${target_noncanonical}-objdump$build_exeext
534d0cc0 13086else
f9c1196a 13087 gcc_cv_objdump=`echo objdump | \
57991eba 13088 sed "${program_transform_name}"`$build_exeext
3cae5780 13089fi
f9c1196a 13090case $in_tree_objdump in
ba479fd2
NN
13091 yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5
13092echo "${ECHO_T}\"newly built objdump\"" >&6 ;;
13093 no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13094echo "${ECHO_T}$gcc_cv_objdump" >&6 ;;
f9c1196a 13095esac
3cae5780 13096
981d4858 13097# Figure out what assembler alignment features are present.
ba479fd2
NN
13098echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13099echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
13100if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13101 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13102else
13103 gcc_cv_as_balign_and_p2align=no
13104 if test $in_tree_gas = yes; then
13105 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13106 then gcc_cv_as_balign_and_p2align=yes
13107fi
13108 elif test x$gcc_cv_as != x; then
6e3f3080 13109 echo '.balign 4
8ada417f 13110.p2align 2' > conftest.s
ba479fd2
NN
13111 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13113 (eval $ac_try) 2>&5
13114 ac_status=$?
13115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13116 (exit $ac_status); }; }
8ada417f
ZW
13117 then
13118 gcc_cv_as_balign_and_p2align=yes
13119 else
13120 echo "configure: failed program was" >&5
13121 cat conftest.s >&5
13122 fi
13123 rm -f conftest.o conftest.s
13124 fi
13125fi
ba479fd2
NN
13126echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13127echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 13128if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
13129
13130cat >>confdefs.h <<\_ACEOF
981d4858 13131#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 13132_ACEOF
981d4858 13133
ad9c4d9f
NN
13134fi
13135
ba479fd2
NN
13136echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13137echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
13138if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13139 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13140else
13141 gcc_cv_as_max_skip_p2align=no
13142 if test $in_tree_gas = yes; then
13143 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13144 then gcc_cv_as_max_skip_p2align=yes
13145fi
13146 elif test x$gcc_cv_as != x; then
6e3f3080 13147 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
13148 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13150 (eval $ac_try) 2>&5
13151 ac_status=$?
13152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13153 (exit $ac_status); }; }
8ada417f
ZW
13154 then
13155 gcc_cv_as_max_skip_p2align=yes
13156 else
13157 echo "configure: failed program was" >&5
13158 cat conftest.s >&5
13159 fi
13160 rm -f conftest.o conftest.s
13161 fi
ad9c4d9f 13162fi
ba479fd2
NN
13163echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13164echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 13165if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
13166
13167cat >>confdefs.h <<\_ACEOF
9e423e6d 13168#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 13169_ACEOF
9e423e6d 13170
9e423e6d 13171fi
ad9c4d9f 13172
ba479fd2
NN
13173echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13174echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
13175if test "${gcc_cv_as_subsection_m1+set}" = set; then
13176 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13177else
13178 gcc_cv_as_subsection_m1=no
13179 if test $in_tree_gas = yes; then
13180 if test $in_tree_gas_is_elf = yes \
13181 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13182 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 13183fi
8ada417f 13184 elif test x$gcc_cv_as != x; then
6e3f3080 13185 echo 'conftest_label1: .word 0
d1accaa3
JJ
13186.subsection -1
13187conftest_label2: .word 0
8ada417f 13188.previous' > conftest.s
ba479fd2
NN
13189 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13191 (eval $ac_try) 2>&5
13192 ac_status=$?
13193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13194 (exit $ac_status); }; }
8ada417f
ZW
13195 then
13196 if test x$gcc_cv_nm != x; then
13197 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13198 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13199 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13200 then :
13201 else gcc_cv_as_subsection_m1=yes
13202 fi
13203 rm -f conftest.nm1 conftest.nm2
13204 fi
13205 else
13206 echo "configure: failed program was" >&5
13207 cat conftest.s >&5
13208 fi
13209 rm -f conftest.o conftest.s
13210 fi
981d4858 13211fi
ba479fd2
NN
13212echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13213echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 13214if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
13215
13216cat >>confdefs.h <<\_ACEOF
981d4858 13217#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 13218_ACEOF
981d4858 13219
d1accaa3 13220fi
ad9c4d9f 13221
ba479fd2
NN
13222echo "$as_me:$LINENO: checking assembler for .weak" >&5
13223echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
13224if test "${gcc_cv_as_weak+set}" = set; then
13225 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13226else
13227 gcc_cv_as_weak=no
13228 if test $in_tree_gas = yes; then
13229 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13230 then gcc_cv_as_weak=yes
ad9c4d9f 13231fi
8ada417f 13232 elif test x$gcc_cv_as != x; then
6e3f3080 13233 echo ' .weak foobar' > conftest.s
ba479fd2
NN
13234 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13236 (eval $ac_try) 2>&5
13237 ac_status=$?
13238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13239 (exit $ac_status); }; }
8ada417f
ZW
13240 then
13241 gcc_cv_as_weak=yes
13242 else
13243 echo "configure: failed program was" >&5
13244 cat conftest.s >&5
13245 fi
13246 rm -f conftest.o conftest.s
13247 fi
981d4858 13248fi
ba479fd2
NN
13249echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13250echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 13251if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
13252
13253cat >>confdefs.h <<\_ACEOF
981d4858 13254#define HAVE_GAS_WEAK 1
ba479fd2 13255_ACEOF
981d4858 13256
12822146 13257fi
ad9c4d9f 13258
e41f3691
JDA
13259echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13260echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
13261if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13262 echo $ECHO_N "(cached) $ECHO_C" >&6
13263else
13264 gcc_cv_as_nsubspa_comdat=no
13265 if test $in_tree_gas = yes; then
13266 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13267 then gcc_cv_as_nsubspa_comdat=yes
13268fi
13269 elif test x$gcc_cv_as != x; then
13270 echo ' .SPACE $TEXT$
13271 .NSUBSPA $CODE$,COMDAT' > conftest.s
13272 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13274 (eval $ac_try) 2>&5
13275 ac_status=$?
13276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13277 (exit $ac_status); }; }
13278 then
13279 gcc_cv_as_nsubspa_comdat=yes
13280 else
13281 echo "configure: failed program was" >&5
13282 cat conftest.s >&5
13283 fi
13284 rm -f conftest.o conftest.s
13285 fi
13286fi
13287echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13288echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
13289if test $gcc_cv_as_nsubspa_comdat = yes; then
13290
13291cat >>confdefs.h <<\_ACEOF
13292#define HAVE_GAS_NSUBSPA_COMDAT 1
13293_ACEOF
13294
13295fi
13296
8ada417f
ZW
13297# .hidden needs to be supported in both the assembler and the linker,
13298# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13299# This is irritatingly difficult to feature test for; we have to check the
13300# date string after the version number. If we've got an in-tree
13301# ld, we don't know its patchlevel version, so we set the baseline at 2.13
13302# to be safe.
13303# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
13304echo "$as_me:$LINENO: checking assembler for .hidden" >&5
13305echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
13306if test "${gcc_cv_as_hidden+set}" = set; then
13307 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13308else
13309 gcc_cv_as_hidden=no
13310 if test $in_tree_gas = yes; then
13311 if test $in_tree_gas_is_elf = yes \
13312 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
13313 then gcc_cv_as_hidden=yes
13314fi
13315 elif test x$gcc_cv_as != x; then
6e3f3080 13316 echo ' .hidden foobar
8ada417f 13317foobar:' > conftest.s
ba479fd2
NN
13318 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13320 (eval $ac_try) 2>&5
13321 ac_status=$?
13322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13323 (exit $ac_status); }; }
8ada417f
ZW
13324 then
13325 gcc_cv_as_hidden=yes
13326 else
13327 echo "configure: failed program was" >&5
13328 cat conftest.s >&5
13329 fi
13330 rm -f conftest.o conftest.s
13331 fi
13332fi
ba479fd2
NN
13333echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
13334echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 13335
ad9c4d9f 13336
ba479fd2
NN
13337echo "$as_me:$LINENO: checking linker for .hidden support" >&5
13338echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
13339if test "${gcc_cv_ld_hidden+set}" = set; then
13340 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13341else
13342 if test $in_tree_ld = yes ; then
13343 gcc_cv_ld_hidden=no
13344 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 \
13345 && test $in_tree_ld_is_elf = yes; then
13346 gcc_cv_ld_hidden=yes
13347 fi
13348else
13349 gcc_cv_ld_hidden=yes
bace148a 13350 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
13351 if echo "$ld_ver" | grep GNU > /dev/null; then
13352 ld_vers=`echo $ld_ver | sed -n \
13353 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13354 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13355 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13356 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13357 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13358 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
13359 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'`
13360 if test 0"$ld_date" -lt 20020404; then
13361 if test -n "$ld_date"; then
13362 # If there was date string, but was earlier than 2002-04-04, fail
13363 gcc_cv_ld_hidden=no
13364 elif test -z "$ld_vers"; then
13365 # If there was no date string nor ld version number, something is wrong
13366 gcc_cv_ld_hidden=no
13367 else
13368 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
13369 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
13370 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
13371 test -z "$ld_vers_patch" && ld_vers_patch=0
13372 if test "$ld_vers_major" -lt 2; then
13373 gcc_cv_ld_hidden=no
13374 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
13375 gcc_cv_ld_hidden="no"
13376 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
13377 gcc_cv_ld_hidden=no
c72931a6 13378 fi
8ada417f 13379 fi
789b7de5 13380 fi
8ada417f 13381 else
28690784 13382 case "${target}" in
b0fd7d27 13383 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
13384 gcc_cv_ld_hidden=yes
13385 ;;
13386 *)
13387 gcc_cv_ld_hidden=no
13388 ;;
13389 esac
8ada417f
ZW
13390 fi
13391fi
6d07784a 13392fi
ba479fd2
NN
13393echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
13394echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 13395libgcc_visibility=no
ad9c4d9f 13396
8e3940b2 13397if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 13398 libgcc_visibility=yes
ba479fd2
NN
13399
13400cat >>confdefs.h <<\_ACEOF
8ada417f 13401#define HAVE_GAS_HIDDEN 1
ba479fd2 13402_ACEOF
ad9c4d9f
NN
13403
13404fi
13405
8ada417f 13406# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
13407echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
13408echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
13409if test "${gcc_cv_as_leb128+set}" = set; then
13410 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13411else
13412 gcc_cv_as_leb128=no
13413 if test $in_tree_gas = yes; then
13414 if test $in_tree_gas_is_elf = yes \
13415 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
13416 then gcc_cv_as_leb128=yes
13417fi
13418 elif test x$gcc_cv_as != x; then
6e3f3080 13419 echo ' .data
b7460f24
RH
13420 .uleb128 L2 - L1
13421L1:
13422 .uleb128 1280
13423 .sleb128 -1010
8ada417f 13424L2:' > conftest.s
ba479fd2
NN
13425 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13427 (eval $ac_try) 2>&5
13428 ac_status=$?
13429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13430 (exit $ac_status); }; }
8ada417f
ZW
13431 then
13432 # GAS versions before 2.11 do not support uleb128,
13433 # despite appearing to.
13434 # ??? There exists an elf-specific test that will crash
13435 # the assembler. Perhaps it's better to figure out whether
13436 # arbitrary sections are supported and try the test.
bace148a 13437 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
13438 if echo "$as_ver" | grep GNU > /dev/null; then
13439 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
13440 as_major=`echo $as_ver | sed 's/\..*//'`
13441 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
13442 if test $as_major -eq 2 && test $as_minor -lt 11
13443 then :
13444 else gcc_cv_as_leb128=yes
13445 fi
13446 fi
13447 else
13448 echo "configure: failed program was" >&5
13449 cat conftest.s >&5
13450 fi
13451 rm -f conftest.o conftest.s
13452 fi
b7460f24 13453fi
ba479fd2
NN
13454echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
13455echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 13456if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
13457
13458cat >>confdefs.h <<\_ACEOF
b7460f24 13459#define HAVE_AS_LEB128 1
ba479fd2 13460_ACEOF
b7460f24
RH
13461
13462fi
ad9c4d9f 13463
8ada417f
ZW
13464# GAS versions up to and including 2.11.0 may mis-optimize
13465# .eh_frame data.
ba479fd2
NN
13466echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
13467echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
13468if test "${gcc_cv_as_eh_frame+set}" = set; then
13469 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13470else
13471 gcc_cv_as_eh_frame=no
13472 if test $in_tree_gas = yes; then
13473 if test $in_tree_gas_is_elf = yes \
13474 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13475 then gcc_cv_as_eh_frame=yes
ad9c4d9f 13476fi
8ada417f 13477 elif test x$gcc_cv_as != x; then
6e3f3080 13478 echo ' .text
c64688ae
RH
13479.LFB1:
13480 .4byte 0
13481.L1:
13482 .4byte 0
13483.LFE1:
13484 .section .eh_frame,"aw",@progbits
13485__FRAME_BEGIN__:
13486 .4byte .LECIE1-.LSCIE1
13487.LSCIE1:
13488 .4byte 0x0
13489 .byte 0x1
13490 .ascii "z\0"
13491 .byte 0x1
13492 .byte 0x78
13493 .byte 0x1a
13494 .byte 0x0
13495 .byte 0x4
13496 .4byte 1
13497 .p2align 1
13498.LECIE1:
13499.LSFDE1:
13500 .4byte .LEFDE1-.LASFDE1
13501.LASFDE1:
13502 .4byte .LASFDE1-__FRAME_BEGIN__
13503 .4byte .LFB1
13504 .4byte .LFE1-.LFB1
13505 .byte 0x4
13506 .4byte .LFE1-.LFB1
13507 .byte 0x4
13508 .4byte .L1-.LFB1
8ada417f 13509.LEFDE1:' > conftest.s
ba479fd2
NN
13510 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13512 (eval $ac_try) 2>&5
13513 ac_status=$?
13514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13515 (exit $ac_status); }; }
8ada417f
ZW
13516 then
13517 cat > conftest.lit <<EOF
c64688ae
RH
13518 0000 10000000 00000000 017a0001 781a0004 .........z..x...
13519 0010 01000000 12000000 18000000 00000000 ................
093e61a6 13520 0020 08000000 04080000 0044 .........D
01efb963 13521EOF
ba479fd2 13522cat > conftest.big <<EOF
01efb963
AS
13523 0000 00000010 00000000 017a0001 781a0004 .........z..x...
13524 0010 00000001 00000012 00000018 00000000 ................
093e61a6 13525 0020 00000008 04000000 0844 .........D
c64688ae 13526EOF
8ada417f
ZW
13527 # If the assembler didn't choke, and we can objdump,
13528 # and we got the correct data, then succeed.
13529 if test x$gcc_cv_objdump != x \
13530 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
13531 | tail -3 > conftest.got \
13532 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
13533 || cmp conftest.big conftest.got > /dev/null 2>&1; }
13534 then
13535 gcc_cv_as_eh_frame=yes
ba479fd2
NN
13536 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
13537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13538 (eval $ac_try) 2>&5
13539 ac_status=$?
13540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13541 (exit $ac_status); }; }; then
8ada417f
ZW
13542 gcc_cv_as_eh_frame=buggy
13543 else
13544 # Uh oh, what do we do now?
13545 gcc_cv_as_eh_frame=no
13546 fi
13547 else
13548 echo "configure: failed program was" >&5
13549 cat conftest.s >&5
13550 fi
13551 rm -f conftest.o conftest.s
13552 fi
c64688ae 13553fi
ba479fd2
NN
13554echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
13555echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 13556
6e3f3080 13557
63cf211a 13558if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
13559
13560cat >>confdefs.h <<\_ACEOF
8ada417f 13561#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 13562_ACEOF
ad9c4d9f
NN
13563
13564fi
13565
ba479fd2
NN
13566echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13567echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13568if test "${gcc_cv_as_shf_merge+set}" = set; then
13569 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13570else
13571 gcc_cv_as_shf_merge=no
13572 if test $in_tree_gas = yes; then
13573 if test $in_tree_gas_is_elf = yes \
13574 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13575 then gcc_cv_as_shf_merge=yes
13576fi
13577 elif test x$gcc_cv_as != x; then
6e3f3080 13578 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
13579 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13581 (eval $ac_try) 2>&5
13582 ac_status=$?
13583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13584 (exit $ac_status); }; }
8ada417f
ZW
13585 then
13586 gcc_cv_as_shf_merge=yes
13587 else
13588 echo "configure: failed program was" >&5
13589 cat conftest.s >&5
13590 fi
13591 rm -f conftest.o conftest.s
13592 fi
201556f0 13593fi
ba479fd2
NN
13594echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13595echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 13596
c18a5b6c
MM
13597if test $gcc_cv_as_shf_merge = no; then
13598 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13599echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13600if test "${gcc_cv_as_shf_merge+set}" = set; then
13601 echo $ECHO_N "(cached) $ECHO_C" >&6
13602else
13603 gcc_cv_as_shf_merge=no
13604 if test $in_tree_gas = yes; then
13605 if test $in_tree_gas_is_elf = yes \
13606 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13607 then gcc_cv_as_shf_merge=yes
13608fi
13609 elif test x$gcc_cv_as != x; then
13610 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
13611 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13613 (eval $ac_try) 2>&5
13614 ac_status=$?
13615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13616 (exit $ac_status); }; }
13617 then
13618 gcc_cv_as_shf_merge=yes
13619 else
13620 echo "configure: failed program was" >&5
13621 cat conftest.s >&5
13622 fi
13623 rm -f conftest.o conftest.s
13624 fi
13625fi
13626echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13627echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
13628
13629fi
8ad9fb33 13630
ba479fd2 13631cat >>confdefs.h <<_ACEOF
8ad9fb33 13632#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 13633_ACEOF
201556f0 13634
201556f0 13635
c18a5b6c
MM
13636echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13637echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13638if test "${gcc_cv_as_comdat_group+set}" = set; then
13639 echo $ECHO_N "(cached) $ECHO_C" >&6
13640else
13641 gcc_cv_as_comdat_group=no
13642 if test $in_tree_gas = yes; then
13643 if test $in_tree_gas_is_elf = yes \
13644 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13645 then gcc_cv_as_comdat_group=yes
13646fi
13647 elif test x$gcc_cv_as != x; then
13648 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
13649 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13651 (eval $ac_try) 2>&5
13652 ac_status=$?
13653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13654 (exit $ac_status); }; }
13655 then
13656 gcc_cv_as_comdat_group=yes
13657 else
13658 echo "configure: failed program was" >&5
13659 cat conftest.s >&5
13660 fi
13661 rm -f conftest.o conftest.s
13662 fi
13663fi
13664echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
13665echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
13666
13667if test $gcc_cv_as_comdat_group = yes; then
13668 gcc_cv_as_comdat_group_percent=no
13669else
13670 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13671echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13672if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
13673 echo $ECHO_N "(cached) $ECHO_C" >&6
13674else
13675 gcc_cv_as_comdat_group_percent=no
13676 if test $in_tree_gas = yes; then
13677 if test $in_tree_gas_is_elf = yes \
13678 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13679 then gcc_cv_as_comdat_group_percent=yes
13680fi
13681 elif test x$gcc_cv_as != x; then
13682 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
13683 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13685 (eval $ac_try) 2>&5
13686 ac_status=$?
13687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13688 (exit $ac_status); }; }
13689 then
13690 gcc_cv_as_comdat_group_percent=yes
13691 else
13692 echo "configure: failed program was" >&5
13693 cat conftest.s >&5
13694 fi
13695 rm -f conftest.o conftest.s
13696 fi
13697fi
13698echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
13699echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
13700
13701fi
13702
13703cat >>confdefs.h <<_ACEOF
13704#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`
13705_ACEOF
13706
13707
8ada417f 13708# Thread-local storage - the check is heavily parametrized.
f996902d
RH
13709conftest_s=
13710tls_first_major=
13711tls_first_minor=
9739c90c 13712tls_as_opt=
f996902d 13713case "$target" in
6f9b006d
RH
13714 alpha*-*-*)
13715 conftest_s='
13716 .section ".tdata","awT",@progbits
13717foo: .long 25
13718 .text
13719 ldq $27,__tls_get_addr($29) !literal!1
13720 lda $16,foo($29) !tlsgd!1
13721 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
13722 ldq $27,__tls_get_addr($29) !literal!2
13723 lda $16,foo($29) !tlsldm!2
13724 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
13725 ldq $1,foo($29) !gotdtprel
13726 ldah $2,foo($29) !dtprelhi
13727 lda $3,foo($2) !dtprello
13728 lda $4,foo($29) !dtprel
13729 ldq $1,foo($29) !gottprel
13730 ldah $2,foo($29) !tprelhi
13731 lda $3,foo($2) !tprello
13732 lda $4,foo($29) !tprel'
13733 tls_first_major=2
13734 tls_first_minor=13
2f3321ca 13735 tls_as_opt=--fatal-warnings
6f9b006d 13736 ;;
e4dd71de
AH
13737 frv*-*-*)
13738 conftest_s='
13739 .section ".tdata","awT",@progbits
13740x: .long 25
13741 .text
13742 call #gettlsoff(x)'
13743 tls_first_major=2
13744 tls_first_minor=14
13745 ;;
f996902d
RH
13746 i[34567]86-*-*)
13747 conftest_s='
13748 .section ".tdata","awT",@progbits
13749foo: .long 25
13750 .text
13751 movl %gs:0, %eax
13752 leal foo@TLSGD(,%ebx,1), %eax
13753 leal foo@TLSLDM(%ebx), %eax
13754 leal foo@DTPOFF(%eax), %edx
13755 movl foo@GOTTPOFF(%ebx), %eax
13756 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
13757 addl foo@GOTNTPOFF(%ebx), %eax
13758 movl foo@INDNTPOFF, %eax
f996902d
RH
13759 movl $foo@TPOFF, %eax
13760 subl $foo@TPOFF, %eax
13761 leal foo@NTPOFF(%ecx), %eax'
13762 tls_first_major=2
75d38379 13763 tls_first_minor=14
2f3321ca 13764 tls_as_opt=--fatal-warnings
75d38379
JJ
13765 ;;
13766 x86_64-*-*)
13767 conftest_s='
13768 .section ".tdata","awT",@progbits
13769foo: .long 25
13770 .text
13771 movq %fs:0, %rax
13772 leaq foo@TLSGD(%rip), %rdi
13773 leaq foo@TLSLD(%rip), %rdi
13774 leaq foo@DTPOFF(%rax), %rdx
13775 movq foo@GOTTPOFF(%rip), %rax
13776 movq $foo@TPOFF, %rax'
13777 tls_first_major=2
13778 tls_first_minor=14
2f3321ca 13779 tls_as_opt=--fatal-warnings
f996902d 13780 ;;
7b6e506e
RH
13781 ia64-*-*)
13782 conftest_s='
13783 .section ".tdata","awT",@progbits
13784foo: data8 25
13785 .text
13786 addl r16 = @ltoff(@dtpmod(foo#)), gp
13787 addl r17 = @ltoff(@dtprel(foo#)), gp
13788 addl r18 = @ltoff(@tprel(foo#)), gp
13789 addl r19 = @dtprel(foo#), gp
13790 adds r21 = @dtprel(foo#), r13
13791 movl r23 = @dtprel(foo#)
13792 addl r20 = @tprel(foo#), gp
13793 adds r22 = @tprel(foo#), r13
13794 movl r24 = @tprel(foo#)'
13795 tls_first_major=2
13796 tls_first_minor=13
2f3321ca 13797 tls_as_opt=--fatal-warnings
7b6e506e 13798 ;;
69229b81
DJ
13799 mips*-*-*)
13800 conftest_s='
13801 .section .tdata,"awT",@progbits
13802x:
13803 .word 2
13804 .text
13805 addiu $4, $28, %tlsgd(x)
13806 addiu $4, $28, %tlsldm(x)
13807 lui $4, %dtprel_hi(x)
13808 addiu $4, $4, %dtprel_lo(x)
13809 lw $4, %gottprel(x)($28)
13810 lui $4, %tprel_hi(x)
13811 addiu $4, $4, %tprel_lo(x)'
13812 tls_first_major=2
13813 tls_first_minor=16
13814 tls_as_opt='-32 --fatal-warnings'
13815 ;;
c4501e62
JJ
13816 powerpc-*-*)
13817 conftest_s='
13818 .section ".tdata","awT",@progbits
13819 .align 2
13820ld0: .space 4
13821ld1: .space 4
13822x1: .space 4
13823x2: .space 4
13824x3: .space 4
13825 .text
13826 addi 3,31,ld0@got@tlsgd
13827 bl __tls_get_addr
13828 addi 3,31,x1@got@tlsld
13829 bl __tls_get_addr
13830 addi 9,3,x1@dtprel
13831 addis 9,3,x2@dtprel@ha
13832 addi 9,9,x2@dtprel@l
13833 lwz 9,x3@got@tprel(31)
13834 add 9,9,x@tls
13835 addi 9,2,x1@tprel
13836 addis 9,2,x2@tprel@ha
13837 addi 9,9,x2@tprel@l'
13838 tls_first_major=2
13839 tls_first_minor=14
2f3321ca 13840 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
13841 ;;
13842 powerpc64-*-*)
13843 conftest_s='
13844 .section ".tdata","awT",@progbits
13845 .align 3
13846ld0: .space 8
13847ld1: .space 8
13848x1: .space 8
13849x2: .space 8
13850x3: .space 8
13851 .text
13852 addi 3,2,ld0@got@tlsgd
13853 bl .__tls_get_addr
13854 nop
13855 addi 3,2,ld1@toc
13856 bl .__tls_get_addr
13857 nop
13858 addi 3,2,x1@got@tlsld
13859 bl .__tls_get_addr
13860 nop
13861 addi 9,3,x1@dtprel
13862 bl .__tls_get_addr
13863 nop
13864 addis 9,3,x2@dtprel@ha
13865 addi 9,9,x2@dtprel@l
13866 bl .__tls_get_addr
13867 nop
13868 ld 9,x3@got@dtprel(2)
13869 add 9,9,3
13870 bl .__tls_get_addr
13871 nop'
13872 tls_first_major=2
13873 tls_first_minor=14
2f3321ca 13874 tls_as_opt="-a64 --fatal-warnings"
c4501e62 13875 ;;
fd3cd001
UW
13876 s390-*-*)
13877 conftest_s='
13878 .section ".tdata","awT",@progbits
13879foo: .long 25
13880 .text
13881 .long foo@TLSGD
13882 .long foo@TLSLDM
13883 .long foo@DTPOFF
13884 .long foo@NTPOFF
13885 .long foo@GOTNTPOFF
13886 .long foo@INDNTPOFF
13887 l %r1,foo@GOTNTPOFF(%r12)
13888 l %r1,0(%r1):tls_load:foo
13889 bas %r14,0(%r1,%r13):tls_gdcall:foo
13890 bas %r14,0(%r1,%r13):tls_ldcall:foo'
13891 tls_first_major=2
13892 tls_first_minor=14
2f3321ca 13893 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
13894 ;;
13895 s390x-*-*)
13896 conftest_s='
13897 .section ".tdata","awT",@progbits
13898foo: .long 25
13899 .text
13900 .quad foo@TLSGD
13901 .quad foo@TLSLDM
13902 .quad foo@DTPOFF
13903 .quad foo@NTPOFF
13904 .quad foo@GOTNTPOFF
13905 lg %r1,foo@GOTNTPOFF(%r12)
13906 larl %r1,foo@INDNTPOFF
13907 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
13908 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
13909 tls_first_major=2
13910 tls_first_minor=14
2f3321ca 13911 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 13912 ;;
9ff13962
KK
13913 sh-*-* | sh[34]-*-*)
13914 conftest_s='
13915 .section ".tdata","awT",@progbits
13916foo: .long 25
13917 .text
13918 .long foo@TLSGD
13919 .long foo@TLSLDM
13920 .long foo@DTPOFF
13921 .long foo@GOTTPOFF
13922 .long foo@TPOFF'
13923 tls_first_major=2
13924 tls_first_minor=13
2f3321ca 13925 tls_as_opt=--fatal-warnings
9ff13962 13926 ;;
5751a10b 13927 sparc*-*-*)
2f3321ca
EB
13928 case "$target" in
13929 sparc*-sun-solaris2.*)
13930 on_solaris=yes
13931 ;;
13932 *)
13933 on_solaris=no
13934 ;;
13935 esac
13936 if test x$on_solaris = xyes && test x$gas_flag = xno; then
13937 conftest_s='
13938 .section ".tdata",#alloc,#write,#tls
13939foo: .long 25
13940 .text
13941 sethi %tgd_hi22(foo), %o0
13942 add %o0, %tgd_lo10(foo), %o1
13943 add %l7, %o1, %o0, %tgd_add(foo)
13944 call __tls_get_addr, %tgd_call(foo)
13945 sethi %tldm_hi22(foo), %l1
13946 add %l1, %tldm_lo10(foo), %l2
13947 add %l7, %l2, %o0, %tldm_add(foo)
13948 call __tls_get_addr, %tldm_call(foo)
13949 sethi %tldo_hix22(foo), %l3
13950 xor %l3, %tldo_lox10(foo), %l4
13951 add %o0, %l4, %l5, %tldo_add(foo)
13952 sethi %tie_hi22(foo), %o3
13953 add %o3, %tie_lo10(foo), %o3
13954 ld [%l7 + %o3], %o2, %tie_ld(foo)
13955 add %g7, %o2, %o4, %tie_add(foo)
13956 sethi %tle_hix22(foo), %l1
13957 xor %l1, %tle_lox10(foo), %o5
13958 ld [%g7 + %o5], %o1'
13959 tls_first_major=0
13960 tls_first_minor=0
13961 else
13962 conftest_s='
5751a10b
JJ
13963 .section ".tdata","awT",@progbits
13964foo: .long 25
13965 .text
13966 sethi %tgd_hi22(foo), %o0
13967 add %o0, %tgd_lo10(foo), %o1
13968 add %l7, %o1, %o0, %tgd_add(foo)
13969 call __tls_get_addr, %tgd_call(foo)
13970 sethi %tldm_hi22(foo), %l1
13971 add %l1, %tldm_lo10(foo), %l2
13972 add %l7, %l2, %o0, %tldm_add(foo)
13973 call __tls_get_addr, %tldm_call(foo)
13974 sethi %tldo_hix22(foo), %l3
13975 xor %l3, %tldo_lox10(foo), %l4
13976 add %o0, %l4, %l5, %tldo_add(foo)
13977 sethi %tie_hi22(foo), %o3
13978 add %o3, %tie_lo10(foo), %o3
13979 ld [%l7 + %o3], %o2, %tie_ld(foo)
13980 add %g7, %o2, %o4, %tie_add(foo)
13981 sethi %tle_hix22(foo), %l1
13982 xor %l1, %tle_lox10(foo), %o5
13983 ld [%g7 + %o5], %o1'
13984 tls_first_major=2
13985 tls_first_minor=14
2f3321ca
EB
13986 tls_as_opt="-32 --fatal-warnings"
13987 fi
5751a10b 13988 ;;
f996902d
RH
13989esac
13990if test -z "$tls_first_major"; then
8ada417f
ZW
13991 : # If we don't have a check, assume no support.
13992else
ba479fd2
NN
13993 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
13994echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
13995if test "${gcc_cv_as_tls+set}" = set; then
13996 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13997else
13998 gcc_cv_as_tls=no
13999 if test $in_tree_gas = yes; then
14000 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
14001 then gcc_cv_as_tls=yes
ad9c4d9f 14002fi
8ada417f 14003 elif test x$gcc_cv_as != x; then
6e3f3080 14004 echo "$conftest_s" > conftest.s
2f3321ca 14005 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
14006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14007 (eval $ac_try) 2>&5
14008 ac_status=$?
14009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14010 (exit $ac_status); }; }
8ada417f
ZW
14011 then
14012 gcc_cv_as_tls=yes
14013 else
14014 echo "configure: failed program was" >&5
14015 cat conftest.s >&5
14016 fi
14017 rm -f conftest.o conftest.s
f996902d 14018 fi
f996902d 14019fi
ba479fd2
NN
14020echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
14021echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 14022if test $gcc_cv_as_tls = yes; then
ba479fd2
NN
14023
14024cat >>confdefs.h <<\_ACEOF
f996902d 14025#define HAVE_AS_TLS 1
ba479fd2 14026_ACEOF
f996902d
RH
14027
14028fi
8ada417f
ZW
14029fi
14030
14031# Target-specific assembler checks.
f996902d 14032
7e9d8517
L
14033echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
14034echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
14035gcc_cv_ld_static_dynamic=no
14036if test $in_tree_ld = yes ; then
14037 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
14038 gcc_cv_ld_static_dynamic=yes
14039 fi
14040elif test x$gcc_cv_ld != x; then
14041 # Check if linker supports -Bstatic/-Bdynamic option
14042 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
14043 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
14044 gcc_cv_ld_static_dynamic=yes
14045 fi
14046fi
14047if test x"$gcc_cv_ld_static_dynamic" = xyes; then
14048
14049cat >>confdefs.h <<\_ACEOF
14050#define HAVE_LD_STATIC_DYNAMIC 1
14051_ACEOF
14052
14053fi
14054echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14055echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
14056
d594623a
L
14057if test x"$demangler_in_ld" = xyes; then
14058 echo "$as_me:$LINENO: checking linker --demangle support" >&5
14059echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
14060 gcc_cv_ld_demangle=no
14061 if test $in_tree_ld = yes; then
14062 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 \
14063 gcc_cv_ld_demangle=yes
14064 fi
14065 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14066 # Check if the GNU linker supports --demangle option
14067 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14068 gcc_cv_ld_demangle=yes
14069 fi
14070 fi
14071 if test x"$gcc_cv_ld_demangle" = xyes; then
14072
14073cat >>confdefs.h <<\_ACEOF
14074#define HAVE_LD_DEMANGLE 1
14075_ACEOF
14076
14077 fi
14078 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14079echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
14080fi
14081
3a37b08e
RH
14082case "$target" in
14083 # All TARGET_ABI_OSF targets.
14084 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
14085 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14086echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14087if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14088 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 14089else
8ada417f
ZW
14090 gcc_cv_as_alpha_explicit_relocs=no
14091 if test $in_tree_gas = yes; then
14092 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14093 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 14094fi
8ada417f 14095 elif test x$gcc_cv_as != x; then
6e3f3080 14096 echo ' .set nomacro
3a37b08e
RH
14097 .text
14098 extbl $3, $2, $3 !lituse_bytoff!1
14099 ldq $2, a($29) !literal!1
14100 ldq $4, b($29) !literal!2
14101 ldq_u $3, 0($2) !lituse_base!1
14102 ldq $27, f($29) !literal!5
14103 jsr $26, ($27), f !lituse_jsr!5
14104 ldah $29, 0($26) !gpdisp!3
14105 lda $0, c($29) !gprel
14106 ldah $1, d($29) !gprelhigh
14107 lda $1, d($1) !gprellow
8ada417f 14108 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
14109 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14111 (eval $ac_try) 2>&5
14112 ac_status=$?
14113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14114 (exit $ac_status); }; }
8ada417f
ZW
14115 then
14116 gcc_cv_as_alpha_explicit_relocs=yes
14117 else
14118 echo "configure: failed program was" >&5
14119 cat conftest.s >&5
14120 fi
14121 rm -f conftest.o conftest.s
14122 fi
cafe096b 14123fi
ba479fd2
NN
14124echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14125echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 14126if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
14127
14128cat >>confdefs.h <<\_ACEOF
3a37b08e 14129#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 14130_ACEOF
3a37b08e 14131
86da66b5
HPN
14132fi
14133 ;;
14134
14135 cris-*-*)
14136 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14137echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
14138if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14139 echo $ECHO_N "(cached) $ECHO_C" >&6
14140else
14141 gcc_cv_as_cris_no_mul_bug=no
14142 if test $in_tree_gas = yes; then
14143 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14144 then gcc_cv_as_cris_no_mul_bug=yes
14145fi
14146 elif test x$gcc_cv_as != x; then
14147 echo '.text' > conftest.s
14148 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14150 (eval $ac_try) 2>&5
14151 ac_status=$?
14152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14153 (exit $ac_status); }; }
14154 then
14155 gcc_cv_as_cris_no_mul_bug=yes
14156 else
14157 echo "configure: failed program was" >&5
14158 cat conftest.s >&5
14159 fi
14160 rm -f conftest.o conftest.s
14161 fi
14162fi
14163echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14164echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
14165if test $gcc_cv_as_cris_no_mul_bug = yes; then
14166
14167cat >>confdefs.h <<\_ACEOF
14168#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14169_ACEOF
14170
8ada417f 14171fi
3a37b08e 14172 ;;
8ada417f 14173
1cb36a98 14174 sparc*-*-*)
ba479fd2
NN
14175 echo "$as_me:$LINENO: checking assembler for .register" >&5
14176echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
14177if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14178 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14179else
8ada417f
ZW
14180 gcc_cv_as_sparc_register_op=no
14181 if test x$gcc_cv_as != x; then
6e3f3080 14182 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
14183 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14185 (eval $ac_try) 2>&5
14186 ac_status=$?
14187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14188 (exit $ac_status); }; }
8ada417f
ZW
14189 then
14190 gcc_cv_as_sparc_register_op=yes
14191 else
14192 echo "configure: failed program was" >&5
14193 cat conftest.s >&5
14194 fi
14195 rm -f conftest.o conftest.s
14196 fi
cafe096b 14197fi
ba479fd2
NN
14198echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
14199echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 14200if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
14201
14202cat >>confdefs.h <<\_ACEOF
1cb36a98 14203#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 14204_ACEOF
1cb36a98 14205
8ada417f 14206fi
1cb36a98 14207
ba479fd2
NN
14208 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
14209echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
14210if test "${gcc_cv_as_sparc_relax+set}" = set; then
14211 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 14212else
8ada417f
ZW
14213 gcc_cv_as_sparc_relax=no
14214 if test x$gcc_cv_as != x; then
6e3f3080 14215 echo '.text' > conftest.s
ba479fd2
NN
14216 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
14217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14218 (eval $ac_try) 2>&5
14219 ac_status=$?
14220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14221 (exit $ac_status); }; }
8ada417f
ZW
14222 then
14223 gcc_cv_as_sparc_relax=yes
14224 else
14225 echo "configure: failed program was" >&5
14226 cat conftest.s >&5
14227 fi
14228 rm -f conftest.o conftest.s
14229 fi
cafe096b 14230fi
ba479fd2
NN
14231echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
14232echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 14233if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
14234
14235cat >>confdefs.h <<\_ACEOF
e95b1e6a 14236#define HAVE_AS_RELAX_OPTION 1
ba479fd2 14237_ACEOF
e95b1e6a 14238
8ada417f 14239fi
e95b1e6a 14240
ba479fd2
NN
14241 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
14242echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
14243if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
14244 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 14245else
8ada417f
ZW
14246 gcc_cv_as_sparc_ua_pcrel=no
14247 if test x$gcc_cv_as != x; then
6e3f3080 14248 echo '.text
8ada417f
ZW
14249foo:
14250 nop
14251.data
14252.align 4
14253.byte 0
14254.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
14255 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14257 (eval $ac_try) 2>&5
14258 ac_status=$?
14259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14260 (exit $ac_status); }; }
8ada417f
ZW
14261 then
14262 if test x$gcc_cv_ld != x \
14263 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
14264 gcc_cv_as_sparc_ua_pcrel=yes
14265 fi
14266 rm -f conftest
14267 else
14268 echo "configure: failed program was" >&5
14269 cat conftest.s >&5
14270 fi
14271 rm -f conftest.o conftest.s
14272 fi
cafe096b 14273fi
ba479fd2
NN
14274echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
14275echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 14276if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
14277
14278cat >>confdefs.h <<\_ACEOF
17e9e88c 14279#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 14280_ACEOF
17e9e88c 14281
17e9e88c 14282
ba479fd2
NN
14283 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
14284echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
14285if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
14286 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 14287else
8ada417f
ZW
14288 gcc_cv_as_sparc_ua_pcrel_hidden=no
14289 if test x$gcc_cv_as != x; then
6e3f3080 14290 echo '.data
8ada417f
ZW
14291.align 4
14292.byte 0x31
14293.uaword %r_disp32(foo)
14294.byte 0x32, 0x33, 0x34
14295.global foo
14296.hidden foo
14297foo:
14298.skip 4' > conftest.s
ba479fd2
NN
14299 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14301 (eval $ac_try) 2>&5
14302 ac_status=$?
14303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14304 (exit $ac_status); }; }
8ada417f
ZW
14305 then
14306 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
14307 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
14308 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
14309 | grep ' 31000000 07323334' > /dev/null 2>&1; then
14310 if $gcc_cv_objdump -R conftest 2> /dev/null \
14311 | grep 'DISP32' > /dev/null 2>&1; then
14312 :
14313 else
14314 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 14315 fi
8ada417f
ZW
14316 fi
14317 rm -f conftest
14318 else
14319 echo "configure: failed program was" >&5
14320 cat conftest.s >&5
14321 fi
14322 rm -f conftest.o conftest.s
14323 fi
cafe096b 14324fi
ba479fd2
NN
14325echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
14326echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 14327if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
14328
14329cat >>confdefs.h <<\_ACEOF
cf7b8b0d 14330#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 14331_ACEOF
cf7b8b0d 14332
8ada417f 14333fi
ba479fd2 14334
8ada417f 14335fi # unaligned pcrel relocs
cf7b8b0d 14336
ba479fd2
NN
14337 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
14338echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
14339if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
14340 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14341else
8ada417f
ZW
14342 gcc_cv_as_sparc_offsetable_lo10=no
14343 if test x$gcc_cv_as != x; then
6e3f3080 14344 echo '.text
8ada417f
ZW
14345 or %g1, %lo(ab) + 12, %g1
14346 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
14347 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
14348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14349 (eval $ac_try) 2>&5
14350 ac_status=$?
14351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14352 (exit $ac_status); }; }
8ada417f
ZW
14353 then
14354 if test x$gcc_cv_objdump != x \
ecb0ccbc 14355 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 14356 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 14357 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
14358 fi
14359 else
14360 echo "configure: failed program was" >&5
14361 cat conftest.s >&5
14362 fi
14363 rm -f conftest.o conftest.s
14364 fi
cafe096b 14365fi
ba479fd2
NN
14366echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
14367echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 14368if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
14369
14370cat >>confdefs.h <<\_ACEOF
1cb36a98 14371#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 14372_ACEOF
1cb36a98 14373
8ada417f 14374fi
1cb36a98
RH
14375 ;;
14376
c307e6dd 14377 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
14378 case $target_os in
14379 cygwin* | pe | mingw32*)
14380 # Used for DWARF 2 in PE
14381 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
14382echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
14383if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
14384 echo $ECHO_N "(cached) $ECHO_C" >&6
14385else
14386 gcc_cv_as_ix86_pe_secrel32=no
14387 if test $in_tree_gas = yes; then
14388 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14389 then gcc_cv_as_ix86_pe_secrel32=yes
14390fi
14391 elif test x$gcc_cv_as != x; then
14392 echo '.text
14393foo: nop
14394.data
14395 .secrel32 foo' > conftest.s
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); }; }
14402 then
14403 if test x$gcc_cv_ld != x \
14404 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
14405 gcc_cv_as_ix86_pe_secrel32=yes
14406 fi
14407 rm -f conftest
14408 else
14409 echo "configure: failed program was" >&5
14410 cat conftest.s >&5
14411 fi
14412 rm -f conftest.o conftest.s
14413 fi
14414fi
14415echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
14416echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
14417if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
14418
14419cat >>confdefs.h <<\_ACEOF
14420#define HAVE_GAS_PE_SECREL32_RELOC 1
14421_ACEOF
14422
14423fi
14424 ;;
14425 esac
14426
ba479fd2
NN
14427 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
14428echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
14429if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
14430 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14431else
14432 gcc_cv_as_ix86_filds_fists=no
14433 if test $in_tree_gas = yes; then
14434 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
14435 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 14436fi
8ada417f 14437 elif test x$gcc_cv_as != x; then
6e3f3080 14438 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
14439 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14441 (eval $ac_try) 2>&5
14442 ac_status=$?
14443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14444 (exit $ac_status); }; }
8ada417f
ZW
14445 then
14446 gcc_cv_as_ix86_filds_fists=yes
14447 else
14448 echo "configure: failed program was" >&5
14449 cat conftest.s >&5
981d4858 14450 fi
8ada417f
ZW
14451 rm -f conftest.o conftest.s
14452 fi
14453fi
ba479fd2
NN
14454echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
14455echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 14456if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
14457
14458cat >>confdefs.h <<\_ACEOF
8ada417f 14459#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 14460_ACEOF
ad9c4d9f 14461
f6f5dff2
RO
14462fi
14463
ba479fd2
NN
14464 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
14465echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
14466if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
14467 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
14468else
14469 gcc_cv_as_ix86_cmov_sun_syntax=no
14470 if test x$gcc_cv_as != x; then
6e3f3080 14471 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
14472 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14474 (eval $ac_try) 2>&5
14475 ac_status=$?
14476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14477 (exit $ac_status); }; }
f6f5dff2
RO
14478 then
14479 gcc_cv_as_ix86_cmov_sun_syntax=yes
14480 else
14481 echo "configure: failed program was" >&5
14482 cat conftest.s >&5
14483 fi
14484 rm -f conftest.o conftest.s
14485 fi
14486fi
ba479fd2
NN
14487echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
14488echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 14489if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
14490
14491cat >>confdefs.h <<\_ACEOF
f6f5dff2 14492#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 14493_ACEOF
f6f5dff2 14494
ad9c4d9f
NN
14495fi
14496
6f3ca281
ZW
14497 # This one is used unconditionally by i386.[ch]; it is to be defined
14498 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
14499 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
14500echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
14501if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
14502 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14503else
14504 gcc_cv_as_ix86_gotoff_in_data=no
14505 if test $in_tree_gas = yes; then
14506 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14507 then gcc_cv_as_ix86_gotoff_in_data=yes
14508fi
14509 elif test x$gcc_cv_as != x; then
6e3f3080 14510 echo ' .text
f88c65f7
RH
14511.L0:
14512 nop
14513 .data
8ada417f 14514 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
14515 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14517 (eval $ac_try) 2>&5
14518 ac_status=$?
14519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14520 (exit $ac_status); }; }
8ada417f
ZW
14521 then
14522 gcc_cv_as_ix86_gotoff_in_data=yes
14523 else
14524 echo "configure: failed program was" >&5
14525 cat conftest.s >&5
f88c65f7 14526 fi
8ada417f
ZW
14527 rm -f conftest.o conftest.s
14528 fi
14529fi
ba479fd2
NN
14530echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
14531echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 14532
6f3ca281 14533
ba479fd2 14534cat >>confdefs.h <<_ACEOF
6f3ca281 14535#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 14536_ACEOF
f88c65f7 14537
1cb36a98 14538 ;;
ef1ecf87
RH
14539
14540 ia64*-*-*)
ba479fd2
NN
14541 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
14542echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
14543if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
14544 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 14545else
8ada417f
ZW
14546 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
14547 if test $in_tree_gas = yes; then
14548 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14549 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 14550fi
8ada417f 14551 elif test x$gcc_cv_as != x; then
6e3f3080 14552 echo ' .text
ef1ecf87
RH
14553 addl r15 = @ltoffx(x#), gp
14554 ;;
cfa9ee99 14555 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
14556 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14558 (eval $ac_try) 2>&5
14559 ac_status=$?
14560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14561 (exit $ac_status); }; }
8ada417f 14562 then
cfa9ee99 14563 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
14564 else
14565 echo "configure: failed program was" >&5
14566 cat conftest.s >&5
2c4a9cff 14567 fi
8ada417f
ZW
14568 rm -f conftest.o conftest.s
14569 fi
14570fi
ba479fd2
NN
14571echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
14572echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 14573if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
14574
14575cat >>confdefs.h <<\_ACEOF
cfa9ee99 14576#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 14577_ACEOF
8ada417f 14578
cfa9ee99 14579fi
8ada417f 14580
2c4a9cff 14581 ;;
8ada417f 14582
2c4a9cff 14583 powerpc*-*-*)
8ada417f 14584 case $target in
6b37db3c
DE
14585 *-*-aix*) conftest_s=' .csect .text[PR]
14586 mfcr 3,128';;
8af4d362
PB
14587 *-*-darwin*)
14588 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
14589echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
14590if test "${gcc_cv_as_machine_directive+set}" = set; then
14591 echo $ECHO_N "(cached) $ECHO_C" >&6
14592else
14593 gcc_cv_as_machine_directive=no
14594 if test x$gcc_cv_as != x; then
14595 echo ' .machine ppc7400' > conftest.s
14596 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14598 (eval $ac_try) 2>&5
14599 ac_status=$?
14600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14601 (exit $ac_status); }; }
14602 then
14603 gcc_cv_as_machine_directive=yes
14604 else
14605 echo "configure: failed program was" >&5
14606 cat conftest.s >&5
14607 fi
14608 rm -f conftest.o conftest.s
14609 fi
14610fi
14611echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
14612echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
14613
14614 if test x$gcc_cv_as_machine_directive != xyes; then
14615 echo "*** This target requires an assembler supporting \".machine\"" >&2
14616 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
14617 test x$build = x$target && exit 1
14618 fi
14619 conftest_s=' .text
6b37db3c 14620 mfcr r3,128';;
4c67db14 14621 *) conftest_s=' .machine power4
d2ab3e37 14622 .text
6b37db3c 14623 mfcr 3,128';;
8ada417f 14624 esac
8ada417f 14625
ba479fd2
NN
14626 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
14627echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
14628if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
14629 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 14630else
8ada417f
ZW
14631 gcc_cv_as_powerpc_mfcrf=no
14632 if test $in_tree_gas = yes; then
14633 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14634 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 14635fi
8ada417f 14636 elif test x$gcc_cv_as != x; then
6e3f3080 14637 echo "$conftest_s" > conftest.s
ba479fd2
NN
14638 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14640 (eval $ac_try) 2>&5
14641 ac_status=$?
14642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14643 (exit $ac_status); }; }
8ada417f
ZW
14644 then
14645 gcc_cv_as_powerpc_mfcrf=yes
14646 else
14647 echo "configure: failed program was" >&5
14648 cat conftest.s >&5
14649 fi
14650 rm -f conftest.o conftest.s
14651 fi
2c4a9cff 14652fi
ba479fd2
NN
14653echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
14654echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 14655if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
14656
14657cat >>confdefs.h <<\_ACEOF
2c4a9cff 14658#define HAVE_AS_MFCRF 1
ba479fd2 14659_ACEOF
ef1ecf87 14660
8ada417f
ZW
14661fi
14662 ;;
14663
14664 mips*-*-*)
ba479fd2
NN
14665 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14666echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14667if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
14668 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14669else
14670 gcc_cv_as_mips_explicit_relocs=no
14671 if test $in_tree_gas = yes; then
14672 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14673 then gcc_cv_as_mips_explicit_relocs=yes
14674fi
14675 elif test x$gcc_cv_as != x; then
6e3f3080 14676 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
14677 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14679 (eval $ac_try) 2>&5
14680 ac_status=$?
14681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14682 (exit $ac_status); }; }
8ada417f
ZW
14683 then
14684 gcc_cv_as_mips_explicit_relocs=yes
14685 else
14686 echo "configure: failed program was" >&5
14687 cat conftest.s >&5
ef1ecf87 14688 fi
8ada417f
ZW
14689 rm -f conftest.o conftest.s
14690 fi
14691fi
ba479fd2
NN
14692echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
14693echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
14694if test $gcc_cv_as_mips_explicit_relocs = yes; then
14695 if test x$target_cpu_default = x
14696 then target_cpu_default=MASK_EXPLICIT_RELOCS
14697 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
14698 fi
14699fi
14700
82563d35
RS
14701 if test x$gas_flag = xyes \
14702 || test x"$host" != x"$build" \
14703 || test ! -x "$gcc_cv_as" \
14704 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
14705 :
14706 else
14707 echo "*** This configuration requires the GNU assembler" >&2
14708 exit 1
14709 fi
ef1ecf87 14710 ;;
1cb36a98 14711esac
9d147085
RH
14712# ??? Not all targets support dwarf2 debug_line, even within a version
14713# of gas. Moreover, we need to emit a valid instruction to trigger any
14714# info to the output file. So, as supported targets are added to gas 2.11,
14715# add some instruction here to (also) show we expect this might work.
14716# ??? Once 2.11 is released, probably need to add first known working
14717# version to the per-target configury.
14718case "$target" in
80486e06 14719 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 14720 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
d116bdf8 14721 | xstormy16*-*-* | cris-*-* | xtensa-*-*)
9d147085
RH
14722 insn="nop"
14723 ;;
57116d8d 14724 ia64*-*-* | s390*-*-*)
9d147085
RH
14725 insn="nop 0"
14726 ;;
2853bc5a
HPN
14727 mmix-*-*)
14728 insn="swym 0"
14729 ;;
8ada417f
ZW
14730esac
14731if test x"$insn" != x; then
14732 conftest_s="\
14733 .file 1 \"conftest.s\"
14734 .loc 1 3 0
14735 $insn"
ba479fd2
NN
14736 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
14737echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
14738if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
14739 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14740else
14741 gcc_cv_as_dwarf2_debug_line=no
14742 if test $in_tree_gas = yes; then
14743 if test $in_tree_gas_is_elf = yes \
14744 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14745 then gcc_cv_as_dwarf2_debug_line=yes
14746fi
14747 elif test x$gcc_cv_as != x; then
6e3f3080 14748 echo "$conftest_s" > conftest.s
ba479fd2
NN
14749 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14751 (eval $ac_try) 2>&5
14752 ac_status=$?
14753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14754 (exit $ac_status); }; }
8ada417f 14755 then
080a5bb0
EB
14756 if test x$gcc_cv_objdump != x \
14757 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
14758 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
14759 gcc_cv_as_dwarf2_debug_line=yes
14760 fi
14761 else
14762 echo "configure: failed program was" >&5
14763 cat conftest.s >&5
14764 fi
14765 rm -f conftest.o conftest.s
14766 fi
14767fi
ba479fd2
NN
14768echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
14769echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 14770
ad9c4d9f 14771
8ada417f
ZW
14772# The .debug_line file table must be in the exact order that
14773# we specified the files, since these indices are also used
14774# by DW_AT_decl_file. Approximate this test by testing if
14775# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
14776 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
14777echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
14778if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
14779 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14780else
14781 gcc_cv_as_dwarf2_file_buggy=no
14782 if test x$gcc_cv_as != x; then
6e3f3080 14783 echo ' .file 1 "foo.s"
8ada417f 14784 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
14785 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14787 (eval $ac_try) 2>&5
14788 ac_status=$?
14789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14790 (exit $ac_status); }; }
8ada417f
ZW
14791 then
14792 gcc_cv_as_dwarf2_file_buggy=yes
14793 else
14794 echo "configure: failed program was" >&5
14795 cat conftest.s >&5
14796 fi
14797 rm -f conftest.o conftest.s
14798 fi
ad9c4d9f 14799fi
ba479fd2
NN
14800echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
14801echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
14802
14803
14804 if test $gcc_cv_as_dwarf2_debug_line = yes \
14805 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
14806
14807cat >>confdefs.h <<\_ACEOF
9d147085 14808#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 14809_ACEOF
9d147085 14810
8ada417f 14811 fi
ad9c4d9f 14812
ba479fd2
NN
14813 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
14814echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
14815if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
14816 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14817else
14818 gcc_cv_as_gdwarf2_flag=no
14819 if test $in_tree_gas = yes; then
14820 if test $in_tree_gas_is_elf = yes \
14821 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14822 then gcc_cv_as_gdwarf2_flag=yes
14823fi
14824 elif test x$gcc_cv_as != x; then
6e3f3080 14825 echo "$insn" > conftest.s
ba479fd2
NN
14826 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
14827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14828 (eval $ac_try) 2>&5
14829 ac_status=$?
14830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14831 (exit $ac_status); }; }
8ada417f
ZW
14832 then
14833 gcc_cv_as_gdwarf2_flag=yes
14834 else
14835 echo "configure: failed program was" >&5
14836 cat conftest.s >&5
14837 fi
14838 rm -f conftest.o conftest.s
14839 fi
ad9c4d9f 14840fi
ba479fd2
NN
14841echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
14842echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 14843if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
14844
14845cat >>confdefs.h <<\_ACEOF
5f0e9ea2 14846#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 14847_ACEOF
5f0e9ea2
GK
14848
14849fi
ad9c4d9f 14850
ba479fd2
NN
14851 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
14852echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
14853if test "${gcc_cv_as_gstabs_flag+set}" = set; then
14854 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14855else
14856 gcc_cv_as_gstabs_flag=no
14857 if test $in_tree_gas = yes; then
14858 if test $in_tree_gas_is_elf = yes \
14859 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14860 then gcc_cv_as_gstabs_flag=yes
14861fi
14862 elif test x$gcc_cv_as != x; then
6e3f3080 14863 echo "$insn" > conftest.s
ba479fd2
NN
14864 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
14865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14866 (eval $ac_try) 2>&5
14867 ac_status=$?
14868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14869 (exit $ac_status); }; }
8ada417f
ZW
14870 then
14871 # The native Solaris 9/Intel assembler doesn't understand --gstabs
14872 # and warns about it, but still exits successfully. So check for
14873 # this.
ba479fd2
NN
14874 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
14875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14876 (eval $ac_try) 2>&5
14877 ac_status=$?
14878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14879 (exit $ac_status); }; }
8ada417f
ZW
14880 then :
14881 else gcc_cv_as_gstabs_flag=yes
14882 fi
14883 else
14884 echo "configure: failed program was" >&5
14885 cat conftest.s >&5
14886 fi
14887 rm -f conftest.o conftest.s
14888 fi
ad9c4d9f 14889fi
ba479fd2
NN
14890echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
14891echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 14892if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
14893
14894cat >>confdefs.h <<\_ACEOF
5f0e9ea2 14895#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 14896_ACEOF
5f0e9ea2
GK
14897
14898fi
8ada417f 14899fi
5f0e9ea2 14900
ba479fd2
NN
14901echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
14902echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 14903gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 14904if test $in_tree_ld = yes ; then
5408ac6c
HPN
14905 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 \
14906 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
14907 gcc_cv_ld_ro_rw_mix=read-write
14908 fi
14909elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
14910 echo '.section myfoosect, "a"' > conftest1.s
14911 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 14912 echo '.byte 1' >> conftest2.s
90e145da 14913 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 14914 echo '.byte 0' >> conftest3.s
6cd656d0
KC
14915 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
14916 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
14917 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 14918 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 14919 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 14920 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 14921 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
14922 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
14923 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
14924 gcc_cv_ld_ro_rw_mix=read-only
14925 else
14926 gcc_cv_ld_ro_rw_mix=read-write
14927 fi
14928 fi
14929 fi
14930 rm -f conftest.* conftest[123].*
14931fi
14932if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
14933
14934cat >>confdefs.h <<\_ACEOF
96d0f4dc 14935#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 14936_ACEOF
96d0f4dc
JJ
14937
14938fi
ba479fd2
NN
14939echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
14940echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 14941
ba479fd2
NN
14942echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
14943echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 14944gcc_cv_ld_eh_frame_hdr=no
34a86c2b 14945if test $in_tree_ld = yes ; then
5408ac6c
HPN
14946 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 \
14947 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
14948 gcc_cv_ld_eh_frame_hdr=yes
14949 fi
14950elif test x$gcc_cv_ld != x; then
14951 # Check if linker supports --eh-frame-hdr option
14952 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
14953 gcc_cv_ld_eh_frame_hdr=yes
14954 fi
14955fi
14956if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
14957
14958cat >>confdefs.h <<\_ACEOF
275b60d6 14959#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 14960_ACEOF
275b60d6
JJ
14961
14962fi
ba479fd2
NN
14963echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
14964echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 14965
ba479fd2
NN
14966echo "$as_me:$LINENO: checking linker position independent executable support" >&5
14967echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
14968gcc_cv_ld_pie=no
14969if test $in_tree_ld = yes ; then
5408ac6c
HPN
14970 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 \
14971 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
14972 gcc_cv_ld_pie=yes
14973 fi
14974elif test x$gcc_cv_ld != x; then
14975 # Check if linker supports -pie option
14976 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
14977 gcc_cv_ld_pie=yes
14978 fi
14979fi
14980if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
14981
14982cat >>confdefs.h <<\_ACEOF
24a4dd31 14983#define HAVE_LD_PIE 1
ba479fd2 14984_ACEOF
24a4dd31
JJ
14985
14986fi
ba479fd2
NN
14987echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
14988echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 14989
8bb915b6
NN
14990# --------
14991# UNSORTED
14992# --------
14993
765f1bf9
AM
14994echo "$as_me:$LINENO: checking linker --as-needed support" >&5
14995echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
14996if test "${gcc_cv_ld_as_needed+set}" = set; then
14997 echo $ECHO_N "(cached) $ECHO_C" >&6
14998else
14999 gcc_cv_ld_as_needed=no
765f1bf9
AM
15000if test $in_tree_ld = yes ; then
15001 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 \
15002 && test $in_tree_ld_is_elf = yes; then
15003 gcc_cv_ld_as_needed=yes
15004 fi
15005elif test x$gcc_cv_ld != x; then
15006 # Check if linker supports --as-needed and --no-as-needed options
15007 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
15008 gcc_cv_ld_as_needed=yes
15009 fi
15010fi
82e923f6
RS
15011
15012fi
15013echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
15014echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
15015if test x"$gcc_cv_ld_as_needed" = xyes; then
15016
15017cat >>confdefs.h <<\_ACEOF
15018#define HAVE_LD_AS_NEEDED 1
15019_ACEOF
15020
15021fi
765f1bf9 15022
85b776df
AM
15023case "$target" in
15024 powerpc64*-*-linux*)
15025 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
15026echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
15027if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
15028 echo $ECHO_N "(cached) $ECHO_C" >&6
15029else
15030 gcc_cv_ld_no_dot_syms=no
15031 if test $in_tree_ld = yes ; then
15032 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
15033 gcc_cv_ld_no_dot_syms=yes
15034 fi
15035 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
15036 cat > conftest1.s <<EOF
15037 .text
15038 bl .foo
15039EOF
15040 cat > conftest2.s <<EOF
15041 .section ".opd","aw"
15042 .align 3
15043 .globl foo
15044 .type foo,@function
15045foo:
15046 .quad .LEfoo,.TOC.@tocbase,0
15047 .text
15048.LEfoo:
15049 blr
15050 .size foo,.-.LEfoo
15051EOF
15052 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
15053 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
15054 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
15055 gcc_cv_ld_no_dot_syms=yes
15056 fi
15057 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
15058 fi
15059
15060fi
15061echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
15062echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
15063 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
15064
15065cat >>confdefs.h <<\_ACEOF
15066#define HAVE_LD_NO_DOT_SYMS 1
15067_ACEOF
15068
15069 fi
15070 ;;
15071esac
15072
380e5ca4
MM
15073echo "$as_me:$LINENO: checking linker --sysroot support" >&5
15074echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
15075if test "${gcc_cv_ld_sysroot+set}" = set; then
15076 echo $ECHO_N "(cached) $ECHO_C" >&6
15077else
15078 gcc_cv_ld_sysroot=no
15079 if test $in_tree_ld = yes ; then
15080 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
15081 gcc_cv_ld_sysroot = yes
15082 fi
15083 elif test x$gcc_cv_ld != x; then
15084 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
15085 gcc_cv_ld_sysroot=yes
15086 fi
15087 fi
15088fi
15089echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
15090echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
15091if test x"$gcc_cv_ld_sysroot" = xyes; then
15092
15093cat >>confdefs.h <<\_ACEOF
15094#define HAVE_LD_SYSROOT 1
15095_ACEOF
15096
15097fi
15098
9fb28a67 15099if test x$with_sysroot = x && test x$host = x$target \
047d636f 15100 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
15101
15102cat >>confdefs.h <<_ACEOF
793e9558 15103#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 15104_ACEOF
793e9558
PB
15105
15106fi
15107
81bf3d9e 15108# Find out what GC implementation we want, or may, use.
ba479fd2 15109
81bf3d9e
RH
15110# Check whether --with-gc or --without-gc was given.
15111if test "${with_gc+set}" = set; then
15112 withval="$with_gc"
15113 case "$withval" in
08cee789 15114 page)
81bf3d9e 15115 GGC=ggc-$withval
08cee789
DJ
15116 ;;
15117 zone)
15118 GGC=ggc-$withval
15119
15120cat >>confdefs.h <<\_ACEOF
15121#define GGC_ZONE 1
15122_ACEOF
15123
81bf3d9e
RH
15124 ;;
15125 *)
ba479fd2
NN
15126 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
15127echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
15128 { (exit 1); exit 1; }; }
81bf3d9e
RH
15129 ;;
15130esac
15131else
005537df 15132 GGC=ggc-page
ba479fd2 15133fi;
81bf3d9e
RH
15134
15135echo "Using $GGC for garbage collection."
15136
3c809ba4 15137# Use the system's zlib library.
b8dad04b
ZW
15138zlibdir=-L../zlib
15139zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 15140
3c809ba4
AG
15141# Check whether --with-system-zlib or --without-system-zlib was given.
15142if test "${with_system_zlib+set}" = set; then
15143 withval="$with_system_zlib"
15144 zlibdir=
15145zlibinc=
15146
ba479fd2 15147fi;
3c809ba4
AG
15148
15149
15150
dc6746e7 15151
ba479fd2
NN
15152echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
15153echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
15154 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
15155if test "${enable_maintainer_mode+set}" = set; then
15156 enableval="$enable_maintainer_mode"
15157 maintainer_mode=$enableval
15158else
15159 maintainer_mode=no
ba479fd2 15160fi;
63cf211a 15161
ba479fd2
NN
15162echo "$as_me:$LINENO: result: $maintainer_mode" >&5
15163echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
15164
15165if test "$maintainer_mode" = "yes"; then
15166 MAINT=''
15167else
15168 MAINT='#'
15169fi
15170
8bb915b6
NN
15171# --------------
15172# Language hooks
15173# --------------
15174
861bb6c1
JL
15175# Make empty files to contain the specs and options for each language.
15176# Then add #include lines to for a compiler that has specs and/or options.
15177
d7b42618 15178lang_opt_files=
861bb6c1 15179lang_specs_files=
3103b7db 15180lang_tree_files=
861bb6c1
JL
15181for subdir in . $subdirs
15182do
d7b42618
NB
15183 if test -f $srcdir/$subdir/lang.opt; then
15184 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
15185 fi
75bffa71 15186 if test -f $srcdir/$subdir/lang-specs.h; then
0d24f4d1 15187 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
861bb6c1 15188 fi
3103b7db 15189 if test -f $srcdir/$subdir/$subdir-tree.def; then
0d24f4d1 15190 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
3103b7db 15191 fi
861bb6c1
JL
15192done
15193
15194# These (without "all_") are set in each config-lang.in.
15195# `language' must be a single word so is spelled singularly.
15196all_languages=
15197all_boot_languages=
15198all_compilers=
15199all_stagestuff=
53c7ffe7 15200all_outputs='Makefile gccbug mklibgcc libada-mk'
861bb6c1 15201# List of language makefile fragments.
2ed26f6b
ZW
15202all_lang_makefrags=
15203# List of language subdirectory makefiles. Deprecated.
861bb6c1 15204all_lang_makefiles=
e2500fed 15205# Files for gengtype
ef69da62 15206all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
15207# Files for gengtype with language
15208all_gtfiles_files_langs=
15209all_gtfiles_files_files=
861bb6c1
JL
15210
15211# Add the language fragments.
15212# Languages are added via two mechanisms. Some information must be
15213# recorded in makefile variables, these are defined in config-lang.in.
15214# We accumulate them and plug them into the main Makefile.
15215# The other mechanism is a set of hooks for each of the main targets
15216# like `clean', `install', etc.
15217
861bb6c1 15218language_hooks="Make-hooks"
861bb6c1 15219
c406e779 15220for s in $subdirs
861bb6c1 15221do
861bb6c1
JL
15222 language=
15223 boot_language=
15224 compilers=
15225 stagestuff=
861bb6c1 15226 outputs=
e2500fed 15227 gtfiles=
861bb6c1 15228 . ${srcdir}/$s/config-lang.in
75bffa71 15229 if test "x$language" = x
861bb6c1
JL
15230 then
15231 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
15232 exit 1
15233 fi
2ed26f6b 15234 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
72aaffbd 15235 if test -f ${srcdir}/$s/Makefile.in
2ed26f6b 15236 then all_lang_makefiles="$s/Makefile"
72aaffbd 15237 fi
861bb6c1 15238 all_languages="$all_languages $language"
75bffa71 15239 if test "x$boot_language" = xyes
861bb6c1
JL
15240 then
15241 all_boot_languages="$all_boot_languages $language"
15242 fi
15243 all_compilers="$all_compilers $compilers"
15244 all_stagestuff="$all_stagestuff $stagestuff"
861bb6c1 15245 all_outputs="$all_outputs $outputs"
e2500fed 15246 all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15247 for f in $gtfiles
8ac9d31f 15248 do
8ac9d31f
TJ
15249 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
15250 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f 15251 done
861bb6c1
JL
15252done
15253
8ac9d31f
TJ
15254# Pick up gtfiles for c
15255gtfiles=
15256s="c"
15257. ${srcdir}/c-config-lang.in
15258all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15259for f in $gtfiles
8ac9d31f 15260do
8ac9d31f
TJ
15261 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
15262 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
15263done
15264
cbc59f01 15265check_languages=
c406e779 15266for language in $all_languages
cbc59f01 15267do
cbc59f01 15268 check_languages="$check_languages check-$language"
cbc59f01
DD
15269done
15270
62b81e45
MM
15271# We link each language in with a set of hooks, reached indirectly via
15272# lang.${target}.
861bb6c1
JL
15273
15274rm -f Make-hooks
15275touch Make-hooks
65ebbf81 15276target_list="all.build all.cross start.encap rest.encap tags \
a207b594 15277 install-normal install-common install-man \
a541f69d 15278 uninstall info man srcextra srcman srcinfo \
a03ad584 15279 mostlyclean clean distclean maintainer-clean \
8f231b5d 15280 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
861bb6c1
JL
15281for t in $target_list
15282do
15283 x=
c406e779 15284 for lang in $all_languages
861bb6c1 15285 do
ab87f8c8 15286 x="$x $lang.$t"
861bb6c1
JL
15287 done
15288 echo "lang.$t: $x" >> Make-hooks
15289done
15290
8bb915b6
NN
15291# --------
15292# UNSORTED
15293# --------
15294
cc06d68c 15295# Create .gdbinit.
861bb6c1 15296
cc06d68c
GP
15297echo "dir ." > .gdbinit
15298echo "dir ${srcdir}" >> .gdbinit
15299if test x$gdb_needs_out_file_path = xyes
15300then
15301 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
15302fi
15303if test "x$subdirs" != x; then
15304 for s in $subdirs
15305 do
15306 echo "dir ${srcdir}/$s" >> .gdbinit
15307 done
861bb6c1 15308fi
cc06d68c 15309echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 15310
8f8d3278
NC
15311# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
15312# absolute path for gcc_tooldir based on inserting the number of up-directory
15313# movements required to get from $(exec_prefix) to $(prefix) into the basic
15314# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
15315# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
15316# make and thus we'd get different behavior depending on where we built the
15317# sources.
5949a9fc 15318if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 15319 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 15320else
8f8d3278
NC
15321# An explanation of the sed strings:
15322# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
15323# -e 's|/$||' match a trailing forward slash and eliminates it
15324# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 15325# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
15326#
15327# (*) Note this pattern overwrites the first character of the string
15328# with a forward slash if one is not already present. This is not a
15329# problem because the exact names of the sub-directories concerned is
15330# unimportant, just the number of them matters.
15331#
15332# The practical upshot of these patterns is like this:
15333#
15334# prefix exec_prefix result
15335# ------ ----------- ------
15336# /foo /foo/bar ../
15337# /foo/ /foo/bar ../
15338# /foo /foo/bar/ ../
15339# /foo/ /foo/bar/ ../
15340# /foo /foo/bar/ugg ../../
15341#
4c112cda 15342 dollar='$$'
caa55b1e 15343 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
15344fi
15345
15346
2ce3c6c6 15347
2bbea3a6
RH
15348# Find a directory in which to install a shared libgcc.
15349
15350# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
15351if test "${enable_version_specific_runtime_libs+set}" = set; then
15352 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
15353
15354fi;
2bbea3a6
RH
15355
15356
5b15f277
RH
15357# Check whether --with-slibdir or --without-slibdir was given.
15358if test "${with_slibdir+set}" = set; then
15359 withval="$with_slibdir"
15360 slibdir="$with_slibdir"
15361else
15362 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 15363 slibdir='$(libsubdir)'
5b15f277 15364elif test "$host" != "$target"; then
2bbea3a6
RH
15365 slibdir='$(build_tooldir)/lib'
15366else
5b15f277 15367 slibdir='$(libdir)'
2bbea3a6 15368fi
ba479fd2 15369fi;
2bbea3a6
RH
15370
15371
1e6347d8 15372objdir=`${PWDCMD-pwd}`
7e717196
JL
15373
15374
861bb6c1
JL
15375# Substitute configuration variables
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
9b16d2c4 15422
e9a25f70 15423
6e26218f 15424
c8724862 15425
e061d1ce 15426
d8bb17c8 15427
11642c3a
ZW
15428
15429
15430
15431
15432
15433
15434
3d9d2476 15435
e2500fed 15436
51b9ff45 15437
861bb6c1 15438
6e3f3080
NN
15439# Echo link setup.
15440if test x${build} = x${host} ; then
15441 if test x${host} = x${target} ; then
15442 echo "Links are now set up to build a native compiler for ${target}." 1>&2
15443 else
15444 echo "Links are now set up to build a cross-compiler" 1>&2
15445 echo " from ${host} to ${target}." 1>&2
15446 fi
15447else
15448 if test x${host} = x${target} ; then
15449 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
15450 echo " for ${target}." 1>&2
15451 else
15452 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
15453 echo " from ${host} to ${target}." 1>&2
15454 fi
15455fi
15456
6de9cd9a
DN
15457
15458
15459
6e3f3080
NN
15460# Configure the subdirectories
15461# AC_CONFIG_SUBDIRS($subdirs)
15462
15463# Create the Makefile
15464# and configure language subdirectories
ba479fd2 15465 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
15466
15467
ba479fd2 15468 ac_config_commands="$ac_config_commands default"
914c5af7 15469
ba479fd2 15470cat >confcache <<\_ACEOF
6e3f3080
NN
15471# This file is a shell script that caches the results of configure
15472# tests run on this system so they can be shared between configure
ba479fd2
NN
15473# scripts and configure runs, see configure's option --config-cache.
15474# It is not useful on other systems. If it contains results you don't
15475# want to keep, you may remove or edit it.
6e3f3080 15476#
ba479fd2
NN
15477# config.status only pays attention to the cache file if you give it
15478# the --recheck option to rerun configure.
6e3f3080 15479#
ba479fd2
NN
15480# `ac_cv_env_foo' variables (set or unset) will be overridden when
15481# loading this file, other *unset* `ac_cv_foo' will be assigned the
15482# following values.
15483
15484_ACEOF
15485
6e3f3080
NN
15486# The following way of writing the cache mishandles newlines in values,
15487# but we know of no workaround that is simple, portable, and efficient.
15488# So, don't put newlines in cache variables' values.
15489# Ultrix sh set writes to stderr and can't be redirected directly,
15490# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
15491{
15492 (set) 2>&1 |
15493 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15494 *ac_space=\ *)
15495 # `set' does not quote correctly, so add quotes (double-quote
15496 # substitution turns \\\\ into \\, and sed turns \\ into \).
15497 sed -n \
86da66b5
HPN
15498 "s/'/'\\\\''/g;
15499 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ba479fd2
NN
15500 ;;
15501 *)
15502 # `set' quotes correctly as required by POSIX, so do not add quotes.
15503 sed -n \
86da66b5 15504 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
15505 ;;
15506 esac;
15507} |
15508 sed '
15509 t clear
15510 : clear
15511 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15512 t end
15513 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15514 : end' >>confcache
15515if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 15516 if test -w $cache_file; then
ba479fd2
NN
15517 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15518 cat confcache >$cache_file
6e3f3080
NN
15519 else
15520 echo "not updating unwritable cache $cache_file"
15521 fi
15522fi
15523rm -f confcache
15524
15525test "x$prefix" = xNONE && prefix=$ac_default_prefix
15526# Let make expand exec_prefix.
15527test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15528
ba479fd2
NN
15529# VPATH may cause trouble with some makes, so we remove $(srcdir),
15530# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15531# trailing colons and then remove the whole line if VPATH becomes empty
15532# (actually we leave an empty line to preserve line numbers).
6e3f3080 15533if test "x$srcdir" = x.; then
86da66b5 15534 ac_vpsub='/^[ ]*VPATH[ ]*=/{
ba479fd2
NN
15535s/:*\$(srcdir):*/:/;
15536s/:*\${srcdir}:*/:/;
15537s/:*@srcdir@:*/:/;
86da66b5 15538s/^\([^=]*=[ ]*\):*/\1/;
ba479fd2 15539s/:*$//;
86da66b5 15540s/^[^=]*=[ ]*$//;
ba479fd2 15541}'
6e3f3080
NN
15542fi
15543
63cf211a 15544DEFS=-DHAVE_CONFIG_H
6e3f3080 15545
ba479fd2
NN
15546ac_libobjs=
15547ac_ltlibobjs=
15548for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15549 # 1. Remove the extension, and $U if already installed.
15550 ac_i=`echo "$ac_i" |
86da66b5 15551 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
ba479fd2
NN
15552 # 2. Add them.
15553 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
15554 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
15555done
15556LIBOBJS=$ac_libobjs
63cf211a 15557
ba479fd2
NN
15558LTLIBOBJS=$ac_ltlibobjs
15559
15560
15561
15562: ${CONFIG_STATUS=./config.status}
15563ac_clean_files_save=$ac_clean_files
15564ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15565{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15566echo "$as_me: creating $CONFIG_STATUS" >&6;}
15567cat >$CONFIG_STATUS <<_ACEOF
15568#! $SHELL
15569# Generated by $as_me.
6e3f3080
NN
15570# Run this file to recreate the current configuration.
15571# Compiler output produced by configure, useful for debugging
ba479fd2 15572# configure, is in config.log if it exists.
6e3f3080 15573
ba479fd2
NN
15574debug=false
15575ac_cs_recheck=false
15576ac_cs_silent=false
15577SHELL=\${CONFIG_SHELL-$SHELL}
15578_ACEOF
15579
15580cat >>$CONFIG_STATUS <<\_ACEOF
15581## --------------------- ##
15582## M4sh Initialization. ##
15583## --------------------- ##
15584
15585# Be Bourne compatible
15586if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15587 emulate sh
15588 NULLCMD=:
15589 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
15590 # is contrary to our usage. Disable this feature.
15591 alias -g '${1+"$@"}'='"$@"'
15592elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15593 set -o posix
15594fi
86da66b5 15595DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
15596
15597# Support unset when possible.
86da66b5 15598if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
15599 as_unset=unset
15600else
15601 as_unset=false
15602fi
15603
15604
15605# Work around bugs in pre-3.0 UWIN ksh.
15606$as_unset ENV MAIL MAILPATH
15607PS1='$ '
15608PS2='> '
15609PS4='+ '
15610
15611# NLS nuisances.
15612for as_var in \
15613 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
15614 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
15615 LC_TELEPHONE LC_TIME
6e3f3080 15616do
86da66b5 15617 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
15618 eval $as_var=C; export $as_var
15619 else
15620 $as_unset $as_var
15621 fi
6e3f3080
NN
15622done
15623
ba479fd2
NN
15624# Required to use basename.
15625if expr a : '\(a\)' >/dev/null 2>&1; then
15626 as_expr=expr
15627else
15628 as_expr=false
15629fi
6e3f3080 15630
ba479fd2
NN
15631if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
15632 as_basename=basename
15633else
15634 as_basename=false
15635fi
6e3f3080
NN
15636
15637
ba479fd2
NN
15638# Name of the executable.
15639as_me=`$as_basename "$0" ||
15640$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15641 X"$0" : 'X\(//\)$' \| \
15642 X"$0" : 'X\(/\)$' \| \
15643 . : '\(.\)' 2>/dev/null ||
15644echo X/"$0" |
15645 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15646 /^X\/\(\/\/\)$/{ s//\1/; q; }
15647 /^X\/\(\/\).*/{ s//\1/; q; }
15648 s/.*/./; q'`
15649
6e3f3080 15650
ba479fd2
NN
15651# PATH needs CR, and LINENO needs CR and PATH.
15652# Avoid depending upon Character Ranges.
15653as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15654as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15655as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15656as_cr_digits='0123456789'
15657as_cr_alnum=$as_cr_Letters$as_cr_digits
15658
15659# The user is always right.
15660if test "${PATH_SEPARATOR+set}" != set; then
15661 echo "#! /bin/sh" >conf$$.sh
15662 echo "exit 0" >>conf$$.sh
15663 chmod +x conf$$.sh
15664 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
15665 PATH_SEPARATOR=';'
6e3f3080 15666 else
ba479fd2
NN
15667 PATH_SEPARATOR=:
15668 fi
15669 rm -f conf$$.sh
15670fi
15671
15672
15673 as_lineno_1=$LINENO
15674 as_lineno_2=$LINENO
15675 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15676 test "x$as_lineno_1" != "x$as_lineno_2" &&
15677 test "x$as_lineno_3" = "x$as_lineno_2" || {
15678 # Find who we are. Look in the path if we contain no path at all
15679 # relative or not.
15680 case $0 in
15681 *[\\/]* ) as_myself=$0 ;;
15682 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15683for as_dir in $PATH
15684do
15685 IFS=$as_save_IFS
15686 test -z "$as_dir" && as_dir=.
15687 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15688done
15689
15690 ;;
15691 esac
15692 # We did not find ourselves, most probably we were run as `sh COMMAND'
15693 # in which case we are not to be found in the path.
15694 if test "x$as_myself" = x; then
15695 as_myself=$0
15696 fi
15697 if test ! -f "$as_myself"; then
15698 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
15699echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
15700 { (exit 1); exit 1; }; }
6e3f3080 15701 fi
ba479fd2
NN
15702 case $CONFIG_SHELL in
15703 '')
15704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15705for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
15706do
15707 IFS=$as_save_IFS
15708 test -z "$as_dir" && as_dir=.
15709 for as_base in sh bash ksh sh5; do
15710 case $as_dir in
15711 /*)
15712 if ("$as_dir/$as_base" -c '
15713 as_lineno_1=$LINENO
15714 as_lineno_2=$LINENO
15715 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15716 test "x$as_lineno_1" != "x$as_lineno_2" &&
15717 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
15718 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
15719 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
15720 CONFIG_SHELL=$as_dir/$as_base
15721 export CONFIG_SHELL
15722 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
15723 fi;;
15724 esac
15725 done
15726done
15727;;
15728 esac
15729
15730 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
15731 # uniformly replaced by the line number. The first 'sed' inserts a
15732 # line-number line before each line; the second 'sed' does the real
15733 # work. The second script uses 'N' to pair each line-number line
15734 # with the numbered line, and appends trailing '-' during
15735 # substitution so that $LINENO is not a special case at line end.
15736 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
15737 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
15738 sed '=' <$as_myself |
15739 sed '
15740 N
15741 s,$,-,
15742 : loop
15743 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
15744 t loop
15745 s,-$,,
15746 s,^['$as_cr_digits']*\n,,
15747 ' >$as_me.lineno &&
15748 chmod +x $as_me.lineno ||
15749 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
15750echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
15751 { (exit 1); exit 1; }; }
15752
15753 # Don't try to exec as it changes $[0], causing all sort of problems
15754 # (the dirname of $[0] is not the place where we might find the
15755 # original and so on. Autoconf is especially sensible to this).
15756 . ./$as_me.lineno
15757 # Exit status is that of the last command.
15758 exit
15759}
15760
15761
15762case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
15763 *c*,-n*) ECHO_N= ECHO_C='
15764' ECHO_T=' ' ;;
15765 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
15766 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
15767esac
15768
15769if expr a : '\(a\)' >/dev/null 2>&1; then
15770 as_expr=expr
15771else
15772 as_expr=false
15773fi
15774
15775rm -f conf$$ conf$$.exe conf$$.file
15776echo >conf$$.file
15777if ln -s conf$$.file conf$$ 2>/dev/null; then
15778 # We could just check for DJGPP; but this test a) works b) is more generic
15779 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15780 if test -f conf$$.exe; then
15781 # Don't use ln at all; we don't have any links
15782 as_ln_s='cp -p'
6e3f3080 15783 else
ba479fd2 15784 as_ln_s='ln -s'
6e3f3080 15785 fi
ba479fd2
NN
15786elif ln conf$$.file conf$$ 2>/dev/null; then
15787 as_ln_s=ln
15788else
15789 as_ln_s='cp -p'
15790fi
15791rm -f conf$$ conf$$.exe conf$$.file
15792
15793if mkdir -p . 2>/dev/null; then
15794 as_mkdir_p=:
15795else
86da66b5 15796 test -d ./-p && rmdir ./-p
ba479fd2
NN
15797 as_mkdir_p=false
15798fi
15799
15800as_executable_p="test -f"
15801
15802# Sed expression to map a string onto a valid CPP name.
86da66b5 15803as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
15804
15805# Sed expression to map a string onto a valid variable name.
86da66b5 15806as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
15807
15808
15809# IFS
15810# We need space, tab and new line, in precisely that order.
15811as_nl='
15812'
15813IFS=" $as_nl"
15814
15815# CDPATH.
15816$as_unset CDPATH
15817
15818exec 6>&1
15819
15820# Open the log real soon, to keep \$[0] and so on meaningful, and to
15821# report actual input values of CONFIG_FILES etc. instead of their
15822# values after options handling. Logging --version etc. is OK.
15823exec 5>>config.log
15824{
15825 echo
15826 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15827## Running $as_me. ##
15828_ASBOX
15829} >&5
15830cat >&5 <<_CSEOF
15831
15832This file was extended by $as_me, which was
8ab705be 15833generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
15834
15835 CONFIG_FILES = $CONFIG_FILES
15836 CONFIG_HEADERS = $CONFIG_HEADERS
15837 CONFIG_LINKS = $CONFIG_LINKS
15838 CONFIG_COMMANDS = $CONFIG_COMMANDS
15839 $ $0 $@
15840
15841_CSEOF
15842echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
15843echo >&5
15844_ACEOF
15845
15846# Files that config.status was made for.
15847if test -n "$ac_config_files"; then
15848 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15849fi
15850
15851if test -n "$ac_config_headers"; then
15852 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15853fi
15854
15855if test -n "$ac_config_links"; then
15856 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15857fi
15858
15859if test -n "$ac_config_commands"; then
15860 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15861fi
15862
15863cat >>$CONFIG_STATUS <<\_ACEOF
15864
15865ac_cs_usage="\
15866\`$as_me' instantiates files from templates according to the
15867current configuration.
15868
15869Usage: $0 [OPTIONS] [FILE]...
15870
15871 -h, --help print this help, then exit
15872 -V, --version print version number, then exit
15873 -q, --quiet do not print progress messages
15874 -d, --debug don't remove temporary files
15875 --recheck update $as_me by reconfiguring in the same conditions
15876 --file=FILE[:TEMPLATE]
86da66b5 15877 instantiate the configuration file FILE
ba479fd2 15878 --header=FILE[:TEMPLATE]
86da66b5 15879 instantiate the configuration header FILE
ba479fd2
NN
15880
15881Configuration files:
15882$config_files
15883
15884Configuration headers:
15885$config_headers
15886
15887Configuration commands:
15888$config_commands
15889
15890Report bugs to <bug-autoconf@gnu.org>."
15891_ACEOF
15892
15893cat >>$CONFIG_STATUS <<_ACEOF
15894ac_cs_version="\\
15895config.status
8ab705be 15896configured by $0, generated by GNU Autoconf 2.59,
ba479fd2
NN
15897 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15898
86da66b5 15899Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
15900This config.status script is free software; the Free Software Foundation
15901gives unlimited permission to copy, distribute and modify it."
15902srcdir=$srcdir
15903_ACEOF
15904
15905cat >>$CONFIG_STATUS <<\_ACEOF
15906# If no file are specified by the user, then we need to provide default
15907# value. By we need to know if files were specified by the user.
15908ac_need_defaults=:
15909while test $# != 0
15910do
15911 case $1 in
15912 --*=*)
15913 ac_option=`expr "x$1" : 'x\([^=]*\)='`
15914 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15915 ac_shift=:
15916 ;;
15917 -*)
15918 ac_option=$1
15919 ac_optarg=$2
15920 ac_shift=shift
15921 ;;
15922 *) # This is not an option, so the user has probably given explicit
15923 # arguments.
15924 ac_option=$1
15925 ac_need_defaults=false;;
15926 esac
15927
15928 case $ac_option in
15929 # Handling of the options.
15930_ACEOF
15931cat >>$CONFIG_STATUS <<\_ACEOF
15932 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15933 ac_cs_recheck=: ;;
15934 --version | --vers* | -V )
15935 echo "$ac_cs_version"; exit 0 ;;
15936 --he | --h)
15937 # Conflict between --help and --header
15938 { { echo "$as_me:$LINENO: error: ambiguous option: $1
15939Try \`$0 --help' for more information." >&5
15940echo "$as_me: error: ambiguous option: $1
15941Try \`$0 --help' for more information." >&2;}
15942 { (exit 1); exit 1; }; };;
15943 --help | --hel | -h )
15944 echo "$ac_cs_usage"; exit 0 ;;
15945 --debug | --d* | -d )
15946 debug=: ;;
15947 --file | --fil | --fi | --f )
15948 $ac_shift
15949 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
15950 ac_need_defaults=false;;
15951 --header | --heade | --head | --hea )
15952 $ac_shift
15953 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
15954 ac_need_defaults=false;;
15955 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15956 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15957 ac_cs_silent=: ;;
15958
15959 # This is an error.
15960 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
15961Try \`$0 --help' for more information." >&5
15962echo "$as_me: error: unrecognized option: $1
15963Try \`$0 --help' for more information." >&2;}
15964 { (exit 1); exit 1; }; } ;;
15965
15966 *) ac_config_targets="$ac_config_targets $1" ;;
15967
15968 esac
15969 shift
6e3f3080 15970done
ba479fd2
NN
15971
15972ac_configure_extra_args=
15973
15974if $ac_cs_silent; then
15975 exec 6>/dev/null
15976 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
15977fi
15978
ba479fd2
NN
15979_ACEOF
15980cat >>$CONFIG_STATUS <<_ACEOF
15981if \$ac_cs_recheck; then
15982 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
15983 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15984fi
861bb6c1 15985
ba479fd2
NN
15986_ACEOF
15987
15988cat >>$CONFIG_STATUS <<_ACEOF
15989#
15990# INIT-COMMANDS section.
15991#
15992
15993subdirs='$subdirs'
ba479fd2
NN
15994
15995_ACEOF
15996
15997
15998
15999cat >>$CONFIG_STATUS <<\_ACEOF
16000for ac_config_target in $ac_config_targets
16001do
16002 case "$ac_config_target" in
16003 # Handling of arguments.
16004 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
16005 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16006 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
16007 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16008echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16009 { (exit 1); exit 1; }; };;
861bb6c1 16010 esac
ba479fd2
NN
16011done
16012
16013# If the user did not use the arguments to specify the items to instantiate,
16014# then the envvar interface is used. Set only those that are not.
16015# We use the long form for the default assignment because of an extremely
16016# bizarre bug on SunOS 4.1.3.
16017if $ac_need_defaults; then
16018 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16019 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16020 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16021fi
16022
16023# Have a temporary directory for convenience. Make it in the build tree
16024# simply because there is no reason to put it here, and in addition,
16025# creating and moving files from /tmp can sometimes cause problems.
16026# Create a temporary directory, and hook for its removal unless debugging.
16027$debug ||
16028{
16029 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16030 trap '{ (exit 1); exit 1; }' 1 2 13 15
16031}
861bb6c1 16032
ba479fd2 16033# Create a (secure) tmp directory for tmp files.
6e3f3080 16034
ba479fd2
NN
16035{
16036 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
16037 test -n "$tmp" && test -d "$tmp"
16038} ||
16039{
16040 tmp=./confstat$$-$RANDOM
16041 (umask 077 && mkdir $tmp)
16042} ||
16043{
16044 echo "$me: cannot create a temporary directory in ." >&2
16045 { (exit 1); exit 1; }
16046}
16047
16048_ACEOF
16049
16050cat >>$CONFIG_STATUS <<_ACEOF
16051
16052#
16053# CONFIG_FILES section.
16054#
16055
16056# No need to generate the scripts if there are no CONFIG_FILES.
16057# This happens for instance when ./config.status config.h
16058if test -n "\$CONFIG_FILES"; then
16059 # Protect against being on the right side of a sed subst in config.status.
16060 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16061 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16062s,@SHELL@,$SHELL,;t t
16063s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16064s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16065s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16066s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16067s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16068s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16069s,@exec_prefix@,$exec_prefix,;t t
16070s,@prefix@,$prefix,;t t
16071s,@program_transform_name@,$program_transform_name,;t t
16072s,@bindir@,$bindir,;t t
16073s,@sbindir@,$sbindir,;t t
16074s,@libexecdir@,$libexecdir,;t t
16075s,@datadir@,$datadir,;t t
16076s,@sysconfdir@,$sysconfdir,;t t
16077s,@sharedstatedir@,$sharedstatedir,;t t
16078s,@localstatedir@,$localstatedir,;t t
16079s,@libdir@,$libdir,;t t
16080s,@includedir@,$includedir,;t t
16081s,@oldincludedir@,$oldincludedir,;t t
16082s,@infodir@,$infodir,;t t
16083s,@mandir@,$mandir,;t t
16084s,@build_alias@,$build_alias,;t t
16085s,@host_alias@,$host_alias,;t t
16086s,@target_alias@,$target_alias,;t t
16087s,@DEFS@,$DEFS,;t t
16088s,@ECHO_C@,$ECHO_C,;t t
16089s,@ECHO_N@,$ECHO_N,;t t
16090s,@ECHO_T@,$ECHO_T,;t t
16091s,@LIBS@,$LIBS,;t t
16092s,@build@,$build,;t t
16093s,@build_cpu@,$build_cpu,;t t
16094s,@build_vendor@,$build_vendor,;t t
16095s,@build_os@,$build_os,;t t
16096s,@host@,$host,;t t
16097s,@host_cpu@,$host_cpu,;t t
16098s,@host_vendor@,$host_vendor,;t t
16099s,@host_os@,$host_os,;t t
16100s,@target@,$target,;t t
16101s,@target_cpu@,$target_cpu,;t t
16102s,@target_vendor@,$target_vendor,;t t
16103s,@target_os@,$target_os,;t t
8f1529e6 16104s,@target_noncanonical@,$target_noncanonical,;t t
ba479fd2
NN
16105s,@build_subdir@,$build_subdir,;t t
16106s,@host_subdir@,$host_subdir,;t t
16107s,@target_subdir@,$target_subdir,;t t
03787dfd 16108s,@GENINSRC@,$GENINSRC,;t t
ba479fd2
NN
16109s,@CC@,$CC,;t t
16110s,@CFLAGS@,$CFLAGS,;t t
16111s,@LDFLAGS@,$LDFLAGS,;t t
16112s,@CPPFLAGS@,$CPPFLAGS,;t t
16113s,@ac_ct_CC@,$ac_ct_CC,;t t
16114s,@EXEEXT@,$EXEEXT,;t t
16115s,@OBJEXT@,$OBJEXT,;t t
16116s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
16117s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
16118s,@CPP@,$CPP,;t t
bf3b7cd3 16119s,@EGREP@,$EGREP,;t t
ba479fd2
NN
16120s,@strict1_warn@,$strict1_warn,;t t
16121s,@warn_cflags@,$warn_cflags,;t t
16122s,@WERROR@,$WERROR,;t t
16123s,@nocommon_flag@,$nocommon_flag,;t t
13f05fd0 16124s,@TREEBROWSER@,$TREEBROWSER,;t t
ba479fd2
NN
16125s,@valgrind_path@,$valgrind_path,;t t
16126s,@valgrind_path_defines@,$valgrind_path_defines,;t t
16127s,@valgrind_command@,$valgrind_command,;t t
16128s,@coverage_flags@,$coverage_flags,;t t
16129s,@enable_multilib@,$enable_multilib,;t t
16130s,@enable_shared@,$enable_shared,;t t
16131s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
16132s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
16133s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
16134s,@onestep@,$onestep,;t t
16135s,@SET_MAKE@,$SET_MAKE,;t t
16136s,@AWK@,$AWK,;t t
ba479fd2 16137s,@LN_S@,$LN_S,;t t
41e622a8 16138s,@LN@,$LN,;t t
ba479fd2
NN
16139s,@RANLIB@,$RANLIB,;t t
16140s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
343a6100 16141s,@ranlib_flags@,$ranlib_flags,;t t
ba479fd2
NN
16142s,@INSTALL@,$INSTALL,;t t
16143s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16144s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16145s,@make_compare_target@,$make_compare_target,;t t
16146s,@have_mktemp_command@,$have_mktemp_command,;t t
16147s,@MAKEINFO@,$MAKEINFO,;t t
16148s,@BUILD_INFO@,$BUILD_INFO,;t t
16149s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
16150s,@FLEX@,$FLEX,;t t
16151s,@BISON@,$BISON,;t t
f6a874ac
JW
16152s,@NM@,$NM,;t t
16153s,@AR@,$AR,;t t
ba479fd2
NN
16154s,@stage1_cflags@,$stage1_cflags,;t t
16155s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
16156s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
16157s,@LDEXP_LIB@,$LDEXP_LIB,;t t
16158s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
16159s,@LIBICONV@,$LIBICONV,;t t
dfb77e37 16160s,@LTLIBICONV@,$LTLIBICONV,;t t
ba479fd2
NN
16161s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
16162s,@manext@,$manext,;t t
16163s,@objext@,$objext,;t t
8bb915b6 16164s,@gthread_flags@,$gthread_flags,;t t
ba479fd2 16165s,@extra_modes_file@,$extra_modes_file,;t t
75685792 16166s,@extra_opt_files@,$extra_opt_files,;t t
ba479fd2
NN
16167s,@USE_NLS@,$USE_NLS,;t t
16168s,@LIBINTL@,$LIBINTL,;t t
16169s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
16170s,@INCINTL@,$INCINTL,;t t
16171s,@XGETTEXT@,$XGETTEXT,;t t
16172s,@GMSGFMT@,$GMSGFMT,;t t
16173s,@POSUB@,$POSUB,;t t
16174s,@CATALOGS@,$CATALOGS,;t t
5395b47b 16175s,@host_cc_for_libada@,$host_cc_for_libada,;t t
ba479fd2
NN
16176s,@CROSS@,$CROSS,;t t
16177s,@ALL@,$ALL,;t t
16178s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
16179s,@inhibit_libc@,$inhibit_libc,;t t
ba479fd2
NN
16180s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
16181s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16182s,@STMP_FIXINC@,$STMP_FIXINC,;t t
16183s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
c38f02df 16184s,@collect2@,$collect2,;t t
ba479fd2 16185s,@libgcc_visibility@,$libgcc_visibility,;t t
ba479fd2
NN
16186s,@GGC@,$GGC,;t t
16187s,@zlibdir@,$zlibdir,;t t
16188s,@zlibinc@,$zlibinc,;t t
16189s,@MAINT@,$MAINT,;t t
16190s,@gcc_tooldir@,$gcc_tooldir,;t t
16191s,@dollar@,$dollar,;t t
16192s,@slibdir@,$slibdir,;t t
16193s,@objdir@,$objdir,;t t
16194s,@subdirs@,$subdirs,;t t
16195s,@srcdir@,$srcdir,;t t
ba479fd2
NN
16196s,@all_boot_languages@,$all_boot_languages,;t t
16197s,@all_compilers@,$all_compilers,;t t
16198s,@all_gtfiles@,$all_gtfiles,;t t
16199s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
16200s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
16201s,@all_lang_makefrags@,$all_lang_makefrags,;t t
16202s,@all_lang_makefiles@,$all_lang_makefiles,;t t
16203s,@all_languages@,$all_languages,;t t
16204s,@all_stagestuff@,$all_stagestuff,;t t
16205s,@build_exeext@,$build_exeext,;t t
16206s,@build_install_headers_dir@,$build_install_headers_dir,;t t
16207s,@build_xm_file_list@,$build_xm_file_list,;t t
16208s,@build_xm_include_list@,$build_xm_include_list,;t t
16209s,@build_xm_defines@,$build_xm_defines,;t t
16210s,@check_languages@,$check_languages,;t t
16211s,@cc_set_by_configure@,$cc_set_by_configure,;t t
16212s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
16213s,@cpp_install_dir@,$cpp_install_dir,;t t
16214s,@xmake_file@,$xmake_file,;t t
16215s,@tmake_file@,$tmake_file,;t t
30500d84 16216s,@extra_gcc_objs@,$extra_gcc_objs,;t t
ba479fd2
NN
16217s,@extra_headers_list@,$extra_headers_list,;t t
16218s,@extra_objs@,$extra_objs,;t t
16219s,@extra_parts@,$extra_parts,;t t
16220s,@extra_passes@,$extra_passes,;t t
16221s,@extra_programs@,$extra_programs,;t t
16222s,@float_h_file@,$float_h_file,;t t
16223s,@gcc_config_arguments@,$gcc_config_arguments,;t t
16224s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
16225s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
ba479fd2 16226s,@host_exeext@,$host_exeext,;t t
ba479fd2
NN
16227s,@host_xm_file_list@,$host_xm_file_list,;t t
16228s,@host_xm_include_list@,$host_xm_include_list,;t t
16229s,@host_xm_defines@,$host_xm_defines,;t t
16230s,@out_host_hook_obj@,$out_host_hook_obj,;t t
16231s,@install@,$install,;t t
16232s,@lang_opt_files@,$lang_opt_files,;t t
16233s,@lang_specs_files@,$lang_specs_files,;t t
16234s,@lang_tree_files@,$lang_tree_files,;t t
16235s,@local_prefix@,$local_prefix,;t t
16236s,@md_file@,$md_file,;t t
16237s,@objc_boehm_gc@,$objc_boehm_gc,;t t
16238s,@out_file@,$out_file,;t t
16239s,@out_object_file@,$out_object_file,;t t
16240s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
16241s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
ba479fd2
NN
16242s,@thread_file@,$thread_file,;t t
16243s,@tm_file_list@,$tm_file_list,;t t
16244s,@tm_include_list@,$tm_include_list,;t t
16245s,@tm_defines@,$tm_defines,;t t
16246s,@tm_p_file_list@,$tm_p_file_list,;t t
16247s,@tm_p_include_list@,$tm_p_include_list,;t t
16248s,@xm_file_list@,$xm_file_list,;t t
16249s,@xm_include_list@,$xm_include_list,;t t
16250s,@xm_defines@,$xm_defines,;t t
ba479fd2
NN
16251s,@c_target_objs@,$c_target_objs,;t t
16252s,@cxx_target_objs@,$cxx_target_objs,;t t
16253s,@target_cpu_default@,$target_cpu_default,;t t
6de9cd9a
DN
16254s,@GMPLIBS@,$GMPLIBS,;t t
16255s,@GMPINC@,$GMPINC,;t t
ba479fd2
NN
16256s,@LIBOBJS@,$LIBOBJS,;t t
16257s,@LTLIBOBJS@,$LTLIBOBJS,;t t
16258/@language_hooks@/r $language_hooks
16259s,@language_hooks@,,;t t
16260CEOF
16261
16262_ACEOF
16263
16264 cat >>$CONFIG_STATUS <<\_ACEOF
16265 # Split the substitutions into bite-sized pieces for seds with
16266 # small command number limits, like on Digital OSF/1 and HP-UX.
16267 ac_max_sed_lines=48
16268 ac_sed_frag=1 # Number of current file.
16269 ac_beg=1 # First line for current file.
16270 ac_end=$ac_max_sed_lines # Line after last line for current file.
16271 ac_more_lines=:
16272 ac_sed_cmds=
16273 while $ac_more_lines; do
16274 if test $ac_beg -gt 1; then
16275 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16276 else
16277 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16278 fi
16279 if test ! -s $tmp/subs.frag; then
16280 ac_more_lines=false
16281 else
16282 # The purpose of the label and of the branching condition is to
16283 # speed up the sed processing (if there are no `@' at all, there
16284 # is no need to browse any of the substitutions).
16285 # These are the two extra sed commands mentioned above.
16286 (echo ':t
16287 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16288 if test -z "$ac_sed_cmds"; then
86da66b5 16289 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2 16290 else
86da66b5 16291 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2
NN
16292 fi
16293 ac_sed_frag=`expr $ac_sed_frag + 1`
16294 ac_beg=$ac_end
16295 ac_end=`expr $ac_end + $ac_max_sed_lines`
16296 fi
16297 done
16298 if test -z "$ac_sed_cmds"; then
16299 ac_sed_cmds=cat
63cf211a 16300 fi
ba479fd2 16301fi # test -n "$CONFIG_FILES"
cafe096b 16302
ba479fd2
NN
16303_ACEOF
16304cat >>$CONFIG_STATUS <<\_ACEOF
16305for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16306 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16307 case $ac_file in
16308 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
16309 cat >$tmp/stdin
16310 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16311 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16312 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 16313 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16314 * ) ac_file_in=$ac_file.in ;;
63cf211a 16315 esac
cafe096b 16316
ba479fd2
NN
16317 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16318 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16319$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16320 X"$ac_file" : 'X\(//\)[^/]' \| \
16321 X"$ac_file" : 'X\(//\)$' \| \
16322 X"$ac_file" : 'X\(/\)' \| \
16323 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16324echo X"$ac_file" |
16325 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16326 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16327 /^X\(\/\/\)$/{ s//\1/; q; }
16328 /^X\(\/\).*/{ s//\1/; q; }
16329 s/.*/./; q'`
16330 { if $as_mkdir_p; then
16331 mkdir -p "$ac_dir"
16332 else
16333 as_dir="$ac_dir"
16334 as_dirs=
16335 while test ! -d "$as_dir"; do
16336 as_dirs="$as_dir $as_dirs"
16337 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16338$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16339 X"$as_dir" : 'X\(//\)[^/]' \| \
16340 X"$as_dir" : 'X\(//\)$' \| \
16341 X"$as_dir" : 'X\(/\)' \| \
16342 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16343echo X"$as_dir" |
16344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16345 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16346 /^X\(\/\/\)$/{ s//\1/; q; }
16347 /^X\(\/\).*/{ s//\1/; q; }
16348 s/.*/./; q'`
16349 done
16350 test ! -n "$as_dirs" || mkdir $as_dirs
16351 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16352echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16353 { (exit 1); exit 1; }; }; }
6e3f3080 16354
ba479fd2
NN
16355 ac_builddir=.
16356
16357if test "$ac_dir" != .; then
16358 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16359 # A "../" for each directory in $ac_dir_suffix.
16360 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16361else
16362 ac_dir_suffix= ac_top_builddir=
16363fi
16364
16365case $srcdir in
16366 .) # No --srcdir option. We are building in place.
16367 ac_srcdir=.
16368 if test -z "$ac_top_builddir"; then
16369 ac_top_srcdir=.
16370 else
16371 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16372 fi ;;
16373 [\\/]* | ?:[\\/]* ) # Absolute path.
16374 ac_srcdir=$srcdir$ac_dir_suffix;
16375 ac_top_srcdir=$srcdir ;;
16376 *) # Relative path.
16377 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16378 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16379esac
8ab705be
KC
16380
16381# Do not use `cd foo && pwd` to compute absolute paths, because
16382# the directories may not exist.
16383case `pwd` in
16384.) ac_abs_builddir="$ac_dir";;
86da66b5 16385*)
8ab705be
KC
16386 case "$ac_dir" in
16387 .) ac_abs_builddir=`pwd`;;
16388 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
16389 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
16390 esac;;
16391esac
8ab705be 16392case $ac_abs_builddir in
86da66b5
HPN
16393.) ac_abs_top_builddir=${ac_top_builddir}.;;
16394*)
16395 case ${ac_top_builddir}. in
8ab705be 16396 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 16397 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 16398 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
16399 esac;;
16400esac
8ab705be 16401case $ac_abs_builddir in
86da66b5
HPN
16402.) ac_abs_srcdir=$ac_srcdir;;
16403*)
16404 case $ac_srcdir in
8ab705be 16405 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 16406 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 16407 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
16408 esac;;
16409esac
8ab705be 16410case $ac_abs_builddir in
86da66b5
HPN
16411.) ac_abs_top_srcdir=$ac_top_srcdir;;
16412*)
16413 case $ac_top_srcdir in
8ab705be 16414 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 16415 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 16416 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
16417 esac;;
16418esac
ba479fd2
NN
16419
16420
16421
a1286ef5
ZW
16422 if test x"$ac_file" != x-; then
16423 { echo "$as_me:$LINENO: creating $ac_file" >&5
16424echo "$as_me: creating $ac_file" >&6;}
16425 rm -f "$ac_file"
16426 fi
ba479fd2
NN
16427 # Let's still pretend it is `configure' which instantiates (i.e., don't
16428 # use $as_me), people would be surprised to read:
16429 # /* config.h. Generated by config.status. */
16430 if test x"$ac_file" = x-; then
16431 configure_input=
16432 else
16433 configure_input="$ac_file. "
16434 fi
16435 configure_input=$configure_input"Generated from `echo $ac_file_in |
86da66b5 16436 sed 's,.*/,,'` by configure."
ba479fd2
NN
16437
16438 # First look for the input files in the build tree, otherwise in the
16439 # src tree.
16440 ac_file_inputs=`IFS=:
16441 for f in $ac_file_in; do
16442 case $f in
16443 -) echo $tmp/stdin ;;
16444 [\\/$]*)
86da66b5
HPN
16445 # Absolute (can't be DOS-style, as IFS=:)
16446 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16447echo "$as_me: error: cannot find input file: $f" >&2;}
16448 { (exit 1); exit 1; }; }
86da66b5 16449 echo "$f";;
ba479fd2 16450 *) # Relative
86da66b5
HPN
16451 if test -f "$f"; then
16452 # Build tree
16453 echo "$f"
16454 elif test -f "$srcdir/$f"; then
16455 # Source tree
16456 echo "$srcdir/$f"
16457 else
16458 # /dev/null tree
16459 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16460echo "$as_me: error: cannot find input file: $f" >&2;}
16461 { (exit 1); exit 1; }; }
86da66b5 16462 fi;;
ba479fd2
NN
16463 esac
16464 done` || { (exit 1); exit 1; }
16465_ACEOF
16466cat >>$CONFIG_STATUS <<_ACEOF
16467 sed "$ac_vpsub
16468$extrasub
16469_ACEOF
16470cat >>$CONFIG_STATUS <<\_ACEOF
16471:t
16472/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16473s,@configure_input@,$configure_input,;t t
16474s,@srcdir@,$ac_srcdir,;t t
16475s,@abs_srcdir@,$ac_abs_srcdir,;t t
16476s,@top_srcdir@,$ac_top_srcdir,;t t
16477s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16478s,@builddir@,$ac_builddir,;t t
16479s,@abs_builddir@,$ac_abs_builddir,;t t
16480s,@top_builddir@,$ac_top_builddir,;t t
16481s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16482" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16483 rm -f $tmp/stdin
16484 if test x"$ac_file" != x-; then
16485 mv $tmp/out $ac_file
16486 else
16487 cat $tmp/out
16488 rm -f $tmp/out
16489 fi
16490
16491done
16492_ACEOF
16493cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 16494
ba479fd2
NN
16495#
16496# CONFIG_HEADER section.
16497#
861bb6c1
JL
16498
16499# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16500# NAME is the cpp macro being defined and VALUE is the value it is being given.
16501#
16502# ac_d sets the value in "#define NAME VALUE" lines.
86da66b5
HPN
16503ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16504ac_dB='[ ].*$,\1#\2'
ba479fd2
NN
16505ac_dC=' '
16506ac_dD=',;t'
16507# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
86da66b5 16508ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ba479fd2 16509ac_uB='$,\1#\2define\3'
861bb6c1 16510ac_uC=' '
ba479fd2
NN
16511ac_uD=',;t'
16512
16513for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 16514 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
16515 case $ac_file in
16516 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
16517 cat >$tmp/stdin
16518 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16519 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16520 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 16521 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16522 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
16523 esac
16524
ba479fd2
NN
16525 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16526echo "$as_me: creating $ac_file" >&6;}
16527
16528 # First look for the input files in the build tree, otherwise in the
16529 # src tree.
16530 ac_file_inputs=`IFS=:
16531 for f in $ac_file_in; do
16532 case $f in
16533 -) echo $tmp/stdin ;;
16534 [\\/$]*)
86da66b5
HPN
16535 # Absolute (can't be DOS-style, as IFS=:)
16536 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16537echo "$as_me: error: cannot find input file: $f" >&2;}
16538 { (exit 1); exit 1; }; }
86da66b5
HPN
16539 # Do quote $f, to prevent DOS paths from being IFS'd.
16540 echo "$f";;
ba479fd2 16541 *) # Relative
86da66b5
HPN
16542 if test -f "$f"; then
16543 # Build tree
16544 echo "$f"
16545 elif test -f "$srcdir/$f"; then
16546 # Source tree
16547 echo "$srcdir/$f"
16548 else
16549 # /dev/null tree
16550 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16551echo "$as_me: error: cannot find input file: $f" >&2;}
16552 { (exit 1); exit 1; }; }
86da66b5 16553 fi;;
ba479fd2
NN
16554 esac
16555 done` || { (exit 1); exit 1; }
16556 # Remove the trailing spaces.
86da66b5 16557 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
ba479fd2
NN
16558
16559_ACEOF
16560
16561# Transform confdefs.h into two sed scripts, `conftest.defines' and
16562# `conftest.undefs', that substitutes the proper values into
16563# config.h.in to produce config.h. The first handles `#define'
16564# templates, and the second `#undef' templates.
16565# And first: Protect against being on the right side of a sed subst in
16566# config.status. Protect against being in an unquoted here document
16567# in config.status.
16568rm -f conftest.defines conftest.undefs
16569# Using a here document instead of a string reduces the quoting nightmare.
16570# Putting comments in sed scripts is not portable.
16571#
16572# `end' is used to avoid that the second main sed command (meant for
16573# 0-ary CPP macros) applies to n-ary macro definitions.
16574# See the Autoconf documentation for `clear'.
16575cat >confdef2sed.sed <<\_ACEOF
16576s/[\\&,]/\\&/g
16577s,[\\$`],\\&,g
16578t clear
16579: clear
86da66b5 16580s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
ba479fd2 16581t end
86da66b5 16582s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
ba479fd2
NN
16583: end
16584_ACEOF
16585# If some macros were called several times there might be several times
16586# the same #defines, which is useless. Nevertheless, we may not want to
16587# sort them, since we want the *last* AC-DEFINE to be honored.
16588uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16589sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16590rm -f confdef2sed.sed
861bb6c1
JL
16591
16592# This sed command replaces #undef with comments. This is necessary, for
16593# example, in the case of _POSIX_SOURCE, which is predefined and required
16594# on some systems where configure will not decide to define it.
ba479fd2 16595cat >>conftest.undefs <<\_ACEOF
86da66b5 16596s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
ba479fd2
NN
16597_ACEOF
16598
16599# Break up conftest.defines because some shells have a limit on the size
16600# of here documents, and old seds have small limits too (100 cmds).
16601echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
86da66b5 16602echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
ba479fd2
NN
16603echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16604echo ' :' >>$CONFIG_STATUS
16605rm -f conftest.tail
16606while grep . conftest.defines >/dev/null
16607do
16608 # Write a limited-size here document to $tmp/defines.sed.
16609 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16610 # Speed up: don't consider the non `#define' lines.
86da66b5 16611 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
ba479fd2
NN
16612 # Work around the forget-to-reset-the-flag bug.
16613 echo 't clr' >>$CONFIG_STATUS
16614 echo ': clr' >>$CONFIG_STATUS
16615 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
16616 echo 'CEOF
16617 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16618 rm -f $tmp/in
16619 mv $tmp/out $tmp/in
16620' >>$CONFIG_STATUS
16621 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16622 rm -f conftest.defines
16623 mv conftest.tail conftest.defines
16624done
16625rm -f conftest.defines
16626echo ' fi # grep' >>$CONFIG_STATUS
16627echo >>$CONFIG_STATUS
861bb6c1 16628
ba479fd2
NN
16629# Break up conftest.undefs because some shells have a limit on the size
16630# of here documents, and old seds have small limits too (100 cmds).
16631echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 16632rm -f conftest.tail
ba479fd2 16633while grep . conftest.undefs >/dev/null
861bb6c1 16634do
ba479fd2
NN
16635 # Write a limited-size here document to $tmp/undefs.sed.
16636 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16637 # Speed up: don't consider the non `#undef'
86da66b5 16638 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
ba479fd2
NN
16639 # Work around the forget-to-reset-the-flag bug.
16640 echo 't clr' >>$CONFIG_STATUS
16641 echo ': clr' >>$CONFIG_STATUS
16642 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 16643 echo 'CEOF
ba479fd2
NN
16644 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16645 rm -f $tmp/in
16646 mv $tmp/out $tmp/in
16647' >>$CONFIG_STATUS
16648 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16649 rm -f conftest.undefs
16650 mv conftest.tail conftest.undefs
861bb6c1 16651done
ba479fd2
NN
16652rm -f conftest.undefs
16653
16654cat >>$CONFIG_STATUS <<\_ACEOF
16655 # Let's still pretend it is `configure' which instantiates (i.e., don't
16656 # use $as_me), people would be surprised to read:
16657 # /* config.h. Generated by config.status. */
16658 if test x"$ac_file" = x-; then
16659 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 16660 else
ba479fd2 16661 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 16662 fi
ba479fd2
NN
16663 cat $tmp/in >>$tmp/config.h
16664 rm -f $tmp/in
16665 if test x"$ac_file" != x-; then
16666 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
16667 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16668echo "$as_me: $ac_file is unchanged" >&6;}
16669 else
16670 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16671$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16672 X"$ac_file" : 'X\(//\)[^/]' \| \
16673 X"$ac_file" : 'X\(//\)$' \| \
16674 X"$ac_file" : 'X\(/\)' \| \
16675 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16676echo X"$ac_file" |
16677 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16678 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16679 /^X\(\/\/\)$/{ s//\1/; q; }
16680 /^X\(\/\).*/{ s//\1/; q; }
16681 s/.*/./; q'`
16682 { if $as_mkdir_p; then
16683 mkdir -p "$ac_dir"
16684 else
16685 as_dir="$ac_dir"
16686 as_dirs=
16687 while test ! -d "$as_dir"; do
16688 as_dirs="$as_dir $as_dirs"
16689 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16690$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16691 X"$as_dir" : 'X\(//\)[^/]' \| \
16692 X"$as_dir" : 'X\(//\)$' \| \
16693 X"$as_dir" : 'X\(/\)' \| \
16694 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16695echo X"$as_dir" |
16696 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16697 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16698 /^X\(\/\/\)$/{ s//\1/; q; }
16699 /^X\(\/\).*/{ s//\1/; q; }
16700 s/.*/./; q'`
16701 done
16702 test ! -n "$as_dirs" || mkdir $as_dirs
16703 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16704echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16705 { (exit 1); exit 1; }; }; }
63cf211a 16706
ba479fd2
NN
16707 rm -f $ac_file
16708 mv $tmp/config.h $ac_file
16709 fi
16710 else
16711 cat $tmp/config.h
16712 rm -f $tmp/config.h
16713 fi
16714done
16715_ACEOF
16716cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 16717
ba479fd2
NN
16718#
16719# CONFIG_COMMANDS section.
16720#
16721for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16722 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16723 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16724 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
16725$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16726 X"$ac_dest" : 'X\(//\)[^/]' \| \
16727 X"$ac_dest" : 'X\(//\)$' \| \
16728 X"$ac_dest" : 'X\(/\)' \| \
16729 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16730echo X"$ac_dest" |
16731 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16732 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16733 /^X\(\/\/\)$/{ s//\1/; q; }
16734 /^X\(\/\).*/{ s//\1/; q; }
16735 s/.*/./; q'`
86da66b5
HPN
16736 { if $as_mkdir_p; then
16737 mkdir -p "$ac_dir"
16738 else
16739 as_dir="$ac_dir"
16740 as_dirs=
16741 while test ! -d "$as_dir"; do
16742 as_dirs="$as_dir $as_dirs"
16743 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16744$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16745 X"$as_dir" : 'X\(//\)[^/]' \| \
16746 X"$as_dir" : 'X\(//\)$' \| \
16747 X"$as_dir" : 'X\(/\)' \| \
16748 . : '\(.\)' 2>/dev/null ||
16749echo X"$as_dir" |
16750 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16751 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16752 /^X\(\/\/\)$/{ s//\1/; q; }
16753 /^X\(\/\).*/{ s//\1/; q; }
16754 s/.*/./; q'`
16755 done
16756 test ! -n "$as_dirs" || mkdir $as_dirs
16757 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16758echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16759 { (exit 1); exit 1; }; }; }
16760
ba479fd2
NN
16761 ac_builddir=.
16762
16763if test "$ac_dir" != .; then
16764 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16765 # A "../" for each directory in $ac_dir_suffix.
16766 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16767else
16768 ac_dir_suffix= ac_top_builddir=
16769fi
16770
16771case $srcdir in
16772 .) # No --srcdir option. We are building in place.
16773 ac_srcdir=.
16774 if test -z "$ac_top_builddir"; then
16775 ac_top_srcdir=.
16776 else
16777 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16778 fi ;;
16779 [\\/]* | ?:[\\/]* ) # Absolute path.
16780 ac_srcdir=$srcdir$ac_dir_suffix;
16781 ac_top_srcdir=$srcdir ;;
16782 *) # Relative path.
16783 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16784 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16785esac
8ab705be
KC
16786
16787# Do not use `cd foo && pwd` to compute absolute paths, because
16788# the directories may not exist.
16789case `pwd` in
16790.) ac_abs_builddir="$ac_dir";;
86da66b5 16791*)
8ab705be
KC
16792 case "$ac_dir" in
16793 .) ac_abs_builddir=`pwd`;;
16794 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
16795 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
16796 esac;;
16797esac
8ab705be 16798case $ac_abs_builddir in
86da66b5
HPN
16799.) ac_abs_top_builddir=${ac_top_builddir}.;;
16800*)
16801 case ${ac_top_builddir}. in
8ab705be 16802 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 16803 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 16804 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
16805 esac;;
16806esac
8ab705be 16807case $ac_abs_builddir in
86da66b5
HPN
16808.) ac_abs_srcdir=$ac_srcdir;;
16809*)
16810 case $ac_srcdir in
8ab705be 16811 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 16812 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 16813 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
16814 esac;;
16815esac
8ab705be 16816case $ac_abs_builddir in
86da66b5
HPN
16817.) ac_abs_top_srcdir=$ac_top_srcdir;;
16818*)
16819 case $ac_top_srcdir in
8ab705be 16820 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 16821 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 16822 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
16823 esac;;
16824esac
ba479fd2
NN
16825
16826
16827 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
16828echo "$as_me: executing $ac_dest commands" >&6;}
16829 case $ac_dest in
16830 default )
f1faaabd
NN
16831case ${CONFIG_HEADERS} in
16832 *auto-host.h:config.in*)
16833 echo > cstamp-h ;;
861bb6c1 16834esac
2ed26f6b 16835# Make sure all the subdirs exist.
3b620440 16836for d in $subdirs doc build
2ed26f6b 16837do
2ed26f6b 16838 test -d $d || mkdir $d
2ed26f6b 16839done
93cf819d
BK
16840# If the host supports symlinks, point stage[1234] at ../stage[1234] so
16841# bootstrapping and the installation procedure can still use
16842# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
16843# FLAGS_TO_PASS has been modified to solve the problem there.
16844# This is virtually a duplicate of what happens in configure.lang; we do
16845# an extra check to make sure this only happens if ln -s can be used.
35f06ae4
PB
16846case "$LN_S" in
16847 *-s*)
16848 for d in ${subdirs} ; do
1e6347d8 16849 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 16850 cd $d
6a1b7268 16851 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
16852 do
16853 rm -f $t
35f06ae4 16854 $LN_S ../$t $t 2>/dev/null
4e8a434e
BK
16855 done
16856 cd $STARTDIR
35f06ae4
PB
16857 done
16858 ;;
16859esac
ba479fd2
NN
16860 ;;
16861 esac
16862done
16863_ACEOF
cafe096b 16864
ba479fd2
NN
16865cat >>$CONFIG_STATUS <<\_ACEOF
16866
16867{ (exit 0); exit 0; }
16868_ACEOF
861bb6c1 16869chmod +x $CONFIG_STATUS
ba479fd2
NN
16870ac_clean_files=$ac_clean_files_save
16871
16872
16873# configure is writing to config.log, and then calls config.status.
16874# config.status does its own redirection, appending to config.log.
16875# Unfortunately, on DOS this fails, as config.log is still kept open
16876# by configure, so config.status won't be able to write to it; its
16877# output is simply discarded. So we exec the FD to /dev/null,
16878# effectively closing config.log, so it can be properly (re)opened and
16879# appended to by config.status. When coming back to configure, we
16880# need to make the FD available again.
16881if test "$no_create" != yes; then
16882 ac_cs_success=:
16883 ac_config_status_args=
16884 test "$silent" = yes &&
16885 ac_config_status_args="$ac_config_status_args --quiet"
16886 exec 5>/dev/null
16887 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16888 exec 5>>config.log
16889 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16890 # would make configure fail if this is the last instruction.
16891 $ac_cs_success || { (exit 1); exit 1; }
16892fi
861bb6c1 16893