]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
install.texi: Add link to GFortran binaries wiki page.
[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
9f18db39 312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
ba479fd2 313ac_subst_files='language_hooks'
861bb6c1
JL
314
315# Initialize some variables set by options.
ba479fd2
NN
316ac_init_help=
317ac_init_version=false
861bb6c1
JL
318# The variables have the same names as the options, with
319# dashes changed to underlines.
ba479fd2 320cache_file=/dev/null
861bb6c1 321exec_prefix=NONE
861bb6c1 322no_create=
861bb6c1
JL
323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
861bb6c1
JL
331verbose=
332x_includes=NONE
333x_libraries=NONE
ba479fd2
NN
334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
861bb6c1
JL
340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
861bb6c1
JL
353ac_prev=
354for ac_option
355do
861bb6c1
JL
356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
361 fi
362
ba479fd2 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
861bb6c1
JL
364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
ba479fd2 367 case $ac_option in
861bb6c1
JL
368
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 372 bindir=$ac_optarg ;;
861bb6c1
JL
373
374 -build | --build | --buil | --bui | --bu)
ba479fd2 375 ac_prev=build_alias ;;
861bb6c1 376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 377 build_alias=$ac_optarg ;;
861bb6c1
JL
378
379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
861bb6c1
JL
388
389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
ba479fd2 393 datadir=$ac_optarg ;;
861bb6c1
JL
394
395 -disable-* | --disable-*)
ba479fd2 396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 397 # Reject names that are not valid shell variable names.
ba479fd2
NN
398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
861bb6c1
JL
403
404 -enable-* | --enable-*)
ba479fd2 405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 406 # Reject names that are not valid shell variable names.
ba479fd2
NN
407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
413 *) ac_optarg=yes ;;
414 esac
ba479fd2 415 eval "enable_$ac_feature='$ac_optarg'" ;;
861bb6c1
JL
416
417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
ba479fd2 424 exec_prefix=$ac_optarg ;;
861bb6c1
JL
425
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
429
ba479fd2
NN
430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
861bb6c1
JL
436
437 -host | --host | --hos | --ho)
ba479fd2 438 ac_prev=host_alias ;;
861bb6c1 439 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 440 host_alias=$ac_optarg ;;
861bb6c1
JL
441
442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 447 includedir=$ac_optarg ;;
861bb6c1
JL
448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 452 infodir=$ac_optarg ;;
861bb6c1
JL
453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 457 libdir=$ac_optarg ;;
861bb6c1
JL
458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
ba479fd2 464 libexecdir=$ac_optarg ;;
861bb6c1
JL
465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
ba479fd2 473 localstatedir=$ac_optarg ;;
861bb6c1
JL
474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 478 mandir=$ac_optarg ;;
861bb6c1
JL
479
480 -nfp | --nfp | --nf)
481 # Obsolete; use --without-fp.
482 with_fp=no ;;
483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 485 | --no-cr | --no-c | -n)
861bb6c1
JL
486 no_create=yes ;;
487
488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
491
492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 499 oldincludedir=$ac_optarg ;;
861bb6c1
JL
500
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 504 prefix=$ac_optarg ;;
861bb6c1
JL
505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 511 program_prefix=$ac_optarg ;;
861bb6c1
JL
512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 518 program_suffix=$ac_optarg ;;
861bb6c1
JL
519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 535 program_transform_name=$ac_optarg ;;
861bb6c1
JL
536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
ba479fd2 545 sbindir=$ac_optarg ;;
861bb6c1
JL
546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
ba479fd2 556 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
557
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
ba479fd2 561 site=$ac_optarg ;;
861bb6c1
JL
562
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 566 srcdir=$ac_optarg ;;
861bb6c1
JL
567
568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 573 sysconfdir=$ac_optarg ;;
861bb6c1
JL
574
575 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 576 ac_prev=target_alias ;;
861bb6c1 577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 578 target_alias=$ac_optarg ;;
861bb6c1
JL
579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
ba479fd2
NN
583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
861bb6c1
JL
585
586 -with-* | --with-*)
ba479fd2 587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 588 # Reject names that are not valid shell variable names.
ba479fd2
NN
589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
861bb6c1 592 ac_package=`echo $ac_package| sed 's/-/_/g'`
ba479fd2
NN
593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
595 *) ac_optarg=yes ;;
596 esac
ba479fd2 597 eval "with_$ac_package='$ac_optarg'" ;;
861bb6c1
JL
598
599 -without-* | --without-*)
ba479fd2 600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 601 # Reject names that are not valid shell variable names.
ba479fd2
NN
602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
861bb6c1
JL
607
608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 617 x_includes=$ac_optarg ;;
861bb6c1
JL
618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 624 x_libraries=$ac_optarg ;;
861bb6c1 625
ba479fd2
NN
626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
861bb6c1
JL
629 ;;
630
ba479fd2
NN
631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
861bb6c1 641 *)
ba479fd2
NN
642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
647 ;;
648
649 esac
650done
651
652if test -n "$ac_prev"; then
ba479fd2
NN
653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
63cf211a 656fi
63cf211a 657
ba479fd2
NN
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
666 esac
667done
093e61a6 668
ba479fd2
NN
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
86da66b5 671 localstatedir libdir includedir oldincludedir infodir mandir
861bb6c1 672do
ba479fd2
NN
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
861bb6c1
JL
678 esac
679done
680
ba479fd2
NN
681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
687
688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
6e3f3080 698
ba479fd2
NN
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
861bb6c1 703
861bb6c1
JL
704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707 ac_srcdir_defaulted=yes
708 # Try the directory containing this script, then its parent.
ba479fd2
NN
709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
861bb6c1
JL
721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
ba479fd2
NN
730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
63cf211a 732 else
ba479fd2
NN
733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
63cf211a
NN
735 fi
736fi
ba479fd2
NN
737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
6de9cd9a
DN
773ac_env_GMPLIBS_set=${GMPLIBS+set}
774ac_env_GMPLIBS_value=$GMPLIBS
775ac_cv_env_GMPLIBS_set=${GMPLIBS+set}
776ac_cv_env_GMPLIBS_value=$GMPLIBS
777ac_env_GMPINC_set=${GMPINC+set}
778ac_env_GMPINC_value=$GMPINC
779ac_cv_env_GMPINC_set=${GMPINC+set}
780ac_cv_env_GMPINC_value=$GMPINC
63cf211a 781
ba479fd2
NN
782#
783# Report the --help message.
784#
785if test "$ac_init_help" = "long"; then
786 # Omit some internal or obsolete options to make the list less imposing.
787 # This message is too long to be a string in the A/UX 3.1 sh.
788 cat <<_ACEOF
789\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 790
ba479fd2 791Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 792
ba479fd2
NN
793To assign environment variables (e.g., CC, CFLAGS...), specify them as
794VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 795
ba479fd2 796Defaults for the options are specified in brackets.
861bb6c1 797
ba479fd2
NN
798Configuration:
799 -h, --help display this help and exit
800 --help=short display options specific to this package
801 --help=recursive display the short help of all the included packages
802 -V, --version display version information and exit
803 -q, --quiet, --silent do not print \`checking...' messages
804 --cache-file=FILE cache test results in FILE [disabled]
805 -C, --config-cache alias for \`--cache-file=config.cache'
806 -n, --no-create do not create output files
807 --srcdir=DIR find the sources in DIR [configure dir or \`..']
808
809_ACEOF
810
811 cat <<_ACEOF
812Installation directories:
813 --prefix=PREFIX install architecture-independent files in PREFIX
86da66b5 814 [$ac_default_prefix]
ba479fd2 815 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
86da66b5 816 [PREFIX]
861bb6c1 817
ba479fd2
NN
818By default, \`make install' will install all the files in
819\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
820an installation prefix other than \`$ac_default_prefix' using \`--prefix',
821for instance \`--prefix=\$HOME'.
13c22933 822
ba479fd2 823For better control, use the options below.
13c22933 824
ba479fd2
NN
825Fine tuning of the installation directories:
826 --bindir=DIR user executables [EPREFIX/bin]
827 --sbindir=DIR system admin executables [EPREFIX/sbin]
828 --libexecdir=DIR program executables [EPREFIX/libexec]
829 --datadir=DIR read-only architecture-independent data [PREFIX/share]
830 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
831 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
832 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
833 --libdir=DIR object code libraries [EPREFIX/lib]
834 --includedir=DIR C header files [PREFIX/include]
835 --oldincludedir=DIR C header files for non-gcc [/usr/include]
836 --infodir=DIR info documentation [PREFIX/info]
837 --mandir=DIR man documentation [PREFIX/man]
838_ACEOF
13c22933 839
ba479fd2 840 cat <<\_ACEOF
13c22933 841
ba479fd2
NN
842Program names:
843 --program-prefix=PREFIX prepend PREFIX to installed program names
844 --program-suffix=SUFFIX append SUFFIX to installed program names
845 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 846
ba479fd2
NN
847System types:
848 --build=BUILD configure for building on BUILD [guessed]
849 --host=HOST cross-compile to build programs to run on HOST [BUILD]
850 --target=TARGET configure for building compilers for TARGET [HOST]
851_ACEOF
13c22933
JJ
852fi
853
ba479fd2 854if test -n "$ac_init_help"; then
13c22933 855
ba479fd2 856 cat <<\_ACEOF
13c22933 857
ba479fd2
NN
858Optional Features:
859 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
860 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
861 --enable-generated-files-in-srcdir
862 put copies of generated files in source dir
863 intended for creating source tarballs for users
864 without texinfo bison or flex.
09a9c095 865 --enable-werror-always enable -Werror always
ba479fd2
NN
866 --enable-werror enable -Werror in bootstrap stage2 and later
867 --enable-checking=LIST
868 enable expensive run-time checks. With LIST,
869 enable only specific categories of checks.
cdce5c16
NS
870 Categories are: yes,no,all,none,release.
871 Flags are: assert,fold,gc,gcac,misc,
872 rtlflag,rtl,runtime,tree,valgrind.
74ee1642 873 --enable-mapped-location location_t is fileline integer cookie
ba479fd2 874 --enable-coverage=LEVEL
fb38008e 875 enable compiler's code coverage collection.
ba479fd2
NN
876 Use to measure compiler performance and locate
877 unused parts of the compiler. With LEVEL, specify
878 optimization. Values are opt, noopt,
879 default is noopt
880 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
881 --enable-multilib enable library support for multiple ABIs
882 --enable-__cxa_atexit enable __cxa_atexit for C++
883 --enable-threads enable thread usage for target GCC
884 --enable-threads=LIB use LIB thread package for target GCC
885 --enable-objc-gc enable the use of Boehm's garbage collector with
886 the GNU Objective-C runtime
887 --disable-shared don't provide a shared libgcc
888 --enable-intermodule build the compiler in one step
f3c9f174 889 --enable-languages=LIST specify which front-ends to build
dfb77e37 890 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
891 --enable-initfini-array use .init_array/.fini_array sections
892 --enable-sjlj-exceptions
893 arrange to use setjmp/longjmp exception handling
7f970b70 894 --enable-secureplt enable -msecure-plt by default for PowerPC
ba479fd2
NN
895 --disable-win32-registry
896 disable lookup of installation paths in the
897 Registry on Windows hosts
898 --enable-win32-registry enable registry lookup (default)
899 --enable-win32-registry=KEY
900 use KEY instead of GCC version as the last portion
901 of the registry key
902 --enable-maintainer-mode
903 enable make rules and dependencies not useful
904 (and sometimes confusing) to the casual installer
905 --enable-version-specific-runtime-libs
906 specify that runtime libraries should be
907 installed in a compiler-specific directory
093e61a6 908
ba479fd2
NN
909Optional Packages:
910 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
911 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
912 --with-local-prefix=DIR specifies directory to put local include
913 --with-gxx-include-dir=DIR
914 specifies directory to put g++ header files
915 --with-cpp-install-dir=DIR
916 install the user visible C preprocessor in DIR
917 (relative to PREFIX) as well as PREFIX/bin
918 --with-gnu-ld arrange to work with GNU ld.
919 --with-ld arrange to use the specified ld (full pathname)
d594623a 920 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
921 --with-gnu-as arrange to work with GNU as
922 --with-as arrange to use the specified as (full pathname)
923 --with-stabs arrange to use stabs instead of host debug format
924 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
925 --with-build-sysroot=sysroot
926 use sysroot as the system root during the build
ba479fd2 927 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
dfb77e37
KC
928 --with-gnu-ld assume the C compiler uses GNU ld default=no
929 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
930 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 931 --with-system-libunwind use installed libunwind
59415997 932 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
933 with the compiler
934 --with-system-zlib use installed libz
935 --with-slibdir=DIR shared libraries in DIR LIBDIR
13c22933 936
ba479fd2
NN
937Some influential environment variables:
938 CC C compiler command
939 CFLAGS C compiler flags
940 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
941 nonstandard directory <lib dir>
942 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
943 headers in a nonstandard directory <include dir>
944 CPP C preprocessor
6de9cd9a
DN
945 GMPLIBS How to link GMP
946 GMPINC How to find GMP include files
13c22933 947
ba479fd2
NN
948Use these variables to override the choices made by `configure' or to help
949it to find libraries and programs with nonstandard names/locations.
73458fb7 950
ba479fd2
NN
951_ACEOF
952fi
6e3f3080 953
ba479fd2
NN
954if test "$ac_init_help" = "recursive"; then
955 # If there are subdirs, report their specific --help.
956 ac_popdir=`pwd`
957 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
958 test -d $ac_dir || continue
959 ac_builddir=.
960
961if test "$ac_dir" != .; then
962 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
963 # A "../" for each directory in $ac_dir_suffix.
964 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
965else
966 ac_dir_suffix= ac_top_builddir=
967fi
968
969case $srcdir in
970 .) # No --srcdir option. We are building in place.
971 ac_srcdir=.
972 if test -z "$ac_top_builddir"; then
973 ac_top_srcdir=.
974 else
975 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
976 fi ;;
977 [\\/]* | ?:[\\/]* ) # Absolute path.
978 ac_srcdir=$srcdir$ac_dir_suffix;
979 ac_top_srcdir=$srcdir ;;
980 *) # Relative path.
981 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
982 ac_top_srcdir=$ac_top_builddir$srcdir ;;
983esac
8ab705be
KC
984
985# Do not use `cd foo && pwd` to compute absolute paths, because
986# the directories may not exist.
987case `pwd` in
988.) ac_abs_builddir="$ac_dir";;
86da66b5 989*)
8ab705be
KC
990 case "$ac_dir" in
991 .) ac_abs_builddir=`pwd`;;
992 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
993 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
994 esac;;
995esac
8ab705be 996case $ac_abs_builddir in
86da66b5
HPN
997.) ac_abs_top_builddir=${ac_top_builddir}.;;
998*)
999 case ${ac_top_builddir}. in
8ab705be 1000 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 1001 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 1002 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
1003 esac;;
1004esac
8ab705be 1005case $ac_abs_builddir in
86da66b5
HPN
1006.) ac_abs_srcdir=$ac_srcdir;;
1007*)
1008 case $ac_srcdir in
8ab705be 1009 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 1010 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 1011 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
1012 esac;;
1013esac
8ab705be 1014case $ac_abs_builddir in
86da66b5
HPN
1015.) ac_abs_top_srcdir=$ac_top_srcdir;;
1016*)
1017 case $ac_top_srcdir in
8ab705be 1018 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 1019 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 1020 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
1021 esac;;
1022esac
ba479fd2
NN
1023
1024 cd $ac_dir
1025 # Check for guested configure; otherwise get Cygnus style configure.
1026 if test -f $ac_srcdir/configure.gnu; then
1027 echo
1028 $SHELL $ac_srcdir/configure.gnu --help=recursive
1029 elif test -f $ac_srcdir/configure; then
1030 echo
1031 $SHELL $ac_srcdir/configure --help=recursive
1032 elif test -f $ac_srcdir/configure.ac ||
86da66b5 1033 test -f $ac_srcdir/configure.in; then
ba479fd2
NN
1034 echo
1035 $ac_configure --help
1036 else
1037 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1038 fi
d7974fe6 1039 cd $ac_popdir
ba479fd2
NN
1040 done
1041fi
1042
1043test -n "$ac_init_help" && exit 0
1044if $ac_init_version; then
1045 cat <<\_ACEOF
1046
86da66b5 1047Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1048This configure script is free software; the Free Software Foundation
1049gives unlimited permission to copy, distribute and modify it.
1050_ACEOF
1051 exit 0
1052fi
1053exec 5>config.log
1054cat >&5 <<_ACEOF
1055This file contains any messages produced by compilers while
1056running configure, to aid debugging if configure makes a mistake.
1057
1058It was created by $as_me, which was
8ab705be 1059generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1060
1061 $ $0 $@
1062
1063_ACEOF
1064{
1065cat <<_ASUNAME
1066## --------- ##
1067## Platform. ##
1068## --------- ##
1069
1070hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1071uname -m = `(uname -m) 2>/dev/null || echo unknown`
1072uname -r = `(uname -r) 2>/dev/null || echo unknown`
1073uname -s = `(uname -s) 2>/dev/null || echo unknown`
1074uname -v = `(uname -v) 2>/dev/null || echo unknown`
1075
1076/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1077/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1078
1079/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1080/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1081/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1082hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1083/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1084/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1085/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1086
1087_ASUNAME
1088
1089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1090for as_dir in $PATH
1091do
1092 IFS=$as_save_IFS
1093 test -z "$as_dir" && as_dir=.
1094 echo "PATH: $as_dir"
1095done
1096
1097} >&5
1098
1099cat >&5 <<_ACEOF
1100
1101
1102## ----------- ##
1103## Core tests. ##
1104## ----------- ##
1105
1106_ACEOF
1107
1108
1109# Keep a trace of the command line.
1110# Strip out --no-create and --no-recursion so they do not pile up.
1111# Strip out --silent because we don't want to record it for future runs.
1112# Also quote any args containing shell meta-characters.
1113# Make two passes to allow for proper duplicate-argument suppression.
1114ac_configure_args=
1115ac_configure_args0=
1116ac_configure_args1=
1117ac_sep=
1118ac_must_keep_next=false
1119for ac_pass in 1 2
1120do
1121 for ac_arg
1122 do
1123 case $ac_arg in
1124 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1125 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1126 | -silent | --silent | --silen | --sile | --sil)
1127 continue ;;
1128 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1129 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1130 esac
1131 case $ac_pass in
1132 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1133 2)
1134 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1135 if test $ac_must_keep_next = true; then
86da66b5 1136 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1137 else
86da66b5
HPN
1138 case $ac_arg in
1139 *=* | --config-cache | -C | -disable-* | --disable-* \
1140 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1141 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1142 | -with-* | --with-* | -without-* | --without-* | --x)
1143 case "$ac_configure_args0 " in
1144 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1145 esac
1146 ;;
1147 -* ) ac_must_keep_next=true ;;
1148 esac
ba479fd2
NN
1149 fi
1150 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1151 # Get rid of the leading space.
1152 ac_sep=" "
1153 ;;
1154 esac
1155 done
1156done
1157$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1158$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1159
1160# When interrupted or exit'd, cleanup temporary files, and complete
1161# config.log. We remove comments because anyway the quotes in there
1162# would cause problems or look ugly.
1163# WARNING: Be sure not to use single quotes in there, as some shells,
1164# such as our DU 5.0 friend, will then `close' the trap.
1165trap 'exit_status=$?
1166 # Save into config.log some information that might help in debugging.
1167 {
1168 echo
1169
1170 cat <<\_ASBOX
1171## ---------------- ##
1172## Cache variables. ##
1173## ---------------- ##
1174_ASBOX
1175 echo
1176 # The following way of writing the cache mishandles newlines in values,
1177{
1178 (set) 2>&1 |
1179 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1180 *ac_space=\ *)
1181 sed -n \
86da66b5
HPN
1182 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1183 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
ba479fd2
NN
1184 ;;
1185 *)
1186 sed -n \
86da66b5 1187 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
1188 ;;
1189 esac;
1190}
1191 echo
1192
1193 cat <<\_ASBOX
1194## ----------------- ##
1195## Output variables. ##
1196## ----------------- ##
1197_ASBOX
1198 echo
1199 for ac_var in $ac_subst_vars
1200 do
1201 eval ac_val=$`echo $ac_var`
1202 echo "$ac_var='"'"'$ac_val'"'"'"
1203 done | sort
1204 echo
1205
1206 if test -n "$ac_subst_files"; then
1207 cat <<\_ASBOX
1208## ------------- ##
1209## Output files. ##
1210## ------------- ##
1211_ASBOX
1212 echo
1213 for ac_var in $ac_subst_files
1214 do
1215 eval ac_val=$`echo $ac_var`
86da66b5 1216 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1217 done | sort
1218 echo
1219 fi
1220
1221 if test -s confdefs.h; then
1222 cat <<\_ASBOX
1223## ----------- ##
1224## confdefs.h. ##
1225## ----------- ##
1226_ASBOX
1227 echo
1228 sed "/^$/d" confdefs.h | sort
1229 echo
1230 fi
1231 test "$ac_signal" != 0 &&
1232 echo "$as_me: caught signal $ac_signal"
1233 echo "$as_me: exit $exit_status"
1234 } >&5
86da66b5 1235 rm -f core *.core &&
ba479fd2
NN
1236 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1237 exit $exit_status
1238 ' 0
1239for ac_signal in 1 2 13 15; do
1240 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1241done
1242ac_signal=0
1243
1244# confdefs.h avoids OS command line length limits that DEFS can exceed.
1245rm -rf conftest* confdefs.h
1246# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1247echo >confdefs.h
1248
1249# Predefined preprocessor variables.
1250
1251cat >>confdefs.h <<_ACEOF
1252#define PACKAGE_NAME "$PACKAGE_NAME"
1253_ACEOF
1254
1255
1256cat >>confdefs.h <<_ACEOF
1257#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1258_ACEOF
1259
1260
1261cat >>confdefs.h <<_ACEOF
1262#define PACKAGE_VERSION "$PACKAGE_VERSION"
1263_ACEOF
1264
1265
1266cat >>confdefs.h <<_ACEOF
1267#define PACKAGE_STRING "$PACKAGE_STRING"
1268_ACEOF
1269
1270
1271cat >>confdefs.h <<_ACEOF
1272#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1273_ACEOF
1274
1275
1276# Let the site file select an alternate cache file if it wants to.
1277# Prefer explicitly selected file to automatically selected ones.
1278if test -z "$CONFIG_SITE"; then
1279 if test "x$prefix" != xNONE; then
1280 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1281 else
1282 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1283 fi
1284fi
1285for ac_site_file in $CONFIG_SITE; do
1286 if test -r "$ac_site_file"; then
1287 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1288echo "$as_me: loading site script $ac_site_file" >&6;}
1289 sed 's/^/| /' "$ac_site_file" >&5
1290 . "$ac_site_file"
1291 fi
1292done
1293
1294if test -r "$cache_file"; then
1295 # Some versions of bash will fail to source /dev/null (special
1296 # files actually), so we avoid doing that.
1297 if test -f "$cache_file"; then
1298 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1299echo "$as_me: loading cache $cache_file" >&6;}
1300 case $cache_file in
1301 [\\/]* | ?:[\\/]* ) . $cache_file;;
1302 *) . ./$cache_file;;
1303 esac
1304 fi
1305else
1306 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1307echo "$as_me: creating cache $cache_file" >&6;}
1308 >$cache_file
1309fi
1310
1311# Check that the precious variables saved in the cache have kept the same
1312# value.
1313ac_cache_corrupted=false
1314for ac_var in `(set) 2>&1 |
86da66b5 1315 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1316 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1317 eval ac_new_set=\$ac_env_${ac_var}_set
1318 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1319 eval ac_new_val="\$ac_env_${ac_var}_value"
1320 case $ac_old_set,$ac_new_set in
1321 set,)
1322 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1323echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1324 ac_cache_corrupted=: ;;
1325 ,set)
1326 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1327echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1328 ac_cache_corrupted=: ;;
1329 ,);;
1330 *)
1331 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1332 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1333echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1334 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1335echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1336 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1337echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1338 ac_cache_corrupted=:
ba479fd2
NN
1339 fi;;
1340 esac
1341 # Pass precious variables to config.status.
1342 if test "$ac_new_set" = set; then
1343 case $ac_new_val in
1344 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1345 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1346 *) ac_arg=$ac_var=$ac_new_val ;;
1347 esac
1348 case " $ac_configure_args " in
1349 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1350 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1351 esac
1352 fi
1353done
1354if $ac_cache_corrupted; then
1355 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1356echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1357 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1358echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1359 { (exit 1); exit 1; }; }
1360fi
1361
1362ac_ext=c
1363ac_cpp='$CPP $CPPFLAGS'
1364ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1365ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1366ac_compiler_gnu=$ac_cv_c_compiler_gnu
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
914c5af7 1386
ba479fd2
NN
1387 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1388
1389
9f18db39
PB
1390gcc_version=`cat $srcdir/BASE-VER`
1391
ba479fd2
NN
1392# Determine the host, build, and target systems
1393ac_aux_dir=
1394for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1395 if test -f $ac_dir/install-sh; then
1396 ac_aux_dir=$ac_dir
1397 ac_install_sh="$ac_aux_dir/install-sh -c"
1398 break
1399 elif 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/shtool; then
1404 ac_aux_dir=$ac_dir
1405 ac_install_sh="$ac_aux_dir/shtool install -c"
1406 break
1407 fi
1408done
1409if test -z "$ac_aux_dir"; then
1410 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1411echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1412 { (exit 1); exit 1; }; }
1413fi
1414ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1415ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1416ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1417
1418# Make sure we can run config.sub.
1419$ac_config_sub sun4 >/dev/null 2>&1 ||
1420 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1421echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1422 { (exit 1); exit 1; }; }
1423
1424echo "$as_me:$LINENO: checking build system type" >&5
1425echo $ECHO_N "checking build system type... $ECHO_C" >&6
1426if test "${ac_cv_build+set}" = set; then
1427 echo $ECHO_N "(cached) $ECHO_C" >&6
1428else
1429 ac_cv_build_alias=$build_alias
1430test -z "$ac_cv_build_alias" &&
1431 ac_cv_build_alias=`$ac_config_guess`
1432test -z "$ac_cv_build_alias" &&
1433 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1434echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1435 { (exit 1); exit 1; }; }
1436ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1437 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1438echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1439 { (exit 1); exit 1; }; }
1440
1441fi
1442echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1443echo "${ECHO_T}$ac_cv_build" >&6
1444build=$ac_cv_build
1445build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1446build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1447build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1448
1449
1450echo "$as_me:$LINENO: checking host system type" >&5
1451echo $ECHO_N "checking host system type... $ECHO_C" >&6
1452if test "${ac_cv_host+set}" = set; then
1453 echo $ECHO_N "(cached) $ECHO_C" >&6
1454else
1455 ac_cv_host_alias=$host_alias
1456test -z "$ac_cv_host_alias" &&
1457 ac_cv_host_alias=$ac_cv_build_alias
1458ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1459 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1460echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1461 { (exit 1); exit 1; }; }
1462
1463fi
1464echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1465echo "${ECHO_T}$ac_cv_host" >&6
1466host=$ac_cv_host
1467host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1468host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1469host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1470
1471
1472echo "$as_me:$LINENO: checking target system type" >&5
1473echo $ECHO_N "checking target system type... $ECHO_C" >&6
1474if test "${ac_cv_target+set}" = set; then
1475 echo $ECHO_N "(cached) $ECHO_C" >&6
1476else
1477 ac_cv_target_alias=$target_alias
1478test "x$ac_cv_target_alias" = "x" &&
1479 ac_cv_target_alias=$ac_cv_host_alias
1480ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1481 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1482echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1483 { (exit 1); exit 1; }; }
1484
1485fi
1486echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1487echo "${ECHO_T}$ac_cv_target" >&6
1488target=$ac_cv_target
1489target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1490target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1491target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1492
1493
1494# The aliases save the names the user supplied, while $host etc.
1495# will get canonicalized.
1496test -n "$target_alias" &&
1497 test "$program_prefix$program_suffix$program_transform_name" = \
1498 NONENONEs,x,x, &&
1499 program_prefix=${target_alias}-
1500
1501# Determine the noncanonical target name, for directory use.
1502 case ${build_alias} in
1503 "") build_noncanonical=${build} ;;
6e3f3080
NN
1504 *) build_noncanonical=${build_alias} ;;
1505esac
73458fb7 1506
4665e56c
NN
1507 case ${host_alias} in
1508 "") host_noncanonical=${build_noncanonical} ;;
1509 *) host_noncanonical=${host_alias} ;;
1510esac
73458fb7 1511
4665e56c
NN
1512 case ${target_alias} in
1513 "") target_noncanonical=${host_noncanonical} ;;
1514 *) target_noncanonical=${target_alias} ;;
1515esac
093e61a6 1516
8f1529e6
L
1517
1518
1519
1520# Determine the target- and build-specific subdirectories
4665e56c
NN
1521 # Prefix 'build-' so this never conflicts with target_subdir.
1522build_subdir="build-${build_noncanonical}"
215c351a
PB
1523# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1524if ( test $srcdir = . && test -d gcc ) \
1525 || test -d $srcdir/../host-${host_noncanonical}; then
1526 host_subdir="host-${host_noncanonical}"
1527else
1528 host_subdir=.
1529fi
4665e56c
NN
1530# No prefix.
1531target_subdir=${target_noncanonical}
ba479fd2 1532
73458fb7 1533
093e61a6 1534# Set program_transform_name
13c22933 1535test "$program_prefix" != NONE &&
ba479fd2 1536 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1537# Use a double $ so make ignores it.
1538test "$program_suffix" != NONE &&
ba479fd2
NN
1539 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1540# Double any \ or $. echo might interpret backslashes.
1541# By default was `s,x,x', remove it if useless.
1542cat <<\_ACEOF >conftest.sed
1543s/[\\$]/&&/g;s/;s,x,x,$//
1544_ACEOF
1545program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1546rm conftest.sed
13c22933
JJ
1547
1548
34a86c2b
NN
1549# Check for bogus environment variables.
1550# Test if LIBRARY_PATH contains the notation for the current directory
1551# since this would lead to problems installing/building glibc.
1552# LIBRARY_PATH contains the current directory if one of the following
1553# is true:
1554# - one of the terminals (":" and ";") is the first or last sign
1555# - two terminals occur directly after each other
1556# - the path contains an element with a dot in it
ba479fd2
NN
1557echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1558echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1559case ${LIBRARY_PATH} in
1560 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1561 library_path_setting="contains current directory"
1562 ;;
1563 *)
1564 library_path_setting="ok"
1565 ;;
1566esac
ba479fd2
NN
1567echo "$as_me:$LINENO: result: $library_path_setting" >&5
1568echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1569if test "$library_path_setting" != "ok"; then
ba479fd2 1570{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1571*** LIBRARY_PATH shouldn't contain the current directory when
1572*** building gcc. Please change the environment variable
ba479fd2
NN
1573*** and run configure again." >&5
1574echo "$as_me: error:
1575*** LIBRARY_PATH shouldn't contain the current directory when
1576*** building gcc. Please change the environment variable
1577*** and run configure again." >&2;}
1578 { (exit 1); exit 1; }; }
e9a25f70
JL
1579fi
1580
34a86c2b
NN
1581# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1582# since this would lead to problems installing/building glibc.
1583# GCC_EXEC_PREFIX contains the current directory if one of the following
1584# is true:
1585# - one of the terminals (":" and ";") is the first or last sign
1586# - two terminals occur directly after each other
1587# - the path contains an element with a dot in it
ba479fd2
NN
1588echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1589echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1590case ${GCC_EXEC_PREFIX} in
1591 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1592 gcc_exec_prefix_setting="contains current directory"
1593 ;;
1594 *)
1595 gcc_exec_prefix_setting="ok"
1596 ;;
1597esac
ba479fd2
NN
1598echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1599echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1600if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1601{ { echo "$as_me:$LINENO: error:
1602*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1603*** building gcc. Please change the environment variable
1604*** and run configure again." >&5
1605echo "$as_me: error:
cafe096b
EC
1606*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1607*** building gcc. Please change the environment variable
ba479fd2
NN
1608*** and run configure again." >&2;}
1609 { (exit 1); exit 1; }; }
34a86c2b
NN
1610fi
1611
1612# -----------
1613# Directories
1614# -----------
1615
1616# Specify the local prefix
1617local_prefix=
ba479fd2 1618
34a86c2b
NN
1619# Check whether --with-local-prefix or --without-local-prefix was given.
1620if test "${with_local_prefix+set}" = set; then
1621 withval="$with_local_prefix"
1622 case "${withval}" in
ba479fd2
NN
1623yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1624echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1625 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1626no) ;;
1627*) local_prefix=$with_local_prefix ;;
1628esac
ba479fd2 1629fi;
34a86c2b
NN
1630
1631# Default local prefix if it is empty
1632if test x$local_prefix = x; then
1633 local_prefix=/usr/local
1634fi
1635
1636# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1637# passed in by the toplevel make and thus we'd get different behavior
1638# depending on where we built the sources.
1639gcc_gxx_include_dir=
1640# Specify the g++ header file directory
ba479fd2 1641
34a86c2b
NN
1642# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1643if test "${with_gxx_include_dir+set}" = set; then
1644 withval="$with_gxx_include_dir"
1645 case "${withval}" in
ba479fd2
NN
1646yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1647echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1648 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1649no) ;;
1650*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1651esac
ba479fd2 1652fi;
34a86c2b
NN
1653
1654if test x${gcc_gxx_include_dir} = x; then
1655 if test x${enable_version_specific_runtime_libs} = xyes; then
1656 gcc_gxx_include_dir='${libsubdir}/include/c++'
1657 else
a1286ef5 1658 libstdcxx_incdir='c++/$(version)'
34a86c2b
NN
1659 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
1660 fi
1661fi
1662
ba479fd2 1663
34a86c2b
NN
1664# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1665if test "${with_cpp_install_dir+set}" = set; then
1666 withval="$with_cpp_install_dir"
1667 if test x$withval = xyes; then
ba479fd2
NN
1668 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1669echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1670 { (exit 1); exit 1; }; }
34a86c2b
NN
1671elif test x$withval != xno; then
1672 cpp_install_dir=$withval
1673fi
ba479fd2 1674fi;
34a86c2b 1675
51b9ff45 1676# We would like to our source tree to be readonly. However when releases or
ba479fd2 1677# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1678# various formats of manuals need to be included along with the rest of the
ba479fd2 1679# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1680# just that.
1681
03787dfd
KC
1682echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1683echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1684 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45
KC
1685if test "${enable_generated_files_in_srcdir+set}" = set; then
1686 enableval="$enable_generated_files_in_srcdir"
03787dfd 1687 generated_files_in_srcdir=$enableval
51b9ff45 1688else
03787dfd 1689 generated_files_in_srcdir=no
ba479fd2 1690fi;
51b9ff45 1691
03787dfd
KC
1692echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1693echo "${ECHO_T}$generated_files_in_srcdir" >&6
1694
1695if test "$generated_files_in_srcdir" = "yes"; then
1696 GENINSRC=''
03787dfd
KC
1697else
1698 GENINSRC='#'
03787dfd
KC
1699fi
1700
1701
34a86c2b
NN
1702# -------------------
1703# Find default linker
1704# -------------------
1705
1706# With GNU ld
ba479fd2 1707
34a86c2b
NN
1708# Check whether --with-gnu-ld or --without-gnu-ld was given.
1709if test "${with_gnu_ld+set}" = set; then
1710 withval="$with_gnu_ld"
1711 gnu_ld_flag="$with_gnu_ld"
1712else
1713 gnu_ld_flag=no
ba479fd2 1714fi;
6e3f3080 1715
63cf211a 1716# With pre-defined ld
ba479fd2 1717
34a86c2b
NN
1718# Check whether --with-ld or --without-ld was given.
1719if test "${with_ld+set}" = set; then
1720 withval="$with_ld"
1721 DEFAULT_LINKER="$with_ld"
ba479fd2 1722fi;
34a86c2b
NN
1723if test x"${DEFAULT_LINKER+set}" = x"set"; then
1724 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1725 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1726echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1727 { (exit 1); exit 1; }; }
34a86c2b
NN
1728 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1729 gnu_ld_flag=yes
1730 fi
ba479fd2
NN
1731
1732cat >>confdefs.h <<_ACEOF
34a86c2b 1733#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1734_ACEOF
34a86c2b
NN
1735
1736fi
1737
ba479fd2
NN
1738echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1739echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1740if test x"${DEFAULT_LINKER+set}" = x"set"; then
1741 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1742 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1743echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1744 else
ba479fd2
NN
1745 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1746echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1747 fi
1748else
ba479fd2
NN
1749 echo "$as_me:$LINENO: result: no" >&5
1750echo "${ECHO_T}no" >&6
34a86c2b
NN
1751fi
1752
d594623a
L
1753# With demangler in GNU ld
1754
1755# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
1756if test "${with_demangler_in_ld+set}" = set; then
1757 withval="$with_demangler_in_ld"
1758 demangler_in_ld="$with_demangler_in_ld"
1759else
1760 demangler_in_ld=no
1761fi;
1762
34a86c2b
NN
1763# ----------------------
1764# Find default assembler
1765# ----------------------
1766
1767# With GNU as
ba479fd2 1768
34a86c2b
NN
1769# Check whether --with-gnu-as or --without-gnu-as was given.
1770if test "${with_gnu_as+set}" = set; then
1771 withval="$with_gnu_as"
1772 gas_flag="$with_gnu_as"
1773else
1774 gas_flag=no
ba479fd2 1775fi;
34a86c2b
NN
1776
1777
1778# Check whether --with-as or --without-as was given.
1779if test "${with_as+set}" = set; then
1780 withval="$with_as"
1781 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1782fi;
34a86c2b
NN
1783if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1784 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1785 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1786echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1787 { (exit 1); exit 1; }; }
34a86c2b
NN
1788 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1789 gas_flag=yes
1790 fi
ba479fd2
NN
1791
1792cat >>confdefs.h <<_ACEOF
34a86c2b 1793#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1794_ACEOF
34a86c2b
NN
1795
1796fi
1797
ba479fd2
NN
1798echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1799echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1800if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1801 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1802 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1803echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1804 else
ba479fd2
NN
1805 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1806echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1807 fi
1808else
ba479fd2
NN
1809 echo "$as_me:$LINENO: result: no" >&5
1810echo "${ECHO_T}no" >&6
34a86c2b
NN
1811fi
1812
1813# ---------------
1814# Find C compiler
1815# ---------------
1816
426ca3ca
RO
1817# If a non-executable a.out is present (e.g. created by GNU as above even if
1818# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1819# file, even when creating an executable, so an execution test fails.
1820# Remove possible default executable files to avoid this.
1821#
1822# FIXME: This really belongs into AC_PROG_CC and can be removed once
1823# Autoconf includes it.
1824rm -f a.out a.exe b.out
1825
34a86c2b 1826# Find the native compiler
ba479fd2
NN
1827ac_ext=c
1828ac_cpp='$CPP $CPPFLAGS'
1829ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1830ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1831ac_compiler_gnu=$ac_cv_c_compiler_gnu
1832if test -n "$ac_tool_prefix"; then
1833 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1834set dummy ${ac_tool_prefix}gcc; ac_word=$2
1835echo "$as_me:$LINENO: checking for $ac_word" >&5
1836echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1837if test "${ac_cv_prog_CC+set}" = set; then
1838 echo $ECHO_N "(cached) $ECHO_C" >&6
1839else
1840 if test -n "$CC"; then
1841 ac_cv_prog_CC="$CC" # Let the user override the test.
1842else
1843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1844for as_dir in $PATH
1845do
1846 IFS=$as_save_IFS
1847 test -z "$as_dir" && as_dir=.
1848 for ac_exec_ext in '' $ac_executable_extensions; do
1849 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1850 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1851 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1852 break 2
1853 fi
1854done
1855done
1856
1857fi
1858fi
1859CC=$ac_cv_prog_CC
1860if test -n "$CC"; then
1861 echo "$as_me:$LINENO: result: $CC" >&5
1862echo "${ECHO_T}$CC" >&6
1863else
1864 echo "$as_me:$LINENO: result: no" >&5
1865echo "${ECHO_T}no" >&6
1866fi
1867
1868fi
1869if test -z "$ac_cv_prog_CC"; then
1870 ac_ct_CC=$CC
1871 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1872set dummy gcc; ac_word=$2
ba479fd2
NN
1873echo "$as_me:$LINENO: checking for $ac_word" >&5
1874echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1875if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1876 echo $ECHO_N "(cached) $ECHO_C" >&6
1877else
1878 if test -n "$ac_ct_CC"; then
1879 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1880else
1881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1882for as_dir in $PATH
1883do
1884 IFS=$as_save_IFS
1885 test -z "$as_dir" && as_dir=.
1886 for ac_exec_ext in '' $ac_executable_extensions; do
1887 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1888 ac_cv_prog_ac_ct_CC="gcc"
1889 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1890 break 2
1891 fi
1892done
1893done
1894
1895fi
1896fi
1897ac_ct_CC=$ac_cv_prog_ac_ct_CC
1898if test -n "$ac_ct_CC"; then
1899 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1900echo "${ECHO_T}$ac_ct_CC" >&6
1901else
1902 echo "$as_me:$LINENO: result: no" >&5
1903echo "${ECHO_T}no" >&6
1904fi
1905
1906 CC=$ac_ct_CC
1907else
1908 CC="$ac_cv_prog_CC"
1909fi
1910
1911if test -z "$CC"; then
1912 if test -n "$ac_tool_prefix"; then
1913 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1914set dummy ${ac_tool_prefix}cc; ac_word=$2
1915echo "$as_me:$LINENO: checking for $ac_word" >&5
1916echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1917if test "${ac_cv_prog_CC+set}" = set; then
1918 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1919else
1920 if test -n "$CC"; then
1921 ac_cv_prog_CC="$CC" # Let the user override the test.
1922else
ba479fd2
NN
1923as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1924for as_dir in $PATH
1925do
1926 IFS=$as_save_IFS
1927 test -z "$as_dir" && as_dir=.
1928 for ac_exec_ext in '' $ac_executable_extensions; do
1929 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1930 ac_cv_prog_CC="${ac_tool_prefix}cc"
1931 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1932 break 2
1933 fi
1934done
1935done
1936
cd9e5e7c
MK
1937fi
1938fi
ba479fd2 1939CC=$ac_cv_prog_CC
cd9e5e7c 1940if test -n "$CC"; then
ba479fd2
NN
1941 echo "$as_me:$LINENO: result: $CC" >&5
1942echo "${ECHO_T}$CC" >&6
1943else
1944 echo "$as_me:$LINENO: result: no" >&5
1945echo "${ECHO_T}no" >&6
1946fi
1947
1948fi
1949if test -z "$ac_cv_prog_CC"; then
1950 ac_ct_CC=$CC
1951 # Extract the first word of "cc", so it can be a program name with args.
1952set dummy cc; ac_word=$2
1953echo "$as_me:$LINENO: checking for $ac_word" >&5
1954echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1955if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1956 echo $ECHO_N "(cached) $ECHO_C" >&6
1957else
1958 if test -n "$ac_ct_CC"; then
1959 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1960else
1961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1962for as_dir in $PATH
1963do
1964 IFS=$as_save_IFS
1965 test -z "$as_dir" && as_dir=.
1966 for ac_exec_ext in '' $ac_executable_extensions; do
1967 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1968 ac_cv_prog_ac_ct_CC="cc"
1969 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1970 break 2
1971 fi
1972done
1973done
1974
1975fi
1976fi
1977ac_ct_CC=$ac_cv_prog_ac_ct_CC
1978if test -n "$ac_ct_CC"; then
1979 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1980echo "${ECHO_T}$ac_ct_CC" >&6
1981else
1982 echo "$as_me:$LINENO: result: no" >&5
1983echo "${ECHO_T}no" >&6
1984fi
1985
1986 CC=$ac_ct_CC
cd9e5e7c 1987else
ba479fd2 1988 CC="$ac_cv_prog_CC"
e9a25f70 1989fi
6e3f3080 1990
ba479fd2 1991fi
6e3f3080
NN
1992if test -z "$CC"; then
1993 # Extract the first word of "cc", so it can be a program name with args.
1994set dummy cc; ac_word=$2
ba479fd2
NN
1995echo "$as_me:$LINENO: checking for $ac_word" >&5
1996echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1997if test "${ac_cv_prog_CC+set}" = set; then
1998 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
1999else
2000 if test -n "$CC"; then
2001 ac_cv_prog_CC="$CC" # Let the user override the test.
2002else
2003 ac_prog_rejected=no
ba479fd2
NN
2004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2005for as_dir in $PATH
2006do
2007 IFS=$as_save_IFS
2008 test -z "$as_dir" && as_dir=.
2009 for ac_exec_ext in '' $ac_executable_extensions; do
2010 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2011 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2012 ac_prog_rejected=yes
2013 continue
2014 fi
2015 ac_cv_prog_CC="cc"
2016 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2017 break 2
2018 fi
2019done
2020done
2021
6e3f3080
NN
2022if test $ac_prog_rejected = yes; then
2023 # We found a bogon in the path, so make sure we never use it.
2024 set dummy $ac_cv_prog_CC
2025 shift
ba479fd2 2026 if test $# != 0; then
6e3f3080
NN
2027 # We chose a different compiler from the bogus one.
2028 # However, it has the same basename, so the bogon will be chosen
2029 # first if we set CC to just the basename; use the full file name.
2030 shift
ba479fd2 2031 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2032 fi
6e3f3080
NN
2033fi
2034fi
2035fi
ba479fd2 2036CC=$ac_cv_prog_CC
6e3f3080 2037if test -n "$CC"; then
ba479fd2
NN
2038 echo "$as_me:$LINENO: result: $CC" >&5
2039echo "${ECHO_T}$CC" >&6
e9a25f70 2040else
ba479fd2
NN
2041 echo "$as_me:$LINENO: result: no" >&5
2042echo "${ECHO_T}no" >&6
e9a25f70 2043fi
6e3f3080 2044
ba479fd2
NN
2045fi
2046if test -z "$CC"; then
2047 if test -n "$ac_tool_prefix"; then
2048 for ac_prog in cl
2049 do
2050 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2051set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2052echo "$as_me:$LINENO: checking for $ac_word" >&5
2053echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2054if test "${ac_cv_prog_CC+set}" = set; then
2055 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2056else
6e3f3080
NN
2057 if test -n "$CC"; then
2058 ac_cv_prog_CC="$CC" # Let the user override the test.
2059else
ba479fd2
NN
2060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2061for as_dir in $PATH
2062do
2063 IFS=$as_save_IFS
2064 test -z "$as_dir" && as_dir=.
2065 for ac_exec_ext in '' $ac_executable_extensions; do
2066 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2067 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2068 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2069 break 2
2070 fi
2071done
2072done
2073
093e61a6 2074fi
6e3f3080 2075fi
ba479fd2 2076CC=$ac_cv_prog_CC
6e3f3080 2077if test -n "$CC"; then
ba479fd2
NN
2078 echo "$as_me:$LINENO: result: $CC" >&5
2079echo "${ECHO_T}$CC" >&6
6e3f3080 2080else
ba479fd2
NN
2081 echo "$as_me:$LINENO: result: no" >&5
2082echo "${ECHO_T}no" >&6
093e61a6 2083fi
cafe096b 2084
ba479fd2
NN
2085 test -n "$CC" && break
2086 done
2087fi
2088if test -z "$CC"; then
2089 ac_ct_CC=$CC
2090 for ac_prog in cl
2091do
2092 # Extract the first word of "$ac_prog", so it can be a program name with args.
2093set dummy $ac_prog; ac_word=$2
2094echo "$as_me:$LINENO: checking for $ac_word" >&5
2095echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2096if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2097 echo $ECHO_N "(cached) $ECHO_C" >&6
2098else
2099 if test -n "$ac_ct_CC"; then
2100 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2101else
2102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2103for as_dir in $PATH
2104do
2105 IFS=$as_save_IFS
2106 test -z "$as_dir" && as_dir=.
2107 for ac_exec_ext in '' $ac_executable_extensions; do
2108 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2109 ac_cv_prog_ac_ct_CC="$ac_prog"
2110 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2111 break 2
2112 fi
2113done
2114done
6e3f3080 2115
ba479fd2
NN
2116fi
2117fi
2118ac_ct_CC=$ac_cv_prog_ac_ct_CC
2119if test -n "$ac_ct_CC"; then
2120 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2121echo "${ECHO_T}$ac_ct_CC" >&6
2122else
2123 echo "$as_me:$LINENO: result: no" >&5
2124echo "${ECHO_T}no" >&6
2125fi
6e3f3080 2126
ba479fd2
NN
2127 test -n "$ac_ct_CC" && break
2128done
63cf211a 2129
ba479fd2
NN
2130 CC=$ac_ct_CC
2131fi
2132
2133fi
2134
2135
2136test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2137See \`config.log' for more details." >&5
2138echo "$as_me: error: no acceptable C compiler found in \$PATH
2139See \`config.log' for more details." >&2;}
2140 { (exit 1); exit 1; }; }
2141
2142# Provide some information about the compiler.
2143echo "$as_me:$LINENO:" \
2144 "checking for C compiler version" >&5
2145ac_compiler=`set X $ac_compile; echo $2`
2146{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2147 (eval $ac_compiler --version </dev/null >&5) 2>&5
2148 ac_status=$?
2149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2150 (exit $ac_status); }
2151{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2152 (eval $ac_compiler -v </dev/null >&5) 2>&5
2153 ac_status=$?
2154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2155 (exit $ac_status); }
2156{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2157 (eval $ac_compiler -V </dev/null >&5) 2>&5
2158 ac_status=$?
2159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2160 (exit $ac_status); }
2161
2162cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2163/* confdefs.h. */
2164_ACEOF
2165cat confdefs.h >>conftest.$ac_ext
2166cat >>conftest.$ac_ext <<_ACEOF
2167/* end confdefs.h. */
2168
2169int
2170main ()
2171{
63cf211a 2172
ba479fd2
NN
2173 ;
2174 return 0;
2175}
2176_ACEOF
2177ac_clean_files_save=$ac_clean_files
2178ac_clean_files="$ac_clean_files a.out a.exe b.out"
2179# Try to create an executable without -o first, disregard a.out.
2180# It will help us diagnose broken compilers, and finding out an intuition
2181# of exeext.
86da66b5
HPN
2182echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2183echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2
NN
2184ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2185if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2186 (eval $ac_link_default) 2>&5
2187 ac_status=$?
2188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2189 (exit $ac_status); }; then
2190 # Find the output, starting from the most likely. This scheme is
2191# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2192# resort.
2193
2194# Be careful to initialize this variable, since it used to be cached.
2195# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2196ac_cv_exeext=
2197# b.out is created by i960 compilers.
2198for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2199do
2200 test -f "$ac_file" || continue
2201 case $ac_file in
2202 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
86da66b5 2203 ;;
ba479fd2 2204 conftest.$ac_ext )
86da66b5
HPN
2205 # This is the source file.
2206 ;;
ba479fd2 2207 [ab].out )
86da66b5
HPN
2208 # We found the default executable, but exeext='' is most
2209 # certainly right.
2210 break;;
ba479fd2 2211 *.* )
86da66b5
HPN
2212 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2213 # FIXME: I believe we export ac_cv_exeext for Libtool,
2214 # but it would be cool to find out if it's true. Does anybody
2215 # maintain Libtool? --akim.
2216 export ac_cv_exeext
2217 break;;
ba479fd2 2218 * )
86da66b5 2219 break;;
ba479fd2
NN
2220 esac
2221done
2222else
2223 echo "$as_me: failed program was:" >&5
2224sed 's/^/| /' conftest.$ac_ext >&5
2225
2226{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2227See \`config.log' for more details." >&5
2228echo "$as_me: error: C compiler cannot create executables
2229See \`config.log' for more details." >&2;}
2230 { (exit 77); exit 77; }; }
2231fi
2232
2233ac_exeext=$ac_cv_exeext
2234echo "$as_me:$LINENO: result: $ac_file" >&5
2235echo "${ECHO_T}$ac_file" >&6
2236
2237# Check the compiler produces executables we can run. If not, either
2238# the compiler is broken, or we cross compile.
2239echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2240echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2241# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2242# If not cross compiling, check that we can run a simple program.
2243if test "$cross_compiling" != yes; then
2244 if { ac_try='./$ac_file'
2245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2246 (eval $ac_try) 2>&5
2247 ac_status=$?
2248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2249 (exit $ac_status); }; }; then
2250 cross_compiling=no
6e3f3080 2251 else
ba479fd2
NN
2252 if test "$cross_compiling" = maybe; then
2253 cross_compiling=yes
2254 else
2255 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2256If you meant to cross compile, use \`--host'.
2257See \`config.log' for more details." >&5
2258echo "$as_me: error: cannot run C compiled programs.
2259If you meant to cross compile, use \`--host'.
2260See \`config.log' for more details." >&2;}
2261 { (exit 1); exit 1; }; }
2262 fi
6e3f3080
NN
2263 fi
2264fi
ba479fd2
NN
2265echo "$as_me:$LINENO: result: yes" >&5
2266echo "${ECHO_T}yes" >&6
2267
2268rm -f a.out a.exe conftest$ac_cv_exeext b.out
2269ac_clean_files=$ac_clean_files_save
2270# Check the compiler produces executables we can run. If not, either
2271# the compiler is broken, or we cross compile.
2272echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2273echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2274echo "$as_me:$LINENO: result: $cross_compiling" >&5
2275echo "${ECHO_T}$cross_compiling" >&6
2276
2277echo "$as_me:$LINENO: checking for suffix of executables" >&5
2278echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2279if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2280 (eval $ac_link) 2>&5
2281 ac_status=$?
2282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2283 (exit $ac_status); }; then
2284 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2285# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2286# work properly (i.e., refer to `conftest.exe'), while it won't with
2287# `rm'.
2288for ac_file in conftest.exe conftest conftest.*; do
2289 test -f "$ac_file" || continue
2290 case $ac_file in
2291 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2292 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
86da66b5
HPN
2293 export ac_cv_exeext
2294 break;;
ba479fd2
NN
2295 * ) break;;
2296 esac
2297done
e9a25f70 2298else
ba479fd2
NN
2299 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2300See \`config.log' for more details." >&5
2301echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2302See \`config.log' for more details." >&2;}
2303 { (exit 1); exit 1; }; }
2304fi
2305
2306rm -f conftest$ac_cv_exeext
2307echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2308echo "${ECHO_T}$ac_cv_exeext" >&6
2309
2310rm -f conftest.$ac_ext
2311EXEEXT=$ac_cv_exeext
2312ac_exeext=$EXEEXT
2313echo "$as_me:$LINENO: checking for suffix of object files" >&5
2314echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2315if test "${ac_cv_objext+set}" = set; then
2316 echo $ECHO_N "(cached) $ECHO_C" >&6
2317else
2318 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2319/* confdefs.h. */
2320_ACEOF
2321cat confdefs.h >>conftest.$ac_ext
2322cat >>conftest.$ac_ext <<_ACEOF
2323/* end confdefs.h. */
2324
2325int
2326main ()
2327{
6e3f3080 2328
ba479fd2
NN
2329 ;
2330 return 0;
2331}
2332_ACEOF
2333rm -f conftest.o conftest.obj
2334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2335 (eval $ac_compile) 2>&5
2336 ac_status=$?
2337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2338 (exit $ac_status); }; then
2339 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2340 case $ac_file in
2341 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2342 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2343 break;;
2344 esac
2345done
63cf211a 2346else
ba479fd2
NN
2347 echo "$as_me: failed program was:" >&5
2348sed 's/^/| /' conftest.$ac_ext >&5
2349
2350{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2351See \`config.log' for more details." >&5
2352echo "$as_me: error: cannot compute suffix of object files: cannot compile
2353See \`config.log' for more details." >&2;}
2354 { (exit 1); exit 1; }; }
2355fi
2356
2357rm -f conftest.$ac_cv_objext conftest.$ac_ext
2358fi
2359echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2360echo "${ECHO_T}$ac_cv_objext" >&6
2361OBJEXT=$ac_cv_objext
2362ac_objext=$OBJEXT
2363echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2364echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2365if test "${ac_cv_c_compiler_gnu+set}" = set; then
2366 echo $ECHO_N "(cached) $ECHO_C" >&6
2367else
2368 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2369/* confdefs.h. */
2370_ACEOF
2371cat confdefs.h >>conftest.$ac_ext
2372cat >>conftest.$ac_ext <<_ACEOF
2373/* end confdefs.h. */
2374
2375int
2376main ()
2377{
2378#ifndef __GNUC__
2379 choke me
2380#endif
6e3f3080 2381
ba479fd2
NN
2382 ;
2383 return 0;
2384}
2385_ACEOF
2386rm -f conftest.$ac_objext
2387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2388 (eval $ac_compile) 2>conftest.er1
ba479fd2 2389 ac_status=$?
86da66b5
HPN
2390 grep -v '^ *+' conftest.er1 >conftest.err
2391 rm -f conftest.er1
2392 cat conftest.err >&5
ba479fd2
NN
2393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2394 (exit $ac_status); } &&
d7974fe6
KC
2395 { ac_try='test -z "$ac_c_werror_flag"
2396 || test ! -s conftest.err'
86da66b5
HPN
2397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2398 (eval $ac_try) 2>&5
2399 ac_status=$?
2400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2401 (exit $ac_status); }; } &&
2402 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2404 (eval $ac_try) 2>&5
2405 ac_status=$?
2406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2407 (exit $ac_status); }; }; then
2408 ac_compiler_gnu=yes
2409else
2410 echo "$as_me: failed program was:" >&5
2411sed 's/^/| /' conftest.$ac_ext >&5
2412
2413ac_compiler_gnu=no
2414fi
86da66b5 2415rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2416ac_cv_c_compiler_gnu=$ac_compiler_gnu
2417
2418fi
2419echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2420echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2421GCC=`test $ac_compiler_gnu = yes && echo yes`
2422ac_test_CFLAGS=${CFLAGS+set}
2423ac_save_CFLAGS=$CFLAGS
2424CFLAGS="-g"
2425echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2426echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2427if test "${ac_cv_prog_cc_g+set}" = set; then
2428 echo $ECHO_N "(cached) $ECHO_C" >&6
2429else
2430 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2431/* confdefs.h. */
2432_ACEOF
2433cat confdefs.h >>conftest.$ac_ext
2434cat >>conftest.$ac_ext <<_ACEOF
2435/* end confdefs.h. */
2436
2437int
2438main ()
2439{
2440
2441 ;
2442 return 0;
2443}
2444_ACEOF
2445rm -f conftest.$ac_objext
2446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2447 (eval $ac_compile) 2>conftest.er1
ba479fd2 2448 ac_status=$?
86da66b5
HPN
2449 grep -v '^ *+' conftest.er1 >conftest.err
2450 rm -f conftest.er1
2451 cat conftest.err >&5
ba479fd2
NN
2452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2453 (exit $ac_status); } &&
d7974fe6
KC
2454 { ac_try='test -z "$ac_c_werror_flag"
2455 || test ! -s conftest.err'
86da66b5
HPN
2456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2457 (eval $ac_try) 2>&5
2458 ac_status=$?
2459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2460 (exit $ac_status); }; } &&
2461 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2463 (eval $ac_try) 2>&5
2464 ac_status=$?
2465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2466 (exit $ac_status); }; }; then
6e3f3080
NN
2467 ac_cv_prog_cc_g=yes
2468else
ba479fd2
NN
2469 echo "$as_me: failed program was:" >&5
2470sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2471
ba479fd2 2472ac_cv_prog_cc_g=no
6e3f3080 2473fi
86da66b5 2474rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2475fi
2476echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2477echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2478if test "$ac_test_CFLAGS" = set; then
ba479fd2 2479 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2480elif test $ac_cv_prog_cc_g = yes; then
2481 if test "$GCC" = yes; then
e9a25f70
JL
2482 CFLAGS="-g -O2"
2483 else
cd9e5e7c 2484 CFLAGS="-g"
81814e35 2485 fi
3723cad9 2486else
cd9e5e7c
MK
2487 if test "$GCC" = yes; then
2488 CFLAGS="-O2"
2489 else
2490 CFLAGS=
2491 fi
e9a25f70 2492fi
ba479fd2
NN
2493echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2494echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2495if test "${ac_cv_prog_cc_stdc+set}" = set; then
2496 echo $ECHO_N "(cached) $ECHO_C" >&6
2497else
2498 ac_cv_prog_cc_stdc=no
2499ac_save_CC=$CC
2500cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2501/* confdefs.h. */
2502_ACEOF
2503cat confdefs.h >>conftest.$ac_ext
2504cat >>conftest.$ac_ext <<_ACEOF
2505/* end confdefs.h. */
2506#include <stdarg.h>
2507#include <stdio.h>
2508#include <sys/types.h>
2509#include <sys/stat.h>
2510/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2511struct buf { int x; };
2512FILE * (*rcsopen) (struct buf *, struct stat *, int);
2513static char *e (p, i)
2514 char **p;
2515 int i;
2516{
2517 return p[i];
2518}
2519static char *f (char * (*g) (char **, int), char **p, ...)
2520{
2521 char *s;
2522 va_list v;
2523 va_start (v,p);
2524 s = g (p, va_arg (v,int));
2525 va_end (v);
2526 return s;
2527}
86da66b5
HPN
2528
2529/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2530 function prototypes and stuff, but not '\xHH' hex character constants.
2531 These don't provoke an error unfortunately, instead are silently treated
2532 as 'x'. The following induces an error, until -std1 is added to get
2533 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2534 array size at least. It's necessary to write '\x00'==0 to get something
2535 that's true only with -std1. */
2536int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2537
ba479fd2
NN
2538int test (int i, double x);
2539struct s1 {int (*f) (int a);};
2540struct s2 {int (*f) (double a);};
2541int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2542int argc;
2543char **argv;
2544int
2545main ()
2546{
2547return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2548 ;
2549 return 0;
2550}
2551_ACEOF
2552# Don't try gcc -ansi; that turns off useful extensions and
2553# breaks some systems' header files.
2554# AIX -qlanglvl=ansi
2555# Ultrix and OSF/1 -std1
2556# HP-UX 10.20 and later -Ae
2557# HP-UX older versions -Aa -D_HPUX_SOURCE
2558# SVR4 -Xc -D__EXTENSIONS__
2559for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2560do
2561 CC="$ac_save_CC $ac_arg"
2562 rm -f conftest.$ac_objext
2563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2564 (eval $ac_compile) 2>conftest.er1
ba479fd2 2565 ac_status=$?
86da66b5
HPN
2566 grep -v '^ *+' conftest.er1 >conftest.err
2567 rm -f conftest.er1
2568 cat conftest.err >&5
ba479fd2
NN
2569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2570 (exit $ac_status); } &&
d7974fe6
KC
2571 { ac_try='test -z "$ac_c_werror_flag"
2572 || test ! -s conftest.err'
86da66b5
HPN
2573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2574 (eval $ac_try) 2>&5
2575 ac_status=$?
2576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2577 (exit $ac_status); }; } &&
2578 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2580 (eval $ac_try) 2>&5
2581 ac_status=$?
2582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2583 (exit $ac_status); }; }; then
2584 ac_cv_prog_cc_stdc=$ac_arg
2585break
2586else
2587 echo "$as_me: failed program was:" >&5
2588sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2589
ba479fd2 2590fi
86da66b5 2591rm -f conftest.err conftest.$ac_objext
ba479fd2
NN
2592done
2593rm -f conftest.$ac_ext conftest.$ac_objext
2594CC=$ac_save_CC
2595
2596fi
2597
2598case "x$ac_cv_prog_cc_stdc" in
2599 x|xno)
2600 echo "$as_me:$LINENO: result: none needed" >&5
2601echo "${ECHO_T}none needed" >&6 ;;
2602 *)
2603 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2604echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2605 CC="$CC $ac_cv_prog_cc_stdc" ;;
2606esac
2607
2608# Some people use a C++ compiler to compile C. Since we use `exit',
2609# in C++ we need to declare it. In case someone uses the same compiler
2610# for both compiling C and C++ we need to have the C++ compiler decide
2611# the declaration of exit, since it's the most demanding environment.
2612cat >conftest.$ac_ext <<_ACEOF
2613#ifndef __cplusplus
2614 choke me
2615#endif
2616_ACEOF
2617rm -f conftest.$ac_objext
2618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2619 (eval $ac_compile) 2>conftest.er1
ba479fd2 2620 ac_status=$?
86da66b5
HPN
2621 grep -v '^ *+' conftest.er1 >conftest.err
2622 rm -f conftest.er1
2623 cat conftest.err >&5
ba479fd2
NN
2624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2625 (exit $ac_status); } &&
d7974fe6
KC
2626 { ac_try='test -z "$ac_c_werror_flag"
2627 || test ! -s conftest.err'
86da66b5
HPN
2628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2629 (eval $ac_try) 2>&5
2630 ac_status=$?
2631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2632 (exit $ac_status); }; } &&
2633 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2635 (eval $ac_try) 2>&5
2636 ac_status=$?
2637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2638 (exit $ac_status); }; }; then
2639 for ac_declaration in \
86da66b5 2640 '' \
ba479fd2
NN
2641 'extern "C" void std::exit (int) throw (); using std::exit;' \
2642 'extern "C" void std::exit (int); using std::exit;' \
2643 'extern "C" void exit (int) throw ();' \
2644 'extern "C" void exit (int);' \
2645 'void exit (int);'
2646do
2647 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2648/* confdefs.h. */
2649_ACEOF
2650cat confdefs.h >>conftest.$ac_ext
2651cat >>conftest.$ac_ext <<_ACEOF
2652/* end confdefs.h. */
33e70558 2653$ac_declaration
86da66b5 2654#include <stdlib.h>
ba479fd2
NN
2655int
2656main ()
2657{
2658exit (42);
2659 ;
2660 return 0;
2661}
2662_ACEOF
2663rm -f conftest.$ac_objext
2664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2665 (eval $ac_compile) 2>conftest.er1
ba479fd2 2666 ac_status=$?
86da66b5
HPN
2667 grep -v '^ *+' conftest.er1 >conftest.err
2668 rm -f conftest.er1
2669 cat conftest.err >&5
ba479fd2
NN
2670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2671 (exit $ac_status); } &&
d7974fe6
KC
2672 { ac_try='test -z "$ac_c_werror_flag"
2673 || test ! -s conftest.err'
86da66b5
HPN
2674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2675 (eval $ac_try) 2>&5
2676 ac_status=$?
2677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2678 (exit $ac_status); }; } &&
2679 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2681 (eval $ac_try) 2>&5
2682 ac_status=$?
2683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2684 (exit $ac_status); }; }; then
2685 :
2686else
2687 echo "$as_me: failed program was:" >&5
2688sed 's/^/| /' conftest.$ac_ext >&5
2689
2690continue
2691fi
86da66b5 2692rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 2693 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2694/* confdefs.h. */
2695_ACEOF
2696cat confdefs.h >>conftest.$ac_ext
2697cat >>conftest.$ac_ext <<_ACEOF
2698/* end confdefs.h. */
2699$ac_declaration
2700int
2701main ()
2702{
2703exit (42);
2704 ;
2705 return 0;
2706}
2707_ACEOF
2708rm -f conftest.$ac_objext
2709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2710 (eval $ac_compile) 2>conftest.er1
ba479fd2 2711 ac_status=$?
86da66b5
HPN
2712 grep -v '^ *+' conftest.er1 >conftest.err
2713 rm -f conftest.er1
2714 cat conftest.err >&5
ba479fd2
NN
2715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2716 (exit $ac_status); } &&
d7974fe6
KC
2717 { ac_try='test -z "$ac_c_werror_flag"
2718 || test ! -s conftest.err'
86da66b5
HPN
2719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2720 (eval $ac_try) 2>&5
2721 ac_status=$?
2722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2723 (exit $ac_status); }; } &&
2724 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2726 (eval $ac_try) 2>&5
2727 ac_status=$?
2728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2729 (exit $ac_status); }; }; then
2730 break
3ec83fc2 2731else
ba479fd2
NN
2732 echo "$as_me: failed program was:" >&5
2733sed 's/^/| /' conftest.$ac_ext >&5
2734
6e3f3080 2735fi
86da66b5 2736rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2737done
2738rm -f conftest*
2739if test -n "$ac_declaration"; then
2740 echo '#ifdef __cplusplus' >>confdefs.h
2741 echo $ac_declaration >>confdefs.h
2742 echo '#endif' >>confdefs.h
2743fi
2744
3ec83fc2 2745else
ba479fd2
NN
2746 echo "$as_me: failed program was:" >&5
2747sed 's/^/| /' conftest.$ac_ext >&5
2748
2749fi
86da66b5 2750rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2751ac_ext=c
2752ac_cpp='$CPP $CPPFLAGS'
2753ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2754ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2755ac_compiler_gnu=$ac_cv_c_compiler_gnu
2756
2757if test "x$CC" != xcc; then
2758 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2759echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2760else
2761 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2762echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2763fi
2764set dummy $CC; ac_cc=`echo $2 |
2765 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2766if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2767 echo $ECHO_N "(cached) $ECHO_C" >&6
2768else
2769 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2770/* confdefs.h. */
2771_ACEOF
2772cat confdefs.h >>conftest.$ac_ext
2773cat >>conftest.$ac_ext <<_ACEOF
2774/* end confdefs.h. */
2775
2776int
2777main ()
2778{
2779
2780 ;
2781 return 0;
2782}
2783_ACEOF
3ec83fc2
RH
2784# Make sure it works both with $CC and with simple cc.
2785# We do the test twice because some compilers refuse to overwrite an
2786# existing .o file with -o, though they will create one.
ba479fd2
NN
2787ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2788if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2789 (eval $ac_try) 2>&5
2790 ac_status=$?
2791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2792 (exit $ac_status); } &&
2793 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2794 (eval $ac_try) 2>&5
2795 ac_status=$?
2796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2797 (exit $ac_status); };
3ec83fc2
RH
2798then
2799 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2800 if test "x$CC" != xcc; then
2801 # Test first that cc exists at all.
ba479fd2
NN
2802 if { ac_try='cc -c conftest.$ac_ext >&5'
2803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2804 (eval $ac_try) 2>&5
2805 ac_status=$?
2806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2807 (exit $ac_status); }; }; then
2808 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2809 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2810 (eval $ac_try) 2>&5
2811 ac_status=$?
2812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2813 (exit $ac_status); } &&
2814 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2815 (eval $ac_try) 2>&5
2816 ac_status=$?
2817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2818 (exit $ac_status); };
3ec83fc2 2819 then
86da66b5
HPN
2820 # cc works too.
2821 :
3ec83fc2 2822 else
86da66b5
HPN
2823 # cc exists but doesn't like -o.
2824 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2825 fi
2826 fi
2827 fi
2828else
2829 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2830fi
2831rm -f conftest*
2832
2833fi
2834if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2835 echo "$as_me:$LINENO: result: yes" >&5
2836echo "${ECHO_T}yes" >&6
3ec83fc2 2837else
ba479fd2
NN
2838 echo "$as_me:$LINENO: result: no" >&5
2839echo "${ECHO_T}no" >&6
2840
2841cat >>confdefs.h <<\_ACEOF
3ec83fc2 2842#define NO_MINUS_C_MINUS_O 1
ba479fd2 2843_ACEOF
3ec83fc2
RH
2844
2845fi
2846
3b620440
KC
2847# expand $ac_aux_dir to an absolute path
2848am_aux_dir=`cd $ac_aux_dir && pwd`
2849
2850# FIXME: we rely on the cache variable name because
2851# there is no other way.
2852set dummy $CC
2853ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2854if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2855 # Losing compiler, so override with the script.
2856 # FIXME: It is wrong to rewrite CC.
2857 # But if we don't then we get into trouble of one sort or another.
2858 # A longer-term fix would be to have automake use am__CC in this case,
2859 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2860 CC="$am_aux_dir/compile $CC"
2861fi
2862
414d23ae
HPN
2863# autoconf is lame and doesn't give us any substitution variable for this.
2864if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2865 NO_MINUS_C_MINUS_O=yes
2866else
2867 OUTPUT_OPTION='-o $@'
2868fi
2869
2870
2871
73458fb7
NN
2872# -------------------------
2873# Check C compiler features
2874# -------------------------
2875
ba479fd2
NN
2876ac_ext=c
2877ac_cpp='$CPP $CPPFLAGS'
2878ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2879ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2880ac_compiler_gnu=$ac_cv_c_compiler_gnu
2881echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2882echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2883# On Suns, sometimes $CPP names a directory.
2884if test -n "$CPP" && test -d "$CPP"; then
2885 CPP=
2886fi
2887if test -z "$CPP"; then
ba479fd2
NN
2888 if test "${ac_cv_prog_CPP+set}" = set; then
2889 echo $ECHO_N "(cached) $ECHO_C" >&6
2890else
2891 # Double quotes because CPP needs to be expanded
2892 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2893 do
2894 ac_preproc_ok=false
2895for ac_c_preproc_warn_flag in '' yes
2896do
2897 # Use a header file that comes with gcc, so configuring glibc
2898 # with a fresh cross-compiler works.
2899 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2900 # <limits.h> exists even on freestanding compilers.
84c041a1 2901 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2902 # not just through cpp. "Syntax error" is here to catch this case.
2903 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2904/* confdefs.h. */
2905_ACEOF
2906cat confdefs.h >>conftest.$ac_ext
2907cat >>conftest.$ac_ext <<_ACEOF
2908/* end confdefs.h. */
2909#ifdef __STDC__
2910# include <limits.h>
2911#else
2912# include <assert.h>
2913#endif
86da66b5 2914 Syntax error
ba479fd2
NN
2915_ACEOF
2916if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2917 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2918 ac_status=$?
2919 grep -v '^ *+' conftest.er1 >conftest.err
2920 rm -f conftest.er1
2921 cat conftest.err >&5
2922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2923 (exit $ac_status); } >/dev/null; then
2924 if test -s conftest.err; then
2925 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2926 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2927 else
2928 ac_cpp_err=
2929 fi
2930else
2931 ac_cpp_err=yes
2932fi
2933if test -z "$ac_cpp_err"; then
093e61a6 2934 :
cafe096b 2935else
ba479fd2
NN
2936 echo "$as_me: failed program was:" >&5
2937sed 's/^/| /' conftest.$ac_ext >&5
2938
2939 # Broken: fails on valid input.
2940continue
2941fi
2942rm -f conftest.err conftest.$ac_ext
2943
2944 # OK, works on sane cases. Now check whether non-existent headers
2945 # can be detected and how.
2946 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2947/* confdefs.h. */
2948_ACEOF
2949cat confdefs.h >>conftest.$ac_ext
2950cat >>conftest.$ac_ext <<_ACEOF
2951/* end confdefs.h. */
2952#include <ac_nonexistent.h>
2953_ACEOF
2954if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2955 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2956 ac_status=$?
2957 grep -v '^ *+' conftest.er1 >conftest.err
2958 rm -f conftest.er1
2959 cat conftest.err >&5
2960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2961 (exit $ac_status); } >/dev/null; then
2962 if test -s conftest.err; then
2963 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2964 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2965 else
2966 ac_cpp_err=
2967 fi
2968else
2969 ac_cpp_err=yes
2970fi
2971if test -z "$ac_cpp_err"; then
2972 # Broken: success on invalid input.
2973continue
2974else
2975 echo "$as_me: failed program was:" >&5
2976sed 's/^/| /' conftest.$ac_ext >&5
2977
2978 # Passes both tests.
2979ac_preproc_ok=:
2980break
2981fi
2982rm -f conftest.err conftest.$ac_ext
2983
2984done
2985# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2986rm -f conftest.err conftest.$ac_ext
2987if $ac_preproc_ok; then
2988 break
2989fi
2990
2991 done
2992 ac_cv_prog_CPP=$CPP
2993
2994fi
2995 CPP=$ac_cv_prog_CPP
2996else
2997 ac_cv_prog_CPP=$CPP
2998fi
2999echo "$as_me:$LINENO: result: $CPP" >&5
3000echo "${ECHO_T}$CPP" >&6
3001ac_preproc_ok=false
3002for ac_c_preproc_warn_flag in '' yes
3003do
3004 # Use a header file that comes with gcc, so configuring glibc
3005 # with a fresh cross-compiler works.
3006 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3007 # <limits.h> exists even on freestanding compilers.
3008 # On the NeXT, cc -E runs the code through the compiler's parser,
3009 # not just through cpp. "Syntax error" is here to catch this case.
3010 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3011/* confdefs.h. */
3012_ACEOF
3013cat confdefs.h >>conftest.$ac_ext
3014cat >>conftest.$ac_ext <<_ACEOF
3015/* end confdefs.h. */
3016#ifdef __STDC__
3017# include <limits.h>
3018#else
3019# include <assert.h>
3020#endif
86da66b5 3021 Syntax error
ba479fd2
NN
3022_ACEOF
3023if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3024 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3025 ac_status=$?
3026 grep -v '^ *+' conftest.er1 >conftest.err
3027 rm -f conftest.er1
3028 cat conftest.err >&5
3029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3030 (exit $ac_status); } >/dev/null; then
3031 if test -s conftest.err; then
3032 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3033 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3034 else
3035 ac_cpp_err=
3036 fi
3037else
3038 ac_cpp_err=yes
3039fi
3040if test -z "$ac_cpp_err"; then
6e3f3080 3041 :
414d23ae 3042else
ba479fd2
NN
3043 echo "$as_me: failed program was:" >&5
3044sed 's/^/| /' conftest.$ac_ext >&5
3045
3046 # Broken: fails on valid input.
3047continue
3048fi
3049rm -f conftest.err conftest.$ac_ext
3050
3051 # OK, works on sane cases. Now check whether non-existent headers
3052 # can be detected and how.
3053 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3054/* confdefs.h. */
3055_ACEOF
3056cat confdefs.h >>conftest.$ac_ext
3057cat >>conftest.$ac_ext <<_ACEOF
3058/* end confdefs.h. */
3059#include <ac_nonexistent.h>
3060_ACEOF
3061if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3062 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3063 ac_status=$?
3064 grep -v '^ *+' conftest.er1 >conftest.err
3065 rm -f conftest.er1
3066 cat conftest.err >&5
3067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3068 (exit $ac_status); } >/dev/null; then
3069 if test -s conftest.err; then
3070 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3071 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3072 else
3073 ac_cpp_err=
3074 fi
6e3f3080 3075else
ba479fd2 3076 ac_cpp_err=yes
63cf211a 3077fi
ba479fd2
NN
3078if test -z "$ac_cpp_err"; then
3079 # Broken: success on invalid input.
3080continue
3081else
3082 echo "$as_me: failed program was:" >&5
3083sed 's/^/| /' conftest.$ac_ext >&5
3084
3085 # Passes both tests.
3086ac_preproc_ok=:
3087break
63cf211a 3088fi
ba479fd2
NN
3089rm -f conftest.err conftest.$ac_ext
3090
3091done
3092# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3093rm -f conftest.err conftest.$ac_ext
3094if $ac_preproc_ok; then
3095 :
6e3f3080 3096else
ba479fd2
NN
3097 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3098See \`config.log' for more details." >&5
3099echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3100See \`config.log' for more details." >&2;}
3101 { (exit 1); exit 1; }; }
6e3f3080
NN
3102fi
3103
ba479fd2
NN
3104ac_ext=c
3105ac_cpp='$CPP $CPPFLAGS'
3106ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3107ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3108ac_compiler_gnu=$ac_cv_c_compiler_gnu
3109
b5472e1d 3110
ba479fd2
NN
3111echo "$as_me:$LINENO: checking for inline" >&5
3112echo $ECHO_N "checking for inline... $ECHO_C" >&6
3113if test "${ac_cv_c_inline+set}" = set; then
3114 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3115else
3116 ac_cv_c_inline=no
3117for ac_kw in inline __inline__ __inline; do
ba479fd2 3118 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3119/* confdefs.h. */
3120_ACEOF
3121cat confdefs.h >>conftest.$ac_ext
3122cat >>conftest.$ac_ext <<_ACEOF
3123/* end confdefs.h. */
3124#ifndef __cplusplus
3125typedef int foo_t;
3126static $ac_kw foo_t static_foo () {return 0; }
3127$ac_kw foo_t foo () {return 0; }
3128#endif
414d23ae 3129
ba479fd2
NN
3130_ACEOF
3131rm -f conftest.$ac_objext
3132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3133 (eval $ac_compile) 2>conftest.er1
ba479fd2 3134 ac_status=$?
86da66b5
HPN
3135 grep -v '^ *+' conftest.er1 >conftest.err
3136 rm -f conftest.er1
3137 cat conftest.err >&5
ba479fd2
NN
3138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3139 (exit $ac_status); } &&
d7974fe6
KC
3140 { ac_try='test -z "$ac_c_werror_flag"
3141 || test ! -s conftest.err'
86da66b5
HPN
3142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3143 (eval $ac_try) 2>&5
3144 ac_status=$?
3145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3146 (exit $ac_status); }; } &&
3147 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3149 (eval $ac_try) 2>&5
3150 ac_status=$?
3151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3152 (exit $ac_status); }; }; then
414d23ae
HPN
3153 ac_cv_c_inline=$ac_kw; break
3154else
ba479fd2
NN
3155 echo "$as_me: failed program was:" >&5
3156sed 's/^/| /' conftest.$ac_ext >&5
3157
414d23ae 3158fi
86da66b5 3159rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3160done
3161
3162fi
ba479fd2
NN
3163echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3164echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3165
3166
ba479fd2 3167case $ac_cv_c_inline in
414d23ae 3168 inline | yes) ;;
86da66b5
HPN
3169 *)
3170 case $ac_cv_c_inline in
3171 no) ac_val=;;
3172 *) ac_val=$ac_cv_c_inline;;
3173 esac
3174 cat >>confdefs.h <<_ACEOF
3175#ifndef __cplusplus
3176#define inline $ac_val
3177#endif
ba479fd2 3178_ACEOF
86da66b5 3179 ;;
414d23ae
HPN
3180esac
3181
414d23ae 3182
414d23ae 3183# sizeof(char) is 1 by definition.
bf3b7cd3
JD
3184
3185echo "$as_me:$LINENO: checking for egrep" >&5
3186echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3187if test "${ac_cv_prog_egrep+set}" = set; then
3188 echo $ECHO_N "(cached) $ECHO_C" >&6
3189else
3190 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3191 then ac_cv_prog_egrep='grep -E'
3192 else ac_cv_prog_egrep='egrep'
3193 fi
3194fi
3195echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3196echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3197 EGREP=$ac_cv_prog_egrep
3198
3199
3200echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3201echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3202if test "${ac_cv_header_stdc+set}" = set; then
3203 echo $ECHO_N "(cached) $ECHO_C" >&6
3204else
3205 cat >conftest.$ac_ext <<_ACEOF
3206/* confdefs.h. */
3207_ACEOF
3208cat confdefs.h >>conftest.$ac_ext
3209cat >>conftest.$ac_ext <<_ACEOF
3210/* end confdefs.h. */
3211#include <stdlib.h>
3212#include <stdarg.h>
3213#include <string.h>
3214#include <float.h>
3215
3216int
3217main ()
3218{
3219
3220 ;
3221 return 0;
3222}
3223_ACEOF
3224rm -f conftest.$ac_objext
3225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3226 (eval $ac_compile) 2>conftest.er1
3227 ac_status=$?
3228 grep -v '^ *+' conftest.er1 >conftest.err
3229 rm -f conftest.er1
3230 cat conftest.err >&5
3231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3232 (exit $ac_status); } &&
d7974fe6
KC
3233 { ac_try='test -z "$ac_c_werror_flag"
3234 || test ! -s conftest.err'
bf3b7cd3
JD
3235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3236 (eval $ac_try) 2>&5
3237 ac_status=$?
3238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3239 (exit $ac_status); }; } &&
3240 { ac_try='test -s conftest.$ac_objext'
3241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3242 (eval $ac_try) 2>&5
3243 ac_status=$?
3244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3245 (exit $ac_status); }; }; then
3246 ac_cv_header_stdc=yes
3247else
3248 echo "$as_me: failed program was:" >&5
3249sed 's/^/| /' conftest.$ac_ext >&5
3250
3251ac_cv_header_stdc=no
3252fi
3253rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3254
3255if test $ac_cv_header_stdc = yes; then
3256 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3257 cat >conftest.$ac_ext <<_ACEOF
3258/* confdefs.h. */
3259_ACEOF
3260cat confdefs.h >>conftest.$ac_ext
3261cat >>conftest.$ac_ext <<_ACEOF
3262/* end confdefs.h. */
3263#include <string.h>
3264
3265_ACEOF
3266if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3267 $EGREP "memchr" >/dev/null 2>&1; then
3268 :
3269else
3270 ac_cv_header_stdc=no
3271fi
3272rm -f conftest*
3273
3274fi
3275
3276if test $ac_cv_header_stdc = yes; then
3277 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3278 cat >conftest.$ac_ext <<_ACEOF
3279/* confdefs.h. */
3280_ACEOF
3281cat confdefs.h >>conftest.$ac_ext
3282cat >>conftest.$ac_ext <<_ACEOF
3283/* end confdefs.h. */
3284#include <stdlib.h>
3285
3286_ACEOF
3287if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3288 $EGREP "free" >/dev/null 2>&1; then
3289 :
3290else
3291 ac_cv_header_stdc=no
3292fi
3293rm -f conftest*
3294
3295fi
3296
3297if test $ac_cv_header_stdc = yes; then
3298 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3299 if test "$cross_compiling" = yes; then
3300 :
3301else
3302 cat >conftest.$ac_ext <<_ACEOF
3303/* confdefs.h. */
3304_ACEOF
3305cat confdefs.h >>conftest.$ac_ext
3306cat >>conftest.$ac_ext <<_ACEOF
3307/* end confdefs.h. */
3308#include <ctype.h>
3309#if ((' ' & 0x0FF) == 0x020)
3310# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3311# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3312#else
3313# define ISLOWER(c) \
3314 (('a' <= (c) && (c) <= 'i') \
3315 || ('j' <= (c) && (c) <= 'r') \
3316 || ('s' <= (c) && (c) <= 'z'))
3317# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3318#endif
3319
3320#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3321int
3322main ()
3323{
3324 int i;
3325 for (i = 0; i < 256; i++)
3326 if (XOR (islower (i), ISLOWER (i))
3327 || toupper (i) != TOUPPER (i))
3328 exit(2);
3329 exit (0);
3330}
3331_ACEOF
3332rm -f conftest$ac_exeext
3333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3334 (eval $ac_link) 2>&5
3335 ac_status=$?
3336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3339 (eval $ac_try) 2>&5
3340 ac_status=$?
3341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3342 (exit $ac_status); }; }; then
3343 :
3344else
3345 echo "$as_me: program exited with status $ac_status" >&5
3346echo "$as_me: failed program was:" >&5
3347sed 's/^/| /' conftest.$ac_ext >&5
3348
3349( exit $ac_status )
3350ac_cv_header_stdc=no
3351fi
3352rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3353fi
3354fi
3355fi
3356echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3357echo "${ECHO_T}$ac_cv_header_stdc" >&6
3358if test $ac_cv_header_stdc = yes; then
3359
3360cat >>confdefs.h <<\_ACEOF
3361#define STDC_HEADERS 1
3362_ACEOF
3363
3364fi
3365
3366# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3377 inttypes.h stdint.h unistd.h
3378do
3379as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3380echo "$as_me:$LINENO: checking for $ac_header" >&5
3381echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3382if eval "test \"\${$as_ac_Header+set}\" = set"; then
3383 echo $ECHO_N "(cached) $ECHO_C" >&6
3384else
3385 cat >conftest.$ac_ext <<_ACEOF
3386/* confdefs.h. */
3387_ACEOF
3388cat confdefs.h >>conftest.$ac_ext
3389cat >>conftest.$ac_ext <<_ACEOF
3390/* end confdefs.h. */
3391$ac_includes_default
3392
3393#include <$ac_header>
3394_ACEOF
3395rm -f conftest.$ac_objext
3396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3397 (eval $ac_compile) 2>conftest.er1
3398 ac_status=$?
3399 grep -v '^ *+' conftest.er1 >conftest.err
3400 rm -f conftest.er1
3401 cat conftest.err >&5
3402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3403 (exit $ac_status); } &&
d7974fe6
KC
3404 { ac_try='test -z "$ac_c_werror_flag"
3405 || test ! -s conftest.err'
bf3b7cd3
JD
3406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3407 (eval $ac_try) 2>&5
3408 ac_status=$?
3409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3410 (exit $ac_status); }; } &&
3411 { ac_try='test -s conftest.$ac_objext'
3412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3413 (eval $ac_try) 2>&5
3414 ac_status=$?
3415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3416 (exit $ac_status); }; }; then
3417 eval "$as_ac_Header=yes"
3418else
3419 echo "$as_me: failed program was:" >&5
3420sed 's/^/| /' conftest.$ac_ext >&5
3421
3422eval "$as_ac_Header=no"
3423fi
3424rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3425fi
3426echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3427echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3428if test `eval echo '${'$as_ac_Header'}'` = yes; then
3429 cat >>confdefs.h <<_ACEOF
3430#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3431_ACEOF
3432
3433fi
3434
3435done
3436
3437
3438echo "$as_me:$LINENO: checking for void *" >&5
3439echo $ECHO_N "checking for void *... $ECHO_C" >&6
3440if test "${ac_cv_type_void_p+set}" = set; then
3441 echo $ECHO_N "(cached) $ECHO_C" >&6
3442else
3443 cat >conftest.$ac_ext <<_ACEOF
3444/* confdefs.h. */
3445_ACEOF
3446cat confdefs.h >>conftest.$ac_ext
3447cat >>conftest.$ac_ext <<_ACEOF
3448/* end confdefs.h. */
3449$ac_includes_default
3450int
3451main ()
3452{
3453if ((void * *) 0)
3454 return 0;
3455if (sizeof (void *))
3456 return 0;
3457 ;
3458 return 0;
3459}
3460_ACEOF
3461rm -f conftest.$ac_objext
3462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3463 (eval $ac_compile) 2>conftest.er1
3464 ac_status=$?
3465 grep -v '^ *+' conftest.er1 >conftest.err
3466 rm -f conftest.er1
3467 cat conftest.err >&5
3468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3469 (exit $ac_status); } &&
d7974fe6
KC
3470 { ac_try='test -z "$ac_c_werror_flag"
3471 || test ! -s conftest.err'
bf3b7cd3
JD
3472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3473 (eval $ac_try) 2>&5
3474 ac_status=$?
3475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3476 (exit $ac_status); }; } &&
3477 { ac_try='test -s conftest.$ac_objext'
3478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3479 (eval $ac_try) 2>&5
3480 ac_status=$?
3481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3482 (exit $ac_status); }; }; then
3483 ac_cv_type_void_p=yes
3484else
3485 echo "$as_me: failed program was:" >&5
3486sed 's/^/| /' conftest.$ac_ext >&5
3487
3488ac_cv_type_void_p=no
3489fi
3490rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3491fi
3492echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3493echo "${ECHO_T}$ac_cv_type_void_p" >&6
3494
ba479fd2
NN
3495echo "$as_me:$LINENO: checking size of void *" >&5
3496echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3497if test "${ac_cv_sizeof_void_p+set}" = set; then
3498 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 3499else
bf3b7cd3
JD
3500 if test "$ac_cv_type_void_p" = yes; then
3501 # The cast to unsigned long works around a bug in the HP C Compiler
3502 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3503 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3504 # This bug is HP SR number 8606223364.
3505 if test "$cross_compiling" = yes; then
3506 # Depending upon the size, compute the lo and hi bounds.
3507cat >conftest.$ac_ext <<_ACEOF
3508/* confdefs.h. */
3509_ACEOF
3510cat confdefs.h >>conftest.$ac_ext
3511cat >>conftest.$ac_ext <<_ACEOF
3512/* end confdefs.h. */
3513$ac_includes_default
3514int
3515main ()
3516{
3517static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
3518test_array [0] = 0
3519
3520 ;
3521 return 0;
3522}
3523_ACEOF
3524rm -f conftest.$ac_objext
3525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3526 (eval $ac_compile) 2>conftest.er1
3527 ac_status=$?
3528 grep -v '^ *+' conftest.er1 >conftest.err
3529 rm -f conftest.er1
3530 cat conftest.err >&5
3531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3532 (exit $ac_status); } &&
d7974fe6
KC
3533 { ac_try='test -z "$ac_c_werror_flag"
3534 || test ! -s conftest.err'
bf3b7cd3
JD
3535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3536 (eval $ac_try) 2>&5
3537 ac_status=$?
3538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3539 (exit $ac_status); }; } &&
3540 { ac_try='test -s conftest.$ac_objext'
3541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3542 (eval $ac_try) 2>&5
3543 ac_status=$?
3544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3545 (exit $ac_status); }; }; then
3546 ac_lo=0 ac_mid=0
3547 while :; do
3548 cat >conftest.$ac_ext <<_ACEOF
3549/* confdefs.h. */
3550_ACEOF
3551cat confdefs.h >>conftest.$ac_ext
3552cat >>conftest.$ac_ext <<_ACEOF
3553/* end confdefs.h. */
3554$ac_includes_default
3555int
3556main ()
3557{
3558static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3559test_array [0] = 0
3560
3561 ;
3562 return 0;
3563}
3564_ACEOF
3565rm -f conftest.$ac_objext
3566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3567 (eval $ac_compile) 2>conftest.er1
3568 ac_status=$?
3569 grep -v '^ *+' conftest.er1 >conftest.err
3570 rm -f conftest.er1
3571 cat conftest.err >&5
3572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3573 (exit $ac_status); } &&
d7974fe6
KC
3574 { ac_try='test -z "$ac_c_werror_flag"
3575 || test ! -s conftest.err'
bf3b7cd3
JD
3576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3577 (eval $ac_try) 2>&5
3578 ac_status=$?
3579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3580 (exit $ac_status); }; } &&
3581 { ac_try='test -s conftest.$ac_objext'
3582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3583 (eval $ac_try) 2>&5
3584 ac_status=$?
3585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3586 (exit $ac_status); }; }; then
3587 ac_hi=$ac_mid; break
3588else
3589 echo "$as_me: failed program was:" >&5
3590sed 's/^/| /' conftest.$ac_ext >&5
3591
3592ac_lo=`expr $ac_mid + 1`
3593 if test $ac_lo -le $ac_mid; then
3594 ac_lo= ac_hi=
3595 break
3596 fi
3597 ac_mid=`expr 2 '*' $ac_mid + 1`
3598fi
3599rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3600 done
3601else
3602 echo "$as_me: failed program was:" >&5
3603sed 's/^/| /' conftest.$ac_ext >&5
3604
3605cat >conftest.$ac_ext <<_ACEOF
3606/* confdefs.h. */
3607_ACEOF
3608cat confdefs.h >>conftest.$ac_ext
3609cat >>conftest.$ac_ext <<_ACEOF
3610/* end confdefs.h. */
3611$ac_includes_default
3612int
3613main ()
3614{
3615static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
3616test_array [0] = 0
3617
3618 ;
3619 return 0;
3620}
3621_ACEOF
3622rm -f conftest.$ac_objext
3623if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3624 (eval $ac_compile) 2>conftest.er1
3625 ac_status=$?
3626 grep -v '^ *+' conftest.er1 >conftest.err
3627 rm -f conftest.er1
3628 cat conftest.err >&5
3629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3630 (exit $ac_status); } &&
d7974fe6
KC
3631 { ac_try='test -z "$ac_c_werror_flag"
3632 || test ! -s conftest.err'
bf3b7cd3
JD
3633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3634 (eval $ac_try) 2>&5
3635 ac_status=$?
3636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3637 (exit $ac_status); }; } &&
3638 { ac_try='test -s conftest.$ac_objext'
3639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3640 (eval $ac_try) 2>&5
3641 ac_status=$?
3642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3643 (exit $ac_status); }; }; then
3644 ac_hi=-1 ac_mid=-1
3645 while :; do
3646 cat >conftest.$ac_ext <<_ACEOF
3647/* confdefs.h. */
3648_ACEOF
3649cat confdefs.h >>conftest.$ac_ext
3650cat >>conftest.$ac_ext <<_ACEOF
3651/* end confdefs.h. */
3652$ac_includes_default
3653int
3654main ()
3655{
3656static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
3657test_array [0] = 0
3658
3659 ;
3660 return 0;
3661}
3662_ACEOF
3663rm -f conftest.$ac_objext
3664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3665 (eval $ac_compile) 2>conftest.er1
3666 ac_status=$?
3667 grep -v '^ *+' conftest.er1 >conftest.err
3668 rm -f conftest.er1
3669 cat conftest.err >&5
3670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3671 (exit $ac_status); } &&
d7974fe6
KC
3672 { ac_try='test -z "$ac_c_werror_flag"
3673 || test ! -s conftest.err'
bf3b7cd3
JD
3674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3675 (eval $ac_try) 2>&5
3676 ac_status=$?
3677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3678 (exit $ac_status); }; } &&
3679 { ac_try='test -s conftest.$ac_objext'
3680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3681 (eval $ac_try) 2>&5
3682 ac_status=$?
3683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3684 (exit $ac_status); }; }; then
3685 ac_lo=$ac_mid; break
3686else
3687 echo "$as_me: failed program was:" >&5
3688sed 's/^/| /' conftest.$ac_ext >&5
3689
3690ac_hi=`expr '(' $ac_mid ')' - 1`
3691 if test $ac_mid -le $ac_hi; then
3692 ac_lo= ac_hi=
3693 break
3694 fi
3695 ac_mid=`expr 2 '*' $ac_mid`
3696fi
3697rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3698 done
3699else
3700 echo "$as_me: failed program was:" >&5
3701sed 's/^/| /' conftest.$ac_ext >&5
3702
3703ac_lo= ac_hi=
3704fi
3705rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3706fi
3707rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3708# Binary search between lo and hi bounds.
3709while test "x$ac_lo" != "x$ac_hi"; do
3710 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3711 cat >conftest.$ac_ext <<_ACEOF
3712/* confdefs.h. */
3713_ACEOF
3714cat confdefs.h >>conftest.$ac_ext
3715cat >>conftest.$ac_ext <<_ACEOF
3716/* end confdefs.h. */
3717$ac_includes_default
3718int
3719main ()
3720{
3721static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3722test_array [0] = 0
3723
3724 ;
3725 return 0;
3726}
3727_ACEOF
3728rm -f conftest.$ac_objext
3729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3730 (eval $ac_compile) 2>conftest.er1
3731 ac_status=$?
3732 grep -v '^ *+' conftest.er1 >conftest.err
3733 rm -f conftest.er1
3734 cat conftest.err >&5
3735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3736 (exit $ac_status); } &&
d7974fe6
KC
3737 { ac_try='test -z "$ac_c_werror_flag"
3738 || test ! -s conftest.err'
bf3b7cd3
JD
3739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3740 (eval $ac_try) 2>&5
3741 ac_status=$?
3742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3743 (exit $ac_status); }; } &&
3744 { ac_try='test -s conftest.$ac_objext'
3745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3746 (eval $ac_try) 2>&5
3747 ac_status=$?
3748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3749 (exit $ac_status); }; }; then
3750 ac_hi=$ac_mid
3751else
3752 echo "$as_me: failed program was:" >&5
3753sed 's/^/| /' conftest.$ac_ext >&5
3754
3755ac_lo=`expr '(' $ac_mid ')' + 1`
3756fi
3757rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3758done
3759case $ac_lo in
3760?*) ac_cv_sizeof_void_p=$ac_lo;;
3761'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3762See \`config.log' for more details." >&5
3763echo "$as_me: error: cannot compute sizeof (void *), 77
3764See \`config.log' for more details." >&2;}
3765 { (exit 1); exit 1; }; } ;;
3766esac
3767else
3768 if test "$cross_compiling" = yes; then
d7974fe6
KC
3769 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
3770See \`config.log' for more details." >&5
3771echo "$as_me: error: cannot run test program while cross compiling
3772See \`config.log' for more details." >&2;}
bf3b7cd3
JD
3773 { (exit 1); exit 1; }; }
3774else
3775 cat >conftest.$ac_ext <<_ACEOF
3776/* confdefs.h. */
3777_ACEOF
3778cat confdefs.h >>conftest.$ac_ext
3779cat >>conftest.$ac_ext <<_ACEOF
3780/* end confdefs.h. */
3781$ac_includes_default
3782long longval () { return (long) (sizeof (void *)); }
3783unsigned long ulongval () { return (long) (sizeof (void *)); }
3784#include <stdio.h>
3785#include <stdlib.h>
3786int
3787main ()
3788{
3789
3790 FILE *f = fopen ("conftest.val", "w");
3791 if (! f)
3792 exit (1);
3793 if (((long) (sizeof (void *))) < 0)
3794 {
3795 long i = longval ();
3796 if (i != ((long) (sizeof (void *))))
3797 exit (1);
3798 fprintf (f, "%ld\n", i);
3799 }
3800 else
3801 {
3802 unsigned long i = ulongval ();
3803 if (i != ((long) (sizeof (void *))))
3804 exit (1);
3805 fprintf (f, "%lu\n", i);
3806 }
3807 exit (ferror (f) || fclose (f) != 0);
3808
3809 ;
3810 return 0;
3811}
3812_ACEOF
3813rm -f conftest$ac_exeext
3814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3815 (eval $ac_link) 2>&5
3816 ac_status=$?
3817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3818 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3820 (eval $ac_try) 2>&5
3821 ac_status=$?
3822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3823 (exit $ac_status); }; }; then
3824 ac_cv_sizeof_void_p=`cat conftest.val`
3825else
3826 echo "$as_me: program exited with status $ac_status" >&5
3827echo "$as_me: failed program was:" >&5
3828sed 's/^/| /' conftest.$ac_ext >&5
3829
3830( exit $ac_status )
3831{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3832See \`config.log' for more details." >&5
3833echo "$as_me: error: cannot compute sizeof (void *), 77
3834See \`config.log' for more details." >&2;}
3835 { (exit 1); exit 1; }; }
3836fi
3837rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3838fi
3839fi
3840rm -f conftest.val
3841else
3842 ac_cv_sizeof_void_p=0
3843fi
3844fi
3845echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3846echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3847cat >>confdefs.h <<_ACEOF
3848#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3849_ACEOF
3850
3851
3852echo "$as_me:$LINENO: checking for short" >&5
3853echo $ECHO_N "checking for short... $ECHO_C" >&6
3854if test "${ac_cv_type_short+set}" = set; then
3855 echo $ECHO_N "(cached) $ECHO_C" >&6
3856else
3857 cat >conftest.$ac_ext <<_ACEOF
3858/* confdefs.h. */
3859_ACEOF
3860cat confdefs.h >>conftest.$ac_ext
3861cat >>conftest.$ac_ext <<_ACEOF
3862/* end confdefs.h. */
3863$ac_includes_default
3864int
3865main ()
3866{
3867if ((short *) 0)
3868 return 0;
3869if (sizeof (short))
3870 return 0;
3871 ;
3872 return 0;
3873}
3874_ACEOF
3875rm -f conftest.$ac_objext
3876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3877 (eval $ac_compile) 2>conftest.er1
3878 ac_status=$?
3879 grep -v '^ *+' conftest.er1 >conftest.err
3880 rm -f conftest.er1
3881 cat conftest.err >&5
3882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3883 (exit $ac_status); } &&
d7974fe6
KC
3884 { ac_try='test -z "$ac_c_werror_flag"
3885 || test ! -s conftest.err'
bf3b7cd3
JD
3886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3887 (eval $ac_try) 2>&5
3888 ac_status=$?
3889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3890 (exit $ac_status); }; } &&
3891 { ac_try='test -s conftest.$ac_objext'
3892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3893 (eval $ac_try) 2>&5
3894 ac_status=$?
3895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3896 (exit $ac_status); }; }; then
3897 ac_cv_type_short=yes
3898else
3899 echo "$as_me: failed program was:" >&5
3900sed 's/^/| /' conftest.$ac_ext >&5
3901
3902ac_cv_type_short=no
3903fi
3904rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3905fi
3906echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
3907echo "${ECHO_T}$ac_cv_type_short" >&6
3908
3909echo "$as_me:$LINENO: checking size of short" >&5
3910echo $ECHO_N "checking size of short... $ECHO_C" >&6
3911if test "${ac_cv_sizeof_short+set}" = set; then
3912 echo $ECHO_N "(cached) $ECHO_C" >&6
3913else
3914 if test "$ac_cv_type_short" = yes; then
3915 # The cast to unsigned long works around a bug in the HP C Compiler
3916 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3917 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3918 # This bug is HP SR number 8606223364.
3919 if test "$cross_compiling" = yes; then
3920 # Depending upon the size, compute the lo and hi bounds.
3921cat >conftest.$ac_ext <<_ACEOF
3922/* confdefs.h. */
3923_ACEOF
3924cat confdefs.h >>conftest.$ac_ext
3925cat >>conftest.$ac_ext <<_ACEOF
3926/* end confdefs.h. */
3927$ac_includes_default
3928int
3929main ()
3930{
3931static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
3932test_array [0] = 0
3933
3934 ;
3935 return 0;
3936}
3937_ACEOF
3938rm -f conftest.$ac_objext
3939if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3940 (eval $ac_compile) 2>conftest.er1
3941 ac_status=$?
3942 grep -v '^ *+' conftest.er1 >conftest.err
3943 rm -f conftest.er1
3944 cat conftest.err >&5
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); } &&
d7974fe6
KC
3947 { ac_try='test -z "$ac_c_werror_flag"
3948 || test ! -s conftest.err'
bf3b7cd3
JD
3949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3950 (eval $ac_try) 2>&5
3951 ac_status=$?
3952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3953 (exit $ac_status); }; } &&
3954 { ac_try='test -s conftest.$ac_objext'
3955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3956 (eval $ac_try) 2>&5
3957 ac_status=$?
3958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3959 (exit $ac_status); }; }; then
3960 ac_lo=0 ac_mid=0
3961 while :; do
3962 cat >conftest.$ac_ext <<_ACEOF
3963/* confdefs.h. */
3964_ACEOF
3965cat confdefs.h >>conftest.$ac_ext
3966cat >>conftest.$ac_ext <<_ACEOF
3967/* end confdefs.h. */
3968$ac_includes_default
3969int
3970main ()
3971{
3972static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
3973test_array [0] = 0
3974
3975 ;
3976 return 0;
3977}
3978_ACEOF
3979rm -f conftest.$ac_objext
3980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3981 (eval $ac_compile) 2>conftest.er1
3982 ac_status=$?
3983 grep -v '^ *+' conftest.er1 >conftest.err
3984 rm -f conftest.er1
3985 cat conftest.err >&5
3986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3987 (exit $ac_status); } &&
d7974fe6
KC
3988 { ac_try='test -z "$ac_c_werror_flag"
3989 || test ! -s conftest.err'
bf3b7cd3
JD
3990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3991 (eval $ac_try) 2>&5
3992 ac_status=$?
3993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3994 (exit $ac_status); }; } &&
3995 { ac_try='test -s conftest.$ac_objext'
3996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3997 (eval $ac_try) 2>&5
3998 ac_status=$?
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); }; }; then
4001 ac_hi=$ac_mid; break
4002else
4003 echo "$as_me: failed program was:" >&5
4004sed 's/^/| /' conftest.$ac_ext >&5
4005
4006ac_lo=`expr $ac_mid + 1`
4007 if test $ac_lo -le $ac_mid; then
4008 ac_lo= ac_hi=
4009 break
4010 fi
4011 ac_mid=`expr 2 '*' $ac_mid + 1`
4012fi
4013rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4014 done
4015else
4016 echo "$as_me: failed program was:" >&5
4017sed 's/^/| /' conftest.$ac_ext >&5
4018
4019cat >conftest.$ac_ext <<_ACEOF
4020/* confdefs.h. */
4021_ACEOF
4022cat confdefs.h >>conftest.$ac_ext
4023cat >>conftest.$ac_ext <<_ACEOF
4024/* end confdefs.h. */
4025$ac_includes_default
4026int
4027main ()
4028{
4029static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
4030test_array [0] = 0
4031
4032 ;
4033 return 0;
4034}
4035_ACEOF
4036rm -f conftest.$ac_objext
4037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4038 (eval $ac_compile) 2>conftest.er1
4039 ac_status=$?
4040 grep -v '^ *+' conftest.er1 >conftest.err
4041 rm -f conftest.er1
4042 cat conftest.err >&5
4043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4044 (exit $ac_status); } &&
d7974fe6
KC
4045 { ac_try='test -z "$ac_c_werror_flag"
4046 || test ! -s conftest.err'
bf3b7cd3
JD
4047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4048 (eval $ac_try) 2>&5
4049 ac_status=$?
4050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4051 (exit $ac_status); }; } &&
4052 { ac_try='test -s conftest.$ac_objext'
4053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4054 (eval $ac_try) 2>&5
4055 ac_status=$?
4056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4057 (exit $ac_status); }; }; then
4058 ac_hi=-1 ac_mid=-1
4059 while :; do
4060 cat >conftest.$ac_ext <<_ACEOF
4061/* confdefs.h. */
4062_ACEOF
4063cat confdefs.h >>conftest.$ac_ext
4064cat >>conftest.$ac_ext <<_ACEOF
4065/* end confdefs.h. */
4066$ac_includes_default
4067int
4068main ()
4069{
4070static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
4071test_array [0] = 0
4072
4073 ;
4074 return 0;
4075}
4076_ACEOF
4077rm -f conftest.$ac_objext
4078if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4079 (eval $ac_compile) 2>conftest.er1
4080 ac_status=$?
4081 grep -v '^ *+' conftest.er1 >conftest.err
4082 rm -f conftest.er1
4083 cat conftest.err >&5
4084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085 (exit $ac_status); } &&
d7974fe6
KC
4086 { ac_try='test -z "$ac_c_werror_flag"
4087 || test ! -s conftest.err'
bf3b7cd3
JD
4088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4089 (eval $ac_try) 2>&5
4090 ac_status=$?
4091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4092 (exit $ac_status); }; } &&
4093 { ac_try='test -s conftest.$ac_objext'
4094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4095 (eval $ac_try) 2>&5
4096 ac_status=$?
4097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4098 (exit $ac_status); }; }; then
4099 ac_lo=$ac_mid; break
4100else
4101 echo "$as_me: failed program was:" >&5
4102sed 's/^/| /' conftest.$ac_ext >&5
4103
4104ac_hi=`expr '(' $ac_mid ')' - 1`
4105 if test $ac_mid -le $ac_hi; then
4106 ac_lo= ac_hi=
4107 break
4108 fi
4109 ac_mid=`expr 2 '*' $ac_mid`
4110fi
4111rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4112 done
4113else
4114 echo "$as_me: failed program was:" >&5
4115sed 's/^/| /' conftest.$ac_ext >&5
4116
4117ac_lo= ac_hi=
4118fi
4119rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4120fi
4121rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4122# Binary search between lo and hi bounds.
4123while test "x$ac_lo" != "x$ac_hi"; do
4124 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4125 cat >conftest.$ac_ext <<_ACEOF
4126/* confdefs.h. */
4127_ACEOF
4128cat confdefs.h >>conftest.$ac_ext
4129cat >>conftest.$ac_ext <<_ACEOF
4130/* end confdefs.h. */
4131$ac_includes_default
4132int
4133main ()
4134{
4135static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4136test_array [0] = 0
4137
4138 ;
4139 return 0;
4140}
4141_ACEOF
4142rm -f conftest.$ac_objext
4143if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4144 (eval $ac_compile) 2>conftest.er1
4145 ac_status=$?
4146 grep -v '^ *+' conftest.er1 >conftest.err
4147 rm -f conftest.er1
4148 cat conftest.err >&5
4149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4150 (exit $ac_status); } &&
d7974fe6
KC
4151 { ac_try='test -z "$ac_c_werror_flag"
4152 || test ! -s conftest.err'
bf3b7cd3
JD
4153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4154 (eval $ac_try) 2>&5
4155 ac_status=$?
4156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4157 (exit $ac_status); }; } &&
4158 { ac_try='test -s conftest.$ac_objext'
4159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4160 (eval $ac_try) 2>&5
4161 ac_status=$?
4162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4163 (exit $ac_status); }; }; then
4164 ac_hi=$ac_mid
4165else
4166 echo "$as_me: failed program was:" >&5
4167sed 's/^/| /' conftest.$ac_ext >&5
4168
4169ac_lo=`expr '(' $ac_mid ')' + 1`
4170fi
4171rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4172done
4173case $ac_lo in
4174?*) ac_cv_sizeof_short=$ac_lo;;
4175'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4176See \`config.log' for more details." >&5
4177echo "$as_me: error: cannot compute sizeof (short), 77
4178See \`config.log' for more details." >&2;}
4179 { (exit 1); exit 1; }; } ;;
4180esac
4181else
4182 if test "$cross_compiling" = yes; then
d7974fe6
KC
4183 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4184See \`config.log' for more details." >&5
4185echo "$as_me: error: cannot run test program while cross compiling
4186See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4187 { (exit 1); exit 1; }; }
4188else
4189 cat >conftest.$ac_ext <<_ACEOF
4190/* confdefs.h. */
4191_ACEOF
4192cat confdefs.h >>conftest.$ac_ext
4193cat >>conftest.$ac_ext <<_ACEOF
4194/* end confdefs.h. */
4195$ac_includes_default
4196long longval () { return (long) (sizeof (short)); }
4197unsigned long ulongval () { return (long) (sizeof (short)); }
4198#include <stdio.h>
4199#include <stdlib.h>
4200int
4201main ()
4202{
4203
4204 FILE *f = fopen ("conftest.val", "w");
4205 if (! f)
4206 exit (1);
4207 if (((long) (sizeof (short))) < 0)
4208 {
4209 long i = longval ();
4210 if (i != ((long) (sizeof (short))))
4211 exit (1);
4212 fprintf (f, "%ld\n", i);
4213 }
4214 else
4215 {
4216 unsigned long i = ulongval ();
4217 if (i != ((long) (sizeof (short))))
4218 exit (1);
4219 fprintf (f, "%lu\n", i);
4220 }
4221 exit (ferror (f) || fclose (f) != 0);
4222
4223 ;
4224 return 0;
4225}
4226_ACEOF
4227rm -f conftest$ac_exeext
4228if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4229 (eval $ac_link) 2>&5
4230 ac_status=$?
4231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4232 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4234 (eval $ac_try) 2>&5
4235 ac_status=$?
4236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4237 (exit $ac_status); }; }; then
4238 ac_cv_sizeof_short=`cat conftest.val`
4239else
4240 echo "$as_me: program exited with status $ac_status" >&5
4241echo "$as_me: failed program was:" >&5
4242sed 's/^/| /' conftest.$ac_ext >&5
4243
4244( exit $ac_status )
4245{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4246See \`config.log' for more details." >&5
4247echo "$as_me: error: cannot compute sizeof (short), 77
4248See \`config.log' for more details." >&2;}
4249 { (exit 1); exit 1; }; }
4250fi
4251rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4252fi
4253fi
4254rm -f conftest.val
4255else
4256 ac_cv_sizeof_short=0
4257fi
4258fi
4259echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4260echo "${ECHO_T}$ac_cv_sizeof_short" >&6
4261cat >>confdefs.h <<_ACEOF
4262#define SIZEOF_SHORT $ac_cv_sizeof_short
4263_ACEOF
4264
4265
4266echo "$as_me:$LINENO: checking for int" >&5
4267echo $ECHO_N "checking for int... $ECHO_C" >&6
4268if test "${ac_cv_type_int+set}" = set; then
4269 echo $ECHO_N "(cached) $ECHO_C" >&6
4270else
4271 cat >conftest.$ac_ext <<_ACEOF
4272/* confdefs.h. */
4273_ACEOF
4274cat confdefs.h >>conftest.$ac_ext
4275cat >>conftest.$ac_ext <<_ACEOF
4276/* end confdefs.h. */
4277$ac_includes_default
4278int
4279main ()
4280{
4281if ((int *) 0)
4282 return 0;
4283if (sizeof (int))
4284 return 0;
4285 ;
4286 return 0;
4287}
4288_ACEOF
4289rm -f conftest.$ac_objext
4290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4291 (eval $ac_compile) 2>conftest.er1
4292 ac_status=$?
4293 grep -v '^ *+' conftest.er1 >conftest.err
4294 rm -f conftest.er1
4295 cat conftest.err >&5
4296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4297 (exit $ac_status); } &&
d7974fe6
KC
4298 { ac_try='test -z "$ac_c_werror_flag"
4299 || test ! -s conftest.err'
bf3b7cd3
JD
4300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4301 (eval $ac_try) 2>&5
4302 ac_status=$?
4303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4304 (exit $ac_status); }; } &&
4305 { ac_try='test -s conftest.$ac_objext'
4306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4307 (eval $ac_try) 2>&5
4308 ac_status=$?
4309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4310 (exit $ac_status); }; }; then
4311 ac_cv_type_int=yes
4312else
4313 echo "$as_me: failed program was:" >&5
4314sed 's/^/| /' conftest.$ac_ext >&5
4315
4316ac_cv_type_int=no
4317fi
4318rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4319fi
4320echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4321echo "${ECHO_T}$ac_cv_type_int" >&6
4322
4323echo "$as_me:$LINENO: checking size of int" >&5
4324echo $ECHO_N "checking size of int... $ECHO_C" >&6
4325if test "${ac_cv_sizeof_int+set}" = set; then
4326 echo $ECHO_N "(cached) $ECHO_C" >&6
4327else
4328 if test "$ac_cv_type_int" = yes; then
4329 # The cast to unsigned long works around a bug in the HP C Compiler
4330 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4331 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4332 # This bug is HP SR number 8606223364.
4333 if test "$cross_compiling" = yes; then
4334 # Depending upon the size, compute the lo and hi bounds.
4335cat >conftest.$ac_ext <<_ACEOF
4336/* confdefs.h. */
4337_ACEOF
4338cat confdefs.h >>conftest.$ac_ext
4339cat >>conftest.$ac_ext <<_ACEOF
4340/* end confdefs.h. */
4341$ac_includes_default
4342int
4343main ()
4344{
4345static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4346test_array [0] = 0
4347
4348 ;
4349 return 0;
4350}
4351_ACEOF
4352rm -f conftest.$ac_objext
4353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4354 (eval $ac_compile) 2>conftest.er1
4355 ac_status=$?
4356 grep -v '^ *+' conftest.er1 >conftest.err
4357 rm -f conftest.er1
4358 cat conftest.err >&5
4359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4360 (exit $ac_status); } &&
d7974fe6
KC
4361 { ac_try='test -z "$ac_c_werror_flag"
4362 || test ! -s conftest.err'
bf3b7cd3
JD
4363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4364 (eval $ac_try) 2>&5
4365 ac_status=$?
4366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4367 (exit $ac_status); }; } &&
4368 { ac_try='test -s conftest.$ac_objext'
4369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4370 (eval $ac_try) 2>&5
4371 ac_status=$?
4372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4373 (exit $ac_status); }; }; then
4374 ac_lo=0 ac_mid=0
4375 while :; do
4376 cat >conftest.$ac_ext <<_ACEOF
4377/* confdefs.h. */
4378_ACEOF
4379cat confdefs.h >>conftest.$ac_ext
4380cat >>conftest.$ac_ext <<_ACEOF
4381/* end confdefs.h. */
4382$ac_includes_default
4383int
4384main ()
4385{
4386static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4387test_array [0] = 0
4388
4389 ;
4390 return 0;
4391}
4392_ACEOF
4393rm -f conftest.$ac_objext
4394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4395 (eval $ac_compile) 2>conftest.er1
4396 ac_status=$?
4397 grep -v '^ *+' conftest.er1 >conftest.err
4398 rm -f conftest.er1
4399 cat conftest.err >&5
4400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4401 (exit $ac_status); } &&
d7974fe6
KC
4402 { ac_try='test -z "$ac_c_werror_flag"
4403 || test ! -s conftest.err'
bf3b7cd3
JD
4404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4405 (eval $ac_try) 2>&5
4406 ac_status=$?
4407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4408 (exit $ac_status); }; } &&
4409 { ac_try='test -s conftest.$ac_objext'
4410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4411 (eval $ac_try) 2>&5
4412 ac_status=$?
4413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4414 (exit $ac_status); }; }; then
4415 ac_hi=$ac_mid; break
4416else
4417 echo "$as_me: failed program was:" >&5
4418sed 's/^/| /' conftest.$ac_ext >&5
4419
4420ac_lo=`expr $ac_mid + 1`
4421 if test $ac_lo -le $ac_mid; then
4422 ac_lo= ac_hi=
4423 break
4424 fi
4425 ac_mid=`expr 2 '*' $ac_mid + 1`
4426fi
4427rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4428 done
4429else
4430 echo "$as_me: failed program was:" >&5
4431sed 's/^/| /' conftest.$ac_ext >&5
4432
4433cat >conftest.$ac_ext <<_ACEOF
4434/* confdefs.h. */
4435_ACEOF
4436cat confdefs.h >>conftest.$ac_ext
4437cat >>conftest.$ac_ext <<_ACEOF
4438/* end confdefs.h. */
4439$ac_includes_default
4440int
4441main ()
4442{
4443static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4444test_array [0] = 0
4445
4446 ;
4447 return 0;
4448}
4449_ACEOF
4450rm -f conftest.$ac_objext
4451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4452 (eval $ac_compile) 2>conftest.er1
4453 ac_status=$?
4454 grep -v '^ *+' conftest.er1 >conftest.err
4455 rm -f conftest.er1
4456 cat conftest.err >&5
4457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4458 (exit $ac_status); } &&
d7974fe6
KC
4459 { ac_try='test -z "$ac_c_werror_flag"
4460 || test ! -s conftest.err'
bf3b7cd3
JD
4461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4462 (eval $ac_try) 2>&5
4463 ac_status=$?
4464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4465 (exit $ac_status); }; } &&
4466 { ac_try='test -s conftest.$ac_objext'
4467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4468 (eval $ac_try) 2>&5
4469 ac_status=$?
4470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4471 (exit $ac_status); }; }; then
4472 ac_hi=-1 ac_mid=-1
4473 while :; do
4474 cat >conftest.$ac_ext <<_ACEOF
4475/* confdefs.h. */
4476_ACEOF
4477cat confdefs.h >>conftest.$ac_ext
4478cat >>conftest.$ac_ext <<_ACEOF
4479/* end confdefs.h. */
4480$ac_includes_default
4481int
4482main ()
4483{
4484static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4485test_array [0] = 0
4486
4487 ;
4488 return 0;
4489}
4490_ACEOF
4491rm -f conftest.$ac_objext
4492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4493 (eval $ac_compile) 2>conftest.er1
4494 ac_status=$?
4495 grep -v '^ *+' conftest.er1 >conftest.err
4496 rm -f conftest.er1
4497 cat conftest.err >&5
4498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4499 (exit $ac_status); } &&
d7974fe6
KC
4500 { ac_try='test -z "$ac_c_werror_flag"
4501 || test ! -s conftest.err'
bf3b7cd3
JD
4502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4503 (eval $ac_try) 2>&5
4504 ac_status=$?
4505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4506 (exit $ac_status); }; } &&
4507 { ac_try='test -s conftest.$ac_objext'
4508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4509 (eval $ac_try) 2>&5
4510 ac_status=$?
4511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4512 (exit $ac_status); }; }; then
4513 ac_lo=$ac_mid; break
4514else
4515 echo "$as_me: failed program was:" >&5
4516sed 's/^/| /' conftest.$ac_ext >&5
4517
4518ac_hi=`expr '(' $ac_mid ')' - 1`
4519 if test $ac_mid -le $ac_hi; then
4520 ac_lo= ac_hi=
4521 break
4522 fi
4523 ac_mid=`expr 2 '*' $ac_mid`
4524fi
4525rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4526 done
4527else
4528 echo "$as_me: failed program was:" >&5
4529sed 's/^/| /' conftest.$ac_ext >&5
4530
4531ac_lo= ac_hi=
4532fi
4533rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4534fi
4535rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4536# Binary search between lo and hi bounds.
4537while test "x$ac_lo" != "x$ac_hi"; do
4538 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4539 cat >conftest.$ac_ext <<_ACEOF
4540/* confdefs.h. */
4541_ACEOF
4542cat confdefs.h >>conftest.$ac_ext
4543cat >>conftest.$ac_ext <<_ACEOF
4544/* end confdefs.h. */
4545$ac_includes_default
4546int
4547main ()
4548{
4549static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4550test_array [0] = 0
4551
4552 ;
4553 return 0;
4554}
4555_ACEOF
4556rm -f conftest.$ac_objext
4557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4558 (eval $ac_compile) 2>conftest.er1
4559 ac_status=$?
4560 grep -v '^ *+' conftest.er1 >conftest.err
4561 rm -f conftest.er1
4562 cat conftest.err >&5
4563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4564 (exit $ac_status); } &&
d7974fe6
KC
4565 { ac_try='test -z "$ac_c_werror_flag"
4566 || test ! -s conftest.err'
bf3b7cd3
JD
4567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4568 (eval $ac_try) 2>&5
4569 ac_status=$?
4570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4571 (exit $ac_status); }; } &&
4572 { ac_try='test -s conftest.$ac_objext'
4573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4574 (eval $ac_try) 2>&5
4575 ac_status=$?
4576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4577 (exit $ac_status); }; }; then
4578 ac_hi=$ac_mid
4579else
4580 echo "$as_me: failed program was:" >&5
4581sed 's/^/| /' conftest.$ac_ext >&5
4582
4583ac_lo=`expr '(' $ac_mid ')' + 1`
4584fi
4585rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4586done
4587case $ac_lo in
4588?*) ac_cv_sizeof_int=$ac_lo;;
4589'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4590See \`config.log' for more details." >&5
4591echo "$as_me: error: cannot compute sizeof (int), 77
4592See \`config.log' for more details." >&2;}
4593 { (exit 1); exit 1; }; } ;;
4594esac
4595else
4596 if test "$cross_compiling" = yes; then
d7974fe6
KC
4597 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4598See \`config.log' for more details." >&5
4599echo "$as_me: error: cannot run test program while cross compiling
4600See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4601 { (exit 1); exit 1; }; }
4602else
4603 cat >conftest.$ac_ext <<_ACEOF
4604/* confdefs.h. */
4605_ACEOF
4606cat confdefs.h >>conftest.$ac_ext
4607cat >>conftest.$ac_ext <<_ACEOF
4608/* end confdefs.h. */
4609$ac_includes_default
4610long longval () { return (long) (sizeof (int)); }
4611unsigned long ulongval () { return (long) (sizeof (int)); }
4612#include <stdio.h>
4613#include <stdlib.h>
4614int
4615main ()
4616{
4617
4618 FILE *f = fopen ("conftest.val", "w");
4619 if (! f)
4620 exit (1);
4621 if (((long) (sizeof (int))) < 0)
4622 {
4623 long i = longval ();
4624 if (i != ((long) (sizeof (int))))
4625 exit (1);
4626 fprintf (f, "%ld\n", i);
4627 }
4628 else
4629 {
4630 unsigned long i = ulongval ();
4631 if (i != ((long) (sizeof (int))))
4632 exit (1);
4633 fprintf (f, "%lu\n", i);
4634 }
4635 exit (ferror (f) || fclose (f) != 0);
4636
4637 ;
4638 return 0;
4639}
4640_ACEOF
4641rm -f conftest$ac_exeext
4642if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4643 (eval $ac_link) 2>&5
4644 ac_status=$?
4645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4646 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4648 (eval $ac_try) 2>&5
4649 ac_status=$?
4650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4651 (exit $ac_status); }; }; then
4652 ac_cv_sizeof_int=`cat conftest.val`
4653else
4654 echo "$as_me: program exited with status $ac_status" >&5
4655echo "$as_me: failed program was:" >&5
4656sed 's/^/| /' conftest.$ac_ext >&5
4657
4658( exit $ac_status )
4659{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4660See \`config.log' for more details." >&5
4661echo "$as_me: error: cannot compute sizeof (int), 77
4662See \`config.log' for more details." >&2;}
4663 { (exit 1); exit 1; }; }
4664fi
4665rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4666fi
4667fi
4668rm -f conftest.val
4669else
4670 ac_cv_sizeof_int=0
4671fi
4672fi
4673echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4674echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4675cat >>confdefs.h <<_ACEOF
4676#define SIZEOF_INT $ac_cv_sizeof_int
4677_ACEOF
4678
4679
4680echo "$as_me:$LINENO: checking for long" >&5
4681echo $ECHO_N "checking for long... $ECHO_C" >&6
4682if test "${ac_cv_type_long+set}" = set; then
4683 echo $ECHO_N "(cached) $ECHO_C" >&6
4684else
4685 cat >conftest.$ac_ext <<_ACEOF
4686/* confdefs.h. */
4687_ACEOF
4688cat confdefs.h >>conftest.$ac_ext
4689cat >>conftest.$ac_ext <<_ACEOF
4690/* end confdefs.h. */
4691$ac_includes_default
4692int
4693main ()
4694{
4695if ((long *) 0)
4696 return 0;
4697if (sizeof (long))
4698 return 0;
4699 ;
4700 return 0;
4701}
4702_ACEOF
4703rm -f conftest.$ac_objext
4704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4705 (eval $ac_compile) 2>conftest.er1
4706 ac_status=$?
4707 grep -v '^ *+' conftest.er1 >conftest.err
4708 rm -f conftest.er1
4709 cat conftest.err >&5
4710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4711 (exit $ac_status); } &&
d7974fe6
KC
4712 { ac_try='test -z "$ac_c_werror_flag"
4713 || test ! -s conftest.err'
bf3b7cd3
JD
4714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4715 (eval $ac_try) 2>&5
4716 ac_status=$?
4717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4718 (exit $ac_status); }; } &&
4719 { ac_try='test -s conftest.$ac_objext'
4720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4721 (eval $ac_try) 2>&5
4722 ac_status=$?
4723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4724 (exit $ac_status); }; }; then
4725 ac_cv_type_long=yes
4726else
4727 echo "$as_me: failed program was:" >&5
4728sed 's/^/| /' conftest.$ac_ext >&5
4729
4730ac_cv_type_long=no
4731fi
4732rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4733fi
4734echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4735echo "${ECHO_T}$ac_cv_type_long" >&6
4736
4737echo "$as_me:$LINENO: checking size of long" >&5
4738echo $ECHO_N "checking size of long... $ECHO_C" >&6
4739if test "${ac_cv_sizeof_long+set}" = set; then
4740 echo $ECHO_N "(cached) $ECHO_C" >&6
4741else
4742 if test "$ac_cv_type_long" = yes; then
4743 # The cast to unsigned long works around a bug in the HP C Compiler
4744 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4745 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4746 # This bug is HP SR number 8606223364.
4747 if test "$cross_compiling" = yes; then
4748 # Depending upon the size, compute the lo and hi bounds.
4749cat >conftest.$ac_ext <<_ACEOF
4750/* confdefs.h. */
4751_ACEOF
4752cat confdefs.h >>conftest.$ac_ext
4753cat >>conftest.$ac_ext <<_ACEOF
4754/* end confdefs.h. */
4755$ac_includes_default
4756int
4757main ()
4758{
4759static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
4760test_array [0] = 0
4761
4762 ;
4763 return 0;
4764}
4765_ACEOF
4766rm -f conftest.$ac_objext
4767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4768 (eval $ac_compile) 2>conftest.er1
4769 ac_status=$?
4770 grep -v '^ *+' conftest.er1 >conftest.err
4771 rm -f conftest.er1
4772 cat conftest.err >&5
4773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4774 (exit $ac_status); } &&
d7974fe6
KC
4775 { ac_try='test -z "$ac_c_werror_flag"
4776 || test ! -s conftest.err'
bf3b7cd3
JD
4777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4778 (eval $ac_try) 2>&5
4779 ac_status=$?
4780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4781 (exit $ac_status); }; } &&
4782 { ac_try='test -s conftest.$ac_objext'
4783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4784 (eval $ac_try) 2>&5
4785 ac_status=$?
4786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4787 (exit $ac_status); }; }; then
4788 ac_lo=0 ac_mid=0
4789 while :; do
4790 cat >conftest.$ac_ext <<_ACEOF
4791/* confdefs.h. */
4792_ACEOF
4793cat confdefs.h >>conftest.$ac_ext
4794cat >>conftest.$ac_ext <<_ACEOF
4795/* end confdefs.h. */
4796$ac_includes_default
4797int
4798main ()
4799{
4800static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4801test_array [0] = 0
4802
4803 ;
4804 return 0;
4805}
4806_ACEOF
4807rm -f conftest.$ac_objext
4808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4809 (eval $ac_compile) 2>conftest.er1
4810 ac_status=$?
4811 grep -v '^ *+' conftest.er1 >conftest.err
4812 rm -f conftest.er1
4813 cat conftest.err >&5
4814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815 (exit $ac_status); } &&
d7974fe6
KC
4816 { ac_try='test -z "$ac_c_werror_flag"
4817 || test ! -s conftest.err'
bf3b7cd3
JD
4818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4819 (eval $ac_try) 2>&5
4820 ac_status=$?
4821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4822 (exit $ac_status); }; } &&
4823 { ac_try='test -s conftest.$ac_objext'
4824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4825 (eval $ac_try) 2>&5
4826 ac_status=$?
4827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4828 (exit $ac_status); }; }; then
4829 ac_hi=$ac_mid; break
4830else
4831 echo "$as_me: failed program was:" >&5
4832sed 's/^/| /' conftest.$ac_ext >&5
4833
4834ac_lo=`expr $ac_mid + 1`
4835 if test $ac_lo -le $ac_mid; then
4836 ac_lo= ac_hi=
4837 break
4838 fi
4839 ac_mid=`expr 2 '*' $ac_mid + 1`
4840fi
4841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4842 done
4843else
4844 echo "$as_me: failed program was:" >&5
4845sed 's/^/| /' conftest.$ac_ext >&5
4846
4847cat >conftest.$ac_ext <<_ACEOF
4848/* confdefs.h. */
4849_ACEOF
4850cat confdefs.h >>conftest.$ac_ext
4851cat >>conftest.$ac_ext <<_ACEOF
4852/* end confdefs.h. */
4853$ac_includes_default
4854int
4855main ()
4856{
4857static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
4858test_array [0] = 0
4859
4860 ;
4861 return 0;
4862}
4863_ACEOF
4864rm -f conftest.$ac_objext
4865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4866 (eval $ac_compile) 2>conftest.er1
4867 ac_status=$?
4868 grep -v '^ *+' conftest.er1 >conftest.err
4869 rm -f conftest.er1
4870 cat conftest.err >&5
4871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4872 (exit $ac_status); } &&
d7974fe6
KC
4873 { ac_try='test -z "$ac_c_werror_flag"
4874 || test ! -s conftest.err'
bf3b7cd3
JD
4875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4876 (eval $ac_try) 2>&5
4877 ac_status=$?
4878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4879 (exit $ac_status); }; } &&
4880 { ac_try='test -s conftest.$ac_objext'
4881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4882 (eval $ac_try) 2>&5
4883 ac_status=$?
4884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4885 (exit $ac_status); }; }; then
4886 ac_hi=-1 ac_mid=-1
4887 while :; do
4888 cat >conftest.$ac_ext <<_ACEOF
4889/* confdefs.h. */
4890_ACEOF
4891cat confdefs.h >>conftest.$ac_ext
4892cat >>conftest.$ac_ext <<_ACEOF
4893/* end confdefs.h. */
4894$ac_includes_default
4895int
4896main ()
4897{
4898static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
4899test_array [0] = 0
4900
4901 ;
4902 return 0;
4903}
4904_ACEOF
4905rm -f conftest.$ac_objext
4906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4907 (eval $ac_compile) 2>conftest.er1
4908 ac_status=$?
4909 grep -v '^ *+' conftest.er1 >conftest.err
4910 rm -f conftest.er1
4911 cat conftest.err >&5
4912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4913 (exit $ac_status); } &&
d7974fe6
KC
4914 { ac_try='test -z "$ac_c_werror_flag"
4915 || test ! -s conftest.err'
bf3b7cd3
JD
4916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4917 (eval $ac_try) 2>&5
4918 ac_status=$?
4919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4920 (exit $ac_status); }; } &&
4921 { ac_try='test -s conftest.$ac_objext'
4922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4923 (eval $ac_try) 2>&5
4924 ac_status=$?
4925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4926 (exit $ac_status); }; }; then
4927 ac_lo=$ac_mid; break
4928else
4929 echo "$as_me: failed program was:" >&5
4930sed 's/^/| /' conftest.$ac_ext >&5
4931
4932ac_hi=`expr '(' $ac_mid ')' - 1`
4933 if test $ac_mid -le $ac_hi; then
4934 ac_lo= ac_hi=
4935 break
4936 fi
4937 ac_mid=`expr 2 '*' $ac_mid`
4938fi
4939rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4940 done
4941else
4942 echo "$as_me: failed program was:" >&5
4943sed 's/^/| /' conftest.$ac_ext >&5
4944
4945ac_lo= ac_hi=
4946fi
4947rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4948fi
4949rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4950# Binary search between lo and hi bounds.
4951while test "x$ac_lo" != "x$ac_hi"; do
4952 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4953 cat >conftest.$ac_ext <<_ACEOF
4954/* confdefs.h. */
4955_ACEOF
4956cat confdefs.h >>conftest.$ac_ext
4957cat >>conftest.$ac_ext <<_ACEOF
4958/* end confdefs.h. */
4959$ac_includes_default
4960int
4961main ()
4962{
4963static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4964test_array [0] = 0
4965
4966 ;
4967 return 0;
4968}
4969_ACEOF
4970rm -f conftest.$ac_objext
4971if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4972 (eval $ac_compile) 2>conftest.er1
4973 ac_status=$?
4974 grep -v '^ *+' conftest.er1 >conftest.err
4975 rm -f conftest.er1
4976 cat conftest.err >&5
4977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4978 (exit $ac_status); } &&
d7974fe6
KC
4979 { ac_try='test -z "$ac_c_werror_flag"
4980 || test ! -s conftest.err'
bf3b7cd3
JD
4981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4982 (eval $ac_try) 2>&5
4983 ac_status=$?
4984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985 (exit $ac_status); }; } &&
4986 { ac_try='test -s conftest.$ac_objext'
4987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4988 (eval $ac_try) 2>&5
4989 ac_status=$?
4990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4991 (exit $ac_status); }; }; then
4992 ac_hi=$ac_mid
4993else
4994 echo "$as_me: failed program was:" >&5
4995sed 's/^/| /' conftest.$ac_ext >&5
4996
4997ac_lo=`expr '(' $ac_mid ')' + 1`
4998fi
4999rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5000done
5001case $ac_lo in
5002?*) ac_cv_sizeof_long=$ac_lo;;
5003'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5004See \`config.log' for more details." >&5
5005echo "$as_me: error: cannot compute sizeof (long), 77
5006See \`config.log' for more details." >&2;}
5007 { (exit 1); exit 1; }; } ;;
5008esac
5009else
5010 if test "$cross_compiling" = yes; then
d7974fe6
KC
5011 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5012See \`config.log' for more details." >&5
5013echo "$as_me: error: cannot run test program while cross compiling
5014See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5015 { (exit 1); exit 1; }; }
5016else
5017 cat >conftest.$ac_ext <<_ACEOF
5018/* confdefs.h. */
5019_ACEOF
5020cat confdefs.h >>conftest.$ac_ext
5021cat >>conftest.$ac_ext <<_ACEOF
5022/* end confdefs.h. */
5023$ac_includes_default
5024long longval () { return (long) (sizeof (long)); }
5025unsigned long ulongval () { return (long) (sizeof (long)); }
5026#include <stdio.h>
5027#include <stdlib.h>
5028int
5029main ()
5030{
5031
5032 FILE *f = fopen ("conftest.val", "w");
5033 if (! f)
5034 exit (1);
5035 if (((long) (sizeof (long))) < 0)
5036 {
5037 long i = longval ();
5038 if (i != ((long) (sizeof (long))))
5039 exit (1);
5040 fprintf (f, "%ld\n", i);
5041 }
5042 else
5043 {
5044 unsigned long i = ulongval ();
5045 if (i != ((long) (sizeof (long))))
5046 exit (1);
5047 fprintf (f, "%lu\n", i);
5048 }
5049 exit (ferror (f) || fclose (f) != 0);
5050
5051 ;
5052 return 0;
5053}
5054_ACEOF
5055rm -f conftest$ac_exeext
5056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5057 (eval $ac_link) 2>&5
5058 ac_status=$?
5059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5062 (eval $ac_try) 2>&5
5063 ac_status=$?
5064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065 (exit $ac_status); }; }; then
5066 ac_cv_sizeof_long=`cat conftest.val`
5067else
5068 echo "$as_me: program exited with status $ac_status" >&5
5069echo "$as_me: failed program was:" >&5
5070sed 's/^/| /' conftest.$ac_ext >&5
5071
5072( exit $ac_status )
5073{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5074See \`config.log' for more details." >&5
5075echo "$as_me: error: cannot compute sizeof (long), 77
5076See \`config.log' for more details." >&2;}
5077 { (exit 1); exit 1; }; }
5078fi
5079rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5080fi
5081fi
5082rm -f conftest.val
5083else
5084 ac_cv_sizeof_long=0
5085fi
5086fi
5087echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5088echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5089cat >>confdefs.h <<_ACEOF
5090#define SIZEOF_LONG $ac_cv_sizeof_long
5091_ACEOF
5092
5093
5ec1c5e6
KC
5094echo "$as_me:$LINENO: checking for long long" >&5
5095echo $ECHO_N "checking for long long... $ECHO_C" >&6
5096if test "${ac_cv_type_long_long+set}" = set; then
5097 echo $ECHO_N "(cached) $ECHO_C" >&6
5098else
5099 cat >conftest.$ac_ext <<_ACEOF
5100/* confdefs.h. */
5101_ACEOF
5102cat confdefs.h >>conftest.$ac_ext
5103cat >>conftest.$ac_ext <<_ACEOF
5104/* end confdefs.h. */
5105$ac_includes_default
5106int
5107main ()
5108{
5109if ((long long *) 0)
5110 return 0;
5111if (sizeof (long long))
5112 return 0;
5113 ;
5114 return 0;
5115}
5116_ACEOF
5117rm -f conftest.$ac_objext
5118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5119 (eval $ac_compile) 2>conftest.er1
5120 ac_status=$?
5121 grep -v '^ *+' conftest.er1 >conftest.err
5122 rm -f conftest.er1
5123 cat conftest.err >&5
5124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5125 (exit $ac_status); } &&
5126 { ac_try='test -z "$ac_c_werror_flag"
5127 || test ! -s conftest.err'
5128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5129 (eval $ac_try) 2>&5
5130 ac_status=$?
5131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132 (exit $ac_status); }; } &&
5133 { ac_try='test -s conftest.$ac_objext'
5134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5135 (eval $ac_try) 2>&5
5136 ac_status=$?
5137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5138 (exit $ac_status); }; }; then
5139 ac_cv_type_long_long=yes
5140else
5141 echo "$as_me: failed program was:" >&5
5142sed 's/^/| /' conftest.$ac_ext >&5
5143
5144ac_cv_type_long_long=no
5145fi
5146rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5147fi
5148echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5149echo "${ECHO_T}$ac_cv_type_long_long" >&6
5150if test $ac_cv_type_long_long = yes; then
5151
5152cat >>confdefs.h <<_ACEOF
5153#define HAVE_LONG_LONG 1
5154_ACEOF
5155
5156echo "$as_me:$LINENO: checking for long long" >&5
bf3b7cd3
JD
5157echo $ECHO_N "checking for long long... $ECHO_C" >&6
5158if test "${ac_cv_type_long_long+set}" = set; then
5159 echo $ECHO_N "(cached) $ECHO_C" >&6
5160else
5161 cat >conftest.$ac_ext <<_ACEOF
5162/* confdefs.h. */
5163_ACEOF
5164cat confdefs.h >>conftest.$ac_ext
5165cat >>conftest.$ac_ext <<_ACEOF
5166/* end confdefs.h. */
5167$ac_includes_default
5168int
5169main ()
5170{
5171if ((long long *) 0)
5172 return 0;
5173if (sizeof (long long))
5174 return 0;
5175 ;
5176 return 0;
5177}
5178_ACEOF
5179rm -f conftest.$ac_objext
5180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5181 (eval $ac_compile) 2>conftest.er1
5182 ac_status=$?
5183 grep -v '^ *+' conftest.er1 >conftest.err
5184 rm -f conftest.er1
5185 cat conftest.err >&5
5186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5187 (exit $ac_status); } &&
d7974fe6
KC
5188 { ac_try='test -z "$ac_c_werror_flag"
5189 || test ! -s conftest.err'
bf3b7cd3
JD
5190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5191 (eval $ac_try) 2>&5
5192 ac_status=$?
5193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5194 (exit $ac_status); }; } &&
5195 { ac_try='test -s conftest.$ac_objext'
5196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5197 (eval $ac_try) 2>&5
5198 ac_status=$?
5199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5200 (exit $ac_status); }; }; then
5201 ac_cv_type_long_long=yes
5202else
5203 echo "$as_me: failed program was:" >&5
5204sed 's/^/| /' conftest.$ac_ext >&5
5205
5206ac_cv_type_long_long=no
5207fi
5208rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5209fi
5210echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5211echo "${ECHO_T}$ac_cv_type_long_long" >&6
5212
5213echo "$as_me:$LINENO: checking size of long long" >&5
5214echo $ECHO_N "checking size of long long... $ECHO_C" >&6
5215if test "${ac_cv_sizeof_long_long+set}" = set; then
5216 echo $ECHO_N "(cached) $ECHO_C" >&6
5217else
5218 if test "$ac_cv_type_long_long" = yes; then
5219 # The cast to unsigned long works around a bug in the HP C Compiler
5220 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5221 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5222 # This bug is HP SR number 8606223364.
5223 if test "$cross_compiling" = yes; then
5224 # Depending upon the size, compute the lo and hi bounds.
5225cat >conftest.$ac_ext <<_ACEOF
5226/* confdefs.h. */
5227_ACEOF
5228cat confdefs.h >>conftest.$ac_ext
5229cat >>conftest.$ac_ext <<_ACEOF
5230/* end confdefs.h. */
5231$ac_includes_default
5232int
5233main ()
5234{
5235static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
5236test_array [0] = 0
5237
5238 ;
5239 return 0;
5240}
5241_ACEOF
5242rm -f conftest.$ac_objext
5243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5244 (eval $ac_compile) 2>conftest.er1
5245 ac_status=$?
5246 grep -v '^ *+' conftest.er1 >conftest.err
5247 rm -f conftest.er1
5248 cat conftest.err >&5
5249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5250 (exit $ac_status); } &&
d7974fe6
KC
5251 { ac_try='test -z "$ac_c_werror_flag"
5252 || test ! -s conftest.err'
bf3b7cd3
JD
5253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5254 (eval $ac_try) 2>&5
5255 ac_status=$?
5256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5257 (exit $ac_status); }; } &&
5258 { ac_try='test -s conftest.$ac_objext'
5259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5260 (eval $ac_try) 2>&5
5261 ac_status=$?
5262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5263 (exit $ac_status); }; }; then
5264 ac_lo=0 ac_mid=0
5265 while :; do
5266 cat >conftest.$ac_ext <<_ACEOF
5267/* confdefs.h. */
5268_ACEOF
5269cat confdefs.h >>conftest.$ac_ext
5270cat >>conftest.$ac_ext <<_ACEOF
5271/* end confdefs.h. */
5272$ac_includes_default
5273int
5274main ()
5275{
5276static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5277test_array [0] = 0
5278
5279 ;
5280 return 0;
5281}
5282_ACEOF
5283rm -f conftest.$ac_objext
5284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5285 (eval $ac_compile) 2>conftest.er1
5286 ac_status=$?
5287 grep -v '^ *+' conftest.er1 >conftest.err
5288 rm -f conftest.er1
5289 cat conftest.err >&5
5290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5291 (exit $ac_status); } &&
d7974fe6
KC
5292 { ac_try='test -z "$ac_c_werror_flag"
5293 || test ! -s conftest.err'
bf3b7cd3
JD
5294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5295 (eval $ac_try) 2>&5
5296 ac_status=$?
5297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5298 (exit $ac_status); }; } &&
5299 { ac_try='test -s conftest.$ac_objext'
5300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5301 (eval $ac_try) 2>&5
5302 ac_status=$?
5303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5304 (exit $ac_status); }; }; then
5305 ac_hi=$ac_mid; break
5306else
5307 echo "$as_me: failed program was:" >&5
5308sed 's/^/| /' conftest.$ac_ext >&5
5309
5310ac_lo=`expr $ac_mid + 1`
5311 if test $ac_lo -le $ac_mid; then
5312 ac_lo= ac_hi=
5313 break
5314 fi
5315 ac_mid=`expr 2 '*' $ac_mid + 1`
5316fi
5317rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5318 done
5319else
5320 echo "$as_me: failed program was:" >&5
5321sed 's/^/| /' conftest.$ac_ext >&5
5322
5323cat >conftest.$ac_ext <<_ACEOF
5324/* confdefs.h. */
5325_ACEOF
5326cat confdefs.h >>conftest.$ac_ext
5327cat >>conftest.$ac_ext <<_ACEOF
5328/* end confdefs.h. */
5329$ac_includes_default
5330int
5331main ()
5332{
5333static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
5334test_array [0] = 0
5335
5336 ;
5337 return 0;
5338}
5339_ACEOF
5340rm -f conftest.$ac_objext
5341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5342 (eval $ac_compile) 2>conftest.er1
5343 ac_status=$?
5344 grep -v '^ *+' conftest.er1 >conftest.err
5345 rm -f conftest.er1
5346 cat conftest.err >&5
5347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5348 (exit $ac_status); } &&
d7974fe6
KC
5349 { ac_try='test -z "$ac_c_werror_flag"
5350 || test ! -s conftest.err'
bf3b7cd3
JD
5351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5352 (eval $ac_try) 2>&5
5353 ac_status=$?
5354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5355 (exit $ac_status); }; } &&
5356 { ac_try='test -s conftest.$ac_objext'
5357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5358 (eval $ac_try) 2>&5
5359 ac_status=$?
5360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5361 (exit $ac_status); }; }; then
5362 ac_hi=-1 ac_mid=-1
5363 while :; do
5364 cat >conftest.$ac_ext <<_ACEOF
5365/* confdefs.h. */
5366_ACEOF
5367cat confdefs.h >>conftest.$ac_ext
5368cat >>conftest.$ac_ext <<_ACEOF
5369/* end confdefs.h. */
5370$ac_includes_default
5371int
5372main ()
5373{
5374static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
5375test_array [0] = 0
5376
5377 ;
5378 return 0;
5379}
5380_ACEOF
5381rm -f conftest.$ac_objext
5382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5383 (eval $ac_compile) 2>conftest.er1
5384 ac_status=$?
5385 grep -v '^ *+' conftest.er1 >conftest.err
5386 rm -f conftest.er1
5387 cat conftest.err >&5
5388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5389 (exit $ac_status); } &&
d7974fe6
KC
5390 { ac_try='test -z "$ac_c_werror_flag"
5391 || test ! -s conftest.err'
bf3b7cd3
JD
5392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5393 (eval $ac_try) 2>&5
5394 ac_status=$?
5395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5396 (exit $ac_status); }; } &&
5397 { ac_try='test -s conftest.$ac_objext'
5398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5399 (eval $ac_try) 2>&5
5400 ac_status=$?
5401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5402 (exit $ac_status); }; }; then
5403 ac_lo=$ac_mid; break
5404else
5405 echo "$as_me: failed program was:" >&5
5406sed 's/^/| /' conftest.$ac_ext >&5
5407
5408ac_hi=`expr '(' $ac_mid ')' - 1`
5409 if test $ac_mid -le $ac_hi; then
5410 ac_lo= ac_hi=
5411 break
5412 fi
5413 ac_mid=`expr 2 '*' $ac_mid`
5414fi
5415rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5416 done
5417else
5418 echo "$as_me: failed program was:" >&5
5419sed 's/^/| /' conftest.$ac_ext >&5
5420
5421ac_lo= ac_hi=
5422fi
5423rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5424fi
5425rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5426# Binary search between lo and hi bounds.
5427while test "x$ac_lo" != "x$ac_hi"; do
5428 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5429 cat >conftest.$ac_ext <<_ACEOF
5430/* confdefs.h. */
5431_ACEOF
5432cat confdefs.h >>conftest.$ac_ext
5433cat >>conftest.$ac_ext <<_ACEOF
5434/* end confdefs.h. */
5435$ac_includes_default
5436int
5437main ()
5438{
5439static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5440test_array [0] = 0
5441
5442 ;
5443 return 0;
5444}
5445_ACEOF
5446rm -f conftest.$ac_objext
5447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5448 (eval $ac_compile) 2>conftest.er1
5449 ac_status=$?
5450 grep -v '^ *+' conftest.er1 >conftest.err
5451 rm -f conftest.er1
5452 cat conftest.err >&5
5453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5454 (exit $ac_status); } &&
d7974fe6
KC
5455 { ac_try='test -z "$ac_c_werror_flag"
5456 || test ! -s conftest.err'
bf3b7cd3
JD
5457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5458 (eval $ac_try) 2>&5
5459 ac_status=$?
5460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5461 (exit $ac_status); }; } &&
5462 { ac_try='test -s conftest.$ac_objext'
5463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5464 (eval $ac_try) 2>&5
5465 ac_status=$?
5466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5467 (exit $ac_status); }; }; then
5468 ac_hi=$ac_mid
5469else
5470 echo "$as_me: failed program was:" >&5
5471sed 's/^/| /' conftest.$ac_ext >&5
5472
5473ac_lo=`expr '(' $ac_mid ')' + 1`
5474fi
5475rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5476done
5477case $ac_lo in
5478?*) ac_cv_sizeof_long_long=$ac_lo;;
5479'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5480See \`config.log' for more details." >&5
5481echo "$as_me: error: cannot compute sizeof (long long), 77
5482See \`config.log' for more details." >&2;}
5483 { (exit 1); exit 1; }; } ;;
5484esac
5485else
5486 if test "$cross_compiling" = yes; then
d7974fe6
KC
5487 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5488See \`config.log' for more details." >&5
5489echo "$as_me: error: cannot run test program while cross compiling
5490See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5491 { (exit 1); exit 1; }; }
5492else
5493 cat >conftest.$ac_ext <<_ACEOF
5494/* confdefs.h. */
5495_ACEOF
5496cat confdefs.h >>conftest.$ac_ext
5497cat >>conftest.$ac_ext <<_ACEOF
5498/* end confdefs.h. */
5499$ac_includes_default
5500long longval () { return (long) (sizeof (long long)); }
5501unsigned long ulongval () { return (long) (sizeof (long long)); }
5502#include <stdio.h>
5503#include <stdlib.h>
5504int
5505main ()
5506{
5507
5508 FILE *f = fopen ("conftest.val", "w");
5509 if (! f)
5510 exit (1);
5511 if (((long) (sizeof (long long))) < 0)
5512 {
5513 long i = longval ();
5514 if (i != ((long) (sizeof (long long))))
5515 exit (1);
5516 fprintf (f, "%ld\n", i);
5517 }
5518 else
5519 {
5520 unsigned long i = ulongval ();
5521 if (i != ((long) (sizeof (long long))))
5522 exit (1);
5523 fprintf (f, "%lu\n", i);
5524 }
5525 exit (ferror (f) || fclose (f) != 0);
5526
5527 ;
5528 return 0;
5529}
5530_ACEOF
5531rm -f conftest$ac_exeext
5532if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5533 (eval $ac_link) 2>&5
5534 ac_status=$?
5535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5536 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5538 (eval $ac_try) 2>&5
5539 ac_status=$?
5540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5541 (exit $ac_status); }; }; then
5542 ac_cv_sizeof_long_long=`cat conftest.val`
5543else
5544 echo "$as_me: program exited with status $ac_status" >&5
5545echo "$as_me: failed program was:" >&5
5546sed 's/^/| /' conftest.$ac_ext >&5
5547
5548( exit $ac_status )
5549{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5550See \`config.log' for more details." >&5
5551echo "$as_me: error: cannot compute sizeof (long long), 77
5552See \`config.log' for more details." >&2;}
5553 { (exit 1); exit 1; }; }
5554fi
5555rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5556fi
5557fi
5558rm -f conftest.val
5559else
5560 ac_cv_sizeof_long_long=0
5561fi
5562fi
5563echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5564echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
5565cat >>confdefs.h <<_ACEOF
5566#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5567_ACEOF
5568
5569
5570fi
5ec1c5e6
KC
5571
5572echo "$as_me:$LINENO: checking for __int64" >&5
5573echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5574if test "${ac_cv_type___int64+set}" = set; then
5575 echo $ECHO_N "(cached) $ECHO_C" >&6
5576else
5577 cat >conftest.$ac_ext <<_ACEOF
5578/* confdefs.h. */
5579_ACEOF
5580cat confdefs.h >>conftest.$ac_ext
5581cat >>conftest.$ac_ext <<_ACEOF
5582/* end confdefs.h. */
5583$ac_includes_default
5584int
5585main ()
5586{
5587if ((__int64 *) 0)
5588 return 0;
5589if (sizeof (__int64))
5590 return 0;
5591 ;
5592 return 0;
5593}
5594_ACEOF
5595rm -f conftest.$ac_objext
5596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5597 (eval $ac_compile) 2>conftest.er1
5598 ac_status=$?
5599 grep -v '^ *+' conftest.er1 >conftest.err
5600 rm -f conftest.er1
5601 cat conftest.err >&5
5602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5603 (exit $ac_status); } &&
5604 { ac_try='test -z "$ac_c_werror_flag"
5605 || test ! -s conftest.err'
5606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5607 (eval $ac_try) 2>&5
5608 ac_status=$?
5609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5610 (exit $ac_status); }; } &&
5611 { ac_try='test -s conftest.$ac_objext'
5612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5613 (eval $ac_try) 2>&5
5614 ac_status=$?
5615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5616 (exit $ac_status); }; }; then
5617 ac_cv_type___int64=yes
5618else
5619 echo "$as_me: failed program was:" >&5
5620sed 's/^/| /' conftest.$ac_ext >&5
5621
5622ac_cv_type___int64=no
5623fi
5624rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5625fi
5626echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5627echo "${ECHO_T}$ac_cv_type___int64" >&6
5628if test $ac_cv_type___int64 = yes; then
5629
5630cat >>confdefs.h <<_ACEOF
5631#define HAVE___INT64 1
5632_ACEOF
5633
5634echo "$as_me:$LINENO: checking for __int64" >&5
bf3b7cd3
JD
5635echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5636if test "${ac_cv_type___int64+set}" = set; then
5637 echo $ECHO_N "(cached) $ECHO_C" >&6
5638else
ba479fd2 5639 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5640/* confdefs.h. */
5641_ACEOF
5642cat confdefs.h >>conftest.$ac_ext
5643cat >>conftest.$ac_ext <<_ACEOF
5644/* end confdefs.h. */
bf3b7cd3 5645$ac_includes_default
ba479fd2
NN
5646int
5647main ()
5648{
bf3b7cd3
JD
5649if ((__int64 *) 0)
5650 return 0;
5651if (sizeof (__int64))
5652 return 0;
ba479fd2
NN
5653 ;
5654 return 0;
5655}
5656_ACEOF
5657rm -f conftest.$ac_objext
5658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5659 (eval $ac_compile) 2>conftest.er1
ba479fd2 5660 ac_status=$?
86da66b5
HPN
5661 grep -v '^ *+' conftest.er1 >conftest.err
5662 rm -f conftest.er1
5663 cat conftest.err >&5
ba479fd2
NN
5664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5665 (exit $ac_status); } &&
d7974fe6
KC
5666 { ac_try='test -z "$ac_c_werror_flag"
5667 || test ! -s conftest.err'
86da66b5
HPN
5668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5669 (eval $ac_try) 2>&5
5670 ac_status=$?
5671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5672 (exit $ac_status); }; } &&
5673 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5675 (eval $ac_try) 2>&5
5676 ac_status=$?
5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678 (exit $ac_status); }; }; then
bf3b7cd3 5679 ac_cv_type___int64=yes
75b6f3fd 5680else
ba479fd2
NN
5681 echo "$as_me: failed program was:" >&5
5682sed 's/^/| /' conftest.$ac_ext >&5
5683
bf3b7cd3 5684ac_cv_type___int64=no
75b6f3fd 5685fi
86da66b5 5686rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5687fi
bf3b7cd3
JD
5688echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5689echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 5690
bf3b7cd3
JD
5691echo "$as_me:$LINENO: checking size of __int64" >&5
5692echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
5693if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 5694 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 5695else
bf3b7cd3
JD
5696 if test "$ac_cv_type___int64" = yes; then
5697 # The cast to unsigned long works around a bug in the HP C Compiler
5698 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5699 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5700 # This bug is HP SR number 8606223364.
5701 if test "$cross_compiling" = yes; then
5702 # Depending upon the size, compute the lo and hi bounds.
5703cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5704/* confdefs.h. */
5705_ACEOF
5706cat confdefs.h >>conftest.$ac_ext
5707cat >>conftest.$ac_ext <<_ACEOF
5708/* end confdefs.h. */
bf3b7cd3 5709$ac_includes_default
ba479fd2
NN
5710int
5711main ()
5712{
bf3b7cd3
JD
5713static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
5714test_array [0] = 0
5715
ba479fd2
NN
5716 ;
5717 return 0;
5718}
5719_ACEOF
5720rm -f conftest.$ac_objext
5721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5722 (eval $ac_compile) 2>conftest.er1
ba479fd2 5723 ac_status=$?
86da66b5
HPN
5724 grep -v '^ *+' conftest.er1 >conftest.err
5725 rm -f conftest.er1
5726 cat conftest.err >&5
ba479fd2
NN
5727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5728 (exit $ac_status); } &&
d7974fe6
KC
5729 { ac_try='test -z "$ac_c_werror_flag"
5730 || test ! -s conftest.err'
86da66b5
HPN
5731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5732 (eval $ac_try) 2>&5
5733 ac_status=$?
5734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5735 (exit $ac_status); }; } &&
5736 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5738 (eval $ac_try) 2>&5
5739 ac_status=$?
5740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5741 (exit $ac_status); }; }; then
bf3b7cd3
JD
5742 ac_lo=0 ac_mid=0
5743 while :; do
5744 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5745/* confdefs.h. */
5746_ACEOF
5747cat confdefs.h >>conftest.$ac_ext
5748cat >>conftest.$ac_ext <<_ACEOF
5749/* end confdefs.h. */
bf3b7cd3 5750$ac_includes_default
ba479fd2
NN
5751int
5752main ()
5753{
bf3b7cd3
JD
5754static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5755test_array [0] = 0
5756
ba479fd2
NN
5757 ;
5758 return 0;
5759}
5760_ACEOF
5761rm -f conftest.$ac_objext
5762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5763 (eval $ac_compile) 2>conftest.er1
ba479fd2 5764 ac_status=$?
86da66b5
HPN
5765 grep -v '^ *+' conftest.er1 >conftest.err
5766 rm -f conftest.er1
5767 cat conftest.err >&5
ba479fd2
NN
5768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5769 (exit $ac_status); } &&
d7974fe6
KC
5770 { ac_try='test -z "$ac_c_werror_flag"
5771 || test ! -s conftest.err'
86da66b5
HPN
5772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5773 (eval $ac_try) 2>&5
5774 ac_status=$?
5775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5776 (exit $ac_status); }; } &&
5777 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5779 (eval $ac_try) 2>&5
5780 ac_status=$?
5781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5782 (exit $ac_status); }; }; then
bf3b7cd3 5783 ac_hi=$ac_mid; break
75e93faa 5784else
ba479fd2
NN
5785 echo "$as_me: failed program was:" >&5
5786sed 's/^/| /' conftest.$ac_ext >&5
5787
bf3b7cd3
JD
5788ac_lo=`expr $ac_mid + 1`
5789 if test $ac_lo -le $ac_mid; then
5790 ac_lo= ac_hi=
5791 break
5792 fi
5793 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 5794fi
86da66b5 5795rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5796 done
75e93faa 5797else
bf3b7cd3
JD
5798 echo "$as_me: failed program was:" >&5
5799sed 's/^/| /' conftest.$ac_ext >&5
5800
5801cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5802/* confdefs.h. */
5803_ACEOF
5804cat confdefs.h >>conftest.$ac_ext
5805cat >>conftest.$ac_ext <<_ACEOF
5806/* end confdefs.h. */
bf3b7cd3 5807$ac_includes_default
ba479fd2
NN
5808int
5809main ()
5810{
bf3b7cd3
JD
5811static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
5812test_array [0] = 0
5813
ba479fd2
NN
5814 ;
5815 return 0;
5816}
5817_ACEOF
5818rm -f conftest.$ac_objext
5819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5820 (eval $ac_compile) 2>conftest.er1
ba479fd2 5821 ac_status=$?
86da66b5
HPN
5822 grep -v '^ *+' conftest.er1 >conftest.err
5823 rm -f conftest.er1
5824 cat conftest.err >&5
ba479fd2
NN
5825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5826 (exit $ac_status); } &&
d7974fe6
KC
5827 { ac_try='test -z "$ac_c_werror_flag"
5828 || test ! -s conftest.err'
86da66b5
HPN
5829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5830 (eval $ac_try) 2>&5
5831 ac_status=$?
5832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5833 (exit $ac_status); }; } &&
5834 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5836 (eval $ac_try) 2>&5
5837 ac_status=$?
5838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5839 (exit $ac_status); }; }; then
bf3b7cd3
JD
5840 ac_hi=-1 ac_mid=-1
5841 while :; do
5842 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5843/* confdefs.h. */
5844_ACEOF
5845cat confdefs.h >>conftest.$ac_ext
5846cat >>conftest.$ac_ext <<_ACEOF
5847/* end confdefs.h. */
bf3b7cd3 5848$ac_includes_default
ba479fd2
NN
5849int
5850main ()
5851{
bf3b7cd3
JD
5852static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
5853test_array [0] = 0
5854
ba479fd2
NN
5855 ;
5856 return 0;
5857}
5858_ACEOF
5859rm -f conftest.$ac_objext
5860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5861 (eval $ac_compile) 2>conftest.er1
ba479fd2 5862 ac_status=$?
86da66b5
HPN
5863 grep -v '^ *+' conftest.er1 >conftest.err
5864 rm -f conftest.er1
5865 cat conftest.err >&5
ba479fd2
NN
5866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867 (exit $ac_status); } &&
d7974fe6
KC
5868 { ac_try='test -z "$ac_c_werror_flag"
5869 || test ! -s conftest.err'
86da66b5
HPN
5870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5871 (eval $ac_try) 2>&5
5872 ac_status=$?
5873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5874 (exit $ac_status); }; } &&
5875 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5877 (eval $ac_try) 2>&5
5878 ac_status=$?
5879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880 (exit $ac_status); }; }; then
bf3b7cd3 5881 ac_lo=$ac_mid; break
04cabffc 5882else
ba479fd2
NN
5883 echo "$as_me: failed program was:" >&5
5884sed 's/^/| /' conftest.$ac_ext >&5
5885
bf3b7cd3
JD
5886ac_hi=`expr '(' $ac_mid ')' - 1`
5887 if test $ac_mid -le $ac_hi; then
5888 ac_lo= ac_hi=
5889 break
5890 fi
5891 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 5892fi
86da66b5 5893rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5894 done
5895else
5896 echo "$as_me: failed program was:" >&5
5897sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 5898
bf3b7cd3 5899ac_lo= ac_hi=
414d23ae 5900fi
bf3b7cd3 5901rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5902fi
bf3b7cd3
JD
5903rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5904# Binary search between lo and hi bounds.
5905while test "x$ac_lo" != "x$ac_hi"; do
5906 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 5907 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5908/* confdefs.h. */
5909_ACEOF
5910cat confdefs.h >>conftest.$ac_ext
5911cat >>conftest.$ac_ext <<_ACEOF
5912/* end confdefs.h. */
bf3b7cd3 5913$ac_includes_default
ba479fd2
NN
5914int
5915main ()
5916{
bf3b7cd3
JD
5917static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5918test_array [0] = 0
5919
ba479fd2
NN
5920 ;
5921 return 0;
5922}
5923_ACEOF
5924rm -f conftest.$ac_objext
5925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5926 (eval $ac_compile) 2>conftest.er1
ba479fd2 5927 ac_status=$?
86da66b5
HPN
5928 grep -v '^ *+' conftest.er1 >conftest.err
5929 rm -f conftest.er1
5930 cat conftest.err >&5
ba479fd2
NN
5931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5932 (exit $ac_status); } &&
d7974fe6
KC
5933 { ac_try='test -z "$ac_c_werror_flag"
5934 || test ! -s conftest.err'
86da66b5
HPN
5935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5936 (eval $ac_try) 2>&5
5937 ac_status=$?
5938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5939 (exit $ac_status); }; } &&
5940 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5942 (eval $ac_try) 2>&5
5943 ac_status=$?
5944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5945 (exit $ac_status); }; }; then
bf3b7cd3 5946 ac_hi=$ac_mid
75e93faa 5947else
ba479fd2
NN
5948 echo "$as_me: failed program was:" >&5
5949sed 's/^/| /' conftest.$ac_ext >&5
5950
bf3b7cd3 5951ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 5952fi
86da66b5 5953rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5954done
bf3b7cd3
JD
5955case $ac_lo in
5956?*) ac_cv_sizeof___int64=$ac_lo;;
5957'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
5958See \`config.log' for more details." >&5
5959echo "$as_me: error: cannot compute sizeof (__int64), 77
5960See \`config.log' for more details." >&2;}
5961 { (exit 1); exit 1; }; } ;;
5962esac
5963else
5964 if test "$cross_compiling" = yes; then
d7974fe6
KC
5965 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5966See \`config.log' for more details." >&5
5967echo "$as_me: error: cannot run test program while cross compiling
5968See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5969 { (exit 1); exit 1; }; }
5970else
5971 cat >conftest.$ac_ext <<_ACEOF
5972/* confdefs.h. */
5973_ACEOF
5974cat confdefs.h >>conftest.$ac_ext
5975cat >>conftest.$ac_ext <<_ACEOF
5976/* end confdefs.h. */
5977$ac_includes_default
5978long longval () { return (long) (sizeof (__int64)); }
5979unsigned long ulongval () { return (long) (sizeof (__int64)); }
5980#include <stdio.h>
5981#include <stdlib.h>
5982int
5983main ()
5984{
414d23ae 5985
bf3b7cd3
JD
5986 FILE *f = fopen ("conftest.val", "w");
5987 if (! f)
5988 exit (1);
5989 if (((long) (sizeof (__int64))) < 0)
5990 {
5991 long i = longval ();
5992 if (i != ((long) (sizeof (__int64))))
5993 exit (1);
5994 fprintf (f, "%ld\n", i);
5995 }
5996 else
5997 {
5998 unsigned long i = ulongval ();
5999 if (i != ((long) (sizeof (__int64))))
6000 exit (1);
6001 fprintf (f, "%lu\n", i);
6002 }
6003 exit (ferror (f) || fclose (f) != 0);
6004
6005 ;
6006 return 0;
6007}
6008_ACEOF
6009rm -f conftest$ac_exeext
6010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6011 (eval $ac_link) 2>&5
6012 ac_status=$?
6013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6014 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6016 (eval $ac_try) 2>&5
6017 ac_status=$?
6018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6019 (exit $ac_status); }; }; then
6020 ac_cv_sizeof___int64=`cat conftest.val`
6021else
6022 echo "$as_me: program exited with status $ac_status" >&5
6023echo "$as_me: failed program was:" >&5
6024sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6025
bf3b7cd3
JD
6026( exit $ac_status )
6027{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
6028See \`config.log' for more details." >&5
6029echo "$as_me: error: cannot compute sizeof (__int64), 77
6030See \`config.log' for more details." >&2;}
ba479fd2 6031 { (exit 1); exit 1; }; }
414d23ae 6032fi
bf3b7cd3
JD
6033rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6034fi
6035fi
6036rm -f conftest.val
6037else
6038 ac_cv_sizeof___int64=0
6039fi
6040fi
ba479fd2
NN
6041echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6042echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 6043cat >>confdefs.h <<_ACEOF
414d23ae 6044#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6045_ACEOF
414d23ae 6046
cafe096b 6047
414d23ae
HPN
6048fi
6049
5ec1c5e6 6050
34a86c2b
NN
6051# ---------------------
6052# Warnings and checking
6053# ---------------------
6054
b5472e1d
NN
6055# Check $CC warning features (if it's GCC).
6056# We want to use -pedantic, but we don't want warnings about
6057# * 'long long'
6058# * variadic macros
6059# So, we only use -pedantic if we can disable those warnings.
6060
6061echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6062echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
6063if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6064 echo $ECHO_N "(cached) $ECHO_C" >&6
6065else
6066 save_CFLAGS="$CFLAGS"
6067 CFLAGS="-Wno-long-long"
6068 cat >conftest.$ac_ext <<_ACEOF
6069/* confdefs.h. */
6070_ACEOF
6071cat confdefs.h >>conftest.$ac_ext
6072cat >>conftest.$ac_ext <<_ACEOF
6073/* end confdefs.h. */
6074
6075_ACEOF
6076rm -f conftest.$ac_objext
6077if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6078 (eval $ac_compile) 2>conftest.er1
6079 ac_status=$?
6080 grep -v '^ *+' conftest.er1 >conftest.err
6081 rm -f conftest.er1
6082 cat conftest.err >&5
6083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6084 (exit $ac_status); } &&
d7974fe6
KC
6085 { ac_try='test -z "$ac_c_werror_flag"
6086 || test ! -s conftest.err'
b5472e1d
NN
6087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6088 (eval $ac_try) 2>&5
6089 ac_status=$?
6090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6091 (exit $ac_status); }; } &&
6092 { ac_try='test -s conftest.$ac_objext'
6093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6094 (eval $ac_try) 2>&5
6095 ac_status=$?
6096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6097 (exit $ac_status); }; }; then
6098 ac_cv_prog_cc_w_no_long_long=yes
6099else
6100 echo "$as_me: failed program was:" >&5
6101sed 's/^/| /' conftest.$ac_ext >&5
6102
6103ac_cv_prog_cc_w_no_long_long=no
6104fi
6105rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6106 CFLAGS="$save_CFLAGS"
6107
6108fi
6109echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6110echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
6111
6112echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6113echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
6114if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6115 echo $ECHO_N "(cached) $ECHO_C" >&6
6116else
6117 save_CFLAGS="$CFLAGS"
6118 CFLAGS="-Wno-variadic-macros"
6119 cat >conftest.$ac_ext <<_ACEOF
6120/* confdefs.h. */
6121_ACEOF
6122cat confdefs.h >>conftest.$ac_ext
6123cat >>conftest.$ac_ext <<_ACEOF
6124/* end confdefs.h. */
6125
6126_ACEOF
6127rm -f conftest.$ac_objext
6128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6129 (eval $ac_compile) 2>conftest.er1
6130 ac_status=$?
6131 grep -v '^ *+' conftest.er1 >conftest.err
6132 rm -f conftest.er1
6133 cat conftest.err >&5
6134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6135 (exit $ac_status); } &&
d7974fe6
KC
6136 { ac_try='test -z "$ac_c_werror_flag"
6137 || test ! -s conftest.err'
b5472e1d
NN
6138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6139 (eval $ac_try) 2>&5
6140 ac_status=$?
6141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6142 (exit $ac_status); }; } &&
6143 { ac_try='test -s conftest.$ac_objext'
6144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6145 (eval $ac_try) 2>&5
6146 ac_status=$?
6147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6148 (exit $ac_status); }; }; then
6149 ac_cv_prog_cc_w_no_variadic_macros=yes
6150else
6151 echo "$as_me: failed program was:" >&5
6152sed 's/^/| /' conftest.$ac_ext >&5
6153
6154ac_cv_prog_cc_w_no_variadic_macros=no
6155fi
6156rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6157 CFLAGS="$save_CFLAGS"
6158
6159fi
6160echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6161echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
6162
34a86c2b 6163strict1_warn=
b5472e1d
NN
6164if test $ac_cv_prog_cc_w_no_long_long = yes \
6165 && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then
6166 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros"
34a86c2b
NN
6167fi
6168
643d3bd2
NN
6169# Add -Wold-style-definition if it's accepted
6170echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6171echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
6172if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6173 echo $ECHO_N "(cached) $ECHO_C" >&6
6174else
6175 save_CFLAGS="$CFLAGS"
6176 CFLAGS="-Wold-style-definition"
6177 cat >conftest.$ac_ext <<_ACEOF
6178/* confdefs.h. */
6179_ACEOF
6180cat confdefs.h >>conftest.$ac_ext
6181cat >>conftest.$ac_ext <<_ACEOF
6182/* end confdefs.h. */
6183
6184_ACEOF
6185rm -f conftest.$ac_objext
6186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6187 (eval $ac_compile) 2>conftest.er1
6188 ac_status=$?
6189 grep -v '^ *+' conftest.er1 >conftest.err
6190 rm -f conftest.er1
6191 cat conftest.err >&5
6192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6193 (exit $ac_status); } &&
d7974fe6
KC
6194 { ac_try='test -z "$ac_c_werror_flag"
6195 || test ! -s conftest.err'
643d3bd2
NN
6196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6197 (eval $ac_try) 2>&5
6198 ac_status=$?
6199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6200 (exit $ac_status); }; } &&
6201 { ac_try='test -s conftest.$ac_objext'
6202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6203 (eval $ac_try) 2>&5
6204 ac_status=$?
6205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6206 (exit $ac_status); }; }; then
6207 ac_cv_prog_cc_w_old_style_definition=yes
6208else
6209 echo "$as_me: failed program was:" >&5
6210sed 's/^/| /' conftest.$ac_ext >&5
6211
6212ac_cv_prog_cc_w_old_style_definition=no
6213fi
6214rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6215 CFLAGS="$save_CFLAGS"
6216
6217fi
6218echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
6219echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
6220if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
6221 strict1_warn="${strict1_warn} -Wold-style-definition"
6222fi
6223
ac0f3f39
KG
6224# Add -Wmissing-format-attribute if it's accepted
6225echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5
6226echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6
6227if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then
6228 echo $ECHO_N "(cached) $ECHO_C" >&6
6229else
6230 save_CFLAGS="$CFLAGS"
6231 CFLAGS="-Wmissing-format-attribute"
6232 cat >conftest.$ac_ext <<_ACEOF
6233/* confdefs.h. */
6234_ACEOF
6235cat confdefs.h >>conftest.$ac_ext
6236cat >>conftest.$ac_ext <<_ACEOF
6237/* end confdefs.h. */
6238
6239_ACEOF
6240rm -f conftest.$ac_objext
6241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6242 (eval $ac_compile) 2>conftest.er1
6243 ac_status=$?
6244 grep -v '^ *+' conftest.er1 >conftest.err
6245 rm -f conftest.er1
6246 cat conftest.err >&5
6247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6248 (exit $ac_status); } &&
6249 { ac_try='test -z "$ac_c_werror_flag"
6250 || test ! -s conftest.err'
6251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6252 (eval $ac_try) 2>&5
6253 ac_status=$?
6254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6255 (exit $ac_status); }; } &&
6256 { ac_try='test -s conftest.$ac_objext'
6257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6258 (eval $ac_try) 2>&5
6259 ac_status=$?
6260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6261 (exit $ac_status); }; }; then
6262 ac_cv_prog_cc_w_missing_format_attribute=yes
6263else
6264 echo "$as_me: failed program was:" >&5
6265sed 's/^/| /' conftest.$ac_ext >&5
6266
6267ac_cv_prog_cc_w_missing_format_attribute=no
6268fi
6269rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6270 CFLAGS="$save_CFLAGS"
6271
6272fi
6273echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5
6274echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6
6275if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then
6276 strict1_warn="${strict1_warn} -Wmissing-format-attribute"
6277fi
6278
09a9c095
NN
6279# Enable -Werror, period.
6280# Check whether --enable-werror_always or --disable-werror_always was given.
6281if test "${enable_werror_always+set}" = set; then
6282 enableval="$enable_werror_always"
6283
6284else
6285 enable_werror_always=no
6286fi;
6287if test x${enable_werror_always} = xyes ; then
6288 strict1_warn="${strict1_warn} -Werror"
6289 WERROR=-Werror
6290fi
6291
ac0f3f39
KG
6292
6293
ba479fd2 6294# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
6295# That's useful for people building cross-compilers, or just running a
6296# quick `make'.
6297warn_cflags=
6298if test "x$GCC" = "xyes"; then
6299 warn_cflags='$(GCC_WARN_CFLAGS)'
6300fi
6301
6302
dd859b8a 6303# Enable -Werror in bootstrap stage2 and later.
a1286ef5
ZW
6304is_release=
6305if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6306 is_release=yes
6307fi
dd859b8a
KG
6308# Check whether --enable-werror or --disable-werror was given.
6309if test "${enable_werror+set}" = set; then
6310 enableval="$enable_werror"
ba479fd2 6311
dd859b8a 6312else
06c37c96
NS
6313 if test x$is_release = x ; then
6314 # Default to "yes" on development branches.
dd859b8a 6315 enable_werror=yes
06c37c96
NS
6316else
6317 # Default to "no" on release branches.
6318 enable_werror=no
6319fi
ba479fd2 6320fi;
dd859b8a
KG
6321if test x$enable_werror = xyes ; then
6322 WERROR=-Werror
6323fi
6324
6325
414d23ae
HPN
6326# Enable expensive internal checks
6327# Check whether --enable-checking or --disable-checking was given.
6328if test "${enable_checking+set}" = set; then
6329 enableval="$enable_checking"
e1bbfc5c
NS
6330 ac_checking_flags="${enableval}"
6331else
6332
6333# Determine the default checks.
6334if test x$is_release = x ; then
6335 ac_checking_flags=yes
6336else
6337 ac_checking_flags=release
6338fi
6339fi;
6340ac_assert_checking=1
6341ac_checking=
cdce5c16
NS
6342ac_fold_checking=
6343ac_gc_checking=
6344ac_gc_always_collect=
414d23ae
HPN
6345ac_rtl_checking=
6346ac_rtlflag_checking=
b53ef395 6347ac_runtime_checking=1
cdce5c16
NS
6348ac_tree_checking=
6349ac_valgrind_checking=
e1bbfc5c
NS
6350IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6351for check in $ac_checking_flags
6352do
6353 case $check in
cdce5c16 6354 # these set all the flags to specific states
e1bbfc5c 6355 yes) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6356 ac_fold_checking= ; ac_gc_checking=1 ;
6357 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6358 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
cdce5c16
NS
6359 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6360 no|none) ac_assert_checking= ; ac_checking= ;
6361 ac_fold_checking= ; ac_gc_checking= ;
6362 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6363 ac_rtlflag_checking= ; ac_runtime_checking= ;
cdce5c16 6364 ac_tree_checking= ; ac_valgrind_checking= ;;
e1bbfc5c 6365 all) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6366 ac_fold_checking=1 ; ac_gc_checking=1 ;
6367 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
6368 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6369 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6370 release) ac_assert_checking=1 ; ac_checking= ;
6371 ac_fold_checking= ; ac_gc_checking= ;
6372 ac_gc_always_collect= ; ac_rtl_checking= ;
6373 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6374 ac_tree_checking= ; ac_valgrind_checking= ;;
6375 # these enable particular checks
e1bbfc5c
NS
6376 assert) ac_assert_checking=1 ;;
6377 fold) ac_fold_checking=1 ;;
6378 gc) ac_gc_checking=1 ;;
6379 gcac) ac_gc_always_collect=1 ;;
6380 misc) ac_checking=1 ;;
e1bbfc5c 6381 rtl) ac_rtl_checking=1 ;;
cdce5c16 6382 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 6383 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 6384 tree) ac_tree_checking=1 ;;
cdce5c16 6385 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 6386 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
6387echo "$as_me: error: unknown check category $check" >&2;}
6388 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
6389 esac
6390done
6391IFS="$ac_save_IFS"
06c37c96 6392
ba479fd2
NN
6393nocommon_flag=""
6394if test x$ac_checking != x ; then
6395
6396cat >>confdefs.h <<\_ACEOF
6397#define ENABLE_CHECKING 1
6398_ACEOF
6399
6400 nocommon_flag=-fno-common
6401fi
6402
06c37c96
NS
6403if test x$ac_assert_checking != x ; then
6404
6405cat >>confdefs.h <<\_ACEOF
6406#define ENABLE_ASSERT_CHECKING 1
6407_ACEOF
6408
b53ef395 6409fi
232b67d9 6410
b53ef395
NS
6411if test x$ac_runtime_checking != x ; then
6412
6413cat >>confdefs.h <<\_ACEOF
6414#define ENABLE_RUNTIME_CHECKING 1
6415_ACEOF
6416
06c37c96 6417fi
ba479fd2
NN
6418if test x$ac_tree_checking != x ; then
6419
6420cat >>confdefs.h <<\_ACEOF
6421#define ENABLE_TREE_CHECKING 1
6422_ACEOF
6423
13f05fd0 6424 TREEBROWSER=tree-browser.o
ba479fd2 6425fi
13f05fd0 6426
ba479fd2
NN
6427if test x$ac_rtl_checking != x ; then
6428
6429cat >>confdefs.h <<\_ACEOF
6430#define ENABLE_RTL_CHECKING 1
6431_ACEOF
6432
6433fi
6434if test x$ac_rtlflag_checking != x ; then
6435
6436cat >>confdefs.h <<\_ACEOF
6437#define ENABLE_RTL_FLAG_CHECKING 1
6438_ACEOF
6439
6440fi
6441if test x$ac_gc_checking != x ; then
6442
6443cat >>confdefs.h <<\_ACEOF
6444#define ENABLE_GC_CHECKING 1
6445_ACEOF
6446
6447fi
6448if test x$ac_gc_always_collect != x ; then
6449
6450cat >>confdefs.h <<\_ACEOF
6451#define ENABLE_GC_ALWAYS_COLLECT 1
6452_ACEOF
6453
6454fi
6455if test x$ac_fold_checking != x ; then
6456
6457cat >>confdefs.h <<\_ACEOF
6458#define ENABLE_FOLD_CHECKING 1
6459_ACEOF
6460
6461fi
6462valgrind_path_defines=
6463valgrind_command=
6464
ba479fd2
NN
6465if test "${ac_cv_header_valgrind_h+set}" = set; then
6466 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6467echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6468if test "${ac_cv_header_valgrind_h+set}" = set; then
6469 echo $ECHO_N "(cached) $ECHO_C" >&6
6470fi
6471echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6472echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6473else
6474 # Is the header compilable?
6475echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6476echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
6477cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6478/* confdefs.h. */
6479_ACEOF
6480cat confdefs.h >>conftest.$ac_ext
6481cat >>conftest.$ac_ext <<_ACEOF
6482/* end confdefs.h. */
6483$ac_includes_default
63cf211a 6484#include <valgrind.h>
ba479fd2
NN
6485_ACEOF
6486rm -f conftest.$ac_objext
6487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6488 (eval $ac_compile) 2>conftest.er1
ba479fd2 6489 ac_status=$?
86da66b5
HPN
6490 grep -v '^ *+' conftest.er1 >conftest.err
6491 rm -f conftest.er1
6492 cat conftest.err >&5
ba479fd2
NN
6493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6494 (exit $ac_status); } &&
d7974fe6
KC
6495 { ac_try='test -z "$ac_c_werror_flag"
6496 || test ! -s conftest.err'
86da66b5
HPN
6497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6498 (eval $ac_try) 2>&5
6499 ac_status=$?
6500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6501 (exit $ac_status); }; } &&
6502 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6504 (eval $ac_try) 2>&5
6505 ac_status=$?
6506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6507 (exit $ac_status); }; }; then
6508 ac_header_compiler=yes
6509else
6510 echo "$as_me: failed program was:" >&5
6511sed 's/^/| /' conftest.$ac_ext >&5
6512
6513ac_header_compiler=no
6514fi
86da66b5 6515rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
6516echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6517echo "${ECHO_T}$ac_header_compiler" >&6
6518
6519# Is the header present?
6520echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6521echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
6522cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6523/* confdefs.h. */
6524_ACEOF
6525cat confdefs.h >>conftest.$ac_ext
6526cat >>conftest.$ac_ext <<_ACEOF
6527/* end confdefs.h. */
6528#include <valgrind.h>
6529_ACEOF
6530if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6531 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6532 ac_status=$?
6533 grep -v '^ *+' conftest.er1 >conftest.err
6534 rm -f conftest.er1
6535 cat conftest.err >&5
6536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6537 (exit $ac_status); } >/dev/null; then
6538 if test -s conftest.err; then
6539 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6540 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6541 else
6542 ac_cpp_err=
6543 fi
6544else
6545 ac_cpp_err=yes
6546fi
6547if test -z "$ac_cpp_err"; then
6548 ac_header_preproc=yes
6549else
6550 echo "$as_me: failed program was:" >&5
6551sed 's/^/| /' conftest.$ac_ext >&5
6552
6553 ac_header_preproc=no
6554fi
6555rm -f conftest.err conftest.$ac_ext
6556echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6557echo "${ECHO_T}$ac_header_preproc" >&6
6558
6559# So? What about this header?
86da66b5
HPN
6560case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6561 yes:no: )
ba479fd2
NN
6562 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6563echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
6564 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6565echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6566 ac_header_preproc=yes
ba479fd2 6567 ;;
86da66b5 6568 no:yes:* )
ba479fd2
NN
6569 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6570echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
6571 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6572echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6573 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6574echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6575 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6576echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
6577 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6578echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
6579 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6580echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
ba479fd2
NN
6581 (
6582 cat <<\_ASBOX
86da66b5
HPN
6583## ------------------------------------------ ##
6584## Report this to the AC_PACKAGE_NAME lists. ##
6585## ------------------------------------------ ##
ba479fd2
NN
6586_ASBOX
6587 ) |
6588 sed "s/^/$as_me: WARNING: /" >&2
6589 ;;
6590esac
6591echo "$as_me:$LINENO: checking for valgrind.h" >&5
6592echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6593if test "${ac_cv_header_valgrind_h+set}" = set; then
6594 echo $ECHO_N "(cached) $ECHO_C" >&6
6595else
6596 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 6597fi
ba479fd2
NN
6598echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6599echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6600
6e3f3080 6601fi
ba479fd2 6602if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
6603 have_valgrind_h=yes
6604else
ba479fd2 6605 have_valgrind_h=no
6938ec6c
NN
6606fi
6607
6608
ba479fd2 6609
cdce5c16 6610if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
6611 # It is certainly possible that there's valgrind but no valgrind.h.
6612 # GCC relies on making annotations so we must have both.
ba479fd2
NN
6613 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6614echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
6615 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6616/* confdefs.h. */
6617_ACEOF
6618cat confdefs.h >>conftest.$ac_ext
6619cat >>conftest.$ac_ext <<_ACEOF
6620/* end confdefs.h. */
a207b594 6621#include <valgrind/memcheck.h>
14011ca4
AJ
6622#ifndef VALGRIND_DISCARD
6623#error VALGRIND_DISCARD not defined
6624#endif
ba479fd2
NN
6625_ACEOF
6626if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6627 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6628 ac_status=$?
6629 grep -v '^ *+' conftest.er1 >conftest.err
6630 rm -f conftest.er1
6631 cat conftest.err >&5
6632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6633 (exit $ac_status); } >/dev/null; then
6634 if test -s conftest.err; then
6635 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6636 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6637 else
6638 ac_cpp_err=
6639 fi
6640else
6641 ac_cpp_err=yes
6642fi
6643if test -z "$ac_cpp_err"; then
a207b594
HPN
6644 gcc_cv_header_valgrind_memcheck_h=yes
6645else
ba479fd2
NN
6646 echo "$as_me: failed program was:" >&5
6647sed 's/^/| /' conftest.$ac_ext >&5
6648
a207b594
HPN
6649 gcc_cv_header_valgrind_memcheck_h=no
6650fi
ba479fd2
NN
6651rm -f conftest.err conftest.$ac_ext
6652 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6653echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6654 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6655echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
6656 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6657/* confdefs.h. */
6658_ACEOF
6659cat confdefs.h >>conftest.$ac_ext
6660cat >>conftest.$ac_ext <<_ACEOF
6661/* end confdefs.h. */
a207b594
HPN
6662#include <memcheck.h>
6663#ifndef VALGRIND_DISCARD
6664#error VALGRIND_DISCARD not defined
6665#endif
ba479fd2
NN
6666_ACEOF
6667if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6668 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6669 ac_status=$?
6670 grep -v '^ *+' conftest.er1 >conftest.err
6671 rm -f conftest.er1
6672 cat conftest.err >&5
6673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6674 (exit $ac_status); } >/dev/null; then
6675 if test -s conftest.err; then
6676 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6677 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6678 else
6679 ac_cpp_err=
6680 fi
6681else
6682 ac_cpp_err=yes
6683fi
6684if test -z "$ac_cpp_err"; then
14011ca4
AJ
6685 gcc_cv_header_memcheck_h=yes
6686else
ba479fd2
NN
6687 echo "$as_me: failed program was:" >&5
6688sed 's/^/| /' conftest.$ac_ext >&5
6689
cafe096b
EC
6690 gcc_cv_header_memcheck_h=no
6691fi
ba479fd2
NN
6692rm -f conftest.err conftest.$ac_ext
6693 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6694echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
6695
56694dd9
ZW
6696# Prepare PATH_SEPARATOR.
6697# The user is always right.
6698if test "${PATH_SEPARATOR+set}" != set; then
6699 echo "#! /bin/sh" >conf$$.sh
6700 echo "exit 0" >>conf$$.sh
6701 chmod +x conf$$.sh
6702 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6703 PATH_SEPARATOR=';'
6704 else
6705 PATH_SEPARATOR=:
6706 fi
6707 rm -f conf$$.sh
6708fi
6709
6710# Find out how to test for executable files. Don't use a zero-byte file,
6711# as systems may use methods other than mode bits to determine executability.
6712cat >conf$$.file <<_ASEOF
6713#! /bin/sh
6714exit 0
6715_ASEOF
6716chmod +x conf$$.file
6717if test -x conf$$.file >/dev/null 2>&1; then
6718 ac_executable_p="test -x"
6719else
6720 ac_executable_p="test -f"
6721fi
6722rm -f conf$$.file
6723
6724# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 6725set dummy valgrind; ac_word=$2
ba479fd2
NN
6726echo "$as_me:$LINENO: checking for $ac_word" >&5
6727echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6728if test "${ac_cv_path_valgrind_path+set}" = set; then
6729 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
6730else
6731 case "$valgrind_path" in
56694dd9
ZW
6732 [\\/]* | ?:[\\/]*)
6733 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6734 ;;
414d23ae 6735 *)
56694dd9
ZW
6736 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6737 for ac_dir in $PATH; do
6738 IFS="$ac_save_IFS"
6739 test -z "$ac_dir" && ac_dir=.
6740 for ac_exec_ext in '' $ac_executable_extensions; do
6741 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6742 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6743 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6744 break 2
6745 fi
6746 fi
6747 done
6748 done
6749 IFS="$ac_save_IFS"
6750 ;;
414d23ae 6751esac
75e93faa 6752fi
414d23ae
HPN
6753valgrind_path="$ac_cv_path_valgrind_path"
6754if test -n "$valgrind_path"; then
ba479fd2
NN
6755 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6756echo "${ECHO_T}$valgrind_path" >&6
414d23ae 6757else
ba479fd2
NN
6758 echo "$as_me:$LINENO: result: no" >&5
6759echo "${ECHO_T}no" >&6
414d23ae
HPN
6760fi
6761
a207b594
HPN
6762 if test "x$valgrind_path" = "x" \
6763 || (test $have_valgrind_h = no \
6764 && test $gcc_cv_header_memcheck_h = no \
6765 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
6766 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6767echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6768 { (exit 1); exit 1; }; }
414d23ae
HPN
6769 fi
6770 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6771 valgrind_command="$valgrind_path -q"
ba479fd2
NN
6772
6773cat >>confdefs.h <<\_ACEOF
414d23ae 6774#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 6775_ACEOF
75e93faa 6776
a207b594 6777 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
6778
6779cat >>confdefs.h <<\_ACEOF
a207b594 6780#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 6781_ACEOF
a207b594
HPN
6782
6783 fi
14011ca4 6784 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
6785
6786cat >>confdefs.h <<\_ACEOF
14011ca4 6787#define HAVE_MEMCHECK_H 1
ba479fd2 6788_ACEOF
14011ca4
AJ
6789
6790 fi
414d23ae 6791fi
75e93faa 6792
75e93faa
ZW
6793
6794
74ee1642
PB
6795# Check whether --enable-mapped-location or --disable-mapped-location was given.
6796if test "${enable_mapped_location+set}" = set; then
6797 enableval="$enable_mapped_location"
6798
6799else
6800 enable_mapped_location=no
6801fi;
6802
6803if test "$enable_mapped_location" = yes ; then
6804
6805cat >>confdefs.h <<\_ACEOF
6806#define USE_MAPPED_LOCATION 1
6807_ACEOF
6808
6809fi
6810
414d23ae
HPN
6811# Enable code coverage collection
6812# Check whether --enable-coverage or --disable-coverage was given.
6813if test "${enable_coverage+set}" = set; then
6814 enableval="$enable_coverage"
6815 case "${enableval}" in
6dd297da
NN
6816 yes|noopt)
6817 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6818 ;;
6819 opt)
6820 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6821 ;;
6822 no)
6823 # a.k.a. --disable-coverage
6824 coverage_flags=""
6825 ;;
6826 *)
6827 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
6828echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6829 { (exit 1); exit 1; }; }
6dd297da 6830 ;;
414d23ae 6831esac
75e93faa 6832else
414d23ae 6833 coverage_flags=""
ba479fd2 6834fi;
5c3bc9fb 6835
414d23ae 6836
439a7e54
DN
6837# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
6838if test "${enable_gather_detailed_mem_stats+set}" = set; then
6839 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 6840
439a7e54
DN
6841else
6842 enable_gather_detailed_mem_stats=no
ba479fd2 6843fi;
439a7e54 6844if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
6845
6846cat >>confdefs.h <<\_ACEOF
439a7e54 6847#define GATHER_STATISTICS 1
ba479fd2 6848_ACEOF
439a7e54
DN
6849
6850fi
6851
73458fb7
NN
6852# -------------------------------
6853# Miscenalleous configure options
6854# -------------------------------
34a86c2b
NN
6855
6856# With stabs
ba479fd2 6857
34a86c2b
NN
6858# Check whether --with-stabs or --without-stabs was given.
6859if test "${with_stabs+set}" = set; then
6860 withval="$with_stabs"
6861 stabs="$with_stabs"
6862else
6863 stabs=no
ba479fd2 6864fi;
cafe096b 6865
34a86c2b
NN
6866# Determine whether or not multilibs are enabled.
6867# Check whether --enable-multilib or --disable-multilib was given.
6868if test "${enable_multilib+set}" = set; then
6869 enableval="$enable_multilib"
ba479fd2 6870
34a86c2b
NN
6871else
6872 enable_multilib=yes
ba479fd2 6873fi;
75e93faa 6874
34a86c2b 6875
414d23ae
HPN
6876# Enable __cxa_atexit for C++.
6877# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
6878if test "${enable___cxa_atexit+set}" = set; then
6879 enableval="$enable___cxa_atexit"
75e93faa 6880
ba479fd2 6881fi;
75e93faa 6882
414d23ae
HPN
6883# Enable threads
6884# Pass with no value to take the default
6885# Pass with a value to specify a thread package
6886# Check whether --enable-threads or --disable-threads was given.
6887if test "${enable_threads+set}" = set; then
6888 enableval="$enable_threads"
ba479fd2 6889
414d23ae
HPN
6890else
6891 enable_threads=''
ba479fd2 6892fi;
414d23ae
HPN
6893
6894# Check whether --enable-objc-gc or --disable-objc-gc was given.
6895if test "${enable_objc_gc+set}" = set; then
6896 enableval="$enable_objc_gc"
6897 if test x$enable_objc_gc = xno; then
6898 objc_boehm_gc=''
6899else
6900 objc_boehm_gc=1
6901fi
6902else
6903 objc_boehm_gc=''
ba479fd2 6904fi;
75e93faa
ZW
6905
6906
414d23ae
HPN
6907# Check whether --with-dwarf2 or --without-dwarf2 was given.
6908if test "${with_dwarf2+set}" = set; then
6909 withval="$with_dwarf2"
6910 dwarf2="$with_dwarf2"
75e93faa 6911else
414d23ae 6912 dwarf2=no
ba479fd2 6913fi;
75e93faa 6914
414d23ae
HPN
6915# Check whether --enable-shared or --disable-shared was given.
6916if test "${enable_shared+set}" = set; then
6917 enableval="$enable_shared"
ba479fd2 6918
414d23ae
HPN
6919 case $enable_shared in
6920 yes | no) ;;
6921 *)
6922 enable_shared=no
6923 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6924 for pkg in $enableval; do
6925 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
6926 enable_shared=yes
6927 fi
6928 done
6929 IFS="$ac_save_ifs"
6930 ;;
6931 esac
6932
75e93faa 6933else
414d23ae 6934 enable_shared=yes
ba479fd2 6935fi;
75e93faa 6936
75e93faa 6937
75e93faa 6938
160633c6
MM
6939# Check whether --with-build-sysroot or --without-build-sysroot was given.
6940if test "${with_build_sysroot+set}" = set; then
6941 withval="$with_build_sysroot"
6942
6943fi;
6944
6945
4977bab6
ZW
6946# Check whether --with-sysroot or --without-sysroot was given.
6947if test "${with_sysroot+set}" = set; then
6948 withval="$with_sysroot"
ba479fd2 6949
4977bab6 6950 case ${with_sysroot} in
caa55b1e 6951 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
6952 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
6953 esac
ba479fd2 6954
4977bab6
ZW
6955 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
6956 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
160633c6
MM
6957 if test "x$with_build_sysroot" != x; then
6958 build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)'
6959 else
6960 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
6961 fi
4977bab6 6962
047d636f
DJ
6963 if test "x$exec_prefix" = xNONE; then
6964 if test "x$prefix" = xNONE; then
6965 test_prefix=/usr/local
6966 else
6967 test_prefix=$prefix
6968 fi
6969 else
6970 test_prefix=$exec_prefix
6971 fi
6972 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
6973 "${test_prefix}"|"${test_prefix}/"*|\
6974 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
6975 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
6976 TARGET_SYSTEM_ROOT_DEFINE="$t"
6977 ;;
6978 esac
6979
4977bab6 6980else
ba479fd2 6981
4977bab6 6982 TARGET_SYSTEM_ROOT=
db720d9a 6983 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
6984 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
6985
ba479fd2 6986fi;
4977bab6
ZW
6987
6988
6989
6990
d1bd0ded 6991# Build with intermodule optimisations
d1bd0ded
GK
6992# Check whether --enable-intermodule or --disable-intermodule was given.
6993if test "${enable_intermodule+set}" = set; then
6994 enableval="$enable_intermodule"
0c46c5c7
KC
6995 case ${enable_intermodule} in
6996 yes) onestep="-onestep";;
6997 *) onestep="";;
d1bd0ded 6998esac
0c46c5c7
KC
6999else
7000 onestep=""
ba479fd2 7001fi;
d1bd0ded
GK
7002
7003
f3c9f174
NN
7004# Sanity check enable_languages in case someone does not run the toplevel
7005# configure # script.
7006# Check whether --enable-languages or --disable-languages was given.
7007if test "${enable_languages+set}" = set; then
7008 enableval="$enable_languages"
7009 case ,${enable_languages}, in
7010 ,,|,yes,)
7011 # go safe -- we cannot be much sure without the toplevel
7012 # configure's
7013 # analysis of which target libs are present and usable
7014 enable_languages=c
7015 ;;
7016 *,all,*)
7017 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
7018echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
7019 { (exit 1); exit 1; }; }
7020 ;;
7021 *,c,*)
7022 ;;
7023 *)
7024 enable_languages=c,${enable_languages}
7025 ;;
7026esac
7027else
7028 enable_languages=c
7029fi;
7030
7031subdirs=
7032for lang in ${srcdir}/*/config-lang.in
7033do
7034 case $lang in
7035 # The odd quoting in the next line works around
7036 # an apparent bug in bash 1.12 on linux.
7037 ${srcdir}/[*]/config-lang.in) ;;
7038 *)
7039 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
7040 if test "x$lang_alias" = x
7041 then
7042 echo "$lang doesn't set \$language." 1>&2
7043 exit 1
7044 fi
7045 case ",$enable_languages," in
7046 *,$lang_alias,*)
7047 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
7048 esac
7049 ;;
7050 esac
7051done
7052
7053
73458fb7
NN
7054# -------------------------
7055# Checks for other programs
7056# -------------------------
5b67ad6f 7057
ba479fd2
NN
7058echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7059echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
86da66b5 7060set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
ba479fd2
NN
7061if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
7062 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 7063else
ba479fd2 7064 cat >conftest.make <<\_ACEOF
e9a25f70 7065all:
ba479fd2
NN
7066 @echo 'ac_maketemp="$(MAKE)"'
7067_ACEOF
e9a25f70 7068# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 7069eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
7070if test -n "$ac_maketemp"; then
7071 eval ac_cv_prog_make_${ac_make}_set=yes
7072else
7073 eval ac_cv_prog_make_${ac_make}_set=no
7074fi
ba479fd2 7075rm -f conftest.make
e9a25f70
JL
7076fi
7077if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
7078 echo "$as_me:$LINENO: result: yes" >&5
7079echo "${ECHO_T}yes" >&6
e9a25f70
JL
7080 SET_MAKE=
7081else
ba479fd2
NN
7082 echo "$as_me:$LINENO: result: no" >&5
7083echo "${ECHO_T}no" >&6
e9a25f70
JL
7084 SET_MAKE="MAKE=${MAKE-make}"
7085fi
7086
7087
861bb6c1 7088# Find some useful tools
ba479fd2 7089for ac_prog in gawk mawk nawk awk
861bb6c1 7090do
ba479fd2 7091 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 7092set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7093echo "$as_me:$LINENO: checking for $ac_word" >&5
7094echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7095if test "${ac_cv_prog_AWK+set}" = set; then
7096 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7097else
7098 if test -n "$AWK"; then
7099 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7100else
ba479fd2
NN
7101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7102for as_dir in $PATH
7103do
7104 IFS=$as_save_IFS
7105 test -z "$as_dir" && as_dir=.
7106 for ac_exec_ext in '' $ac_executable_extensions; do
7107 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7108 ac_cv_prog_AWK="$ac_prog"
7109 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7110 break 2
7111 fi
7112done
7113done
7114
861bb6c1
JL
7115fi
7116fi
ba479fd2 7117AWK=$ac_cv_prog_AWK
861bb6c1 7118if test -n "$AWK"; then
ba479fd2
NN
7119 echo "$as_me:$LINENO: result: $AWK" >&5
7120echo "${ECHO_T}$AWK" >&6
861bb6c1 7121else
ba479fd2
NN
7122 echo "$as_me:$LINENO: result: no" >&5
7123echo "${ECHO_T}no" >&6
861bb6c1
JL
7124fi
7125
ba479fd2 7126 test -n "$AWK" && break
861bb6c1
JL
7127done
7128
776dc15d 7129# We need awk to create options.c and options.h.
2c4902b9
NN
7130# Bail out if it's missing.
7131case ${AWK} in
ba479fd2
NN
7132 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7133echo "$as_me: error: can't build without awk, bailing out" >&2;}
7134 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
7135esac
7136
ba479fd2
NN
7137echo "$as_me:$LINENO: checking whether ln -s works" >&5
7138echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
7139if test "${gcc_cv_prog_LN_S+set}" = set; then
7140 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7141else
7142 rm -f conftestdata_t
7143echo >conftestdata_f
7144if ln -s conftestdata_f conftestdata_t 2>/dev/null
7145then
7146 gcc_cv_prog_LN_S="ln -s"
7147else
7148 if ln conftestdata_f conftestdata_t 2>/dev/null
7149 then
7150 gcc_cv_prog_LN_S=ln
7151 else
35f06ae4
PB
7152 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7153 then
06c3418c 7154 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
7155 else
7156 gcc_cv_prog_LN_S=cp
7157 fi
0a4b6309
RL
7158 fi
7159fi
7160rm -f conftestdata_f conftestdata_t
7161
7162fi
7163LN_S="$gcc_cv_prog_LN_S"
7164if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
7165 echo "$as_me:$LINENO: result: yes" >&5
7166echo "${ECHO_T}yes" >&6
0a4b6309
RL
7167else
7168 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
7169 echo "$as_me:$LINENO: result: no, using ln" >&5
7170echo "${ECHO_T}no, using ln" >&6
0a4b6309 7171 else
35f06ae4
PB
7172 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7173echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
7174 fi
7175fi
7176
41e622a8
AP
7177echo "$as_me:$LINENO: checking whether ln works" >&5
7178echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
7179if test "${acx_cv_prog_LN+set}" = set; then
7180 echo $ECHO_N "(cached) $ECHO_C" >&6
7181else
7182 rm -f conftestdata_t
7183echo >conftestdata_f
7184if ln conftestdata_f conftestdata_t 2>/dev/null
7185then
7186 acx_cv_prog_LN=ln
7187else
7188 acx_cv_prog_LN=no
7189fi
7190rm -f conftestdata_f conftestdata_t
7191
7192fi
7193if test $acx_cv_prog_LN = no; then
7194 LN="$LN_S"
7195 echo "$as_me:$LINENO: result: no, using $LN" >&5
7196echo "${ECHO_T}no, using $LN" >&6
7197else
7198 LN="$acx_cv_prog_LN"
7199 echo "$as_me:$LINENO: result: yes" >&5
7200echo "${ECHO_T}yes" >&6
7201fi
7202
ba479fd2
NN
7203if test -n "$ac_tool_prefix"; then
7204 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7205set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7206echo "$as_me:$LINENO: checking for $ac_word" >&5
7207echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7208if test "${ac_cv_prog_RANLIB+set}" = set; then
7209 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7210else
7211 if test -n "$RANLIB"; then
7212 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7213else
ba479fd2
NN
7214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7215for as_dir in $PATH
7216do
7217 IFS=$as_save_IFS
7218 test -z "$as_dir" && as_dir=.
7219 for ac_exec_ext in '' $ac_executable_extensions; do
7220 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7221 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7222 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7223 break 2
7224 fi
7225done
7226done
7227
6e3f3080
NN
7228fi
7229fi
ba479fd2 7230RANLIB=$ac_cv_prog_RANLIB
6e3f3080 7231if test -n "$RANLIB"; then
ba479fd2
NN
7232 echo "$as_me:$LINENO: result: $RANLIB" >&5
7233echo "${ECHO_T}$RANLIB" >&6
7234else
7235 echo "$as_me:$LINENO: result: no" >&5
7236echo "${ECHO_T}no" >&6
7237fi
7238
7239fi
7240if test -z "$ac_cv_prog_RANLIB"; then
7241 ac_ct_RANLIB=$RANLIB
7242 # Extract the first word of "ranlib", so it can be a program name with args.
7243set dummy ranlib; ac_word=$2
7244echo "$as_me:$LINENO: checking for $ac_word" >&5
7245echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7246if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7247 echo $ECHO_N "(cached) $ECHO_C" >&6
7248else
7249 if test -n "$ac_ct_RANLIB"; then
7250 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7251else
7252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7253for as_dir in $PATH
7254do
7255 IFS=$as_save_IFS
7256 test -z "$as_dir" && as_dir=.
7257 for ac_exec_ext in '' $ac_executable_extensions; do
7258 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7259 ac_cv_prog_ac_ct_RANLIB="ranlib"
7260 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7261 break 2
7262 fi
7263done
7264done
7265
7266 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7267fi
7268fi
7269ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7270if test -n "$ac_ct_RANLIB"; then
7271 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7272echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 7273else
ba479fd2
NN
7274 echo "$as_me:$LINENO: result: no" >&5
7275echo "${ECHO_T}no" >&6
7276fi
7277
7278 RANLIB=$ac_ct_RANLIB
7279else
7280 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
7281fi
7282
343a6100
MM
7283case "${host}" in
7284*-*-darwin*)
7285 # By default, the Darwin ranlib will not treat common symbols as
7286 # definitions when building the archive table of contents. Other
7287 # ranlibs do that; pass an option to the Darwin ranlib that makes
7288 # it behave similarly.
7289 ranlib_flags="-c"
7290 ;;
7291*)
7292 ranlib_flags=""
7293esac
7294
7295
0a4b6309
RL
7296# Find a good install program. We prefer a C program (faster),
7297# so one script is as good as another. But avoid the broken or
7298# incompatible versions:
7299# SysV /etc/install, /usr/sbin/install
7300# SunOS /usr/etc/install
7301# IRIX /sbin/install
7302# AIX /bin/install
7303# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7304# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7305# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
7306echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7307echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 7308if test -z "$INSTALL"; then
ba479fd2
NN
7309if test "${ac_cv_path_install+set}" = set; then
7310 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7311else
7312 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7313 for ac_dir in $PATH; do
7314 # Account for people who put trailing slashes in PATH elements.
7315 case "$ac_dir/" in
7316 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7317 *)
7318 # OSF1 and SCO ODT 3.0 have their own names for install.
7319 for ac_prog in ginstall scoinst install; do
7320 if test -f $ac_dir/$ac_prog; then
7321 if test $ac_prog = install &&
7322 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7323 # AIX install. It has an incompatible calling convention.
7324 # OSF/1 installbsd also uses dspmsg, but is usable.
7325 :
7326 else
7327 ac_cv_path_install="$ac_dir/$ac_prog -c"
7328 break 2
7329 fi
7330 fi
7331 done
7332 ;;
7333 esac
7334 done
7335 IFS="$ac_save_IFS"
7336
7337fi
7338 if test "${ac_cv_path_install+set}" = set; then
7339 INSTALL="$ac_cv_path_install"
7340 else
7341 # As a last resort, use the slow shell script. We don't cache a
7342 # path for INSTALL within a source directory, because that will
7343 # break other packages using the cache if that directory is
7344 # removed, or if the path is relative.
7345 INSTALL="$ac_install_sh"
7346 fi
7347fi
ba479fd2
NN
7348echo "$as_me:$LINENO: result: $INSTALL" >&5
7349echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
7350
7351# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7352# It thinks the first close brace ends the variable substitution.
7353test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7354
7355test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7356
861bb6c1 7357
3a000df0 7358# See if cmp has --ignore-initial.
ba479fd2
NN
7359echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7360echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
7361if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7362 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
7363else
7364 echo abfoo >t1
7365 echo cdfoo >t2
269a7343 7366 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
7367 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7368 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 7369 :
3a000df0
KC
7370 else
7371 gcc_cv_prog_cmp_skip=gnucompare
7372 fi
269a7343
KG
7373 fi
7374 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7375 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7376 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7377 :
7378 else
7379 gcc_cv_prog_cmp_skip=fastcompare
7380 fi
7381 fi
3a000df0
KC
7382 fi
7383 rm t1 t2
7384
7385fi
ba479fd2
NN
7386echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7387echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
7388make_compare_target=$gcc_cv_prog_cmp_skip
7389
7390
7391
73458fb7
NN
7392# See if we have the mktemp command.
7393# Extract the first word of "mktemp", so it can be a program name with args.
7394set dummy mktemp; ac_word=$2
ba479fd2
NN
7395echo "$as_me:$LINENO: checking for $ac_word" >&5
7396echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7397if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7398 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7399else
7400 if test -n "$have_mktemp_command"; then
7401 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7402else
ba479fd2
NN
7403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7404for as_dir in $PATH
7405do
7406 IFS=$as_save_IFS
7407 test -z "$as_dir" && as_dir=.
7408 for ac_exec_ext in '' $ac_executable_extensions; do
7409 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7410 ac_cv_prog_have_mktemp_command="yes"
7411 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7412 break 2
7413 fi
7414done
7415done
7416
73458fb7
NN
7417 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7418fi
7419fi
ba479fd2 7420have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 7421if test -n "$have_mktemp_command"; then
ba479fd2
NN
7422 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7423echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 7424else
ba479fd2
NN
7425 echo "$as_me:$LINENO: result: no" >&5
7426echo "${ECHO_T}no" >&6
73458fb7
NN
7427fi
7428
7429
7c27e184
PB
7430MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
7431
7432# See if makeinfo has been installed and is modern enough
7433# that we can use it.
9f18db39
PB
7434
7435ac_executable_extensions="$build_exeext"
7436
7c27e184 7437# Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 7438set dummy makeinfo; ac_word=$2
ba479fd2
NN
7439echo "$as_me:$LINENO: checking for $ac_word" >&5
7440echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7441if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7442 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7443else
7444 if test -n "$MAKEINFO"; then
7445 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7446else
ba479fd2
NN
7447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7448for as_dir in $PATH
7449do
7450 IFS=$as_save_IFS
7451 test -z "$as_dir" && as_dir=.
7452 for ac_exec_ext in '' $ac_executable_extensions; do
7453 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7454 ac_cv_prog_MAKEINFO="makeinfo"
7455 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7456 break 2
7457 fi
7458done
7459done
7460
73458fb7
NN
7461fi
7462fi
ba479fd2 7463MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 7464if test -n "$MAKEINFO"; then
ba479fd2
NN
7465 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7466echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 7467else
ba479fd2
NN
7468 echo "$as_me:$LINENO: result: no" >&5
7469echo "${ECHO_T}no" >&6
73458fb7
NN
7470fi
7471
7472if test -n "$MAKEINFO"; then
7473 # Found it, now check the version.
ba479fd2
NN
7474 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7475echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
7476if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7477 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7478else
7479 ac_prog_version=`$MAKEINFO --version 2>&1 |
7480 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
160633c6 7481 echo "configure:7481: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
7482 case $ac_prog_version in
7483 '') gcc_cv_prog_makeinfo_modern=no;;
7484 4.[2-9]*)
7485 gcc_cv_prog_makeinfo_modern=yes;;
7486 *) gcc_cv_prog_makeinfo_modern=no;;
7487 esac
7488
7489fi
ba479fd2
NN
7490echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7491echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
7492else
7493 gcc_cv_prog_makeinfo_modern=no
7494fi
7495
73458fb7 7496if test $gcc_cv_prog_makeinfo_modern = no; then
7c27e184 7497 MAKEINFO="$MISSING makeinfo"
ba479fd2
NN
7498 { echo "$as_me:$LINENO: WARNING:
7499*** Makeinfo is missing or too old.
7500*** Info documentation will not be built." >&5
7501echo "$as_me: WARNING:
cafe096b 7502*** Makeinfo is missing or too old.
ba479fd2 7503*** Info documentation will not be built." >&2;}
73458fb7
NN
7504 BUILD_INFO=
7505else
ba479fd2 7506 BUILD_INFO=info
73458fb7
NN
7507fi
7508
7c27e184 7509
73458fb7 7510# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
7511echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7512echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 7513if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
7514 echo "$as_me:$LINENO: result: yes" >&5
7515echo "${ECHO_T}yes" >&6
7516 GENERATED_MANPAGES=generated-manpages
73458fb7 7517else
ba479fd2
NN
7518 echo "$as_me:$LINENO: result: no" >&5
7519echo "${ECHO_T}no" >&6
73458fb7
NN
7520 GENERATED_MANPAGES=
7521fi
7522
7c27e184 7523
73458fb7 7524# How about lex?
7c27e184
PB
7525for ac_prog in flex
7526do
7527 # Extract the first word of "$ac_prog", so it can be a program name with args.
7528set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7529echo "$as_me:$LINENO: checking for $ac_word" >&5
7530echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7531if test "${ac_cv_prog_FLEX+set}" = set; then
7532 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7533else
7534 if test -n "$FLEX"; then
7535 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7536else
ba479fd2
NN
7537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7538for as_dir in $PATH
7539do
7540 IFS=$as_save_IFS
7541 test -z "$as_dir" && as_dir=.
7542 for ac_exec_ext in '' $ac_executable_extensions; do
7543 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7544 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
7545 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7546 break 2
7547 fi
7548done
7549done
7550
73458fb7
NN
7551fi
7552fi
ba479fd2 7553FLEX=$ac_cv_prog_FLEX
73458fb7 7554if test -n "$FLEX"; then
ba479fd2
NN
7555 echo "$as_me:$LINENO: result: $FLEX" >&5
7556echo "${ECHO_T}$FLEX" >&6
73458fb7 7557else
ba479fd2
NN
7558 echo "$as_me:$LINENO: result: no" >&5
7559echo "${ECHO_T}no" >&6
73458fb7
NN
7560fi
7561
7c27e184
PB
7562 test -n "$FLEX" && break
7563done
7564test -n "$FLEX" || FLEX="$MISSING flex"
7565
73458fb7
NN
7566
7567# Bison?
7c27e184
PB
7568for ac_prog in bison
7569do
7570 # Extract the first word of "$ac_prog", so it can be a program name with args.
7571set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7572echo "$as_me:$LINENO: checking for $ac_word" >&5
7573echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7574if test "${ac_cv_prog_BISON+set}" = set; then
7575 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7576else
7577 if test -n "$BISON"; then
7578 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7579else
ba479fd2
NN
7580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7581for as_dir in $PATH
7582do
7583 IFS=$as_save_IFS
7584 test -z "$as_dir" && as_dir=.
7585 for ac_exec_ext in '' $ac_executable_extensions; do
7586 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7587 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
7588 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7589 break 2
7590 fi
7591done
7592done
7593
73458fb7
NN
7594fi
7595fi
ba479fd2 7596BISON=$ac_cv_prog_BISON
73458fb7 7597if test -n "$BISON"; then
ba479fd2
NN
7598 echo "$as_me:$LINENO: result: $BISON" >&5
7599echo "${ECHO_T}$BISON" >&6
73458fb7 7600else
ba479fd2
NN
7601 echo "$as_me:$LINENO: result: no" >&5
7602echo "${ECHO_T}no" >&6
73458fb7
NN
7603fi
7604
7c27e184
PB
7605 test -n "$BISON" && break
7606done
7607test -n "$BISON" || BISON="$MISSING bison"
7608
7609
7610# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7611# check for build == host before using them.
73458fb7 7612
f6a874ac 7613# NM
414adbdd
GK
7614if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7615 && test -d ../binutils ; then
f6a874ac
JW
7616 NM='$(objdir)/../binutils/nm-new'
7617else
7618 # Extract the first word of "nm", so it can be a program name with args.
7619set dummy nm; ac_word=$2
7620echo "$as_me:$LINENO: checking for $ac_word" >&5
7621echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7622if test "${ac_cv_prog_NM+set}" = set; then
7623 echo $ECHO_N "(cached) $ECHO_C" >&6
7624else
7625 if test -n "$NM"; then
7626 ac_cv_prog_NM="$NM" # Let the user override the test.
7627else
7628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7629for as_dir in $PATH
7630do
7631 IFS=$as_save_IFS
7632 test -z "$as_dir" && as_dir=.
7633 for ac_exec_ext in '' $ac_executable_extensions; do
7634 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7635 ac_cv_prog_NM="nm"
7636 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7637 break 2
7638 fi
7639done
7640done
7641
7642 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7643fi
7644fi
7645NM=$ac_cv_prog_NM
7646if test -n "$NM"; then
7647 echo "$as_me:$LINENO: result: $NM" >&5
7648echo "${ECHO_T}$NM" >&6
7649else
7650 echo "$as_me:$LINENO: result: no" >&5
7651echo "${ECHO_T}no" >&6
7652fi
7653
7654fi
7655
7656# AR
414adbdd
GK
7657if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7658 && test -d ../binutils ; then
f6a874ac
JW
7659 AR='$(objdir)/../binutils/ar'
7660else
7661 # Extract the first word of "ar", so it can be a program name with args.
7662set dummy ar; ac_word=$2
7663echo "$as_me:$LINENO: checking for $ac_word" >&5
7664echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7665if test "${ac_cv_prog_AR+set}" = set; then
7666 echo $ECHO_N "(cached) $ECHO_C" >&6
7667else
7668 if test -n "$AR"; then
7669 ac_cv_prog_AR="$AR" # Let the user override the test.
7670else
7671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7672for as_dir in $PATH
7673do
7674 IFS=$as_save_IFS
7675 test -z "$as_dir" && as_dir=.
7676 for ac_exec_ext in '' $ac_executable_extensions; do
7677 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7678 ac_cv_prog_AR="ar"
7679 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7680 break 2
7681 fi
7682done
7683done
7684
7685 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7686fi
7687fi
7688AR=$ac_cv_prog_AR
7689if test -n "$AR"; then
7690 echo "$as_me:$LINENO: result: $AR" >&5
7691echo "${ECHO_T}$AR" >&6
7692else
7693 echo "$as_me:$LINENO: result: no" >&5
7694echo "${ECHO_T}no" >&6
7695fi
7696
7697fi
7698
7699
73458fb7
NN
7700# --------------------
7701# Checks for C headers
7702# --------------------
7703
ba479fd2
NN
7704echo "$as_me:$LINENO: checking for GNU C library" >&5
7705echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
7706if test "${gcc_cv_glibc+set}" = set; then
7707 echo $ECHO_N "(cached) $ECHO_C" >&6
7708else
7709 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7710/* confdefs.h. */
7711_ACEOF
7712cat confdefs.h >>conftest.$ac_ext
7713cat >>conftest.$ac_ext <<_ACEOF
7714/* end confdefs.h. */
73458fb7 7715#include <features.h>
ba479fd2
NN
7716int
7717main ()
7718{
73458fb7
NN
7719
7720#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7721#error Not a GNU C library system
7722#endif
ba479fd2
NN
7723 ;
7724 return 0;
7725}
7726_ACEOF
7727rm -f conftest.$ac_objext
7728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7729 (eval $ac_compile) 2>conftest.er1
ba479fd2 7730 ac_status=$?
86da66b5
HPN
7731 grep -v '^ *+' conftest.er1 >conftest.err
7732 rm -f conftest.er1
7733 cat conftest.err >&5
ba479fd2
NN
7734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7735 (exit $ac_status); } &&
d7974fe6
KC
7736 { ac_try='test -z "$ac_c_werror_flag"
7737 || test ! -s conftest.err'
86da66b5
HPN
7738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7739 (eval $ac_try) 2>&5
7740 ac_status=$?
7741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7742 (exit $ac_status); }; } &&
7743 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7745 (eval $ac_try) 2>&5
7746 ac_status=$?
7747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7748 (exit $ac_status); }; }; then
73458fb7
NN
7749 gcc_cv_glibc=yes
7750else
ba479fd2
NN
7751 echo "$as_me: failed program was:" >&5
7752sed 's/^/| /' conftest.$ac_ext >&5
7753
7754gcc_cv_glibc=no
73458fb7 7755fi
86da66b5 7756rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
7757fi
7758
ba479fd2
NN
7759echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7760echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 7761if test $gcc_cv_glibc = yes; then
ba479fd2
NN
7762
7763cat >>confdefs.h <<\_ACEOF
73458fb7 7764#define _GNU_SOURCE 1
ba479fd2 7765_ACEOF
73458fb7
NN
7766
7767fi
7768
ca9bc441
NN
7769# Need to reject headers which give warnings, so that the -Werror bootstrap
7770# works later. *sigh* This needs to come before all header checks.
7771
7772ac_c_preproc_warn_flag=yes
7773
ba479fd2
NN
7774echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7775echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7776if test "${ac_cv_header_stdc+set}" = set; then
7777 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7778else
ba479fd2 7779 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7780/* confdefs.h. */
7781_ACEOF
7782cat confdefs.h >>conftest.$ac_ext
7783cat >>conftest.$ac_ext <<_ACEOF
7784/* end confdefs.h. */
956d6950
JL
7785#include <stdlib.h>
7786#include <stdarg.h>
7787#include <string.h>
7788#include <float.h>
ba479fd2
NN
7789
7790int
7791main ()
7792{
7793
7794 ;
7795 return 0;
7796}
7797_ACEOF
7798rm -f conftest.$ac_objext
7799if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7800 (eval $ac_compile) 2>conftest.er1
ba479fd2 7801 ac_status=$?
86da66b5
HPN
7802 grep -v '^ *+' conftest.er1 >conftest.err
7803 rm -f conftest.er1
7804 cat conftest.err >&5
ba479fd2
NN
7805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7806 (exit $ac_status); } &&
d7974fe6
KC
7807 { ac_try='test -z "$ac_c_werror_flag"
7808 || test ! -s conftest.err'
86da66b5
HPN
7809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7810 (eval $ac_try) 2>&5
7811 ac_status=$?
7812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7813 (exit $ac_status); }; } &&
7814 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7816 (eval $ac_try) 2>&5
7817 ac_status=$?
7818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7819 (exit $ac_status); }; }; then
956d6950
JL
7820 ac_cv_header_stdc=yes
7821else
ba479fd2
NN
7822 echo "$as_me: failed program was:" >&5
7823sed 's/^/| /' conftest.$ac_ext >&5
7824
7825ac_cv_header_stdc=no
956d6950 7826fi
86da66b5 7827rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
7828
7829if test $ac_cv_header_stdc = yes; then
7830 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 7831 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7832/* confdefs.h. */
7833_ACEOF
7834cat confdefs.h >>conftest.$ac_ext
7835cat >>conftest.$ac_ext <<_ACEOF
7836/* end confdefs.h. */
956d6950 7837#include <string.h>
ba479fd2
NN
7838
7839_ACEOF
956d6950 7840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7841 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
7842 :
7843else
956d6950
JL
7844 ac_cv_header_stdc=no
7845fi
7846rm -f conftest*
7847
7848fi
7849
7850if test $ac_cv_header_stdc = yes; then
7851 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 7852 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7853/* confdefs.h. */
7854_ACEOF
7855cat confdefs.h >>conftest.$ac_ext
7856cat >>conftest.$ac_ext <<_ACEOF
7857/* end confdefs.h. */
956d6950 7858#include <stdlib.h>
ba479fd2
NN
7859
7860_ACEOF
956d6950 7861if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7862 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
7863 :
7864else
956d6950
JL
7865 ac_cv_header_stdc=no
7866fi
7867rm -f conftest*
7868
7869fi
7870
7871if test $ac_cv_header_stdc = yes; then
7872 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 7873 if test "$cross_compiling" = yes; then
956d6950
JL
7874 :
7875else
ba479fd2 7876 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7877/* confdefs.h. */
7878_ACEOF
7879cat confdefs.h >>conftest.$ac_ext
7880cat >>conftest.$ac_ext <<_ACEOF
7881/* end confdefs.h. */
956d6950 7882#include <ctype.h>
ba479fd2
NN
7883#if ((' ' & 0x0FF) == 0x020)
7884# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7885# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7886#else
7887# define ISLOWER(c) \
86da66b5
HPN
7888 (('a' <= (c) && (c) <= 'i') \
7889 || ('j' <= (c) && (c) <= 'r') \
7890 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
7891# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7892#endif
63cf211a 7893
ba479fd2
NN
7894#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7895int
7896main ()
7897{
7898 int i;
7899 for (i = 0; i < 256; i++)
7900 if (XOR (islower (i), ISLOWER (i))
86da66b5 7901 || toupper (i) != TOUPPER (i))
ba479fd2
NN
7902 exit(2);
7903 exit (0);
7904}
7905_ACEOF
7906rm -f conftest$ac_exeext
7907if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7908 (eval $ac_link) 2>&5
7909 ac_status=$?
7910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7911 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7913 (eval $ac_try) 2>&5
7914 ac_status=$?
7915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7916 (exit $ac_status); }; }; then
956d6950
JL
7917 :
7918else
ba479fd2
NN
7919 echo "$as_me: program exited with status $ac_status" >&5
7920echo "$as_me: failed program was:" >&5
7921sed 's/^/| /' conftest.$ac_ext >&5
7922
7923( exit $ac_status )
7924ac_cv_header_stdc=no
956d6950 7925fi
86da66b5 7926rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 7927fi
956d6950
JL
7928fi
7929fi
ba479fd2
NN
7930echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7931echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 7932if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
7933
7934cat >>confdefs.h <<\_ACEOF
956d6950 7935#define STDC_HEADERS 1
ba479fd2 7936_ACEOF
956d6950
JL
7937
7938fi
7939
ba479fd2
NN
7940echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7941echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
7942if test "${ac_cv_header_time+set}" = set; then
7943 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7944else
ba479fd2 7945 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7946/* confdefs.h. */
7947_ACEOF
7948cat confdefs.h >>conftest.$ac_ext
7949cat >>conftest.$ac_ext <<_ACEOF
7950/* end confdefs.h. */
956d6950
JL
7951#include <sys/types.h>
7952#include <sys/time.h>
7953#include <time.h>
ba479fd2
NN
7954
7955int
7956main ()
7957{
7958if ((struct tm *) 0)
7959return 0;
7960 ;
7961 return 0;
7962}
7963_ACEOF
7964rm -f conftest.$ac_objext
7965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7966 (eval $ac_compile) 2>conftest.er1
ba479fd2 7967 ac_status=$?
86da66b5
HPN
7968 grep -v '^ *+' conftest.er1 >conftest.err
7969 rm -f conftest.er1
7970 cat conftest.err >&5
ba479fd2
NN
7971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7972 (exit $ac_status); } &&
d7974fe6
KC
7973 { ac_try='test -z "$ac_c_werror_flag"
7974 || test ! -s conftest.err'
86da66b5
HPN
7975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7976 (eval $ac_try) 2>&5
7977 ac_status=$?
7978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7979 (exit $ac_status); }; } &&
7980 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7982 (eval $ac_try) 2>&5
7983 ac_status=$?
7984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7985 (exit $ac_status); }; }; then
956d6950
JL
7986 ac_cv_header_time=yes
7987else
ba479fd2
NN
7988 echo "$as_me: failed program was:" >&5
7989sed 's/^/| /' conftest.$ac_ext >&5
7990
7991ac_cv_header_time=no
956d6950 7992fi
86da66b5 7993rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 7994fi
ba479fd2
NN
7995echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7996echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 7997if test $ac_cv_header_time = yes; then
ba479fd2
NN
7998
7999cat >>confdefs.h <<\_ACEOF
956d6950 8000#define TIME_WITH_SYS_TIME 1
ba479fd2 8001_ACEOF
956d6950
JL
8002
8003fi
8004
41e622a8
AP
8005echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
8006echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
8007if test "${gcc_cv_header_string+set}" = set; then
8008 echo $ECHO_N "(cached) $ECHO_C" >&6
8009else
8010 cat >conftest.$ac_ext <<_ACEOF
8011/* confdefs.h. */
8012_ACEOF
8013cat confdefs.h >>conftest.$ac_ext
8014cat >>conftest.$ac_ext <<_ACEOF
8015/* end confdefs.h. */
8016#include <string.h>
8017#include <strings.h>
8018int
8019main ()
8020{
8021
8022 ;
8023 return 0;
8024}
8025_ACEOF
8026rm -f conftest.$ac_objext
8027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8028 (eval $ac_compile) 2>conftest.er1
8029 ac_status=$?
8030 grep -v '^ *+' conftest.er1 >conftest.err
8031 rm -f conftest.er1
8032 cat conftest.err >&5
8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8034 (exit $ac_status); } &&
d7974fe6
KC
8035 { ac_try='test -z "$ac_c_werror_flag"
8036 || test ! -s conftest.err'
41e622a8
AP
8037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8038 (eval $ac_try) 2>&5
8039 ac_status=$?
8040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8041 (exit $ac_status); }; } &&
8042 { ac_try='test -s conftest.$ac_objext'
8043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8044 (eval $ac_try) 2>&5
8045 ac_status=$?
8046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8047 (exit $ac_status); }; }; then
8048 gcc_cv_header_string=yes
8049else
8050 echo "$as_me: failed program was:" >&5
8051sed 's/^/| /' conftest.$ac_ext >&5
8052
8053gcc_cv_header_string=no
8054fi
8055rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8056fi
8057echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
8058echo "${ECHO_T}$gcc_cv_header_string" >&6
8059if test $gcc_cv_header_string = yes; then
8060
8061cat >>confdefs.h <<\_ACEOF
8062#define STRING_WITH_STRINGS 1
8063_ACEOF
8064
8065fi
8066
ba479fd2
NN
8067echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
8068echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
8069if test "${ac_cv_header_sys_wait_h+set}" = set; then
8070 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 8071else
ba479fd2 8072 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8073/* confdefs.h. */
8074_ACEOF
8075cat confdefs.h >>conftest.$ac_ext
8076cat >>conftest.$ac_ext <<_ACEOF
8077/* end confdefs.h. */
e9831ca0
KG
8078#include <sys/types.h>
8079#include <sys/wait.h>
8080#ifndef WEXITSTATUS
ba479fd2 8081# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
8082#endif
8083#ifndef WIFEXITED
ba479fd2 8084# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 8085#endif
ba479fd2
NN
8086
8087int
8088main ()
8089{
8090 int s;
8091 wait (&s);
8092 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8093 ;
8094 return 0;
8095}
8096_ACEOF
8097rm -f conftest.$ac_objext
8098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8099 (eval $ac_compile) 2>conftest.er1
ba479fd2 8100 ac_status=$?
86da66b5
HPN
8101 grep -v '^ *+' conftest.er1 >conftest.err
8102 rm -f conftest.er1
8103 cat conftest.err >&5
ba479fd2
NN
8104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8105 (exit $ac_status); } &&
d7974fe6
KC
8106 { ac_try='test -z "$ac_c_werror_flag"
8107 || test ! -s conftest.err'
86da66b5
HPN
8108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8109 (eval $ac_try) 2>&5
8110 ac_status=$?
8111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8112 (exit $ac_status); }; } &&
8113 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8115 (eval $ac_try) 2>&5
8116 ac_status=$?
8117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8118 (exit $ac_status); }; }; then
e9831ca0
KG
8119 ac_cv_header_sys_wait_h=yes
8120else
ba479fd2
NN
8121 echo "$as_me: failed program was:" >&5
8122sed 's/^/| /' conftest.$ac_ext >&5
8123
8124ac_cv_header_sys_wait_h=no
e9831ca0 8125fi
86da66b5 8126rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 8127fi
ba479fd2
NN
8128echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8129echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 8130if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
8131
8132cat >>confdefs.h <<\_ACEOF
e9831ca0 8133#define HAVE_SYS_WAIT_H 1
ba479fd2 8134_ACEOF
6e3f3080 8135
63cf211a 8136fi
6e3f3080 8137
ba479fd2
NN
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
dfb77e37
KC
8159
8160for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 8161 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 8162 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 8163 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 8164do
ba479fd2 8165as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 8166echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
8167echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8168if eval "test \"\${$as_ac_Header+set}\" = set"; then
8169 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8170else
ca9bc441 8171 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8172/* confdefs.h. */
8173_ACEOF
8174cat confdefs.h >>conftest.$ac_ext
8175cat >>conftest.$ac_ext <<_ACEOF
8176/* end confdefs.h. */
8177#include <$ac_header>
8178_ACEOF
8179if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8180 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8181 ac_status=$?
8182 grep -v '^ *+' conftest.er1 >conftest.err
8183 rm -f conftest.er1
8184 cat conftest.err >&5
8185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8186 (exit $ac_status); } >/dev/null; then
8187 if test -s conftest.err; then
8188 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8189 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8190 else
8191 ac_cpp_err=
8192 fi
8193else
8194 ac_cpp_err=yes
8195fi
8196if test -z "$ac_cpp_err"; then
ca9bc441 8197 eval "$as_ac_Header=yes"
ba479fd2
NN
8198else
8199 echo "$as_me: failed program was:" >&5
8200sed 's/^/| /' conftest.$ac_ext >&5
8201
ca9bc441 8202 eval "$as_ac_Header=no"
ba479fd2
NN
8203fi
8204rm -f conftest.err conftest.$ac_ext
6e3f3080 8205fi
ba479fd2
NN
8206echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8207echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
8208if test `eval echo '${'$as_ac_Header'}'` = yes; then
8209 cat >>confdefs.h <<_ACEOF
8210#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8211_ACEOF
8212
956d6950
JL
8213fi
8214done
8215
8216
f24af81b 8217# Check for thread headers.
ca9bc441 8218echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
8219echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
8220if test "${ac_cv_header_thread_h+set}" = set; then
8221 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8222else
ca9bc441 8223 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8224/* confdefs.h. */
8225_ACEOF
8226cat confdefs.h >>conftest.$ac_ext
8227cat >>conftest.$ac_ext <<_ACEOF
8228/* end confdefs.h. */
8229#include <thread.h>
8230_ACEOF
8231if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8232 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8233 ac_status=$?
8234 grep -v '^ *+' conftest.er1 >conftest.err
8235 rm -f conftest.er1
8236 cat conftest.err >&5
8237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8238 (exit $ac_status); } >/dev/null; then
8239 if test -s conftest.err; then
8240 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8241 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8242 else
8243 ac_cpp_err=
8244 fi
8245else
8246 ac_cpp_err=yes
8247fi
8248if test -z "$ac_cpp_err"; then
ca9bc441 8249 ac_cv_header_thread_h=yes
ba479fd2
NN
8250else
8251 echo "$as_me: failed program was:" >&5
8252sed 's/^/| /' conftest.$ac_ext >&5
8253
ca9bc441 8254 ac_cv_header_thread_h=no
ba479fd2
NN
8255fi
8256rm -f conftest.err conftest.$ac_ext
6e3f3080 8257fi
ba479fd2
NN
8258echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8259echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 8260if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
8261 have_thread_h=yes
8262else
ba479fd2 8263 have_thread_h=
f24af81b
TT
8264fi
8265
ca9bc441 8266echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
8267echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8268if test "${ac_cv_header_pthread_h+set}" = set; then
8269 echo $ECHO_N "(cached) $ECHO_C" >&6
f24af81b 8270else
ca9bc441 8271 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8272/* confdefs.h. */
8273_ACEOF
8274cat confdefs.h >>conftest.$ac_ext
8275cat >>conftest.$ac_ext <<_ACEOF
8276/* end confdefs.h. */
8277#include <pthread.h>
8278_ACEOF
8279if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8280 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8281 ac_status=$?
8282 grep -v '^ *+' conftest.er1 >conftest.err
8283 rm -f conftest.er1
8284 cat conftest.err >&5
8285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8286 (exit $ac_status); } >/dev/null; then
8287 if test -s conftest.err; then
8288 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8289 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8290 else
8291 ac_cpp_err=
8292 fi
8293else
8294 ac_cpp_err=yes
8295fi
8296if test -z "$ac_cpp_err"; then
ca9bc441 8297 ac_cv_header_pthread_h=yes
ba479fd2
NN
8298else
8299 echo "$as_me: failed program was:" >&5
8300sed 's/^/| /' conftest.$ac_ext >&5
8301
ca9bc441 8302 ac_cv_header_pthread_h=no
ba479fd2
NN
8303fi
8304rm -f conftest.err conftest.$ac_ext
6e3f3080 8305fi
ba479fd2
NN
8306echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8307echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 8308if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
8309 have_pthread_h=yes
8310else
ba479fd2 8311 have_pthread_h=
f24af81b
TT
8312fi
8313
8314
84c041a1 8315# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
8316echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8317echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
8318if test "${gcc_cv_decl_char_bit+set}" = set; then
8319 echo $ECHO_N "(cached) $ECHO_C" >&6
8320else
8321 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8322/* confdefs.h. */
8323_ACEOF
8324cat confdefs.h >>conftest.$ac_ext
8325cat >>conftest.$ac_ext <<_ACEOF
8326/* end confdefs.h. */
75e93faa
ZW
8327#ifdef HAVE_LIMITS_H
8328#include <limits.h>
8329#endif
8330#ifdef CHAR_BIT
8331found
8332#endif
ba479fd2 8333_ACEOF
75e93faa 8334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8335 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
8336 gcc_cv_decl_char_bit=yes
8337else
75e93faa
ZW
8338 gcc_cv_decl_char_bit=no
8339fi
8340rm -f conftest*
8341
8342
8343fi
ba479fd2
NN
8344echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8345echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 8346if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
8347 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8348echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
8349if test "${gcc_cv_c_nbby+set}" = set; then
8350 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
8351else
8352 i=8
8353 gcc_cv_c_nbby=
8354 while test $i -lt 65; do
ba479fd2 8355 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8356/* confdefs.h. */
8357_ACEOF
8358cat confdefs.h >>conftest.$ac_ext
8359cat >>conftest.$ac_ext <<_ACEOF
8360/* end confdefs.h. */
8361
8362int
8363main ()
8364{
4e70264f
ZW
8365switch(0) {
8366 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8367 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8368 ; }
ba479fd2
NN
8369 ;
8370 return 0;
8371}
8372_ACEOF
8373rm -f conftest.$ac_objext
8374if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8375 (eval $ac_compile) 2>conftest.er1
ba479fd2 8376 ac_status=$?
86da66b5
HPN
8377 grep -v '^ *+' conftest.er1 >conftest.err
8378 rm -f conftest.er1
8379 cat conftest.err >&5
ba479fd2
NN
8380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8381 (exit $ac_status); } &&
d7974fe6
KC
8382 { ac_try='test -z "$ac_c_werror_flag"
8383 || test ! -s conftest.err'
86da66b5
HPN
8384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8385 (eval $ac_try) 2>&5
8386 ac_status=$?
8387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8388 (exit $ac_status); }; } &&
8389 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8391 (eval $ac_try) 2>&5
8392 ac_status=$?
8393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8394 (exit $ac_status); }; }; then
4e70264f 8395 gcc_cv_c_nbby=$i; break
75e93faa 8396else
ba479fd2
NN
8397 echo "$as_me: failed program was:" >&5
8398sed 's/^/| /' conftest.$ac_ext >&5
8399
75e93faa 8400fi
86da66b5 8401rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
8402 i=`expr $i + 1`
8403 done
8404 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8405
8406fi
ba479fd2
NN
8407echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8408echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 8409if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
8410 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8411echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8412 { (exit 1); exit 1; }; }
75e93faa 8413else
ba479fd2
NN
8414
8415cat >>confdefs.h <<_ACEOF
75e93faa 8416#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 8417_ACEOF
75e93faa
ZW
8418
8419fi
8420fi
ba479fd2
NN
8421echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8422echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
8423if test "${ac_cv_c_bigendian+set}" = set; then
8424 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 8425else
9791c75c 8426 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 8427cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8428/* confdefs.h. */
8429_ACEOF
8430cat confdefs.h >>conftest.$ac_ext
8431cat >>conftest.$ac_ext <<_ACEOF
8432/* end confdefs.h. */
4977bab6
ZW
8433#include <sys/types.h>
8434#include <sys/param.h>
9791c75c 8435
ba479fd2
NN
8436int
8437main ()
8438{
4977bab6
ZW
8439#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8440 bogus endian macros
84c041a1 8441#endif
9791c75c 8442
ba479fd2
NN
8443 ;
8444 return 0;
8445}
8446_ACEOF
8447rm -f conftest.$ac_objext
8448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8449 (eval $ac_compile) 2>conftest.er1
ba479fd2 8450 ac_status=$?
86da66b5
HPN
8451 grep -v '^ *+' conftest.er1 >conftest.err
8452 rm -f conftest.er1
8453 cat conftest.err >&5
ba479fd2
NN
8454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8455 (exit $ac_status); } &&
d7974fe6
KC
8456 { ac_try='test -z "$ac_c_werror_flag"
8457 || test ! -s conftest.err'
86da66b5
HPN
8458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8459 (eval $ac_try) 2>&5
8460 ac_status=$?
8461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8462 (exit $ac_status); }; } &&
8463 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8465 (eval $ac_try) 2>&5
8466 ac_status=$?
8467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8468 (exit $ac_status); }; }; then
4977bab6 8469 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 8470cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8471/* confdefs.h. */
8472_ACEOF
8473cat confdefs.h >>conftest.$ac_ext
8474cat >>conftest.$ac_ext <<_ACEOF
8475/* end confdefs.h. */
4977bab6
ZW
8476#include <sys/types.h>
8477#include <sys/param.h>
9791c75c 8478
ba479fd2
NN
8479int
8480main ()
8481{
4977bab6
ZW
8482#if BYTE_ORDER != BIG_ENDIAN
8483 not big endian
84c041a1 8484#endif
9791c75c 8485
ba479fd2
NN
8486 ;
8487 return 0;
8488}
8489_ACEOF
8490rm -f conftest.$ac_objext
8491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8492 (eval $ac_compile) 2>conftest.er1
ba479fd2 8493 ac_status=$?
86da66b5
HPN
8494 grep -v '^ *+' conftest.er1 >conftest.err
8495 rm -f conftest.er1
8496 cat conftest.err >&5
ba479fd2
NN
8497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8498 (exit $ac_status); } &&
d7974fe6
KC
8499 { ac_try='test -z "$ac_c_werror_flag"
8500 || test ! -s conftest.err'
86da66b5
HPN
8501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8502 (eval $ac_try) 2>&5
8503 ac_status=$?
8504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8505 (exit $ac_status); }; } &&
8506 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8508 (eval $ac_try) 2>&5
8509 ac_status=$?
8510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8511 (exit $ac_status); }; }; then
4977bab6
ZW
8512 ac_cv_c_bigendian=yes
8513else
ba479fd2
NN
8514 echo "$as_me: failed program was:" >&5
8515sed 's/^/| /' conftest.$ac_ext >&5
8516
8517ac_cv_c_bigendian=no
4977bab6 8518fi
86da66b5 8519rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8520else
ba479fd2
NN
8521 echo "$as_me: failed program was:" >&5
8522sed 's/^/| /' conftest.$ac_ext >&5
8523
9791c75c
KC
8524# It does not; compile a test program.
8525if test "$cross_compiling" = yes; then
8526 # try to guess the endianness by grepping values into an object file
8527 ac_cv_c_bigendian=unknown
8528 cat >conftest.$ac_ext <<_ACEOF
8529/* confdefs.h. */
8530_ACEOF
8531cat confdefs.h >>conftest.$ac_ext
8532cat >>conftest.$ac_ext <<_ACEOF
8533/* end confdefs.h. */
8534short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8535short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8536void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
8537short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8538short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8539void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
8540int
8541main ()
8542{
8543 _ascii (); _ebcdic ();
8544 ;
8545 return 0;
8546}
8547_ACEOF
8548rm -f conftest.$ac_objext
8549if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8550 (eval $ac_compile) 2>conftest.er1
8551 ac_status=$?
8552 grep -v '^ *+' conftest.er1 >conftest.err
8553 rm -f conftest.er1
8554 cat conftest.err >&5
8555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8556 (exit $ac_status); } &&
d7974fe6
KC
8557 { ac_try='test -z "$ac_c_werror_flag"
8558 || test ! -s conftest.err'
9791c75c
KC
8559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8560 (eval $ac_try) 2>&5
8561 ac_status=$?
8562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8563 (exit $ac_status); }; } &&
8564 { ac_try='test -s conftest.$ac_objext'
8565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8566 (eval $ac_try) 2>&5
8567 ac_status=$?
8568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8569 (exit $ac_status); }; }; then
8570 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
8571 ac_cv_c_bigendian=yes
8572fi
8573if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8574 if test "$ac_cv_c_bigendian" = unknown; then
8575 ac_cv_c_bigendian=no
8576 else
8577 # finding both strings is unlikely to happen, but who knows?
8578 ac_cv_c_bigendian=unknown
8579 fi
8580fi
8581else
8582 echo "$as_me: failed program was:" >&5
8583sed 's/^/| /' conftest.$ac_ext >&5
8584
4977bab6 8585fi
86da66b5 8586rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
8587else
8588 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8589/* confdefs.h. */
8590_ACEOF
8591cat confdefs.h >>conftest.$ac_ext
8592cat >>conftest.$ac_ext <<_ACEOF
8593/* end confdefs.h. */
9791c75c
KC
8594int
8595main ()
8596{
4977bab6
ZW
8597 /* Are we little or big endian? From Harbison&Steele. */
8598 union
8599 {
8600 long l;
8601 char c[sizeof (long)];
8602 } u;
8603 u.l = 1;
8604 exit (u.c[sizeof (long) - 1] == 1);
8605}
ba479fd2
NN
8606_ACEOF
8607rm -f conftest$ac_exeext
8608if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8609 (eval $ac_link) 2>&5
8610 ac_status=$?
8611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8612 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8614 (eval $ac_try) 2>&5
8615 ac_status=$?
8616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8617 (exit $ac_status); }; }; then
4977bab6
ZW
8618 ac_cv_c_bigendian=no
8619else
ba479fd2
NN
8620 echo "$as_me: program exited with status $ac_status" >&5
8621echo "$as_me: failed program was:" >&5
8622sed 's/^/| /' conftest.$ac_ext >&5
8623
8624( exit $ac_status )
8625ac_cv_c_bigendian=yes
4977bab6 8626fi
86da66b5 8627rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 8628fi
4977bab6 8629fi
9791c75c 8630rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8631fi
ba479fd2
NN
8632echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8633echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
8634case $ac_cv_c_bigendian in
8635 yes)
ba479fd2
NN
8636
8637cat >>confdefs.h <<\_ACEOF
4977bab6 8638#define WORDS_BIGENDIAN 1
ba479fd2 8639_ACEOF
9791c75c
KC
8640 ;;
8641 no)
8642 ;;
8643 *)
8644 { { echo "$as_me:$LINENO: error: unknown endianness
8645presetting ac_cv_c_bigendian=no (or yes) will help" >&5
8646echo "$as_me: error: unknown endianness
8647presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
8648 { (exit 1); exit 1; }; } ;;
8649esac
84c041a1 8650
75e93faa 8651
73458fb7
NN
8652# --------
8653# UNSORTED
8654# --------
1e608388 8655
73458fb7
NN
8656# Stage specific cflags for build.
8657stage1_cflags=
8658case $build in
8659vax-*-*)
8660 if test x$GCC = xyes
8661 then
8662 stage1_cflags="-Wa,-J"
8663 else
8664 stage1_cflags="-J"
8665 fi
8666 ;;
8667powerpc-*-darwin*)
8668 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
8669 # sources; use -no-cpp-precomp to get to GNU cpp.
8670 # Apple's GCC has bugs in designated initializer handling, so disable
8671 # that too.
8672 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
8673 ;;
8674esac
1e608388 8675
1e608388 8676
4e70264f
ZW
8677# These libraries may be used by collect2.
8678# We may need a special search path to get them linked.
ba479fd2
NN
8679echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8680echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
8681if test "${gcc_cv_collect2_libs+set}" = set; then
8682 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
8683else
8684 save_LIBS="$LIBS"
7f2749d4 8685for libs in '' -lld -lmld \
4e70264f
ZW
8686 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8687 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8688do
8689 LIBS="$libs"
ba479fd2 8690 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8691/* confdefs.h. */
8692_ACEOF
8693cat confdefs.h >>conftest.$ac_ext
8694cat >>conftest.$ac_ext <<_ACEOF
8695/* end confdefs.h. */
8696
4e70264f 8697/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8698#ifdef __cplusplus
8699extern "C"
8700#endif
4e70264f 8701/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8702 builtin and then its argument prototype would still apply. */
8703char ldopen ();
8704int
8705main ()
8706{
8707ldopen ();
8708 ;
8709 return 0;
8710}
8711_ACEOF
8712rm -f conftest.$ac_objext conftest$ac_exeext
8713if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8714 (eval $ac_link) 2>conftest.er1
ba479fd2 8715 ac_status=$?
86da66b5
HPN
8716 grep -v '^ *+' conftest.er1 >conftest.err
8717 rm -f conftest.er1
8718 cat conftest.err >&5
ba479fd2
NN
8719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8720 (exit $ac_status); } &&
d7974fe6
KC
8721 { ac_try='test -z "$ac_c_werror_flag"
8722 || test ! -s conftest.err'
86da66b5
HPN
8723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8724 (eval $ac_try) 2>&5
8725 ac_status=$?
8726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8727 (exit $ac_status); }; } &&
8728 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8730 (eval $ac_try) 2>&5
8731 ac_status=$?
8732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8733 (exit $ac_status); }; }; then
4e70264f
ZW
8734 gcc_cv_collect2_libs="$libs"; break
8735else
ba479fd2
NN
8736 echo "$as_me: failed program was:" >&5
8737sed 's/^/| /' conftest.$ac_ext >&5
8738
4e70264f 8739fi
86da66b5
HPN
8740rm -f conftest.err conftest.$ac_objext \
8741 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8742done
8743LIBS="$save_LIBS"
8744test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8745fi
ba479fd2
NN
8746echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8747echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
8748case $gcc_cv_collect2_libs in
8749 "none required") ;;
8750 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8751esac
8752
8753
7f2749d4
RK
8754# When building Ada code on Alpha, we need exc_resume which is usually in
8755# -lexc. So test for it.
8756save_LIBS="$LIBS"
8757LIBS=
ba479fd2
NN
8758echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8759echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
8760if test "${ac_cv_search_exc_resume+set}" = set; then
8761 echo $ECHO_N "(cached) $ECHO_C" >&6
8762else
8763 ac_func_search_save_LIBS=$LIBS
8764ac_cv_search_exc_resume=no
8765cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8766/* confdefs.h. */
8767_ACEOF
8768cat confdefs.h >>conftest.$ac_ext
8769cat >>conftest.$ac_ext <<_ACEOF
8770/* end confdefs.h. */
7f2749d4 8771
7f2749d4 8772/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8773#ifdef __cplusplus
8774extern "C"
8775#endif
7f2749d4 8776/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8777 builtin and then its argument prototype would still apply. */
8778char exc_resume ();
8779int
8780main ()
8781{
8782exc_resume ();
8783 ;
8784 return 0;
8785}
8786_ACEOF
8787rm -f conftest.$ac_objext conftest$ac_exeext
8788if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8789 (eval $ac_link) 2>conftest.er1
ba479fd2 8790 ac_status=$?
86da66b5
HPN
8791 grep -v '^ *+' conftest.er1 >conftest.err
8792 rm -f conftest.er1
8793 cat conftest.err >&5
ba479fd2
NN
8794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8795 (exit $ac_status); } &&
d7974fe6
KC
8796 { ac_try='test -z "$ac_c_werror_flag"
8797 || test ! -s conftest.err'
86da66b5
HPN
8798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799 (eval $ac_try) 2>&5
8800 ac_status=$?
8801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8802 (exit $ac_status); }; } &&
8803 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8805 (eval $ac_try) 2>&5
8806 ac_status=$?
8807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8808 (exit $ac_status); }; }; then
7f2749d4
RK
8809 ac_cv_search_exc_resume="none required"
8810else
ba479fd2
NN
8811 echo "$as_me: failed program was:" >&5
8812sed 's/^/| /' conftest.$ac_ext >&5
8813
7f2749d4 8814fi
86da66b5
HPN
8815rm -f conftest.err conftest.$ac_objext \
8816 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8817if test "$ac_cv_search_exc_resume" = no; then
8818 for ac_lib in exc; do
8819 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8820 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8821/* confdefs.h. */
8822_ACEOF
8823cat confdefs.h >>conftest.$ac_ext
8824cat >>conftest.$ac_ext <<_ACEOF
8825/* end confdefs.h. */
8826
7f2749d4 8827/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8828#ifdef __cplusplus
8829extern "C"
8830#endif
7f2749d4 8831/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8832 builtin and then its argument prototype would still apply. */
8833char exc_resume ();
8834int
8835main ()
8836{
8837exc_resume ();
8838 ;
8839 return 0;
8840}
8841_ACEOF
8842rm -f conftest.$ac_objext conftest$ac_exeext
8843if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8844 (eval $ac_link) 2>conftest.er1
ba479fd2 8845 ac_status=$?
86da66b5
HPN
8846 grep -v '^ *+' conftest.er1 >conftest.err
8847 rm -f conftest.er1
8848 cat conftest.err >&5
ba479fd2
NN
8849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8850 (exit $ac_status); } &&
d7974fe6
KC
8851 { ac_try='test -z "$ac_c_werror_flag"
8852 || test ! -s conftest.err'
86da66b5
HPN
8853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8854 (eval $ac_try) 2>&5
8855 ac_status=$?
8856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8857 (exit $ac_status); }; } &&
8858 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8860 (eval $ac_try) 2>&5
8861 ac_status=$?
8862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8863 (exit $ac_status); }; }; then
8864 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
8865break
8866else
ba479fd2
NN
8867 echo "$as_me: failed program was:" >&5
8868sed 's/^/| /' conftest.$ac_ext >&5
8869
cafe096b 8870fi
86da66b5
HPN
8871rm -f conftest.err conftest.$ac_objext \
8872 conftest$ac_exeext conftest.$ac_ext
ba479fd2 8873 done
6e3f3080 8874fi
ba479fd2
NN
8875LIBS=$ac_func_search_save_LIBS
8876fi
8877echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
8878echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
8879if test "$ac_cv_search_exc_resume" != no; then
63cf211a 8880 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 8881
7f2749d4 8882fi
ba479fd2 8883
7f2749d4
RK
8884GNAT_LIBEXC="$LIBS"
8885LIBS="$save_LIBS"
8886
8887
62c9aa5f
ZW
8888# Some systems put ldexp and frexp in libm instead of libc; assume
8889# they're both in the same place. jcf-dump needs them.
8890save_LIBS="$LIBS"
8891LIBS=
ba479fd2
NN
8892echo "$as_me:$LINENO: checking for library containing ldexp" >&5
8893echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
8894if test "${ac_cv_search_ldexp+set}" = set; then
8895 echo $ECHO_N "(cached) $ECHO_C" >&6
8896else
8897 ac_func_search_save_LIBS=$LIBS
8898ac_cv_search_ldexp=no
8899cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8900/* confdefs.h. */
8901_ACEOF
8902cat confdefs.h >>conftest.$ac_ext
8903cat >>conftest.$ac_ext <<_ACEOF
8904/* end confdefs.h. */
62c9aa5f 8905
62c9aa5f 8906/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8907#ifdef __cplusplus
8908extern "C"
8909#endif
62c9aa5f 8910/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8911 builtin and then its argument prototype would still apply. */
8912char ldexp ();
8913int
8914main ()
8915{
8916ldexp ();
8917 ;
8918 return 0;
8919}
8920_ACEOF
8921rm -f conftest.$ac_objext conftest$ac_exeext
8922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8923 (eval $ac_link) 2>conftest.er1
ba479fd2 8924 ac_status=$?
86da66b5
HPN
8925 grep -v '^ *+' conftest.er1 >conftest.err
8926 rm -f conftest.er1
8927 cat conftest.err >&5
ba479fd2
NN
8928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8929 (exit $ac_status); } &&
d7974fe6
KC
8930 { ac_try='test -z "$ac_c_werror_flag"
8931 || test ! -s conftest.err'
86da66b5
HPN
8932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8933 (eval $ac_try) 2>&5
8934 ac_status=$?
8935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8936 (exit $ac_status); }; } &&
8937 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8939 (eval $ac_try) 2>&5
8940 ac_status=$?
8941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8942 (exit $ac_status); }; }; then
62c9aa5f
ZW
8943 ac_cv_search_ldexp="none required"
8944else
ba479fd2
NN
8945 echo "$as_me: failed program was:" >&5
8946sed 's/^/| /' conftest.$ac_ext >&5
8947
62c9aa5f 8948fi
86da66b5
HPN
8949rm -f conftest.err conftest.$ac_objext \
8950 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8951if test "$ac_cv_search_ldexp" = no; then
8952 for ac_lib in m; do
8953 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8954 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8955/* confdefs.h. */
8956_ACEOF
8957cat confdefs.h >>conftest.$ac_ext
8958cat >>conftest.$ac_ext <<_ACEOF
8959/* end confdefs.h. */
8960
62c9aa5f 8961/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8962#ifdef __cplusplus
8963extern "C"
8964#endif
62c9aa5f 8965/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8966 builtin and then its argument prototype would still apply. */
8967char ldexp ();
8968int
8969main ()
8970{
8971ldexp ();
8972 ;
8973 return 0;
8974}
8975_ACEOF
8976rm -f conftest.$ac_objext conftest$ac_exeext
8977if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8978 (eval $ac_link) 2>conftest.er1
ba479fd2 8979 ac_status=$?
86da66b5
HPN
8980 grep -v '^ *+' conftest.er1 >conftest.err
8981 rm -f conftest.er1
8982 cat conftest.err >&5
ba479fd2
NN
8983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8984 (exit $ac_status); } &&
d7974fe6
KC
8985 { ac_try='test -z "$ac_c_werror_flag"
8986 || test ! -s conftest.err'
86da66b5
HPN
8987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8988 (eval $ac_try) 2>&5
8989 ac_status=$?
8990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8991 (exit $ac_status); }; } &&
8992 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8994 (eval $ac_try) 2>&5
8995 ac_status=$?
8996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8997 (exit $ac_status); }; }; then
8998 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
8999break
9000else
ba479fd2
NN
9001 echo "$as_me: failed program was:" >&5
9002sed 's/^/| /' conftest.$ac_ext >&5
9003
cafe096b 9004fi
86da66b5
HPN
9005rm -f conftest.err conftest.$ac_objext \
9006 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9007 done
6e3f3080 9008fi
ba479fd2
NN
9009LIBS=$ac_func_search_save_LIBS
9010fi
9011echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
9012echo "${ECHO_T}$ac_cv_search_ldexp" >&6
9013if test "$ac_cv_search_ldexp" != no; then
63cf211a 9014 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 9015
62c9aa5f 9016fi
ba479fd2 9017
62c9aa5f
ZW
9018LDEXP_LIB="$LIBS"
9019LIBS="$save_LIBS"
9020
9021
956d6950
JL
9022# Use <inttypes.h> only if it exists,
9023# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
9024echo "$as_me:$LINENO: checking for inttypes.h" >&5
9025echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
9026if test "${gcc_cv_header_inttypes_h+set}" = set; then
9027 echo $ECHO_N "(cached) $ECHO_C" >&6
9028else
9029 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9030/* confdefs.h. */
9031_ACEOF
9032cat confdefs.h >>conftest.$ac_ext
9033cat >>conftest.$ac_ext <<_ACEOF
9034/* end confdefs.h. */
956d6950
JL
9035#include <sys/types.h>
9036#include <inttypes.h>
ba479fd2
NN
9037int
9038main ()
9039{
956d6950 9040intmax_t i = -1;
ba479fd2
NN
9041 ;
9042 return 0;
9043}
9044_ACEOF
9045rm -f conftest.$ac_objext
9046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9047 (eval $ac_compile) 2>conftest.er1
ba479fd2 9048 ac_status=$?
86da66b5
HPN
9049 grep -v '^ *+' conftest.er1 >conftest.err
9050 rm -f conftest.er1
9051 cat conftest.err >&5
ba479fd2
NN
9052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9053 (exit $ac_status); } &&
d7974fe6
KC
9054 { ac_try='test -z "$ac_c_werror_flag"
9055 || test ! -s conftest.err'
86da66b5
HPN
9056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9057 (eval $ac_try) 2>&5
9058 ac_status=$?
9059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9060 (exit $ac_status); }; } &&
9061 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9063 (eval $ac_try) 2>&5
9064 ac_status=$?
9065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9066 (exit $ac_status); }; }; then
0056a9b5 9067 gcc_cv_header_inttypes_h=yes
956d6950 9068else
ba479fd2
NN
9069 echo "$as_me: failed program was:" >&5
9070sed 's/^/| /' conftest.$ac_ext >&5
9071
9072gcc_cv_header_inttypes_h=no
956d6950 9073fi
86da66b5 9074rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
9075fi
9076
ba479fd2
NN
9077echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
9078echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 9079if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
9080
9081cat >>confdefs.h <<\_ACEOF
0056a9b5 9082#define HAVE_INTTYPES_H 1
ba479fd2 9083_ACEOF
0056a9b5
KG
9084
9085fi
956d6950 9086
c149cc37 9087
ba479fd2
NN
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
0d667716
KG
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
ba479fd2
NN
9116
9117
9118
9119
9120
9121
9122
9123
9124
6af8c740 9125for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
0d667716
KG
9126 sysconf strsignal getrusage nl_langinfo scandir alphasort \
9127 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9128 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 9129do
ba479fd2
NN
9130as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9131echo "$as_me:$LINENO: checking for $ac_func" >&5
9132echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9133if eval "test \"\${$as_ac_var+set}\" = set"; then
9134 echo $ECHO_N "(cached) $ECHO_C" >&6
9135else
9136 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9137/* confdefs.h. */
9138_ACEOF
9139cat confdefs.h >>conftest.$ac_ext
9140cat >>conftest.$ac_ext <<_ACEOF
9141/* end confdefs.h. */
86da66b5
HPN
9142/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9143 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9144#define $ac_func innocuous_$ac_func
9145
956d6950 9146/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9147 which can conflict with char $ac_func (); below.
9148 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9149 <limits.h> exists even on freestanding compilers. */
86da66b5 9150
ba479fd2
NN
9151#ifdef __STDC__
9152# include <limits.h>
9153#else
9154# include <assert.h>
9155#endif
86da66b5
HPN
9156
9157#undef $ac_func
9158
6e3f3080 9159/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9160#ifdef __cplusplus
9161extern "C"
9162{
9163#endif
6e3f3080 9164/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9165 builtin and then its argument prototype would still apply. */
9166char $ac_func ();
956d6950
JL
9167/* The GNU C library defines this for functions which it implements
9168 to always fail with ENOSYS. Some functions are actually named
9169 something starting with __ and the normal name is an alias. */
9170#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9171choke me
9172#else
ba479fd2
NN
9173char (*f) () = $ac_func;
9174#endif
9175#ifdef __cplusplus
9176}
956d6950
JL
9177#endif
9178
ba479fd2
NN
9179int
9180main ()
9181{
9182return f != $ac_func;
9183 ;
9184 return 0;
9185}
9186_ACEOF
9187rm -f conftest.$ac_objext conftest$ac_exeext
9188if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9189 (eval $ac_link) 2>conftest.er1
ba479fd2 9190 ac_status=$?
86da66b5
HPN
9191 grep -v '^ *+' conftest.er1 >conftest.err
9192 rm -f conftest.er1
9193 cat conftest.err >&5
ba479fd2
NN
9194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9195 (exit $ac_status); } &&
d7974fe6
KC
9196 { ac_try='test -z "$ac_c_werror_flag"
9197 || test ! -s conftest.err'
86da66b5
HPN
9198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9199 (eval $ac_try) 2>&5
9200 ac_status=$?
9201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9202 (exit $ac_status); }; } &&
9203 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9205 (eval $ac_try) 2>&5
9206 ac_status=$?
9207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9208 (exit $ac_status); }; }; then
9209 eval "$as_ac_var=yes"
9210else
9211 echo "$as_me: failed program was:" >&5
9212sed 's/^/| /' conftest.$ac_ext >&5
9213
9214eval "$as_ac_var=no"
9215fi
86da66b5
HPN
9216rm -f conftest.err conftest.$ac_objext \
9217 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9218fi
9219echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9220echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9221if test `eval echo '${'$as_ac_var'}'` = yes; then
9222 cat >>confdefs.h <<_ACEOF
9223#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9224_ACEOF
956d6950 9225
956d6950
JL
9226fi
9227done
9228
6885fc87 9229
39f6c4c8 9230if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
9231 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9232echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
9233if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9234 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9235else
9236 if test "$cross_compiling" = yes; then
9237 gcc_cv_func_mbstowcs_works=yes
9238else
ba479fd2 9239 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9240/* confdefs.h. */
9241_ACEOF
9242cat confdefs.h >>conftest.$ac_ext
9243cat >>conftest.$ac_ext <<_ACEOF
9244/* end confdefs.h. */
39f6c4c8
KW
9245#include <stdlib.h>
9246int main()
9247{
9248 mbstowcs(0, "", 0);
9249 return 0;
9250}
ba479fd2
NN
9251_ACEOF
9252rm -f conftest$ac_exeext
9253if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9254 (eval $ac_link) 2>&5
9255 ac_status=$?
9256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9257 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9259 (eval $ac_try) 2>&5
9260 ac_status=$?
9261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9262 (exit $ac_status); }; }; then
39f6c4c8
KW
9263 gcc_cv_func_mbstowcs_works=yes
9264else
ba479fd2
NN
9265 echo "$as_me: program exited with status $ac_status" >&5
9266echo "$as_me: failed program was:" >&5
9267sed 's/^/| /' conftest.$ac_ext >&5
9268
9269( exit $ac_status )
9270gcc_cv_func_mbstowcs_works=no
39f6c4c8 9271fi
86da66b5 9272rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 9273fi
39f6c4c8 9274fi
ba479fd2
NN
9275echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9276echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 9277 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
9278
9279cat >>confdefs.h <<\_ACEOF
39f6c4c8 9280#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 9281_ACEOF
39f6c4c8
KW
9282
9283 fi
9284fi
9285
ba479fd2
NN
9286echo "$as_me:$LINENO: checking for ssize_t" >&5
9287echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
9288if test "${ac_cv_type_ssize_t+set}" = set; then
9289 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 9290else
ba479fd2 9291 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9292/* confdefs.h. */
9293_ACEOF
9294cat confdefs.h >>conftest.$ac_ext
9295cat >>conftest.$ac_ext <<_ACEOF
9296/* end confdefs.h. */
8b4fc07a
NN
9297$ac_includes_default
9298int
9299main ()
9300{
9301if ((ssize_t *) 0)
9302 return 0;
9303if (sizeof (ssize_t))
9304 return 0;
9305 ;
9306 return 0;
9307}
ba479fd2 9308_ACEOF
8b4fc07a
NN
9309rm -f conftest.$ac_objext
9310if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9311 (eval $ac_compile) 2>conftest.er1
8b4fc07a 9312 ac_status=$?
86da66b5
HPN
9313 grep -v '^ *+' conftest.er1 >conftest.err
9314 rm -f conftest.er1
9315 cat conftest.err >&5
8b4fc07a
NN
9316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9317 (exit $ac_status); } &&
d7974fe6
KC
9318 { ac_try='test -z "$ac_c_werror_flag"
9319 || test ! -s conftest.err'
86da66b5
HPN
9320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9321 (eval $ac_try) 2>&5
9322 ac_status=$?
9323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9324 (exit $ac_status); }; } &&
9325 { ac_try='test -s conftest.$ac_objext'
8b4fc07a
NN
9326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9327 (eval $ac_try) 2>&5
9328 ac_status=$?
9329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9330 (exit $ac_status); }; }; then
cb65112a 9331 ac_cv_type_ssize_t=yes
f12bc141 9332else
8b4fc07a
NN
9333 echo "$as_me: failed program was:" >&5
9334sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9335
8b4fc07a
NN
9336ac_cv_type_ssize_t=no
9337fi
86da66b5 9338rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9339fi
ba479fd2
NN
9340echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9341echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
9342if test $ac_cv_type_ssize_t = yes; then
9343 :
9344else
ba479fd2 9345
8b4fc07a 9346cat >>confdefs.h <<_ACEOF
f12bc141 9347#define ssize_t int
ba479fd2 9348_ACEOF
f12bc141
ZW
9349
9350fi
9351
0b9d02c6 9352
e256b8b6
DA
9353# Try to determine the array type of the second argument of getgroups
9354# for the target system (int or gid_t).
ba479fd2
NN
9355echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9356echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
9357if test "${ac_cv_type_uid_t+set}" = set; then
9358 echo $ECHO_N "(cached) $ECHO_C" >&6
9359else
9360 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9361/* confdefs.h. */
9362_ACEOF
9363cat confdefs.h >>conftest.$ac_ext
9364cat >>conftest.$ac_ext <<_ACEOF
9365/* end confdefs.h. */
e256b8b6 9366#include <sys/types.h>
ba479fd2
NN
9367
9368_ACEOF
e256b8b6 9369if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9370 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
9371 ac_cv_type_uid_t=yes
9372else
e256b8b6
DA
9373 ac_cv_type_uid_t=no
9374fi
9375rm -f conftest*
9376
9377fi
ba479fd2
NN
9378echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9379echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 9380if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
9381
9382cat >>confdefs.h <<\_ACEOF
e256b8b6 9383#define uid_t int
ba479fd2 9384_ACEOF
cafe096b 9385
ba479fd2
NN
9386
9387cat >>confdefs.h <<\_ACEOF
e256b8b6 9388#define gid_t int
ba479fd2 9389_ACEOF
e256b8b6
DA
9390
9391fi
9392
ba479fd2
NN
9393echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9394echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
9395if test "${ac_cv_type_getgroups+set}" = set; then
9396 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
9397else
9398 if test "$cross_compiling" = yes; then
9399 ac_cv_type_getgroups=cross
9400else
ba479fd2 9401 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9402/* confdefs.h. */
9403_ACEOF
9404cat confdefs.h >>conftest.$ac_ext
9405cat >>conftest.$ac_ext <<_ACEOF
9406/* end confdefs.h. */
e256b8b6
DA
9407/* Thanks to Mike Rendell for this test. */
9408#include <sys/types.h>
9409#define NGID 256
9410#undef MAX
9411#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
9412
9413int
9414main ()
e256b8b6
DA
9415{
9416 gid_t gidset[NGID];
9417 int i, n;
9418 union { gid_t gval; long lval; } val;
9419
9420 val.lval = -1;
9421 for (i = 0; i < NGID; i++)
9422 gidset[i] = val.gval;
9423 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 9424 gidset);
e256b8b6
DA
9425 /* Exit non-zero if getgroups seems to require an array of ints. This
9426 happens when gid_t is short but getgroups modifies an array of ints. */
9427 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 9428}
ba479fd2
NN
9429_ACEOF
9430rm -f conftest$ac_exeext
9431if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9432 (eval $ac_link) 2>&5
9433 ac_status=$?
9434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9435 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9437 (eval $ac_try) 2>&5
9438 ac_status=$?
9439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9440 (exit $ac_status); }; }; then
9441 ac_cv_type_getgroups=gid_t
63cf211a 9442else
ba479fd2
NN
9443 echo "$as_me: program exited with status $ac_status" >&5
9444echo "$as_me: failed program was:" >&5
9445sed 's/^/| /' conftest.$ac_ext >&5
9446
9447( exit $ac_status )
9448ac_cv_type_getgroups=int
e256b8b6 9449fi
86da66b5 9450rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 9451fi
e256b8b6 9452if test $ac_cv_type_getgroups = cross; then
ba479fd2 9453 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9454/* confdefs.h. */
9455_ACEOF
9456cat confdefs.h >>conftest.$ac_ext
9457cat >>conftest.$ac_ext <<_ACEOF
9458/* end confdefs.h. */
e256b8b6 9459#include <unistd.h>
ba479fd2
NN
9460
9461_ACEOF
e256b8b6 9462if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9463 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
9464 ac_cv_type_getgroups=gid_t
9465else
e256b8b6
DA
9466 ac_cv_type_getgroups=int
9467fi
9468rm -f conftest*
9469
9470fi
9471fi
ba479fd2
NN
9472echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9473echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 9474
ba479fd2 9475cat >>confdefs.h <<_ACEOF
e256b8b6 9476#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 9477_ACEOF
e256b8b6
DA
9478
9479
9480if test "${target}" = "${build}"; then
9481 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9482else
9483 case "${target}" in
9484 # This condition may need some tweaking. It should include all
9485 # targets where the array type of the second argument of getgroups
9486 # is int and the type of gid_t is not equivalent to int.
9487 *-*-sunos* | *-*-ultrix*)
9488 TARGET_GETGROUPS_T=int
9489 ;;
9490 *)
9491 TARGET_GETGROUPS_T=gid_t
9492 ;;
9493 esac
9494fi
9495
9496
ba479fd2
NN
9497echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5
9498echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6
9499if test "${gcc_cv_func_printf_ptr+set}" = set; then
9500 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
9501else
9502 if test "$cross_compiling" = yes; then
9503 gcc_cv_func_printf_ptr=no
9504else
ba479fd2 9505 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9506/* confdefs.h. */
9507_ACEOF
9508cat confdefs.h >>conftest.$ac_ext
9509cat >>conftest.$ac_ext <<_ACEOF
9510/* end confdefs.h. */
0a4b6309
RL
9511#include <stdio.h>
9512
86cf1cbd 9513int main()
0a4b6309
RL
9514{
9515 char buf[64];
9516 char *p = buf, *q = NULL;
9517 sprintf(buf, "%p", p);
9518 sscanf(buf, "%p", &q);
86cf1cbd 9519 return (p != q);
0a4b6309 9520}
ba479fd2
NN
9521_ACEOF
9522rm -f conftest$ac_exeext
9523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9524 (eval $ac_link) 2>&5
9525 ac_status=$?
9526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9529 (eval $ac_try) 2>&5
9530 ac_status=$?
9531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9532 (exit $ac_status); }; }; then
0a4b6309
RL
9533 gcc_cv_func_printf_ptr=yes
9534else
ba479fd2
NN
9535 echo "$as_me: program exited with status $ac_status" >&5
9536echo "$as_me: failed program was:" >&5
9537sed 's/^/| /' conftest.$ac_ext >&5
9538
9539( exit $ac_status )
9540gcc_cv_func_printf_ptr=no
0a4b6309 9541fi
86da66b5 9542rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0a4b6309 9543fi
0a4b6309
RL
9544rm -f core core.* *.core
9545fi
ba479fd2
NN
9546echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5
9547echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6
63cf211a 9548if test $gcc_cv_func_printf_ptr = yes ; then
ba479fd2
NN
9549
9550cat >>confdefs.h <<\_ACEOF
0a4b6309 9551#define HAVE_PRINTF_PTR 1
ba479fd2 9552_ACEOF
0a4b6309
RL
9553
9554fi
9555
3b0727a0
MR
9556
9557echo "$as_me:$LINENO: checking for sys/mman.h" >&5
9558echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
9559if test "${ac_cv_header_sys_mman_h+set}" = set; then
9560 echo $ECHO_N "(cached) $ECHO_C" >&6
9561else
9562 cat >conftest.$ac_ext <<_ACEOF
9563/* confdefs.h. */
9564_ACEOF
9565cat confdefs.h >>conftest.$ac_ext
9566cat >>conftest.$ac_ext <<_ACEOF
9567/* end confdefs.h. */
9568#include <sys/mman.h>
9569_ACEOF
9570if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9571 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9572 ac_status=$?
9573 grep -v '^ *+' conftest.er1 >conftest.err
9574 rm -f conftest.er1
9575 cat conftest.err >&5
9576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9577 (exit $ac_status); } >/dev/null; then
9578 if test -s conftest.err; then
9579 ac_cpp_err=$ac_c_preproc_warn_flag
9580 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9581 else
9582 ac_cpp_err=
9583 fi
9584else
9585 ac_cpp_err=yes
9586fi
9587if test -z "$ac_cpp_err"; then
9588 ac_cv_header_sys_mman_h=yes
9589else
9590 echo "$as_me: failed program was:" >&5
9591sed 's/^/| /' conftest.$ac_ext >&5
9592
9593 ac_cv_header_sys_mman_h=no
9594fi
9595rm -f conftest.err conftest.$ac_ext
9596fi
9597echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9598echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
9599if test $ac_cv_header_sys_mman_h = yes; then
9600 gcc_header_sys_mman_h=yes
9601else
9602 gcc_header_sys_mman_h=no
9603fi
9604
9605echo "$as_me:$LINENO: checking for mmap" >&5
9606echo $ECHO_N "checking for mmap... $ECHO_C" >&6
9607if test "${ac_cv_func_mmap+set}" = set; then
9608 echo $ECHO_N "(cached) $ECHO_C" >&6
9609else
9610 cat >conftest.$ac_ext <<_ACEOF
9611/* confdefs.h. */
9612_ACEOF
9613cat confdefs.h >>conftest.$ac_ext
9614cat >>conftest.$ac_ext <<_ACEOF
9615/* end confdefs.h. */
9616/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9617 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9618#define mmap innocuous_mmap
9619
9620/* System header to define __stub macros and hopefully few prototypes,
9621 which can conflict with char mmap (); below.
9622 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9623 <limits.h> exists even on freestanding compilers. */
9624
9625#ifdef __STDC__
9626# include <limits.h>
9627#else
9628# include <assert.h>
9629#endif
9630
9631#undef mmap
9632
9633/* Override any gcc2 internal prototype to avoid an error. */
9634#ifdef __cplusplus
9635extern "C"
9636{
9637#endif
9638/* We use char because int might match the return type of a gcc2
9639 builtin and then its argument prototype would still apply. */
9640char mmap ();
9641/* The GNU C library defines this for functions which it implements
9642 to always fail with ENOSYS. Some functions are actually named
9643 something starting with __ and the normal name is an alias. */
9644#if defined (__stub_mmap) || defined (__stub___mmap)
9645choke me
9646#else
9647char (*f) () = mmap;
9648#endif
9649#ifdef __cplusplus
9650}
9651#endif
9652
9653int
9654main ()
9655{
9656return f != mmap;
9657 ;
9658 return 0;
9659}
9660_ACEOF
9661rm -f conftest.$ac_objext conftest$ac_exeext
9662if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9663 (eval $ac_link) 2>conftest.er1
9664 ac_status=$?
9665 grep -v '^ *+' conftest.er1 >conftest.err
9666 rm -f conftest.er1
9667 cat conftest.err >&5
9668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9669 (exit $ac_status); } &&
d7974fe6
KC
9670 { ac_try='test -z "$ac_c_werror_flag"
9671 || test ! -s conftest.err'
3b0727a0
MR
9672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9673 (eval $ac_try) 2>&5
9674 ac_status=$?
9675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9676 (exit $ac_status); }; } &&
9677 { ac_try='test -s conftest$ac_exeext'
9678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9679 (eval $ac_try) 2>&5
9680 ac_status=$?
9681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9682 (exit $ac_status); }; }; then
9683 ac_cv_func_mmap=yes
9684else
9685 echo "$as_me: failed program was:" >&5
9686sed 's/^/| /' conftest.$ac_ext >&5
9687
9688ac_cv_func_mmap=no
9689fi
9690rm -f conftest.err conftest.$ac_objext \
9691 conftest$ac_exeext conftest.$ac_ext
9692fi
9693echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9694echo "${ECHO_T}$ac_cv_func_mmap" >&6
9695if test $ac_cv_func_mmap = yes; then
9696 gcc_func_mmap=yes
9697else
9698 gcc_func_mmap=no
9699fi
9700
9701if test "$gcc_header_sys_mman_h" != yes \
9702 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
9703 gcc_cv_func_mmap_file=no
9704 gcc_cv_func_mmap_dev_zero=no
9705 gcc_cv_func_mmap_anon=no
9706else
ba479fd2
NN
9707 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9708echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
9709if test "${gcc_cv_func_mmap_file+set}" = set; then
9710 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 9711else
ba479fd2 9712 # Add a system to this blacklist if
1072ec3f
ZW
9713 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9714 # memory area containing the same data that you'd get if you applied
9715 # read() to the same fd. The only system known to have a problem here
9716 # is VMS, where text files have record structure.
9717 case "$host_os" in
ba479fd2 9718 vms* | ultrix*)
1072ec3f
ZW
9719 gcc_cv_func_mmap_file=no ;;
9720 *)
9721 gcc_cv_func_mmap_file=yes;;
9722 esac
9723fi
ba479fd2
NN
9724echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9725echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9726 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9727echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
9728if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9729 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9730else
9731 # Add a system to this blacklist if it has mmap() but /dev/zero
9732 # does not exist, or if mmapping /dev/zero does not give anonymous
9733 # zeroed pages with both the following properties:
9734 # 1. If you map N consecutive pages in with one call, and then
9735 # unmap any subset of those pages, the pages that were not
9736 # explicitly unmapped remain accessible.
9737 # 2. If you map two adjacent blocks of memory and then unmap them
9738 # both at once, they must both go away.
9739 # Systems known to be in this category are Windows (all variants),
9740 # VMS, and Darwin.
9741 case "$host_os" in
2ce240d3 9742 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
9743 gcc_cv_func_mmap_dev_zero=no ;;
9744 *)
9745 gcc_cv_func_mmap_dev_zero=yes;;
9746 esac
9747fi
ba479fd2
NN
9748echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9749echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
9750
9751 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
9752 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9753echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
9754if test "${gcc_cv_decl_map_anon+set}" = set; then
9755 echo $ECHO_N "(cached) $ECHO_C" >&6
9756else
9757 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9758/* confdefs.h. */
9759_ACEOF
9760cat confdefs.h >>conftest.$ac_ext
9761cat >>conftest.$ac_ext <<_ACEOF
9762/* end confdefs.h. */
1072ec3f
ZW
9763#include <sys/types.h>
9764#include <sys/mman.h>
9765#include <unistd.h>
9766
9767#ifndef MAP_ANONYMOUS
9768#define MAP_ANONYMOUS MAP_ANON
9769#endif
9770
ba479fd2
NN
9771int
9772main ()
9773{
1072ec3f 9774int n = MAP_ANONYMOUS;
ba479fd2
NN
9775 ;
9776 return 0;
9777}
9778_ACEOF
9779rm -f conftest.$ac_objext
9780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9781 (eval $ac_compile) 2>conftest.er1
ba479fd2 9782 ac_status=$?
86da66b5
HPN
9783 grep -v '^ *+' conftest.er1 >conftest.err
9784 rm -f conftest.er1
9785 cat conftest.err >&5
ba479fd2
NN
9786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9787 (exit $ac_status); } &&
d7974fe6
KC
9788 { ac_try='test -z "$ac_c_werror_flag"
9789 || test ! -s conftest.err'
86da66b5
HPN
9790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9791 (eval $ac_try) 2>&5
9792 ac_status=$?
9793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9794 (exit $ac_status); }; } &&
9795 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9797 (eval $ac_try) 2>&5
9798 ac_status=$?
9799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9800 (exit $ac_status); }; }; then
1072ec3f
ZW
9801 gcc_cv_decl_map_anon=yes
9802else
ba479fd2
NN
9803 echo "$as_me: failed program was:" >&5
9804sed 's/^/| /' conftest.$ac_ext >&5
9805
9806gcc_cv_decl_map_anon=no
1072ec3f 9807fi
86da66b5 9808rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 9809fi
ba479fd2
NN
9810echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9811echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
9812
9813 if test $gcc_cv_decl_map_anon = no; then
9814 gcc_cv_func_mmap_anon=no
9815 else
ba479fd2
NN
9816 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9817echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
9818if test "${gcc_cv_func_mmap_anon+set}" = set; then
9819 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9820else
9821 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9822 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9823 # doesn't give anonymous zeroed pages with the same properties listed
9824 # above for use of /dev/zero.
9825 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9826 case "$host_os" in
9827 vms* | cygwin* | pe | mingw* | sco* | udk* )
9828 gcc_cv_func_mmap_anon=no ;;
9829 *)
9830 gcc_cv_func_mmap_anon=yes;;
9831 esac
9832fi
ba479fd2
NN
9833echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9834echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
9835 fi
9836fi
9837
9838if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
9839
9840cat >>confdefs.h <<\_ACEOF
1072ec3f 9841#define HAVE_MMAP_FILE 1
ba479fd2 9842_ACEOF
1072ec3f
ZW
9843
9844fi
9845if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
9846
9847cat >>confdefs.h <<\_ACEOF
1072ec3f 9848#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 9849_ACEOF
1072ec3f
ZW
9850
9851fi
9852if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
9853
9854cat >>confdefs.h <<\_ACEOF
1072ec3f 9855#define HAVE_MMAP_ANON 1
ba479fd2 9856_ACEOF
1072ec3f
ZW
9857
9858fi
9859
b27d2bd5
MK
9860
9861case "${host}" in
ee262b6f 9862*-*-*vms*)
ba479fd2 9863 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
9864 # won't work, and it isn't easily adaptable. It makes more sense to
9865 # just force it.
9866 ac_cv_func_vfork_works=yes
9867 ;;
b27d2bd5 9868esac
ba479fd2
NN
9869echo "$as_me:$LINENO: checking for pid_t" >&5
9870echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
9871if test "${ac_cv_type_pid_t+set}" = set; then
9872 echo $ECHO_N "(cached) $ECHO_C" >&6
9873else
9874 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9875/* confdefs.h. */
9876_ACEOF
9877cat confdefs.h >>conftest.$ac_ext
9878cat >>conftest.$ac_ext <<_ACEOF
9879/* end confdefs.h. */
9880$ac_includes_default
9881int
9882main ()
9883{
9884if ((pid_t *) 0)
9885 return 0;
9886if (sizeof (pid_t))
9887 return 0;
9888 ;
9889 return 0;
9890}
9891_ACEOF
9892rm -f conftest.$ac_objext
9893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9894 (eval $ac_compile) 2>conftest.er1
ba479fd2 9895 ac_status=$?
86da66b5
HPN
9896 grep -v '^ *+' conftest.er1 >conftest.err
9897 rm -f conftest.er1
9898 cat conftest.err >&5
ba479fd2
NN
9899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9900 (exit $ac_status); } &&
d7974fe6
KC
9901 { ac_try='test -z "$ac_c_werror_flag"
9902 || test ! -s conftest.err'
86da66b5
HPN
9903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9904 (eval $ac_try) 2>&5
9905 ac_status=$?
9906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9907 (exit $ac_status); }; } &&
9908 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9910 (eval $ac_try) 2>&5
9911 ac_status=$?
9912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9913 (exit $ac_status); }; }; then
cb65112a 9914 ac_cv_type_pid_t=yes
c375c43b 9915else
ba479fd2
NN
9916 echo "$as_me: failed program was:" >&5
9917sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9918
ba479fd2
NN
9919ac_cv_type_pid_t=no
9920fi
86da66b5 9921rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9922fi
ba479fd2
NN
9923echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
9924echo "${ECHO_T}$ac_cv_type_pid_t" >&6
9925if test $ac_cv_type_pid_t = yes; then
9926 :
9927else
9928
9929cat >>confdefs.h <<_ACEOF
c375c43b 9930#define pid_t int
ba479fd2 9931_ACEOF
c375c43b
KG
9932
9933fi
9934
ba479fd2
NN
9935
9936
9937for ac_header in unistd.h vfork.h
9938do
9939as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 9940echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
9941echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9942if eval "test \"\${$as_ac_Header+set}\" = set"; then
9943 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9944else
ca9bc441 9945 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9946/* confdefs.h. */
9947_ACEOF
9948cat confdefs.h >>conftest.$ac_ext
9949cat >>conftest.$ac_ext <<_ACEOF
9950/* end confdefs.h. */
9951#include <$ac_header>
9952_ACEOF
9953if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9954 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9955 ac_status=$?
9956 grep -v '^ *+' conftest.er1 >conftest.err
9957 rm -f conftest.er1
9958 cat conftest.err >&5
9959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9960 (exit $ac_status); } >/dev/null; then
9961 if test -s conftest.err; then
9962 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 9963 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
9964 else
9965 ac_cpp_err=
9966 fi
093e61a6 9967else
ba479fd2
NN
9968 ac_cpp_err=yes
9969fi
9970if test -z "$ac_cpp_err"; then
ca9bc441 9971 eval "$as_ac_Header=yes"
ba479fd2
NN
9972else
9973 echo "$as_me: failed program was:" >&5
9974sed 's/^/| /' conftest.$ac_ext >&5
9975
ca9bc441 9976 eval "$as_ac_Header=no"
ba479fd2
NN
9977fi
9978rm -f conftest.err conftest.$ac_ext
c375c43b 9979fi
ba479fd2
NN
9980echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9981echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
9982if test `eval echo '${'$as_ac_Header'}'` = yes; then
9983 cat >>confdefs.h <<_ACEOF
9984#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9985_ACEOF
6e3f3080
NN
9986
9987fi
ba479fd2
NN
9988done
9989
9990
9991
9992for ac_func in fork vfork
9993do
9994as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9995echo "$as_me:$LINENO: checking for $ac_func" >&5
9996echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9997if eval "test \"\${$as_ac_var+set}\" = set"; then
9998 echo $ECHO_N "(cached) $ECHO_C" >&6
9999else
10000 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10001/* confdefs.h. */
10002_ACEOF
10003cat confdefs.h >>conftest.$ac_ext
10004cat >>conftest.$ac_ext <<_ACEOF
10005/* end confdefs.h. */
86da66b5
HPN
10006/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10007 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10008#define $ac_func innocuous_$ac_func
10009
c375c43b 10010/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10011 which can conflict with char $ac_func (); below.
10012 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10013 <limits.h> exists even on freestanding compilers. */
86da66b5 10014
ba479fd2
NN
10015#ifdef __STDC__
10016# include <limits.h>
10017#else
10018# include <assert.h>
10019#endif
86da66b5
HPN
10020
10021#undef $ac_func
10022
6e3f3080 10023/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10024#ifdef __cplusplus
10025extern "C"
10026{
10027#endif
6e3f3080 10028/* We use char because int might match the return type of a gcc2
ba479fd2
NN
10029 builtin and then its argument prototype would still apply. */
10030char $ac_func ();
c375c43b
KG
10031/* The GNU C library defines this for functions which it implements
10032 to always fail with ENOSYS. Some functions are actually named
10033 something starting with __ and the normal name is an alias. */
ba479fd2 10034#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
10035choke me
10036#else
ba479fd2
NN
10037char (*f) () = $ac_func;
10038#endif
10039#ifdef __cplusplus
10040}
c375c43b
KG
10041#endif
10042
ba479fd2
NN
10043int
10044main ()
10045{
10046return f != $ac_func;
10047 ;
10048 return 0;
10049}
10050_ACEOF
10051rm -f conftest.$ac_objext conftest$ac_exeext
10052if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10053 (eval $ac_link) 2>conftest.er1
ba479fd2 10054 ac_status=$?
86da66b5
HPN
10055 grep -v '^ *+' conftest.er1 >conftest.err
10056 rm -f conftest.er1
10057 cat conftest.err >&5
ba479fd2
NN
10058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10059 (exit $ac_status); } &&
d7974fe6
KC
10060 { ac_try='test -z "$ac_c_werror_flag"
10061 || test ! -s conftest.err'
86da66b5
HPN
10062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10063 (eval $ac_try) 2>&5
10064 ac_status=$?
10065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10066 (exit $ac_status); }; } &&
10067 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10069 (eval $ac_try) 2>&5
10070 ac_status=$?
10071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10072 (exit $ac_status); }; }; then
10073 eval "$as_ac_var=yes"
10074else
10075 echo "$as_me: failed program was:" >&5
10076sed 's/^/| /' conftest.$ac_ext >&5
10077
10078eval "$as_ac_var=no"
10079fi
86da66b5
HPN
10080rm -f conftest.err conftest.$ac_objext \
10081 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
10082fi
10083echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10084echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10085if test `eval echo '${'$as_ac_var'}'` = yes; then
10086 cat >>confdefs.h <<_ACEOF
10087#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10088_ACEOF
10089
c375c43b 10090fi
ba479fd2 10091done
c375c43b 10092
ba479fd2
NN
10093if test "x$ac_cv_func_fork" = xyes; then
10094 echo "$as_me:$LINENO: checking for working fork" >&5
10095echo $ECHO_N "checking for working fork... $ECHO_C" >&6
10096if test "${ac_cv_func_fork_works+set}" = set; then
10097 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10098else
ba479fd2
NN
10099 if test "$cross_compiling" = yes; then
10100 ac_cv_func_fork_works=cross
10101else
10102 cat >conftest.$ac_ext <<_ACEOF
10103/* By Ruediger Kuhlmann. */
10104 #include <sys/types.h>
10105 #if HAVE_UNISTD_H
10106 # include <unistd.h>
10107 #endif
10108 /* Some systems only have a dummy stub for fork() */
10109 int main ()
10110 {
86da66b5
HPN
10111 if (fork() < 0)
10112 exit (1);
10113 exit (0);
ba479fd2
NN
10114 }
10115_ACEOF
10116rm -f conftest$ac_exeext
10117if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10118 (eval $ac_link) 2>&5
10119 ac_status=$?
10120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10121 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10123 (eval $ac_try) 2>&5
10124 ac_status=$?
10125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10126 (exit $ac_status); }; }; then
10127 ac_cv_func_fork_works=yes
10128else
10129 echo "$as_me: program exited with status $ac_status" >&5
10130echo "$as_me: failed program was:" >&5
10131sed 's/^/| /' conftest.$ac_ext >&5
10132
10133( exit $ac_status )
10134ac_cv_func_fork_works=no
10135fi
86da66b5 10136rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
10137fi
10138fi
10139echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10140echo "${ECHO_T}$ac_cv_func_fork_works" >&6
10141
10142else
10143 ac_cv_func_fork_works=$ac_cv_func_fork
10144fi
10145if test "x$ac_cv_func_fork_works" = xcross; then
10146 case $host in
10147 *-*-amigaos* | *-*-msdosdjgpp*)
10148 # Override, as these systems have only a dummy fork() stub
10149 ac_cv_func_fork_works=no
10150 ;;
10151 *)
10152 ac_cv_func_fork_works=yes
10153 ;;
10154 esac
10155 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10156echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 10157fi
c375c43b 10158ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10159if test "x$ac_cv_func_vfork" = xyes; then
10160 echo "$as_me:$LINENO: checking for working vfork" >&5
10161echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
10162if test "${ac_cv_func_vfork_works+set}" = set; then
10163 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10164else
ba479fd2
NN
10165 if test "$cross_compiling" = yes; then
10166 ac_cv_func_vfork_works=cross
10167else
10168 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10169/* confdefs.h. */
10170_ACEOF
10171cat confdefs.h >>conftest.$ac_ext
10172cat >>conftest.$ac_ext <<_ACEOF
10173/* end confdefs.h. */
c375c43b
KG
10174/* Thanks to Paul Eggert for this test. */
10175#include <stdio.h>
ba479fd2 10176#include <stdlib.h>
c375c43b
KG
10177#include <sys/types.h>
10178#include <sys/stat.h>
ba479fd2
NN
10179#include <sys/wait.h>
10180#if HAVE_UNISTD_H
10181# include <unistd.h>
c375c43b 10182#endif
ba479fd2
NN
10183#if HAVE_VFORK_H
10184# include <vfork.h>
c375c43b
KG
10185#endif
10186/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
10187 argument registers are propagated back to the parent. The compiler
10188 is told about this with #include <vfork.h>, but some compilers
10189 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10190 static variable whose address is put into a register that is
10191 clobbered by the vfork. */
10192static void
c375c43b
KG
10193#ifdef __cplusplus
10194sparc_address_test (int arg)
ba479fd2 10195# else
c375c43b
KG
10196sparc_address_test (arg) int arg;
10197#endif
10198{
10199 static pid_t child;
10200 if (!child) {
10201 child = vfork ();
10202 if (child < 0) {
10203 perror ("vfork");
10204 _exit(2);
10205 }
10206 if (!child) {
10207 arg = getpid();
10208 write(-1, "", 0);
10209 _exit (arg);
10210 }
10211 }
10212}
ba479fd2
NN
10213
10214int
10215main ()
10216{
c375c43b
KG
10217 pid_t parent = getpid ();
10218 pid_t child;
10219
ba479fd2 10220 sparc_address_test (0);
c375c43b
KG
10221
10222 child = vfork ();
10223
10224 if (child == 0) {
ba479fd2
NN
10225 /* Here is another test for sparc vfork register problems. This
10226 test uses lots of local variables, at least as many local
10227 variables as main has allocated so far including compiler
10228 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10229 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10230 reuse the register of parent for one of the local variables,
10231 since it will think that parent can't possibly be used any more
10232 in this routine. Assigning to the local variable will thus
10233 munge parent in the parent process. */
c375c43b
KG
10234 pid_t
10235 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10236 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10237 /* Convince the compiler that p..p7 are live; otherwise, it might
10238 use the same hardware register for all 8 local variables. */
10239 if (p != p1 || p != p2 || p != p3 || p != p4
10240 || p != p5 || p != p6 || p != p7)
10241 _exit(1);
10242
ba479fd2
NN
10243 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10244 from child file descriptors. If the child closes a descriptor
10245 before it execs or exits, this munges the parent's descriptor
10246 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10247 _exit(close(fileno(stdout)) != 0);
10248 } else {
10249 int status;
10250 struct stat st;
10251
10252 while (wait(&status) != child)
10253 ;
10254 exit(
10255 /* Was there some problem with vforking? */
10256 child < 0
10257
10258 /* Did the child fail? (This shouldn't happen.) */
10259 || status
10260
10261 /* Did the vfork/compiler bug occur? */
10262 || parent != getpid()
10263
10264 /* Did the file descriptor bug occur? */
10265 || fstat(fileno(stdout), &st) != 0
10266 );
10267 }
10268}
ba479fd2
NN
10269_ACEOF
10270rm -f conftest$ac_exeext
10271if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10272 (eval $ac_link) 2>&5
10273 ac_status=$?
10274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10275 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10277 (eval $ac_try) 2>&5
10278 ac_status=$?
10279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10280 (exit $ac_status); }; }; then
c375c43b
KG
10281 ac_cv_func_vfork_works=yes
10282else
ba479fd2
NN
10283 echo "$as_me: program exited with status $ac_status" >&5
10284echo "$as_me: failed program was:" >&5
10285sed 's/^/| /' conftest.$ac_ext >&5
10286
10287( exit $ac_status )
10288ac_cv_func_vfork_works=no
cafe096b 10289fi
86da66b5 10290rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10291fi
ba479fd2
NN
10292fi
10293echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10294echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 10295
ba479fd2
NN
10296fi;
10297if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 10298 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10299 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10300echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
10301fi
10302
ba479fd2
NN
10303if test "x$ac_cv_func_vfork_works" = xyes; then
10304
10305cat >>confdefs.h <<\_ACEOF
10306#define HAVE_WORKING_VFORK 1
10307_ACEOF
10308
10309else
10310
10311cat >>confdefs.h <<\_ACEOF
c375c43b 10312#define vfork fork
ba479fd2 10313_ACEOF
c375c43b
KG
10314
10315fi
ba479fd2
NN
10316if test "x$ac_cv_func_fork_works" = xyes; then
10317
10318cat >>confdefs.h <<\_ACEOF
10319#define HAVE_WORKING_FORK 1
10320_ACEOF
10321
10322fi
10323
c375c43b 10324
81bf3d9e 10325
dfb77e37
KC
10326 if test "X$prefix" = "XNONE"; then
10327 acl_final_prefix="$ac_default_prefix"
10328 else
10329 acl_final_prefix="$prefix"
10330 fi
10331 if test "X$exec_prefix" = "XNONE"; then
10332 acl_final_exec_prefix='${prefix}'
10333 else
10334 acl_final_exec_prefix="$exec_prefix"
10335 fi
10336 acl_save_prefix="$prefix"
10337 prefix="$acl_final_prefix"
10338 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10339 prefix="$acl_save_prefix"
f91abfce
TT
10340
10341
dfb77e37
KC
10342# Check whether --with-gnu-ld or --without-gnu-ld was given.
10343if test "${with_gnu_ld+set}" = set; then
10344 withval="$with_gnu_ld"
10345 test "$withval" = no || with_gnu_ld=yes
ba479fd2 10346else
dfb77e37
KC
10347 with_gnu_ld=no
10348fi;
10349# Prepare PATH_SEPARATOR.
10350# The user is always right.
10351if test "${PATH_SEPARATOR+set}" != set; then
10352 echo "#! /bin/sh" >conf$$.sh
10353 echo "exit 0" >>conf$$.sh
10354 chmod +x conf$$.sh
10355 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10356 PATH_SEPARATOR=';'
ba479fd2 10357 else
dfb77e37 10358 PATH_SEPARATOR=:
ba479fd2 10359 fi
dfb77e37
KC
10360 rm -f conf$$.sh
10361fi
10362ac_prog=ld
10363if test "$GCC" = yes; then
10364 # Check if gcc -print-prog-name=ld gives a path.
10365 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10366echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10367 case $host in
10368 *-*-mingw*)
10369 # gcc leaves a trailing carriage return which upsets mingw
10370 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10371 *)
10372 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10373 esac
10374 case $ac_prog in
10375 # Accept absolute paths.
10376 [\\/]* | [A-Za-z]:[\\/]*)
10377 re_direlt='/[^/][^/]*/\.\./'
10378 # Canonicalize the path of ld
10379 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10380 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10381 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10382 done
10383 test -z "$LD" && LD="$ac_prog"
10384 ;;
10385 "")
10386 # If it fails, then pretend we aren't using GCC.
10387 ac_prog=ld
10388 ;;
10389 *)
10390 # If it is relative, then search for the first ld in PATH.
10391 with_gnu_ld=unknown
10392 ;;
10393 esac
10394elif test "$with_gnu_ld" = yes; then
10395 echo "$as_me:$LINENO: checking for GNU ld" >&5
10396echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 10397else
dfb77e37
KC
10398 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10399echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 10400fi
dfb77e37
KC
10401if test "${acl_cv_path_LD+set}" = set; then
10402 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 10403else
dfb77e37
KC
10404 if test -z "$LD"; then
10405 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10406 for ac_dir in $PATH; do
10407 test -z "$ac_dir" && ac_dir=.
10408 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10409 acl_cv_path_LD="$ac_dir/$ac_prog"
10410 # Check to see if the program is GNU ld. I'd rather use --version,
10411 # but apparently some GNU ld's only accept -v.
10412 # Break only if it was the GNU/non-GNU ld that we prefer.
10413 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10414 test "$with_gnu_ld" != no && break
10415 else
10416 test "$with_gnu_ld" != yes && break
10417 fi
10418 fi
10419 done
10420 IFS="$ac_save_ifs"
10421else
10422 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10423fi
10424fi
ba479fd2 10425
dfb77e37
KC
10426LD="$acl_cv_path_LD"
10427if test -n "$LD"; then
10428 echo "$as_me:$LINENO: result: $LD" >&5
10429echo "${ECHO_T}$LD" >&6
10430else
10431 echo "$as_me:$LINENO: result: no" >&5
10432echo "${ECHO_T}no" >&6
ba479fd2 10433fi
dfb77e37
KC
10434test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10435echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10436 { (exit 1); exit 1; }; }
10437echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10438echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10439if test "${acl_cv_prog_gnu_ld+set}" = set; then
10440 echo $ECHO_N "(cached) $ECHO_C" >&6
10441else
10442 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10443if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10444 acl_cv_prog_gnu_ld=yes
10445else
10446 acl_cv_prog_gnu_ld=no
6e3f3080 10447fi
dfb77e37
KC
10448fi
10449echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10450echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10451with_gnu_ld=$acl_cv_prog_gnu_ld
10452
10453
10454
10455 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10456echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10457if test "${acl_cv_rpath+set}" = set; then
10458 echo $ECHO_N "(cached) $ECHO_C" >&6
10459else
10460
10461 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10462 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10463 . ./conftest.sh
10464 rm -f ./conftest.sh
10465 acl_cv_rpath=done
ba479fd2 10466
eb158727 10467fi
dfb77e37
KC
10468echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10469echo "${ECHO_T}$acl_cv_rpath" >&6
10470 wl="$acl_cv_wl"
10471 libext="$acl_cv_libext"
10472 shlibext="$acl_cv_shlibext"
10473 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10474 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10475 hardcode_direct="$acl_cv_hardcode_direct"
10476 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10477 # Check whether --enable-rpath or --disable-rpath was given.
10478if test "${enable_rpath+set}" = set; then
10479 enableval="$enable_rpath"
10480 :
10481else
10482 enable_rpath=yes
10483fi;
10484
10485
10486
10487
10488
10489
10490
10491 use_additional=yes
10492
10493 acl_save_prefix="$prefix"
10494 prefix="$acl_final_prefix"
10495 acl_save_exec_prefix="$exec_prefix"
10496 exec_prefix="$acl_final_exec_prefix"
10497
10498 eval additional_includedir=\"$includedir\"
10499 eval additional_libdir=\"$libdir\"
10500
10501 exec_prefix="$acl_save_exec_prefix"
10502 prefix="$acl_save_prefix"
10503
10504
10505# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10506if test "${with_libiconv_prefix+set}" = set; then
10507 withval="$with_libiconv_prefix"
10508
10509 if test "X$withval" = "Xno"; then
10510 use_additional=no
10511 else
10512 if test "X$withval" = "X"; then
10513
10514 acl_save_prefix="$prefix"
10515 prefix="$acl_final_prefix"
10516 acl_save_exec_prefix="$exec_prefix"
10517 exec_prefix="$acl_final_exec_prefix"
10518
10519 eval additional_includedir=\"$includedir\"
10520 eval additional_libdir=\"$libdir\"
10521
10522 exec_prefix="$acl_save_exec_prefix"
10523 prefix="$acl_save_prefix"
10524
10525 else
10526 additional_includedir="$withval/include"
10527 additional_libdir="$withval/lib"
10528 fi
10529 fi
10530
10531fi;
10532 LIBICONV=
10533 LTLIBICONV=
10534 INCICONV=
10535 rpathdirs=
10536 ltrpathdirs=
10537 names_already_handled=
10538 names_next_round='iconv '
10539 while test -n "$names_next_round"; do
10540 names_this_round="$names_next_round"
10541 names_next_round=
10542 for name in $names_this_round; do
10543 already_handled=
10544 for n in $names_already_handled; do
10545 if test "$n" = "$name"; then
10546 already_handled=yes
10547 break
10548 fi
10549 done
10550 if test -z "$already_handled"; then
10551 names_already_handled="$names_already_handled $name"
10552 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10553 eval value=\"\$HAVE_LIB$uppername\"
10554 if test -n "$value"; then
10555 if test "$value" = yes; then
10556 eval value=\"\$LIB$uppername\"
10557 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10558 eval value=\"\$LTLIB$uppername\"
10559 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10560 else
10561 :
10562 fi
10563 else
10564 found_dir=
10565 found_la=
10566 found_so=
10567 found_a=
10568 if test $use_additional = yes; then
10569 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10570 found_dir="$additional_libdir"
10571 found_so="$additional_libdir/lib$name.$shlibext"
10572 if test -f "$additional_libdir/lib$name.la"; then
10573 found_la="$additional_libdir/lib$name.la"
10574 fi
10575 else
10576 if test -f "$additional_libdir/lib$name.$libext"; then
10577 found_dir="$additional_libdir"
10578 found_a="$additional_libdir/lib$name.$libext"
10579 if test -f "$additional_libdir/lib$name.la"; then
10580 found_la="$additional_libdir/lib$name.la"
10581 fi
10582 fi
10583 fi
10584 fi
10585 if test "X$found_dir" = "X"; then
10586 for x in $LDFLAGS $LTLIBICONV; do
10587
10588 acl_save_prefix="$prefix"
10589 prefix="$acl_final_prefix"
10590 acl_save_exec_prefix="$exec_prefix"
10591 exec_prefix="$acl_final_exec_prefix"
10592 eval x=\"$x\"
10593 exec_prefix="$acl_save_exec_prefix"
10594 prefix="$acl_save_prefix"
10595
10596 case "$x" in
10597 -L*)
10598 dir=`echo "X$x" | sed -e 's/^X-L//'`
10599 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10600 found_dir="$dir"
10601 found_so="$dir/lib$name.$shlibext"
10602 if test -f "$dir/lib$name.la"; then
10603 found_la="$dir/lib$name.la"
10604 fi
10605 else
10606 if test -f "$dir/lib$name.$libext"; then
10607 found_dir="$dir"
10608 found_a="$dir/lib$name.$libext"
10609 if test -f "$dir/lib$name.la"; then
10610 found_la="$dir/lib$name.la"
10611 fi
10612 fi
10613 fi
10614 ;;
10615 esac
10616 if test "X$found_dir" != "X"; then
10617 break
10618 fi
10619 done
10620 fi
10621 if test "X$found_dir" != "X"; then
10622 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10623 if test "X$found_so" != "X"; then
10624 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10625 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10626 else
10627 haveit=
10628 for x in $ltrpathdirs; do
10629 if test "X$x" = "X$found_dir"; then
10630 haveit=yes
10631 break
10632 fi
10633 done
10634 if test -z "$haveit"; then
10635 ltrpathdirs="$ltrpathdirs $found_dir"
10636 fi
10637 if test "$hardcode_direct" = yes; then
10638 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10639 else
10640 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10641 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10642 haveit=
10643 for x in $rpathdirs; do
10644 if test "X$x" = "X$found_dir"; then
10645 haveit=yes
10646 break
10647 fi
10648 done
10649 if test -z "$haveit"; then
10650 rpathdirs="$rpathdirs $found_dir"
10651 fi
10652 else
10653 haveit=
10654 for x in $LDFLAGS $LIBICONV; do
10655
10656 acl_save_prefix="$prefix"
10657 prefix="$acl_final_prefix"
10658 acl_save_exec_prefix="$exec_prefix"
10659 exec_prefix="$acl_final_exec_prefix"
10660 eval x=\"$x\"
10661 exec_prefix="$acl_save_exec_prefix"
10662 prefix="$acl_save_prefix"
10663
10664 if test "X$x" = "X-L$found_dir"; then
10665 haveit=yes
10666 break
10667 fi
10668 done
10669 if test -z "$haveit"; then
10670 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10671 fi
10672 if test "$hardcode_minus_L" != no; then
10673 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10674 else
10675 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10676 fi
10677 fi
10678 fi
10679 fi
10680 else
10681 if test "X$found_a" != "X"; then
10682 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10683 else
10684 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10685 fi
10686 fi
10687 additional_includedir=
10688 case "$found_dir" in
10689 */lib | */lib/)
10690 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10691 additional_includedir="$basedir/include"
10692 ;;
10693 esac
10694 if test "X$additional_includedir" != "X"; then
10695 if test "X$additional_includedir" != "X/usr/include"; then
10696 haveit=
10697 if test "X$additional_includedir" = "X/usr/local/include"; then
10698 if test -n "$GCC"; then
10699 case $host_os in
10700 linux*) haveit=yes;;
10701 esac
10702 fi
10703 fi
10704 if test -z "$haveit"; then
10705 for x in $CPPFLAGS $INCICONV; do
10706
10707 acl_save_prefix="$prefix"
10708 prefix="$acl_final_prefix"
10709 acl_save_exec_prefix="$exec_prefix"
10710 exec_prefix="$acl_final_exec_prefix"
10711 eval x=\"$x\"
10712 exec_prefix="$acl_save_exec_prefix"
10713 prefix="$acl_save_prefix"
10714
10715 if test "X$x" = "X-I$additional_includedir"; then
10716 haveit=yes
10717 break
10718 fi
10719 done
10720 if test -z "$haveit"; then
10721 if test -d "$additional_includedir"; then
10722 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10723 fi
10724 fi
10725 fi
10726 fi
10727 fi
10728 if test -n "$found_la"; then
10729 save_libdir="$libdir"
10730 case "$found_la" in
10731 */* | *\\*) . "$found_la" ;;
10732 *) . "./$found_la" ;;
10733 esac
10734 libdir="$save_libdir"
10735 for dep in $dependency_libs; do
10736 case "$dep" in
10737 -L*)
10738 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10739 if test "X$additional_libdir" != "X/usr/lib"; then
10740 haveit=
10741 if test "X$additional_libdir" = "X/usr/local/lib"; then
10742 if test -n "$GCC"; then
10743 case $host_os in
10744 linux*) haveit=yes;;
10745 esac
10746 fi
10747 fi
10748 if test -z "$haveit"; then
10749 haveit=
10750 for x in $LDFLAGS $LIBICONV; do
10751
10752 acl_save_prefix="$prefix"
10753 prefix="$acl_final_prefix"
10754 acl_save_exec_prefix="$exec_prefix"
10755 exec_prefix="$acl_final_exec_prefix"
10756 eval x=\"$x\"
10757 exec_prefix="$acl_save_exec_prefix"
10758 prefix="$acl_save_prefix"
10759
10760 if test "X$x" = "X-L$additional_libdir"; then
10761 haveit=yes
10762 break
10763 fi
10764 done
10765 if test -z "$haveit"; then
10766 if test -d "$additional_libdir"; then
10767 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10768 fi
10769 fi
10770 haveit=
10771 for x in $LDFLAGS $LTLIBICONV; do
10772
10773 acl_save_prefix="$prefix"
10774 prefix="$acl_final_prefix"
10775 acl_save_exec_prefix="$exec_prefix"
10776 exec_prefix="$acl_final_exec_prefix"
10777 eval x=\"$x\"
10778 exec_prefix="$acl_save_exec_prefix"
10779 prefix="$acl_save_prefix"
10780
10781 if test "X$x" = "X-L$additional_libdir"; then
10782 haveit=yes
10783 break
10784 fi
10785 done
10786 if test -z "$haveit"; then
10787 if test -d "$additional_libdir"; then
10788 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10789 fi
10790 fi
10791 fi
10792 fi
10793 ;;
10794 -R*)
10795 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10796 if test "$enable_rpath" != no; then
10797 haveit=
10798 for x in $rpathdirs; do
10799 if test "X$x" = "X$dir"; then
10800 haveit=yes
10801 break
10802 fi
10803 done
10804 if test -z "$haveit"; then
10805 rpathdirs="$rpathdirs $dir"
10806 fi
10807 haveit=
10808 for x in $ltrpathdirs; do
10809 if test "X$x" = "X$dir"; then
10810 haveit=yes
10811 break
10812 fi
10813 done
10814 if test -z "$haveit"; then
10815 ltrpathdirs="$ltrpathdirs $dir"
10816 fi
10817 fi
10818 ;;
10819 -l*)
10820 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10821 ;;
10822 *.la)
10823 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10824 ;;
10825 *)
10826 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10827 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10828 ;;
10829 esac
10830 done
10831 fi
10832 else
10833 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10834 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10835 fi
10836 fi
10837 fi
10838 done
10839 done
10840 if test "X$rpathdirs" != "X"; then
10841 if test -n "$hardcode_libdir_separator"; then
10842 alldirs=
10843 for found_dir in $rpathdirs; do
10844 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10845 done
10846 acl_save_libdir="$libdir"
10847 libdir="$alldirs"
10848 eval flag=\"$hardcode_libdir_flag_spec\"
10849 libdir="$acl_save_libdir"
10850 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10851 else
10852 for found_dir in $rpathdirs; do
10853 acl_save_libdir="$libdir"
10854 libdir="$found_dir"
10855 eval flag=\"$hardcode_libdir_flag_spec\"
10856 libdir="$acl_save_libdir"
10857 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10858 done
10859 fi
10860 fi
10861 if test "X$ltrpathdirs" != "X"; then
10862 for found_dir in $ltrpathdirs; do
10863 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10864 done
10865 fi
10866
10867
10868
10869
10870
10871
10872
10873 am_save_CPPFLAGS="$CPPFLAGS"
10874
10875 for element in $INCICONV; do
10876 haveit=
10877 for x in $CPPFLAGS; do
10878
10879 acl_save_prefix="$prefix"
10880 prefix="$acl_final_prefix"
10881 acl_save_exec_prefix="$exec_prefix"
10882 exec_prefix="$acl_final_exec_prefix"
10883 eval x=\"$x\"
10884 exec_prefix="$acl_save_exec_prefix"
10885 prefix="$acl_save_prefix"
10886
10887 if test "X$x" = "X$element"; then
10888 haveit=yes
10889 break
10890 fi
10891 done
10892 if test -z "$haveit"; then
10893 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10894 fi
10895 done
eb158727
ZW
10896
10897
ba479fd2
NN
10898 echo "$as_me:$LINENO: checking for iconv" >&5
10899echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10900if test "${am_cv_func_iconv+set}" = set; then
10901 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10902else
ba479fd2 10903
f91abfce
TT
10904 am_cv_func_iconv="no, consider installing GNU libiconv"
10905 am_cv_lib_iconv=no
ba479fd2 10906 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10907/* confdefs.h. */
10908_ACEOF
10909cat confdefs.h >>conftest.$ac_ext
10910cat >>conftest.$ac_ext <<_ACEOF
10911/* end confdefs.h. */
f91abfce
TT
10912#include <stdlib.h>
10913#include <iconv.h>
ba479fd2
NN
10914int
10915main ()
10916{
f91abfce
TT
10917iconv_t cd = iconv_open("","");
10918 iconv(cd,NULL,NULL,NULL,NULL);
10919 iconv_close(cd);
ba479fd2
NN
10920 ;
10921 return 0;
10922}
10923_ACEOF
10924rm -f conftest.$ac_objext conftest$ac_exeext
10925if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10926 (eval $ac_link) 2>conftest.er1
ba479fd2 10927 ac_status=$?
86da66b5
HPN
10928 grep -v '^ *+' conftest.er1 >conftest.err
10929 rm -f conftest.er1
10930 cat conftest.err >&5
ba479fd2
NN
10931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10932 (exit $ac_status); } &&
d7974fe6
KC
10933 { ac_try='test -z "$ac_c_werror_flag"
10934 || test ! -s conftest.err'
86da66b5
HPN
10935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10936 (eval $ac_try) 2>&5
10937 ac_status=$?
10938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10939 (exit $ac_status); }; } &&
10940 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10942 (eval $ac_try) 2>&5
10943 ac_status=$?
10944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10945 (exit $ac_status); }; }; then
f91abfce
TT
10946 am_cv_func_iconv=yes
10947else
ba479fd2
NN
10948 echo "$as_me: failed program was:" >&5
10949sed 's/^/| /' conftest.$ac_ext >&5
10950
f91abfce 10951fi
86da66b5
HPN
10952rm -f conftest.err conftest.$ac_objext \
10953 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
10954 if test "$am_cv_func_iconv" != yes; then
10955 am_save_LIBS="$LIBS"
dfb77e37 10956 LIBS="$LIBS $LIBICONV"
ba479fd2 10957 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10958/* confdefs.h. */
10959_ACEOF
10960cat confdefs.h >>conftest.$ac_ext
10961cat >>conftest.$ac_ext <<_ACEOF
10962/* end confdefs.h. */
f91abfce
TT
10963#include <stdlib.h>
10964#include <iconv.h>
ba479fd2
NN
10965int
10966main ()
10967{
f91abfce
TT
10968iconv_t cd = iconv_open("","");
10969 iconv(cd,NULL,NULL,NULL,NULL);
10970 iconv_close(cd);
ba479fd2
NN
10971 ;
10972 return 0;
10973}
10974_ACEOF
10975rm -f conftest.$ac_objext conftest$ac_exeext
10976if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10977 (eval $ac_link) 2>conftest.er1
ba479fd2 10978 ac_status=$?
86da66b5
HPN
10979 grep -v '^ *+' conftest.er1 >conftest.err
10980 rm -f conftest.er1
10981 cat conftest.err >&5
ba479fd2
NN
10982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10983 (exit $ac_status); } &&
d7974fe6
KC
10984 { ac_try='test -z "$ac_c_werror_flag"
10985 || test ! -s conftest.err'
86da66b5
HPN
10986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10987 (eval $ac_try) 2>&5
10988 ac_status=$?
10989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10990 (exit $ac_status); }; } &&
10991 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10993 (eval $ac_try) 2>&5
10994 ac_status=$?
10995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10996 (exit $ac_status); }; }; then
f91abfce
TT
10997 am_cv_lib_iconv=yes
10998 am_cv_func_iconv=yes
10999else
ba479fd2
NN
11000 echo "$as_me: failed program was:" >&5
11001sed 's/^/| /' conftest.$ac_ext >&5
11002
f91abfce 11003fi
86da66b5
HPN
11004rm -f conftest.err conftest.$ac_objext \
11005 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11006 LIBS="$am_save_LIBS"
11007 fi
6e3f3080 11008
ba479fd2
NN
11009fi
11010echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
11011echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 11012 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11013
11014cat >>confdefs.h <<\_ACEOF
f91abfce 11015#define HAVE_ICONV 1
ba479fd2 11016_ACEOF
f91abfce 11017
dfb77e37
KC
11018 fi
11019 if test "$am_cv_lib_iconv" = yes; then
11020 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
11021echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
11022 echo "$as_me:$LINENO: result: $LIBICONV" >&5
11023echo "${ECHO_T}$LIBICONV" >&6
11024 else
11025 CPPFLAGS="$am_save_CPPFLAGS"
11026 LIBICONV=
11027 LTLIBICONV=
11028 fi
11029
11030
11031
11032 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11033 echo "$as_me:$LINENO: checking for iconv declaration" >&5
11034echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
11035 if test "${am_cv_proto_iconv+set}" = set; then
11036 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11037else
ba479fd2
NN
11038
11039 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11040/* confdefs.h. */
11041_ACEOF
11042cat confdefs.h >>conftest.$ac_ext
11043cat >>conftest.$ac_ext <<_ACEOF
11044/* end confdefs.h. */
f91abfce
TT
11045
11046#include <stdlib.h>
11047#include <iconv.h>
11048extern
11049#ifdef __cplusplus
11050"C"
11051#endif
11052#if defined(__STDC__) || defined(__cplusplus)
11053size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11054#else
11055size_t iconv();
11056#endif
11057
ba479fd2
NN
11058int
11059main ()
11060{
f91abfce 11061
ba479fd2
NN
11062 ;
11063 return 0;
11064}
11065_ACEOF
11066rm -f conftest.$ac_objext
11067if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11068 (eval $ac_compile) 2>conftest.er1
ba479fd2 11069 ac_status=$?
86da66b5
HPN
11070 grep -v '^ *+' conftest.er1 >conftest.err
11071 rm -f conftest.er1
11072 cat conftest.err >&5
ba479fd2
NN
11073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11074 (exit $ac_status); } &&
d7974fe6
KC
11075 { ac_try='test -z "$ac_c_werror_flag"
11076 || test ! -s conftest.err'
86da66b5
HPN
11077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11078 (eval $ac_try) 2>&5
11079 ac_status=$?
11080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11081 (exit $ac_status); }; } &&
11082 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11084 (eval $ac_try) 2>&5
11085 ac_status=$?
11086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11087 (exit $ac_status); }; }; then
f91abfce
TT
11088 am_cv_proto_iconv_arg1=""
11089else
ba479fd2
NN
11090 echo "$as_me: failed program was:" >&5
11091sed 's/^/| /' conftest.$ac_ext >&5
11092
11093am_cv_proto_iconv_arg1="const"
f91abfce 11094fi
86da66b5 11095rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
11096 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);"
11097fi
11098
11099 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
11100 echo "$as_me:$LINENO: result: ${ac_t:-
11101 }$am_cv_proto_iconv" >&5
11102echo "${ECHO_T}${ac_t:-
11103 }$am_cv_proto_iconv" >&6
11104
11105cat >>confdefs.h <<_ACEOF
f91abfce 11106#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 11107_ACEOF
f91abfce
TT
11108
11109 fi
f91abfce 11110
56694dd9
ZW
11111# Until we have in-tree GNU iconv:
11112LIBICONV_DEP=
11113
11114
11115
ba479fd2
NN
11116 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11117echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
11118if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11119 echo $ECHO_N "(cached) $ECHO_C" >&6
56694dd9 11120else
ba479fd2 11121 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11122/* confdefs.h. */
11123_ACEOF
11124cat confdefs.h >>conftest.$ac_ext
11125cat >>conftest.$ac_ext <<_ACEOF
11126/* end confdefs.h. */
56694dd9 11127#include <locale.h>
ba479fd2
NN
11128int
11129main ()
11130{
56694dd9 11131return LC_MESSAGES
ba479fd2
NN
11132 ;
11133 return 0;
11134}
11135_ACEOF
11136rm -f conftest.$ac_objext conftest$ac_exeext
11137if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 11138 (eval $ac_link) 2>conftest.er1
ba479fd2 11139 ac_status=$?
86da66b5
HPN
11140 grep -v '^ *+' conftest.er1 >conftest.err
11141 rm -f conftest.er1
11142 cat conftest.err >&5
ba479fd2
NN
11143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11144 (exit $ac_status); } &&
d7974fe6
KC
11145 { ac_try='test -z "$ac_c_werror_flag"
11146 || test ! -s conftest.err'
86da66b5
HPN
11147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11148 (eval $ac_try) 2>&5
11149 ac_status=$?
11150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11151 (exit $ac_status); }; } &&
11152 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
11153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11154 (eval $ac_try) 2>&5
11155 ac_status=$?
11156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11157 (exit $ac_status); }; }; then
56694dd9
ZW
11158 am_cv_val_LC_MESSAGES=yes
11159else
ba479fd2
NN
11160 echo "$as_me: failed program was:" >&5
11161sed 's/^/| /' conftest.$ac_ext >&5
11162
11163am_cv_val_LC_MESSAGES=no
56694dd9 11164fi
86da66b5
HPN
11165rm -f conftest.err conftest.$ac_objext \
11166 conftest$ac_exeext conftest.$ac_ext
56694dd9 11167fi
ba479fd2
NN
11168echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11169echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
63cf211a 11170 if test $am_cv_val_LC_MESSAGES = yes; then
ba479fd2
NN
11171
11172cat >>confdefs.h <<\_ACEOF
56694dd9 11173#define HAVE_LC_MESSAGES 1
ba479fd2 11174_ACEOF
56694dd9
ZW
11175
11176 fi
11177
f91abfce 11178
a03ea89b
BM
11179
11180 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11181echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11182if test "${am_cv_langinfo_codeset+set}" = set; then
11183 echo $ECHO_N "(cached) $ECHO_C" >&6
11184else
11185 cat >conftest.$ac_ext <<_ACEOF
11186/* confdefs.h. */
11187_ACEOF
11188cat confdefs.h >>conftest.$ac_ext
11189cat >>conftest.$ac_ext <<_ACEOF
11190/* end confdefs.h. */
11191#include <langinfo.h>
11192int
11193main ()
11194{
11195char* cs = nl_langinfo(CODESET);
11196 ;
11197 return 0;
11198}
11199_ACEOF
11200rm -f conftest.$ac_objext conftest$ac_exeext
11201if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11202 (eval $ac_link) 2>conftest.er1
11203 ac_status=$?
11204 grep -v '^ *+' conftest.er1 >conftest.err
11205 rm -f conftest.er1
11206 cat conftest.err >&5
11207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11208 (exit $ac_status); } &&
d7974fe6
KC
11209 { ac_try='test -z "$ac_c_werror_flag"
11210 || test ! -s conftest.err'
a03ea89b
BM
11211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11212 (eval $ac_try) 2>&5
11213 ac_status=$?
11214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11215 (exit $ac_status); }; } &&
11216 { ac_try='test -s conftest$ac_exeext'
11217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11218 (eval $ac_try) 2>&5
11219 ac_status=$?
11220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11221 (exit $ac_status); }; }; then
11222 am_cv_langinfo_codeset=yes
11223else
11224 echo "$as_me: failed program was:" >&5
11225sed 's/^/| /' conftest.$ac_ext >&5
11226
11227am_cv_langinfo_codeset=no
11228fi
11229rm -f conftest.err conftest.$ac_objext \
11230 conftest$ac_exeext conftest.$ac_ext
11231
11232fi
11233echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11234echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11235 if test $am_cv_langinfo_codeset = yes; then
11236
11237cat >>confdefs.h <<\_ACEOF
11238#define HAVE_LANGINFO_CODESET 1
11239_ACEOF
11240
11241 fi
11242
11243
86cf1cbd
KG
11244# We will need to find libiberty.h and ansidecl.h
11245saved_CFLAGS="$CFLAGS"
11246CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
6a257778 11268
ad6717df
PB
11269
11270
0d667716
KG
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
367e8319 11281
0d667716
KG
11282
11283
7391b66c 11284
ed5b9f96
GK
11285
11286for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
11287 strsignal strstr strverscmp \
11288 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 11289 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 11290do
ad6717df 11291 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11292echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11293echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11294if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11295 echo $ECHO_N "(cached) $ECHO_C" >&6
11296else
11297 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11298/* confdefs.h. */
11299_ACEOF
11300cat confdefs.h >>conftest.$ac_ext
11301cat >>conftest.$ac_ext <<_ACEOF
11302/* end confdefs.h. */
7afe8c41
KG
11303#undef $ac_tr_decl
11304#define $ac_tr_decl 1
ba479fd2 11305
d02af173 11306#include "ansidecl.h"
86cf1cbd 11307#include "system.h"
f31e826b 11308
ba479fd2
NN
11309int
11310main ()
11311{
86cf1cbd
KG
11312#ifndef $ac_func
11313char *(*pfn) = (char *(*)) $ac_func ;
11314#endif
ba479fd2
NN
11315 ;
11316 return 0;
11317}
11318_ACEOF
11319rm -f conftest.$ac_objext
11320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11321 (eval $ac_compile) 2>conftest.er1
ba479fd2 11322 ac_status=$?
86da66b5
HPN
11323 grep -v '^ *+' conftest.er1 >conftest.err
11324 rm -f conftest.er1
11325 cat conftest.err >&5
ba479fd2
NN
11326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11327 (exit $ac_status); } &&
d7974fe6
KC
11328 { ac_try='test -z "$ac_c_werror_flag"
11329 || test ! -s conftest.err'
86da66b5
HPN
11330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11331 (eval $ac_try) 2>&5
11332 ac_status=$?
11333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11334 (exit $ac_status); }; } &&
11335 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11337 (eval $ac_try) 2>&5
11338 ac_status=$?
11339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11340 (exit $ac_status); }; }; then
f31e826b 11341 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11342else
ba479fd2
NN
11343 echo "$as_me: failed program was:" >&5
11344sed 's/^/| /' conftest.$ac_ext >&5
11345
11346eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11347fi
86da66b5 11348rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11349fi
11350
f31e826b 11351if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11352 echo "$as_me:$LINENO: result: yes" >&5
11353echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11354#define $ac_tr_decl 1
ba479fd2
NN
11355_ACEOF
11356
81bf3d9e 11357else
ba479fd2
NN
11358 echo "$as_me:$LINENO: result: no" >&5
11359echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11360#define $ac_tr_decl 0
ba479fd2
NN
11361_ACEOF
11362
81bf3d9e
RH
11363fi
11364
11365done
ba479fd2 11366
ba479fd2 11367
ba479fd2 11368
81bf3d9e 11369
81bf3d9e
RH
11370
11371for ac_func in getrlimit setrlimit getrusage
11372do
ad6717df 11373 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11374echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11375echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11376if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11377 echo $ECHO_N "(cached) $ECHO_C" >&6
11378else
11379 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11380/* confdefs.h. */
11381_ACEOF
11382cat confdefs.h >>conftest.$ac_ext
11383cat >>conftest.$ac_ext <<_ACEOF
11384/* end confdefs.h. */
7afe8c41
KG
11385#undef $ac_tr_decl
11386#define $ac_tr_decl 1
ba479fd2 11387
d02af173 11388#include "ansidecl.h"
86cf1cbd 11389#include "system.h"
81bf3d9e
RH
11390#ifdef HAVE_SYS_RESOURCE_H
11391#include <sys/resource.h>
11392#endif
11393
f31e826b 11394
ba479fd2
NN
11395int
11396main ()
11397{
86cf1cbd
KG
11398#ifndef $ac_func
11399char *(*pfn) = (char *(*)) $ac_func ;
11400#endif
ba479fd2
NN
11401 ;
11402 return 0;
11403}
11404_ACEOF
11405rm -f conftest.$ac_objext
11406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11407 (eval $ac_compile) 2>conftest.er1
ba479fd2 11408 ac_status=$?
86da66b5
HPN
11409 grep -v '^ *+' conftest.er1 >conftest.err
11410 rm -f conftest.er1
11411 cat conftest.err >&5
ba479fd2
NN
11412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11413 (exit $ac_status); } &&
d7974fe6
KC
11414 { ac_try='test -z "$ac_c_werror_flag"
11415 || test ! -s conftest.err'
86da66b5
HPN
11416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11417 (eval $ac_try) 2>&5
11418 ac_status=$?
11419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11420 (exit $ac_status); }; } &&
11421 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11423 (eval $ac_try) 2>&5
11424 ac_status=$?
11425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11426 (exit $ac_status); }; }; then
f31e826b 11427 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11428else
ba479fd2
NN
11429 echo "$as_me: failed program was:" >&5
11430sed 's/^/| /' conftest.$ac_ext >&5
11431
11432eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11433fi
86da66b5 11434rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11435fi
11436
f31e826b 11437if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11438 echo "$as_me:$LINENO: result: yes" >&5
11439echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11440#define $ac_tr_decl 1
ba479fd2
NN
11441_ACEOF
11442
81bf3d9e 11443else
ba479fd2
NN
11444 echo "$as_me:$LINENO: result: no" >&5
11445echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11446#define $ac_tr_decl 0
ba479fd2
NN
11447_ACEOF
11448
81bf3d9e
RH
11449fi
11450
11451done
86cf1cbd 11452
81bf3d9e 11453
ba479fd2 11454cat >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. */
b2522d2b
HPN
11460
11461#include "ansidecl.h"
11462#include "system.h"
11463#ifdef HAVE_SYS_RESOURCE_H
11464#include <sys/resource.h>
11465#endif
11466
ba479fd2
NN
11467int
11468main ()
11469{
b2522d2b 11470rlim_t l = 0;
ba479fd2
NN
11471 ;
11472 return 0;
11473}
11474_ACEOF
11475rm -f conftest.$ac_objext
11476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11477 (eval $ac_compile) 2>conftest.er1
ba479fd2 11478 ac_status=$?
86da66b5
HPN
11479 grep -v '^ *+' conftest.er1 >conftest.err
11480 rm -f conftest.er1
11481 cat conftest.err >&5
ba479fd2
NN
11482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11483 (exit $ac_status); } &&
d7974fe6
KC
11484 { ac_try='test -z "$ac_c_werror_flag"
11485 || test ! -s conftest.err'
86da66b5
HPN
11486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11487 (eval $ac_try) 2>&5
11488 ac_status=$?
11489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11490 (exit $ac_status); }; } &&
11491 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11493 (eval $ac_try) 2>&5
11494 ac_status=$?
11495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11496 (exit $ac_status); }; }; then
b2522d2b
HPN
11497 :
11498else
ba479fd2
NN
11499 echo "$as_me: failed program was:" >&5
11500sed 's/^/| /' conftest.$ac_ext >&5
11501
11502
11503cat >>confdefs.h <<\_ACEOF
b2522d2b 11504#define rlim_t long
ba479fd2 11505_ACEOF
b2522d2b
HPN
11506
11507fi
86da66b5 11508rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 11509
2102b2fe
RS
11510# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11511# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11512# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11513# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 11514
351df804 11515for ac_func in ldgetname
c1800ec8 11516do
ad6717df 11517 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11518echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11519echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11520if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11521 echo $ECHO_N "(cached) $ECHO_C" >&6
11522else
11523 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11524/* confdefs.h. */
11525_ACEOF
11526cat confdefs.h >>conftest.$ac_ext
11527cat >>conftest.$ac_ext <<_ACEOF
11528/* end confdefs.h. */
c1800ec8
ZW
11529#undef $ac_tr_decl
11530#define $ac_tr_decl 1
ba479fd2 11531
351df804
KG
11532#include "ansidecl.h"
11533#include "system.h"
11534#ifdef HAVE_LDFCN_H
2102b2fe
RS
11535#undef FREAD
11536#undef FWRITE
351df804
KG
11537#include <ldfcn.h>
11538#endif
11539
11540
ba479fd2
NN
11541int
11542main ()
11543{
351df804
KG
11544#ifndef $ac_func
11545char *(*pfn) = (char *(*)) $ac_func ;
11546#endif
ba479fd2
NN
11547 ;
11548 return 0;
11549}
11550_ACEOF
11551rm -f conftest.$ac_objext
11552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11553 (eval $ac_compile) 2>conftest.er1
ba479fd2 11554 ac_status=$?
86da66b5
HPN
11555 grep -v '^ *+' conftest.er1 >conftest.err
11556 rm -f conftest.er1
11557 cat conftest.err >&5
ba479fd2
NN
11558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11559 (exit $ac_status); } &&
d7974fe6
KC
11560 { ac_try='test -z "$ac_c_werror_flag"
11561 || test ! -s conftest.err'
86da66b5
HPN
11562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11563 (eval $ac_try) 2>&5
11564 ac_status=$?
11565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11566 (exit $ac_status); }; } &&
11567 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11569 (eval $ac_try) 2>&5
11570 ac_status=$?
11571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11572 (exit $ac_status); }; }; then
351df804
KG
11573 eval "gcc_cv_have_decl_$ac_func=yes"
11574else
ba479fd2
NN
11575 echo "$as_me: failed program was:" >&5
11576sed 's/^/| /' conftest.$ac_ext >&5
11577
11578eval "gcc_cv_have_decl_$ac_func=no"
351df804 11579fi
86da66b5 11580rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
11581fi
11582
11583if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11584 echo "$as_me:$LINENO: result: yes" >&5
11585echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11586#define $ac_tr_decl 1
ba479fd2
NN
11587_ACEOF
11588
351df804 11589else
ba479fd2
NN
11590 echo "$as_me:$LINENO: result: no" >&5
11591echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11592#define $ac_tr_decl 0
ba479fd2
NN
11593_ACEOF
11594
351df804
KG
11595fi
11596
11597done
ba479fd2 11598
351df804
KG
11599
11600
11601for ac_func in times
11602do
ad6717df 11603 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11604echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11605echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11606if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11607 echo $ECHO_N "(cached) $ECHO_C" >&6
11608else
11609 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11610/* confdefs.h. */
11611_ACEOF
11612cat confdefs.h >>conftest.$ac_ext
11613cat >>conftest.$ac_ext <<_ACEOF
11614/* end confdefs.h. */
351df804
KG
11615#undef $ac_tr_decl
11616#define $ac_tr_decl 1
ba479fd2 11617
c1800ec8
ZW
11618#include "ansidecl.h"
11619#include "system.h"
11620#ifdef HAVE_SYS_TIMES_H
11621#include <sys/times.h>
11622#endif
11623
11624
ba479fd2
NN
11625int
11626main ()
11627{
c1800ec8
ZW
11628#ifndef $ac_func
11629char *(*pfn) = (char *(*)) $ac_func ;
11630#endif
ba479fd2
NN
11631 ;
11632 return 0;
11633}
11634_ACEOF
11635rm -f conftest.$ac_objext
11636if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11637 (eval $ac_compile) 2>conftest.er1
ba479fd2 11638 ac_status=$?
86da66b5
HPN
11639 grep -v '^ *+' conftest.er1 >conftest.err
11640 rm -f conftest.er1
11641 cat conftest.err >&5
ba479fd2
NN
11642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11643 (exit $ac_status); } &&
d7974fe6
KC
11644 { ac_try='test -z "$ac_c_werror_flag"
11645 || test ! -s conftest.err'
86da66b5
HPN
11646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11647 (eval $ac_try) 2>&5
11648 ac_status=$?
11649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11650 (exit $ac_status); }; } &&
11651 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11653 (eval $ac_try) 2>&5
11654 ac_status=$?
11655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11656 (exit $ac_status); }; }; then
c1800ec8
ZW
11657 eval "gcc_cv_have_decl_$ac_func=yes"
11658else
ba479fd2
NN
11659 echo "$as_me: failed program was:" >&5
11660sed 's/^/| /' conftest.$ac_ext >&5
11661
11662eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 11663fi
86da66b5 11664rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
11665fi
11666
11667if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11668 echo "$as_me:$LINENO: result: yes" >&5
11669echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11670#define $ac_tr_decl 1
ba479fd2
NN
11671_ACEOF
11672
c1800ec8 11673else
ba479fd2
NN
11674 echo "$as_me:$LINENO: result: no" >&5
11675echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11676#define $ac_tr_decl 0
ba479fd2
NN
11677_ACEOF
11678
c1800ec8
ZW
11679fi
11680
11681done
c1800ec8
ZW
11682
11683
11684# More time-related stuff.
ba479fd2
NN
11685echo "$as_me:$LINENO: checking for struct tms" >&5
11686echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
11687if test "${ac_cv_struct_tms+set}" = set; then
11688 echo $ECHO_N "(cached) $ECHO_C" >&6
11689else
11690
11691cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11692/* confdefs.h. */
11693_ACEOF
11694cat confdefs.h >>conftest.$ac_ext
11695cat >>conftest.$ac_ext <<_ACEOF
11696/* end confdefs.h. */
c1800ec8
ZW
11697
11698#include "ansidecl.h"
11699#include "system.h"
11700#ifdef HAVE_SYS_TIMES_H
11701#include <sys/times.h>
11702#endif
11703
ba479fd2
NN
11704int
11705main ()
11706{
c1800ec8 11707struct tms tms;
ba479fd2
NN
11708 ;
11709 return 0;
11710}
11711_ACEOF
11712rm -f conftest.$ac_objext
11713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11714 (eval $ac_compile) 2>conftest.er1
ba479fd2 11715 ac_status=$?
86da66b5
HPN
11716 grep -v '^ *+' conftest.er1 >conftest.err
11717 rm -f conftest.er1
11718 cat conftest.err >&5
ba479fd2
NN
11719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11720 (exit $ac_status); } &&
d7974fe6
KC
11721 { ac_try='test -z "$ac_c_werror_flag"
11722 || test ! -s conftest.err'
86da66b5
HPN
11723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11724 (eval $ac_try) 2>&5
11725 ac_status=$?
11726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11727 (exit $ac_status); }; } &&
11728 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11730 (eval $ac_try) 2>&5
11731 ac_status=$?
11732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11733 (exit $ac_status); }; }; then
c1800ec8
ZW
11734 ac_cv_struct_tms=yes
11735else
ba479fd2
NN
11736 echo "$as_me: failed program was:" >&5
11737sed 's/^/| /' conftest.$ac_ext >&5
11738
11739ac_cv_struct_tms=no
c1800ec8 11740fi
86da66b5 11741rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11742fi
ba479fd2
NN
11743echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11744echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 11745if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
11746
11747cat >>confdefs.h <<\_ACEOF
c1800ec8 11748#define HAVE_STRUCT_TMS 1
ba479fd2 11749_ACEOF
c1800ec8
ZW
11750
11751fi
11752
11753# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11754# revisit after autoconf 2.50.
ba479fd2
NN
11755echo "$as_me:$LINENO: checking for clock_t" >&5
11756echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
11757if test "${gcc_cv_type_clock_t+set}" = set; then
11758 echo $ECHO_N "(cached) $ECHO_C" >&6
11759else
11760
11761cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11762/* confdefs.h. */
11763_ACEOF
11764cat confdefs.h >>conftest.$ac_ext
11765cat >>conftest.$ac_ext <<_ACEOF
11766/* end confdefs.h. */
c1800ec8
ZW
11767
11768#include "ansidecl.h"
11769#include "system.h"
11770
ba479fd2
NN
11771int
11772main ()
11773{
c1800ec8 11774clock_t x;
ba479fd2
NN
11775 ;
11776 return 0;
11777}
11778_ACEOF
11779rm -f conftest.$ac_objext
11780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11781 (eval $ac_compile) 2>conftest.er1
ba479fd2 11782 ac_status=$?
86da66b5
HPN
11783 grep -v '^ *+' conftest.er1 >conftest.err
11784 rm -f conftest.er1
11785 cat conftest.err >&5
ba479fd2
NN
11786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11787 (exit $ac_status); } &&
d7974fe6
KC
11788 { ac_try='test -z "$ac_c_werror_flag"
11789 || test ! -s conftest.err'
86da66b5
HPN
11790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11791 (eval $ac_try) 2>&5
11792 ac_status=$?
11793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11794 (exit $ac_status); }; } &&
11795 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11797 (eval $ac_try) 2>&5
11798 ac_status=$?
11799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11800 (exit $ac_status); }; }; then
c1800ec8
ZW
11801 gcc_cv_type_clock_t=yes
11802else
ba479fd2
NN
11803 echo "$as_me: failed program was:" >&5
11804sed 's/^/| /' conftest.$ac_ext >&5
11805
11806gcc_cv_type_clock_t=no
c1800ec8 11807fi
86da66b5 11808rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11809fi
ba479fd2
NN
11810echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
11811echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 11812if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
11813
11814cat >>confdefs.h <<\_ACEOF
c1800ec8 11815#define HAVE_CLOCK_T 1
ba479fd2 11816_ACEOF
c1800ec8
ZW
11817
11818fi
11819
eb70d86d
AS
11820# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
11821CFLAGS="$saved_CFLAGS"
11822
07cf4226
DM
11823# Check whether --enable-initfini-array or --disable-initfini-array was given.
11824if test "${enable_initfini_array+set}" = set; then
11825 enableval="$enable_initfini_array"
ba479fd2 11826
07cf4226 11827else
ba479fd2
NN
11828
11829echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
11830echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
11831if test "${gcc_cv_initfini_array+set}" = set; then
11832 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 11833else
eb70d86d 11834 if test "$cross_compiling" = yes; then
918c4fe4 11835 gcc_cv_initfini_array=no
eb70d86d 11836else
ba479fd2 11837 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11838/* confdefs.h. */
11839_ACEOF
11840cat confdefs.h >>conftest.$ac_ext
11841cat >>conftest.$ac_ext <<_ACEOF
11842/* end confdefs.h. */
eb70d86d 11843
07cf4226
DM
11844static int x = -1;
11845int main (void) { return x; }
11846int foo (void) { x = 0; }
11847int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
11848_ACEOF
11849rm -f conftest$ac_exeext
11850if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11851 (eval $ac_link) 2>&5
11852 ac_status=$?
11853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11854 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11856 (eval $ac_try) 2>&5
11857 ac_status=$?
11858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11859 (exit $ac_status); }; }; then
918c4fe4 11860 gcc_cv_initfini_array=yes
eb70d86d 11861else
ba479fd2
NN
11862 echo "$as_me: program exited with status $ac_status" >&5
11863echo "$as_me: failed program was:" >&5
11864sed 's/^/| /' conftest.$ac_ext >&5
11865
11866( exit $ac_status )
11867gcc_cv_initfini_array=no
eb70d86d 11868fi
86da66b5 11869rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 11870fi
07cf4226 11871fi
ba479fd2
NN
11872echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
11873echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 11874 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 11875
ba479fd2 11876fi;
63cf211a 11877if test $enable_initfini_array = yes; then
ba479fd2
NN
11878
11879cat >>confdefs.h <<\_ACEOF
eb70d86d 11880#define HAVE_INITFINI_ARRAY 1
ba479fd2 11881_ACEOF
07cf4226 11882
eb70d86d 11883fi
81bf3d9e 11884
ba479fd2
NN
11885# mkdir takes a single argument on some systems.
11886echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
11887echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
11888if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
11889 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 11890else
ba479fd2 11891 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11892/* confdefs.h. */
11893_ACEOF
11894cat confdefs.h >>conftest.$ac_ext
11895cat >>conftest.$ac_ext <<_ACEOF
11896/* end confdefs.h. */
75923b2f
MK
11897
11898#include <sys/types.h>
11899#ifdef HAVE_SYS_STAT_H
11900# include <sys/stat.h>
11901#endif
11902#ifdef HAVE_UNISTD_H
11903# include <unistd.h>
11904#endif
11905#ifdef HAVE_DIRECT_H
11906# include <direct.h>
11907#endif
ba479fd2
NN
11908int
11909main ()
11910{
75923b2f 11911mkdir ("foo", 0);
ba479fd2
NN
11912 ;
11913 return 0;
11914}
11915_ACEOF
11916rm -f conftest.$ac_objext
11917if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11918 (eval $ac_compile) 2>conftest.er1
ba479fd2 11919 ac_status=$?
86da66b5
HPN
11920 grep -v '^ *+' conftest.er1 >conftest.err
11921 rm -f conftest.er1
11922 cat conftest.err >&5
ba479fd2
NN
11923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11924 (exit $ac_status); } &&
d7974fe6
KC
11925 { ac_try='test -z "$ac_c_werror_flag"
11926 || test ! -s conftest.err'
86da66b5
HPN
11927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11928 (eval $ac_try) 2>&5
11929 ac_status=$?
11930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11931 (exit $ac_status); }; } &&
11932 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11934 (eval $ac_try) 2>&5
11935 ac_status=$?
11936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11937 (exit $ac_status); }; }; then
75923b2f
MK
11938 gcc_cv_mkdir_takes_one_arg=no
11939else
ba479fd2
NN
11940 echo "$as_me: failed program was:" >&5
11941sed 's/^/| /' conftest.$ac_ext >&5
11942
11943gcc_cv_mkdir_takes_one_arg=yes
75923b2f 11944fi
86da66b5 11945rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 11946fi
ba479fd2
NN
11947echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
11948echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 11949if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
11950
11951cat >>confdefs.h <<\_ACEOF
75923b2f 11952#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 11953_ACEOF
75923b2f
MK
11954
11955fi
11956
11957
861bb6c1
JL
11958# File extensions
11959manext='.1'
11960objext='.o'
11961
11962
11963
4977bab6
ZW
11964# With Setjmp/Longjmp based exception handling.
11965# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
11966if test "${enable_sjlj_exceptions+set}" = set; then
11967 enableval="$enable_sjlj_exceptions"
11968 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 11969
ba479fd2
NN
11970cat >>confdefs.h <<_ACEOF
11971#define CONFIG_SJLJ_EXCEPTIONS $sjlj
11972_ACEOF
4977bab6 11973
ba479fd2 11974fi;
4977bab6 11975
443728bb
L
11976# For platforms with the unwind ABI which includes an unwind library,
11977# libunwind, we can choose to use the system libunwind.
4977bab6 11978
443728bb
L
11979# Check whether --with-system-libunwind or --without-system-libunwind was given.
11980if test "${with_system_libunwind+set}" = set; then
11981 withval="$with_system_libunwind"
4977bab6 11982
ba479fd2 11983fi;
4977bab6 11984
34a86c2b
NN
11985# --------------------------------------------------------
11986# Build, host, and target specific configuration fragments
11987# --------------------------------------------------------
11988
5b28c537
NN
11989# Collect build-machine-specific information.
11990. ${srcdir}/config.build
11991
a89ea0df
NN
11992# Collect host-machine-specific information.
11993. ${srcdir}/config.host
11994
ef69da62 11995target_gtfiles=
a89ea0df
NN
11996
11997# Collect target-machine-specific information.
8ad9fb33 11998. ${srcdir}/config.gcc
861bb6c1
JL
11999
12000extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 12001extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
12002
12003# Default the target-machine variables that were not explicitly set.
75bffa71 12004if test x"$tm_file" = x
861bb6c1
JL
12005then tm_file=$cpu_type/$cpu_type.h; fi
12006
6b2adea9 12007if test x"$extra_headers" = x
861bb6c1
JL
12008then extra_headers=; fi
12009
75bffa71 12010if test x$md_file = x
e98e406f 12011then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 12012
75bffa71 12013if test x$out_file = x
861bb6c1
JL
12014then out_file=$cpu_type/$cpu_type.c; fi
12015
75bffa71 12016if test x"$tmake_file" = x
861bb6c1
JL
12017then tmake_file=$cpu_type/t-$cpu_type
12018fi
12019
90e6a802 12020if test x"$dwarf2" = xyes
756ee602 12021then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
12022fi
12023
861bb6c1 12024# Say what files are being used for the output code and MD file.
11642c3a 12025echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
12026echo "Using \`$srcdir/config/$md_file' as machine description file."
12027
11642c3a 12028# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
12029# about them and drop them.
12030
11642c3a
ZW
12031bx=
12032for x in $build_xm_file; do
12033 if test -f $srcdir/config/$x
12034 then bx="$bx $x"
ba479fd2
NN
12035 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12036echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12037 fi
12038done
12039build_xm_file="$bx"
12040
12041hx=
12042for x in $host_xm_file; do
12043 if test -f $srcdir/config/$x
12044 then hx="$hx $x"
ba479fd2
NN
12045 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12046echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12047 fi
12048done
12049host_xm_file="$hx"
12050
12051tx=
12052for x in $xm_file; do
12053 if test -f $srcdir/config/$x
12054 then tx="$tx $x"
ba479fd2
NN
12055 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12056echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12057 fi
12058done
12059xm_file="$tx"
12060
861bb6c1
JL
12061count=a
12062for f in $tm_file; do
12063 count=${count}x
12064done
75bffa71 12065if test $count = ax; then
861bb6c1
JL
12066 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
12067else
12068 echo "Using the following target machine macro files:"
12069 for f in $tm_file; do
12070 echo " $srcdir/config/$f"
12071 done
12072fi
12073
4977bab6 12074if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
12075
12076cat >>confdefs.h <<\_ACEOF
4977bab6 12077#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 12078_ACEOF
4977bab6
ZW
12079
12080fi
12081
99fa8911
AP
12082if test x$use_long_long_for_widest_fast_int = xyes; then
12083
12084cat >>confdefs.h <<\_ACEOF
12085#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12086_ACEOF
12087
12088fi
12089
861bb6c1
JL
12090count=a
12091for f in $host_xm_file; do
12092 count=${count}x
12093done
11642c3a
ZW
12094if test $count = a; then
12095 :
12096elif test $count = ax; then
861bb6c1
JL
12097 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12098else
12099 echo "Using the following host machine macro files:"
12100 for f in $host_xm_file; do
12101 echo " $srcdir/config/$f"
12102 done
12103fi
476d9098 12104echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 12105
75bffa71 12106if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
12107 count=a
12108 for f in $build_xm_file; do
12109 count=${count}x
12110 done
11642c3a
ZW
12111 if test $count = a; then
12112 :
12113 elif test $count = ax; then
861bb6c1
JL
12114 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12115 else
12116 echo "Using the following build machine macro files:"
12117 for f in $build_xm_file; do
12118 echo " $srcdir/config/$f"
12119 done
12120 fi
12121fi
12122
8bb915b6
NN
12123# ---------
12124# Threading
12125# ---------
12126
c2e494a8 12127# Check if a valid thread package
615be2cf 12128case ${enable_threads} in
c2e494a8
NN
12129 "" | no)
12130 # No threads
12131 target_thread_file='single'
12132 ;;
12133 yes)
12134 # default
12135 target_thread_file='single'
12136 ;;
18167442 12137 aix | dce | gnat | irix | posix | posix95 | rtems | \
769e49eb 12138 single | solaris | vxworks | win32 )
615be2cf 12139 target_thread_file=${enable_threads}
c2e494a8
NN
12140 ;;
12141 *)
615be2cf 12142 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
12143 exit 1
12144 ;;
12145esac
12146
12147if test x${thread_file} = x; then
12148 # No thread file set by target-specific clauses in config.gcc,
12149 # so use file chosen by default logic above
12150 thread_file=${target_thread_file}
861bb6c1
JL
12151fi
12152
8bb915b6
NN
12153# Make gthr-default.h if we have a thread file.
12154gthread_flags=
12155if test $thread_file != single; then
12156 rm -f gthr-default.h
12157 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12158 gthread_flags=-DHAVE_GTHR_DEFAULT
12159fi
12160
12161
12162# --------
12163# UNSORTED
12164# --------
12165
18fbf599 12166use_cxa_atexit=no
2121a768
JT
12167if test x$enable___cxa_atexit = xyes || \
12168 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599
PB
12169 if test x$host = x$target; then
12170 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
354b7da5
DH
12171echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
12172if test "${ac_cv_func___cxa_atexit+set}" = set; then
12173 echo $ECHO_N "(cached) $ECHO_C" >&6
12174else
12175 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
12176/* confdefs.h. */
12177_ACEOF
12178cat confdefs.h >>conftest.$ac_ext
12179cat >>conftest.$ac_ext <<_ACEOF
12180/* end confdefs.h. */
86da66b5
HPN
12181/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12182 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12183#define __cxa_atexit innocuous___cxa_atexit
12184
354b7da5
DH
12185/* System header to define __stub macros and hopefully few prototypes,
12186 which can conflict with char __cxa_atexit (); below.
12187 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12188 <limits.h> exists even on freestanding compilers. */
86da66b5 12189
354b7da5
DH
12190#ifdef __STDC__
12191# include <limits.h>
12192#else
12193# include <assert.h>
12194#endif
86da66b5
HPN
12195
12196#undef __cxa_atexit
12197
354b7da5
DH
12198/* Override any gcc2 internal prototype to avoid an error. */
12199#ifdef __cplusplus
12200extern "C"
12201{
12202#endif
12203/* We use char because int might match the return type of a gcc2
12204 builtin and then its argument prototype would still apply. */
12205char __cxa_atexit ();
12206/* The GNU C library defines this for functions which it implements
12207 to always fail with ENOSYS. Some functions are actually named
12208 something starting with __ and the normal name is an alias. */
12209#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
12210choke me
12211#else
12212char (*f) () = __cxa_atexit;
12213#endif
12214#ifdef __cplusplus
12215}
12216#endif
12217
12218int
12219main ()
12220{
12221return f != __cxa_atexit;
12222 ;
12223 return 0;
12224}
12225_ACEOF
12226rm -f conftest.$ac_objext conftest$ac_exeext
12227if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12228 (eval $ac_link) 2>conftest.er1
354b7da5 12229 ac_status=$?
86da66b5
HPN
12230 grep -v '^ *+' conftest.er1 >conftest.err
12231 rm -f conftest.er1
12232 cat conftest.err >&5
354b7da5
DH
12233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12234 (exit $ac_status); } &&
d7974fe6
KC
12235 { ac_try='test -z "$ac_c_werror_flag"
12236 || test ! -s conftest.err'
86da66b5
HPN
12237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12238 (eval $ac_try) 2>&5
12239 ac_status=$?
12240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12241 (exit $ac_status); }; } &&
12242 { ac_try='test -s conftest$ac_exeext'
354b7da5
DH
12243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12244 (eval $ac_try) 2>&5
12245 ac_status=$?
12246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12247 (exit $ac_status); }; }; then
12248 ac_cv_func___cxa_atexit=yes
12249else
12250 echo "$as_me: failed program was:" >&5
12251sed 's/^/| /' conftest.$ac_ext >&5
12252
12253ac_cv_func___cxa_atexit=no
12254fi
86da66b5
HPN
12255rm -f conftest.err conftest.$ac_objext \
12256 conftest$ac_exeext conftest.$ac_ext
354b7da5
DH
12257fi
12258echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12259echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
12260if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
12261 use_cxa_atexit=yes
12262else
12263 echo "__cxa_atexit can't be enabled on this target"
12264fi
12265
12266 else
12267 # We can't check for __cxa_atexit when building a cross, so assume
12268 # it is available
12269 use_cxa_atexit=yes
12270 fi
12271 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
12272
12273cat >>confdefs.h <<\_ACEOF
2121a768 12274#define DEFAULT_USE_CXA_ATEXIT 1
ba479fd2 12275_ACEOF
2121a768 12276
18fbf599 12277 fi
2121a768
JT
12278fi
12279
a5381466 12280# Look for a file containing extra machine modes.
1c0ca89d
ZW
12281if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12282 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
12283
12284
12285cat >>confdefs.h <<_ACEOF
e22340b0 12286#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 12287_ACEOF
a5381466
ZW
12288
12289fi
12290
75685792
RS
12291# Convert extra_options into a form suitable for Makefile use.
12292extra_opt_files=
12293for f in $extra_options; do
12294 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12295done
12296
12297
b7cb92ad 12298# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 12299# the first file included by config.h.
4977bab6 12300# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 12301# as well. If host!=build, we are in error and need to do more
db81d74a 12302# work to find out the build config parameters.
75bffa71 12303if test x$host = x$build
db81d74a 12304then
eaf4e618 12305 build_auto=auto-host.h
b7cb92ad
JL
12306else
12307 # We create a subdir, then run autoconf in the subdir.
12308 # To prevent recursion we set host and build for the new
12309 # invocation of configure to the build for this invocation
ba479fd2 12310 # of configure.
b7cb92ad
JL
12311 tempdir=build.$$
12312 rm -rf $tempdir
12313 mkdir $tempdir
12314 cd $tempdir
12315 case ${srcdir} in
255b8a49 12316 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
12317 *) realsrcdir=../${srcdir};;
12318 esac
d920e825
L
12319 saved_CFLAGS="${CFLAGS}"
12320 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12321 ${realsrcdir}/configure \
33e70558 12322 --enable-languages=${enable_languages-all} \
534d0cc0 12323 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 12324 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
12325
12326 # We just finished tests for the build machine, so rename
12327 # the file auto-build.h in the gcc directory.
12328 mv auto-host.h ../auto-build.h
12329 cd ..
12330 rm -rf $tempdir
eaf4e618 12331 build_auto=auto-build.h
db81d74a
RH
12332fi
12333
06f0b04c 12334
eaf4e618 12335tm_file="${tm_file} defaults.h"
4977bab6
ZW
12336tm_p_file="${tm_p_file} tm-preds.h"
12337host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12338build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 12339# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 12340# put this back in temporarily.
232b67d9 12341xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 12342
34a86c2b
NN
12343# --------
12344# UNSORTED
12345# --------
12346
cc1e60ea 12347# Compile in configure arguments.
8105825d 12348if test -f configargs.h ; then
cc1e60ea 12349 # Being re-configured.
022dae81 12350 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
12351 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12352else
12353 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12354fi
eeae7b41
DJ
12355
12356# Double all backslashes and backslash all quotes to turn
12357# gcc_config_arguments into a C string.
12358sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12359$gcc_config_arguments
12360EOF
12361gcc_config_arguments_str=`cat conftest.out`
12362rm -f conftest.out
12363
cc1e60ea
JM
12364cat > configargs.h <<EOF
12365/* Generated automatically. */
eeae7b41 12366static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 12367static const char thread_model[] = "$thread_file";
7816bea0
DJ
12368
12369static const struct {
12370 const char *name, *value;
12371} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
12372EOF
12373
ab87f8c8 12374# Internationalization
56694dd9
ZW
12375# If we haven't got the data from the intl directory,
12376# assume NLS is disabled.
ba479fd2
NN
12377USE_NLS=no
12378LIBINTL=
12379LIBINTL_DEP=
12380INCINTL=
12381XGETTEXT=
12382GMSGFMT=
12383POSUB=
56694dd9
ZW
12384if test -f ../intl/config.intl; then
12385 . ../intl/config.intl
093e61a6 12386fi
ba479fd2
NN
12387echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12388echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
56694dd9 12389if test x"$USE_NLS" != xyes; then
ba479fd2
NN
12390 echo "$as_me:$LINENO: result: no" >&5
12391echo "${ECHO_T}no" >&6
56694dd9 12392else
ba479fd2
NN
12393 echo "$as_me:$LINENO: result: yes" >&5
12394echo "${ECHO_T}yes" >&6
12395
12396cat >>confdefs.h <<\_ACEOF
56694dd9 12397#define ENABLE_NLS 1
ba479fd2 12398_ACEOF
56694dd9 12399
093e61a6 12400
ba479fd2
NN
12401 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12402echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
56694dd9 12403 # Look for .po and .gmo files in the source directory.
ba479fd2 12404 CATALOGS=
56694dd9
ZW
12405 XLINGUAS=
12406 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12407 # If there aren't any .gmo files the shell will give us the
12408 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12409 # weeded out.
12410 case "$cat" in *\**)
12411 continue;;
12412 esac
12413 # The quadruple backslash is collapsed to a double backslash
12414 # by the backticks, then collapsed again by the double quotes,
12415 # leaving us with one backslash in the sed expression (right
12416 # before the dot that mustn't act as a wildcard).
12417 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
12418 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
12419 # The user is allowed to set LINGUAS to a list of languages to
12420 # install catalogs for. If it's empty that means "all of them."
12421 if test "x$LINGUAS" = x; then
12422 CATALOGS="$CATALOGS $cat"
12423 XLINGUAS="$XLINGUAS $lang"
12424 else
12425 case "$LINGUAS" in *$lang*)
12426 CATALOGS="$CATALOGS $cat"
12427 XLINGUAS="$XLINGUAS $lang"
12428 ;;
12429 esac
12430 fi
12431 done
12432 LINGUAS="$XLINGUAS"
ba479fd2
NN
12433 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12434echo "${ECHO_T}$LINGUAS" >&6
56694dd9 12435fi
861bb6c1 12436
56694dd9
ZW
12437# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12438# -liconv on the link line twice.
12439case "$LIBINTL" in *$LIBICONV*)
12440 LIBICONV= ;;
12441esac
dc6746e7 12442
7f970b70
AM
12443# Check whether --enable-secureplt or --disable-secureplt was given.
12444if test "${enable_secureplt+set}" = set; then
12445 enableval="$enable_secureplt"
12446
12447fi;
12448
56694dd9
ZW
12449# Windows32 Registry support for specifying GCC installation paths.
12450# Check whether --enable-win32-registry or --disable-win32-registry was given.
12451if test "${enable_win32_registry+set}" = set; then
12452 enableval="$enable_win32_registry"
dc6746e7 12453
ba479fd2 12454fi;
ba479fd2 12455
a1286ef5
ZW
12456case $host_os in
12457 win32 | pe | cygwin* | mingw32* | uwin*)
12458 if test "x$enable_win32_registry" != xno; then
12459 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
ba479fd2
NN
12460echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
12461if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12462 echo $ECHO_N "(cached) $ECHO_C" >&6
12463else
12464 ac_func_search_save_LIBS=$LIBS
12465ac_cv_search_RegOpenKeyExA=no
12466cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12467/* confdefs.h. */
12468_ACEOF
12469cat confdefs.h >>conftest.$ac_ext
12470cat >>conftest.$ac_ext <<_ACEOF
12471/* end confdefs.h. */
861bb6c1 12472
ab87f8c8 12473/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12474#ifdef __cplusplus
12475extern "C"
12476#endif
ab87f8c8 12477/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12478 builtin and then its argument prototype would still apply. */
12479char RegOpenKeyExA ();
12480int
12481main ()
12482{
12483RegOpenKeyExA ();
12484 ;
12485 return 0;
12486}
12487_ACEOF
12488rm -f conftest.$ac_objext conftest$ac_exeext
12489if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12490 (eval $ac_link) 2>conftest.er1
ba479fd2 12491 ac_status=$?
86da66b5
HPN
12492 grep -v '^ *+' conftest.er1 >conftest.err
12493 rm -f conftest.er1
12494 cat conftest.err >&5
ba479fd2
NN
12495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12496 (exit $ac_status); } &&
d7974fe6
KC
12497 { ac_try='test -z "$ac_c_werror_flag"
12498 || test ! -s conftest.err'
86da66b5
HPN
12499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12500 (eval $ac_try) 2>&5
12501 ac_status=$?
12502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12503 (exit $ac_status); }; } &&
12504 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12506 (eval $ac_try) 2>&5
12507 ac_status=$?
12508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12509 (exit $ac_status); }; }; then
56694dd9 12510 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 12511else
ba479fd2
NN
12512 echo "$as_me: failed program was:" >&5
12513sed 's/^/| /' conftest.$ac_ext >&5
12514
861bb6c1 12515fi
86da66b5
HPN
12516rm -f conftest.err conftest.$ac_objext \
12517 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
12518if test "$ac_cv_search_RegOpenKeyExA" = no; then
12519 for ac_lib in advapi32; do
12520 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12521 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12522/* confdefs.h. */
12523_ACEOF
12524cat confdefs.h >>conftest.$ac_ext
12525cat >>conftest.$ac_ext <<_ACEOF
12526/* end confdefs.h. */
12527
56694dd9 12528/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12529#ifdef __cplusplus
12530extern "C"
12531#endif
56694dd9 12532/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12533 builtin and then its argument prototype would still apply. */
12534char RegOpenKeyExA ();
12535int
12536main ()
12537{
12538RegOpenKeyExA ();
12539 ;
12540 return 0;
12541}
12542_ACEOF
12543rm -f conftest.$ac_objext conftest$ac_exeext
12544if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12545 (eval $ac_link) 2>conftest.er1
ba479fd2 12546 ac_status=$?
86da66b5
HPN
12547 grep -v '^ *+' conftest.er1 >conftest.err
12548 rm -f conftest.er1
12549 cat conftest.err >&5
ba479fd2
NN
12550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12551 (exit $ac_status); } &&
d7974fe6
KC
12552 { ac_try='test -z "$ac_c_werror_flag"
12553 || test ! -s conftest.err'
86da66b5
HPN
12554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12555 (eval $ac_try) 2>&5
12556 ac_status=$?
12557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12558 (exit $ac_status); }; } &&
12559 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12561 (eval $ac_try) 2>&5
12562 ac_status=$?
12563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12564 (exit $ac_status); }; }; then
12565 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 12566break
861bb6c1 12567else
ba479fd2
NN
12568 echo "$as_me: failed program was:" >&5
12569sed 's/^/| /' conftest.$ac_ext >&5
12570
861bb6c1 12571fi
86da66b5
HPN
12572rm -f conftest.err conftest.$ac_objext \
12573 conftest$ac_exeext conftest.$ac_ext
ba479fd2 12574 done
6e3f3080 12575fi
ba479fd2
NN
12576LIBS=$ac_func_search_save_LIBS
12577fi
12578echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
12579echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
12580if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 12581 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 12582
cafe096b 12583else
a1286ef5 12584 enable_win32_registry=no
093e61a6 12585fi
ab87f8c8 12586
a1286ef5
ZW
12587 fi
12588
12589 if test "x$enable_win32_registry" != xno; then
12590
12591cat >>confdefs.h <<\_ACEOF
12592#define ENABLE_WIN32_REGISTRY 1
12593_ACEOF
ab87f8c8 12594
a1286ef5
ZW
12595
12596 if test "x$enable_win32_registry" != xyes \
12597 && test "x$enable_win32_registry" != x; then
ba479fd2
NN
12598
12599cat >>confdefs.h <<_ACEOF
a1286ef5 12600#define WIN32_REGISTRY_KEY "$enable_win32_registry"
ba479fd2 12601_ACEOF
cafe096b 12602
a1286ef5
ZW
12603 fi
12604 fi
12605 ;;
56694dd9 12606esac
ab87f8c8 12607
56694dd9
ZW
12608# Get an absolute path to the GCC top-level source directory
12609holddir=`${PWDCMD-pwd}`
12610cd $srcdir
12611topdir=`${PWDCMD-pwd}`
12612cd $holddir
ab87f8c8 12613
56694dd9 12614# Conditionalize the makefile for this host machine.
2ed26f6b 12615xmake_file=
c406e779 12616for f in ${host_xmake_file}
56694dd9
ZW
12617do
12618 if test -f ${srcdir}/config/$f
12619 then
2ed26f6b 12620 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
12621 fi
12622done
093e61a6 12623
56694dd9 12624# Conditionalize the makefile for this target machine.
2ed26f6b 12625tmake_file_=
c406e779 12626for f in ${tmake_file}
56694dd9
ZW
12627do
12628 if test -f ${srcdir}/config/$f
12629 then
2ed26f6b 12630 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
12631 fi
12632done
2ed26f6b 12633tmake_file="${tmake_file_}"
71a94577 12634
ab87f8c8
JL
12635# If the host doesn't support symlinks, modify CC in
12636# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
12637# Otherwise, we can use "CC=$(CC)".
12638rm -f symtest.tem
35f06ae4
PB
12639case "$LN_S" in
12640 *-s*)
12641 cc_set_by_configure="\$(CC)"
12642 quoted_cc_set_by_configure="\$(CC)"
12643 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12644 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12645 ;;
12646 *)
12647 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
12648 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
12649 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
12650 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
12651 ;;
12652esac
ab87f8c8 12653
5395b47b
NN
12654# This is a terrible hack which will go away some day.
12655host_cc_for_libada=${CC}
1e3fad21
NN
12656
12657
ab87f8c8
JL
12658out_object_file=`basename $out_file .c`.o
12659
75685792
RS
12660tm_file_list="options.h"
12661tm_include_list="options.h"
ab87f8c8 12662for f in $tm_file; do
64ccbc99 12663 case $f in
d02af173 12664 defaults.h )
e22340b0
ZW
12665 tm_file_list="${tm_file_list} \$(srcdir)/$f"
12666 tm_include_list="${tm_include_list} $f"
12667 ;;
12668 * )
12669 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
12670 tm_include_list="${tm_include_list} config/$f"
12671 ;;
64ccbc99 12672 esac
ab87f8c8
JL
12673done
12674
11642c3a 12675tm_p_file_list=
e22340b0 12676tm_p_include_list=
11642c3a 12677for f in $tm_p_file; do
4977bab6
ZW
12678 case $f in
12679 tm-preds.h )
e22340b0
ZW
12680 tm_p_file_list="${tm_p_file_list} $f"
12681 tm_p_include_list="${tm_p_include_list} $f"
12682 ;;
12683 * )
12684 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
12685 tm_p_include_list="${tm_p_include_list} config/$f"
12686 esac
12687done
12688
12689xm_file_list=
12690xm_include_list=
12691for f in $xm_file; do
12692 case $f in
12693 ansidecl.h )
12694 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
12695 xm_include_list="${xm_include_list} $f"
12696 ;;
12697 auto-host.h )
12698 xm_file_list="${xm_file_list} $f"
12699 xm_include_list="${xm_include_list} $f"
12700 ;;
12701 * )
12702 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
12703 xm_include_list="${xm_include_list} config/$f"
12704 ;;
4977bab6 12705 esac
11642c3a
ZW
12706done
12707
ab87f8c8 12708host_xm_file_list=
e22340b0 12709host_xm_include_list=
ab87f8c8 12710for f in $host_xm_file; do
64ccbc99 12711 case $f in
d02af173 12712 ansidecl.h )
e22340b0
ZW
12713 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
12714 host_xm_include_list="${host_xm_include_list} $f"
12715 ;;
e2500fed 12716 auto-host.h )
e22340b0
ZW
12717 host_xm_file_list="${host_xm_file_list} $f"
12718 host_xm_include_list="${host_xm_include_list} $f"
12719 ;;
12720 * )
12721 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
12722 host_xm_include_list="${host_xm_include_list} config/$f"
12723 ;;
64ccbc99 12724 esac
ab87f8c8
JL
12725done
12726
12727build_xm_file_list=
12728for f in $build_xm_file; do
64ccbc99 12729 case $f in
d02af173 12730 ansidecl.h )
e22340b0
ZW
12731 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
12732 build_xm_include_list="${build_xm_include_list} $f"
12733 ;;
e2500fed 12734 auto-build.h | auto-host.h )
e22340b0
ZW
12735 build_xm_file_list="${build_xm_file_list} $f"
12736 build_xm_include_list="${build_xm_include_list} $f"
12737 ;;
12738 * )
12739 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
12740 build_xm_include_list="${build_xm_include_list} config/$f"
12741 ;;
64ccbc99 12742 esac
ab87f8c8
JL
12743done
12744
a078a589
ZW
12745# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
12746# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
12747CROSS=
12748ALL=all.internal
12749SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
12750if test x$host != x$target
12751then
a078a589
ZW
12752 CROSS="-DCROSS_COMPILE"
12753 ALL=all.cross
160633c6 12754 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 12755 case "$host","$target" in
3a7e8b87
GK
12756 # Darwin crosses can use the host system's libraries and headers,
12757 # because of the fat library support. Of course, it must be the
12758 # same version of Darwin on both sides. Allow the user to
12759 # just say --target=foo-darwin without a version number to mean
12760 # "the version on this system".
12761 *-*-darwin*,*-*-darwin*)
12762 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
12763 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
12764 if test $hostos = $targetos -o $targetos = darwin ; then
12765 CROSS=
12766 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
12767 with_headers=yes
12768 fi
12769 ;;
12770
343f59d9
AM
12771 i?86-*-*,x86_64-*-* \
12772 | powerpc*-*-*,powerpc64*-*-*)
12773 CROSS="$CROSS -DNATIVE_CROSS" ;;
12774 esac
7a615b25
AO
12775elif test "x$TARGET_SYSTEM_ROOT" != x; then
12776 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
12777 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
12778fi
12779
b39d221a
EC
12780# If this is a cross-compiler that does not
12781# have its own set of headers then define
12782# inhibit_libc
12783
dc06db20
R
12784# If this is using newlib, without having the headers available now,
12785# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
12786# This prevents libgcc2 from containing any code which requires libc
12787# support.
160633c6 12788inhibit_libc=false
dc06db20
R
12789if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
12790 test x$with_newlib = xyes ; } &&
e50084fa 12791 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 12792 inhibit_libc=true
b39d221a
EC
12793fi
12794
12795
a078a589
ZW
12796# When building gcc with a cross-compiler, we need to adjust things so
12797# that the generator programs are still built with the native compiler.
12798# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
12799
12800# These are the normal (build=host) settings:
ba479fd2
NN
12801CC_FOR_BUILD='$(CC)'
12802BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 12803STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
12804
12805# Possibly disable fixproto, on a per-target basis.
12806case ${use_fixproto} in
12807 no)
12808 STMP_FIXPROTO=
12809 ;;
12810 yes)
12811 STMP_FIXPROTO=stmp-fixproto
12812 ;;
12813esac
12814
a078a589 12815
83599948
NS
12816# And these apply if build != host, or we are generating coverage data
12817if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 12818then
b11e4747 12819 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 12820
7a615b25 12821 if test "x$TARGET_SYSTEM_ROOT" = x; then
d8e5117d 12822 if test "x$STMP_FIXPROTO" != x; then
de253ca4
GK
12823 STMP_FIXPROTO=stmp-install-fixproto
12824 fi
7a615b25 12825 fi
ab87f8c8
JL
12826fi
12827
12828# Expand extra_headers to include complete path.
12829# This substitutes for lots of t-* files.
12830extra_headers_list=
b1ef58c8
NN
12831# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
12832for file in ${extra_headers} ; do
12833 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
12834done
ab87f8c8 12835
c38f02df
ILT
12836# Define collect2 in Makefile.
12837case $host_can_use_collect2 in
12838 no) collect2= ;;
12839 *) collect2='collect2$(exeext)' ;;
12840esac
12841
12842
ab87f8c8 12843# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
12844case $use_collect2 in
12845 no) use_collect2= ;;
12846 "") ;;
ba479fd2 12847 *)
34a86c2b
NN
12848 host_xm_defines="${host_xm_defines} USE_COLLECT2"
12849 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
12850 case $host_can_use_collect2 in
12851 no)
12852 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
12853echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
12854 { (exit 1); exit 1; }; }
12855 ;;
12856 esac
34a86c2b
NN
12857 ;;
12858esac
ab87f8c8 12859
8bb915b6
NN
12860# ---------------------------
12861# Assembler & linker features
12862# ---------------------------
12863
d869a8c4
NN
12864# Identify the assembler which will work hand-in-glove with the newly
12865# built GCC, so that we can examine its features. This is the assembler
12866# which will be driven by the driver program.
12867#
12868# If build != host, and we aren't building gas in-tree, we identify a
12869# build->target assembler and hope that it will have the same features
12870# as the host->target assembler we'll be using.
34a86c2b 12871in_tree_gas=no
ab87f8c8 12872gcc_cv_as=
981d4858
JM
12873gcc_cv_gas_major_version=
12874gcc_cv_gas_minor_version=
ab87f8c8
JL
12875gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
12876if test -x "$DEFAULT_ASSEMBLER"; then
12877 gcc_cv_as="$DEFAULT_ASSEMBLER"
34a86c2b 12878elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
12879 && test -f ../gas/Makefile \
12880 && test x$build = x$host; then
12881 # Single tree build which includes gas. We want to prefer it
12882 # over whatever linker top-level may have detected, since
12883 # we'll use what we're building after installation anyway.
ad9c4d9f
NN
12884 in_tree_gas=yes
12885 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
12886for f in $gcc_cv_as_bfd_srcdir/configure \
12887 $gcc_cv_as_gas_srcdir/configure \
12888 $gcc_cv_as_gas_srcdir/configure.in \
12889 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 12890 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
12891 if test x$gcc_cv_gas_version != x; then
12892 break
12893 fi
12894done
12895gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
12896gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
12897gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
12898case $gcc_cv_gas_patch_version in
12899 "") gcc_cv_gas_patch_version="0" ;;
12900esac
8ada417f
ZW
12901gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
12902 + $gcc_cv_gas_minor_version \) \* 1000 \
12903 + $gcc_cv_gas_patch_version`
ad9c4d9f 12904
9f18db39 12905 gcc_cv_as=../gas/as-new$build_exeext
5408ac6c
HPN
12906 in_tree_gas_is_elf=no
12907 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
12908 || (grep 'obj_format = multi' ../gas/Makefile \
12909 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
12910 then
12911 in_tree_gas_is_elf=yes
12912 fi
9f18db39
PB
12913elif test -x as$build_exeext; then
12914 # Build using assembler in the current directory.
12915 gcc_cv_as=./as$build_exeext
08d105fa
AO
12916elif test -x "$AS_FOR_TARGET"; then
12917 gcc_cv_as="$AS_FOR_TARGET"
12918elif test -x "$AS" && test x$host = x$target; then
12919 gcc_cv_as="$AS"
981d4858 12920fi
9e423e6d 12921
a1286ef5 12922
9f18db39
PB
12923# When searching for the assembler or linker, search the same directories
12924# that the installed compiler will search. Else we may find the wrong
12925# assembler or linker and lose. If we do not find a suitable binary,
12926# then try the user's path.
12927#
12928# Also note we have to check MD_EXEC_PREFIX before checking the user's path.
12929if test "x$exec_prefix" = xNONE; then
12930 if test "x$prefix" = xNONE; then
12931 gcc_cv_tool_prefix=/usr/local
779243f7 12932 else
9f18db39 12933 gcc_cv_tool_prefix=$prefix
779243f7 12934 fi
9f18db39
PB
12935else
12936 gcc_cv_tool_prefix=$exec_prefix
12937fi
12938
12939if test x$host = x$build; then
12940 gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version"
12941 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical"
12942 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical/$gcc_version"
12943 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical"
12944 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version"
12945 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin"
12946else
12947 gcc_cv_tool_dirs=
12948fi
12949
12950if test x$build = x$target; then
12951 # Rummage through tm_files looking for MD_EXEC_PREFIX
12952 md_dirs=
12953 for f in ${tm_file_list}; do
12954 if test -f $f; then
12955 if grep '^#[ ]*undef[ ]*MD_EXEC_PREFIX' $f > /dev/null; then
12956 md_dirs=
12957 fi
12958 md_dirs="$md_dirs "`sed -n -e 's@^#[ ]*define[ ]*MD_EXEC_PREFIX[ ]*"\(.*\)/"@\1@p' < $f`
12959 fi
12960 done
12961 for f in ${md_dirs}; do
12962 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$f"
12963 done
12964fi
12965
12966
12967
12968
12969exec 6>/dev/null
a2eafc76 12970if test "x$gcc_cv_as" = x; then
c42adccb
PB
12971 # The AC_PATH_PROGS macro doesn't work properly when its 4th argument
12972 # is empty.
12973 if test "x$gcc_cv_tool_dirs" = x; then
12974 gcc_cv_as=
12975 else
12976 for ac_prog in as
9f18db39
PB
12977do
12978 # Extract the first word of "$ac_prog", so it can be a program name with args.
12979set dummy $ac_prog; ac_word=$2
12980echo "$as_me:$LINENO: checking for $ac_word" >&5
12981echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12982if test "${ac_cv_path_gcc_cv_as+set}" = set; then
12983 echo $ECHO_N "(cached) $ECHO_C" >&6
12984else
12985 case $gcc_cv_as in
12986 [\\/]* | ?:[\\/]*)
12987 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
12988 ;;
12989 *)
12990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12991for as_dir in $gcc_cv_tool_dirs
12992do
12993 IFS=$as_save_IFS
12994 test -z "$as_dir" && as_dir=.
12995 for ac_exec_ext in '' $ac_executable_extensions; do
12996 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12997 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
12998 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12999 break 2
13000 fi
13001done
13002done
779243f7 13003
9f18db39
PB
13004 ;;
13005esac
13006fi
13007gcc_cv_as=$ac_cv_path_gcc_cv_as
13008
13009if test -n "$gcc_cv_as"; then
13010 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13011echo "${ECHO_T}$gcc_cv_as" >&6
13012else
13013 echo "$as_me:$LINENO: result: no" >&5
13014echo "${ECHO_T}no" >&6
13015fi
13016
13017 test -n "$gcc_cv_as" && break
13018done
13019
c42adccb 13020 fi
a2eafc76 13021fi
9f18db39
PB
13022if test "x$gcc_cv_as" = x; then
13023 # If the loop above did not find a tool, then use whatever
b095fe2c 13024 # one we can find in the users's path. We are looking for a
9f18db39 13025 # ${build} -> ${target} tool.
55a2ea2a 13026 if test "x$program_prefix" != xNONE; then
9f18db39 13027 default_tool_name=${program_prefix}as
b095fe2c 13028 elif test x$build != x$host && test x$build != x$target; then
9f18db39 13029 default_tool_name=${target_noncanonical}-as
55a2ea2a 13030 else
9f18db39 13031 default_tool_name=`echo as | sed "${program_transform_name}"`
55a2ea2a 13032 fi
9f18db39
PB
13033 for ac_prog in $default_tool_name
13034do
13035 # Extract the first word of "$ac_prog", so it can be a program name with args.
13036set dummy $ac_prog; ac_word=$2
13037echo "$as_me:$LINENO: checking for $ac_word" >&5
13038echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13039if test "${ac_cv_path_gcc_cv_as+set}" = set; then
13040 echo $ECHO_N "(cached) $ECHO_C" >&6
13041else
13042 case $gcc_cv_as in
13043 [\\/]* | ?:[\\/]*)
13044 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
13045 ;;
13046 *)
13047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13048for as_dir in $PATH
13049do
13050 IFS=$as_save_IFS
13051 test -z "$as_dir" && as_dir=.
13052 for ac_exec_ext in '' $ac_executable_extensions; do
13053 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13054 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
13055 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13056 break 2
13057 fi
13058done
13059done
55a2ea2a 13060
9f18db39
PB
13061 ;;
13062esac
13063fi
13064gcc_cv_as=$ac_cv_path_gcc_cv_as
55a2ea2a 13065
9f18db39
PB
13066if test -n "$gcc_cv_as"; then
13067 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13068echo "${ECHO_T}$gcc_cv_as" >&6
13069else
13070 echo "$as_me:$LINENO: result: no" >&5
13071echo "${ECHO_T}no" >&6
13072fi
13073
13074 test -n "$gcc_cv_as" && break
13075done
45499411 13076test -n "$gcc_cv_as" || gcc_cv_as="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext"
779243f7 13077
9e423e6d 13078fi
9f18db39
PB
13079test "$silent" != yes && exec 6>&1
13080
13081ORIGINAL_AS_FOR_TARGET="$gcc_cv_as"
13082
13083echo "$as_me:$LINENO: checking what assembler to use" >&5
13084echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
34a86c2b
NN
13085case $in_tree_gas in
13086 yes)
ba479fd2
NN
13087 echo "$as_me:$LINENO: result: \"newly built gas\"" >&5
13088echo "${ECHO_T}\"newly built gas\"" >&6
34a86c2b
NN
13089 ;;
13090 no)
ba479fd2
NN
13091 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13092echo "${ECHO_T}$gcc_cv_as" >&6
34a86c2b
NN
13093 ;;
13094esac
981d4858 13095
d869a8c4
NN
13096# Identify the linker which will work hand-in-glove with the newly
13097# built GCC, so that we can examine its features. This is the linker
13098# which will be driven by the driver program.
13099#
13100# If build != host, and we aren't building gas in-tree, we identify a
13101# build->target linker and hope that it will have the same features
13102# as the host->target linker we'll be using.
34a86c2b 13103in_tree_ld=no
275b60d6
JJ
13104gcc_cv_ld=
13105gcc_cv_gld_major_version=
13106gcc_cv_gld_minor_version=
13107gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
13108gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
13109if test -x "$DEFAULT_LINKER"; then
13110 gcc_cv_ld="$DEFAULT_LINKER"
34a86c2b 13111elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
08d105fa
AO
13112 && test -f ../ld/Makefile \
13113 && test x$build = x$host; then
13114 # Single tree build which includes ld. We want to prefer it
13115 # over whatever linker top-level may have detected, since
13116 # we'll use what we're building after installation anyway.
34a86c2b 13117 in_tree_ld=yes
5408ac6c
HPN
13118 in_tree_ld_is_elf=no
13119 if (grep 'EMUL = .*elf' ../ld/Makefile \
8a45d680
AN
13120 || grep 'EMUL = .*linux' ../ld/Makefile \
13121 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
5408ac6c
HPN
13122 in_tree_ld_is_elf=yes
13123 fi
275b60d6
JJ
13124 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
13125 do
58ea87a9 13126 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
275b60d6
JJ
13127 if test x$gcc_cv_gld_version != x; then
13128 break
13129 fi
13130 done
13131 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
13132 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
9f18db39
PB
13133 gcc_cv_ld=../ld/ld-new$build_exeext
13134elif test -x collect-ld$build_exeext; then
13135 # Build using linker in the current directory.
13136 gcc_cv_ld=./collect-ld$build_exeext
08d105fa
AO
13137elif test -x "$LD_FOR_TARGET"; then
13138 gcc_cv_ld="$LD_FOR_TARGET"
13139elif test -x "$LD" && test x$host = x$target; then
13140 gcc_cv_ld="$LD"
275b60d6
JJ
13141fi
13142
275b60d6 13143
9f18db39
PB
13144
13145
13146
13147exec 6>/dev/null
a2eafc76 13148if test "x$gcc_cv_ld" = x; then
c42adccb
PB
13149 # The AC_PATH_PROGS macro doesn't work properly when its 4th argument
13150 # is empty.
13151 if test "x$gcc_cv_tool_dirs" = x; then
13152 gcc_cv_ld=
13153 else
13154 for ac_prog in ld
9f18db39
PB
13155do
13156 # Extract the first word of "$ac_prog", so it can be a program name with args.
13157set dummy $ac_prog; ac_word=$2
13158echo "$as_me:$LINENO: checking for $ac_word" >&5
13159echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13160if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
13161 echo $ECHO_N "(cached) $ECHO_C" >&6
13162else
13163 case $gcc_cv_ld in
13164 [\\/]* | ?:[\\/]*)
13165 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
13166 ;;
13167 *)
13168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13169for as_dir in $gcc_cv_tool_dirs
13170do
13171 IFS=$as_save_IFS
13172 test -z "$as_dir" && as_dir=.
13173 for ac_exec_ext in '' $ac_executable_extensions; do
13174 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13175 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
13176 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13177 break 2
13178 fi
13179done
13180done
13181
13182 ;;
13183esac
13184fi
13185gcc_cv_ld=$ac_cv_path_gcc_cv_ld
13186
13187if test -n "$gcc_cv_ld"; then
13188 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13189echo "${ECHO_T}$gcc_cv_ld" >&6
13190else
13191 echo "$as_me:$LINENO: result: no" >&5
13192echo "${ECHO_T}no" >&6
13193fi
13194
13195 test -n "$gcc_cv_ld" && break
13196done
13197
c42adccb 13198 fi
a2eafc76 13199fi
9f18db39
PB
13200if test "x$gcc_cv_ld" = x; then
13201 # If the loop above did not find a tool, then use whatever
b095fe2c 13202 # one we can find in the users's path. We are looking for a
9f18db39 13203 # ${build} -> ${target} tool.
55a2ea2a 13204 if test "x$program_prefix" != xNONE; then
9f18db39 13205 default_tool_name=${program_prefix}ld
b095fe2c 13206 elif test x$build != x$host && test x$build != x$target; then
9f18db39 13207 default_tool_name=${target_noncanonical}-ld
55a2ea2a 13208 else
9f18db39 13209 default_tool_name=`echo ld | sed "${program_transform_name}"`
55a2ea2a 13210 fi
9f18db39
PB
13211 for ac_prog in $default_tool_name
13212do
13213 # Extract the first word of "$ac_prog", so it can be a program name with args.
13214set dummy $ac_prog; ac_word=$2
13215echo "$as_me:$LINENO: checking for $ac_word" >&5
13216echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13217if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
13218 echo $ECHO_N "(cached) $ECHO_C" >&6
13219else
13220 case $gcc_cv_ld in
13221 [\\/]* | ?:[\\/]*)
13222 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
13223 ;;
13224 *)
13225 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13226for as_dir in $PATH
13227do
13228 IFS=$as_save_IFS
13229 test -z "$as_dir" && as_dir=.
13230 for ac_exec_ext in '' $ac_executable_extensions; do
13231 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13232 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
13233 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13234 break 2
13235 fi
13236done
13237done
55a2ea2a 13238
9f18db39
PB
13239 ;;
13240esac
13241fi
13242gcc_cv_ld=$ac_cv_path_gcc_cv_ld
55a2ea2a 13243
9f18db39
PB
13244if test -n "$gcc_cv_ld"; then
13245 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13246echo "${ECHO_T}$gcc_cv_ld" >&6
13247else
13248 echo "$as_me:$LINENO: result: no" >&5
13249echo "${ECHO_T}no" >&6
13250fi
13251
13252 test -n "$gcc_cv_ld" && break
13253done
45499411 13254test -n "$gcc_cv_ld" || gcc_cv_ld="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext"
275b60d6 13255
275b60d6 13256fi
9f18db39
PB
13257test "$silent" != yes && exec 6>&1
13258
13259ORIGINAL_LD_FOR_TARGET="$gcc_cv_ld"
13260
13261echo "$as_me:$LINENO: checking what linker to use" >&5
13262echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
34a86c2b
NN
13263case $in_tree_ld in
13264 yes)
ba479fd2
NN
13265 echo "$as_me:$LINENO: result: \"newly built ld\"" >&5
13266echo "${ECHO_T}\"newly built ld\"" >&6
34a86c2b
NN
13267 ;;
13268 no)
ba479fd2
NN
13269 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13270echo "${ECHO_T}$gcc_cv_ld" >&6
34a86c2b
NN
13271 ;;
13272esac
275b60d6 13273
981d4858 13274# Figure out what nm we will be using.
f9c1196a 13275gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
f9c1196a 13276in_tree_nm=no
9f18db39
PB
13277gcc_cv_nm=
13278if test -f $gcc_cv_binutils_srcdir/configure.in \
f9c1196a
ZW
13279 && test -f ../binutils/Makefile; then
13280 # Single tree build which includes binutils.
13281 in_tree_nm=yes
9f18db39
PB
13282 gcc_cv_nm=../binutils/nm-new$build_exeext
13283elif test -x nm$build_exeext; then
57991eba 13284 gcc_cv_nm=./nm$build_exeext
9f18db39
PB
13285fi
13286
13287
13288
13289
13290
13291exec 6>/dev/null
a2eafc76 13292if test "x$gcc_cv_nm" = x; then
c42adccb
PB
13293 # The AC_PATH_PROGS macro doesn't work properly when its 4th argument
13294 # is empty.
13295 if test "x$gcc_cv_tool_dirs" = x; then
13296 gcc_cv_nm=
13297 else
13298 for ac_prog in nm
9f18db39
PB
13299do
13300 # Extract the first word of "$ac_prog", so it can be a program name with args.
13301set dummy $ac_prog; ac_word=$2
13302echo "$as_me:$LINENO: checking for $ac_word" >&5
13303echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13304if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
13305 echo $ECHO_N "(cached) $ECHO_C" >&6
534d0cc0 13306else
9f18db39
PB
13307 case $gcc_cv_nm in
13308 [\\/]* | ?:[\\/]*)
13309 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
13310 ;;
13311 *)
13312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13313for as_dir in $gcc_cv_tool_dirs
13314do
13315 IFS=$as_save_IFS
13316 test -z "$as_dir" && as_dir=.
13317 for ac_exec_ext in '' $ac_executable_extensions; do
13318 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13319 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
13320 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13321 break 2
13322 fi
13323done
13324done
13325
13326 ;;
13327esac
981d4858 13328fi
9f18db39
PB
13329gcc_cv_nm=$ac_cv_path_gcc_cv_nm
13330
13331if test -n "$gcc_cv_nm"; then
13332 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13333echo "${ECHO_T}$gcc_cv_nm" >&6
13334else
13335 echo "$as_me:$LINENO: result: no" >&5
13336echo "${ECHO_T}no" >&6
13337fi
13338
13339 test -n "$gcc_cv_nm" && break
13340done
13341
c42adccb 13342 fi
a2eafc76 13343fi
9f18db39
PB
13344if test "x$gcc_cv_nm" = x; then
13345 # If the loop above did not find a tool, then use whatever
13346 # one we can find in the users's path. We are looking for a
13347 # ${build} -> ${target} tool.
13348 if test "x$program_prefix" != xNONE; then
13349 default_tool_name=${program_prefix}nm
13350 elif test x$build != x$host && test x$build != x$target; then
13351 default_tool_name=${target_noncanonical}-nm
13352 else
13353 default_tool_name=`echo nm | sed "${program_transform_name}"`
13354 fi
13355 for ac_prog in $default_tool_name
13356do
13357 # Extract the first word of "$ac_prog", so it can be a program name with args.
13358set dummy $ac_prog; ac_word=$2
13359echo "$as_me:$LINENO: checking for $ac_word" >&5
13360echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13361if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
13362 echo $ECHO_N "(cached) $ECHO_C" >&6
13363else
13364 case $gcc_cv_nm in
13365 [\\/]* | ?:[\\/]*)
13366 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
13367 ;;
13368 *)
13369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13370for as_dir in $PATH
13371do
13372 IFS=$as_save_IFS
13373 test -z "$as_dir" && as_dir=.
13374 for ac_exec_ext in '' $ac_executable_extensions; do
13375 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13376 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
13377 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13378 break 2
13379 fi
13380done
13381done
13382
13383 ;;
13384esac
13385fi
13386gcc_cv_nm=$ac_cv_path_gcc_cv_nm
13387
13388if test -n "$gcc_cv_nm"; then
13389 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13390echo "${ECHO_T}$gcc_cv_nm" >&6
13391else
13392 echo "$as_me:$LINENO: result: no" >&5
13393echo "${ECHO_T}no" >&6
13394fi
13395
13396 test -n "$gcc_cv_nm" && break
13397done
45499411 13398test -n "$gcc_cv_nm" || gcc_cv_nm="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext"
9f18db39
PB
13399
13400fi
13401test "$silent" != yes && exec 6>&1
13402
13403ORIGINAL_NM_FOR_TARGET="$gcc_cv_nm"
13404
13405echo "$as_me:$LINENO: checking what nm to use" >&5
13406echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
f9c1196a 13407case $in_tree_nm in
ba479fd2
NN
13408 yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5
13409echo "${ECHO_T}\"newly built nm\"" >&6 ;;
13410 no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13411echo "${ECHO_T}$gcc_cv_nm" >&6 ;;
f9c1196a 13412esac
981d4858 13413
3cae5780 13414# Figure out what objdump we will be using.
ba479fd2
NN
13415echo "$as_me:$LINENO: checking what objdump to use" >&5
13416echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
f9c1196a 13417in_tree_objdump=no
57991eba
PB
13418if test -x objdump$build_exeext; then
13419 gcc_cv_objdump=./objdump$build_exeext
f9c1196a
ZW
13420elif test -f $gcc_cv_binutils_srcdir/configure.in \
13421 && test -f ../binutils/Makefile; then
13422 # Single tree build which includes binutils.
13423 in_tree_objdump=yes
9f18db39 13424 gcc_cv_objdump=../binutils/objdump$build_exeext
534d0cc0 13425elif test "x$program_prefix" != xNONE; then
57991eba 13426 gcc_cv_objdump=${program_prefix}objdump$build_exeext
b095fe2c
DJ
13427elif test x$build != x$host && test x$build != x$target; then
13428 gcc_cv_objdump=${target_noncanonical}-objdump$build_exeext
534d0cc0 13429else
f9c1196a 13430 gcc_cv_objdump=`echo objdump | \
57991eba 13431 sed "${program_transform_name}"`$build_exeext
3cae5780 13432fi
f9c1196a 13433case $in_tree_objdump in
ba479fd2
NN
13434 yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5
13435echo "${ECHO_T}\"newly built objdump\"" >&6 ;;
13436 no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13437echo "${ECHO_T}$gcc_cv_objdump" >&6 ;;
f9c1196a 13438esac
3cae5780 13439
981d4858 13440# Figure out what assembler alignment features are present.
ba479fd2
NN
13441echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13442echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
13443if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13444 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13445else
13446 gcc_cv_as_balign_and_p2align=no
13447 if test $in_tree_gas = yes; then
13448 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13449 then gcc_cv_as_balign_and_p2align=yes
13450fi
13451 elif test x$gcc_cv_as != x; then
6e3f3080 13452 echo '.balign 4
8ada417f 13453.p2align 2' > conftest.s
ba479fd2
NN
13454 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13456 (eval $ac_try) 2>&5
13457 ac_status=$?
13458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13459 (exit $ac_status); }; }
8ada417f
ZW
13460 then
13461 gcc_cv_as_balign_and_p2align=yes
13462 else
13463 echo "configure: failed program was" >&5
13464 cat conftest.s >&5
13465 fi
13466 rm -f conftest.o conftest.s
13467 fi
13468fi
ba479fd2
NN
13469echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13470echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 13471if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
13472
13473cat >>confdefs.h <<\_ACEOF
981d4858 13474#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 13475_ACEOF
981d4858 13476
ad9c4d9f
NN
13477fi
13478
ba479fd2
NN
13479echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13480echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
13481if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13482 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13483else
13484 gcc_cv_as_max_skip_p2align=no
13485 if test $in_tree_gas = yes; then
13486 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13487 then gcc_cv_as_max_skip_p2align=yes
13488fi
13489 elif test x$gcc_cv_as != x; then
6e3f3080 13490 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
13491 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13493 (eval $ac_try) 2>&5
13494 ac_status=$?
13495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13496 (exit $ac_status); }; }
8ada417f
ZW
13497 then
13498 gcc_cv_as_max_skip_p2align=yes
13499 else
13500 echo "configure: failed program was" >&5
13501 cat conftest.s >&5
13502 fi
13503 rm -f conftest.o conftest.s
13504 fi
ad9c4d9f 13505fi
ba479fd2
NN
13506echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13507echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 13508if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
13509
13510cat >>confdefs.h <<\_ACEOF
9e423e6d 13511#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 13512_ACEOF
9e423e6d 13513
9e423e6d 13514fi
ad9c4d9f 13515
ba479fd2
NN
13516echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13517echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
13518if test "${gcc_cv_as_subsection_m1+set}" = set; then
13519 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13520else
13521 gcc_cv_as_subsection_m1=no
13522 if test $in_tree_gas = yes; then
13523 if test $in_tree_gas_is_elf = yes \
13524 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13525 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 13526fi
8ada417f 13527 elif test x$gcc_cv_as != x; then
6e3f3080 13528 echo 'conftest_label1: .word 0
d1accaa3
JJ
13529.subsection -1
13530conftest_label2: .word 0
8ada417f 13531.previous' > conftest.s
ba479fd2
NN
13532 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13534 (eval $ac_try) 2>&5
13535 ac_status=$?
13536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13537 (exit $ac_status); }; }
8ada417f
ZW
13538 then
13539 if test x$gcc_cv_nm != x; then
13540 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13541 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13542 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13543 then :
13544 else gcc_cv_as_subsection_m1=yes
13545 fi
13546 rm -f conftest.nm1 conftest.nm2
13547 fi
13548 else
13549 echo "configure: failed program was" >&5
13550 cat conftest.s >&5
13551 fi
13552 rm -f conftest.o conftest.s
13553 fi
981d4858 13554fi
ba479fd2
NN
13555echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13556echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 13557if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
13558
13559cat >>confdefs.h <<\_ACEOF
981d4858 13560#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 13561_ACEOF
981d4858 13562
d1accaa3 13563fi
ad9c4d9f 13564
ba479fd2
NN
13565echo "$as_me:$LINENO: checking assembler for .weak" >&5
13566echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
13567if test "${gcc_cv_as_weak+set}" = set; then
13568 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13569else
13570 gcc_cv_as_weak=no
13571 if test $in_tree_gas = yes; then
13572 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13573 then gcc_cv_as_weak=yes
ad9c4d9f 13574fi
8ada417f 13575 elif test x$gcc_cv_as != x; then
6e3f3080 13576 echo ' .weak foobar' > conftest.s
ba479fd2
NN
13577 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13579 (eval $ac_try) 2>&5
13580 ac_status=$?
13581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13582 (exit $ac_status); }; }
8ada417f
ZW
13583 then
13584 gcc_cv_as_weak=yes
13585 else
13586 echo "configure: failed program was" >&5
13587 cat conftest.s >&5
13588 fi
13589 rm -f conftest.o conftest.s
13590 fi
981d4858 13591fi
ba479fd2
NN
13592echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13593echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 13594if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
13595
13596cat >>confdefs.h <<\_ACEOF
981d4858 13597#define HAVE_GAS_WEAK 1
ba479fd2 13598_ACEOF
981d4858 13599
12822146 13600fi
ad9c4d9f 13601
e41f3691
JDA
13602echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13603echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
13604if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13605 echo $ECHO_N "(cached) $ECHO_C" >&6
13606else
13607 gcc_cv_as_nsubspa_comdat=no
13608 if test $in_tree_gas = yes; then
13609 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13610 then gcc_cv_as_nsubspa_comdat=yes
13611fi
13612 elif test x$gcc_cv_as != x; then
13613 echo ' .SPACE $TEXT$
13614 .NSUBSPA $CODE$,COMDAT' > conftest.s
13615 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13617 (eval $ac_try) 2>&5
13618 ac_status=$?
13619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13620 (exit $ac_status); }; }
13621 then
13622 gcc_cv_as_nsubspa_comdat=yes
13623 else
13624 echo "configure: failed program was" >&5
13625 cat conftest.s >&5
13626 fi
13627 rm -f conftest.o conftest.s
13628 fi
13629fi
13630echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13631echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
13632if test $gcc_cv_as_nsubspa_comdat = yes; then
13633
13634cat >>confdefs.h <<\_ACEOF
13635#define HAVE_GAS_NSUBSPA_COMDAT 1
13636_ACEOF
13637
13638fi
13639
8ada417f
ZW
13640# .hidden needs to be supported in both the assembler and the linker,
13641# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13642# This is irritatingly difficult to feature test for; we have to check the
13643# date string after the version number. If we've got an in-tree
13644# ld, we don't know its patchlevel version, so we set the baseline at 2.13
13645# to be safe.
13646# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
13647echo "$as_me:$LINENO: checking assembler for .hidden" >&5
13648echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
13649if test "${gcc_cv_as_hidden+set}" = set; then
13650 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13651else
13652 gcc_cv_as_hidden=no
13653 if test $in_tree_gas = yes; then
13654 if test $in_tree_gas_is_elf = yes \
13655 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
13656 then gcc_cv_as_hidden=yes
13657fi
13658 elif test x$gcc_cv_as != x; then
6e3f3080 13659 echo ' .hidden foobar
8ada417f 13660foobar:' > conftest.s
ba479fd2
NN
13661 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13663 (eval $ac_try) 2>&5
13664 ac_status=$?
13665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13666 (exit $ac_status); }; }
8ada417f
ZW
13667 then
13668 gcc_cv_as_hidden=yes
13669 else
13670 echo "configure: failed program was" >&5
13671 cat conftest.s >&5
13672 fi
13673 rm -f conftest.o conftest.s
13674 fi
13675fi
ba479fd2
NN
13676echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
13677echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 13678
ad9c4d9f 13679
ba479fd2
NN
13680echo "$as_me:$LINENO: checking linker for .hidden support" >&5
13681echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
13682if test "${gcc_cv_ld_hidden+set}" = set; then
13683 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13684else
13685 if test $in_tree_ld = yes ; then
13686 gcc_cv_ld_hidden=no
13687 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 \
13688 && test $in_tree_ld_is_elf = yes; then
13689 gcc_cv_ld_hidden=yes
13690 fi
13691else
13692 gcc_cv_ld_hidden=yes
bace148a 13693 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
13694 if echo "$ld_ver" | grep GNU > /dev/null; then
13695 ld_vers=`echo $ld_ver | sed -n \
13696 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13697 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13698 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13699 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13700 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
11176d2a
JB
13701 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13702 -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 13703 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
13704 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
13705 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
13706 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
13707 if test 0"$ld_date" -lt 20020404; then
13708 if test -n "$ld_date"; then
13709 # If there was date string, but was earlier than 2002-04-04, fail
13710 gcc_cv_ld_hidden=no
13711 elif test -z "$ld_vers"; then
13712 # If there was no date string nor ld version number, something is wrong
13713 gcc_cv_ld_hidden=no
13714 else
8ada417f
ZW
13715 test -z "$ld_vers_patch" && ld_vers_patch=0
13716 if test "$ld_vers_major" -lt 2; then
13717 gcc_cv_ld_hidden=no
13718 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
13719 gcc_cv_ld_hidden="no"
13720 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
13721 gcc_cv_ld_hidden=no
c72931a6 13722 fi
8ada417f 13723 fi
789b7de5 13724 fi
8ada417f 13725 else
28690784 13726 case "${target}" in
b0fd7d27 13727 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
13728 gcc_cv_ld_hidden=yes
13729 ;;
13730 *)
13731 gcc_cv_ld_hidden=no
13732 ;;
13733 esac
8ada417f
ZW
13734 fi
13735fi
6d07784a 13736fi
ba479fd2
NN
13737echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
13738echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 13739libgcc_visibility=no
ad9c4d9f 13740
232b67d9 13741
8e3940b2 13742if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 13743 libgcc_visibility=yes
ba479fd2
NN
13744
13745cat >>confdefs.h <<\_ACEOF
8ada417f 13746#define HAVE_GAS_HIDDEN 1
ba479fd2 13747_ACEOF
ad9c4d9f
NN
13748
13749fi
13750
8ada417f 13751# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
13752echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
13753echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
13754if test "${gcc_cv_as_leb128+set}" = set; then
13755 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13756else
13757 gcc_cv_as_leb128=no
13758 if test $in_tree_gas = yes; then
13759 if test $in_tree_gas_is_elf = yes \
13760 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
13761 then gcc_cv_as_leb128=yes
13762fi
13763 elif test x$gcc_cv_as != x; then
6e3f3080 13764 echo ' .data
b7460f24
RH
13765 .uleb128 L2 - L1
13766L1:
13767 .uleb128 1280
13768 .sleb128 -1010
8ada417f 13769L2:' > conftest.s
ba479fd2
NN
13770 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13772 (eval $ac_try) 2>&5
13773 ac_status=$?
13774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13775 (exit $ac_status); }; }
8ada417f
ZW
13776 then
13777 # GAS versions before 2.11 do not support uleb128,
13778 # despite appearing to.
13779 # ??? There exists an elf-specific test that will crash
13780 # the assembler. Perhaps it's better to figure out whether
13781 # arbitrary sections are supported and try the test.
bace148a 13782 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
13783 if echo "$as_ver" | grep GNU > /dev/null; then
13784 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
13785 as_major=`echo $as_ver | sed 's/\..*//'`
13786 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
13787 if test $as_major -eq 2 && test $as_minor -lt 11
13788 then :
13789 else gcc_cv_as_leb128=yes
13790 fi
13791 fi
13792 else
13793 echo "configure: failed program was" >&5
13794 cat conftest.s >&5
13795 fi
13796 rm -f conftest.o conftest.s
13797 fi
b7460f24 13798fi
ba479fd2
NN
13799echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
13800echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 13801if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
13802
13803cat >>confdefs.h <<\_ACEOF
b7460f24 13804#define HAVE_AS_LEB128 1
ba479fd2 13805_ACEOF
b7460f24
RH
13806
13807fi
ad9c4d9f 13808
8ada417f
ZW
13809# GAS versions up to and including 2.11.0 may mis-optimize
13810# .eh_frame data.
ba479fd2
NN
13811echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
13812echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
13813if test "${gcc_cv_as_eh_frame+set}" = set; then
13814 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13815else
13816 gcc_cv_as_eh_frame=no
13817 if test $in_tree_gas = yes; then
13818 if test $in_tree_gas_is_elf = yes \
13819 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13820 then gcc_cv_as_eh_frame=yes
ad9c4d9f 13821fi
8ada417f 13822 elif test x$gcc_cv_as != x; then
6e3f3080 13823 echo ' .text
c64688ae
RH
13824.LFB1:
13825 .4byte 0
13826.L1:
13827 .4byte 0
13828.LFE1:
13829 .section .eh_frame,"aw",@progbits
13830__FRAME_BEGIN__:
13831 .4byte .LECIE1-.LSCIE1
13832.LSCIE1:
13833 .4byte 0x0
13834 .byte 0x1
13835 .ascii "z\0"
13836 .byte 0x1
13837 .byte 0x78
13838 .byte 0x1a
13839 .byte 0x0
13840 .byte 0x4
13841 .4byte 1
13842 .p2align 1
13843.LECIE1:
13844.LSFDE1:
13845 .4byte .LEFDE1-.LASFDE1
13846.LASFDE1:
13847 .4byte .LASFDE1-__FRAME_BEGIN__
13848 .4byte .LFB1
13849 .4byte .LFE1-.LFB1
13850 .byte 0x4
13851 .4byte .LFE1-.LFB1
13852 .byte 0x4
13853 .4byte .L1-.LFB1
8ada417f 13854.LEFDE1:' > conftest.s
ba479fd2
NN
13855 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13857 (eval $ac_try) 2>&5
13858 ac_status=$?
13859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13860 (exit $ac_status); }; }
8ada417f
ZW
13861 then
13862 cat > conftest.lit <<EOF
c64688ae
RH
13863 0000 10000000 00000000 017a0001 781a0004 .........z..x...
13864 0010 01000000 12000000 18000000 00000000 ................
093e61a6 13865 0020 08000000 04080000 0044 .........D
01efb963 13866EOF
ba479fd2 13867cat > conftest.big <<EOF
01efb963
AS
13868 0000 00000010 00000000 017a0001 781a0004 .........z..x...
13869 0010 00000001 00000012 00000018 00000000 ................
093e61a6 13870 0020 00000008 04000000 0844 .........D
c64688ae 13871EOF
8ada417f
ZW
13872 # If the assembler didn't choke, and we can objdump,
13873 # and we got the correct data, then succeed.
13874 if test x$gcc_cv_objdump != x \
13875 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
13876 | tail -3 > conftest.got \
13877 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
13878 || cmp conftest.big conftest.got > /dev/null 2>&1; }
13879 then
13880 gcc_cv_as_eh_frame=yes
ba479fd2
NN
13881 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
13882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13883 (eval $ac_try) 2>&5
13884 ac_status=$?
13885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13886 (exit $ac_status); }; }; then
8ada417f
ZW
13887 gcc_cv_as_eh_frame=buggy
13888 else
13889 # Uh oh, what do we do now?
13890 gcc_cv_as_eh_frame=no
13891 fi
13892 else
13893 echo "configure: failed program was" >&5
13894 cat conftest.s >&5
13895 fi
13896 rm -f conftest.o conftest.s
13897 fi
c64688ae 13898fi
ba479fd2
NN
13899echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
13900echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 13901
6e3f3080 13902
63cf211a 13903if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
13904
13905cat >>confdefs.h <<\_ACEOF
8ada417f 13906#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 13907_ACEOF
ad9c4d9f
NN
13908
13909fi
13910
ba479fd2
NN
13911echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13912echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13913if test "${gcc_cv_as_shf_merge+set}" = set; then
13914 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13915else
13916 gcc_cv_as_shf_merge=no
13917 if test $in_tree_gas = yes; then
13918 if test $in_tree_gas_is_elf = yes \
13919 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13920 then gcc_cv_as_shf_merge=yes
13921fi
13922 elif test x$gcc_cv_as != x; then
6e3f3080 13923 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
13924 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13926 (eval $ac_try) 2>&5
13927 ac_status=$?
13928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13929 (exit $ac_status); }; }
8ada417f
ZW
13930 then
13931 gcc_cv_as_shf_merge=yes
13932 else
13933 echo "configure: failed program was" >&5
13934 cat conftest.s >&5
13935 fi
13936 rm -f conftest.o conftest.s
13937 fi
201556f0 13938fi
ba479fd2
NN
13939echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13940echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 13941
c18a5b6c
MM
13942if test $gcc_cv_as_shf_merge = no; then
13943 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13944echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13945if test "${gcc_cv_as_shf_merge+set}" = set; then
13946 echo $ECHO_N "(cached) $ECHO_C" >&6
13947else
13948 gcc_cv_as_shf_merge=no
13949 if test $in_tree_gas = yes; then
13950 if test $in_tree_gas_is_elf = yes \
13951 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13952 then gcc_cv_as_shf_merge=yes
13953fi
13954 elif test x$gcc_cv_as != x; then
13955 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
13956 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13958 (eval $ac_try) 2>&5
13959 ac_status=$?
13960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13961 (exit $ac_status); }; }
13962 then
13963 gcc_cv_as_shf_merge=yes
13964 else
13965 echo "configure: failed program was" >&5
13966 cat conftest.s >&5
13967 fi
13968 rm -f conftest.o conftest.s
13969 fi
13970fi
13971echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13972echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
13973
13974fi
8ad9fb33 13975
ba479fd2 13976cat >>confdefs.h <<_ACEOF
8ad9fb33 13977#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 13978_ACEOF
201556f0 13979
201556f0 13980
c18a5b6c
MM
13981echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13982echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13983if test "${gcc_cv_as_comdat_group+set}" = set; then
13984 echo $ECHO_N "(cached) $ECHO_C" >&6
13985else
13986 gcc_cv_as_comdat_group=no
13987 if test $in_tree_gas = yes; then
13988 if test $in_tree_gas_is_elf = yes \
11176d2a 13989 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
13990 then gcc_cv_as_comdat_group=yes
13991fi
13992 elif test x$gcc_cv_as != x; then
13993 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
13994 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13996 (eval $ac_try) 2>&5
13997 ac_status=$?
13998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13999 (exit $ac_status); }; }
14000 then
14001 gcc_cv_as_comdat_group=yes
14002 else
14003 echo "configure: failed program was" >&5
14004 cat conftest.s >&5
14005 fi
14006 rm -f conftest.o conftest.s
14007 fi
14008fi
14009echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
14010echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
14011
14012if test $gcc_cv_as_comdat_group = yes; then
14013 gcc_cv_as_comdat_group_percent=no
14014else
14015 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14016echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
14017if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
14018 echo $ECHO_N "(cached) $ECHO_C" >&6
14019else
14020 gcc_cv_as_comdat_group_percent=no
14021 if test $in_tree_gas = yes; then
14022 if test $in_tree_gas_is_elf = yes \
11176d2a 14023 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14024 then gcc_cv_as_comdat_group_percent=yes
14025fi
14026 elif test x$gcc_cv_as != x; then
14027 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
14028 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14030 (eval $ac_try) 2>&5
14031 ac_status=$?
14032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14033 (exit $ac_status); }; }
14034 then
14035 gcc_cv_as_comdat_group_percent=yes
14036 else
14037 echo "configure: failed program was" >&5
14038 cat conftest.s >&5
14039 fi
14040 rm -f conftest.o conftest.s
14041 fi
14042fi
14043echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
14044echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
14045
14046fi
11176d2a
JB
14047if test $in_tree_ld != yes && test x"$ld_vers" != x; then
14048 comdat_group=yes
14049 if test 0"$ld_date" -lt 20050308; then
14050 if test -n "$ld_date"; then
14051 # If there was date string, but was earlier than 2005-03-08, fail
14052 comdat_group=no
14053 elif test "$ld_vers_major" -lt 2; then
14054 comdat_group=no
14055 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
14056 comdat_group=no
14057 fi
14058 fi
14059 if test $comdat_group = no; then
14060 gcc_cv_as_comdat_group=no
14061 gcc_cv_as_comdat_group_percent=no
14062 fi
14063fi
c18a5b6c
MM
14064
14065cat >>confdefs.h <<_ACEOF
11176d2a 14066#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
14067_ACEOF
14068
14069
8ada417f 14070# Thread-local storage - the check is heavily parametrized.
f996902d
RH
14071conftest_s=
14072tls_first_major=
14073tls_first_minor=
9739c90c 14074tls_as_opt=
f996902d 14075case "$target" in
6f9b006d
RH
14076 alpha*-*-*)
14077 conftest_s='
14078 .section ".tdata","awT",@progbits
14079foo: .long 25
14080 .text
14081 ldq $27,__tls_get_addr($29) !literal!1
14082 lda $16,foo($29) !tlsgd!1
14083 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
14084 ldq $27,__tls_get_addr($29) !literal!2
14085 lda $16,foo($29) !tlsldm!2
14086 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
14087 ldq $1,foo($29) !gotdtprel
14088 ldah $2,foo($29) !dtprelhi
14089 lda $3,foo($2) !dtprello
14090 lda $4,foo($29) !dtprel
14091 ldq $1,foo($29) !gottprel
14092 ldah $2,foo($29) !tprelhi
14093 lda $3,foo($2) !tprello
14094 lda $4,foo($29) !tprel'
14095 tls_first_major=2
14096 tls_first_minor=13
2f3321ca 14097 tls_as_opt=--fatal-warnings
6f9b006d 14098 ;;
e4dd71de
AH
14099 frv*-*-*)
14100 conftest_s='
14101 .section ".tdata","awT",@progbits
14102x: .long 25
14103 .text
14104 call #gettlsoff(x)'
14105 tls_first_major=2
14106 tls_first_minor=14
14107 ;;
51076f96
RC
14108 hppa*-*-linux*)
14109 conftest_s='
14110t1: .reg %r20
14111t2: .reg %r21
14112gp: .reg %r19
14113 .section ".tdata","awT",@progbits
14114foo: .long 25
14115 .text
14116 .align 4
14117 addil LT%foo-$tls_gdidx$,gp
14118 ldo RT%foo-$tls_gdidx$(%r1),%arg0
14119 b __tls_get_addr
14120 nop
14121 addil LT%foo-$tls_ldidx$,gp
14122 b __tls_get_addr
14123 ldo RT%foo-$tls_ldidx$(%r1),%arg0
14124 addil LR%foo-$tls_dtpoff$,%ret0
14125 ldo RR%foo-$tls_dtpoff$(%r1),%t1
14126 mfctl %cr27,%t1
14127 addil LT%foo-$tls_ieoff$,gp
14128 ldw RT%foo-$tls_ieoff$(%r1),%t2
14129 add %t1,%t2,%t3
14130 mfctl %cr27,%t1
14131 addil LR%foo-$tls_leoff$,%t1
14132 ldo RR%foo-$tls_leoff$(%r1),%t2'
14133 tls_first_major=2
14134 tls_first_minor=15
14135 tls_as_opt=--fatal-warnings
14136 ;;
f996902d
RH
14137 i[34567]86-*-*)
14138 conftest_s='
14139 .section ".tdata","awT",@progbits
14140foo: .long 25
14141 .text
14142 movl %gs:0, %eax
14143 leal foo@TLSGD(,%ebx,1), %eax
14144 leal foo@TLSLDM(%ebx), %eax
14145 leal foo@DTPOFF(%eax), %edx
14146 movl foo@GOTTPOFF(%ebx), %eax
14147 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
14148 addl foo@GOTNTPOFF(%ebx), %eax
14149 movl foo@INDNTPOFF, %eax
f996902d
RH
14150 movl $foo@TPOFF, %eax
14151 subl $foo@TPOFF, %eax
14152 leal foo@NTPOFF(%ecx), %eax'
14153 tls_first_major=2
75d38379 14154 tls_first_minor=14
2f3321ca 14155 tls_as_opt=--fatal-warnings
75d38379
JJ
14156 ;;
14157 x86_64-*-*)
14158 conftest_s='
14159 .section ".tdata","awT",@progbits
14160foo: .long 25
14161 .text
14162 movq %fs:0, %rax
14163 leaq foo@TLSGD(%rip), %rdi
14164 leaq foo@TLSLD(%rip), %rdi
14165 leaq foo@DTPOFF(%rax), %rdx
14166 movq foo@GOTTPOFF(%rip), %rax
14167 movq $foo@TPOFF, %rax'
14168 tls_first_major=2
14169 tls_first_minor=14
2f3321ca 14170 tls_as_opt=--fatal-warnings
f996902d 14171 ;;
7b6e506e
RH
14172 ia64-*-*)
14173 conftest_s='
14174 .section ".tdata","awT",@progbits
14175foo: data8 25
14176 .text
14177 addl r16 = @ltoff(@dtpmod(foo#)), gp
14178 addl r17 = @ltoff(@dtprel(foo#)), gp
14179 addl r18 = @ltoff(@tprel(foo#)), gp
14180 addl r19 = @dtprel(foo#), gp
14181 adds r21 = @dtprel(foo#), r13
14182 movl r23 = @dtprel(foo#)
14183 addl r20 = @tprel(foo#), gp
14184 adds r22 = @tprel(foo#), r13
14185 movl r24 = @tprel(foo#)'
14186 tls_first_major=2
14187 tls_first_minor=13
2f3321ca 14188 tls_as_opt=--fatal-warnings
7b6e506e 14189 ;;
69229b81
DJ
14190 mips*-*-*)
14191 conftest_s='
14192 .section .tdata,"awT",@progbits
14193x:
14194 .word 2
14195 .text
14196 addiu $4, $28, %tlsgd(x)
14197 addiu $4, $28, %tlsldm(x)
14198 lui $4, %dtprel_hi(x)
14199 addiu $4, $4, %dtprel_lo(x)
14200 lw $4, %gottprel(x)($28)
14201 lui $4, %tprel_hi(x)
14202 addiu $4, $4, %tprel_lo(x)'
14203 tls_first_major=2
14204 tls_first_minor=16
14205 tls_as_opt='-32 --fatal-warnings'
14206 ;;
c4501e62
JJ
14207 powerpc-*-*)
14208 conftest_s='
14209 .section ".tdata","awT",@progbits
14210 .align 2
14211ld0: .space 4
14212ld1: .space 4
14213x1: .space 4
14214x2: .space 4
14215x3: .space 4
14216 .text
14217 addi 3,31,ld0@got@tlsgd
14218 bl __tls_get_addr
14219 addi 3,31,x1@got@tlsld
14220 bl __tls_get_addr
14221 addi 9,3,x1@dtprel
14222 addis 9,3,x2@dtprel@ha
14223 addi 9,9,x2@dtprel@l
14224 lwz 9,x3@got@tprel(31)
14225 add 9,9,x@tls
14226 addi 9,2,x1@tprel
14227 addis 9,2,x2@tprel@ha
14228 addi 9,9,x2@tprel@l'
14229 tls_first_major=2
14230 tls_first_minor=14
2f3321ca 14231 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
14232 ;;
14233 powerpc64-*-*)
14234 conftest_s='
14235 .section ".tdata","awT",@progbits
14236 .align 3
14237ld0: .space 8
14238ld1: .space 8
14239x1: .space 8
14240x2: .space 8
14241x3: .space 8
14242 .text
14243 addi 3,2,ld0@got@tlsgd
14244 bl .__tls_get_addr
14245 nop
14246 addi 3,2,ld1@toc
14247 bl .__tls_get_addr
14248 nop
14249 addi 3,2,x1@got@tlsld
14250 bl .__tls_get_addr
14251 nop
14252 addi 9,3,x1@dtprel
14253 bl .__tls_get_addr
14254 nop
14255 addis 9,3,x2@dtprel@ha
14256 addi 9,9,x2@dtprel@l
14257 bl .__tls_get_addr
14258 nop
14259 ld 9,x3@got@dtprel(2)
14260 add 9,9,3
14261 bl .__tls_get_addr
14262 nop'
14263 tls_first_major=2
14264 tls_first_minor=14
2f3321ca 14265 tls_as_opt="-a64 --fatal-warnings"
c4501e62 14266 ;;
fd3cd001
UW
14267 s390-*-*)
14268 conftest_s='
14269 .section ".tdata","awT",@progbits
14270foo: .long 25
14271 .text
14272 .long foo@TLSGD
14273 .long foo@TLSLDM
14274 .long foo@DTPOFF
14275 .long foo@NTPOFF
14276 .long foo@GOTNTPOFF
14277 .long foo@INDNTPOFF
14278 l %r1,foo@GOTNTPOFF(%r12)
14279 l %r1,0(%r1):tls_load:foo
14280 bas %r14,0(%r1,%r13):tls_gdcall:foo
14281 bas %r14,0(%r1,%r13):tls_ldcall:foo'
14282 tls_first_major=2
14283 tls_first_minor=14
2f3321ca 14284 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
14285 ;;
14286 s390x-*-*)
14287 conftest_s='
14288 .section ".tdata","awT",@progbits
14289foo: .long 25
14290 .text
14291 .quad foo@TLSGD
14292 .quad foo@TLSLDM
14293 .quad foo@DTPOFF
14294 .quad foo@NTPOFF
14295 .quad foo@GOTNTPOFF
14296 lg %r1,foo@GOTNTPOFF(%r12)
14297 larl %r1,foo@INDNTPOFF
14298 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
14299 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
14300 tls_first_major=2
14301 tls_first_minor=14
2f3321ca 14302 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 14303 ;;
9ff13962
KK
14304 sh-*-* | sh[34]-*-*)
14305 conftest_s='
14306 .section ".tdata","awT",@progbits
14307foo: .long 25
14308 .text
14309 .long foo@TLSGD
14310 .long foo@TLSLDM
14311 .long foo@DTPOFF
14312 .long foo@GOTTPOFF
14313 .long foo@TPOFF'
14314 tls_first_major=2
14315 tls_first_minor=13
2f3321ca 14316 tls_as_opt=--fatal-warnings
9ff13962 14317 ;;
5751a10b 14318 sparc*-*-*)
2f3321ca
EB
14319 case "$target" in
14320 sparc*-sun-solaris2.*)
14321 on_solaris=yes
14322 ;;
14323 *)
14324 on_solaris=no
14325 ;;
14326 esac
14327 if test x$on_solaris = xyes && test x$gas_flag = xno; then
14328 conftest_s='
14329 .section ".tdata",#alloc,#write,#tls
14330foo: .long 25
14331 .text
14332 sethi %tgd_hi22(foo), %o0
14333 add %o0, %tgd_lo10(foo), %o1
14334 add %l7, %o1, %o0, %tgd_add(foo)
14335 call __tls_get_addr, %tgd_call(foo)
14336 sethi %tldm_hi22(foo), %l1
14337 add %l1, %tldm_lo10(foo), %l2
14338 add %l7, %l2, %o0, %tldm_add(foo)
14339 call __tls_get_addr, %tldm_call(foo)
14340 sethi %tldo_hix22(foo), %l3
14341 xor %l3, %tldo_lox10(foo), %l4
14342 add %o0, %l4, %l5, %tldo_add(foo)
14343 sethi %tie_hi22(foo), %o3
14344 add %o3, %tie_lo10(foo), %o3
14345 ld [%l7 + %o3], %o2, %tie_ld(foo)
14346 add %g7, %o2, %o4, %tie_add(foo)
14347 sethi %tle_hix22(foo), %l1
14348 xor %l1, %tle_lox10(foo), %o5
14349 ld [%g7 + %o5], %o1'
14350 tls_first_major=0
14351 tls_first_minor=0
14352 else
14353 conftest_s='
5751a10b
JJ
14354 .section ".tdata","awT",@progbits
14355foo: .long 25
14356 .text
14357 sethi %tgd_hi22(foo), %o0
14358 add %o0, %tgd_lo10(foo), %o1
14359 add %l7, %o1, %o0, %tgd_add(foo)
14360 call __tls_get_addr, %tgd_call(foo)
14361 sethi %tldm_hi22(foo), %l1
14362 add %l1, %tldm_lo10(foo), %l2
14363 add %l7, %l2, %o0, %tldm_add(foo)
14364 call __tls_get_addr, %tldm_call(foo)
14365 sethi %tldo_hix22(foo), %l3
14366 xor %l3, %tldo_lox10(foo), %l4
14367 add %o0, %l4, %l5, %tldo_add(foo)
14368 sethi %tie_hi22(foo), %o3
14369 add %o3, %tie_lo10(foo), %o3
14370 ld [%l7 + %o3], %o2, %tie_ld(foo)
14371 add %g7, %o2, %o4, %tie_add(foo)
14372 sethi %tle_hix22(foo), %l1
14373 xor %l1, %tle_lox10(foo), %o5
14374 ld [%g7 + %o5], %o1'
14375 tls_first_major=2
14376 tls_first_minor=14
2f3321ca
EB
14377 tls_as_opt="-32 --fatal-warnings"
14378 fi
5751a10b 14379 ;;
f996902d
RH
14380esac
14381if test -z "$tls_first_major"; then
8ada417f
ZW
14382 : # If we don't have a check, assume no support.
14383else
ba479fd2
NN
14384 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
14385echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
14386if test "${gcc_cv_as_tls+set}" = set; then
14387 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14388else
14389 gcc_cv_as_tls=no
14390 if test $in_tree_gas = yes; then
14391 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
14392 then gcc_cv_as_tls=yes
ad9c4d9f 14393fi
8ada417f 14394 elif test x$gcc_cv_as != x; then
6e3f3080 14395 echo "$conftest_s" > conftest.s
2f3321ca 14396 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
14397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14398 (eval $ac_try) 2>&5
14399 ac_status=$?
14400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14401 (exit $ac_status); }; }
8ada417f
ZW
14402 then
14403 gcc_cv_as_tls=yes
14404 else
14405 echo "configure: failed program was" >&5
14406 cat conftest.s >&5
14407 fi
14408 rm -f conftest.o conftest.s
f996902d 14409 fi
f996902d 14410fi
ba479fd2
NN
14411echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
14412echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 14413if test $gcc_cv_as_tls = yes; then
ba479fd2
NN
14414
14415cat >>confdefs.h <<\_ACEOF
f996902d 14416#define HAVE_AS_TLS 1
ba479fd2 14417_ACEOF
f996902d
RH
14418
14419fi
8ada417f
ZW
14420fi
14421
14422# Target-specific assembler checks.
f996902d 14423
7e9d8517
L
14424echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
14425echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
14426gcc_cv_ld_static_dynamic=no
14427if test $in_tree_ld = yes ; then
14428 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
14429 gcc_cv_ld_static_dynamic=yes
14430 fi
14431elif test x$gcc_cv_ld != x; then
14432 # Check if linker supports -Bstatic/-Bdynamic option
14433 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
14434 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
14435 gcc_cv_ld_static_dynamic=yes
14436 fi
14437fi
14438if test x"$gcc_cv_ld_static_dynamic" = xyes; then
14439
14440cat >>confdefs.h <<\_ACEOF
14441#define HAVE_LD_STATIC_DYNAMIC 1
14442_ACEOF
14443
14444fi
14445echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14446echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
14447
d594623a
L
14448if test x"$demangler_in_ld" = xyes; then
14449 echo "$as_me:$LINENO: checking linker --demangle support" >&5
14450echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
14451 gcc_cv_ld_demangle=no
14452 if test $in_tree_ld = yes; then
14453 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 \
14454 gcc_cv_ld_demangle=yes
14455 fi
14456 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14457 # Check if the GNU linker supports --demangle option
14458 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14459 gcc_cv_ld_demangle=yes
14460 fi
14461 fi
14462 if test x"$gcc_cv_ld_demangle" = xyes; then
14463
14464cat >>confdefs.h <<\_ACEOF
14465#define HAVE_LD_DEMANGLE 1
14466_ACEOF
14467
14468 fi
14469 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14470echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
14471fi
14472
3a37b08e
RH
14473case "$target" in
14474 # All TARGET_ABI_OSF targets.
14475 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
14476 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14477echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14478if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14479 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 14480else
8ada417f
ZW
14481 gcc_cv_as_alpha_explicit_relocs=no
14482 if test $in_tree_gas = yes; then
14483 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14484 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 14485fi
8ada417f 14486 elif test x$gcc_cv_as != x; then
6e3f3080 14487 echo ' .set nomacro
3a37b08e
RH
14488 .text
14489 extbl $3, $2, $3 !lituse_bytoff!1
14490 ldq $2, a($29) !literal!1
14491 ldq $4, b($29) !literal!2
14492 ldq_u $3, 0($2) !lituse_base!1
14493 ldq $27, f($29) !literal!5
14494 jsr $26, ($27), f !lituse_jsr!5
14495 ldah $29, 0($26) !gpdisp!3
14496 lda $0, c($29) !gprel
14497 ldah $1, d($29) !gprelhigh
14498 lda $1, d($1) !gprellow
8ada417f 14499 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
14500 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14502 (eval $ac_try) 2>&5
14503 ac_status=$?
14504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14505 (exit $ac_status); }; }
8ada417f
ZW
14506 then
14507 gcc_cv_as_alpha_explicit_relocs=yes
14508 else
14509 echo "configure: failed program was" >&5
14510 cat conftest.s >&5
14511 fi
14512 rm -f conftest.o conftest.s
14513 fi
cafe096b 14514fi
ba479fd2
NN
14515echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14516echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 14517if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
14518
14519cat >>confdefs.h <<\_ACEOF
3a37b08e 14520#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 14521_ACEOF
3a37b08e 14522
d006f5eb
RH
14523fi
14524 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
14525echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
14526if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
14527 echo $ECHO_N "(cached) $ECHO_C" >&6
14528else
14529 gcc_cv_as_alpha_jsrdirect_relocs=no
14530 if test $in_tree_gas = yes; then
14531 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
14532 then gcc_cv_as_alpha_jsrdirect_relocs=yes
14533fi
14534 elif test x$gcc_cv_as != x; then
14535 echo ' .set nomacro
14536 .text
14537 ldq $27, a($29) !literal!1
14538 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
14539 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14541 (eval $ac_try) 2>&5
14542 ac_status=$?
14543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14544 (exit $ac_status); }; }
14545 then
14546 gcc_cv_as_alpha_jsrdirect_relocs=yes
14547 else
14548 echo "configure: failed program was" >&5
14549 cat conftest.s >&5
14550 fi
14551 rm -f conftest.o conftest.s
14552 fi
14553fi
14554echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
14555echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
14556if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
14557
14558cat >>confdefs.h <<\_ACEOF
14559#define HAVE_AS_JSRDIRECT_RELOCS 1
14560_ACEOF
14561
86da66b5
HPN
14562fi
14563 ;;
14564
14565 cris-*-*)
14566 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14567echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
14568if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14569 echo $ECHO_N "(cached) $ECHO_C" >&6
14570else
14571 gcc_cv_as_cris_no_mul_bug=no
14572 if test $in_tree_gas = yes; then
14573 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14574 then gcc_cv_as_cris_no_mul_bug=yes
14575fi
14576 elif test x$gcc_cv_as != x; then
14577 echo '.text' > conftest.s
14578 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14580 (eval $ac_try) 2>&5
14581 ac_status=$?
14582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14583 (exit $ac_status); }; }
14584 then
14585 gcc_cv_as_cris_no_mul_bug=yes
14586 else
14587 echo "configure: failed program was" >&5
14588 cat conftest.s >&5
14589 fi
14590 rm -f conftest.o conftest.s
14591 fi
14592fi
14593echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14594echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
14595if test $gcc_cv_as_cris_no_mul_bug = yes; then
14596
14597cat >>confdefs.h <<\_ACEOF
14598#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14599_ACEOF
14600
8ada417f 14601fi
3a37b08e 14602 ;;
8ada417f 14603
1cb36a98 14604 sparc*-*-*)
ba479fd2
NN
14605 echo "$as_me:$LINENO: checking assembler for .register" >&5
14606echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
14607if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14608 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14609else
8ada417f
ZW
14610 gcc_cv_as_sparc_register_op=no
14611 if test x$gcc_cv_as != x; then
6e3f3080 14612 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
14613 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14615 (eval $ac_try) 2>&5
14616 ac_status=$?
14617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14618 (exit $ac_status); }; }
8ada417f
ZW
14619 then
14620 gcc_cv_as_sparc_register_op=yes
14621 else
14622 echo "configure: failed program was" >&5
14623 cat conftest.s >&5
14624 fi
14625 rm -f conftest.o conftest.s
14626 fi
cafe096b 14627fi
ba479fd2
NN
14628echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
14629echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 14630if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
14631
14632cat >>confdefs.h <<\_ACEOF
1cb36a98 14633#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 14634_ACEOF
1cb36a98 14635
8ada417f 14636fi
1cb36a98 14637
ba479fd2
NN
14638 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
14639echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
14640if test "${gcc_cv_as_sparc_relax+set}" = set; then
14641 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 14642else
8ada417f
ZW
14643 gcc_cv_as_sparc_relax=no
14644 if test x$gcc_cv_as != x; then
6e3f3080 14645 echo '.text' > conftest.s
ba479fd2
NN
14646 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
14647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14648 (eval $ac_try) 2>&5
14649 ac_status=$?
14650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14651 (exit $ac_status); }; }
8ada417f
ZW
14652 then
14653 gcc_cv_as_sparc_relax=yes
14654 else
14655 echo "configure: failed program was" >&5
14656 cat conftest.s >&5
14657 fi
14658 rm -f conftest.o conftest.s
14659 fi
cafe096b 14660fi
ba479fd2
NN
14661echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
14662echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 14663if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
14664
14665cat >>confdefs.h <<\_ACEOF
e95b1e6a 14666#define HAVE_AS_RELAX_OPTION 1
ba479fd2 14667_ACEOF
e95b1e6a 14668
8ada417f 14669fi
e95b1e6a 14670
ba479fd2
NN
14671 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
14672echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
14673if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
14674 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 14675else
8ada417f
ZW
14676 gcc_cv_as_sparc_ua_pcrel=no
14677 if test x$gcc_cv_as != x; then
6e3f3080 14678 echo '.text
8ada417f
ZW
14679foo:
14680 nop
14681.data
14682.align 4
14683.byte 0
14684.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
14685 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14687 (eval $ac_try) 2>&5
14688 ac_status=$?
14689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14690 (exit $ac_status); }; }
8ada417f
ZW
14691 then
14692 if test x$gcc_cv_ld != x \
14693 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
14694 gcc_cv_as_sparc_ua_pcrel=yes
14695 fi
14696 rm -f conftest
14697 else
14698 echo "configure: failed program was" >&5
14699 cat conftest.s >&5
14700 fi
14701 rm -f conftest.o conftest.s
14702 fi
cafe096b 14703fi
ba479fd2
NN
14704echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
14705echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 14706if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
14707
14708cat >>confdefs.h <<\_ACEOF
17e9e88c 14709#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 14710_ACEOF
17e9e88c 14711
17e9e88c 14712
ba479fd2
NN
14713 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
14714echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
14715if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
14716 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 14717else
8ada417f
ZW
14718 gcc_cv_as_sparc_ua_pcrel_hidden=no
14719 if test x$gcc_cv_as != x; then
6e3f3080 14720 echo '.data
8ada417f
ZW
14721.align 4
14722.byte 0x31
14723.uaword %r_disp32(foo)
14724.byte 0x32, 0x33, 0x34
14725.global foo
14726.hidden foo
14727foo:
14728.skip 4' > conftest.s
ba479fd2
NN
14729 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14731 (eval $ac_try) 2>&5
14732 ac_status=$?
14733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14734 (exit $ac_status); }; }
8ada417f
ZW
14735 then
14736 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
14737 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
14738 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
14739 | grep ' 31000000 07323334' > /dev/null 2>&1; then
14740 if $gcc_cv_objdump -R conftest 2> /dev/null \
14741 | grep 'DISP32' > /dev/null 2>&1; then
14742 :
14743 else
14744 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 14745 fi
8ada417f
ZW
14746 fi
14747 rm -f conftest
14748 else
14749 echo "configure: failed program was" >&5
14750 cat conftest.s >&5
14751 fi
14752 rm -f conftest.o conftest.s
14753 fi
cafe096b 14754fi
ba479fd2
NN
14755echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
14756echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 14757if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
14758
14759cat >>confdefs.h <<\_ACEOF
cf7b8b0d 14760#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 14761_ACEOF
cf7b8b0d 14762
8ada417f 14763fi
ba479fd2 14764
8ada417f 14765fi # unaligned pcrel relocs
cf7b8b0d 14766
ba479fd2
NN
14767 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
14768echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
14769if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
14770 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14771else
8ada417f
ZW
14772 gcc_cv_as_sparc_offsetable_lo10=no
14773 if test x$gcc_cv_as != x; then
6e3f3080 14774 echo '.text
8ada417f
ZW
14775 or %g1, %lo(ab) + 12, %g1
14776 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
14777 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
14778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14779 (eval $ac_try) 2>&5
14780 ac_status=$?
14781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14782 (exit $ac_status); }; }
8ada417f
ZW
14783 then
14784 if test x$gcc_cv_objdump != x \
ecb0ccbc 14785 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 14786 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 14787 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
14788 fi
14789 else
14790 echo "configure: failed program was" >&5
14791 cat conftest.s >&5
14792 fi
14793 rm -f conftest.o conftest.s
14794 fi
cafe096b 14795fi
ba479fd2
NN
14796echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
14797echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 14798if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
14799
14800cat >>confdefs.h <<\_ACEOF
1cb36a98 14801#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 14802_ACEOF
1cb36a98 14803
8ada417f 14804fi
1cb36a98
RH
14805 ;;
14806
c307e6dd 14807 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
14808 case $target_os in
14809 cygwin* | pe | mingw32*)
14810 # Used for DWARF 2 in PE
14811 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
14812echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
14813if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
14814 echo $ECHO_N "(cached) $ECHO_C" >&6
14815else
14816 gcc_cv_as_ix86_pe_secrel32=no
14817 if test $in_tree_gas = yes; then
14818 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14819 then gcc_cv_as_ix86_pe_secrel32=yes
14820fi
14821 elif test x$gcc_cv_as != x; then
14822 echo '.text
14823foo: nop
14824.data
14825 .secrel32 foo' > conftest.s
14826 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14828 (eval $ac_try) 2>&5
14829 ac_status=$?
14830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14831 (exit $ac_status); }; }
14832 then
14833 if test x$gcc_cv_ld != x \
14834 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
14835 gcc_cv_as_ix86_pe_secrel32=yes
14836 fi
14837 rm -f conftest
14838 else
14839 echo "configure: failed program was" >&5
14840 cat conftest.s >&5
14841 fi
14842 rm -f conftest.o conftest.s
14843 fi
14844fi
14845echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
14846echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
14847if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
14848
14849cat >>confdefs.h <<\_ACEOF
14850#define HAVE_GAS_PE_SECREL32_RELOC 1
14851_ACEOF
14852
14853fi
14854 ;;
14855 esac
14856
ba479fd2
NN
14857 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
14858echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
14859if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
14860 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14861else
14862 gcc_cv_as_ix86_filds_fists=no
14863 if test $in_tree_gas = yes; then
14864 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
14865 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 14866fi
8ada417f 14867 elif test x$gcc_cv_as != x; then
6e3f3080 14868 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
14869 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14871 (eval $ac_try) 2>&5
14872 ac_status=$?
14873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14874 (exit $ac_status); }; }
8ada417f
ZW
14875 then
14876 gcc_cv_as_ix86_filds_fists=yes
14877 else
14878 echo "configure: failed program was" >&5
14879 cat conftest.s >&5
981d4858 14880 fi
8ada417f
ZW
14881 rm -f conftest.o conftest.s
14882 fi
14883fi
ba479fd2
NN
14884echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
14885echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 14886if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
14887
14888cat >>confdefs.h <<\_ACEOF
8ada417f 14889#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 14890_ACEOF
ad9c4d9f 14891
f6f5dff2
RO
14892fi
14893
ba479fd2
NN
14894 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
14895echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
14896if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
14897 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
14898else
14899 gcc_cv_as_ix86_cmov_sun_syntax=no
14900 if test x$gcc_cv_as != x; then
6e3f3080 14901 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
14902 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14904 (eval $ac_try) 2>&5
14905 ac_status=$?
14906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14907 (exit $ac_status); }; }
f6f5dff2
RO
14908 then
14909 gcc_cv_as_ix86_cmov_sun_syntax=yes
14910 else
14911 echo "configure: failed program was" >&5
14912 cat conftest.s >&5
14913 fi
14914 rm -f conftest.o conftest.s
14915 fi
14916fi
ba479fd2
NN
14917echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
14918echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 14919if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
14920
14921cat >>confdefs.h <<\_ACEOF
f6f5dff2 14922#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 14923_ACEOF
f6f5dff2 14924
ad9c4d9f
NN
14925fi
14926
6f3ca281
ZW
14927 # This one is used unconditionally by i386.[ch]; it is to be defined
14928 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
14929 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
14930echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
14931if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
14932 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14933else
14934 gcc_cv_as_ix86_gotoff_in_data=no
14935 if test $in_tree_gas = yes; then
14936 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14937 then gcc_cv_as_ix86_gotoff_in_data=yes
14938fi
14939 elif test x$gcc_cv_as != x; then
6e3f3080 14940 echo ' .text
f88c65f7
RH
14941.L0:
14942 nop
14943 .data
8ada417f 14944 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
14945 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14947 (eval $ac_try) 2>&5
14948 ac_status=$?
14949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14950 (exit $ac_status); }; }
8ada417f
ZW
14951 then
14952 gcc_cv_as_ix86_gotoff_in_data=yes
14953 else
14954 echo "configure: failed program was" >&5
14955 cat conftest.s >&5
f88c65f7 14956 fi
8ada417f
ZW
14957 rm -f conftest.o conftest.s
14958 fi
14959fi
ba479fd2
NN
14960echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
14961echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 14962
6f3ca281 14963
ba479fd2 14964cat >>confdefs.h <<_ACEOF
6f3ca281 14965#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 14966_ACEOF
f88c65f7 14967
1cb36a98 14968 ;;
ef1ecf87
RH
14969
14970 ia64*-*-*)
ba479fd2
NN
14971 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
14972echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
14973if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
14974 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 14975else
8ada417f
ZW
14976 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
14977 if test $in_tree_gas = yes; then
14978 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14979 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 14980fi
8ada417f 14981 elif test x$gcc_cv_as != x; then
6e3f3080 14982 echo ' .text
ef1ecf87
RH
14983 addl r15 = @ltoffx(x#), gp
14984 ;;
cfa9ee99 14985 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
14986 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14988 (eval $ac_try) 2>&5
14989 ac_status=$?
14990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14991 (exit $ac_status); }; }
8ada417f 14992 then
cfa9ee99 14993 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
14994 else
14995 echo "configure: failed program was" >&5
14996 cat conftest.s >&5
2c4a9cff 14997 fi
8ada417f
ZW
14998 rm -f conftest.o conftest.s
14999 fi
15000fi
ba479fd2
NN
15001echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
15002echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 15003if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
15004
15005cat >>confdefs.h <<\_ACEOF
cfa9ee99 15006#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 15007_ACEOF
8ada417f 15008
cfa9ee99 15009fi
8ada417f 15010
2c4a9cff 15011 ;;
8ada417f 15012
2c4a9cff 15013 powerpc*-*-*)
8ada417f 15014 case $target in
432218ba
DE
15015 *-*-aix*) conftest_s=' .machine "pwr5"
15016 .csect .text[PR]
6b37db3c 15017 mfcr 3,128';;
8af4d362
PB
15018 *-*-darwin*)
15019 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
15020echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
15021if test "${gcc_cv_as_machine_directive+set}" = set; then
15022 echo $ECHO_N "(cached) $ECHO_C" >&6
15023else
15024 gcc_cv_as_machine_directive=no
15025 if test x$gcc_cv_as != x; then
15026 echo ' .machine ppc7400' > conftest.s
15027 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15029 (eval $ac_try) 2>&5
15030 ac_status=$?
15031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15032 (exit $ac_status); }; }
15033 then
15034 gcc_cv_as_machine_directive=yes
15035 else
15036 echo "configure: failed program was" >&5
15037 cat conftest.s >&5
15038 fi
15039 rm -f conftest.o conftest.s
15040 fi
15041fi
15042echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
15043echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
15044
15045 if test x$gcc_cv_as_machine_directive != xyes; then
15046 echo "*** This target requires an assembler supporting \".machine\"" >&2
15047 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
15048 test x$build = x$target && exit 1
15049 fi
15050 conftest_s=' .text
6b37db3c 15051 mfcr r3,128';;
4c67db14 15052 *) conftest_s=' .machine power4
d2ab3e37 15053 .text
6b37db3c 15054 mfcr 3,128';;
8ada417f 15055 esac
8ada417f 15056
ba479fd2
NN
15057 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
15058echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
15059if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
15060 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 15061else
8ada417f
ZW
15062 gcc_cv_as_powerpc_mfcrf=no
15063 if test $in_tree_gas = yes; then
15064 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15065 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 15066fi
8ada417f 15067 elif test x$gcc_cv_as != x; then
6e3f3080 15068 echo "$conftest_s" > conftest.s
ba479fd2
NN
15069 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15071 (eval $ac_try) 2>&5
15072 ac_status=$?
15073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15074 (exit $ac_status); }; }
8ada417f
ZW
15075 then
15076 gcc_cv_as_powerpc_mfcrf=yes
15077 else
15078 echo "configure: failed program was" >&5
15079 cat conftest.s >&5
15080 fi
15081 rm -f conftest.o conftest.s
15082 fi
2c4a9cff 15083fi
ba479fd2
NN
15084echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
15085echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 15086if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
15087
15088cat >>confdefs.h <<\_ACEOF
2c4a9cff 15089#define HAVE_AS_MFCRF 1
ba479fd2 15090_ACEOF
ef1ecf87 15091
8ada417f 15092fi
432218ba
DE
15093
15094 case $target in
15095 *-*-aix*) conftest_s=' .machine "pwr5"
15096 .csect .text[PR]
15097 popcntb 3,3';;
15098 *) conftest_s=' .machine power5
15099 .text
15100 popcntb 3,3';;
15101 esac
15102
15103 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
15104echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
15105if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
15106 echo $ECHO_N "(cached) $ECHO_C" >&6
15107else
15108 gcc_cv_as_powerpc_popcntb=no
15109 if test $in_tree_gas = yes; then
15110 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15111 then gcc_cv_as_powerpc_popcntb=yes
15112fi
15113 elif test x$gcc_cv_as != x; then
15114 echo "$conftest_s" > conftest.s
15115 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15117 (eval $ac_try) 2>&5
15118 ac_status=$?
15119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15120 (exit $ac_status); }; }
15121 then
15122 gcc_cv_as_powerpc_popcntb=yes
15123 else
15124 echo "configure: failed program was" >&5
15125 cat conftest.s >&5
15126 fi
15127 rm -f conftest.o conftest.s
15128 fi
15129fi
15130echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
15131echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
15132if test $gcc_cv_as_powerpc_popcntb = yes; then
15133
15134cat >>confdefs.h <<\_ACEOF
15135#define HAVE_AS_POPCNTB 1
15136_ACEOF
15137
15138fi
15139
7f970b70
AM
15140 case $target in
15141 *-*-aix*) conftest_s=' .csect .text[PR]
15142LCF..0:
15143 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
15144 *-*-darwin*)
15145 conftest_s=' .text
15146LCF0:
15147 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
15148 *) conftest_s=' .text
15149.LCF0:
15150 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
15151 esac
15152
15153 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
15154echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
15155if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
15156 echo $ECHO_N "(cached) $ECHO_C" >&6
15157else
15158 gcc_cv_as_powerpc_rel16=no
15159 if test $in_tree_gas = yes; then
15160 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15161 then gcc_cv_as_powerpc_rel16=yes
15162fi
15163 elif test x$gcc_cv_as != x; then
15164 echo "$conftest_s" > conftest.s
15165 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15167 (eval $ac_try) 2>&5
15168 ac_status=$?
15169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15170 (exit $ac_status); }; }
15171 then
15172 gcc_cv_as_powerpc_rel16=yes
15173 else
15174 echo "configure: failed program was" >&5
15175 cat conftest.s >&5
15176 fi
15177 rm -f conftest.o conftest.s
15178 fi
15179fi
15180echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
15181echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
15182if test $gcc_cv_as_powerpc_rel16 = yes; then
15183
15184cat >>confdefs.h <<\_ACEOF
15185#define HAVE_AS_REL16 1
15186_ACEOF
15187
15188fi
8ada417f
ZW
15189 ;;
15190
15191 mips*-*-*)
ba479fd2
NN
15192 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
15193echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
15194if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
15195 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15196else
15197 gcc_cv_as_mips_explicit_relocs=no
15198 if test $in_tree_gas = yes; then
15199 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15200 then gcc_cv_as_mips_explicit_relocs=yes
15201fi
15202 elif test x$gcc_cv_as != x; then
6e3f3080 15203 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
15204 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15206 (eval $ac_try) 2>&5
15207 ac_status=$?
15208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15209 (exit $ac_status); }; }
8ada417f
ZW
15210 then
15211 gcc_cv_as_mips_explicit_relocs=yes
15212 else
15213 echo "configure: failed program was" >&5
15214 cat conftest.s >&5
ef1ecf87 15215 fi
8ada417f
ZW
15216 rm -f conftest.o conftest.s
15217 fi
15218fi
ba479fd2
NN
15219echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
15220echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
15221if test $gcc_cv_as_mips_explicit_relocs = yes; then
15222 if test x$target_cpu_default = x
15223 then target_cpu_default=MASK_EXPLICIT_RELOCS
15224 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
15225 fi
15226fi
15227
82563d35
RS
15228 if test x$gas_flag = xyes \
15229 || test x"$host" != x"$build" \
15230 || test ! -x "$gcc_cv_as" \
15231 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
15232 :
15233 else
15234 echo "*** This configuration requires the GNU assembler" >&2
15235 exit 1
15236 fi
ef1ecf87 15237 ;;
1cb36a98 15238esac
9d147085
RH
15239# ??? Not all targets support dwarf2 debug_line, even within a version
15240# of gas. Moreover, we need to emit a valid instruction to trigger any
15241# info to the output file. So, as supported targets are added to gas 2.11,
15242# add some instruction here to (also) show we expect this might work.
15243# ??? Once 2.11 is released, probably need to add first known working
15244# version to the per-target configury.
15245case "$target" in
80486e06 15246 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 15247 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
d116bdf8 15248 | xstormy16*-*-* | cris-*-* | xtensa-*-*)
9d147085
RH
15249 insn="nop"
15250 ;;
57116d8d 15251 ia64*-*-* | s390*-*-*)
9d147085
RH
15252 insn="nop 0"
15253 ;;
2853bc5a
HPN
15254 mmix-*-*)
15255 insn="swym 0"
15256 ;;
8ada417f
ZW
15257esac
15258if test x"$insn" != x; then
15259 conftest_s="\
15260 .file 1 \"conftest.s\"
15261 .loc 1 3 0
15262 $insn"
ba479fd2
NN
15263 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
15264echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
15265if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
15266 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15267else
15268 gcc_cv_as_dwarf2_debug_line=no
15269 if test $in_tree_gas = yes; then
15270 if test $in_tree_gas_is_elf = yes \
15271 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15272 then gcc_cv_as_dwarf2_debug_line=yes
15273fi
15274 elif test x$gcc_cv_as != x; then
6e3f3080 15275 echo "$conftest_s" > conftest.s
ba479fd2
NN
15276 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15278 (eval $ac_try) 2>&5
15279 ac_status=$?
15280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15281 (exit $ac_status); }; }
8ada417f 15282 then
080a5bb0
EB
15283 if test x$gcc_cv_objdump != x \
15284 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
15285 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
15286 gcc_cv_as_dwarf2_debug_line=yes
15287 fi
15288 else
15289 echo "configure: failed program was" >&5
15290 cat conftest.s >&5
15291 fi
15292 rm -f conftest.o conftest.s
15293 fi
15294fi
ba479fd2
NN
15295echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
15296echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 15297
ad9c4d9f 15298
8ada417f
ZW
15299# The .debug_line file table must be in the exact order that
15300# we specified the files, since these indices are also used
15301# by DW_AT_decl_file. Approximate this test by testing if
15302# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
15303 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
15304echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
15305if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
15306 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15307else
15308 gcc_cv_as_dwarf2_file_buggy=no
15309 if test x$gcc_cv_as != x; then
6e3f3080 15310 echo ' .file 1 "foo.s"
8ada417f 15311 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
15312 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15314 (eval $ac_try) 2>&5
15315 ac_status=$?
15316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15317 (exit $ac_status); }; }
8ada417f
ZW
15318 then
15319 gcc_cv_as_dwarf2_file_buggy=yes
15320 else
15321 echo "configure: failed program was" >&5
15322 cat conftest.s >&5
15323 fi
15324 rm -f conftest.o conftest.s
15325 fi
ad9c4d9f 15326fi
ba479fd2
NN
15327echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
15328echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
15329
15330
15331 if test $gcc_cv_as_dwarf2_debug_line = yes \
15332 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
15333
15334cat >>confdefs.h <<\_ACEOF
9d147085 15335#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 15336_ACEOF
9d147085 15337
8ada417f 15338 fi
ad9c4d9f 15339
ba479fd2
NN
15340 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
15341echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
15342if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
15343 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15344else
15345 gcc_cv_as_gdwarf2_flag=no
15346 if test $in_tree_gas = yes; then
15347 if test $in_tree_gas_is_elf = yes \
15348 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15349 then gcc_cv_as_gdwarf2_flag=yes
15350fi
15351 elif test x$gcc_cv_as != x; then
6e3f3080 15352 echo "$insn" > conftest.s
ba479fd2
NN
15353 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
15354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15355 (eval $ac_try) 2>&5
15356 ac_status=$?
15357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15358 (exit $ac_status); }; }
8ada417f
ZW
15359 then
15360 gcc_cv_as_gdwarf2_flag=yes
15361 else
15362 echo "configure: failed program was" >&5
15363 cat conftest.s >&5
15364 fi
15365 rm -f conftest.o conftest.s
15366 fi
ad9c4d9f 15367fi
ba479fd2
NN
15368echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
15369echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 15370if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
15371
15372cat >>confdefs.h <<\_ACEOF
5f0e9ea2 15373#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 15374_ACEOF
5f0e9ea2
GK
15375
15376fi
ad9c4d9f 15377
ba479fd2
NN
15378 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
15379echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
15380if test "${gcc_cv_as_gstabs_flag+set}" = set; then
15381 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15382else
15383 gcc_cv_as_gstabs_flag=no
15384 if test $in_tree_gas = yes; then
15385 if test $in_tree_gas_is_elf = yes \
15386 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15387 then gcc_cv_as_gstabs_flag=yes
15388fi
15389 elif test x$gcc_cv_as != x; then
6e3f3080 15390 echo "$insn" > conftest.s
ba479fd2
NN
15391 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
15392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15393 (eval $ac_try) 2>&5
15394 ac_status=$?
15395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15396 (exit $ac_status); }; }
8ada417f
ZW
15397 then
15398 # The native Solaris 9/Intel assembler doesn't understand --gstabs
15399 # and warns about it, but still exits successfully. So check for
15400 # this.
ba479fd2
NN
15401 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
15402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15403 (eval $ac_try) 2>&5
15404 ac_status=$?
15405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15406 (exit $ac_status); }; }
8ada417f
ZW
15407 then :
15408 else gcc_cv_as_gstabs_flag=yes
15409 fi
15410 else
15411 echo "configure: failed program was" >&5
15412 cat conftest.s >&5
15413 fi
15414 rm -f conftest.o conftest.s
15415 fi
ad9c4d9f 15416fi
ba479fd2
NN
15417echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
15418echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 15419if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
15420
15421cat >>confdefs.h <<\_ACEOF
5f0e9ea2 15422#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 15423_ACEOF
5f0e9ea2
GK
15424
15425fi
8ada417f 15426fi
5f0e9ea2 15427
ba479fd2
NN
15428echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
15429echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 15430gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 15431if test $in_tree_ld = yes ; then
5408ac6c
HPN
15432 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 \
15433 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
15434 gcc_cv_ld_ro_rw_mix=read-write
15435 fi
15436elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
15437 echo '.section myfoosect, "a"' > conftest1.s
15438 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 15439 echo '.byte 1' >> conftest2.s
90e145da 15440 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 15441 echo '.byte 0' >> conftest3.s
6cd656d0
KC
15442 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
15443 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
15444 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 15445 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 15446 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 15447 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 15448 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
15449 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
15450 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
15451 gcc_cv_ld_ro_rw_mix=read-only
15452 else
15453 gcc_cv_ld_ro_rw_mix=read-write
15454 fi
15455 fi
15456 fi
15457 rm -f conftest.* conftest[123].*
15458fi
15459if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
15460
15461cat >>confdefs.h <<\_ACEOF
96d0f4dc 15462#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 15463_ACEOF
96d0f4dc
JJ
15464
15465fi
ba479fd2
NN
15466echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
15467echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 15468
ba479fd2
NN
15469echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
15470echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 15471gcc_cv_ld_eh_frame_hdr=no
34a86c2b 15472if test $in_tree_ld = yes ; then
5408ac6c
HPN
15473 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 \
15474 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
15475 gcc_cv_ld_eh_frame_hdr=yes
15476 fi
15477elif test x$gcc_cv_ld != x; then
15478 # Check if linker supports --eh-frame-hdr option
15479 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
15480 gcc_cv_ld_eh_frame_hdr=yes
15481 fi
15482fi
232b67d9 15483
275b60d6 15484if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
15485
15486cat >>confdefs.h <<\_ACEOF
275b60d6 15487#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 15488_ACEOF
275b60d6
JJ
15489
15490fi
ba479fd2
NN
15491echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
15492echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 15493
ba479fd2
NN
15494echo "$as_me:$LINENO: checking linker position independent executable support" >&5
15495echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
15496gcc_cv_ld_pie=no
15497if test $in_tree_ld = yes ; then
5408ac6c
HPN
15498 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 \
15499 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
15500 gcc_cv_ld_pie=yes
15501 fi
15502elif test x$gcc_cv_ld != x; then
15503 # Check if linker supports -pie option
15504 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
15505 gcc_cv_ld_pie=yes
15506 fi
15507fi
15508if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
15509
15510cat >>confdefs.h <<\_ACEOF
24a4dd31 15511#define HAVE_LD_PIE 1
ba479fd2 15512_ACEOF
24a4dd31
JJ
15513
15514fi
ba479fd2
NN
15515echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
15516echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 15517
8bb915b6
NN
15518# --------
15519# UNSORTED
15520# --------
15521
765f1bf9
AM
15522echo "$as_me:$LINENO: checking linker --as-needed support" >&5
15523echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
15524if test "${gcc_cv_ld_as_needed+set}" = set; then
15525 echo $ECHO_N "(cached) $ECHO_C" >&6
15526else
15527 gcc_cv_ld_as_needed=no
765f1bf9
AM
15528if test $in_tree_ld = yes ; then
15529 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 \
15530 && test $in_tree_ld_is_elf = yes; then
15531 gcc_cv_ld_as_needed=yes
15532 fi
15533elif test x$gcc_cv_ld != x; then
15534 # Check if linker supports --as-needed and --no-as-needed options
15535 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
15536 gcc_cv_ld_as_needed=yes
15537 fi
15538fi
82e923f6
RS
15539
15540fi
15541echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
15542echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
15543if test x"$gcc_cv_ld_as_needed" = xyes; then
15544
15545cat >>confdefs.h <<\_ACEOF
15546#define HAVE_LD_AS_NEEDED 1
15547_ACEOF
15548
15549fi
765f1bf9 15550
85b776df
AM
15551case "$target" in
15552 powerpc64*-*-linux*)
15553 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
15554echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
15555if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
15556 echo $ECHO_N "(cached) $ECHO_C" >&6
15557else
15558 gcc_cv_ld_no_dot_syms=no
15559 if test $in_tree_ld = yes ; then
15560 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
15561 gcc_cv_ld_no_dot_syms=yes
15562 fi
15563 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
15564 cat > conftest1.s <<EOF
15565 .text
15566 bl .foo
15567EOF
15568 cat > conftest2.s <<EOF
15569 .section ".opd","aw"
15570 .align 3
15571 .globl foo
15572 .type foo,@function
15573foo:
15574 .quad .LEfoo,.TOC.@tocbase,0
15575 .text
15576.LEfoo:
15577 blr
15578 .size foo,.-.LEfoo
15579EOF
15580 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
15581 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
15582 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
15583 gcc_cv_ld_no_dot_syms=yes
15584 fi
15585 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
15586 fi
15587
15588fi
15589echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
15590echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
15591 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
15592
15593cat >>confdefs.h <<\_ACEOF
15594#define HAVE_LD_NO_DOT_SYMS 1
15595_ACEOF
15596
15597 fi
15598 ;;
15599esac
15600
380e5ca4
MM
15601echo "$as_me:$LINENO: checking linker --sysroot support" >&5
15602echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
15603if test "${gcc_cv_ld_sysroot+set}" = set; then
15604 echo $ECHO_N "(cached) $ECHO_C" >&6
15605else
15606 gcc_cv_ld_sysroot=no
15607 if test $in_tree_ld = yes ; then
15608 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 15609 gcc_cv_ld_sysroot=yes
380e5ca4
MM
15610 fi
15611 elif test x$gcc_cv_ld != x; then
15612 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
15613 gcc_cv_ld_sysroot=yes
15614 fi
15615 fi
15616fi
15617echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
15618echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
15619if test x"$gcc_cv_ld_sysroot" = xyes; then
15620
15621cat >>confdefs.h <<\_ACEOF
15622#define HAVE_LD_SYSROOT 1
15623_ACEOF
15624
15625fi
15626
9fb28a67 15627if test x$with_sysroot = x && test x$host = x$target \
047d636f 15628 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
15629
15630cat >>confdefs.h <<_ACEOF
793e9558 15631#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 15632_ACEOF
793e9558
PB
15633
15634fi
15635
77008252
JJ
15636# Test for stack protector support in target C library.
15637case "$target" in
15638 *-*-linux*)
15639 echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5
15640echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6
15641if test "${gcc_cv_libc_provides_ssp+set}" = set; then
15642 echo $ECHO_N "(cached) $ECHO_C" >&6
15643else
15644 gcc_cv_libc_provides_ssp=no
15645 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
15646 if test "x$with_sysroot" = x; then
15647 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
15648 elif test "x$with_sysroot" = xyes; then
15649 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
15650 else
15651 glibc_header_dir="${with_sysroot}/usr/include"
15652 fi
15653 else
15654 glibc_header_dir=/usr/include
15655 fi
15656 # glibc 2.4 and later provides __stack_chk_fail and
15657 # either __stack_chk_guard, or TLS access to stack guard canary.
15658 if test -f $glibc_header_dir/features.h \
15659 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
15660 $glibc_header_dir/features.h > /dev/null; then
15661 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
15662 $glibc_header_dir/features.h > /dev/null; then
15663 gcc_cv_libc_provides_ssp=yes
15664 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
15665 $glibc_header_dir/features.h > /dev/null \
15666 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
15667 $glibc_header_dir/features.h > /dev/null; then
15668 gcc_cv_libc_provides_ssp=yes
15669 fi
15670 fi
15671fi
15672echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
15673echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;;
15674 *) gcc_cv_libc_provides_ssp=no ;;
15675esac
15676if test x$gcc_cv_libc_provides_ssp = xyes; then
15677
15678cat >>confdefs.h <<\_ACEOF
15679#define TARGET_LIBC_PROVIDES_SSP 1
15680_ACEOF
15681
15682fi
15683
81bf3d9e 15684# Find out what GC implementation we want, or may, use.
ba479fd2 15685
81bf3d9e
RH
15686# Check whether --with-gc or --without-gc was given.
15687if test "${with_gc+set}" = set; then
15688 withval="$with_gc"
15689 case "$withval" in
08cee789 15690 page)
81bf3d9e 15691 GGC=ggc-$withval
08cee789
DJ
15692 ;;
15693 zone)
15694 GGC=ggc-$withval
15695
15696cat >>confdefs.h <<\_ACEOF
15697#define GGC_ZONE 1
15698_ACEOF
15699
81bf3d9e
RH
15700 ;;
15701 *)
ba479fd2
NN
15702 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
15703echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
15704 { (exit 1); exit 1; }; }
81bf3d9e
RH
15705 ;;
15706esac
15707else
005537df 15708 GGC=ggc-page
ba479fd2 15709fi;
81bf3d9e
RH
15710
15711echo "Using $GGC for garbage collection."
15712
3c809ba4 15713# Use the system's zlib library.
b8dad04b
ZW
15714zlibdir=-L../zlib
15715zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 15716
3c809ba4
AG
15717# Check whether --with-system-zlib or --without-system-zlib was given.
15718if test "${with_system_zlib+set}" = set; then
15719 withval="$with_system_zlib"
15720 zlibdir=
15721zlibinc=
15722
ba479fd2 15723fi;
3c809ba4
AG
15724
15725
15726
dc6746e7 15727
ba479fd2
NN
15728echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
15729echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
15730 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
15731if test "${enable_maintainer_mode+set}" = set; then
15732 enableval="$enable_maintainer_mode"
15733 maintainer_mode=$enableval
15734else
15735 maintainer_mode=no
ba479fd2 15736fi;
63cf211a 15737
ba479fd2
NN
15738echo "$as_me:$LINENO: result: $maintainer_mode" >&5
15739echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
15740
15741if test "$maintainer_mode" = "yes"; then
15742 MAINT=''
15743else
15744 MAINT='#'
15745fi
15746
8bb915b6
NN
15747# --------------
15748# Language hooks
15749# --------------
15750
861bb6c1
JL
15751# Make empty files to contain the specs and options for each language.
15752# Then add #include lines to for a compiler that has specs and/or options.
15753
d7b42618 15754lang_opt_files=
861bb6c1 15755lang_specs_files=
3103b7db 15756lang_tree_files=
861bb6c1
JL
15757for subdir in . $subdirs
15758do
d7b42618
NB
15759 if test -f $srcdir/$subdir/lang.opt; then
15760 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
15761 fi
75bffa71 15762 if test -f $srcdir/$subdir/lang-specs.h; then
0d24f4d1 15763 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
861bb6c1 15764 fi
3103b7db 15765 if test -f $srcdir/$subdir/$subdir-tree.def; then
0d24f4d1 15766 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
3103b7db 15767 fi
861bb6c1
JL
15768done
15769
15770# These (without "all_") are set in each config-lang.in.
15771# `language' must be a single word so is spelled singularly.
15772all_languages=
15773all_boot_languages=
15774all_compilers=
15775all_stagestuff=
53c7ffe7 15776all_outputs='Makefile gccbug mklibgcc libada-mk'
861bb6c1 15777# List of language makefile fragments.
2ed26f6b
ZW
15778all_lang_makefrags=
15779# List of language subdirectory makefiles. Deprecated.
861bb6c1 15780all_lang_makefiles=
e2500fed 15781# Files for gengtype
ef69da62 15782all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
15783# Files for gengtype with language
15784all_gtfiles_files_langs=
15785all_gtfiles_files_files=
861bb6c1
JL
15786
15787# Add the language fragments.
15788# Languages are added via two mechanisms. Some information must be
15789# recorded in makefile variables, these are defined in config-lang.in.
15790# We accumulate them and plug them into the main Makefile.
15791# The other mechanism is a set of hooks for each of the main targets
15792# like `clean', `install', etc.
15793
861bb6c1 15794language_hooks="Make-hooks"
861bb6c1 15795
c406e779 15796for s in $subdirs
861bb6c1 15797do
861bb6c1
JL
15798 language=
15799 boot_language=
15800 compilers=
15801 stagestuff=
861bb6c1 15802 outputs=
e2500fed 15803 gtfiles=
861bb6c1 15804 . ${srcdir}/$s/config-lang.in
75bffa71 15805 if test "x$language" = x
861bb6c1
JL
15806 then
15807 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
15808 exit 1
15809 fi
2ed26f6b 15810 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
72aaffbd 15811 if test -f ${srcdir}/$s/Makefile.in
2ed26f6b 15812 then all_lang_makefiles="$s/Makefile"
72aaffbd 15813 fi
861bb6c1 15814 all_languages="$all_languages $language"
75bffa71 15815 if test "x$boot_language" = xyes
861bb6c1
JL
15816 then
15817 all_boot_languages="$all_boot_languages $language"
15818 fi
15819 all_compilers="$all_compilers $compilers"
15820 all_stagestuff="$all_stagestuff $stagestuff"
861bb6c1 15821 all_outputs="$all_outputs $outputs"
e2500fed 15822 all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15823 for f in $gtfiles
8ac9d31f 15824 do
8ac9d31f
TJ
15825 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
15826 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f 15827 done
861bb6c1
JL
15828done
15829
8ac9d31f
TJ
15830# Pick up gtfiles for c
15831gtfiles=
15832s="c"
15833. ${srcdir}/c-config-lang.in
15834all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15835for f in $gtfiles
8ac9d31f 15836do
8ac9d31f
TJ
15837 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
15838 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
15839done
15840
cbc59f01 15841check_languages=
c406e779 15842for language in $all_languages
cbc59f01 15843do
cbc59f01 15844 check_languages="$check_languages check-$language"
cbc59f01
DD
15845done
15846
62b81e45
MM
15847# We link each language in with a set of hooks, reached indirectly via
15848# lang.${target}.
861bb6c1
JL
15849
15850rm -f Make-hooks
15851touch Make-hooks
65ebbf81 15852target_list="all.build all.cross start.encap rest.encap tags \
a207b594 15853 install-normal install-common install-man \
a541f69d 15854 uninstall info man srcextra srcman srcinfo \
a03ad584 15855 mostlyclean clean distclean maintainer-clean \
8f231b5d 15856 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
861bb6c1
JL
15857for t in $target_list
15858do
15859 x=
c406e779 15860 for lang in $all_languages
861bb6c1 15861 do
ab87f8c8 15862 x="$x $lang.$t"
861bb6c1
JL
15863 done
15864 echo "lang.$t: $x" >> Make-hooks
15865done
15866
8bb915b6
NN
15867# --------
15868# UNSORTED
15869# --------
15870
cc06d68c 15871# Create .gdbinit.
861bb6c1 15872
cc06d68c
GP
15873echo "dir ." > .gdbinit
15874echo "dir ${srcdir}" >> .gdbinit
15875if test x$gdb_needs_out_file_path = xyes
15876then
15877 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
15878fi
15879if test "x$subdirs" != x; then
15880 for s in $subdirs
15881 do
15882 echo "dir ${srcdir}/$s" >> .gdbinit
15883 done
861bb6c1 15884fi
cc06d68c 15885echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 15886
8f8d3278
NC
15887# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
15888# absolute path for gcc_tooldir based on inserting the number of up-directory
15889# movements required to get from $(exec_prefix) to $(prefix) into the basic
15890# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
15891# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
15892# make and thus we'd get different behavior depending on where we built the
15893# sources.
5949a9fc 15894if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 15895 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 15896else
8f8d3278
NC
15897# An explanation of the sed strings:
15898# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
15899# -e 's|/$||' match a trailing forward slash and eliminates it
15900# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 15901# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
15902#
15903# (*) Note this pattern overwrites the first character of the string
15904# with a forward slash if one is not already present. This is not a
15905# problem because the exact names of the sub-directories concerned is
15906# unimportant, just the number of them matters.
15907#
15908# The practical upshot of these patterns is like this:
15909#
15910# prefix exec_prefix result
15911# ------ ----------- ------
15912# /foo /foo/bar ../
15913# /foo/ /foo/bar ../
15914# /foo /foo/bar/ ../
15915# /foo/ /foo/bar/ ../
15916# /foo /foo/bar/ugg ../../
15917#
4c112cda 15918 dollar='$$'
caa55b1e 15919 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
15920fi
15921
15922
2ce3c6c6 15923
2bbea3a6
RH
15924# Find a directory in which to install a shared libgcc.
15925
15926# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
15927if test "${enable_version_specific_runtime_libs+set}" = set; then
15928 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
15929
15930fi;
2bbea3a6
RH
15931
15932
5b15f277
RH
15933# Check whether --with-slibdir or --without-slibdir was given.
15934if test "${with_slibdir+set}" = set; then
15935 withval="$with_slibdir"
15936 slibdir="$with_slibdir"
15937else
15938 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 15939 slibdir='$(libsubdir)'
5b15f277 15940elif test "$host" != "$target"; then
2bbea3a6
RH
15941 slibdir='$(build_tooldir)/lib'
15942else
5b15f277 15943 slibdir='$(libdir)'
2bbea3a6 15944fi
ba479fd2 15945fi;
2bbea3a6
RH
15946
15947
1e6347d8 15948objdir=`${PWDCMD-pwd}`
7e717196
JL
15949
15950
861bb6c1
JL
15951# Substitute configuration variables
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
9b16d2c4 15998
e9a25f70 15999
6e26218f 16000
c8724862 16001
e061d1ce 16002
d8bb17c8 16003
11642c3a
ZW
16004
16005
16006
16007
16008
16009
16010
3d9d2476 16011
e2500fed 16012
51b9ff45 16013
861bb6c1 16014
6e3f3080
NN
16015# Echo link setup.
16016if test x${build} = x${host} ; then
16017 if test x${host} = x${target} ; then
16018 echo "Links are now set up to build a native compiler for ${target}." 1>&2
16019 else
16020 echo "Links are now set up to build a cross-compiler" 1>&2
16021 echo " from ${host} to ${target}." 1>&2
16022 fi
16023else
16024 if test x${host} = x${target} ; then
16025 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
16026 echo " for ${target}." 1>&2
16027 else
16028 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
16029 echo " from ${host} to ${target}." 1>&2
16030 fi
16031fi
16032
6de9cd9a
DN
16033
16034
16035
6e3f3080
NN
16036# Configure the subdirectories
16037# AC_CONFIG_SUBDIRS($subdirs)
16038
16039# Create the Makefile
16040# and configure language subdirectories
ba479fd2 16041 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
16042
16043
ba479fd2 16044 ac_config_commands="$ac_config_commands default"
914c5af7 16045
ba479fd2 16046cat >confcache <<\_ACEOF
6e3f3080
NN
16047# This file is a shell script that caches the results of configure
16048# tests run on this system so they can be shared between configure
ba479fd2
NN
16049# scripts and configure runs, see configure's option --config-cache.
16050# It is not useful on other systems. If it contains results you don't
16051# want to keep, you may remove or edit it.
6e3f3080 16052#
ba479fd2
NN
16053# config.status only pays attention to the cache file if you give it
16054# the --recheck option to rerun configure.
6e3f3080 16055#
ba479fd2
NN
16056# `ac_cv_env_foo' variables (set or unset) will be overridden when
16057# loading this file, other *unset* `ac_cv_foo' will be assigned the
16058# following values.
16059
16060_ACEOF
16061
6e3f3080
NN
16062# The following way of writing the cache mishandles newlines in values,
16063# but we know of no workaround that is simple, portable, and efficient.
16064# So, don't put newlines in cache variables' values.
16065# Ultrix sh set writes to stderr and can't be redirected directly,
16066# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
16067{
16068 (set) 2>&1 |
16069 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16070 *ac_space=\ *)
16071 # `set' does not quote correctly, so add quotes (double-quote
16072 # substitution turns \\\\ into \\, and sed turns \\ into \).
16073 sed -n \
86da66b5
HPN
16074 "s/'/'\\\\''/g;
16075 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ba479fd2
NN
16076 ;;
16077 *)
16078 # `set' quotes correctly as required by POSIX, so do not add quotes.
16079 sed -n \
86da66b5 16080 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
16081 ;;
16082 esac;
16083} |
16084 sed '
16085 t clear
16086 : clear
16087 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16088 t end
16089 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16090 : end' >>confcache
16091if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 16092 if test -w $cache_file; then
ba479fd2
NN
16093 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16094 cat confcache >$cache_file
6e3f3080
NN
16095 else
16096 echo "not updating unwritable cache $cache_file"
16097 fi
16098fi
16099rm -f confcache
16100
16101test "x$prefix" = xNONE && prefix=$ac_default_prefix
16102# Let make expand exec_prefix.
16103test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16104
ba479fd2
NN
16105# VPATH may cause trouble with some makes, so we remove $(srcdir),
16106# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16107# trailing colons and then remove the whole line if VPATH becomes empty
16108# (actually we leave an empty line to preserve line numbers).
6e3f3080 16109if test "x$srcdir" = x.; then
86da66b5 16110 ac_vpsub='/^[ ]*VPATH[ ]*=/{
ba479fd2
NN
16111s/:*\$(srcdir):*/:/;
16112s/:*\${srcdir}:*/:/;
16113s/:*@srcdir@:*/:/;
86da66b5 16114s/^\([^=]*=[ ]*\):*/\1/;
ba479fd2 16115s/:*$//;
86da66b5 16116s/^[^=]*=[ ]*$//;
ba479fd2 16117}'
6e3f3080
NN
16118fi
16119
63cf211a 16120DEFS=-DHAVE_CONFIG_H
6e3f3080 16121
ba479fd2
NN
16122ac_libobjs=
16123ac_ltlibobjs=
16124for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16125 # 1. Remove the extension, and $U if already installed.
16126 ac_i=`echo "$ac_i" |
86da66b5 16127 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
ba479fd2
NN
16128 # 2. Add them.
16129 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
16130 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
16131done
16132LIBOBJS=$ac_libobjs
63cf211a 16133
ba479fd2
NN
16134LTLIBOBJS=$ac_ltlibobjs
16135
16136
16137
16138: ${CONFIG_STATUS=./config.status}
16139ac_clean_files_save=$ac_clean_files
16140ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16141{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16142echo "$as_me: creating $CONFIG_STATUS" >&6;}
16143cat >$CONFIG_STATUS <<_ACEOF
16144#! $SHELL
16145# Generated by $as_me.
6e3f3080
NN
16146# Run this file to recreate the current configuration.
16147# Compiler output produced by configure, useful for debugging
ba479fd2 16148# configure, is in config.log if it exists.
6e3f3080 16149
ba479fd2
NN
16150debug=false
16151ac_cs_recheck=false
16152ac_cs_silent=false
16153SHELL=\${CONFIG_SHELL-$SHELL}
16154_ACEOF
16155
16156cat >>$CONFIG_STATUS <<\_ACEOF
16157## --------------------- ##
16158## M4sh Initialization. ##
16159## --------------------- ##
16160
16161# Be Bourne compatible
16162if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16163 emulate sh
16164 NULLCMD=:
16165 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
16166 # is contrary to our usage. Disable this feature.
16167 alias -g '${1+"$@"}'='"$@"'
16168elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16169 set -o posix
16170fi
86da66b5 16171DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
16172
16173# Support unset when possible.
86da66b5 16174if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
16175 as_unset=unset
16176else
16177 as_unset=false
16178fi
16179
16180
16181# Work around bugs in pre-3.0 UWIN ksh.
16182$as_unset ENV MAIL MAILPATH
16183PS1='$ '
16184PS2='> '
16185PS4='+ '
16186
16187# NLS nuisances.
16188for as_var in \
16189 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
16190 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
16191 LC_TELEPHONE LC_TIME
6e3f3080 16192do
86da66b5 16193 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
16194 eval $as_var=C; export $as_var
16195 else
16196 $as_unset $as_var
16197 fi
6e3f3080
NN
16198done
16199
ba479fd2
NN
16200# Required to use basename.
16201if expr a : '\(a\)' >/dev/null 2>&1; then
16202 as_expr=expr
16203else
16204 as_expr=false
16205fi
6e3f3080 16206
ba479fd2
NN
16207if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
16208 as_basename=basename
16209else
16210 as_basename=false
16211fi
6e3f3080
NN
16212
16213
ba479fd2
NN
16214# Name of the executable.
16215as_me=`$as_basename "$0" ||
16216$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16217 X"$0" : 'X\(//\)$' \| \
16218 X"$0" : 'X\(/\)$' \| \
16219 . : '\(.\)' 2>/dev/null ||
16220echo X/"$0" |
16221 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16222 /^X\/\(\/\/\)$/{ s//\1/; q; }
16223 /^X\/\(\/\).*/{ s//\1/; q; }
16224 s/.*/./; q'`
16225
6e3f3080 16226
ba479fd2
NN
16227# PATH needs CR, and LINENO needs CR and PATH.
16228# Avoid depending upon Character Ranges.
16229as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16230as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16231as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16232as_cr_digits='0123456789'
16233as_cr_alnum=$as_cr_Letters$as_cr_digits
16234
16235# The user is always right.
16236if test "${PATH_SEPARATOR+set}" != set; then
16237 echo "#! /bin/sh" >conf$$.sh
16238 echo "exit 0" >>conf$$.sh
16239 chmod +x conf$$.sh
16240 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
16241 PATH_SEPARATOR=';'
6e3f3080 16242 else
ba479fd2
NN
16243 PATH_SEPARATOR=:
16244 fi
16245 rm -f conf$$.sh
16246fi
16247
16248
16249 as_lineno_1=$LINENO
16250 as_lineno_2=$LINENO
16251 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16252 test "x$as_lineno_1" != "x$as_lineno_2" &&
16253 test "x$as_lineno_3" = "x$as_lineno_2" || {
16254 # Find who we are. Look in the path if we contain no path at all
16255 # relative or not.
16256 case $0 in
16257 *[\\/]* ) as_myself=$0 ;;
16258 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16259for as_dir in $PATH
16260do
16261 IFS=$as_save_IFS
16262 test -z "$as_dir" && as_dir=.
16263 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16264done
16265
16266 ;;
16267 esac
16268 # We did not find ourselves, most probably we were run as `sh COMMAND'
16269 # in which case we are not to be found in the path.
16270 if test "x$as_myself" = x; then
16271 as_myself=$0
16272 fi
16273 if test ! -f "$as_myself"; then
16274 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16275echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16276 { (exit 1); exit 1; }; }
6e3f3080 16277 fi
ba479fd2
NN
16278 case $CONFIG_SHELL in
16279 '')
16280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16281for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16282do
16283 IFS=$as_save_IFS
16284 test -z "$as_dir" && as_dir=.
16285 for as_base in sh bash ksh sh5; do
16286 case $as_dir in
16287 /*)
16288 if ("$as_dir/$as_base" -c '
16289 as_lineno_1=$LINENO
16290 as_lineno_2=$LINENO
16291 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16292 test "x$as_lineno_1" != "x$as_lineno_2" &&
16293 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16294 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
16295 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
16296 CONFIG_SHELL=$as_dir/$as_base
16297 export CONFIG_SHELL
16298 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16299 fi;;
16300 esac
16301 done
16302done
16303;;
16304 esac
16305
16306 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16307 # uniformly replaced by the line number. The first 'sed' inserts a
16308 # line-number line before each line; the second 'sed' does the real
16309 # work. The second script uses 'N' to pair each line-number line
16310 # with the numbered line, and appends trailing '-' during
16311 # substitution so that $LINENO is not a special case at line end.
16312 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16313 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16314 sed '=' <$as_myself |
16315 sed '
16316 N
16317 s,$,-,
16318 : loop
16319 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16320 t loop
16321 s,-$,,
16322 s,^['$as_cr_digits']*\n,,
16323 ' >$as_me.lineno &&
16324 chmod +x $as_me.lineno ||
16325 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16326echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16327 { (exit 1); exit 1; }; }
16328
16329 # Don't try to exec as it changes $[0], causing all sort of problems
16330 # (the dirname of $[0] is not the place where we might find the
16331 # original and so on. Autoconf is especially sensible to this).
16332 . ./$as_me.lineno
16333 # Exit status is that of the last command.
16334 exit
16335}
16336
16337
16338case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16339 *c*,-n*) ECHO_N= ECHO_C='
16340' ECHO_T=' ' ;;
16341 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16342 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16343esac
16344
16345if expr a : '\(a\)' >/dev/null 2>&1; then
16346 as_expr=expr
16347else
16348 as_expr=false
16349fi
16350
16351rm -f conf$$ conf$$.exe conf$$.file
16352echo >conf$$.file
16353if ln -s conf$$.file conf$$ 2>/dev/null; then
16354 # We could just check for DJGPP; but this test a) works b) is more generic
16355 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16356 if test -f conf$$.exe; then
16357 # Don't use ln at all; we don't have any links
16358 as_ln_s='cp -p'
6e3f3080 16359 else
ba479fd2 16360 as_ln_s='ln -s'
6e3f3080 16361 fi
ba479fd2
NN
16362elif ln conf$$.file conf$$ 2>/dev/null; then
16363 as_ln_s=ln
16364else
16365 as_ln_s='cp -p'
16366fi
16367rm -f conf$$ conf$$.exe conf$$.file
16368
16369if mkdir -p . 2>/dev/null; then
16370 as_mkdir_p=:
16371else
86da66b5 16372 test -d ./-p && rmdir ./-p
ba479fd2
NN
16373 as_mkdir_p=false
16374fi
16375
16376as_executable_p="test -f"
16377
16378# Sed expression to map a string onto a valid CPP name.
86da66b5 16379as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
16380
16381# Sed expression to map a string onto a valid variable name.
86da66b5 16382as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
16383
16384
16385# IFS
16386# We need space, tab and new line, in precisely that order.
16387as_nl='
16388'
16389IFS=" $as_nl"
16390
16391# CDPATH.
16392$as_unset CDPATH
16393
16394exec 6>&1
16395
16396# Open the log real soon, to keep \$[0] and so on meaningful, and to
16397# report actual input values of CONFIG_FILES etc. instead of their
16398# values after options handling. Logging --version etc. is OK.
16399exec 5>>config.log
16400{
16401 echo
16402 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16403## Running $as_me. ##
16404_ASBOX
16405} >&5
16406cat >&5 <<_CSEOF
16407
16408This file was extended by $as_me, which was
8ab705be 16409generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
16410
16411 CONFIG_FILES = $CONFIG_FILES
16412 CONFIG_HEADERS = $CONFIG_HEADERS
16413 CONFIG_LINKS = $CONFIG_LINKS
16414 CONFIG_COMMANDS = $CONFIG_COMMANDS
16415 $ $0 $@
16416
16417_CSEOF
16418echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16419echo >&5
16420_ACEOF
16421
16422# Files that config.status was made for.
16423if test -n "$ac_config_files"; then
16424 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16425fi
16426
16427if test -n "$ac_config_headers"; then
16428 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16429fi
16430
16431if test -n "$ac_config_links"; then
16432 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16433fi
16434
16435if test -n "$ac_config_commands"; then
16436 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16437fi
16438
16439cat >>$CONFIG_STATUS <<\_ACEOF
16440
16441ac_cs_usage="\
16442\`$as_me' instantiates files from templates according to the
16443current configuration.
16444
16445Usage: $0 [OPTIONS] [FILE]...
16446
16447 -h, --help print this help, then exit
16448 -V, --version print version number, then exit
16449 -q, --quiet do not print progress messages
16450 -d, --debug don't remove temporary files
16451 --recheck update $as_me by reconfiguring in the same conditions
16452 --file=FILE[:TEMPLATE]
86da66b5 16453 instantiate the configuration file FILE
ba479fd2 16454 --header=FILE[:TEMPLATE]
86da66b5 16455 instantiate the configuration header FILE
ba479fd2
NN
16456
16457Configuration files:
16458$config_files
16459
16460Configuration headers:
16461$config_headers
16462
16463Configuration commands:
16464$config_commands
16465
16466Report bugs to <bug-autoconf@gnu.org>."
16467_ACEOF
16468
16469cat >>$CONFIG_STATUS <<_ACEOF
16470ac_cs_version="\\
16471config.status
8ab705be 16472configured by $0, generated by GNU Autoconf 2.59,
ba479fd2
NN
16473 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16474
86da66b5 16475Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
16476This config.status script is free software; the Free Software Foundation
16477gives unlimited permission to copy, distribute and modify it."
16478srcdir=$srcdir
16479_ACEOF
16480
16481cat >>$CONFIG_STATUS <<\_ACEOF
16482# If no file are specified by the user, then we need to provide default
16483# value. By we need to know if files were specified by the user.
16484ac_need_defaults=:
16485while test $# != 0
16486do
16487 case $1 in
16488 --*=*)
16489 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16490 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16491 ac_shift=:
16492 ;;
16493 -*)
16494 ac_option=$1
16495 ac_optarg=$2
16496 ac_shift=shift
16497 ;;
16498 *) # This is not an option, so the user has probably given explicit
16499 # arguments.
16500 ac_option=$1
16501 ac_need_defaults=false;;
16502 esac
16503
16504 case $ac_option in
16505 # Handling of the options.
16506_ACEOF
16507cat >>$CONFIG_STATUS <<\_ACEOF
16508 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16509 ac_cs_recheck=: ;;
16510 --version | --vers* | -V )
16511 echo "$ac_cs_version"; exit 0 ;;
16512 --he | --h)
16513 # Conflict between --help and --header
16514 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16515Try \`$0 --help' for more information." >&5
16516echo "$as_me: error: ambiguous option: $1
16517Try \`$0 --help' for more information." >&2;}
16518 { (exit 1); exit 1; }; };;
16519 --help | --hel | -h )
16520 echo "$ac_cs_usage"; exit 0 ;;
16521 --debug | --d* | -d )
16522 debug=: ;;
16523 --file | --fil | --fi | --f )
16524 $ac_shift
16525 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
16526 ac_need_defaults=false;;
16527 --header | --heade | --head | --hea )
16528 $ac_shift
16529 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
16530 ac_need_defaults=false;;
16531 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16532 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16533 ac_cs_silent=: ;;
16534
16535 # This is an error.
16536 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16537Try \`$0 --help' for more information." >&5
16538echo "$as_me: error: unrecognized option: $1
16539Try \`$0 --help' for more information." >&2;}
16540 { (exit 1); exit 1; }; } ;;
16541
16542 *) ac_config_targets="$ac_config_targets $1" ;;
16543
16544 esac
16545 shift
6e3f3080 16546done
ba479fd2
NN
16547
16548ac_configure_extra_args=
16549
16550if $ac_cs_silent; then
16551 exec 6>/dev/null
16552 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
16553fi
16554
ba479fd2
NN
16555_ACEOF
16556cat >>$CONFIG_STATUS <<_ACEOF
16557if \$ac_cs_recheck; then
16558 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
16559 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16560fi
861bb6c1 16561
ba479fd2
NN
16562_ACEOF
16563
16564cat >>$CONFIG_STATUS <<_ACEOF
16565#
16566# INIT-COMMANDS section.
16567#
16568
16569subdirs='$subdirs'
ba479fd2
NN
16570
16571_ACEOF
16572
16573
16574
16575cat >>$CONFIG_STATUS <<\_ACEOF
16576for ac_config_target in $ac_config_targets
16577do
16578 case "$ac_config_target" in
16579 # Handling of arguments.
16580 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
16581 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16582 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
16583 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16584echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16585 { (exit 1); exit 1; }; };;
861bb6c1 16586 esac
ba479fd2
NN
16587done
16588
16589# If the user did not use the arguments to specify the items to instantiate,
16590# then the envvar interface is used. Set only those that are not.
16591# We use the long form for the default assignment because of an extremely
16592# bizarre bug on SunOS 4.1.3.
16593if $ac_need_defaults; then
16594 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16595 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16596 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16597fi
16598
16599# Have a temporary directory for convenience. Make it in the build tree
16600# simply because there is no reason to put it here, and in addition,
16601# creating and moving files from /tmp can sometimes cause problems.
16602# Create a temporary directory, and hook for its removal unless debugging.
16603$debug ||
16604{
16605 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16606 trap '{ (exit 1); exit 1; }' 1 2 13 15
16607}
861bb6c1 16608
ba479fd2 16609# Create a (secure) tmp directory for tmp files.
6e3f3080 16610
ba479fd2
NN
16611{
16612 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
16613 test -n "$tmp" && test -d "$tmp"
16614} ||
16615{
16616 tmp=./confstat$$-$RANDOM
16617 (umask 077 && mkdir $tmp)
16618} ||
16619{
16620 echo "$me: cannot create a temporary directory in ." >&2
16621 { (exit 1); exit 1; }
16622}
16623
16624_ACEOF
16625
16626cat >>$CONFIG_STATUS <<_ACEOF
16627
16628#
16629# CONFIG_FILES section.
16630#
16631
16632# No need to generate the scripts if there are no CONFIG_FILES.
16633# This happens for instance when ./config.status config.h
16634if test -n "\$CONFIG_FILES"; then
16635 # Protect against being on the right side of a sed subst in config.status.
16636 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16637 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16638s,@SHELL@,$SHELL,;t t
16639s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16640s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16641s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16642s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16643s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16644s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16645s,@exec_prefix@,$exec_prefix,;t t
16646s,@prefix@,$prefix,;t t
16647s,@program_transform_name@,$program_transform_name,;t t
16648s,@bindir@,$bindir,;t t
16649s,@sbindir@,$sbindir,;t t
16650s,@libexecdir@,$libexecdir,;t t
16651s,@datadir@,$datadir,;t t
16652s,@sysconfdir@,$sysconfdir,;t t
16653s,@sharedstatedir@,$sharedstatedir,;t t
16654s,@localstatedir@,$localstatedir,;t t
16655s,@libdir@,$libdir,;t t
16656s,@includedir@,$includedir,;t t
16657s,@oldincludedir@,$oldincludedir,;t t
16658s,@infodir@,$infodir,;t t
16659s,@mandir@,$mandir,;t t
16660s,@build_alias@,$build_alias,;t t
16661s,@host_alias@,$host_alias,;t t
16662s,@target_alias@,$target_alias,;t t
16663s,@DEFS@,$DEFS,;t t
16664s,@ECHO_C@,$ECHO_C,;t t
16665s,@ECHO_N@,$ECHO_N,;t t
16666s,@ECHO_T@,$ECHO_T,;t t
16667s,@LIBS@,$LIBS,;t t
16668s,@build@,$build,;t t
16669s,@build_cpu@,$build_cpu,;t t
16670s,@build_vendor@,$build_vendor,;t t
16671s,@build_os@,$build_os,;t t
16672s,@host@,$host,;t t
16673s,@host_cpu@,$host_cpu,;t t
16674s,@host_vendor@,$host_vendor,;t t
16675s,@host_os@,$host_os,;t t
16676s,@target@,$target,;t t
16677s,@target_cpu@,$target_cpu,;t t
16678s,@target_vendor@,$target_vendor,;t t
16679s,@target_os@,$target_os,;t t
8f1529e6 16680s,@target_noncanonical@,$target_noncanonical,;t t
ba479fd2
NN
16681s,@build_subdir@,$build_subdir,;t t
16682s,@host_subdir@,$host_subdir,;t t
16683s,@target_subdir@,$target_subdir,;t t
03787dfd 16684s,@GENINSRC@,$GENINSRC,;t t
ba479fd2
NN
16685s,@CC@,$CC,;t t
16686s,@CFLAGS@,$CFLAGS,;t t
16687s,@LDFLAGS@,$LDFLAGS,;t t
16688s,@CPPFLAGS@,$CPPFLAGS,;t t
16689s,@ac_ct_CC@,$ac_ct_CC,;t t
16690s,@EXEEXT@,$EXEEXT,;t t
16691s,@OBJEXT@,$OBJEXT,;t t
16692s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
16693s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
16694s,@CPP@,$CPP,;t t
bf3b7cd3 16695s,@EGREP@,$EGREP,;t t
ba479fd2
NN
16696s,@strict1_warn@,$strict1_warn,;t t
16697s,@warn_cflags@,$warn_cflags,;t t
16698s,@WERROR@,$WERROR,;t t
16699s,@nocommon_flag@,$nocommon_flag,;t t
13f05fd0 16700s,@TREEBROWSER@,$TREEBROWSER,;t t
ba479fd2
NN
16701s,@valgrind_path@,$valgrind_path,;t t
16702s,@valgrind_path_defines@,$valgrind_path_defines,;t t
16703s,@valgrind_command@,$valgrind_command,;t t
16704s,@coverage_flags@,$coverage_flags,;t t
16705s,@enable_multilib@,$enable_multilib,;t t
16706s,@enable_shared@,$enable_shared,;t t
16707s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
16708s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
16709s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
16710s,@onestep@,$onestep,;t t
16711s,@SET_MAKE@,$SET_MAKE,;t t
16712s,@AWK@,$AWK,;t t
ba479fd2 16713s,@LN_S@,$LN_S,;t t
41e622a8 16714s,@LN@,$LN,;t t
ba479fd2
NN
16715s,@RANLIB@,$RANLIB,;t t
16716s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
343a6100 16717s,@ranlib_flags@,$ranlib_flags,;t t
ba479fd2
NN
16718s,@INSTALL@,$INSTALL,;t t
16719s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16720s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16721s,@make_compare_target@,$make_compare_target,;t t
16722s,@have_mktemp_command@,$have_mktemp_command,;t t
16723s,@MAKEINFO@,$MAKEINFO,;t t
16724s,@BUILD_INFO@,$BUILD_INFO,;t t
16725s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
16726s,@FLEX@,$FLEX,;t t
16727s,@BISON@,$BISON,;t t
f6a874ac
JW
16728s,@NM@,$NM,;t t
16729s,@AR@,$AR,;t t
ba479fd2
NN
16730s,@stage1_cflags@,$stage1_cflags,;t t
16731s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
16732s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
16733s,@LDEXP_LIB@,$LDEXP_LIB,;t t
16734s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
16735s,@LIBICONV@,$LIBICONV,;t t
dfb77e37 16736s,@LTLIBICONV@,$LTLIBICONV,;t t
ba479fd2
NN
16737s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
16738s,@manext@,$manext,;t t
16739s,@objext@,$objext,;t t
8bb915b6 16740s,@gthread_flags@,$gthread_flags,;t t
ba479fd2 16741s,@extra_modes_file@,$extra_modes_file,;t t
75685792 16742s,@extra_opt_files@,$extra_opt_files,;t t
ba479fd2
NN
16743s,@USE_NLS@,$USE_NLS,;t t
16744s,@LIBINTL@,$LIBINTL,;t t
16745s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
16746s,@INCINTL@,$INCINTL,;t t
16747s,@XGETTEXT@,$XGETTEXT,;t t
16748s,@GMSGFMT@,$GMSGFMT,;t t
16749s,@POSUB@,$POSUB,;t t
16750s,@CATALOGS@,$CATALOGS,;t t
5395b47b 16751s,@host_cc_for_libada@,$host_cc_for_libada,;t t
ba479fd2
NN
16752s,@CROSS@,$CROSS,;t t
16753s,@ALL@,$ALL,;t t
16754s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
16755s,@inhibit_libc@,$inhibit_libc,;t t
ba479fd2
NN
16756s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
16757s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16758s,@STMP_FIXINC@,$STMP_FIXINC,;t t
16759s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
c38f02df 16760s,@collect2@,$collect2,;t t
9f18db39
PB
16761s,@gcc_cv_as@,$gcc_cv_as,;t t
16762s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
16763s,@gcc_cv_ld@,$gcc_cv_ld,;t t
16764s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
16765s,@gcc_cv_nm@,$gcc_cv_nm,;t t
16766s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
ba479fd2 16767s,@libgcc_visibility@,$libgcc_visibility,;t t
ba479fd2
NN
16768s,@GGC@,$GGC,;t t
16769s,@zlibdir@,$zlibdir,;t t
16770s,@zlibinc@,$zlibinc,;t t
16771s,@MAINT@,$MAINT,;t t
16772s,@gcc_tooldir@,$gcc_tooldir,;t t
16773s,@dollar@,$dollar,;t t
16774s,@slibdir@,$slibdir,;t t
16775s,@objdir@,$objdir,;t t
16776s,@subdirs@,$subdirs,;t t
16777s,@srcdir@,$srcdir,;t t
ba479fd2
NN
16778s,@all_boot_languages@,$all_boot_languages,;t t
16779s,@all_compilers@,$all_compilers,;t t
16780s,@all_gtfiles@,$all_gtfiles,;t t
16781s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
16782s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
16783s,@all_lang_makefrags@,$all_lang_makefrags,;t t
16784s,@all_lang_makefiles@,$all_lang_makefiles,;t t
16785s,@all_languages@,$all_languages,;t t
16786s,@all_stagestuff@,$all_stagestuff,;t t
16787s,@build_exeext@,$build_exeext,;t t
16788s,@build_install_headers_dir@,$build_install_headers_dir,;t t
16789s,@build_xm_file_list@,$build_xm_file_list,;t t
16790s,@build_xm_include_list@,$build_xm_include_list,;t t
16791s,@build_xm_defines@,$build_xm_defines,;t t
16792s,@check_languages@,$check_languages,;t t
16793s,@cc_set_by_configure@,$cc_set_by_configure,;t t
16794s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
16795s,@cpp_install_dir@,$cpp_install_dir,;t t
16796s,@xmake_file@,$xmake_file,;t t
16797s,@tmake_file@,$tmake_file,;t t
30500d84 16798s,@extra_gcc_objs@,$extra_gcc_objs,;t t
ba479fd2
NN
16799s,@extra_headers_list@,$extra_headers_list,;t t
16800s,@extra_objs@,$extra_objs,;t t
16801s,@extra_parts@,$extra_parts,;t t
16802s,@extra_passes@,$extra_passes,;t t
16803s,@extra_programs@,$extra_programs,;t t
16804s,@float_h_file@,$float_h_file,;t t
16805s,@gcc_config_arguments@,$gcc_config_arguments,;t t
16806s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
16807s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
ba479fd2 16808s,@host_exeext@,$host_exeext,;t t
ba479fd2
NN
16809s,@host_xm_file_list@,$host_xm_file_list,;t t
16810s,@host_xm_include_list@,$host_xm_include_list,;t t
16811s,@host_xm_defines@,$host_xm_defines,;t t
16812s,@out_host_hook_obj@,$out_host_hook_obj,;t t
16813s,@install@,$install,;t t
16814s,@lang_opt_files@,$lang_opt_files,;t t
16815s,@lang_specs_files@,$lang_specs_files,;t t
16816s,@lang_tree_files@,$lang_tree_files,;t t
16817s,@local_prefix@,$local_prefix,;t t
16818s,@md_file@,$md_file,;t t
16819s,@objc_boehm_gc@,$objc_boehm_gc,;t t
16820s,@out_file@,$out_file,;t t
16821s,@out_object_file@,$out_object_file,;t t
16822s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
16823s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
ba479fd2
NN
16824s,@thread_file@,$thread_file,;t t
16825s,@tm_file_list@,$tm_file_list,;t t
16826s,@tm_include_list@,$tm_include_list,;t t
16827s,@tm_defines@,$tm_defines,;t t
16828s,@tm_p_file_list@,$tm_p_file_list,;t t
16829s,@tm_p_include_list@,$tm_p_include_list,;t t
16830s,@xm_file_list@,$xm_file_list,;t t
16831s,@xm_include_list@,$xm_include_list,;t t
16832s,@xm_defines@,$xm_defines,;t t
ba479fd2
NN
16833s,@c_target_objs@,$c_target_objs,;t t
16834s,@cxx_target_objs@,$cxx_target_objs,;t t
16835s,@target_cpu_default@,$target_cpu_default,;t t
6de9cd9a
DN
16836s,@GMPLIBS@,$GMPLIBS,;t t
16837s,@GMPINC@,$GMPINC,;t t
ba479fd2
NN
16838s,@LIBOBJS@,$LIBOBJS,;t t
16839s,@LTLIBOBJS@,$LTLIBOBJS,;t t
16840/@language_hooks@/r $language_hooks
16841s,@language_hooks@,,;t t
16842CEOF
16843
16844_ACEOF
16845
16846 cat >>$CONFIG_STATUS <<\_ACEOF
16847 # Split the substitutions into bite-sized pieces for seds with
16848 # small command number limits, like on Digital OSF/1 and HP-UX.
16849 ac_max_sed_lines=48
16850 ac_sed_frag=1 # Number of current file.
16851 ac_beg=1 # First line for current file.
16852 ac_end=$ac_max_sed_lines # Line after last line for current file.
16853 ac_more_lines=:
16854 ac_sed_cmds=
16855 while $ac_more_lines; do
16856 if test $ac_beg -gt 1; then
16857 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16858 else
16859 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16860 fi
16861 if test ! -s $tmp/subs.frag; then
16862 ac_more_lines=false
16863 else
16864 # The purpose of the label and of the branching condition is to
16865 # speed up the sed processing (if there are no `@' at all, there
16866 # is no need to browse any of the substitutions).
16867 # These are the two extra sed commands mentioned above.
16868 (echo ':t
16869 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16870 if test -z "$ac_sed_cmds"; then
86da66b5 16871 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2 16872 else
86da66b5 16873 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2
NN
16874 fi
16875 ac_sed_frag=`expr $ac_sed_frag + 1`
16876 ac_beg=$ac_end
16877 ac_end=`expr $ac_end + $ac_max_sed_lines`
16878 fi
16879 done
16880 if test -z "$ac_sed_cmds"; then
16881 ac_sed_cmds=cat
63cf211a 16882 fi
ba479fd2 16883fi # test -n "$CONFIG_FILES"
cafe096b 16884
ba479fd2
NN
16885_ACEOF
16886cat >>$CONFIG_STATUS <<\_ACEOF
16887for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16888 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16889 case $ac_file in
16890 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
16891 cat >$tmp/stdin
16892 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16893 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16894 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 16895 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16896 * ) ac_file_in=$ac_file.in ;;
63cf211a 16897 esac
cafe096b 16898
ba479fd2
NN
16899 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16900 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16901$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16902 X"$ac_file" : 'X\(//\)[^/]' \| \
16903 X"$ac_file" : 'X\(//\)$' \| \
16904 X"$ac_file" : 'X\(/\)' \| \
16905 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16906echo X"$ac_file" |
16907 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16908 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16909 /^X\(\/\/\)$/{ s//\1/; q; }
16910 /^X\(\/\).*/{ s//\1/; q; }
16911 s/.*/./; q'`
16912 { if $as_mkdir_p; then
16913 mkdir -p "$ac_dir"
16914 else
16915 as_dir="$ac_dir"
16916 as_dirs=
16917 while test ! -d "$as_dir"; do
16918 as_dirs="$as_dir $as_dirs"
16919 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16920$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16921 X"$as_dir" : 'X\(//\)[^/]' \| \
16922 X"$as_dir" : 'X\(//\)$' \| \
16923 X"$as_dir" : 'X\(/\)' \| \
16924 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16925echo X"$as_dir" |
16926 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16927 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16928 /^X\(\/\/\)$/{ s//\1/; q; }
16929 /^X\(\/\).*/{ s//\1/; q; }
16930 s/.*/./; q'`
16931 done
16932 test ! -n "$as_dirs" || mkdir $as_dirs
16933 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16934echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16935 { (exit 1); exit 1; }; }; }
6e3f3080 16936
ba479fd2
NN
16937 ac_builddir=.
16938
16939if test "$ac_dir" != .; then
16940 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16941 # A "../" for each directory in $ac_dir_suffix.
16942 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16943else
16944 ac_dir_suffix= ac_top_builddir=
16945fi
16946
16947case $srcdir in
16948 .) # No --srcdir option. We are building in place.
16949 ac_srcdir=.
16950 if test -z "$ac_top_builddir"; then
16951 ac_top_srcdir=.
16952 else
16953 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16954 fi ;;
16955 [\\/]* | ?:[\\/]* ) # Absolute path.
16956 ac_srcdir=$srcdir$ac_dir_suffix;
16957 ac_top_srcdir=$srcdir ;;
16958 *) # Relative path.
16959 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16960 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16961esac
8ab705be
KC
16962
16963# Do not use `cd foo && pwd` to compute absolute paths, because
16964# the directories may not exist.
16965case `pwd` in
16966.) ac_abs_builddir="$ac_dir";;
86da66b5 16967*)
8ab705be
KC
16968 case "$ac_dir" in
16969 .) ac_abs_builddir=`pwd`;;
16970 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
16971 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
16972 esac;;
16973esac
8ab705be 16974case $ac_abs_builddir in
86da66b5
HPN
16975.) ac_abs_top_builddir=${ac_top_builddir}.;;
16976*)
16977 case ${ac_top_builddir}. in
8ab705be 16978 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 16979 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 16980 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
16981 esac;;
16982esac
8ab705be 16983case $ac_abs_builddir in
86da66b5
HPN
16984.) ac_abs_srcdir=$ac_srcdir;;
16985*)
16986 case $ac_srcdir in
8ab705be 16987 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 16988 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 16989 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
16990 esac;;
16991esac
8ab705be 16992case $ac_abs_builddir in
86da66b5
HPN
16993.) ac_abs_top_srcdir=$ac_top_srcdir;;
16994*)
16995 case $ac_top_srcdir in
8ab705be 16996 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 16997 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 16998 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
16999 esac;;
17000esac
ba479fd2
NN
17001
17002
17003
d7974fe6
KC
17004 if test x"$ac_file" != x-; then
17005 { echo "$as_me:$LINENO: creating $ac_file" >&5
17006echo "$as_me: creating $ac_file" >&6;}
17007 rm -f "$ac_file"
17008 fi
ba479fd2
NN
17009 # Let's still pretend it is `configure' which instantiates (i.e., don't
17010 # use $as_me), people would be surprised to read:
17011 # /* config.h. Generated by config.status. */
17012 if test x"$ac_file" = x-; then
17013 configure_input=
17014 else
17015 configure_input="$ac_file. "
17016 fi
17017 configure_input=$configure_input"Generated from `echo $ac_file_in |
86da66b5 17018 sed 's,.*/,,'` by configure."
ba479fd2
NN
17019
17020 # First look for the input files in the build tree, otherwise in the
17021 # src tree.
17022 ac_file_inputs=`IFS=:
17023 for f in $ac_file_in; do
17024 case $f in
17025 -) echo $tmp/stdin ;;
17026 [\\/$]*)
86da66b5
HPN
17027 # Absolute (can't be DOS-style, as IFS=:)
17028 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17029echo "$as_me: error: cannot find input file: $f" >&2;}
17030 { (exit 1); exit 1; }; }
86da66b5 17031 echo "$f";;
ba479fd2 17032 *) # Relative
86da66b5
HPN
17033 if test -f "$f"; then
17034 # Build tree
17035 echo "$f"
17036 elif test -f "$srcdir/$f"; then
17037 # Source tree
17038 echo "$srcdir/$f"
17039 else
17040 # /dev/null tree
17041 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17042echo "$as_me: error: cannot find input file: $f" >&2;}
17043 { (exit 1); exit 1; }; }
86da66b5 17044 fi;;
ba479fd2
NN
17045 esac
17046 done` || { (exit 1); exit 1; }
17047_ACEOF
17048cat >>$CONFIG_STATUS <<_ACEOF
17049 sed "$ac_vpsub
17050$extrasub
17051_ACEOF
17052cat >>$CONFIG_STATUS <<\_ACEOF
17053:t
17054/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17055s,@configure_input@,$configure_input,;t t
17056s,@srcdir@,$ac_srcdir,;t t
17057s,@abs_srcdir@,$ac_abs_srcdir,;t t
17058s,@top_srcdir@,$ac_top_srcdir,;t t
17059s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17060s,@builddir@,$ac_builddir,;t t
17061s,@abs_builddir@,$ac_abs_builddir,;t t
17062s,@top_builddir@,$ac_top_builddir,;t t
17063s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17064" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17065 rm -f $tmp/stdin
17066 if test x"$ac_file" != x-; then
17067 mv $tmp/out $ac_file
17068 else
17069 cat $tmp/out
17070 rm -f $tmp/out
17071 fi
17072
17073done
17074_ACEOF
17075cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 17076
ba479fd2
NN
17077#
17078# CONFIG_HEADER section.
17079#
861bb6c1
JL
17080
17081# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17082# NAME is the cpp macro being defined and VALUE is the value it is being given.
17083#
17084# ac_d sets the value in "#define NAME VALUE" lines.
86da66b5
HPN
17085ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17086ac_dB='[ ].*$,\1#\2'
ba479fd2
NN
17087ac_dC=' '
17088ac_dD=',;t'
17089# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
86da66b5 17090ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ba479fd2 17091ac_uB='$,\1#\2define\3'
861bb6c1 17092ac_uC=' '
ba479fd2
NN
17093ac_uD=',;t'
17094
17095for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 17096 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
17097 case $ac_file in
17098 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
17099 cat >$tmp/stdin
17100 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17101 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 17102 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 17103 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 17104 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
17105 esac
17106
ba479fd2
NN
17107 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17108echo "$as_me: creating $ac_file" >&6;}
17109
17110 # First look for the input files in the build tree, otherwise in the
17111 # src tree.
17112 ac_file_inputs=`IFS=:
17113 for f in $ac_file_in; do
17114 case $f in
17115 -) echo $tmp/stdin ;;
17116 [\\/$]*)
86da66b5
HPN
17117 # Absolute (can't be DOS-style, as IFS=:)
17118 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17119echo "$as_me: error: cannot find input file: $f" >&2;}
17120 { (exit 1); exit 1; }; }
86da66b5
HPN
17121 # Do quote $f, to prevent DOS paths from being IFS'd.
17122 echo "$f";;
ba479fd2 17123 *) # Relative
86da66b5
HPN
17124 if test -f "$f"; then
17125 # Build tree
17126 echo "$f"
17127 elif test -f "$srcdir/$f"; then
17128 # Source tree
17129 echo "$srcdir/$f"
17130 else
17131 # /dev/null tree
17132 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17133echo "$as_me: error: cannot find input file: $f" >&2;}
17134 { (exit 1); exit 1; }; }
86da66b5 17135 fi;;
ba479fd2
NN
17136 esac
17137 done` || { (exit 1); exit 1; }
17138 # Remove the trailing spaces.
86da66b5 17139 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
ba479fd2
NN
17140
17141_ACEOF
17142
17143# Transform confdefs.h into two sed scripts, `conftest.defines' and
17144# `conftest.undefs', that substitutes the proper values into
17145# config.h.in to produce config.h. The first handles `#define'
17146# templates, and the second `#undef' templates.
17147# And first: Protect against being on the right side of a sed subst in
17148# config.status. Protect against being in an unquoted here document
17149# in config.status.
17150rm -f conftest.defines conftest.undefs
17151# Using a here document instead of a string reduces the quoting nightmare.
17152# Putting comments in sed scripts is not portable.
17153#
17154# `end' is used to avoid that the second main sed command (meant for
17155# 0-ary CPP macros) applies to n-ary macro definitions.
17156# See the Autoconf documentation for `clear'.
17157cat >confdef2sed.sed <<\_ACEOF
17158s/[\\&,]/\\&/g
17159s,[\\$`],\\&,g
17160t clear
17161: clear
86da66b5 17162s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
ba479fd2 17163t end
86da66b5 17164s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
ba479fd2
NN
17165: end
17166_ACEOF
17167# If some macros were called several times there might be several times
17168# the same #defines, which is useless. Nevertheless, we may not want to
17169# sort them, since we want the *last* AC-DEFINE to be honored.
17170uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17171sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17172rm -f confdef2sed.sed
861bb6c1
JL
17173
17174# This sed command replaces #undef with comments. This is necessary, for
17175# example, in the case of _POSIX_SOURCE, which is predefined and required
17176# on some systems where configure will not decide to define it.
ba479fd2 17177cat >>conftest.undefs <<\_ACEOF
86da66b5 17178s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
ba479fd2
NN
17179_ACEOF
17180
17181# Break up conftest.defines because some shells have a limit on the size
17182# of here documents, and old seds have small limits too (100 cmds).
17183echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
86da66b5 17184echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
ba479fd2
NN
17185echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17186echo ' :' >>$CONFIG_STATUS
17187rm -f conftest.tail
17188while grep . conftest.defines >/dev/null
17189do
17190 # Write a limited-size here document to $tmp/defines.sed.
17191 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17192 # Speed up: don't consider the non `#define' lines.
86da66b5 17193 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
ba479fd2
NN
17194 # Work around the forget-to-reset-the-flag bug.
17195 echo 't clr' >>$CONFIG_STATUS
17196 echo ': clr' >>$CONFIG_STATUS
17197 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
17198 echo 'CEOF
17199 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17200 rm -f $tmp/in
17201 mv $tmp/out $tmp/in
17202' >>$CONFIG_STATUS
17203 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17204 rm -f conftest.defines
17205 mv conftest.tail conftest.defines
17206done
17207rm -f conftest.defines
17208echo ' fi # grep' >>$CONFIG_STATUS
17209echo >>$CONFIG_STATUS
861bb6c1 17210
ba479fd2
NN
17211# Break up conftest.undefs because some shells have a limit on the size
17212# of here documents, and old seds have small limits too (100 cmds).
17213echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 17214rm -f conftest.tail
ba479fd2 17215while grep . conftest.undefs >/dev/null
861bb6c1 17216do
ba479fd2
NN
17217 # Write a limited-size here document to $tmp/undefs.sed.
17218 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17219 # Speed up: don't consider the non `#undef'
86da66b5 17220 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
ba479fd2
NN
17221 # Work around the forget-to-reset-the-flag bug.
17222 echo 't clr' >>$CONFIG_STATUS
17223 echo ': clr' >>$CONFIG_STATUS
17224 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 17225 echo 'CEOF
ba479fd2
NN
17226 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17227 rm -f $tmp/in
17228 mv $tmp/out $tmp/in
17229' >>$CONFIG_STATUS
17230 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17231 rm -f conftest.undefs
17232 mv conftest.tail conftest.undefs
861bb6c1 17233done
ba479fd2
NN
17234rm -f conftest.undefs
17235
17236cat >>$CONFIG_STATUS <<\_ACEOF
17237 # Let's still pretend it is `configure' which instantiates (i.e., don't
17238 # use $as_me), people would be surprised to read:
17239 # /* config.h. Generated by config.status. */
17240 if test x"$ac_file" = x-; then
17241 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 17242 else
ba479fd2 17243 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 17244 fi
ba479fd2
NN
17245 cat $tmp/in >>$tmp/config.h
17246 rm -f $tmp/in
17247 if test x"$ac_file" != x-; then
17248 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
17249 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17250echo "$as_me: $ac_file is unchanged" >&6;}
17251 else
17252 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17253$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17254 X"$ac_file" : 'X\(//\)[^/]' \| \
17255 X"$ac_file" : 'X\(//\)$' \| \
17256 X"$ac_file" : 'X\(/\)' \| \
17257 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17258echo X"$ac_file" |
17259 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17260 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17261 /^X\(\/\/\)$/{ s//\1/; q; }
17262 /^X\(\/\).*/{ s//\1/; q; }
17263 s/.*/./; q'`
17264 { if $as_mkdir_p; then
17265 mkdir -p "$ac_dir"
17266 else
17267 as_dir="$ac_dir"
17268 as_dirs=
17269 while test ! -d "$as_dir"; do
17270 as_dirs="$as_dir $as_dirs"
17271 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17272$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17273 X"$as_dir" : 'X\(//\)[^/]' \| \
17274 X"$as_dir" : 'X\(//\)$' \| \
17275 X"$as_dir" : 'X\(/\)' \| \
17276 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17277echo X"$as_dir" |
17278 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17279 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17280 /^X\(\/\/\)$/{ s//\1/; q; }
17281 /^X\(\/\).*/{ s//\1/; q; }
17282 s/.*/./; q'`
17283 done
17284 test ! -n "$as_dirs" || mkdir $as_dirs
17285 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17286echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17287 { (exit 1); exit 1; }; }; }
63cf211a 17288
ba479fd2
NN
17289 rm -f $ac_file
17290 mv $tmp/config.h $ac_file
17291 fi
17292 else
17293 cat $tmp/config.h
17294 rm -f $tmp/config.h
17295 fi
17296done
17297_ACEOF
17298cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 17299
ba479fd2
NN
17300#
17301# CONFIG_COMMANDS section.
17302#
17303for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17304 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17305 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17306 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
17307$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17308 X"$ac_dest" : 'X\(//\)[^/]' \| \
17309 X"$ac_dest" : 'X\(//\)$' \| \
17310 X"$ac_dest" : 'X\(/\)' \| \
17311 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17312echo X"$ac_dest" |
17313 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17314 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17315 /^X\(\/\/\)$/{ s//\1/; q; }
17316 /^X\(\/\).*/{ s//\1/; q; }
17317 s/.*/./; q'`
86da66b5
HPN
17318 { if $as_mkdir_p; then
17319 mkdir -p "$ac_dir"
17320 else
17321 as_dir="$ac_dir"
17322 as_dirs=
17323 while test ! -d "$as_dir"; do
17324 as_dirs="$as_dir $as_dirs"
17325 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17326$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17327 X"$as_dir" : 'X\(//\)[^/]' \| \
17328 X"$as_dir" : 'X\(//\)$' \| \
17329 X"$as_dir" : 'X\(/\)' \| \
17330 . : '\(.\)' 2>/dev/null ||
17331echo X"$as_dir" |
17332 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17333 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17334 /^X\(\/\/\)$/{ s//\1/; q; }
17335 /^X\(\/\).*/{ s//\1/; q; }
17336 s/.*/./; q'`
17337 done
17338 test ! -n "$as_dirs" || mkdir $as_dirs
17339 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17340echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17341 { (exit 1); exit 1; }; }; }
17342
ba479fd2
NN
17343 ac_builddir=.
17344
17345if test "$ac_dir" != .; then
17346 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17347 # A "../" for each directory in $ac_dir_suffix.
17348 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17349else
17350 ac_dir_suffix= ac_top_builddir=
17351fi
17352
17353case $srcdir in
17354 .) # No --srcdir option. We are building in place.
17355 ac_srcdir=.
17356 if test -z "$ac_top_builddir"; then
17357 ac_top_srcdir=.
17358 else
17359 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17360 fi ;;
17361 [\\/]* | ?:[\\/]* ) # Absolute path.
17362 ac_srcdir=$srcdir$ac_dir_suffix;
17363 ac_top_srcdir=$srcdir ;;
17364 *) # Relative path.
17365 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17366 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17367esac
8ab705be
KC
17368
17369# Do not use `cd foo && pwd` to compute absolute paths, because
17370# the directories may not exist.
17371case `pwd` in
17372.) ac_abs_builddir="$ac_dir";;
86da66b5 17373*)
8ab705be
KC
17374 case "$ac_dir" in
17375 .) ac_abs_builddir=`pwd`;;
17376 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17377 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
17378 esac;;
17379esac
8ab705be 17380case $ac_abs_builddir in
86da66b5
HPN
17381.) ac_abs_top_builddir=${ac_top_builddir}.;;
17382*)
17383 case ${ac_top_builddir}. in
8ab705be 17384 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 17385 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 17386 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
17387 esac;;
17388esac
8ab705be 17389case $ac_abs_builddir in
86da66b5
HPN
17390.) ac_abs_srcdir=$ac_srcdir;;
17391*)
17392 case $ac_srcdir in
8ab705be 17393 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 17394 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 17395 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
17396 esac;;
17397esac
8ab705be 17398case $ac_abs_builddir in
86da66b5
HPN
17399.) ac_abs_top_srcdir=$ac_top_srcdir;;
17400*)
17401 case $ac_top_srcdir in
8ab705be 17402 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 17403 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 17404 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
17405 esac;;
17406esac
ba479fd2
NN
17407
17408
17409 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
17410echo "$as_me: executing $ac_dest commands" >&6;}
17411 case $ac_dest in
17412 default )
f1faaabd
NN
17413case ${CONFIG_HEADERS} in
17414 *auto-host.h:config.in*)
17415 echo > cstamp-h ;;
861bb6c1 17416esac
2ed26f6b 17417# Make sure all the subdirs exist.
3b620440 17418for d in $subdirs doc build
2ed26f6b 17419do
2ed26f6b 17420 test -d $d || mkdir $d
2ed26f6b 17421done
93cf819d
BK
17422# If the host supports symlinks, point stage[1234] at ../stage[1234] so
17423# bootstrapping and the installation procedure can still use
17424# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
17425# FLAGS_TO_PASS has been modified to solve the problem there.
17426# This is virtually a duplicate of what happens in configure.lang; we do
17427# an extra check to make sure this only happens if ln -s can be used.
35f06ae4
PB
17428case "$LN_S" in
17429 *-s*)
17430 for d in ${subdirs} ; do
1e6347d8 17431 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 17432 cd $d
6a1b7268 17433 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
17434 do
17435 rm -f $t
35f06ae4 17436 $LN_S ../$t $t 2>/dev/null
4e8a434e
BK
17437 done
17438 cd $STARTDIR
35f06ae4
PB
17439 done
17440 ;;
17441esac
ba479fd2
NN
17442 ;;
17443 esac
17444done
17445_ACEOF
cafe096b 17446
ba479fd2
NN
17447cat >>$CONFIG_STATUS <<\_ACEOF
17448
17449{ (exit 0); exit 0; }
17450_ACEOF
861bb6c1 17451chmod +x $CONFIG_STATUS
ba479fd2
NN
17452ac_clean_files=$ac_clean_files_save
17453
17454
17455# configure is writing to config.log, and then calls config.status.
17456# config.status does its own redirection, appending to config.log.
17457# Unfortunately, on DOS this fails, as config.log is still kept open
17458# by configure, so config.status won't be able to write to it; its
17459# output is simply discarded. So we exec the FD to /dev/null,
17460# effectively closing config.log, so it can be properly (re)opened and
17461# appended to by config.status. When coming back to configure, we
17462# need to make the FD available again.
17463if test "$no_create" != yes; then
17464 ac_cs_success=:
17465 ac_config_status_args=
17466 test "$silent" = yes &&
17467 ac_config_status_args="$ac_config_status_args --quiet"
17468 exec 5>/dev/null
17469 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17470 exec 5>>config.log
17471 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17472 # would make configure fail if this is the last instruction.
17473 $ac_cs_success || { (exit 1); exit 1; }
17474fi
861bb6c1 17475