]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
20000804-1.c: Skip if i?86-darwin.
[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
5c3c3683 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 cxx_compat_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_selected_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
ba479fd2 313ac_subst_files='language_hooks'
861bb6c1
JL
314
315# Initialize some variables set by options.
ba479fd2
NN
316ac_init_help=
317ac_init_version=false
861bb6c1
JL
318# The variables have the same names as the options, with
319# dashes changed to underlines.
ba479fd2 320cache_file=/dev/null
861bb6c1 321exec_prefix=NONE
861bb6c1 322no_create=
861bb6c1
JL
323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
861bb6c1
JL
331verbose=
332x_includes=NONE
333x_libraries=NONE
ba479fd2
NN
334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
861bb6c1
JL
340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
861bb6c1
JL
353ac_prev=
354for ac_option
355do
861bb6c1
JL
356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
361 fi
362
ba479fd2 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
861bb6c1
JL
364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
ba479fd2 367 case $ac_option in
861bb6c1
JL
368
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 372 bindir=$ac_optarg ;;
861bb6c1
JL
373
374 -build | --build | --buil | --bui | --bu)
ba479fd2 375 ac_prev=build_alias ;;
861bb6c1 376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 377 build_alias=$ac_optarg ;;
861bb6c1
JL
378
379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
861bb6c1
JL
388
389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
ba479fd2 393 datadir=$ac_optarg ;;
861bb6c1
JL
394
395 -disable-* | --disable-*)
ba479fd2 396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 397 # Reject names that are not valid shell variable names.
ba479fd2
NN
398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
861bb6c1
JL
403
404 -enable-* | --enable-*)
ba479fd2 405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 406 # Reject names that are not valid shell variable names.
ba479fd2
NN
407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
413 *) ac_optarg=yes ;;
414 esac
ba479fd2 415 eval "enable_$ac_feature='$ac_optarg'" ;;
861bb6c1
JL
416
417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
ba479fd2 424 exec_prefix=$ac_optarg ;;
861bb6c1
JL
425
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
429
ba479fd2
NN
430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
861bb6c1
JL
436
437 -host | --host | --hos | --ho)
ba479fd2 438 ac_prev=host_alias ;;
861bb6c1 439 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 440 host_alias=$ac_optarg ;;
861bb6c1
JL
441
442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 447 includedir=$ac_optarg ;;
861bb6c1
JL
448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 452 infodir=$ac_optarg ;;
861bb6c1
JL
453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 457 libdir=$ac_optarg ;;
861bb6c1
JL
458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
ba479fd2 464 libexecdir=$ac_optarg ;;
861bb6c1
JL
465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
ba479fd2 473 localstatedir=$ac_optarg ;;
861bb6c1
JL
474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 478 mandir=$ac_optarg ;;
861bb6c1
JL
479
480 -nfp | --nfp | --nf)
481 # Obsolete; use --without-fp.
482 with_fp=no ;;
483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 485 | --no-cr | --no-c | -n)
861bb6c1
JL
486 no_create=yes ;;
487
488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
491
492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 499 oldincludedir=$ac_optarg ;;
861bb6c1
JL
500
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 504 prefix=$ac_optarg ;;
861bb6c1
JL
505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 511 program_prefix=$ac_optarg ;;
861bb6c1
JL
512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 518 program_suffix=$ac_optarg ;;
861bb6c1
JL
519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 535 program_transform_name=$ac_optarg ;;
861bb6c1
JL
536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
ba479fd2 545 sbindir=$ac_optarg ;;
861bb6c1
JL
546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
ba479fd2 556 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
557
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
ba479fd2 561 site=$ac_optarg ;;
861bb6c1
JL
562
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 566 srcdir=$ac_optarg ;;
861bb6c1
JL
567
568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 573 sysconfdir=$ac_optarg ;;
861bb6c1
JL
574
575 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 576 ac_prev=target_alias ;;
861bb6c1 577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 578 target_alias=$ac_optarg ;;
861bb6c1
JL
579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
ba479fd2
NN
583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
861bb6c1
JL
585
586 -with-* | --with-*)
ba479fd2 587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 588 # Reject names that are not valid shell variable names.
ba479fd2
NN
589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
861bb6c1 592 ac_package=`echo $ac_package| sed 's/-/_/g'`
ba479fd2
NN
593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
595 *) ac_optarg=yes ;;
596 esac
ba479fd2 597 eval "with_$ac_package='$ac_optarg'" ;;
861bb6c1
JL
598
599 -without-* | --without-*)
ba479fd2 600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 601 # Reject names that are not valid shell variable names.
ba479fd2
NN
602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
861bb6c1
JL
607
608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 617 x_includes=$ac_optarg ;;
861bb6c1
JL
618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 624 x_libraries=$ac_optarg ;;
861bb6c1 625
ba479fd2
NN
626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
861bb6c1
JL
629 ;;
630
ba479fd2
NN
631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
861bb6c1 641 *)
ba479fd2
NN
642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
647 ;;
648
649 esac
650done
651
652if test -n "$ac_prev"; then
ba479fd2
NN
653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
63cf211a 656fi
63cf211a 657
ba479fd2
NN
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
666 esac
667done
093e61a6 668
ba479fd2
NN
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
86da66b5 671 localstatedir libdir includedir oldincludedir infodir mandir
861bb6c1 672do
ba479fd2
NN
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
861bb6c1
JL
678 esac
679done
680
ba479fd2
NN
681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
687
688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
6e3f3080 698
ba479fd2
NN
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
861bb6c1 703
861bb6c1
JL
704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707 ac_srcdir_defaulted=yes
708 # Try the directory containing this script, then its parent.
ba479fd2
NN
709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
861bb6c1
JL
721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
ba479fd2
NN
730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
63cf211a 732 else
ba479fd2
NN
733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
63cf211a
NN
735 fi
736fi
ba479fd2
NN
737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
6de9cd9a
DN
773ac_env_GMPLIBS_set=${GMPLIBS+set}
774ac_env_GMPLIBS_value=$GMPLIBS
775ac_cv_env_GMPLIBS_set=${GMPLIBS+set}
776ac_cv_env_GMPLIBS_value=$GMPLIBS
777ac_env_GMPINC_set=${GMPINC+set}
778ac_env_GMPINC_value=$GMPINC
779ac_cv_env_GMPINC_set=${GMPINC+set}
780ac_cv_env_GMPINC_value=$GMPINC
63cf211a 781
ba479fd2
NN
782#
783# Report the --help message.
784#
785if test "$ac_init_help" = "long"; then
786 # Omit some internal or obsolete options to make the list less imposing.
787 # This message is too long to be a string in the A/UX 3.1 sh.
788 cat <<_ACEOF
789\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 790
ba479fd2 791Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 792
ba479fd2
NN
793To assign environment variables (e.g., CC, CFLAGS...), specify them as
794VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 795
ba479fd2 796Defaults for the options are specified in brackets.
861bb6c1 797
ba479fd2
NN
798Configuration:
799 -h, --help display this help and exit
800 --help=short display options specific to this package
801 --help=recursive display the short help of all the included packages
802 -V, --version display version information and exit
803 -q, --quiet, --silent do not print \`checking...' messages
804 --cache-file=FILE cache test results in FILE [disabled]
805 -C, --config-cache alias for \`--cache-file=config.cache'
806 -n, --no-create do not create output files
807 --srcdir=DIR find the sources in DIR [configure dir or \`..']
808
809_ACEOF
810
811 cat <<_ACEOF
812Installation directories:
813 --prefix=PREFIX install architecture-independent files in PREFIX
86da66b5 814 [$ac_default_prefix]
ba479fd2 815 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
86da66b5 816 [PREFIX]
861bb6c1 817
ba479fd2
NN
818By default, \`make install' will install all the files in
819\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
820an installation prefix other than \`$ac_default_prefix' using \`--prefix',
821for instance \`--prefix=\$HOME'.
13c22933 822
ba479fd2 823For better control, use the options below.
13c22933 824
ba479fd2
NN
825Fine tuning of the installation directories:
826 --bindir=DIR user executables [EPREFIX/bin]
827 --sbindir=DIR system admin executables [EPREFIX/sbin]
828 --libexecdir=DIR program executables [EPREFIX/libexec]
829 --datadir=DIR read-only architecture-independent data [PREFIX/share]
830 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
831 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
832 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
833 --libdir=DIR object code libraries [EPREFIX/lib]
834 --includedir=DIR C header files [PREFIX/include]
835 --oldincludedir=DIR C header files for non-gcc [/usr/include]
836 --infodir=DIR info documentation [PREFIX/info]
837 --mandir=DIR man documentation [PREFIX/man]
838_ACEOF
13c22933 839
ba479fd2 840 cat <<\_ACEOF
13c22933 841
ba479fd2
NN
842Program names:
843 --program-prefix=PREFIX prepend PREFIX to installed program names
844 --program-suffix=SUFFIX append SUFFIX to installed program names
845 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 846
ba479fd2
NN
847System types:
848 --build=BUILD configure for building on BUILD [guessed]
849 --host=HOST cross-compile to build programs to run on HOST [BUILD]
850 --target=TARGET configure for building compilers for TARGET [HOST]
851_ACEOF
13c22933
JJ
852fi
853
ba479fd2 854if test -n "$ac_init_help"; then
13c22933 855
ba479fd2 856 cat <<\_ACEOF
13c22933 857
ba479fd2
NN
858Optional Features:
859 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
860 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
861 --enable-generated-files-in-srcdir
862 put copies of generated files in source dir
863 intended for creating source tarballs for users
864 without texinfo bison or flex.
09a9c095 865 --enable-werror-always enable -Werror always
ba479fd2
NN
866 --enable-werror enable -Werror in bootstrap stage2 and later
867 --enable-checking=LIST
868 enable expensive run-time checks. With LIST,
869 enable only specific categories of checks.
cdce5c16
NS
870 Categories are: yes,no,all,none,release.
871 Flags are: assert,fold,gc,gcac,misc,
872 rtlflag,rtl,runtime,tree,valgrind.
74ee1642 873 --enable-mapped-location location_t is fileline integer cookie
ba479fd2 874 --enable-coverage=LEVEL
fb38008e 875 enable compiler's code coverage collection.
ba479fd2
NN
876 Use to measure compiler performance and locate
877 unused parts of the compiler. With LEVEL, specify
878 optimization. Values are opt, noopt,
879 default is noopt
880 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
881 --enable-multilib enable library support for multiple ABIs
882 --enable-__cxa_atexit enable __cxa_atexit for C++
486aa804 883 --enable-decimal-float enable decimal float extension to C
ba479fd2
NN
884 --enable-threads enable thread usage for target GCC
885 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
886 --enable-tls enable or disable generation of tls code
887 overriding the assembler check for tls support
ba479fd2
NN
888 --enable-objc-gc enable the use of Boehm's garbage collector with
889 the GNU Objective-C runtime
890 --disable-shared don't provide a shared libgcc
891 --enable-intermodule build the compiler in one step
f3c9f174 892 --enable-languages=LIST specify which front-ends to build
dfb77e37 893 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
894 --enable-initfini-array use .init_array/.fini_array sections
895 --enable-sjlj-exceptions
896 arrange to use setjmp/longjmp exception handling
7f970b70 897 --enable-secureplt enable -msecure-plt by default for PowerPC
ba479fd2
NN
898 --disable-win32-registry
899 disable lookup of installation paths in the
900 Registry on Windows hosts
901 --enable-win32-registry enable registry lookup (default)
902 --enable-win32-registry=KEY
903 use KEY instead of GCC version as the last portion
904 of the registry key
905 --enable-maintainer-mode
906 enable make rules and dependencies not useful
907 (and sometimes confusing) to the casual installer
908 --enable-version-specific-runtime-libs
909 specify that runtime libraries should be
910 installed in a compiler-specific directory
093e61a6 911
ba479fd2
NN
912Optional Packages:
913 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
914 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
915 --with-local-prefix=DIR specifies directory to put local include
916 --with-gxx-include-dir=DIR
917 specifies directory to put g++ header files
918 --with-cpp-install-dir=DIR
919 install the user visible C preprocessor in DIR
920 (relative to PREFIX) as well as PREFIX/bin
921 --with-gnu-ld arrange to work with GNU ld.
922 --with-ld arrange to use the specified ld (full pathname)
d594623a 923 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
924 --with-gnu-as arrange to work with GNU as
925 --with-as arrange to use the specified as (full pathname)
926 --with-stabs arrange to use stabs instead of host debug format
927 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
928 --with-build-sysroot=sysroot
929 use sysroot as the system root during the build
ba479fd2 930 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
dfb77e37
KC
931 --with-gnu-ld assume the C compiler uses GNU ld default=no
932 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
933 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 934 --with-system-libunwind use installed libunwind
ed965309 935 --with-long-double-128 Use 128-bit long double by default.
59415997 936 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
937 with the compiler
938 --with-system-zlib use installed libz
939 --with-slibdir=DIR shared libraries in DIR LIBDIR
13c22933 940
ba479fd2
NN
941Some influential environment variables:
942 CC C compiler command
943 CFLAGS C compiler flags
944 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
945 nonstandard directory <lib dir>
946 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
947 headers in a nonstandard directory <include dir>
948 CPP C preprocessor
6de9cd9a
DN
949 GMPLIBS How to link GMP
950 GMPINC How to find GMP include files
13c22933 951
ba479fd2
NN
952Use these variables to override the choices made by `configure' or to help
953it to find libraries and programs with nonstandard names/locations.
73458fb7 954
ba479fd2
NN
955_ACEOF
956fi
6e3f3080 957
ba479fd2
NN
958if test "$ac_init_help" = "recursive"; then
959 # If there are subdirs, report their specific --help.
960 ac_popdir=`pwd`
961 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
962 test -d $ac_dir || continue
963 ac_builddir=.
964
965if test "$ac_dir" != .; then
966 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
967 # A "../" for each directory in $ac_dir_suffix.
968 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
969else
970 ac_dir_suffix= ac_top_builddir=
971fi
972
973case $srcdir in
974 .) # No --srcdir option. We are building in place.
975 ac_srcdir=.
976 if test -z "$ac_top_builddir"; then
977 ac_top_srcdir=.
978 else
979 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
980 fi ;;
981 [\\/]* | ?:[\\/]* ) # Absolute path.
982 ac_srcdir=$srcdir$ac_dir_suffix;
983 ac_top_srcdir=$srcdir ;;
984 *) # Relative path.
985 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
986 ac_top_srcdir=$ac_top_builddir$srcdir ;;
987esac
8ab705be
KC
988
989# Do not use `cd foo && pwd` to compute absolute paths, because
990# the directories may not exist.
991case `pwd` in
992.) ac_abs_builddir="$ac_dir";;
86da66b5 993*)
8ab705be
KC
994 case "$ac_dir" in
995 .) ac_abs_builddir=`pwd`;;
996 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
997 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
998 esac;;
999esac
8ab705be 1000case $ac_abs_builddir in
86da66b5
HPN
1001.) ac_abs_top_builddir=${ac_top_builddir}.;;
1002*)
1003 case ${ac_top_builddir}. in
8ab705be 1004 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 1005 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 1006 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
1007 esac;;
1008esac
8ab705be 1009case $ac_abs_builddir in
86da66b5
HPN
1010.) ac_abs_srcdir=$ac_srcdir;;
1011*)
1012 case $ac_srcdir in
8ab705be 1013 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 1014 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 1015 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
1016 esac;;
1017esac
8ab705be 1018case $ac_abs_builddir in
86da66b5
HPN
1019.) ac_abs_top_srcdir=$ac_top_srcdir;;
1020*)
1021 case $ac_top_srcdir in
8ab705be 1022 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 1023 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 1024 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
1025 esac;;
1026esac
ba479fd2
NN
1027
1028 cd $ac_dir
1029 # Check for guested configure; otherwise get Cygnus style configure.
1030 if test -f $ac_srcdir/configure.gnu; then
1031 echo
1032 $SHELL $ac_srcdir/configure.gnu --help=recursive
1033 elif test -f $ac_srcdir/configure; then
1034 echo
1035 $SHELL $ac_srcdir/configure --help=recursive
1036 elif test -f $ac_srcdir/configure.ac ||
86da66b5 1037 test -f $ac_srcdir/configure.in; then
ba479fd2
NN
1038 echo
1039 $ac_configure --help
1040 else
1041 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1042 fi
1cf0118d 1043 cd $ac_popdir
ba479fd2
NN
1044 done
1045fi
1046
1047test -n "$ac_init_help" && exit 0
1048if $ac_init_version; then
1049 cat <<\_ACEOF
1050
86da66b5 1051Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1052This configure script is free software; the Free Software Foundation
1053gives unlimited permission to copy, distribute and modify it.
1054_ACEOF
1055 exit 0
1056fi
1057exec 5>config.log
1058cat >&5 <<_ACEOF
1059This file contains any messages produced by compilers while
1060running configure, to aid debugging if configure makes a mistake.
1061
1062It was created by $as_me, which was
8ab705be 1063generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1064
1065 $ $0 $@
1066
1067_ACEOF
1068{
1069cat <<_ASUNAME
1070## --------- ##
1071## Platform. ##
1072## --------- ##
1073
1074hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1075uname -m = `(uname -m) 2>/dev/null || echo unknown`
1076uname -r = `(uname -r) 2>/dev/null || echo unknown`
1077uname -s = `(uname -s) 2>/dev/null || echo unknown`
1078uname -v = `(uname -v) 2>/dev/null || echo unknown`
1079
1080/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1081/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1082
1083/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1084/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1085/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1086hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1087/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1088/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1089/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1090
1091_ASUNAME
1092
1093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1094for as_dir in $PATH
1095do
1096 IFS=$as_save_IFS
1097 test -z "$as_dir" && as_dir=.
1098 echo "PATH: $as_dir"
1099done
1100
1101} >&5
1102
1103cat >&5 <<_ACEOF
1104
1105
1106## ----------- ##
1107## Core tests. ##
1108## ----------- ##
1109
1110_ACEOF
1111
1112
1113# Keep a trace of the command line.
1114# Strip out --no-create and --no-recursion so they do not pile up.
1115# Strip out --silent because we don't want to record it for future runs.
1116# Also quote any args containing shell meta-characters.
1117# Make two passes to allow for proper duplicate-argument suppression.
1118ac_configure_args=
1119ac_configure_args0=
1120ac_configure_args1=
1121ac_sep=
1122ac_must_keep_next=false
1123for ac_pass in 1 2
1124do
1125 for ac_arg
1126 do
1127 case $ac_arg in
1128 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1129 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1130 | -silent | --silent | --silen | --sile | --sil)
1131 continue ;;
1132 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1133 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1134 esac
1135 case $ac_pass in
1136 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1137 2)
1138 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1139 if test $ac_must_keep_next = true; then
86da66b5 1140 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1141 else
86da66b5
HPN
1142 case $ac_arg in
1143 *=* | --config-cache | -C | -disable-* | --disable-* \
1144 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1145 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1146 | -with-* | --with-* | -without-* | --without-* | --x)
1147 case "$ac_configure_args0 " in
1148 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1149 esac
1150 ;;
1151 -* ) ac_must_keep_next=true ;;
1152 esac
ba479fd2
NN
1153 fi
1154 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1155 # Get rid of the leading space.
1156 ac_sep=" "
1157 ;;
1158 esac
1159 done
1160done
1161$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1162$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1163
1164# When interrupted or exit'd, cleanup temporary files, and complete
1165# config.log. We remove comments because anyway the quotes in there
1166# would cause problems or look ugly.
1167# WARNING: Be sure not to use single quotes in there, as some shells,
1168# such as our DU 5.0 friend, will then `close' the trap.
1169trap 'exit_status=$?
1170 # Save into config.log some information that might help in debugging.
1171 {
1172 echo
1173
1174 cat <<\_ASBOX
1175## ---------------- ##
1176## Cache variables. ##
1177## ---------------- ##
1178_ASBOX
1179 echo
1180 # The following way of writing the cache mishandles newlines in values,
1181{
1182 (set) 2>&1 |
1183 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1184 *ac_space=\ *)
1185 sed -n \
86da66b5
HPN
1186 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1187 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
ba479fd2
NN
1188 ;;
1189 *)
1190 sed -n \
86da66b5 1191 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
1192 ;;
1193 esac;
1194}
1195 echo
1196
1197 cat <<\_ASBOX
1198## ----------------- ##
1199## Output variables. ##
1200## ----------------- ##
1201_ASBOX
1202 echo
1203 for ac_var in $ac_subst_vars
1204 do
1205 eval ac_val=$`echo $ac_var`
1206 echo "$ac_var='"'"'$ac_val'"'"'"
1207 done | sort
1208 echo
1209
1210 if test -n "$ac_subst_files"; then
1211 cat <<\_ASBOX
1212## ------------- ##
1213## Output files. ##
1214## ------------- ##
1215_ASBOX
1216 echo
1217 for ac_var in $ac_subst_files
1218 do
1219 eval ac_val=$`echo $ac_var`
86da66b5 1220 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1221 done | sort
1222 echo
1223 fi
1224
1225 if test -s confdefs.h; then
1226 cat <<\_ASBOX
1227## ----------- ##
1228## confdefs.h. ##
1229## ----------- ##
1230_ASBOX
1231 echo
1232 sed "/^$/d" confdefs.h | sort
1233 echo
1234 fi
1235 test "$ac_signal" != 0 &&
1236 echo "$as_me: caught signal $ac_signal"
1237 echo "$as_me: exit $exit_status"
1238 } >&5
86da66b5 1239 rm -f core *.core &&
ba479fd2
NN
1240 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1241 exit $exit_status
1242 ' 0
1243for ac_signal in 1 2 13 15; do
1244 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1245done
1246ac_signal=0
1247
1248# confdefs.h avoids OS command line length limits that DEFS can exceed.
1249rm -rf conftest* confdefs.h
1250# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1251echo >confdefs.h
1252
1253# Predefined preprocessor variables.
1254
1255cat >>confdefs.h <<_ACEOF
1256#define PACKAGE_NAME "$PACKAGE_NAME"
1257_ACEOF
1258
1259
1260cat >>confdefs.h <<_ACEOF
1261#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1262_ACEOF
1263
1264
1265cat >>confdefs.h <<_ACEOF
1266#define PACKAGE_VERSION "$PACKAGE_VERSION"
1267_ACEOF
1268
1269
1270cat >>confdefs.h <<_ACEOF
1271#define PACKAGE_STRING "$PACKAGE_STRING"
1272_ACEOF
1273
1274
1275cat >>confdefs.h <<_ACEOF
1276#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1277_ACEOF
1278
1279
1280# Let the site file select an alternate cache file if it wants to.
1281# Prefer explicitly selected file to automatically selected ones.
1282if test -z "$CONFIG_SITE"; then
1283 if test "x$prefix" != xNONE; then
1284 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1285 else
1286 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1287 fi
1288fi
1289for ac_site_file in $CONFIG_SITE; do
1290 if test -r "$ac_site_file"; then
1291 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1292echo "$as_me: loading site script $ac_site_file" >&6;}
1293 sed 's/^/| /' "$ac_site_file" >&5
1294 . "$ac_site_file"
1295 fi
1296done
1297
1298if test -r "$cache_file"; then
1299 # Some versions of bash will fail to source /dev/null (special
1300 # files actually), so we avoid doing that.
1301 if test -f "$cache_file"; then
1302 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1303echo "$as_me: loading cache $cache_file" >&6;}
1304 case $cache_file in
1305 [\\/]* | ?:[\\/]* ) . $cache_file;;
1306 *) . ./$cache_file;;
1307 esac
1308 fi
1309else
1310 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1311echo "$as_me: creating cache $cache_file" >&6;}
1312 >$cache_file
1313fi
1314
1315# Check that the precious variables saved in the cache have kept the same
1316# value.
1317ac_cache_corrupted=false
1318for ac_var in `(set) 2>&1 |
86da66b5 1319 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1320 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1321 eval ac_new_set=\$ac_env_${ac_var}_set
1322 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1323 eval ac_new_val="\$ac_env_${ac_var}_value"
1324 case $ac_old_set,$ac_new_set in
1325 set,)
1326 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1327echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1328 ac_cache_corrupted=: ;;
1329 ,set)
1330 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1331echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1332 ac_cache_corrupted=: ;;
1333 ,);;
1334 *)
1335 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1336 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1337echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1338 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1339echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1340 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1341echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1342 ac_cache_corrupted=:
ba479fd2
NN
1343 fi;;
1344 esac
1345 # Pass precious variables to config.status.
1346 if test "$ac_new_set" = set; then
1347 case $ac_new_val in
1348 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1349 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1350 *) ac_arg=$ac_var=$ac_new_val ;;
1351 esac
1352 case " $ac_configure_args " in
1353 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1354 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1355 esac
1356 fi
1357done
1358if $ac_cache_corrupted; then
1359 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1360echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1361 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1362echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1363 { (exit 1); exit 1; }; }
1364fi
1365
1366ac_ext=c
1367ac_cpp='$CPP $CPPFLAGS'
1368ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1369ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1370ac_compiler_gnu=$ac_cv_c_compiler_gnu
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
914c5af7 1390
ba479fd2
NN
1391 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1392
1393
9f18db39
PB
1394gcc_version=`cat $srcdir/BASE-VER`
1395
ba479fd2
NN
1396# Determine the host, build, and target systems
1397ac_aux_dir=
1398for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1399 if test -f $ac_dir/install-sh; then
1400 ac_aux_dir=$ac_dir
1401 ac_install_sh="$ac_aux_dir/install-sh -c"
1402 break
1403 elif test -f $ac_dir/install.sh; then
1404 ac_aux_dir=$ac_dir
1405 ac_install_sh="$ac_aux_dir/install.sh -c"
1406 break
1407 elif test -f $ac_dir/shtool; then
1408 ac_aux_dir=$ac_dir
1409 ac_install_sh="$ac_aux_dir/shtool install -c"
1410 break
1411 fi
1412done
1413if test -z "$ac_aux_dir"; then
1414 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1415echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1416 { (exit 1); exit 1; }; }
1417fi
1418ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1419ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1420ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1421
1422# Make sure we can run config.sub.
1423$ac_config_sub sun4 >/dev/null 2>&1 ||
1424 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1425echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1426 { (exit 1); exit 1; }; }
1427
1428echo "$as_me:$LINENO: checking build system type" >&5
1429echo $ECHO_N "checking build system type... $ECHO_C" >&6
1430if test "${ac_cv_build+set}" = set; then
1431 echo $ECHO_N "(cached) $ECHO_C" >&6
1432else
1433 ac_cv_build_alias=$build_alias
1434test -z "$ac_cv_build_alias" &&
1435 ac_cv_build_alias=`$ac_config_guess`
1436test -z "$ac_cv_build_alias" &&
1437 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1438echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1439 { (exit 1); exit 1; }; }
1440ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1441 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1442echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1443 { (exit 1); exit 1; }; }
1444
1445fi
1446echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1447echo "${ECHO_T}$ac_cv_build" >&6
1448build=$ac_cv_build
1449build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1450build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1451build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1452
1453
1454echo "$as_me:$LINENO: checking host system type" >&5
1455echo $ECHO_N "checking host system type... $ECHO_C" >&6
1456if test "${ac_cv_host+set}" = set; then
1457 echo $ECHO_N "(cached) $ECHO_C" >&6
1458else
1459 ac_cv_host_alias=$host_alias
1460test -z "$ac_cv_host_alias" &&
1461 ac_cv_host_alias=$ac_cv_build_alias
1462ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1463 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1464echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1465 { (exit 1); exit 1; }; }
1466
1467fi
1468echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1469echo "${ECHO_T}$ac_cv_host" >&6
1470host=$ac_cv_host
1471host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1472host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1473host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1474
1475
1476echo "$as_me:$LINENO: checking target system type" >&5
1477echo $ECHO_N "checking target system type... $ECHO_C" >&6
1478if test "${ac_cv_target+set}" = set; then
1479 echo $ECHO_N "(cached) $ECHO_C" >&6
1480else
1481 ac_cv_target_alias=$target_alias
1482test "x$ac_cv_target_alias" = "x" &&
1483 ac_cv_target_alias=$ac_cv_host_alias
1484ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1485 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1486echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1487 { (exit 1); exit 1; }; }
1488
1489fi
1490echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1491echo "${ECHO_T}$ac_cv_target" >&6
1492target=$ac_cv_target
1493target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1494target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1495target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1496
1497
1498# The aliases save the names the user supplied, while $host etc.
1499# will get canonicalized.
1500test -n "$target_alias" &&
1501 test "$program_prefix$program_suffix$program_transform_name" = \
1502 NONENONEs,x,x, &&
1503 program_prefix=${target_alias}-
1504
1505# Determine the noncanonical target name, for directory use.
1506 case ${build_alias} in
1507 "") build_noncanonical=${build} ;;
6e3f3080
NN
1508 *) build_noncanonical=${build_alias} ;;
1509esac
73458fb7 1510
4665e56c
NN
1511 case ${host_alias} in
1512 "") host_noncanonical=${build_noncanonical} ;;
1513 *) host_noncanonical=${host_alias} ;;
1514esac
73458fb7 1515
4665e56c
NN
1516 case ${target_alias} in
1517 "") target_noncanonical=${host_noncanonical} ;;
1518 *) target_noncanonical=${target_alias} ;;
1519esac
093e61a6 1520
8f1529e6
L
1521
1522
1523
1524# Determine the target- and build-specific subdirectories
4665e56c
NN
1525 # Prefix 'build-' so this never conflicts with target_subdir.
1526build_subdir="build-${build_noncanonical}"
215c351a
PB
1527# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1528if ( test $srcdir = . && test -d gcc ) \
1529 || test -d $srcdir/../host-${host_noncanonical}; then
1530 host_subdir="host-${host_noncanonical}"
1531else
1532 host_subdir=.
1533fi
4665e56c
NN
1534# No prefix.
1535target_subdir=${target_noncanonical}
ba479fd2 1536
73458fb7 1537
093e61a6 1538# Set program_transform_name
13c22933 1539test "$program_prefix" != NONE &&
ba479fd2 1540 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1541# Use a double $ so make ignores it.
1542test "$program_suffix" != NONE &&
ba479fd2
NN
1543 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1544# Double any \ or $. echo might interpret backslashes.
1545# By default was `s,x,x', remove it if useless.
1546cat <<\_ACEOF >conftest.sed
1547s/[\\$]/&&/g;s/;s,x,x,$//
1548_ACEOF
1549program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1550rm conftest.sed
13c22933
JJ
1551
1552
34a86c2b
NN
1553# Check for bogus environment variables.
1554# Test if LIBRARY_PATH contains the notation for the current directory
1555# since this would lead to problems installing/building glibc.
1556# LIBRARY_PATH contains the current directory if one of the following
1557# is true:
1558# - one of the terminals (":" and ";") is the first or last sign
1559# - two terminals occur directly after each other
1560# - the path contains an element with a dot in it
ba479fd2
NN
1561echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1562echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1563case ${LIBRARY_PATH} in
1564 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1565 library_path_setting="contains current directory"
1566 ;;
1567 *)
1568 library_path_setting="ok"
1569 ;;
1570esac
ba479fd2
NN
1571echo "$as_me:$LINENO: result: $library_path_setting" >&5
1572echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1573if test "$library_path_setting" != "ok"; then
ba479fd2 1574{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1575*** LIBRARY_PATH shouldn't contain the current directory when
1576*** building gcc. Please change the environment variable
ba479fd2
NN
1577*** and run configure again." >&5
1578echo "$as_me: error:
1579*** LIBRARY_PATH shouldn't contain the current directory when
1580*** building gcc. Please change the environment variable
1581*** and run configure again." >&2;}
1582 { (exit 1); exit 1; }; }
e9a25f70
JL
1583fi
1584
34a86c2b
NN
1585# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1586# since this would lead to problems installing/building glibc.
1587# GCC_EXEC_PREFIX contains the current directory if one of the following
1588# is true:
1589# - one of the terminals (":" and ";") is the first or last sign
1590# - two terminals occur directly after each other
1591# - the path contains an element with a dot in it
ba479fd2
NN
1592echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1593echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1594case ${GCC_EXEC_PREFIX} in
1595 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1596 gcc_exec_prefix_setting="contains current directory"
1597 ;;
1598 *)
1599 gcc_exec_prefix_setting="ok"
1600 ;;
1601esac
ba479fd2
NN
1602echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1603echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1604if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1605{ { echo "$as_me:$LINENO: error:
1606*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1607*** building gcc. Please change the environment variable
1608*** and run configure again." >&5
1609echo "$as_me: error:
cafe096b
EC
1610*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1611*** building gcc. Please change the environment variable
ba479fd2
NN
1612*** and run configure again." >&2;}
1613 { (exit 1); exit 1; }; }
34a86c2b
NN
1614fi
1615
1616# -----------
1617# Directories
1618# -----------
1619
1620# Specify the local prefix
1621local_prefix=
ba479fd2 1622
34a86c2b
NN
1623# Check whether --with-local-prefix or --without-local-prefix was given.
1624if test "${with_local_prefix+set}" = set; then
1625 withval="$with_local_prefix"
1626 case "${withval}" in
ba479fd2
NN
1627yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1628echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1629 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1630no) ;;
1631*) local_prefix=$with_local_prefix ;;
1632esac
ba479fd2 1633fi;
34a86c2b
NN
1634
1635# Default local prefix if it is empty
1636if test x$local_prefix = x; then
1637 local_prefix=/usr/local
1638fi
1639
1640# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1641# passed in by the toplevel make and thus we'd get different behavior
1642# depending on where we built the sources.
1643gcc_gxx_include_dir=
1644# Specify the g++ header file directory
ba479fd2 1645
34a86c2b
NN
1646# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1647if test "${with_gxx_include_dir+set}" = set; then
1648 withval="$with_gxx_include_dir"
1649 case "${withval}" in
ba479fd2
NN
1650yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1651echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1652 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1653no) ;;
1654*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1655esac
ba479fd2 1656fi;
34a86c2b
NN
1657
1658if test x${gcc_gxx_include_dir} = x; then
1659 if test x${enable_version_specific_runtime_libs} = xyes; then
1660 gcc_gxx_include_dir='${libsubdir}/include/c++'
1661 else
a1286ef5 1662 libstdcxx_incdir='c++/$(version)'
34a86c2b
NN
1663 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
1664 fi
1665fi
1666
ba479fd2 1667
34a86c2b
NN
1668# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1669if test "${with_cpp_install_dir+set}" = set; then
1670 withval="$with_cpp_install_dir"
1671 if test x$withval = xyes; then
ba479fd2
NN
1672 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1673echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1674 { (exit 1); exit 1; }; }
34a86c2b
NN
1675elif test x$withval != xno; then
1676 cpp_install_dir=$withval
1677fi
ba479fd2 1678fi;
34a86c2b 1679
51b9ff45 1680# We would like to our source tree to be readonly. However when releases or
ba479fd2 1681# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1682# various formats of manuals need to be included along with the rest of the
ba479fd2 1683# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1684# just that.
1685
03787dfd
KC
1686echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1687echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1688 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45
KC
1689if test "${enable_generated_files_in_srcdir+set}" = set; then
1690 enableval="$enable_generated_files_in_srcdir"
03787dfd 1691 generated_files_in_srcdir=$enableval
51b9ff45 1692else
03787dfd 1693 generated_files_in_srcdir=no
ba479fd2 1694fi;
51b9ff45 1695
03787dfd
KC
1696echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1697echo "${ECHO_T}$generated_files_in_srcdir" >&6
1698
1699if test "$generated_files_in_srcdir" = "yes"; then
1700 GENINSRC=''
03787dfd
KC
1701else
1702 GENINSRC='#'
03787dfd
KC
1703fi
1704
1705
34a86c2b
NN
1706# -------------------
1707# Find default linker
1708# -------------------
1709
1710# With GNU ld
ba479fd2 1711
34a86c2b
NN
1712# Check whether --with-gnu-ld or --without-gnu-ld was given.
1713if test "${with_gnu_ld+set}" = set; then
1714 withval="$with_gnu_ld"
1715 gnu_ld_flag="$with_gnu_ld"
1716else
1717 gnu_ld_flag=no
ba479fd2 1718fi;
6e3f3080 1719
63cf211a 1720# With pre-defined ld
ba479fd2 1721
34a86c2b
NN
1722# Check whether --with-ld or --without-ld was given.
1723if test "${with_ld+set}" = set; then
1724 withval="$with_ld"
1725 DEFAULT_LINKER="$with_ld"
ba479fd2 1726fi;
34a86c2b
NN
1727if test x"${DEFAULT_LINKER+set}" = x"set"; then
1728 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1729 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1730echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1731 { (exit 1); exit 1; }; }
34a86c2b
NN
1732 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1733 gnu_ld_flag=yes
1734 fi
ba479fd2
NN
1735
1736cat >>confdefs.h <<_ACEOF
34a86c2b 1737#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1738_ACEOF
34a86c2b
NN
1739
1740fi
1741
ba479fd2
NN
1742echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1743echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1744if test x"${DEFAULT_LINKER+set}" = x"set"; then
1745 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1746 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1747echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1748 else
ba479fd2
NN
1749 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1750echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1751 fi
1752else
ba479fd2
NN
1753 echo "$as_me:$LINENO: result: no" >&5
1754echo "${ECHO_T}no" >&6
34a86c2b
NN
1755fi
1756
d594623a
L
1757# With demangler in GNU ld
1758
1759# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
1760if test "${with_demangler_in_ld+set}" = set; then
1761 withval="$with_demangler_in_ld"
1762 demangler_in_ld="$with_demangler_in_ld"
1763else
1764 demangler_in_ld=no
1765fi;
1766
34a86c2b
NN
1767# ----------------------
1768# Find default assembler
1769# ----------------------
1770
1771# With GNU as
ba479fd2 1772
34a86c2b
NN
1773# Check whether --with-gnu-as or --without-gnu-as was given.
1774if test "${with_gnu_as+set}" = set; then
1775 withval="$with_gnu_as"
1776 gas_flag="$with_gnu_as"
1777else
1778 gas_flag=no
ba479fd2 1779fi;
34a86c2b
NN
1780
1781
1782# Check whether --with-as or --without-as was given.
1783if test "${with_as+set}" = set; then
1784 withval="$with_as"
1785 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1786fi;
34a86c2b
NN
1787if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1788 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1789 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1790echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1791 { (exit 1); exit 1; }; }
34a86c2b
NN
1792 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1793 gas_flag=yes
1794 fi
ba479fd2
NN
1795
1796cat >>confdefs.h <<_ACEOF
34a86c2b 1797#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1798_ACEOF
34a86c2b
NN
1799
1800fi
1801
ba479fd2
NN
1802echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1803echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1804if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1805 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1806 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1807echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1808 else
ba479fd2
NN
1809 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1810echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1811 fi
1812else
ba479fd2
NN
1813 echo "$as_me:$LINENO: result: no" >&5
1814echo "${ECHO_T}no" >&6
34a86c2b
NN
1815fi
1816
1817# ---------------
1818# Find C compiler
1819# ---------------
1820
426ca3ca
RO
1821# If a non-executable a.out is present (e.g. created by GNU as above even if
1822# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1823# file, even when creating an executable, so an execution test fails.
1824# Remove possible default executable files to avoid this.
1825#
1826# FIXME: This really belongs into AC_PROG_CC and can be removed once
1827# Autoconf includes it.
1828rm -f a.out a.exe b.out
1829
34a86c2b 1830# Find the native compiler
ba479fd2
NN
1831ac_ext=c
1832ac_cpp='$CPP $CPPFLAGS'
1833ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1834ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1835ac_compiler_gnu=$ac_cv_c_compiler_gnu
1836if test -n "$ac_tool_prefix"; then
1837 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1838set dummy ${ac_tool_prefix}gcc; ac_word=$2
1839echo "$as_me:$LINENO: checking for $ac_word" >&5
1840echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1841if test "${ac_cv_prog_CC+set}" = set; then
1842 echo $ECHO_N "(cached) $ECHO_C" >&6
1843else
1844 if test -n "$CC"; then
1845 ac_cv_prog_CC="$CC" # Let the user override the test.
1846else
1847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1848for as_dir in $PATH
1849do
1850 IFS=$as_save_IFS
1851 test -z "$as_dir" && as_dir=.
1852 for ac_exec_ext in '' $ac_executable_extensions; do
1853 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1854 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1855 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1856 break 2
1857 fi
1858done
1859done
1860
1861fi
1862fi
1863CC=$ac_cv_prog_CC
1864if test -n "$CC"; then
1865 echo "$as_me:$LINENO: result: $CC" >&5
1866echo "${ECHO_T}$CC" >&6
1867else
1868 echo "$as_me:$LINENO: result: no" >&5
1869echo "${ECHO_T}no" >&6
1870fi
1871
1872fi
1873if test -z "$ac_cv_prog_CC"; then
1874 ac_ct_CC=$CC
1875 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1876set dummy gcc; ac_word=$2
ba479fd2
NN
1877echo "$as_me:$LINENO: checking for $ac_word" >&5
1878echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1879if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1880 echo $ECHO_N "(cached) $ECHO_C" >&6
1881else
1882 if test -n "$ac_ct_CC"; then
1883 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1884else
1885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1886for as_dir in $PATH
1887do
1888 IFS=$as_save_IFS
1889 test -z "$as_dir" && as_dir=.
1890 for ac_exec_ext in '' $ac_executable_extensions; do
1891 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1892 ac_cv_prog_ac_ct_CC="gcc"
1893 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1894 break 2
1895 fi
1896done
1897done
1898
1899fi
1900fi
1901ac_ct_CC=$ac_cv_prog_ac_ct_CC
1902if test -n "$ac_ct_CC"; then
1903 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1904echo "${ECHO_T}$ac_ct_CC" >&6
1905else
1906 echo "$as_me:$LINENO: result: no" >&5
1907echo "${ECHO_T}no" >&6
1908fi
1909
1910 CC=$ac_ct_CC
1911else
1912 CC="$ac_cv_prog_CC"
1913fi
1914
1915if test -z "$CC"; then
1916 if test -n "$ac_tool_prefix"; then
1917 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1918set dummy ${ac_tool_prefix}cc; ac_word=$2
1919echo "$as_me:$LINENO: checking for $ac_word" >&5
1920echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1921if test "${ac_cv_prog_CC+set}" = set; then
1922 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1923else
1924 if test -n "$CC"; then
1925 ac_cv_prog_CC="$CC" # Let the user override the test.
1926else
ba479fd2
NN
1927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1928for as_dir in $PATH
1929do
1930 IFS=$as_save_IFS
1931 test -z "$as_dir" && as_dir=.
1932 for ac_exec_ext in '' $ac_executable_extensions; do
1933 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1934 ac_cv_prog_CC="${ac_tool_prefix}cc"
1935 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1936 break 2
1937 fi
1938done
1939done
1940
cd9e5e7c
MK
1941fi
1942fi
ba479fd2 1943CC=$ac_cv_prog_CC
cd9e5e7c 1944if test -n "$CC"; then
ba479fd2
NN
1945 echo "$as_me:$LINENO: result: $CC" >&5
1946echo "${ECHO_T}$CC" >&6
1947else
1948 echo "$as_me:$LINENO: result: no" >&5
1949echo "${ECHO_T}no" >&6
1950fi
1951
1952fi
1953if test -z "$ac_cv_prog_CC"; then
1954 ac_ct_CC=$CC
1955 # Extract the first word of "cc", so it can be a program name with args.
1956set dummy cc; ac_word=$2
1957echo "$as_me:$LINENO: checking for $ac_word" >&5
1958echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1959if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1960 echo $ECHO_N "(cached) $ECHO_C" >&6
1961else
1962 if test -n "$ac_ct_CC"; then
1963 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1964else
1965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1966for as_dir in $PATH
1967do
1968 IFS=$as_save_IFS
1969 test -z "$as_dir" && as_dir=.
1970 for ac_exec_ext in '' $ac_executable_extensions; do
1971 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1972 ac_cv_prog_ac_ct_CC="cc"
1973 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1974 break 2
1975 fi
1976done
1977done
1978
1979fi
1980fi
1981ac_ct_CC=$ac_cv_prog_ac_ct_CC
1982if test -n "$ac_ct_CC"; then
1983 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1984echo "${ECHO_T}$ac_ct_CC" >&6
1985else
1986 echo "$as_me:$LINENO: result: no" >&5
1987echo "${ECHO_T}no" >&6
1988fi
1989
1990 CC=$ac_ct_CC
cd9e5e7c 1991else
ba479fd2 1992 CC="$ac_cv_prog_CC"
e9a25f70 1993fi
6e3f3080 1994
ba479fd2 1995fi
6e3f3080
NN
1996if test -z "$CC"; then
1997 # Extract the first word of "cc", so it can be a program name with args.
1998set dummy cc; ac_word=$2
ba479fd2
NN
1999echo "$as_me:$LINENO: checking for $ac_word" >&5
2000echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2001if test "${ac_cv_prog_CC+set}" = set; then
2002 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2003else
2004 if test -n "$CC"; then
2005 ac_cv_prog_CC="$CC" # Let the user override the test.
2006else
2007 ac_prog_rejected=no
ba479fd2
NN
2008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2009for as_dir in $PATH
2010do
2011 IFS=$as_save_IFS
2012 test -z "$as_dir" && as_dir=.
2013 for ac_exec_ext in '' $ac_executable_extensions; do
2014 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2015 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2016 ac_prog_rejected=yes
2017 continue
2018 fi
2019 ac_cv_prog_CC="cc"
2020 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2021 break 2
2022 fi
2023done
2024done
2025
6e3f3080
NN
2026if test $ac_prog_rejected = yes; then
2027 # We found a bogon in the path, so make sure we never use it.
2028 set dummy $ac_cv_prog_CC
2029 shift
ba479fd2 2030 if test $# != 0; then
6e3f3080
NN
2031 # We chose a different compiler from the bogus one.
2032 # However, it has the same basename, so the bogon will be chosen
2033 # first if we set CC to just the basename; use the full file name.
2034 shift
ba479fd2 2035 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2036 fi
6e3f3080
NN
2037fi
2038fi
2039fi
ba479fd2 2040CC=$ac_cv_prog_CC
6e3f3080 2041if test -n "$CC"; then
ba479fd2
NN
2042 echo "$as_me:$LINENO: result: $CC" >&5
2043echo "${ECHO_T}$CC" >&6
e9a25f70 2044else
ba479fd2
NN
2045 echo "$as_me:$LINENO: result: no" >&5
2046echo "${ECHO_T}no" >&6
e9a25f70 2047fi
6e3f3080 2048
ba479fd2
NN
2049fi
2050if test -z "$CC"; then
2051 if test -n "$ac_tool_prefix"; then
2052 for ac_prog in cl
2053 do
2054 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2055set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2056echo "$as_me:$LINENO: checking for $ac_word" >&5
2057echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2058if test "${ac_cv_prog_CC+set}" = set; then
2059 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2060else
6e3f3080
NN
2061 if test -n "$CC"; then
2062 ac_cv_prog_CC="$CC" # Let the user override the test.
2063else
ba479fd2
NN
2064as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2065for as_dir in $PATH
2066do
2067 IFS=$as_save_IFS
2068 test -z "$as_dir" && as_dir=.
2069 for ac_exec_ext in '' $ac_executable_extensions; do
2070 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2071 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2072 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2073 break 2
2074 fi
2075done
2076done
2077
093e61a6 2078fi
6e3f3080 2079fi
ba479fd2 2080CC=$ac_cv_prog_CC
6e3f3080 2081if test -n "$CC"; then
ba479fd2
NN
2082 echo "$as_me:$LINENO: result: $CC" >&5
2083echo "${ECHO_T}$CC" >&6
6e3f3080 2084else
ba479fd2
NN
2085 echo "$as_me:$LINENO: result: no" >&5
2086echo "${ECHO_T}no" >&6
093e61a6 2087fi
cafe096b 2088
ba479fd2
NN
2089 test -n "$CC" && break
2090 done
2091fi
2092if test -z "$CC"; then
2093 ac_ct_CC=$CC
2094 for ac_prog in cl
2095do
2096 # Extract the first word of "$ac_prog", so it can be a program name with args.
2097set dummy $ac_prog; ac_word=$2
2098echo "$as_me:$LINENO: checking for $ac_word" >&5
2099echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2100if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2101 echo $ECHO_N "(cached) $ECHO_C" >&6
2102else
2103 if test -n "$ac_ct_CC"; then
2104 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2105else
2106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2107for as_dir in $PATH
2108do
2109 IFS=$as_save_IFS
2110 test -z "$as_dir" && as_dir=.
2111 for ac_exec_ext in '' $ac_executable_extensions; do
2112 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2113 ac_cv_prog_ac_ct_CC="$ac_prog"
2114 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2115 break 2
2116 fi
2117done
2118done
6e3f3080 2119
ba479fd2
NN
2120fi
2121fi
2122ac_ct_CC=$ac_cv_prog_ac_ct_CC
2123if test -n "$ac_ct_CC"; then
2124 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2125echo "${ECHO_T}$ac_ct_CC" >&6
2126else
2127 echo "$as_me:$LINENO: result: no" >&5
2128echo "${ECHO_T}no" >&6
2129fi
6e3f3080 2130
ba479fd2
NN
2131 test -n "$ac_ct_CC" && break
2132done
63cf211a 2133
ba479fd2
NN
2134 CC=$ac_ct_CC
2135fi
2136
2137fi
2138
2139
2140test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2141See \`config.log' for more details." >&5
2142echo "$as_me: error: no acceptable C compiler found in \$PATH
2143See \`config.log' for more details." >&2;}
2144 { (exit 1); exit 1; }; }
2145
2146# Provide some information about the compiler.
2147echo "$as_me:$LINENO:" \
2148 "checking for C compiler version" >&5
2149ac_compiler=`set X $ac_compile; echo $2`
2150{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2151 (eval $ac_compiler --version </dev/null >&5) 2>&5
2152 ac_status=$?
2153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2154 (exit $ac_status); }
2155{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2156 (eval $ac_compiler -v </dev/null >&5) 2>&5
2157 ac_status=$?
2158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2159 (exit $ac_status); }
2160{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2161 (eval $ac_compiler -V </dev/null >&5) 2>&5
2162 ac_status=$?
2163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2164 (exit $ac_status); }
2165
2166cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2167/* confdefs.h. */
2168_ACEOF
2169cat confdefs.h >>conftest.$ac_ext
2170cat >>conftest.$ac_ext <<_ACEOF
2171/* end confdefs.h. */
2172
2173int
2174main ()
2175{
63cf211a 2176
ba479fd2
NN
2177 ;
2178 return 0;
2179}
2180_ACEOF
2181ac_clean_files_save=$ac_clean_files
2182ac_clean_files="$ac_clean_files a.out a.exe b.out"
2183# Try to create an executable without -o first, disregard a.out.
2184# It will help us diagnose broken compilers, and finding out an intuition
2185# of exeext.
86da66b5
HPN
2186echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2187echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2
NN
2188ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2189if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2190 (eval $ac_link_default) 2>&5
2191 ac_status=$?
2192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2193 (exit $ac_status); }; then
2194 # Find the output, starting from the most likely. This scheme is
2195# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2196# resort.
2197
2198# Be careful to initialize this variable, since it used to be cached.
2199# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2200ac_cv_exeext=
2201# b.out is created by i960 compilers.
2202for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2203do
2204 test -f "$ac_file" || continue
2205 case $ac_file in
2206 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
86da66b5 2207 ;;
ba479fd2 2208 conftest.$ac_ext )
86da66b5
HPN
2209 # This is the source file.
2210 ;;
ba479fd2 2211 [ab].out )
86da66b5
HPN
2212 # We found the default executable, but exeext='' is most
2213 # certainly right.
2214 break;;
ba479fd2 2215 *.* )
86da66b5
HPN
2216 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2217 # FIXME: I believe we export ac_cv_exeext for Libtool,
2218 # but it would be cool to find out if it's true. Does anybody
2219 # maintain Libtool? --akim.
2220 export ac_cv_exeext
2221 break;;
ba479fd2 2222 * )
86da66b5 2223 break;;
ba479fd2
NN
2224 esac
2225done
2226else
2227 echo "$as_me: failed program was:" >&5
2228sed 's/^/| /' conftest.$ac_ext >&5
2229
2230{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2231See \`config.log' for more details." >&5
2232echo "$as_me: error: C compiler cannot create executables
2233See \`config.log' for more details." >&2;}
2234 { (exit 77); exit 77; }; }
2235fi
2236
2237ac_exeext=$ac_cv_exeext
2238echo "$as_me:$LINENO: result: $ac_file" >&5
2239echo "${ECHO_T}$ac_file" >&6
2240
2241# Check the compiler produces executables we can run. If not, either
2242# the compiler is broken, or we cross compile.
2243echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2244echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2245# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2246# If not cross compiling, check that we can run a simple program.
2247if test "$cross_compiling" != yes; then
2248 if { ac_try='./$ac_file'
2249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2250 (eval $ac_try) 2>&5
2251 ac_status=$?
2252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2253 (exit $ac_status); }; }; then
2254 cross_compiling=no
6e3f3080 2255 else
ba479fd2
NN
2256 if test "$cross_compiling" = maybe; then
2257 cross_compiling=yes
2258 else
2259 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2260If you meant to cross compile, use \`--host'.
2261See \`config.log' for more details." >&5
2262echo "$as_me: error: cannot run C compiled programs.
2263If you meant to cross compile, use \`--host'.
2264See \`config.log' for more details." >&2;}
2265 { (exit 1); exit 1; }; }
2266 fi
6e3f3080
NN
2267 fi
2268fi
ba479fd2
NN
2269echo "$as_me:$LINENO: result: yes" >&5
2270echo "${ECHO_T}yes" >&6
2271
2272rm -f a.out a.exe conftest$ac_cv_exeext b.out
2273ac_clean_files=$ac_clean_files_save
2274# Check the compiler produces executables we can run. If not, either
2275# the compiler is broken, or we cross compile.
2276echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2277echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2278echo "$as_me:$LINENO: result: $cross_compiling" >&5
2279echo "${ECHO_T}$cross_compiling" >&6
2280
2281echo "$as_me:$LINENO: checking for suffix of executables" >&5
2282echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2283if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2284 (eval $ac_link) 2>&5
2285 ac_status=$?
2286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2287 (exit $ac_status); }; then
2288 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2289# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2290# work properly (i.e., refer to `conftest.exe'), while it won't with
2291# `rm'.
2292for ac_file in conftest.exe conftest conftest.*; do
2293 test -f "$ac_file" || continue
2294 case $ac_file in
2295 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2296 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
86da66b5
HPN
2297 export ac_cv_exeext
2298 break;;
ba479fd2
NN
2299 * ) break;;
2300 esac
2301done
e9a25f70 2302else
ba479fd2
NN
2303 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2304See \`config.log' for more details." >&5
2305echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2306See \`config.log' for more details." >&2;}
2307 { (exit 1); exit 1; }; }
2308fi
2309
2310rm -f conftest$ac_cv_exeext
2311echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2312echo "${ECHO_T}$ac_cv_exeext" >&6
2313
2314rm -f conftest.$ac_ext
2315EXEEXT=$ac_cv_exeext
2316ac_exeext=$EXEEXT
2317echo "$as_me:$LINENO: checking for suffix of object files" >&5
2318echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2319if test "${ac_cv_objext+set}" = set; then
2320 echo $ECHO_N "(cached) $ECHO_C" >&6
2321else
2322 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2323/* confdefs.h. */
2324_ACEOF
2325cat confdefs.h >>conftest.$ac_ext
2326cat >>conftest.$ac_ext <<_ACEOF
2327/* end confdefs.h. */
2328
2329int
2330main ()
2331{
6e3f3080 2332
ba479fd2
NN
2333 ;
2334 return 0;
2335}
2336_ACEOF
2337rm -f conftest.o conftest.obj
2338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2339 (eval $ac_compile) 2>&5
2340 ac_status=$?
2341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2342 (exit $ac_status); }; then
2343 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2344 case $ac_file in
2345 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2346 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2347 break;;
2348 esac
2349done
63cf211a 2350else
ba479fd2
NN
2351 echo "$as_me: failed program was:" >&5
2352sed 's/^/| /' conftest.$ac_ext >&5
2353
2354{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2355See \`config.log' for more details." >&5
2356echo "$as_me: error: cannot compute suffix of object files: cannot compile
2357See \`config.log' for more details." >&2;}
2358 { (exit 1); exit 1; }; }
2359fi
2360
2361rm -f conftest.$ac_cv_objext conftest.$ac_ext
2362fi
2363echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2364echo "${ECHO_T}$ac_cv_objext" >&6
2365OBJEXT=$ac_cv_objext
2366ac_objext=$OBJEXT
2367echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2368echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2369if test "${ac_cv_c_compiler_gnu+set}" = set; then
2370 echo $ECHO_N "(cached) $ECHO_C" >&6
2371else
2372 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2373/* confdefs.h. */
2374_ACEOF
2375cat confdefs.h >>conftest.$ac_ext
2376cat >>conftest.$ac_ext <<_ACEOF
2377/* end confdefs.h. */
2378
2379int
2380main ()
2381{
2382#ifndef __GNUC__
2383 choke me
2384#endif
6e3f3080 2385
ba479fd2
NN
2386 ;
2387 return 0;
2388}
2389_ACEOF
2390rm -f conftest.$ac_objext
2391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2392 (eval $ac_compile) 2>conftest.er1
ba479fd2 2393 ac_status=$?
86da66b5
HPN
2394 grep -v '^ *+' conftest.er1 >conftest.err
2395 rm -f conftest.er1
2396 cat conftest.err >&5
ba479fd2
NN
2397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2398 (exit $ac_status); } &&
1cf0118d
RO
2399 { ac_try='test -z "$ac_c_werror_flag"
2400 || test ! -s conftest.err'
86da66b5
HPN
2401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2402 (eval $ac_try) 2>&5
2403 ac_status=$?
2404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2405 (exit $ac_status); }; } &&
2406 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2408 (eval $ac_try) 2>&5
2409 ac_status=$?
2410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2411 (exit $ac_status); }; }; then
2412 ac_compiler_gnu=yes
2413else
2414 echo "$as_me: failed program was:" >&5
2415sed 's/^/| /' conftest.$ac_ext >&5
2416
2417ac_compiler_gnu=no
2418fi
86da66b5 2419rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2420ac_cv_c_compiler_gnu=$ac_compiler_gnu
2421
2422fi
2423echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2424echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2425GCC=`test $ac_compiler_gnu = yes && echo yes`
2426ac_test_CFLAGS=${CFLAGS+set}
2427ac_save_CFLAGS=$CFLAGS
2428CFLAGS="-g"
2429echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2430echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2431if test "${ac_cv_prog_cc_g+set}" = set; then
2432 echo $ECHO_N "(cached) $ECHO_C" >&6
2433else
2434 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2435/* confdefs.h. */
2436_ACEOF
2437cat confdefs.h >>conftest.$ac_ext
2438cat >>conftest.$ac_ext <<_ACEOF
2439/* end confdefs.h. */
2440
2441int
2442main ()
2443{
2444
2445 ;
2446 return 0;
2447}
2448_ACEOF
2449rm -f conftest.$ac_objext
2450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2451 (eval $ac_compile) 2>conftest.er1
ba479fd2 2452 ac_status=$?
86da66b5
HPN
2453 grep -v '^ *+' conftest.er1 >conftest.err
2454 rm -f conftest.er1
2455 cat conftest.err >&5
ba479fd2
NN
2456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2457 (exit $ac_status); } &&
1cf0118d
RO
2458 { ac_try='test -z "$ac_c_werror_flag"
2459 || test ! -s conftest.err'
86da66b5
HPN
2460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2461 (eval $ac_try) 2>&5
2462 ac_status=$?
2463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2464 (exit $ac_status); }; } &&
2465 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2467 (eval $ac_try) 2>&5
2468 ac_status=$?
2469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2470 (exit $ac_status); }; }; then
6e3f3080
NN
2471 ac_cv_prog_cc_g=yes
2472else
ba479fd2
NN
2473 echo "$as_me: failed program was:" >&5
2474sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2475
ba479fd2 2476ac_cv_prog_cc_g=no
6e3f3080 2477fi
86da66b5 2478rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2479fi
2480echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2481echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2482if test "$ac_test_CFLAGS" = set; then
ba479fd2 2483 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2484elif test $ac_cv_prog_cc_g = yes; then
2485 if test "$GCC" = yes; then
e9a25f70
JL
2486 CFLAGS="-g -O2"
2487 else
cd9e5e7c 2488 CFLAGS="-g"
81814e35 2489 fi
3723cad9 2490else
cd9e5e7c
MK
2491 if test "$GCC" = yes; then
2492 CFLAGS="-O2"
2493 else
2494 CFLAGS=
2495 fi
e9a25f70 2496fi
ba479fd2
NN
2497echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2498echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2499if test "${ac_cv_prog_cc_stdc+set}" = set; then
2500 echo $ECHO_N "(cached) $ECHO_C" >&6
2501else
2502 ac_cv_prog_cc_stdc=no
2503ac_save_CC=$CC
2504cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2505/* confdefs.h. */
2506_ACEOF
2507cat confdefs.h >>conftest.$ac_ext
2508cat >>conftest.$ac_ext <<_ACEOF
2509/* end confdefs.h. */
2510#include <stdarg.h>
2511#include <stdio.h>
2512#include <sys/types.h>
2513#include <sys/stat.h>
2514/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2515struct buf { int x; };
2516FILE * (*rcsopen) (struct buf *, struct stat *, int);
2517static char *e (p, i)
2518 char **p;
2519 int i;
2520{
2521 return p[i];
2522}
2523static char *f (char * (*g) (char **, int), char **p, ...)
2524{
2525 char *s;
2526 va_list v;
2527 va_start (v,p);
2528 s = g (p, va_arg (v,int));
2529 va_end (v);
2530 return s;
2531}
86da66b5
HPN
2532
2533/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2534 function prototypes and stuff, but not '\xHH' hex character constants.
2535 These don't provoke an error unfortunately, instead are silently treated
2536 as 'x'. The following induces an error, until -std1 is added to get
2537 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2538 array size at least. It's necessary to write '\x00'==0 to get something
2539 that's true only with -std1. */
2540int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2541
ba479fd2
NN
2542int test (int i, double x);
2543struct s1 {int (*f) (int a);};
2544struct s2 {int (*f) (double a);};
2545int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2546int argc;
2547char **argv;
2548int
2549main ()
2550{
2551return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2552 ;
2553 return 0;
2554}
2555_ACEOF
2556# Don't try gcc -ansi; that turns off useful extensions and
2557# breaks some systems' header files.
2558# AIX -qlanglvl=ansi
2559# Ultrix and OSF/1 -std1
2560# HP-UX 10.20 and later -Ae
2561# HP-UX older versions -Aa -D_HPUX_SOURCE
2562# SVR4 -Xc -D__EXTENSIONS__
2563for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2564do
2565 CC="$ac_save_CC $ac_arg"
2566 rm -f conftest.$ac_objext
2567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2568 (eval $ac_compile) 2>conftest.er1
ba479fd2 2569 ac_status=$?
86da66b5
HPN
2570 grep -v '^ *+' conftest.er1 >conftest.err
2571 rm -f conftest.er1
2572 cat conftest.err >&5
ba479fd2
NN
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); } &&
1cf0118d
RO
2575 { ac_try='test -z "$ac_c_werror_flag"
2576 || test ! -s conftest.err'
86da66b5
HPN
2577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2578 (eval $ac_try) 2>&5
2579 ac_status=$?
2580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2581 (exit $ac_status); }; } &&
2582 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2584 (eval $ac_try) 2>&5
2585 ac_status=$?
2586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2587 (exit $ac_status); }; }; then
2588 ac_cv_prog_cc_stdc=$ac_arg
2589break
2590else
2591 echo "$as_me: failed program was:" >&5
2592sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2593
ba479fd2 2594fi
86da66b5 2595rm -f conftest.err conftest.$ac_objext
ba479fd2
NN
2596done
2597rm -f conftest.$ac_ext conftest.$ac_objext
2598CC=$ac_save_CC
2599
2600fi
2601
2602case "x$ac_cv_prog_cc_stdc" in
2603 x|xno)
2604 echo "$as_me:$LINENO: result: none needed" >&5
2605echo "${ECHO_T}none needed" >&6 ;;
2606 *)
2607 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2608echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2609 CC="$CC $ac_cv_prog_cc_stdc" ;;
2610esac
2611
2612# Some people use a C++ compiler to compile C. Since we use `exit',
2613# in C++ we need to declare it. In case someone uses the same compiler
2614# for both compiling C and C++ we need to have the C++ compiler decide
2615# the declaration of exit, since it's the most demanding environment.
2616cat >conftest.$ac_ext <<_ACEOF
2617#ifndef __cplusplus
2618 choke me
2619#endif
2620_ACEOF
2621rm -f conftest.$ac_objext
2622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2623 (eval $ac_compile) 2>conftest.er1
ba479fd2 2624 ac_status=$?
86da66b5
HPN
2625 grep -v '^ *+' conftest.er1 >conftest.err
2626 rm -f conftest.er1
2627 cat conftest.err >&5
ba479fd2
NN
2628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2629 (exit $ac_status); } &&
1cf0118d
RO
2630 { ac_try='test -z "$ac_c_werror_flag"
2631 || test ! -s conftest.err'
86da66b5
HPN
2632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2633 (eval $ac_try) 2>&5
2634 ac_status=$?
2635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2636 (exit $ac_status); }; } &&
2637 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2639 (eval $ac_try) 2>&5
2640 ac_status=$?
2641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2642 (exit $ac_status); }; }; then
2643 for ac_declaration in \
86da66b5 2644 '' \
ba479fd2
NN
2645 'extern "C" void std::exit (int) throw (); using std::exit;' \
2646 'extern "C" void std::exit (int); using std::exit;' \
2647 'extern "C" void exit (int) throw ();' \
2648 'extern "C" void exit (int);' \
2649 'void exit (int);'
2650do
2651 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2652/* confdefs.h. */
2653_ACEOF
2654cat confdefs.h >>conftest.$ac_ext
2655cat >>conftest.$ac_ext <<_ACEOF
2656/* end confdefs.h. */
33e70558 2657$ac_declaration
86da66b5 2658#include <stdlib.h>
ba479fd2
NN
2659int
2660main ()
2661{
2662exit (42);
2663 ;
2664 return 0;
2665}
2666_ACEOF
2667rm -f conftest.$ac_objext
2668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2669 (eval $ac_compile) 2>conftest.er1
ba479fd2 2670 ac_status=$?
86da66b5
HPN
2671 grep -v '^ *+' conftest.er1 >conftest.err
2672 rm -f conftest.er1
2673 cat conftest.err >&5
ba479fd2
NN
2674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2675 (exit $ac_status); } &&
1cf0118d
RO
2676 { ac_try='test -z "$ac_c_werror_flag"
2677 || test ! -s conftest.err'
86da66b5
HPN
2678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2679 (eval $ac_try) 2>&5
2680 ac_status=$?
2681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2682 (exit $ac_status); }; } &&
2683 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2685 (eval $ac_try) 2>&5
2686 ac_status=$?
2687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2688 (exit $ac_status); }; }; then
2689 :
2690else
2691 echo "$as_me: failed program was:" >&5
2692sed 's/^/| /' conftest.$ac_ext >&5
2693
2694continue
2695fi
86da66b5 2696rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 2697 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2698/* confdefs.h. */
2699_ACEOF
2700cat confdefs.h >>conftest.$ac_ext
2701cat >>conftest.$ac_ext <<_ACEOF
2702/* end confdefs.h. */
2703$ac_declaration
2704int
2705main ()
2706{
2707exit (42);
2708 ;
2709 return 0;
2710}
2711_ACEOF
2712rm -f conftest.$ac_objext
2713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2714 (eval $ac_compile) 2>conftest.er1
ba479fd2 2715 ac_status=$?
86da66b5
HPN
2716 grep -v '^ *+' conftest.er1 >conftest.err
2717 rm -f conftest.er1
2718 cat conftest.err >&5
ba479fd2
NN
2719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2720 (exit $ac_status); } &&
1cf0118d
RO
2721 { ac_try='test -z "$ac_c_werror_flag"
2722 || test ! -s conftest.err'
86da66b5
HPN
2723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2724 (eval $ac_try) 2>&5
2725 ac_status=$?
2726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2727 (exit $ac_status); }; } &&
2728 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2730 (eval $ac_try) 2>&5
2731 ac_status=$?
2732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2733 (exit $ac_status); }; }; then
2734 break
3ec83fc2 2735else
ba479fd2
NN
2736 echo "$as_me: failed program was:" >&5
2737sed 's/^/| /' conftest.$ac_ext >&5
2738
6e3f3080 2739fi
86da66b5 2740rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2741done
2742rm -f conftest*
2743if test -n "$ac_declaration"; then
2744 echo '#ifdef __cplusplus' >>confdefs.h
2745 echo $ac_declaration >>confdefs.h
2746 echo '#endif' >>confdefs.h
2747fi
2748
3ec83fc2 2749else
ba479fd2
NN
2750 echo "$as_me: failed program was:" >&5
2751sed 's/^/| /' conftest.$ac_ext >&5
2752
2753fi
86da66b5 2754rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2755ac_ext=c
2756ac_cpp='$CPP $CPPFLAGS'
2757ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2758ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2759ac_compiler_gnu=$ac_cv_c_compiler_gnu
2760
2761if test "x$CC" != xcc; then
2762 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2763echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2764else
2765 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2766echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2767fi
2768set dummy $CC; ac_cc=`echo $2 |
2769 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2770if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2771 echo $ECHO_N "(cached) $ECHO_C" >&6
2772else
2773 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2774/* confdefs.h. */
2775_ACEOF
2776cat confdefs.h >>conftest.$ac_ext
2777cat >>conftest.$ac_ext <<_ACEOF
2778/* end confdefs.h. */
2779
2780int
2781main ()
2782{
2783
2784 ;
2785 return 0;
2786}
2787_ACEOF
3ec83fc2
RH
2788# Make sure it works both with $CC and with simple cc.
2789# We do the test twice because some compilers refuse to overwrite an
2790# existing .o file with -o, though they will create one.
ba479fd2
NN
2791ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2792if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2793 (eval $ac_try) 2>&5
2794 ac_status=$?
2795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2796 (exit $ac_status); } &&
2797 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2798 (eval $ac_try) 2>&5
2799 ac_status=$?
2800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2801 (exit $ac_status); };
3ec83fc2
RH
2802then
2803 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2804 if test "x$CC" != xcc; then
2805 # Test first that cc exists at all.
ba479fd2
NN
2806 if { ac_try='cc -c conftest.$ac_ext >&5'
2807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2808 (eval $ac_try) 2>&5
2809 ac_status=$?
2810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2811 (exit $ac_status); }; }; then
2812 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2813 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2814 (eval $ac_try) 2>&5
2815 ac_status=$?
2816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2817 (exit $ac_status); } &&
2818 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2819 (eval $ac_try) 2>&5
2820 ac_status=$?
2821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2822 (exit $ac_status); };
3ec83fc2 2823 then
86da66b5
HPN
2824 # cc works too.
2825 :
3ec83fc2 2826 else
86da66b5
HPN
2827 # cc exists but doesn't like -o.
2828 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2829 fi
2830 fi
2831 fi
2832else
2833 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2834fi
2835rm -f conftest*
2836
2837fi
2838if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2839 echo "$as_me:$LINENO: result: yes" >&5
2840echo "${ECHO_T}yes" >&6
3ec83fc2 2841else
ba479fd2
NN
2842 echo "$as_me:$LINENO: result: no" >&5
2843echo "${ECHO_T}no" >&6
2844
2845cat >>confdefs.h <<\_ACEOF
3ec83fc2 2846#define NO_MINUS_C_MINUS_O 1
ba479fd2 2847_ACEOF
3ec83fc2
RH
2848
2849fi
2850
3b620440
KC
2851# expand $ac_aux_dir to an absolute path
2852am_aux_dir=`cd $ac_aux_dir && pwd`
2853
2854# FIXME: we rely on the cache variable name because
2855# there is no other way.
2856set dummy $CC
2857ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2858if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2859 # Losing compiler, so override with the script.
2860 # FIXME: It is wrong to rewrite CC.
2861 # But if we don't then we get into trouble of one sort or another.
2862 # A longer-term fix would be to have automake use am__CC in this case,
2863 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2864 CC="$am_aux_dir/compile $CC"
2865fi
2866
414d23ae
HPN
2867# autoconf is lame and doesn't give us any substitution variable for this.
2868if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2869 NO_MINUS_C_MINUS_O=yes
2870else
2871 OUTPUT_OPTION='-o $@'
2872fi
2873
2874
2875
73458fb7
NN
2876# -------------------------
2877# Check C compiler features
2878# -------------------------
2879
ba479fd2
NN
2880ac_ext=c
2881ac_cpp='$CPP $CPPFLAGS'
2882ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2883ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2884ac_compiler_gnu=$ac_cv_c_compiler_gnu
2885echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2886echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2887# On Suns, sometimes $CPP names a directory.
2888if test -n "$CPP" && test -d "$CPP"; then
2889 CPP=
2890fi
2891if test -z "$CPP"; then
ba479fd2
NN
2892 if test "${ac_cv_prog_CPP+set}" = set; then
2893 echo $ECHO_N "(cached) $ECHO_C" >&6
2894else
2895 # Double quotes because CPP needs to be expanded
2896 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2897 do
2898 ac_preproc_ok=false
2899for ac_c_preproc_warn_flag in '' yes
2900do
2901 # Use a header file that comes with gcc, so configuring glibc
2902 # with a fresh cross-compiler works.
2903 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2904 # <limits.h> exists even on freestanding compilers.
84c041a1 2905 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2906 # not just through cpp. "Syntax error" is here to catch this case.
2907 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2908/* confdefs.h. */
2909_ACEOF
2910cat confdefs.h >>conftest.$ac_ext
2911cat >>conftest.$ac_ext <<_ACEOF
2912/* end confdefs.h. */
2913#ifdef __STDC__
2914# include <limits.h>
2915#else
2916# include <assert.h>
2917#endif
86da66b5 2918 Syntax error
ba479fd2
NN
2919_ACEOF
2920if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2921 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2922 ac_status=$?
2923 grep -v '^ *+' conftest.er1 >conftest.err
2924 rm -f conftest.er1
2925 cat conftest.err >&5
2926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2927 (exit $ac_status); } >/dev/null; then
2928 if test -s conftest.err; then
2929 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2930 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2931 else
2932 ac_cpp_err=
2933 fi
2934else
2935 ac_cpp_err=yes
2936fi
2937if test -z "$ac_cpp_err"; then
093e61a6 2938 :
cafe096b 2939else
ba479fd2
NN
2940 echo "$as_me: failed program was:" >&5
2941sed 's/^/| /' conftest.$ac_ext >&5
2942
2943 # Broken: fails on valid input.
2944continue
2945fi
2946rm -f conftest.err conftest.$ac_ext
2947
2948 # OK, works on sane cases. Now check whether non-existent headers
2949 # can be detected and how.
2950 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2951/* confdefs.h. */
2952_ACEOF
2953cat confdefs.h >>conftest.$ac_ext
2954cat >>conftest.$ac_ext <<_ACEOF
2955/* end confdefs.h. */
2956#include <ac_nonexistent.h>
2957_ACEOF
2958if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2959 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2960 ac_status=$?
2961 grep -v '^ *+' conftest.er1 >conftest.err
2962 rm -f conftest.er1
2963 cat conftest.err >&5
2964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2965 (exit $ac_status); } >/dev/null; then
2966 if test -s conftest.err; then
2967 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2968 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2969 else
2970 ac_cpp_err=
2971 fi
2972else
2973 ac_cpp_err=yes
2974fi
2975if test -z "$ac_cpp_err"; then
2976 # Broken: success on invalid input.
2977continue
2978else
2979 echo "$as_me: failed program was:" >&5
2980sed 's/^/| /' conftest.$ac_ext >&5
2981
2982 # Passes both tests.
2983ac_preproc_ok=:
2984break
2985fi
2986rm -f conftest.err conftest.$ac_ext
2987
2988done
2989# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2990rm -f conftest.err conftest.$ac_ext
2991if $ac_preproc_ok; then
2992 break
2993fi
2994
2995 done
2996 ac_cv_prog_CPP=$CPP
2997
2998fi
2999 CPP=$ac_cv_prog_CPP
3000else
3001 ac_cv_prog_CPP=$CPP
3002fi
3003echo "$as_me:$LINENO: result: $CPP" >&5
3004echo "${ECHO_T}$CPP" >&6
3005ac_preproc_ok=false
3006for ac_c_preproc_warn_flag in '' yes
3007do
3008 # Use a header file that comes with gcc, so configuring glibc
3009 # with a fresh cross-compiler works.
3010 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3011 # <limits.h> exists even on freestanding compilers.
3012 # On the NeXT, cc -E runs the code through the compiler's parser,
3013 # not just through cpp. "Syntax error" is here to catch this case.
3014 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3015/* confdefs.h. */
3016_ACEOF
3017cat confdefs.h >>conftest.$ac_ext
3018cat >>conftest.$ac_ext <<_ACEOF
3019/* end confdefs.h. */
3020#ifdef __STDC__
3021# include <limits.h>
3022#else
3023# include <assert.h>
3024#endif
86da66b5 3025 Syntax error
ba479fd2
NN
3026_ACEOF
3027if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3028 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3029 ac_status=$?
3030 grep -v '^ *+' conftest.er1 >conftest.err
3031 rm -f conftest.er1
3032 cat conftest.err >&5
3033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3034 (exit $ac_status); } >/dev/null; then
3035 if test -s conftest.err; then
3036 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3037 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3038 else
3039 ac_cpp_err=
3040 fi
3041else
3042 ac_cpp_err=yes
3043fi
3044if test -z "$ac_cpp_err"; then
6e3f3080 3045 :
414d23ae 3046else
ba479fd2
NN
3047 echo "$as_me: failed program was:" >&5
3048sed 's/^/| /' conftest.$ac_ext >&5
3049
3050 # Broken: fails on valid input.
3051continue
3052fi
3053rm -f conftest.err conftest.$ac_ext
3054
3055 # OK, works on sane cases. Now check whether non-existent headers
3056 # can be detected and how.
3057 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3058/* confdefs.h. */
3059_ACEOF
3060cat confdefs.h >>conftest.$ac_ext
3061cat >>conftest.$ac_ext <<_ACEOF
3062/* end confdefs.h. */
3063#include <ac_nonexistent.h>
3064_ACEOF
3065if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3066 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3067 ac_status=$?
3068 grep -v '^ *+' conftest.er1 >conftest.err
3069 rm -f conftest.er1
3070 cat conftest.err >&5
3071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3072 (exit $ac_status); } >/dev/null; then
3073 if test -s conftest.err; then
3074 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3075 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3076 else
3077 ac_cpp_err=
3078 fi
6e3f3080 3079else
ba479fd2 3080 ac_cpp_err=yes
63cf211a 3081fi
ba479fd2
NN
3082if test -z "$ac_cpp_err"; then
3083 # Broken: success on invalid input.
3084continue
3085else
3086 echo "$as_me: failed program was:" >&5
3087sed 's/^/| /' conftest.$ac_ext >&5
3088
3089 # Passes both tests.
3090ac_preproc_ok=:
3091break
63cf211a 3092fi
ba479fd2
NN
3093rm -f conftest.err conftest.$ac_ext
3094
3095done
3096# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3097rm -f conftest.err conftest.$ac_ext
3098if $ac_preproc_ok; then
3099 :
6e3f3080 3100else
ba479fd2
NN
3101 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3102See \`config.log' for more details." >&5
3103echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3104See \`config.log' for more details." >&2;}
3105 { (exit 1); exit 1; }; }
6e3f3080
NN
3106fi
3107
ba479fd2
NN
3108ac_ext=c
3109ac_cpp='$CPP $CPPFLAGS'
3110ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3111ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3112ac_compiler_gnu=$ac_cv_c_compiler_gnu
3113
b5472e1d 3114
ba479fd2
NN
3115echo "$as_me:$LINENO: checking for inline" >&5
3116echo $ECHO_N "checking for inline... $ECHO_C" >&6
3117if test "${ac_cv_c_inline+set}" = set; then
3118 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3119else
3120 ac_cv_c_inline=no
3121for ac_kw in inline __inline__ __inline; do
ba479fd2 3122 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3123/* confdefs.h. */
3124_ACEOF
3125cat confdefs.h >>conftest.$ac_ext
3126cat >>conftest.$ac_ext <<_ACEOF
3127/* end confdefs.h. */
3128#ifndef __cplusplus
3129typedef int foo_t;
3130static $ac_kw foo_t static_foo () {return 0; }
3131$ac_kw foo_t foo () {return 0; }
3132#endif
414d23ae 3133
ba479fd2
NN
3134_ACEOF
3135rm -f conftest.$ac_objext
3136if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3137 (eval $ac_compile) 2>conftest.er1
ba479fd2 3138 ac_status=$?
86da66b5
HPN
3139 grep -v '^ *+' conftest.er1 >conftest.err
3140 rm -f conftest.er1
3141 cat conftest.err >&5
ba479fd2
NN
3142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3143 (exit $ac_status); } &&
1cf0118d
RO
3144 { ac_try='test -z "$ac_c_werror_flag"
3145 || test ! -s conftest.err'
86da66b5
HPN
3146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3147 (eval $ac_try) 2>&5
3148 ac_status=$?
3149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3150 (exit $ac_status); }; } &&
3151 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3153 (eval $ac_try) 2>&5
3154 ac_status=$?
3155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3156 (exit $ac_status); }; }; then
414d23ae
HPN
3157 ac_cv_c_inline=$ac_kw; break
3158else
ba479fd2
NN
3159 echo "$as_me: failed program was:" >&5
3160sed 's/^/| /' conftest.$ac_ext >&5
3161
414d23ae 3162fi
86da66b5 3163rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3164done
3165
3166fi
ba479fd2
NN
3167echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3168echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3169
3170
ba479fd2 3171case $ac_cv_c_inline in
414d23ae 3172 inline | yes) ;;
86da66b5
HPN
3173 *)
3174 case $ac_cv_c_inline in
3175 no) ac_val=;;
3176 *) ac_val=$ac_cv_c_inline;;
3177 esac
3178 cat >>confdefs.h <<_ACEOF
3179#ifndef __cplusplus
3180#define inline $ac_val
3181#endif
ba479fd2 3182_ACEOF
86da66b5 3183 ;;
414d23ae
HPN
3184esac
3185
414d23ae 3186
414d23ae 3187# sizeof(char) is 1 by definition.
bf3b7cd3
JD
3188
3189echo "$as_me:$LINENO: checking for egrep" >&5
3190echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3191if test "${ac_cv_prog_egrep+set}" = set; then
3192 echo $ECHO_N "(cached) $ECHO_C" >&6
3193else
3194 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3195 then ac_cv_prog_egrep='grep -E'
3196 else ac_cv_prog_egrep='egrep'
3197 fi
3198fi
3199echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3200echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3201 EGREP=$ac_cv_prog_egrep
3202
3203
3204echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3205echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3206if test "${ac_cv_header_stdc+set}" = set; then
3207 echo $ECHO_N "(cached) $ECHO_C" >&6
3208else
3209 cat >conftest.$ac_ext <<_ACEOF
3210/* confdefs.h. */
3211_ACEOF
3212cat confdefs.h >>conftest.$ac_ext
3213cat >>conftest.$ac_ext <<_ACEOF
3214/* end confdefs.h. */
3215#include <stdlib.h>
3216#include <stdarg.h>
3217#include <string.h>
3218#include <float.h>
3219
3220int
3221main ()
3222{
3223
3224 ;
3225 return 0;
3226}
3227_ACEOF
3228rm -f conftest.$ac_objext
3229if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3230 (eval $ac_compile) 2>conftest.er1
3231 ac_status=$?
3232 grep -v '^ *+' conftest.er1 >conftest.err
3233 rm -f conftest.er1
3234 cat conftest.err >&5
3235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3236 (exit $ac_status); } &&
1cf0118d
RO
3237 { ac_try='test -z "$ac_c_werror_flag"
3238 || test ! -s conftest.err'
bf3b7cd3
JD
3239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3240 (eval $ac_try) 2>&5
3241 ac_status=$?
3242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3243 (exit $ac_status); }; } &&
3244 { ac_try='test -s conftest.$ac_objext'
3245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3246 (eval $ac_try) 2>&5
3247 ac_status=$?
3248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3249 (exit $ac_status); }; }; then
3250 ac_cv_header_stdc=yes
3251else
3252 echo "$as_me: failed program was:" >&5
3253sed 's/^/| /' conftest.$ac_ext >&5
3254
3255ac_cv_header_stdc=no
3256fi
3257rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3258
3259if test $ac_cv_header_stdc = yes; then
3260 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3261 cat >conftest.$ac_ext <<_ACEOF
3262/* confdefs.h. */
3263_ACEOF
3264cat confdefs.h >>conftest.$ac_ext
3265cat >>conftest.$ac_ext <<_ACEOF
3266/* end confdefs.h. */
3267#include <string.h>
3268
3269_ACEOF
3270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3271 $EGREP "memchr" >/dev/null 2>&1; then
3272 :
3273else
3274 ac_cv_header_stdc=no
3275fi
3276rm -f conftest*
3277
3278fi
3279
3280if test $ac_cv_header_stdc = yes; then
3281 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3282 cat >conftest.$ac_ext <<_ACEOF
3283/* confdefs.h. */
3284_ACEOF
3285cat confdefs.h >>conftest.$ac_ext
3286cat >>conftest.$ac_ext <<_ACEOF
3287/* end confdefs.h. */
3288#include <stdlib.h>
3289
3290_ACEOF
3291if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3292 $EGREP "free" >/dev/null 2>&1; then
3293 :
3294else
3295 ac_cv_header_stdc=no
3296fi
3297rm -f conftest*
3298
3299fi
3300
3301if test $ac_cv_header_stdc = yes; then
3302 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3303 if test "$cross_compiling" = yes; then
3304 :
3305else
3306 cat >conftest.$ac_ext <<_ACEOF
3307/* confdefs.h. */
3308_ACEOF
3309cat confdefs.h >>conftest.$ac_ext
3310cat >>conftest.$ac_ext <<_ACEOF
3311/* end confdefs.h. */
3312#include <ctype.h>
3313#if ((' ' & 0x0FF) == 0x020)
3314# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3315# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3316#else
3317# define ISLOWER(c) \
3318 (('a' <= (c) && (c) <= 'i') \
3319 || ('j' <= (c) && (c) <= 'r') \
3320 || ('s' <= (c) && (c) <= 'z'))
3321# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3322#endif
3323
3324#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3325int
3326main ()
3327{
3328 int i;
3329 for (i = 0; i < 256; i++)
3330 if (XOR (islower (i), ISLOWER (i))
3331 || toupper (i) != TOUPPER (i))
3332 exit(2);
3333 exit (0);
3334}
3335_ACEOF
3336rm -f conftest$ac_exeext
3337if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3338 (eval $ac_link) 2>&5
3339 ac_status=$?
3340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3341 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3343 (eval $ac_try) 2>&5
3344 ac_status=$?
3345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3346 (exit $ac_status); }; }; then
3347 :
3348else
3349 echo "$as_me: program exited with status $ac_status" >&5
3350echo "$as_me: failed program was:" >&5
3351sed 's/^/| /' conftest.$ac_ext >&5
3352
3353( exit $ac_status )
3354ac_cv_header_stdc=no
3355fi
3356rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3357fi
3358fi
3359fi
3360echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3361echo "${ECHO_T}$ac_cv_header_stdc" >&6
3362if test $ac_cv_header_stdc = yes; then
3363
3364cat >>confdefs.h <<\_ACEOF
3365#define STDC_HEADERS 1
3366_ACEOF
3367
3368fi
3369
3370# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3381 inttypes.h stdint.h unistd.h
3382do
3383as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3384echo "$as_me:$LINENO: checking for $ac_header" >&5
3385echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3386if eval "test \"\${$as_ac_Header+set}\" = set"; then
3387 echo $ECHO_N "(cached) $ECHO_C" >&6
3388else
3389 cat >conftest.$ac_ext <<_ACEOF
3390/* confdefs.h. */
3391_ACEOF
3392cat confdefs.h >>conftest.$ac_ext
3393cat >>conftest.$ac_ext <<_ACEOF
3394/* end confdefs.h. */
3395$ac_includes_default
3396
3397#include <$ac_header>
3398_ACEOF
3399rm -f conftest.$ac_objext
3400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3401 (eval $ac_compile) 2>conftest.er1
3402 ac_status=$?
3403 grep -v '^ *+' conftest.er1 >conftest.err
3404 rm -f conftest.er1
3405 cat conftest.err >&5
3406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3407 (exit $ac_status); } &&
1cf0118d
RO
3408 { ac_try='test -z "$ac_c_werror_flag"
3409 || test ! -s conftest.err'
bf3b7cd3
JD
3410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3411 (eval $ac_try) 2>&5
3412 ac_status=$?
3413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3414 (exit $ac_status); }; } &&
3415 { ac_try='test -s conftest.$ac_objext'
3416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3417 (eval $ac_try) 2>&5
3418 ac_status=$?
3419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3420 (exit $ac_status); }; }; then
3421 eval "$as_ac_Header=yes"
3422else
3423 echo "$as_me: failed program was:" >&5
3424sed 's/^/| /' conftest.$ac_ext >&5
3425
3426eval "$as_ac_Header=no"
3427fi
3428rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3429fi
3430echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3431echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3432if test `eval echo '${'$as_ac_Header'}'` = yes; then
3433 cat >>confdefs.h <<_ACEOF
3434#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3435_ACEOF
3436
3437fi
3438
3439done
3440
3441
3442echo "$as_me:$LINENO: checking for void *" >&5
3443echo $ECHO_N "checking for void *... $ECHO_C" >&6
3444if test "${ac_cv_type_void_p+set}" = set; then
3445 echo $ECHO_N "(cached) $ECHO_C" >&6
3446else
3447 cat >conftest.$ac_ext <<_ACEOF
3448/* confdefs.h. */
3449_ACEOF
3450cat confdefs.h >>conftest.$ac_ext
3451cat >>conftest.$ac_ext <<_ACEOF
3452/* end confdefs.h. */
3453$ac_includes_default
3454int
3455main ()
3456{
3457if ((void * *) 0)
3458 return 0;
3459if (sizeof (void *))
3460 return 0;
3461 ;
3462 return 0;
3463}
3464_ACEOF
3465rm -f conftest.$ac_objext
3466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3467 (eval $ac_compile) 2>conftest.er1
3468 ac_status=$?
3469 grep -v '^ *+' conftest.er1 >conftest.err
3470 rm -f conftest.er1
3471 cat conftest.err >&5
3472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3473 (exit $ac_status); } &&
1cf0118d
RO
3474 { ac_try='test -z "$ac_c_werror_flag"
3475 || test ! -s conftest.err'
bf3b7cd3
JD
3476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3477 (eval $ac_try) 2>&5
3478 ac_status=$?
3479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3480 (exit $ac_status); }; } &&
3481 { ac_try='test -s conftest.$ac_objext'
3482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3483 (eval $ac_try) 2>&5
3484 ac_status=$?
3485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3486 (exit $ac_status); }; }; then
3487 ac_cv_type_void_p=yes
3488else
3489 echo "$as_me: failed program was:" >&5
3490sed 's/^/| /' conftest.$ac_ext >&5
3491
3492ac_cv_type_void_p=no
3493fi
3494rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3495fi
3496echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3497echo "${ECHO_T}$ac_cv_type_void_p" >&6
3498
ba479fd2
NN
3499echo "$as_me:$LINENO: checking size of void *" >&5
3500echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3501if test "${ac_cv_sizeof_void_p+set}" = set; then
3502 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 3503else
bf3b7cd3
JD
3504 if test "$ac_cv_type_void_p" = yes; then
3505 # The cast to unsigned long works around a bug in the HP C Compiler
3506 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3507 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3508 # This bug is HP SR number 8606223364.
3509 if test "$cross_compiling" = yes; then
3510 # Depending upon the size, compute the lo and hi bounds.
3511cat >conftest.$ac_ext <<_ACEOF
3512/* confdefs.h. */
3513_ACEOF
3514cat confdefs.h >>conftest.$ac_ext
3515cat >>conftest.$ac_ext <<_ACEOF
3516/* end confdefs.h. */
3517$ac_includes_default
3518int
3519main ()
3520{
3521static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
3522test_array [0] = 0
3523
3524 ;
3525 return 0;
3526}
3527_ACEOF
3528rm -f conftest.$ac_objext
3529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3530 (eval $ac_compile) 2>conftest.er1
3531 ac_status=$?
3532 grep -v '^ *+' conftest.er1 >conftest.err
3533 rm -f conftest.er1
3534 cat conftest.err >&5
3535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3536 (exit $ac_status); } &&
1cf0118d
RO
3537 { ac_try='test -z "$ac_c_werror_flag"
3538 || test ! -s conftest.err'
bf3b7cd3
JD
3539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3540 (eval $ac_try) 2>&5
3541 ac_status=$?
3542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3543 (exit $ac_status); }; } &&
3544 { ac_try='test -s conftest.$ac_objext'
3545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3546 (eval $ac_try) 2>&5
3547 ac_status=$?
3548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3549 (exit $ac_status); }; }; then
3550 ac_lo=0 ac_mid=0
3551 while :; do
3552 cat >conftest.$ac_ext <<_ACEOF
3553/* confdefs.h. */
3554_ACEOF
3555cat confdefs.h >>conftest.$ac_ext
3556cat >>conftest.$ac_ext <<_ACEOF
3557/* end confdefs.h. */
3558$ac_includes_default
3559int
3560main ()
3561{
3562static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3563test_array [0] = 0
3564
3565 ;
3566 return 0;
3567}
3568_ACEOF
3569rm -f conftest.$ac_objext
3570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3571 (eval $ac_compile) 2>conftest.er1
3572 ac_status=$?
3573 grep -v '^ *+' conftest.er1 >conftest.err
3574 rm -f conftest.er1
3575 cat conftest.err >&5
3576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3577 (exit $ac_status); } &&
1cf0118d
RO
3578 { ac_try='test -z "$ac_c_werror_flag"
3579 || test ! -s conftest.err'
bf3b7cd3
JD
3580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3581 (eval $ac_try) 2>&5
3582 ac_status=$?
3583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3584 (exit $ac_status); }; } &&
3585 { ac_try='test -s conftest.$ac_objext'
3586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3587 (eval $ac_try) 2>&5
3588 ac_status=$?
3589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3590 (exit $ac_status); }; }; then
3591 ac_hi=$ac_mid; break
3592else
3593 echo "$as_me: failed program was:" >&5
3594sed 's/^/| /' conftest.$ac_ext >&5
3595
3596ac_lo=`expr $ac_mid + 1`
3597 if test $ac_lo -le $ac_mid; then
3598 ac_lo= ac_hi=
3599 break
3600 fi
3601 ac_mid=`expr 2 '*' $ac_mid + 1`
3602fi
3603rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3604 done
3605else
3606 echo "$as_me: failed program was:" >&5
3607sed 's/^/| /' conftest.$ac_ext >&5
3608
3609cat >conftest.$ac_ext <<_ACEOF
3610/* confdefs.h. */
3611_ACEOF
3612cat confdefs.h >>conftest.$ac_ext
3613cat >>conftest.$ac_ext <<_ACEOF
3614/* end confdefs.h. */
3615$ac_includes_default
3616int
3617main ()
3618{
3619static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
3620test_array [0] = 0
3621
3622 ;
3623 return 0;
3624}
3625_ACEOF
3626rm -f conftest.$ac_objext
3627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3628 (eval $ac_compile) 2>conftest.er1
3629 ac_status=$?
3630 grep -v '^ *+' conftest.er1 >conftest.err
3631 rm -f conftest.er1
3632 cat conftest.err >&5
3633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3634 (exit $ac_status); } &&
1cf0118d
RO
3635 { ac_try='test -z "$ac_c_werror_flag"
3636 || test ! -s conftest.err'
bf3b7cd3
JD
3637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3638 (eval $ac_try) 2>&5
3639 ac_status=$?
3640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3641 (exit $ac_status); }; } &&
3642 { ac_try='test -s conftest.$ac_objext'
3643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3644 (eval $ac_try) 2>&5
3645 ac_status=$?
3646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3647 (exit $ac_status); }; }; then
3648 ac_hi=-1 ac_mid=-1
3649 while :; do
3650 cat >conftest.$ac_ext <<_ACEOF
3651/* confdefs.h. */
3652_ACEOF
3653cat confdefs.h >>conftest.$ac_ext
3654cat >>conftest.$ac_ext <<_ACEOF
3655/* end confdefs.h. */
3656$ac_includes_default
3657int
3658main ()
3659{
3660static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
3661test_array [0] = 0
3662
3663 ;
3664 return 0;
3665}
3666_ACEOF
3667rm -f conftest.$ac_objext
3668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3669 (eval $ac_compile) 2>conftest.er1
3670 ac_status=$?
3671 grep -v '^ *+' conftest.er1 >conftest.err
3672 rm -f conftest.er1
3673 cat conftest.err >&5
3674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3675 (exit $ac_status); } &&
1cf0118d
RO
3676 { ac_try='test -z "$ac_c_werror_flag"
3677 || test ! -s conftest.err'
bf3b7cd3
JD
3678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3679 (eval $ac_try) 2>&5
3680 ac_status=$?
3681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3682 (exit $ac_status); }; } &&
3683 { ac_try='test -s conftest.$ac_objext'
3684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3685 (eval $ac_try) 2>&5
3686 ac_status=$?
3687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3688 (exit $ac_status); }; }; then
3689 ac_lo=$ac_mid; break
3690else
3691 echo "$as_me: failed program was:" >&5
3692sed 's/^/| /' conftest.$ac_ext >&5
3693
3694ac_hi=`expr '(' $ac_mid ')' - 1`
3695 if test $ac_mid -le $ac_hi; then
3696 ac_lo= ac_hi=
3697 break
3698 fi
3699 ac_mid=`expr 2 '*' $ac_mid`
3700fi
3701rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3702 done
3703else
3704 echo "$as_me: failed program was:" >&5
3705sed 's/^/| /' conftest.$ac_ext >&5
3706
3707ac_lo= ac_hi=
3708fi
3709rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3710fi
3711rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3712# Binary search between lo and hi bounds.
3713while test "x$ac_lo" != "x$ac_hi"; do
3714 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3715 cat >conftest.$ac_ext <<_ACEOF
3716/* confdefs.h. */
3717_ACEOF
3718cat confdefs.h >>conftest.$ac_ext
3719cat >>conftest.$ac_ext <<_ACEOF
3720/* end confdefs.h. */
3721$ac_includes_default
3722int
3723main ()
3724{
3725static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3726test_array [0] = 0
3727
3728 ;
3729 return 0;
3730}
3731_ACEOF
3732rm -f conftest.$ac_objext
3733if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3734 (eval $ac_compile) 2>conftest.er1
3735 ac_status=$?
3736 grep -v '^ *+' conftest.er1 >conftest.err
3737 rm -f conftest.er1
3738 cat conftest.err >&5
3739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3740 (exit $ac_status); } &&
1cf0118d
RO
3741 { ac_try='test -z "$ac_c_werror_flag"
3742 || test ! -s conftest.err'
bf3b7cd3
JD
3743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3744 (eval $ac_try) 2>&5
3745 ac_status=$?
3746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3747 (exit $ac_status); }; } &&
3748 { ac_try='test -s conftest.$ac_objext'
3749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3750 (eval $ac_try) 2>&5
3751 ac_status=$?
3752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3753 (exit $ac_status); }; }; then
3754 ac_hi=$ac_mid
3755else
3756 echo "$as_me: failed program was:" >&5
3757sed 's/^/| /' conftest.$ac_ext >&5
3758
3759ac_lo=`expr '(' $ac_mid ')' + 1`
3760fi
3761rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3762done
3763case $ac_lo in
3764?*) ac_cv_sizeof_void_p=$ac_lo;;
3765'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3766See \`config.log' for more details." >&5
3767echo "$as_me: error: cannot compute sizeof (void *), 77
3768See \`config.log' for more details." >&2;}
3769 { (exit 1); exit 1; }; } ;;
3770esac
3771else
3772 if test "$cross_compiling" = yes; then
1cf0118d
RO
3773 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
3774See \`config.log' for more details." >&5
3775echo "$as_me: error: cannot run test program while cross compiling
3776See \`config.log' for more details." >&2;}
bf3b7cd3
JD
3777 { (exit 1); exit 1; }; }
3778else
3779 cat >conftest.$ac_ext <<_ACEOF
3780/* confdefs.h. */
3781_ACEOF
3782cat confdefs.h >>conftest.$ac_ext
3783cat >>conftest.$ac_ext <<_ACEOF
3784/* end confdefs.h. */
3785$ac_includes_default
3786long longval () { return (long) (sizeof (void *)); }
3787unsigned long ulongval () { return (long) (sizeof (void *)); }
3788#include <stdio.h>
3789#include <stdlib.h>
3790int
3791main ()
3792{
3793
3794 FILE *f = fopen ("conftest.val", "w");
3795 if (! f)
3796 exit (1);
3797 if (((long) (sizeof (void *))) < 0)
3798 {
3799 long i = longval ();
3800 if (i != ((long) (sizeof (void *))))
3801 exit (1);
3802 fprintf (f, "%ld\n", i);
3803 }
3804 else
3805 {
3806 unsigned long i = ulongval ();
3807 if (i != ((long) (sizeof (void *))))
3808 exit (1);
3809 fprintf (f, "%lu\n", i);
3810 }
3811 exit (ferror (f) || fclose (f) != 0);
3812
3813 ;
3814 return 0;
3815}
3816_ACEOF
3817rm -f conftest$ac_exeext
3818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3819 (eval $ac_link) 2>&5
3820 ac_status=$?
3821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3822 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3824 (eval $ac_try) 2>&5
3825 ac_status=$?
3826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3827 (exit $ac_status); }; }; then
3828 ac_cv_sizeof_void_p=`cat conftest.val`
3829else
3830 echo "$as_me: program exited with status $ac_status" >&5
3831echo "$as_me: failed program was:" >&5
3832sed 's/^/| /' conftest.$ac_ext >&5
3833
3834( exit $ac_status )
3835{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3836See \`config.log' for more details." >&5
3837echo "$as_me: error: cannot compute sizeof (void *), 77
3838See \`config.log' for more details." >&2;}
3839 { (exit 1); exit 1; }; }
3840fi
3841rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3842fi
3843fi
3844rm -f conftest.val
3845else
3846 ac_cv_sizeof_void_p=0
3847fi
3848fi
3849echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3850echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3851cat >>confdefs.h <<_ACEOF
3852#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3853_ACEOF
3854
3855
3856echo "$as_me:$LINENO: checking for short" >&5
3857echo $ECHO_N "checking for short... $ECHO_C" >&6
3858if test "${ac_cv_type_short+set}" = set; then
3859 echo $ECHO_N "(cached) $ECHO_C" >&6
3860else
3861 cat >conftest.$ac_ext <<_ACEOF
3862/* confdefs.h. */
3863_ACEOF
3864cat confdefs.h >>conftest.$ac_ext
3865cat >>conftest.$ac_ext <<_ACEOF
3866/* end confdefs.h. */
3867$ac_includes_default
3868int
3869main ()
3870{
3871if ((short *) 0)
3872 return 0;
3873if (sizeof (short))
3874 return 0;
3875 ;
3876 return 0;
3877}
3878_ACEOF
3879rm -f conftest.$ac_objext
3880if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3881 (eval $ac_compile) 2>conftest.er1
3882 ac_status=$?
3883 grep -v '^ *+' conftest.er1 >conftest.err
3884 rm -f conftest.er1
3885 cat conftest.err >&5
3886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3887 (exit $ac_status); } &&
1cf0118d
RO
3888 { ac_try='test -z "$ac_c_werror_flag"
3889 || test ! -s conftest.err'
bf3b7cd3
JD
3890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3891 (eval $ac_try) 2>&5
3892 ac_status=$?
3893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3894 (exit $ac_status); }; } &&
3895 { ac_try='test -s conftest.$ac_objext'
3896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3897 (eval $ac_try) 2>&5
3898 ac_status=$?
3899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3900 (exit $ac_status); }; }; then
3901 ac_cv_type_short=yes
3902else
3903 echo "$as_me: failed program was:" >&5
3904sed 's/^/| /' conftest.$ac_ext >&5
3905
3906ac_cv_type_short=no
3907fi
3908rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3909fi
3910echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
3911echo "${ECHO_T}$ac_cv_type_short" >&6
3912
3913echo "$as_me:$LINENO: checking size of short" >&5
3914echo $ECHO_N "checking size of short... $ECHO_C" >&6
3915if test "${ac_cv_sizeof_short+set}" = set; then
3916 echo $ECHO_N "(cached) $ECHO_C" >&6
3917else
3918 if test "$ac_cv_type_short" = yes; then
3919 # The cast to unsigned long works around a bug in the HP C Compiler
3920 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3921 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3922 # This bug is HP SR number 8606223364.
3923 if test "$cross_compiling" = yes; then
3924 # Depending upon the size, compute the lo and hi bounds.
3925cat >conftest.$ac_ext <<_ACEOF
3926/* confdefs.h. */
3927_ACEOF
3928cat confdefs.h >>conftest.$ac_ext
3929cat >>conftest.$ac_ext <<_ACEOF
3930/* end confdefs.h. */
3931$ac_includes_default
3932int
3933main ()
3934{
3935static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
3936test_array [0] = 0
3937
3938 ;
3939 return 0;
3940}
3941_ACEOF
3942rm -f conftest.$ac_objext
3943if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3944 (eval $ac_compile) 2>conftest.er1
3945 ac_status=$?
3946 grep -v '^ *+' conftest.er1 >conftest.err
3947 rm -f conftest.er1
3948 cat conftest.err >&5
3949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3950 (exit $ac_status); } &&
1cf0118d
RO
3951 { ac_try='test -z "$ac_c_werror_flag"
3952 || test ! -s conftest.err'
bf3b7cd3
JD
3953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3954 (eval $ac_try) 2>&5
3955 ac_status=$?
3956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3957 (exit $ac_status); }; } &&
3958 { ac_try='test -s conftest.$ac_objext'
3959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3960 (eval $ac_try) 2>&5
3961 ac_status=$?
3962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3963 (exit $ac_status); }; }; then
3964 ac_lo=0 ac_mid=0
3965 while :; do
3966 cat >conftest.$ac_ext <<_ACEOF
3967/* confdefs.h. */
3968_ACEOF
3969cat confdefs.h >>conftest.$ac_ext
3970cat >>conftest.$ac_ext <<_ACEOF
3971/* end confdefs.h. */
3972$ac_includes_default
3973int
3974main ()
3975{
3976static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
3977test_array [0] = 0
3978
3979 ;
3980 return 0;
3981}
3982_ACEOF
3983rm -f conftest.$ac_objext
3984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3985 (eval $ac_compile) 2>conftest.er1
3986 ac_status=$?
3987 grep -v '^ *+' conftest.er1 >conftest.err
3988 rm -f conftest.er1
3989 cat conftest.err >&5
3990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3991 (exit $ac_status); } &&
1cf0118d
RO
3992 { ac_try='test -z "$ac_c_werror_flag"
3993 || test ! -s conftest.err'
bf3b7cd3
JD
3994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3995 (eval $ac_try) 2>&5
3996 ac_status=$?
3997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3998 (exit $ac_status); }; } &&
3999 { ac_try='test -s conftest.$ac_objext'
4000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4001 (eval $ac_try) 2>&5
4002 ac_status=$?
4003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4004 (exit $ac_status); }; }; then
4005 ac_hi=$ac_mid; break
4006else
4007 echo "$as_me: failed program was:" >&5
4008sed 's/^/| /' conftest.$ac_ext >&5
4009
4010ac_lo=`expr $ac_mid + 1`
4011 if test $ac_lo -le $ac_mid; then
4012 ac_lo= ac_hi=
4013 break
4014 fi
4015 ac_mid=`expr 2 '*' $ac_mid + 1`
4016fi
4017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4018 done
4019else
4020 echo "$as_me: failed program was:" >&5
4021sed 's/^/| /' conftest.$ac_ext >&5
4022
4023cat >conftest.$ac_ext <<_ACEOF
4024/* confdefs.h. */
4025_ACEOF
4026cat confdefs.h >>conftest.$ac_ext
4027cat >>conftest.$ac_ext <<_ACEOF
4028/* end confdefs.h. */
4029$ac_includes_default
4030int
4031main ()
4032{
4033static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
4034test_array [0] = 0
4035
4036 ;
4037 return 0;
4038}
4039_ACEOF
4040rm -f conftest.$ac_objext
4041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4042 (eval $ac_compile) 2>conftest.er1
4043 ac_status=$?
4044 grep -v '^ *+' conftest.er1 >conftest.err
4045 rm -f conftest.er1
4046 cat conftest.err >&5
4047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4048 (exit $ac_status); } &&
1cf0118d
RO
4049 { ac_try='test -z "$ac_c_werror_flag"
4050 || test ! -s conftest.err'
bf3b7cd3
JD
4051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4052 (eval $ac_try) 2>&5
4053 ac_status=$?
4054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4055 (exit $ac_status); }; } &&
4056 { ac_try='test -s conftest.$ac_objext'
4057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4058 (eval $ac_try) 2>&5
4059 ac_status=$?
4060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4061 (exit $ac_status); }; }; then
4062 ac_hi=-1 ac_mid=-1
4063 while :; do
4064 cat >conftest.$ac_ext <<_ACEOF
4065/* confdefs.h. */
4066_ACEOF
4067cat confdefs.h >>conftest.$ac_ext
4068cat >>conftest.$ac_ext <<_ACEOF
4069/* end confdefs.h. */
4070$ac_includes_default
4071int
4072main ()
4073{
4074static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
4075test_array [0] = 0
4076
4077 ;
4078 return 0;
4079}
4080_ACEOF
4081rm -f conftest.$ac_objext
4082if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4083 (eval $ac_compile) 2>conftest.er1
4084 ac_status=$?
4085 grep -v '^ *+' conftest.er1 >conftest.err
4086 rm -f conftest.er1
4087 cat conftest.err >&5
4088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4089 (exit $ac_status); } &&
1cf0118d
RO
4090 { ac_try='test -z "$ac_c_werror_flag"
4091 || test ! -s conftest.err'
bf3b7cd3
JD
4092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4093 (eval $ac_try) 2>&5
4094 ac_status=$?
4095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4096 (exit $ac_status); }; } &&
4097 { ac_try='test -s conftest.$ac_objext'
4098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4099 (eval $ac_try) 2>&5
4100 ac_status=$?
4101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4102 (exit $ac_status); }; }; then
4103 ac_lo=$ac_mid; break
4104else
4105 echo "$as_me: failed program was:" >&5
4106sed 's/^/| /' conftest.$ac_ext >&5
4107
4108ac_hi=`expr '(' $ac_mid ')' - 1`
4109 if test $ac_mid -le $ac_hi; then
4110 ac_lo= ac_hi=
4111 break
4112 fi
4113 ac_mid=`expr 2 '*' $ac_mid`
4114fi
4115rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4116 done
4117else
4118 echo "$as_me: failed program was:" >&5
4119sed 's/^/| /' conftest.$ac_ext >&5
4120
4121ac_lo= ac_hi=
4122fi
4123rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4124fi
4125rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4126# Binary search between lo and hi bounds.
4127while test "x$ac_lo" != "x$ac_hi"; do
4128 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4129 cat >conftest.$ac_ext <<_ACEOF
4130/* confdefs.h. */
4131_ACEOF
4132cat confdefs.h >>conftest.$ac_ext
4133cat >>conftest.$ac_ext <<_ACEOF
4134/* end confdefs.h. */
4135$ac_includes_default
4136int
4137main ()
4138{
4139static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4140test_array [0] = 0
4141
4142 ;
4143 return 0;
4144}
4145_ACEOF
4146rm -f conftest.$ac_objext
4147if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4148 (eval $ac_compile) 2>conftest.er1
4149 ac_status=$?
4150 grep -v '^ *+' conftest.er1 >conftest.err
4151 rm -f conftest.er1
4152 cat conftest.err >&5
4153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4154 (exit $ac_status); } &&
1cf0118d
RO
4155 { ac_try='test -z "$ac_c_werror_flag"
4156 || test ! -s conftest.err'
bf3b7cd3
JD
4157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4158 (eval $ac_try) 2>&5
4159 ac_status=$?
4160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4161 (exit $ac_status); }; } &&
4162 { ac_try='test -s conftest.$ac_objext'
4163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4164 (eval $ac_try) 2>&5
4165 ac_status=$?
4166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4167 (exit $ac_status); }; }; then
4168 ac_hi=$ac_mid
4169else
4170 echo "$as_me: failed program was:" >&5
4171sed 's/^/| /' conftest.$ac_ext >&5
4172
4173ac_lo=`expr '(' $ac_mid ')' + 1`
4174fi
4175rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4176done
4177case $ac_lo in
4178?*) ac_cv_sizeof_short=$ac_lo;;
4179'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4180See \`config.log' for more details." >&5
4181echo "$as_me: error: cannot compute sizeof (short), 77
4182See \`config.log' for more details." >&2;}
4183 { (exit 1); exit 1; }; } ;;
4184esac
4185else
4186 if test "$cross_compiling" = yes; then
1cf0118d
RO
4187 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4188See \`config.log' for more details." >&5
4189echo "$as_me: error: cannot run test program while cross compiling
4190See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4191 { (exit 1); exit 1; }; }
4192else
4193 cat >conftest.$ac_ext <<_ACEOF
4194/* confdefs.h. */
4195_ACEOF
4196cat confdefs.h >>conftest.$ac_ext
4197cat >>conftest.$ac_ext <<_ACEOF
4198/* end confdefs.h. */
4199$ac_includes_default
4200long longval () { return (long) (sizeof (short)); }
4201unsigned long ulongval () { return (long) (sizeof (short)); }
4202#include <stdio.h>
4203#include <stdlib.h>
4204int
4205main ()
4206{
4207
4208 FILE *f = fopen ("conftest.val", "w");
4209 if (! f)
4210 exit (1);
4211 if (((long) (sizeof (short))) < 0)
4212 {
4213 long i = longval ();
4214 if (i != ((long) (sizeof (short))))
4215 exit (1);
4216 fprintf (f, "%ld\n", i);
4217 }
4218 else
4219 {
4220 unsigned long i = ulongval ();
4221 if (i != ((long) (sizeof (short))))
4222 exit (1);
4223 fprintf (f, "%lu\n", i);
4224 }
4225 exit (ferror (f) || fclose (f) != 0);
4226
4227 ;
4228 return 0;
4229}
4230_ACEOF
4231rm -f conftest$ac_exeext
4232if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4233 (eval $ac_link) 2>&5
4234 ac_status=$?
4235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4236 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4238 (eval $ac_try) 2>&5
4239 ac_status=$?
4240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4241 (exit $ac_status); }; }; then
4242 ac_cv_sizeof_short=`cat conftest.val`
4243else
4244 echo "$as_me: program exited with status $ac_status" >&5
4245echo "$as_me: failed program was:" >&5
4246sed 's/^/| /' conftest.$ac_ext >&5
4247
4248( exit $ac_status )
4249{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4250See \`config.log' for more details." >&5
4251echo "$as_me: error: cannot compute sizeof (short), 77
4252See \`config.log' for more details." >&2;}
4253 { (exit 1); exit 1; }; }
4254fi
4255rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4256fi
4257fi
4258rm -f conftest.val
4259else
4260 ac_cv_sizeof_short=0
4261fi
4262fi
4263echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4264echo "${ECHO_T}$ac_cv_sizeof_short" >&6
4265cat >>confdefs.h <<_ACEOF
4266#define SIZEOF_SHORT $ac_cv_sizeof_short
4267_ACEOF
4268
4269
4270echo "$as_me:$LINENO: checking for int" >&5
4271echo $ECHO_N "checking for int... $ECHO_C" >&6
4272if test "${ac_cv_type_int+set}" = set; then
4273 echo $ECHO_N "(cached) $ECHO_C" >&6
4274else
4275 cat >conftest.$ac_ext <<_ACEOF
4276/* confdefs.h. */
4277_ACEOF
4278cat confdefs.h >>conftest.$ac_ext
4279cat >>conftest.$ac_ext <<_ACEOF
4280/* end confdefs.h. */
4281$ac_includes_default
4282int
4283main ()
4284{
4285if ((int *) 0)
4286 return 0;
4287if (sizeof (int))
4288 return 0;
4289 ;
4290 return 0;
4291}
4292_ACEOF
4293rm -f conftest.$ac_objext
4294if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4295 (eval $ac_compile) 2>conftest.er1
4296 ac_status=$?
4297 grep -v '^ *+' conftest.er1 >conftest.err
4298 rm -f conftest.er1
4299 cat conftest.err >&5
4300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4301 (exit $ac_status); } &&
1cf0118d
RO
4302 { ac_try='test -z "$ac_c_werror_flag"
4303 || test ! -s conftest.err'
bf3b7cd3
JD
4304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4305 (eval $ac_try) 2>&5
4306 ac_status=$?
4307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4308 (exit $ac_status); }; } &&
4309 { ac_try='test -s conftest.$ac_objext'
4310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4311 (eval $ac_try) 2>&5
4312 ac_status=$?
4313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4314 (exit $ac_status); }; }; then
4315 ac_cv_type_int=yes
4316else
4317 echo "$as_me: failed program was:" >&5
4318sed 's/^/| /' conftest.$ac_ext >&5
4319
4320ac_cv_type_int=no
4321fi
4322rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4323fi
4324echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4325echo "${ECHO_T}$ac_cv_type_int" >&6
4326
4327echo "$as_me:$LINENO: checking size of int" >&5
4328echo $ECHO_N "checking size of int... $ECHO_C" >&6
4329if test "${ac_cv_sizeof_int+set}" = set; then
4330 echo $ECHO_N "(cached) $ECHO_C" >&6
4331else
4332 if test "$ac_cv_type_int" = yes; then
4333 # The cast to unsigned long works around a bug in the HP C Compiler
4334 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4335 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4336 # This bug is HP SR number 8606223364.
4337 if test "$cross_compiling" = yes; then
4338 # Depending upon the size, compute the lo and hi bounds.
4339cat >conftest.$ac_ext <<_ACEOF
4340/* confdefs.h. */
4341_ACEOF
4342cat confdefs.h >>conftest.$ac_ext
4343cat >>conftest.$ac_ext <<_ACEOF
4344/* end confdefs.h. */
4345$ac_includes_default
4346int
4347main ()
4348{
4349static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4350test_array [0] = 0
4351
4352 ;
4353 return 0;
4354}
4355_ACEOF
4356rm -f conftest.$ac_objext
4357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4358 (eval $ac_compile) 2>conftest.er1
4359 ac_status=$?
4360 grep -v '^ *+' conftest.er1 >conftest.err
4361 rm -f conftest.er1
4362 cat conftest.err >&5
4363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4364 (exit $ac_status); } &&
1cf0118d
RO
4365 { ac_try='test -z "$ac_c_werror_flag"
4366 || test ! -s conftest.err'
bf3b7cd3
JD
4367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4368 (eval $ac_try) 2>&5
4369 ac_status=$?
4370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4371 (exit $ac_status); }; } &&
4372 { ac_try='test -s conftest.$ac_objext'
4373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4374 (eval $ac_try) 2>&5
4375 ac_status=$?
4376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4377 (exit $ac_status); }; }; then
4378 ac_lo=0 ac_mid=0
4379 while :; do
4380 cat >conftest.$ac_ext <<_ACEOF
4381/* confdefs.h. */
4382_ACEOF
4383cat confdefs.h >>conftest.$ac_ext
4384cat >>conftest.$ac_ext <<_ACEOF
4385/* end confdefs.h. */
4386$ac_includes_default
4387int
4388main ()
4389{
4390static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4391test_array [0] = 0
4392
4393 ;
4394 return 0;
4395}
4396_ACEOF
4397rm -f conftest.$ac_objext
4398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4399 (eval $ac_compile) 2>conftest.er1
4400 ac_status=$?
4401 grep -v '^ *+' conftest.er1 >conftest.err
4402 rm -f conftest.er1
4403 cat conftest.err >&5
4404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4405 (exit $ac_status); } &&
1cf0118d
RO
4406 { ac_try='test -z "$ac_c_werror_flag"
4407 || test ! -s conftest.err'
bf3b7cd3
JD
4408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4409 (eval $ac_try) 2>&5
4410 ac_status=$?
4411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4412 (exit $ac_status); }; } &&
4413 { ac_try='test -s conftest.$ac_objext'
4414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4415 (eval $ac_try) 2>&5
4416 ac_status=$?
4417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4418 (exit $ac_status); }; }; then
4419 ac_hi=$ac_mid; break
4420else
4421 echo "$as_me: failed program was:" >&5
4422sed 's/^/| /' conftest.$ac_ext >&5
4423
4424ac_lo=`expr $ac_mid + 1`
4425 if test $ac_lo -le $ac_mid; then
4426 ac_lo= ac_hi=
4427 break
4428 fi
4429 ac_mid=`expr 2 '*' $ac_mid + 1`
4430fi
4431rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4432 done
4433else
4434 echo "$as_me: failed program was:" >&5
4435sed 's/^/| /' conftest.$ac_ext >&5
4436
4437cat >conftest.$ac_ext <<_ACEOF
4438/* confdefs.h. */
4439_ACEOF
4440cat confdefs.h >>conftest.$ac_ext
4441cat >>conftest.$ac_ext <<_ACEOF
4442/* end confdefs.h. */
4443$ac_includes_default
4444int
4445main ()
4446{
4447static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4448test_array [0] = 0
4449
4450 ;
4451 return 0;
4452}
4453_ACEOF
4454rm -f conftest.$ac_objext
4455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4456 (eval $ac_compile) 2>conftest.er1
4457 ac_status=$?
4458 grep -v '^ *+' conftest.er1 >conftest.err
4459 rm -f conftest.er1
4460 cat conftest.err >&5
4461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4462 (exit $ac_status); } &&
1cf0118d
RO
4463 { ac_try='test -z "$ac_c_werror_flag"
4464 || test ! -s conftest.err'
bf3b7cd3
JD
4465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4466 (eval $ac_try) 2>&5
4467 ac_status=$?
4468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4469 (exit $ac_status); }; } &&
4470 { ac_try='test -s conftest.$ac_objext'
4471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4472 (eval $ac_try) 2>&5
4473 ac_status=$?
4474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4475 (exit $ac_status); }; }; then
4476 ac_hi=-1 ac_mid=-1
4477 while :; do
4478 cat >conftest.$ac_ext <<_ACEOF
4479/* confdefs.h. */
4480_ACEOF
4481cat confdefs.h >>conftest.$ac_ext
4482cat >>conftest.$ac_ext <<_ACEOF
4483/* end confdefs.h. */
4484$ac_includes_default
4485int
4486main ()
4487{
4488static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4489test_array [0] = 0
4490
4491 ;
4492 return 0;
4493}
4494_ACEOF
4495rm -f conftest.$ac_objext
4496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4497 (eval $ac_compile) 2>conftest.er1
4498 ac_status=$?
4499 grep -v '^ *+' conftest.er1 >conftest.err
4500 rm -f conftest.er1
4501 cat conftest.err >&5
4502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4503 (exit $ac_status); } &&
1cf0118d
RO
4504 { ac_try='test -z "$ac_c_werror_flag"
4505 || test ! -s conftest.err'
bf3b7cd3
JD
4506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4507 (eval $ac_try) 2>&5
4508 ac_status=$?
4509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4510 (exit $ac_status); }; } &&
4511 { ac_try='test -s conftest.$ac_objext'
4512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4513 (eval $ac_try) 2>&5
4514 ac_status=$?
4515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4516 (exit $ac_status); }; }; then
4517 ac_lo=$ac_mid; break
4518else
4519 echo "$as_me: failed program was:" >&5
4520sed 's/^/| /' conftest.$ac_ext >&5
4521
4522ac_hi=`expr '(' $ac_mid ')' - 1`
4523 if test $ac_mid -le $ac_hi; then
4524 ac_lo= ac_hi=
4525 break
4526 fi
4527 ac_mid=`expr 2 '*' $ac_mid`
4528fi
4529rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4530 done
4531else
4532 echo "$as_me: failed program was:" >&5
4533sed 's/^/| /' conftest.$ac_ext >&5
4534
4535ac_lo= ac_hi=
4536fi
4537rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4538fi
4539rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4540# Binary search between lo and hi bounds.
4541while test "x$ac_lo" != "x$ac_hi"; do
4542 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4543 cat >conftest.$ac_ext <<_ACEOF
4544/* confdefs.h. */
4545_ACEOF
4546cat confdefs.h >>conftest.$ac_ext
4547cat >>conftest.$ac_ext <<_ACEOF
4548/* end confdefs.h. */
4549$ac_includes_default
4550int
4551main ()
4552{
4553static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4554test_array [0] = 0
4555
4556 ;
4557 return 0;
4558}
4559_ACEOF
4560rm -f conftest.$ac_objext
4561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4562 (eval $ac_compile) 2>conftest.er1
4563 ac_status=$?
4564 grep -v '^ *+' conftest.er1 >conftest.err
4565 rm -f conftest.er1
4566 cat conftest.err >&5
4567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4568 (exit $ac_status); } &&
1cf0118d
RO
4569 { ac_try='test -z "$ac_c_werror_flag"
4570 || test ! -s conftest.err'
bf3b7cd3
JD
4571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4572 (eval $ac_try) 2>&5
4573 ac_status=$?
4574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4575 (exit $ac_status); }; } &&
4576 { ac_try='test -s conftest.$ac_objext'
4577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4578 (eval $ac_try) 2>&5
4579 ac_status=$?
4580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4581 (exit $ac_status); }; }; then
4582 ac_hi=$ac_mid
4583else
4584 echo "$as_me: failed program was:" >&5
4585sed 's/^/| /' conftest.$ac_ext >&5
4586
4587ac_lo=`expr '(' $ac_mid ')' + 1`
4588fi
4589rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4590done
4591case $ac_lo in
4592?*) ac_cv_sizeof_int=$ac_lo;;
4593'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4594See \`config.log' for more details." >&5
4595echo "$as_me: error: cannot compute sizeof (int), 77
4596See \`config.log' for more details." >&2;}
4597 { (exit 1); exit 1; }; } ;;
4598esac
4599else
4600 if test "$cross_compiling" = yes; then
1cf0118d
RO
4601 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4602See \`config.log' for more details." >&5
4603echo "$as_me: error: cannot run test program while cross compiling
4604See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4605 { (exit 1); exit 1; }; }
4606else
4607 cat >conftest.$ac_ext <<_ACEOF
4608/* confdefs.h. */
4609_ACEOF
4610cat confdefs.h >>conftest.$ac_ext
4611cat >>conftest.$ac_ext <<_ACEOF
4612/* end confdefs.h. */
4613$ac_includes_default
4614long longval () { return (long) (sizeof (int)); }
4615unsigned long ulongval () { return (long) (sizeof (int)); }
4616#include <stdio.h>
4617#include <stdlib.h>
4618int
4619main ()
4620{
4621
4622 FILE *f = fopen ("conftest.val", "w");
4623 if (! f)
4624 exit (1);
4625 if (((long) (sizeof (int))) < 0)
4626 {
4627 long i = longval ();
4628 if (i != ((long) (sizeof (int))))
4629 exit (1);
4630 fprintf (f, "%ld\n", i);
4631 }
4632 else
4633 {
4634 unsigned long i = ulongval ();
4635 if (i != ((long) (sizeof (int))))
4636 exit (1);
4637 fprintf (f, "%lu\n", i);
4638 }
4639 exit (ferror (f) || fclose (f) != 0);
4640
4641 ;
4642 return 0;
4643}
4644_ACEOF
4645rm -f conftest$ac_exeext
4646if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4647 (eval $ac_link) 2>&5
4648 ac_status=$?
4649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4650 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4652 (eval $ac_try) 2>&5
4653 ac_status=$?
4654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4655 (exit $ac_status); }; }; then
4656 ac_cv_sizeof_int=`cat conftest.val`
4657else
4658 echo "$as_me: program exited with status $ac_status" >&5
4659echo "$as_me: failed program was:" >&5
4660sed 's/^/| /' conftest.$ac_ext >&5
4661
4662( exit $ac_status )
4663{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4664See \`config.log' for more details." >&5
4665echo "$as_me: error: cannot compute sizeof (int), 77
4666See \`config.log' for more details." >&2;}
4667 { (exit 1); exit 1; }; }
4668fi
4669rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4670fi
4671fi
4672rm -f conftest.val
4673else
4674 ac_cv_sizeof_int=0
4675fi
4676fi
4677echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4678echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4679cat >>confdefs.h <<_ACEOF
4680#define SIZEOF_INT $ac_cv_sizeof_int
4681_ACEOF
4682
4683
4684echo "$as_me:$LINENO: checking for long" >&5
4685echo $ECHO_N "checking for long... $ECHO_C" >&6
4686if test "${ac_cv_type_long+set}" = set; then
4687 echo $ECHO_N "(cached) $ECHO_C" >&6
4688else
4689 cat >conftest.$ac_ext <<_ACEOF
4690/* confdefs.h. */
4691_ACEOF
4692cat confdefs.h >>conftest.$ac_ext
4693cat >>conftest.$ac_ext <<_ACEOF
4694/* end confdefs.h. */
4695$ac_includes_default
4696int
4697main ()
4698{
4699if ((long *) 0)
4700 return 0;
4701if (sizeof (long))
4702 return 0;
4703 ;
4704 return 0;
4705}
4706_ACEOF
4707rm -f conftest.$ac_objext
4708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4709 (eval $ac_compile) 2>conftest.er1
4710 ac_status=$?
4711 grep -v '^ *+' conftest.er1 >conftest.err
4712 rm -f conftest.er1
4713 cat conftest.err >&5
4714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4715 (exit $ac_status); } &&
1cf0118d
RO
4716 { ac_try='test -z "$ac_c_werror_flag"
4717 || test ! -s conftest.err'
bf3b7cd3
JD
4718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4719 (eval $ac_try) 2>&5
4720 ac_status=$?
4721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4722 (exit $ac_status); }; } &&
4723 { ac_try='test -s conftest.$ac_objext'
4724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4725 (eval $ac_try) 2>&5
4726 ac_status=$?
4727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4728 (exit $ac_status); }; }; then
4729 ac_cv_type_long=yes
4730else
4731 echo "$as_me: failed program was:" >&5
4732sed 's/^/| /' conftest.$ac_ext >&5
4733
4734ac_cv_type_long=no
4735fi
4736rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4737fi
4738echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4739echo "${ECHO_T}$ac_cv_type_long" >&6
4740
4741echo "$as_me:$LINENO: checking size of long" >&5
4742echo $ECHO_N "checking size of long... $ECHO_C" >&6
4743if test "${ac_cv_sizeof_long+set}" = set; then
4744 echo $ECHO_N "(cached) $ECHO_C" >&6
4745else
4746 if test "$ac_cv_type_long" = yes; then
4747 # The cast to unsigned long works around a bug in the HP C Compiler
4748 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4749 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4750 # This bug is HP SR number 8606223364.
4751 if test "$cross_compiling" = yes; then
4752 # Depending upon the size, compute the lo and hi bounds.
4753cat >conftest.$ac_ext <<_ACEOF
4754/* confdefs.h. */
4755_ACEOF
4756cat confdefs.h >>conftest.$ac_ext
4757cat >>conftest.$ac_ext <<_ACEOF
4758/* end confdefs.h. */
4759$ac_includes_default
4760int
4761main ()
4762{
4763static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
4764test_array [0] = 0
4765
4766 ;
4767 return 0;
4768}
4769_ACEOF
4770rm -f conftest.$ac_objext
4771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4772 (eval $ac_compile) 2>conftest.er1
4773 ac_status=$?
4774 grep -v '^ *+' conftest.er1 >conftest.err
4775 rm -f conftest.er1
4776 cat conftest.err >&5
4777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4778 (exit $ac_status); } &&
1cf0118d
RO
4779 { ac_try='test -z "$ac_c_werror_flag"
4780 || test ! -s conftest.err'
bf3b7cd3
JD
4781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4782 (eval $ac_try) 2>&5
4783 ac_status=$?
4784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4785 (exit $ac_status); }; } &&
4786 { ac_try='test -s conftest.$ac_objext'
4787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4788 (eval $ac_try) 2>&5
4789 ac_status=$?
4790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4791 (exit $ac_status); }; }; then
4792 ac_lo=0 ac_mid=0
4793 while :; do
4794 cat >conftest.$ac_ext <<_ACEOF
4795/* confdefs.h. */
4796_ACEOF
4797cat confdefs.h >>conftest.$ac_ext
4798cat >>conftest.$ac_ext <<_ACEOF
4799/* end confdefs.h. */
4800$ac_includes_default
4801int
4802main ()
4803{
4804static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4805test_array [0] = 0
4806
4807 ;
4808 return 0;
4809}
4810_ACEOF
4811rm -f conftest.$ac_objext
4812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4813 (eval $ac_compile) 2>conftest.er1
4814 ac_status=$?
4815 grep -v '^ *+' conftest.er1 >conftest.err
4816 rm -f conftest.er1
4817 cat conftest.err >&5
4818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4819 (exit $ac_status); } &&
1cf0118d
RO
4820 { ac_try='test -z "$ac_c_werror_flag"
4821 || test ! -s conftest.err'
bf3b7cd3
JD
4822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4823 (eval $ac_try) 2>&5
4824 ac_status=$?
4825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4826 (exit $ac_status); }; } &&
4827 { ac_try='test -s conftest.$ac_objext'
4828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4829 (eval $ac_try) 2>&5
4830 ac_status=$?
4831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4832 (exit $ac_status); }; }; then
4833 ac_hi=$ac_mid; break
4834else
4835 echo "$as_me: failed program was:" >&5
4836sed 's/^/| /' conftest.$ac_ext >&5
4837
4838ac_lo=`expr $ac_mid + 1`
4839 if test $ac_lo -le $ac_mid; then
4840 ac_lo= ac_hi=
4841 break
4842 fi
4843 ac_mid=`expr 2 '*' $ac_mid + 1`
4844fi
4845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4846 done
4847else
4848 echo "$as_me: failed program was:" >&5
4849sed 's/^/| /' conftest.$ac_ext >&5
4850
4851cat >conftest.$ac_ext <<_ACEOF
4852/* confdefs.h. */
4853_ACEOF
4854cat confdefs.h >>conftest.$ac_ext
4855cat >>conftest.$ac_ext <<_ACEOF
4856/* end confdefs.h. */
4857$ac_includes_default
4858int
4859main ()
4860{
4861static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
4862test_array [0] = 0
4863
4864 ;
4865 return 0;
4866}
4867_ACEOF
4868rm -f conftest.$ac_objext
4869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4870 (eval $ac_compile) 2>conftest.er1
4871 ac_status=$?
4872 grep -v '^ *+' conftest.er1 >conftest.err
4873 rm -f conftest.er1
4874 cat conftest.err >&5
4875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4876 (exit $ac_status); } &&
1cf0118d
RO
4877 { ac_try='test -z "$ac_c_werror_flag"
4878 || test ! -s conftest.err'
bf3b7cd3
JD
4879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4880 (eval $ac_try) 2>&5
4881 ac_status=$?
4882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4883 (exit $ac_status); }; } &&
4884 { ac_try='test -s conftest.$ac_objext'
4885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4886 (eval $ac_try) 2>&5
4887 ac_status=$?
4888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4889 (exit $ac_status); }; }; then
4890 ac_hi=-1 ac_mid=-1
4891 while :; do
4892 cat >conftest.$ac_ext <<_ACEOF
4893/* confdefs.h. */
4894_ACEOF
4895cat confdefs.h >>conftest.$ac_ext
4896cat >>conftest.$ac_ext <<_ACEOF
4897/* end confdefs.h. */
4898$ac_includes_default
4899int
4900main ()
4901{
4902static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
4903test_array [0] = 0
4904
4905 ;
4906 return 0;
4907}
4908_ACEOF
4909rm -f conftest.$ac_objext
4910if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4911 (eval $ac_compile) 2>conftest.er1
4912 ac_status=$?
4913 grep -v '^ *+' conftest.er1 >conftest.err
4914 rm -f conftest.er1
4915 cat conftest.err >&5
4916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4917 (exit $ac_status); } &&
1cf0118d
RO
4918 { ac_try='test -z "$ac_c_werror_flag"
4919 || test ! -s conftest.err'
bf3b7cd3
JD
4920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4921 (eval $ac_try) 2>&5
4922 ac_status=$?
4923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4924 (exit $ac_status); }; } &&
4925 { ac_try='test -s conftest.$ac_objext'
4926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4927 (eval $ac_try) 2>&5
4928 ac_status=$?
4929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4930 (exit $ac_status); }; }; then
4931 ac_lo=$ac_mid; break
4932else
4933 echo "$as_me: failed program was:" >&5
4934sed 's/^/| /' conftest.$ac_ext >&5
4935
4936ac_hi=`expr '(' $ac_mid ')' - 1`
4937 if test $ac_mid -le $ac_hi; then
4938 ac_lo= ac_hi=
4939 break
4940 fi
4941 ac_mid=`expr 2 '*' $ac_mid`
4942fi
4943rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4944 done
4945else
4946 echo "$as_me: failed program was:" >&5
4947sed 's/^/| /' conftest.$ac_ext >&5
4948
4949ac_lo= ac_hi=
4950fi
4951rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4952fi
4953rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4954# Binary search between lo and hi bounds.
4955while test "x$ac_lo" != "x$ac_hi"; do
4956 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4957 cat >conftest.$ac_ext <<_ACEOF
4958/* confdefs.h. */
4959_ACEOF
4960cat confdefs.h >>conftest.$ac_ext
4961cat >>conftest.$ac_ext <<_ACEOF
4962/* end confdefs.h. */
4963$ac_includes_default
4964int
4965main ()
4966{
4967static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4968test_array [0] = 0
4969
4970 ;
4971 return 0;
4972}
4973_ACEOF
4974rm -f conftest.$ac_objext
4975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4976 (eval $ac_compile) 2>conftest.er1
4977 ac_status=$?
4978 grep -v '^ *+' conftest.er1 >conftest.err
4979 rm -f conftest.er1
4980 cat conftest.err >&5
4981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4982 (exit $ac_status); } &&
1cf0118d
RO
4983 { ac_try='test -z "$ac_c_werror_flag"
4984 || test ! -s conftest.err'
bf3b7cd3
JD
4985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4986 (eval $ac_try) 2>&5
4987 ac_status=$?
4988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4989 (exit $ac_status); }; } &&
4990 { ac_try='test -s conftest.$ac_objext'
4991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4992 (eval $ac_try) 2>&5
4993 ac_status=$?
4994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4995 (exit $ac_status); }; }; then
4996 ac_hi=$ac_mid
4997else
4998 echo "$as_me: failed program was:" >&5
4999sed 's/^/| /' conftest.$ac_ext >&5
5000
5001ac_lo=`expr '(' $ac_mid ')' + 1`
5002fi
5003rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5004done
5005case $ac_lo in
5006?*) ac_cv_sizeof_long=$ac_lo;;
5007'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5008See \`config.log' for more details." >&5
5009echo "$as_me: error: cannot compute sizeof (long), 77
5010See \`config.log' for more details." >&2;}
5011 { (exit 1); exit 1; }; } ;;
5012esac
5013else
5014 if test "$cross_compiling" = yes; then
1cf0118d
RO
5015 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5016See \`config.log' for more details." >&5
5017echo "$as_me: error: cannot run test program while cross compiling
5018See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5019 { (exit 1); exit 1; }; }
5020else
5021 cat >conftest.$ac_ext <<_ACEOF
5022/* confdefs.h. */
5023_ACEOF
5024cat confdefs.h >>conftest.$ac_ext
5025cat >>conftest.$ac_ext <<_ACEOF
5026/* end confdefs.h. */
5027$ac_includes_default
5028long longval () { return (long) (sizeof (long)); }
5029unsigned long ulongval () { return (long) (sizeof (long)); }
5030#include <stdio.h>
5031#include <stdlib.h>
5032int
5033main ()
5034{
5035
5036 FILE *f = fopen ("conftest.val", "w");
5037 if (! f)
5038 exit (1);
5039 if (((long) (sizeof (long))) < 0)
5040 {
5041 long i = longval ();
5042 if (i != ((long) (sizeof (long))))
5043 exit (1);
5044 fprintf (f, "%ld\n", i);
5045 }
5046 else
5047 {
5048 unsigned long i = ulongval ();
5049 if (i != ((long) (sizeof (long))))
5050 exit (1);
5051 fprintf (f, "%lu\n", i);
5052 }
5053 exit (ferror (f) || fclose (f) != 0);
5054
5055 ;
5056 return 0;
5057}
5058_ACEOF
5059rm -f conftest$ac_exeext
5060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5061 (eval $ac_link) 2>&5
5062 ac_status=$?
5063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5066 (eval $ac_try) 2>&5
5067 ac_status=$?
5068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5069 (exit $ac_status); }; }; then
5070 ac_cv_sizeof_long=`cat conftest.val`
5071else
5072 echo "$as_me: program exited with status $ac_status" >&5
5073echo "$as_me: failed program was:" >&5
5074sed 's/^/| /' conftest.$ac_ext >&5
5075
5076( exit $ac_status )
5077{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5078See \`config.log' for more details." >&5
5079echo "$as_me: error: cannot compute sizeof (long), 77
5080See \`config.log' for more details." >&2;}
5081 { (exit 1); exit 1; }; }
5082fi
5083rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5084fi
5085fi
5086rm -f conftest.val
5087else
5088 ac_cv_sizeof_long=0
5089fi
5090fi
5091echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5092echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5093cat >>confdefs.h <<_ACEOF
5094#define SIZEOF_LONG $ac_cv_sizeof_long
5095_ACEOF
5096
5097
5ec1c5e6
KC
5098echo "$as_me:$LINENO: checking for long long" >&5
5099echo $ECHO_N "checking for long long... $ECHO_C" >&6
5100if test "${ac_cv_type_long_long+set}" = set; then
5101 echo $ECHO_N "(cached) $ECHO_C" >&6
5102else
5103 cat >conftest.$ac_ext <<_ACEOF
5104/* confdefs.h. */
5105_ACEOF
5106cat confdefs.h >>conftest.$ac_ext
5107cat >>conftest.$ac_ext <<_ACEOF
5108/* end confdefs.h. */
5109$ac_includes_default
5110int
5111main ()
5112{
5113if ((long long *) 0)
5114 return 0;
5115if (sizeof (long long))
5116 return 0;
5117 ;
5118 return 0;
5119}
5120_ACEOF
5121rm -f conftest.$ac_objext
5122if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5123 (eval $ac_compile) 2>conftest.er1
5124 ac_status=$?
5125 grep -v '^ *+' conftest.er1 >conftest.err
5126 rm -f conftest.er1
5127 cat conftest.err >&5
5128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5129 (exit $ac_status); } &&
1cf0118d
RO
5130 { ac_try='test -z "$ac_c_werror_flag"
5131 || test ! -s conftest.err'
5ec1c5e6
KC
5132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5133 (eval $ac_try) 2>&5
5134 ac_status=$?
5135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5136 (exit $ac_status); }; } &&
5137 { ac_try='test -s conftest.$ac_objext'
5138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5139 (eval $ac_try) 2>&5
5140 ac_status=$?
5141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5142 (exit $ac_status); }; }; then
5143 ac_cv_type_long_long=yes
5144else
5145 echo "$as_me: failed program was:" >&5
5146sed 's/^/| /' conftest.$ac_ext >&5
5147
5148ac_cv_type_long_long=no
5149fi
5150rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5151fi
5152echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5153echo "${ECHO_T}$ac_cv_type_long_long" >&6
5154if test $ac_cv_type_long_long = yes; then
5155
5156cat >>confdefs.h <<_ACEOF
5157#define HAVE_LONG_LONG 1
5158_ACEOF
5159
5160echo "$as_me:$LINENO: checking for long long" >&5
bf3b7cd3
JD
5161echo $ECHO_N "checking for long long... $ECHO_C" >&6
5162if test "${ac_cv_type_long_long+set}" = set; then
5163 echo $ECHO_N "(cached) $ECHO_C" >&6
5164else
5165 cat >conftest.$ac_ext <<_ACEOF
5166/* confdefs.h. */
5167_ACEOF
5168cat confdefs.h >>conftest.$ac_ext
5169cat >>conftest.$ac_ext <<_ACEOF
5170/* end confdefs.h. */
5171$ac_includes_default
5172int
5173main ()
5174{
5175if ((long long *) 0)
5176 return 0;
5177if (sizeof (long long))
5178 return 0;
5179 ;
5180 return 0;
5181}
5182_ACEOF
5183rm -f conftest.$ac_objext
5184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5185 (eval $ac_compile) 2>conftest.er1
5186 ac_status=$?
5187 grep -v '^ *+' conftest.er1 >conftest.err
5188 rm -f conftest.er1
5189 cat conftest.err >&5
5190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5191 (exit $ac_status); } &&
1cf0118d
RO
5192 { ac_try='test -z "$ac_c_werror_flag"
5193 || test ! -s conftest.err'
bf3b7cd3
JD
5194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5195 (eval $ac_try) 2>&5
5196 ac_status=$?
5197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5198 (exit $ac_status); }; } &&
5199 { ac_try='test -s conftest.$ac_objext'
5200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5201 (eval $ac_try) 2>&5
5202 ac_status=$?
5203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5204 (exit $ac_status); }; }; then
5205 ac_cv_type_long_long=yes
5206else
5207 echo "$as_me: failed program was:" >&5
5208sed 's/^/| /' conftest.$ac_ext >&5
5209
5210ac_cv_type_long_long=no
5211fi
5212rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5213fi
5214echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5215echo "${ECHO_T}$ac_cv_type_long_long" >&6
5216
5217echo "$as_me:$LINENO: checking size of long long" >&5
5218echo $ECHO_N "checking size of long long... $ECHO_C" >&6
5219if test "${ac_cv_sizeof_long_long+set}" = set; then
5220 echo $ECHO_N "(cached) $ECHO_C" >&6
5221else
5222 if test "$ac_cv_type_long_long" = yes; then
5223 # The cast to unsigned long works around a bug in the HP C Compiler
5224 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5225 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5226 # This bug is HP SR number 8606223364.
5227 if test "$cross_compiling" = yes; then
5228 # Depending upon the size, compute the lo and hi bounds.
5229cat >conftest.$ac_ext <<_ACEOF
5230/* confdefs.h. */
5231_ACEOF
5232cat confdefs.h >>conftest.$ac_ext
5233cat >>conftest.$ac_ext <<_ACEOF
5234/* end confdefs.h. */
5235$ac_includes_default
5236int
5237main ()
5238{
5239static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
5240test_array [0] = 0
5241
5242 ;
5243 return 0;
5244}
5245_ACEOF
5246rm -f conftest.$ac_objext
5247if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5248 (eval $ac_compile) 2>conftest.er1
5249 ac_status=$?
5250 grep -v '^ *+' conftest.er1 >conftest.err
5251 rm -f conftest.er1
5252 cat conftest.err >&5
5253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5254 (exit $ac_status); } &&
1cf0118d
RO
5255 { ac_try='test -z "$ac_c_werror_flag"
5256 || test ! -s conftest.err'
bf3b7cd3
JD
5257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5258 (eval $ac_try) 2>&5
5259 ac_status=$?
5260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5261 (exit $ac_status); }; } &&
5262 { ac_try='test -s conftest.$ac_objext'
5263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5264 (eval $ac_try) 2>&5
5265 ac_status=$?
5266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267 (exit $ac_status); }; }; then
5268 ac_lo=0 ac_mid=0
5269 while :; do
5270 cat >conftest.$ac_ext <<_ACEOF
5271/* confdefs.h. */
5272_ACEOF
5273cat confdefs.h >>conftest.$ac_ext
5274cat >>conftest.$ac_ext <<_ACEOF
5275/* end confdefs.h. */
5276$ac_includes_default
5277int
5278main ()
5279{
5280static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5281test_array [0] = 0
5282
5283 ;
5284 return 0;
5285}
5286_ACEOF
5287rm -f conftest.$ac_objext
5288if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5289 (eval $ac_compile) 2>conftest.er1
5290 ac_status=$?
5291 grep -v '^ *+' conftest.er1 >conftest.err
5292 rm -f conftest.er1
5293 cat conftest.err >&5
5294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5295 (exit $ac_status); } &&
1cf0118d
RO
5296 { ac_try='test -z "$ac_c_werror_flag"
5297 || test ! -s conftest.err'
bf3b7cd3
JD
5298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5299 (eval $ac_try) 2>&5
5300 ac_status=$?
5301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5302 (exit $ac_status); }; } &&
5303 { ac_try='test -s conftest.$ac_objext'
5304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5305 (eval $ac_try) 2>&5
5306 ac_status=$?
5307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5308 (exit $ac_status); }; }; then
5309 ac_hi=$ac_mid; break
5310else
5311 echo "$as_me: failed program was:" >&5
5312sed 's/^/| /' conftest.$ac_ext >&5
5313
5314ac_lo=`expr $ac_mid + 1`
5315 if test $ac_lo -le $ac_mid; then
5316 ac_lo= ac_hi=
5317 break
5318 fi
5319 ac_mid=`expr 2 '*' $ac_mid + 1`
5320fi
5321rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5322 done
5323else
5324 echo "$as_me: failed program was:" >&5
5325sed 's/^/| /' conftest.$ac_ext >&5
5326
5327cat >conftest.$ac_ext <<_ACEOF
5328/* confdefs.h. */
5329_ACEOF
5330cat confdefs.h >>conftest.$ac_ext
5331cat >>conftest.$ac_ext <<_ACEOF
5332/* end confdefs.h. */
5333$ac_includes_default
5334int
5335main ()
5336{
5337static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
5338test_array [0] = 0
5339
5340 ;
5341 return 0;
5342}
5343_ACEOF
5344rm -f conftest.$ac_objext
5345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5346 (eval $ac_compile) 2>conftest.er1
5347 ac_status=$?
5348 grep -v '^ *+' conftest.er1 >conftest.err
5349 rm -f conftest.er1
5350 cat conftest.err >&5
5351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5352 (exit $ac_status); } &&
1cf0118d
RO
5353 { ac_try='test -z "$ac_c_werror_flag"
5354 || test ! -s conftest.err'
bf3b7cd3
JD
5355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5356 (eval $ac_try) 2>&5
5357 ac_status=$?
5358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5359 (exit $ac_status); }; } &&
5360 { ac_try='test -s conftest.$ac_objext'
5361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5362 (eval $ac_try) 2>&5
5363 ac_status=$?
5364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5365 (exit $ac_status); }; }; then
5366 ac_hi=-1 ac_mid=-1
5367 while :; do
5368 cat >conftest.$ac_ext <<_ACEOF
5369/* confdefs.h. */
5370_ACEOF
5371cat confdefs.h >>conftest.$ac_ext
5372cat >>conftest.$ac_ext <<_ACEOF
5373/* end confdefs.h. */
5374$ac_includes_default
5375int
5376main ()
5377{
5378static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
5379test_array [0] = 0
5380
5381 ;
5382 return 0;
5383}
5384_ACEOF
5385rm -f conftest.$ac_objext
5386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5387 (eval $ac_compile) 2>conftest.er1
5388 ac_status=$?
5389 grep -v '^ *+' conftest.er1 >conftest.err
5390 rm -f conftest.er1
5391 cat conftest.err >&5
5392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5393 (exit $ac_status); } &&
1cf0118d
RO
5394 { ac_try='test -z "$ac_c_werror_flag"
5395 || test ! -s conftest.err'
bf3b7cd3
JD
5396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5397 (eval $ac_try) 2>&5
5398 ac_status=$?
5399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5400 (exit $ac_status); }; } &&
5401 { ac_try='test -s conftest.$ac_objext'
5402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5403 (eval $ac_try) 2>&5
5404 ac_status=$?
5405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5406 (exit $ac_status); }; }; then
5407 ac_lo=$ac_mid; break
5408else
5409 echo "$as_me: failed program was:" >&5
5410sed 's/^/| /' conftest.$ac_ext >&5
5411
5412ac_hi=`expr '(' $ac_mid ')' - 1`
5413 if test $ac_mid -le $ac_hi; then
5414 ac_lo= ac_hi=
5415 break
5416 fi
5417 ac_mid=`expr 2 '*' $ac_mid`
5418fi
5419rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5420 done
5421else
5422 echo "$as_me: failed program was:" >&5
5423sed 's/^/| /' conftest.$ac_ext >&5
5424
5425ac_lo= ac_hi=
5426fi
5427rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5428fi
5429rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5430# Binary search between lo and hi bounds.
5431while test "x$ac_lo" != "x$ac_hi"; do
5432 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5433 cat >conftest.$ac_ext <<_ACEOF
5434/* confdefs.h. */
5435_ACEOF
5436cat confdefs.h >>conftest.$ac_ext
5437cat >>conftest.$ac_ext <<_ACEOF
5438/* end confdefs.h. */
5439$ac_includes_default
5440int
5441main ()
5442{
5443static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5444test_array [0] = 0
5445
5446 ;
5447 return 0;
5448}
5449_ACEOF
5450rm -f conftest.$ac_objext
5451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5452 (eval $ac_compile) 2>conftest.er1
5453 ac_status=$?
5454 grep -v '^ *+' conftest.er1 >conftest.err
5455 rm -f conftest.er1
5456 cat conftest.err >&5
5457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5458 (exit $ac_status); } &&
1cf0118d
RO
5459 { ac_try='test -z "$ac_c_werror_flag"
5460 || test ! -s conftest.err'
bf3b7cd3
JD
5461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5462 (eval $ac_try) 2>&5
5463 ac_status=$?
5464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5465 (exit $ac_status); }; } &&
5466 { ac_try='test -s conftest.$ac_objext'
5467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5468 (eval $ac_try) 2>&5
5469 ac_status=$?
5470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5471 (exit $ac_status); }; }; then
5472 ac_hi=$ac_mid
5473else
5474 echo "$as_me: failed program was:" >&5
5475sed 's/^/| /' conftest.$ac_ext >&5
5476
5477ac_lo=`expr '(' $ac_mid ')' + 1`
5478fi
5479rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5480done
5481case $ac_lo in
5482?*) ac_cv_sizeof_long_long=$ac_lo;;
5483'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5484See \`config.log' for more details." >&5
5485echo "$as_me: error: cannot compute sizeof (long long), 77
5486See \`config.log' for more details." >&2;}
5487 { (exit 1); exit 1; }; } ;;
5488esac
5489else
5490 if test "$cross_compiling" = yes; then
1cf0118d
RO
5491 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5492See \`config.log' for more details." >&5
5493echo "$as_me: error: cannot run test program while cross compiling
5494See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5495 { (exit 1); exit 1; }; }
5496else
5497 cat >conftest.$ac_ext <<_ACEOF
5498/* confdefs.h. */
5499_ACEOF
5500cat confdefs.h >>conftest.$ac_ext
5501cat >>conftest.$ac_ext <<_ACEOF
5502/* end confdefs.h. */
5503$ac_includes_default
5504long longval () { return (long) (sizeof (long long)); }
5505unsigned long ulongval () { return (long) (sizeof (long long)); }
5506#include <stdio.h>
5507#include <stdlib.h>
5508int
5509main ()
5510{
5511
5512 FILE *f = fopen ("conftest.val", "w");
5513 if (! f)
5514 exit (1);
5515 if (((long) (sizeof (long long))) < 0)
5516 {
5517 long i = longval ();
5518 if (i != ((long) (sizeof (long long))))
5519 exit (1);
5520 fprintf (f, "%ld\n", i);
5521 }
5522 else
5523 {
5524 unsigned long i = ulongval ();
5525 if (i != ((long) (sizeof (long long))))
5526 exit (1);
5527 fprintf (f, "%lu\n", i);
5528 }
5529 exit (ferror (f) || fclose (f) != 0);
5530
5531 ;
5532 return 0;
5533}
5534_ACEOF
5535rm -f conftest$ac_exeext
5536if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5537 (eval $ac_link) 2>&5
5538 ac_status=$?
5539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5540 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5542 (eval $ac_try) 2>&5
5543 ac_status=$?
5544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5545 (exit $ac_status); }; }; then
5546 ac_cv_sizeof_long_long=`cat conftest.val`
5547else
5548 echo "$as_me: program exited with status $ac_status" >&5
5549echo "$as_me: failed program was:" >&5
5550sed 's/^/| /' conftest.$ac_ext >&5
5551
5552( exit $ac_status )
5553{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5554See \`config.log' for more details." >&5
5555echo "$as_me: error: cannot compute sizeof (long long), 77
5556See \`config.log' for more details." >&2;}
5557 { (exit 1); exit 1; }; }
5558fi
5559rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5560fi
5561fi
5562rm -f conftest.val
5563else
5564 ac_cv_sizeof_long_long=0
5565fi
5566fi
5567echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5568echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
5569cat >>confdefs.h <<_ACEOF
5570#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5571_ACEOF
5572
5573
5574fi
5ec1c5e6
KC
5575
5576echo "$as_me:$LINENO: checking for __int64" >&5
5577echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5578if test "${ac_cv_type___int64+set}" = set; then
5579 echo $ECHO_N "(cached) $ECHO_C" >&6
5580else
5581 cat >conftest.$ac_ext <<_ACEOF
5582/* confdefs.h. */
5583_ACEOF
5584cat confdefs.h >>conftest.$ac_ext
5585cat >>conftest.$ac_ext <<_ACEOF
5586/* end confdefs.h. */
5587$ac_includes_default
5588int
5589main ()
5590{
5591if ((__int64 *) 0)
5592 return 0;
5593if (sizeof (__int64))
5594 return 0;
5595 ;
5596 return 0;
5597}
5598_ACEOF
5599rm -f conftest.$ac_objext
5600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5601 (eval $ac_compile) 2>conftest.er1
5602 ac_status=$?
5603 grep -v '^ *+' conftest.er1 >conftest.err
5604 rm -f conftest.er1
5605 cat conftest.err >&5
5606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5607 (exit $ac_status); } &&
1cf0118d
RO
5608 { ac_try='test -z "$ac_c_werror_flag"
5609 || test ! -s conftest.err'
5ec1c5e6
KC
5610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5611 (eval $ac_try) 2>&5
5612 ac_status=$?
5613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5614 (exit $ac_status); }; } &&
5615 { ac_try='test -s conftest.$ac_objext'
5616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5617 (eval $ac_try) 2>&5
5618 ac_status=$?
5619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5620 (exit $ac_status); }; }; then
5621 ac_cv_type___int64=yes
5622else
5623 echo "$as_me: failed program was:" >&5
5624sed 's/^/| /' conftest.$ac_ext >&5
5625
5626ac_cv_type___int64=no
5627fi
5628rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5629fi
5630echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5631echo "${ECHO_T}$ac_cv_type___int64" >&6
5632if test $ac_cv_type___int64 = yes; then
5633
5634cat >>confdefs.h <<_ACEOF
5635#define HAVE___INT64 1
5636_ACEOF
5637
5638echo "$as_me:$LINENO: checking for __int64" >&5
bf3b7cd3
JD
5639echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5640if test "${ac_cv_type___int64+set}" = set; then
5641 echo $ECHO_N "(cached) $ECHO_C" >&6
5642else
ba479fd2 5643 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5644/* confdefs.h. */
5645_ACEOF
5646cat confdefs.h >>conftest.$ac_ext
5647cat >>conftest.$ac_ext <<_ACEOF
5648/* end confdefs.h. */
bf3b7cd3 5649$ac_includes_default
ba479fd2
NN
5650int
5651main ()
5652{
bf3b7cd3
JD
5653if ((__int64 *) 0)
5654 return 0;
5655if (sizeof (__int64))
5656 return 0;
ba479fd2
NN
5657 ;
5658 return 0;
5659}
5660_ACEOF
5661rm -f conftest.$ac_objext
5662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5663 (eval $ac_compile) 2>conftest.er1
ba479fd2 5664 ac_status=$?
86da66b5
HPN
5665 grep -v '^ *+' conftest.er1 >conftest.err
5666 rm -f conftest.er1
5667 cat conftest.err >&5
ba479fd2
NN
5668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5669 (exit $ac_status); } &&
1cf0118d
RO
5670 { ac_try='test -z "$ac_c_werror_flag"
5671 || test ! -s conftest.err'
86da66b5
HPN
5672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5673 (eval $ac_try) 2>&5
5674 ac_status=$?
5675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5676 (exit $ac_status); }; } &&
5677 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5679 (eval $ac_try) 2>&5
5680 ac_status=$?
5681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5682 (exit $ac_status); }; }; then
bf3b7cd3 5683 ac_cv_type___int64=yes
75b6f3fd 5684else
ba479fd2
NN
5685 echo "$as_me: failed program was:" >&5
5686sed 's/^/| /' conftest.$ac_ext >&5
5687
bf3b7cd3 5688ac_cv_type___int64=no
75b6f3fd 5689fi
86da66b5 5690rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5691fi
bf3b7cd3
JD
5692echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5693echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 5694
bf3b7cd3
JD
5695echo "$as_me:$LINENO: checking size of __int64" >&5
5696echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
5697if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 5698 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 5699else
bf3b7cd3
JD
5700 if test "$ac_cv_type___int64" = yes; then
5701 # The cast to unsigned long works around a bug in the HP C Compiler
5702 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5703 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5704 # This bug is HP SR number 8606223364.
5705 if test "$cross_compiling" = yes; then
5706 # Depending upon the size, compute the lo and hi bounds.
5707cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5708/* confdefs.h. */
5709_ACEOF
5710cat confdefs.h >>conftest.$ac_ext
5711cat >>conftest.$ac_ext <<_ACEOF
5712/* end confdefs.h. */
bf3b7cd3 5713$ac_includes_default
ba479fd2
NN
5714int
5715main ()
5716{
bf3b7cd3
JD
5717static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
5718test_array [0] = 0
5719
ba479fd2
NN
5720 ;
5721 return 0;
5722}
5723_ACEOF
5724rm -f conftest.$ac_objext
5725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5726 (eval $ac_compile) 2>conftest.er1
ba479fd2 5727 ac_status=$?
86da66b5
HPN
5728 grep -v '^ *+' conftest.er1 >conftest.err
5729 rm -f conftest.er1
5730 cat conftest.err >&5
ba479fd2
NN
5731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); } &&
1cf0118d
RO
5733 { ac_try='test -z "$ac_c_werror_flag"
5734 || test ! -s conftest.err'
86da66b5
HPN
5735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5736 (eval $ac_try) 2>&5
5737 ac_status=$?
5738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5739 (exit $ac_status); }; } &&
5740 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5742 (eval $ac_try) 2>&5
5743 ac_status=$?
5744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5745 (exit $ac_status); }; }; then
bf3b7cd3
JD
5746 ac_lo=0 ac_mid=0
5747 while :; do
5748 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5749/* confdefs.h. */
5750_ACEOF
5751cat confdefs.h >>conftest.$ac_ext
5752cat >>conftest.$ac_ext <<_ACEOF
5753/* end confdefs.h. */
bf3b7cd3 5754$ac_includes_default
ba479fd2
NN
5755int
5756main ()
5757{
bf3b7cd3
JD
5758static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5759test_array [0] = 0
5760
ba479fd2
NN
5761 ;
5762 return 0;
5763}
5764_ACEOF
5765rm -f conftest.$ac_objext
5766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5767 (eval $ac_compile) 2>conftest.er1
ba479fd2 5768 ac_status=$?
86da66b5
HPN
5769 grep -v '^ *+' conftest.er1 >conftest.err
5770 rm -f conftest.er1
5771 cat conftest.err >&5
ba479fd2
NN
5772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5773 (exit $ac_status); } &&
1cf0118d
RO
5774 { ac_try='test -z "$ac_c_werror_flag"
5775 || test ! -s conftest.err'
86da66b5
HPN
5776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5777 (eval $ac_try) 2>&5
5778 ac_status=$?
5779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5780 (exit $ac_status); }; } &&
5781 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5783 (eval $ac_try) 2>&5
5784 ac_status=$?
5785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5786 (exit $ac_status); }; }; then
bf3b7cd3 5787 ac_hi=$ac_mid; break
75e93faa 5788else
ba479fd2
NN
5789 echo "$as_me: failed program was:" >&5
5790sed 's/^/| /' conftest.$ac_ext >&5
5791
bf3b7cd3
JD
5792ac_lo=`expr $ac_mid + 1`
5793 if test $ac_lo -le $ac_mid; then
5794 ac_lo= ac_hi=
5795 break
5796 fi
5797 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 5798fi
86da66b5 5799rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5800 done
75e93faa 5801else
bf3b7cd3
JD
5802 echo "$as_me: failed program was:" >&5
5803sed 's/^/| /' conftest.$ac_ext >&5
5804
5805cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5806/* confdefs.h. */
5807_ACEOF
5808cat confdefs.h >>conftest.$ac_ext
5809cat >>conftest.$ac_ext <<_ACEOF
5810/* end confdefs.h. */
bf3b7cd3 5811$ac_includes_default
ba479fd2
NN
5812int
5813main ()
5814{
bf3b7cd3
JD
5815static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
5816test_array [0] = 0
5817
ba479fd2
NN
5818 ;
5819 return 0;
5820}
5821_ACEOF
5822rm -f conftest.$ac_objext
5823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5824 (eval $ac_compile) 2>conftest.er1
ba479fd2 5825 ac_status=$?
86da66b5
HPN
5826 grep -v '^ *+' conftest.er1 >conftest.err
5827 rm -f conftest.er1
5828 cat conftest.err >&5
ba479fd2
NN
5829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5830 (exit $ac_status); } &&
1cf0118d
RO
5831 { ac_try='test -z "$ac_c_werror_flag"
5832 || test ! -s conftest.err'
86da66b5
HPN
5833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5834 (eval $ac_try) 2>&5
5835 ac_status=$?
5836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5837 (exit $ac_status); }; } &&
5838 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5840 (eval $ac_try) 2>&5
5841 ac_status=$?
5842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5843 (exit $ac_status); }; }; then
bf3b7cd3
JD
5844 ac_hi=-1 ac_mid=-1
5845 while :; do
5846 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5847/* confdefs.h. */
5848_ACEOF
5849cat confdefs.h >>conftest.$ac_ext
5850cat >>conftest.$ac_ext <<_ACEOF
5851/* end confdefs.h. */
bf3b7cd3 5852$ac_includes_default
ba479fd2
NN
5853int
5854main ()
5855{
bf3b7cd3
JD
5856static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
5857test_array [0] = 0
5858
ba479fd2
NN
5859 ;
5860 return 0;
5861}
5862_ACEOF
5863rm -f conftest.$ac_objext
5864if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5865 (eval $ac_compile) 2>conftest.er1
ba479fd2 5866 ac_status=$?
86da66b5
HPN
5867 grep -v '^ *+' conftest.er1 >conftest.err
5868 rm -f conftest.er1
5869 cat conftest.err >&5
ba479fd2
NN
5870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5871 (exit $ac_status); } &&
1cf0118d
RO
5872 { ac_try='test -z "$ac_c_werror_flag"
5873 || test ! -s conftest.err'
86da66b5
HPN
5874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5875 (eval $ac_try) 2>&5
5876 ac_status=$?
5877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5878 (exit $ac_status); }; } &&
5879 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5881 (eval $ac_try) 2>&5
5882 ac_status=$?
5883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5884 (exit $ac_status); }; }; then
bf3b7cd3 5885 ac_lo=$ac_mid; break
04cabffc 5886else
ba479fd2
NN
5887 echo "$as_me: failed program was:" >&5
5888sed 's/^/| /' conftest.$ac_ext >&5
5889
bf3b7cd3
JD
5890ac_hi=`expr '(' $ac_mid ')' - 1`
5891 if test $ac_mid -le $ac_hi; then
5892 ac_lo= ac_hi=
5893 break
5894 fi
5895 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 5896fi
86da66b5 5897rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5898 done
5899else
5900 echo "$as_me: failed program was:" >&5
5901sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 5902
bf3b7cd3 5903ac_lo= ac_hi=
414d23ae 5904fi
bf3b7cd3 5905rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5906fi
bf3b7cd3
JD
5907rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5908# Binary search between lo and hi bounds.
5909while test "x$ac_lo" != "x$ac_hi"; do
5910 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 5911 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5912/* confdefs.h. */
5913_ACEOF
5914cat confdefs.h >>conftest.$ac_ext
5915cat >>conftest.$ac_ext <<_ACEOF
5916/* end confdefs.h. */
bf3b7cd3 5917$ac_includes_default
ba479fd2
NN
5918int
5919main ()
5920{
bf3b7cd3
JD
5921static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5922test_array [0] = 0
5923
ba479fd2
NN
5924 ;
5925 return 0;
5926}
5927_ACEOF
5928rm -f conftest.$ac_objext
5929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5930 (eval $ac_compile) 2>conftest.er1
ba479fd2 5931 ac_status=$?
86da66b5
HPN
5932 grep -v '^ *+' conftest.er1 >conftest.err
5933 rm -f conftest.er1
5934 cat conftest.err >&5
ba479fd2
NN
5935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5936 (exit $ac_status); } &&
1cf0118d
RO
5937 { ac_try='test -z "$ac_c_werror_flag"
5938 || test ! -s conftest.err'
86da66b5
HPN
5939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5940 (eval $ac_try) 2>&5
5941 ac_status=$?
5942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5943 (exit $ac_status); }; } &&
5944 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5946 (eval $ac_try) 2>&5
5947 ac_status=$?
5948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5949 (exit $ac_status); }; }; then
bf3b7cd3 5950 ac_hi=$ac_mid
75e93faa 5951else
ba479fd2
NN
5952 echo "$as_me: failed program was:" >&5
5953sed 's/^/| /' conftest.$ac_ext >&5
5954
bf3b7cd3 5955ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 5956fi
86da66b5 5957rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5958done
bf3b7cd3
JD
5959case $ac_lo in
5960?*) ac_cv_sizeof___int64=$ac_lo;;
5961'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
5962See \`config.log' for more details." >&5
5963echo "$as_me: error: cannot compute sizeof (__int64), 77
5964See \`config.log' for more details." >&2;}
5965 { (exit 1); exit 1; }; } ;;
5966esac
5967else
5968 if test "$cross_compiling" = yes; then
1cf0118d
RO
5969 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5970See \`config.log' for more details." >&5
5971echo "$as_me: error: cannot run test program while cross compiling
5972See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5973 { (exit 1); exit 1; }; }
5974else
5975 cat >conftest.$ac_ext <<_ACEOF
5976/* confdefs.h. */
5977_ACEOF
5978cat confdefs.h >>conftest.$ac_ext
5979cat >>conftest.$ac_ext <<_ACEOF
5980/* end confdefs.h. */
5981$ac_includes_default
5982long longval () { return (long) (sizeof (__int64)); }
5983unsigned long ulongval () { return (long) (sizeof (__int64)); }
5984#include <stdio.h>
5985#include <stdlib.h>
5986int
5987main ()
5988{
414d23ae 5989
bf3b7cd3
JD
5990 FILE *f = fopen ("conftest.val", "w");
5991 if (! f)
5992 exit (1);
5993 if (((long) (sizeof (__int64))) < 0)
5994 {
5995 long i = longval ();
5996 if (i != ((long) (sizeof (__int64))))
5997 exit (1);
5998 fprintf (f, "%ld\n", i);
5999 }
6000 else
6001 {
6002 unsigned long i = ulongval ();
6003 if (i != ((long) (sizeof (__int64))))
6004 exit (1);
6005 fprintf (f, "%lu\n", i);
6006 }
6007 exit (ferror (f) || fclose (f) != 0);
6008
6009 ;
6010 return 0;
6011}
6012_ACEOF
6013rm -f conftest$ac_exeext
6014if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6015 (eval $ac_link) 2>&5
6016 ac_status=$?
6017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6018 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6020 (eval $ac_try) 2>&5
6021 ac_status=$?
6022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6023 (exit $ac_status); }; }; then
6024 ac_cv_sizeof___int64=`cat conftest.val`
6025else
6026 echo "$as_me: program exited with status $ac_status" >&5
6027echo "$as_me: failed program was:" >&5
6028sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6029
bf3b7cd3
JD
6030( exit $ac_status )
6031{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
6032See \`config.log' for more details." >&5
6033echo "$as_me: error: cannot compute sizeof (__int64), 77
6034See \`config.log' for more details." >&2;}
ba479fd2 6035 { (exit 1); exit 1; }; }
414d23ae 6036fi
bf3b7cd3
JD
6037rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6038fi
6039fi
6040rm -f conftest.val
6041else
6042 ac_cv_sizeof___int64=0
6043fi
6044fi
ba479fd2
NN
6045echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6046echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 6047cat >>confdefs.h <<_ACEOF
414d23ae 6048#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6049_ACEOF
414d23ae 6050
cafe096b 6051
414d23ae
HPN
6052fi
6053
5ec1c5e6 6054
34a86c2b
NN
6055# ---------------------
6056# Warnings and checking
6057# ---------------------
6058
b5472e1d
NN
6059# Check $CC warning features (if it's GCC).
6060# We want to use -pedantic, but we don't want warnings about
6061# * 'long long'
6062# * variadic macros
89a42ac8 6063# * overlong strings
b5472e1d
NN
6064# So, we only use -pedantic if we can disable those warnings.
6065
6066echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6067echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
6068if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6069 echo $ECHO_N "(cached) $ECHO_C" >&6
6070else
6071 save_CFLAGS="$CFLAGS"
6072 CFLAGS="-Wno-long-long"
6073 cat >conftest.$ac_ext <<_ACEOF
6074/* confdefs.h. */
6075_ACEOF
6076cat confdefs.h >>conftest.$ac_ext
6077cat >>conftest.$ac_ext <<_ACEOF
6078/* end confdefs.h. */
6079
6080_ACEOF
6081rm -f conftest.$ac_objext
6082if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6083 (eval $ac_compile) 2>conftest.er1
6084 ac_status=$?
6085 grep -v '^ *+' conftest.er1 >conftest.err
6086 rm -f conftest.er1
6087 cat conftest.err >&5
6088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6089 (exit $ac_status); } &&
1cf0118d
RO
6090 { ac_try='test -z "$ac_c_werror_flag"
6091 || test ! -s conftest.err'
b5472e1d
NN
6092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6093 (eval $ac_try) 2>&5
6094 ac_status=$?
6095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6096 (exit $ac_status); }; } &&
6097 { ac_try='test -s conftest.$ac_objext'
6098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6099 (eval $ac_try) 2>&5
6100 ac_status=$?
6101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6102 (exit $ac_status); }; }; then
6103 ac_cv_prog_cc_w_no_long_long=yes
6104else
6105 echo "$as_me: failed program was:" >&5
6106sed 's/^/| /' conftest.$ac_ext >&5
6107
6108ac_cv_prog_cc_w_no_long_long=no
6109fi
6110rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6111 CFLAGS="$save_CFLAGS"
6112
6113fi
6114echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6115echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
6116
6117echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6118echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
6119if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6120 echo $ECHO_N "(cached) $ECHO_C" >&6
6121else
6122 save_CFLAGS="$CFLAGS"
6123 CFLAGS="-Wno-variadic-macros"
6124 cat >conftest.$ac_ext <<_ACEOF
6125/* confdefs.h. */
6126_ACEOF
6127cat confdefs.h >>conftest.$ac_ext
6128cat >>conftest.$ac_ext <<_ACEOF
6129/* end confdefs.h. */
6130
6131_ACEOF
6132rm -f conftest.$ac_objext
6133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6134 (eval $ac_compile) 2>conftest.er1
6135 ac_status=$?
6136 grep -v '^ *+' conftest.er1 >conftest.err
6137 rm -f conftest.er1
6138 cat conftest.err >&5
6139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6140 (exit $ac_status); } &&
1cf0118d
RO
6141 { ac_try='test -z "$ac_c_werror_flag"
6142 || test ! -s conftest.err'
b5472e1d
NN
6143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6144 (eval $ac_try) 2>&5
6145 ac_status=$?
6146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6147 (exit $ac_status); }; } &&
6148 { ac_try='test -s conftest.$ac_objext'
6149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6150 (eval $ac_try) 2>&5
6151 ac_status=$?
6152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6153 (exit $ac_status); }; }; then
6154 ac_cv_prog_cc_w_no_variadic_macros=yes
6155else
6156 echo "$as_me: failed program was:" >&5
6157sed 's/^/| /' conftest.$ac_ext >&5
6158
6159ac_cv_prog_cc_w_no_variadic_macros=no
6160fi
6161rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6162 CFLAGS="$save_CFLAGS"
6163
6164fi
6165echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6166echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
6167
89a42ac8
ZW
6168echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5
6169echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6
6170if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then
6171 echo $ECHO_N "(cached) $ECHO_C" >&6
6172else
6173 save_CFLAGS="$CFLAGS"
6174 CFLAGS="-Wno-overlength-strings"
6175 cat >conftest.$ac_ext <<_ACEOF
6176/* confdefs.h. */
6177_ACEOF
6178cat confdefs.h >>conftest.$ac_ext
6179cat >>conftest.$ac_ext <<_ACEOF
6180/* end confdefs.h. */
6181
6182_ACEOF
6183rm -f conftest.$ac_objext
6184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6185 (eval $ac_compile) 2>conftest.er1
6186 ac_status=$?
6187 grep -v '^ *+' conftest.er1 >conftest.err
6188 rm -f conftest.er1
6189 cat conftest.err >&5
6190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6191 (exit $ac_status); } &&
1cf0118d
RO
6192 { ac_try='test -z "$ac_c_werror_flag"
6193 || test ! -s conftest.err'
89a42ac8
ZW
6194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6195 (eval $ac_try) 2>&5
6196 ac_status=$?
6197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6198 (exit $ac_status); }; } &&
6199 { ac_try='test -s conftest.$ac_objext'
6200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6201 (eval $ac_try) 2>&5
6202 ac_status=$?
6203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6204 (exit $ac_status); }; }; then
6205 ac_cv_prog_cc_w_no_overlength_strings=yes
6206else
6207 echo "$as_me: failed program was:" >&5
6208sed 's/^/| /' conftest.$ac_ext >&5
6209
6210ac_cv_prog_cc_w_no_overlength_strings=no
6211fi
6212rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6213 CFLAGS="$save_CFLAGS"
6214
6215fi
6216echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5
6217echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6
6218
34a86c2b 6219strict1_warn=
b5472e1d 6220if test $ac_cv_prog_cc_w_no_long_long = yes \
89a42ac8
ZW
6221 && test $ac_cv_prog_cc_w_no_variadic_macros = yes \
6222 && test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then
6223 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
34a86c2b
NN
6224fi
6225
643d3bd2
NN
6226# Add -Wold-style-definition if it's accepted
6227echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6228echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
6229if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6230 echo $ECHO_N "(cached) $ECHO_C" >&6
6231else
6232 save_CFLAGS="$CFLAGS"
6233 CFLAGS="-Wold-style-definition"
6234 cat >conftest.$ac_ext <<_ACEOF
6235/* confdefs.h. */
6236_ACEOF
6237cat confdefs.h >>conftest.$ac_ext
6238cat >>conftest.$ac_ext <<_ACEOF
6239/* end confdefs.h. */
6240
6241_ACEOF
6242rm -f conftest.$ac_objext
6243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6244 (eval $ac_compile) 2>conftest.er1
6245 ac_status=$?
6246 grep -v '^ *+' conftest.er1 >conftest.err
6247 rm -f conftest.er1
6248 cat conftest.err >&5
6249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6250 (exit $ac_status); } &&
1cf0118d
RO
6251 { ac_try='test -z "$ac_c_werror_flag"
6252 || test ! -s conftest.err'
643d3bd2
NN
6253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6254 (eval $ac_try) 2>&5
6255 ac_status=$?
6256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6257 (exit $ac_status); }; } &&
6258 { ac_try='test -s conftest.$ac_objext'
6259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6260 (eval $ac_try) 2>&5
6261 ac_status=$?
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6263 (exit $ac_status); }; }; then
6264 ac_cv_prog_cc_w_old_style_definition=yes
6265else
6266 echo "$as_me: failed program was:" >&5
6267sed 's/^/| /' conftest.$ac_ext >&5
6268
6269ac_cv_prog_cc_w_old_style_definition=no
6270fi
6271rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6272 CFLAGS="$save_CFLAGS"
6273
6274fi
6275echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
6276echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
6277if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
6278 strict1_warn="${strict1_warn} -Wold-style-definition"
6279fi
6280
ac0f3f39
KG
6281# Add -Wmissing-format-attribute if it's accepted
6282echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5
6283echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6
6284if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then
6285 echo $ECHO_N "(cached) $ECHO_C" >&6
6286else
6287 save_CFLAGS="$CFLAGS"
6288 CFLAGS="-Wmissing-format-attribute"
6289 cat >conftest.$ac_ext <<_ACEOF
6290/* confdefs.h. */
6291_ACEOF
6292cat confdefs.h >>conftest.$ac_ext
6293cat >>conftest.$ac_ext <<_ACEOF
6294/* end confdefs.h. */
6295
6296_ACEOF
6297rm -f conftest.$ac_objext
6298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6299 (eval $ac_compile) 2>conftest.er1
6300 ac_status=$?
6301 grep -v '^ *+' conftest.er1 >conftest.err
6302 rm -f conftest.er1
6303 cat conftest.err >&5
6304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6305 (exit $ac_status); } &&
1cf0118d
RO
6306 { ac_try='test -z "$ac_c_werror_flag"
6307 || test ! -s conftest.err'
ac0f3f39
KG
6308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6309 (eval $ac_try) 2>&5
6310 ac_status=$?
6311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6312 (exit $ac_status); }; } &&
6313 { ac_try='test -s conftest.$ac_objext'
6314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6315 (eval $ac_try) 2>&5
6316 ac_status=$?
6317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6318 (exit $ac_status); }; }; then
6319 ac_cv_prog_cc_w_missing_format_attribute=yes
6320else
6321 echo "$as_me: failed program was:" >&5
6322sed 's/^/| /' conftest.$ac_ext >&5
6323
6324ac_cv_prog_cc_w_missing_format_attribute=no
6325fi
6326rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6327 CFLAGS="$save_CFLAGS"
6328
6329fi
6330echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5
6331echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6
6332if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then
6333 strict1_warn="${strict1_warn} -Wmissing-format-attribute"
6334fi
6335
09a9c095
NN
6336# Enable -Werror, period.
6337# Check whether --enable-werror_always or --disable-werror_always was given.
6338if test "${enable_werror_always+set}" = set; then
6339 enableval="$enable_werror_always"
6340
6341else
6342 enable_werror_always=no
6343fi;
6344if test x${enable_werror_always} = xyes ; then
6345 strict1_warn="${strict1_warn} -Werror"
6346 WERROR=-Werror
6347fi
6348
ac0f3f39
KG
6349
6350
373477bb
GDR
6351# Get C++ compatibility warning flag, if supported.
6352echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5
6353echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6
6354if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then
6355 echo $ECHO_N "(cached) $ECHO_C" >&6
6356else
6357 save_CFLAGS="$CFLAGS"
6358 CFLAGS="-Wc++-compat"
6359 cat >conftest.$ac_ext <<_ACEOF
6360/* confdefs.h. */
6361_ACEOF
6362cat confdefs.h >>conftest.$ac_ext
6363cat >>conftest.$ac_ext <<_ACEOF
6364/* end confdefs.h. */
6365
6366_ACEOF
6367rm -f conftest.$ac_objext
6368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6369 (eval $ac_compile) 2>conftest.er1
6370 ac_status=$?
6371 grep -v '^ *+' conftest.er1 >conftest.err
6372 rm -f conftest.er1
6373 cat conftest.err >&5
6374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6375 (exit $ac_status); } &&
1cf0118d
RO
6376 { ac_try='test -z "$ac_c_werror_flag"
6377 || test ! -s conftest.err'
373477bb
GDR
6378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6379 (eval $ac_try) 2>&5
6380 ac_status=$?
6381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6382 (exit $ac_status); }; } &&
6383 { ac_try='test -s conftest.$ac_objext'
6384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6385 (eval $ac_try) 2>&5
6386 ac_status=$?
6387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6388 (exit $ac_status); }; }; then
6389 ac_cv_prog_cc_w_cxx_compat=yes
6390else
6391 echo "$as_me: failed program was:" >&5
6392sed 's/^/| /' conftest.$ac_ext >&5
6393
6394ac_cv_prog_cc_w_cxx_compat=no
6395fi
6396rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6397 CFLAGS="$save_CFLAGS"
6398
6399fi
6400echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5
6401echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6
6402if test x${ac_cv_prog_cc_w_cxx_compat} = xyes; then
6403 cxx_compat_warn="-Wc++-compat"
6404fi
6405
6406
6407
ba479fd2 6408# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
6409# That's useful for people building cross-compilers, or just running a
6410# quick `make'.
6411warn_cflags=
6412if test "x$GCC" = "xyes"; then
6413 warn_cflags='$(GCC_WARN_CFLAGS)'
6414fi
6415
6416
dd859b8a 6417# Enable -Werror in bootstrap stage2 and later.
a1286ef5
ZW
6418is_release=
6419if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6420 is_release=yes
6421fi
dd859b8a
KG
6422# Check whether --enable-werror or --disable-werror was given.
6423if test "${enable_werror+set}" = set; then
6424 enableval="$enable_werror"
ba479fd2 6425
dd859b8a 6426else
06c37c96
NS
6427 if test x$is_release = x ; then
6428 # Default to "yes" on development branches.
dd859b8a 6429 enable_werror=yes
06c37c96
NS
6430else
6431 # Default to "no" on release branches.
6432 enable_werror=no
6433fi
ba479fd2 6434fi;
dd859b8a
KG
6435if test x$enable_werror = xyes ; then
6436 WERROR=-Werror
6437fi
6438
6439
414d23ae
HPN
6440# Enable expensive internal checks
6441# Check whether --enable-checking or --disable-checking was given.
6442if test "${enable_checking+set}" = set; then
6443 enableval="$enable_checking"
e1bbfc5c
NS
6444 ac_checking_flags="${enableval}"
6445else
6446
6447# Determine the default checks.
6448if test x$is_release = x ; then
6449 ac_checking_flags=yes
6450else
6451 ac_checking_flags=release
6452fi
6453fi;
6454ac_assert_checking=1
6455ac_checking=
cdce5c16
NS
6456ac_fold_checking=
6457ac_gc_checking=
6458ac_gc_always_collect=
414d23ae
HPN
6459ac_rtl_checking=
6460ac_rtlflag_checking=
b53ef395 6461ac_runtime_checking=1
cdce5c16
NS
6462ac_tree_checking=
6463ac_valgrind_checking=
e1bbfc5c
NS
6464IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6465for check in $ac_checking_flags
6466do
6467 case $check in
cdce5c16 6468 # these set all the flags to specific states
e1bbfc5c 6469 yes) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6470 ac_fold_checking= ; ac_gc_checking=1 ;
6471 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6472 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
cdce5c16
NS
6473 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6474 no|none) ac_assert_checking= ; ac_checking= ;
6475 ac_fold_checking= ; ac_gc_checking= ;
6476 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6477 ac_rtlflag_checking= ; ac_runtime_checking= ;
cdce5c16 6478 ac_tree_checking= ; ac_valgrind_checking= ;;
e1bbfc5c 6479 all) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6480 ac_fold_checking=1 ; ac_gc_checking=1 ;
6481 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
6482 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6483 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6484 release) ac_assert_checking=1 ; ac_checking= ;
6485 ac_fold_checking= ; ac_gc_checking= ;
6486 ac_gc_always_collect= ; ac_rtl_checking= ;
6487 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6488 ac_tree_checking= ; ac_valgrind_checking= ;;
6489 # these enable particular checks
e1bbfc5c
NS
6490 assert) ac_assert_checking=1 ;;
6491 fold) ac_fold_checking=1 ;;
6492 gc) ac_gc_checking=1 ;;
6493 gcac) ac_gc_always_collect=1 ;;
6494 misc) ac_checking=1 ;;
e1bbfc5c 6495 rtl) ac_rtl_checking=1 ;;
cdce5c16 6496 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 6497 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 6498 tree) ac_tree_checking=1 ;;
cdce5c16 6499 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 6500 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
6501echo "$as_me: error: unknown check category $check" >&2;}
6502 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
6503 esac
6504done
6505IFS="$ac_save_IFS"
06c37c96 6506
ba479fd2
NN
6507nocommon_flag=""
6508if test x$ac_checking != x ; then
6509
6510cat >>confdefs.h <<\_ACEOF
6511#define ENABLE_CHECKING 1
6512_ACEOF
6513
6514 nocommon_flag=-fno-common
6515fi
6516
06c37c96
NS
6517if test x$ac_assert_checking != x ; then
6518
6519cat >>confdefs.h <<\_ACEOF
6520#define ENABLE_ASSERT_CHECKING 1
6521_ACEOF
6522
b53ef395 6523fi
232b67d9 6524
b53ef395
NS
6525if test x$ac_runtime_checking != x ; then
6526
6527cat >>confdefs.h <<\_ACEOF
6528#define ENABLE_RUNTIME_CHECKING 1
6529_ACEOF
6530
06c37c96 6531fi
ba479fd2
NN
6532if test x$ac_tree_checking != x ; then
6533
6534cat >>confdefs.h <<\_ACEOF
6535#define ENABLE_TREE_CHECKING 1
6536_ACEOF
6537
13f05fd0 6538 TREEBROWSER=tree-browser.o
ba479fd2 6539fi
13f05fd0 6540
ba479fd2
NN
6541if test x$ac_rtl_checking != x ; then
6542
6543cat >>confdefs.h <<\_ACEOF
6544#define ENABLE_RTL_CHECKING 1
6545_ACEOF
6546
6547fi
6548if test x$ac_rtlflag_checking != x ; then
6549
6550cat >>confdefs.h <<\_ACEOF
6551#define ENABLE_RTL_FLAG_CHECKING 1
6552_ACEOF
6553
6554fi
6555if test x$ac_gc_checking != x ; then
6556
6557cat >>confdefs.h <<\_ACEOF
6558#define ENABLE_GC_CHECKING 1
6559_ACEOF
6560
6561fi
6562if test x$ac_gc_always_collect != x ; then
6563
6564cat >>confdefs.h <<\_ACEOF
6565#define ENABLE_GC_ALWAYS_COLLECT 1
6566_ACEOF
6567
6568fi
6569if test x$ac_fold_checking != x ; then
6570
6571cat >>confdefs.h <<\_ACEOF
6572#define ENABLE_FOLD_CHECKING 1
6573_ACEOF
6574
6575fi
6576valgrind_path_defines=
6577valgrind_command=
6578
ba479fd2
NN
6579if test "${ac_cv_header_valgrind_h+set}" = set; then
6580 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6581echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6582if test "${ac_cv_header_valgrind_h+set}" = set; then
6583 echo $ECHO_N "(cached) $ECHO_C" >&6
6584fi
6585echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6586echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6587else
6588 # Is the header compilable?
6589echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6590echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
6591cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6592/* confdefs.h. */
6593_ACEOF
6594cat confdefs.h >>conftest.$ac_ext
6595cat >>conftest.$ac_ext <<_ACEOF
6596/* end confdefs.h. */
6597$ac_includes_default
63cf211a 6598#include <valgrind.h>
ba479fd2
NN
6599_ACEOF
6600rm -f conftest.$ac_objext
6601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6602 (eval $ac_compile) 2>conftest.er1
ba479fd2 6603 ac_status=$?
86da66b5
HPN
6604 grep -v '^ *+' conftest.er1 >conftest.err
6605 rm -f conftest.er1
6606 cat conftest.err >&5
ba479fd2
NN
6607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6608 (exit $ac_status); } &&
1cf0118d
RO
6609 { ac_try='test -z "$ac_c_werror_flag"
6610 || test ! -s conftest.err'
86da66b5
HPN
6611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6612 (eval $ac_try) 2>&5
6613 ac_status=$?
6614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6615 (exit $ac_status); }; } &&
6616 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6618 (eval $ac_try) 2>&5
6619 ac_status=$?
6620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6621 (exit $ac_status); }; }; then
6622 ac_header_compiler=yes
6623else
6624 echo "$as_me: failed program was:" >&5
6625sed 's/^/| /' conftest.$ac_ext >&5
6626
6627ac_header_compiler=no
6628fi
86da66b5 6629rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
6630echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6631echo "${ECHO_T}$ac_header_compiler" >&6
6632
6633# Is the header present?
6634echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6635echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
6636cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6637/* confdefs.h. */
6638_ACEOF
6639cat confdefs.h >>conftest.$ac_ext
6640cat >>conftest.$ac_ext <<_ACEOF
6641/* end confdefs.h. */
6642#include <valgrind.h>
6643_ACEOF
6644if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6645 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6646 ac_status=$?
6647 grep -v '^ *+' conftest.er1 >conftest.err
6648 rm -f conftest.er1
6649 cat conftest.err >&5
6650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6651 (exit $ac_status); } >/dev/null; then
6652 if test -s conftest.err; then
6653 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6654 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6655 else
6656 ac_cpp_err=
6657 fi
6658else
6659 ac_cpp_err=yes
6660fi
6661if test -z "$ac_cpp_err"; then
6662 ac_header_preproc=yes
6663else
6664 echo "$as_me: failed program was:" >&5
6665sed 's/^/| /' conftest.$ac_ext >&5
6666
6667 ac_header_preproc=no
6668fi
6669rm -f conftest.err conftest.$ac_ext
6670echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6671echo "${ECHO_T}$ac_header_preproc" >&6
6672
6673# So? What about this header?
86da66b5
HPN
6674case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6675 yes:no: )
ba479fd2
NN
6676 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6677echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
6678 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6679echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6680 ac_header_preproc=yes
ba479fd2 6681 ;;
86da66b5 6682 no:yes:* )
ba479fd2
NN
6683 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6684echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
6685 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6686echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6687 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6688echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6689 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6690echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
6691 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6692echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
6693 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6694echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
ba479fd2
NN
6695 (
6696 cat <<\_ASBOX
86da66b5
HPN
6697## ------------------------------------------ ##
6698## Report this to the AC_PACKAGE_NAME lists. ##
6699## ------------------------------------------ ##
ba479fd2
NN
6700_ASBOX
6701 ) |
6702 sed "s/^/$as_me: WARNING: /" >&2
6703 ;;
6704esac
6705echo "$as_me:$LINENO: checking for valgrind.h" >&5
6706echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6707if test "${ac_cv_header_valgrind_h+set}" = set; then
6708 echo $ECHO_N "(cached) $ECHO_C" >&6
6709else
6710 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 6711fi
ba479fd2
NN
6712echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6713echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6714
6e3f3080 6715fi
ba479fd2 6716if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
6717 have_valgrind_h=yes
6718else
ba479fd2 6719 have_valgrind_h=no
6938ec6c
NN
6720fi
6721
6722
ba479fd2 6723
cdce5c16 6724if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
6725 # It is certainly possible that there's valgrind but no valgrind.h.
6726 # GCC relies on making annotations so we must have both.
ba479fd2
NN
6727 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6728echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
6729 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6730/* confdefs.h. */
6731_ACEOF
6732cat confdefs.h >>conftest.$ac_ext
6733cat >>conftest.$ac_ext <<_ACEOF
6734/* end confdefs.h. */
a207b594 6735#include <valgrind/memcheck.h>
14011ca4
AJ
6736#ifndef VALGRIND_DISCARD
6737#error VALGRIND_DISCARD not defined
6738#endif
ba479fd2
NN
6739_ACEOF
6740if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6741 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6742 ac_status=$?
6743 grep -v '^ *+' conftest.er1 >conftest.err
6744 rm -f conftest.er1
6745 cat conftest.err >&5
6746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6747 (exit $ac_status); } >/dev/null; then
6748 if test -s conftest.err; then
6749 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6750 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6751 else
6752 ac_cpp_err=
6753 fi
6754else
6755 ac_cpp_err=yes
6756fi
6757if test -z "$ac_cpp_err"; then
a207b594
HPN
6758 gcc_cv_header_valgrind_memcheck_h=yes
6759else
ba479fd2
NN
6760 echo "$as_me: failed program was:" >&5
6761sed 's/^/| /' conftest.$ac_ext >&5
6762
a207b594
HPN
6763 gcc_cv_header_valgrind_memcheck_h=no
6764fi
ba479fd2
NN
6765rm -f conftest.err conftest.$ac_ext
6766 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6767echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6768 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6769echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
6770 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6771/* confdefs.h. */
6772_ACEOF
6773cat confdefs.h >>conftest.$ac_ext
6774cat >>conftest.$ac_ext <<_ACEOF
6775/* end confdefs.h. */
a207b594
HPN
6776#include <memcheck.h>
6777#ifndef VALGRIND_DISCARD
6778#error VALGRIND_DISCARD not defined
6779#endif
ba479fd2
NN
6780_ACEOF
6781if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6782 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6783 ac_status=$?
6784 grep -v '^ *+' conftest.er1 >conftest.err
6785 rm -f conftest.er1
6786 cat conftest.err >&5
6787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6788 (exit $ac_status); } >/dev/null; then
6789 if test -s conftest.err; then
6790 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6791 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6792 else
6793 ac_cpp_err=
6794 fi
6795else
6796 ac_cpp_err=yes
6797fi
6798if test -z "$ac_cpp_err"; then
14011ca4
AJ
6799 gcc_cv_header_memcheck_h=yes
6800else
ba479fd2
NN
6801 echo "$as_me: failed program was:" >&5
6802sed 's/^/| /' conftest.$ac_ext >&5
6803
cafe096b
EC
6804 gcc_cv_header_memcheck_h=no
6805fi
ba479fd2
NN
6806rm -f conftest.err conftest.$ac_ext
6807 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6808echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
6809
56694dd9
ZW
6810# Prepare PATH_SEPARATOR.
6811# The user is always right.
6812if test "${PATH_SEPARATOR+set}" != set; then
6813 echo "#! /bin/sh" >conf$$.sh
6814 echo "exit 0" >>conf$$.sh
6815 chmod +x conf$$.sh
6816 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6817 PATH_SEPARATOR=';'
6818 else
6819 PATH_SEPARATOR=:
6820 fi
6821 rm -f conf$$.sh
6822fi
6823
6824# Find out how to test for executable files. Don't use a zero-byte file,
6825# as systems may use methods other than mode bits to determine executability.
6826cat >conf$$.file <<_ASEOF
6827#! /bin/sh
6828exit 0
6829_ASEOF
6830chmod +x conf$$.file
6831if test -x conf$$.file >/dev/null 2>&1; then
6832 ac_executable_p="test -x"
6833else
6834 ac_executable_p="test -f"
6835fi
6836rm -f conf$$.file
6837
6838# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 6839set dummy valgrind; ac_word=$2
ba479fd2
NN
6840echo "$as_me:$LINENO: checking for $ac_word" >&5
6841echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6842if test "${ac_cv_path_valgrind_path+set}" = set; then
6843 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
6844else
6845 case "$valgrind_path" in
56694dd9
ZW
6846 [\\/]* | ?:[\\/]*)
6847 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6848 ;;
414d23ae 6849 *)
56694dd9
ZW
6850 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6851 for ac_dir in $PATH; do
6852 IFS="$ac_save_IFS"
6853 test -z "$ac_dir" && ac_dir=.
6854 for ac_exec_ext in '' $ac_executable_extensions; do
6855 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6856 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6857 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6858 break 2
6859 fi
6860 fi
6861 done
6862 done
6863 IFS="$ac_save_IFS"
6864 ;;
414d23ae 6865esac
75e93faa 6866fi
414d23ae
HPN
6867valgrind_path="$ac_cv_path_valgrind_path"
6868if test -n "$valgrind_path"; then
ba479fd2
NN
6869 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6870echo "${ECHO_T}$valgrind_path" >&6
414d23ae 6871else
ba479fd2
NN
6872 echo "$as_me:$LINENO: result: no" >&5
6873echo "${ECHO_T}no" >&6
414d23ae
HPN
6874fi
6875
a207b594
HPN
6876 if test "x$valgrind_path" = "x" \
6877 || (test $have_valgrind_h = no \
6878 && test $gcc_cv_header_memcheck_h = no \
6879 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
6880 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6881echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6882 { (exit 1); exit 1; }; }
414d23ae
HPN
6883 fi
6884 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6885 valgrind_command="$valgrind_path -q"
ba479fd2
NN
6886
6887cat >>confdefs.h <<\_ACEOF
414d23ae 6888#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 6889_ACEOF
75e93faa 6890
a207b594 6891 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
6892
6893cat >>confdefs.h <<\_ACEOF
a207b594 6894#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 6895_ACEOF
a207b594
HPN
6896
6897 fi
14011ca4 6898 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
6899
6900cat >>confdefs.h <<\_ACEOF
14011ca4 6901#define HAVE_MEMCHECK_H 1
ba479fd2 6902_ACEOF
14011ca4
AJ
6903
6904 fi
414d23ae 6905fi
75e93faa 6906
75e93faa
ZW
6907
6908
74ee1642
PB
6909# Check whether --enable-mapped-location or --disable-mapped-location was given.
6910if test "${enable_mapped_location+set}" = set; then
6911 enableval="$enable_mapped_location"
6912
6913else
6914 enable_mapped_location=no
6915fi;
6916
6917if test "$enable_mapped_location" = yes ; then
6918
6919cat >>confdefs.h <<\_ACEOF
6920#define USE_MAPPED_LOCATION 1
6921_ACEOF
6922
6923fi
6924
414d23ae
HPN
6925# Enable code coverage collection
6926# Check whether --enable-coverage or --disable-coverage was given.
6927if test "${enable_coverage+set}" = set; then
6928 enableval="$enable_coverage"
6929 case "${enableval}" in
6dd297da
NN
6930 yes|noopt)
6931 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6932 ;;
6933 opt)
6934 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6935 ;;
6936 no)
6937 # a.k.a. --disable-coverage
6938 coverage_flags=""
6939 ;;
6940 *)
6941 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
6942echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6943 { (exit 1); exit 1; }; }
6dd297da 6944 ;;
414d23ae 6945esac
75e93faa 6946else
414d23ae 6947 coverage_flags=""
ba479fd2 6948fi;
5c3bc9fb 6949
414d23ae 6950
439a7e54
DN
6951# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
6952if test "${enable_gather_detailed_mem_stats+set}" = set; then
6953 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 6954
439a7e54
DN
6955else
6956 enable_gather_detailed_mem_stats=no
ba479fd2 6957fi;
439a7e54 6958if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
6959
6960cat >>confdefs.h <<\_ACEOF
439a7e54 6961#define GATHER_STATISTICS 1
ba479fd2 6962_ACEOF
439a7e54
DN
6963
6964fi
6965
73458fb7
NN
6966# -------------------------------
6967# Miscenalleous configure options
6968# -------------------------------
34a86c2b
NN
6969
6970# With stabs
ba479fd2 6971
34a86c2b
NN
6972# Check whether --with-stabs or --without-stabs was given.
6973if test "${with_stabs+set}" = set; then
6974 withval="$with_stabs"
6975 stabs="$with_stabs"
6976else
6977 stabs=no
ba479fd2 6978fi;
cafe096b 6979
34a86c2b
NN
6980# Determine whether or not multilibs are enabled.
6981# Check whether --enable-multilib or --disable-multilib was given.
6982if test "${enable_multilib+set}" = set; then
6983 enableval="$enable_multilib"
ba479fd2 6984
34a86c2b
NN
6985else
6986 enable_multilib=yes
ba479fd2 6987fi;
75e93faa 6988
34a86c2b 6989
414d23ae
HPN
6990# Enable __cxa_atexit for C++.
6991# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
6992if test "${enable___cxa_atexit+set}" = set; then
6993 enableval="$enable___cxa_atexit"
75e93faa 6994
ba479fd2 6995fi;
75e93faa 6996
486aa804
BE
6997# Enable C extension for decimal float if target supports it.
6998# Check whether --enable-decimal-float or --disable-decimal-float was given.
6999if test "${enable_decimal_float+set}" = set; then
7000 enableval="$enable_decimal_float"
7001
7002 if test x$enablevar = xyes ; then
7003 case $target in
7004 powerpc*-*-linux* | i?86*-*-linux*)
a4a9df5f 7005 enable_decimal_float=yes
486aa804
BE
7006 ;;
7007 *)
7008 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
7009echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
7010 enable_decimal_float=no
7011 ;;
7012 esac
7013 fi
7014
7015else
a4a9df5f 7016 enable_decimal_float=no
486aa804
BE
7017fi;
7018
7019
7020
7021dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi`
7022
7023cat >>confdefs.h <<_ACEOF
7024#define ENABLE_DECIMAL_FLOAT $dfp
7025_ACEOF
7026
7027
414d23ae
HPN
7028# Enable threads
7029# Pass with no value to take the default
7030# Pass with a value to specify a thread package
7031# Check whether --enable-threads or --disable-threads was given.
7032if test "${enable_threads+set}" = set; then
7033 enableval="$enable_threads"
ba479fd2 7034
414d23ae
HPN
7035else
7036 enable_threads=''
ba479fd2 7037fi;
414d23ae 7038
8dea1cca
DD
7039# Check whether --enable-tls or --disable-tls was given.
7040if test "${enable_tls+set}" = set; then
7041 enableval="$enable_tls"
7042
7043 case $enable_tls in
7044 yes | no) ;;
7045 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
7046Valid choices are 'yes' and 'no'." >&5
7047echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
7048Valid choices are 'yes' and 'no'." >&2;}
7049 { (exit 1); exit 1; }; } ;;
7050 esac
7051
7052else
7053 enable_tls=''
7054fi;
7055
414d23ae
HPN
7056# Check whether --enable-objc-gc or --disable-objc-gc was given.
7057if test "${enable_objc_gc+set}" = set; then
7058 enableval="$enable_objc_gc"
7059 if test x$enable_objc_gc = xno; then
7060 objc_boehm_gc=''
7061else
7062 objc_boehm_gc=1
7063fi
7064else
7065 objc_boehm_gc=''
ba479fd2 7066fi;
75e93faa
ZW
7067
7068
414d23ae
HPN
7069# Check whether --with-dwarf2 or --without-dwarf2 was given.
7070if test "${with_dwarf2+set}" = set; then
7071 withval="$with_dwarf2"
7072 dwarf2="$with_dwarf2"
75e93faa 7073else
414d23ae 7074 dwarf2=no
ba479fd2 7075fi;
75e93faa 7076
414d23ae
HPN
7077# Check whether --enable-shared or --disable-shared was given.
7078if test "${enable_shared+set}" = set; then
7079 enableval="$enable_shared"
ba479fd2 7080
414d23ae
HPN
7081 case $enable_shared in
7082 yes | no) ;;
7083 *)
7084 enable_shared=no
7085 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
7086 for pkg in $enableval; do
7087 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
7088 enable_shared=yes
7089 fi
7090 done
7091 IFS="$ac_save_ifs"
7092 ;;
7093 esac
7094
75e93faa 7095else
414d23ae 7096 enable_shared=yes
ba479fd2 7097fi;
75e93faa 7098
75e93faa 7099
75e93faa 7100
160633c6
MM
7101# Check whether --with-build-sysroot or --without-build-sysroot was given.
7102if test "${with_build_sysroot+set}" = set; then
7103 withval="$with_build_sysroot"
7104
7105fi;
7106
7107
4977bab6
ZW
7108# Check whether --with-sysroot or --without-sysroot was given.
7109if test "${with_sysroot+set}" = set; then
7110 withval="$with_sysroot"
ba479fd2 7111
4977bab6 7112 case ${with_sysroot} in
caa55b1e 7113 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
7114 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
7115 esac
ba479fd2 7116
4977bab6
ZW
7117 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
7118 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
7119
047d636f
DJ
7120 if test "x$exec_prefix" = xNONE; then
7121 if test "x$prefix" = xNONE; then
7122 test_prefix=/usr/local
7123 else
7124 test_prefix=$prefix
7125 fi
7126 else
7127 test_prefix=$exec_prefix
7128 fi
7129 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
7130 "${test_prefix}"|"${test_prefix}/"*|\
7131 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
7132 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
7133 TARGET_SYSTEM_ROOT_DEFINE="$t"
7134 ;;
7135 esac
7136
4977bab6 7137else
ba479fd2 7138
4977bab6 7139 TARGET_SYSTEM_ROOT=
db720d9a 7140 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
7141 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
7142
ba479fd2 7143fi;
4977bab6
ZW
7144
7145
7146
7147
d1bd0ded 7148# Build with intermodule optimisations
d1bd0ded
GK
7149# Check whether --enable-intermodule or --disable-intermodule was given.
7150if test "${enable_intermodule+set}" = set; then
7151 enableval="$enable_intermodule"
0c46c5c7
KC
7152 case ${enable_intermodule} in
7153 yes) onestep="-onestep";;
7154 *) onestep="";;
d1bd0ded 7155esac
0c46c5c7
KC
7156else
7157 onestep=""
ba479fd2 7158fi;
d1bd0ded
GK
7159
7160
f3c9f174
NN
7161# Sanity check enable_languages in case someone does not run the toplevel
7162# configure # script.
7163# Check whether --enable-languages or --disable-languages was given.
7164if test "${enable_languages+set}" = set; then
7165 enableval="$enable_languages"
7166 case ,${enable_languages}, in
7167 ,,|,yes,)
7168 # go safe -- we cannot be much sure without the toplevel
7169 # configure's
7170 # analysis of which target libs are present and usable
7171 enable_languages=c
7172 ;;
7173 *,all,*)
7174 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
7175echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
7176 { (exit 1); exit 1; }; }
7177 ;;
7178 *,c,*)
7179 ;;
7180 *)
7181 enable_languages=c,${enable_languages}
7182 ;;
7183esac
7184else
7185 enable_languages=c
7186fi;
7187
f3c9f174 7188
73458fb7
NN
7189# -------------------------
7190# Checks for other programs
7191# -------------------------
5b67ad6f 7192
ba479fd2
NN
7193echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7194echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
86da66b5 7195set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
ba479fd2
NN
7196if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
7197 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 7198else
ba479fd2 7199 cat >conftest.make <<\_ACEOF
e9a25f70 7200all:
ba479fd2
NN
7201 @echo 'ac_maketemp="$(MAKE)"'
7202_ACEOF
e9a25f70 7203# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 7204eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
7205if test -n "$ac_maketemp"; then
7206 eval ac_cv_prog_make_${ac_make}_set=yes
7207else
7208 eval ac_cv_prog_make_${ac_make}_set=no
7209fi
ba479fd2 7210rm -f conftest.make
e9a25f70
JL
7211fi
7212if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
7213 echo "$as_me:$LINENO: result: yes" >&5
7214echo "${ECHO_T}yes" >&6
e9a25f70
JL
7215 SET_MAKE=
7216else
ba479fd2
NN
7217 echo "$as_me:$LINENO: result: no" >&5
7218echo "${ECHO_T}no" >&6
e9a25f70
JL
7219 SET_MAKE="MAKE=${MAKE-make}"
7220fi
7221
7222
861bb6c1 7223# Find some useful tools
ba479fd2 7224for ac_prog in gawk mawk nawk awk
861bb6c1 7225do
ba479fd2 7226 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 7227set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7228echo "$as_me:$LINENO: checking for $ac_word" >&5
7229echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7230if test "${ac_cv_prog_AWK+set}" = set; then
7231 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7232else
7233 if test -n "$AWK"; then
7234 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7235else
ba479fd2
NN
7236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7237for as_dir in $PATH
7238do
7239 IFS=$as_save_IFS
7240 test -z "$as_dir" && as_dir=.
7241 for ac_exec_ext in '' $ac_executable_extensions; do
7242 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7243 ac_cv_prog_AWK="$ac_prog"
7244 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7245 break 2
7246 fi
7247done
7248done
7249
861bb6c1
JL
7250fi
7251fi
ba479fd2 7252AWK=$ac_cv_prog_AWK
861bb6c1 7253if test -n "$AWK"; then
ba479fd2
NN
7254 echo "$as_me:$LINENO: result: $AWK" >&5
7255echo "${ECHO_T}$AWK" >&6
861bb6c1 7256else
ba479fd2
NN
7257 echo "$as_me:$LINENO: result: no" >&5
7258echo "${ECHO_T}no" >&6
861bb6c1
JL
7259fi
7260
ba479fd2 7261 test -n "$AWK" && break
861bb6c1
JL
7262done
7263
776dc15d 7264# We need awk to create options.c and options.h.
2c4902b9
NN
7265# Bail out if it's missing.
7266case ${AWK} in
ba479fd2
NN
7267 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7268echo "$as_me: error: can't build without awk, bailing out" >&2;}
7269 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
7270esac
7271
ba479fd2
NN
7272echo "$as_me:$LINENO: checking whether ln -s works" >&5
7273echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
7274if test "${gcc_cv_prog_LN_S+set}" = set; then
7275 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7276else
7277 rm -f conftestdata_t
7278echo >conftestdata_f
7279if ln -s conftestdata_f conftestdata_t 2>/dev/null
7280then
7281 gcc_cv_prog_LN_S="ln -s"
7282else
7283 if ln conftestdata_f conftestdata_t 2>/dev/null
7284 then
7285 gcc_cv_prog_LN_S=ln
7286 else
35f06ae4
PB
7287 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7288 then
06c3418c 7289 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
7290 else
7291 gcc_cv_prog_LN_S=cp
7292 fi
0a4b6309
RL
7293 fi
7294fi
7295rm -f conftestdata_f conftestdata_t
7296
7297fi
7298LN_S="$gcc_cv_prog_LN_S"
7299if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
7300 echo "$as_me:$LINENO: result: yes" >&5
7301echo "${ECHO_T}yes" >&6
0a4b6309
RL
7302else
7303 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
7304 echo "$as_me:$LINENO: result: no, using ln" >&5
7305echo "${ECHO_T}no, using ln" >&6
0a4b6309 7306 else
35f06ae4
PB
7307 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7308echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
7309 fi
7310fi
7311
41e622a8
AP
7312echo "$as_me:$LINENO: checking whether ln works" >&5
7313echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
7314if test "${acx_cv_prog_LN+set}" = set; then
7315 echo $ECHO_N "(cached) $ECHO_C" >&6
7316else
7317 rm -f conftestdata_t
7318echo >conftestdata_f
7319if ln conftestdata_f conftestdata_t 2>/dev/null
7320then
7321 acx_cv_prog_LN=ln
7322else
7323 acx_cv_prog_LN=no
7324fi
7325rm -f conftestdata_f conftestdata_t
7326
7327fi
7328if test $acx_cv_prog_LN = no; then
7329 LN="$LN_S"
7330 echo "$as_me:$LINENO: result: no, using $LN" >&5
7331echo "${ECHO_T}no, using $LN" >&6
7332else
7333 LN="$acx_cv_prog_LN"
7334 echo "$as_me:$LINENO: result: yes" >&5
7335echo "${ECHO_T}yes" >&6
7336fi
7337
ba479fd2
NN
7338if test -n "$ac_tool_prefix"; then
7339 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7340set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7341echo "$as_me:$LINENO: checking for $ac_word" >&5
7342echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7343if test "${ac_cv_prog_RANLIB+set}" = set; then
7344 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7345else
7346 if test -n "$RANLIB"; then
7347 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7348else
ba479fd2
NN
7349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7350for as_dir in $PATH
7351do
7352 IFS=$as_save_IFS
7353 test -z "$as_dir" && as_dir=.
7354 for ac_exec_ext in '' $ac_executable_extensions; do
7355 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7356 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7357 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7358 break 2
7359 fi
7360done
7361done
7362
6e3f3080
NN
7363fi
7364fi
ba479fd2 7365RANLIB=$ac_cv_prog_RANLIB
6e3f3080 7366if test -n "$RANLIB"; then
ba479fd2
NN
7367 echo "$as_me:$LINENO: result: $RANLIB" >&5
7368echo "${ECHO_T}$RANLIB" >&6
7369else
7370 echo "$as_me:$LINENO: result: no" >&5
7371echo "${ECHO_T}no" >&6
7372fi
7373
7374fi
7375if test -z "$ac_cv_prog_RANLIB"; then
7376 ac_ct_RANLIB=$RANLIB
7377 # Extract the first word of "ranlib", so it can be a program name with args.
7378set dummy ranlib; ac_word=$2
7379echo "$as_me:$LINENO: checking for $ac_word" >&5
7380echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7381if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7382 echo $ECHO_N "(cached) $ECHO_C" >&6
7383else
7384 if test -n "$ac_ct_RANLIB"; then
7385 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7386else
7387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7388for as_dir in $PATH
7389do
7390 IFS=$as_save_IFS
7391 test -z "$as_dir" && as_dir=.
7392 for ac_exec_ext in '' $ac_executable_extensions; do
7393 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7394 ac_cv_prog_ac_ct_RANLIB="ranlib"
7395 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7396 break 2
7397 fi
7398done
7399done
7400
7401 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7402fi
7403fi
7404ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7405if test -n "$ac_ct_RANLIB"; then
7406 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7407echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 7408else
ba479fd2
NN
7409 echo "$as_me:$LINENO: result: no" >&5
7410echo "${ECHO_T}no" >&6
7411fi
7412
7413 RANLIB=$ac_ct_RANLIB
7414else
7415 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
7416fi
7417
343a6100
MM
7418case "${host}" in
7419*-*-darwin*)
7420 # By default, the Darwin ranlib will not treat common symbols as
7421 # definitions when building the archive table of contents. Other
7422 # ranlibs do that; pass an option to the Darwin ranlib that makes
7423 # it behave similarly.
7424 ranlib_flags="-c"
7425 ;;
7426*)
7427 ranlib_flags=""
7428esac
7429
7430
0a4b6309
RL
7431# Find a good install program. We prefer a C program (faster),
7432# so one script is as good as another. But avoid the broken or
7433# incompatible versions:
7434# SysV /etc/install, /usr/sbin/install
7435# SunOS /usr/etc/install
7436# IRIX /sbin/install
7437# AIX /bin/install
7438# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7439# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7440# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
7441echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7442echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 7443if test -z "$INSTALL"; then
ba479fd2
NN
7444if test "${ac_cv_path_install+set}" = set; then
7445 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7446else
7447 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7448 for ac_dir in $PATH; do
7449 # Account for people who put trailing slashes in PATH elements.
7450 case "$ac_dir/" in
7451 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7452 *)
7453 # OSF1 and SCO ODT 3.0 have their own names for install.
7454 for ac_prog in ginstall scoinst install; do
7455 if test -f $ac_dir/$ac_prog; then
7456 if test $ac_prog = install &&
7457 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7458 # AIX install. It has an incompatible calling convention.
7459 # OSF/1 installbsd also uses dspmsg, but is usable.
7460 :
7461 else
7462 ac_cv_path_install="$ac_dir/$ac_prog -c"
7463 break 2
7464 fi
7465 fi
7466 done
7467 ;;
7468 esac
7469 done
7470 IFS="$ac_save_IFS"
7471
7472fi
7473 if test "${ac_cv_path_install+set}" = set; then
7474 INSTALL="$ac_cv_path_install"
7475 else
7476 # As a last resort, use the slow shell script. We don't cache a
7477 # path for INSTALL within a source directory, because that will
7478 # break other packages using the cache if that directory is
7479 # removed, or if the path is relative.
7480 INSTALL="$ac_install_sh"
7481 fi
7482fi
ba479fd2
NN
7483echo "$as_me:$LINENO: result: $INSTALL" >&5
7484echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
7485
7486# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7487# It thinks the first close brace ends the variable substitution.
7488test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7489
7490test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7491
861bb6c1 7492
3a000df0 7493# See if cmp has --ignore-initial.
ba479fd2
NN
7494echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7495echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
7496if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7497 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
7498else
7499 echo abfoo >t1
7500 echo cdfoo >t2
269a7343 7501 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
7502 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7503 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 7504 :
3a000df0
KC
7505 else
7506 gcc_cv_prog_cmp_skip=gnucompare
7507 fi
269a7343
KG
7508 fi
7509 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7510 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7511 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7512 :
7513 else
7514 gcc_cv_prog_cmp_skip=fastcompare
7515 fi
7516 fi
3a000df0
KC
7517 fi
7518 rm t1 t2
7519
7520fi
ba479fd2
NN
7521echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7522echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
7523make_compare_target=$gcc_cv_prog_cmp_skip
7524
7525
7526
73458fb7
NN
7527# See if we have the mktemp command.
7528# Extract the first word of "mktemp", so it can be a program name with args.
7529set dummy mktemp; ac_word=$2
ba479fd2
NN
7530echo "$as_me:$LINENO: checking for $ac_word" >&5
7531echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7532if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7533 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7534else
7535 if test -n "$have_mktemp_command"; then
7536 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7537else
ba479fd2
NN
7538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7539for as_dir in $PATH
7540do
7541 IFS=$as_save_IFS
7542 test -z "$as_dir" && as_dir=.
7543 for ac_exec_ext in '' $ac_executable_extensions; do
7544 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7545 ac_cv_prog_have_mktemp_command="yes"
7546 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7547 break 2
7548 fi
7549done
7550done
7551
73458fb7
NN
7552 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7553fi
7554fi
ba479fd2 7555have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 7556if test -n "$have_mktemp_command"; then
ba479fd2
NN
7557 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7558echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 7559else
ba479fd2
NN
7560 echo "$as_me:$LINENO: result: no" >&5
7561echo "${ECHO_T}no" >&6
73458fb7
NN
7562fi
7563
7564
7c27e184
PB
7565MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
7566
7567# See if makeinfo has been installed and is modern enough
7568# that we can use it.
9f18db39
PB
7569
7570ac_executable_extensions="$build_exeext"
7571
7c27e184 7572# Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 7573set dummy makeinfo; ac_word=$2
ba479fd2
NN
7574echo "$as_me:$LINENO: checking for $ac_word" >&5
7575echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7576if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7577 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7578else
7579 if test -n "$MAKEINFO"; then
7580 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7581else
ba479fd2
NN
7582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7583for as_dir in $PATH
7584do
7585 IFS=$as_save_IFS
7586 test -z "$as_dir" && as_dir=.
7587 for ac_exec_ext in '' $ac_executable_extensions; do
7588 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7589 ac_cv_prog_MAKEINFO="makeinfo"
7590 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7591 break 2
7592 fi
7593done
7594done
7595
73458fb7
NN
7596fi
7597fi
ba479fd2 7598MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 7599if test -n "$MAKEINFO"; then
ba479fd2
NN
7600 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7601echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 7602else
ba479fd2
NN
7603 echo "$as_me:$LINENO: result: no" >&5
7604echo "${ECHO_T}no" >&6
73458fb7
NN
7605fi
7606
7607if test -n "$MAKEINFO"; then
7608 # Found it, now check the version.
ba479fd2
NN
7609 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7610echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
7611if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7612 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7613else
7614 ac_prog_version=`$MAKEINFO --version 2>&1 |
7615 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
ed965309 7616 echo "configure:7616: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
7617 case $ac_prog_version in
7618 '') gcc_cv_prog_makeinfo_modern=no;;
1a598a97 7619 4.[4-9]*)
73458fb7
NN
7620 gcc_cv_prog_makeinfo_modern=yes;;
7621 *) gcc_cv_prog_makeinfo_modern=no;;
7622 esac
7623
7624fi
ba479fd2
NN
7625echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7626echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
7627else
7628 gcc_cv_prog_makeinfo_modern=no
7629fi
7630
73458fb7 7631if test $gcc_cv_prog_makeinfo_modern = no; then
7c27e184 7632 MAKEINFO="$MISSING makeinfo"
ba479fd2
NN
7633 { echo "$as_me:$LINENO: WARNING:
7634*** Makeinfo is missing or too old.
7635*** Info documentation will not be built." >&5
7636echo "$as_me: WARNING:
cafe096b 7637*** Makeinfo is missing or too old.
ba479fd2 7638*** Info documentation will not be built." >&2;}
73458fb7
NN
7639 BUILD_INFO=
7640else
ba479fd2 7641 BUILD_INFO=info
73458fb7
NN
7642fi
7643
7c27e184 7644
73458fb7 7645# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
7646echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7647echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 7648if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
7649 echo "$as_me:$LINENO: result: yes" >&5
7650echo "${ECHO_T}yes" >&6
7651 GENERATED_MANPAGES=generated-manpages
73458fb7 7652else
ba479fd2
NN
7653 echo "$as_me:$LINENO: result: no" >&5
7654echo "${ECHO_T}no" >&6
73458fb7
NN
7655 GENERATED_MANPAGES=
7656fi
7657
7c27e184 7658
73458fb7 7659# How about lex?
7c27e184
PB
7660for ac_prog in flex
7661do
7662 # Extract the first word of "$ac_prog", so it can be a program name with args.
7663set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7664echo "$as_me:$LINENO: checking for $ac_word" >&5
7665echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7666if test "${ac_cv_prog_FLEX+set}" = set; then
7667 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7668else
7669 if test -n "$FLEX"; then
7670 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7671else
ba479fd2
NN
7672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7673for as_dir in $PATH
7674do
7675 IFS=$as_save_IFS
7676 test -z "$as_dir" && as_dir=.
7677 for ac_exec_ext in '' $ac_executable_extensions; do
7678 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7679 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
7680 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7681 break 2
7682 fi
7683done
7684done
7685
73458fb7
NN
7686fi
7687fi
ba479fd2 7688FLEX=$ac_cv_prog_FLEX
73458fb7 7689if test -n "$FLEX"; then
ba479fd2
NN
7690 echo "$as_me:$LINENO: result: $FLEX" >&5
7691echo "${ECHO_T}$FLEX" >&6
73458fb7 7692else
ba479fd2
NN
7693 echo "$as_me:$LINENO: result: no" >&5
7694echo "${ECHO_T}no" >&6
73458fb7
NN
7695fi
7696
7c27e184
PB
7697 test -n "$FLEX" && break
7698done
7699test -n "$FLEX" || FLEX="$MISSING flex"
7700
73458fb7
NN
7701
7702# Bison?
7c27e184
PB
7703for ac_prog in bison
7704do
7705 # Extract the first word of "$ac_prog", so it can be a program name with args.
7706set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7707echo "$as_me:$LINENO: checking for $ac_word" >&5
7708echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7709if test "${ac_cv_prog_BISON+set}" = set; then
7710 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7711else
7712 if test -n "$BISON"; then
7713 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7714else
ba479fd2
NN
7715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7716for as_dir in $PATH
7717do
7718 IFS=$as_save_IFS
7719 test -z "$as_dir" && as_dir=.
7720 for ac_exec_ext in '' $ac_executable_extensions; do
7721 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7722 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
7723 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7724 break 2
7725 fi
7726done
7727done
7728
73458fb7
NN
7729fi
7730fi
ba479fd2 7731BISON=$ac_cv_prog_BISON
73458fb7 7732if test -n "$BISON"; then
ba479fd2
NN
7733 echo "$as_me:$LINENO: result: $BISON" >&5
7734echo "${ECHO_T}$BISON" >&6
73458fb7 7735else
ba479fd2
NN
7736 echo "$as_me:$LINENO: result: no" >&5
7737echo "${ECHO_T}no" >&6
73458fb7
NN
7738fi
7739
7c27e184
PB
7740 test -n "$BISON" && break
7741done
7742test -n "$BISON" || BISON="$MISSING bison"
7743
7744
7745# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7746# check for build == host before using them.
73458fb7 7747
f6a874ac 7748# NM
414adbdd
GK
7749if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7750 && test -d ../binutils ; then
f6a874ac
JW
7751 NM='$(objdir)/../binutils/nm-new'
7752else
7753 # Extract the first word of "nm", so it can be a program name with args.
7754set dummy nm; ac_word=$2
7755echo "$as_me:$LINENO: checking for $ac_word" >&5
7756echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7757if test "${ac_cv_prog_NM+set}" = set; then
7758 echo $ECHO_N "(cached) $ECHO_C" >&6
7759else
7760 if test -n "$NM"; then
7761 ac_cv_prog_NM="$NM" # Let the user override the test.
7762else
7763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7764for as_dir in $PATH
7765do
7766 IFS=$as_save_IFS
7767 test -z "$as_dir" && as_dir=.
7768 for ac_exec_ext in '' $ac_executable_extensions; do
7769 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7770 ac_cv_prog_NM="nm"
7771 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7772 break 2
7773 fi
7774done
7775done
7776
7777 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7778fi
7779fi
7780NM=$ac_cv_prog_NM
7781if test -n "$NM"; then
7782 echo "$as_me:$LINENO: result: $NM" >&5
7783echo "${ECHO_T}$NM" >&6
7784else
7785 echo "$as_me:$LINENO: result: no" >&5
7786echo "${ECHO_T}no" >&6
7787fi
7788
7789fi
7790
7791# AR
414adbdd
GK
7792if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7793 && test -d ../binutils ; then
f6a874ac
JW
7794 AR='$(objdir)/../binutils/ar'
7795else
7796 # Extract the first word of "ar", so it can be a program name with args.
7797set dummy ar; ac_word=$2
7798echo "$as_me:$LINENO: checking for $ac_word" >&5
7799echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7800if test "${ac_cv_prog_AR+set}" = set; then
7801 echo $ECHO_N "(cached) $ECHO_C" >&6
7802else
7803 if test -n "$AR"; then
7804 ac_cv_prog_AR="$AR" # Let the user override the test.
7805else
7806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7807for as_dir in $PATH
7808do
7809 IFS=$as_save_IFS
7810 test -z "$as_dir" && as_dir=.
7811 for ac_exec_ext in '' $ac_executable_extensions; do
7812 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7813 ac_cv_prog_AR="ar"
7814 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7815 break 2
7816 fi
7817done
7818done
7819
7820 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7821fi
7822fi
7823AR=$ac_cv_prog_AR
7824if test -n "$AR"; then
7825 echo "$as_me:$LINENO: result: $AR" >&5
7826echo "${ECHO_T}$AR" >&6
7827else
7828 echo "$as_me:$LINENO: result: no" >&5
7829echo "${ECHO_T}no" >&6
7830fi
7831
7832fi
7833
7834
73458fb7
NN
7835# --------------------
7836# Checks for C headers
7837# --------------------
7838
ba479fd2
NN
7839echo "$as_me:$LINENO: checking for GNU C library" >&5
7840echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
7841if test "${gcc_cv_glibc+set}" = set; then
7842 echo $ECHO_N "(cached) $ECHO_C" >&6
7843else
7844 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7845/* confdefs.h. */
7846_ACEOF
7847cat confdefs.h >>conftest.$ac_ext
7848cat >>conftest.$ac_ext <<_ACEOF
7849/* end confdefs.h. */
73458fb7 7850#include <features.h>
ba479fd2
NN
7851int
7852main ()
7853{
73458fb7
NN
7854
7855#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7856#error Not a GNU C library system
7857#endif
ba479fd2
NN
7858 ;
7859 return 0;
7860}
7861_ACEOF
7862rm -f conftest.$ac_objext
7863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7864 (eval $ac_compile) 2>conftest.er1
ba479fd2 7865 ac_status=$?
86da66b5
HPN
7866 grep -v '^ *+' conftest.er1 >conftest.err
7867 rm -f conftest.er1
7868 cat conftest.err >&5
ba479fd2
NN
7869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7870 (exit $ac_status); } &&
1cf0118d
RO
7871 { ac_try='test -z "$ac_c_werror_flag"
7872 || test ! -s conftest.err'
86da66b5
HPN
7873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7874 (eval $ac_try) 2>&5
7875 ac_status=$?
7876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7877 (exit $ac_status); }; } &&
7878 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7880 (eval $ac_try) 2>&5
7881 ac_status=$?
7882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7883 (exit $ac_status); }; }; then
73458fb7
NN
7884 gcc_cv_glibc=yes
7885else
ba479fd2
NN
7886 echo "$as_me: failed program was:" >&5
7887sed 's/^/| /' conftest.$ac_ext >&5
7888
7889gcc_cv_glibc=no
73458fb7 7890fi
86da66b5 7891rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
7892fi
7893
ba479fd2
NN
7894echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7895echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 7896if test $gcc_cv_glibc = yes; then
ba479fd2
NN
7897
7898cat >>confdefs.h <<\_ACEOF
73458fb7 7899#define _GNU_SOURCE 1
ba479fd2 7900_ACEOF
73458fb7
NN
7901
7902fi
7903
ca9bc441
NN
7904# Need to reject headers which give warnings, so that the -Werror bootstrap
7905# works later. *sigh* This needs to come before all header checks.
7906
7907ac_c_preproc_warn_flag=yes
7908
ba479fd2
NN
7909echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7910echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7911if test "${ac_cv_header_stdc+set}" = set; then
7912 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7913else
ba479fd2 7914 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7915/* confdefs.h. */
7916_ACEOF
7917cat confdefs.h >>conftest.$ac_ext
7918cat >>conftest.$ac_ext <<_ACEOF
7919/* end confdefs.h. */
956d6950
JL
7920#include <stdlib.h>
7921#include <stdarg.h>
7922#include <string.h>
7923#include <float.h>
ba479fd2
NN
7924
7925int
7926main ()
7927{
7928
7929 ;
7930 return 0;
7931}
7932_ACEOF
7933rm -f conftest.$ac_objext
7934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7935 (eval $ac_compile) 2>conftest.er1
ba479fd2 7936 ac_status=$?
86da66b5
HPN
7937 grep -v '^ *+' conftest.er1 >conftest.err
7938 rm -f conftest.er1
7939 cat conftest.err >&5
ba479fd2
NN
7940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7941 (exit $ac_status); } &&
1cf0118d
RO
7942 { ac_try='test -z "$ac_c_werror_flag"
7943 || test ! -s conftest.err'
86da66b5
HPN
7944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7945 (eval $ac_try) 2>&5
7946 ac_status=$?
7947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7948 (exit $ac_status); }; } &&
7949 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7951 (eval $ac_try) 2>&5
7952 ac_status=$?
7953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7954 (exit $ac_status); }; }; then
956d6950
JL
7955 ac_cv_header_stdc=yes
7956else
ba479fd2
NN
7957 echo "$as_me: failed program was:" >&5
7958sed 's/^/| /' conftest.$ac_ext >&5
7959
7960ac_cv_header_stdc=no
956d6950 7961fi
86da66b5 7962rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
7963
7964if test $ac_cv_header_stdc = yes; then
7965 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 7966 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7967/* confdefs.h. */
7968_ACEOF
7969cat confdefs.h >>conftest.$ac_ext
7970cat >>conftest.$ac_ext <<_ACEOF
7971/* end confdefs.h. */
956d6950 7972#include <string.h>
ba479fd2
NN
7973
7974_ACEOF
956d6950 7975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7976 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
7977 :
7978else
956d6950
JL
7979 ac_cv_header_stdc=no
7980fi
7981rm -f conftest*
7982
7983fi
7984
7985if test $ac_cv_header_stdc = yes; then
7986 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 7987 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7988/* confdefs.h. */
7989_ACEOF
7990cat confdefs.h >>conftest.$ac_ext
7991cat >>conftest.$ac_ext <<_ACEOF
7992/* end confdefs.h. */
956d6950 7993#include <stdlib.h>
ba479fd2
NN
7994
7995_ACEOF
956d6950 7996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7997 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
7998 :
7999else
956d6950
JL
8000 ac_cv_header_stdc=no
8001fi
8002rm -f conftest*
8003
8004fi
8005
8006if test $ac_cv_header_stdc = yes; then
8007 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 8008 if test "$cross_compiling" = yes; then
956d6950
JL
8009 :
8010else
ba479fd2 8011 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8012/* confdefs.h. */
8013_ACEOF
8014cat confdefs.h >>conftest.$ac_ext
8015cat >>conftest.$ac_ext <<_ACEOF
8016/* end confdefs.h. */
956d6950 8017#include <ctype.h>
ba479fd2
NN
8018#if ((' ' & 0x0FF) == 0x020)
8019# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8020# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8021#else
8022# define ISLOWER(c) \
86da66b5
HPN
8023 (('a' <= (c) && (c) <= 'i') \
8024 || ('j' <= (c) && (c) <= 'r') \
8025 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
8026# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8027#endif
63cf211a 8028
ba479fd2
NN
8029#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8030int
8031main ()
8032{
8033 int i;
8034 for (i = 0; i < 256; i++)
8035 if (XOR (islower (i), ISLOWER (i))
86da66b5 8036 || toupper (i) != TOUPPER (i))
ba479fd2
NN
8037 exit(2);
8038 exit (0);
8039}
8040_ACEOF
8041rm -f conftest$ac_exeext
8042if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8043 (eval $ac_link) 2>&5
8044 ac_status=$?
8045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8046 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8048 (eval $ac_try) 2>&5
8049 ac_status=$?
8050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8051 (exit $ac_status); }; }; then
956d6950
JL
8052 :
8053else
ba479fd2
NN
8054 echo "$as_me: program exited with status $ac_status" >&5
8055echo "$as_me: failed program was:" >&5
8056sed 's/^/| /' conftest.$ac_ext >&5
8057
8058( exit $ac_status )
8059ac_cv_header_stdc=no
956d6950 8060fi
86da66b5 8061rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 8062fi
956d6950
JL
8063fi
8064fi
ba479fd2
NN
8065echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8066echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 8067if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
8068
8069cat >>confdefs.h <<\_ACEOF
956d6950 8070#define STDC_HEADERS 1
ba479fd2 8071_ACEOF
956d6950
JL
8072
8073fi
8074
ba479fd2
NN
8075echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
8076echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
8077if test "${ac_cv_header_time+set}" = set; then
8078 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8079else
ba479fd2 8080 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8081/* confdefs.h. */
8082_ACEOF
8083cat confdefs.h >>conftest.$ac_ext
8084cat >>conftest.$ac_ext <<_ACEOF
8085/* end confdefs.h. */
956d6950
JL
8086#include <sys/types.h>
8087#include <sys/time.h>
8088#include <time.h>
ba479fd2
NN
8089
8090int
8091main ()
8092{
8093if ((struct tm *) 0)
8094return 0;
8095 ;
8096 return 0;
8097}
8098_ACEOF
8099rm -f conftest.$ac_objext
8100if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8101 (eval $ac_compile) 2>conftest.er1
ba479fd2 8102 ac_status=$?
86da66b5
HPN
8103 grep -v '^ *+' conftest.er1 >conftest.err
8104 rm -f conftest.er1
8105 cat conftest.err >&5
ba479fd2
NN
8106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8107 (exit $ac_status); } &&
1cf0118d
RO
8108 { ac_try='test -z "$ac_c_werror_flag"
8109 || test ! -s conftest.err'
86da66b5
HPN
8110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8111 (eval $ac_try) 2>&5
8112 ac_status=$?
8113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8114 (exit $ac_status); }; } &&
8115 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8117 (eval $ac_try) 2>&5
8118 ac_status=$?
8119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8120 (exit $ac_status); }; }; then
956d6950
JL
8121 ac_cv_header_time=yes
8122else
ba479fd2
NN
8123 echo "$as_me: failed program was:" >&5
8124sed 's/^/| /' conftest.$ac_ext >&5
8125
8126ac_cv_header_time=no
956d6950 8127fi
86da66b5 8128rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 8129fi
ba479fd2
NN
8130echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
8131echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 8132if test $ac_cv_header_time = yes; then
ba479fd2
NN
8133
8134cat >>confdefs.h <<\_ACEOF
956d6950 8135#define TIME_WITH_SYS_TIME 1
ba479fd2 8136_ACEOF
956d6950
JL
8137
8138fi
8139
41e622a8
AP
8140echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
8141echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
8142if test "${gcc_cv_header_string+set}" = set; then
8143 echo $ECHO_N "(cached) $ECHO_C" >&6
8144else
8145 cat >conftest.$ac_ext <<_ACEOF
8146/* confdefs.h. */
8147_ACEOF
8148cat confdefs.h >>conftest.$ac_ext
8149cat >>conftest.$ac_ext <<_ACEOF
8150/* end confdefs.h. */
8151#include <string.h>
8152#include <strings.h>
8153int
8154main ()
8155{
8156
8157 ;
8158 return 0;
8159}
8160_ACEOF
8161rm -f conftest.$ac_objext
8162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8163 (eval $ac_compile) 2>conftest.er1
8164 ac_status=$?
8165 grep -v '^ *+' conftest.er1 >conftest.err
8166 rm -f conftest.er1
8167 cat conftest.err >&5
8168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8169 (exit $ac_status); } &&
1cf0118d
RO
8170 { ac_try='test -z "$ac_c_werror_flag"
8171 || test ! -s conftest.err'
41e622a8
AP
8172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8173 (eval $ac_try) 2>&5
8174 ac_status=$?
8175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8176 (exit $ac_status); }; } &&
8177 { ac_try='test -s conftest.$ac_objext'
8178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8179 (eval $ac_try) 2>&5
8180 ac_status=$?
8181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8182 (exit $ac_status); }; }; then
8183 gcc_cv_header_string=yes
8184else
8185 echo "$as_me: failed program was:" >&5
8186sed 's/^/| /' conftest.$ac_ext >&5
8187
8188gcc_cv_header_string=no
8189fi
8190rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8191fi
8192echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
8193echo "${ECHO_T}$gcc_cv_header_string" >&6
8194if test $gcc_cv_header_string = yes; then
8195
8196cat >>confdefs.h <<\_ACEOF
8197#define STRING_WITH_STRINGS 1
8198_ACEOF
8199
8200fi
8201
ba479fd2
NN
8202echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
8203echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
8204if test "${ac_cv_header_sys_wait_h+set}" = set; then
8205 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 8206else
ba479fd2 8207 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8208/* confdefs.h. */
8209_ACEOF
8210cat confdefs.h >>conftest.$ac_ext
8211cat >>conftest.$ac_ext <<_ACEOF
8212/* end confdefs.h. */
e9831ca0
KG
8213#include <sys/types.h>
8214#include <sys/wait.h>
8215#ifndef WEXITSTATUS
ba479fd2 8216# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
8217#endif
8218#ifndef WIFEXITED
ba479fd2 8219# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 8220#endif
ba479fd2
NN
8221
8222int
8223main ()
8224{
8225 int s;
8226 wait (&s);
8227 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8228 ;
8229 return 0;
8230}
8231_ACEOF
8232rm -f conftest.$ac_objext
8233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8234 (eval $ac_compile) 2>conftest.er1
ba479fd2 8235 ac_status=$?
86da66b5
HPN
8236 grep -v '^ *+' conftest.er1 >conftest.err
8237 rm -f conftest.er1
8238 cat conftest.err >&5
ba479fd2
NN
8239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8240 (exit $ac_status); } &&
1cf0118d
RO
8241 { ac_try='test -z "$ac_c_werror_flag"
8242 || test ! -s conftest.err'
86da66b5
HPN
8243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8244 (eval $ac_try) 2>&5
8245 ac_status=$?
8246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8247 (exit $ac_status); }; } &&
8248 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8250 (eval $ac_try) 2>&5
8251 ac_status=$?
8252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8253 (exit $ac_status); }; }; then
e9831ca0
KG
8254 ac_cv_header_sys_wait_h=yes
8255else
ba479fd2
NN
8256 echo "$as_me: failed program was:" >&5
8257sed 's/^/| /' conftest.$ac_ext >&5
8258
8259ac_cv_header_sys_wait_h=no
e9831ca0 8260fi
86da66b5 8261rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 8262fi
ba479fd2
NN
8263echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8264echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 8265if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
8266
8267cat >>confdefs.h <<\_ACEOF
e9831ca0 8268#define HAVE_SYS_WAIT_H 1
ba479fd2 8269_ACEOF
6e3f3080 8270
63cf211a 8271fi
6e3f3080 8272
ba479fd2
NN
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
dfb77e37
KC
8294
8295for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 8296 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 8297 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 8298 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 8299do
ba479fd2 8300as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 8301echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
8302echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8303if eval "test \"\${$as_ac_Header+set}\" = set"; then
8304 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8305else
ca9bc441 8306 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8307/* confdefs.h. */
8308_ACEOF
8309cat confdefs.h >>conftest.$ac_ext
8310cat >>conftest.$ac_ext <<_ACEOF
8311/* end confdefs.h. */
8312#include <$ac_header>
8313_ACEOF
8314if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8315 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8316 ac_status=$?
8317 grep -v '^ *+' conftest.er1 >conftest.err
8318 rm -f conftest.er1
8319 cat conftest.err >&5
8320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8321 (exit $ac_status); } >/dev/null; then
8322 if test -s conftest.err; then
8323 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8324 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8325 else
8326 ac_cpp_err=
8327 fi
8328else
8329 ac_cpp_err=yes
8330fi
8331if test -z "$ac_cpp_err"; then
ca9bc441 8332 eval "$as_ac_Header=yes"
ba479fd2
NN
8333else
8334 echo "$as_me: failed program was:" >&5
8335sed 's/^/| /' conftest.$ac_ext >&5
8336
ca9bc441 8337 eval "$as_ac_Header=no"
ba479fd2
NN
8338fi
8339rm -f conftest.err conftest.$ac_ext
6e3f3080 8340fi
ba479fd2
NN
8341echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8342echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
8343if test `eval echo '${'$as_ac_Header'}'` = yes; then
8344 cat >>confdefs.h <<_ACEOF
8345#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8346_ACEOF
8347
956d6950
JL
8348fi
8349done
8350
8351
f24af81b 8352# Check for thread headers.
ca9bc441 8353echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
8354echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
8355if test "${ac_cv_header_thread_h+set}" = set; then
8356 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8357else
ca9bc441 8358 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8359/* confdefs.h. */
8360_ACEOF
8361cat confdefs.h >>conftest.$ac_ext
8362cat >>conftest.$ac_ext <<_ACEOF
8363/* end confdefs.h. */
8364#include <thread.h>
8365_ACEOF
8366if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8367 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8368 ac_status=$?
8369 grep -v '^ *+' conftest.er1 >conftest.err
8370 rm -f conftest.er1
8371 cat conftest.err >&5
8372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8373 (exit $ac_status); } >/dev/null; then
8374 if test -s conftest.err; then
8375 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8376 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8377 else
8378 ac_cpp_err=
8379 fi
8380else
8381 ac_cpp_err=yes
8382fi
8383if test -z "$ac_cpp_err"; then
ca9bc441 8384 ac_cv_header_thread_h=yes
ba479fd2
NN
8385else
8386 echo "$as_me: failed program was:" >&5
8387sed 's/^/| /' conftest.$ac_ext >&5
8388
ca9bc441 8389 ac_cv_header_thread_h=no
ba479fd2
NN
8390fi
8391rm -f conftest.err conftest.$ac_ext
6e3f3080 8392fi
ba479fd2
NN
8393echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8394echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 8395if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
8396 have_thread_h=yes
8397else
ba479fd2 8398 have_thread_h=
f24af81b
TT
8399fi
8400
ca9bc441 8401echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
8402echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8403if test "${ac_cv_header_pthread_h+set}" = set; then
8404 echo $ECHO_N "(cached) $ECHO_C" >&6
f24af81b 8405else
ca9bc441 8406 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8407/* confdefs.h. */
8408_ACEOF
8409cat confdefs.h >>conftest.$ac_ext
8410cat >>conftest.$ac_ext <<_ACEOF
8411/* end confdefs.h. */
8412#include <pthread.h>
8413_ACEOF
8414if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8415 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8416 ac_status=$?
8417 grep -v '^ *+' conftest.er1 >conftest.err
8418 rm -f conftest.er1
8419 cat conftest.err >&5
8420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8421 (exit $ac_status); } >/dev/null; then
8422 if test -s conftest.err; then
8423 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8424 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8425 else
8426 ac_cpp_err=
8427 fi
8428else
8429 ac_cpp_err=yes
8430fi
8431if test -z "$ac_cpp_err"; then
ca9bc441 8432 ac_cv_header_pthread_h=yes
ba479fd2
NN
8433else
8434 echo "$as_me: failed program was:" >&5
8435sed 's/^/| /' conftest.$ac_ext >&5
8436
ca9bc441 8437 ac_cv_header_pthread_h=no
ba479fd2
NN
8438fi
8439rm -f conftest.err conftest.$ac_ext
6e3f3080 8440fi
ba479fd2
NN
8441echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8442echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 8443if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
8444 have_pthread_h=yes
8445else
ba479fd2 8446 have_pthread_h=
f24af81b
TT
8447fi
8448
8449
84c041a1 8450# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
8451echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8452echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
8453if test "${gcc_cv_decl_char_bit+set}" = set; then
8454 echo $ECHO_N "(cached) $ECHO_C" >&6
8455else
8456 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8457/* confdefs.h. */
8458_ACEOF
8459cat confdefs.h >>conftest.$ac_ext
8460cat >>conftest.$ac_ext <<_ACEOF
8461/* end confdefs.h. */
75e93faa
ZW
8462#ifdef HAVE_LIMITS_H
8463#include <limits.h>
8464#endif
8465#ifdef CHAR_BIT
8466found
8467#endif
ba479fd2 8468_ACEOF
75e93faa 8469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8470 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
8471 gcc_cv_decl_char_bit=yes
8472else
75e93faa
ZW
8473 gcc_cv_decl_char_bit=no
8474fi
8475rm -f conftest*
8476
8477
8478fi
ba479fd2
NN
8479echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8480echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 8481if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
8482 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8483echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
8484if test "${gcc_cv_c_nbby+set}" = set; then
8485 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
8486else
8487 i=8
8488 gcc_cv_c_nbby=
8489 while test $i -lt 65; do
ba479fd2 8490 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8491/* confdefs.h. */
8492_ACEOF
8493cat confdefs.h >>conftest.$ac_ext
8494cat >>conftest.$ac_ext <<_ACEOF
8495/* end confdefs.h. */
8496
8497int
8498main ()
8499{
4e70264f
ZW
8500switch(0) {
8501 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8502 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8503 ; }
ba479fd2
NN
8504 ;
8505 return 0;
8506}
8507_ACEOF
8508rm -f conftest.$ac_objext
8509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8510 (eval $ac_compile) 2>conftest.er1
ba479fd2 8511 ac_status=$?
86da66b5
HPN
8512 grep -v '^ *+' conftest.er1 >conftest.err
8513 rm -f conftest.er1
8514 cat conftest.err >&5
ba479fd2
NN
8515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8516 (exit $ac_status); } &&
1cf0118d
RO
8517 { ac_try='test -z "$ac_c_werror_flag"
8518 || test ! -s conftest.err'
86da66b5
HPN
8519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8520 (eval $ac_try) 2>&5
8521 ac_status=$?
8522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8523 (exit $ac_status); }; } &&
8524 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8526 (eval $ac_try) 2>&5
8527 ac_status=$?
8528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8529 (exit $ac_status); }; }; then
4e70264f 8530 gcc_cv_c_nbby=$i; break
75e93faa 8531else
ba479fd2
NN
8532 echo "$as_me: failed program was:" >&5
8533sed 's/^/| /' conftest.$ac_ext >&5
8534
75e93faa 8535fi
86da66b5 8536rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
8537 i=`expr $i + 1`
8538 done
8539 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8540
8541fi
ba479fd2
NN
8542echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8543echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 8544if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
8545 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8546echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8547 { (exit 1); exit 1; }; }
75e93faa 8548else
ba479fd2
NN
8549
8550cat >>confdefs.h <<_ACEOF
75e93faa 8551#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 8552_ACEOF
75e93faa
ZW
8553
8554fi
8555fi
ba479fd2
NN
8556echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8557echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
8558if test "${ac_cv_c_bigendian+set}" = set; then
8559 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 8560else
9791c75c 8561 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 8562cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8563/* confdefs.h. */
8564_ACEOF
8565cat confdefs.h >>conftest.$ac_ext
8566cat >>conftest.$ac_ext <<_ACEOF
8567/* end confdefs.h. */
4977bab6
ZW
8568#include <sys/types.h>
8569#include <sys/param.h>
9791c75c 8570
ba479fd2
NN
8571int
8572main ()
8573{
4977bab6
ZW
8574#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8575 bogus endian macros
84c041a1 8576#endif
9791c75c 8577
ba479fd2
NN
8578 ;
8579 return 0;
8580}
8581_ACEOF
8582rm -f conftest.$ac_objext
8583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8584 (eval $ac_compile) 2>conftest.er1
ba479fd2 8585 ac_status=$?
86da66b5
HPN
8586 grep -v '^ *+' conftest.er1 >conftest.err
8587 rm -f conftest.er1
8588 cat conftest.err >&5
ba479fd2
NN
8589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8590 (exit $ac_status); } &&
1cf0118d
RO
8591 { ac_try='test -z "$ac_c_werror_flag"
8592 || test ! -s conftest.err'
86da66b5
HPN
8593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8594 (eval $ac_try) 2>&5
8595 ac_status=$?
8596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8597 (exit $ac_status); }; } &&
8598 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8600 (eval $ac_try) 2>&5
8601 ac_status=$?
8602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8603 (exit $ac_status); }; }; then
4977bab6 8604 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 8605cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8606/* confdefs.h. */
8607_ACEOF
8608cat confdefs.h >>conftest.$ac_ext
8609cat >>conftest.$ac_ext <<_ACEOF
8610/* end confdefs.h. */
4977bab6
ZW
8611#include <sys/types.h>
8612#include <sys/param.h>
9791c75c 8613
ba479fd2
NN
8614int
8615main ()
8616{
4977bab6
ZW
8617#if BYTE_ORDER != BIG_ENDIAN
8618 not big endian
84c041a1 8619#endif
9791c75c 8620
ba479fd2
NN
8621 ;
8622 return 0;
8623}
8624_ACEOF
8625rm -f conftest.$ac_objext
8626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8627 (eval $ac_compile) 2>conftest.er1
ba479fd2 8628 ac_status=$?
86da66b5
HPN
8629 grep -v '^ *+' conftest.er1 >conftest.err
8630 rm -f conftest.er1
8631 cat conftest.err >&5
ba479fd2
NN
8632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8633 (exit $ac_status); } &&
1cf0118d
RO
8634 { ac_try='test -z "$ac_c_werror_flag"
8635 || test ! -s conftest.err'
86da66b5
HPN
8636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8637 (eval $ac_try) 2>&5
8638 ac_status=$?
8639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8640 (exit $ac_status); }; } &&
8641 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8643 (eval $ac_try) 2>&5
8644 ac_status=$?
8645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8646 (exit $ac_status); }; }; then
4977bab6
ZW
8647 ac_cv_c_bigendian=yes
8648else
ba479fd2
NN
8649 echo "$as_me: failed program was:" >&5
8650sed 's/^/| /' conftest.$ac_ext >&5
8651
8652ac_cv_c_bigendian=no
4977bab6 8653fi
86da66b5 8654rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8655else
ba479fd2
NN
8656 echo "$as_me: failed program was:" >&5
8657sed 's/^/| /' conftest.$ac_ext >&5
8658
9791c75c
KC
8659# It does not; compile a test program.
8660if test "$cross_compiling" = yes; then
8661 # try to guess the endianness by grepping values into an object file
8662 ac_cv_c_bigendian=unknown
8663 cat >conftest.$ac_ext <<_ACEOF
8664/* confdefs.h. */
8665_ACEOF
8666cat confdefs.h >>conftest.$ac_ext
8667cat >>conftest.$ac_ext <<_ACEOF
8668/* end confdefs.h. */
8669short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8670short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8671void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
8672short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8673short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8674void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
8675int
8676main ()
8677{
8678 _ascii (); _ebcdic ();
8679 ;
8680 return 0;
8681}
8682_ACEOF
8683rm -f conftest.$ac_objext
8684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8685 (eval $ac_compile) 2>conftest.er1
8686 ac_status=$?
8687 grep -v '^ *+' conftest.er1 >conftest.err
8688 rm -f conftest.er1
8689 cat conftest.err >&5
8690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8691 (exit $ac_status); } &&
1cf0118d
RO
8692 { ac_try='test -z "$ac_c_werror_flag"
8693 || test ! -s conftest.err'
9791c75c
KC
8694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8695 (eval $ac_try) 2>&5
8696 ac_status=$?
8697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8698 (exit $ac_status); }; } &&
8699 { ac_try='test -s conftest.$ac_objext'
8700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8701 (eval $ac_try) 2>&5
8702 ac_status=$?
8703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8704 (exit $ac_status); }; }; then
8705 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
8706 ac_cv_c_bigendian=yes
8707fi
8708if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8709 if test "$ac_cv_c_bigendian" = unknown; then
8710 ac_cv_c_bigendian=no
8711 else
8712 # finding both strings is unlikely to happen, but who knows?
8713 ac_cv_c_bigendian=unknown
8714 fi
8715fi
8716else
8717 echo "$as_me: failed program was:" >&5
8718sed 's/^/| /' conftest.$ac_ext >&5
8719
4977bab6 8720fi
86da66b5 8721rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
8722else
8723 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8724/* confdefs.h. */
8725_ACEOF
8726cat confdefs.h >>conftest.$ac_ext
8727cat >>conftest.$ac_ext <<_ACEOF
8728/* end confdefs.h. */
9791c75c
KC
8729int
8730main ()
8731{
4977bab6
ZW
8732 /* Are we little or big endian? From Harbison&Steele. */
8733 union
8734 {
8735 long l;
8736 char c[sizeof (long)];
8737 } u;
8738 u.l = 1;
8739 exit (u.c[sizeof (long) - 1] == 1);
8740}
ba479fd2
NN
8741_ACEOF
8742rm -f conftest$ac_exeext
8743if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8744 (eval $ac_link) 2>&5
8745 ac_status=$?
8746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8747 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8749 (eval $ac_try) 2>&5
8750 ac_status=$?
8751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8752 (exit $ac_status); }; }; then
4977bab6
ZW
8753 ac_cv_c_bigendian=no
8754else
ba479fd2
NN
8755 echo "$as_me: program exited with status $ac_status" >&5
8756echo "$as_me: failed program was:" >&5
8757sed 's/^/| /' conftest.$ac_ext >&5
8758
8759( exit $ac_status )
8760ac_cv_c_bigendian=yes
4977bab6 8761fi
86da66b5 8762rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 8763fi
4977bab6 8764fi
9791c75c 8765rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8766fi
ba479fd2
NN
8767echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8768echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
8769case $ac_cv_c_bigendian in
8770 yes)
ba479fd2
NN
8771
8772cat >>confdefs.h <<\_ACEOF
4977bab6 8773#define WORDS_BIGENDIAN 1
ba479fd2 8774_ACEOF
9791c75c
KC
8775 ;;
8776 no)
8777 ;;
8778 *)
8779 { { echo "$as_me:$LINENO: error: unknown endianness
8780presetting ac_cv_c_bigendian=no (or yes) will help" >&5
8781echo "$as_me: error: unknown endianness
8782presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
8783 { (exit 1); exit 1; }; } ;;
8784esac
84c041a1 8785
75e93faa 8786
73458fb7
NN
8787# --------
8788# UNSORTED
8789# --------
1e608388 8790
73458fb7
NN
8791# Stage specific cflags for build.
8792stage1_cflags=
8793case $build in
8794vax-*-*)
8795 if test x$GCC = xyes
8796 then
8797 stage1_cflags="-Wa,-J"
8798 else
8799 stage1_cflags="-J"
8800 fi
8801 ;;
8802powerpc-*-darwin*)
8803 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
8804 # sources; use -no-cpp-precomp to get to GNU cpp.
8805 # Apple's GCC has bugs in designated initializer handling, so disable
8806 # that too.
8807 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
8808 ;;
8809esac
1e608388 8810
1e608388 8811
4e70264f
ZW
8812# These libraries may be used by collect2.
8813# We may need a special search path to get them linked.
ba479fd2
NN
8814echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8815echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
8816if test "${gcc_cv_collect2_libs+set}" = set; then
8817 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
8818else
8819 save_LIBS="$LIBS"
7f2749d4 8820for libs in '' -lld -lmld \
4e70264f
ZW
8821 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8822 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8823do
8824 LIBS="$libs"
ba479fd2 8825 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8826/* confdefs.h. */
8827_ACEOF
8828cat confdefs.h >>conftest.$ac_ext
8829cat >>conftest.$ac_ext <<_ACEOF
8830/* end confdefs.h. */
8831
4e70264f 8832/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8833#ifdef __cplusplus
8834extern "C"
8835#endif
4e70264f 8836/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8837 builtin and then its argument prototype would still apply. */
8838char ldopen ();
8839int
8840main ()
8841{
8842ldopen ();
8843 ;
8844 return 0;
8845}
8846_ACEOF
8847rm -f conftest.$ac_objext conftest$ac_exeext
8848if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8849 (eval $ac_link) 2>conftest.er1
ba479fd2 8850 ac_status=$?
86da66b5
HPN
8851 grep -v '^ *+' conftest.er1 >conftest.err
8852 rm -f conftest.er1
8853 cat conftest.err >&5
ba479fd2
NN
8854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8855 (exit $ac_status); } &&
1cf0118d
RO
8856 { ac_try='test -z "$ac_c_werror_flag"
8857 || test ! -s conftest.err'
86da66b5
HPN
8858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8859 (eval $ac_try) 2>&5
8860 ac_status=$?
8861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8862 (exit $ac_status); }; } &&
8863 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8865 (eval $ac_try) 2>&5
8866 ac_status=$?
8867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8868 (exit $ac_status); }; }; then
4e70264f
ZW
8869 gcc_cv_collect2_libs="$libs"; break
8870else
ba479fd2
NN
8871 echo "$as_me: failed program was:" >&5
8872sed 's/^/| /' conftest.$ac_ext >&5
8873
4e70264f 8874fi
86da66b5
HPN
8875rm -f conftest.err conftest.$ac_objext \
8876 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8877done
8878LIBS="$save_LIBS"
8879test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8880fi
ba479fd2
NN
8881echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8882echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
8883case $gcc_cv_collect2_libs in
8884 "none required") ;;
8885 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8886esac
8887
8888
7f2749d4
RK
8889# When building Ada code on Alpha, we need exc_resume which is usually in
8890# -lexc. So test for it.
8891save_LIBS="$LIBS"
8892LIBS=
ba479fd2
NN
8893echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8894echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
8895if test "${ac_cv_search_exc_resume+set}" = set; then
8896 echo $ECHO_N "(cached) $ECHO_C" >&6
8897else
8898 ac_func_search_save_LIBS=$LIBS
8899ac_cv_search_exc_resume=no
8900cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8901/* confdefs.h. */
8902_ACEOF
8903cat confdefs.h >>conftest.$ac_ext
8904cat >>conftest.$ac_ext <<_ACEOF
8905/* end confdefs.h. */
7f2749d4 8906
7f2749d4 8907/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8908#ifdef __cplusplus
8909extern "C"
8910#endif
7f2749d4 8911/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8912 builtin and then its argument prototype would still apply. */
8913char exc_resume ();
8914int
8915main ()
8916{
8917exc_resume ();
8918 ;
8919 return 0;
8920}
8921_ACEOF
8922rm -f conftest.$ac_objext conftest$ac_exeext
8923if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8924 (eval $ac_link) 2>conftest.er1
ba479fd2 8925 ac_status=$?
86da66b5
HPN
8926 grep -v '^ *+' conftest.er1 >conftest.err
8927 rm -f conftest.er1
8928 cat conftest.err >&5
ba479fd2
NN
8929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8930 (exit $ac_status); } &&
1cf0118d
RO
8931 { ac_try='test -z "$ac_c_werror_flag"
8932 || test ! -s conftest.err'
86da66b5
HPN
8933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8934 (eval $ac_try) 2>&5
8935 ac_status=$?
8936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8937 (exit $ac_status); }; } &&
8938 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8940 (eval $ac_try) 2>&5
8941 ac_status=$?
8942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8943 (exit $ac_status); }; }; then
7f2749d4
RK
8944 ac_cv_search_exc_resume="none required"
8945else
ba479fd2
NN
8946 echo "$as_me: failed program was:" >&5
8947sed 's/^/| /' conftest.$ac_ext >&5
8948
7f2749d4 8949fi
86da66b5
HPN
8950rm -f conftest.err conftest.$ac_objext \
8951 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8952if test "$ac_cv_search_exc_resume" = no; then
8953 for ac_lib in exc; do
8954 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8955 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8956/* confdefs.h. */
8957_ACEOF
8958cat confdefs.h >>conftest.$ac_ext
8959cat >>conftest.$ac_ext <<_ACEOF
8960/* end confdefs.h. */
8961
7f2749d4 8962/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8963#ifdef __cplusplus
8964extern "C"
8965#endif
7f2749d4 8966/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8967 builtin and then its argument prototype would still apply. */
8968char exc_resume ();
8969int
8970main ()
8971{
8972exc_resume ();
8973 ;
8974 return 0;
8975}
8976_ACEOF
8977rm -f conftest.$ac_objext conftest$ac_exeext
8978if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8979 (eval $ac_link) 2>conftest.er1
ba479fd2 8980 ac_status=$?
86da66b5
HPN
8981 grep -v '^ *+' conftest.er1 >conftest.err
8982 rm -f conftest.er1
8983 cat conftest.err >&5
ba479fd2
NN
8984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8985 (exit $ac_status); } &&
1cf0118d
RO
8986 { ac_try='test -z "$ac_c_werror_flag"
8987 || test ! -s conftest.err'
86da66b5
HPN
8988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8989 (eval $ac_try) 2>&5
8990 ac_status=$?
8991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8992 (exit $ac_status); }; } &&
8993 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8995 (eval $ac_try) 2>&5
8996 ac_status=$?
8997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8998 (exit $ac_status); }; }; then
8999 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
9000break
9001else
ba479fd2
NN
9002 echo "$as_me: failed program was:" >&5
9003sed 's/^/| /' conftest.$ac_ext >&5
9004
cafe096b 9005fi
86da66b5
HPN
9006rm -f conftest.err conftest.$ac_objext \
9007 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9008 done
6e3f3080 9009fi
ba479fd2
NN
9010LIBS=$ac_func_search_save_LIBS
9011fi
9012echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
9013echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
9014if test "$ac_cv_search_exc_resume" != no; then
63cf211a 9015 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 9016
7f2749d4 9017fi
ba479fd2 9018
7f2749d4
RK
9019GNAT_LIBEXC="$LIBS"
9020LIBS="$save_LIBS"
9021
9022
62c9aa5f
ZW
9023# Some systems put ldexp and frexp in libm instead of libc; assume
9024# they're both in the same place. jcf-dump needs them.
9025save_LIBS="$LIBS"
9026LIBS=
ba479fd2
NN
9027echo "$as_me:$LINENO: checking for library containing ldexp" >&5
9028echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
9029if test "${ac_cv_search_ldexp+set}" = set; then
9030 echo $ECHO_N "(cached) $ECHO_C" >&6
9031else
9032 ac_func_search_save_LIBS=$LIBS
9033ac_cv_search_ldexp=no
9034cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9035/* confdefs.h. */
9036_ACEOF
9037cat confdefs.h >>conftest.$ac_ext
9038cat >>conftest.$ac_ext <<_ACEOF
9039/* end confdefs.h. */
62c9aa5f 9040
62c9aa5f 9041/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9042#ifdef __cplusplus
9043extern "C"
9044#endif
62c9aa5f 9045/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9046 builtin and then its argument prototype would still apply. */
9047char ldexp ();
9048int
9049main ()
9050{
9051ldexp ();
9052 ;
9053 return 0;
9054}
9055_ACEOF
9056rm -f conftest.$ac_objext conftest$ac_exeext
9057if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9058 (eval $ac_link) 2>conftest.er1
ba479fd2 9059 ac_status=$?
86da66b5
HPN
9060 grep -v '^ *+' conftest.er1 >conftest.err
9061 rm -f conftest.er1
9062 cat conftest.err >&5
ba479fd2
NN
9063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9064 (exit $ac_status); } &&
1cf0118d
RO
9065 { ac_try='test -z "$ac_c_werror_flag"
9066 || test ! -s conftest.err'
86da66b5
HPN
9067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9068 (eval $ac_try) 2>&5
9069 ac_status=$?
9070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9071 (exit $ac_status); }; } &&
9072 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9074 (eval $ac_try) 2>&5
9075 ac_status=$?
9076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9077 (exit $ac_status); }; }; then
62c9aa5f
ZW
9078 ac_cv_search_ldexp="none required"
9079else
ba479fd2
NN
9080 echo "$as_me: failed program was:" >&5
9081sed 's/^/| /' conftest.$ac_ext >&5
9082
62c9aa5f 9083fi
86da66b5
HPN
9084rm -f conftest.err conftest.$ac_objext \
9085 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9086if test "$ac_cv_search_ldexp" = no; then
9087 for ac_lib in m; do
9088 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9089 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9090/* confdefs.h. */
9091_ACEOF
9092cat confdefs.h >>conftest.$ac_ext
9093cat >>conftest.$ac_ext <<_ACEOF
9094/* end confdefs.h. */
9095
62c9aa5f 9096/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9097#ifdef __cplusplus
9098extern "C"
9099#endif
62c9aa5f 9100/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9101 builtin and then its argument prototype would still apply. */
9102char ldexp ();
9103int
9104main ()
9105{
9106ldexp ();
9107 ;
9108 return 0;
9109}
9110_ACEOF
9111rm -f conftest.$ac_objext conftest$ac_exeext
9112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9113 (eval $ac_link) 2>conftest.er1
ba479fd2 9114 ac_status=$?
86da66b5
HPN
9115 grep -v '^ *+' conftest.er1 >conftest.err
9116 rm -f conftest.er1
9117 cat conftest.err >&5
ba479fd2
NN
9118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9119 (exit $ac_status); } &&
1cf0118d
RO
9120 { ac_try='test -z "$ac_c_werror_flag"
9121 || test ! -s conftest.err'
86da66b5
HPN
9122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9123 (eval $ac_try) 2>&5
9124 ac_status=$?
9125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9126 (exit $ac_status); }; } &&
9127 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9129 (eval $ac_try) 2>&5
9130 ac_status=$?
9131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9132 (exit $ac_status); }; }; then
9133 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
9134break
9135else
ba479fd2
NN
9136 echo "$as_me: failed program was:" >&5
9137sed 's/^/| /' conftest.$ac_ext >&5
9138
cafe096b 9139fi
86da66b5
HPN
9140rm -f conftest.err conftest.$ac_objext \
9141 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9142 done
6e3f3080 9143fi
ba479fd2
NN
9144LIBS=$ac_func_search_save_LIBS
9145fi
9146echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
9147echo "${ECHO_T}$ac_cv_search_ldexp" >&6
9148if test "$ac_cv_search_ldexp" != no; then
63cf211a 9149 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 9150
62c9aa5f 9151fi
ba479fd2 9152
62c9aa5f
ZW
9153LDEXP_LIB="$LIBS"
9154LIBS="$save_LIBS"
9155
9156
956d6950
JL
9157# Use <inttypes.h> only if it exists,
9158# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
9159echo "$as_me:$LINENO: checking for inttypes.h" >&5
9160echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
9161if test "${gcc_cv_header_inttypes_h+set}" = set; then
9162 echo $ECHO_N "(cached) $ECHO_C" >&6
9163else
9164 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9165/* confdefs.h. */
9166_ACEOF
9167cat confdefs.h >>conftest.$ac_ext
9168cat >>conftest.$ac_ext <<_ACEOF
9169/* end confdefs.h. */
956d6950
JL
9170#include <sys/types.h>
9171#include <inttypes.h>
ba479fd2
NN
9172int
9173main ()
9174{
956d6950 9175intmax_t i = -1;
ba479fd2
NN
9176 ;
9177 return 0;
9178}
9179_ACEOF
9180rm -f conftest.$ac_objext
9181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9182 (eval $ac_compile) 2>conftest.er1
ba479fd2 9183 ac_status=$?
86da66b5
HPN
9184 grep -v '^ *+' conftest.er1 >conftest.err
9185 rm -f conftest.er1
9186 cat conftest.err >&5
ba479fd2
NN
9187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9188 (exit $ac_status); } &&
1cf0118d
RO
9189 { ac_try='test -z "$ac_c_werror_flag"
9190 || test ! -s conftest.err'
86da66b5
HPN
9191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9192 (eval $ac_try) 2>&5
9193 ac_status=$?
9194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9195 (exit $ac_status); }; } &&
9196 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9198 (eval $ac_try) 2>&5
9199 ac_status=$?
9200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9201 (exit $ac_status); }; }; then
0056a9b5 9202 gcc_cv_header_inttypes_h=yes
956d6950 9203else
ba479fd2
NN
9204 echo "$as_me: failed program was:" >&5
9205sed 's/^/| /' conftest.$ac_ext >&5
9206
9207gcc_cv_header_inttypes_h=no
956d6950 9208fi
86da66b5 9209rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
9210fi
9211
ba479fd2
NN
9212echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
9213echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 9214if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
9215
9216cat >>confdefs.h <<\_ACEOF
0056a9b5 9217#define HAVE_INTTYPES_H 1
ba479fd2 9218_ACEOF
0056a9b5
KG
9219
9220fi
956d6950 9221
c149cc37 9222
ba479fd2
NN
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
0d667716
KG
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
ba479fd2
NN
9251
9252
9253
9254
9255
9256
9257
9258
52a6edcc 9259for ac_func in times clock kill getrlimit setrlimit atoll atoq \
0d667716
KG
9260 sysconf strsignal getrusage nl_langinfo scandir alphasort \
9261 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9262 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 9263do
ba479fd2
NN
9264as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9265echo "$as_me:$LINENO: checking for $ac_func" >&5
9266echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9267if eval "test \"\${$as_ac_var+set}\" = set"; then
9268 echo $ECHO_N "(cached) $ECHO_C" >&6
9269else
9270 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9271/* confdefs.h. */
9272_ACEOF
9273cat confdefs.h >>conftest.$ac_ext
9274cat >>conftest.$ac_ext <<_ACEOF
9275/* end confdefs.h. */
86da66b5
HPN
9276/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9277 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9278#define $ac_func innocuous_$ac_func
9279
956d6950 9280/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9281 which can conflict with char $ac_func (); below.
9282 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9283 <limits.h> exists even on freestanding compilers. */
86da66b5 9284
ba479fd2
NN
9285#ifdef __STDC__
9286# include <limits.h>
9287#else
9288# include <assert.h>
9289#endif
86da66b5
HPN
9290
9291#undef $ac_func
9292
6e3f3080 9293/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9294#ifdef __cplusplus
9295extern "C"
9296{
9297#endif
6e3f3080 9298/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9299 builtin and then its argument prototype would still apply. */
9300char $ac_func ();
956d6950
JL
9301/* The GNU C library defines this for functions which it implements
9302 to always fail with ENOSYS. Some functions are actually named
9303 something starting with __ and the normal name is an alias. */
9304#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9305choke me
9306#else
ba479fd2
NN
9307char (*f) () = $ac_func;
9308#endif
9309#ifdef __cplusplus
9310}
956d6950
JL
9311#endif
9312
ba479fd2
NN
9313int
9314main ()
9315{
9316return f != $ac_func;
9317 ;
9318 return 0;
9319}
9320_ACEOF
9321rm -f conftest.$ac_objext conftest$ac_exeext
9322if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9323 (eval $ac_link) 2>conftest.er1
ba479fd2 9324 ac_status=$?
86da66b5
HPN
9325 grep -v '^ *+' conftest.er1 >conftest.err
9326 rm -f conftest.er1
9327 cat conftest.err >&5
ba479fd2
NN
9328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9329 (exit $ac_status); } &&
1cf0118d
RO
9330 { ac_try='test -z "$ac_c_werror_flag"
9331 || test ! -s conftest.err'
86da66b5
HPN
9332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9333 (eval $ac_try) 2>&5
9334 ac_status=$?
9335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9336 (exit $ac_status); }; } &&
9337 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9339 (eval $ac_try) 2>&5
9340 ac_status=$?
9341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9342 (exit $ac_status); }; }; then
9343 eval "$as_ac_var=yes"
9344else
9345 echo "$as_me: failed program was:" >&5
9346sed 's/^/| /' conftest.$ac_ext >&5
9347
9348eval "$as_ac_var=no"
9349fi
86da66b5
HPN
9350rm -f conftest.err conftest.$ac_objext \
9351 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9352fi
9353echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9354echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9355if test `eval echo '${'$as_ac_var'}'` = yes; then
9356 cat >>confdefs.h <<_ACEOF
9357#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9358_ACEOF
956d6950 9359
956d6950
JL
9360fi
9361done
9362
6885fc87 9363
39f6c4c8 9364if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
9365 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9366echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
9367if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9368 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9369else
9370 if test "$cross_compiling" = yes; then
9371 gcc_cv_func_mbstowcs_works=yes
9372else
ba479fd2 9373 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9374/* confdefs.h. */
9375_ACEOF
9376cat confdefs.h >>conftest.$ac_ext
9377cat >>conftest.$ac_ext <<_ACEOF
9378/* end confdefs.h. */
39f6c4c8
KW
9379#include <stdlib.h>
9380int main()
9381{
9382 mbstowcs(0, "", 0);
9383 return 0;
9384}
ba479fd2
NN
9385_ACEOF
9386rm -f conftest$ac_exeext
9387if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9388 (eval $ac_link) 2>&5
9389 ac_status=$?
9390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9391 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9393 (eval $ac_try) 2>&5
9394 ac_status=$?
9395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9396 (exit $ac_status); }; }; then
39f6c4c8
KW
9397 gcc_cv_func_mbstowcs_works=yes
9398else
ba479fd2
NN
9399 echo "$as_me: program exited with status $ac_status" >&5
9400echo "$as_me: failed program was:" >&5
9401sed 's/^/| /' conftest.$ac_ext >&5
9402
9403( exit $ac_status )
9404gcc_cv_func_mbstowcs_works=no
39f6c4c8 9405fi
86da66b5 9406rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 9407fi
39f6c4c8 9408fi
ba479fd2
NN
9409echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9410echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 9411 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
9412
9413cat >>confdefs.h <<\_ACEOF
39f6c4c8 9414#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 9415_ACEOF
39f6c4c8
KW
9416
9417 fi
9418fi
9419
ba479fd2
NN
9420echo "$as_me:$LINENO: checking for ssize_t" >&5
9421echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
9422if test "${ac_cv_type_ssize_t+set}" = set; then
9423 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 9424else
ba479fd2 9425 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9426/* confdefs.h. */
9427_ACEOF
9428cat confdefs.h >>conftest.$ac_ext
9429cat >>conftest.$ac_ext <<_ACEOF
9430/* end confdefs.h. */
8b4fc07a
NN
9431$ac_includes_default
9432int
9433main ()
9434{
9435if ((ssize_t *) 0)
9436 return 0;
9437if (sizeof (ssize_t))
9438 return 0;
9439 ;
9440 return 0;
9441}
ba479fd2 9442_ACEOF
8b4fc07a
NN
9443rm -f conftest.$ac_objext
9444if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9445 (eval $ac_compile) 2>conftest.er1
8b4fc07a 9446 ac_status=$?
86da66b5
HPN
9447 grep -v '^ *+' conftest.er1 >conftest.err
9448 rm -f conftest.er1
9449 cat conftest.err >&5
8b4fc07a
NN
9450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9451 (exit $ac_status); } &&
1cf0118d
RO
9452 { ac_try='test -z "$ac_c_werror_flag"
9453 || test ! -s conftest.err'
86da66b5
HPN
9454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9455 (eval $ac_try) 2>&5
9456 ac_status=$?
9457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9458 (exit $ac_status); }; } &&
9459 { ac_try='test -s conftest.$ac_objext'
8b4fc07a
NN
9460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9461 (eval $ac_try) 2>&5
9462 ac_status=$?
9463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9464 (exit $ac_status); }; }; then
cb65112a 9465 ac_cv_type_ssize_t=yes
f12bc141 9466else
8b4fc07a
NN
9467 echo "$as_me: failed program was:" >&5
9468sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9469
8b4fc07a
NN
9470ac_cv_type_ssize_t=no
9471fi
86da66b5 9472rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9473fi
ba479fd2
NN
9474echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9475echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
9476if test $ac_cv_type_ssize_t = yes; then
9477 :
9478else
ba479fd2 9479
8b4fc07a 9480cat >>confdefs.h <<_ACEOF
f12bc141 9481#define ssize_t int
ba479fd2 9482_ACEOF
f12bc141
ZW
9483
9484fi
9485
0b9d02c6 9486
e256b8b6
DA
9487# Try to determine the array type of the second argument of getgroups
9488# for the target system (int or gid_t).
ba479fd2
NN
9489echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9490echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
9491if test "${ac_cv_type_uid_t+set}" = set; then
9492 echo $ECHO_N "(cached) $ECHO_C" >&6
9493else
9494 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9495/* confdefs.h. */
9496_ACEOF
9497cat confdefs.h >>conftest.$ac_ext
9498cat >>conftest.$ac_ext <<_ACEOF
9499/* end confdefs.h. */
e256b8b6 9500#include <sys/types.h>
ba479fd2
NN
9501
9502_ACEOF
e256b8b6 9503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9504 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
9505 ac_cv_type_uid_t=yes
9506else
e256b8b6
DA
9507 ac_cv_type_uid_t=no
9508fi
9509rm -f conftest*
9510
9511fi
ba479fd2
NN
9512echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9513echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 9514if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
9515
9516cat >>confdefs.h <<\_ACEOF
e256b8b6 9517#define uid_t int
ba479fd2 9518_ACEOF
cafe096b 9519
ba479fd2
NN
9520
9521cat >>confdefs.h <<\_ACEOF
e256b8b6 9522#define gid_t int
ba479fd2 9523_ACEOF
e256b8b6
DA
9524
9525fi
9526
ba479fd2
NN
9527echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9528echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
9529if test "${ac_cv_type_getgroups+set}" = set; then
9530 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
9531else
9532 if test "$cross_compiling" = yes; then
9533 ac_cv_type_getgroups=cross
9534else
ba479fd2 9535 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9536/* confdefs.h. */
9537_ACEOF
9538cat confdefs.h >>conftest.$ac_ext
9539cat >>conftest.$ac_ext <<_ACEOF
9540/* end confdefs.h. */
e256b8b6
DA
9541/* Thanks to Mike Rendell for this test. */
9542#include <sys/types.h>
9543#define NGID 256
9544#undef MAX
9545#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
9546
9547int
9548main ()
e256b8b6
DA
9549{
9550 gid_t gidset[NGID];
9551 int i, n;
9552 union { gid_t gval; long lval; } val;
9553
9554 val.lval = -1;
9555 for (i = 0; i < NGID; i++)
9556 gidset[i] = val.gval;
9557 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 9558 gidset);
e256b8b6
DA
9559 /* Exit non-zero if getgroups seems to require an array of ints. This
9560 happens when gid_t is short but getgroups modifies an array of ints. */
9561 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 9562}
ba479fd2
NN
9563_ACEOF
9564rm -f conftest$ac_exeext
9565if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9566 (eval $ac_link) 2>&5
9567 ac_status=$?
9568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9569 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9571 (eval $ac_try) 2>&5
9572 ac_status=$?
9573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9574 (exit $ac_status); }; }; then
9575 ac_cv_type_getgroups=gid_t
63cf211a 9576else
ba479fd2
NN
9577 echo "$as_me: program exited with status $ac_status" >&5
9578echo "$as_me: failed program was:" >&5
9579sed 's/^/| /' conftest.$ac_ext >&5
9580
9581( exit $ac_status )
9582ac_cv_type_getgroups=int
e256b8b6 9583fi
86da66b5 9584rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 9585fi
e256b8b6 9586if test $ac_cv_type_getgroups = cross; then
ba479fd2 9587 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9588/* confdefs.h. */
9589_ACEOF
9590cat confdefs.h >>conftest.$ac_ext
9591cat >>conftest.$ac_ext <<_ACEOF
9592/* end confdefs.h. */
e256b8b6 9593#include <unistd.h>
ba479fd2
NN
9594
9595_ACEOF
e256b8b6 9596if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9597 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
9598 ac_cv_type_getgroups=gid_t
9599else
e256b8b6
DA
9600 ac_cv_type_getgroups=int
9601fi
9602rm -f conftest*
9603
9604fi
9605fi
ba479fd2
NN
9606echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9607echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 9608
ba479fd2 9609cat >>confdefs.h <<_ACEOF
e256b8b6 9610#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 9611_ACEOF
e256b8b6
DA
9612
9613
9614if test "${target}" = "${build}"; then
9615 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9616else
9617 case "${target}" in
9618 # This condition may need some tweaking. It should include all
9619 # targets where the array type of the second argument of getgroups
9620 # is int and the type of gid_t is not equivalent to int.
9621 *-*-sunos* | *-*-ultrix*)
9622 TARGET_GETGROUPS_T=int
9623 ;;
9624 *)
9625 TARGET_GETGROUPS_T=gid_t
9626 ;;
9627 esac
9628fi
9629
9630
3b0727a0
MR
9631
9632echo "$as_me:$LINENO: checking for sys/mman.h" >&5
9633echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
9634if test "${ac_cv_header_sys_mman_h+set}" = set; then
9635 echo $ECHO_N "(cached) $ECHO_C" >&6
9636else
9637 cat >conftest.$ac_ext <<_ACEOF
9638/* confdefs.h. */
9639_ACEOF
9640cat confdefs.h >>conftest.$ac_ext
9641cat >>conftest.$ac_ext <<_ACEOF
9642/* end confdefs.h. */
9643#include <sys/mman.h>
9644_ACEOF
9645if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9646 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9647 ac_status=$?
9648 grep -v '^ *+' conftest.er1 >conftest.err
9649 rm -f conftest.er1
9650 cat conftest.err >&5
9651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9652 (exit $ac_status); } >/dev/null; then
9653 if test -s conftest.err; then
9654 ac_cpp_err=$ac_c_preproc_warn_flag
9655 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9656 else
9657 ac_cpp_err=
9658 fi
9659else
9660 ac_cpp_err=yes
9661fi
9662if test -z "$ac_cpp_err"; then
9663 ac_cv_header_sys_mman_h=yes
9664else
9665 echo "$as_me: failed program was:" >&5
9666sed 's/^/| /' conftest.$ac_ext >&5
9667
9668 ac_cv_header_sys_mman_h=no
9669fi
9670rm -f conftest.err conftest.$ac_ext
9671fi
9672echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9673echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
9674if test $ac_cv_header_sys_mman_h = yes; then
9675 gcc_header_sys_mman_h=yes
9676else
9677 gcc_header_sys_mman_h=no
9678fi
9679
9680echo "$as_me:$LINENO: checking for mmap" >&5
9681echo $ECHO_N "checking for mmap... $ECHO_C" >&6
9682if test "${ac_cv_func_mmap+set}" = set; then
9683 echo $ECHO_N "(cached) $ECHO_C" >&6
9684else
9685 cat >conftest.$ac_ext <<_ACEOF
9686/* confdefs.h. */
9687_ACEOF
9688cat confdefs.h >>conftest.$ac_ext
9689cat >>conftest.$ac_ext <<_ACEOF
9690/* end confdefs.h. */
9691/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9692 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9693#define mmap innocuous_mmap
9694
9695/* System header to define __stub macros and hopefully few prototypes,
9696 which can conflict with char mmap (); below.
9697 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9698 <limits.h> exists even on freestanding compilers. */
9699
9700#ifdef __STDC__
9701# include <limits.h>
9702#else
9703# include <assert.h>
9704#endif
9705
9706#undef mmap
9707
9708/* Override any gcc2 internal prototype to avoid an error. */
9709#ifdef __cplusplus
9710extern "C"
9711{
9712#endif
9713/* We use char because int might match the return type of a gcc2
9714 builtin and then its argument prototype would still apply. */
9715char mmap ();
9716/* The GNU C library defines this for functions which it implements
9717 to always fail with ENOSYS. Some functions are actually named
9718 something starting with __ and the normal name is an alias. */
9719#if defined (__stub_mmap) || defined (__stub___mmap)
9720choke me
9721#else
9722char (*f) () = mmap;
9723#endif
9724#ifdef __cplusplus
9725}
9726#endif
9727
9728int
9729main ()
9730{
9731return f != mmap;
9732 ;
9733 return 0;
9734}
9735_ACEOF
9736rm -f conftest.$ac_objext conftest$ac_exeext
9737if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9738 (eval $ac_link) 2>conftest.er1
9739 ac_status=$?
9740 grep -v '^ *+' conftest.er1 >conftest.err
9741 rm -f conftest.er1
9742 cat conftest.err >&5
9743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9744 (exit $ac_status); } &&
1cf0118d
RO
9745 { ac_try='test -z "$ac_c_werror_flag"
9746 || test ! -s conftest.err'
3b0727a0
MR
9747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9748 (eval $ac_try) 2>&5
9749 ac_status=$?
9750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9751 (exit $ac_status); }; } &&
9752 { ac_try='test -s conftest$ac_exeext'
9753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9754 (eval $ac_try) 2>&5
9755 ac_status=$?
9756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9757 (exit $ac_status); }; }; then
9758 ac_cv_func_mmap=yes
9759else
9760 echo "$as_me: failed program was:" >&5
9761sed 's/^/| /' conftest.$ac_ext >&5
9762
9763ac_cv_func_mmap=no
9764fi
9765rm -f conftest.err conftest.$ac_objext \
9766 conftest$ac_exeext conftest.$ac_ext
9767fi
9768echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9769echo "${ECHO_T}$ac_cv_func_mmap" >&6
9770if test $ac_cv_func_mmap = yes; then
9771 gcc_func_mmap=yes
9772else
9773 gcc_func_mmap=no
9774fi
9775
9776if test "$gcc_header_sys_mman_h" != yes \
9777 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
9778 gcc_cv_func_mmap_file=no
9779 gcc_cv_func_mmap_dev_zero=no
9780 gcc_cv_func_mmap_anon=no
9781else
ba479fd2
NN
9782 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9783echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
9784if test "${gcc_cv_func_mmap_file+set}" = set; then
9785 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 9786else
ba479fd2 9787 # Add a system to this blacklist if
1072ec3f
ZW
9788 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9789 # memory area containing the same data that you'd get if you applied
9790 # read() to the same fd. The only system known to have a problem here
9791 # is VMS, where text files have record structure.
9792 case "$host_os" in
ba479fd2 9793 vms* | ultrix*)
1072ec3f
ZW
9794 gcc_cv_func_mmap_file=no ;;
9795 *)
9796 gcc_cv_func_mmap_file=yes;;
9797 esac
9798fi
ba479fd2
NN
9799echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9800echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9801 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9802echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
9803if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9804 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9805else
9806 # Add a system to this blacklist if it has mmap() but /dev/zero
9807 # does not exist, or if mmapping /dev/zero does not give anonymous
9808 # zeroed pages with both the following properties:
9809 # 1. If you map N consecutive pages in with one call, and then
9810 # unmap any subset of those pages, the pages that were not
9811 # explicitly unmapped remain accessible.
9812 # 2. If you map two adjacent blocks of memory and then unmap them
9813 # both at once, they must both go away.
9814 # Systems known to be in this category are Windows (all variants),
9815 # VMS, and Darwin.
9816 case "$host_os" in
2ce240d3 9817 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
9818 gcc_cv_func_mmap_dev_zero=no ;;
9819 *)
9820 gcc_cv_func_mmap_dev_zero=yes;;
9821 esac
9822fi
ba479fd2
NN
9823echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9824echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
9825
9826 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
9827 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9828echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
9829if test "${gcc_cv_decl_map_anon+set}" = set; then
9830 echo $ECHO_N "(cached) $ECHO_C" >&6
9831else
9832 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9833/* confdefs.h. */
9834_ACEOF
9835cat confdefs.h >>conftest.$ac_ext
9836cat >>conftest.$ac_ext <<_ACEOF
9837/* end confdefs.h. */
1072ec3f
ZW
9838#include <sys/types.h>
9839#include <sys/mman.h>
9840#include <unistd.h>
9841
9842#ifndef MAP_ANONYMOUS
9843#define MAP_ANONYMOUS MAP_ANON
9844#endif
9845
ba479fd2
NN
9846int
9847main ()
9848{
1072ec3f 9849int n = MAP_ANONYMOUS;
ba479fd2
NN
9850 ;
9851 return 0;
9852}
9853_ACEOF
9854rm -f conftest.$ac_objext
9855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9856 (eval $ac_compile) 2>conftest.er1
ba479fd2 9857 ac_status=$?
86da66b5
HPN
9858 grep -v '^ *+' conftest.er1 >conftest.err
9859 rm -f conftest.er1
9860 cat conftest.err >&5
ba479fd2
NN
9861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9862 (exit $ac_status); } &&
1cf0118d
RO
9863 { ac_try='test -z "$ac_c_werror_flag"
9864 || test ! -s conftest.err'
86da66b5
HPN
9865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9866 (eval $ac_try) 2>&5
9867 ac_status=$?
9868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9869 (exit $ac_status); }; } &&
9870 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9872 (eval $ac_try) 2>&5
9873 ac_status=$?
9874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9875 (exit $ac_status); }; }; then
1072ec3f
ZW
9876 gcc_cv_decl_map_anon=yes
9877else
ba479fd2
NN
9878 echo "$as_me: failed program was:" >&5
9879sed 's/^/| /' conftest.$ac_ext >&5
9880
9881gcc_cv_decl_map_anon=no
1072ec3f 9882fi
86da66b5 9883rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 9884fi
ba479fd2
NN
9885echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9886echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
9887
9888 if test $gcc_cv_decl_map_anon = no; then
9889 gcc_cv_func_mmap_anon=no
9890 else
ba479fd2
NN
9891 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9892echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
9893if test "${gcc_cv_func_mmap_anon+set}" = set; then
9894 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9895else
9896 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9897 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9898 # doesn't give anonymous zeroed pages with the same properties listed
9899 # above for use of /dev/zero.
9900 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9901 case "$host_os" in
9902 vms* | cygwin* | pe | mingw* | sco* | udk* )
9903 gcc_cv_func_mmap_anon=no ;;
9904 *)
9905 gcc_cv_func_mmap_anon=yes;;
9906 esac
9907fi
ba479fd2
NN
9908echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9909echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
9910 fi
9911fi
9912
9913if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
9914
9915cat >>confdefs.h <<\_ACEOF
1072ec3f 9916#define HAVE_MMAP_FILE 1
ba479fd2 9917_ACEOF
1072ec3f
ZW
9918
9919fi
9920if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
9921
9922cat >>confdefs.h <<\_ACEOF
1072ec3f 9923#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 9924_ACEOF
1072ec3f
ZW
9925
9926fi
9927if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
9928
9929cat >>confdefs.h <<\_ACEOF
1072ec3f 9930#define HAVE_MMAP_ANON 1
ba479fd2 9931_ACEOF
1072ec3f
ZW
9932
9933fi
9934
b27d2bd5
MK
9935
9936case "${host}" in
ee262b6f 9937*-*-*vms*)
ba479fd2 9938 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
9939 # won't work, and it isn't easily adaptable. It makes more sense to
9940 # just force it.
9941 ac_cv_func_vfork_works=yes
9942 ;;
b27d2bd5 9943esac
ba479fd2
NN
9944echo "$as_me:$LINENO: checking for pid_t" >&5
9945echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
9946if test "${ac_cv_type_pid_t+set}" = set; then
9947 echo $ECHO_N "(cached) $ECHO_C" >&6
9948else
9949 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9950/* confdefs.h. */
9951_ACEOF
9952cat confdefs.h >>conftest.$ac_ext
9953cat >>conftest.$ac_ext <<_ACEOF
9954/* end confdefs.h. */
9955$ac_includes_default
9956int
9957main ()
9958{
9959if ((pid_t *) 0)
9960 return 0;
9961if (sizeof (pid_t))
9962 return 0;
9963 ;
9964 return 0;
9965}
9966_ACEOF
9967rm -f conftest.$ac_objext
9968if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9969 (eval $ac_compile) 2>conftest.er1
ba479fd2 9970 ac_status=$?
86da66b5
HPN
9971 grep -v '^ *+' conftest.er1 >conftest.err
9972 rm -f conftest.er1
9973 cat conftest.err >&5
ba479fd2
NN
9974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9975 (exit $ac_status); } &&
1cf0118d
RO
9976 { ac_try='test -z "$ac_c_werror_flag"
9977 || test ! -s conftest.err'
86da66b5
HPN
9978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9979 (eval $ac_try) 2>&5
9980 ac_status=$?
9981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9982 (exit $ac_status); }; } &&
9983 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9985 (eval $ac_try) 2>&5
9986 ac_status=$?
9987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9988 (exit $ac_status); }; }; then
cb65112a 9989 ac_cv_type_pid_t=yes
c375c43b 9990else
ba479fd2
NN
9991 echo "$as_me: failed program was:" >&5
9992sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9993
ba479fd2
NN
9994ac_cv_type_pid_t=no
9995fi
86da66b5 9996rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9997fi
ba479fd2
NN
9998echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
9999echo "${ECHO_T}$ac_cv_type_pid_t" >&6
10000if test $ac_cv_type_pid_t = yes; then
10001 :
10002else
10003
10004cat >>confdefs.h <<_ACEOF
c375c43b 10005#define pid_t int
ba479fd2 10006_ACEOF
c375c43b
KG
10007
10008fi
10009
ba479fd2
NN
10010
10011
10012for ac_header in unistd.h vfork.h
10013do
10014as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 10015echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
10016echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10017if eval "test \"\${$as_ac_Header+set}\" = set"; then
10018 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 10019else
ca9bc441 10020 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10021/* confdefs.h. */
10022_ACEOF
10023cat confdefs.h >>conftest.$ac_ext
10024cat >>conftest.$ac_ext <<_ACEOF
10025/* end confdefs.h. */
10026#include <$ac_header>
10027_ACEOF
10028if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10029 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10030 ac_status=$?
10031 grep -v '^ *+' conftest.er1 >conftest.err
10032 rm -f conftest.er1
10033 cat conftest.err >&5
10034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10035 (exit $ac_status); } >/dev/null; then
10036 if test -s conftest.err; then
10037 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 10038 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
10039 else
10040 ac_cpp_err=
10041 fi
093e61a6 10042else
ba479fd2
NN
10043 ac_cpp_err=yes
10044fi
10045if test -z "$ac_cpp_err"; then
ca9bc441 10046 eval "$as_ac_Header=yes"
ba479fd2
NN
10047else
10048 echo "$as_me: failed program was:" >&5
10049sed 's/^/| /' conftest.$ac_ext >&5
10050
ca9bc441 10051 eval "$as_ac_Header=no"
ba479fd2
NN
10052fi
10053rm -f conftest.err conftest.$ac_ext
c375c43b 10054fi
ba479fd2
NN
10055echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10056echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
10057if test `eval echo '${'$as_ac_Header'}'` = yes; then
10058 cat >>confdefs.h <<_ACEOF
10059#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10060_ACEOF
6e3f3080
NN
10061
10062fi
ba479fd2
NN
10063done
10064
10065
10066
10067for ac_func in fork vfork
10068do
10069as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10070echo "$as_me:$LINENO: checking for $ac_func" >&5
10071echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10072if eval "test \"\${$as_ac_var+set}\" = set"; then
10073 echo $ECHO_N "(cached) $ECHO_C" >&6
10074else
10075 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10076/* confdefs.h. */
10077_ACEOF
10078cat confdefs.h >>conftest.$ac_ext
10079cat >>conftest.$ac_ext <<_ACEOF
10080/* end confdefs.h. */
86da66b5
HPN
10081/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10082 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10083#define $ac_func innocuous_$ac_func
10084
c375c43b 10085/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10086 which can conflict with char $ac_func (); below.
10087 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10088 <limits.h> exists even on freestanding compilers. */
86da66b5 10089
ba479fd2
NN
10090#ifdef __STDC__
10091# include <limits.h>
10092#else
10093# include <assert.h>
10094#endif
86da66b5
HPN
10095
10096#undef $ac_func
10097
6e3f3080 10098/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10099#ifdef __cplusplus
10100extern "C"
10101{
10102#endif
6e3f3080 10103/* We use char because int might match the return type of a gcc2
ba479fd2
NN
10104 builtin and then its argument prototype would still apply. */
10105char $ac_func ();
c375c43b
KG
10106/* The GNU C library defines this for functions which it implements
10107 to always fail with ENOSYS. Some functions are actually named
10108 something starting with __ and the normal name is an alias. */
ba479fd2 10109#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
10110choke me
10111#else
ba479fd2
NN
10112char (*f) () = $ac_func;
10113#endif
10114#ifdef __cplusplus
10115}
c375c43b
KG
10116#endif
10117
ba479fd2
NN
10118int
10119main ()
10120{
10121return f != $ac_func;
10122 ;
10123 return 0;
10124}
10125_ACEOF
10126rm -f conftest.$ac_objext conftest$ac_exeext
10127if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10128 (eval $ac_link) 2>conftest.er1
ba479fd2 10129 ac_status=$?
86da66b5
HPN
10130 grep -v '^ *+' conftest.er1 >conftest.err
10131 rm -f conftest.er1
10132 cat conftest.err >&5
ba479fd2
NN
10133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10134 (exit $ac_status); } &&
1cf0118d
RO
10135 { ac_try='test -z "$ac_c_werror_flag"
10136 || test ! -s conftest.err'
86da66b5
HPN
10137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10138 (eval $ac_try) 2>&5
10139 ac_status=$?
10140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10141 (exit $ac_status); }; } &&
10142 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10144 (eval $ac_try) 2>&5
10145 ac_status=$?
10146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10147 (exit $ac_status); }; }; then
10148 eval "$as_ac_var=yes"
10149else
10150 echo "$as_me: failed program was:" >&5
10151sed 's/^/| /' conftest.$ac_ext >&5
10152
10153eval "$as_ac_var=no"
10154fi
86da66b5
HPN
10155rm -f conftest.err conftest.$ac_objext \
10156 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
10157fi
10158echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10159echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10160if test `eval echo '${'$as_ac_var'}'` = yes; then
10161 cat >>confdefs.h <<_ACEOF
10162#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10163_ACEOF
10164
c375c43b 10165fi
ba479fd2 10166done
c375c43b 10167
ba479fd2
NN
10168if test "x$ac_cv_func_fork" = xyes; then
10169 echo "$as_me:$LINENO: checking for working fork" >&5
10170echo $ECHO_N "checking for working fork... $ECHO_C" >&6
10171if test "${ac_cv_func_fork_works+set}" = set; then
10172 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10173else
ba479fd2
NN
10174 if test "$cross_compiling" = yes; then
10175 ac_cv_func_fork_works=cross
10176else
10177 cat >conftest.$ac_ext <<_ACEOF
1cf0118d
RO
10178/* By Ruediger Kuhlmann. */
10179 #include <sys/types.h>
10180 #if HAVE_UNISTD_H
10181 # include <unistd.h>
10182 #endif
10183 /* Some systems only have a dummy stub for fork() */
10184 int main ()
10185 {
10186 if (fork() < 0)
10187 exit (1);
10188 exit (0);
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
10202 ac_cv_func_fork_works=yes
10203else
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_fork_works=no
10210fi
86da66b5 10211rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
10212fi
10213fi
10214echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10215echo "${ECHO_T}$ac_cv_func_fork_works" >&6
10216
10217else
10218 ac_cv_func_fork_works=$ac_cv_func_fork
10219fi
10220if test "x$ac_cv_func_fork_works" = xcross; then
10221 case $host in
10222 *-*-amigaos* | *-*-msdosdjgpp*)
10223 # Override, as these systems have only a dummy fork() stub
10224 ac_cv_func_fork_works=no
10225 ;;
10226 *)
10227 ac_cv_func_fork_works=yes
10228 ;;
10229 esac
10230 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10231echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 10232fi
c375c43b 10233ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10234if test "x$ac_cv_func_vfork" = xyes; then
10235 echo "$as_me:$LINENO: checking for working vfork" >&5
10236echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
10237if test "${ac_cv_func_vfork_works+set}" = set; then
10238 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10239else
ba479fd2
NN
10240 if test "$cross_compiling" = yes; then
10241 ac_cv_func_vfork_works=cross
10242else
10243 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10244/* confdefs.h. */
10245_ACEOF
10246cat confdefs.h >>conftest.$ac_ext
10247cat >>conftest.$ac_ext <<_ACEOF
10248/* end confdefs.h. */
c375c43b
KG
10249/* Thanks to Paul Eggert for this test. */
10250#include <stdio.h>
ba479fd2 10251#include <stdlib.h>
c375c43b
KG
10252#include <sys/types.h>
10253#include <sys/stat.h>
ba479fd2
NN
10254#include <sys/wait.h>
10255#if HAVE_UNISTD_H
10256# include <unistd.h>
c375c43b 10257#endif
ba479fd2
NN
10258#if HAVE_VFORK_H
10259# include <vfork.h>
c375c43b
KG
10260#endif
10261/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
10262 argument registers are propagated back to the parent. The compiler
10263 is told about this with #include <vfork.h>, but some compilers
10264 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10265 static variable whose address is put into a register that is
10266 clobbered by the vfork. */
10267static void
c375c43b
KG
10268#ifdef __cplusplus
10269sparc_address_test (int arg)
ba479fd2 10270# else
c375c43b
KG
10271sparc_address_test (arg) int arg;
10272#endif
10273{
10274 static pid_t child;
10275 if (!child) {
10276 child = vfork ();
10277 if (child < 0) {
10278 perror ("vfork");
10279 _exit(2);
10280 }
10281 if (!child) {
10282 arg = getpid();
10283 write(-1, "", 0);
10284 _exit (arg);
10285 }
10286 }
10287}
ba479fd2
NN
10288
10289int
10290main ()
10291{
c375c43b
KG
10292 pid_t parent = getpid ();
10293 pid_t child;
10294
ba479fd2 10295 sparc_address_test (0);
c375c43b
KG
10296
10297 child = vfork ();
10298
10299 if (child == 0) {
ba479fd2
NN
10300 /* Here is another test for sparc vfork register problems. This
10301 test uses lots of local variables, at least as many local
10302 variables as main has allocated so far including compiler
10303 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10304 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10305 reuse the register of parent for one of the local variables,
10306 since it will think that parent can't possibly be used any more
10307 in this routine. Assigning to the local variable will thus
10308 munge parent in the parent process. */
c375c43b
KG
10309 pid_t
10310 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10311 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10312 /* Convince the compiler that p..p7 are live; otherwise, it might
10313 use the same hardware register for all 8 local variables. */
10314 if (p != p1 || p != p2 || p != p3 || p != p4
10315 || p != p5 || p != p6 || p != p7)
10316 _exit(1);
10317
ba479fd2
NN
10318 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10319 from child file descriptors. If the child closes a descriptor
10320 before it execs or exits, this munges the parent's descriptor
10321 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10322 _exit(close(fileno(stdout)) != 0);
10323 } else {
10324 int status;
10325 struct stat st;
10326
10327 while (wait(&status) != child)
10328 ;
10329 exit(
10330 /* Was there some problem with vforking? */
10331 child < 0
10332
10333 /* Did the child fail? (This shouldn't happen.) */
10334 || status
10335
10336 /* Did the vfork/compiler bug occur? */
10337 || parent != getpid()
10338
10339 /* Did the file descriptor bug occur? */
10340 || fstat(fileno(stdout), &st) != 0
10341 );
10342 }
10343}
ba479fd2
NN
10344_ACEOF
10345rm -f conftest$ac_exeext
10346if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10347 (eval $ac_link) 2>&5
10348 ac_status=$?
10349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10350 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10352 (eval $ac_try) 2>&5
10353 ac_status=$?
10354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10355 (exit $ac_status); }; }; then
c375c43b
KG
10356 ac_cv_func_vfork_works=yes
10357else
ba479fd2
NN
10358 echo "$as_me: program exited with status $ac_status" >&5
10359echo "$as_me: failed program was:" >&5
10360sed 's/^/| /' conftest.$ac_ext >&5
10361
10362( exit $ac_status )
10363ac_cv_func_vfork_works=no
cafe096b 10364fi
86da66b5 10365rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10366fi
ba479fd2
NN
10367fi
10368echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10369echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 10370
ba479fd2
NN
10371fi;
10372if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 10373 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10374 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10375echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
10376fi
10377
ba479fd2
NN
10378if test "x$ac_cv_func_vfork_works" = xyes; then
10379
10380cat >>confdefs.h <<\_ACEOF
10381#define HAVE_WORKING_VFORK 1
10382_ACEOF
10383
10384else
10385
10386cat >>confdefs.h <<\_ACEOF
c375c43b 10387#define vfork fork
ba479fd2 10388_ACEOF
c375c43b
KG
10389
10390fi
ba479fd2
NN
10391if test "x$ac_cv_func_fork_works" = xyes; then
10392
10393cat >>confdefs.h <<\_ACEOF
10394#define HAVE_WORKING_FORK 1
10395_ACEOF
10396
10397fi
10398
c375c43b 10399
81bf3d9e 10400
dfb77e37
KC
10401 if test "X$prefix" = "XNONE"; then
10402 acl_final_prefix="$ac_default_prefix"
10403 else
10404 acl_final_prefix="$prefix"
10405 fi
10406 if test "X$exec_prefix" = "XNONE"; then
10407 acl_final_exec_prefix='${prefix}'
10408 else
10409 acl_final_exec_prefix="$exec_prefix"
10410 fi
10411 acl_save_prefix="$prefix"
10412 prefix="$acl_final_prefix"
10413 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10414 prefix="$acl_save_prefix"
f91abfce
TT
10415
10416
dfb77e37
KC
10417# Check whether --with-gnu-ld or --without-gnu-ld was given.
10418if test "${with_gnu_ld+set}" = set; then
10419 withval="$with_gnu_ld"
10420 test "$withval" = no || with_gnu_ld=yes
ba479fd2 10421else
dfb77e37
KC
10422 with_gnu_ld=no
10423fi;
10424# Prepare PATH_SEPARATOR.
10425# The user is always right.
10426if test "${PATH_SEPARATOR+set}" != set; then
10427 echo "#! /bin/sh" >conf$$.sh
10428 echo "exit 0" >>conf$$.sh
10429 chmod +x conf$$.sh
10430 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10431 PATH_SEPARATOR=';'
ba479fd2 10432 else
dfb77e37 10433 PATH_SEPARATOR=:
ba479fd2 10434 fi
dfb77e37
KC
10435 rm -f conf$$.sh
10436fi
10437ac_prog=ld
10438if test "$GCC" = yes; then
10439 # Check if gcc -print-prog-name=ld gives a path.
10440 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10441echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10442 case $host in
10443 *-*-mingw*)
10444 # gcc leaves a trailing carriage return which upsets mingw
10445 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10446 *)
10447 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10448 esac
10449 case $ac_prog in
10450 # Accept absolute paths.
10451 [\\/]* | [A-Za-z]:[\\/]*)
10452 re_direlt='/[^/][^/]*/\.\./'
10453 # Canonicalize the path of ld
10454 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10455 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10456 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10457 done
10458 test -z "$LD" && LD="$ac_prog"
10459 ;;
10460 "")
10461 # If it fails, then pretend we aren't using GCC.
10462 ac_prog=ld
10463 ;;
10464 *)
10465 # If it is relative, then search for the first ld in PATH.
10466 with_gnu_ld=unknown
10467 ;;
10468 esac
10469elif test "$with_gnu_ld" = yes; then
10470 echo "$as_me:$LINENO: checking for GNU ld" >&5
10471echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 10472else
dfb77e37
KC
10473 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10474echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 10475fi
dfb77e37
KC
10476if test "${acl_cv_path_LD+set}" = set; then
10477 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 10478else
dfb77e37
KC
10479 if test -z "$LD"; then
10480 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10481 for ac_dir in $PATH; do
10482 test -z "$ac_dir" && ac_dir=.
10483 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10484 acl_cv_path_LD="$ac_dir/$ac_prog"
10485 # Check to see if the program is GNU ld. I'd rather use --version,
10486 # but apparently some GNU ld's only accept -v.
10487 # Break only if it was the GNU/non-GNU ld that we prefer.
10488 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10489 test "$with_gnu_ld" != no && break
10490 else
10491 test "$with_gnu_ld" != yes && break
10492 fi
10493 fi
10494 done
10495 IFS="$ac_save_ifs"
10496else
10497 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10498fi
10499fi
ba479fd2 10500
dfb77e37
KC
10501LD="$acl_cv_path_LD"
10502if test -n "$LD"; then
10503 echo "$as_me:$LINENO: result: $LD" >&5
10504echo "${ECHO_T}$LD" >&6
10505else
10506 echo "$as_me:$LINENO: result: no" >&5
10507echo "${ECHO_T}no" >&6
ba479fd2 10508fi
dfb77e37
KC
10509test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10510echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10511 { (exit 1); exit 1; }; }
10512echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10513echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10514if test "${acl_cv_prog_gnu_ld+set}" = set; then
10515 echo $ECHO_N "(cached) $ECHO_C" >&6
10516else
10517 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10518if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10519 acl_cv_prog_gnu_ld=yes
10520else
10521 acl_cv_prog_gnu_ld=no
6e3f3080 10522fi
dfb77e37
KC
10523fi
10524echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10525echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10526with_gnu_ld=$acl_cv_prog_gnu_ld
10527
10528
10529
10530 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10531echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10532if test "${acl_cv_rpath+set}" = set; then
10533 echo $ECHO_N "(cached) $ECHO_C" >&6
10534else
10535
10536 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10537 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10538 . ./conftest.sh
10539 rm -f ./conftest.sh
10540 acl_cv_rpath=done
ba479fd2 10541
eb158727 10542fi
dfb77e37
KC
10543echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10544echo "${ECHO_T}$acl_cv_rpath" >&6
10545 wl="$acl_cv_wl"
10546 libext="$acl_cv_libext"
10547 shlibext="$acl_cv_shlibext"
10548 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10549 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10550 hardcode_direct="$acl_cv_hardcode_direct"
10551 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10552 # Check whether --enable-rpath or --disable-rpath was given.
10553if test "${enable_rpath+set}" = set; then
10554 enableval="$enable_rpath"
10555 :
10556else
10557 enable_rpath=yes
10558fi;
10559
10560
10561
10562
10563
10564
10565
10566 use_additional=yes
10567
10568 acl_save_prefix="$prefix"
10569 prefix="$acl_final_prefix"
10570 acl_save_exec_prefix="$exec_prefix"
10571 exec_prefix="$acl_final_exec_prefix"
10572
10573 eval additional_includedir=\"$includedir\"
10574 eval additional_libdir=\"$libdir\"
10575
10576 exec_prefix="$acl_save_exec_prefix"
10577 prefix="$acl_save_prefix"
10578
10579
10580# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10581if test "${with_libiconv_prefix+set}" = set; then
10582 withval="$with_libiconv_prefix"
10583
10584 if test "X$withval" = "Xno"; then
10585 use_additional=no
10586 else
10587 if test "X$withval" = "X"; then
10588
10589 acl_save_prefix="$prefix"
10590 prefix="$acl_final_prefix"
10591 acl_save_exec_prefix="$exec_prefix"
10592 exec_prefix="$acl_final_exec_prefix"
10593
10594 eval additional_includedir=\"$includedir\"
10595 eval additional_libdir=\"$libdir\"
10596
10597 exec_prefix="$acl_save_exec_prefix"
10598 prefix="$acl_save_prefix"
10599
10600 else
10601 additional_includedir="$withval/include"
10602 additional_libdir="$withval/lib"
10603 fi
10604 fi
10605
10606fi;
10607 LIBICONV=
10608 LTLIBICONV=
10609 INCICONV=
10610 rpathdirs=
10611 ltrpathdirs=
10612 names_already_handled=
10613 names_next_round='iconv '
10614 while test -n "$names_next_round"; do
10615 names_this_round="$names_next_round"
10616 names_next_round=
10617 for name in $names_this_round; do
10618 already_handled=
10619 for n in $names_already_handled; do
10620 if test "$n" = "$name"; then
10621 already_handled=yes
10622 break
10623 fi
10624 done
10625 if test -z "$already_handled"; then
10626 names_already_handled="$names_already_handled $name"
10627 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10628 eval value=\"\$HAVE_LIB$uppername\"
10629 if test -n "$value"; then
10630 if test "$value" = yes; then
10631 eval value=\"\$LIB$uppername\"
10632 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10633 eval value=\"\$LTLIB$uppername\"
10634 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10635 else
10636 :
10637 fi
10638 else
10639 found_dir=
10640 found_la=
10641 found_so=
10642 found_a=
10643 if test $use_additional = yes; then
10644 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10645 found_dir="$additional_libdir"
10646 found_so="$additional_libdir/lib$name.$shlibext"
10647 if test -f "$additional_libdir/lib$name.la"; then
10648 found_la="$additional_libdir/lib$name.la"
10649 fi
10650 else
10651 if test -f "$additional_libdir/lib$name.$libext"; then
10652 found_dir="$additional_libdir"
10653 found_a="$additional_libdir/lib$name.$libext"
10654 if test -f "$additional_libdir/lib$name.la"; then
10655 found_la="$additional_libdir/lib$name.la"
10656 fi
10657 fi
10658 fi
10659 fi
10660 if test "X$found_dir" = "X"; then
10661 for x in $LDFLAGS $LTLIBICONV; do
10662
10663 acl_save_prefix="$prefix"
10664 prefix="$acl_final_prefix"
10665 acl_save_exec_prefix="$exec_prefix"
10666 exec_prefix="$acl_final_exec_prefix"
10667 eval x=\"$x\"
10668 exec_prefix="$acl_save_exec_prefix"
10669 prefix="$acl_save_prefix"
10670
10671 case "$x" in
10672 -L*)
10673 dir=`echo "X$x" | sed -e 's/^X-L//'`
10674 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10675 found_dir="$dir"
10676 found_so="$dir/lib$name.$shlibext"
10677 if test -f "$dir/lib$name.la"; then
10678 found_la="$dir/lib$name.la"
10679 fi
10680 else
10681 if test -f "$dir/lib$name.$libext"; then
10682 found_dir="$dir"
10683 found_a="$dir/lib$name.$libext"
10684 if test -f "$dir/lib$name.la"; then
10685 found_la="$dir/lib$name.la"
10686 fi
10687 fi
10688 fi
10689 ;;
10690 esac
10691 if test "X$found_dir" != "X"; then
10692 break
10693 fi
10694 done
10695 fi
10696 if test "X$found_dir" != "X"; then
10697 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10698 if test "X$found_so" != "X"; then
10699 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10700 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10701 else
10702 haveit=
10703 for x in $ltrpathdirs; do
10704 if test "X$x" = "X$found_dir"; then
10705 haveit=yes
10706 break
10707 fi
10708 done
10709 if test -z "$haveit"; then
10710 ltrpathdirs="$ltrpathdirs $found_dir"
10711 fi
10712 if test "$hardcode_direct" = yes; then
10713 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10714 else
10715 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10716 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10717 haveit=
10718 for x in $rpathdirs; do
10719 if test "X$x" = "X$found_dir"; then
10720 haveit=yes
10721 break
10722 fi
10723 done
10724 if test -z "$haveit"; then
10725 rpathdirs="$rpathdirs $found_dir"
10726 fi
10727 else
10728 haveit=
10729 for x in $LDFLAGS $LIBICONV; do
10730
10731 acl_save_prefix="$prefix"
10732 prefix="$acl_final_prefix"
10733 acl_save_exec_prefix="$exec_prefix"
10734 exec_prefix="$acl_final_exec_prefix"
10735 eval x=\"$x\"
10736 exec_prefix="$acl_save_exec_prefix"
10737 prefix="$acl_save_prefix"
10738
10739 if test "X$x" = "X-L$found_dir"; then
10740 haveit=yes
10741 break
10742 fi
10743 done
10744 if test -z "$haveit"; then
10745 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10746 fi
10747 if test "$hardcode_minus_L" != no; then
10748 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10749 else
10750 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10751 fi
10752 fi
10753 fi
10754 fi
10755 else
10756 if test "X$found_a" != "X"; then
10757 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10758 else
10759 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10760 fi
10761 fi
10762 additional_includedir=
10763 case "$found_dir" in
10764 */lib | */lib/)
10765 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10766 additional_includedir="$basedir/include"
10767 ;;
10768 esac
10769 if test "X$additional_includedir" != "X"; then
10770 if test "X$additional_includedir" != "X/usr/include"; then
10771 haveit=
10772 if test "X$additional_includedir" = "X/usr/local/include"; then
10773 if test -n "$GCC"; then
10774 case $host_os in
10775 linux*) haveit=yes;;
10776 esac
10777 fi
10778 fi
10779 if test -z "$haveit"; then
10780 for x in $CPPFLAGS $INCICONV; do
10781
10782 acl_save_prefix="$prefix"
10783 prefix="$acl_final_prefix"
10784 acl_save_exec_prefix="$exec_prefix"
10785 exec_prefix="$acl_final_exec_prefix"
10786 eval x=\"$x\"
10787 exec_prefix="$acl_save_exec_prefix"
10788 prefix="$acl_save_prefix"
10789
10790 if test "X$x" = "X-I$additional_includedir"; then
10791 haveit=yes
10792 break
10793 fi
10794 done
10795 if test -z "$haveit"; then
10796 if test -d "$additional_includedir"; then
10797 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10798 fi
10799 fi
10800 fi
10801 fi
10802 fi
10803 if test -n "$found_la"; then
10804 save_libdir="$libdir"
10805 case "$found_la" in
10806 */* | *\\*) . "$found_la" ;;
10807 *) . "./$found_la" ;;
10808 esac
10809 libdir="$save_libdir"
10810 for dep in $dependency_libs; do
10811 case "$dep" in
10812 -L*)
10813 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10814 if test "X$additional_libdir" != "X/usr/lib"; then
10815 haveit=
10816 if test "X$additional_libdir" = "X/usr/local/lib"; then
10817 if test -n "$GCC"; then
10818 case $host_os in
10819 linux*) haveit=yes;;
10820 esac
10821 fi
10822 fi
10823 if test -z "$haveit"; then
10824 haveit=
10825 for x in $LDFLAGS $LIBICONV; do
10826
10827 acl_save_prefix="$prefix"
10828 prefix="$acl_final_prefix"
10829 acl_save_exec_prefix="$exec_prefix"
10830 exec_prefix="$acl_final_exec_prefix"
10831 eval x=\"$x\"
10832 exec_prefix="$acl_save_exec_prefix"
10833 prefix="$acl_save_prefix"
10834
10835 if test "X$x" = "X-L$additional_libdir"; then
10836 haveit=yes
10837 break
10838 fi
10839 done
10840 if test -z "$haveit"; then
10841 if test -d "$additional_libdir"; then
10842 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10843 fi
10844 fi
10845 haveit=
10846 for x in $LDFLAGS $LTLIBICONV; do
10847
10848 acl_save_prefix="$prefix"
10849 prefix="$acl_final_prefix"
10850 acl_save_exec_prefix="$exec_prefix"
10851 exec_prefix="$acl_final_exec_prefix"
10852 eval x=\"$x\"
10853 exec_prefix="$acl_save_exec_prefix"
10854 prefix="$acl_save_prefix"
10855
10856 if test "X$x" = "X-L$additional_libdir"; then
10857 haveit=yes
10858 break
10859 fi
10860 done
10861 if test -z "$haveit"; then
10862 if test -d "$additional_libdir"; then
10863 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10864 fi
10865 fi
10866 fi
10867 fi
10868 ;;
10869 -R*)
10870 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10871 if test "$enable_rpath" != no; then
10872 haveit=
10873 for x in $rpathdirs; do
10874 if test "X$x" = "X$dir"; then
10875 haveit=yes
10876 break
10877 fi
10878 done
10879 if test -z "$haveit"; then
10880 rpathdirs="$rpathdirs $dir"
10881 fi
10882 haveit=
10883 for x in $ltrpathdirs; do
10884 if test "X$x" = "X$dir"; then
10885 haveit=yes
10886 break
10887 fi
10888 done
10889 if test -z "$haveit"; then
10890 ltrpathdirs="$ltrpathdirs $dir"
10891 fi
10892 fi
10893 ;;
10894 -l*)
10895 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10896 ;;
10897 *.la)
10898 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10899 ;;
10900 *)
10901 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10902 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10903 ;;
10904 esac
10905 done
10906 fi
10907 else
10908 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10909 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10910 fi
10911 fi
10912 fi
10913 done
10914 done
10915 if test "X$rpathdirs" != "X"; then
10916 if test -n "$hardcode_libdir_separator"; then
10917 alldirs=
10918 for found_dir in $rpathdirs; do
10919 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10920 done
10921 acl_save_libdir="$libdir"
10922 libdir="$alldirs"
10923 eval flag=\"$hardcode_libdir_flag_spec\"
10924 libdir="$acl_save_libdir"
10925 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10926 else
10927 for found_dir in $rpathdirs; do
10928 acl_save_libdir="$libdir"
10929 libdir="$found_dir"
10930 eval flag=\"$hardcode_libdir_flag_spec\"
10931 libdir="$acl_save_libdir"
10932 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10933 done
10934 fi
10935 fi
10936 if test "X$ltrpathdirs" != "X"; then
10937 for found_dir in $ltrpathdirs; do
10938 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10939 done
10940 fi
10941
10942
10943
10944
10945
10946
10947
10948 am_save_CPPFLAGS="$CPPFLAGS"
10949
10950 for element in $INCICONV; do
10951 haveit=
10952 for x in $CPPFLAGS; do
10953
10954 acl_save_prefix="$prefix"
10955 prefix="$acl_final_prefix"
10956 acl_save_exec_prefix="$exec_prefix"
10957 exec_prefix="$acl_final_exec_prefix"
10958 eval x=\"$x\"
10959 exec_prefix="$acl_save_exec_prefix"
10960 prefix="$acl_save_prefix"
10961
10962 if test "X$x" = "X$element"; then
10963 haveit=yes
10964 break
10965 fi
10966 done
10967 if test -z "$haveit"; then
10968 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10969 fi
10970 done
eb158727
ZW
10971
10972
ba479fd2
NN
10973 echo "$as_me:$LINENO: checking for iconv" >&5
10974echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10975if test "${am_cv_func_iconv+set}" = set; then
10976 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10977else
ba479fd2 10978
f91abfce
TT
10979 am_cv_func_iconv="no, consider installing GNU libiconv"
10980 am_cv_lib_iconv=no
ba479fd2 10981 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10982/* confdefs.h. */
10983_ACEOF
10984cat confdefs.h >>conftest.$ac_ext
10985cat >>conftest.$ac_ext <<_ACEOF
10986/* end confdefs.h. */
f91abfce
TT
10987#include <stdlib.h>
10988#include <iconv.h>
ba479fd2
NN
10989int
10990main ()
10991{
f91abfce
TT
10992iconv_t cd = iconv_open("","");
10993 iconv(cd,NULL,NULL,NULL,NULL);
10994 iconv_close(cd);
ba479fd2
NN
10995 ;
10996 return 0;
10997}
10998_ACEOF
10999rm -f conftest.$ac_objext conftest$ac_exeext
11000if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 11001 (eval $ac_link) 2>conftest.er1
ba479fd2 11002 ac_status=$?
86da66b5
HPN
11003 grep -v '^ *+' conftest.er1 >conftest.err
11004 rm -f conftest.er1
11005 cat conftest.err >&5
ba479fd2
NN
11006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11007 (exit $ac_status); } &&
1cf0118d
RO
11008 { ac_try='test -z "$ac_c_werror_flag"
11009 || test ! -s conftest.err'
86da66b5
HPN
11010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11011 (eval $ac_try) 2>&5
11012 ac_status=$?
11013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11014 (exit $ac_status); }; } &&
11015 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
11016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11017 (eval $ac_try) 2>&5
11018 ac_status=$?
11019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11020 (exit $ac_status); }; }; then
f91abfce
TT
11021 am_cv_func_iconv=yes
11022else
ba479fd2
NN
11023 echo "$as_me: failed program was:" >&5
11024sed 's/^/| /' conftest.$ac_ext >&5
11025
f91abfce 11026fi
86da66b5
HPN
11027rm -f conftest.err conftest.$ac_objext \
11028 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11029 if test "$am_cv_func_iconv" != yes; then
11030 am_save_LIBS="$LIBS"
dfb77e37 11031 LIBS="$LIBS $LIBICONV"
ba479fd2 11032 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11033/* confdefs.h. */
11034_ACEOF
11035cat confdefs.h >>conftest.$ac_ext
11036cat >>conftest.$ac_ext <<_ACEOF
11037/* end confdefs.h. */
f91abfce
TT
11038#include <stdlib.h>
11039#include <iconv.h>
ba479fd2
NN
11040int
11041main ()
11042{
f91abfce
TT
11043iconv_t cd = iconv_open("","");
11044 iconv(cd,NULL,NULL,NULL,NULL);
11045 iconv_close(cd);
ba479fd2
NN
11046 ;
11047 return 0;
11048}
11049_ACEOF
11050rm -f conftest.$ac_objext conftest$ac_exeext
11051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 11052 (eval $ac_link) 2>conftest.er1
ba479fd2 11053 ac_status=$?
86da66b5
HPN
11054 grep -v '^ *+' conftest.er1 >conftest.err
11055 rm -f conftest.er1
11056 cat conftest.err >&5
ba479fd2
NN
11057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11058 (exit $ac_status); } &&
1cf0118d
RO
11059 { ac_try='test -z "$ac_c_werror_flag"
11060 || test ! -s conftest.err'
86da66b5
HPN
11061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11062 (eval $ac_try) 2>&5
11063 ac_status=$?
11064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11065 (exit $ac_status); }; } &&
11066 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
11067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11068 (eval $ac_try) 2>&5
11069 ac_status=$?
11070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11071 (exit $ac_status); }; }; then
f91abfce
TT
11072 am_cv_lib_iconv=yes
11073 am_cv_func_iconv=yes
11074else
ba479fd2
NN
11075 echo "$as_me: failed program was:" >&5
11076sed 's/^/| /' conftest.$ac_ext >&5
11077
f91abfce 11078fi
86da66b5
HPN
11079rm -f conftest.err conftest.$ac_objext \
11080 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11081 LIBS="$am_save_LIBS"
11082 fi
6e3f3080 11083
ba479fd2
NN
11084fi
11085echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
11086echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 11087 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11088
11089cat >>confdefs.h <<\_ACEOF
f91abfce 11090#define HAVE_ICONV 1
ba479fd2 11091_ACEOF
f91abfce 11092
dfb77e37
KC
11093 fi
11094 if test "$am_cv_lib_iconv" = yes; then
11095 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
11096echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
11097 echo "$as_me:$LINENO: result: $LIBICONV" >&5
11098echo "${ECHO_T}$LIBICONV" >&6
11099 else
11100 CPPFLAGS="$am_save_CPPFLAGS"
11101 LIBICONV=
11102 LTLIBICONV=
11103 fi
11104
11105
11106
11107 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11108 echo "$as_me:$LINENO: checking for iconv declaration" >&5
11109echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
11110 if test "${am_cv_proto_iconv+set}" = set; then
11111 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11112else
ba479fd2
NN
11113
11114 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11115/* confdefs.h. */
11116_ACEOF
11117cat confdefs.h >>conftest.$ac_ext
11118cat >>conftest.$ac_ext <<_ACEOF
11119/* end confdefs.h. */
f91abfce
TT
11120
11121#include <stdlib.h>
11122#include <iconv.h>
11123extern
11124#ifdef __cplusplus
11125"C"
11126#endif
11127#if defined(__STDC__) || defined(__cplusplus)
11128size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11129#else
11130size_t iconv();
11131#endif
11132
ba479fd2
NN
11133int
11134main ()
11135{
f91abfce 11136
ba479fd2
NN
11137 ;
11138 return 0;
11139}
11140_ACEOF
11141rm -f conftest.$ac_objext
11142if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11143 (eval $ac_compile) 2>conftest.er1
ba479fd2 11144 ac_status=$?
86da66b5
HPN
11145 grep -v '^ *+' conftest.er1 >conftest.err
11146 rm -f conftest.er1
11147 cat conftest.err >&5
ba479fd2
NN
11148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11149 (exit $ac_status); } &&
1cf0118d
RO
11150 { ac_try='test -z "$ac_c_werror_flag"
11151 || test ! -s conftest.err'
86da66b5
HPN
11152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11153 (eval $ac_try) 2>&5
11154 ac_status=$?
11155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11156 (exit $ac_status); }; } &&
11157 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11159 (eval $ac_try) 2>&5
11160 ac_status=$?
11161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11162 (exit $ac_status); }; }; then
f91abfce
TT
11163 am_cv_proto_iconv_arg1=""
11164else
ba479fd2
NN
11165 echo "$as_me: failed program was:" >&5
11166sed 's/^/| /' conftest.$ac_ext >&5
11167
11168am_cv_proto_iconv_arg1="const"
f91abfce 11169fi
86da66b5 11170rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
11171 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);"
11172fi
11173
11174 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
11175 echo "$as_me:$LINENO: result: ${ac_t:-
11176 }$am_cv_proto_iconv" >&5
11177echo "${ECHO_T}${ac_t:-
11178 }$am_cv_proto_iconv" >&6
11179
11180cat >>confdefs.h <<_ACEOF
f91abfce 11181#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 11182_ACEOF
f91abfce
TT
11183
11184 fi
f91abfce 11185
56694dd9
ZW
11186# Until we have in-tree GNU iconv:
11187LIBICONV_DEP=
11188
11189
11190
ba479fd2
NN
11191 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11192echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
11193if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11194 echo $ECHO_N "(cached) $ECHO_C" >&6
56694dd9 11195else
ba479fd2 11196 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11197/* confdefs.h. */
11198_ACEOF
11199cat confdefs.h >>conftest.$ac_ext
11200cat >>conftest.$ac_ext <<_ACEOF
11201/* end confdefs.h. */
56694dd9 11202#include <locale.h>
ba479fd2
NN
11203int
11204main ()
11205{
56694dd9 11206return LC_MESSAGES
ba479fd2
NN
11207 ;
11208 return 0;
11209}
11210_ACEOF
11211rm -f conftest.$ac_objext conftest$ac_exeext
11212if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 11213 (eval $ac_link) 2>conftest.er1
ba479fd2 11214 ac_status=$?
86da66b5
HPN
11215 grep -v '^ *+' conftest.er1 >conftest.err
11216 rm -f conftest.er1
11217 cat conftest.err >&5
ba479fd2
NN
11218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11219 (exit $ac_status); } &&
1cf0118d
RO
11220 { ac_try='test -z "$ac_c_werror_flag"
11221 || test ! -s conftest.err'
86da66b5
HPN
11222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11223 (eval $ac_try) 2>&5
11224 ac_status=$?
11225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11226 (exit $ac_status); }; } &&
11227 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
11228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11229 (eval $ac_try) 2>&5
11230 ac_status=$?
11231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11232 (exit $ac_status); }; }; then
56694dd9
ZW
11233 am_cv_val_LC_MESSAGES=yes
11234else
ba479fd2
NN
11235 echo "$as_me: failed program was:" >&5
11236sed 's/^/| /' conftest.$ac_ext >&5
11237
11238am_cv_val_LC_MESSAGES=no
56694dd9 11239fi
86da66b5
HPN
11240rm -f conftest.err conftest.$ac_objext \
11241 conftest$ac_exeext conftest.$ac_ext
56694dd9 11242fi
ba479fd2
NN
11243echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11244echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
63cf211a 11245 if test $am_cv_val_LC_MESSAGES = yes; then
ba479fd2
NN
11246
11247cat >>confdefs.h <<\_ACEOF
56694dd9 11248#define HAVE_LC_MESSAGES 1
ba479fd2 11249_ACEOF
56694dd9
ZW
11250
11251 fi
11252
f91abfce 11253
a03ea89b
BM
11254
11255 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11256echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11257if test "${am_cv_langinfo_codeset+set}" = set; then
11258 echo $ECHO_N "(cached) $ECHO_C" >&6
11259else
11260 cat >conftest.$ac_ext <<_ACEOF
11261/* confdefs.h. */
11262_ACEOF
11263cat confdefs.h >>conftest.$ac_ext
11264cat >>conftest.$ac_ext <<_ACEOF
11265/* end confdefs.h. */
11266#include <langinfo.h>
11267int
11268main ()
11269{
11270char* cs = nl_langinfo(CODESET);
11271 ;
11272 return 0;
11273}
11274_ACEOF
11275rm -f conftest.$ac_objext conftest$ac_exeext
11276if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11277 (eval $ac_link) 2>conftest.er1
11278 ac_status=$?
11279 grep -v '^ *+' conftest.er1 >conftest.err
11280 rm -f conftest.er1
11281 cat conftest.err >&5
11282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11283 (exit $ac_status); } &&
1cf0118d
RO
11284 { ac_try='test -z "$ac_c_werror_flag"
11285 || test ! -s conftest.err'
a03ea89b
BM
11286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11287 (eval $ac_try) 2>&5
11288 ac_status=$?
11289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11290 (exit $ac_status); }; } &&
11291 { ac_try='test -s conftest$ac_exeext'
11292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11293 (eval $ac_try) 2>&5
11294 ac_status=$?
11295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11296 (exit $ac_status); }; }; then
11297 am_cv_langinfo_codeset=yes
11298else
11299 echo "$as_me: failed program was:" >&5
11300sed 's/^/| /' conftest.$ac_ext >&5
11301
11302am_cv_langinfo_codeset=no
11303fi
11304rm -f conftest.err conftest.$ac_objext \
11305 conftest$ac_exeext conftest.$ac_ext
11306
11307fi
11308echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11309echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11310 if test $am_cv_langinfo_codeset = yes; then
11311
11312cat >>confdefs.h <<\_ACEOF
11313#define HAVE_LANGINFO_CODESET 1
11314_ACEOF
11315
11316 fi
11317
11318
86cf1cbd
KG
11319# We will need to find libiberty.h and ansidecl.h
11320saved_CFLAGS="$CFLAGS"
11321CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
6a257778 11343
ad6717df
PB
11344
11345
0d667716
KG
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
367e8319 11356
0d667716
KG
11357
11358
7391b66c 11359
ed5b9f96
GK
11360
11361for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
11362 strsignal strstr strverscmp \
11363 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 11364 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 11365do
ad6717df 11366 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11367echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11368echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11369if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11370 echo $ECHO_N "(cached) $ECHO_C" >&6
11371else
11372 cat >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. */
7afe8c41
KG
11378#undef $ac_tr_decl
11379#define $ac_tr_decl 1
ba479fd2 11380
d02af173 11381#include "ansidecl.h"
86cf1cbd 11382#include "system.h"
f31e826b 11383
ba479fd2
NN
11384int
11385main ()
11386{
86cf1cbd
KG
11387#ifndef $ac_func
11388char *(*pfn) = (char *(*)) $ac_func ;
11389#endif
ba479fd2
NN
11390 ;
11391 return 0;
11392}
11393_ACEOF
11394rm -f conftest.$ac_objext
11395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11396 (eval $ac_compile) 2>conftest.er1
ba479fd2 11397 ac_status=$?
86da66b5
HPN
11398 grep -v '^ *+' conftest.er1 >conftest.err
11399 rm -f conftest.er1
11400 cat conftest.err >&5
ba479fd2
NN
11401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11402 (exit $ac_status); } &&
1cf0118d
RO
11403 { ac_try='test -z "$ac_c_werror_flag"
11404 || test ! -s conftest.err'
86da66b5
HPN
11405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11406 (eval $ac_try) 2>&5
11407 ac_status=$?
11408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11409 (exit $ac_status); }; } &&
11410 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11412 (eval $ac_try) 2>&5
11413 ac_status=$?
11414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11415 (exit $ac_status); }; }; then
f31e826b 11416 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11417else
ba479fd2
NN
11418 echo "$as_me: failed program was:" >&5
11419sed 's/^/| /' conftest.$ac_ext >&5
11420
11421eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11422fi
86da66b5 11423rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11424fi
11425
f31e826b 11426if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11427 echo "$as_me:$LINENO: result: yes" >&5
11428echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11429#define $ac_tr_decl 1
ba479fd2
NN
11430_ACEOF
11431
81bf3d9e 11432else
ba479fd2
NN
11433 echo "$as_me:$LINENO: result: no" >&5
11434echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11435#define $ac_tr_decl 0
ba479fd2
NN
11436_ACEOF
11437
81bf3d9e
RH
11438fi
11439
11440done
ba479fd2 11441
ba479fd2 11442
ba479fd2 11443
81bf3d9e 11444
81bf3d9e
RH
11445
11446for ac_func in getrlimit setrlimit getrusage
11447do
ad6717df 11448 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11449echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11450echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11451if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11452 echo $ECHO_N "(cached) $ECHO_C" >&6
11453else
11454 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11455/* confdefs.h. */
11456_ACEOF
11457cat confdefs.h >>conftest.$ac_ext
11458cat >>conftest.$ac_ext <<_ACEOF
11459/* end confdefs.h. */
7afe8c41
KG
11460#undef $ac_tr_decl
11461#define $ac_tr_decl 1
ba479fd2 11462
d02af173 11463#include "ansidecl.h"
86cf1cbd 11464#include "system.h"
81bf3d9e
RH
11465#ifdef HAVE_SYS_RESOURCE_H
11466#include <sys/resource.h>
11467#endif
11468
f31e826b 11469
ba479fd2
NN
11470int
11471main ()
11472{
86cf1cbd
KG
11473#ifndef $ac_func
11474char *(*pfn) = (char *(*)) $ac_func ;
11475#endif
ba479fd2
NN
11476 ;
11477 return 0;
11478}
11479_ACEOF
11480rm -f conftest.$ac_objext
11481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11482 (eval $ac_compile) 2>conftest.er1
ba479fd2 11483 ac_status=$?
86da66b5
HPN
11484 grep -v '^ *+' conftest.er1 >conftest.err
11485 rm -f conftest.er1
11486 cat conftest.err >&5
ba479fd2
NN
11487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11488 (exit $ac_status); } &&
1cf0118d
RO
11489 { ac_try='test -z "$ac_c_werror_flag"
11490 || test ! -s conftest.err'
86da66b5
HPN
11491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11492 (eval $ac_try) 2>&5
11493 ac_status=$?
11494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11495 (exit $ac_status); }; } &&
11496 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11498 (eval $ac_try) 2>&5
11499 ac_status=$?
11500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11501 (exit $ac_status); }; }; then
f31e826b 11502 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11503else
ba479fd2
NN
11504 echo "$as_me: failed program was:" >&5
11505sed 's/^/| /' conftest.$ac_ext >&5
11506
11507eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11508fi
86da66b5 11509rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11510fi
11511
f31e826b 11512if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11513 echo "$as_me:$LINENO: result: yes" >&5
11514echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11515#define $ac_tr_decl 1
ba479fd2
NN
11516_ACEOF
11517
81bf3d9e 11518else
ba479fd2
NN
11519 echo "$as_me:$LINENO: result: no" >&5
11520echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11521#define $ac_tr_decl 0
ba479fd2
NN
11522_ACEOF
11523
81bf3d9e
RH
11524fi
11525
11526done
86cf1cbd 11527
81bf3d9e 11528
ba479fd2 11529cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11530/* confdefs.h. */
11531_ACEOF
11532cat confdefs.h >>conftest.$ac_ext
11533cat >>conftest.$ac_ext <<_ACEOF
11534/* end confdefs.h. */
b2522d2b
HPN
11535
11536#include "ansidecl.h"
11537#include "system.h"
11538#ifdef HAVE_SYS_RESOURCE_H
11539#include <sys/resource.h>
11540#endif
11541
ba479fd2
NN
11542int
11543main ()
11544{
b2522d2b 11545rlim_t l = 0;
ba479fd2
NN
11546 ;
11547 return 0;
11548}
11549_ACEOF
11550rm -f conftest.$ac_objext
11551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11552 (eval $ac_compile) 2>conftest.er1
ba479fd2 11553 ac_status=$?
86da66b5
HPN
11554 grep -v '^ *+' conftest.er1 >conftest.err
11555 rm -f conftest.er1
11556 cat conftest.err >&5
ba479fd2
NN
11557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11558 (exit $ac_status); } &&
1cf0118d
RO
11559 { ac_try='test -z "$ac_c_werror_flag"
11560 || test ! -s conftest.err'
86da66b5
HPN
11561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11562 (eval $ac_try) 2>&5
11563 ac_status=$?
11564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11565 (exit $ac_status); }; } &&
11566 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11568 (eval $ac_try) 2>&5
11569 ac_status=$?
11570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11571 (exit $ac_status); }; }; then
b2522d2b
HPN
11572 :
11573else
ba479fd2
NN
11574 echo "$as_me: failed program was:" >&5
11575sed 's/^/| /' conftest.$ac_ext >&5
11576
11577
11578cat >>confdefs.h <<\_ACEOF
b2522d2b 11579#define rlim_t long
ba479fd2 11580_ACEOF
b2522d2b
HPN
11581
11582fi
86da66b5 11583rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 11584
2102b2fe
RS
11585# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11586# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11587# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11588# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 11589
351df804 11590for ac_func in ldgetname
c1800ec8 11591do
ad6717df 11592 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11593echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11594echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11595if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11596 echo $ECHO_N "(cached) $ECHO_C" >&6
11597else
11598 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11599/* confdefs.h. */
11600_ACEOF
11601cat confdefs.h >>conftest.$ac_ext
11602cat >>conftest.$ac_ext <<_ACEOF
11603/* end confdefs.h. */
c1800ec8
ZW
11604#undef $ac_tr_decl
11605#define $ac_tr_decl 1
ba479fd2 11606
351df804
KG
11607#include "ansidecl.h"
11608#include "system.h"
11609#ifdef HAVE_LDFCN_H
2102b2fe
RS
11610#undef FREAD
11611#undef FWRITE
351df804
KG
11612#include <ldfcn.h>
11613#endif
11614
11615
ba479fd2
NN
11616int
11617main ()
11618{
351df804
KG
11619#ifndef $ac_func
11620char *(*pfn) = (char *(*)) $ac_func ;
11621#endif
ba479fd2
NN
11622 ;
11623 return 0;
11624}
11625_ACEOF
11626rm -f conftest.$ac_objext
11627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11628 (eval $ac_compile) 2>conftest.er1
ba479fd2 11629 ac_status=$?
86da66b5
HPN
11630 grep -v '^ *+' conftest.er1 >conftest.err
11631 rm -f conftest.er1
11632 cat conftest.err >&5
ba479fd2
NN
11633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11634 (exit $ac_status); } &&
1cf0118d
RO
11635 { ac_try='test -z "$ac_c_werror_flag"
11636 || test ! -s conftest.err'
86da66b5
HPN
11637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11638 (eval $ac_try) 2>&5
11639 ac_status=$?
11640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11641 (exit $ac_status); }; } &&
11642 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11644 (eval $ac_try) 2>&5
11645 ac_status=$?
11646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11647 (exit $ac_status); }; }; then
351df804
KG
11648 eval "gcc_cv_have_decl_$ac_func=yes"
11649else
ba479fd2
NN
11650 echo "$as_me: failed program was:" >&5
11651sed 's/^/| /' conftest.$ac_ext >&5
11652
11653eval "gcc_cv_have_decl_$ac_func=no"
351df804 11654fi
86da66b5 11655rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
11656fi
11657
11658if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11659 echo "$as_me:$LINENO: result: yes" >&5
11660echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11661#define $ac_tr_decl 1
ba479fd2
NN
11662_ACEOF
11663
351df804 11664else
ba479fd2
NN
11665 echo "$as_me:$LINENO: result: no" >&5
11666echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11667#define $ac_tr_decl 0
ba479fd2
NN
11668_ACEOF
11669
351df804
KG
11670fi
11671
11672done
ba479fd2 11673
351df804
KG
11674
11675
11676for ac_func in times
11677do
ad6717df 11678 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11679echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11680echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11681if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11682 echo $ECHO_N "(cached) $ECHO_C" >&6
11683else
11684 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11685/* confdefs.h. */
11686_ACEOF
11687cat confdefs.h >>conftest.$ac_ext
11688cat >>conftest.$ac_ext <<_ACEOF
11689/* end confdefs.h. */
351df804
KG
11690#undef $ac_tr_decl
11691#define $ac_tr_decl 1
ba479fd2 11692
c1800ec8
ZW
11693#include "ansidecl.h"
11694#include "system.h"
11695#ifdef HAVE_SYS_TIMES_H
11696#include <sys/times.h>
11697#endif
11698
11699
ba479fd2
NN
11700int
11701main ()
11702{
c1800ec8
ZW
11703#ifndef $ac_func
11704char *(*pfn) = (char *(*)) $ac_func ;
11705#endif
ba479fd2
NN
11706 ;
11707 return 0;
11708}
11709_ACEOF
11710rm -f conftest.$ac_objext
11711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11712 (eval $ac_compile) 2>conftest.er1
ba479fd2 11713 ac_status=$?
86da66b5
HPN
11714 grep -v '^ *+' conftest.er1 >conftest.err
11715 rm -f conftest.er1
11716 cat conftest.err >&5
ba479fd2
NN
11717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11718 (exit $ac_status); } &&
1cf0118d
RO
11719 { ac_try='test -z "$ac_c_werror_flag"
11720 || test ! -s conftest.err'
86da66b5
HPN
11721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11722 (eval $ac_try) 2>&5
11723 ac_status=$?
11724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11725 (exit $ac_status); }; } &&
11726 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11728 (eval $ac_try) 2>&5
11729 ac_status=$?
11730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11731 (exit $ac_status); }; }; then
c1800ec8
ZW
11732 eval "gcc_cv_have_decl_$ac_func=yes"
11733else
ba479fd2
NN
11734 echo "$as_me: failed program was:" >&5
11735sed 's/^/| /' conftest.$ac_ext >&5
11736
11737eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 11738fi
86da66b5 11739rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
11740fi
11741
11742if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11743 echo "$as_me:$LINENO: result: yes" >&5
11744echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11745#define $ac_tr_decl 1
ba479fd2
NN
11746_ACEOF
11747
c1800ec8 11748else
ba479fd2
NN
11749 echo "$as_me:$LINENO: result: no" >&5
11750echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11751#define $ac_tr_decl 0
ba479fd2
NN
11752_ACEOF
11753
c1800ec8
ZW
11754fi
11755
11756done
c1800ec8
ZW
11757
11758
11759# More time-related stuff.
ba479fd2
NN
11760echo "$as_me:$LINENO: checking for struct tms" >&5
11761echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
11762if test "${ac_cv_struct_tms+set}" = set; then
11763 echo $ECHO_N "(cached) $ECHO_C" >&6
11764else
11765
11766cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11767/* confdefs.h. */
11768_ACEOF
11769cat confdefs.h >>conftest.$ac_ext
11770cat >>conftest.$ac_ext <<_ACEOF
11771/* end confdefs.h. */
c1800ec8
ZW
11772
11773#include "ansidecl.h"
11774#include "system.h"
11775#ifdef HAVE_SYS_TIMES_H
11776#include <sys/times.h>
11777#endif
11778
ba479fd2
NN
11779int
11780main ()
11781{
c1800ec8 11782struct tms tms;
ba479fd2
NN
11783 ;
11784 return 0;
11785}
11786_ACEOF
11787rm -f conftest.$ac_objext
11788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11789 (eval $ac_compile) 2>conftest.er1
ba479fd2 11790 ac_status=$?
86da66b5
HPN
11791 grep -v '^ *+' conftest.er1 >conftest.err
11792 rm -f conftest.er1
11793 cat conftest.err >&5
ba479fd2
NN
11794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11795 (exit $ac_status); } &&
1cf0118d
RO
11796 { ac_try='test -z "$ac_c_werror_flag"
11797 || test ! -s conftest.err'
86da66b5
HPN
11798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11799 (eval $ac_try) 2>&5
11800 ac_status=$?
11801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11802 (exit $ac_status); }; } &&
11803 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11805 (eval $ac_try) 2>&5
11806 ac_status=$?
11807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11808 (exit $ac_status); }; }; then
c1800ec8
ZW
11809 ac_cv_struct_tms=yes
11810else
ba479fd2
NN
11811 echo "$as_me: failed program was:" >&5
11812sed 's/^/| /' conftest.$ac_ext >&5
11813
11814ac_cv_struct_tms=no
c1800ec8 11815fi
86da66b5 11816rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11817fi
ba479fd2
NN
11818echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11819echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 11820if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
11821
11822cat >>confdefs.h <<\_ACEOF
c1800ec8 11823#define HAVE_STRUCT_TMS 1
ba479fd2 11824_ACEOF
c1800ec8
ZW
11825
11826fi
11827
11828# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11829# revisit after autoconf 2.50.
ba479fd2
NN
11830echo "$as_me:$LINENO: checking for clock_t" >&5
11831echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
11832if test "${gcc_cv_type_clock_t+set}" = set; then
11833 echo $ECHO_N "(cached) $ECHO_C" >&6
11834else
11835
11836cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11837/* confdefs.h. */
11838_ACEOF
11839cat confdefs.h >>conftest.$ac_ext
11840cat >>conftest.$ac_ext <<_ACEOF
11841/* end confdefs.h. */
c1800ec8
ZW
11842
11843#include "ansidecl.h"
11844#include "system.h"
11845
ba479fd2
NN
11846int
11847main ()
11848{
c1800ec8 11849clock_t x;
ba479fd2
NN
11850 ;
11851 return 0;
11852}
11853_ACEOF
11854rm -f conftest.$ac_objext
11855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11856 (eval $ac_compile) 2>conftest.er1
ba479fd2 11857 ac_status=$?
86da66b5
HPN
11858 grep -v '^ *+' conftest.er1 >conftest.err
11859 rm -f conftest.er1
11860 cat conftest.err >&5
ba479fd2
NN
11861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11862 (exit $ac_status); } &&
1cf0118d
RO
11863 { ac_try='test -z "$ac_c_werror_flag"
11864 || test ! -s conftest.err'
86da66b5
HPN
11865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11866 (eval $ac_try) 2>&5
11867 ac_status=$?
11868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11869 (exit $ac_status); }; } &&
11870 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11872 (eval $ac_try) 2>&5
11873 ac_status=$?
11874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11875 (exit $ac_status); }; }; then
c1800ec8
ZW
11876 gcc_cv_type_clock_t=yes
11877else
ba479fd2
NN
11878 echo "$as_me: failed program was:" >&5
11879sed 's/^/| /' conftest.$ac_ext >&5
11880
11881gcc_cv_type_clock_t=no
c1800ec8 11882fi
86da66b5 11883rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11884fi
ba479fd2
NN
11885echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
11886echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 11887if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
11888
11889cat >>confdefs.h <<\_ACEOF
c1800ec8 11890#define HAVE_CLOCK_T 1
ba479fd2 11891_ACEOF
c1800ec8
ZW
11892
11893fi
11894
eb70d86d
AS
11895# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
11896CFLAGS="$saved_CFLAGS"
11897
07cf4226
DM
11898# Check whether --enable-initfini-array or --disable-initfini-array was given.
11899if test "${enable_initfini_array+set}" = set; then
11900 enableval="$enable_initfini_array"
ba479fd2 11901
07cf4226 11902else
ba479fd2
NN
11903
11904echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
11905echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
11906if test "${gcc_cv_initfini_array+set}" = set; then
11907 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 11908else
eb70d86d 11909 if test "$cross_compiling" = yes; then
918c4fe4 11910 gcc_cv_initfini_array=no
eb70d86d 11911else
ba479fd2 11912 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11913/* confdefs.h. */
11914_ACEOF
11915cat confdefs.h >>conftest.$ac_ext
11916cat >>conftest.$ac_ext <<_ACEOF
11917/* end confdefs.h. */
eb70d86d 11918
07cf4226
DM
11919static int x = -1;
11920int main (void) { return x; }
11921int foo (void) { x = 0; }
11922int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
11923_ACEOF
11924rm -f conftest$ac_exeext
11925if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11926 (eval $ac_link) 2>&5
11927 ac_status=$?
11928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11929 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11931 (eval $ac_try) 2>&5
11932 ac_status=$?
11933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11934 (exit $ac_status); }; }; then
918c4fe4 11935 gcc_cv_initfini_array=yes
eb70d86d 11936else
ba479fd2
NN
11937 echo "$as_me: program exited with status $ac_status" >&5
11938echo "$as_me: failed program was:" >&5
11939sed 's/^/| /' conftest.$ac_ext >&5
11940
11941( exit $ac_status )
11942gcc_cv_initfini_array=no
eb70d86d 11943fi
86da66b5 11944rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 11945fi
07cf4226 11946fi
ba479fd2
NN
11947echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
11948echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 11949 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 11950
ba479fd2 11951fi;
63cf211a 11952if test $enable_initfini_array = yes; then
ba479fd2
NN
11953
11954cat >>confdefs.h <<\_ACEOF
eb70d86d 11955#define HAVE_INITFINI_ARRAY 1
ba479fd2 11956_ACEOF
07cf4226 11957
eb70d86d 11958fi
81bf3d9e 11959
ba479fd2
NN
11960# mkdir takes a single argument on some systems.
11961echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
11962echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
11963if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
11964 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 11965else
ba479fd2 11966 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11967/* confdefs.h. */
11968_ACEOF
11969cat confdefs.h >>conftest.$ac_ext
11970cat >>conftest.$ac_ext <<_ACEOF
11971/* end confdefs.h. */
75923b2f
MK
11972
11973#include <sys/types.h>
11974#ifdef HAVE_SYS_STAT_H
11975# include <sys/stat.h>
11976#endif
11977#ifdef HAVE_UNISTD_H
11978# include <unistd.h>
11979#endif
11980#ifdef HAVE_DIRECT_H
11981# include <direct.h>
11982#endif
ba479fd2
NN
11983int
11984main ()
11985{
75923b2f 11986mkdir ("foo", 0);
ba479fd2
NN
11987 ;
11988 return 0;
11989}
11990_ACEOF
11991rm -f conftest.$ac_objext
11992if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11993 (eval $ac_compile) 2>conftest.er1
ba479fd2 11994 ac_status=$?
86da66b5
HPN
11995 grep -v '^ *+' conftest.er1 >conftest.err
11996 rm -f conftest.er1
11997 cat conftest.err >&5
ba479fd2
NN
11998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11999 (exit $ac_status); } &&
1cf0118d
RO
12000 { ac_try='test -z "$ac_c_werror_flag"
12001 || test ! -s conftest.err'
86da66b5
HPN
12002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12003 (eval $ac_try) 2>&5
12004 ac_status=$?
12005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12006 (exit $ac_status); }; } &&
12007 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
12008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12009 (eval $ac_try) 2>&5
12010 ac_status=$?
12011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12012 (exit $ac_status); }; }; then
75923b2f
MK
12013 gcc_cv_mkdir_takes_one_arg=no
12014else
ba479fd2
NN
12015 echo "$as_me: failed program was:" >&5
12016sed 's/^/| /' conftest.$ac_ext >&5
12017
12018gcc_cv_mkdir_takes_one_arg=yes
75923b2f 12019fi
86da66b5 12020rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 12021fi
ba479fd2
NN
12022echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
12023echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 12024if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
12025
12026cat >>confdefs.h <<\_ACEOF
75923b2f 12027#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 12028_ACEOF
75923b2f
MK
12029
12030fi
12031
12032
861bb6c1
JL
12033# File extensions
12034manext='.1'
12035objext='.o'
12036
12037
12038
4977bab6
ZW
12039# With Setjmp/Longjmp based exception handling.
12040# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
12041if test "${enable_sjlj_exceptions+set}" = set; then
12042 enableval="$enable_sjlj_exceptions"
12043 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 12044
ba479fd2
NN
12045cat >>confdefs.h <<_ACEOF
12046#define CONFIG_SJLJ_EXCEPTIONS $sjlj
12047_ACEOF
4977bab6 12048
ba479fd2 12049fi;
4977bab6 12050
443728bb
L
12051# For platforms with the unwind ABI which includes an unwind library,
12052# libunwind, we can choose to use the system libunwind.
4977bab6 12053
443728bb
L
12054# Check whether --with-system-libunwind or --without-system-libunwind was given.
12055if test "${with_system_libunwind+set}" = set; then
12056 withval="$with_system_libunwind"
4977bab6 12057
ba479fd2 12058fi;
4977bab6 12059
34a86c2b
NN
12060# --------------------------------------------------------
12061# Build, host, and target specific configuration fragments
12062# --------------------------------------------------------
12063
5b28c537
NN
12064# Collect build-machine-specific information.
12065. ${srcdir}/config.build
12066
a89ea0df
NN
12067# Collect host-machine-specific information.
12068. ${srcdir}/config.host
12069
ef69da62 12070target_gtfiles=
a89ea0df
NN
12071
12072# Collect target-machine-specific information.
8ad9fb33 12073. ${srcdir}/config.gcc
861bb6c1
JL
12074
12075extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 12076extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
12077
12078# Default the target-machine variables that were not explicitly set.
75bffa71 12079if test x"$tm_file" = x
861bb6c1
JL
12080then tm_file=$cpu_type/$cpu_type.h; fi
12081
6b2adea9 12082if test x"$extra_headers" = x
861bb6c1
JL
12083then extra_headers=; fi
12084
75bffa71 12085if test x$md_file = x
e98e406f 12086then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 12087
75bffa71 12088if test x$out_file = x
861bb6c1
JL
12089then out_file=$cpu_type/$cpu_type.c; fi
12090
75bffa71 12091if test x"$tmake_file" = x
861bb6c1
JL
12092then tmake_file=$cpu_type/t-$cpu_type
12093fi
12094
90e6a802 12095if test x"$dwarf2" = xyes
756ee602 12096then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
12097fi
12098
861bb6c1 12099# Say what files are being used for the output code and MD file.
11642c3a 12100echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
12101echo "Using \`$srcdir/config/$md_file' as machine description file."
12102
11642c3a 12103# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
12104# about them and drop them.
12105
11642c3a
ZW
12106bx=
12107for x in $build_xm_file; do
12108 if test -f $srcdir/config/$x
12109 then bx="$bx $x"
ba479fd2
NN
12110 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12111echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12112 fi
12113done
12114build_xm_file="$bx"
12115
12116hx=
12117for x in $host_xm_file; do
12118 if test -f $srcdir/config/$x
12119 then hx="$hx $x"
ba479fd2
NN
12120 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12121echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12122 fi
12123done
12124host_xm_file="$hx"
12125
12126tx=
12127for x in $xm_file; do
12128 if test -f $srcdir/config/$x
12129 then tx="$tx $x"
ba479fd2
NN
12130 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12131echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12132 fi
12133done
12134xm_file="$tx"
12135
861bb6c1
JL
12136count=a
12137for f in $tm_file; do
12138 count=${count}x
12139done
75bffa71 12140if test $count = ax; then
861bb6c1
JL
12141 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
12142else
12143 echo "Using the following target machine macro files:"
12144 for f in $tm_file; do
12145 echo " $srcdir/config/$f"
12146 done
12147fi
12148
4977bab6 12149if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
12150
12151cat >>confdefs.h <<\_ACEOF
4977bab6 12152#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 12153_ACEOF
4977bab6
ZW
12154
12155fi
12156
99fa8911
AP
12157if test x$use_long_long_for_widest_fast_int = xyes; then
12158
12159cat >>confdefs.h <<\_ACEOF
12160#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12161_ACEOF
12162
12163fi
12164
861bb6c1
JL
12165count=a
12166for f in $host_xm_file; do
12167 count=${count}x
12168done
11642c3a
ZW
12169if test $count = a; then
12170 :
12171elif test $count = ax; then
861bb6c1
JL
12172 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12173else
12174 echo "Using the following host machine macro files:"
12175 for f in $host_xm_file; do
12176 echo " $srcdir/config/$f"
12177 done
12178fi
476d9098 12179echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 12180
75bffa71 12181if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
12182 count=a
12183 for f in $build_xm_file; do
12184 count=${count}x
12185 done
11642c3a
ZW
12186 if test $count = a; then
12187 :
12188 elif test $count = ax; then
861bb6c1
JL
12189 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12190 else
12191 echo "Using the following build machine macro files:"
12192 for f in $build_xm_file; do
12193 echo " $srcdir/config/$f"
12194 done
12195 fi
12196fi
12197
8bb915b6
NN
12198# ---------
12199# Threading
12200# ---------
12201
c2e494a8 12202# Check if a valid thread package
615be2cf 12203case ${enable_threads} in
c2e494a8
NN
12204 "" | no)
12205 # No threads
12206 target_thread_file='single'
12207 ;;
12208 yes)
12209 # default
12210 target_thread_file='single'
12211 ;;
18167442 12212 aix | dce | gnat | irix | posix | posix95 | rtems | \
769e49eb 12213 single | solaris | vxworks | win32 )
615be2cf 12214 target_thread_file=${enable_threads}
c2e494a8
NN
12215 ;;
12216 *)
615be2cf 12217 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
12218 exit 1
12219 ;;
12220esac
12221
12222if test x${thread_file} = x; then
12223 # No thread file set by target-specific clauses in config.gcc,
12224 # so use file chosen by default logic above
12225 thread_file=${target_thread_file}
861bb6c1
JL
12226fi
12227
8bb915b6
NN
12228# Make gthr-default.h if we have a thread file.
12229gthread_flags=
12230if test $thread_file != single; then
12231 rm -f gthr-default.h
12232 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12233 gthread_flags=-DHAVE_GTHR_DEFAULT
12234fi
12235
12236
12237# --------
12238# UNSORTED
12239# --------
12240
18fbf599 12241use_cxa_atexit=no
2121a768
JT
12242if test x$enable___cxa_atexit = xyes || \
12243 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599
PB
12244 if test x$host = x$target; then
12245 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
354b7da5
DH
12246echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
12247if test "${ac_cv_func___cxa_atexit+set}" = set; then
12248 echo $ECHO_N "(cached) $ECHO_C" >&6
12249else
12250 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
12251/* confdefs.h. */
12252_ACEOF
12253cat confdefs.h >>conftest.$ac_ext
12254cat >>conftest.$ac_ext <<_ACEOF
12255/* end confdefs.h. */
86da66b5
HPN
12256/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12257 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12258#define __cxa_atexit innocuous___cxa_atexit
12259
354b7da5
DH
12260/* System header to define __stub macros and hopefully few prototypes,
12261 which can conflict with char __cxa_atexit (); below.
12262 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12263 <limits.h> exists even on freestanding compilers. */
86da66b5 12264
354b7da5
DH
12265#ifdef __STDC__
12266# include <limits.h>
12267#else
12268# include <assert.h>
12269#endif
86da66b5
HPN
12270
12271#undef __cxa_atexit
12272
354b7da5
DH
12273/* Override any gcc2 internal prototype to avoid an error. */
12274#ifdef __cplusplus
12275extern "C"
12276{
12277#endif
12278/* We use char because int might match the return type of a gcc2
12279 builtin and then its argument prototype would still apply. */
12280char __cxa_atexit ();
12281/* The GNU C library defines this for functions which it implements
12282 to always fail with ENOSYS. Some functions are actually named
12283 something starting with __ and the normal name is an alias. */
12284#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
12285choke me
12286#else
12287char (*f) () = __cxa_atexit;
12288#endif
12289#ifdef __cplusplus
12290}
12291#endif
12292
12293int
12294main ()
12295{
12296return f != __cxa_atexit;
12297 ;
12298 return 0;
12299}
12300_ACEOF
12301rm -f conftest.$ac_objext conftest$ac_exeext
12302if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12303 (eval $ac_link) 2>conftest.er1
354b7da5 12304 ac_status=$?
86da66b5
HPN
12305 grep -v '^ *+' conftest.er1 >conftest.err
12306 rm -f conftest.er1
12307 cat conftest.err >&5
354b7da5
DH
12308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12309 (exit $ac_status); } &&
1cf0118d
RO
12310 { ac_try='test -z "$ac_c_werror_flag"
12311 || test ! -s conftest.err'
86da66b5
HPN
12312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12313 (eval $ac_try) 2>&5
12314 ac_status=$?
12315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12316 (exit $ac_status); }; } &&
12317 { ac_try='test -s conftest$ac_exeext'
354b7da5
DH
12318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12319 (eval $ac_try) 2>&5
12320 ac_status=$?
12321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12322 (exit $ac_status); }; }; then
12323 ac_cv_func___cxa_atexit=yes
12324else
12325 echo "$as_me: failed program was:" >&5
12326sed 's/^/| /' conftest.$ac_ext >&5
12327
12328ac_cv_func___cxa_atexit=no
12329fi
86da66b5
HPN
12330rm -f conftest.err conftest.$ac_objext \
12331 conftest$ac_exeext conftest.$ac_ext
354b7da5
DH
12332fi
12333echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12334echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
12335if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
12336 use_cxa_atexit=yes
12337else
12338 echo "__cxa_atexit can't be enabled on this target"
12339fi
12340
12341 else
12342 # We can't check for __cxa_atexit when building a cross, so assume
12343 # it is available
12344 use_cxa_atexit=yes
12345 fi
12346 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
12347
12348cat >>confdefs.h <<\_ACEOF
c7b5e395 12349#define DEFAULT_USE_CXA_ATEXIT 2
ba479fd2 12350_ACEOF
2121a768 12351
18fbf599 12352 fi
2121a768
JT
12353fi
12354
a5381466 12355# Look for a file containing extra machine modes.
1c0ca89d
ZW
12356if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12357 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
12358
12359
12360cat >>confdefs.h <<_ACEOF
e22340b0 12361#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 12362_ACEOF
a5381466
ZW
12363
12364fi
12365
75685792
RS
12366# Convert extra_options into a form suitable for Makefile use.
12367extra_opt_files=
12368for f in $extra_options; do
12369 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12370done
12371
12372
b7cb92ad 12373# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 12374# the first file included by config.h.
4977bab6 12375# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 12376# as well. If host!=build, we are in error and need to do more
db81d74a 12377# work to find out the build config parameters.
75bffa71 12378if test x$host = x$build
db81d74a 12379then
eaf4e618 12380 build_auto=auto-host.h
b7cb92ad
JL
12381else
12382 # We create a subdir, then run autoconf in the subdir.
12383 # To prevent recursion we set host and build for the new
12384 # invocation of configure to the build for this invocation
ba479fd2 12385 # of configure.
b7cb92ad
JL
12386 tempdir=build.$$
12387 rm -rf $tempdir
12388 mkdir $tempdir
12389 cd $tempdir
12390 case ${srcdir} in
255b8a49 12391 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
12392 *) realsrcdir=../${srcdir};;
12393 esac
d920e825
L
12394 saved_CFLAGS="${CFLAGS}"
12395 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12396 ${realsrcdir}/configure \
33e70558 12397 --enable-languages=${enable_languages-all} \
534d0cc0 12398 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 12399 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
12400
12401 # We just finished tests for the build machine, so rename
12402 # the file auto-build.h in the gcc directory.
12403 mv auto-host.h ../auto-build.h
12404 cd ..
12405 rm -rf $tempdir
eaf4e618 12406 build_auto=auto-build.h
db81d74a
RH
12407fi
12408
06f0b04c 12409
eaf4e618 12410tm_file="${tm_file} defaults.h"
4977bab6
ZW
12411tm_p_file="${tm_p_file} tm-preds.h"
12412host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12413build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 12414# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 12415# put this back in temporarily.
232b67d9 12416xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 12417
34a86c2b
NN
12418# --------
12419# UNSORTED
12420# --------
12421
cc1e60ea 12422# Compile in configure arguments.
8105825d 12423if test -f configargs.h ; then
cc1e60ea 12424 # Being re-configured.
022dae81 12425 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
12426 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12427else
12428 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12429fi
eeae7b41
DJ
12430
12431# Double all backslashes and backslash all quotes to turn
12432# gcc_config_arguments into a C string.
12433sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12434$gcc_config_arguments
12435EOF
12436gcc_config_arguments_str=`cat conftest.out`
12437rm -f conftest.out
12438
cc1e60ea
JM
12439cat > configargs.h <<EOF
12440/* Generated automatically. */
eeae7b41 12441static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 12442static const char thread_model[] = "$thread_file";
7816bea0
DJ
12443
12444static const struct {
12445 const char *name, *value;
12446} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
12447EOF
12448
ab87f8c8 12449# Internationalization
56694dd9
ZW
12450# If we haven't got the data from the intl directory,
12451# assume NLS is disabled.
ba479fd2
NN
12452USE_NLS=no
12453LIBINTL=
12454LIBINTL_DEP=
12455INCINTL=
12456XGETTEXT=
12457GMSGFMT=
12458POSUB=
56694dd9
ZW
12459if test -f ../intl/config.intl; then
12460 . ../intl/config.intl
093e61a6 12461fi
ba479fd2
NN
12462echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12463echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
56694dd9 12464if test x"$USE_NLS" != xyes; then
ba479fd2
NN
12465 echo "$as_me:$LINENO: result: no" >&5
12466echo "${ECHO_T}no" >&6
56694dd9 12467else
ba479fd2
NN
12468 echo "$as_me:$LINENO: result: yes" >&5
12469echo "${ECHO_T}yes" >&6
12470
12471cat >>confdefs.h <<\_ACEOF
56694dd9 12472#define ENABLE_NLS 1
ba479fd2 12473_ACEOF
56694dd9 12474
093e61a6 12475
ba479fd2
NN
12476 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12477echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
56694dd9 12478 # Look for .po and .gmo files in the source directory.
ba479fd2 12479 CATALOGS=
56694dd9
ZW
12480 XLINGUAS=
12481 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12482 # If there aren't any .gmo files the shell will give us the
12483 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12484 # weeded out.
12485 case "$cat" in *\**)
12486 continue;;
12487 esac
12488 # The quadruple backslash is collapsed to a double backslash
12489 # by the backticks, then collapsed again by the double quotes,
12490 # leaving us with one backslash in the sed expression (right
12491 # before the dot that mustn't act as a wildcard).
5c3c3683
DJ
12492 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
12493 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
56694dd9
ZW
12494 # The user is allowed to set LINGUAS to a list of languages to
12495 # install catalogs for. If it's empty that means "all of them."
12496 if test "x$LINGUAS" = x; then
12497 CATALOGS="$CATALOGS $cat"
12498 XLINGUAS="$XLINGUAS $lang"
12499 else
12500 case "$LINGUAS" in *$lang*)
12501 CATALOGS="$CATALOGS $cat"
12502 XLINGUAS="$XLINGUAS $lang"
12503 ;;
12504 esac
12505 fi
12506 done
12507 LINGUAS="$XLINGUAS"
ba479fd2
NN
12508 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12509echo "${ECHO_T}$LINGUAS" >&6
5c3c3683
DJ
12510
12511
12512 DATADIRNAME=share
12513
12514 INSTOBJEXT=.mo
12515
12516 GENCAT=gencat
12517
12518 CATOBJEXT=.gmo
12519
56694dd9 12520fi
861bb6c1 12521
56694dd9
ZW
12522# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12523# -liconv on the link line twice.
12524case "$LIBINTL" in *$LIBICONV*)
12525 LIBICONV= ;;
12526esac
dc6746e7 12527
7f970b70
AM
12528# Check whether --enable-secureplt or --disable-secureplt was given.
12529if test "${enable_secureplt+set}" = set; then
12530 enableval="$enable_secureplt"
12531
12532fi;
12533
56694dd9
ZW
12534# Windows32 Registry support for specifying GCC installation paths.
12535# Check whether --enable-win32-registry or --disable-win32-registry was given.
12536if test "${enable_win32_registry+set}" = set; then
12537 enableval="$enable_win32_registry"
dc6746e7 12538
ba479fd2 12539fi;
ba479fd2 12540
a1286ef5
ZW
12541case $host_os in
12542 win32 | pe | cygwin* | mingw32* | uwin*)
12543 if test "x$enable_win32_registry" != xno; then
12544 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
ba479fd2
NN
12545echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
12546if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12547 echo $ECHO_N "(cached) $ECHO_C" >&6
12548else
12549 ac_func_search_save_LIBS=$LIBS
12550ac_cv_search_RegOpenKeyExA=no
12551cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12552/* confdefs.h. */
12553_ACEOF
12554cat confdefs.h >>conftest.$ac_ext
12555cat >>conftest.$ac_ext <<_ACEOF
12556/* end confdefs.h. */
861bb6c1 12557
ab87f8c8 12558/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12559#ifdef __cplusplus
12560extern "C"
12561#endif
ab87f8c8 12562/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12563 builtin and then its argument prototype would still apply. */
12564char RegOpenKeyExA ();
12565int
12566main ()
12567{
12568RegOpenKeyExA ();
12569 ;
12570 return 0;
12571}
12572_ACEOF
12573rm -f conftest.$ac_objext conftest$ac_exeext
12574if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12575 (eval $ac_link) 2>conftest.er1
ba479fd2 12576 ac_status=$?
86da66b5
HPN
12577 grep -v '^ *+' conftest.er1 >conftest.err
12578 rm -f conftest.er1
12579 cat conftest.err >&5
ba479fd2
NN
12580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581 (exit $ac_status); } &&
1cf0118d
RO
12582 { ac_try='test -z "$ac_c_werror_flag"
12583 || test ! -s conftest.err'
86da66b5
HPN
12584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12585 (eval $ac_try) 2>&5
12586 ac_status=$?
12587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12588 (exit $ac_status); }; } &&
12589 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12591 (eval $ac_try) 2>&5
12592 ac_status=$?
12593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12594 (exit $ac_status); }; }; then
56694dd9 12595 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 12596else
ba479fd2
NN
12597 echo "$as_me: failed program was:" >&5
12598sed 's/^/| /' conftest.$ac_ext >&5
12599
861bb6c1 12600fi
86da66b5
HPN
12601rm -f conftest.err conftest.$ac_objext \
12602 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
12603if test "$ac_cv_search_RegOpenKeyExA" = no; then
12604 for ac_lib in advapi32; do
12605 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12606 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12607/* confdefs.h. */
12608_ACEOF
12609cat confdefs.h >>conftest.$ac_ext
12610cat >>conftest.$ac_ext <<_ACEOF
12611/* end confdefs.h. */
12612
56694dd9 12613/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12614#ifdef __cplusplus
12615extern "C"
12616#endif
56694dd9 12617/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12618 builtin and then its argument prototype would still apply. */
12619char RegOpenKeyExA ();
12620int
12621main ()
12622{
12623RegOpenKeyExA ();
12624 ;
12625 return 0;
12626}
12627_ACEOF
12628rm -f conftest.$ac_objext conftest$ac_exeext
12629if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12630 (eval $ac_link) 2>conftest.er1
ba479fd2 12631 ac_status=$?
86da66b5
HPN
12632 grep -v '^ *+' conftest.er1 >conftest.err
12633 rm -f conftest.er1
12634 cat conftest.err >&5
ba479fd2
NN
12635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12636 (exit $ac_status); } &&
1cf0118d
RO
12637 { ac_try='test -z "$ac_c_werror_flag"
12638 || test ! -s conftest.err'
86da66b5
HPN
12639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12640 (eval $ac_try) 2>&5
12641 ac_status=$?
12642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12643 (exit $ac_status); }; } &&
12644 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12646 (eval $ac_try) 2>&5
12647 ac_status=$?
12648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12649 (exit $ac_status); }; }; then
12650 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 12651break
861bb6c1 12652else
ba479fd2
NN
12653 echo "$as_me: failed program was:" >&5
12654sed 's/^/| /' conftest.$ac_ext >&5
12655
861bb6c1 12656fi
86da66b5
HPN
12657rm -f conftest.err conftest.$ac_objext \
12658 conftest$ac_exeext conftest.$ac_ext
ba479fd2 12659 done
6e3f3080 12660fi
ba479fd2
NN
12661LIBS=$ac_func_search_save_LIBS
12662fi
12663echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
12664echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
12665if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 12666 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 12667
cafe096b 12668else
a1286ef5 12669 enable_win32_registry=no
093e61a6 12670fi
ab87f8c8 12671
a1286ef5
ZW
12672 fi
12673
12674 if test "x$enable_win32_registry" != xno; then
12675
12676cat >>confdefs.h <<\_ACEOF
12677#define ENABLE_WIN32_REGISTRY 1
12678_ACEOF
ab87f8c8 12679
a1286ef5
ZW
12680
12681 if test "x$enable_win32_registry" != xyes \
12682 && test "x$enable_win32_registry" != x; then
ba479fd2
NN
12683
12684cat >>confdefs.h <<_ACEOF
a1286ef5 12685#define WIN32_REGISTRY_KEY "$enable_win32_registry"
ba479fd2 12686_ACEOF
cafe096b 12687
a1286ef5
ZW
12688 fi
12689 fi
12690 ;;
56694dd9 12691esac
ab87f8c8 12692
56694dd9
ZW
12693# Get an absolute path to the GCC top-level source directory
12694holddir=`${PWDCMD-pwd}`
12695cd $srcdir
12696topdir=`${PWDCMD-pwd}`
12697cd $holddir
ab87f8c8 12698
56694dd9 12699# Conditionalize the makefile for this host machine.
2ed26f6b 12700xmake_file=
c406e779 12701for f in ${host_xmake_file}
56694dd9
ZW
12702do
12703 if test -f ${srcdir}/config/$f
12704 then
2ed26f6b 12705 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
12706 fi
12707done
093e61a6 12708
56694dd9 12709# Conditionalize the makefile for this target machine.
2ed26f6b 12710tmake_file_=
c406e779 12711for f in ${tmake_file}
56694dd9
ZW
12712do
12713 if test -f ${srcdir}/config/$f
12714 then
2ed26f6b 12715 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
12716 fi
12717done
2ed26f6b 12718tmake_file="${tmake_file_}"
71a94577 12719
ab87f8c8
JL
12720# If the host doesn't support symlinks, modify CC in
12721# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
12722# Otherwise, we can use "CC=$(CC)".
12723rm -f symtest.tem
35f06ae4
PB
12724case "$LN_S" in
12725 *-s*)
12726 cc_set_by_configure="\$(CC)"
12727 quoted_cc_set_by_configure="\$(CC)"
12728 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12729 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12730 ;;
12731 *)
12732 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
12733 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
12734 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
12735 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
12736 ;;
12737esac
ab87f8c8 12738
5395b47b
NN
12739# This is a terrible hack which will go away some day.
12740host_cc_for_libada=${CC}
1e3fad21
NN
12741
12742
ab87f8c8
JL
12743out_object_file=`basename $out_file .c`.o
12744
75685792
RS
12745tm_file_list="options.h"
12746tm_include_list="options.h"
ab87f8c8 12747for f in $tm_file; do
64ccbc99 12748 case $f in
d02af173 12749 defaults.h )
e22340b0
ZW
12750 tm_file_list="${tm_file_list} \$(srcdir)/$f"
12751 tm_include_list="${tm_include_list} $f"
12752 ;;
12753 * )
12754 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
12755 tm_include_list="${tm_include_list} config/$f"
12756 ;;
64ccbc99 12757 esac
ab87f8c8
JL
12758done
12759
11642c3a 12760tm_p_file_list=
e22340b0 12761tm_p_include_list=
11642c3a 12762for f in $tm_p_file; do
4977bab6
ZW
12763 case $f in
12764 tm-preds.h )
e22340b0
ZW
12765 tm_p_file_list="${tm_p_file_list} $f"
12766 tm_p_include_list="${tm_p_include_list} $f"
12767 ;;
12768 * )
12769 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
12770 tm_p_include_list="${tm_p_include_list} config/$f"
12771 esac
12772done
12773
12774xm_file_list=
12775xm_include_list=
12776for f in $xm_file; do
12777 case $f in
12778 ansidecl.h )
12779 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
12780 xm_include_list="${xm_include_list} $f"
12781 ;;
12782 auto-host.h )
12783 xm_file_list="${xm_file_list} $f"
12784 xm_include_list="${xm_include_list} $f"
12785 ;;
12786 * )
12787 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
12788 xm_include_list="${xm_include_list} config/$f"
12789 ;;
4977bab6 12790 esac
11642c3a
ZW
12791done
12792
ab87f8c8 12793host_xm_file_list=
e22340b0 12794host_xm_include_list=
ab87f8c8 12795for f in $host_xm_file; do
64ccbc99 12796 case $f in
d02af173 12797 ansidecl.h )
e22340b0
ZW
12798 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
12799 host_xm_include_list="${host_xm_include_list} $f"
12800 ;;
e2500fed 12801 auto-host.h )
e22340b0
ZW
12802 host_xm_file_list="${host_xm_file_list} $f"
12803 host_xm_include_list="${host_xm_include_list} $f"
12804 ;;
12805 * )
12806 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
12807 host_xm_include_list="${host_xm_include_list} config/$f"
12808 ;;
64ccbc99 12809 esac
ab87f8c8
JL
12810done
12811
12812build_xm_file_list=
12813for f in $build_xm_file; do
64ccbc99 12814 case $f in
d02af173 12815 ansidecl.h )
e22340b0
ZW
12816 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
12817 build_xm_include_list="${build_xm_include_list} $f"
12818 ;;
e2500fed 12819 auto-build.h | auto-host.h )
e22340b0
ZW
12820 build_xm_file_list="${build_xm_file_list} $f"
12821 build_xm_include_list="${build_xm_include_list} $f"
12822 ;;
12823 * )
12824 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
12825 build_xm_include_list="${build_xm_include_list} config/$f"
12826 ;;
64ccbc99 12827 esac
ab87f8c8
JL
12828done
12829
a078a589
ZW
12830# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
12831# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
12832CROSS=
12833ALL=all.internal
12834SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
12835
12836if test "x$with_build_sysroot" != x; then
12837 build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)'
12838else
12839 # This value is used, even on a native system, because
12840 # CROSS_SYSTEM_HEADER_DIR is just
12841 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
12842 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
12843fi
12844
ab87f8c8
JL
12845if test x$host != x$target
12846then
a078a589
ZW
12847 CROSS="-DCROSS_COMPILE"
12848 ALL=all.cross
160633c6 12849 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 12850 case "$host","$target" in
3a7e8b87
GK
12851 # Darwin crosses can use the host system's libraries and headers,
12852 # because of the fat library support. Of course, it must be the
12853 # same version of Darwin on both sides. Allow the user to
12854 # just say --target=foo-darwin without a version number to mean
12855 # "the version on this system".
12856 *-*-darwin*,*-*-darwin*)
12857 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
12858 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
12859 if test $hostos = $targetos -o $targetos = darwin ; then
12860 CROSS=
12861 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
12862 with_headers=yes
12863 fi
12864 ;;
12865
343f59d9
AM
12866 i?86-*-*,x86_64-*-* \
12867 | powerpc*-*-*,powerpc64*-*-*)
12868 CROSS="$CROSS -DNATIVE_CROSS" ;;
12869 esac
7a615b25 12870elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 12871 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
12872fi
12873
b39d221a
EC
12874# If this is a cross-compiler that does not
12875# have its own set of headers then define
12876# inhibit_libc
12877
dc06db20
R
12878# If this is using newlib, without having the headers available now,
12879# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
12880# This prevents libgcc2 from containing any code which requires libc
12881# support.
160633c6 12882inhibit_libc=false
dc06db20
R
12883if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
12884 test x$with_newlib = xyes ; } &&
e50084fa 12885 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 12886 inhibit_libc=true
b39d221a
EC
12887fi
12888
12889
a078a589
ZW
12890# When building gcc with a cross-compiler, we need to adjust things so
12891# that the generator programs are still built with the native compiler.
12892# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
12893
12894# These are the normal (build=host) settings:
ba479fd2
NN
12895CC_FOR_BUILD='$(CC)'
12896BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 12897STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
12898
12899# Possibly disable fixproto, on a per-target basis.
12900case ${use_fixproto} in
12901 no)
12902 STMP_FIXPROTO=
12903 ;;
12904 yes)
12905 STMP_FIXPROTO=stmp-fixproto
12906 ;;
12907esac
12908
a078a589 12909
83599948
NS
12910# And these apply if build != host, or we are generating coverage data
12911if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 12912then
b11e4747 12913 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 12914
7a615b25 12915 if test "x$TARGET_SYSTEM_ROOT" = x; then
d8e5117d 12916 if test "x$STMP_FIXPROTO" != x; then
de253ca4
GK
12917 STMP_FIXPROTO=stmp-install-fixproto
12918 fi
7a615b25 12919 fi
ab87f8c8
JL
12920fi
12921
12922# Expand extra_headers to include complete path.
12923# This substitutes for lots of t-* files.
12924extra_headers_list=
b1ef58c8
NN
12925# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
12926for file in ${extra_headers} ; do
12927 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
12928done
ab87f8c8 12929
c38f02df
ILT
12930# Define collect2 in Makefile.
12931case $host_can_use_collect2 in
12932 no) collect2= ;;
12933 *) collect2='collect2$(exeext)' ;;
12934esac
12935
12936
ab87f8c8 12937# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
12938case $use_collect2 in
12939 no) use_collect2= ;;
12940 "") ;;
ba479fd2 12941 *)
34a86c2b
NN
12942 host_xm_defines="${host_xm_defines} USE_COLLECT2"
12943 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
12944 case $host_can_use_collect2 in
12945 no)
12946 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
12947echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
12948 { (exit 1); exit 1; }; }
12949 ;;
12950 esac
34a86c2b
NN
12951 ;;
12952esac
ab87f8c8 12953
8bb915b6
NN
12954# ---------------------------
12955# Assembler & linker features
12956# ---------------------------
12957
d869a8c4
NN
12958# Identify the assembler which will work hand-in-glove with the newly
12959# built GCC, so that we can examine its features. This is the assembler
12960# which will be driven by the driver program.
12961#
12962# If build != host, and we aren't building gas in-tree, we identify a
12963# build->target assembler and hope that it will have the same features
12964# as the host->target assembler we'll be using.
981d4858
JM
12965gcc_cv_gas_major_version=
12966gcc_cv_gas_minor_version=
ab87f8c8 12967gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
e8b05380
PB
12968
12969if test "${gcc_cv_as+set}" = set; then
12970 :
12971else
12972
ab87f8c8
JL
12973if test -x "$DEFAULT_ASSEMBLER"; then
12974 gcc_cv_as="$DEFAULT_ASSEMBLER"
34a86c2b 12975elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
12976 && test -f ../gas/Makefile \
12977 && test x$build = x$host; then
e8b05380
PB
12978 gcc_cv_as=../gas/as-new$build_exeext
12979elif test -x as$build_exeext; then
12980 # Build using assembler in the current directory.
12981 gcc_cv_as=./as$build_exeext
12982elif test -x $AS_FOR_TARGET; then
12983 gcc_cv_as="$AS_FOR_TARGET"
12984else
12985 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
12986set dummy $AS_FOR_TARGET; ac_word=$2
12987echo "$as_me:$LINENO: checking for $ac_word" >&5
12988echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12989if test "${ac_cv_path_gcc_cv_as+set}" = set; then
12990 echo $ECHO_N "(cached) $ECHO_C" >&6
12991else
12992 case $gcc_cv_as in
12993 [\\/]* | ?:[\\/]*)
12994 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
12995 ;;
12996 *)
12997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12998for as_dir in $PATH
12999do
13000 IFS=$as_save_IFS
13001 test -z "$as_dir" && as_dir=.
13002 for ac_exec_ext in '' $ac_executable_extensions; do
13003 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13004 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
13005 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13006 break 2
13007 fi
13008done
13009done
13010
13011 ;;
13012esac
13013fi
13014gcc_cv_as=$ac_cv_path_gcc_cv_as
13015
13016if test -n "$gcc_cv_as"; then
13017 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13018echo "${ECHO_T}$gcc_cv_as" >&6
13019else
13020 echo "$as_me:$LINENO: result: no" >&5
13021echo "${ECHO_T}no" >&6
13022fi
13023
13024fi
13025fi
13026
13027
13028ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
13029
13030
13031echo "$as_me:$LINENO: checking what assembler to use" >&5
13032echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
13033if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
08d105fa
AO
13034 # Single tree build which includes gas. We want to prefer it
13035 # over whatever linker top-level may have detected, since
13036 # we'll use what we're building after installation anyway.
e8b05380
PB
13037 echo "$as_me:$LINENO: result: newly built gas" >&5
13038echo "${ECHO_T}newly built gas" >&6
ad9c4d9f
NN
13039 in_tree_gas=yes
13040 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
13041for f in $gcc_cv_as_bfd_srcdir/configure \
13042 $gcc_cv_as_gas_srcdir/configure \
13043 $gcc_cv_as_gas_srcdir/configure.in \
13044 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 13045 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
13046 if test x$gcc_cv_gas_version != x; then
13047 break
13048 fi
13049done
13050gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
13051gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13052gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
13053case $gcc_cv_gas_patch_version in
13054 "") gcc_cv_gas_patch_version="0" ;;
13055esac
8ada417f
ZW
13056gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
13057 + $gcc_cv_gas_minor_version \) \* 1000 \
13058 + $gcc_cv_gas_patch_version`
ad9c4d9f 13059
5408ac6c
HPN
13060 in_tree_gas_is_elf=no
13061 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
13062 || (grep 'obj_format = multi' ../gas/Makefile \
13063 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
13064 then
13065 in_tree_gas_is_elf=yes
13066 fi
e8b05380
PB
13067else
13068 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13069echo "${ECHO_T}$gcc_cv_as" >&6
13070 in_tree_gas=no
981d4858 13071fi
9e423e6d 13072
e8b05380
PB
13073# Identify the linker which will work hand-in-glove with the newly
13074# built GCC, so that we can examine its features. This is the linker
13075# which will be driven by the driver program.
9f18db39 13076#
e8b05380
PB
13077# If build != host, and we aren't building gas in-tree, we identify a
13078# build->target linker and hope that it will have the same features
13079# as the host->target linker we'll be using.
13080gcc_cv_gld_major_version=
13081gcc_cv_gld_minor_version=
13082gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
13083gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9f18db39 13084
e8b05380
PB
13085if test "${gcc_cv_ld+set}" = set; then
13086 :
9f18db39 13087else
9f18db39 13088
e8b05380
PB
13089if test -x "$DEFAULT_LINKER"; then
13090 gcc_cv_ld="$DEFAULT_LINKER"
13091elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
13092 && test -f ../ld/Makefile \
13093 && test x$build = x$host; then
13094 gcc_cv_ld=../ld/ld-new$build_exeext
13095elif test -x collect-ld$build_exeext; then
13096 # Build using linker in the current directory.
13097 gcc_cv_ld=./collect-ld$build_exeext
13098elif test -x $LD_FOR_TARGET; then
13099 gcc_cv_ld="$LD_FOR_TARGET"
13100else
13101 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
13102set dummy $LD_FOR_TARGET; ac_word=$2
d739199a
DJ
13103echo "$as_me:$LINENO: checking for $ac_word" >&5
13104echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13105if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
d739199a
DJ
13106 echo $ECHO_N "(cached) $ECHO_C" >&6
13107else
e8b05380 13108 case $gcc_cv_ld in
d739199a 13109 [\\/]* | ?:[\\/]*)
e8b05380 13110 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
13111 ;;
13112 *)
13113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13114for as_dir in $PATH
13115do
13116 IFS=$as_save_IFS
13117 test -z "$as_dir" && as_dir=.
13118 for ac_exec_ext in '' $ac_executable_extensions; do
13119 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13120 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13121 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13122 break 2
13123 fi
13124done
13125done
13126
13127 ;;
13128esac
13129fi
e8b05380 13130gcc_cv_ld=$ac_cv_path_gcc_cv_ld
d739199a 13131
e8b05380
PB
13132if test -n "$gcc_cv_ld"; then
13133 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13134echo "${ECHO_T}$gcc_cv_ld" >&6
d739199a
DJ
13135else
13136 echo "$as_me:$LINENO: result: no" >&5
13137echo "${ECHO_T}no" >&6
13138fi
13139
13140fi
e8b05380
PB
13141fi
13142
13143
13144ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
13145
13146
13147echo "$as_me:$LINENO: checking what linker to use" >&5
13148echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
13149if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
13150 # Single tree build which includes ld. We want to prefer it
13151 # over whatever linker top-level may have detected, since
13152 # we'll use what we're building after installation anyway.
13153 echo "$as_me:$LINENO: result: newly built ld" >&5
13154echo "${ECHO_T}newly built ld" >&6
13155 in_tree_ld=yes
13156 in_tree_ld_is_elf=no
13157 if (grep 'EMUL = .*elf' ../ld/Makefile \
13158 || grep 'EMUL = .*linux' ../ld/Makefile \
13159 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
13160 in_tree_ld_is_elf=yes
13161 fi
13162 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
13163 do
13164 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
13165 if test x$gcc_cv_gld_version != x; then
13166 break
13167 fi
13168 done
13169 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
13170 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13171else
13172 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13173echo "${ECHO_T}$gcc_cv_ld" >&6
13174 in_tree_ld=no
13175fi
13176
13177# Figure out what nm we will be using.
13178gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
13179if test "${gcc_cv_nm+set}" = set; then
13180 :
13181else
13182
13183if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
13184 && test -f ../binutils/Makefile \
13185 && test x$build = x$host; then
e8b05380
PB
13186 gcc_cv_nm=../binutils/nm-new$build_exeext
13187elif test -x nm$build_exeext; then
13188 gcc_cv_nm=./nm$build_exeext
13189elif test -x $NM_FOR_TARGET; then
13190 gcc_cv_nm="$NM_FOR_TARGET"
13191else
13192 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
13193set dummy $NM_FOR_TARGET; ac_word=$2
d739199a
DJ
13194echo "$as_me:$LINENO: checking for $ac_word" >&5
13195echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13196if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
d739199a
DJ
13197 echo $ECHO_N "(cached) $ECHO_C" >&6
13198else
e8b05380 13199 case $gcc_cv_nm in
d739199a 13200 [\\/]* | ?:[\\/]*)
e8b05380 13201 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
13202 ;;
13203 *)
13204 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13205for as_dir in $PATH
13206do
13207 IFS=$as_save_IFS
13208 test -z "$as_dir" && as_dir=.
13209 for ac_exec_ext in '' $ac_executable_extensions; do
13210 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13211 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13212 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13213 break 2
13214 fi
13215done
13216done
13217
13218 ;;
13219esac
13220fi
e8b05380 13221gcc_cv_nm=$ac_cv_path_gcc_cv_nm
d739199a 13222
e8b05380
PB
13223if test -n "$gcc_cv_nm"; then
13224 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13225echo "${ECHO_T}$gcc_cv_nm" >&6
d739199a
DJ
13226else
13227 echo "$as_me:$LINENO: result: no" >&5
13228echo "${ECHO_T}no" >&6
13229fi
13230
13231fi
e8b05380 13232fi
d739199a 13233
e8b05380
PB
13234
13235echo "$as_me:$LINENO: checking what nm to use" >&5
13236echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
13237if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
13238 # Single tree build which includes binutils.
13239 echo "$as_me:$LINENO: result: newly built nm" >&5
13240echo "${ECHO_T}newly built nm" >&6
13241 in_tree_nm=yes
13242else
13243 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13244echo "${ECHO_T}$gcc_cv_nm" >&6
13245 in_tree_nm=no
13246fi
13247
13248ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
13249
13250
13251# Figure out what objdump we will be using.
13252if test "${gcc_cv_objdump+set}" = set; then
13253 :
13254else
13255
13256if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
13257 && test -f ../binutils/Makefile \
13258 && test x$build = x$host; then
e8b05380
PB
13259 # Single tree build which includes binutils.
13260 gcc_cv_objdump=../binutils/objdump$build_exeext
13261elif test -x objdump$build_exeext; then
13262 gcc_cv_objdump=./objdump$build_exeext
13263elif test -x $OBJDUMP_FOR_TARGET; then
13264 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
13265else
13266 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
13267set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
9f18db39
PB
13268echo "$as_me:$LINENO: checking for $ac_word" >&5
13269echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13270if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
9f18db39
PB
13271 echo $ECHO_N "(cached) $ECHO_C" >&6
13272else
e8b05380 13273 case $gcc_cv_objdump in
9f18db39 13274 [\\/]* | ?:[\\/]*)
e8b05380 13275 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
13276 ;;
13277 *)
13278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 13279for as_dir in $PATH
9f18db39
PB
13280do
13281 IFS=$as_save_IFS
13282 test -z "$as_dir" && as_dir=.
13283 for ac_exec_ext in '' $ac_executable_extensions; do
13284 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13285 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
9f18db39
PB
13286 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13287 break 2
13288 fi
13289done
13290done
779243f7 13291
9f18db39
PB
13292 ;;
13293esac
13294fi
e8b05380 13295gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
9f18db39 13296
e8b05380
PB
13297if test -n "$gcc_cv_objdump"; then
13298 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13299echo "${ECHO_T}$gcc_cv_objdump" >&6
9f18db39
PB
13300else
13301 echo "$as_me:$LINENO: result: no" >&5
13302echo "${ECHO_T}no" >&6
13303fi
13304
e8b05380
PB
13305fi
13306fi
9f18db39 13307
e8b05380
PB
13308
13309echo "$as_me:$LINENO: checking what objdump to use" >&5
13310echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
13311if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
13312 # Single tree build which includes binutils.
13313 echo "$as_me:$LINENO: result: newly built objdump" >&5
13314echo "${ECHO_T}newly built objdump" >&6
13315elif test x$gcc_cv_objdump = x; then
13316 echo "$as_me:$LINENO: result: not found" >&5
13317echo "${ECHO_T}not found" >&6
13318else
13319 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13320echo "${ECHO_T}$gcc_cv_objdump" >&6
a2eafc76 13321fi
3cae5780 13322
981d4858 13323# Figure out what assembler alignment features are present.
ba479fd2
NN
13324echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13325echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
13326if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13327 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13328else
13329 gcc_cv_as_balign_and_p2align=no
13330 if test $in_tree_gas = yes; then
13331 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13332 then gcc_cv_as_balign_and_p2align=yes
13333fi
13334 elif test x$gcc_cv_as != x; then
6e3f3080 13335 echo '.balign 4
8ada417f 13336.p2align 2' > conftest.s
ba479fd2
NN
13337 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13339 (eval $ac_try) 2>&5
13340 ac_status=$?
13341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13342 (exit $ac_status); }; }
8ada417f
ZW
13343 then
13344 gcc_cv_as_balign_and_p2align=yes
13345 else
13346 echo "configure: failed program was" >&5
13347 cat conftest.s >&5
13348 fi
13349 rm -f conftest.o conftest.s
13350 fi
13351fi
ba479fd2
NN
13352echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13353echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 13354if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
13355
13356cat >>confdefs.h <<\_ACEOF
981d4858 13357#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 13358_ACEOF
981d4858 13359
ad9c4d9f
NN
13360fi
13361
ba479fd2
NN
13362echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13363echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
13364if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13365 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13366else
13367 gcc_cv_as_max_skip_p2align=no
13368 if test $in_tree_gas = yes; then
13369 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13370 then gcc_cv_as_max_skip_p2align=yes
13371fi
13372 elif test x$gcc_cv_as != x; then
6e3f3080 13373 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
13374 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13376 (eval $ac_try) 2>&5
13377 ac_status=$?
13378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13379 (exit $ac_status); }; }
8ada417f
ZW
13380 then
13381 gcc_cv_as_max_skip_p2align=yes
13382 else
13383 echo "configure: failed program was" >&5
13384 cat conftest.s >&5
13385 fi
13386 rm -f conftest.o conftest.s
13387 fi
ad9c4d9f 13388fi
ba479fd2
NN
13389echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13390echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 13391if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
13392
13393cat >>confdefs.h <<\_ACEOF
9e423e6d 13394#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 13395_ACEOF
9e423e6d 13396
9e423e6d 13397fi
ad9c4d9f 13398
ba479fd2
NN
13399echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13400echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
13401if test "${gcc_cv_as_subsection_m1+set}" = set; then
13402 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13403else
13404 gcc_cv_as_subsection_m1=no
13405 if test $in_tree_gas = yes; then
13406 if test $in_tree_gas_is_elf = yes \
13407 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13408 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 13409fi
8ada417f 13410 elif test x$gcc_cv_as != x; then
6e3f3080 13411 echo 'conftest_label1: .word 0
d1accaa3
JJ
13412.subsection -1
13413conftest_label2: .word 0
8ada417f 13414.previous' > conftest.s
ba479fd2
NN
13415 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13417 (eval $ac_try) 2>&5
13418 ac_status=$?
13419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13420 (exit $ac_status); }; }
8ada417f
ZW
13421 then
13422 if test x$gcc_cv_nm != x; then
13423 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13424 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13425 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13426 then :
13427 else gcc_cv_as_subsection_m1=yes
13428 fi
13429 rm -f conftest.nm1 conftest.nm2
13430 fi
13431 else
13432 echo "configure: failed program was" >&5
13433 cat conftest.s >&5
13434 fi
13435 rm -f conftest.o conftest.s
13436 fi
981d4858 13437fi
ba479fd2
NN
13438echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13439echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 13440if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
13441
13442cat >>confdefs.h <<\_ACEOF
981d4858 13443#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 13444_ACEOF
981d4858 13445
d1accaa3 13446fi
ad9c4d9f 13447
ba479fd2
NN
13448echo "$as_me:$LINENO: checking assembler for .weak" >&5
13449echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
13450if test "${gcc_cv_as_weak+set}" = set; then
13451 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13452else
13453 gcc_cv_as_weak=no
13454 if test $in_tree_gas = yes; then
13455 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13456 then gcc_cv_as_weak=yes
ad9c4d9f 13457fi
8ada417f 13458 elif test x$gcc_cv_as != x; then
6e3f3080 13459 echo ' .weak foobar' > conftest.s
ba479fd2
NN
13460 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13462 (eval $ac_try) 2>&5
13463 ac_status=$?
13464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13465 (exit $ac_status); }; }
8ada417f
ZW
13466 then
13467 gcc_cv_as_weak=yes
13468 else
13469 echo "configure: failed program was" >&5
13470 cat conftest.s >&5
13471 fi
13472 rm -f conftest.o conftest.s
13473 fi
981d4858 13474fi
ba479fd2
NN
13475echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13476echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 13477if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
13478
13479cat >>confdefs.h <<\_ACEOF
981d4858 13480#define HAVE_GAS_WEAK 1
ba479fd2 13481_ACEOF
981d4858 13482
12822146 13483fi
ad9c4d9f 13484
a0203ca7
AO
13485echo "$as_me:$LINENO: checking assembler for .weakref" >&5
13486echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
13487if test "${gcc_cv_as_weakref+set}" = set; then
13488 echo $ECHO_N "(cached) $ECHO_C" >&6
13489else
13490 gcc_cv_as_weakref=no
13491 if test $in_tree_gas = yes; then
13492 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
13493 then gcc_cv_as_weakref=yes
13494fi
13495 elif test x$gcc_cv_as != x; then
13496 echo ' .weakref foobar, barfnot' > conftest.s
13497 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13499 (eval $ac_try) 2>&5
13500 ac_status=$?
13501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13502 (exit $ac_status); }; }
13503 then
13504 gcc_cv_as_weakref=yes
13505 else
13506 echo "configure: failed program was" >&5
13507 cat conftest.s >&5
13508 fi
13509 rm -f conftest.o conftest.s
13510 fi
13511fi
13512echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
13513echo "${ECHO_T}$gcc_cv_as_weakref" >&6
13514if test $gcc_cv_as_weakref = yes; then
13515
13516cat >>confdefs.h <<\_ACEOF
13517#define HAVE_GAS_WEAKREF 1
13518_ACEOF
13519
13520fi
13521
e41f3691
JDA
13522echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13523echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
13524if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13525 echo $ECHO_N "(cached) $ECHO_C" >&6
13526else
13527 gcc_cv_as_nsubspa_comdat=no
13528 if test $in_tree_gas = yes; then
13529 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13530 then gcc_cv_as_nsubspa_comdat=yes
13531fi
13532 elif test x$gcc_cv_as != x; then
13533 echo ' .SPACE $TEXT$
13534 .NSUBSPA $CODE$,COMDAT' > conftest.s
13535 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13537 (eval $ac_try) 2>&5
13538 ac_status=$?
13539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13540 (exit $ac_status); }; }
13541 then
13542 gcc_cv_as_nsubspa_comdat=yes
13543 else
13544 echo "configure: failed program was" >&5
13545 cat conftest.s >&5
13546 fi
13547 rm -f conftest.o conftest.s
13548 fi
13549fi
13550echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13551echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
13552if test $gcc_cv_as_nsubspa_comdat = yes; then
13553
13554cat >>confdefs.h <<\_ACEOF
13555#define HAVE_GAS_NSUBSPA_COMDAT 1
13556_ACEOF
13557
13558fi
13559
8ada417f
ZW
13560# .hidden needs to be supported in both the assembler and the linker,
13561# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13562# This is irritatingly difficult to feature test for; we have to check the
13563# date string after the version number. If we've got an in-tree
13564# ld, we don't know its patchlevel version, so we set the baseline at 2.13
13565# to be safe.
13566# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
13567echo "$as_me:$LINENO: checking assembler for .hidden" >&5
13568echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
13569if test "${gcc_cv_as_hidden+set}" = set; then
13570 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13571else
13572 gcc_cv_as_hidden=no
13573 if test $in_tree_gas = yes; then
13574 if test $in_tree_gas_is_elf = yes \
13575 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
13576 then gcc_cv_as_hidden=yes
13577fi
13578 elif test x$gcc_cv_as != x; then
6e3f3080 13579 echo ' .hidden foobar
8ada417f 13580foobar:' > conftest.s
ba479fd2
NN
13581 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13583 (eval $ac_try) 2>&5
13584 ac_status=$?
13585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13586 (exit $ac_status); }; }
8ada417f
ZW
13587 then
13588 gcc_cv_as_hidden=yes
13589 else
13590 echo "configure: failed program was" >&5
13591 cat conftest.s >&5
13592 fi
13593 rm -f conftest.o conftest.s
13594 fi
13595fi
ba479fd2
NN
13596echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
13597echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 13598
ad9c4d9f 13599
ba479fd2
NN
13600echo "$as_me:$LINENO: checking linker for .hidden support" >&5
13601echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
13602if test "${gcc_cv_ld_hidden+set}" = set; then
13603 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13604else
13605 if test $in_tree_ld = yes ; then
13606 gcc_cv_ld_hidden=no
13607 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 \
13608 && test $in_tree_ld_is_elf = yes; then
13609 gcc_cv_ld_hidden=yes
13610 fi
13611else
13612 gcc_cv_ld_hidden=yes
bace148a 13613 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
13614 if echo "$ld_ver" | grep GNU > /dev/null; then
13615 ld_vers=`echo $ld_ver | sed -n \
13616 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13617 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13618 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13619 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13620 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
11176d2a
JB
13621 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13622 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
8ada417f 13623 ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
11176d2a
JB
13624 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
13625 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
13626 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
13627 if test 0"$ld_date" -lt 20020404; then
13628 if test -n "$ld_date"; then
13629 # If there was date string, but was earlier than 2002-04-04, fail
13630 gcc_cv_ld_hidden=no
13631 elif test -z "$ld_vers"; then
13632 # If there was no date string nor ld version number, something is wrong
13633 gcc_cv_ld_hidden=no
13634 else
8ada417f
ZW
13635 test -z "$ld_vers_patch" && ld_vers_patch=0
13636 if test "$ld_vers_major" -lt 2; then
13637 gcc_cv_ld_hidden=no
13638 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
13639 gcc_cv_ld_hidden="no"
13640 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
13641 gcc_cv_ld_hidden=no
c72931a6 13642 fi
8ada417f 13643 fi
789b7de5 13644 fi
8ada417f 13645 else
28690784 13646 case "${target}" in
b0fd7d27 13647 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
13648 gcc_cv_ld_hidden=yes
13649 ;;
13650 *)
13651 gcc_cv_ld_hidden=no
13652 ;;
13653 esac
8ada417f
ZW
13654 fi
13655fi
6d07784a 13656fi
ba479fd2
NN
13657echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
13658echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 13659libgcc_visibility=no
ad9c4d9f 13660
232b67d9 13661
8e3940b2 13662if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 13663 libgcc_visibility=yes
ba479fd2
NN
13664
13665cat >>confdefs.h <<\_ACEOF
8ada417f 13666#define HAVE_GAS_HIDDEN 1
ba479fd2 13667_ACEOF
ad9c4d9f
NN
13668
13669fi
13670
8ada417f 13671# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
13672echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
13673echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
13674if test "${gcc_cv_as_leb128+set}" = set; then
13675 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13676else
13677 gcc_cv_as_leb128=no
13678 if test $in_tree_gas = yes; then
13679 if test $in_tree_gas_is_elf = yes \
13680 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
13681 then gcc_cv_as_leb128=yes
13682fi
13683 elif test x$gcc_cv_as != x; then
6e3f3080 13684 echo ' .data
b7460f24
RH
13685 .uleb128 L2 - L1
13686L1:
13687 .uleb128 1280
13688 .sleb128 -1010
8ada417f 13689L2:' > conftest.s
ba479fd2
NN
13690 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13692 (eval $ac_try) 2>&5
13693 ac_status=$?
13694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13695 (exit $ac_status); }; }
8ada417f
ZW
13696 then
13697 # GAS versions before 2.11 do not support uleb128,
13698 # despite appearing to.
13699 # ??? There exists an elf-specific test that will crash
13700 # the assembler. Perhaps it's better to figure out whether
13701 # arbitrary sections are supported and try the test.
bace148a 13702 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
13703 if echo "$as_ver" | grep GNU > /dev/null; then
13704 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
13705 as_major=`echo $as_ver | sed 's/\..*//'`
13706 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
13707 if test $as_major -eq 2 && test $as_minor -lt 11
13708 then :
13709 else gcc_cv_as_leb128=yes
13710 fi
13711 fi
13712 else
13713 echo "configure: failed program was" >&5
13714 cat conftest.s >&5
13715 fi
13716 rm -f conftest.o conftest.s
13717 fi
b7460f24 13718fi
ba479fd2
NN
13719echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
13720echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 13721if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
13722
13723cat >>confdefs.h <<\_ACEOF
b7460f24 13724#define HAVE_AS_LEB128 1
ba479fd2 13725_ACEOF
b7460f24
RH
13726
13727fi
ad9c4d9f 13728
8ada417f
ZW
13729# GAS versions up to and including 2.11.0 may mis-optimize
13730# .eh_frame data.
ba479fd2
NN
13731echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
13732echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
13733if test "${gcc_cv_as_eh_frame+set}" = set; then
13734 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13735else
13736 gcc_cv_as_eh_frame=no
13737 if test $in_tree_gas = yes; then
13738 if test $in_tree_gas_is_elf = yes \
13739 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13740 then gcc_cv_as_eh_frame=yes
ad9c4d9f 13741fi
8ada417f 13742 elif test x$gcc_cv_as != x; then
6e3f3080 13743 echo ' .text
c64688ae
RH
13744.LFB1:
13745 .4byte 0
13746.L1:
13747 .4byte 0
13748.LFE1:
13749 .section .eh_frame,"aw",@progbits
13750__FRAME_BEGIN__:
13751 .4byte .LECIE1-.LSCIE1
13752.LSCIE1:
13753 .4byte 0x0
13754 .byte 0x1
13755 .ascii "z\0"
13756 .byte 0x1
13757 .byte 0x78
13758 .byte 0x1a
13759 .byte 0x0
13760 .byte 0x4
13761 .4byte 1
13762 .p2align 1
13763.LECIE1:
13764.LSFDE1:
13765 .4byte .LEFDE1-.LASFDE1
13766.LASFDE1:
13767 .4byte .LASFDE1-__FRAME_BEGIN__
13768 .4byte .LFB1
13769 .4byte .LFE1-.LFB1
13770 .byte 0x4
13771 .4byte .LFE1-.LFB1
13772 .byte 0x4
13773 .4byte .L1-.LFB1
8ada417f 13774.LEFDE1:' > conftest.s
ba479fd2
NN
13775 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13777 (eval $ac_try) 2>&5
13778 ac_status=$?
13779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13780 (exit $ac_status); }; }
8ada417f
ZW
13781 then
13782 cat > conftest.lit <<EOF
c64688ae
RH
13783 0000 10000000 00000000 017a0001 781a0004 .........z..x...
13784 0010 01000000 12000000 18000000 00000000 ................
093e61a6 13785 0020 08000000 04080000 0044 .........D
01efb963 13786EOF
ba479fd2 13787cat > conftest.big <<EOF
01efb963
AS
13788 0000 00000010 00000000 017a0001 781a0004 .........z..x...
13789 0010 00000001 00000012 00000018 00000000 ................
093e61a6 13790 0020 00000008 04000000 0844 .........D
c64688ae 13791EOF
8ada417f
ZW
13792 # If the assembler didn't choke, and we can objdump,
13793 # and we got the correct data, then succeed.
13794 if test x$gcc_cv_objdump != x \
13795 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
13796 | tail -3 > conftest.got \
13797 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
13798 || cmp conftest.big conftest.got > /dev/null 2>&1; }
13799 then
13800 gcc_cv_as_eh_frame=yes
ba479fd2
NN
13801 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
13802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13803 (eval $ac_try) 2>&5
13804 ac_status=$?
13805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13806 (exit $ac_status); }; }; then
8ada417f
ZW
13807 gcc_cv_as_eh_frame=buggy
13808 else
13809 # Uh oh, what do we do now?
13810 gcc_cv_as_eh_frame=no
13811 fi
13812 else
13813 echo "configure: failed program was" >&5
13814 cat conftest.s >&5
13815 fi
13816 rm -f conftest.o conftest.s
13817 fi
c64688ae 13818fi
ba479fd2
NN
13819echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
13820echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 13821
6e3f3080 13822
63cf211a 13823if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
13824
13825cat >>confdefs.h <<\_ACEOF
8ada417f 13826#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 13827_ACEOF
ad9c4d9f
NN
13828
13829fi
13830
ba479fd2
NN
13831echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13832echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13833if test "${gcc_cv_as_shf_merge+set}" = set; then
13834 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13835else
13836 gcc_cv_as_shf_merge=no
13837 if test $in_tree_gas = yes; then
13838 if test $in_tree_gas_is_elf = yes \
13839 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13840 then gcc_cv_as_shf_merge=yes
13841fi
13842 elif test x$gcc_cv_as != x; then
6e3f3080 13843 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
13844 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13846 (eval $ac_try) 2>&5
13847 ac_status=$?
13848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13849 (exit $ac_status); }; }
8ada417f
ZW
13850 then
13851 gcc_cv_as_shf_merge=yes
13852 else
13853 echo "configure: failed program was" >&5
13854 cat conftest.s >&5
13855 fi
13856 rm -f conftest.o conftest.s
13857 fi
201556f0 13858fi
ba479fd2
NN
13859echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13860echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 13861
c18a5b6c
MM
13862if test $gcc_cv_as_shf_merge = no; then
13863 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13864echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13865if test "${gcc_cv_as_shf_merge+set}" = set; then
13866 echo $ECHO_N "(cached) $ECHO_C" >&6
13867else
13868 gcc_cv_as_shf_merge=no
13869 if test $in_tree_gas = yes; then
13870 if test $in_tree_gas_is_elf = yes \
13871 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13872 then gcc_cv_as_shf_merge=yes
13873fi
13874 elif test x$gcc_cv_as != x; then
13875 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
13876 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13878 (eval $ac_try) 2>&5
13879 ac_status=$?
13880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13881 (exit $ac_status); }; }
13882 then
13883 gcc_cv_as_shf_merge=yes
13884 else
13885 echo "configure: failed program was" >&5
13886 cat conftest.s >&5
13887 fi
13888 rm -f conftest.o conftest.s
13889 fi
13890fi
13891echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13892echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
13893
13894fi
8ad9fb33 13895
ba479fd2 13896cat >>confdefs.h <<_ACEOF
8ad9fb33 13897#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 13898_ACEOF
201556f0 13899
201556f0 13900
c18a5b6c
MM
13901echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13902echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13903if test "${gcc_cv_as_comdat_group+set}" = set; then
13904 echo $ECHO_N "(cached) $ECHO_C" >&6
13905else
13906 gcc_cv_as_comdat_group=no
13907 if test $in_tree_gas = yes; then
13908 if test $in_tree_gas_is_elf = yes \
11176d2a 13909 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
13910 then gcc_cv_as_comdat_group=yes
13911fi
13912 elif test x$gcc_cv_as != x; then
13913 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
13914 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13916 (eval $ac_try) 2>&5
13917 ac_status=$?
13918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13919 (exit $ac_status); }; }
13920 then
13921 gcc_cv_as_comdat_group=yes
13922 else
13923 echo "configure: failed program was" >&5
13924 cat conftest.s >&5
13925 fi
13926 rm -f conftest.o conftest.s
13927 fi
13928fi
13929echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
13930echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
13931
13932if test $gcc_cv_as_comdat_group = yes; then
13933 gcc_cv_as_comdat_group_percent=no
13934else
13935 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13936echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13937if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
13938 echo $ECHO_N "(cached) $ECHO_C" >&6
13939else
13940 gcc_cv_as_comdat_group_percent=no
13941 if test $in_tree_gas = yes; then
13942 if test $in_tree_gas_is_elf = yes \
11176d2a 13943 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
13944 then gcc_cv_as_comdat_group_percent=yes
13945fi
13946 elif test x$gcc_cv_as != x; then
13947 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
13948 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13950 (eval $ac_try) 2>&5
13951 ac_status=$?
13952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13953 (exit $ac_status); }; }
13954 then
13955 gcc_cv_as_comdat_group_percent=yes
13956 else
13957 echo "configure: failed program was" >&5
13958 cat conftest.s >&5
13959 fi
13960 rm -f conftest.o conftest.s
13961 fi
13962fi
13963echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
13964echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
13965
13966fi
11176d2a
JB
13967if test $in_tree_ld != yes && test x"$ld_vers" != x; then
13968 comdat_group=yes
13969 if test 0"$ld_date" -lt 20050308; then
13970 if test -n "$ld_date"; then
13971 # If there was date string, but was earlier than 2005-03-08, fail
13972 comdat_group=no
13973 elif test "$ld_vers_major" -lt 2; then
13974 comdat_group=no
13975 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
13976 comdat_group=no
13977 fi
13978 fi
1cf0118d
RO
13979else
13980 # assume linkers other than GNU ld don't support COMDAT group
13981 comdat_group=no
13982fi
13983if test $comdat_group = no; then
13984 gcc_cv_as_comdat_group=no
13985 gcc_cv_as_comdat_group_percent=no
11176d2a 13986fi
c18a5b6c
MM
13987
13988cat >>confdefs.h <<_ACEOF
11176d2a 13989#define HAVE_COMDAT_GROUP `if test $gcc_cv_as_comdat_group = yes || test $gcc_cv_as_comdat_group_percent = yes; then echo 1; else echo 0; fi`
c18a5b6c
MM
13990_ACEOF
13991
13992
8ada417f 13993# Thread-local storage - the check is heavily parametrized.
f996902d
RH
13994conftest_s=
13995tls_first_major=
13996tls_first_minor=
9739c90c 13997tls_as_opt=
f996902d 13998case "$target" in
6f9b006d
RH
13999 alpha*-*-*)
14000 conftest_s='
14001 .section ".tdata","awT",@progbits
14002foo: .long 25
14003 .text
14004 ldq $27,__tls_get_addr($29) !literal!1
14005 lda $16,foo($29) !tlsgd!1
14006 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
14007 ldq $27,__tls_get_addr($29) !literal!2
14008 lda $16,foo($29) !tlsldm!2
14009 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
14010 ldq $1,foo($29) !gotdtprel
14011 ldah $2,foo($29) !dtprelhi
14012 lda $3,foo($2) !dtprello
14013 lda $4,foo($29) !dtprel
14014 ldq $1,foo($29) !gottprel
14015 ldah $2,foo($29) !tprelhi
14016 lda $3,foo($2) !tprello
14017 lda $4,foo($29) !tprel'
14018 tls_first_major=2
14019 tls_first_minor=13
2f3321ca 14020 tls_as_opt=--fatal-warnings
6f9b006d 14021 ;;
e4dd71de
AH
14022 frv*-*-*)
14023 conftest_s='
14024 .section ".tdata","awT",@progbits
14025x: .long 25
14026 .text
14027 call #gettlsoff(x)'
14028 tls_first_major=2
14029 tls_first_minor=14
14030 ;;
51076f96
RC
14031 hppa*-*-linux*)
14032 conftest_s='
14033t1: .reg %r20
14034t2: .reg %r21
14035gp: .reg %r19
14036 .section ".tdata","awT",@progbits
14037foo: .long 25
14038 .text
14039 .align 4
14040 addil LT%foo-$tls_gdidx$,gp
14041 ldo RT%foo-$tls_gdidx$(%r1),%arg0
14042 b __tls_get_addr
14043 nop
14044 addil LT%foo-$tls_ldidx$,gp
14045 b __tls_get_addr
14046 ldo RT%foo-$tls_ldidx$(%r1),%arg0
14047 addil LR%foo-$tls_dtpoff$,%ret0
14048 ldo RR%foo-$tls_dtpoff$(%r1),%t1
14049 mfctl %cr27,%t1
14050 addil LT%foo-$tls_ieoff$,gp
14051 ldw RT%foo-$tls_ieoff$(%r1),%t2
14052 add %t1,%t2,%t3
14053 mfctl %cr27,%t1
14054 addil LR%foo-$tls_leoff$,%t1
14055 ldo RR%foo-$tls_leoff$(%r1),%t2'
14056 tls_first_major=2
14057 tls_first_minor=15
14058 tls_as_opt=--fatal-warnings
14059 ;;
d3585b76
DJ
14060 arm*-*-*)
14061 conftest_s='
14062 .section ".tdata","awT",%progbits
14063foo: .long 25
14064 .text
14065.word foo(gottpoff)
14066.word foo(tpoff)
14067.word foo(tlsgd)
14068.word foo(tlsldm)
14069.word foo(tlsldo)'
14070 tls_first_major=2
14071 tls_first_minor=17
14072 ;;
f996902d
RH
14073 i[34567]86-*-*)
14074 conftest_s='
14075 .section ".tdata","awT",@progbits
14076foo: .long 25
14077 .text
14078 movl %gs:0, %eax
14079 leal foo@TLSGD(,%ebx,1), %eax
14080 leal foo@TLSLDM(%ebx), %eax
14081 leal foo@DTPOFF(%eax), %edx
14082 movl foo@GOTTPOFF(%ebx), %eax
14083 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
14084 addl foo@GOTNTPOFF(%ebx), %eax
14085 movl foo@INDNTPOFF, %eax
f996902d
RH
14086 movl $foo@TPOFF, %eax
14087 subl $foo@TPOFF, %eax
14088 leal foo@NTPOFF(%ecx), %eax'
14089 tls_first_major=2
75d38379 14090 tls_first_minor=14
2f3321ca 14091 tls_as_opt=--fatal-warnings
75d38379
JJ
14092 ;;
14093 x86_64-*-*)
14094 conftest_s='
14095 .section ".tdata","awT",@progbits
14096foo: .long 25
14097 .text
14098 movq %fs:0, %rax
14099 leaq foo@TLSGD(%rip), %rdi
14100 leaq foo@TLSLD(%rip), %rdi
14101 leaq foo@DTPOFF(%rax), %rdx
14102 movq foo@GOTTPOFF(%rip), %rax
14103 movq $foo@TPOFF, %rax'
14104 tls_first_major=2
14105 tls_first_minor=14
2f3321ca 14106 tls_as_opt=--fatal-warnings
f996902d 14107 ;;
7b6e506e
RH
14108 ia64-*-*)
14109 conftest_s='
14110 .section ".tdata","awT",@progbits
14111foo: data8 25
14112 .text
14113 addl r16 = @ltoff(@dtpmod(foo#)), gp
14114 addl r17 = @ltoff(@dtprel(foo#)), gp
14115 addl r18 = @ltoff(@tprel(foo#)), gp
14116 addl r19 = @dtprel(foo#), gp
14117 adds r21 = @dtprel(foo#), r13
14118 movl r23 = @dtprel(foo#)
14119 addl r20 = @tprel(foo#), gp
14120 adds r22 = @tprel(foo#), r13
14121 movl r24 = @tprel(foo#)'
14122 tls_first_major=2
14123 tls_first_minor=13
2f3321ca 14124 tls_as_opt=--fatal-warnings
7b6e506e 14125 ;;
69229b81
DJ
14126 mips*-*-*)
14127 conftest_s='
14128 .section .tdata,"awT",@progbits
14129x:
14130 .word 2
14131 .text
14132 addiu $4, $28, %tlsgd(x)
14133 addiu $4, $28, %tlsldm(x)
14134 lui $4, %dtprel_hi(x)
14135 addiu $4, $4, %dtprel_lo(x)
14136 lw $4, %gottprel(x)($28)
14137 lui $4, %tprel_hi(x)
14138 addiu $4, $4, %tprel_lo(x)'
14139 tls_first_major=2
14140 tls_first_minor=16
14141 tls_as_opt='-32 --fatal-warnings'
14142 ;;
c4501e62
JJ
14143 powerpc-*-*)
14144 conftest_s='
14145 .section ".tdata","awT",@progbits
14146 .align 2
14147ld0: .space 4
14148ld1: .space 4
14149x1: .space 4
14150x2: .space 4
14151x3: .space 4
14152 .text
14153 addi 3,31,ld0@got@tlsgd
14154 bl __tls_get_addr
14155 addi 3,31,x1@got@tlsld
14156 bl __tls_get_addr
14157 addi 9,3,x1@dtprel
14158 addis 9,3,x2@dtprel@ha
14159 addi 9,9,x2@dtprel@l
14160 lwz 9,x3@got@tprel(31)
14161 add 9,9,x@tls
14162 addi 9,2,x1@tprel
14163 addis 9,2,x2@tprel@ha
14164 addi 9,9,x2@tprel@l'
14165 tls_first_major=2
14166 tls_first_minor=14
2f3321ca 14167 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
14168 ;;
14169 powerpc64-*-*)
14170 conftest_s='
14171 .section ".tdata","awT",@progbits
14172 .align 3
14173ld0: .space 8
14174ld1: .space 8
14175x1: .space 8
14176x2: .space 8
14177x3: .space 8
14178 .text
14179 addi 3,2,ld0@got@tlsgd
14180 bl .__tls_get_addr
14181 nop
14182 addi 3,2,ld1@toc
14183 bl .__tls_get_addr
14184 nop
14185 addi 3,2,x1@got@tlsld
14186 bl .__tls_get_addr
14187 nop
14188 addi 9,3,x1@dtprel
14189 bl .__tls_get_addr
14190 nop
14191 addis 9,3,x2@dtprel@ha
14192 addi 9,9,x2@dtprel@l
14193 bl .__tls_get_addr
14194 nop
14195 ld 9,x3@got@dtprel(2)
14196 add 9,9,3
14197 bl .__tls_get_addr
14198 nop'
14199 tls_first_major=2
14200 tls_first_minor=14
2f3321ca 14201 tls_as_opt="-a64 --fatal-warnings"
c4501e62 14202 ;;
fd3cd001
UW
14203 s390-*-*)
14204 conftest_s='
14205 .section ".tdata","awT",@progbits
14206foo: .long 25
14207 .text
14208 .long foo@TLSGD
14209 .long foo@TLSLDM
14210 .long foo@DTPOFF
14211 .long foo@NTPOFF
14212 .long foo@GOTNTPOFF
14213 .long foo@INDNTPOFF
14214 l %r1,foo@GOTNTPOFF(%r12)
14215 l %r1,0(%r1):tls_load:foo
14216 bas %r14,0(%r1,%r13):tls_gdcall:foo
14217 bas %r14,0(%r1,%r13):tls_ldcall:foo'
14218 tls_first_major=2
14219 tls_first_minor=14
2f3321ca 14220 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
14221 ;;
14222 s390x-*-*)
14223 conftest_s='
14224 .section ".tdata","awT",@progbits
14225foo: .long 25
14226 .text
14227 .quad foo@TLSGD
14228 .quad foo@TLSLDM
14229 .quad foo@DTPOFF
14230 .quad foo@NTPOFF
14231 .quad foo@GOTNTPOFF
14232 lg %r1,foo@GOTNTPOFF(%r12)
14233 larl %r1,foo@INDNTPOFF
14234 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
14235 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
14236 tls_first_major=2
14237 tls_first_minor=14
2f3321ca 14238 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 14239 ;;
9ff13962
KK
14240 sh-*-* | sh[34]-*-*)
14241 conftest_s='
14242 .section ".tdata","awT",@progbits
14243foo: .long 25
14244 .text
14245 .long foo@TLSGD
14246 .long foo@TLSLDM
14247 .long foo@DTPOFF
14248 .long foo@GOTTPOFF
14249 .long foo@TPOFF'
14250 tls_first_major=2
14251 tls_first_minor=13
2f3321ca 14252 tls_as_opt=--fatal-warnings
9ff13962 14253 ;;
5751a10b 14254 sparc*-*-*)
2f3321ca 14255 case "$target" in
7935dc1b
EB
14256 sparc*-sun-solaris2.[56789]*)
14257 # TLS was introduced in the Solaris 9 4/04 release but
14258 # we do not enable it by default on Solaris 9 either.
14259 if test "x$enable_tls" = xyes ; then
14260 on_solaris=yes
14261 else
14262 enable_tls=no;
14263 fi
14264 ;;
2f3321ca
EB
14265 sparc*-sun-solaris2.*)
14266 on_solaris=yes
14267 ;;
14268 *)
14269 on_solaris=no
14270 ;;
14271 esac
14272 if test x$on_solaris = xyes && test x$gas_flag = xno; then
14273 conftest_s='
14274 .section ".tdata",#alloc,#write,#tls
14275foo: .long 25
14276 .text
14277 sethi %tgd_hi22(foo), %o0
14278 add %o0, %tgd_lo10(foo), %o1
14279 add %l7, %o1, %o0, %tgd_add(foo)
14280 call __tls_get_addr, %tgd_call(foo)
14281 sethi %tldm_hi22(foo), %l1
14282 add %l1, %tldm_lo10(foo), %l2
14283 add %l7, %l2, %o0, %tldm_add(foo)
14284 call __tls_get_addr, %tldm_call(foo)
14285 sethi %tldo_hix22(foo), %l3
14286 xor %l3, %tldo_lox10(foo), %l4
14287 add %o0, %l4, %l5, %tldo_add(foo)
14288 sethi %tie_hi22(foo), %o3
14289 add %o3, %tie_lo10(foo), %o3
14290 ld [%l7 + %o3], %o2, %tie_ld(foo)
14291 add %g7, %o2, %o4, %tie_add(foo)
14292 sethi %tle_hix22(foo), %l1
14293 xor %l1, %tle_lox10(foo), %o5
14294 ld [%g7 + %o5], %o1'
14295 tls_first_major=0
14296 tls_first_minor=0
14297 else
14298 conftest_s='
5751a10b
JJ
14299 .section ".tdata","awT",@progbits
14300foo: .long 25
14301 .text
14302 sethi %tgd_hi22(foo), %o0
14303 add %o0, %tgd_lo10(foo), %o1
14304 add %l7, %o1, %o0, %tgd_add(foo)
14305 call __tls_get_addr, %tgd_call(foo)
14306 sethi %tldm_hi22(foo), %l1
14307 add %l1, %tldm_lo10(foo), %l2
14308 add %l7, %l2, %o0, %tldm_add(foo)
14309 call __tls_get_addr, %tldm_call(foo)
14310 sethi %tldo_hix22(foo), %l3
14311 xor %l3, %tldo_lox10(foo), %l4
14312 add %o0, %l4, %l5, %tldo_add(foo)
14313 sethi %tie_hi22(foo), %o3
14314 add %o3, %tie_lo10(foo), %o3
14315 ld [%l7 + %o3], %o2, %tie_ld(foo)
14316 add %g7, %o2, %o4, %tie_add(foo)
14317 sethi %tle_hix22(foo), %l1
14318 xor %l1, %tle_lox10(foo), %o5
14319 ld [%g7 + %o5], %o1'
14320 tls_first_major=2
14321 tls_first_minor=14
2f3321ca
EB
14322 tls_as_opt="-32 --fatal-warnings"
14323 fi
5751a10b 14324 ;;
f996902d 14325esac
8dea1cca
DD
14326set_have_as_tls=no
14327if test "x$enable_tls" = xno ; then
14328 : # TLS explicitly disabled.
14329elif test "x$enable_tls" = xyes ; then
14330 set_have_as_tls=yes # TLS explicitly enabled.
14331elif test -z "$tls_first_major"; then
8ada417f
ZW
14332 : # If we don't have a check, assume no support.
14333else
ba479fd2
NN
14334 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
14335echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
14336if test "${gcc_cv_as_tls+set}" = set; then
14337 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14338else
14339 gcc_cv_as_tls=no
14340 if test $in_tree_gas = yes; then
14341 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
14342 then gcc_cv_as_tls=yes
ad9c4d9f 14343fi
8ada417f 14344 elif test x$gcc_cv_as != x; then
6e3f3080 14345 echo "$conftest_s" > conftest.s
2f3321ca 14346 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
14347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14348 (eval $ac_try) 2>&5
14349 ac_status=$?
14350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14351 (exit $ac_status); }; }
8ada417f
ZW
14352 then
14353 gcc_cv_as_tls=yes
14354 else
14355 echo "configure: failed program was" >&5
14356 cat conftest.s >&5
14357 fi
14358 rm -f conftest.o conftest.s
f996902d 14359 fi
f996902d 14360fi
ba479fd2
NN
14361echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
14362echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 14363if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
14364 set_have_as_tls=yes
14365fi
14366fi
14367if test $set_have_as_tls = yes ; then
ba479fd2
NN
14368
14369cat >>confdefs.h <<\_ACEOF
f996902d 14370#define HAVE_AS_TLS 1
ba479fd2 14371_ACEOF
f996902d 14372
8ada417f
ZW
14373fi
14374
14375# Target-specific assembler checks.
f996902d 14376
7e9d8517
L
14377echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
14378echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
14379gcc_cv_ld_static_dynamic=no
14380if test $in_tree_ld = yes ; then
14381 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
14382 gcc_cv_ld_static_dynamic=yes
14383 fi
14384elif test x$gcc_cv_ld != x; then
14385 # Check if linker supports -Bstatic/-Bdynamic option
14386 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
14387 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
14388 gcc_cv_ld_static_dynamic=yes
14389 fi
14390fi
14391if test x"$gcc_cv_ld_static_dynamic" = xyes; then
14392
14393cat >>confdefs.h <<\_ACEOF
14394#define HAVE_LD_STATIC_DYNAMIC 1
14395_ACEOF
14396
14397fi
14398echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14399echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
14400
d594623a
L
14401if test x"$demangler_in_ld" = xyes; then
14402 echo "$as_me:$LINENO: checking linker --demangle support" >&5
14403echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
14404 gcc_cv_ld_demangle=no
14405 if test $in_tree_ld = yes; then
14406 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 \
14407 gcc_cv_ld_demangle=yes
14408 fi
14409 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14410 # Check if the GNU linker supports --demangle option
14411 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14412 gcc_cv_ld_demangle=yes
14413 fi
14414 fi
14415 if test x"$gcc_cv_ld_demangle" = xyes; then
14416
14417cat >>confdefs.h <<\_ACEOF
14418#define HAVE_LD_DEMANGLE 1
14419_ACEOF
14420
14421 fi
14422 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14423echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
14424fi
14425
3a37b08e
RH
14426case "$target" in
14427 # All TARGET_ABI_OSF targets.
14428 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
14429 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14430echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14431if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14432 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 14433else
8ada417f
ZW
14434 gcc_cv_as_alpha_explicit_relocs=no
14435 if test $in_tree_gas = yes; then
14436 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14437 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 14438fi
8ada417f 14439 elif test x$gcc_cv_as != x; then
6e3f3080 14440 echo ' .set nomacro
3a37b08e
RH
14441 .text
14442 extbl $3, $2, $3 !lituse_bytoff!1
14443 ldq $2, a($29) !literal!1
14444 ldq $4, b($29) !literal!2
14445 ldq_u $3, 0($2) !lituse_base!1
14446 ldq $27, f($29) !literal!5
14447 jsr $26, ($27), f !lituse_jsr!5
14448 ldah $29, 0($26) !gpdisp!3
14449 lda $0, c($29) !gprel
14450 ldah $1, d($29) !gprelhigh
14451 lda $1, d($1) !gprellow
8ada417f 14452 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
14453 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14455 (eval $ac_try) 2>&5
14456 ac_status=$?
14457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14458 (exit $ac_status); }; }
8ada417f
ZW
14459 then
14460 gcc_cv_as_alpha_explicit_relocs=yes
14461 else
14462 echo "configure: failed program was" >&5
14463 cat conftest.s >&5
14464 fi
14465 rm -f conftest.o conftest.s
14466 fi
cafe096b 14467fi
ba479fd2
NN
14468echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14469echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 14470if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
14471
14472cat >>confdefs.h <<\_ACEOF
3a37b08e 14473#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 14474_ACEOF
3a37b08e 14475
d006f5eb
RH
14476fi
14477 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
14478echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
14479if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
14480 echo $ECHO_N "(cached) $ECHO_C" >&6
14481else
14482 gcc_cv_as_alpha_jsrdirect_relocs=no
14483 if test $in_tree_gas = yes; then
14484 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
14485 then gcc_cv_as_alpha_jsrdirect_relocs=yes
14486fi
14487 elif test x$gcc_cv_as != x; then
14488 echo ' .set nomacro
14489 .text
14490 ldq $27, a($29) !literal!1
14491 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
14492 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14494 (eval $ac_try) 2>&5
14495 ac_status=$?
14496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14497 (exit $ac_status); }; }
14498 then
14499 gcc_cv_as_alpha_jsrdirect_relocs=yes
14500 else
14501 echo "configure: failed program was" >&5
14502 cat conftest.s >&5
14503 fi
14504 rm -f conftest.o conftest.s
14505 fi
14506fi
14507echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
14508echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
14509if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
14510
14511cat >>confdefs.h <<\_ACEOF
14512#define HAVE_AS_JSRDIRECT_RELOCS 1
14513_ACEOF
14514
86da66b5
HPN
14515fi
14516 ;;
14517
14518 cris-*-*)
14519 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14520echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
14521if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14522 echo $ECHO_N "(cached) $ECHO_C" >&6
14523else
14524 gcc_cv_as_cris_no_mul_bug=no
14525 if test $in_tree_gas = yes; then
14526 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14527 then gcc_cv_as_cris_no_mul_bug=yes
14528fi
14529 elif test x$gcc_cv_as != x; then
14530 echo '.text' > conftest.s
14531 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14533 (eval $ac_try) 2>&5
14534 ac_status=$?
14535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14536 (exit $ac_status); }; }
14537 then
14538 gcc_cv_as_cris_no_mul_bug=yes
14539 else
14540 echo "configure: failed program was" >&5
14541 cat conftest.s >&5
14542 fi
14543 rm -f conftest.o conftest.s
14544 fi
14545fi
14546echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14547echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
14548if test $gcc_cv_as_cris_no_mul_bug = yes; then
14549
14550cat >>confdefs.h <<\_ACEOF
14551#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14552_ACEOF
14553
8ada417f 14554fi
3a37b08e 14555 ;;
8ada417f 14556
1cb36a98 14557 sparc*-*-*)
ba479fd2
NN
14558 echo "$as_me:$LINENO: checking assembler for .register" >&5
14559echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
14560if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14561 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14562else
8ada417f
ZW
14563 gcc_cv_as_sparc_register_op=no
14564 if test x$gcc_cv_as != x; then
6e3f3080 14565 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
14566 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14568 (eval $ac_try) 2>&5
14569 ac_status=$?
14570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14571 (exit $ac_status); }; }
8ada417f
ZW
14572 then
14573 gcc_cv_as_sparc_register_op=yes
14574 else
14575 echo "configure: failed program was" >&5
14576 cat conftest.s >&5
14577 fi
14578 rm -f conftest.o conftest.s
14579 fi
cafe096b 14580fi
ba479fd2
NN
14581echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
14582echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 14583if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
14584
14585cat >>confdefs.h <<\_ACEOF
1cb36a98 14586#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 14587_ACEOF
1cb36a98 14588
8ada417f 14589fi
1cb36a98 14590
ba479fd2
NN
14591 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
14592echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
14593if test "${gcc_cv_as_sparc_relax+set}" = set; then
14594 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 14595else
8ada417f
ZW
14596 gcc_cv_as_sparc_relax=no
14597 if test x$gcc_cv_as != x; then
6e3f3080 14598 echo '.text' > conftest.s
ba479fd2
NN
14599 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
14600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14601 (eval $ac_try) 2>&5
14602 ac_status=$?
14603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14604 (exit $ac_status); }; }
8ada417f
ZW
14605 then
14606 gcc_cv_as_sparc_relax=yes
14607 else
14608 echo "configure: failed program was" >&5
14609 cat conftest.s >&5
14610 fi
14611 rm -f conftest.o conftest.s
14612 fi
cafe096b 14613fi
ba479fd2
NN
14614echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
14615echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 14616if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
14617
14618cat >>confdefs.h <<\_ACEOF
e95b1e6a 14619#define HAVE_AS_RELAX_OPTION 1
ba479fd2 14620_ACEOF
e95b1e6a 14621
8ada417f 14622fi
e95b1e6a 14623
ba479fd2
NN
14624 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
14625echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
14626if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
14627 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 14628else
8ada417f
ZW
14629 gcc_cv_as_sparc_ua_pcrel=no
14630 if test x$gcc_cv_as != x; then
6e3f3080 14631 echo '.text
8ada417f
ZW
14632foo:
14633 nop
14634.data
14635.align 4
14636.byte 0
14637.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
14638 if { ac_try='$gcc_cv_as -K PIC -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 if test x$gcc_cv_ld != x \
14646 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
14647 gcc_cv_as_sparc_ua_pcrel=yes
14648 fi
14649 rm -f conftest
14650 else
14651 echo "configure: failed program was" >&5
14652 cat conftest.s >&5
14653 fi
14654 rm -f conftest.o conftest.s
14655 fi
cafe096b 14656fi
ba479fd2
NN
14657echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
14658echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 14659if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
14660
14661cat >>confdefs.h <<\_ACEOF
17e9e88c 14662#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 14663_ACEOF
17e9e88c 14664
17e9e88c 14665
ba479fd2
NN
14666 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
14667echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
14668if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
14669 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 14670else
8ada417f
ZW
14671 gcc_cv_as_sparc_ua_pcrel_hidden=no
14672 if test x$gcc_cv_as != x; then
6e3f3080 14673 echo '.data
8ada417f
ZW
14674.align 4
14675.byte 0x31
14676.uaword %r_disp32(foo)
14677.byte 0x32, 0x33, 0x34
14678.global foo
14679.hidden foo
14680foo:
14681.skip 4' > conftest.s
ba479fd2
NN
14682 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14684 (eval $ac_try) 2>&5
14685 ac_status=$?
14686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14687 (exit $ac_status); }; }
8ada417f
ZW
14688 then
14689 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
14690 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
14691 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
14692 | grep ' 31000000 07323334' > /dev/null 2>&1; then
14693 if $gcc_cv_objdump -R conftest 2> /dev/null \
14694 | grep 'DISP32' > /dev/null 2>&1; then
14695 :
14696 else
14697 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 14698 fi
8ada417f
ZW
14699 fi
14700 rm -f conftest
14701 else
14702 echo "configure: failed program was" >&5
14703 cat conftest.s >&5
14704 fi
14705 rm -f conftest.o conftest.s
14706 fi
cafe096b 14707fi
ba479fd2
NN
14708echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
14709echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 14710if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
14711
14712cat >>confdefs.h <<\_ACEOF
cf7b8b0d 14713#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 14714_ACEOF
cf7b8b0d 14715
8ada417f 14716fi
ba479fd2 14717
8ada417f 14718fi # unaligned pcrel relocs
cf7b8b0d 14719
ba479fd2
NN
14720 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
14721echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
14722if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
14723 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14724else
8ada417f
ZW
14725 gcc_cv_as_sparc_offsetable_lo10=no
14726 if test x$gcc_cv_as != x; then
6e3f3080 14727 echo '.text
8ada417f
ZW
14728 or %g1, %lo(ab) + 12, %g1
14729 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
14730 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
14731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14732 (eval $ac_try) 2>&5
14733 ac_status=$?
14734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14735 (exit $ac_status); }; }
8ada417f
ZW
14736 then
14737 if test x$gcc_cv_objdump != x \
ecb0ccbc 14738 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 14739 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 14740 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
14741 fi
14742 else
14743 echo "configure: failed program was" >&5
14744 cat conftest.s >&5
14745 fi
14746 rm -f conftest.o conftest.s
14747 fi
cafe096b 14748fi
ba479fd2
NN
14749echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
14750echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 14751if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
14752
14753cat >>confdefs.h <<\_ACEOF
1cb36a98 14754#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 14755_ACEOF
1cb36a98 14756
8ada417f 14757fi
1cb36a98
RH
14758 ;;
14759
c307e6dd 14760 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
14761 case $target_os in
14762 cygwin* | pe | mingw32*)
14763 # Used for DWARF 2 in PE
14764 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
14765echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
14766if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
14767 echo $ECHO_N "(cached) $ECHO_C" >&6
14768else
14769 gcc_cv_as_ix86_pe_secrel32=no
14770 if test $in_tree_gas = yes; then
14771 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14772 then gcc_cv_as_ix86_pe_secrel32=yes
14773fi
14774 elif test x$gcc_cv_as != x; then
14775 echo '.text
14776foo: nop
14777.data
14778 .secrel32 foo' > conftest.s
14779 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14781 (eval $ac_try) 2>&5
14782 ac_status=$?
14783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14784 (exit $ac_status); }; }
14785 then
14786 if test x$gcc_cv_ld != x \
14787 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
14788 gcc_cv_as_ix86_pe_secrel32=yes
14789 fi
14790 rm -f conftest
14791 else
14792 echo "configure: failed program was" >&5
14793 cat conftest.s >&5
14794 fi
14795 rm -f conftest.o conftest.s
14796 fi
14797fi
14798echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
14799echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
14800if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
14801
14802cat >>confdefs.h <<\_ACEOF
14803#define HAVE_GAS_PE_SECREL32_RELOC 1
14804_ACEOF
14805
14806fi
14807 ;;
14808 esac
14809
ba479fd2
NN
14810 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
14811echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
14812if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
14813 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14814else
14815 gcc_cv_as_ix86_filds_fists=no
14816 if test $in_tree_gas = yes; then
14817 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
14818 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 14819fi
8ada417f 14820 elif test x$gcc_cv_as != x; then
6e3f3080 14821 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
14822 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14824 (eval $ac_try) 2>&5
14825 ac_status=$?
14826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14827 (exit $ac_status); }; }
8ada417f
ZW
14828 then
14829 gcc_cv_as_ix86_filds_fists=yes
14830 else
14831 echo "configure: failed program was" >&5
14832 cat conftest.s >&5
981d4858 14833 fi
8ada417f
ZW
14834 rm -f conftest.o conftest.s
14835 fi
14836fi
ba479fd2
NN
14837echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
14838echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 14839if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
14840
14841cat >>confdefs.h <<\_ACEOF
8ada417f 14842#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 14843_ACEOF
ad9c4d9f 14844
f6f5dff2
RO
14845fi
14846
ba479fd2
NN
14847 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
14848echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
14849if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
14850 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
14851else
14852 gcc_cv_as_ix86_cmov_sun_syntax=no
14853 if test x$gcc_cv_as != x; then
6e3f3080 14854 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
14855 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14857 (eval $ac_try) 2>&5
14858 ac_status=$?
14859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14860 (exit $ac_status); }; }
f6f5dff2
RO
14861 then
14862 gcc_cv_as_ix86_cmov_sun_syntax=yes
14863 else
14864 echo "configure: failed program was" >&5
14865 cat conftest.s >&5
14866 fi
14867 rm -f conftest.o conftest.s
14868 fi
14869fi
ba479fd2
NN
14870echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
14871echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 14872if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
14873
14874cat >>confdefs.h <<\_ACEOF
f6f5dff2 14875#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 14876_ACEOF
f6f5dff2 14877
ad9c4d9f
NN
14878fi
14879
6f3ca281
ZW
14880 # This one is used unconditionally by i386.[ch]; it is to be defined
14881 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
14882 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
14883echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
14884if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
14885 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14886else
14887 gcc_cv_as_ix86_gotoff_in_data=no
14888 if test $in_tree_gas = yes; then
14889 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14890 then gcc_cv_as_ix86_gotoff_in_data=yes
14891fi
14892 elif test x$gcc_cv_as != x; then
6e3f3080 14893 echo ' .text
f88c65f7
RH
14894.L0:
14895 nop
14896 .data
8ada417f 14897 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
14898 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14900 (eval $ac_try) 2>&5
14901 ac_status=$?
14902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14903 (exit $ac_status); }; }
8ada417f
ZW
14904 then
14905 gcc_cv_as_ix86_gotoff_in_data=yes
14906 else
14907 echo "configure: failed program was" >&5
14908 cat conftest.s >&5
f88c65f7 14909 fi
8ada417f
ZW
14910 rm -f conftest.o conftest.s
14911 fi
14912fi
ba479fd2
NN
14913echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
14914echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 14915
6f3ca281 14916
ba479fd2 14917cat >>confdefs.h <<_ACEOF
6f3ca281 14918#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 14919_ACEOF
f88c65f7 14920
1cb36a98 14921 ;;
ef1ecf87
RH
14922
14923 ia64*-*-*)
ba479fd2
NN
14924 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
14925echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
14926if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
14927 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 14928else
8ada417f
ZW
14929 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
14930 if test $in_tree_gas = yes; then
14931 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14932 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 14933fi
8ada417f 14934 elif test x$gcc_cv_as != x; then
6e3f3080 14935 echo ' .text
ef1ecf87
RH
14936 addl r15 = @ltoffx(x#), gp
14937 ;;
cfa9ee99 14938 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
14939 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14941 (eval $ac_try) 2>&5
14942 ac_status=$?
14943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14944 (exit $ac_status); }; }
8ada417f 14945 then
cfa9ee99 14946 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
14947 else
14948 echo "configure: failed program was" >&5
14949 cat conftest.s >&5
2c4a9cff 14950 fi
8ada417f
ZW
14951 rm -f conftest.o conftest.s
14952 fi
14953fi
ba479fd2
NN
14954echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
14955echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 14956if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
14957
14958cat >>confdefs.h <<\_ACEOF
cfa9ee99 14959#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 14960_ACEOF
8ada417f 14961
cfa9ee99 14962fi
8ada417f 14963
2c4a9cff 14964 ;;
8ada417f 14965
2c4a9cff 14966 powerpc*-*-*)
8ada417f 14967 case $target in
432218ba
DE
14968 *-*-aix*) conftest_s=' .machine "pwr5"
14969 .csect .text[PR]
6b37db3c 14970 mfcr 3,128';;
8af4d362
PB
14971 *-*-darwin*)
14972 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
14973echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
14974if test "${gcc_cv_as_machine_directive+set}" = set; then
14975 echo $ECHO_N "(cached) $ECHO_C" >&6
14976else
14977 gcc_cv_as_machine_directive=no
14978 if test x$gcc_cv_as != x; then
14979 echo ' .machine ppc7400' > conftest.s
14980 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14982 (eval $ac_try) 2>&5
14983 ac_status=$?
14984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14985 (exit $ac_status); }; }
14986 then
14987 gcc_cv_as_machine_directive=yes
14988 else
14989 echo "configure: failed program was" >&5
14990 cat conftest.s >&5
14991 fi
14992 rm -f conftest.o conftest.s
14993 fi
14994fi
14995echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
14996echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
14997
14998 if test x$gcc_cv_as_machine_directive != xyes; then
14999 echo "*** This target requires an assembler supporting \".machine\"" >&2
15000 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
15001 test x$build = x$target && exit 1
15002 fi
15003 conftest_s=' .text
6b37db3c 15004 mfcr r3,128';;
4c67db14 15005 *) conftest_s=' .machine power4
d2ab3e37 15006 .text
6b37db3c 15007 mfcr 3,128';;
8ada417f 15008 esac
8ada417f 15009
ba479fd2
NN
15010 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
15011echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
15012if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
15013 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 15014else
8ada417f
ZW
15015 gcc_cv_as_powerpc_mfcrf=no
15016 if test $in_tree_gas = yes; then
15017 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15018 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 15019fi
8ada417f 15020 elif test x$gcc_cv_as != x; then
6e3f3080 15021 echo "$conftest_s" > conftest.s
ba479fd2
NN
15022 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15024 (eval $ac_try) 2>&5
15025 ac_status=$?
15026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15027 (exit $ac_status); }; }
8ada417f
ZW
15028 then
15029 gcc_cv_as_powerpc_mfcrf=yes
15030 else
15031 echo "configure: failed program was" >&5
15032 cat conftest.s >&5
15033 fi
15034 rm -f conftest.o conftest.s
15035 fi
2c4a9cff 15036fi
ba479fd2
NN
15037echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
15038echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 15039if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
15040
15041cat >>confdefs.h <<\_ACEOF
2c4a9cff 15042#define HAVE_AS_MFCRF 1
ba479fd2 15043_ACEOF
ef1ecf87 15044
8ada417f 15045fi
432218ba
DE
15046
15047 case $target in
15048 *-*-aix*) conftest_s=' .machine "pwr5"
15049 .csect .text[PR]
15050 popcntb 3,3';;
15051 *) conftest_s=' .machine power5
15052 .text
15053 popcntb 3,3';;
15054 esac
15055
15056 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
15057echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
15058if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
15059 echo $ECHO_N "(cached) $ECHO_C" >&6
15060else
15061 gcc_cv_as_powerpc_popcntb=no
15062 if test $in_tree_gas = yes; then
15063 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15064 then gcc_cv_as_powerpc_popcntb=yes
15065fi
15066 elif test x$gcc_cv_as != x; then
15067 echo "$conftest_s" > conftest.s
15068 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15070 (eval $ac_try) 2>&5
15071 ac_status=$?
15072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15073 (exit $ac_status); }; }
15074 then
15075 gcc_cv_as_powerpc_popcntb=yes
15076 else
15077 echo "configure: failed program was" >&5
15078 cat conftest.s >&5
15079 fi
15080 rm -f conftest.o conftest.s
15081 fi
15082fi
15083echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
15084echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
15085if test $gcc_cv_as_powerpc_popcntb = yes; then
15086
15087cat >>confdefs.h <<\_ACEOF
15088#define HAVE_AS_POPCNTB 1
15089_ACEOF
15090
9719f3b7
DE
15091fi
15092
15093 case $target in
15094 *-*-aix*) conftest_s=' .machine "pwr5x"
15095 .csect .text[PR]
15096 frin 1,1';;
1e04bfdc 15097 *) conftest_s=' .machine power5
9719f3b7
DE
15098 .text
15099 frin 1,1';;
15100 esac
15101
15102 echo "$as_me:$LINENO: checking assembler for fp round support" >&5
15103echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
15104if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
15105 echo $ECHO_N "(cached) $ECHO_C" >&6
15106else
15107 gcc_cv_as_powerpc_fprnd=no
15108 if test $in_tree_gas = yes; then
15109 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15110 then gcc_cv_as_powerpc_fprnd=yes
15111fi
15112 elif test x$gcc_cv_as != x; then
15113 echo "$conftest_s" > conftest.s
15114 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15116 (eval $ac_try) 2>&5
15117 ac_status=$?
15118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15119 (exit $ac_status); }; }
15120 then
15121 gcc_cv_as_powerpc_fprnd=yes
15122 else
15123 echo "configure: failed program was" >&5
15124 cat conftest.s >&5
15125 fi
15126 rm -f conftest.o conftest.s
15127 fi
15128fi
15129echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
15130echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
15131if test $gcc_cv_as_powerpc_fprnd = yes; then
15132
15133cat >>confdefs.h <<\_ACEOF
15134#define HAVE_AS_FPRND 1
15135_ACEOF
15136
432218ba
DE
15137fi
15138
7f970b70
AM
15139 case $target in
15140 *-*-aix*) conftest_s=' .csect .text[PR]
15141LCF..0:
15142 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
15143 *-*-darwin*)
15144 conftest_s=' .text
15145LCF0:
15146 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
15147 *) conftest_s=' .text
15148.LCF0:
15149 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
15150 esac
15151
15152 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
15153echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
15154if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
15155 echo $ECHO_N "(cached) $ECHO_C" >&6
15156else
15157 gcc_cv_as_powerpc_rel16=no
15158 if test $in_tree_gas = yes; then
15159 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15160 then gcc_cv_as_powerpc_rel16=yes
15161fi
15162 elif test x$gcc_cv_as != x; then
15163 echo "$conftest_s" > conftest.s
15164 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15166 (eval $ac_try) 2>&5
15167 ac_status=$?
15168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15169 (exit $ac_status); }; }
15170 then
15171 gcc_cv_as_powerpc_rel16=yes
15172 else
15173 echo "configure: failed program was" >&5
15174 cat conftest.s >&5
15175 fi
15176 rm -f conftest.o conftest.s
15177 fi
15178fi
15179echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
15180echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
15181if test $gcc_cv_as_powerpc_rel16 = yes; then
15182
15183cat >>confdefs.h <<\_ACEOF
15184#define HAVE_AS_REL16 1
15185_ACEOF
15186
15187fi
8ada417f
ZW
15188 ;;
15189
15190 mips*-*-*)
ba479fd2
NN
15191 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
15192echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
15193if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
15194 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15195else
15196 gcc_cv_as_mips_explicit_relocs=no
15197 if test $in_tree_gas = yes; then
15198 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15199 then gcc_cv_as_mips_explicit_relocs=yes
15200fi
15201 elif test x$gcc_cv_as != x; then
6e3f3080 15202 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
15203 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15205 (eval $ac_try) 2>&5
15206 ac_status=$?
15207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15208 (exit $ac_status); }; }
8ada417f
ZW
15209 then
15210 gcc_cv_as_mips_explicit_relocs=yes
15211 else
15212 echo "configure: failed program was" >&5
15213 cat conftest.s >&5
ef1ecf87 15214 fi
8ada417f
ZW
15215 rm -f conftest.o conftest.s
15216 fi
15217fi
ba479fd2
NN
15218echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
15219echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
15220if test $gcc_cv_as_mips_explicit_relocs = yes; then
15221 if test x$target_cpu_default = x
15222 then target_cpu_default=MASK_EXPLICIT_RELOCS
15223 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
15224 fi
15225fi
dbad5e72
SE
15226 ;;
15227esac
8ada417f 15228
dbad5e72
SE
15229# Mips and HP-UX need the GNU assembler.
15230# Linux on IA64 might be able to use the Intel assembler.
15231
15232case "$target" in
15233 mips*-*-* | *-*-hpux* )
82563d35
RS
15234 if test x$gas_flag = xyes \
15235 || test x"$host" != x"$build" \
15236 || test ! -x "$gcc_cv_as" \
15237 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
15238 :
15239 else
15240 echo "*** This configuration requires the GNU assembler" >&2
15241 exit 1
15242 fi
ef1ecf87 15243 ;;
1cb36a98 15244esac
dbad5e72 15245
9d147085
RH
15246# ??? Not all targets support dwarf2 debug_line, even within a version
15247# of gas. Moreover, we need to emit a valid instruction to trigger any
15248# info to the output file. So, as supported targets are added to gas 2.11,
15249# add some instruction here to (also) show we expect this might work.
15250# ??? Once 2.11 is released, probably need to add first known working
15251# version to the per-target configury.
15252case "$target" in
80486e06 15253 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 15254 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
6afdc741 15255 | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-*)
9d147085
RH
15256 insn="nop"
15257 ;;
57116d8d 15258 ia64*-*-* | s390*-*-*)
9d147085
RH
15259 insn="nop 0"
15260 ;;
2853bc5a
HPN
15261 mmix-*-*)
15262 insn="swym 0"
15263 ;;
8ada417f
ZW
15264esac
15265if test x"$insn" != x; then
15266 conftest_s="\
15267 .file 1 \"conftest.s\"
15268 .loc 1 3 0
15269 $insn"
ba479fd2
NN
15270 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
15271echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
15272if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
15273 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15274else
15275 gcc_cv_as_dwarf2_debug_line=no
15276 if test $in_tree_gas = yes; then
15277 if test $in_tree_gas_is_elf = yes \
15278 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15279 then gcc_cv_as_dwarf2_debug_line=yes
15280fi
15281 elif test x$gcc_cv_as != x; then
6e3f3080 15282 echo "$conftest_s" > conftest.s
ba479fd2
NN
15283 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15285 (eval $ac_try) 2>&5
15286 ac_status=$?
15287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15288 (exit $ac_status); }; }
8ada417f 15289 then
080a5bb0
EB
15290 if test x$gcc_cv_objdump != x \
15291 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
15292 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
15293 gcc_cv_as_dwarf2_debug_line=yes
15294 fi
15295 else
15296 echo "configure: failed program was" >&5
15297 cat conftest.s >&5
15298 fi
15299 rm -f conftest.o conftest.s
15300 fi
15301fi
ba479fd2
NN
15302echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
15303echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 15304
ad9c4d9f 15305
8ada417f
ZW
15306# The .debug_line file table must be in the exact order that
15307# we specified the files, since these indices are also used
15308# by DW_AT_decl_file. Approximate this test by testing if
15309# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
15310 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
15311echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
15312if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
15313 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15314else
15315 gcc_cv_as_dwarf2_file_buggy=no
15316 if test x$gcc_cv_as != x; then
6e3f3080 15317 echo ' .file 1 "foo.s"
8ada417f 15318 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
15319 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15321 (eval $ac_try) 2>&5
15322 ac_status=$?
15323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15324 (exit $ac_status); }; }
8ada417f
ZW
15325 then
15326 gcc_cv_as_dwarf2_file_buggy=yes
15327 else
15328 echo "configure: failed program was" >&5
15329 cat conftest.s >&5
15330 fi
15331 rm -f conftest.o conftest.s
15332 fi
ad9c4d9f 15333fi
ba479fd2
NN
15334echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
15335echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
15336
15337
15338 if test $gcc_cv_as_dwarf2_debug_line = yes \
15339 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
15340
15341cat >>confdefs.h <<\_ACEOF
9d147085 15342#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 15343_ACEOF
9d147085 15344
8ada417f 15345 fi
ad9c4d9f 15346
ba479fd2
NN
15347 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
15348echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
15349if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
15350 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15351else
15352 gcc_cv_as_gdwarf2_flag=no
15353 if test $in_tree_gas = yes; then
15354 if test $in_tree_gas_is_elf = yes \
15355 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15356 then gcc_cv_as_gdwarf2_flag=yes
15357fi
15358 elif test x$gcc_cv_as != x; then
6e3f3080 15359 echo "$insn" > conftest.s
ba479fd2
NN
15360 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
15361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15362 (eval $ac_try) 2>&5
15363 ac_status=$?
15364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15365 (exit $ac_status); }; }
8ada417f
ZW
15366 then
15367 gcc_cv_as_gdwarf2_flag=yes
15368 else
15369 echo "configure: failed program was" >&5
15370 cat conftest.s >&5
15371 fi
15372 rm -f conftest.o conftest.s
15373 fi
ad9c4d9f 15374fi
ba479fd2
NN
15375echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
15376echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 15377if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
15378
15379cat >>confdefs.h <<\_ACEOF
5f0e9ea2 15380#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 15381_ACEOF
5f0e9ea2
GK
15382
15383fi
ad9c4d9f 15384
ba479fd2
NN
15385 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
15386echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
15387if test "${gcc_cv_as_gstabs_flag+set}" = set; then
15388 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15389else
15390 gcc_cv_as_gstabs_flag=no
15391 if test $in_tree_gas = yes; then
15392 if test $in_tree_gas_is_elf = yes \
15393 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15394 then gcc_cv_as_gstabs_flag=yes
15395fi
15396 elif test x$gcc_cv_as != x; then
6e3f3080 15397 echo "$insn" > conftest.s
ba479fd2
NN
15398 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
15399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15400 (eval $ac_try) 2>&5
15401 ac_status=$?
15402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15403 (exit $ac_status); }; }
8ada417f
ZW
15404 then
15405 # The native Solaris 9/Intel assembler doesn't understand --gstabs
15406 # and warns about it, but still exits successfully. So check for
15407 # this.
ba479fd2
NN
15408 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
15409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15410 (eval $ac_try) 2>&5
15411 ac_status=$?
15412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15413 (exit $ac_status); }; }
8ada417f
ZW
15414 then :
15415 else gcc_cv_as_gstabs_flag=yes
15416 fi
15417 else
15418 echo "configure: failed program was" >&5
15419 cat conftest.s >&5
15420 fi
15421 rm -f conftest.o conftest.s
15422 fi
ad9c4d9f 15423fi
ba479fd2
NN
15424echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
15425echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 15426if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
15427
15428cat >>confdefs.h <<\_ACEOF
5f0e9ea2 15429#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 15430_ACEOF
5f0e9ea2
GK
15431
15432fi
8ada417f 15433fi
5f0e9ea2 15434
ba479fd2
NN
15435echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
15436echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 15437gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 15438if test $in_tree_ld = yes ; then
5408ac6c
HPN
15439 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 \
15440 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
15441 gcc_cv_ld_ro_rw_mix=read-write
15442 fi
15443elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
15444 echo '.section myfoosect, "a"' > conftest1.s
15445 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 15446 echo '.byte 1' >> conftest2.s
90e145da 15447 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 15448 echo '.byte 0' >> conftest3.s
6cd656d0
KC
15449 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
15450 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
15451 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 15452 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 15453 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 15454 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 15455 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
15456 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
15457 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
15458 gcc_cv_ld_ro_rw_mix=read-only
15459 else
15460 gcc_cv_ld_ro_rw_mix=read-write
15461 fi
15462 fi
15463 fi
15464 rm -f conftest.* conftest[123].*
15465fi
15466if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
15467
15468cat >>confdefs.h <<\_ACEOF
96d0f4dc 15469#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 15470_ACEOF
96d0f4dc
JJ
15471
15472fi
ba479fd2
NN
15473echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
15474echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 15475
ba479fd2
NN
15476echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
15477echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 15478gcc_cv_ld_eh_frame_hdr=no
34a86c2b 15479if test $in_tree_ld = yes ; then
5408ac6c
HPN
15480 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 \
15481 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
15482 gcc_cv_ld_eh_frame_hdr=yes
15483 fi
15484elif test x$gcc_cv_ld != x; then
15485 # Check if linker supports --eh-frame-hdr option
15486 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
15487 gcc_cv_ld_eh_frame_hdr=yes
15488 fi
15489fi
232b67d9 15490
275b60d6 15491if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
15492
15493cat >>confdefs.h <<\_ACEOF
275b60d6 15494#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 15495_ACEOF
275b60d6
JJ
15496
15497fi
ba479fd2
NN
15498echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
15499echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 15500
ba479fd2
NN
15501echo "$as_me:$LINENO: checking linker position independent executable support" >&5
15502echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
15503gcc_cv_ld_pie=no
15504if test $in_tree_ld = yes ; then
5408ac6c
HPN
15505 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 \
15506 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
15507 gcc_cv_ld_pie=yes
15508 fi
15509elif test x$gcc_cv_ld != x; then
15510 # Check if linker supports -pie option
15511 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
15512 gcc_cv_ld_pie=yes
15513 fi
15514fi
15515if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
15516
15517cat >>confdefs.h <<\_ACEOF
24a4dd31 15518#define HAVE_LD_PIE 1
ba479fd2 15519_ACEOF
24a4dd31
JJ
15520
15521fi
ba479fd2
NN
15522echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
15523echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 15524
8bb915b6
NN
15525# --------
15526# UNSORTED
15527# --------
15528
765f1bf9
AM
15529echo "$as_me:$LINENO: checking linker --as-needed support" >&5
15530echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
15531if test "${gcc_cv_ld_as_needed+set}" = set; then
15532 echo $ECHO_N "(cached) $ECHO_C" >&6
15533else
15534 gcc_cv_ld_as_needed=no
765f1bf9
AM
15535if test $in_tree_ld = yes ; then
15536 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 \
15537 && test $in_tree_ld_is_elf = yes; then
15538 gcc_cv_ld_as_needed=yes
15539 fi
15540elif test x$gcc_cv_ld != x; then
15541 # Check if linker supports --as-needed and --no-as-needed options
15542 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
15543 gcc_cv_ld_as_needed=yes
15544 fi
15545fi
82e923f6
RS
15546
15547fi
15548echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
15549echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
15550if test x"$gcc_cv_ld_as_needed" = xyes; then
15551
15552cat >>confdefs.h <<\_ACEOF
15553#define HAVE_LD_AS_NEEDED 1
15554_ACEOF
15555
15556fi
765f1bf9 15557
d82bf747
AM
15558case "$target:$tm_file" in
15559 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
85b776df
AM
15560 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
15561echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
15562if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
15563 echo $ECHO_N "(cached) $ECHO_C" >&6
15564else
15565 gcc_cv_ld_no_dot_syms=no
15566 if test $in_tree_ld = yes ; then
15567 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
15568 gcc_cv_ld_no_dot_syms=yes
15569 fi
15570 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
15571 cat > conftest1.s <<EOF
15572 .text
15573 bl .foo
15574EOF
15575 cat > conftest2.s <<EOF
15576 .section ".opd","aw"
15577 .align 3
15578 .globl foo
15579 .type foo,@function
15580foo:
15581 .quad .LEfoo,.TOC.@tocbase,0
15582 .text
15583.LEfoo:
15584 blr
15585 .size foo,.-.LEfoo
15586EOF
15587 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
15588 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
15589 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
15590 gcc_cv_ld_no_dot_syms=yes
15591 fi
15592 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
15593 fi
15594
15595fi
15596echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
15597echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
15598 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
15599
15600cat >>confdefs.h <<\_ACEOF
15601#define HAVE_LD_NO_DOT_SYMS 1
15602_ACEOF
15603
15604 fi
15605 ;;
15606esac
15607
380e5ca4
MM
15608echo "$as_me:$LINENO: checking linker --sysroot support" >&5
15609echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
15610if test "${gcc_cv_ld_sysroot+set}" = set; then
15611 echo $ECHO_N "(cached) $ECHO_C" >&6
15612else
15613 gcc_cv_ld_sysroot=no
15614 if test $in_tree_ld = yes ; then
15615 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 ; then
7032df40 15616 gcc_cv_ld_sysroot=yes
380e5ca4
MM
15617 fi
15618 elif test x$gcc_cv_ld != x; then
15619 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
15620 gcc_cv_ld_sysroot=yes
15621 fi
15622 fi
15623fi
15624echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
15625echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
15626if test x"$gcc_cv_ld_sysroot" = xyes; then
15627
15628cat >>confdefs.h <<\_ACEOF
15629#define HAVE_LD_SYSROOT 1
15630_ACEOF
15631
15632fi
15633
9fb28a67 15634if test x$with_sysroot = x && test x$host = x$target \
047d636f 15635 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
15636
15637cat >>confdefs.h <<_ACEOF
793e9558 15638#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 15639_ACEOF
793e9558
PB
15640
15641fi
15642
77008252
JJ
15643# Test for stack protector support in target C library.
15644case "$target" in
15645 *-*-linux*)
15646 echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5
15647echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6
15648if test "${gcc_cv_libc_provides_ssp+set}" = set; then
15649 echo $ECHO_N "(cached) $ECHO_C" >&6
15650else
15651 gcc_cv_libc_provides_ssp=no
15652 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
15653 if test "x$with_sysroot" = x; then
15654 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
15655 elif test "x$with_sysroot" = xyes; then
15656 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
15657 else
15658 glibc_header_dir="${with_sysroot}/usr/include"
15659 fi
15660 else
15661 glibc_header_dir=/usr/include
15662 fi
15663 # glibc 2.4 and later provides __stack_chk_fail and
15664 # either __stack_chk_guard, or TLS access to stack guard canary.
15665 if test -f $glibc_header_dir/features.h \
15666 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
15667 $glibc_header_dir/features.h > /dev/null; then
15668 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
15669 $glibc_header_dir/features.h > /dev/null; then
15670 gcc_cv_libc_provides_ssp=yes
15671 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
15672 $glibc_header_dir/features.h > /dev/null \
15673 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
15674 $glibc_header_dir/features.h > /dev/null; then
15675 gcc_cv_libc_provides_ssp=yes
15676 fi
15677 fi
15678fi
15679echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
15680echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;;
15681 *) gcc_cv_libc_provides_ssp=no ;;
15682esac
15683if test x$gcc_cv_libc_provides_ssp = xyes; then
15684
15685cat >>confdefs.h <<\_ACEOF
15686#define TARGET_LIBC_PROVIDES_SSP 1
15687_ACEOF
15688
15689fi
15690
ed965309
JJ
15691# Check if TFmode long double should be used by default or not.
15692# Some glibc targets used DFmode long double, but with glibc 2.4
15693# and later they can use TFmode.
15694case "$target" in
15695 powerpc*-*-*gnu* | \
15696 sparc*-*-linux* | \
15697 s390*-*-linux* | \
15698 alpha*-*-linux*)
15699
15700# Check whether --with-long-double-128 or --without-long-double-128 was given.
15701if test "${with_long_double_128+set}" = set; then
15702 withval="$with_long_double_128"
15703 gcc_cv_target_ldbl128="$with_long_double_128"
15704else
15705 gcc_cv_target_ldbl128=no
15706 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
15707 if test "x$with_sysroot" = x; then
15708 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
15709 elif test "x$with_sysroot" = xyes; then
15710 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
15711 else
15712 glibc_header_dir="${with_sysroot}/usr/include"
15713 fi
15714 else
15715 glibc_header_dir=/usr/include
15716 fi
15717 grep '^ *#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
15718 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
15719 && gcc_cv_target_ldbl128=yes
15720fi;
15721 ;;
15722esac
15723if test x$gcc_cv_target_ldbl128 = xyes; then
15724
15725cat >>confdefs.h <<\_ACEOF
15726#define TARGET_DEFAULT_LONG_DOUBLE_128 1
15727_ACEOF
15728
15729fi
15730
81bf3d9e 15731# Find out what GC implementation we want, or may, use.
ba479fd2 15732
81bf3d9e
RH
15733# Check whether --with-gc or --without-gc was given.
15734if test "${with_gc+set}" = set; then
15735 withval="$with_gc"
15736 case "$withval" in
08cee789 15737 page)
81bf3d9e 15738 GGC=ggc-$withval
08cee789
DJ
15739 ;;
15740 zone)
15741 GGC=ggc-$withval
15742
15743cat >>confdefs.h <<\_ACEOF
15744#define GGC_ZONE 1
15745_ACEOF
15746
81bf3d9e
RH
15747 ;;
15748 *)
ba479fd2
NN
15749 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
15750echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
15751 { (exit 1); exit 1; }; }
81bf3d9e
RH
15752 ;;
15753esac
15754else
005537df 15755 GGC=ggc-page
ba479fd2 15756fi;
81bf3d9e
RH
15757
15758echo "Using $GGC for garbage collection."
15759
3c809ba4 15760# Use the system's zlib library.
b8dad04b
ZW
15761zlibdir=-L../zlib
15762zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 15763
3c809ba4
AG
15764# Check whether --with-system-zlib or --without-system-zlib was given.
15765if test "${with_system_zlib+set}" = set; then
15766 withval="$with_system_zlib"
15767 zlibdir=
15768zlibinc=
15769
ba479fd2 15770fi;
3c809ba4
AG
15771
15772
15773
dc6746e7 15774
ba479fd2
NN
15775echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
15776echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
15777 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
15778if test "${enable_maintainer_mode+set}" = set; then
15779 enableval="$enable_maintainer_mode"
15780 maintainer_mode=$enableval
15781else
15782 maintainer_mode=no
ba479fd2 15783fi;
63cf211a 15784
ba479fd2
NN
15785echo "$as_me:$LINENO: result: $maintainer_mode" >&5
15786echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
15787
15788if test "$maintainer_mode" = "yes"; then
15789 MAINT=''
15790else
15791 MAINT='#'
15792fi
15793
8bb915b6
NN
15794# --------------
15795# Language hooks
15796# --------------
15797
861bb6c1
JL
15798# Make empty files to contain the specs and options for each language.
15799# Then add #include lines to for a compiler that has specs and/or options.
15800
cc11cc9b 15801subdirs=
d7b42618 15802lang_opt_files=
861bb6c1 15803lang_specs_files=
3103b7db 15804lang_tree_files=
861bb6c1
JL
15805# These (without "all_") are set in each config-lang.in.
15806# `language' must be a single word so is spelled singularly.
15807all_languages=
15808all_boot_languages=
15809all_compilers=
15810all_stagestuff=
53c7ffe7 15811all_outputs='Makefile gccbug mklibgcc libada-mk'
861bb6c1 15812# List of language makefile fragments.
2ed26f6b
ZW
15813all_lang_makefrags=
15814# List of language subdirectory makefiles. Deprecated.
861bb6c1 15815all_lang_makefiles=
e2500fed 15816# Files for gengtype
ef69da62 15817all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
15818# Files for gengtype with language
15819all_gtfiles_files_langs=
15820all_gtfiles_files_files=
861bb6c1 15821
cc11cc9b
PB
15822# These are the languages that are set in --enable-languages,
15823# and are available in the GCC tree.
15824all_selected_languages=
15825
861bb6c1
JL
15826# Add the language fragments.
15827# Languages are added via two mechanisms. Some information must be
15828# recorded in makefile variables, these are defined in config-lang.in.
15829# We accumulate them and plug them into the main Makefile.
15830# The other mechanism is a set of hooks for each of the main targets
15831# like `clean', `install', etc.
15832
861bb6c1 15833language_hooks="Make-hooks"
861bb6c1 15834
cc11cc9b 15835for lang in ${srcdir}/*/config-lang.in
861bb6c1 15836do
cc11cc9b
PB
15837 case $lang in
15838 # The odd quoting in the next line works around
15839 # an apparent bug in bash 1.12 on linux.
15840 ${srcdir}/[*]/config-lang.in)
15841 continue ;;
15842 *)
15843 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
15844 if test "x$lang_alias" = x
15845 then
15846 echo "$lang doesn't set \$language." 1>&2
15847 exit 1
15848 fi
15849 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
15850 subdirs="$subdirs $subdir"
15851 case ",$enable_languages," in
15852 *,$lang_alias,*)
15853 all_selected_languages="$all_selected_languages $lang_alias"
15854 if test -f $srcdir/$subdir/lang-specs.h; then
15855 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
15856 fi
15857 ;;
15858 esac
15859
15860 if test -f $srcdir/$subdir/lang.opt; then
15861 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
15862 fi
15863 if test -f $srcdir/$subdir/$subdir-tree.def; then
15864 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
15865 fi
15866
15867 language=
15868 boot_language=
15869 compilers=
15870 stagestuff=
15871 outputs=
15872 gtfiles=
15873 . ${srcdir}/$subdir/config-lang.in
15874 if test "x$language" = x
15875 then
15876 echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2
15877 exit 1
15878 fi
15879 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in"
15880 if test -f ${srcdir}/$subdir/Makefile.in
15881 then all_lang_makefiles="$subdir/Makefile"
15882 fi
15883 all_languages="$all_languages $language"
15884 if test "x$boot_language" = xyes
15885 then
15886 all_boot_languages="$all_boot_languages $language"
15887 fi
15888 all_compilers="$all_compilers $compilers"
15889 all_stagestuff="$all_stagestuff $stagestuff"
15890 all_outputs="$all_outputs $outputs"
15891 all_gtfiles="$all_gtfiles $gtfiles"
15892 for f in $gtfiles
15893 do
15894 all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} "
15895 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
15896 done
15897 ;;
15898 esac
861bb6c1
JL
15899done
15900
8ac9d31f
TJ
15901# Pick up gtfiles for c
15902gtfiles=
cc11cc9b 15903subdir="c"
8ac9d31f
TJ
15904. ${srcdir}/c-config-lang.in
15905all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15906for f in $gtfiles
8ac9d31f 15907do
cc11cc9b 15908 all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} "
8ac9d31f 15909 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
15910done
15911
cbc59f01 15912check_languages=
cc11cc9b 15913for language in $all_selected_languages
cbc59f01 15914do
cc11cc9b 15915 check_languages="$check_languages check-$language"
cbc59f01
DD
15916done
15917
62b81e45 15918# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 15919# lang.${target}. Only do so for selected languages.
861bb6c1
JL
15920
15921rm -f Make-hooks
15922touch Make-hooks
bd97af06 15923target_list="all.cross start.encap rest.encap tags \
b2d7fd7b 15924 install-common install-man install-info dvi html \
a541f69d 15925 uninstall info man srcextra srcman srcinfo \
a03ad584 15926 mostlyclean clean distclean maintainer-clean \
8f231b5d 15927 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
cc11cc9b 15928
861bb6c1
JL
15929for t in $target_list
15930do
15931 x=
cc11cc9b 15932 for lang in $all_selected_languages
861bb6c1 15933 do
cc11cc9b 15934 x="$x $lang.$t"
861bb6c1
JL
15935 done
15936 echo "lang.$t: $x" >> Make-hooks
15937done
15938
8bb915b6
NN
15939# --------
15940# UNSORTED
15941# --------
15942
cc06d68c 15943# Create .gdbinit.
861bb6c1 15944
cc06d68c
GP
15945echo "dir ." > .gdbinit
15946echo "dir ${srcdir}" >> .gdbinit
15947if test x$gdb_needs_out_file_path = xyes
15948then
15949 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
15950fi
15951if test "x$subdirs" != x; then
15952 for s in $subdirs
15953 do
15954 echo "dir ${srcdir}/$s" >> .gdbinit
15955 done
861bb6c1 15956fi
cc06d68c 15957echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 15958
8f8d3278
NC
15959# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
15960# absolute path for gcc_tooldir based on inserting the number of up-directory
15961# movements required to get from $(exec_prefix) to $(prefix) into the basic
15962# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
15963# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
15964# make and thus we'd get different behavior depending on where we built the
15965# sources.
5949a9fc 15966if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 15967 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 15968else
8f8d3278
NC
15969# An explanation of the sed strings:
15970# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
15971# -e 's|/$||' match a trailing forward slash and eliminates it
15972# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 15973# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
15974#
15975# (*) Note this pattern overwrites the first character of the string
15976# with a forward slash if one is not already present. This is not a
15977# problem because the exact names of the sub-directories concerned is
15978# unimportant, just the number of them matters.
15979#
15980# The practical upshot of these patterns is like this:
15981#
15982# prefix exec_prefix result
15983# ------ ----------- ------
15984# /foo /foo/bar ../
15985# /foo/ /foo/bar ../
15986# /foo /foo/bar/ ../
15987# /foo/ /foo/bar/ ../
15988# /foo /foo/bar/ugg ../../
15989#
4c112cda 15990 dollar='$$'
caa55b1e 15991 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
15992fi
15993
15994
2ce3c6c6 15995
2bbea3a6
RH
15996# Find a directory in which to install a shared libgcc.
15997
15998# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
15999if test "${enable_version_specific_runtime_libs+set}" = set; then
16000 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
16001
16002fi;
2bbea3a6
RH
16003
16004
5b15f277
RH
16005# Check whether --with-slibdir or --without-slibdir was given.
16006if test "${with_slibdir+set}" = set; then
16007 withval="$with_slibdir"
16008 slibdir="$with_slibdir"
16009else
16010 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 16011 slibdir='$(libsubdir)'
5b15f277 16012elif test "$host" != "$target"; then
2bbea3a6
RH
16013 slibdir='$(build_tooldir)/lib'
16014else
5b15f277 16015 slibdir='$(libdir)'
2bbea3a6 16016fi
ba479fd2 16017fi;
2bbea3a6
RH
16018
16019
1e6347d8 16020objdir=`${PWDCMD-pwd}`
7e717196
JL
16021
16022
861bb6c1
JL
16023# Substitute configuration variables
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
9b16d2c4 16070
e9a25f70 16071
6e26218f 16072
c8724862 16073
e061d1ce 16074
d8bb17c8 16075
11642c3a
ZW
16076
16077
16078
16079
16080
16081
16082
3d9d2476 16083
e2500fed 16084
cc11cc9b 16085
51b9ff45 16086
861bb6c1 16087
6e3f3080
NN
16088# Echo link setup.
16089if test x${build} = x${host} ; then
16090 if test x${host} = x${target} ; then
16091 echo "Links are now set up to build a native compiler for ${target}." 1>&2
16092 else
16093 echo "Links are now set up to build a cross-compiler" 1>&2
16094 echo " from ${host} to ${target}." 1>&2
16095 fi
16096else
16097 if test x${host} = x${target} ; then
16098 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
16099 echo " for ${target}." 1>&2
16100 else
16101 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
16102 echo " from ${host} to ${target}." 1>&2
16103 fi
16104fi
16105
6de9cd9a
DN
16106
16107
16108
6e3f3080
NN
16109# Configure the subdirectories
16110# AC_CONFIG_SUBDIRS($subdirs)
16111
16112# Create the Makefile
16113# and configure language subdirectories
ba479fd2 16114 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
16115
16116
ba479fd2 16117 ac_config_commands="$ac_config_commands default"
914c5af7 16118
ba479fd2 16119cat >confcache <<\_ACEOF
6e3f3080
NN
16120# This file is a shell script that caches the results of configure
16121# tests run on this system so they can be shared between configure
ba479fd2
NN
16122# scripts and configure runs, see configure's option --config-cache.
16123# It is not useful on other systems. If it contains results you don't
16124# want to keep, you may remove or edit it.
6e3f3080 16125#
ba479fd2
NN
16126# config.status only pays attention to the cache file if you give it
16127# the --recheck option to rerun configure.
6e3f3080 16128#
ba479fd2
NN
16129# `ac_cv_env_foo' variables (set or unset) will be overridden when
16130# loading this file, other *unset* `ac_cv_foo' will be assigned the
16131# following values.
16132
16133_ACEOF
16134
6e3f3080
NN
16135# The following way of writing the cache mishandles newlines in values,
16136# but we know of no workaround that is simple, portable, and efficient.
16137# So, don't put newlines in cache variables' values.
16138# Ultrix sh set writes to stderr and can't be redirected directly,
16139# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
16140{
16141 (set) 2>&1 |
16142 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16143 *ac_space=\ *)
16144 # `set' does not quote correctly, so add quotes (double-quote
16145 # substitution turns \\\\ into \\, and sed turns \\ into \).
16146 sed -n \
86da66b5
HPN
16147 "s/'/'\\\\''/g;
16148 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ba479fd2
NN
16149 ;;
16150 *)
16151 # `set' quotes correctly as required by POSIX, so do not add quotes.
16152 sed -n \
86da66b5 16153 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
16154 ;;
16155 esac;
16156} |
16157 sed '
16158 t clear
16159 : clear
16160 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16161 t end
16162 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16163 : end' >>confcache
16164if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 16165 if test -w $cache_file; then
ba479fd2
NN
16166 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16167 cat confcache >$cache_file
6e3f3080
NN
16168 else
16169 echo "not updating unwritable cache $cache_file"
16170 fi
16171fi
16172rm -f confcache
16173
16174test "x$prefix" = xNONE && prefix=$ac_default_prefix
16175# Let make expand exec_prefix.
16176test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16177
ba479fd2
NN
16178# VPATH may cause trouble with some makes, so we remove $(srcdir),
16179# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16180# trailing colons and then remove the whole line if VPATH becomes empty
16181# (actually we leave an empty line to preserve line numbers).
6e3f3080 16182if test "x$srcdir" = x.; then
86da66b5 16183 ac_vpsub='/^[ ]*VPATH[ ]*=/{
ba479fd2
NN
16184s/:*\$(srcdir):*/:/;
16185s/:*\${srcdir}:*/:/;
16186s/:*@srcdir@:*/:/;
86da66b5 16187s/^\([^=]*=[ ]*\):*/\1/;
ba479fd2 16188s/:*$//;
86da66b5 16189s/^[^=]*=[ ]*$//;
ba479fd2 16190}'
6e3f3080
NN
16191fi
16192
63cf211a 16193DEFS=-DHAVE_CONFIG_H
6e3f3080 16194
ba479fd2
NN
16195ac_libobjs=
16196ac_ltlibobjs=
16197for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16198 # 1. Remove the extension, and $U if already installed.
16199 ac_i=`echo "$ac_i" |
86da66b5 16200 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
ba479fd2
NN
16201 # 2. Add them.
16202 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
16203 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
16204done
16205LIBOBJS=$ac_libobjs
63cf211a 16206
ba479fd2
NN
16207LTLIBOBJS=$ac_ltlibobjs
16208
16209
16210
16211: ${CONFIG_STATUS=./config.status}
16212ac_clean_files_save=$ac_clean_files
16213ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16214{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16215echo "$as_me: creating $CONFIG_STATUS" >&6;}
16216cat >$CONFIG_STATUS <<_ACEOF
16217#! $SHELL
16218# Generated by $as_me.
6e3f3080
NN
16219# Run this file to recreate the current configuration.
16220# Compiler output produced by configure, useful for debugging
ba479fd2 16221# configure, is in config.log if it exists.
6e3f3080 16222
ba479fd2
NN
16223debug=false
16224ac_cs_recheck=false
16225ac_cs_silent=false
16226SHELL=\${CONFIG_SHELL-$SHELL}
16227_ACEOF
16228
16229cat >>$CONFIG_STATUS <<\_ACEOF
16230## --------------------- ##
16231## M4sh Initialization. ##
16232## --------------------- ##
16233
16234# Be Bourne compatible
16235if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16236 emulate sh
16237 NULLCMD=:
16238 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
16239 # is contrary to our usage. Disable this feature.
16240 alias -g '${1+"$@"}'='"$@"'
16241elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16242 set -o posix
16243fi
86da66b5 16244DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
16245
16246# Support unset when possible.
86da66b5 16247if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
16248 as_unset=unset
16249else
16250 as_unset=false
16251fi
16252
16253
16254# Work around bugs in pre-3.0 UWIN ksh.
16255$as_unset ENV MAIL MAILPATH
16256PS1='$ '
16257PS2='> '
16258PS4='+ '
16259
16260# NLS nuisances.
16261for as_var in \
16262 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
16263 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
16264 LC_TELEPHONE LC_TIME
6e3f3080 16265do
86da66b5 16266 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
16267 eval $as_var=C; export $as_var
16268 else
16269 $as_unset $as_var
16270 fi
6e3f3080
NN
16271done
16272
ba479fd2
NN
16273# Required to use basename.
16274if expr a : '\(a\)' >/dev/null 2>&1; then
16275 as_expr=expr
16276else
16277 as_expr=false
16278fi
6e3f3080 16279
ba479fd2
NN
16280if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
16281 as_basename=basename
16282else
16283 as_basename=false
16284fi
6e3f3080
NN
16285
16286
ba479fd2
NN
16287# Name of the executable.
16288as_me=`$as_basename "$0" ||
16289$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16290 X"$0" : 'X\(//\)$' \| \
16291 X"$0" : 'X\(/\)$' \| \
16292 . : '\(.\)' 2>/dev/null ||
16293echo X/"$0" |
16294 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16295 /^X\/\(\/\/\)$/{ s//\1/; q; }
16296 /^X\/\(\/\).*/{ s//\1/; q; }
16297 s/.*/./; q'`
16298
6e3f3080 16299
ba479fd2
NN
16300# PATH needs CR, and LINENO needs CR and PATH.
16301# Avoid depending upon Character Ranges.
16302as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16303as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16304as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16305as_cr_digits='0123456789'
16306as_cr_alnum=$as_cr_Letters$as_cr_digits
16307
16308# The user is always right.
16309if test "${PATH_SEPARATOR+set}" != set; then
16310 echo "#! /bin/sh" >conf$$.sh
16311 echo "exit 0" >>conf$$.sh
16312 chmod +x conf$$.sh
16313 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
16314 PATH_SEPARATOR=';'
6e3f3080 16315 else
ba479fd2
NN
16316 PATH_SEPARATOR=:
16317 fi
16318 rm -f conf$$.sh
16319fi
16320
16321
16322 as_lineno_1=$LINENO
16323 as_lineno_2=$LINENO
16324 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16325 test "x$as_lineno_1" != "x$as_lineno_2" &&
16326 test "x$as_lineno_3" = "x$as_lineno_2" || {
16327 # Find who we are. Look in the path if we contain no path at all
16328 # relative or not.
16329 case $0 in
16330 *[\\/]* ) as_myself=$0 ;;
16331 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16332for as_dir in $PATH
16333do
16334 IFS=$as_save_IFS
16335 test -z "$as_dir" && as_dir=.
16336 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16337done
16338
16339 ;;
16340 esac
16341 # We did not find ourselves, most probably we were run as `sh COMMAND'
16342 # in which case we are not to be found in the path.
16343 if test "x$as_myself" = x; then
16344 as_myself=$0
16345 fi
16346 if test ! -f "$as_myself"; then
16347 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16348echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16349 { (exit 1); exit 1; }; }
6e3f3080 16350 fi
ba479fd2
NN
16351 case $CONFIG_SHELL in
16352 '')
16353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16354for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16355do
16356 IFS=$as_save_IFS
16357 test -z "$as_dir" && as_dir=.
16358 for as_base in sh bash ksh sh5; do
16359 case $as_dir in
16360 /*)
16361 if ("$as_dir/$as_base" -c '
16362 as_lineno_1=$LINENO
16363 as_lineno_2=$LINENO
16364 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16365 test "x$as_lineno_1" != "x$as_lineno_2" &&
16366 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16367 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
16368 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
16369 CONFIG_SHELL=$as_dir/$as_base
16370 export CONFIG_SHELL
16371 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16372 fi;;
16373 esac
16374 done
16375done
16376;;
16377 esac
16378
16379 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16380 # uniformly replaced by the line number. The first 'sed' inserts a
16381 # line-number line before each line; the second 'sed' does the real
16382 # work. The second script uses 'N' to pair each line-number line
16383 # with the numbered line, and appends trailing '-' during
16384 # substitution so that $LINENO is not a special case at line end.
16385 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16386 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16387 sed '=' <$as_myself |
16388 sed '
16389 N
16390 s,$,-,
16391 : loop
16392 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16393 t loop
16394 s,-$,,
16395 s,^['$as_cr_digits']*\n,,
16396 ' >$as_me.lineno &&
16397 chmod +x $as_me.lineno ||
16398 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16399echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16400 { (exit 1); exit 1; }; }
16401
16402 # Don't try to exec as it changes $[0], causing all sort of problems
16403 # (the dirname of $[0] is not the place where we might find the
16404 # original and so on. Autoconf is especially sensible to this).
16405 . ./$as_me.lineno
16406 # Exit status is that of the last command.
16407 exit
16408}
16409
16410
16411case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16412 *c*,-n*) ECHO_N= ECHO_C='
16413' ECHO_T=' ' ;;
16414 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16415 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16416esac
16417
16418if expr a : '\(a\)' >/dev/null 2>&1; then
16419 as_expr=expr
16420else
16421 as_expr=false
16422fi
16423
16424rm -f conf$$ conf$$.exe conf$$.file
16425echo >conf$$.file
16426if ln -s conf$$.file conf$$ 2>/dev/null; then
16427 # We could just check for DJGPP; but this test a) works b) is more generic
16428 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16429 if test -f conf$$.exe; then
16430 # Don't use ln at all; we don't have any links
16431 as_ln_s='cp -p'
6e3f3080 16432 else
ba479fd2 16433 as_ln_s='ln -s'
6e3f3080 16434 fi
ba479fd2
NN
16435elif ln conf$$.file conf$$ 2>/dev/null; then
16436 as_ln_s=ln
16437else
16438 as_ln_s='cp -p'
16439fi
16440rm -f conf$$ conf$$.exe conf$$.file
16441
16442if mkdir -p . 2>/dev/null; then
16443 as_mkdir_p=:
16444else
86da66b5 16445 test -d ./-p && rmdir ./-p
ba479fd2
NN
16446 as_mkdir_p=false
16447fi
16448
16449as_executable_p="test -f"
16450
16451# Sed expression to map a string onto a valid CPP name.
86da66b5 16452as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
16453
16454# Sed expression to map a string onto a valid variable name.
86da66b5 16455as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
16456
16457
16458# IFS
16459# We need space, tab and new line, in precisely that order.
16460as_nl='
16461'
16462IFS=" $as_nl"
16463
16464# CDPATH.
16465$as_unset CDPATH
16466
16467exec 6>&1
16468
16469# Open the log real soon, to keep \$[0] and so on meaningful, and to
16470# report actual input values of CONFIG_FILES etc. instead of their
16471# values after options handling. Logging --version etc. is OK.
16472exec 5>>config.log
16473{
16474 echo
16475 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16476## Running $as_me. ##
16477_ASBOX
16478} >&5
16479cat >&5 <<_CSEOF
16480
16481This file was extended by $as_me, which was
8ab705be 16482generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
16483
16484 CONFIG_FILES = $CONFIG_FILES
16485 CONFIG_HEADERS = $CONFIG_HEADERS
16486 CONFIG_LINKS = $CONFIG_LINKS
16487 CONFIG_COMMANDS = $CONFIG_COMMANDS
16488 $ $0 $@
16489
16490_CSEOF
16491echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16492echo >&5
16493_ACEOF
16494
16495# Files that config.status was made for.
16496if test -n "$ac_config_files"; then
16497 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16498fi
16499
16500if test -n "$ac_config_headers"; then
16501 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16502fi
16503
16504if test -n "$ac_config_links"; then
16505 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16506fi
16507
16508if test -n "$ac_config_commands"; then
16509 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16510fi
16511
16512cat >>$CONFIG_STATUS <<\_ACEOF
16513
16514ac_cs_usage="\
16515\`$as_me' instantiates files from templates according to the
16516current configuration.
16517
16518Usage: $0 [OPTIONS] [FILE]...
16519
16520 -h, --help print this help, then exit
16521 -V, --version print version number, then exit
16522 -q, --quiet do not print progress messages
16523 -d, --debug don't remove temporary files
16524 --recheck update $as_me by reconfiguring in the same conditions
16525 --file=FILE[:TEMPLATE]
86da66b5 16526 instantiate the configuration file FILE
ba479fd2 16527 --header=FILE[:TEMPLATE]
86da66b5 16528 instantiate the configuration header FILE
ba479fd2
NN
16529
16530Configuration files:
16531$config_files
16532
16533Configuration headers:
16534$config_headers
16535
16536Configuration commands:
16537$config_commands
16538
16539Report bugs to <bug-autoconf@gnu.org>."
16540_ACEOF
16541
16542cat >>$CONFIG_STATUS <<_ACEOF
16543ac_cs_version="\\
16544config.status
8ab705be 16545configured by $0, generated by GNU Autoconf 2.59,
ba479fd2
NN
16546 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16547
86da66b5 16548Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
16549This config.status script is free software; the Free Software Foundation
16550gives unlimited permission to copy, distribute and modify it."
16551srcdir=$srcdir
16552_ACEOF
16553
16554cat >>$CONFIG_STATUS <<\_ACEOF
16555# If no file are specified by the user, then we need to provide default
16556# value. By we need to know if files were specified by the user.
16557ac_need_defaults=:
16558while test $# != 0
16559do
16560 case $1 in
16561 --*=*)
16562 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16563 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16564 ac_shift=:
16565 ;;
16566 -*)
16567 ac_option=$1
16568 ac_optarg=$2
16569 ac_shift=shift
16570 ;;
16571 *) # This is not an option, so the user has probably given explicit
16572 # arguments.
16573 ac_option=$1
16574 ac_need_defaults=false;;
16575 esac
16576
16577 case $ac_option in
16578 # Handling of the options.
16579_ACEOF
16580cat >>$CONFIG_STATUS <<\_ACEOF
16581 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16582 ac_cs_recheck=: ;;
16583 --version | --vers* | -V )
16584 echo "$ac_cs_version"; exit 0 ;;
16585 --he | --h)
16586 # Conflict between --help and --header
16587 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16588Try \`$0 --help' for more information." >&5
16589echo "$as_me: error: ambiguous option: $1
16590Try \`$0 --help' for more information." >&2;}
16591 { (exit 1); exit 1; }; };;
16592 --help | --hel | -h )
16593 echo "$ac_cs_usage"; exit 0 ;;
16594 --debug | --d* | -d )
16595 debug=: ;;
16596 --file | --fil | --fi | --f )
16597 $ac_shift
16598 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
16599 ac_need_defaults=false;;
16600 --header | --heade | --head | --hea )
16601 $ac_shift
16602 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
16603 ac_need_defaults=false;;
16604 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16605 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16606 ac_cs_silent=: ;;
16607
16608 # This is an error.
16609 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16610Try \`$0 --help' for more information." >&5
16611echo "$as_me: error: unrecognized option: $1
16612Try \`$0 --help' for more information." >&2;}
16613 { (exit 1); exit 1; }; } ;;
16614
16615 *) ac_config_targets="$ac_config_targets $1" ;;
16616
16617 esac
16618 shift
6e3f3080 16619done
ba479fd2
NN
16620
16621ac_configure_extra_args=
16622
16623if $ac_cs_silent; then
16624 exec 6>/dev/null
16625 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
16626fi
16627
ba479fd2
NN
16628_ACEOF
16629cat >>$CONFIG_STATUS <<_ACEOF
16630if \$ac_cs_recheck; then
16631 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
16632 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16633fi
861bb6c1 16634
ba479fd2
NN
16635_ACEOF
16636
16637cat >>$CONFIG_STATUS <<_ACEOF
16638#
16639# INIT-COMMANDS section.
16640#
16641
16642subdirs='$subdirs'
ba479fd2
NN
16643
16644_ACEOF
16645
16646
16647
16648cat >>$CONFIG_STATUS <<\_ACEOF
16649for ac_config_target in $ac_config_targets
16650do
16651 case "$ac_config_target" in
16652 # Handling of arguments.
16653 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
16654 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16655 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
16656 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16657echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16658 { (exit 1); exit 1; }; };;
861bb6c1 16659 esac
ba479fd2
NN
16660done
16661
16662# If the user did not use the arguments to specify the items to instantiate,
16663# then the envvar interface is used. Set only those that are not.
16664# We use the long form for the default assignment because of an extremely
16665# bizarre bug on SunOS 4.1.3.
16666if $ac_need_defaults; then
16667 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16668 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16669 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16670fi
16671
16672# Have a temporary directory for convenience. Make it in the build tree
16673# simply because there is no reason to put it here, and in addition,
16674# creating and moving files from /tmp can sometimes cause problems.
16675# Create a temporary directory, and hook for its removal unless debugging.
16676$debug ||
16677{
16678 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16679 trap '{ (exit 1); exit 1; }' 1 2 13 15
16680}
861bb6c1 16681
ba479fd2 16682# Create a (secure) tmp directory for tmp files.
6e3f3080 16683
ba479fd2
NN
16684{
16685 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
16686 test -n "$tmp" && test -d "$tmp"
16687} ||
16688{
16689 tmp=./confstat$$-$RANDOM
16690 (umask 077 && mkdir $tmp)
16691} ||
16692{
16693 echo "$me: cannot create a temporary directory in ." >&2
16694 { (exit 1); exit 1; }
16695}
16696
16697_ACEOF
16698
16699cat >>$CONFIG_STATUS <<_ACEOF
16700
16701#
16702# CONFIG_FILES section.
16703#
16704
16705# No need to generate the scripts if there are no CONFIG_FILES.
16706# This happens for instance when ./config.status config.h
16707if test -n "\$CONFIG_FILES"; then
16708 # Protect against being on the right side of a sed subst in config.status.
16709 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16710 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16711s,@SHELL@,$SHELL,;t t
16712s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16713s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16714s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16715s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16716s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16717s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16718s,@exec_prefix@,$exec_prefix,;t t
16719s,@prefix@,$prefix,;t t
16720s,@program_transform_name@,$program_transform_name,;t t
16721s,@bindir@,$bindir,;t t
16722s,@sbindir@,$sbindir,;t t
16723s,@libexecdir@,$libexecdir,;t t
16724s,@datadir@,$datadir,;t t
16725s,@sysconfdir@,$sysconfdir,;t t
16726s,@sharedstatedir@,$sharedstatedir,;t t
16727s,@localstatedir@,$localstatedir,;t t
16728s,@libdir@,$libdir,;t t
16729s,@includedir@,$includedir,;t t
16730s,@oldincludedir@,$oldincludedir,;t t
16731s,@infodir@,$infodir,;t t
16732s,@mandir@,$mandir,;t t
16733s,@build_alias@,$build_alias,;t t
16734s,@host_alias@,$host_alias,;t t
16735s,@target_alias@,$target_alias,;t t
16736s,@DEFS@,$DEFS,;t t
16737s,@ECHO_C@,$ECHO_C,;t t
16738s,@ECHO_N@,$ECHO_N,;t t
16739s,@ECHO_T@,$ECHO_T,;t t
16740s,@LIBS@,$LIBS,;t t
16741s,@build@,$build,;t t
16742s,@build_cpu@,$build_cpu,;t t
16743s,@build_vendor@,$build_vendor,;t t
16744s,@build_os@,$build_os,;t t
16745s,@host@,$host,;t t
16746s,@host_cpu@,$host_cpu,;t t
16747s,@host_vendor@,$host_vendor,;t t
16748s,@host_os@,$host_os,;t t
16749s,@target@,$target,;t t
16750s,@target_cpu@,$target_cpu,;t t
16751s,@target_vendor@,$target_vendor,;t t
16752s,@target_os@,$target_os,;t t
8f1529e6 16753s,@target_noncanonical@,$target_noncanonical,;t t
ba479fd2
NN
16754s,@build_subdir@,$build_subdir,;t t
16755s,@host_subdir@,$host_subdir,;t t
16756s,@target_subdir@,$target_subdir,;t t
03787dfd 16757s,@GENINSRC@,$GENINSRC,;t t
ba479fd2
NN
16758s,@CC@,$CC,;t t
16759s,@CFLAGS@,$CFLAGS,;t t
16760s,@LDFLAGS@,$LDFLAGS,;t t
16761s,@CPPFLAGS@,$CPPFLAGS,;t t
16762s,@ac_ct_CC@,$ac_ct_CC,;t t
16763s,@EXEEXT@,$EXEEXT,;t t
16764s,@OBJEXT@,$OBJEXT,;t t
16765s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
16766s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
16767s,@CPP@,$CPP,;t t
bf3b7cd3 16768s,@EGREP@,$EGREP,;t t
ba479fd2 16769s,@strict1_warn@,$strict1_warn,;t t
373477bb 16770s,@cxx_compat_warn@,$cxx_compat_warn,;t t
ba479fd2
NN
16771s,@warn_cflags@,$warn_cflags,;t t
16772s,@WERROR@,$WERROR,;t t
16773s,@nocommon_flag@,$nocommon_flag,;t t
13f05fd0 16774s,@TREEBROWSER@,$TREEBROWSER,;t t
ba479fd2
NN
16775s,@valgrind_path@,$valgrind_path,;t t
16776s,@valgrind_path_defines@,$valgrind_path_defines,;t t
16777s,@valgrind_command@,$valgrind_command,;t t
16778s,@coverage_flags@,$coverage_flags,;t t
16779s,@enable_multilib@,$enable_multilib,;t t
486aa804 16780s,@enable_decimal_float@,$enable_decimal_float,;t t
ba479fd2
NN
16781s,@enable_shared@,$enable_shared,;t t
16782s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
16783s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
16784s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
16785s,@onestep@,$onestep,;t t
16786s,@SET_MAKE@,$SET_MAKE,;t t
16787s,@AWK@,$AWK,;t t
ba479fd2 16788s,@LN_S@,$LN_S,;t t
41e622a8 16789s,@LN@,$LN,;t t
ba479fd2
NN
16790s,@RANLIB@,$RANLIB,;t t
16791s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
343a6100 16792s,@ranlib_flags@,$ranlib_flags,;t t
ba479fd2
NN
16793s,@INSTALL@,$INSTALL,;t t
16794s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16795s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16796s,@make_compare_target@,$make_compare_target,;t t
16797s,@have_mktemp_command@,$have_mktemp_command,;t t
16798s,@MAKEINFO@,$MAKEINFO,;t t
16799s,@BUILD_INFO@,$BUILD_INFO,;t t
16800s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
16801s,@FLEX@,$FLEX,;t t
16802s,@BISON@,$BISON,;t t
f6a874ac
JW
16803s,@NM@,$NM,;t t
16804s,@AR@,$AR,;t t
ba479fd2
NN
16805s,@stage1_cflags@,$stage1_cflags,;t t
16806s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
16807s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
16808s,@LDEXP_LIB@,$LDEXP_LIB,;t t
16809s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
16810s,@LIBICONV@,$LIBICONV,;t t
dfb77e37 16811s,@LTLIBICONV@,$LTLIBICONV,;t t
ba479fd2
NN
16812s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
16813s,@manext@,$manext,;t t
16814s,@objext@,$objext,;t t
8bb915b6 16815s,@gthread_flags@,$gthread_flags,;t t
ba479fd2 16816s,@extra_modes_file@,$extra_modes_file,;t t
75685792 16817s,@extra_opt_files@,$extra_opt_files,;t t
ba479fd2
NN
16818s,@USE_NLS@,$USE_NLS,;t t
16819s,@LIBINTL@,$LIBINTL,;t t
16820s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
16821s,@INCINTL@,$INCINTL,;t t
16822s,@XGETTEXT@,$XGETTEXT,;t t
16823s,@GMSGFMT@,$GMSGFMT,;t t
16824s,@POSUB@,$POSUB,;t t
16825s,@CATALOGS@,$CATALOGS,;t t
5c3c3683
DJ
16826s,@DATADIRNAME@,$DATADIRNAME,;t t
16827s,@INSTOBJEXT@,$INSTOBJEXT,;t t
16828s,@GENCAT@,$GENCAT,;t t
16829s,@CATOBJEXT@,$CATOBJEXT,;t t
5395b47b 16830s,@host_cc_for_libada@,$host_cc_for_libada,;t t
ba479fd2
NN
16831s,@CROSS@,$CROSS,;t t
16832s,@ALL@,$ALL,;t t
16833s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
16834s,@inhibit_libc@,$inhibit_libc,;t t
ba479fd2
NN
16835s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
16836s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16837s,@STMP_FIXINC@,$STMP_FIXINC,;t t
16838s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
c38f02df 16839s,@collect2@,$collect2,;t t
9f18db39
PB
16840s,@gcc_cv_as@,$gcc_cv_as,;t t
16841s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
16842s,@gcc_cv_ld@,$gcc_cv_ld,;t t
16843s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
16844s,@gcc_cv_nm@,$gcc_cv_nm,;t t
16845s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
d739199a 16846s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
ba479fd2 16847s,@libgcc_visibility@,$libgcc_visibility,;t t
ba479fd2
NN
16848s,@GGC@,$GGC,;t t
16849s,@zlibdir@,$zlibdir,;t t
16850s,@zlibinc@,$zlibinc,;t t
16851s,@MAINT@,$MAINT,;t t
16852s,@gcc_tooldir@,$gcc_tooldir,;t t
16853s,@dollar@,$dollar,;t t
16854s,@slibdir@,$slibdir,;t t
16855s,@objdir@,$objdir,;t t
16856s,@subdirs@,$subdirs,;t t
16857s,@srcdir@,$srcdir,;t t
ba479fd2
NN
16858s,@all_boot_languages@,$all_boot_languages,;t t
16859s,@all_compilers@,$all_compilers,;t t
16860s,@all_gtfiles@,$all_gtfiles,;t t
16861s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
16862s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
16863s,@all_lang_makefrags@,$all_lang_makefrags,;t t
16864s,@all_lang_makefiles@,$all_lang_makefiles,;t t
16865s,@all_languages@,$all_languages,;t t
cc11cc9b 16866s,@all_selected_languages@,$all_selected_languages,;t t
ba479fd2
NN
16867s,@all_stagestuff@,$all_stagestuff,;t t
16868s,@build_exeext@,$build_exeext,;t t
16869s,@build_install_headers_dir@,$build_install_headers_dir,;t t
16870s,@build_xm_file_list@,$build_xm_file_list,;t t
16871s,@build_xm_include_list@,$build_xm_include_list,;t t
16872s,@build_xm_defines@,$build_xm_defines,;t t
16873s,@check_languages@,$check_languages,;t t
16874s,@cc_set_by_configure@,$cc_set_by_configure,;t t
16875s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
16876s,@cpp_install_dir@,$cpp_install_dir,;t t
16877s,@xmake_file@,$xmake_file,;t t
16878s,@tmake_file@,$tmake_file,;t t
30500d84 16879s,@extra_gcc_objs@,$extra_gcc_objs,;t t
ba479fd2
NN
16880s,@extra_headers_list@,$extra_headers_list,;t t
16881s,@extra_objs@,$extra_objs,;t t
16882s,@extra_parts@,$extra_parts,;t t
16883s,@extra_passes@,$extra_passes,;t t
16884s,@extra_programs@,$extra_programs,;t t
16885s,@float_h_file@,$float_h_file,;t t
16886s,@gcc_config_arguments@,$gcc_config_arguments,;t t
16887s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
16888s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
ba479fd2 16889s,@host_exeext@,$host_exeext,;t t
ba479fd2
NN
16890s,@host_xm_file_list@,$host_xm_file_list,;t t
16891s,@host_xm_include_list@,$host_xm_include_list,;t t
16892s,@host_xm_defines@,$host_xm_defines,;t t
16893s,@out_host_hook_obj@,$out_host_hook_obj,;t t
16894s,@install@,$install,;t t
16895s,@lang_opt_files@,$lang_opt_files,;t t
16896s,@lang_specs_files@,$lang_specs_files,;t t
16897s,@lang_tree_files@,$lang_tree_files,;t t
16898s,@local_prefix@,$local_prefix,;t t
16899s,@md_file@,$md_file,;t t
16900s,@objc_boehm_gc@,$objc_boehm_gc,;t t
16901s,@out_file@,$out_file,;t t
16902s,@out_object_file@,$out_object_file,;t t
16903s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
16904s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
ba479fd2
NN
16905s,@thread_file@,$thread_file,;t t
16906s,@tm_file_list@,$tm_file_list,;t t
16907s,@tm_include_list@,$tm_include_list,;t t
16908s,@tm_defines@,$tm_defines,;t t
16909s,@tm_p_file_list@,$tm_p_file_list,;t t
16910s,@tm_p_include_list@,$tm_p_include_list,;t t
16911s,@xm_file_list@,$xm_file_list,;t t
16912s,@xm_include_list@,$xm_include_list,;t t
16913s,@xm_defines@,$xm_defines,;t t
ba479fd2
NN
16914s,@c_target_objs@,$c_target_objs,;t t
16915s,@cxx_target_objs@,$cxx_target_objs,;t t
16916s,@target_cpu_default@,$target_cpu_default,;t t
6de9cd9a
DN
16917s,@GMPLIBS@,$GMPLIBS,;t t
16918s,@GMPINC@,$GMPINC,;t t
ba479fd2
NN
16919s,@LIBOBJS@,$LIBOBJS,;t t
16920s,@LTLIBOBJS@,$LTLIBOBJS,;t t
16921/@language_hooks@/r $language_hooks
16922s,@language_hooks@,,;t t
16923CEOF
16924
16925_ACEOF
16926
16927 cat >>$CONFIG_STATUS <<\_ACEOF
16928 # Split the substitutions into bite-sized pieces for seds with
16929 # small command number limits, like on Digital OSF/1 and HP-UX.
16930 ac_max_sed_lines=48
16931 ac_sed_frag=1 # Number of current file.
16932 ac_beg=1 # First line for current file.
16933 ac_end=$ac_max_sed_lines # Line after last line for current file.
16934 ac_more_lines=:
16935 ac_sed_cmds=
16936 while $ac_more_lines; do
16937 if test $ac_beg -gt 1; then
16938 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16939 else
16940 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16941 fi
16942 if test ! -s $tmp/subs.frag; then
16943 ac_more_lines=false
16944 else
16945 # The purpose of the label and of the branching condition is to
16946 # speed up the sed processing (if there are no `@' at all, there
16947 # is no need to browse any of the substitutions).
16948 # These are the two extra sed commands mentioned above.
16949 (echo ':t
16950 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16951 if test -z "$ac_sed_cmds"; then
86da66b5 16952 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2 16953 else
86da66b5 16954 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2
NN
16955 fi
16956 ac_sed_frag=`expr $ac_sed_frag + 1`
16957 ac_beg=$ac_end
16958 ac_end=`expr $ac_end + $ac_max_sed_lines`
16959 fi
16960 done
16961 if test -z "$ac_sed_cmds"; then
16962 ac_sed_cmds=cat
63cf211a 16963 fi
ba479fd2 16964fi # test -n "$CONFIG_FILES"
cafe096b 16965
ba479fd2
NN
16966_ACEOF
16967cat >>$CONFIG_STATUS <<\_ACEOF
16968for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16969 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16970 case $ac_file in
16971 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
16972 cat >$tmp/stdin
16973 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16974 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16975 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 16976 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16977 * ) ac_file_in=$ac_file.in ;;
63cf211a 16978 esac
cafe096b 16979
ba479fd2
NN
16980 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16981 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16982$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16983 X"$ac_file" : 'X\(//\)[^/]' \| \
16984 X"$ac_file" : 'X\(//\)$' \| \
16985 X"$ac_file" : 'X\(/\)' \| \
16986 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16987echo X"$ac_file" |
16988 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16989 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16990 /^X\(\/\/\)$/{ s//\1/; q; }
16991 /^X\(\/\).*/{ s//\1/; q; }
16992 s/.*/./; q'`
16993 { if $as_mkdir_p; then
16994 mkdir -p "$ac_dir"
16995 else
16996 as_dir="$ac_dir"
16997 as_dirs=
16998 while test ! -d "$as_dir"; do
16999 as_dirs="$as_dir $as_dirs"
17000 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17001$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17002 X"$as_dir" : 'X\(//\)[^/]' \| \
17003 X"$as_dir" : 'X\(//\)$' \| \
17004 X"$as_dir" : 'X\(/\)' \| \
17005 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17006echo X"$as_dir" |
17007 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17008 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17009 /^X\(\/\/\)$/{ s//\1/; q; }
17010 /^X\(\/\).*/{ s//\1/; q; }
17011 s/.*/./; q'`
17012 done
17013 test ! -n "$as_dirs" || mkdir $as_dirs
17014 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17015echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17016 { (exit 1); exit 1; }; }; }
6e3f3080 17017
ba479fd2
NN
17018 ac_builddir=.
17019
17020if test "$ac_dir" != .; then
17021 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17022 # A "../" for each directory in $ac_dir_suffix.
17023 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17024else
17025 ac_dir_suffix= ac_top_builddir=
17026fi
17027
17028case $srcdir in
17029 .) # No --srcdir option. We are building in place.
17030 ac_srcdir=.
17031 if test -z "$ac_top_builddir"; then
17032 ac_top_srcdir=.
17033 else
17034 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17035 fi ;;
17036 [\\/]* | ?:[\\/]* ) # Absolute path.
17037 ac_srcdir=$srcdir$ac_dir_suffix;
17038 ac_top_srcdir=$srcdir ;;
17039 *) # Relative path.
17040 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17041 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17042esac
8ab705be
KC
17043
17044# Do not use `cd foo && pwd` to compute absolute paths, because
17045# the directories may not exist.
17046case `pwd` in
17047.) ac_abs_builddir="$ac_dir";;
86da66b5 17048*)
8ab705be
KC
17049 case "$ac_dir" in
17050 .) ac_abs_builddir=`pwd`;;
17051 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17052 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
17053 esac;;
17054esac
8ab705be 17055case $ac_abs_builddir in
86da66b5
HPN
17056.) ac_abs_top_builddir=${ac_top_builddir}.;;
17057*)
17058 case ${ac_top_builddir}. in
8ab705be 17059 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 17060 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 17061 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
17062 esac;;
17063esac
8ab705be 17064case $ac_abs_builddir in
86da66b5
HPN
17065.) ac_abs_srcdir=$ac_srcdir;;
17066*)
17067 case $ac_srcdir in
8ab705be 17068 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 17069 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 17070 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
17071 esac;;
17072esac
8ab705be 17073case $ac_abs_builddir in
86da66b5
HPN
17074.) ac_abs_top_srcdir=$ac_top_srcdir;;
17075*)
17076 case $ac_top_srcdir in
8ab705be 17077 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 17078 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 17079 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
17080 esac;;
17081esac
ba479fd2
NN
17082
17083
17084
1cf0118d
RO
17085 if test x"$ac_file" != x-; then
17086 { echo "$as_me:$LINENO: creating $ac_file" >&5
17087echo "$as_me: creating $ac_file" >&6;}
17088 rm -f "$ac_file"
17089 fi
ba479fd2
NN
17090 # Let's still pretend it is `configure' which instantiates (i.e., don't
17091 # use $as_me), people would be surprised to read:
17092 # /* config.h. Generated by config.status. */
17093 if test x"$ac_file" = x-; then
17094 configure_input=
17095 else
17096 configure_input="$ac_file. "
17097 fi
17098 configure_input=$configure_input"Generated from `echo $ac_file_in |
86da66b5 17099 sed 's,.*/,,'` by configure."
ba479fd2
NN
17100
17101 # First look for the input files in the build tree, otherwise in the
17102 # src tree.
17103 ac_file_inputs=`IFS=:
17104 for f in $ac_file_in; do
17105 case $f in
17106 -) echo $tmp/stdin ;;
17107 [\\/$]*)
86da66b5
HPN
17108 # Absolute (can't be DOS-style, as IFS=:)
17109 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17110echo "$as_me: error: cannot find input file: $f" >&2;}
17111 { (exit 1); exit 1; }; }
86da66b5 17112 echo "$f";;
ba479fd2 17113 *) # Relative
86da66b5
HPN
17114 if test -f "$f"; then
17115 # Build tree
17116 echo "$f"
17117 elif test -f "$srcdir/$f"; then
17118 # Source tree
17119 echo "$srcdir/$f"
17120 else
17121 # /dev/null tree
17122 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17123echo "$as_me: error: cannot find input file: $f" >&2;}
17124 { (exit 1); exit 1; }; }
86da66b5 17125 fi;;
ba479fd2
NN
17126 esac
17127 done` || { (exit 1); exit 1; }
17128_ACEOF
17129cat >>$CONFIG_STATUS <<_ACEOF
17130 sed "$ac_vpsub
17131$extrasub
17132_ACEOF
17133cat >>$CONFIG_STATUS <<\_ACEOF
17134:t
17135/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17136s,@configure_input@,$configure_input,;t t
17137s,@srcdir@,$ac_srcdir,;t t
17138s,@abs_srcdir@,$ac_abs_srcdir,;t t
17139s,@top_srcdir@,$ac_top_srcdir,;t t
17140s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17141s,@builddir@,$ac_builddir,;t t
17142s,@abs_builddir@,$ac_abs_builddir,;t t
17143s,@top_builddir@,$ac_top_builddir,;t t
17144s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17145" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17146 rm -f $tmp/stdin
17147 if test x"$ac_file" != x-; then
17148 mv $tmp/out $ac_file
17149 else
17150 cat $tmp/out
17151 rm -f $tmp/out
17152 fi
17153
17154done
17155_ACEOF
17156cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 17157
ba479fd2
NN
17158#
17159# CONFIG_HEADER section.
17160#
861bb6c1
JL
17161
17162# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17163# NAME is the cpp macro being defined and VALUE is the value it is being given.
17164#
17165# ac_d sets the value in "#define NAME VALUE" lines.
86da66b5
HPN
17166ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17167ac_dB='[ ].*$,\1#\2'
ba479fd2
NN
17168ac_dC=' '
17169ac_dD=',;t'
17170# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
86da66b5 17171ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ba479fd2 17172ac_uB='$,\1#\2define\3'
861bb6c1 17173ac_uC=' '
ba479fd2
NN
17174ac_uD=',;t'
17175
17176for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 17177 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
17178 case $ac_file in
17179 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
17180 cat >$tmp/stdin
17181 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17182 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 17183 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 17184 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 17185 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
17186 esac
17187
ba479fd2
NN
17188 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17189echo "$as_me: creating $ac_file" >&6;}
17190
17191 # First look for the input files in the build tree, otherwise in the
17192 # src tree.
17193 ac_file_inputs=`IFS=:
17194 for f in $ac_file_in; do
17195 case $f in
17196 -) echo $tmp/stdin ;;
17197 [\\/$]*)
86da66b5
HPN
17198 # Absolute (can't be DOS-style, as IFS=:)
17199 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17200echo "$as_me: error: cannot find input file: $f" >&2;}
17201 { (exit 1); exit 1; }; }
86da66b5
HPN
17202 # Do quote $f, to prevent DOS paths from being IFS'd.
17203 echo "$f";;
ba479fd2 17204 *) # Relative
86da66b5
HPN
17205 if test -f "$f"; then
17206 # Build tree
17207 echo "$f"
17208 elif test -f "$srcdir/$f"; then
17209 # Source tree
17210 echo "$srcdir/$f"
17211 else
17212 # /dev/null tree
17213 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17214echo "$as_me: error: cannot find input file: $f" >&2;}
17215 { (exit 1); exit 1; }; }
86da66b5 17216 fi;;
ba479fd2
NN
17217 esac
17218 done` || { (exit 1); exit 1; }
17219 # Remove the trailing spaces.
86da66b5 17220 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
ba479fd2
NN
17221
17222_ACEOF
17223
17224# Transform confdefs.h into two sed scripts, `conftest.defines' and
17225# `conftest.undefs', that substitutes the proper values into
17226# config.h.in to produce config.h. The first handles `#define'
17227# templates, and the second `#undef' templates.
17228# And first: Protect against being on the right side of a sed subst in
17229# config.status. Protect against being in an unquoted here document
17230# in config.status.
17231rm -f conftest.defines conftest.undefs
17232# Using a here document instead of a string reduces the quoting nightmare.
17233# Putting comments in sed scripts is not portable.
17234#
17235# `end' is used to avoid that the second main sed command (meant for
17236# 0-ary CPP macros) applies to n-ary macro definitions.
17237# See the Autoconf documentation for `clear'.
17238cat >confdef2sed.sed <<\_ACEOF
17239s/[\\&,]/\\&/g
17240s,[\\$`],\\&,g
17241t clear
17242: clear
86da66b5 17243s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
ba479fd2 17244t end
86da66b5 17245s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
ba479fd2
NN
17246: end
17247_ACEOF
17248# If some macros were called several times there might be several times
17249# the same #defines, which is useless. Nevertheless, we may not want to
17250# sort them, since we want the *last* AC-DEFINE to be honored.
17251uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17252sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17253rm -f confdef2sed.sed
861bb6c1
JL
17254
17255# This sed command replaces #undef with comments. This is necessary, for
17256# example, in the case of _POSIX_SOURCE, which is predefined and required
17257# on some systems where configure will not decide to define it.
ba479fd2 17258cat >>conftest.undefs <<\_ACEOF
86da66b5 17259s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
ba479fd2
NN
17260_ACEOF
17261
17262# Break up conftest.defines because some shells have a limit on the size
17263# of here documents, and old seds have small limits too (100 cmds).
17264echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
86da66b5 17265echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
ba479fd2
NN
17266echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17267echo ' :' >>$CONFIG_STATUS
17268rm -f conftest.tail
17269while grep . conftest.defines >/dev/null
17270do
17271 # Write a limited-size here document to $tmp/defines.sed.
17272 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17273 # Speed up: don't consider the non `#define' lines.
86da66b5 17274 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
ba479fd2
NN
17275 # Work around the forget-to-reset-the-flag bug.
17276 echo 't clr' >>$CONFIG_STATUS
17277 echo ': clr' >>$CONFIG_STATUS
17278 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
17279 echo 'CEOF
17280 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17281 rm -f $tmp/in
17282 mv $tmp/out $tmp/in
17283' >>$CONFIG_STATUS
17284 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17285 rm -f conftest.defines
17286 mv conftest.tail conftest.defines
17287done
17288rm -f conftest.defines
17289echo ' fi # grep' >>$CONFIG_STATUS
17290echo >>$CONFIG_STATUS
861bb6c1 17291
ba479fd2
NN
17292# Break up conftest.undefs because some shells have a limit on the size
17293# of here documents, and old seds have small limits too (100 cmds).
17294echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 17295rm -f conftest.tail
ba479fd2 17296while grep . conftest.undefs >/dev/null
861bb6c1 17297do
ba479fd2
NN
17298 # Write a limited-size here document to $tmp/undefs.sed.
17299 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17300 # Speed up: don't consider the non `#undef'
86da66b5 17301 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
ba479fd2
NN
17302 # Work around the forget-to-reset-the-flag bug.
17303 echo 't clr' >>$CONFIG_STATUS
17304 echo ': clr' >>$CONFIG_STATUS
17305 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 17306 echo 'CEOF
ba479fd2
NN
17307 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17308 rm -f $tmp/in
17309 mv $tmp/out $tmp/in
17310' >>$CONFIG_STATUS
17311 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17312 rm -f conftest.undefs
17313 mv conftest.tail conftest.undefs
861bb6c1 17314done
ba479fd2
NN
17315rm -f conftest.undefs
17316
17317cat >>$CONFIG_STATUS <<\_ACEOF
17318 # Let's still pretend it is `configure' which instantiates (i.e., don't
17319 # use $as_me), people would be surprised to read:
17320 # /* config.h. Generated by config.status. */
17321 if test x"$ac_file" = x-; then
17322 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 17323 else
ba479fd2 17324 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 17325 fi
ba479fd2
NN
17326 cat $tmp/in >>$tmp/config.h
17327 rm -f $tmp/in
17328 if test x"$ac_file" != x-; then
17329 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
17330 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17331echo "$as_me: $ac_file is unchanged" >&6;}
17332 else
17333 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17334$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17335 X"$ac_file" : 'X\(//\)[^/]' \| \
17336 X"$ac_file" : 'X\(//\)$' \| \
17337 X"$ac_file" : 'X\(/\)' \| \
17338 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17339echo X"$ac_file" |
17340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17341 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17342 /^X\(\/\/\)$/{ s//\1/; q; }
17343 /^X\(\/\).*/{ s//\1/; q; }
17344 s/.*/./; q'`
17345 { if $as_mkdir_p; then
17346 mkdir -p "$ac_dir"
17347 else
17348 as_dir="$ac_dir"
17349 as_dirs=
17350 while test ! -d "$as_dir"; do
17351 as_dirs="$as_dir $as_dirs"
17352 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17353$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17354 X"$as_dir" : 'X\(//\)[^/]' \| \
17355 X"$as_dir" : 'X\(//\)$' \| \
17356 X"$as_dir" : 'X\(/\)' \| \
17357 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17358echo X"$as_dir" |
17359 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17360 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17361 /^X\(\/\/\)$/{ s//\1/; q; }
17362 /^X\(\/\).*/{ s//\1/; q; }
17363 s/.*/./; q'`
17364 done
17365 test ! -n "$as_dirs" || mkdir $as_dirs
17366 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17367echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17368 { (exit 1); exit 1; }; }; }
63cf211a 17369
ba479fd2
NN
17370 rm -f $ac_file
17371 mv $tmp/config.h $ac_file
17372 fi
17373 else
17374 cat $tmp/config.h
17375 rm -f $tmp/config.h
17376 fi
17377done
17378_ACEOF
17379cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 17380
ba479fd2
NN
17381#
17382# CONFIG_COMMANDS section.
17383#
17384for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17385 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17386 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17387 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
17388$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17389 X"$ac_dest" : 'X\(//\)[^/]' \| \
17390 X"$ac_dest" : 'X\(//\)$' \| \
17391 X"$ac_dest" : 'X\(/\)' \| \
17392 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17393echo X"$ac_dest" |
17394 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17395 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17396 /^X\(\/\/\)$/{ s//\1/; q; }
17397 /^X\(\/\).*/{ s//\1/; q; }
17398 s/.*/./; q'`
86da66b5
HPN
17399 { if $as_mkdir_p; then
17400 mkdir -p "$ac_dir"
17401 else
17402 as_dir="$ac_dir"
17403 as_dirs=
17404 while test ! -d "$as_dir"; do
17405 as_dirs="$as_dir $as_dirs"
17406 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17407$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17408 X"$as_dir" : 'X\(//\)[^/]' \| \
17409 X"$as_dir" : 'X\(//\)$' \| \
17410 X"$as_dir" : 'X\(/\)' \| \
17411 . : '\(.\)' 2>/dev/null ||
17412echo X"$as_dir" |
17413 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17414 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17415 /^X\(\/\/\)$/{ s//\1/; q; }
17416 /^X\(\/\).*/{ s//\1/; q; }
17417 s/.*/./; q'`
17418 done
17419 test ! -n "$as_dirs" || mkdir $as_dirs
17420 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17421echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17422 { (exit 1); exit 1; }; }; }
17423
ba479fd2
NN
17424 ac_builddir=.
17425
17426if test "$ac_dir" != .; then
17427 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17428 # A "../" for each directory in $ac_dir_suffix.
17429 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17430else
17431 ac_dir_suffix= ac_top_builddir=
17432fi
17433
17434case $srcdir in
17435 .) # No --srcdir option. We are building in place.
17436 ac_srcdir=.
17437 if test -z "$ac_top_builddir"; then
17438 ac_top_srcdir=.
17439 else
17440 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17441 fi ;;
17442 [\\/]* | ?:[\\/]* ) # Absolute path.
17443 ac_srcdir=$srcdir$ac_dir_suffix;
17444 ac_top_srcdir=$srcdir ;;
17445 *) # Relative path.
17446 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17447 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17448esac
8ab705be
KC
17449
17450# Do not use `cd foo && pwd` to compute absolute paths, because
17451# the directories may not exist.
17452case `pwd` in
17453.) ac_abs_builddir="$ac_dir";;
86da66b5 17454*)
8ab705be
KC
17455 case "$ac_dir" in
17456 .) ac_abs_builddir=`pwd`;;
17457 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17458 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
17459 esac;;
17460esac
8ab705be 17461case $ac_abs_builddir in
86da66b5
HPN
17462.) ac_abs_top_builddir=${ac_top_builddir}.;;
17463*)
17464 case ${ac_top_builddir}. in
8ab705be 17465 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 17466 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 17467 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
17468 esac;;
17469esac
8ab705be 17470case $ac_abs_builddir in
86da66b5
HPN
17471.) ac_abs_srcdir=$ac_srcdir;;
17472*)
17473 case $ac_srcdir in
8ab705be 17474 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 17475 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 17476 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
17477 esac;;
17478esac
8ab705be 17479case $ac_abs_builddir in
86da66b5
HPN
17480.) ac_abs_top_srcdir=$ac_top_srcdir;;
17481*)
17482 case $ac_top_srcdir in
8ab705be 17483 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 17484 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 17485 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
17486 esac;;
17487esac
ba479fd2
NN
17488
17489
17490 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
17491echo "$as_me: executing $ac_dest commands" >&6;}
17492 case $ac_dest in
17493 default )
f1faaabd
NN
17494case ${CONFIG_HEADERS} in
17495 *auto-host.h:config.in*)
17496 echo > cstamp-h ;;
861bb6c1 17497esac
2ed26f6b 17498# Make sure all the subdirs exist.
3b620440 17499for d in $subdirs doc build
2ed26f6b 17500do
2ed26f6b 17501 test -d $d || mkdir $d
2ed26f6b 17502done
93cf819d
BK
17503# If the host supports symlinks, point stage[1234] at ../stage[1234] so
17504# bootstrapping and the installation procedure can still use
17505# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
17506# FLAGS_TO_PASS has been modified to solve the problem there.
17507# This is virtually a duplicate of what happens in configure.lang; we do
17508# an extra check to make sure this only happens if ln -s can be used.
35f06ae4
PB
17509case "$LN_S" in
17510 *-s*)
17511 for d in ${subdirs} ; do
1e6347d8 17512 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 17513 cd $d
6a1b7268 17514 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
17515 do
17516 rm -f $t
35f06ae4 17517 $LN_S ../$t $t 2>/dev/null
4e8a434e
BK
17518 done
17519 cd $STARTDIR
35f06ae4
PB
17520 done
17521 ;;
17522esac
ba479fd2
NN
17523 ;;
17524 esac
17525done
17526_ACEOF
cafe096b 17527
ba479fd2
NN
17528cat >>$CONFIG_STATUS <<\_ACEOF
17529
17530{ (exit 0); exit 0; }
17531_ACEOF
861bb6c1 17532chmod +x $CONFIG_STATUS
ba479fd2
NN
17533ac_clean_files=$ac_clean_files_save
17534
17535
17536# configure is writing to config.log, and then calls config.status.
17537# config.status does its own redirection, appending to config.log.
17538# Unfortunately, on DOS this fails, as config.log is still kept open
17539# by configure, so config.status won't be able to write to it; its
17540# output is simply discarded. So we exec the FD to /dev/null,
17541# effectively closing config.log, so it can be properly (re)opened and
17542# appended to by config.status. When coming back to configure, we
17543# need to make the FD available again.
17544if test "$no_create" != yes; then
17545 ac_cs_success=:
17546 ac_config_status_args=
17547 test "$silent" = yes &&
17548 ac_config_status_args="$ac_config_status_args --quiet"
17549 exec 5>/dev/null
17550 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17551 exec 5>>config.log
17552 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17553 # would make configure fail if this is the last instruction.
17554 $ac_cs_success || { (exit 1); exit 1; }
17555fi
861bb6c1 17556