]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
Daily bump.
[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
18fc9bd4 312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn cxx_compat_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_selected_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
ba479fd2 313ac_subst_files='language_hooks'
861bb6c1
JL
314
315# Initialize some variables set by options.
ba479fd2
NN
316ac_init_help=
317ac_init_version=false
861bb6c1
JL
318# The variables have the same names as the options, with
319# dashes changed to underlines.
ba479fd2 320cache_file=/dev/null
861bb6c1 321exec_prefix=NONE
861bb6c1 322no_create=
861bb6c1
JL
323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
861bb6c1
JL
331verbose=
332x_includes=NONE
333x_libraries=NONE
ba479fd2
NN
334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
861bb6c1
JL
340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
861bb6c1
JL
353ac_prev=
354for ac_option
355do
861bb6c1
JL
356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
361 fi
362
ba479fd2 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
861bb6c1
JL
364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
ba479fd2 367 case $ac_option in
861bb6c1
JL
368
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 372 bindir=$ac_optarg ;;
861bb6c1
JL
373
374 -build | --build | --buil | --bui | --bu)
ba479fd2 375 ac_prev=build_alias ;;
861bb6c1 376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 377 build_alias=$ac_optarg ;;
861bb6c1
JL
378
379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
861bb6c1
JL
388
389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
ba479fd2 393 datadir=$ac_optarg ;;
861bb6c1
JL
394
395 -disable-* | --disable-*)
ba479fd2 396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 397 # Reject names that are not valid shell variable names.
ba479fd2
NN
398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
861bb6c1
JL
403
404 -enable-* | --enable-*)
ba479fd2 405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 406 # Reject names that are not valid shell variable names.
ba479fd2
NN
407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
413 *) ac_optarg=yes ;;
414 esac
ba479fd2 415 eval "enable_$ac_feature='$ac_optarg'" ;;
861bb6c1
JL
416
417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
ba479fd2 424 exec_prefix=$ac_optarg ;;
861bb6c1
JL
425
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
429
ba479fd2
NN
430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
861bb6c1
JL
436
437 -host | --host | --hos | --ho)
ba479fd2 438 ac_prev=host_alias ;;
861bb6c1 439 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 440 host_alias=$ac_optarg ;;
861bb6c1
JL
441
442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 447 includedir=$ac_optarg ;;
861bb6c1
JL
448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 452 infodir=$ac_optarg ;;
861bb6c1
JL
453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 457 libdir=$ac_optarg ;;
861bb6c1
JL
458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
ba479fd2 464 libexecdir=$ac_optarg ;;
861bb6c1
JL
465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
ba479fd2 473 localstatedir=$ac_optarg ;;
861bb6c1
JL
474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 478 mandir=$ac_optarg ;;
861bb6c1
JL
479
480 -nfp | --nfp | --nf)
481 # Obsolete; use --without-fp.
482 with_fp=no ;;
483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 485 | --no-cr | --no-c | -n)
861bb6c1
JL
486 no_create=yes ;;
487
488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
491
492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 499 oldincludedir=$ac_optarg ;;
861bb6c1
JL
500
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 504 prefix=$ac_optarg ;;
861bb6c1
JL
505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 511 program_prefix=$ac_optarg ;;
861bb6c1
JL
512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 518 program_suffix=$ac_optarg ;;
861bb6c1
JL
519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 535 program_transform_name=$ac_optarg ;;
861bb6c1
JL
536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
ba479fd2 545 sbindir=$ac_optarg ;;
861bb6c1
JL
546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
ba479fd2 556 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
557
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
ba479fd2 561 site=$ac_optarg ;;
861bb6c1
JL
562
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 566 srcdir=$ac_optarg ;;
861bb6c1
JL
567
568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 573 sysconfdir=$ac_optarg ;;
861bb6c1
JL
574
575 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 576 ac_prev=target_alias ;;
861bb6c1 577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 578 target_alias=$ac_optarg ;;
861bb6c1
JL
579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
ba479fd2
NN
583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
861bb6c1
JL
585
586 -with-* | --with-*)
ba479fd2 587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 588 # Reject names that are not valid shell variable names.
ba479fd2
NN
589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
861bb6c1 592 ac_package=`echo $ac_package| sed 's/-/_/g'`
ba479fd2
NN
593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
595 *) ac_optarg=yes ;;
596 esac
ba479fd2 597 eval "with_$ac_package='$ac_optarg'" ;;
861bb6c1
JL
598
599 -without-* | --without-*)
ba479fd2 600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 601 # Reject names that are not valid shell variable names.
ba479fd2
NN
602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
861bb6c1
JL
607
608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 617 x_includes=$ac_optarg ;;
861bb6c1
JL
618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 624 x_libraries=$ac_optarg ;;
861bb6c1 625
ba479fd2
NN
626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
861bb6c1
JL
629 ;;
630
ba479fd2
NN
631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
861bb6c1 641 *)
ba479fd2
NN
642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
647 ;;
648
649 esac
650done
651
652if test -n "$ac_prev"; then
ba479fd2
NN
653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
63cf211a 656fi
63cf211a 657
ba479fd2
NN
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
666 esac
667done
093e61a6 668
ba479fd2
NN
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
86da66b5 671 localstatedir libdir includedir oldincludedir infodir mandir
861bb6c1 672do
ba479fd2
NN
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
861bb6c1
JL
678 esac
679done
680
ba479fd2
NN
681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
687
688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
6e3f3080 698
ba479fd2
NN
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
861bb6c1 703
861bb6c1
JL
704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707 ac_srcdir_defaulted=yes
708 # Try the directory containing this script, then its parent.
ba479fd2
NN
709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
861bb6c1
JL
721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
ba479fd2
NN
730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
63cf211a 732 else
ba479fd2
NN
733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
63cf211a
NN
735 fi
736fi
ba479fd2
NN
737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
6de9cd9a
DN
773ac_env_GMPLIBS_set=${GMPLIBS+set}
774ac_env_GMPLIBS_value=$GMPLIBS
775ac_cv_env_GMPLIBS_set=${GMPLIBS+set}
776ac_cv_env_GMPLIBS_value=$GMPLIBS
777ac_env_GMPINC_set=${GMPINC+set}
778ac_env_GMPINC_value=$GMPINC
779ac_cv_env_GMPINC_set=${GMPINC+set}
780ac_cv_env_GMPINC_value=$GMPINC
63cf211a 781
ba479fd2
NN
782#
783# Report the --help message.
784#
785if test "$ac_init_help" = "long"; then
786 # Omit some internal or obsolete options to make the list less imposing.
787 # This message is too long to be a string in the A/UX 3.1 sh.
788 cat <<_ACEOF
789\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 790
ba479fd2 791Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 792
ba479fd2
NN
793To assign environment variables (e.g., CC, CFLAGS...), specify them as
794VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 795
ba479fd2 796Defaults for the options are specified in brackets.
861bb6c1 797
ba479fd2
NN
798Configuration:
799 -h, --help display this help and exit
800 --help=short display options specific to this package
801 --help=recursive display the short help of all the included packages
802 -V, --version display version information and exit
803 -q, --quiet, --silent do not print \`checking...' messages
804 --cache-file=FILE cache test results in FILE [disabled]
805 -C, --config-cache alias for \`--cache-file=config.cache'
806 -n, --no-create do not create output files
807 --srcdir=DIR find the sources in DIR [configure dir or \`..']
808
809_ACEOF
810
811 cat <<_ACEOF
812Installation directories:
813 --prefix=PREFIX install architecture-independent files in PREFIX
86da66b5 814 [$ac_default_prefix]
ba479fd2 815 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
86da66b5 816 [PREFIX]
861bb6c1 817
ba479fd2
NN
818By default, \`make install' will install all the files in
819\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
820an installation prefix other than \`$ac_default_prefix' using \`--prefix',
821for instance \`--prefix=\$HOME'.
13c22933 822
ba479fd2 823For better control, use the options below.
13c22933 824
ba479fd2
NN
825Fine tuning of the installation directories:
826 --bindir=DIR user executables [EPREFIX/bin]
827 --sbindir=DIR system admin executables [EPREFIX/sbin]
828 --libexecdir=DIR program executables [EPREFIX/libexec]
829 --datadir=DIR read-only architecture-independent data [PREFIX/share]
830 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
831 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
832 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
833 --libdir=DIR object code libraries [EPREFIX/lib]
834 --includedir=DIR C header files [PREFIX/include]
835 --oldincludedir=DIR C header files for non-gcc [/usr/include]
836 --infodir=DIR info documentation [PREFIX/info]
837 --mandir=DIR man documentation [PREFIX/man]
838_ACEOF
13c22933 839
ba479fd2 840 cat <<\_ACEOF
13c22933 841
ba479fd2
NN
842Program names:
843 --program-prefix=PREFIX prepend PREFIX to installed program names
844 --program-suffix=SUFFIX append SUFFIX to installed program names
845 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 846
ba479fd2
NN
847System types:
848 --build=BUILD configure for building on BUILD [guessed]
849 --host=HOST cross-compile to build programs to run on HOST [BUILD]
850 --target=TARGET configure for building compilers for TARGET [HOST]
851_ACEOF
13c22933
JJ
852fi
853
ba479fd2 854if test -n "$ac_init_help"; then
13c22933 855
ba479fd2 856 cat <<\_ACEOF
13c22933 857
ba479fd2
NN
858Optional Features:
859 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
860 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
861 --enable-generated-files-in-srcdir
862 put copies of generated files in source dir
863 intended for creating source tarballs for users
864 without texinfo bison or flex.
09a9c095 865 --enable-werror-always enable -Werror always
ba479fd2
NN
866 --enable-werror enable -Werror in bootstrap stage2 and later
867 --enable-checking=LIST
868 enable expensive run-time checks. With LIST,
869 enable only specific categories of checks.
cdce5c16
NS
870 Categories are: yes,no,all,none,release.
871 Flags are: assert,fold,gc,gcac,misc,
872 rtlflag,rtl,runtime,tree,valgrind.
74ee1642 873 --enable-mapped-location location_t is fileline integer cookie
ba479fd2 874 --enable-coverage=LEVEL
fb38008e 875 enable compiler's code coverage collection.
ba479fd2
NN
876 Use to measure compiler performance and locate
877 unused parts of the compiler. With LEVEL, specify
878 optimization. Values are opt, noopt,
879 default is noopt
880 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
881 --enable-multilib enable library support for multiple ABIs
882 --enable-__cxa_atexit enable __cxa_atexit for C++
486aa804 883 --enable-decimal-float enable decimal float extension to C
ba479fd2
NN
884 --enable-threads enable thread usage for target GCC
885 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
886 --enable-tls enable or disable generation of tls code
887 overriding the assembler check for tls support
ba479fd2
NN
888 --enable-objc-gc enable the use of Boehm's garbage collector with
889 the GNU Objective-C runtime
890 --disable-shared don't provide a shared libgcc
891 --enable-intermodule build the compiler in one step
f3c9f174 892 --enable-languages=LIST specify which front-ends to build
dfb77e37 893 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
894 --enable-initfini-array use .init_array/.fini_array sections
895 --enable-sjlj-exceptions
896 arrange to use setjmp/longjmp exception handling
7f970b70 897 --enable-secureplt enable -msecure-plt by default for PowerPC
ba479fd2
NN
898 --disable-win32-registry
899 disable lookup of installation paths in the
900 Registry on Windows hosts
901 --enable-win32-registry enable registry lookup (default)
902 --enable-win32-registry=KEY
903 use KEY instead of GCC version as the last portion
904 of the registry key
905 --enable-maintainer-mode
906 enable make rules and dependencies not useful
907 (and sometimes confusing) to the casual installer
908 --enable-version-specific-runtime-libs
909 specify that runtime libraries should be
910 installed in a compiler-specific directory
093e61a6 911
ba479fd2
NN
912Optional Packages:
913 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
914 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
915 --with-local-prefix=DIR specifies directory to put local include
916 --with-gxx-include-dir=DIR
917 specifies directory to put g++ header files
918 --with-cpp-install-dir=DIR
919 install the user visible C preprocessor in DIR
920 (relative to PREFIX) as well as PREFIX/bin
921 --with-gnu-ld arrange to work with GNU ld.
922 --with-ld arrange to use the specified ld (full pathname)
d594623a 923 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
924 --with-gnu-as arrange to work with GNU as
925 --with-as arrange to use the specified as (full pathname)
926 --with-stabs arrange to use stabs instead of host debug format
927 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
928 --with-build-sysroot=sysroot
929 use sysroot as the system root during the build
ba479fd2 930 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
dfb77e37
KC
931 --with-gnu-ld assume the C compiler uses GNU ld default=no
932 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
933 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 934 --with-system-libunwind use installed libunwind
ed965309 935 --with-long-double-128 Use 128-bit long double by default.
59415997 936 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
937 with the compiler
938 --with-system-zlib use installed libz
22482f74
MS
939 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
940 --with-datarootdir=DIR Use DIR as the data root [PREFIX/share]
941 --with-docdir=DIR Install documentation in DIR [DATAROOTDIR]
942 --with-htmldir=DIR html documentation in in DIR [DOCDIR]
13c22933 943
ba479fd2
NN
944Some influential environment variables:
945 CC C compiler command
946 CFLAGS C compiler flags
947 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
948 nonstandard directory <lib dir>
949 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
950 headers in a nonstandard directory <include dir>
951 CPP C preprocessor
6de9cd9a
DN
952 GMPLIBS How to link GMP
953 GMPINC How to find GMP include files
13c22933 954
ba479fd2
NN
955Use these variables to override the choices made by `configure' or to help
956it to find libraries and programs with nonstandard names/locations.
73458fb7 957
ba479fd2
NN
958_ACEOF
959fi
6e3f3080 960
ba479fd2
NN
961if test "$ac_init_help" = "recursive"; then
962 # If there are subdirs, report their specific --help.
963 ac_popdir=`pwd`
964 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
965 test -d $ac_dir || continue
966 ac_builddir=.
967
968if test "$ac_dir" != .; then
969 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
970 # A "../" for each directory in $ac_dir_suffix.
971 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
972else
973 ac_dir_suffix= ac_top_builddir=
974fi
975
976case $srcdir in
977 .) # No --srcdir option. We are building in place.
978 ac_srcdir=.
979 if test -z "$ac_top_builddir"; then
980 ac_top_srcdir=.
981 else
982 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
983 fi ;;
984 [\\/]* | ?:[\\/]* ) # Absolute path.
985 ac_srcdir=$srcdir$ac_dir_suffix;
986 ac_top_srcdir=$srcdir ;;
987 *) # Relative path.
988 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
989 ac_top_srcdir=$ac_top_builddir$srcdir ;;
990esac
8ab705be
KC
991
992# Do not use `cd foo && pwd` to compute absolute paths, because
993# the directories may not exist.
994case `pwd` in
995.) ac_abs_builddir="$ac_dir";;
86da66b5 996*)
8ab705be
KC
997 case "$ac_dir" in
998 .) ac_abs_builddir=`pwd`;;
999 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1000 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
1001 esac;;
1002esac
8ab705be 1003case $ac_abs_builddir in
86da66b5
HPN
1004.) ac_abs_top_builddir=${ac_top_builddir}.;;
1005*)
1006 case ${ac_top_builddir}. in
8ab705be 1007 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 1008 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 1009 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
1010 esac;;
1011esac
8ab705be 1012case $ac_abs_builddir in
86da66b5
HPN
1013.) ac_abs_srcdir=$ac_srcdir;;
1014*)
1015 case $ac_srcdir in
8ab705be 1016 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 1017 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 1018 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
1019 esac;;
1020esac
8ab705be 1021case $ac_abs_builddir in
86da66b5
HPN
1022.) ac_abs_top_srcdir=$ac_top_srcdir;;
1023*)
1024 case $ac_top_srcdir in
8ab705be 1025 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 1026 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 1027 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
1028 esac;;
1029esac
ba479fd2
NN
1030
1031 cd $ac_dir
1032 # Check for guested configure; otherwise get Cygnus style configure.
1033 if test -f $ac_srcdir/configure.gnu; then
1034 echo
1035 $SHELL $ac_srcdir/configure.gnu --help=recursive
1036 elif test -f $ac_srcdir/configure; then
1037 echo
1038 $SHELL $ac_srcdir/configure --help=recursive
1039 elif test -f $ac_srcdir/configure.ac ||
86da66b5 1040 test -f $ac_srcdir/configure.in; then
ba479fd2
NN
1041 echo
1042 $ac_configure --help
1043 else
1044 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1045 fi
ec6c7392 1046 cd $ac_popdir
ba479fd2
NN
1047 done
1048fi
1049
1050test -n "$ac_init_help" && exit 0
1051if $ac_init_version; then
1052 cat <<\_ACEOF
1053
86da66b5 1054Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1055This configure script is free software; the Free Software Foundation
1056gives unlimited permission to copy, distribute and modify it.
1057_ACEOF
1058 exit 0
1059fi
1060exec 5>config.log
1061cat >&5 <<_ACEOF
1062This file contains any messages produced by compilers while
1063running configure, to aid debugging if configure makes a mistake.
1064
1065It was created by $as_me, which was
8ab705be 1066generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1067
1068 $ $0 $@
1069
1070_ACEOF
1071{
1072cat <<_ASUNAME
1073## --------- ##
1074## Platform. ##
1075## --------- ##
1076
1077hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1078uname -m = `(uname -m) 2>/dev/null || echo unknown`
1079uname -r = `(uname -r) 2>/dev/null || echo unknown`
1080uname -s = `(uname -s) 2>/dev/null || echo unknown`
1081uname -v = `(uname -v) 2>/dev/null || echo unknown`
1082
1083/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1084/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1085
1086/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1087/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1088/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1089hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1090/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1091/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1092/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1093
1094_ASUNAME
1095
1096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1097for as_dir in $PATH
1098do
1099 IFS=$as_save_IFS
1100 test -z "$as_dir" && as_dir=.
1101 echo "PATH: $as_dir"
1102done
1103
1104} >&5
1105
1106cat >&5 <<_ACEOF
1107
1108
1109## ----------- ##
1110## Core tests. ##
1111## ----------- ##
1112
1113_ACEOF
1114
1115
1116# Keep a trace of the command line.
1117# Strip out --no-create and --no-recursion so they do not pile up.
1118# Strip out --silent because we don't want to record it for future runs.
1119# Also quote any args containing shell meta-characters.
1120# Make two passes to allow for proper duplicate-argument suppression.
1121ac_configure_args=
1122ac_configure_args0=
1123ac_configure_args1=
1124ac_sep=
1125ac_must_keep_next=false
1126for ac_pass in 1 2
1127do
1128 for ac_arg
1129 do
1130 case $ac_arg in
1131 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1132 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1133 | -silent | --silent | --silen | --sile | --sil)
1134 continue ;;
1135 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1136 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1137 esac
1138 case $ac_pass in
1139 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1140 2)
1141 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1142 if test $ac_must_keep_next = true; then
86da66b5 1143 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1144 else
86da66b5
HPN
1145 case $ac_arg in
1146 *=* | --config-cache | -C | -disable-* | --disable-* \
1147 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1148 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1149 | -with-* | --with-* | -without-* | --without-* | --x)
1150 case "$ac_configure_args0 " in
1151 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1152 esac
1153 ;;
1154 -* ) ac_must_keep_next=true ;;
1155 esac
ba479fd2
NN
1156 fi
1157 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1158 # Get rid of the leading space.
1159 ac_sep=" "
1160 ;;
1161 esac
1162 done
1163done
1164$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1165$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1166
1167# When interrupted or exit'd, cleanup temporary files, and complete
1168# config.log. We remove comments because anyway the quotes in there
1169# would cause problems or look ugly.
1170# WARNING: Be sure not to use single quotes in there, as some shells,
1171# such as our DU 5.0 friend, will then `close' the trap.
1172trap 'exit_status=$?
1173 # Save into config.log some information that might help in debugging.
1174 {
1175 echo
1176
1177 cat <<\_ASBOX
1178## ---------------- ##
1179## Cache variables. ##
1180## ---------------- ##
1181_ASBOX
1182 echo
1183 # The following way of writing the cache mishandles newlines in values,
1184{
1185 (set) 2>&1 |
1186 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1187 *ac_space=\ *)
1188 sed -n \
86da66b5
HPN
1189 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1190 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
ba479fd2
NN
1191 ;;
1192 *)
1193 sed -n \
86da66b5 1194 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
1195 ;;
1196 esac;
1197}
1198 echo
1199
1200 cat <<\_ASBOX
1201## ----------------- ##
1202## Output variables. ##
1203## ----------------- ##
1204_ASBOX
1205 echo
1206 for ac_var in $ac_subst_vars
1207 do
1208 eval ac_val=$`echo $ac_var`
1209 echo "$ac_var='"'"'$ac_val'"'"'"
1210 done | sort
1211 echo
1212
1213 if test -n "$ac_subst_files"; then
1214 cat <<\_ASBOX
1215## ------------- ##
1216## Output files. ##
1217## ------------- ##
1218_ASBOX
1219 echo
1220 for ac_var in $ac_subst_files
1221 do
1222 eval ac_val=$`echo $ac_var`
86da66b5 1223 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1224 done | sort
1225 echo
1226 fi
1227
1228 if test -s confdefs.h; then
1229 cat <<\_ASBOX
1230## ----------- ##
1231## confdefs.h. ##
1232## ----------- ##
1233_ASBOX
1234 echo
1235 sed "/^$/d" confdefs.h | sort
1236 echo
1237 fi
1238 test "$ac_signal" != 0 &&
1239 echo "$as_me: caught signal $ac_signal"
1240 echo "$as_me: exit $exit_status"
1241 } >&5
86da66b5 1242 rm -f core *.core &&
ba479fd2
NN
1243 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1244 exit $exit_status
1245 ' 0
1246for ac_signal in 1 2 13 15; do
1247 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1248done
1249ac_signal=0
1250
1251# confdefs.h avoids OS command line length limits that DEFS can exceed.
1252rm -rf conftest* confdefs.h
1253# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1254echo >confdefs.h
1255
1256# Predefined preprocessor variables.
1257
1258cat >>confdefs.h <<_ACEOF
1259#define PACKAGE_NAME "$PACKAGE_NAME"
1260_ACEOF
1261
1262
1263cat >>confdefs.h <<_ACEOF
1264#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1265_ACEOF
1266
1267
1268cat >>confdefs.h <<_ACEOF
1269#define PACKAGE_VERSION "$PACKAGE_VERSION"
1270_ACEOF
1271
1272
1273cat >>confdefs.h <<_ACEOF
1274#define PACKAGE_STRING "$PACKAGE_STRING"
1275_ACEOF
1276
1277
1278cat >>confdefs.h <<_ACEOF
1279#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1280_ACEOF
1281
1282
1283# Let the site file select an alternate cache file if it wants to.
1284# Prefer explicitly selected file to automatically selected ones.
1285if test -z "$CONFIG_SITE"; then
1286 if test "x$prefix" != xNONE; then
1287 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1288 else
1289 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1290 fi
1291fi
1292for ac_site_file in $CONFIG_SITE; do
1293 if test -r "$ac_site_file"; then
1294 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1295echo "$as_me: loading site script $ac_site_file" >&6;}
1296 sed 's/^/| /' "$ac_site_file" >&5
1297 . "$ac_site_file"
1298 fi
1299done
1300
1301if test -r "$cache_file"; then
1302 # Some versions of bash will fail to source /dev/null (special
1303 # files actually), so we avoid doing that.
1304 if test -f "$cache_file"; then
1305 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1306echo "$as_me: loading cache $cache_file" >&6;}
1307 case $cache_file in
1308 [\\/]* | ?:[\\/]* ) . $cache_file;;
1309 *) . ./$cache_file;;
1310 esac
1311 fi
1312else
1313 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1314echo "$as_me: creating cache $cache_file" >&6;}
1315 >$cache_file
1316fi
1317
1318# Check that the precious variables saved in the cache have kept the same
1319# value.
1320ac_cache_corrupted=false
1321for ac_var in `(set) 2>&1 |
86da66b5 1322 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1323 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1324 eval ac_new_set=\$ac_env_${ac_var}_set
1325 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1326 eval ac_new_val="\$ac_env_${ac_var}_value"
1327 case $ac_old_set,$ac_new_set in
1328 set,)
1329 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1330echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1331 ac_cache_corrupted=: ;;
1332 ,set)
1333 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1334echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1335 ac_cache_corrupted=: ;;
1336 ,);;
1337 *)
1338 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1339 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1340echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1341 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1342echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1343 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1344echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1345 ac_cache_corrupted=:
ba479fd2
NN
1346 fi;;
1347 esac
1348 # Pass precious variables to config.status.
1349 if test "$ac_new_set" = set; then
1350 case $ac_new_val in
1351 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1352 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1353 *) ac_arg=$ac_var=$ac_new_val ;;
1354 esac
1355 case " $ac_configure_args " in
1356 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1357 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1358 esac
1359 fi
1360done
1361if $ac_cache_corrupted; then
1362 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1363echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1364 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1365echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1366 { (exit 1); exit 1; }; }
1367fi
1368
1369ac_ext=c
1370ac_cpp='$CPP $CPPFLAGS'
1371ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1372ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1373ac_compiler_gnu=$ac_cv_c_compiler_gnu
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
914c5af7 1393
ba479fd2
NN
1394 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1395
1396
9f18db39
PB
1397gcc_version=`cat $srcdir/BASE-VER`
1398
ba479fd2
NN
1399# Determine the host, build, and target systems
1400ac_aux_dir=
1401for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1402 if test -f $ac_dir/install-sh; then
1403 ac_aux_dir=$ac_dir
1404 ac_install_sh="$ac_aux_dir/install-sh -c"
1405 break
1406 elif test -f $ac_dir/install.sh; then
1407 ac_aux_dir=$ac_dir
1408 ac_install_sh="$ac_aux_dir/install.sh -c"
1409 break
1410 elif test -f $ac_dir/shtool; then
1411 ac_aux_dir=$ac_dir
1412 ac_install_sh="$ac_aux_dir/shtool install -c"
1413 break
1414 fi
1415done
1416if test -z "$ac_aux_dir"; then
1417 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1418echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1419 { (exit 1); exit 1; }; }
1420fi
1421ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1422ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1423ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1424
1425# Make sure we can run config.sub.
1426$ac_config_sub sun4 >/dev/null 2>&1 ||
1427 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1428echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1429 { (exit 1); exit 1; }; }
1430
1431echo "$as_me:$LINENO: checking build system type" >&5
1432echo $ECHO_N "checking build system type... $ECHO_C" >&6
1433if test "${ac_cv_build+set}" = set; then
1434 echo $ECHO_N "(cached) $ECHO_C" >&6
1435else
1436 ac_cv_build_alias=$build_alias
1437test -z "$ac_cv_build_alias" &&
1438 ac_cv_build_alias=`$ac_config_guess`
1439test -z "$ac_cv_build_alias" &&
1440 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1441echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1442 { (exit 1); exit 1; }; }
1443ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1444 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1445echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1446 { (exit 1); exit 1; }; }
1447
1448fi
1449echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1450echo "${ECHO_T}$ac_cv_build" >&6
1451build=$ac_cv_build
1452build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1453build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1454build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1455
1456
1457echo "$as_me:$LINENO: checking host system type" >&5
1458echo $ECHO_N "checking host system type... $ECHO_C" >&6
1459if test "${ac_cv_host+set}" = set; then
1460 echo $ECHO_N "(cached) $ECHO_C" >&6
1461else
1462 ac_cv_host_alias=$host_alias
1463test -z "$ac_cv_host_alias" &&
1464 ac_cv_host_alias=$ac_cv_build_alias
1465ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1466 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1467echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1468 { (exit 1); exit 1; }; }
1469
1470fi
1471echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1472echo "${ECHO_T}$ac_cv_host" >&6
1473host=$ac_cv_host
1474host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1475host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1476host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1477
1478
1479echo "$as_me:$LINENO: checking target system type" >&5
1480echo $ECHO_N "checking target system type... $ECHO_C" >&6
1481if test "${ac_cv_target+set}" = set; then
1482 echo $ECHO_N "(cached) $ECHO_C" >&6
1483else
1484 ac_cv_target_alias=$target_alias
1485test "x$ac_cv_target_alias" = "x" &&
1486 ac_cv_target_alias=$ac_cv_host_alias
1487ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1488 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1489echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1490 { (exit 1); exit 1; }; }
1491
1492fi
1493echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1494echo "${ECHO_T}$ac_cv_target" >&6
1495target=$ac_cv_target
1496target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1497target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1498target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1499
1500
1501# The aliases save the names the user supplied, while $host etc.
1502# will get canonicalized.
1503test -n "$target_alias" &&
1504 test "$program_prefix$program_suffix$program_transform_name" = \
1505 NONENONEs,x,x, &&
1506 program_prefix=${target_alias}-
1507
1508# Determine the noncanonical target name, for directory use.
18fc9bd4
RG
1509 case ${build_alias} in
1510 "") build_noncanonical=${build} ;;
1511 *) build_noncanonical=${build_alias} ;;
1512esac
1513
1514 case ${host_alias} in
1515 "") host_noncanonical=${build_noncanonical} ;;
1516 *) host_noncanonical=${host_alias} ;;
1517esac
1518
1519 case ${target_alias} in
1520 "") target_noncanonical=${host_noncanonical} ;;
1521 *) target_noncanonical=${target_alias} ;;
1522esac
1523
1524
1525
8f1529e6
L
1526
1527# Determine the target- and build-specific subdirectories
18fc9bd4
RG
1528 # Prefix 'build-' so this never conflicts with target_subdir.
1529build_subdir="build-${build_noncanonical}"
1530# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1531if ( test $srcdir = . && test -d gcc ) \
1532 || test -d $srcdir/../host-${host_noncanonical}; then
1533 host_subdir="host-${host_noncanonical}"
1534else
1535 host_subdir=.
1536fi
1537# No prefix.
1538target_subdir=${target_noncanonical}
1539
73458fb7 1540
093e61a6 1541# Set program_transform_name
13c22933 1542test "$program_prefix" != NONE &&
ba479fd2 1543 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1544# Use a double $ so make ignores it.
1545test "$program_suffix" != NONE &&
ba479fd2
NN
1546 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1547# Double any \ or $. echo might interpret backslashes.
1548# By default was `s,x,x', remove it if useless.
1549cat <<\_ACEOF >conftest.sed
1550s/[\\$]/&&/g;s/;s,x,x,$//
1551_ACEOF
1552program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1553rm conftest.sed
13c22933
JJ
1554
1555
34a86c2b
NN
1556# Check for bogus environment variables.
1557# Test if LIBRARY_PATH contains the notation for the current directory
1558# since this would lead to problems installing/building glibc.
1559# LIBRARY_PATH contains the current directory if one of the following
1560# is true:
1561# - one of the terminals (":" and ";") is the first or last sign
1562# - two terminals occur directly after each other
1563# - the path contains an element with a dot in it
ba479fd2
NN
1564echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1565echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1566case ${LIBRARY_PATH} in
1567 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1568 library_path_setting="contains current directory"
1569 ;;
1570 *)
1571 library_path_setting="ok"
1572 ;;
1573esac
ba479fd2
NN
1574echo "$as_me:$LINENO: result: $library_path_setting" >&5
1575echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1576if test "$library_path_setting" != "ok"; then
ba479fd2 1577{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1578*** LIBRARY_PATH shouldn't contain the current directory when
1579*** building gcc. Please change the environment variable
ba479fd2
NN
1580*** and run configure again." >&5
1581echo "$as_me: error:
1582*** LIBRARY_PATH shouldn't contain the current directory when
1583*** building gcc. Please change the environment variable
1584*** and run configure again." >&2;}
1585 { (exit 1); exit 1; }; }
e9a25f70
JL
1586fi
1587
34a86c2b
NN
1588# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1589# since this would lead to problems installing/building glibc.
1590# GCC_EXEC_PREFIX contains the current directory if one of the following
1591# is true:
1592# - one of the terminals (":" and ";") is the first or last sign
1593# - two terminals occur directly after each other
1594# - the path contains an element with a dot in it
ba479fd2
NN
1595echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1596echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1597case ${GCC_EXEC_PREFIX} in
1598 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1599 gcc_exec_prefix_setting="contains current directory"
1600 ;;
1601 *)
1602 gcc_exec_prefix_setting="ok"
1603 ;;
1604esac
ba479fd2
NN
1605echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1606echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1607if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1608{ { echo "$as_me:$LINENO: error:
1609*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1610*** building gcc. Please change the environment variable
1611*** and run configure again." >&5
1612echo "$as_me: error:
cafe096b
EC
1613*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1614*** building gcc. Please change the environment variable
ba479fd2
NN
1615*** and run configure again." >&2;}
1616 { (exit 1); exit 1; }; }
34a86c2b
NN
1617fi
1618
1619# -----------
1620# Directories
1621# -----------
1622
1623# Specify the local prefix
1624local_prefix=
ba479fd2 1625
34a86c2b
NN
1626# Check whether --with-local-prefix or --without-local-prefix was given.
1627if test "${with_local_prefix+set}" = set; then
1628 withval="$with_local_prefix"
1629 case "${withval}" in
ba479fd2
NN
1630yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1631echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1632 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1633no) ;;
1634*) local_prefix=$with_local_prefix ;;
1635esac
ba479fd2 1636fi;
34a86c2b
NN
1637
1638# Default local prefix if it is empty
1639if test x$local_prefix = x; then
1640 local_prefix=/usr/local
1641fi
1642
1643# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1644# passed in by the toplevel make and thus we'd get different behavior
1645# depending on where we built the sources.
1646gcc_gxx_include_dir=
1647# Specify the g++ header file directory
ba479fd2 1648
34a86c2b
NN
1649# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1650if test "${with_gxx_include_dir+set}" = set; then
1651 withval="$with_gxx_include_dir"
1652 case "${withval}" in
ba479fd2
NN
1653yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1654echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1655 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1656no) ;;
1657*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1658esac
ba479fd2 1659fi;
34a86c2b 1660
0f57bf40 1661# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
34a86c2b
NN
1662if test x${gcc_gxx_include_dir} = x; then
1663 if test x${enable_version_specific_runtime_libs} = xyes; then
1664 gcc_gxx_include_dir='${libsubdir}/include/c++'
1665 else
0f57bf40
MM
1666 libstdcxx_incdir='include/c++/$(version)'
1667 if test x$host != x$target; then
1668 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
1669 fi
1670 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/$libstdcxx_incdir"
34a86c2b
NN
1671 fi
1672fi
1673
ba479fd2 1674
34a86c2b
NN
1675# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1676if test "${with_cpp_install_dir+set}" = set; then
1677 withval="$with_cpp_install_dir"
1678 if test x$withval = xyes; then
ba479fd2
NN
1679 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1680echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1681 { (exit 1); exit 1; }; }
34a86c2b
NN
1682elif test x$withval != xno; then
1683 cpp_install_dir=$withval
1684fi
ba479fd2 1685fi;
34a86c2b 1686
51b9ff45 1687# We would like to our source tree to be readonly. However when releases or
ba479fd2 1688# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1689# various formats of manuals need to be included along with the rest of the
ba479fd2 1690# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1691# just that.
1692
03787dfd
KC
1693echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1694echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1695 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45
KC
1696if test "${enable_generated_files_in_srcdir+set}" = set; then
1697 enableval="$enable_generated_files_in_srcdir"
03787dfd 1698 generated_files_in_srcdir=$enableval
51b9ff45 1699else
03787dfd 1700 generated_files_in_srcdir=no
ba479fd2 1701fi;
51b9ff45 1702
03787dfd
KC
1703echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1704echo "${ECHO_T}$generated_files_in_srcdir" >&6
1705
1706if test "$generated_files_in_srcdir" = "yes"; then
1707 GENINSRC=''
03787dfd
KC
1708else
1709 GENINSRC='#'
03787dfd
KC
1710fi
1711
1712
34a86c2b
NN
1713# -------------------
1714# Find default linker
1715# -------------------
1716
1717# With GNU ld
ba479fd2 1718
34a86c2b
NN
1719# Check whether --with-gnu-ld or --without-gnu-ld was given.
1720if test "${with_gnu_ld+set}" = set; then
1721 withval="$with_gnu_ld"
1722 gnu_ld_flag="$with_gnu_ld"
1723else
1724 gnu_ld_flag=no
ba479fd2 1725fi;
6e3f3080 1726
63cf211a 1727# With pre-defined ld
ba479fd2 1728
34a86c2b
NN
1729# Check whether --with-ld or --without-ld was given.
1730if test "${with_ld+set}" = set; then
1731 withval="$with_ld"
1732 DEFAULT_LINKER="$with_ld"
ba479fd2 1733fi;
34a86c2b
NN
1734if test x"${DEFAULT_LINKER+set}" = x"set"; then
1735 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1736 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1737echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1738 { (exit 1); exit 1; }; }
34a86c2b
NN
1739 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1740 gnu_ld_flag=yes
1741 fi
ba479fd2
NN
1742
1743cat >>confdefs.h <<_ACEOF
34a86c2b 1744#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1745_ACEOF
34a86c2b
NN
1746
1747fi
1748
ba479fd2
NN
1749echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1750echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1751if test x"${DEFAULT_LINKER+set}" = x"set"; then
1752 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1753 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1754echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1755 else
ba479fd2
NN
1756 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1757echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1758 fi
1759else
ba479fd2
NN
1760 echo "$as_me:$LINENO: result: no" >&5
1761echo "${ECHO_T}no" >&6
34a86c2b
NN
1762fi
1763
d594623a
L
1764# With demangler in GNU ld
1765
1766# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
1767if test "${with_demangler_in_ld+set}" = set; then
1768 withval="$with_demangler_in_ld"
1769 demangler_in_ld="$with_demangler_in_ld"
1770else
1771 demangler_in_ld=no
1772fi;
1773
34a86c2b
NN
1774# ----------------------
1775# Find default assembler
1776# ----------------------
1777
1778# With GNU as
ba479fd2 1779
34a86c2b
NN
1780# Check whether --with-gnu-as or --without-gnu-as was given.
1781if test "${with_gnu_as+set}" = set; then
1782 withval="$with_gnu_as"
1783 gas_flag="$with_gnu_as"
1784else
1785 gas_flag=no
ba479fd2 1786fi;
34a86c2b
NN
1787
1788
1789# Check whether --with-as or --without-as was given.
1790if test "${with_as+set}" = set; then
1791 withval="$with_as"
1792 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1793fi;
34a86c2b
NN
1794if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1795 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1796 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1797echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1798 { (exit 1); exit 1; }; }
34a86c2b
NN
1799 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1800 gas_flag=yes
1801 fi
ba479fd2
NN
1802
1803cat >>confdefs.h <<_ACEOF
34a86c2b 1804#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1805_ACEOF
34a86c2b
NN
1806
1807fi
1808
ba479fd2
NN
1809echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1810echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1811if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1812 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1813 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1814echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1815 else
ba479fd2
NN
1816 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1817echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1818 fi
1819else
ba479fd2
NN
1820 echo "$as_me:$LINENO: result: no" >&5
1821echo "${ECHO_T}no" >&6
34a86c2b
NN
1822fi
1823
1824# ---------------
1825# Find C compiler
1826# ---------------
1827
426ca3ca
RO
1828# If a non-executable a.out is present (e.g. created by GNU as above even if
1829# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1830# file, even when creating an executable, so an execution test fails.
1831# Remove possible default executable files to avoid this.
1832#
1833# FIXME: This really belongs into AC_PROG_CC and can be removed once
1834# Autoconf includes it.
1835rm -f a.out a.exe b.out
1836
34a86c2b 1837# Find the native compiler
ba479fd2
NN
1838ac_ext=c
1839ac_cpp='$CPP $CPPFLAGS'
1840ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1841ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1842ac_compiler_gnu=$ac_cv_c_compiler_gnu
1843if test -n "$ac_tool_prefix"; then
1844 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1845set dummy ${ac_tool_prefix}gcc; ac_word=$2
1846echo "$as_me:$LINENO: checking for $ac_word" >&5
1847echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1848if test "${ac_cv_prog_CC+set}" = set; then
1849 echo $ECHO_N "(cached) $ECHO_C" >&6
1850else
1851 if test -n "$CC"; then
1852 ac_cv_prog_CC="$CC" # Let the user override the test.
1853else
1854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1855for as_dir in $PATH
1856do
1857 IFS=$as_save_IFS
1858 test -z "$as_dir" && as_dir=.
1859 for ac_exec_ext in '' $ac_executable_extensions; do
1860 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1861 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1862 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1863 break 2
1864 fi
1865done
1866done
1867
1868fi
1869fi
1870CC=$ac_cv_prog_CC
1871if test -n "$CC"; then
1872 echo "$as_me:$LINENO: result: $CC" >&5
1873echo "${ECHO_T}$CC" >&6
1874else
1875 echo "$as_me:$LINENO: result: no" >&5
1876echo "${ECHO_T}no" >&6
1877fi
1878
1879fi
1880if test -z "$ac_cv_prog_CC"; then
1881 ac_ct_CC=$CC
1882 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1883set dummy gcc; ac_word=$2
ba479fd2
NN
1884echo "$as_me:$LINENO: checking for $ac_word" >&5
1885echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1886if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1887 echo $ECHO_N "(cached) $ECHO_C" >&6
1888else
1889 if test -n "$ac_ct_CC"; then
1890 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1891else
1892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1893for as_dir in $PATH
1894do
1895 IFS=$as_save_IFS
1896 test -z "$as_dir" && as_dir=.
1897 for ac_exec_ext in '' $ac_executable_extensions; do
1898 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1899 ac_cv_prog_ac_ct_CC="gcc"
1900 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1901 break 2
1902 fi
1903done
1904done
1905
1906fi
1907fi
1908ac_ct_CC=$ac_cv_prog_ac_ct_CC
1909if test -n "$ac_ct_CC"; then
1910 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1911echo "${ECHO_T}$ac_ct_CC" >&6
1912else
1913 echo "$as_me:$LINENO: result: no" >&5
1914echo "${ECHO_T}no" >&6
1915fi
1916
1917 CC=$ac_ct_CC
1918else
1919 CC="$ac_cv_prog_CC"
1920fi
1921
1922if test -z "$CC"; then
1923 if test -n "$ac_tool_prefix"; then
1924 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1925set dummy ${ac_tool_prefix}cc; ac_word=$2
1926echo "$as_me:$LINENO: checking for $ac_word" >&5
1927echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1928if test "${ac_cv_prog_CC+set}" = set; then
1929 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1930else
1931 if test -n "$CC"; then
1932 ac_cv_prog_CC="$CC" # Let the user override the test.
1933else
ba479fd2
NN
1934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1935for as_dir in $PATH
1936do
1937 IFS=$as_save_IFS
1938 test -z "$as_dir" && as_dir=.
1939 for ac_exec_ext in '' $ac_executable_extensions; do
1940 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1941 ac_cv_prog_CC="${ac_tool_prefix}cc"
1942 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1943 break 2
1944 fi
1945done
1946done
1947
cd9e5e7c
MK
1948fi
1949fi
ba479fd2 1950CC=$ac_cv_prog_CC
cd9e5e7c 1951if test -n "$CC"; then
ba479fd2
NN
1952 echo "$as_me:$LINENO: result: $CC" >&5
1953echo "${ECHO_T}$CC" >&6
1954else
1955 echo "$as_me:$LINENO: result: no" >&5
1956echo "${ECHO_T}no" >&6
1957fi
1958
1959fi
1960if test -z "$ac_cv_prog_CC"; then
1961 ac_ct_CC=$CC
1962 # Extract the first word of "cc", so it can be a program name with args.
1963set dummy cc; ac_word=$2
1964echo "$as_me:$LINENO: checking for $ac_word" >&5
1965echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1966if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1967 echo $ECHO_N "(cached) $ECHO_C" >&6
1968else
1969 if test -n "$ac_ct_CC"; then
1970 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1971else
1972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1973for as_dir in $PATH
1974do
1975 IFS=$as_save_IFS
1976 test -z "$as_dir" && as_dir=.
1977 for ac_exec_ext in '' $ac_executable_extensions; do
1978 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1979 ac_cv_prog_ac_ct_CC="cc"
1980 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1981 break 2
1982 fi
1983done
1984done
1985
1986fi
1987fi
1988ac_ct_CC=$ac_cv_prog_ac_ct_CC
1989if test -n "$ac_ct_CC"; then
1990 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1991echo "${ECHO_T}$ac_ct_CC" >&6
1992else
1993 echo "$as_me:$LINENO: result: no" >&5
1994echo "${ECHO_T}no" >&6
1995fi
1996
1997 CC=$ac_ct_CC
cd9e5e7c 1998else
ba479fd2 1999 CC="$ac_cv_prog_CC"
e9a25f70 2000fi
6e3f3080 2001
ba479fd2 2002fi
6e3f3080
NN
2003if test -z "$CC"; then
2004 # Extract the first word of "cc", so it can be a program name with args.
2005set dummy cc; ac_word=$2
ba479fd2
NN
2006echo "$as_me:$LINENO: checking for $ac_word" >&5
2007echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2008if test "${ac_cv_prog_CC+set}" = set; then
2009 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2010else
2011 if test -n "$CC"; then
2012 ac_cv_prog_CC="$CC" # Let the user override the test.
2013else
2014 ac_prog_rejected=no
ba479fd2
NN
2015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2016for as_dir in $PATH
2017do
2018 IFS=$as_save_IFS
2019 test -z "$as_dir" && as_dir=.
2020 for ac_exec_ext in '' $ac_executable_extensions; do
2021 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2022 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2023 ac_prog_rejected=yes
2024 continue
2025 fi
2026 ac_cv_prog_CC="cc"
2027 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2028 break 2
2029 fi
2030done
2031done
2032
6e3f3080
NN
2033if test $ac_prog_rejected = yes; then
2034 # We found a bogon in the path, so make sure we never use it.
2035 set dummy $ac_cv_prog_CC
2036 shift
ba479fd2 2037 if test $# != 0; then
6e3f3080
NN
2038 # We chose a different compiler from the bogus one.
2039 # However, it has the same basename, so the bogon will be chosen
2040 # first if we set CC to just the basename; use the full file name.
2041 shift
ba479fd2 2042 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2043 fi
6e3f3080
NN
2044fi
2045fi
2046fi
ba479fd2 2047CC=$ac_cv_prog_CC
6e3f3080 2048if test -n "$CC"; then
ba479fd2
NN
2049 echo "$as_me:$LINENO: result: $CC" >&5
2050echo "${ECHO_T}$CC" >&6
e9a25f70 2051else
ba479fd2
NN
2052 echo "$as_me:$LINENO: result: no" >&5
2053echo "${ECHO_T}no" >&6
e9a25f70 2054fi
6e3f3080 2055
ba479fd2
NN
2056fi
2057if test -z "$CC"; then
2058 if test -n "$ac_tool_prefix"; then
2059 for ac_prog in cl
2060 do
2061 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2062set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2063echo "$as_me:$LINENO: checking for $ac_word" >&5
2064echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2065if test "${ac_cv_prog_CC+set}" = set; then
2066 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2067else
6e3f3080
NN
2068 if test -n "$CC"; then
2069 ac_cv_prog_CC="$CC" # Let the user override the test.
2070else
ba479fd2
NN
2071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2072for as_dir in $PATH
2073do
2074 IFS=$as_save_IFS
2075 test -z "$as_dir" && as_dir=.
2076 for ac_exec_ext in '' $ac_executable_extensions; do
2077 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2078 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2079 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2080 break 2
2081 fi
2082done
2083done
2084
093e61a6 2085fi
6e3f3080 2086fi
ba479fd2 2087CC=$ac_cv_prog_CC
6e3f3080 2088if test -n "$CC"; then
ba479fd2
NN
2089 echo "$as_me:$LINENO: result: $CC" >&5
2090echo "${ECHO_T}$CC" >&6
6e3f3080 2091else
ba479fd2
NN
2092 echo "$as_me:$LINENO: result: no" >&5
2093echo "${ECHO_T}no" >&6
093e61a6 2094fi
cafe096b 2095
ba479fd2
NN
2096 test -n "$CC" && break
2097 done
2098fi
2099if test -z "$CC"; then
2100 ac_ct_CC=$CC
2101 for ac_prog in cl
2102do
2103 # Extract the first word of "$ac_prog", so it can be a program name with args.
2104set dummy $ac_prog; ac_word=$2
2105echo "$as_me:$LINENO: checking for $ac_word" >&5
2106echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2107if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2108 echo $ECHO_N "(cached) $ECHO_C" >&6
2109else
2110 if test -n "$ac_ct_CC"; then
2111 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2112else
2113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2114for as_dir in $PATH
2115do
2116 IFS=$as_save_IFS
2117 test -z "$as_dir" && as_dir=.
2118 for ac_exec_ext in '' $ac_executable_extensions; do
2119 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2120 ac_cv_prog_ac_ct_CC="$ac_prog"
2121 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2122 break 2
2123 fi
2124done
2125done
6e3f3080 2126
ba479fd2
NN
2127fi
2128fi
2129ac_ct_CC=$ac_cv_prog_ac_ct_CC
2130if test -n "$ac_ct_CC"; then
2131 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2132echo "${ECHO_T}$ac_ct_CC" >&6
2133else
2134 echo "$as_me:$LINENO: result: no" >&5
2135echo "${ECHO_T}no" >&6
2136fi
6e3f3080 2137
ba479fd2
NN
2138 test -n "$ac_ct_CC" && break
2139done
63cf211a 2140
ba479fd2
NN
2141 CC=$ac_ct_CC
2142fi
2143
2144fi
2145
2146
2147test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2148See \`config.log' for more details." >&5
2149echo "$as_me: error: no acceptable C compiler found in \$PATH
2150See \`config.log' for more details." >&2;}
2151 { (exit 1); exit 1; }; }
2152
2153# Provide some information about the compiler.
2154echo "$as_me:$LINENO:" \
2155 "checking for C compiler version" >&5
2156ac_compiler=`set X $ac_compile; echo $2`
2157{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2158 (eval $ac_compiler --version </dev/null >&5) 2>&5
2159 ac_status=$?
2160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2161 (exit $ac_status); }
2162{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2163 (eval $ac_compiler -v </dev/null >&5) 2>&5
2164 ac_status=$?
2165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2166 (exit $ac_status); }
2167{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2168 (eval $ac_compiler -V </dev/null >&5) 2>&5
2169 ac_status=$?
2170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2171 (exit $ac_status); }
2172
2173cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2174/* confdefs.h. */
2175_ACEOF
2176cat confdefs.h >>conftest.$ac_ext
2177cat >>conftest.$ac_ext <<_ACEOF
2178/* end confdefs.h. */
2179
2180int
2181main ()
2182{
63cf211a 2183
ba479fd2
NN
2184 ;
2185 return 0;
2186}
2187_ACEOF
2188ac_clean_files_save=$ac_clean_files
2189ac_clean_files="$ac_clean_files a.out a.exe b.out"
2190# Try to create an executable without -o first, disregard a.out.
2191# It will help us diagnose broken compilers, and finding out an intuition
2192# of exeext.
86da66b5
HPN
2193echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2194echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2
NN
2195ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2196if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2197 (eval $ac_link_default) 2>&5
2198 ac_status=$?
2199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2200 (exit $ac_status); }; then
2201 # Find the output, starting from the most likely. This scheme is
2202# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2203# resort.
2204
2205# Be careful to initialize this variable, since it used to be cached.
2206# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2207ac_cv_exeext=
2208# b.out is created by i960 compilers.
2209for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2210do
2211 test -f "$ac_file" || continue
2212 case $ac_file in
2213 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
86da66b5 2214 ;;
ba479fd2 2215 conftest.$ac_ext )
86da66b5
HPN
2216 # This is the source file.
2217 ;;
ba479fd2 2218 [ab].out )
86da66b5
HPN
2219 # We found the default executable, but exeext='' is most
2220 # certainly right.
2221 break;;
ba479fd2 2222 *.* )
86da66b5
HPN
2223 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2224 # FIXME: I believe we export ac_cv_exeext for Libtool,
2225 # but it would be cool to find out if it's true. Does anybody
2226 # maintain Libtool? --akim.
2227 export ac_cv_exeext
2228 break;;
ba479fd2 2229 * )
86da66b5 2230 break;;
ba479fd2
NN
2231 esac
2232done
2233else
2234 echo "$as_me: failed program was:" >&5
2235sed 's/^/| /' conftest.$ac_ext >&5
2236
2237{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2238See \`config.log' for more details." >&5
2239echo "$as_me: error: C compiler cannot create executables
2240See \`config.log' for more details." >&2;}
2241 { (exit 77); exit 77; }; }
2242fi
2243
2244ac_exeext=$ac_cv_exeext
2245echo "$as_me:$LINENO: result: $ac_file" >&5
2246echo "${ECHO_T}$ac_file" >&6
2247
2248# Check the compiler produces executables we can run. If not, either
2249# the compiler is broken, or we cross compile.
2250echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2251echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2252# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2253# If not cross compiling, check that we can run a simple program.
2254if test "$cross_compiling" != yes; then
2255 if { ac_try='./$ac_file'
2256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2257 (eval $ac_try) 2>&5
2258 ac_status=$?
2259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2260 (exit $ac_status); }; }; then
2261 cross_compiling=no
6e3f3080 2262 else
ba479fd2
NN
2263 if test "$cross_compiling" = maybe; then
2264 cross_compiling=yes
2265 else
2266 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2267If you meant to cross compile, use \`--host'.
2268See \`config.log' for more details." >&5
2269echo "$as_me: error: cannot run C compiled programs.
2270If you meant to cross compile, use \`--host'.
2271See \`config.log' for more details." >&2;}
2272 { (exit 1); exit 1; }; }
2273 fi
6e3f3080
NN
2274 fi
2275fi
ba479fd2
NN
2276echo "$as_me:$LINENO: result: yes" >&5
2277echo "${ECHO_T}yes" >&6
2278
2279rm -f a.out a.exe conftest$ac_cv_exeext b.out
2280ac_clean_files=$ac_clean_files_save
2281# Check the compiler produces executables we can run. If not, either
2282# the compiler is broken, or we cross compile.
2283echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2284echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2285echo "$as_me:$LINENO: result: $cross_compiling" >&5
2286echo "${ECHO_T}$cross_compiling" >&6
2287
2288echo "$as_me:$LINENO: checking for suffix of executables" >&5
2289echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2290if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2291 (eval $ac_link) 2>&5
2292 ac_status=$?
2293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2294 (exit $ac_status); }; then
2295 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2296# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2297# work properly (i.e., refer to `conftest.exe'), while it won't with
2298# `rm'.
2299for ac_file in conftest.exe conftest conftest.*; do
2300 test -f "$ac_file" || continue
2301 case $ac_file in
2302 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2303 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
86da66b5
HPN
2304 export ac_cv_exeext
2305 break;;
ba479fd2
NN
2306 * ) break;;
2307 esac
2308done
e9a25f70 2309else
ba479fd2
NN
2310 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2311See \`config.log' for more details." >&5
2312echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2313See \`config.log' for more details." >&2;}
2314 { (exit 1); exit 1; }; }
2315fi
2316
2317rm -f conftest$ac_cv_exeext
2318echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2319echo "${ECHO_T}$ac_cv_exeext" >&6
2320
2321rm -f conftest.$ac_ext
2322EXEEXT=$ac_cv_exeext
2323ac_exeext=$EXEEXT
2324echo "$as_me:$LINENO: checking for suffix of object files" >&5
2325echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2326if test "${ac_cv_objext+set}" = set; then
2327 echo $ECHO_N "(cached) $ECHO_C" >&6
2328else
2329 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2330/* confdefs.h. */
2331_ACEOF
2332cat confdefs.h >>conftest.$ac_ext
2333cat >>conftest.$ac_ext <<_ACEOF
2334/* end confdefs.h. */
2335
2336int
2337main ()
2338{
6e3f3080 2339
ba479fd2
NN
2340 ;
2341 return 0;
2342}
2343_ACEOF
2344rm -f conftest.o conftest.obj
2345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2346 (eval $ac_compile) 2>&5
2347 ac_status=$?
2348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2349 (exit $ac_status); }; then
2350 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2351 case $ac_file in
2352 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2353 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2354 break;;
2355 esac
2356done
63cf211a 2357else
ba479fd2
NN
2358 echo "$as_me: failed program was:" >&5
2359sed 's/^/| /' conftest.$ac_ext >&5
2360
2361{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2362See \`config.log' for more details." >&5
2363echo "$as_me: error: cannot compute suffix of object files: cannot compile
2364See \`config.log' for more details." >&2;}
2365 { (exit 1); exit 1; }; }
2366fi
2367
2368rm -f conftest.$ac_cv_objext conftest.$ac_ext
2369fi
2370echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2371echo "${ECHO_T}$ac_cv_objext" >&6
2372OBJEXT=$ac_cv_objext
2373ac_objext=$OBJEXT
2374echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2375echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2376if test "${ac_cv_c_compiler_gnu+set}" = set; then
2377 echo $ECHO_N "(cached) $ECHO_C" >&6
2378else
2379 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2380/* confdefs.h. */
2381_ACEOF
2382cat confdefs.h >>conftest.$ac_ext
2383cat >>conftest.$ac_ext <<_ACEOF
2384/* end confdefs.h. */
2385
2386int
2387main ()
2388{
2389#ifndef __GNUC__
2390 choke me
2391#endif
6e3f3080 2392
ba479fd2
NN
2393 ;
2394 return 0;
2395}
2396_ACEOF
2397rm -f conftest.$ac_objext
2398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2399 (eval $ac_compile) 2>conftest.er1
ba479fd2 2400 ac_status=$?
86da66b5
HPN
2401 grep -v '^ *+' conftest.er1 >conftest.err
2402 rm -f conftest.er1
2403 cat conftest.err >&5
ba479fd2
NN
2404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2405 (exit $ac_status); } &&
ec6c7392
PB
2406 { ac_try='test -z "$ac_c_werror_flag"
2407 || test ! -s conftest.err'
86da66b5
HPN
2408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2409 (eval $ac_try) 2>&5
2410 ac_status=$?
2411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2412 (exit $ac_status); }; } &&
2413 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2415 (eval $ac_try) 2>&5
2416 ac_status=$?
2417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2418 (exit $ac_status); }; }; then
2419 ac_compiler_gnu=yes
2420else
2421 echo "$as_me: failed program was:" >&5
2422sed 's/^/| /' conftest.$ac_ext >&5
2423
2424ac_compiler_gnu=no
2425fi
86da66b5 2426rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2427ac_cv_c_compiler_gnu=$ac_compiler_gnu
2428
2429fi
2430echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2431echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2432GCC=`test $ac_compiler_gnu = yes && echo yes`
2433ac_test_CFLAGS=${CFLAGS+set}
2434ac_save_CFLAGS=$CFLAGS
2435CFLAGS="-g"
2436echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2437echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2438if test "${ac_cv_prog_cc_g+set}" = set; then
2439 echo $ECHO_N "(cached) $ECHO_C" >&6
2440else
2441 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2442/* confdefs.h. */
2443_ACEOF
2444cat confdefs.h >>conftest.$ac_ext
2445cat >>conftest.$ac_ext <<_ACEOF
2446/* end confdefs.h. */
2447
2448int
2449main ()
2450{
2451
2452 ;
2453 return 0;
2454}
2455_ACEOF
2456rm -f conftest.$ac_objext
2457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2458 (eval $ac_compile) 2>conftest.er1
ba479fd2 2459 ac_status=$?
86da66b5
HPN
2460 grep -v '^ *+' conftest.er1 >conftest.err
2461 rm -f conftest.er1
2462 cat conftest.err >&5
ba479fd2
NN
2463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2464 (exit $ac_status); } &&
ec6c7392
PB
2465 { ac_try='test -z "$ac_c_werror_flag"
2466 || test ! -s conftest.err'
86da66b5
HPN
2467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2468 (eval $ac_try) 2>&5
2469 ac_status=$?
2470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2471 (exit $ac_status); }; } &&
2472 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2474 (eval $ac_try) 2>&5
2475 ac_status=$?
2476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2477 (exit $ac_status); }; }; then
6e3f3080
NN
2478 ac_cv_prog_cc_g=yes
2479else
ba479fd2
NN
2480 echo "$as_me: failed program was:" >&5
2481sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2482
ba479fd2 2483ac_cv_prog_cc_g=no
6e3f3080 2484fi
86da66b5 2485rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2486fi
2487echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2488echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2489if test "$ac_test_CFLAGS" = set; then
ba479fd2 2490 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2491elif test $ac_cv_prog_cc_g = yes; then
2492 if test "$GCC" = yes; then
e9a25f70
JL
2493 CFLAGS="-g -O2"
2494 else
cd9e5e7c 2495 CFLAGS="-g"
81814e35 2496 fi
3723cad9 2497else
cd9e5e7c
MK
2498 if test "$GCC" = yes; then
2499 CFLAGS="-O2"
2500 else
2501 CFLAGS=
2502 fi
e9a25f70 2503fi
ba479fd2
NN
2504echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2505echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2506if test "${ac_cv_prog_cc_stdc+set}" = set; then
2507 echo $ECHO_N "(cached) $ECHO_C" >&6
2508else
2509 ac_cv_prog_cc_stdc=no
2510ac_save_CC=$CC
2511cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2512/* confdefs.h. */
2513_ACEOF
2514cat confdefs.h >>conftest.$ac_ext
2515cat >>conftest.$ac_ext <<_ACEOF
2516/* end confdefs.h. */
2517#include <stdarg.h>
2518#include <stdio.h>
2519#include <sys/types.h>
2520#include <sys/stat.h>
2521/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2522struct buf { int x; };
2523FILE * (*rcsopen) (struct buf *, struct stat *, int);
2524static char *e (p, i)
2525 char **p;
2526 int i;
2527{
2528 return p[i];
2529}
2530static char *f (char * (*g) (char **, int), char **p, ...)
2531{
2532 char *s;
2533 va_list v;
2534 va_start (v,p);
2535 s = g (p, va_arg (v,int));
2536 va_end (v);
2537 return s;
2538}
86da66b5
HPN
2539
2540/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2541 function prototypes and stuff, but not '\xHH' hex character constants.
2542 These don't provoke an error unfortunately, instead are silently treated
2543 as 'x'. The following induces an error, until -std1 is added to get
2544 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2545 array size at least. It's necessary to write '\x00'==0 to get something
2546 that's true only with -std1. */
2547int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2548
ba479fd2
NN
2549int test (int i, double x);
2550struct s1 {int (*f) (int a);};
2551struct s2 {int (*f) (double a);};
2552int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2553int argc;
2554char **argv;
2555int
2556main ()
2557{
2558return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2559 ;
2560 return 0;
2561}
2562_ACEOF
2563# Don't try gcc -ansi; that turns off useful extensions and
2564# breaks some systems' header files.
2565# AIX -qlanglvl=ansi
2566# Ultrix and OSF/1 -std1
2567# HP-UX 10.20 and later -Ae
2568# HP-UX older versions -Aa -D_HPUX_SOURCE
2569# SVR4 -Xc -D__EXTENSIONS__
2570for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2571do
2572 CC="$ac_save_CC $ac_arg"
2573 rm -f conftest.$ac_objext
2574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2575 (eval $ac_compile) 2>conftest.er1
ba479fd2 2576 ac_status=$?
86da66b5
HPN
2577 grep -v '^ *+' conftest.er1 >conftest.err
2578 rm -f conftest.er1
2579 cat conftest.err >&5
ba479fd2
NN
2580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2581 (exit $ac_status); } &&
ec6c7392
PB
2582 { ac_try='test -z "$ac_c_werror_flag"
2583 || test ! -s conftest.err'
86da66b5
HPN
2584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2585 (eval $ac_try) 2>&5
2586 ac_status=$?
2587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2588 (exit $ac_status); }; } &&
2589 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2591 (eval $ac_try) 2>&5
2592 ac_status=$?
2593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2594 (exit $ac_status); }; }; then
2595 ac_cv_prog_cc_stdc=$ac_arg
2596break
2597else
2598 echo "$as_me: failed program was:" >&5
2599sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2600
ba479fd2 2601fi
86da66b5 2602rm -f conftest.err conftest.$ac_objext
ba479fd2
NN
2603done
2604rm -f conftest.$ac_ext conftest.$ac_objext
2605CC=$ac_save_CC
2606
2607fi
2608
2609case "x$ac_cv_prog_cc_stdc" in
2610 x|xno)
2611 echo "$as_me:$LINENO: result: none needed" >&5
2612echo "${ECHO_T}none needed" >&6 ;;
2613 *)
2614 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2615echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2616 CC="$CC $ac_cv_prog_cc_stdc" ;;
2617esac
2618
2619# Some people use a C++ compiler to compile C. Since we use `exit',
2620# in C++ we need to declare it. In case someone uses the same compiler
2621# for both compiling C and C++ we need to have the C++ compiler decide
2622# the declaration of exit, since it's the most demanding environment.
2623cat >conftest.$ac_ext <<_ACEOF
2624#ifndef __cplusplus
2625 choke me
2626#endif
2627_ACEOF
2628rm -f conftest.$ac_objext
2629if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2630 (eval $ac_compile) 2>conftest.er1
ba479fd2 2631 ac_status=$?
86da66b5
HPN
2632 grep -v '^ *+' conftest.er1 >conftest.err
2633 rm -f conftest.er1
2634 cat conftest.err >&5
ba479fd2
NN
2635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2636 (exit $ac_status); } &&
ec6c7392
PB
2637 { ac_try='test -z "$ac_c_werror_flag"
2638 || test ! -s conftest.err'
86da66b5
HPN
2639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2640 (eval $ac_try) 2>&5
2641 ac_status=$?
2642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2643 (exit $ac_status); }; } &&
2644 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2646 (eval $ac_try) 2>&5
2647 ac_status=$?
2648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2649 (exit $ac_status); }; }; then
2650 for ac_declaration in \
86da66b5 2651 '' \
ba479fd2
NN
2652 'extern "C" void std::exit (int) throw (); using std::exit;' \
2653 'extern "C" void std::exit (int); using std::exit;' \
2654 'extern "C" void exit (int) throw ();' \
2655 'extern "C" void exit (int);' \
2656 'void exit (int);'
2657do
2658 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2659/* confdefs.h. */
2660_ACEOF
2661cat confdefs.h >>conftest.$ac_ext
2662cat >>conftest.$ac_ext <<_ACEOF
2663/* end confdefs.h. */
33e70558 2664$ac_declaration
86da66b5 2665#include <stdlib.h>
ba479fd2
NN
2666int
2667main ()
2668{
2669exit (42);
2670 ;
2671 return 0;
2672}
2673_ACEOF
2674rm -f conftest.$ac_objext
2675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2676 (eval $ac_compile) 2>conftest.er1
ba479fd2 2677 ac_status=$?
86da66b5
HPN
2678 grep -v '^ *+' conftest.er1 >conftest.err
2679 rm -f conftest.er1
2680 cat conftest.err >&5
ba479fd2
NN
2681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2682 (exit $ac_status); } &&
ec6c7392
PB
2683 { ac_try='test -z "$ac_c_werror_flag"
2684 || test ! -s conftest.err'
86da66b5
HPN
2685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2686 (eval $ac_try) 2>&5
2687 ac_status=$?
2688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2689 (exit $ac_status); }; } &&
2690 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2692 (eval $ac_try) 2>&5
2693 ac_status=$?
2694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2695 (exit $ac_status); }; }; then
2696 :
2697else
2698 echo "$as_me: failed program was:" >&5
2699sed 's/^/| /' conftest.$ac_ext >&5
2700
2701continue
2702fi
86da66b5 2703rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 2704 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2705/* confdefs.h. */
2706_ACEOF
2707cat confdefs.h >>conftest.$ac_ext
2708cat >>conftest.$ac_ext <<_ACEOF
2709/* end confdefs.h. */
2710$ac_declaration
2711int
2712main ()
2713{
2714exit (42);
2715 ;
2716 return 0;
2717}
2718_ACEOF
2719rm -f conftest.$ac_objext
2720if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2721 (eval $ac_compile) 2>conftest.er1
ba479fd2 2722 ac_status=$?
86da66b5
HPN
2723 grep -v '^ *+' conftest.er1 >conftest.err
2724 rm -f conftest.er1
2725 cat conftest.err >&5
ba479fd2
NN
2726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2727 (exit $ac_status); } &&
ec6c7392
PB
2728 { ac_try='test -z "$ac_c_werror_flag"
2729 || test ! -s conftest.err'
86da66b5
HPN
2730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2731 (eval $ac_try) 2>&5
2732 ac_status=$?
2733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2734 (exit $ac_status); }; } &&
2735 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2737 (eval $ac_try) 2>&5
2738 ac_status=$?
2739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2740 (exit $ac_status); }; }; then
2741 break
3ec83fc2 2742else
ba479fd2
NN
2743 echo "$as_me: failed program was:" >&5
2744sed 's/^/| /' conftest.$ac_ext >&5
2745
6e3f3080 2746fi
86da66b5 2747rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2748done
2749rm -f conftest*
2750if test -n "$ac_declaration"; then
2751 echo '#ifdef __cplusplus' >>confdefs.h
2752 echo $ac_declaration >>confdefs.h
2753 echo '#endif' >>confdefs.h
2754fi
2755
3ec83fc2 2756else
ba479fd2
NN
2757 echo "$as_me: failed program was:" >&5
2758sed 's/^/| /' conftest.$ac_ext >&5
2759
2760fi
86da66b5 2761rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2762ac_ext=c
2763ac_cpp='$CPP $CPPFLAGS'
2764ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2765ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2766ac_compiler_gnu=$ac_cv_c_compiler_gnu
2767
2768if test "x$CC" != xcc; then
2769 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2770echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2771else
2772 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2773echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2774fi
2775set dummy $CC; ac_cc=`echo $2 |
2776 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2777if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2778 echo $ECHO_N "(cached) $ECHO_C" >&6
2779else
2780 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2781/* confdefs.h. */
2782_ACEOF
2783cat confdefs.h >>conftest.$ac_ext
2784cat >>conftest.$ac_ext <<_ACEOF
2785/* end confdefs.h. */
2786
2787int
2788main ()
2789{
2790
2791 ;
2792 return 0;
2793}
2794_ACEOF
3ec83fc2
RH
2795# Make sure it works both with $CC and with simple cc.
2796# We do the test twice because some compilers refuse to overwrite an
2797# existing .o file with -o, though they will create one.
ba479fd2
NN
2798ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2799if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2800 (eval $ac_try) 2>&5
2801 ac_status=$?
2802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2803 (exit $ac_status); } &&
2804 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2805 (eval $ac_try) 2>&5
2806 ac_status=$?
2807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2808 (exit $ac_status); };
3ec83fc2
RH
2809then
2810 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2811 if test "x$CC" != xcc; then
2812 # Test first that cc exists at all.
ba479fd2
NN
2813 if { ac_try='cc -c conftest.$ac_ext >&5'
2814 { (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); }; }; then
2819 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2820 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2821 (eval $ac_try) 2>&5
2822 ac_status=$?
2823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2824 (exit $ac_status); } &&
2825 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2826 (eval $ac_try) 2>&5
2827 ac_status=$?
2828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2829 (exit $ac_status); };
3ec83fc2 2830 then
86da66b5
HPN
2831 # cc works too.
2832 :
3ec83fc2 2833 else
86da66b5
HPN
2834 # cc exists but doesn't like -o.
2835 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2836 fi
2837 fi
2838 fi
2839else
2840 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2841fi
2842rm -f conftest*
2843
2844fi
2845if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2846 echo "$as_me:$LINENO: result: yes" >&5
2847echo "${ECHO_T}yes" >&6
3ec83fc2 2848else
ba479fd2
NN
2849 echo "$as_me:$LINENO: result: no" >&5
2850echo "${ECHO_T}no" >&6
2851
2852cat >>confdefs.h <<\_ACEOF
3ec83fc2 2853#define NO_MINUS_C_MINUS_O 1
ba479fd2 2854_ACEOF
3ec83fc2
RH
2855
2856fi
2857
3b620440
KC
2858# expand $ac_aux_dir to an absolute path
2859am_aux_dir=`cd $ac_aux_dir && pwd`
2860
2861# FIXME: we rely on the cache variable name because
2862# there is no other way.
2863set dummy $CC
2864ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2865if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2866 # Losing compiler, so override with the script.
2867 # FIXME: It is wrong to rewrite CC.
2868 # But if we don't then we get into trouble of one sort or another.
2869 # A longer-term fix would be to have automake use am__CC in this case,
2870 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2871 CC="$am_aux_dir/compile $CC"
2872fi
2873
414d23ae
HPN
2874# autoconf is lame and doesn't give us any substitution variable for this.
2875if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2876 NO_MINUS_C_MINUS_O=yes
2877else
2878 OUTPUT_OPTION='-o $@'
2879fi
2880
2881
2882
ec6c7392
PB
2883# Remove the -O2: for historical reasons, unless bootstrapping we prefer
2884# optimizations to be activated explicitly by the toplevel.
2885case "$CC" in
2886 */prev-gcc/xgcc*) ;;
2887 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
2888esac
2889
2890
73458fb7
NN
2891# -------------------------
2892# Check C compiler features
2893# -------------------------
2894
ba479fd2
NN
2895ac_ext=c
2896ac_cpp='$CPP $CPPFLAGS'
2897ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2898ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2899ac_compiler_gnu=$ac_cv_c_compiler_gnu
2900echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2901echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2902# On Suns, sometimes $CPP names a directory.
2903if test -n "$CPP" && test -d "$CPP"; then
2904 CPP=
2905fi
2906if test -z "$CPP"; then
ba479fd2
NN
2907 if test "${ac_cv_prog_CPP+set}" = set; then
2908 echo $ECHO_N "(cached) $ECHO_C" >&6
2909else
2910 # Double quotes because CPP needs to be expanded
2911 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2912 do
2913 ac_preproc_ok=false
2914for ac_c_preproc_warn_flag in '' yes
2915do
2916 # Use a header file that comes with gcc, so configuring glibc
2917 # with a fresh cross-compiler works.
2918 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2919 # <limits.h> exists even on freestanding compilers.
84c041a1 2920 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2921 # not just through cpp. "Syntax error" is here to catch this case.
2922 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2923/* confdefs.h. */
2924_ACEOF
2925cat confdefs.h >>conftest.$ac_ext
2926cat >>conftest.$ac_ext <<_ACEOF
2927/* end confdefs.h. */
2928#ifdef __STDC__
2929# include <limits.h>
2930#else
2931# include <assert.h>
2932#endif
86da66b5 2933 Syntax error
ba479fd2
NN
2934_ACEOF
2935if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2936 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2937 ac_status=$?
2938 grep -v '^ *+' conftest.er1 >conftest.err
2939 rm -f conftest.er1
2940 cat conftest.err >&5
2941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2942 (exit $ac_status); } >/dev/null; then
2943 if test -s conftest.err; then
2944 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2945 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2946 else
2947 ac_cpp_err=
2948 fi
2949else
2950 ac_cpp_err=yes
2951fi
2952if test -z "$ac_cpp_err"; then
093e61a6 2953 :
cafe096b 2954else
ba479fd2
NN
2955 echo "$as_me: failed program was:" >&5
2956sed 's/^/| /' conftest.$ac_ext >&5
2957
2958 # Broken: fails on valid input.
2959continue
2960fi
2961rm -f conftest.err conftest.$ac_ext
2962
2963 # OK, works on sane cases. Now check whether non-existent headers
2964 # can be detected and how.
2965 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2966/* confdefs.h. */
2967_ACEOF
2968cat confdefs.h >>conftest.$ac_ext
2969cat >>conftest.$ac_ext <<_ACEOF
2970/* end confdefs.h. */
2971#include <ac_nonexistent.h>
2972_ACEOF
2973if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2974 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2975 ac_status=$?
2976 grep -v '^ *+' conftest.er1 >conftest.err
2977 rm -f conftest.er1
2978 cat conftest.err >&5
2979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2980 (exit $ac_status); } >/dev/null; then
2981 if test -s conftest.err; then
2982 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2983 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2984 else
2985 ac_cpp_err=
2986 fi
2987else
2988 ac_cpp_err=yes
2989fi
2990if test -z "$ac_cpp_err"; then
2991 # Broken: success on invalid input.
2992continue
2993else
2994 echo "$as_me: failed program was:" >&5
2995sed 's/^/| /' conftest.$ac_ext >&5
2996
2997 # Passes both tests.
2998ac_preproc_ok=:
2999break
3000fi
3001rm -f conftest.err conftest.$ac_ext
3002
3003done
3004# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3005rm -f conftest.err conftest.$ac_ext
3006if $ac_preproc_ok; then
3007 break
3008fi
3009
3010 done
3011 ac_cv_prog_CPP=$CPP
3012
3013fi
3014 CPP=$ac_cv_prog_CPP
3015else
3016 ac_cv_prog_CPP=$CPP
3017fi
3018echo "$as_me:$LINENO: result: $CPP" >&5
3019echo "${ECHO_T}$CPP" >&6
3020ac_preproc_ok=false
3021for ac_c_preproc_warn_flag in '' yes
3022do
3023 # Use a header file that comes with gcc, so configuring glibc
3024 # with a fresh cross-compiler works.
3025 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3026 # <limits.h> exists even on freestanding compilers.
3027 # On the NeXT, cc -E runs the code through the compiler's parser,
3028 # not just through cpp. "Syntax error" is here to catch this case.
3029 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3030/* confdefs.h. */
3031_ACEOF
3032cat confdefs.h >>conftest.$ac_ext
3033cat >>conftest.$ac_ext <<_ACEOF
3034/* end confdefs.h. */
3035#ifdef __STDC__
3036# include <limits.h>
3037#else
3038# include <assert.h>
3039#endif
86da66b5 3040 Syntax error
ba479fd2
NN
3041_ACEOF
3042if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3043 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3044 ac_status=$?
3045 grep -v '^ *+' conftest.er1 >conftest.err
3046 rm -f conftest.er1
3047 cat conftest.err >&5
3048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3049 (exit $ac_status); } >/dev/null; then
3050 if test -s conftest.err; then
3051 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3052 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3053 else
3054 ac_cpp_err=
3055 fi
3056else
3057 ac_cpp_err=yes
3058fi
3059if test -z "$ac_cpp_err"; then
6e3f3080 3060 :
414d23ae 3061else
ba479fd2
NN
3062 echo "$as_me: failed program was:" >&5
3063sed 's/^/| /' conftest.$ac_ext >&5
3064
3065 # Broken: fails on valid input.
3066continue
3067fi
3068rm -f conftest.err conftest.$ac_ext
3069
3070 # OK, works on sane cases. Now check whether non-existent headers
3071 # can be detected and how.
3072 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3073/* confdefs.h. */
3074_ACEOF
3075cat confdefs.h >>conftest.$ac_ext
3076cat >>conftest.$ac_ext <<_ACEOF
3077/* end confdefs.h. */
3078#include <ac_nonexistent.h>
3079_ACEOF
3080if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3081 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3082 ac_status=$?
3083 grep -v '^ *+' conftest.er1 >conftest.err
3084 rm -f conftest.er1
3085 cat conftest.err >&5
3086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3087 (exit $ac_status); } >/dev/null; then
3088 if test -s conftest.err; then
3089 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3090 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3091 else
3092 ac_cpp_err=
3093 fi
6e3f3080 3094else
ba479fd2 3095 ac_cpp_err=yes
63cf211a 3096fi
ba479fd2
NN
3097if test -z "$ac_cpp_err"; then
3098 # Broken: success on invalid input.
3099continue
3100else
3101 echo "$as_me: failed program was:" >&5
3102sed 's/^/| /' conftest.$ac_ext >&5
3103
3104 # Passes both tests.
3105ac_preproc_ok=:
3106break
63cf211a 3107fi
ba479fd2
NN
3108rm -f conftest.err conftest.$ac_ext
3109
3110done
3111# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3112rm -f conftest.err conftest.$ac_ext
3113if $ac_preproc_ok; then
3114 :
6e3f3080 3115else
ba479fd2
NN
3116 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3117See \`config.log' for more details." >&5
3118echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3119See \`config.log' for more details." >&2;}
3120 { (exit 1); exit 1; }; }
6e3f3080
NN
3121fi
3122
ba479fd2
NN
3123ac_ext=c
3124ac_cpp='$CPP $CPPFLAGS'
3125ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3126ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3127ac_compiler_gnu=$ac_cv_c_compiler_gnu
3128
b5472e1d 3129
ba479fd2
NN
3130echo "$as_me:$LINENO: checking for inline" >&5
3131echo $ECHO_N "checking for inline... $ECHO_C" >&6
3132if test "${ac_cv_c_inline+set}" = set; then
3133 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3134else
3135 ac_cv_c_inline=no
3136for ac_kw in inline __inline__ __inline; do
ba479fd2 3137 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3138/* confdefs.h. */
3139_ACEOF
3140cat confdefs.h >>conftest.$ac_ext
3141cat >>conftest.$ac_ext <<_ACEOF
3142/* end confdefs.h. */
3143#ifndef __cplusplus
3144typedef int foo_t;
3145static $ac_kw foo_t static_foo () {return 0; }
3146$ac_kw foo_t foo () {return 0; }
3147#endif
414d23ae 3148
ba479fd2
NN
3149_ACEOF
3150rm -f conftest.$ac_objext
3151if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3152 (eval $ac_compile) 2>conftest.er1
ba479fd2 3153 ac_status=$?
86da66b5
HPN
3154 grep -v '^ *+' conftest.er1 >conftest.err
3155 rm -f conftest.er1
3156 cat conftest.err >&5
ba479fd2
NN
3157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3158 (exit $ac_status); } &&
ec6c7392
PB
3159 { ac_try='test -z "$ac_c_werror_flag"
3160 || test ! -s conftest.err'
86da66b5
HPN
3161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3162 (eval $ac_try) 2>&5
3163 ac_status=$?
3164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3165 (exit $ac_status); }; } &&
3166 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3168 (eval $ac_try) 2>&5
3169 ac_status=$?
3170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3171 (exit $ac_status); }; }; then
414d23ae
HPN
3172 ac_cv_c_inline=$ac_kw; break
3173else
ba479fd2
NN
3174 echo "$as_me: failed program was:" >&5
3175sed 's/^/| /' conftest.$ac_ext >&5
3176
414d23ae 3177fi
86da66b5 3178rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3179done
3180
3181fi
ba479fd2
NN
3182echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3183echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3184
3185
ba479fd2 3186case $ac_cv_c_inline in
414d23ae 3187 inline | yes) ;;
86da66b5
HPN
3188 *)
3189 case $ac_cv_c_inline in
3190 no) ac_val=;;
3191 *) ac_val=$ac_cv_c_inline;;
3192 esac
3193 cat >>confdefs.h <<_ACEOF
3194#ifndef __cplusplus
3195#define inline $ac_val
3196#endif
ba479fd2 3197_ACEOF
86da66b5 3198 ;;
414d23ae
HPN
3199esac
3200
414d23ae 3201
414d23ae 3202# sizeof(char) is 1 by definition.
bf3b7cd3
JD
3203
3204echo "$as_me:$LINENO: checking for egrep" >&5
3205echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3206if test "${ac_cv_prog_egrep+set}" = set; then
3207 echo $ECHO_N "(cached) $ECHO_C" >&6
3208else
3209 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3210 then ac_cv_prog_egrep='grep -E'
3211 else ac_cv_prog_egrep='egrep'
3212 fi
3213fi
3214echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3215echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3216 EGREP=$ac_cv_prog_egrep
3217
3218
3219echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3220echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3221if test "${ac_cv_header_stdc+set}" = set; then
3222 echo $ECHO_N "(cached) $ECHO_C" >&6
3223else
3224 cat >conftest.$ac_ext <<_ACEOF
3225/* confdefs.h. */
3226_ACEOF
3227cat confdefs.h >>conftest.$ac_ext
3228cat >>conftest.$ac_ext <<_ACEOF
3229/* end confdefs.h. */
3230#include <stdlib.h>
3231#include <stdarg.h>
3232#include <string.h>
3233#include <float.h>
3234
3235int
3236main ()
3237{
3238
3239 ;
3240 return 0;
3241}
3242_ACEOF
3243rm -f conftest.$ac_objext
3244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3245 (eval $ac_compile) 2>conftest.er1
3246 ac_status=$?
3247 grep -v '^ *+' conftest.er1 >conftest.err
3248 rm -f conftest.er1
3249 cat conftest.err >&5
3250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3251 (exit $ac_status); } &&
ec6c7392
PB
3252 { ac_try='test -z "$ac_c_werror_flag"
3253 || test ! -s conftest.err'
bf3b7cd3
JD
3254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3255 (eval $ac_try) 2>&5
3256 ac_status=$?
3257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3258 (exit $ac_status); }; } &&
3259 { ac_try='test -s conftest.$ac_objext'
3260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3261 (eval $ac_try) 2>&5
3262 ac_status=$?
3263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3264 (exit $ac_status); }; }; then
3265 ac_cv_header_stdc=yes
3266else
3267 echo "$as_me: failed program was:" >&5
3268sed 's/^/| /' conftest.$ac_ext >&5
3269
3270ac_cv_header_stdc=no
3271fi
3272rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3273
3274if test $ac_cv_header_stdc = yes; then
3275 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3276 cat >conftest.$ac_ext <<_ACEOF
3277/* confdefs.h. */
3278_ACEOF
3279cat confdefs.h >>conftest.$ac_ext
3280cat >>conftest.$ac_ext <<_ACEOF
3281/* end confdefs.h. */
3282#include <string.h>
3283
3284_ACEOF
3285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3286 $EGREP "memchr" >/dev/null 2>&1; then
3287 :
3288else
3289 ac_cv_header_stdc=no
3290fi
3291rm -f conftest*
3292
3293fi
3294
3295if test $ac_cv_header_stdc = yes; then
3296 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3297 cat >conftest.$ac_ext <<_ACEOF
3298/* confdefs.h. */
3299_ACEOF
3300cat confdefs.h >>conftest.$ac_ext
3301cat >>conftest.$ac_ext <<_ACEOF
3302/* end confdefs.h. */
3303#include <stdlib.h>
3304
3305_ACEOF
3306if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3307 $EGREP "free" >/dev/null 2>&1; then
3308 :
3309else
3310 ac_cv_header_stdc=no
3311fi
3312rm -f conftest*
3313
3314fi
3315
3316if test $ac_cv_header_stdc = yes; then
3317 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3318 if test "$cross_compiling" = yes; then
3319 :
3320else
3321 cat >conftest.$ac_ext <<_ACEOF
3322/* confdefs.h. */
3323_ACEOF
3324cat confdefs.h >>conftest.$ac_ext
3325cat >>conftest.$ac_ext <<_ACEOF
3326/* end confdefs.h. */
3327#include <ctype.h>
3328#if ((' ' & 0x0FF) == 0x020)
3329# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3330# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3331#else
3332# define ISLOWER(c) \
3333 (('a' <= (c) && (c) <= 'i') \
3334 || ('j' <= (c) && (c) <= 'r') \
3335 || ('s' <= (c) && (c) <= 'z'))
3336# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3337#endif
3338
3339#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3340int
3341main ()
3342{
3343 int i;
3344 for (i = 0; i < 256; i++)
3345 if (XOR (islower (i), ISLOWER (i))
3346 || toupper (i) != TOUPPER (i))
3347 exit(2);
3348 exit (0);
3349}
3350_ACEOF
3351rm -f conftest$ac_exeext
3352if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3353 (eval $ac_link) 2>&5
3354 ac_status=$?
3355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3356 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3358 (eval $ac_try) 2>&5
3359 ac_status=$?
3360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3361 (exit $ac_status); }; }; then
3362 :
3363else
3364 echo "$as_me: program exited with status $ac_status" >&5
3365echo "$as_me: failed program was:" >&5
3366sed 's/^/| /' conftest.$ac_ext >&5
3367
3368( exit $ac_status )
3369ac_cv_header_stdc=no
3370fi
3371rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3372fi
3373fi
3374fi
3375echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3376echo "${ECHO_T}$ac_cv_header_stdc" >&6
3377if test $ac_cv_header_stdc = yes; then
3378
3379cat >>confdefs.h <<\_ACEOF
3380#define STDC_HEADERS 1
3381_ACEOF
3382
3383fi
3384
3385# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3396 inttypes.h stdint.h unistd.h
3397do
3398as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3399echo "$as_me:$LINENO: checking for $ac_header" >&5
3400echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3401if eval "test \"\${$as_ac_Header+set}\" = set"; then
3402 echo $ECHO_N "(cached) $ECHO_C" >&6
3403else
3404 cat >conftest.$ac_ext <<_ACEOF
3405/* confdefs.h. */
3406_ACEOF
3407cat confdefs.h >>conftest.$ac_ext
3408cat >>conftest.$ac_ext <<_ACEOF
3409/* end confdefs.h. */
3410$ac_includes_default
3411
3412#include <$ac_header>
3413_ACEOF
3414rm -f conftest.$ac_objext
3415if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3416 (eval $ac_compile) 2>conftest.er1
3417 ac_status=$?
3418 grep -v '^ *+' conftest.er1 >conftest.err
3419 rm -f conftest.er1
3420 cat conftest.err >&5
3421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3422 (exit $ac_status); } &&
ec6c7392
PB
3423 { ac_try='test -z "$ac_c_werror_flag"
3424 || test ! -s conftest.err'
bf3b7cd3
JD
3425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3426 (eval $ac_try) 2>&5
3427 ac_status=$?
3428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3429 (exit $ac_status); }; } &&
3430 { ac_try='test -s conftest.$ac_objext'
3431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3432 (eval $ac_try) 2>&5
3433 ac_status=$?
3434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3435 (exit $ac_status); }; }; then
3436 eval "$as_ac_Header=yes"
3437else
3438 echo "$as_me: failed program was:" >&5
3439sed 's/^/| /' conftest.$ac_ext >&5
3440
3441eval "$as_ac_Header=no"
3442fi
3443rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3444fi
3445echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3446echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3447if test `eval echo '${'$as_ac_Header'}'` = yes; then
3448 cat >>confdefs.h <<_ACEOF
3449#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3450_ACEOF
3451
3452fi
3453
3454done
3455
3456
3457echo "$as_me:$LINENO: checking for void *" >&5
3458echo $ECHO_N "checking for void *... $ECHO_C" >&6
3459if test "${ac_cv_type_void_p+set}" = set; then
3460 echo $ECHO_N "(cached) $ECHO_C" >&6
3461else
3462 cat >conftest.$ac_ext <<_ACEOF
3463/* confdefs.h. */
3464_ACEOF
3465cat confdefs.h >>conftest.$ac_ext
3466cat >>conftest.$ac_ext <<_ACEOF
3467/* end confdefs.h. */
3468$ac_includes_default
3469int
3470main ()
3471{
3472if ((void * *) 0)
3473 return 0;
3474if (sizeof (void *))
3475 return 0;
3476 ;
3477 return 0;
3478}
3479_ACEOF
3480rm -f conftest.$ac_objext
3481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3482 (eval $ac_compile) 2>conftest.er1
3483 ac_status=$?
3484 grep -v '^ *+' conftest.er1 >conftest.err
3485 rm -f conftest.er1
3486 cat conftest.err >&5
3487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3488 (exit $ac_status); } &&
ec6c7392
PB
3489 { ac_try='test -z "$ac_c_werror_flag"
3490 || test ! -s conftest.err'
bf3b7cd3
JD
3491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3492 (eval $ac_try) 2>&5
3493 ac_status=$?
3494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3495 (exit $ac_status); }; } &&
3496 { ac_try='test -s conftest.$ac_objext'
3497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3498 (eval $ac_try) 2>&5
3499 ac_status=$?
3500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3501 (exit $ac_status); }; }; then
3502 ac_cv_type_void_p=yes
3503else
3504 echo "$as_me: failed program was:" >&5
3505sed 's/^/| /' conftest.$ac_ext >&5
3506
3507ac_cv_type_void_p=no
3508fi
3509rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3510fi
3511echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3512echo "${ECHO_T}$ac_cv_type_void_p" >&6
3513
ba479fd2
NN
3514echo "$as_me:$LINENO: checking size of void *" >&5
3515echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3516if test "${ac_cv_sizeof_void_p+set}" = set; then
3517 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 3518else
bf3b7cd3
JD
3519 if test "$ac_cv_type_void_p" = yes; then
3520 # The cast to unsigned long works around a bug in the HP C Compiler
3521 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3522 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3523 # This bug is HP SR number 8606223364.
3524 if test "$cross_compiling" = yes; then
3525 # Depending upon the size, compute the lo and hi bounds.
3526cat >conftest.$ac_ext <<_ACEOF
3527/* confdefs.h. */
3528_ACEOF
3529cat confdefs.h >>conftest.$ac_ext
3530cat >>conftest.$ac_ext <<_ACEOF
3531/* end confdefs.h. */
3532$ac_includes_default
3533int
3534main ()
3535{
3536static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
3537test_array [0] = 0
3538
3539 ;
3540 return 0;
3541}
3542_ACEOF
3543rm -f conftest.$ac_objext
3544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3545 (eval $ac_compile) 2>conftest.er1
3546 ac_status=$?
3547 grep -v '^ *+' conftest.er1 >conftest.err
3548 rm -f conftest.er1
3549 cat conftest.err >&5
3550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3551 (exit $ac_status); } &&
ec6c7392
PB
3552 { ac_try='test -z "$ac_c_werror_flag"
3553 || test ! -s conftest.err'
bf3b7cd3
JD
3554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3555 (eval $ac_try) 2>&5
3556 ac_status=$?
3557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3558 (exit $ac_status); }; } &&
3559 { ac_try='test -s conftest.$ac_objext'
3560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3561 (eval $ac_try) 2>&5
3562 ac_status=$?
3563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3564 (exit $ac_status); }; }; then
3565 ac_lo=0 ac_mid=0
3566 while :; do
3567 cat >conftest.$ac_ext <<_ACEOF
3568/* confdefs.h. */
3569_ACEOF
3570cat confdefs.h >>conftest.$ac_ext
3571cat >>conftest.$ac_ext <<_ACEOF
3572/* end confdefs.h. */
3573$ac_includes_default
3574int
3575main ()
3576{
3577static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3578test_array [0] = 0
3579
3580 ;
3581 return 0;
3582}
3583_ACEOF
3584rm -f conftest.$ac_objext
3585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3586 (eval $ac_compile) 2>conftest.er1
3587 ac_status=$?
3588 grep -v '^ *+' conftest.er1 >conftest.err
3589 rm -f conftest.er1
3590 cat conftest.err >&5
3591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3592 (exit $ac_status); } &&
ec6c7392
PB
3593 { ac_try='test -z "$ac_c_werror_flag"
3594 || test ! -s conftest.err'
bf3b7cd3
JD
3595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3596 (eval $ac_try) 2>&5
3597 ac_status=$?
3598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3599 (exit $ac_status); }; } &&
3600 { ac_try='test -s conftest.$ac_objext'
3601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3602 (eval $ac_try) 2>&5
3603 ac_status=$?
3604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3605 (exit $ac_status); }; }; then
3606 ac_hi=$ac_mid; break
3607else
3608 echo "$as_me: failed program was:" >&5
3609sed 's/^/| /' conftest.$ac_ext >&5
3610
3611ac_lo=`expr $ac_mid + 1`
3612 if test $ac_lo -le $ac_mid; then
3613 ac_lo= ac_hi=
3614 break
3615 fi
3616 ac_mid=`expr 2 '*' $ac_mid + 1`
3617fi
3618rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3619 done
3620else
3621 echo "$as_me: failed program was:" >&5
3622sed 's/^/| /' conftest.$ac_ext >&5
3623
3624cat >conftest.$ac_ext <<_ACEOF
3625/* confdefs.h. */
3626_ACEOF
3627cat confdefs.h >>conftest.$ac_ext
3628cat >>conftest.$ac_ext <<_ACEOF
3629/* end confdefs.h. */
3630$ac_includes_default
3631int
3632main ()
3633{
3634static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
3635test_array [0] = 0
3636
3637 ;
3638 return 0;
3639}
3640_ACEOF
3641rm -f conftest.$ac_objext
3642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3643 (eval $ac_compile) 2>conftest.er1
3644 ac_status=$?
3645 grep -v '^ *+' conftest.er1 >conftest.err
3646 rm -f conftest.er1
3647 cat conftest.err >&5
3648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3649 (exit $ac_status); } &&
ec6c7392
PB
3650 { ac_try='test -z "$ac_c_werror_flag"
3651 || test ! -s conftest.err'
bf3b7cd3
JD
3652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3653 (eval $ac_try) 2>&5
3654 ac_status=$?
3655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3656 (exit $ac_status); }; } &&
3657 { ac_try='test -s conftest.$ac_objext'
3658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3659 (eval $ac_try) 2>&5
3660 ac_status=$?
3661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3662 (exit $ac_status); }; }; then
3663 ac_hi=-1 ac_mid=-1
3664 while :; do
3665 cat >conftest.$ac_ext <<_ACEOF
3666/* confdefs.h. */
3667_ACEOF
3668cat confdefs.h >>conftest.$ac_ext
3669cat >>conftest.$ac_ext <<_ACEOF
3670/* end confdefs.h. */
3671$ac_includes_default
3672int
3673main ()
3674{
3675static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
3676test_array [0] = 0
3677
3678 ;
3679 return 0;
3680}
3681_ACEOF
3682rm -f conftest.$ac_objext
3683if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3684 (eval $ac_compile) 2>conftest.er1
3685 ac_status=$?
3686 grep -v '^ *+' conftest.er1 >conftest.err
3687 rm -f conftest.er1
3688 cat conftest.err >&5
3689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3690 (exit $ac_status); } &&
ec6c7392
PB
3691 { ac_try='test -z "$ac_c_werror_flag"
3692 || test ! -s conftest.err'
bf3b7cd3
JD
3693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3694 (eval $ac_try) 2>&5
3695 ac_status=$?
3696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3697 (exit $ac_status); }; } &&
3698 { ac_try='test -s conftest.$ac_objext'
3699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3700 (eval $ac_try) 2>&5
3701 ac_status=$?
3702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3703 (exit $ac_status); }; }; then
3704 ac_lo=$ac_mid; break
3705else
3706 echo "$as_me: failed program was:" >&5
3707sed 's/^/| /' conftest.$ac_ext >&5
3708
3709ac_hi=`expr '(' $ac_mid ')' - 1`
3710 if test $ac_mid -le $ac_hi; then
3711 ac_lo= ac_hi=
3712 break
3713 fi
3714 ac_mid=`expr 2 '*' $ac_mid`
3715fi
3716rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3717 done
3718else
3719 echo "$as_me: failed program was:" >&5
3720sed 's/^/| /' conftest.$ac_ext >&5
3721
3722ac_lo= ac_hi=
3723fi
3724rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3725fi
3726rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3727# Binary search between lo and hi bounds.
3728while test "x$ac_lo" != "x$ac_hi"; do
3729 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3730 cat >conftest.$ac_ext <<_ACEOF
3731/* confdefs.h. */
3732_ACEOF
3733cat confdefs.h >>conftest.$ac_ext
3734cat >>conftest.$ac_ext <<_ACEOF
3735/* end confdefs.h. */
3736$ac_includes_default
3737int
3738main ()
3739{
3740static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3741test_array [0] = 0
3742
3743 ;
3744 return 0;
3745}
3746_ACEOF
3747rm -f conftest.$ac_objext
3748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3749 (eval $ac_compile) 2>conftest.er1
3750 ac_status=$?
3751 grep -v '^ *+' conftest.er1 >conftest.err
3752 rm -f conftest.er1
3753 cat conftest.err >&5
3754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3755 (exit $ac_status); } &&
ec6c7392
PB
3756 { ac_try='test -z "$ac_c_werror_flag"
3757 || test ! -s conftest.err'
bf3b7cd3
JD
3758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3759 (eval $ac_try) 2>&5
3760 ac_status=$?
3761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3762 (exit $ac_status); }; } &&
3763 { ac_try='test -s conftest.$ac_objext'
3764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3765 (eval $ac_try) 2>&5
3766 ac_status=$?
3767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3768 (exit $ac_status); }; }; then
3769 ac_hi=$ac_mid
3770else
3771 echo "$as_me: failed program was:" >&5
3772sed 's/^/| /' conftest.$ac_ext >&5
3773
3774ac_lo=`expr '(' $ac_mid ')' + 1`
3775fi
3776rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3777done
3778case $ac_lo in
3779?*) ac_cv_sizeof_void_p=$ac_lo;;
3780'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3781See \`config.log' for more details." >&5
3782echo "$as_me: error: cannot compute sizeof (void *), 77
3783See \`config.log' for more details." >&2;}
3784 { (exit 1); exit 1; }; } ;;
3785esac
3786else
3787 if test "$cross_compiling" = yes; then
ec6c7392
PB
3788 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
3789See \`config.log' for more details." >&5
3790echo "$as_me: error: cannot run test program while cross compiling
3791See \`config.log' for more details." >&2;}
bf3b7cd3
JD
3792 { (exit 1); exit 1; }; }
3793else
3794 cat >conftest.$ac_ext <<_ACEOF
3795/* confdefs.h. */
3796_ACEOF
3797cat confdefs.h >>conftest.$ac_ext
3798cat >>conftest.$ac_ext <<_ACEOF
3799/* end confdefs.h. */
3800$ac_includes_default
3801long longval () { return (long) (sizeof (void *)); }
3802unsigned long ulongval () { return (long) (sizeof (void *)); }
3803#include <stdio.h>
3804#include <stdlib.h>
3805int
3806main ()
3807{
3808
3809 FILE *f = fopen ("conftest.val", "w");
3810 if (! f)
3811 exit (1);
3812 if (((long) (sizeof (void *))) < 0)
3813 {
3814 long i = longval ();
3815 if (i != ((long) (sizeof (void *))))
3816 exit (1);
3817 fprintf (f, "%ld\n", i);
3818 }
3819 else
3820 {
3821 unsigned long i = ulongval ();
3822 if (i != ((long) (sizeof (void *))))
3823 exit (1);
3824 fprintf (f, "%lu\n", i);
3825 }
3826 exit (ferror (f) || fclose (f) != 0);
3827
3828 ;
3829 return 0;
3830}
3831_ACEOF
3832rm -f conftest$ac_exeext
3833if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3834 (eval $ac_link) 2>&5
3835 ac_status=$?
3836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3839 (eval $ac_try) 2>&5
3840 ac_status=$?
3841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3842 (exit $ac_status); }; }; then
3843 ac_cv_sizeof_void_p=`cat conftest.val`
3844else
3845 echo "$as_me: program exited with status $ac_status" >&5
3846echo "$as_me: failed program was:" >&5
3847sed 's/^/| /' conftest.$ac_ext >&5
3848
3849( exit $ac_status )
3850{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3851See \`config.log' for more details." >&5
3852echo "$as_me: error: cannot compute sizeof (void *), 77
3853See \`config.log' for more details." >&2;}
3854 { (exit 1); exit 1; }; }
3855fi
3856rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3857fi
3858fi
3859rm -f conftest.val
3860else
3861 ac_cv_sizeof_void_p=0
3862fi
3863fi
3864echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3865echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3866cat >>confdefs.h <<_ACEOF
3867#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3868_ACEOF
3869
3870
3871echo "$as_me:$LINENO: checking for short" >&5
3872echo $ECHO_N "checking for short... $ECHO_C" >&6
3873if test "${ac_cv_type_short+set}" = set; then
3874 echo $ECHO_N "(cached) $ECHO_C" >&6
3875else
3876 cat >conftest.$ac_ext <<_ACEOF
3877/* confdefs.h. */
3878_ACEOF
3879cat confdefs.h >>conftest.$ac_ext
3880cat >>conftest.$ac_ext <<_ACEOF
3881/* end confdefs.h. */
3882$ac_includes_default
3883int
3884main ()
3885{
3886if ((short *) 0)
3887 return 0;
3888if (sizeof (short))
3889 return 0;
3890 ;
3891 return 0;
3892}
3893_ACEOF
3894rm -f conftest.$ac_objext
3895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3896 (eval $ac_compile) 2>conftest.er1
3897 ac_status=$?
3898 grep -v '^ *+' conftest.er1 >conftest.err
3899 rm -f conftest.er1
3900 cat conftest.err >&5
3901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3902 (exit $ac_status); } &&
ec6c7392
PB
3903 { ac_try='test -z "$ac_c_werror_flag"
3904 || test ! -s conftest.err'
bf3b7cd3
JD
3905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3906 (eval $ac_try) 2>&5
3907 ac_status=$?
3908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3909 (exit $ac_status); }; } &&
3910 { ac_try='test -s conftest.$ac_objext'
3911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3912 (eval $ac_try) 2>&5
3913 ac_status=$?
3914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3915 (exit $ac_status); }; }; then
3916 ac_cv_type_short=yes
3917else
3918 echo "$as_me: failed program was:" >&5
3919sed 's/^/| /' conftest.$ac_ext >&5
3920
3921ac_cv_type_short=no
3922fi
3923rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3924fi
3925echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
3926echo "${ECHO_T}$ac_cv_type_short" >&6
3927
3928echo "$as_me:$LINENO: checking size of short" >&5
3929echo $ECHO_N "checking size of short... $ECHO_C" >&6
3930if test "${ac_cv_sizeof_short+set}" = set; then
3931 echo $ECHO_N "(cached) $ECHO_C" >&6
3932else
3933 if test "$ac_cv_type_short" = yes; then
3934 # The cast to unsigned long works around a bug in the HP C Compiler
3935 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3936 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3937 # This bug is HP SR number 8606223364.
3938 if test "$cross_compiling" = yes; then
3939 # Depending upon the size, compute the lo and hi bounds.
3940cat >conftest.$ac_ext <<_ACEOF
3941/* confdefs.h. */
3942_ACEOF
3943cat confdefs.h >>conftest.$ac_ext
3944cat >>conftest.$ac_ext <<_ACEOF
3945/* end confdefs.h. */
3946$ac_includes_default
3947int
3948main ()
3949{
3950static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
3951test_array [0] = 0
3952
3953 ;
3954 return 0;
3955}
3956_ACEOF
3957rm -f conftest.$ac_objext
3958if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3959 (eval $ac_compile) 2>conftest.er1
3960 ac_status=$?
3961 grep -v '^ *+' conftest.er1 >conftest.err
3962 rm -f conftest.er1
3963 cat conftest.err >&5
3964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3965 (exit $ac_status); } &&
ec6c7392
PB
3966 { ac_try='test -z "$ac_c_werror_flag"
3967 || test ! -s conftest.err'
bf3b7cd3
JD
3968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3969 (eval $ac_try) 2>&5
3970 ac_status=$?
3971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3972 (exit $ac_status); }; } &&
3973 { ac_try='test -s conftest.$ac_objext'
3974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3975 (eval $ac_try) 2>&5
3976 ac_status=$?
3977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3978 (exit $ac_status); }; }; then
3979 ac_lo=0 ac_mid=0
3980 while :; do
3981 cat >conftest.$ac_ext <<_ACEOF
3982/* confdefs.h. */
3983_ACEOF
3984cat confdefs.h >>conftest.$ac_ext
3985cat >>conftest.$ac_ext <<_ACEOF
3986/* end confdefs.h. */
3987$ac_includes_default
3988int
3989main ()
3990{
3991static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
3992test_array [0] = 0
3993
3994 ;
3995 return 0;
3996}
3997_ACEOF
3998rm -f conftest.$ac_objext
3999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4000 (eval $ac_compile) 2>conftest.er1
4001 ac_status=$?
4002 grep -v '^ *+' conftest.er1 >conftest.err
4003 rm -f conftest.er1
4004 cat conftest.err >&5
4005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4006 (exit $ac_status); } &&
ec6c7392
PB
4007 { ac_try='test -z "$ac_c_werror_flag"
4008 || test ! -s conftest.err'
bf3b7cd3
JD
4009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4010 (eval $ac_try) 2>&5
4011 ac_status=$?
4012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4013 (exit $ac_status); }; } &&
4014 { ac_try='test -s conftest.$ac_objext'
4015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4016 (eval $ac_try) 2>&5
4017 ac_status=$?
4018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4019 (exit $ac_status); }; }; then
4020 ac_hi=$ac_mid; break
4021else
4022 echo "$as_me: failed program was:" >&5
4023sed 's/^/| /' conftest.$ac_ext >&5
4024
4025ac_lo=`expr $ac_mid + 1`
4026 if test $ac_lo -le $ac_mid; then
4027 ac_lo= ac_hi=
4028 break
4029 fi
4030 ac_mid=`expr 2 '*' $ac_mid + 1`
4031fi
4032rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4033 done
4034else
4035 echo "$as_me: failed program was:" >&5
4036sed 's/^/| /' conftest.$ac_ext >&5
4037
4038cat >conftest.$ac_ext <<_ACEOF
4039/* confdefs.h. */
4040_ACEOF
4041cat confdefs.h >>conftest.$ac_ext
4042cat >>conftest.$ac_ext <<_ACEOF
4043/* end confdefs.h. */
4044$ac_includes_default
4045int
4046main ()
4047{
4048static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
4049test_array [0] = 0
4050
4051 ;
4052 return 0;
4053}
4054_ACEOF
4055rm -f conftest.$ac_objext
4056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4057 (eval $ac_compile) 2>conftest.er1
4058 ac_status=$?
4059 grep -v '^ *+' conftest.er1 >conftest.err
4060 rm -f conftest.er1
4061 cat conftest.err >&5
4062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4063 (exit $ac_status); } &&
ec6c7392
PB
4064 { ac_try='test -z "$ac_c_werror_flag"
4065 || test ! -s conftest.err'
bf3b7cd3
JD
4066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4067 (eval $ac_try) 2>&5
4068 ac_status=$?
4069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4070 (exit $ac_status); }; } &&
4071 { ac_try='test -s conftest.$ac_objext'
4072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4073 (eval $ac_try) 2>&5
4074 ac_status=$?
4075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4076 (exit $ac_status); }; }; then
4077 ac_hi=-1 ac_mid=-1
4078 while :; do
4079 cat >conftest.$ac_ext <<_ACEOF
4080/* confdefs.h. */
4081_ACEOF
4082cat confdefs.h >>conftest.$ac_ext
4083cat >>conftest.$ac_ext <<_ACEOF
4084/* end confdefs.h. */
4085$ac_includes_default
4086int
4087main ()
4088{
4089static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
4090test_array [0] = 0
4091
4092 ;
4093 return 0;
4094}
4095_ACEOF
4096rm -f conftest.$ac_objext
4097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4098 (eval $ac_compile) 2>conftest.er1
4099 ac_status=$?
4100 grep -v '^ *+' conftest.er1 >conftest.err
4101 rm -f conftest.er1
4102 cat conftest.err >&5
4103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4104 (exit $ac_status); } &&
ec6c7392
PB
4105 { ac_try='test -z "$ac_c_werror_flag"
4106 || test ! -s conftest.err'
bf3b7cd3
JD
4107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4108 (eval $ac_try) 2>&5
4109 ac_status=$?
4110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4111 (exit $ac_status); }; } &&
4112 { ac_try='test -s conftest.$ac_objext'
4113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4114 (eval $ac_try) 2>&5
4115 ac_status=$?
4116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4117 (exit $ac_status); }; }; then
4118 ac_lo=$ac_mid; break
4119else
4120 echo "$as_me: failed program was:" >&5
4121sed 's/^/| /' conftest.$ac_ext >&5
4122
4123ac_hi=`expr '(' $ac_mid ')' - 1`
4124 if test $ac_mid -le $ac_hi; then
4125 ac_lo= ac_hi=
4126 break
4127 fi
4128 ac_mid=`expr 2 '*' $ac_mid`
4129fi
4130rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4131 done
4132else
4133 echo "$as_me: failed program was:" >&5
4134sed 's/^/| /' conftest.$ac_ext >&5
4135
4136ac_lo= ac_hi=
4137fi
4138rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4139fi
4140rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4141# Binary search between lo and hi bounds.
4142while test "x$ac_lo" != "x$ac_hi"; do
4143 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4144 cat >conftest.$ac_ext <<_ACEOF
4145/* confdefs.h. */
4146_ACEOF
4147cat confdefs.h >>conftest.$ac_ext
4148cat >>conftest.$ac_ext <<_ACEOF
4149/* end confdefs.h. */
4150$ac_includes_default
4151int
4152main ()
4153{
4154static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4155test_array [0] = 0
4156
4157 ;
4158 return 0;
4159}
4160_ACEOF
4161rm -f conftest.$ac_objext
4162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4163 (eval $ac_compile) 2>conftest.er1
4164 ac_status=$?
4165 grep -v '^ *+' conftest.er1 >conftest.err
4166 rm -f conftest.er1
4167 cat conftest.err >&5
4168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4169 (exit $ac_status); } &&
ec6c7392
PB
4170 { ac_try='test -z "$ac_c_werror_flag"
4171 || test ! -s conftest.err'
bf3b7cd3
JD
4172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4173 (eval $ac_try) 2>&5
4174 ac_status=$?
4175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4176 (exit $ac_status); }; } &&
4177 { ac_try='test -s conftest.$ac_objext'
4178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4179 (eval $ac_try) 2>&5
4180 ac_status=$?
4181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4182 (exit $ac_status); }; }; then
4183 ac_hi=$ac_mid
4184else
4185 echo "$as_me: failed program was:" >&5
4186sed 's/^/| /' conftest.$ac_ext >&5
4187
4188ac_lo=`expr '(' $ac_mid ')' + 1`
4189fi
4190rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4191done
4192case $ac_lo in
4193?*) ac_cv_sizeof_short=$ac_lo;;
4194'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4195See \`config.log' for more details." >&5
4196echo "$as_me: error: cannot compute sizeof (short), 77
4197See \`config.log' for more details." >&2;}
4198 { (exit 1); exit 1; }; } ;;
4199esac
4200else
4201 if test "$cross_compiling" = yes; then
ec6c7392
PB
4202 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4203See \`config.log' for more details." >&5
4204echo "$as_me: error: cannot run test program while cross compiling
4205See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4206 { (exit 1); exit 1; }; }
4207else
4208 cat >conftest.$ac_ext <<_ACEOF
4209/* confdefs.h. */
4210_ACEOF
4211cat confdefs.h >>conftest.$ac_ext
4212cat >>conftest.$ac_ext <<_ACEOF
4213/* end confdefs.h. */
4214$ac_includes_default
4215long longval () { return (long) (sizeof (short)); }
4216unsigned long ulongval () { return (long) (sizeof (short)); }
4217#include <stdio.h>
4218#include <stdlib.h>
4219int
4220main ()
4221{
4222
4223 FILE *f = fopen ("conftest.val", "w");
4224 if (! f)
4225 exit (1);
4226 if (((long) (sizeof (short))) < 0)
4227 {
4228 long i = longval ();
4229 if (i != ((long) (sizeof (short))))
4230 exit (1);
4231 fprintf (f, "%ld\n", i);
4232 }
4233 else
4234 {
4235 unsigned long i = ulongval ();
4236 if (i != ((long) (sizeof (short))))
4237 exit (1);
4238 fprintf (f, "%lu\n", i);
4239 }
4240 exit (ferror (f) || fclose (f) != 0);
4241
4242 ;
4243 return 0;
4244}
4245_ACEOF
4246rm -f conftest$ac_exeext
4247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4248 (eval $ac_link) 2>&5
4249 ac_status=$?
4250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4251 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4253 (eval $ac_try) 2>&5
4254 ac_status=$?
4255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4256 (exit $ac_status); }; }; then
4257 ac_cv_sizeof_short=`cat conftest.val`
4258else
4259 echo "$as_me: program exited with status $ac_status" >&5
4260echo "$as_me: failed program was:" >&5
4261sed 's/^/| /' conftest.$ac_ext >&5
4262
4263( exit $ac_status )
4264{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4265See \`config.log' for more details." >&5
4266echo "$as_me: error: cannot compute sizeof (short), 77
4267See \`config.log' for more details." >&2;}
4268 { (exit 1); exit 1; }; }
4269fi
4270rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4271fi
4272fi
4273rm -f conftest.val
4274else
4275 ac_cv_sizeof_short=0
4276fi
4277fi
4278echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4279echo "${ECHO_T}$ac_cv_sizeof_short" >&6
4280cat >>confdefs.h <<_ACEOF
4281#define SIZEOF_SHORT $ac_cv_sizeof_short
4282_ACEOF
4283
4284
4285echo "$as_me:$LINENO: checking for int" >&5
4286echo $ECHO_N "checking for int... $ECHO_C" >&6
4287if test "${ac_cv_type_int+set}" = set; then
4288 echo $ECHO_N "(cached) $ECHO_C" >&6
4289else
4290 cat >conftest.$ac_ext <<_ACEOF
4291/* confdefs.h. */
4292_ACEOF
4293cat confdefs.h >>conftest.$ac_ext
4294cat >>conftest.$ac_ext <<_ACEOF
4295/* end confdefs.h. */
4296$ac_includes_default
4297int
4298main ()
4299{
4300if ((int *) 0)
4301 return 0;
4302if (sizeof (int))
4303 return 0;
4304 ;
4305 return 0;
4306}
4307_ACEOF
4308rm -f conftest.$ac_objext
4309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4310 (eval $ac_compile) 2>conftest.er1
4311 ac_status=$?
4312 grep -v '^ *+' conftest.er1 >conftest.err
4313 rm -f conftest.er1
4314 cat conftest.err >&5
4315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4316 (exit $ac_status); } &&
ec6c7392
PB
4317 { ac_try='test -z "$ac_c_werror_flag"
4318 || test ! -s conftest.err'
bf3b7cd3
JD
4319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4320 (eval $ac_try) 2>&5
4321 ac_status=$?
4322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4323 (exit $ac_status); }; } &&
4324 { ac_try='test -s conftest.$ac_objext'
4325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4326 (eval $ac_try) 2>&5
4327 ac_status=$?
4328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4329 (exit $ac_status); }; }; then
4330 ac_cv_type_int=yes
4331else
4332 echo "$as_me: failed program was:" >&5
4333sed 's/^/| /' conftest.$ac_ext >&5
4334
4335ac_cv_type_int=no
4336fi
4337rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4338fi
4339echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4340echo "${ECHO_T}$ac_cv_type_int" >&6
4341
4342echo "$as_me:$LINENO: checking size of int" >&5
4343echo $ECHO_N "checking size of int... $ECHO_C" >&6
4344if test "${ac_cv_sizeof_int+set}" = set; then
4345 echo $ECHO_N "(cached) $ECHO_C" >&6
4346else
4347 if test "$ac_cv_type_int" = yes; then
4348 # The cast to unsigned long works around a bug in the HP C Compiler
4349 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4350 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4351 # This bug is HP SR number 8606223364.
4352 if test "$cross_compiling" = yes; then
4353 # Depending upon the size, compute the lo and hi bounds.
4354cat >conftest.$ac_ext <<_ACEOF
4355/* confdefs.h. */
4356_ACEOF
4357cat confdefs.h >>conftest.$ac_ext
4358cat >>conftest.$ac_ext <<_ACEOF
4359/* end confdefs.h. */
4360$ac_includes_default
4361int
4362main ()
4363{
4364static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4365test_array [0] = 0
4366
4367 ;
4368 return 0;
4369}
4370_ACEOF
4371rm -f conftest.$ac_objext
4372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4373 (eval $ac_compile) 2>conftest.er1
4374 ac_status=$?
4375 grep -v '^ *+' conftest.er1 >conftest.err
4376 rm -f conftest.er1
4377 cat conftest.err >&5
4378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4379 (exit $ac_status); } &&
ec6c7392
PB
4380 { ac_try='test -z "$ac_c_werror_flag"
4381 || test ! -s conftest.err'
bf3b7cd3
JD
4382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4383 (eval $ac_try) 2>&5
4384 ac_status=$?
4385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4386 (exit $ac_status); }; } &&
4387 { ac_try='test -s conftest.$ac_objext'
4388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4389 (eval $ac_try) 2>&5
4390 ac_status=$?
4391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4392 (exit $ac_status); }; }; then
4393 ac_lo=0 ac_mid=0
4394 while :; do
4395 cat >conftest.$ac_ext <<_ACEOF
4396/* confdefs.h. */
4397_ACEOF
4398cat confdefs.h >>conftest.$ac_ext
4399cat >>conftest.$ac_ext <<_ACEOF
4400/* end confdefs.h. */
4401$ac_includes_default
4402int
4403main ()
4404{
4405static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4406test_array [0] = 0
4407
4408 ;
4409 return 0;
4410}
4411_ACEOF
4412rm -f conftest.$ac_objext
4413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4414 (eval $ac_compile) 2>conftest.er1
4415 ac_status=$?
4416 grep -v '^ *+' conftest.er1 >conftest.err
4417 rm -f conftest.er1
4418 cat conftest.err >&5
4419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4420 (exit $ac_status); } &&
ec6c7392
PB
4421 { ac_try='test -z "$ac_c_werror_flag"
4422 || test ! -s conftest.err'
bf3b7cd3
JD
4423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4424 (eval $ac_try) 2>&5
4425 ac_status=$?
4426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4427 (exit $ac_status); }; } &&
4428 { ac_try='test -s conftest.$ac_objext'
4429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4430 (eval $ac_try) 2>&5
4431 ac_status=$?
4432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4433 (exit $ac_status); }; }; then
4434 ac_hi=$ac_mid; break
4435else
4436 echo "$as_me: failed program was:" >&5
4437sed 's/^/| /' conftest.$ac_ext >&5
4438
4439ac_lo=`expr $ac_mid + 1`
4440 if test $ac_lo -le $ac_mid; then
4441 ac_lo= ac_hi=
4442 break
4443 fi
4444 ac_mid=`expr 2 '*' $ac_mid + 1`
4445fi
4446rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4447 done
4448else
4449 echo "$as_me: failed program was:" >&5
4450sed 's/^/| /' conftest.$ac_ext >&5
4451
4452cat >conftest.$ac_ext <<_ACEOF
4453/* confdefs.h. */
4454_ACEOF
4455cat confdefs.h >>conftest.$ac_ext
4456cat >>conftest.$ac_ext <<_ACEOF
4457/* end confdefs.h. */
4458$ac_includes_default
4459int
4460main ()
4461{
4462static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4463test_array [0] = 0
4464
4465 ;
4466 return 0;
4467}
4468_ACEOF
4469rm -f conftest.$ac_objext
4470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4471 (eval $ac_compile) 2>conftest.er1
4472 ac_status=$?
4473 grep -v '^ *+' conftest.er1 >conftest.err
4474 rm -f conftest.er1
4475 cat conftest.err >&5
4476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4477 (exit $ac_status); } &&
ec6c7392
PB
4478 { ac_try='test -z "$ac_c_werror_flag"
4479 || test ! -s conftest.err'
bf3b7cd3
JD
4480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4481 (eval $ac_try) 2>&5
4482 ac_status=$?
4483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484 (exit $ac_status); }; } &&
4485 { ac_try='test -s conftest.$ac_objext'
4486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4487 (eval $ac_try) 2>&5
4488 ac_status=$?
4489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4490 (exit $ac_status); }; }; then
4491 ac_hi=-1 ac_mid=-1
4492 while :; do
4493 cat >conftest.$ac_ext <<_ACEOF
4494/* confdefs.h. */
4495_ACEOF
4496cat confdefs.h >>conftest.$ac_ext
4497cat >>conftest.$ac_ext <<_ACEOF
4498/* end confdefs.h. */
4499$ac_includes_default
4500int
4501main ()
4502{
4503static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4504test_array [0] = 0
4505
4506 ;
4507 return 0;
4508}
4509_ACEOF
4510rm -f conftest.$ac_objext
4511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4512 (eval $ac_compile) 2>conftest.er1
4513 ac_status=$?
4514 grep -v '^ *+' conftest.er1 >conftest.err
4515 rm -f conftest.er1
4516 cat conftest.err >&5
4517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4518 (exit $ac_status); } &&
ec6c7392
PB
4519 { ac_try='test -z "$ac_c_werror_flag"
4520 || test ! -s conftest.err'
bf3b7cd3
JD
4521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4522 (eval $ac_try) 2>&5
4523 ac_status=$?
4524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4525 (exit $ac_status); }; } &&
4526 { ac_try='test -s conftest.$ac_objext'
4527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4528 (eval $ac_try) 2>&5
4529 ac_status=$?
4530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4531 (exit $ac_status); }; }; then
4532 ac_lo=$ac_mid; break
4533else
4534 echo "$as_me: failed program was:" >&5
4535sed 's/^/| /' conftest.$ac_ext >&5
4536
4537ac_hi=`expr '(' $ac_mid ')' - 1`
4538 if test $ac_mid -le $ac_hi; then
4539 ac_lo= ac_hi=
4540 break
4541 fi
4542 ac_mid=`expr 2 '*' $ac_mid`
4543fi
4544rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4545 done
4546else
4547 echo "$as_me: failed program was:" >&5
4548sed 's/^/| /' conftest.$ac_ext >&5
4549
4550ac_lo= ac_hi=
4551fi
4552rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4553fi
4554rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4555# Binary search between lo and hi bounds.
4556while test "x$ac_lo" != "x$ac_hi"; do
4557 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4558 cat >conftest.$ac_ext <<_ACEOF
4559/* confdefs.h. */
4560_ACEOF
4561cat confdefs.h >>conftest.$ac_ext
4562cat >>conftest.$ac_ext <<_ACEOF
4563/* end confdefs.h. */
4564$ac_includes_default
4565int
4566main ()
4567{
4568static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4569test_array [0] = 0
4570
4571 ;
4572 return 0;
4573}
4574_ACEOF
4575rm -f conftest.$ac_objext
4576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4577 (eval $ac_compile) 2>conftest.er1
4578 ac_status=$?
4579 grep -v '^ *+' conftest.er1 >conftest.err
4580 rm -f conftest.er1
4581 cat conftest.err >&5
4582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4583 (exit $ac_status); } &&
ec6c7392
PB
4584 { ac_try='test -z "$ac_c_werror_flag"
4585 || test ! -s conftest.err'
bf3b7cd3
JD
4586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4587 (eval $ac_try) 2>&5
4588 ac_status=$?
4589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4590 (exit $ac_status); }; } &&
4591 { ac_try='test -s conftest.$ac_objext'
4592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4593 (eval $ac_try) 2>&5
4594 ac_status=$?
4595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4596 (exit $ac_status); }; }; then
4597 ac_hi=$ac_mid
4598else
4599 echo "$as_me: failed program was:" >&5
4600sed 's/^/| /' conftest.$ac_ext >&5
4601
4602ac_lo=`expr '(' $ac_mid ')' + 1`
4603fi
4604rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4605done
4606case $ac_lo in
4607?*) ac_cv_sizeof_int=$ac_lo;;
4608'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4609See \`config.log' for more details." >&5
4610echo "$as_me: error: cannot compute sizeof (int), 77
4611See \`config.log' for more details." >&2;}
4612 { (exit 1); exit 1; }; } ;;
4613esac
4614else
4615 if test "$cross_compiling" = yes; then
ec6c7392
PB
4616 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4617See \`config.log' for more details." >&5
4618echo "$as_me: error: cannot run test program while cross compiling
4619See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4620 { (exit 1); exit 1; }; }
4621else
4622 cat >conftest.$ac_ext <<_ACEOF
4623/* confdefs.h. */
4624_ACEOF
4625cat confdefs.h >>conftest.$ac_ext
4626cat >>conftest.$ac_ext <<_ACEOF
4627/* end confdefs.h. */
4628$ac_includes_default
4629long longval () { return (long) (sizeof (int)); }
4630unsigned long ulongval () { return (long) (sizeof (int)); }
4631#include <stdio.h>
4632#include <stdlib.h>
4633int
4634main ()
4635{
4636
4637 FILE *f = fopen ("conftest.val", "w");
4638 if (! f)
4639 exit (1);
4640 if (((long) (sizeof (int))) < 0)
4641 {
4642 long i = longval ();
4643 if (i != ((long) (sizeof (int))))
4644 exit (1);
4645 fprintf (f, "%ld\n", i);
4646 }
4647 else
4648 {
4649 unsigned long i = ulongval ();
4650 if (i != ((long) (sizeof (int))))
4651 exit (1);
4652 fprintf (f, "%lu\n", i);
4653 }
4654 exit (ferror (f) || fclose (f) != 0);
4655
4656 ;
4657 return 0;
4658}
4659_ACEOF
4660rm -f conftest$ac_exeext
4661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4662 (eval $ac_link) 2>&5
4663 ac_status=$?
4664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4665 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4667 (eval $ac_try) 2>&5
4668 ac_status=$?
4669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4670 (exit $ac_status); }; }; then
4671 ac_cv_sizeof_int=`cat conftest.val`
4672else
4673 echo "$as_me: program exited with status $ac_status" >&5
4674echo "$as_me: failed program was:" >&5
4675sed 's/^/| /' conftest.$ac_ext >&5
4676
4677( exit $ac_status )
4678{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4679See \`config.log' for more details." >&5
4680echo "$as_me: error: cannot compute sizeof (int), 77
4681See \`config.log' for more details." >&2;}
4682 { (exit 1); exit 1; }; }
4683fi
4684rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4685fi
4686fi
4687rm -f conftest.val
4688else
4689 ac_cv_sizeof_int=0
4690fi
4691fi
4692echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4693echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4694cat >>confdefs.h <<_ACEOF
4695#define SIZEOF_INT $ac_cv_sizeof_int
4696_ACEOF
4697
4698
4699echo "$as_me:$LINENO: checking for long" >&5
4700echo $ECHO_N "checking for long... $ECHO_C" >&6
4701if test "${ac_cv_type_long+set}" = set; then
4702 echo $ECHO_N "(cached) $ECHO_C" >&6
4703else
4704 cat >conftest.$ac_ext <<_ACEOF
4705/* confdefs.h. */
4706_ACEOF
4707cat confdefs.h >>conftest.$ac_ext
4708cat >>conftest.$ac_ext <<_ACEOF
4709/* end confdefs.h. */
4710$ac_includes_default
4711int
4712main ()
4713{
4714if ((long *) 0)
4715 return 0;
4716if (sizeof (long))
4717 return 0;
4718 ;
4719 return 0;
4720}
4721_ACEOF
4722rm -f conftest.$ac_objext
4723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4724 (eval $ac_compile) 2>conftest.er1
4725 ac_status=$?
4726 grep -v '^ *+' conftest.er1 >conftest.err
4727 rm -f conftest.er1
4728 cat conftest.err >&5
4729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4730 (exit $ac_status); } &&
ec6c7392
PB
4731 { ac_try='test -z "$ac_c_werror_flag"
4732 || test ! -s conftest.err'
bf3b7cd3
JD
4733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4734 (eval $ac_try) 2>&5
4735 ac_status=$?
4736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4737 (exit $ac_status); }; } &&
4738 { ac_try='test -s conftest.$ac_objext'
4739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4740 (eval $ac_try) 2>&5
4741 ac_status=$?
4742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4743 (exit $ac_status); }; }; then
4744 ac_cv_type_long=yes
4745else
4746 echo "$as_me: failed program was:" >&5
4747sed 's/^/| /' conftest.$ac_ext >&5
4748
4749ac_cv_type_long=no
4750fi
4751rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4752fi
4753echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4754echo "${ECHO_T}$ac_cv_type_long" >&6
4755
4756echo "$as_me:$LINENO: checking size of long" >&5
4757echo $ECHO_N "checking size of long... $ECHO_C" >&6
4758if test "${ac_cv_sizeof_long+set}" = set; then
4759 echo $ECHO_N "(cached) $ECHO_C" >&6
4760else
4761 if test "$ac_cv_type_long" = yes; then
4762 # The cast to unsigned long works around a bug in the HP C Compiler
4763 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4764 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4765 # This bug is HP SR number 8606223364.
4766 if test "$cross_compiling" = yes; then
4767 # Depending upon the size, compute the lo and hi bounds.
4768cat >conftest.$ac_ext <<_ACEOF
4769/* confdefs.h. */
4770_ACEOF
4771cat confdefs.h >>conftest.$ac_ext
4772cat >>conftest.$ac_ext <<_ACEOF
4773/* end confdefs.h. */
4774$ac_includes_default
4775int
4776main ()
4777{
4778static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
4779test_array [0] = 0
4780
4781 ;
4782 return 0;
4783}
4784_ACEOF
4785rm -f conftest.$ac_objext
4786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4787 (eval $ac_compile) 2>conftest.er1
4788 ac_status=$?
4789 grep -v '^ *+' conftest.er1 >conftest.err
4790 rm -f conftest.er1
4791 cat conftest.err >&5
4792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4793 (exit $ac_status); } &&
ec6c7392
PB
4794 { ac_try='test -z "$ac_c_werror_flag"
4795 || test ! -s conftest.err'
bf3b7cd3
JD
4796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4797 (eval $ac_try) 2>&5
4798 ac_status=$?
4799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4800 (exit $ac_status); }; } &&
4801 { ac_try='test -s conftest.$ac_objext'
4802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4803 (eval $ac_try) 2>&5
4804 ac_status=$?
4805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4806 (exit $ac_status); }; }; then
4807 ac_lo=0 ac_mid=0
4808 while :; do
4809 cat >conftest.$ac_ext <<_ACEOF
4810/* confdefs.h. */
4811_ACEOF
4812cat confdefs.h >>conftest.$ac_ext
4813cat >>conftest.$ac_ext <<_ACEOF
4814/* end confdefs.h. */
4815$ac_includes_default
4816int
4817main ()
4818{
4819static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4820test_array [0] = 0
4821
4822 ;
4823 return 0;
4824}
4825_ACEOF
4826rm -f conftest.$ac_objext
4827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4828 (eval $ac_compile) 2>conftest.er1
4829 ac_status=$?
4830 grep -v '^ *+' conftest.er1 >conftest.err
4831 rm -f conftest.er1
4832 cat conftest.err >&5
4833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4834 (exit $ac_status); } &&
ec6c7392
PB
4835 { ac_try='test -z "$ac_c_werror_flag"
4836 || test ! -s conftest.err'
bf3b7cd3
JD
4837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4838 (eval $ac_try) 2>&5
4839 ac_status=$?
4840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4841 (exit $ac_status); }; } &&
4842 { ac_try='test -s conftest.$ac_objext'
4843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4844 (eval $ac_try) 2>&5
4845 ac_status=$?
4846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4847 (exit $ac_status); }; }; then
4848 ac_hi=$ac_mid; break
4849else
4850 echo "$as_me: failed program was:" >&5
4851sed 's/^/| /' conftest.$ac_ext >&5
4852
4853ac_lo=`expr $ac_mid + 1`
4854 if test $ac_lo -le $ac_mid; then
4855 ac_lo= ac_hi=
4856 break
4857 fi
4858 ac_mid=`expr 2 '*' $ac_mid + 1`
4859fi
4860rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4861 done
4862else
4863 echo "$as_me: failed program was:" >&5
4864sed 's/^/| /' conftest.$ac_ext >&5
4865
4866cat >conftest.$ac_ext <<_ACEOF
4867/* confdefs.h. */
4868_ACEOF
4869cat confdefs.h >>conftest.$ac_ext
4870cat >>conftest.$ac_ext <<_ACEOF
4871/* end confdefs.h. */
4872$ac_includes_default
4873int
4874main ()
4875{
4876static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
4877test_array [0] = 0
4878
4879 ;
4880 return 0;
4881}
4882_ACEOF
4883rm -f conftest.$ac_objext
4884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4885 (eval $ac_compile) 2>conftest.er1
4886 ac_status=$?
4887 grep -v '^ *+' conftest.er1 >conftest.err
4888 rm -f conftest.er1
4889 cat conftest.err >&5
4890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4891 (exit $ac_status); } &&
ec6c7392
PB
4892 { ac_try='test -z "$ac_c_werror_flag"
4893 || test ! -s conftest.err'
bf3b7cd3
JD
4894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4895 (eval $ac_try) 2>&5
4896 ac_status=$?
4897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4898 (exit $ac_status); }; } &&
4899 { ac_try='test -s conftest.$ac_objext'
4900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4901 (eval $ac_try) 2>&5
4902 ac_status=$?
4903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4904 (exit $ac_status); }; }; then
4905 ac_hi=-1 ac_mid=-1
4906 while :; do
4907 cat >conftest.$ac_ext <<_ACEOF
4908/* confdefs.h. */
4909_ACEOF
4910cat confdefs.h >>conftest.$ac_ext
4911cat >>conftest.$ac_ext <<_ACEOF
4912/* end confdefs.h. */
4913$ac_includes_default
4914int
4915main ()
4916{
4917static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
4918test_array [0] = 0
4919
4920 ;
4921 return 0;
4922}
4923_ACEOF
4924rm -f conftest.$ac_objext
4925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4926 (eval $ac_compile) 2>conftest.er1
4927 ac_status=$?
4928 grep -v '^ *+' conftest.er1 >conftest.err
4929 rm -f conftest.er1
4930 cat conftest.err >&5
4931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4932 (exit $ac_status); } &&
ec6c7392
PB
4933 { ac_try='test -z "$ac_c_werror_flag"
4934 || test ! -s conftest.err'
bf3b7cd3
JD
4935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4936 (eval $ac_try) 2>&5
4937 ac_status=$?
4938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4939 (exit $ac_status); }; } &&
4940 { ac_try='test -s conftest.$ac_objext'
4941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4942 (eval $ac_try) 2>&5
4943 ac_status=$?
4944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4945 (exit $ac_status); }; }; then
4946 ac_lo=$ac_mid; break
4947else
4948 echo "$as_me: failed program was:" >&5
4949sed 's/^/| /' conftest.$ac_ext >&5
4950
4951ac_hi=`expr '(' $ac_mid ')' - 1`
4952 if test $ac_mid -le $ac_hi; then
4953 ac_lo= ac_hi=
4954 break
4955 fi
4956 ac_mid=`expr 2 '*' $ac_mid`
4957fi
4958rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4959 done
4960else
4961 echo "$as_me: failed program was:" >&5
4962sed 's/^/| /' conftest.$ac_ext >&5
4963
4964ac_lo= ac_hi=
4965fi
4966rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4967fi
4968rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4969# Binary search between lo and hi bounds.
4970while test "x$ac_lo" != "x$ac_hi"; do
4971 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4972 cat >conftest.$ac_ext <<_ACEOF
4973/* confdefs.h. */
4974_ACEOF
4975cat confdefs.h >>conftest.$ac_ext
4976cat >>conftest.$ac_ext <<_ACEOF
4977/* end confdefs.h. */
4978$ac_includes_default
4979int
4980main ()
4981{
4982static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4983test_array [0] = 0
4984
4985 ;
4986 return 0;
4987}
4988_ACEOF
4989rm -f conftest.$ac_objext
4990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4991 (eval $ac_compile) 2>conftest.er1
4992 ac_status=$?
4993 grep -v '^ *+' conftest.er1 >conftest.err
4994 rm -f conftest.er1
4995 cat conftest.err >&5
4996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4997 (exit $ac_status); } &&
ec6c7392
PB
4998 { ac_try='test -z "$ac_c_werror_flag"
4999 || test ! -s conftest.err'
bf3b7cd3
JD
5000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5001 (eval $ac_try) 2>&5
5002 ac_status=$?
5003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5004 (exit $ac_status); }; } &&
5005 { ac_try='test -s conftest.$ac_objext'
5006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5007 (eval $ac_try) 2>&5
5008 ac_status=$?
5009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5010 (exit $ac_status); }; }; then
5011 ac_hi=$ac_mid
5012else
5013 echo "$as_me: failed program was:" >&5
5014sed 's/^/| /' conftest.$ac_ext >&5
5015
5016ac_lo=`expr '(' $ac_mid ')' + 1`
5017fi
5018rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5019done
5020case $ac_lo in
5021?*) ac_cv_sizeof_long=$ac_lo;;
5022'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5023See \`config.log' for more details." >&5
5024echo "$as_me: error: cannot compute sizeof (long), 77
5025See \`config.log' for more details." >&2;}
5026 { (exit 1); exit 1; }; } ;;
5027esac
5028else
5029 if test "$cross_compiling" = yes; then
ec6c7392
PB
5030 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5031See \`config.log' for more details." >&5
5032echo "$as_me: error: cannot run test program while cross compiling
5033See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5034 { (exit 1); exit 1; }; }
5035else
5036 cat >conftest.$ac_ext <<_ACEOF
5037/* confdefs.h. */
5038_ACEOF
5039cat confdefs.h >>conftest.$ac_ext
5040cat >>conftest.$ac_ext <<_ACEOF
5041/* end confdefs.h. */
5042$ac_includes_default
5043long longval () { return (long) (sizeof (long)); }
5044unsigned long ulongval () { return (long) (sizeof (long)); }
5045#include <stdio.h>
5046#include <stdlib.h>
5047int
5048main ()
5049{
5050
5051 FILE *f = fopen ("conftest.val", "w");
5052 if (! f)
5053 exit (1);
5054 if (((long) (sizeof (long))) < 0)
5055 {
5056 long i = longval ();
5057 if (i != ((long) (sizeof (long))))
5058 exit (1);
5059 fprintf (f, "%ld\n", i);
5060 }
5061 else
5062 {
5063 unsigned long i = ulongval ();
5064 if (i != ((long) (sizeof (long))))
5065 exit (1);
5066 fprintf (f, "%lu\n", i);
5067 }
5068 exit (ferror (f) || fclose (f) != 0);
5069
5070 ;
5071 return 0;
5072}
5073_ACEOF
5074rm -f conftest$ac_exeext
5075if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5076 (eval $ac_link) 2>&5
5077 ac_status=$?
5078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5079 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5081 (eval $ac_try) 2>&5
5082 ac_status=$?
5083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5084 (exit $ac_status); }; }; then
5085 ac_cv_sizeof_long=`cat conftest.val`
5086else
5087 echo "$as_me: program exited with status $ac_status" >&5
5088echo "$as_me: failed program was:" >&5
5089sed 's/^/| /' conftest.$ac_ext >&5
5090
5091( exit $ac_status )
5092{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5093See \`config.log' for more details." >&5
5094echo "$as_me: error: cannot compute sizeof (long), 77
5095See \`config.log' for more details." >&2;}
5096 { (exit 1); exit 1; }; }
5097fi
5098rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5099fi
5100fi
5101rm -f conftest.val
5102else
5103 ac_cv_sizeof_long=0
5104fi
5105fi
5106echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5107echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5108cat >>confdefs.h <<_ACEOF
5109#define SIZEOF_LONG $ac_cv_sizeof_long
5110_ACEOF
5111
5112
5ec1c5e6
KC
5113echo "$as_me:$LINENO: checking for long long" >&5
5114echo $ECHO_N "checking for long long... $ECHO_C" >&6
5115if test "${ac_cv_type_long_long+set}" = set; then
5116 echo $ECHO_N "(cached) $ECHO_C" >&6
5117else
5118 cat >conftest.$ac_ext <<_ACEOF
5119/* confdefs.h. */
5120_ACEOF
5121cat confdefs.h >>conftest.$ac_ext
5122cat >>conftest.$ac_ext <<_ACEOF
5123/* end confdefs.h. */
5124$ac_includes_default
5125int
5126main ()
5127{
5128if ((long long *) 0)
5129 return 0;
5130if (sizeof (long long))
5131 return 0;
5132 ;
5133 return 0;
5134}
5135_ACEOF
5136rm -f conftest.$ac_objext
5137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5138 (eval $ac_compile) 2>conftest.er1
5139 ac_status=$?
5140 grep -v '^ *+' conftest.er1 >conftest.err
5141 rm -f conftest.er1
5142 cat conftest.err >&5
5143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5144 (exit $ac_status); } &&
ec6c7392
PB
5145 { ac_try='test -z "$ac_c_werror_flag"
5146 || test ! -s conftest.err'
5ec1c5e6
KC
5147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5148 (eval $ac_try) 2>&5
5149 ac_status=$?
5150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5151 (exit $ac_status); }; } &&
5152 { ac_try='test -s conftest.$ac_objext'
5153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5154 (eval $ac_try) 2>&5
5155 ac_status=$?
5156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5157 (exit $ac_status); }; }; then
5158 ac_cv_type_long_long=yes
5159else
5160 echo "$as_me: failed program was:" >&5
5161sed 's/^/| /' conftest.$ac_ext >&5
5162
5163ac_cv_type_long_long=no
5164fi
5165rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5166fi
5167echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5168echo "${ECHO_T}$ac_cv_type_long_long" >&6
5169if test $ac_cv_type_long_long = yes; then
5170
5171cat >>confdefs.h <<_ACEOF
5172#define HAVE_LONG_LONG 1
5173_ACEOF
5174
5175echo "$as_me:$LINENO: checking for long long" >&5
bf3b7cd3
JD
5176echo $ECHO_N "checking for long long... $ECHO_C" >&6
5177if test "${ac_cv_type_long_long+set}" = set; then
5178 echo $ECHO_N "(cached) $ECHO_C" >&6
5179else
5180 cat >conftest.$ac_ext <<_ACEOF
5181/* confdefs.h. */
5182_ACEOF
5183cat confdefs.h >>conftest.$ac_ext
5184cat >>conftest.$ac_ext <<_ACEOF
5185/* end confdefs.h. */
5186$ac_includes_default
5187int
5188main ()
5189{
5190if ((long long *) 0)
5191 return 0;
5192if (sizeof (long long))
5193 return 0;
5194 ;
5195 return 0;
5196}
5197_ACEOF
5198rm -f conftest.$ac_objext
5199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5200 (eval $ac_compile) 2>conftest.er1
5201 ac_status=$?
5202 grep -v '^ *+' conftest.er1 >conftest.err
5203 rm -f conftest.er1
5204 cat conftest.err >&5
5205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5206 (exit $ac_status); } &&
ec6c7392
PB
5207 { ac_try='test -z "$ac_c_werror_flag"
5208 || test ! -s conftest.err'
bf3b7cd3
JD
5209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5210 (eval $ac_try) 2>&5
5211 ac_status=$?
5212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5213 (exit $ac_status); }; } &&
5214 { ac_try='test -s conftest.$ac_objext'
5215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5216 (eval $ac_try) 2>&5
5217 ac_status=$?
5218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5219 (exit $ac_status); }; }; then
5220 ac_cv_type_long_long=yes
5221else
5222 echo "$as_me: failed program was:" >&5
5223sed 's/^/| /' conftest.$ac_ext >&5
5224
5225ac_cv_type_long_long=no
5226fi
5227rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5228fi
5229echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5230echo "${ECHO_T}$ac_cv_type_long_long" >&6
5231
5232echo "$as_me:$LINENO: checking size of long long" >&5
5233echo $ECHO_N "checking size of long long... $ECHO_C" >&6
5234if test "${ac_cv_sizeof_long_long+set}" = set; then
5235 echo $ECHO_N "(cached) $ECHO_C" >&6
5236else
5237 if test "$ac_cv_type_long_long" = yes; then
5238 # The cast to unsigned long works around a bug in the HP C Compiler
5239 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5240 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5241 # This bug is HP SR number 8606223364.
5242 if test "$cross_compiling" = yes; then
5243 # Depending upon the size, compute the lo and hi bounds.
5244cat >conftest.$ac_ext <<_ACEOF
5245/* confdefs.h. */
5246_ACEOF
5247cat confdefs.h >>conftest.$ac_ext
5248cat >>conftest.$ac_ext <<_ACEOF
5249/* end confdefs.h. */
5250$ac_includes_default
5251int
5252main ()
5253{
5254static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
5255test_array [0] = 0
5256
5257 ;
5258 return 0;
5259}
5260_ACEOF
5261rm -f conftest.$ac_objext
5262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5263 (eval $ac_compile) 2>conftest.er1
5264 ac_status=$?
5265 grep -v '^ *+' conftest.er1 >conftest.err
5266 rm -f conftest.er1
5267 cat conftest.err >&5
5268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5269 (exit $ac_status); } &&
ec6c7392
PB
5270 { ac_try='test -z "$ac_c_werror_flag"
5271 || test ! -s conftest.err'
bf3b7cd3
JD
5272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5273 (eval $ac_try) 2>&5
5274 ac_status=$?
5275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5276 (exit $ac_status); }; } &&
5277 { ac_try='test -s conftest.$ac_objext'
5278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5279 (eval $ac_try) 2>&5
5280 ac_status=$?
5281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5282 (exit $ac_status); }; }; then
5283 ac_lo=0 ac_mid=0
5284 while :; do
5285 cat >conftest.$ac_ext <<_ACEOF
5286/* confdefs.h. */
5287_ACEOF
5288cat confdefs.h >>conftest.$ac_ext
5289cat >>conftest.$ac_ext <<_ACEOF
5290/* end confdefs.h. */
5291$ac_includes_default
5292int
5293main ()
5294{
5295static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5296test_array [0] = 0
5297
5298 ;
5299 return 0;
5300}
5301_ACEOF
5302rm -f conftest.$ac_objext
5303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5304 (eval $ac_compile) 2>conftest.er1
5305 ac_status=$?
5306 grep -v '^ *+' conftest.er1 >conftest.err
5307 rm -f conftest.er1
5308 cat conftest.err >&5
5309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5310 (exit $ac_status); } &&
ec6c7392
PB
5311 { ac_try='test -z "$ac_c_werror_flag"
5312 || test ! -s conftest.err'
bf3b7cd3
JD
5313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5314 (eval $ac_try) 2>&5
5315 ac_status=$?
5316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5317 (exit $ac_status); }; } &&
5318 { ac_try='test -s conftest.$ac_objext'
5319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5320 (eval $ac_try) 2>&5
5321 ac_status=$?
5322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5323 (exit $ac_status); }; }; then
5324 ac_hi=$ac_mid; break
5325else
5326 echo "$as_me: failed program was:" >&5
5327sed 's/^/| /' conftest.$ac_ext >&5
5328
5329ac_lo=`expr $ac_mid + 1`
5330 if test $ac_lo -le $ac_mid; then
5331 ac_lo= ac_hi=
5332 break
5333 fi
5334 ac_mid=`expr 2 '*' $ac_mid + 1`
5335fi
5336rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5337 done
5338else
5339 echo "$as_me: failed program was:" >&5
5340sed 's/^/| /' conftest.$ac_ext >&5
5341
5342cat >conftest.$ac_ext <<_ACEOF
5343/* confdefs.h. */
5344_ACEOF
5345cat confdefs.h >>conftest.$ac_ext
5346cat >>conftest.$ac_ext <<_ACEOF
5347/* end confdefs.h. */
5348$ac_includes_default
5349int
5350main ()
5351{
5352static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
5353test_array [0] = 0
5354
5355 ;
5356 return 0;
5357}
5358_ACEOF
5359rm -f conftest.$ac_objext
5360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5361 (eval $ac_compile) 2>conftest.er1
5362 ac_status=$?
5363 grep -v '^ *+' conftest.er1 >conftest.err
5364 rm -f conftest.er1
5365 cat conftest.err >&5
5366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5367 (exit $ac_status); } &&
ec6c7392
PB
5368 { ac_try='test -z "$ac_c_werror_flag"
5369 || test ! -s conftest.err'
bf3b7cd3
JD
5370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5371 (eval $ac_try) 2>&5
5372 ac_status=$?
5373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5374 (exit $ac_status); }; } &&
5375 { ac_try='test -s conftest.$ac_objext'
5376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5377 (eval $ac_try) 2>&5
5378 ac_status=$?
5379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5380 (exit $ac_status); }; }; then
5381 ac_hi=-1 ac_mid=-1
5382 while :; do
5383 cat >conftest.$ac_ext <<_ACEOF
5384/* confdefs.h. */
5385_ACEOF
5386cat confdefs.h >>conftest.$ac_ext
5387cat >>conftest.$ac_ext <<_ACEOF
5388/* end confdefs.h. */
5389$ac_includes_default
5390int
5391main ()
5392{
5393static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
5394test_array [0] = 0
5395
5396 ;
5397 return 0;
5398}
5399_ACEOF
5400rm -f conftest.$ac_objext
5401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5402 (eval $ac_compile) 2>conftest.er1
5403 ac_status=$?
5404 grep -v '^ *+' conftest.er1 >conftest.err
5405 rm -f conftest.er1
5406 cat conftest.err >&5
5407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5408 (exit $ac_status); } &&
ec6c7392
PB
5409 { ac_try='test -z "$ac_c_werror_flag"
5410 || test ! -s conftest.err'
bf3b7cd3
JD
5411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5412 (eval $ac_try) 2>&5
5413 ac_status=$?
5414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5415 (exit $ac_status); }; } &&
5416 { ac_try='test -s conftest.$ac_objext'
5417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5418 (eval $ac_try) 2>&5
5419 ac_status=$?
5420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5421 (exit $ac_status); }; }; then
5422 ac_lo=$ac_mid; break
5423else
5424 echo "$as_me: failed program was:" >&5
5425sed 's/^/| /' conftest.$ac_ext >&5
5426
5427ac_hi=`expr '(' $ac_mid ')' - 1`
5428 if test $ac_mid -le $ac_hi; then
5429 ac_lo= ac_hi=
5430 break
5431 fi
5432 ac_mid=`expr 2 '*' $ac_mid`
5433fi
5434rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5435 done
5436else
5437 echo "$as_me: failed program was:" >&5
5438sed 's/^/| /' conftest.$ac_ext >&5
5439
5440ac_lo= ac_hi=
5441fi
5442rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5443fi
5444rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5445# Binary search between lo and hi bounds.
5446while test "x$ac_lo" != "x$ac_hi"; do
5447 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5448 cat >conftest.$ac_ext <<_ACEOF
5449/* confdefs.h. */
5450_ACEOF
5451cat confdefs.h >>conftest.$ac_ext
5452cat >>conftest.$ac_ext <<_ACEOF
5453/* end confdefs.h. */
5454$ac_includes_default
5455int
5456main ()
5457{
5458static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5459test_array [0] = 0
5460
5461 ;
5462 return 0;
5463}
5464_ACEOF
5465rm -f conftest.$ac_objext
5466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5467 (eval $ac_compile) 2>conftest.er1
5468 ac_status=$?
5469 grep -v '^ *+' conftest.er1 >conftest.err
5470 rm -f conftest.er1
5471 cat conftest.err >&5
5472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5473 (exit $ac_status); } &&
ec6c7392
PB
5474 { ac_try='test -z "$ac_c_werror_flag"
5475 || test ! -s conftest.err'
bf3b7cd3
JD
5476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5477 (eval $ac_try) 2>&5
5478 ac_status=$?
5479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5480 (exit $ac_status); }; } &&
5481 { ac_try='test -s conftest.$ac_objext'
5482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5483 (eval $ac_try) 2>&5
5484 ac_status=$?
5485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5486 (exit $ac_status); }; }; then
5487 ac_hi=$ac_mid
5488else
5489 echo "$as_me: failed program was:" >&5
5490sed 's/^/| /' conftest.$ac_ext >&5
5491
5492ac_lo=`expr '(' $ac_mid ')' + 1`
5493fi
5494rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5495done
5496case $ac_lo in
5497?*) ac_cv_sizeof_long_long=$ac_lo;;
5498'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5499See \`config.log' for more details." >&5
5500echo "$as_me: error: cannot compute sizeof (long long), 77
5501See \`config.log' for more details." >&2;}
5502 { (exit 1); exit 1; }; } ;;
5503esac
5504else
5505 if test "$cross_compiling" = yes; then
ec6c7392
PB
5506 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5507See \`config.log' for more details." >&5
5508echo "$as_me: error: cannot run test program while cross compiling
5509See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5510 { (exit 1); exit 1; }; }
5511else
5512 cat >conftest.$ac_ext <<_ACEOF
5513/* confdefs.h. */
5514_ACEOF
5515cat confdefs.h >>conftest.$ac_ext
5516cat >>conftest.$ac_ext <<_ACEOF
5517/* end confdefs.h. */
5518$ac_includes_default
5519long longval () { return (long) (sizeof (long long)); }
5520unsigned long ulongval () { return (long) (sizeof (long long)); }
5521#include <stdio.h>
5522#include <stdlib.h>
5523int
5524main ()
5525{
5526
5527 FILE *f = fopen ("conftest.val", "w");
5528 if (! f)
5529 exit (1);
5530 if (((long) (sizeof (long long))) < 0)
5531 {
5532 long i = longval ();
5533 if (i != ((long) (sizeof (long long))))
5534 exit (1);
5535 fprintf (f, "%ld\n", i);
5536 }
5537 else
5538 {
5539 unsigned long i = ulongval ();
5540 if (i != ((long) (sizeof (long long))))
5541 exit (1);
5542 fprintf (f, "%lu\n", i);
5543 }
5544 exit (ferror (f) || fclose (f) != 0);
5545
5546 ;
5547 return 0;
5548}
5549_ACEOF
5550rm -f conftest$ac_exeext
5551if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5552 (eval $ac_link) 2>&5
5553 ac_status=$?
5554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5555 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5557 (eval $ac_try) 2>&5
5558 ac_status=$?
5559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5560 (exit $ac_status); }; }; then
5561 ac_cv_sizeof_long_long=`cat conftest.val`
5562else
5563 echo "$as_me: program exited with status $ac_status" >&5
5564echo "$as_me: failed program was:" >&5
5565sed 's/^/| /' conftest.$ac_ext >&5
5566
5567( exit $ac_status )
5568{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5569See \`config.log' for more details." >&5
5570echo "$as_me: error: cannot compute sizeof (long long), 77
5571See \`config.log' for more details." >&2;}
5572 { (exit 1); exit 1; }; }
5573fi
5574rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5575fi
5576fi
5577rm -f conftest.val
5578else
5579 ac_cv_sizeof_long_long=0
5580fi
5581fi
5582echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5583echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
5584cat >>confdefs.h <<_ACEOF
5585#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5586_ACEOF
5587
5588
5589fi
5ec1c5e6
KC
5590
5591echo "$as_me:$LINENO: checking for __int64" >&5
5592echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5593if test "${ac_cv_type___int64+set}" = set; then
5594 echo $ECHO_N "(cached) $ECHO_C" >&6
5595else
5596 cat >conftest.$ac_ext <<_ACEOF
5597/* confdefs.h. */
5598_ACEOF
5599cat confdefs.h >>conftest.$ac_ext
5600cat >>conftest.$ac_ext <<_ACEOF
5601/* end confdefs.h. */
5602$ac_includes_default
5603int
5604main ()
5605{
5606if ((__int64 *) 0)
5607 return 0;
5608if (sizeof (__int64))
5609 return 0;
5610 ;
5611 return 0;
5612}
5613_ACEOF
5614rm -f conftest.$ac_objext
5615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5616 (eval $ac_compile) 2>conftest.er1
5617 ac_status=$?
5618 grep -v '^ *+' conftest.er1 >conftest.err
5619 rm -f conftest.er1
5620 cat conftest.err >&5
5621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5622 (exit $ac_status); } &&
ec6c7392
PB
5623 { ac_try='test -z "$ac_c_werror_flag"
5624 || test ! -s conftest.err'
5ec1c5e6
KC
5625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5626 (eval $ac_try) 2>&5
5627 ac_status=$?
5628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5629 (exit $ac_status); }; } &&
5630 { ac_try='test -s conftest.$ac_objext'
5631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5632 (eval $ac_try) 2>&5
5633 ac_status=$?
5634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5635 (exit $ac_status); }; }; then
5636 ac_cv_type___int64=yes
5637else
5638 echo "$as_me: failed program was:" >&5
5639sed 's/^/| /' conftest.$ac_ext >&5
5640
5641ac_cv_type___int64=no
5642fi
5643rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5644fi
5645echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5646echo "${ECHO_T}$ac_cv_type___int64" >&6
5647if test $ac_cv_type___int64 = yes; then
5648
5649cat >>confdefs.h <<_ACEOF
5650#define HAVE___INT64 1
5651_ACEOF
5652
5653echo "$as_me:$LINENO: checking for __int64" >&5
bf3b7cd3
JD
5654echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5655if test "${ac_cv_type___int64+set}" = set; then
5656 echo $ECHO_N "(cached) $ECHO_C" >&6
5657else
ba479fd2 5658 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5659/* confdefs.h. */
5660_ACEOF
5661cat confdefs.h >>conftest.$ac_ext
5662cat >>conftest.$ac_ext <<_ACEOF
5663/* end confdefs.h. */
bf3b7cd3 5664$ac_includes_default
ba479fd2
NN
5665int
5666main ()
5667{
bf3b7cd3
JD
5668if ((__int64 *) 0)
5669 return 0;
5670if (sizeof (__int64))
5671 return 0;
ba479fd2
NN
5672 ;
5673 return 0;
5674}
5675_ACEOF
5676rm -f conftest.$ac_objext
5677if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5678 (eval $ac_compile) 2>conftest.er1
ba479fd2 5679 ac_status=$?
86da66b5
HPN
5680 grep -v '^ *+' conftest.er1 >conftest.err
5681 rm -f conftest.er1
5682 cat conftest.err >&5
ba479fd2
NN
5683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684 (exit $ac_status); } &&
ec6c7392
PB
5685 { ac_try='test -z "$ac_c_werror_flag"
5686 || test ! -s conftest.err'
86da66b5
HPN
5687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5688 (eval $ac_try) 2>&5
5689 ac_status=$?
5690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5691 (exit $ac_status); }; } &&
5692 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5694 (eval $ac_try) 2>&5
5695 ac_status=$?
5696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5697 (exit $ac_status); }; }; then
bf3b7cd3 5698 ac_cv_type___int64=yes
75b6f3fd 5699else
ba479fd2
NN
5700 echo "$as_me: failed program was:" >&5
5701sed 's/^/| /' conftest.$ac_ext >&5
5702
bf3b7cd3 5703ac_cv_type___int64=no
75b6f3fd 5704fi
86da66b5 5705rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5706fi
bf3b7cd3
JD
5707echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5708echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 5709
bf3b7cd3
JD
5710echo "$as_me:$LINENO: checking size of __int64" >&5
5711echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
5712if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 5713 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 5714else
bf3b7cd3
JD
5715 if test "$ac_cv_type___int64" = yes; then
5716 # The cast to unsigned long works around a bug in the HP C Compiler
5717 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5718 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5719 # This bug is HP SR number 8606223364.
5720 if test "$cross_compiling" = yes; then
5721 # Depending upon the size, compute the lo and hi bounds.
5722cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5723/* confdefs.h. */
5724_ACEOF
5725cat confdefs.h >>conftest.$ac_ext
5726cat >>conftest.$ac_ext <<_ACEOF
5727/* end confdefs.h. */
bf3b7cd3 5728$ac_includes_default
ba479fd2
NN
5729int
5730main ()
5731{
bf3b7cd3
JD
5732static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
5733test_array [0] = 0
5734
ba479fd2
NN
5735 ;
5736 return 0;
5737}
5738_ACEOF
5739rm -f conftest.$ac_objext
5740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5741 (eval $ac_compile) 2>conftest.er1
ba479fd2 5742 ac_status=$?
86da66b5
HPN
5743 grep -v '^ *+' conftest.er1 >conftest.err
5744 rm -f conftest.er1
5745 cat conftest.err >&5
ba479fd2
NN
5746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5747 (exit $ac_status); } &&
ec6c7392
PB
5748 { ac_try='test -z "$ac_c_werror_flag"
5749 || test ! -s conftest.err'
86da66b5
HPN
5750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5751 (eval $ac_try) 2>&5
5752 ac_status=$?
5753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5754 (exit $ac_status); }; } &&
5755 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5757 (eval $ac_try) 2>&5
5758 ac_status=$?
5759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5760 (exit $ac_status); }; }; then
bf3b7cd3
JD
5761 ac_lo=0 ac_mid=0
5762 while :; do
5763 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5764/* confdefs.h. */
5765_ACEOF
5766cat confdefs.h >>conftest.$ac_ext
5767cat >>conftest.$ac_ext <<_ACEOF
5768/* end confdefs.h. */
bf3b7cd3 5769$ac_includes_default
ba479fd2
NN
5770int
5771main ()
5772{
bf3b7cd3
JD
5773static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5774test_array [0] = 0
5775
ba479fd2
NN
5776 ;
5777 return 0;
5778}
5779_ACEOF
5780rm -f conftest.$ac_objext
5781if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5782 (eval $ac_compile) 2>conftest.er1
ba479fd2 5783 ac_status=$?
86da66b5
HPN
5784 grep -v '^ *+' conftest.er1 >conftest.err
5785 rm -f conftest.er1
5786 cat conftest.err >&5
ba479fd2
NN
5787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5788 (exit $ac_status); } &&
ec6c7392
PB
5789 { ac_try='test -z "$ac_c_werror_flag"
5790 || test ! -s conftest.err'
86da66b5
HPN
5791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5792 (eval $ac_try) 2>&5
5793 ac_status=$?
5794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5795 (exit $ac_status); }; } &&
5796 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5798 (eval $ac_try) 2>&5
5799 ac_status=$?
5800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5801 (exit $ac_status); }; }; then
bf3b7cd3 5802 ac_hi=$ac_mid; break
75e93faa 5803else
ba479fd2
NN
5804 echo "$as_me: failed program was:" >&5
5805sed 's/^/| /' conftest.$ac_ext >&5
5806
bf3b7cd3
JD
5807ac_lo=`expr $ac_mid + 1`
5808 if test $ac_lo -le $ac_mid; then
5809 ac_lo= ac_hi=
5810 break
5811 fi
5812 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 5813fi
86da66b5 5814rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5815 done
75e93faa 5816else
bf3b7cd3
JD
5817 echo "$as_me: failed program was:" >&5
5818sed 's/^/| /' conftest.$ac_ext >&5
5819
5820cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5821/* confdefs.h. */
5822_ACEOF
5823cat confdefs.h >>conftest.$ac_ext
5824cat >>conftest.$ac_ext <<_ACEOF
5825/* end confdefs.h. */
bf3b7cd3 5826$ac_includes_default
ba479fd2
NN
5827int
5828main ()
5829{
bf3b7cd3
JD
5830static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
5831test_array [0] = 0
5832
ba479fd2
NN
5833 ;
5834 return 0;
5835}
5836_ACEOF
5837rm -f conftest.$ac_objext
5838if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5839 (eval $ac_compile) 2>conftest.er1
ba479fd2 5840 ac_status=$?
86da66b5
HPN
5841 grep -v '^ *+' conftest.er1 >conftest.err
5842 rm -f conftest.er1
5843 cat conftest.err >&5
ba479fd2
NN
5844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5845 (exit $ac_status); } &&
ec6c7392
PB
5846 { ac_try='test -z "$ac_c_werror_flag"
5847 || test ! -s conftest.err'
86da66b5
HPN
5848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5849 (eval $ac_try) 2>&5
5850 ac_status=$?
5851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5852 (exit $ac_status); }; } &&
5853 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5855 (eval $ac_try) 2>&5
5856 ac_status=$?
5857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5858 (exit $ac_status); }; }; then
bf3b7cd3
JD
5859 ac_hi=-1 ac_mid=-1
5860 while :; do
5861 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5862/* confdefs.h. */
5863_ACEOF
5864cat confdefs.h >>conftest.$ac_ext
5865cat >>conftest.$ac_ext <<_ACEOF
5866/* end confdefs.h. */
bf3b7cd3 5867$ac_includes_default
ba479fd2
NN
5868int
5869main ()
5870{
bf3b7cd3
JD
5871static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
5872test_array [0] = 0
5873
ba479fd2
NN
5874 ;
5875 return 0;
5876}
5877_ACEOF
5878rm -f conftest.$ac_objext
5879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5880 (eval $ac_compile) 2>conftest.er1
ba479fd2 5881 ac_status=$?
86da66b5
HPN
5882 grep -v '^ *+' conftest.er1 >conftest.err
5883 rm -f conftest.er1
5884 cat conftest.err >&5
ba479fd2
NN
5885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5886 (exit $ac_status); } &&
ec6c7392
PB
5887 { ac_try='test -z "$ac_c_werror_flag"
5888 || test ! -s conftest.err'
86da66b5
HPN
5889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5890 (eval $ac_try) 2>&5
5891 ac_status=$?
5892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5893 (exit $ac_status); }; } &&
5894 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5896 (eval $ac_try) 2>&5
5897 ac_status=$?
5898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5899 (exit $ac_status); }; }; then
bf3b7cd3 5900 ac_lo=$ac_mid; break
04cabffc 5901else
ba479fd2
NN
5902 echo "$as_me: failed program was:" >&5
5903sed 's/^/| /' conftest.$ac_ext >&5
5904
bf3b7cd3
JD
5905ac_hi=`expr '(' $ac_mid ')' - 1`
5906 if test $ac_mid -le $ac_hi; then
5907 ac_lo= ac_hi=
5908 break
5909 fi
5910 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 5911fi
86da66b5 5912rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5913 done
5914else
5915 echo "$as_me: failed program was:" >&5
5916sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 5917
bf3b7cd3 5918ac_lo= ac_hi=
414d23ae 5919fi
bf3b7cd3 5920rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5921fi
bf3b7cd3
JD
5922rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5923# Binary search between lo and hi bounds.
5924while test "x$ac_lo" != "x$ac_hi"; do
5925 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 5926 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5927/* confdefs.h. */
5928_ACEOF
5929cat confdefs.h >>conftest.$ac_ext
5930cat >>conftest.$ac_ext <<_ACEOF
5931/* end confdefs.h. */
bf3b7cd3 5932$ac_includes_default
ba479fd2
NN
5933int
5934main ()
5935{
bf3b7cd3
JD
5936static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5937test_array [0] = 0
5938
ba479fd2
NN
5939 ;
5940 return 0;
5941}
5942_ACEOF
5943rm -f conftest.$ac_objext
5944if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5945 (eval $ac_compile) 2>conftest.er1
ba479fd2 5946 ac_status=$?
86da66b5
HPN
5947 grep -v '^ *+' conftest.er1 >conftest.err
5948 rm -f conftest.er1
5949 cat conftest.err >&5
ba479fd2
NN
5950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5951 (exit $ac_status); } &&
ec6c7392
PB
5952 { ac_try='test -z "$ac_c_werror_flag"
5953 || test ! -s conftest.err'
86da66b5
HPN
5954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5955 (eval $ac_try) 2>&5
5956 ac_status=$?
5957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5958 (exit $ac_status); }; } &&
5959 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5961 (eval $ac_try) 2>&5
5962 ac_status=$?
5963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5964 (exit $ac_status); }; }; then
bf3b7cd3 5965 ac_hi=$ac_mid
75e93faa 5966else
ba479fd2
NN
5967 echo "$as_me: failed program was:" >&5
5968sed 's/^/| /' conftest.$ac_ext >&5
5969
bf3b7cd3 5970ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 5971fi
86da66b5 5972rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5973done
bf3b7cd3
JD
5974case $ac_lo in
5975?*) ac_cv_sizeof___int64=$ac_lo;;
5976'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
5977See \`config.log' for more details." >&5
5978echo "$as_me: error: cannot compute sizeof (__int64), 77
5979See \`config.log' for more details." >&2;}
5980 { (exit 1); exit 1; }; } ;;
5981esac
5982else
5983 if test "$cross_compiling" = yes; then
ec6c7392
PB
5984 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5985See \`config.log' for more details." >&5
5986echo "$as_me: error: cannot run test program while cross compiling
5987See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5988 { (exit 1); exit 1; }; }
5989else
5990 cat >conftest.$ac_ext <<_ACEOF
5991/* confdefs.h. */
5992_ACEOF
5993cat confdefs.h >>conftest.$ac_ext
5994cat >>conftest.$ac_ext <<_ACEOF
5995/* end confdefs.h. */
5996$ac_includes_default
5997long longval () { return (long) (sizeof (__int64)); }
5998unsigned long ulongval () { return (long) (sizeof (__int64)); }
5999#include <stdio.h>
6000#include <stdlib.h>
6001int
6002main ()
6003{
414d23ae 6004
bf3b7cd3
JD
6005 FILE *f = fopen ("conftest.val", "w");
6006 if (! f)
6007 exit (1);
6008 if (((long) (sizeof (__int64))) < 0)
6009 {
6010 long i = longval ();
6011 if (i != ((long) (sizeof (__int64))))
6012 exit (1);
6013 fprintf (f, "%ld\n", i);
6014 }
6015 else
6016 {
6017 unsigned long i = ulongval ();
6018 if (i != ((long) (sizeof (__int64))))
6019 exit (1);
6020 fprintf (f, "%lu\n", i);
6021 }
6022 exit (ferror (f) || fclose (f) != 0);
6023
6024 ;
6025 return 0;
6026}
6027_ACEOF
6028rm -f conftest$ac_exeext
6029if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6030 (eval $ac_link) 2>&5
6031 ac_status=$?
6032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6033 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6035 (eval $ac_try) 2>&5
6036 ac_status=$?
6037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6038 (exit $ac_status); }; }; then
6039 ac_cv_sizeof___int64=`cat conftest.val`
6040else
6041 echo "$as_me: program exited with status $ac_status" >&5
6042echo "$as_me: failed program was:" >&5
6043sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6044
bf3b7cd3
JD
6045( exit $ac_status )
6046{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
6047See \`config.log' for more details." >&5
6048echo "$as_me: error: cannot compute sizeof (__int64), 77
6049See \`config.log' for more details." >&2;}
ba479fd2 6050 { (exit 1); exit 1; }; }
414d23ae 6051fi
bf3b7cd3
JD
6052rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6053fi
6054fi
6055rm -f conftest.val
6056else
6057 ac_cv_sizeof___int64=0
6058fi
6059fi
ba479fd2
NN
6060echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6061echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 6062cat >>confdefs.h <<_ACEOF
414d23ae 6063#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6064_ACEOF
414d23ae 6065
cafe096b 6066
414d23ae
HPN
6067fi
6068
5ec1c5e6 6069
34a86c2b
NN
6070# ---------------------
6071# Warnings and checking
6072# ---------------------
6073
b5472e1d
NN
6074# Check $CC warning features (if it's GCC).
6075# We want to use -pedantic, but we don't want warnings about
6076# * 'long long'
6077# * variadic macros
89a42ac8 6078# * overlong strings
b5472e1d
NN
6079# So, we only use -pedantic if we can disable those warnings.
6080
6081echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6082echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
6083if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6084 echo $ECHO_N "(cached) $ECHO_C" >&6
6085else
6086 save_CFLAGS="$CFLAGS"
6087 CFLAGS="-Wno-long-long"
6088 cat >conftest.$ac_ext <<_ACEOF
6089/* confdefs.h. */
6090_ACEOF
6091cat confdefs.h >>conftest.$ac_ext
6092cat >>conftest.$ac_ext <<_ACEOF
6093/* end confdefs.h. */
6094
6095_ACEOF
6096rm -f conftest.$ac_objext
6097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6098 (eval $ac_compile) 2>conftest.er1
6099 ac_status=$?
6100 grep -v '^ *+' conftest.er1 >conftest.err
6101 rm -f conftest.er1
6102 cat conftest.err >&5
6103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6104 (exit $ac_status); } &&
ec6c7392
PB
6105 { ac_try='test -z "$ac_c_werror_flag"
6106 || test ! -s conftest.err'
b5472e1d
NN
6107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6108 (eval $ac_try) 2>&5
6109 ac_status=$?
6110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6111 (exit $ac_status); }; } &&
6112 { ac_try='test -s conftest.$ac_objext'
6113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6114 (eval $ac_try) 2>&5
6115 ac_status=$?
6116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6117 (exit $ac_status); }; }; then
6118 ac_cv_prog_cc_w_no_long_long=yes
6119else
6120 echo "$as_me: failed program was:" >&5
6121sed 's/^/| /' conftest.$ac_ext >&5
6122
6123ac_cv_prog_cc_w_no_long_long=no
6124fi
6125rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6126 CFLAGS="$save_CFLAGS"
6127
6128fi
6129echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6130echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
6131
6132echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6133echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
6134if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6135 echo $ECHO_N "(cached) $ECHO_C" >&6
6136else
6137 save_CFLAGS="$CFLAGS"
6138 CFLAGS="-Wno-variadic-macros"
6139 cat >conftest.$ac_ext <<_ACEOF
6140/* confdefs.h. */
6141_ACEOF
6142cat confdefs.h >>conftest.$ac_ext
6143cat >>conftest.$ac_ext <<_ACEOF
6144/* end confdefs.h. */
6145
6146_ACEOF
6147rm -f conftest.$ac_objext
6148if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6149 (eval $ac_compile) 2>conftest.er1
6150 ac_status=$?
6151 grep -v '^ *+' conftest.er1 >conftest.err
6152 rm -f conftest.er1
6153 cat conftest.err >&5
6154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6155 (exit $ac_status); } &&
ec6c7392
PB
6156 { ac_try='test -z "$ac_c_werror_flag"
6157 || test ! -s conftest.err'
b5472e1d
NN
6158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6159 (eval $ac_try) 2>&5
6160 ac_status=$?
6161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6162 (exit $ac_status); }; } &&
6163 { ac_try='test -s conftest.$ac_objext'
6164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6165 (eval $ac_try) 2>&5
6166 ac_status=$?
6167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6168 (exit $ac_status); }; }; then
6169 ac_cv_prog_cc_w_no_variadic_macros=yes
6170else
6171 echo "$as_me: failed program was:" >&5
6172sed 's/^/| /' conftest.$ac_ext >&5
6173
6174ac_cv_prog_cc_w_no_variadic_macros=no
6175fi
6176rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6177 CFLAGS="$save_CFLAGS"
6178
6179fi
6180echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6181echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
6182
89a42ac8
ZW
6183echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5
6184echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6
6185if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then
6186 echo $ECHO_N "(cached) $ECHO_C" >&6
6187else
6188 save_CFLAGS="$CFLAGS"
6189 CFLAGS="-Wno-overlength-strings"
6190 cat >conftest.$ac_ext <<_ACEOF
6191/* confdefs.h. */
6192_ACEOF
6193cat confdefs.h >>conftest.$ac_ext
6194cat >>conftest.$ac_ext <<_ACEOF
6195/* end confdefs.h. */
6196
6197_ACEOF
6198rm -f conftest.$ac_objext
6199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6200 (eval $ac_compile) 2>conftest.er1
6201 ac_status=$?
6202 grep -v '^ *+' conftest.er1 >conftest.err
6203 rm -f conftest.er1
6204 cat conftest.err >&5
6205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6206 (exit $ac_status); } &&
ec6c7392
PB
6207 { ac_try='test -z "$ac_c_werror_flag"
6208 || test ! -s conftest.err'
89a42ac8
ZW
6209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6210 (eval $ac_try) 2>&5
6211 ac_status=$?
6212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6213 (exit $ac_status); }; } &&
6214 { ac_try='test -s conftest.$ac_objext'
6215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6216 (eval $ac_try) 2>&5
6217 ac_status=$?
6218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6219 (exit $ac_status); }; }; then
6220 ac_cv_prog_cc_w_no_overlength_strings=yes
6221else
6222 echo "$as_me: failed program was:" >&5
6223sed 's/^/| /' conftest.$ac_ext >&5
6224
6225ac_cv_prog_cc_w_no_overlength_strings=no
6226fi
6227rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6228 CFLAGS="$save_CFLAGS"
6229
6230fi
6231echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5
6232echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6
6233
34a86c2b 6234strict1_warn=
b5472e1d 6235if test $ac_cv_prog_cc_w_no_long_long = yes \
89a42ac8
ZW
6236 && test $ac_cv_prog_cc_w_no_variadic_macros = yes \
6237 && test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then
6238 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
34a86c2b
NN
6239fi
6240
643d3bd2
NN
6241# Add -Wold-style-definition if it's accepted
6242echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6243echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
6244if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6245 echo $ECHO_N "(cached) $ECHO_C" >&6
6246else
6247 save_CFLAGS="$CFLAGS"
6248 CFLAGS="-Wold-style-definition"
6249 cat >conftest.$ac_ext <<_ACEOF
6250/* confdefs.h. */
6251_ACEOF
6252cat confdefs.h >>conftest.$ac_ext
6253cat >>conftest.$ac_ext <<_ACEOF
6254/* end confdefs.h. */
6255
6256_ACEOF
6257rm -f conftest.$ac_objext
6258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6259 (eval $ac_compile) 2>conftest.er1
6260 ac_status=$?
6261 grep -v '^ *+' conftest.er1 >conftest.err
6262 rm -f conftest.er1
6263 cat conftest.err >&5
6264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6265 (exit $ac_status); } &&
ec6c7392
PB
6266 { ac_try='test -z "$ac_c_werror_flag"
6267 || test ! -s conftest.err'
643d3bd2
NN
6268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6269 (eval $ac_try) 2>&5
6270 ac_status=$?
6271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6272 (exit $ac_status); }; } &&
6273 { ac_try='test -s conftest.$ac_objext'
6274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6275 (eval $ac_try) 2>&5
6276 ac_status=$?
6277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6278 (exit $ac_status); }; }; then
6279 ac_cv_prog_cc_w_old_style_definition=yes
6280else
6281 echo "$as_me: failed program was:" >&5
6282sed 's/^/| /' conftest.$ac_ext >&5
6283
6284ac_cv_prog_cc_w_old_style_definition=no
6285fi
6286rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6287 CFLAGS="$save_CFLAGS"
6288
6289fi
6290echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
6291echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
6292if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
6293 strict1_warn="${strict1_warn} -Wold-style-definition"
6294fi
6295
ac0f3f39
KG
6296# Add -Wmissing-format-attribute if it's accepted
6297echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5
6298echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6
6299if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then
6300 echo $ECHO_N "(cached) $ECHO_C" >&6
6301else
6302 save_CFLAGS="$CFLAGS"
6303 CFLAGS="-Wmissing-format-attribute"
6304 cat >conftest.$ac_ext <<_ACEOF
6305/* confdefs.h. */
6306_ACEOF
6307cat confdefs.h >>conftest.$ac_ext
6308cat >>conftest.$ac_ext <<_ACEOF
6309/* end confdefs.h. */
6310
6311_ACEOF
6312rm -f conftest.$ac_objext
6313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6314 (eval $ac_compile) 2>conftest.er1
6315 ac_status=$?
6316 grep -v '^ *+' conftest.er1 >conftest.err
6317 rm -f conftest.er1
6318 cat conftest.err >&5
6319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6320 (exit $ac_status); } &&
ec6c7392
PB
6321 { ac_try='test -z "$ac_c_werror_flag"
6322 || test ! -s conftest.err'
ac0f3f39
KG
6323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6324 (eval $ac_try) 2>&5
6325 ac_status=$?
6326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6327 (exit $ac_status); }; } &&
6328 { ac_try='test -s conftest.$ac_objext'
6329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6330 (eval $ac_try) 2>&5
6331 ac_status=$?
6332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6333 (exit $ac_status); }; }; then
6334 ac_cv_prog_cc_w_missing_format_attribute=yes
6335else
6336 echo "$as_me: failed program was:" >&5
6337sed 's/^/| /' conftest.$ac_ext >&5
6338
6339ac_cv_prog_cc_w_missing_format_attribute=no
6340fi
6341rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6342 CFLAGS="$save_CFLAGS"
6343
6344fi
6345echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5
6346echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6
6347if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then
6348 strict1_warn="${strict1_warn} -Wmissing-format-attribute"
6349fi
6350
09a9c095
NN
6351# Enable -Werror, period.
6352# Check whether --enable-werror_always or --disable-werror_always was given.
6353if test "${enable_werror_always+set}" = set; then
6354 enableval="$enable_werror_always"
6355
6356else
6357 enable_werror_always=no
6358fi;
6359if test x${enable_werror_always} = xyes ; then
6360 strict1_warn="${strict1_warn} -Werror"
6361 WERROR=-Werror
6362fi
6363
ac0f3f39
KG
6364
6365
373477bb
GDR
6366# Get C++ compatibility warning flag, if supported.
6367echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5
6368echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6
6369if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then
6370 echo $ECHO_N "(cached) $ECHO_C" >&6
6371else
6372 save_CFLAGS="$CFLAGS"
6373 CFLAGS="-Wc++-compat"
6374 cat >conftest.$ac_ext <<_ACEOF
6375/* confdefs.h. */
6376_ACEOF
6377cat confdefs.h >>conftest.$ac_ext
6378cat >>conftest.$ac_ext <<_ACEOF
6379/* end confdefs.h. */
6380
6381_ACEOF
6382rm -f conftest.$ac_objext
6383if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6384 (eval $ac_compile) 2>conftest.er1
6385 ac_status=$?
6386 grep -v '^ *+' conftest.er1 >conftest.err
6387 rm -f conftest.er1
6388 cat conftest.err >&5
6389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6390 (exit $ac_status); } &&
ec6c7392
PB
6391 { ac_try='test -z "$ac_c_werror_flag"
6392 || test ! -s conftest.err'
373477bb
GDR
6393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6394 (eval $ac_try) 2>&5
6395 ac_status=$?
6396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6397 (exit $ac_status); }; } &&
6398 { ac_try='test -s conftest.$ac_objext'
6399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6400 (eval $ac_try) 2>&5
6401 ac_status=$?
6402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6403 (exit $ac_status); }; }; then
6404 ac_cv_prog_cc_w_cxx_compat=yes
6405else
6406 echo "$as_me: failed program was:" >&5
6407sed 's/^/| /' conftest.$ac_ext >&5
6408
6409ac_cv_prog_cc_w_cxx_compat=no
6410fi
6411rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6412 CFLAGS="$save_CFLAGS"
6413
6414fi
6415echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5
6416echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6
6417if test x${ac_cv_prog_cc_w_cxx_compat} = xyes; then
6418 cxx_compat_warn="-Wc++-compat"
6419fi
6420
6421
6422
ba479fd2 6423# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
6424# That's useful for people building cross-compilers, or just running a
6425# quick `make'.
6426warn_cflags=
6427if test "x$GCC" = "xyes"; then
6428 warn_cflags='$(GCC_WARN_CFLAGS)'
6429fi
6430
6431
dd859b8a 6432# Enable -Werror in bootstrap stage2 and later.
a1286ef5
ZW
6433is_release=
6434if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6435 is_release=yes
6436fi
dd859b8a
KG
6437# Check whether --enable-werror or --disable-werror was given.
6438if test "${enable_werror+set}" = set; then
6439 enableval="$enable_werror"
ba479fd2 6440
dd859b8a 6441else
06c37c96
NS
6442 if test x$is_release = x ; then
6443 # Default to "yes" on development branches.
dd859b8a 6444 enable_werror=yes
06c37c96
NS
6445else
6446 # Default to "no" on release branches.
6447 enable_werror=no
6448fi
ba479fd2 6449fi;
dd859b8a
KG
6450if test x$enable_werror = xyes ; then
6451 WERROR=-Werror
6452fi
6453
6454
414d23ae
HPN
6455# Enable expensive internal checks
6456# Check whether --enable-checking or --disable-checking was given.
6457if test "${enable_checking+set}" = set; then
6458 enableval="$enable_checking"
e1bbfc5c
NS
6459 ac_checking_flags="${enableval}"
6460else
6461
6462# Determine the default checks.
6463if test x$is_release = x ; then
6464 ac_checking_flags=yes
6465else
6466 ac_checking_flags=release
6467fi
6468fi;
6469ac_assert_checking=1
6470ac_checking=
cdce5c16
NS
6471ac_fold_checking=
6472ac_gc_checking=
6473ac_gc_always_collect=
414d23ae
HPN
6474ac_rtl_checking=
6475ac_rtlflag_checking=
b53ef395 6476ac_runtime_checking=1
cdce5c16
NS
6477ac_tree_checking=
6478ac_valgrind_checking=
e1bbfc5c
NS
6479IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6480for check in $ac_checking_flags
6481do
6482 case $check in
cdce5c16 6483 # these set all the flags to specific states
e1bbfc5c 6484 yes) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6485 ac_fold_checking= ; ac_gc_checking=1 ;
6486 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6487 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
cdce5c16
NS
6488 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6489 no|none) ac_assert_checking= ; ac_checking= ;
6490 ac_fold_checking= ; ac_gc_checking= ;
6491 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6492 ac_rtlflag_checking= ; ac_runtime_checking= ;
cdce5c16 6493 ac_tree_checking= ; ac_valgrind_checking= ;;
e1bbfc5c 6494 all) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6495 ac_fold_checking=1 ; ac_gc_checking=1 ;
6496 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
6497 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6498 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6499 release) ac_assert_checking=1 ; ac_checking= ;
6500 ac_fold_checking= ; ac_gc_checking= ;
6501 ac_gc_always_collect= ; ac_rtl_checking= ;
6502 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6503 ac_tree_checking= ; ac_valgrind_checking= ;;
6504 # these enable particular checks
e1bbfc5c
NS
6505 assert) ac_assert_checking=1 ;;
6506 fold) ac_fold_checking=1 ;;
6507 gc) ac_gc_checking=1 ;;
6508 gcac) ac_gc_always_collect=1 ;;
6509 misc) ac_checking=1 ;;
e1bbfc5c 6510 rtl) ac_rtl_checking=1 ;;
cdce5c16 6511 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 6512 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 6513 tree) ac_tree_checking=1 ;;
cdce5c16 6514 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 6515 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
6516echo "$as_me: error: unknown check category $check" >&2;}
6517 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
6518 esac
6519done
6520IFS="$ac_save_IFS"
06c37c96 6521
ba479fd2
NN
6522nocommon_flag=""
6523if test x$ac_checking != x ; then
6524
6525cat >>confdefs.h <<\_ACEOF
6526#define ENABLE_CHECKING 1
6527_ACEOF
6528
6529 nocommon_flag=-fno-common
6530fi
6531
06c37c96
NS
6532if test x$ac_assert_checking != x ; then
6533
6534cat >>confdefs.h <<\_ACEOF
6535#define ENABLE_ASSERT_CHECKING 1
6536_ACEOF
6537
b53ef395 6538fi
232b67d9 6539
b53ef395
NS
6540if test x$ac_runtime_checking != x ; then
6541
6542cat >>confdefs.h <<\_ACEOF
6543#define ENABLE_RUNTIME_CHECKING 1
6544_ACEOF
6545
06c37c96 6546fi
ba479fd2
NN
6547if test x$ac_tree_checking != x ; then
6548
6549cat >>confdefs.h <<\_ACEOF
6550#define ENABLE_TREE_CHECKING 1
6551_ACEOF
6552
13f05fd0 6553 TREEBROWSER=tree-browser.o
ba479fd2 6554fi
13f05fd0 6555
ba479fd2
NN
6556if test x$ac_rtl_checking != x ; then
6557
6558cat >>confdefs.h <<\_ACEOF
6559#define ENABLE_RTL_CHECKING 1
6560_ACEOF
6561
6562fi
6563if test x$ac_rtlflag_checking != x ; then
6564
6565cat >>confdefs.h <<\_ACEOF
6566#define ENABLE_RTL_FLAG_CHECKING 1
6567_ACEOF
6568
6569fi
6570if test x$ac_gc_checking != x ; then
6571
6572cat >>confdefs.h <<\_ACEOF
6573#define ENABLE_GC_CHECKING 1
6574_ACEOF
6575
6576fi
6577if test x$ac_gc_always_collect != x ; then
6578
6579cat >>confdefs.h <<\_ACEOF
6580#define ENABLE_GC_ALWAYS_COLLECT 1
6581_ACEOF
6582
6583fi
6584if test x$ac_fold_checking != x ; then
6585
6586cat >>confdefs.h <<\_ACEOF
6587#define ENABLE_FOLD_CHECKING 1
6588_ACEOF
6589
6590fi
6591valgrind_path_defines=
6592valgrind_command=
6593
ba479fd2
NN
6594if test "${ac_cv_header_valgrind_h+set}" = set; then
6595 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6596echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6597if test "${ac_cv_header_valgrind_h+set}" = set; then
6598 echo $ECHO_N "(cached) $ECHO_C" >&6
6599fi
6600echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6601echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6602else
6603 # Is the header compilable?
6604echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6605echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
6606cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6607/* confdefs.h. */
6608_ACEOF
6609cat confdefs.h >>conftest.$ac_ext
6610cat >>conftest.$ac_ext <<_ACEOF
6611/* end confdefs.h. */
6612$ac_includes_default
63cf211a 6613#include <valgrind.h>
ba479fd2
NN
6614_ACEOF
6615rm -f conftest.$ac_objext
6616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6617 (eval $ac_compile) 2>conftest.er1
ba479fd2 6618 ac_status=$?
86da66b5
HPN
6619 grep -v '^ *+' conftest.er1 >conftest.err
6620 rm -f conftest.er1
6621 cat conftest.err >&5
ba479fd2
NN
6622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6623 (exit $ac_status); } &&
ec6c7392
PB
6624 { ac_try='test -z "$ac_c_werror_flag"
6625 || test ! -s conftest.err'
86da66b5
HPN
6626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6627 (eval $ac_try) 2>&5
6628 ac_status=$?
6629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6630 (exit $ac_status); }; } &&
6631 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6633 (eval $ac_try) 2>&5
6634 ac_status=$?
6635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6636 (exit $ac_status); }; }; then
6637 ac_header_compiler=yes
6638else
6639 echo "$as_me: failed program was:" >&5
6640sed 's/^/| /' conftest.$ac_ext >&5
6641
6642ac_header_compiler=no
6643fi
86da66b5 6644rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
6645echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6646echo "${ECHO_T}$ac_header_compiler" >&6
6647
6648# Is the header present?
6649echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6650echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
6651cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6652/* confdefs.h. */
6653_ACEOF
6654cat confdefs.h >>conftest.$ac_ext
6655cat >>conftest.$ac_ext <<_ACEOF
6656/* end confdefs.h. */
6657#include <valgrind.h>
6658_ACEOF
6659if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6660 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6661 ac_status=$?
6662 grep -v '^ *+' conftest.er1 >conftest.err
6663 rm -f conftest.er1
6664 cat conftest.err >&5
6665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6666 (exit $ac_status); } >/dev/null; then
6667 if test -s conftest.err; then
6668 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6669 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6670 else
6671 ac_cpp_err=
6672 fi
6673else
6674 ac_cpp_err=yes
6675fi
6676if test -z "$ac_cpp_err"; then
6677 ac_header_preproc=yes
6678else
6679 echo "$as_me: failed program was:" >&5
6680sed 's/^/| /' conftest.$ac_ext >&5
6681
6682 ac_header_preproc=no
6683fi
6684rm -f conftest.err conftest.$ac_ext
6685echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6686echo "${ECHO_T}$ac_header_preproc" >&6
6687
6688# So? What about this header?
86da66b5
HPN
6689case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6690 yes:no: )
ba479fd2
NN
6691 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6692echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
6693 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6694echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6695 ac_header_preproc=yes
ba479fd2 6696 ;;
86da66b5 6697 no:yes:* )
ba479fd2
NN
6698 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6699echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
6700 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6701echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6702 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6703echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6704 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6705echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
6706 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6707echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
6708 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6709echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
ba479fd2
NN
6710 (
6711 cat <<\_ASBOX
86da66b5
HPN
6712## ------------------------------------------ ##
6713## Report this to the AC_PACKAGE_NAME lists. ##
6714## ------------------------------------------ ##
ba479fd2
NN
6715_ASBOX
6716 ) |
6717 sed "s/^/$as_me: WARNING: /" >&2
6718 ;;
6719esac
6720echo "$as_me:$LINENO: checking for valgrind.h" >&5
6721echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6722if test "${ac_cv_header_valgrind_h+set}" = set; then
6723 echo $ECHO_N "(cached) $ECHO_C" >&6
6724else
6725 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 6726fi
ba479fd2
NN
6727echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6728echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6729
6e3f3080 6730fi
ba479fd2 6731if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
6732 have_valgrind_h=yes
6733else
ba479fd2 6734 have_valgrind_h=no
6938ec6c
NN
6735fi
6736
6737
ba479fd2 6738
cdce5c16 6739if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
6740 # It is certainly possible that there's valgrind but no valgrind.h.
6741 # GCC relies on making annotations so we must have both.
ba479fd2
NN
6742 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6743echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
6744 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6745/* confdefs.h. */
6746_ACEOF
6747cat confdefs.h >>conftest.$ac_ext
6748cat >>conftest.$ac_ext <<_ACEOF
6749/* end confdefs.h. */
a207b594 6750#include <valgrind/memcheck.h>
14011ca4
AJ
6751#ifndef VALGRIND_DISCARD
6752#error VALGRIND_DISCARD not defined
6753#endif
ba479fd2
NN
6754_ACEOF
6755if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6756 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6757 ac_status=$?
6758 grep -v '^ *+' conftest.er1 >conftest.err
6759 rm -f conftest.er1
6760 cat conftest.err >&5
6761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6762 (exit $ac_status); } >/dev/null; then
6763 if test -s conftest.err; then
6764 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6765 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6766 else
6767 ac_cpp_err=
6768 fi
6769else
6770 ac_cpp_err=yes
6771fi
6772if test -z "$ac_cpp_err"; then
a207b594
HPN
6773 gcc_cv_header_valgrind_memcheck_h=yes
6774else
ba479fd2
NN
6775 echo "$as_me: failed program was:" >&5
6776sed 's/^/| /' conftest.$ac_ext >&5
6777
a207b594
HPN
6778 gcc_cv_header_valgrind_memcheck_h=no
6779fi
ba479fd2
NN
6780rm -f conftest.err conftest.$ac_ext
6781 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6782echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6783 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6784echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
6785 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6786/* confdefs.h. */
6787_ACEOF
6788cat confdefs.h >>conftest.$ac_ext
6789cat >>conftest.$ac_ext <<_ACEOF
6790/* end confdefs.h. */
a207b594
HPN
6791#include <memcheck.h>
6792#ifndef VALGRIND_DISCARD
6793#error VALGRIND_DISCARD not defined
6794#endif
ba479fd2
NN
6795_ACEOF
6796if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6797 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6798 ac_status=$?
6799 grep -v '^ *+' conftest.er1 >conftest.err
6800 rm -f conftest.er1
6801 cat conftest.err >&5
6802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6803 (exit $ac_status); } >/dev/null; then
6804 if test -s conftest.err; then
6805 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6806 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6807 else
6808 ac_cpp_err=
6809 fi
6810else
6811 ac_cpp_err=yes
6812fi
6813if test -z "$ac_cpp_err"; then
14011ca4
AJ
6814 gcc_cv_header_memcheck_h=yes
6815else
ba479fd2
NN
6816 echo "$as_me: failed program was:" >&5
6817sed 's/^/| /' conftest.$ac_ext >&5
6818
cafe096b
EC
6819 gcc_cv_header_memcheck_h=no
6820fi
ba479fd2
NN
6821rm -f conftest.err conftest.$ac_ext
6822 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6823echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
6824
56694dd9
ZW
6825# Prepare PATH_SEPARATOR.
6826# The user is always right.
6827if test "${PATH_SEPARATOR+set}" != set; then
6828 echo "#! /bin/sh" >conf$$.sh
6829 echo "exit 0" >>conf$$.sh
6830 chmod +x conf$$.sh
6831 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6832 PATH_SEPARATOR=';'
6833 else
6834 PATH_SEPARATOR=:
6835 fi
6836 rm -f conf$$.sh
6837fi
6838
6839# Find out how to test for executable files. Don't use a zero-byte file,
6840# as systems may use methods other than mode bits to determine executability.
6841cat >conf$$.file <<_ASEOF
6842#! /bin/sh
6843exit 0
6844_ASEOF
6845chmod +x conf$$.file
6846if test -x conf$$.file >/dev/null 2>&1; then
6847 ac_executable_p="test -x"
6848else
6849 ac_executable_p="test -f"
6850fi
6851rm -f conf$$.file
6852
6853# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 6854set dummy valgrind; ac_word=$2
ba479fd2
NN
6855echo "$as_me:$LINENO: checking for $ac_word" >&5
6856echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6857if test "${ac_cv_path_valgrind_path+set}" = set; then
6858 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
6859else
6860 case "$valgrind_path" in
56694dd9
ZW
6861 [\\/]* | ?:[\\/]*)
6862 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6863 ;;
414d23ae 6864 *)
56694dd9
ZW
6865 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6866 for ac_dir in $PATH; do
6867 IFS="$ac_save_IFS"
6868 test -z "$ac_dir" && ac_dir=.
6869 for ac_exec_ext in '' $ac_executable_extensions; do
6870 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6871 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6872 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6873 break 2
6874 fi
6875 fi
6876 done
6877 done
6878 IFS="$ac_save_IFS"
6879 ;;
414d23ae 6880esac
75e93faa 6881fi
414d23ae
HPN
6882valgrind_path="$ac_cv_path_valgrind_path"
6883if test -n "$valgrind_path"; then
ba479fd2
NN
6884 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6885echo "${ECHO_T}$valgrind_path" >&6
414d23ae 6886else
ba479fd2
NN
6887 echo "$as_me:$LINENO: result: no" >&5
6888echo "${ECHO_T}no" >&6
414d23ae
HPN
6889fi
6890
a207b594
HPN
6891 if test "x$valgrind_path" = "x" \
6892 || (test $have_valgrind_h = no \
6893 && test $gcc_cv_header_memcheck_h = no \
6894 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
6895 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6896echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6897 { (exit 1); exit 1; }; }
414d23ae
HPN
6898 fi
6899 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6900 valgrind_command="$valgrind_path -q"
ba479fd2
NN
6901
6902cat >>confdefs.h <<\_ACEOF
414d23ae 6903#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 6904_ACEOF
75e93faa 6905
a207b594 6906 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
6907
6908cat >>confdefs.h <<\_ACEOF
a207b594 6909#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 6910_ACEOF
a207b594
HPN
6911
6912 fi
14011ca4 6913 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
6914
6915cat >>confdefs.h <<\_ACEOF
14011ca4 6916#define HAVE_MEMCHECK_H 1
ba479fd2 6917_ACEOF
14011ca4
AJ
6918
6919 fi
414d23ae 6920fi
75e93faa 6921
75e93faa
ZW
6922
6923
74ee1642
PB
6924# Check whether --enable-mapped-location or --disable-mapped-location was given.
6925if test "${enable_mapped_location+set}" = set; then
6926 enableval="$enable_mapped_location"
6927
6928else
6929 enable_mapped_location=no
6930fi;
6931
6932if test "$enable_mapped_location" = yes ; then
6933
6934cat >>confdefs.h <<\_ACEOF
6935#define USE_MAPPED_LOCATION 1
6936_ACEOF
6937
6938fi
6939
414d23ae
HPN
6940# Enable code coverage collection
6941# Check whether --enable-coverage or --disable-coverage was given.
6942if test "${enable_coverage+set}" = set; then
6943 enableval="$enable_coverage"
6944 case "${enableval}" in
6dd297da
NN
6945 yes|noopt)
6946 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6947 ;;
6948 opt)
6949 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6950 ;;
6951 no)
6952 # a.k.a. --disable-coverage
6953 coverage_flags=""
6954 ;;
6955 *)
6956 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
6957echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6958 { (exit 1); exit 1; }; }
6dd297da 6959 ;;
414d23ae 6960esac
75e93faa 6961else
414d23ae 6962 coverage_flags=""
ba479fd2 6963fi;
5c3bc9fb 6964
414d23ae 6965
439a7e54
DN
6966# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
6967if test "${enable_gather_detailed_mem_stats+set}" = set; then
6968 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 6969
439a7e54
DN
6970else
6971 enable_gather_detailed_mem_stats=no
ba479fd2 6972fi;
439a7e54 6973if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
6974
6975cat >>confdefs.h <<\_ACEOF
439a7e54 6976#define GATHER_STATISTICS 1
ba479fd2 6977_ACEOF
439a7e54
DN
6978
6979fi
6980
73458fb7
NN
6981# -------------------------------
6982# Miscenalleous configure options
6983# -------------------------------
34a86c2b
NN
6984
6985# With stabs
ba479fd2 6986
34a86c2b
NN
6987# Check whether --with-stabs or --without-stabs was given.
6988if test "${with_stabs+set}" = set; then
6989 withval="$with_stabs"
6990 stabs="$with_stabs"
6991else
6992 stabs=no
ba479fd2 6993fi;
cafe096b 6994
34a86c2b
NN
6995# Determine whether or not multilibs are enabled.
6996# Check whether --enable-multilib or --disable-multilib was given.
6997if test "${enable_multilib+set}" = set; then
6998 enableval="$enable_multilib"
ba479fd2 6999
34a86c2b
NN
7000else
7001 enable_multilib=yes
ba479fd2 7002fi;
75e93faa 7003
34a86c2b 7004
414d23ae
HPN
7005# Enable __cxa_atexit for C++.
7006# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
7007if test "${enable___cxa_atexit+set}" = set; then
7008 enableval="$enable___cxa_atexit"
75e93faa 7009
ba479fd2 7010fi;
75e93faa 7011
486aa804
BE
7012# Enable C extension for decimal float if target supports it.
7013# Check whether --enable-decimal-float or --disable-decimal-float was given.
7014if test "${enable_decimal_float+set}" = set; then
7015 enableval="$enable_decimal_float"
7016
7017 if test x$enablevar = xyes ; then
7018 case $target in
7019 powerpc*-*-linux* | i?86*-*-linux*)
a4a9df5f 7020 enable_decimal_float=yes
486aa804
BE
7021 ;;
7022 *)
7023 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
7024echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
7025 enable_decimal_float=no
7026 ;;
7027 esac
7028 fi
7029
7030else
a4a9df5f 7031 enable_decimal_float=no
486aa804
BE
7032fi;
7033
7034
7035
7036dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi`
7037
7038cat >>confdefs.h <<_ACEOF
7039#define ENABLE_DECIMAL_FLOAT $dfp
7040_ACEOF
7041
7042
414d23ae
HPN
7043# Enable threads
7044# Pass with no value to take the default
7045# Pass with a value to specify a thread package
7046# Check whether --enable-threads or --disable-threads was given.
7047if test "${enable_threads+set}" = set; then
7048 enableval="$enable_threads"
ba479fd2 7049
414d23ae
HPN
7050else
7051 enable_threads=''
ba479fd2 7052fi;
414d23ae 7053
8dea1cca
DD
7054# Check whether --enable-tls or --disable-tls was given.
7055if test "${enable_tls+set}" = set; then
7056 enableval="$enable_tls"
7057
7058 case $enable_tls in
7059 yes | no) ;;
7060 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
7061Valid choices are 'yes' and 'no'." >&5
7062echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
7063Valid choices are 'yes' and 'no'." >&2;}
7064 { (exit 1); exit 1; }; } ;;
7065 esac
7066
7067else
7068 enable_tls=''
7069fi;
7070
414d23ae
HPN
7071# Check whether --enable-objc-gc or --disable-objc-gc was given.
7072if test "${enable_objc_gc+set}" = set; then
7073 enableval="$enable_objc_gc"
7074 if test x$enable_objc_gc = xno; then
7075 objc_boehm_gc=''
7076else
7077 objc_boehm_gc=1
7078fi
7079else
7080 objc_boehm_gc=''
ba479fd2 7081fi;
75e93faa
ZW
7082
7083
414d23ae
HPN
7084# Check whether --with-dwarf2 or --without-dwarf2 was given.
7085if test "${with_dwarf2+set}" = set; then
7086 withval="$with_dwarf2"
7087 dwarf2="$with_dwarf2"
75e93faa 7088else
414d23ae 7089 dwarf2=no
ba479fd2 7090fi;
75e93faa 7091
414d23ae
HPN
7092# Check whether --enable-shared or --disable-shared was given.
7093if test "${enable_shared+set}" = set; then
7094 enableval="$enable_shared"
ba479fd2 7095
414d23ae
HPN
7096 case $enable_shared in
7097 yes | no) ;;
7098 *)
7099 enable_shared=no
7100 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
7101 for pkg in $enableval; do
7102 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
7103 enable_shared=yes
7104 fi
7105 done
7106 IFS="$ac_save_ifs"
7107 ;;
7108 esac
7109
75e93faa 7110else
414d23ae 7111 enable_shared=yes
ba479fd2 7112fi;
75e93faa 7113
75e93faa 7114
75e93faa 7115
160633c6
MM
7116# Check whether --with-build-sysroot or --without-build-sysroot was given.
7117if test "${with_build_sysroot+set}" = set; then
7118 withval="$with_build_sysroot"
7119
7120fi;
7121
7122
4977bab6
ZW
7123# Check whether --with-sysroot or --without-sysroot was given.
7124if test "${with_sysroot+set}" = set; then
7125 withval="$with_sysroot"
ba479fd2 7126
4977bab6 7127 case ${with_sysroot} in
caa55b1e 7128 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
7129 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
7130 esac
ba479fd2 7131
4977bab6
ZW
7132 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
7133 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
7134
047d636f
DJ
7135 if test "x$exec_prefix" = xNONE; then
7136 if test "x$prefix" = xNONE; then
7137 test_prefix=/usr/local
7138 else
7139 test_prefix=$prefix
7140 fi
7141 else
7142 test_prefix=$exec_prefix
7143 fi
7144 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
7145 "${test_prefix}"|"${test_prefix}/"*|\
7146 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
7147 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
7148 TARGET_SYSTEM_ROOT_DEFINE="$t"
7149 ;;
7150 esac
7151
4977bab6 7152else
ba479fd2 7153
4977bab6 7154 TARGET_SYSTEM_ROOT=
db720d9a 7155 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
7156 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
7157
ba479fd2 7158fi;
4977bab6
ZW
7159
7160
7161
7162
d1bd0ded 7163# Build with intermodule optimisations
d1bd0ded
GK
7164# Check whether --enable-intermodule or --disable-intermodule was given.
7165if test "${enable_intermodule+set}" = set; then
7166 enableval="$enable_intermodule"
0c46c5c7
KC
7167 case ${enable_intermodule} in
7168 yes) onestep="-onestep";;
7169 *) onestep="";;
d1bd0ded 7170esac
0c46c5c7
KC
7171else
7172 onestep=""
ba479fd2 7173fi;
d1bd0ded
GK
7174
7175
f3c9f174
NN
7176# Sanity check enable_languages in case someone does not run the toplevel
7177# configure # script.
7178# Check whether --enable-languages or --disable-languages was given.
7179if test "${enable_languages+set}" = set; then
7180 enableval="$enable_languages"
7181 case ,${enable_languages}, in
7182 ,,|,yes,)
7183 # go safe -- we cannot be much sure without the toplevel
7184 # configure's
7185 # analysis of which target libs are present and usable
7186 enable_languages=c
7187 ;;
7188 *,all,*)
7189 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
7190echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
7191 { (exit 1); exit 1; }; }
7192 ;;
7193 *,c,*)
7194 ;;
7195 *)
7196 enable_languages=c,${enable_languages}
7197 ;;
7198esac
7199else
7200 enable_languages=c
7201fi;
7202
9288b845
CD
7203# Used by documentation targets
7204
7205
7206
f3c9f174 7207
73458fb7
NN
7208# -------------------------
7209# Checks for other programs
7210# -------------------------
5b67ad6f 7211
ba479fd2
NN
7212echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7213echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
86da66b5 7214set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
ba479fd2
NN
7215if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
7216 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 7217else
ba479fd2 7218 cat >conftest.make <<\_ACEOF
e9a25f70 7219all:
ba479fd2
NN
7220 @echo 'ac_maketemp="$(MAKE)"'
7221_ACEOF
e9a25f70 7222# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 7223eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
7224if test -n "$ac_maketemp"; then
7225 eval ac_cv_prog_make_${ac_make}_set=yes
7226else
7227 eval ac_cv_prog_make_${ac_make}_set=no
7228fi
ba479fd2 7229rm -f conftest.make
e9a25f70
JL
7230fi
7231if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
7232 echo "$as_me:$LINENO: result: yes" >&5
7233echo "${ECHO_T}yes" >&6
e9a25f70
JL
7234 SET_MAKE=
7235else
ba479fd2
NN
7236 echo "$as_me:$LINENO: result: no" >&5
7237echo "${ECHO_T}no" >&6
e9a25f70
JL
7238 SET_MAKE="MAKE=${MAKE-make}"
7239fi
7240
7241
861bb6c1 7242# Find some useful tools
ba479fd2 7243for ac_prog in gawk mawk nawk awk
861bb6c1 7244do
ba479fd2 7245 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 7246set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7247echo "$as_me:$LINENO: checking for $ac_word" >&5
7248echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7249if test "${ac_cv_prog_AWK+set}" = set; then
7250 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7251else
7252 if test -n "$AWK"; then
7253 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7254else
ba479fd2
NN
7255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7256for as_dir in $PATH
7257do
7258 IFS=$as_save_IFS
7259 test -z "$as_dir" && as_dir=.
7260 for ac_exec_ext in '' $ac_executable_extensions; do
7261 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7262 ac_cv_prog_AWK="$ac_prog"
7263 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7264 break 2
7265 fi
7266done
7267done
7268
861bb6c1
JL
7269fi
7270fi
ba479fd2 7271AWK=$ac_cv_prog_AWK
861bb6c1 7272if test -n "$AWK"; then
ba479fd2
NN
7273 echo "$as_me:$LINENO: result: $AWK" >&5
7274echo "${ECHO_T}$AWK" >&6
861bb6c1 7275else
ba479fd2
NN
7276 echo "$as_me:$LINENO: result: no" >&5
7277echo "${ECHO_T}no" >&6
861bb6c1
JL
7278fi
7279
ba479fd2 7280 test -n "$AWK" && break
861bb6c1
JL
7281done
7282
776dc15d 7283# We need awk to create options.c and options.h.
2c4902b9
NN
7284# Bail out if it's missing.
7285case ${AWK} in
ba479fd2
NN
7286 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7287echo "$as_me: error: can't build without awk, bailing out" >&2;}
7288 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
7289esac
7290
ba479fd2
NN
7291echo "$as_me:$LINENO: checking whether ln -s works" >&5
7292echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
7293if test "${gcc_cv_prog_LN_S+set}" = set; then
7294 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7295else
7296 rm -f conftestdata_t
7297echo >conftestdata_f
7298if ln -s conftestdata_f conftestdata_t 2>/dev/null
7299then
7300 gcc_cv_prog_LN_S="ln -s"
7301else
7302 if ln conftestdata_f conftestdata_t 2>/dev/null
7303 then
7304 gcc_cv_prog_LN_S=ln
7305 else
35f06ae4
PB
7306 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7307 then
06c3418c 7308 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
7309 else
7310 gcc_cv_prog_LN_S=cp
7311 fi
0a4b6309
RL
7312 fi
7313fi
7314rm -f conftestdata_f conftestdata_t
7315
7316fi
7317LN_S="$gcc_cv_prog_LN_S"
7318if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
7319 echo "$as_me:$LINENO: result: yes" >&5
7320echo "${ECHO_T}yes" >&6
0a4b6309
RL
7321else
7322 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
7323 echo "$as_me:$LINENO: result: no, using ln" >&5
7324echo "${ECHO_T}no, using ln" >&6
0a4b6309 7325 else
35f06ae4
PB
7326 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7327echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
7328 fi
7329fi
7330
18fc9bd4
RG
7331echo "$as_me:$LINENO: checking whether ln works" >&5
7332echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
7333if test "${acx_cv_prog_LN+set}" = set; then
7334 echo $ECHO_N "(cached) $ECHO_C" >&6
7335else
7336 rm -f conftestdata_t
7337echo >conftestdata_f
7338if ln conftestdata_f conftestdata_t 2>/dev/null
7339then
7340 acx_cv_prog_LN=ln
7341else
7342 acx_cv_prog_LN=no
7343fi
7344rm -f conftestdata_f conftestdata_t
7345
7346fi
7347if test $acx_cv_prog_LN = no; then
7348 LN="$LN_S"
7349 echo "$as_me:$LINENO: result: no, using $LN" >&5
7350echo "${ECHO_T}no, using $LN" >&6
7351else
7352 LN="$acx_cv_prog_LN"
7353 echo "$as_me:$LINENO: result: yes" >&5
7354echo "${ECHO_T}yes" >&6
7355fi
7356
ba479fd2
NN
7357if test -n "$ac_tool_prefix"; then
7358 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7359set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7360echo "$as_me:$LINENO: checking for $ac_word" >&5
7361echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7362if test "${ac_cv_prog_RANLIB+set}" = set; then
7363 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7364else
7365 if test -n "$RANLIB"; then
7366 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7367else
ba479fd2
NN
7368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7369for as_dir in $PATH
7370do
7371 IFS=$as_save_IFS
7372 test -z "$as_dir" && as_dir=.
7373 for ac_exec_ext in '' $ac_executable_extensions; do
7374 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7375 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7376 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7377 break 2
7378 fi
7379done
7380done
7381
6e3f3080
NN
7382fi
7383fi
ba479fd2 7384RANLIB=$ac_cv_prog_RANLIB
6e3f3080 7385if test -n "$RANLIB"; then
ba479fd2
NN
7386 echo "$as_me:$LINENO: result: $RANLIB" >&5
7387echo "${ECHO_T}$RANLIB" >&6
7388else
7389 echo "$as_me:$LINENO: result: no" >&5
7390echo "${ECHO_T}no" >&6
7391fi
7392
7393fi
7394if test -z "$ac_cv_prog_RANLIB"; then
7395 ac_ct_RANLIB=$RANLIB
7396 # Extract the first word of "ranlib", so it can be a program name with args.
7397set dummy ranlib; ac_word=$2
7398echo "$as_me:$LINENO: checking for $ac_word" >&5
7399echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7400if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7401 echo $ECHO_N "(cached) $ECHO_C" >&6
7402else
7403 if test -n "$ac_ct_RANLIB"; then
7404 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7405else
7406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7407for as_dir in $PATH
7408do
7409 IFS=$as_save_IFS
7410 test -z "$as_dir" && as_dir=.
7411 for ac_exec_ext in '' $ac_executable_extensions; do
7412 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7413 ac_cv_prog_ac_ct_RANLIB="ranlib"
7414 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7415 break 2
7416 fi
7417done
7418done
7419
7420 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7421fi
7422fi
7423ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7424if test -n "$ac_ct_RANLIB"; then
7425 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7426echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 7427else
ba479fd2
NN
7428 echo "$as_me:$LINENO: result: no" >&5
7429echo "${ECHO_T}no" >&6
7430fi
7431
7432 RANLIB=$ac_ct_RANLIB
7433else
7434 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
7435fi
7436
343a6100
MM
7437case "${host}" in
7438*-*-darwin*)
7439 # By default, the Darwin ranlib will not treat common symbols as
7440 # definitions when building the archive table of contents. Other
7441 # ranlibs do that; pass an option to the Darwin ranlib that makes
7442 # it behave similarly.
7443 ranlib_flags="-c"
7444 ;;
7445*)
7446 ranlib_flags=""
7447esac
7448
7449
0a4b6309
RL
7450# Find a good install program. We prefer a C program (faster),
7451# so one script is as good as another. But avoid the broken or
7452# incompatible versions:
7453# SysV /etc/install, /usr/sbin/install
7454# SunOS /usr/etc/install
7455# IRIX /sbin/install
7456# AIX /bin/install
7457# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7458# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7459# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
7460echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7461echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 7462if test -z "$INSTALL"; then
ba479fd2
NN
7463if test "${ac_cv_path_install+set}" = set; then
7464 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7465else
7466 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7467 for ac_dir in $PATH; do
7468 # Account for people who put trailing slashes in PATH elements.
7469 case "$ac_dir/" in
7470 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7471 *)
7472 # OSF1 and SCO ODT 3.0 have their own names for install.
7473 for ac_prog in ginstall scoinst install; do
7474 if test -f $ac_dir/$ac_prog; then
7475 if test $ac_prog = install &&
7476 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7477 # AIX install. It has an incompatible calling convention.
7478 # OSF/1 installbsd also uses dspmsg, but is usable.
7479 :
7480 else
7481 ac_cv_path_install="$ac_dir/$ac_prog -c"
7482 break 2
7483 fi
7484 fi
7485 done
7486 ;;
7487 esac
7488 done
7489 IFS="$ac_save_IFS"
7490
7491fi
7492 if test "${ac_cv_path_install+set}" = set; then
7493 INSTALL="$ac_cv_path_install"
7494 else
7495 # As a last resort, use the slow shell script. We don't cache a
7496 # path for INSTALL within a source directory, because that will
7497 # break other packages using the cache if that directory is
7498 # removed, or if the path is relative.
7499 INSTALL="$ac_install_sh"
7500 fi
7501fi
ba479fd2
NN
7502echo "$as_me:$LINENO: result: $INSTALL" >&5
7503echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
7504
7505# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7506# It thinks the first close brace ends the variable substitution.
7507test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7508
7509test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7510
861bb6c1 7511
3a000df0 7512# See if cmp has --ignore-initial.
ba479fd2
NN
7513echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7514echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
7515if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7516 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
7517else
7518 echo abfoo >t1
7519 echo cdfoo >t2
269a7343 7520 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
7521 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7522 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 7523 :
3a000df0
KC
7524 else
7525 gcc_cv_prog_cmp_skip=gnucompare
7526 fi
269a7343
KG
7527 fi
7528 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7529 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7530 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7531 :
7532 else
7533 gcc_cv_prog_cmp_skip=fastcompare
7534 fi
7535 fi
3a000df0
KC
7536 fi
7537 rm t1 t2
7538
7539fi
ba479fd2
NN
7540echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7541echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
7542make_compare_target=$gcc_cv_prog_cmp_skip
7543
7544
7545
73458fb7
NN
7546# See if we have the mktemp command.
7547# Extract the first word of "mktemp", so it can be a program name with args.
7548set dummy mktemp; ac_word=$2
ba479fd2
NN
7549echo "$as_me:$LINENO: checking for $ac_word" >&5
7550echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7551if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7552 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7553else
7554 if test -n "$have_mktemp_command"; then
7555 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7556else
ba479fd2
NN
7557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7558for as_dir in $PATH
7559do
7560 IFS=$as_save_IFS
7561 test -z "$as_dir" && as_dir=.
7562 for ac_exec_ext in '' $ac_executable_extensions; do
7563 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7564 ac_cv_prog_have_mktemp_command="yes"
7565 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7566 break 2
7567 fi
7568done
7569done
7570
73458fb7
NN
7571 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7572fi
7573fi
ba479fd2 7574have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 7575if test -n "$have_mktemp_command"; then
ba479fd2
NN
7576 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7577echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 7578else
ba479fd2
NN
7579 echo "$as_me:$LINENO: result: no" >&5
7580echo "${ECHO_T}no" >&6
73458fb7
NN
7581fi
7582
7583
7c27e184
PB
7584MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
7585
7586# See if makeinfo has been installed and is modern enough
7587# that we can use it.
9f18db39
PB
7588
7589ac_executable_extensions="$build_exeext"
7590
7c27e184 7591# Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 7592set dummy makeinfo; ac_word=$2
ba479fd2
NN
7593echo "$as_me:$LINENO: checking for $ac_word" >&5
7594echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7595if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7596 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7597else
7598 if test -n "$MAKEINFO"; then
7599 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7600else
ba479fd2
NN
7601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7602for as_dir in $PATH
7603do
7604 IFS=$as_save_IFS
7605 test -z "$as_dir" && as_dir=.
7606 for ac_exec_ext in '' $ac_executable_extensions; do
7607 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7608 ac_cv_prog_MAKEINFO="makeinfo"
7609 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7610 break 2
7611 fi
7612done
7613done
7614
73458fb7
NN
7615fi
7616fi
ba479fd2 7617MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 7618if test -n "$MAKEINFO"; then
ba479fd2
NN
7619 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7620echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 7621else
ba479fd2
NN
7622 echo "$as_me:$LINENO: result: no" >&5
7623echo "${ECHO_T}no" >&6
73458fb7
NN
7624fi
7625
7626if test -n "$MAKEINFO"; then
7627 # Found it, now check the version.
ba479fd2
NN
7628 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7629echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
7630if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7631 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7632else
7633 ac_prog_version=`$MAKEINFO --version 2>&1 |
7634 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
18fc9bd4 7635 echo "configure:7635: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
7636 case $ac_prog_version in
7637 '') gcc_cv_prog_makeinfo_modern=no;;
1a598a97 7638 4.[4-9]*)
73458fb7
NN
7639 gcc_cv_prog_makeinfo_modern=yes;;
7640 *) gcc_cv_prog_makeinfo_modern=no;;
7641 esac
7642
7643fi
ba479fd2
NN
7644echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7645echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
7646else
7647 gcc_cv_prog_makeinfo_modern=no
7648fi
7649
73458fb7 7650if test $gcc_cv_prog_makeinfo_modern = no; then
7c27e184 7651 MAKEINFO="$MISSING makeinfo"
ba479fd2
NN
7652 { echo "$as_me:$LINENO: WARNING:
7653*** Makeinfo is missing or too old.
7654*** Info documentation will not be built." >&5
7655echo "$as_me: WARNING:
cafe096b 7656*** Makeinfo is missing or too old.
ba479fd2 7657*** Info documentation will not be built." >&2;}
73458fb7
NN
7658 BUILD_INFO=
7659else
ba479fd2 7660 BUILD_INFO=info
73458fb7
NN
7661fi
7662
7c27e184 7663
73458fb7 7664# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
7665echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7666echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 7667if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
7668 echo "$as_me:$LINENO: result: yes" >&5
7669echo "${ECHO_T}yes" >&6
7670 GENERATED_MANPAGES=generated-manpages
73458fb7 7671else
ba479fd2
NN
7672 echo "$as_me:$LINENO: result: no" >&5
7673echo "${ECHO_T}no" >&6
73458fb7
NN
7674 GENERATED_MANPAGES=
7675fi
7676
7c27e184 7677
73458fb7 7678# How about lex?
7c27e184
PB
7679for ac_prog in flex
7680do
7681 # Extract the first word of "$ac_prog", so it can be a program name with args.
7682set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7683echo "$as_me:$LINENO: checking for $ac_word" >&5
7684echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7685if test "${ac_cv_prog_FLEX+set}" = set; then
7686 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7687else
7688 if test -n "$FLEX"; then
7689 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7690else
ba479fd2
NN
7691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7692for as_dir in $PATH
7693do
7694 IFS=$as_save_IFS
7695 test -z "$as_dir" && as_dir=.
7696 for ac_exec_ext in '' $ac_executable_extensions; do
7697 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7698 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
7699 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7700 break 2
7701 fi
7702done
7703done
7704
73458fb7
NN
7705fi
7706fi
ba479fd2 7707FLEX=$ac_cv_prog_FLEX
73458fb7 7708if test -n "$FLEX"; then
ba479fd2
NN
7709 echo "$as_me:$LINENO: result: $FLEX" >&5
7710echo "${ECHO_T}$FLEX" >&6
73458fb7 7711else
ba479fd2
NN
7712 echo "$as_me:$LINENO: result: no" >&5
7713echo "${ECHO_T}no" >&6
73458fb7
NN
7714fi
7715
7c27e184
PB
7716 test -n "$FLEX" && break
7717done
7718test -n "$FLEX" || FLEX="$MISSING flex"
7719
73458fb7
NN
7720
7721# Bison?
7c27e184
PB
7722for ac_prog in bison
7723do
7724 # Extract the first word of "$ac_prog", so it can be a program name with args.
7725set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7726echo "$as_me:$LINENO: checking for $ac_word" >&5
7727echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7728if test "${ac_cv_prog_BISON+set}" = set; then
7729 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7730else
7731 if test -n "$BISON"; then
7732 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7733else
ba479fd2
NN
7734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7735for as_dir in $PATH
7736do
7737 IFS=$as_save_IFS
7738 test -z "$as_dir" && as_dir=.
7739 for ac_exec_ext in '' $ac_executable_extensions; do
7740 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7741 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
7742 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7743 break 2
7744 fi
7745done
7746done
7747
73458fb7
NN
7748fi
7749fi
ba479fd2 7750BISON=$ac_cv_prog_BISON
73458fb7 7751if test -n "$BISON"; then
ba479fd2
NN
7752 echo "$as_me:$LINENO: result: $BISON" >&5
7753echo "${ECHO_T}$BISON" >&6
73458fb7 7754else
ba479fd2
NN
7755 echo "$as_me:$LINENO: result: no" >&5
7756echo "${ECHO_T}no" >&6
73458fb7
NN
7757fi
7758
7c27e184
PB
7759 test -n "$BISON" && break
7760done
7761test -n "$BISON" || BISON="$MISSING bison"
7762
7763
7764# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7765# check for build == host before using them.
73458fb7 7766
f6a874ac 7767# NM
414adbdd
GK
7768if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7769 && test -d ../binutils ; then
f6a874ac
JW
7770 NM='$(objdir)/../binutils/nm-new'
7771else
7772 # Extract the first word of "nm", so it can be a program name with args.
7773set dummy nm; ac_word=$2
7774echo "$as_me:$LINENO: checking for $ac_word" >&5
7775echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7776if test "${ac_cv_prog_NM+set}" = set; then
7777 echo $ECHO_N "(cached) $ECHO_C" >&6
7778else
7779 if test -n "$NM"; then
7780 ac_cv_prog_NM="$NM" # Let the user override the test.
7781else
7782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7783for as_dir in $PATH
7784do
7785 IFS=$as_save_IFS
7786 test -z "$as_dir" && as_dir=.
7787 for ac_exec_ext in '' $ac_executable_extensions; do
7788 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7789 ac_cv_prog_NM="nm"
7790 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7791 break 2
7792 fi
7793done
7794done
7795
7796 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7797fi
7798fi
7799NM=$ac_cv_prog_NM
7800if test -n "$NM"; then
7801 echo "$as_me:$LINENO: result: $NM" >&5
7802echo "${ECHO_T}$NM" >&6
7803else
7804 echo "$as_me:$LINENO: result: no" >&5
7805echo "${ECHO_T}no" >&6
7806fi
7807
7808fi
7809
7810# AR
414adbdd
GK
7811if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7812 && test -d ../binutils ; then
f6a874ac
JW
7813 AR='$(objdir)/../binutils/ar'
7814else
7815 # Extract the first word of "ar", so it can be a program name with args.
7816set dummy ar; ac_word=$2
7817echo "$as_me:$LINENO: checking for $ac_word" >&5
7818echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7819if test "${ac_cv_prog_AR+set}" = set; then
7820 echo $ECHO_N "(cached) $ECHO_C" >&6
7821else
7822 if test -n "$AR"; then
7823 ac_cv_prog_AR="$AR" # Let the user override the test.
7824else
7825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7826for as_dir in $PATH
7827do
7828 IFS=$as_save_IFS
7829 test -z "$as_dir" && as_dir=.
7830 for ac_exec_ext in '' $ac_executable_extensions; do
7831 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7832 ac_cv_prog_AR="ar"
7833 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7834 break 2
7835 fi
7836done
7837done
7838
7839 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7840fi
7841fi
7842AR=$ac_cv_prog_AR
7843if test -n "$AR"; then
7844 echo "$as_me:$LINENO: result: $AR" >&5
7845echo "${ECHO_T}$AR" >&6
7846else
7847 echo "$as_me:$LINENO: result: no" >&5
7848echo "${ECHO_T}no" >&6
7849fi
7850
7851fi
7852
7853
73458fb7
NN
7854# --------------------
7855# Checks for C headers
7856# --------------------
7857
ba479fd2
NN
7858echo "$as_me:$LINENO: checking for GNU C library" >&5
7859echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
7860if test "${gcc_cv_glibc+set}" = set; then
7861 echo $ECHO_N "(cached) $ECHO_C" >&6
7862else
7863 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7864/* confdefs.h. */
7865_ACEOF
7866cat confdefs.h >>conftest.$ac_ext
7867cat >>conftest.$ac_ext <<_ACEOF
7868/* end confdefs.h. */
73458fb7 7869#include <features.h>
ba479fd2
NN
7870int
7871main ()
7872{
73458fb7
NN
7873
7874#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7875#error Not a GNU C library system
7876#endif
ba479fd2
NN
7877 ;
7878 return 0;
7879}
7880_ACEOF
7881rm -f conftest.$ac_objext
7882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7883 (eval $ac_compile) 2>conftest.er1
ba479fd2 7884 ac_status=$?
86da66b5
HPN
7885 grep -v '^ *+' conftest.er1 >conftest.err
7886 rm -f conftest.er1
7887 cat conftest.err >&5
ba479fd2
NN
7888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7889 (exit $ac_status); } &&
ec6c7392
PB
7890 { ac_try='test -z "$ac_c_werror_flag"
7891 || test ! -s conftest.err'
86da66b5
HPN
7892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7893 (eval $ac_try) 2>&5
7894 ac_status=$?
7895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7896 (exit $ac_status); }; } &&
7897 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7899 (eval $ac_try) 2>&5
7900 ac_status=$?
7901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7902 (exit $ac_status); }; }; then
73458fb7
NN
7903 gcc_cv_glibc=yes
7904else
ba479fd2
NN
7905 echo "$as_me: failed program was:" >&5
7906sed 's/^/| /' conftest.$ac_ext >&5
7907
7908gcc_cv_glibc=no
73458fb7 7909fi
86da66b5 7910rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
7911fi
7912
ba479fd2
NN
7913echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7914echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 7915if test $gcc_cv_glibc = yes; then
ba479fd2
NN
7916
7917cat >>confdefs.h <<\_ACEOF
73458fb7 7918#define _GNU_SOURCE 1
ba479fd2 7919_ACEOF
73458fb7
NN
7920
7921fi
7922
ca9bc441
NN
7923# Need to reject headers which give warnings, so that the -Werror bootstrap
7924# works later. *sigh* This needs to come before all header checks.
18fc9bd4 7925
ca9bc441
NN
7926ac_c_preproc_warn_flag=yes
7927
ba479fd2
NN
7928echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7929echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7930if test "${ac_cv_header_stdc+set}" = set; then
7931 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7932else
ba479fd2 7933 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7934/* confdefs.h. */
7935_ACEOF
7936cat confdefs.h >>conftest.$ac_ext
7937cat >>conftest.$ac_ext <<_ACEOF
7938/* end confdefs.h. */
956d6950
JL
7939#include <stdlib.h>
7940#include <stdarg.h>
7941#include <string.h>
7942#include <float.h>
ba479fd2
NN
7943
7944int
7945main ()
7946{
7947
7948 ;
7949 return 0;
7950}
7951_ACEOF
7952rm -f conftest.$ac_objext
7953if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7954 (eval $ac_compile) 2>conftest.er1
ba479fd2 7955 ac_status=$?
86da66b5
HPN
7956 grep -v '^ *+' conftest.er1 >conftest.err
7957 rm -f conftest.er1
7958 cat conftest.err >&5
ba479fd2
NN
7959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7960 (exit $ac_status); } &&
ec6c7392
PB
7961 { ac_try='test -z "$ac_c_werror_flag"
7962 || test ! -s conftest.err'
86da66b5
HPN
7963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7964 (eval $ac_try) 2>&5
7965 ac_status=$?
7966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7967 (exit $ac_status); }; } &&
7968 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7970 (eval $ac_try) 2>&5
7971 ac_status=$?
7972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7973 (exit $ac_status); }; }; then
956d6950
JL
7974 ac_cv_header_stdc=yes
7975else
ba479fd2
NN
7976 echo "$as_me: failed program was:" >&5
7977sed 's/^/| /' conftest.$ac_ext >&5
7978
7979ac_cv_header_stdc=no
956d6950 7980fi
86da66b5 7981rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
7982
7983if test $ac_cv_header_stdc = yes; then
7984 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 7985 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7986/* confdefs.h. */
7987_ACEOF
7988cat confdefs.h >>conftest.$ac_ext
7989cat >>conftest.$ac_ext <<_ACEOF
7990/* end confdefs.h. */
956d6950 7991#include <string.h>
ba479fd2
NN
7992
7993_ACEOF
956d6950 7994if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7995 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
7996 :
7997else
956d6950
JL
7998 ac_cv_header_stdc=no
7999fi
8000rm -f conftest*
8001
8002fi
8003
8004if test $ac_cv_header_stdc = yes; then
8005 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 8006 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8007/* confdefs.h. */
8008_ACEOF
8009cat confdefs.h >>conftest.$ac_ext
8010cat >>conftest.$ac_ext <<_ACEOF
8011/* end confdefs.h. */
956d6950 8012#include <stdlib.h>
ba479fd2
NN
8013
8014_ACEOF
956d6950 8015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8016 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
8017 :
8018else
956d6950
JL
8019 ac_cv_header_stdc=no
8020fi
8021rm -f conftest*
8022
8023fi
8024
8025if test $ac_cv_header_stdc = yes; then
8026 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 8027 if test "$cross_compiling" = yes; then
956d6950
JL
8028 :
8029else
ba479fd2 8030 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8031/* confdefs.h. */
8032_ACEOF
8033cat confdefs.h >>conftest.$ac_ext
8034cat >>conftest.$ac_ext <<_ACEOF
8035/* end confdefs.h. */
956d6950 8036#include <ctype.h>
ba479fd2
NN
8037#if ((' ' & 0x0FF) == 0x020)
8038# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8039# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8040#else
8041# define ISLOWER(c) \
86da66b5
HPN
8042 (('a' <= (c) && (c) <= 'i') \
8043 || ('j' <= (c) && (c) <= 'r') \
8044 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
8045# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8046#endif
63cf211a 8047
ba479fd2
NN
8048#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8049int
8050main ()
8051{
8052 int i;
8053 for (i = 0; i < 256; i++)
8054 if (XOR (islower (i), ISLOWER (i))
86da66b5 8055 || toupper (i) != TOUPPER (i))
ba479fd2
NN
8056 exit(2);
8057 exit (0);
8058}
8059_ACEOF
8060rm -f conftest$ac_exeext
8061if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8062 (eval $ac_link) 2>&5
8063 ac_status=$?
8064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8065 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8067 (eval $ac_try) 2>&5
8068 ac_status=$?
8069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8070 (exit $ac_status); }; }; then
956d6950
JL
8071 :
8072else
ba479fd2
NN
8073 echo "$as_me: program exited with status $ac_status" >&5
8074echo "$as_me: failed program was:" >&5
8075sed 's/^/| /' conftest.$ac_ext >&5
8076
8077( exit $ac_status )
8078ac_cv_header_stdc=no
956d6950 8079fi
86da66b5 8080rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 8081fi
956d6950
JL
8082fi
8083fi
ba479fd2
NN
8084echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8085echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 8086if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
8087
8088cat >>confdefs.h <<\_ACEOF
956d6950 8089#define STDC_HEADERS 1
ba479fd2 8090_ACEOF
956d6950
JL
8091
8092fi
8093
ba479fd2
NN
8094echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
8095echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
8096if test "${ac_cv_header_time+set}" = set; then
8097 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8098else
ba479fd2 8099 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8100/* confdefs.h. */
8101_ACEOF
8102cat confdefs.h >>conftest.$ac_ext
8103cat >>conftest.$ac_ext <<_ACEOF
8104/* end confdefs.h. */
956d6950
JL
8105#include <sys/types.h>
8106#include <sys/time.h>
8107#include <time.h>
ba479fd2
NN
8108
8109int
8110main ()
8111{
8112if ((struct tm *) 0)
8113return 0;
8114 ;
8115 return 0;
8116}
8117_ACEOF
8118rm -f conftest.$ac_objext
8119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8120 (eval $ac_compile) 2>conftest.er1
ba479fd2 8121 ac_status=$?
86da66b5
HPN
8122 grep -v '^ *+' conftest.er1 >conftest.err
8123 rm -f conftest.er1
8124 cat conftest.err >&5
ba479fd2
NN
8125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8126 (exit $ac_status); } &&
ec6c7392
PB
8127 { ac_try='test -z "$ac_c_werror_flag"
8128 || test ! -s conftest.err'
86da66b5
HPN
8129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8130 (eval $ac_try) 2>&5
8131 ac_status=$?
8132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8133 (exit $ac_status); }; } &&
8134 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8136 (eval $ac_try) 2>&5
8137 ac_status=$?
8138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8139 (exit $ac_status); }; }; then
956d6950
JL
8140 ac_cv_header_time=yes
8141else
ba479fd2
NN
8142 echo "$as_me: failed program was:" >&5
8143sed 's/^/| /' conftest.$ac_ext >&5
8144
8145ac_cv_header_time=no
956d6950 8146fi
86da66b5 8147rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 8148fi
ba479fd2
NN
8149echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
8150echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 8151if test $ac_cv_header_time = yes; then
ba479fd2
NN
8152
8153cat >>confdefs.h <<\_ACEOF
956d6950 8154#define TIME_WITH_SYS_TIME 1
ba479fd2 8155_ACEOF
956d6950
JL
8156
8157fi
8158
18fc9bd4
RG
8159echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
8160echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
8161if test "${gcc_cv_header_string+set}" = set; then
8162 echo $ECHO_N "(cached) $ECHO_C" >&6
8163else
8164 cat >conftest.$ac_ext <<_ACEOF
8165/* confdefs.h. */
8166_ACEOF
8167cat confdefs.h >>conftest.$ac_ext
8168cat >>conftest.$ac_ext <<_ACEOF
8169/* end confdefs.h. */
8170#include <string.h>
8171#include <strings.h>
8172int
8173main ()
8174{
8175
8176 ;
8177 return 0;
8178}
8179_ACEOF
8180rm -f conftest.$ac_objext
8181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8182 (eval $ac_compile) 2>conftest.er1
8183 ac_status=$?
8184 grep -v '^ *+' conftest.er1 >conftest.err
8185 rm -f conftest.er1
8186 cat conftest.err >&5
8187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8188 (exit $ac_status); } &&
8189 { ac_try='test -z "$ac_c_werror_flag"
8190 || test ! -s conftest.err'
8191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8192 (eval $ac_try) 2>&5
8193 ac_status=$?
8194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8195 (exit $ac_status); }; } &&
8196 { ac_try='test -s conftest.$ac_objext'
8197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8198 (eval $ac_try) 2>&5
8199 ac_status=$?
8200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8201 (exit $ac_status); }; }; then
8202 gcc_cv_header_string=yes
8203else
8204 echo "$as_me: failed program was:" >&5
8205sed 's/^/| /' conftest.$ac_ext >&5
8206
8207gcc_cv_header_string=no
8208fi
8209rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8210fi
8211echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
8212echo "${ECHO_T}$gcc_cv_header_string" >&6
8213if test $gcc_cv_header_string = yes; then
8214
8215cat >>confdefs.h <<\_ACEOF
8216#define STRING_WITH_STRINGS 1
8217_ACEOF
8218
8219fi
8220
ba479fd2
NN
8221echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
8222echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
8223if test "${ac_cv_header_sys_wait_h+set}" = set; then
8224 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 8225else
ba479fd2 8226 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8227/* confdefs.h. */
8228_ACEOF
8229cat confdefs.h >>conftest.$ac_ext
8230cat >>conftest.$ac_ext <<_ACEOF
8231/* end confdefs.h. */
e9831ca0
KG
8232#include <sys/types.h>
8233#include <sys/wait.h>
8234#ifndef WEXITSTATUS
ba479fd2 8235# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
8236#endif
8237#ifndef WIFEXITED
ba479fd2 8238# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 8239#endif
ba479fd2
NN
8240
8241int
8242main ()
8243{
8244 int s;
8245 wait (&s);
8246 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8247 ;
8248 return 0;
8249}
8250_ACEOF
8251rm -f conftest.$ac_objext
8252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8253 (eval $ac_compile) 2>conftest.er1
ba479fd2 8254 ac_status=$?
86da66b5
HPN
8255 grep -v '^ *+' conftest.er1 >conftest.err
8256 rm -f conftest.er1
8257 cat conftest.err >&5
ba479fd2
NN
8258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8259 (exit $ac_status); } &&
ec6c7392
PB
8260 { ac_try='test -z "$ac_c_werror_flag"
8261 || test ! -s conftest.err'
86da66b5
HPN
8262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8263 (eval $ac_try) 2>&5
8264 ac_status=$?
8265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8266 (exit $ac_status); }; } &&
8267 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8269 (eval $ac_try) 2>&5
8270 ac_status=$?
8271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8272 (exit $ac_status); }; }; then
e9831ca0
KG
8273 ac_cv_header_sys_wait_h=yes
8274else
ba479fd2
NN
8275 echo "$as_me: failed program was:" >&5
8276sed 's/^/| /' conftest.$ac_ext >&5
8277
8278ac_cv_header_sys_wait_h=no
e9831ca0 8279fi
86da66b5 8280rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 8281fi
ba479fd2
NN
8282echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8283echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 8284if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
8285
8286cat >>confdefs.h <<\_ACEOF
e9831ca0 8287#define HAVE_SYS_WAIT_H 1
ba479fd2 8288_ACEOF
6e3f3080 8289
63cf211a 8290fi
6e3f3080 8291
ba479fd2
NN
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
dfb77e37
KC
8313
8314for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 8315 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 8316 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 8317 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 8318do
ba479fd2 8319as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18fc9bd4 8320echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
8321echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8322if eval "test \"\${$as_ac_Header+set}\" = set"; then
8323 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8324else
18fc9bd4 8325 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8326/* confdefs.h. */
8327_ACEOF
8328cat confdefs.h >>conftest.$ac_ext
8329cat >>conftest.$ac_ext <<_ACEOF
8330/* end confdefs.h. */
8331#include <$ac_header>
8332_ACEOF
8333if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8334 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8335 ac_status=$?
8336 grep -v '^ *+' conftest.er1 >conftest.err
8337 rm -f conftest.er1
8338 cat conftest.err >&5
8339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8340 (exit $ac_status); } >/dev/null; then
8341 if test -s conftest.err; then
8342 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8343 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8344 else
8345 ac_cpp_err=
8346 fi
8347else
8348 ac_cpp_err=yes
8349fi
8350if test -z "$ac_cpp_err"; then
18fc9bd4 8351 eval "$as_ac_Header=yes"
ba479fd2
NN
8352else
8353 echo "$as_me: failed program was:" >&5
8354sed 's/^/| /' conftest.$ac_ext >&5
8355
18fc9bd4 8356 eval "$as_ac_Header=no"
ba479fd2
NN
8357fi
8358rm -f conftest.err conftest.$ac_ext
6e3f3080 8359fi
ba479fd2
NN
8360echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8361echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
8362if test `eval echo '${'$as_ac_Header'}'` = yes; then
8363 cat >>confdefs.h <<_ACEOF
8364#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8365_ACEOF
8366
956d6950
JL
8367fi
8368done
8369
8370
f24af81b 8371# Check for thread headers.
18fc9bd4 8372echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
8373echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
8374if test "${ac_cv_header_thread_h+set}" = set; then
8375 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8376else
18fc9bd4 8377 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8378/* confdefs.h. */
8379_ACEOF
8380cat confdefs.h >>conftest.$ac_ext
8381cat >>conftest.$ac_ext <<_ACEOF
8382/* end confdefs.h. */
8383#include <thread.h>
8384_ACEOF
8385if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8386 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8387 ac_status=$?
8388 grep -v '^ *+' conftest.er1 >conftest.err
8389 rm -f conftest.er1
8390 cat conftest.err >&5
8391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8392 (exit $ac_status); } >/dev/null; then
8393 if test -s conftest.err; then
8394 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8395 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8396 else
8397 ac_cpp_err=
8398 fi
8399else
8400 ac_cpp_err=yes
8401fi
8402if test -z "$ac_cpp_err"; then
18fc9bd4 8403 ac_cv_header_thread_h=yes
ba479fd2
NN
8404else
8405 echo "$as_me: failed program was:" >&5
8406sed 's/^/| /' conftest.$ac_ext >&5
8407
18fc9bd4 8408 ac_cv_header_thread_h=no
ba479fd2
NN
8409fi
8410rm -f conftest.err conftest.$ac_ext
6e3f3080 8411fi
ba479fd2
NN
8412echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8413echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 8414if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
8415 have_thread_h=yes
8416else
ba479fd2 8417 have_thread_h=
f24af81b
TT
8418fi
8419
18fc9bd4 8420echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
8421echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8422if test "${ac_cv_header_pthread_h+set}" = set; then
8423 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 8424else
18fc9bd4 8425 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8426/* confdefs.h. */
8427_ACEOF
8428cat confdefs.h >>conftest.$ac_ext
8429cat >>conftest.$ac_ext <<_ACEOF
8430/* end confdefs.h. */
8431#include <pthread.h>
8432_ACEOF
8433if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8434 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8435 ac_status=$?
8436 grep -v '^ *+' conftest.er1 >conftest.err
8437 rm -f conftest.er1
8438 cat conftest.err >&5
8439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8440 (exit $ac_status); } >/dev/null; then
8441 if test -s conftest.err; then
8442 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8443 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8444 else
8445 ac_cpp_err=
8446 fi
8447else
8448 ac_cpp_err=yes
8449fi
18fc9bd4
RG
8450if test -z "$ac_cpp_err"; then
8451 ac_cv_header_pthread_h=yes
ba479fd2 8452else
18fc9bd4
RG
8453 echo "$as_me: failed program was:" >&5
8454sed 's/^/| /' conftest.$ac_ext >&5
8455
8456 ac_cv_header_pthread_h=no
8457fi
8458rm -f conftest.err conftest.$ac_ext
6e3f3080 8459fi
ba479fd2
NN
8460echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8461echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 8462if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
8463 have_pthread_h=yes
8464else
ba479fd2 8465 have_pthread_h=
f24af81b
TT
8466fi
8467
8468
84c041a1 8469# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
8470echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8471echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
8472if test "${gcc_cv_decl_char_bit+set}" = set; then
8473 echo $ECHO_N "(cached) $ECHO_C" >&6
8474else
8475 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8476/* confdefs.h. */
8477_ACEOF
8478cat confdefs.h >>conftest.$ac_ext
8479cat >>conftest.$ac_ext <<_ACEOF
8480/* end confdefs.h. */
75e93faa
ZW
8481#ifdef HAVE_LIMITS_H
8482#include <limits.h>
8483#endif
8484#ifdef CHAR_BIT
8485found
8486#endif
ba479fd2 8487_ACEOF
75e93faa 8488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8489 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
8490 gcc_cv_decl_char_bit=yes
8491else
75e93faa
ZW
8492 gcc_cv_decl_char_bit=no
8493fi
8494rm -f conftest*
8495
8496
8497fi
ba479fd2
NN
8498echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8499echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 8500if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
8501 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8502echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
8503if test "${gcc_cv_c_nbby+set}" = set; then
8504 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
8505else
8506 i=8
8507 gcc_cv_c_nbby=
8508 while test $i -lt 65; do
ba479fd2 8509 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8510/* confdefs.h. */
8511_ACEOF
8512cat confdefs.h >>conftest.$ac_ext
8513cat >>conftest.$ac_ext <<_ACEOF
8514/* end confdefs.h. */
8515
8516int
8517main ()
8518{
4e70264f
ZW
8519switch(0) {
8520 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8521 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8522 ; }
ba479fd2
NN
8523 ;
8524 return 0;
8525}
8526_ACEOF
8527rm -f conftest.$ac_objext
8528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8529 (eval $ac_compile) 2>conftest.er1
ba479fd2 8530 ac_status=$?
86da66b5
HPN
8531 grep -v '^ *+' conftest.er1 >conftest.err
8532 rm -f conftest.er1
8533 cat conftest.err >&5
ba479fd2
NN
8534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8535 (exit $ac_status); } &&
ec6c7392
PB
8536 { ac_try='test -z "$ac_c_werror_flag"
8537 || test ! -s conftest.err'
86da66b5
HPN
8538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8539 (eval $ac_try) 2>&5
8540 ac_status=$?
8541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8542 (exit $ac_status); }; } &&
8543 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8545 (eval $ac_try) 2>&5
8546 ac_status=$?
8547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8548 (exit $ac_status); }; }; then
4e70264f 8549 gcc_cv_c_nbby=$i; break
75e93faa 8550else
ba479fd2
NN
8551 echo "$as_me: failed program was:" >&5
8552sed 's/^/| /' conftest.$ac_ext >&5
8553
75e93faa 8554fi
86da66b5 8555rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
8556 i=`expr $i + 1`
8557 done
8558 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8559
8560fi
ba479fd2
NN
8561echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8562echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 8563if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
8564 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8565echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8566 { (exit 1); exit 1; }; }
75e93faa 8567else
ba479fd2
NN
8568
8569cat >>confdefs.h <<_ACEOF
75e93faa 8570#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 8571_ACEOF
75e93faa
ZW
8572
8573fi
8574fi
ba479fd2
NN
8575echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8576echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
8577if test "${ac_cv_c_bigendian+set}" = set; then
8578 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 8579else
9791c75c 8580 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 8581cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8582/* confdefs.h. */
8583_ACEOF
8584cat confdefs.h >>conftest.$ac_ext
8585cat >>conftest.$ac_ext <<_ACEOF
8586/* end confdefs.h. */
4977bab6
ZW
8587#include <sys/types.h>
8588#include <sys/param.h>
9791c75c 8589
ba479fd2
NN
8590int
8591main ()
8592{
4977bab6
ZW
8593#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8594 bogus endian macros
84c041a1 8595#endif
9791c75c 8596
ba479fd2
NN
8597 ;
8598 return 0;
8599}
8600_ACEOF
8601rm -f conftest.$ac_objext
8602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8603 (eval $ac_compile) 2>conftest.er1
ba479fd2 8604 ac_status=$?
86da66b5
HPN
8605 grep -v '^ *+' conftest.er1 >conftest.err
8606 rm -f conftest.er1
8607 cat conftest.err >&5
ba479fd2
NN
8608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8609 (exit $ac_status); } &&
ec6c7392
PB
8610 { ac_try='test -z "$ac_c_werror_flag"
8611 || test ! -s conftest.err'
86da66b5
HPN
8612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8613 (eval $ac_try) 2>&5
8614 ac_status=$?
8615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8616 (exit $ac_status); }; } &&
8617 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8619 (eval $ac_try) 2>&5
8620 ac_status=$?
8621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8622 (exit $ac_status); }; }; then
4977bab6 8623 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 8624cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8625/* confdefs.h. */
8626_ACEOF
8627cat confdefs.h >>conftest.$ac_ext
8628cat >>conftest.$ac_ext <<_ACEOF
8629/* end confdefs.h. */
4977bab6
ZW
8630#include <sys/types.h>
8631#include <sys/param.h>
9791c75c 8632
ba479fd2
NN
8633int
8634main ()
8635{
4977bab6
ZW
8636#if BYTE_ORDER != BIG_ENDIAN
8637 not big endian
84c041a1 8638#endif
9791c75c 8639
ba479fd2
NN
8640 ;
8641 return 0;
8642}
8643_ACEOF
8644rm -f conftest.$ac_objext
8645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8646 (eval $ac_compile) 2>conftest.er1
ba479fd2 8647 ac_status=$?
86da66b5
HPN
8648 grep -v '^ *+' conftest.er1 >conftest.err
8649 rm -f conftest.er1
8650 cat conftest.err >&5
ba479fd2
NN
8651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8652 (exit $ac_status); } &&
ec6c7392
PB
8653 { ac_try='test -z "$ac_c_werror_flag"
8654 || test ! -s conftest.err'
86da66b5
HPN
8655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8656 (eval $ac_try) 2>&5
8657 ac_status=$?
8658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8659 (exit $ac_status); }; } &&
8660 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8662 (eval $ac_try) 2>&5
8663 ac_status=$?
8664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8665 (exit $ac_status); }; }; then
4977bab6
ZW
8666 ac_cv_c_bigendian=yes
8667else
ba479fd2
NN
8668 echo "$as_me: failed program was:" >&5
8669sed 's/^/| /' conftest.$ac_ext >&5
8670
8671ac_cv_c_bigendian=no
4977bab6 8672fi
86da66b5 8673rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8674else
ba479fd2
NN
8675 echo "$as_me: failed program was:" >&5
8676sed 's/^/| /' conftest.$ac_ext >&5
8677
9791c75c
KC
8678# It does not; compile a test program.
8679if test "$cross_compiling" = yes; then
8680 # try to guess the endianness by grepping values into an object file
8681 ac_cv_c_bigendian=unknown
8682 cat >conftest.$ac_ext <<_ACEOF
8683/* confdefs.h. */
8684_ACEOF
8685cat confdefs.h >>conftest.$ac_ext
8686cat >>conftest.$ac_ext <<_ACEOF
8687/* end confdefs.h. */
8688short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8689short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8690void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
8691short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8692short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8693void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
8694int
8695main ()
8696{
8697 _ascii (); _ebcdic ();
8698 ;
8699 return 0;
8700}
8701_ACEOF
8702rm -f conftest.$ac_objext
8703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8704 (eval $ac_compile) 2>conftest.er1
8705 ac_status=$?
8706 grep -v '^ *+' conftest.er1 >conftest.err
8707 rm -f conftest.er1
8708 cat conftest.err >&5
8709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8710 (exit $ac_status); } &&
ec6c7392
PB
8711 { ac_try='test -z "$ac_c_werror_flag"
8712 || test ! -s conftest.err'
9791c75c
KC
8713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8714 (eval $ac_try) 2>&5
8715 ac_status=$?
8716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8717 (exit $ac_status); }; } &&
8718 { ac_try='test -s conftest.$ac_objext'
8719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8720 (eval $ac_try) 2>&5
8721 ac_status=$?
8722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8723 (exit $ac_status); }; }; then
8724 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
8725 ac_cv_c_bigendian=yes
8726fi
8727if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8728 if test "$ac_cv_c_bigendian" = unknown; then
8729 ac_cv_c_bigendian=no
8730 else
8731 # finding both strings is unlikely to happen, but who knows?
8732 ac_cv_c_bigendian=unknown
8733 fi
8734fi
8735else
8736 echo "$as_me: failed program was:" >&5
8737sed 's/^/| /' conftest.$ac_ext >&5
8738
4977bab6 8739fi
86da66b5 8740rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
8741else
8742 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8743/* confdefs.h. */
8744_ACEOF
8745cat confdefs.h >>conftest.$ac_ext
8746cat >>conftest.$ac_ext <<_ACEOF
8747/* end confdefs.h. */
9791c75c
KC
8748int
8749main ()
8750{
4977bab6
ZW
8751 /* Are we little or big endian? From Harbison&Steele. */
8752 union
8753 {
8754 long l;
8755 char c[sizeof (long)];
8756 } u;
8757 u.l = 1;
8758 exit (u.c[sizeof (long) - 1] == 1);
8759}
ba479fd2
NN
8760_ACEOF
8761rm -f conftest$ac_exeext
8762if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8763 (eval $ac_link) 2>&5
8764 ac_status=$?
8765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8766 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8768 (eval $ac_try) 2>&5
8769 ac_status=$?
8770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8771 (exit $ac_status); }; }; then
4977bab6
ZW
8772 ac_cv_c_bigendian=no
8773else
ba479fd2
NN
8774 echo "$as_me: program exited with status $ac_status" >&5
8775echo "$as_me: failed program was:" >&5
8776sed 's/^/| /' conftest.$ac_ext >&5
8777
8778( exit $ac_status )
8779ac_cv_c_bigendian=yes
4977bab6 8780fi
86da66b5 8781rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 8782fi
4977bab6 8783fi
9791c75c 8784rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8785fi
ba479fd2
NN
8786echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8787echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
8788case $ac_cv_c_bigendian in
8789 yes)
ba479fd2
NN
8790
8791cat >>confdefs.h <<\_ACEOF
4977bab6 8792#define WORDS_BIGENDIAN 1
ba479fd2 8793_ACEOF
9791c75c
KC
8794 ;;
8795 no)
8796 ;;
8797 *)
8798 { { echo "$as_me:$LINENO: error: unknown endianness
8799presetting ac_cv_c_bigendian=no (or yes) will help" >&5
8800echo "$as_me: error: unknown endianness
8801presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
8802 { (exit 1); exit 1; }; } ;;
8803esac
84c041a1 8804
75e93faa 8805
73458fb7
NN
8806# --------
8807# UNSORTED
8808# --------
1e608388 8809
73458fb7
NN
8810# Stage specific cflags for build.
8811stage1_cflags=
8812case $build in
8813vax-*-*)
8814 if test x$GCC = xyes
8815 then
8816 stage1_cflags="-Wa,-J"
8817 else
8818 stage1_cflags="-J"
8819 fi
8820 ;;
8821powerpc-*-darwin*)
8822 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
8823 # sources; use -no-cpp-precomp to get to GNU cpp.
8824 # Apple's GCC has bugs in designated initializer handling, so disable
8825 # that too.
8826 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
8827 ;;
8828esac
1e608388 8829
1e608388 8830
4e70264f
ZW
8831# These libraries may be used by collect2.
8832# We may need a special search path to get them linked.
ba479fd2
NN
8833echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8834echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
8835if test "${gcc_cv_collect2_libs+set}" = set; then
8836 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
8837else
8838 save_LIBS="$LIBS"
7f2749d4 8839for libs in '' -lld -lmld \
4e70264f
ZW
8840 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8841 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8842do
8843 LIBS="$libs"
ba479fd2 8844 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8845/* confdefs.h. */
8846_ACEOF
8847cat confdefs.h >>conftest.$ac_ext
8848cat >>conftest.$ac_ext <<_ACEOF
8849/* end confdefs.h. */
8850
4e70264f 8851/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8852#ifdef __cplusplus
8853extern "C"
8854#endif
4e70264f 8855/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8856 builtin and then its argument prototype would still apply. */
8857char ldopen ();
8858int
8859main ()
8860{
8861ldopen ();
8862 ;
8863 return 0;
8864}
8865_ACEOF
8866rm -f conftest.$ac_objext conftest$ac_exeext
8867if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8868 (eval $ac_link) 2>conftest.er1
ba479fd2 8869 ac_status=$?
86da66b5
HPN
8870 grep -v '^ *+' conftest.er1 >conftest.err
8871 rm -f conftest.er1
8872 cat conftest.err >&5
ba479fd2
NN
8873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8874 (exit $ac_status); } &&
ec6c7392
PB
8875 { ac_try='test -z "$ac_c_werror_flag"
8876 || test ! -s conftest.err'
86da66b5
HPN
8877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8878 (eval $ac_try) 2>&5
8879 ac_status=$?
8880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8881 (exit $ac_status); }; } &&
8882 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8884 (eval $ac_try) 2>&5
8885 ac_status=$?
8886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8887 (exit $ac_status); }; }; then
4e70264f
ZW
8888 gcc_cv_collect2_libs="$libs"; break
8889else
ba479fd2
NN
8890 echo "$as_me: failed program was:" >&5
8891sed 's/^/| /' conftest.$ac_ext >&5
8892
4e70264f 8893fi
86da66b5
HPN
8894rm -f conftest.err conftest.$ac_objext \
8895 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8896done
8897LIBS="$save_LIBS"
8898test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8899fi
ba479fd2
NN
8900echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8901echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
8902case $gcc_cv_collect2_libs in
8903 "none required") ;;
8904 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8905esac
8906
8907
7f2749d4
RK
8908# When building Ada code on Alpha, we need exc_resume which is usually in
8909# -lexc. So test for it.
8910save_LIBS="$LIBS"
8911LIBS=
ba479fd2
NN
8912echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8913echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
8914if test "${ac_cv_search_exc_resume+set}" = set; then
8915 echo $ECHO_N "(cached) $ECHO_C" >&6
8916else
8917 ac_func_search_save_LIBS=$LIBS
8918ac_cv_search_exc_resume=no
8919cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8920/* confdefs.h. */
8921_ACEOF
8922cat confdefs.h >>conftest.$ac_ext
8923cat >>conftest.$ac_ext <<_ACEOF
8924/* end confdefs.h. */
7f2749d4 8925
7f2749d4 8926/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8927#ifdef __cplusplus
8928extern "C"
8929#endif
7f2749d4 8930/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8931 builtin and then its argument prototype would still apply. */
8932char exc_resume ();
8933int
8934main ()
8935{
8936exc_resume ();
8937 ;
8938 return 0;
8939}
8940_ACEOF
8941rm -f conftest.$ac_objext conftest$ac_exeext
8942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8943 (eval $ac_link) 2>conftest.er1
ba479fd2 8944 ac_status=$?
86da66b5
HPN
8945 grep -v '^ *+' conftest.er1 >conftest.err
8946 rm -f conftest.er1
8947 cat conftest.err >&5
ba479fd2
NN
8948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8949 (exit $ac_status); } &&
ec6c7392
PB
8950 { ac_try='test -z "$ac_c_werror_flag"
8951 || test ! -s conftest.err'
86da66b5
HPN
8952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8953 (eval $ac_try) 2>&5
8954 ac_status=$?
8955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8956 (exit $ac_status); }; } &&
8957 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8959 (eval $ac_try) 2>&5
8960 ac_status=$?
8961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8962 (exit $ac_status); }; }; then
7f2749d4
RK
8963 ac_cv_search_exc_resume="none required"
8964else
ba479fd2
NN
8965 echo "$as_me: failed program was:" >&5
8966sed 's/^/| /' conftest.$ac_ext >&5
8967
7f2749d4 8968fi
86da66b5
HPN
8969rm -f conftest.err conftest.$ac_objext \
8970 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8971if test "$ac_cv_search_exc_resume" = no; then
8972 for ac_lib in exc; do
8973 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8974 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8975/* confdefs.h. */
8976_ACEOF
8977cat confdefs.h >>conftest.$ac_ext
8978cat >>conftest.$ac_ext <<_ACEOF
8979/* end confdefs.h. */
8980
7f2749d4 8981/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8982#ifdef __cplusplus
8983extern "C"
8984#endif
7f2749d4 8985/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8986 builtin and then its argument prototype would still apply. */
8987char exc_resume ();
8988int
8989main ()
8990{
8991exc_resume ();
8992 ;
8993 return 0;
8994}
8995_ACEOF
8996rm -f conftest.$ac_objext conftest$ac_exeext
8997if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8998 (eval $ac_link) 2>conftest.er1
ba479fd2 8999 ac_status=$?
86da66b5
HPN
9000 grep -v '^ *+' conftest.er1 >conftest.err
9001 rm -f conftest.er1
9002 cat conftest.err >&5
ba479fd2
NN
9003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9004 (exit $ac_status); } &&
ec6c7392
PB
9005 { ac_try='test -z "$ac_c_werror_flag"
9006 || test ! -s conftest.err'
86da66b5
HPN
9007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9008 (eval $ac_try) 2>&5
9009 ac_status=$?
9010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9011 (exit $ac_status); }; } &&
9012 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9014 (eval $ac_try) 2>&5
9015 ac_status=$?
9016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9017 (exit $ac_status); }; }; then
9018 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
9019break
9020else
ba479fd2
NN
9021 echo "$as_me: failed program was:" >&5
9022sed 's/^/| /' conftest.$ac_ext >&5
9023
cafe096b 9024fi
86da66b5
HPN
9025rm -f conftest.err conftest.$ac_objext \
9026 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9027 done
6e3f3080 9028fi
ba479fd2
NN
9029LIBS=$ac_func_search_save_LIBS
9030fi
9031echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
9032echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
9033if test "$ac_cv_search_exc_resume" != no; then
63cf211a 9034 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 9035
7f2749d4 9036fi
ba479fd2 9037
7f2749d4
RK
9038GNAT_LIBEXC="$LIBS"
9039LIBS="$save_LIBS"
9040
9041
62c9aa5f
ZW
9042# Some systems put ldexp and frexp in libm instead of libc; assume
9043# they're both in the same place. jcf-dump needs them.
9044save_LIBS="$LIBS"
9045LIBS=
ba479fd2
NN
9046echo "$as_me:$LINENO: checking for library containing ldexp" >&5
9047echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
9048if test "${ac_cv_search_ldexp+set}" = set; then
9049 echo $ECHO_N "(cached) $ECHO_C" >&6
9050else
9051 ac_func_search_save_LIBS=$LIBS
9052ac_cv_search_ldexp=no
9053cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9054/* confdefs.h. */
9055_ACEOF
9056cat confdefs.h >>conftest.$ac_ext
9057cat >>conftest.$ac_ext <<_ACEOF
9058/* end confdefs.h. */
62c9aa5f 9059
62c9aa5f 9060/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9061#ifdef __cplusplus
9062extern "C"
9063#endif
62c9aa5f 9064/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9065 builtin and then its argument prototype would still apply. */
9066char ldexp ();
9067int
9068main ()
9069{
9070ldexp ();
9071 ;
9072 return 0;
9073}
9074_ACEOF
9075rm -f conftest.$ac_objext conftest$ac_exeext
9076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9077 (eval $ac_link) 2>conftest.er1
ba479fd2 9078 ac_status=$?
86da66b5
HPN
9079 grep -v '^ *+' conftest.er1 >conftest.err
9080 rm -f conftest.er1
9081 cat conftest.err >&5
ba479fd2
NN
9082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9083 (exit $ac_status); } &&
ec6c7392
PB
9084 { ac_try='test -z "$ac_c_werror_flag"
9085 || test ! -s conftest.err'
86da66b5
HPN
9086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9087 (eval $ac_try) 2>&5
9088 ac_status=$?
9089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9090 (exit $ac_status); }; } &&
9091 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9093 (eval $ac_try) 2>&5
9094 ac_status=$?
9095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9096 (exit $ac_status); }; }; then
62c9aa5f
ZW
9097 ac_cv_search_ldexp="none required"
9098else
ba479fd2
NN
9099 echo "$as_me: failed program was:" >&5
9100sed 's/^/| /' conftest.$ac_ext >&5
9101
62c9aa5f 9102fi
86da66b5
HPN
9103rm -f conftest.err conftest.$ac_objext \
9104 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9105if test "$ac_cv_search_ldexp" = no; then
9106 for ac_lib in m; do
9107 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9108 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9109/* confdefs.h. */
9110_ACEOF
9111cat confdefs.h >>conftest.$ac_ext
9112cat >>conftest.$ac_ext <<_ACEOF
9113/* end confdefs.h. */
9114
62c9aa5f 9115/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9116#ifdef __cplusplus
9117extern "C"
9118#endif
62c9aa5f 9119/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9120 builtin and then its argument prototype would still apply. */
9121char ldexp ();
9122int
9123main ()
9124{
9125ldexp ();
9126 ;
9127 return 0;
9128}
9129_ACEOF
9130rm -f conftest.$ac_objext conftest$ac_exeext
9131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9132 (eval $ac_link) 2>conftest.er1
ba479fd2 9133 ac_status=$?
86da66b5
HPN
9134 grep -v '^ *+' conftest.er1 >conftest.err
9135 rm -f conftest.er1
9136 cat conftest.err >&5
ba479fd2
NN
9137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9138 (exit $ac_status); } &&
ec6c7392
PB
9139 { ac_try='test -z "$ac_c_werror_flag"
9140 || test ! -s conftest.err'
86da66b5
HPN
9141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9142 (eval $ac_try) 2>&5
9143 ac_status=$?
9144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9145 (exit $ac_status); }; } &&
9146 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9148 (eval $ac_try) 2>&5
9149 ac_status=$?
9150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9151 (exit $ac_status); }; }; then
9152 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
9153break
9154else
ba479fd2
NN
9155 echo "$as_me: failed program was:" >&5
9156sed 's/^/| /' conftest.$ac_ext >&5
9157
cafe096b 9158fi
86da66b5
HPN
9159rm -f conftest.err conftest.$ac_objext \
9160 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9161 done
6e3f3080 9162fi
ba479fd2
NN
9163LIBS=$ac_func_search_save_LIBS
9164fi
9165echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
9166echo "${ECHO_T}$ac_cv_search_ldexp" >&6
9167if test "$ac_cv_search_ldexp" != no; then
63cf211a 9168 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 9169
62c9aa5f 9170fi
ba479fd2 9171
62c9aa5f
ZW
9172LDEXP_LIB="$LIBS"
9173LIBS="$save_LIBS"
9174
9175
956d6950
JL
9176# Use <inttypes.h> only if it exists,
9177# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
9178echo "$as_me:$LINENO: checking for inttypes.h" >&5
9179echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
9180if test "${gcc_cv_header_inttypes_h+set}" = set; then
9181 echo $ECHO_N "(cached) $ECHO_C" >&6
9182else
9183 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9184/* confdefs.h. */
9185_ACEOF
9186cat confdefs.h >>conftest.$ac_ext
9187cat >>conftest.$ac_ext <<_ACEOF
9188/* end confdefs.h. */
956d6950
JL
9189#include <sys/types.h>
9190#include <inttypes.h>
ba479fd2
NN
9191int
9192main ()
9193{
956d6950 9194intmax_t i = -1;
ba479fd2
NN
9195 ;
9196 return 0;
9197}
9198_ACEOF
9199rm -f conftest.$ac_objext
9200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9201 (eval $ac_compile) 2>conftest.er1
ba479fd2 9202 ac_status=$?
86da66b5
HPN
9203 grep -v '^ *+' conftest.er1 >conftest.err
9204 rm -f conftest.er1
9205 cat conftest.err >&5
ba479fd2
NN
9206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9207 (exit $ac_status); } &&
ec6c7392
PB
9208 { ac_try='test -z "$ac_c_werror_flag"
9209 || test ! -s conftest.err'
86da66b5
HPN
9210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9211 (eval $ac_try) 2>&5
9212 ac_status=$?
9213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9214 (exit $ac_status); }; } &&
9215 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9217 (eval $ac_try) 2>&5
9218 ac_status=$?
9219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9220 (exit $ac_status); }; }; then
0056a9b5 9221 gcc_cv_header_inttypes_h=yes
956d6950 9222else
ba479fd2
NN
9223 echo "$as_me: failed program was:" >&5
9224sed 's/^/| /' conftest.$ac_ext >&5
9225
9226gcc_cv_header_inttypes_h=no
956d6950 9227fi
86da66b5 9228rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
9229fi
9230
ba479fd2
NN
9231echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
9232echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 9233if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
9234
9235cat >>confdefs.h <<\_ACEOF
0056a9b5 9236#define HAVE_INTTYPES_H 1
ba479fd2 9237_ACEOF
0056a9b5
KG
9238
9239fi
956d6950 9240
c149cc37 9241
ba479fd2
NN
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
0d667716
KG
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
ba479fd2
NN
9270
9271
9272
9273
9274
9275
9276
9277
52a6edcc 9278for ac_func in times clock kill getrlimit setrlimit atoll atoq \
0d667716
KG
9279 sysconf strsignal getrusage nl_langinfo scandir alphasort \
9280 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9281 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 9282do
ba479fd2
NN
9283as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9284echo "$as_me:$LINENO: checking for $ac_func" >&5
9285echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9286if eval "test \"\${$as_ac_var+set}\" = set"; then
9287 echo $ECHO_N "(cached) $ECHO_C" >&6
9288else
9289 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9290/* confdefs.h. */
9291_ACEOF
9292cat confdefs.h >>conftest.$ac_ext
9293cat >>conftest.$ac_ext <<_ACEOF
9294/* end confdefs.h. */
86da66b5
HPN
9295/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9296 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9297#define $ac_func innocuous_$ac_func
9298
956d6950 9299/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9300 which can conflict with char $ac_func (); below.
9301 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9302 <limits.h> exists even on freestanding compilers. */
86da66b5 9303
ba479fd2
NN
9304#ifdef __STDC__
9305# include <limits.h>
9306#else
9307# include <assert.h>
9308#endif
86da66b5
HPN
9309
9310#undef $ac_func
9311
6e3f3080 9312/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9313#ifdef __cplusplus
9314extern "C"
9315{
9316#endif
6e3f3080 9317/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9318 builtin and then its argument prototype would still apply. */
9319char $ac_func ();
956d6950
JL
9320/* The GNU C library defines this for functions which it implements
9321 to always fail with ENOSYS. Some functions are actually named
9322 something starting with __ and the normal name is an alias. */
9323#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9324choke me
9325#else
ba479fd2
NN
9326char (*f) () = $ac_func;
9327#endif
9328#ifdef __cplusplus
9329}
956d6950
JL
9330#endif
9331
ba479fd2
NN
9332int
9333main ()
9334{
9335return f != $ac_func;
9336 ;
9337 return 0;
9338}
9339_ACEOF
9340rm -f conftest.$ac_objext conftest$ac_exeext
9341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9342 (eval $ac_link) 2>conftest.er1
ba479fd2 9343 ac_status=$?
86da66b5
HPN
9344 grep -v '^ *+' conftest.er1 >conftest.err
9345 rm -f conftest.er1
9346 cat conftest.err >&5
ba479fd2
NN
9347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9348 (exit $ac_status); } &&
ec6c7392
PB
9349 { ac_try='test -z "$ac_c_werror_flag"
9350 || test ! -s conftest.err'
86da66b5
HPN
9351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9352 (eval $ac_try) 2>&5
9353 ac_status=$?
9354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9355 (exit $ac_status); }; } &&
9356 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9358 (eval $ac_try) 2>&5
9359 ac_status=$?
9360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9361 (exit $ac_status); }; }; then
9362 eval "$as_ac_var=yes"
9363else
9364 echo "$as_me: failed program was:" >&5
9365sed 's/^/| /' conftest.$ac_ext >&5
9366
9367eval "$as_ac_var=no"
9368fi
86da66b5
HPN
9369rm -f conftest.err conftest.$ac_objext \
9370 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9371fi
9372echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9373echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9374if test `eval echo '${'$as_ac_var'}'` = yes; then
9375 cat >>confdefs.h <<_ACEOF
9376#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9377_ACEOF
956d6950 9378
956d6950
JL
9379fi
9380done
9381
6885fc87 9382
39f6c4c8 9383if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
9384 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9385echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
9386if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9387 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9388else
9389 if test "$cross_compiling" = yes; then
9390 gcc_cv_func_mbstowcs_works=yes
9391else
ba479fd2 9392 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9393/* confdefs.h. */
9394_ACEOF
9395cat confdefs.h >>conftest.$ac_ext
9396cat >>conftest.$ac_ext <<_ACEOF
9397/* end confdefs.h. */
39f6c4c8
KW
9398#include <stdlib.h>
9399int main()
9400{
9401 mbstowcs(0, "", 0);
9402 return 0;
9403}
ba479fd2
NN
9404_ACEOF
9405rm -f conftest$ac_exeext
9406if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9407 (eval $ac_link) 2>&5
9408 ac_status=$?
9409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9410 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9412 (eval $ac_try) 2>&5
9413 ac_status=$?
9414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9415 (exit $ac_status); }; }; then
39f6c4c8
KW
9416 gcc_cv_func_mbstowcs_works=yes
9417else
ba479fd2
NN
9418 echo "$as_me: program exited with status $ac_status" >&5
9419echo "$as_me: failed program was:" >&5
9420sed 's/^/| /' conftest.$ac_ext >&5
9421
9422( exit $ac_status )
9423gcc_cv_func_mbstowcs_works=no
39f6c4c8 9424fi
86da66b5 9425rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 9426fi
39f6c4c8 9427fi
ba479fd2
NN
9428echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9429echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 9430 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
9431
9432cat >>confdefs.h <<\_ACEOF
39f6c4c8 9433#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 9434_ACEOF
39f6c4c8
KW
9435
9436 fi
9437fi
9438
ba479fd2
NN
9439echo "$as_me:$LINENO: checking for ssize_t" >&5
9440echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
9441if test "${ac_cv_type_ssize_t+set}" = set; then
9442 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 9443else
ba479fd2 9444 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9445/* confdefs.h. */
9446_ACEOF
9447cat confdefs.h >>conftest.$ac_ext
9448cat >>conftest.$ac_ext <<_ACEOF
9449/* end confdefs.h. */
8b4fc07a
NN
9450$ac_includes_default
9451int
9452main ()
9453{
9454if ((ssize_t *) 0)
9455 return 0;
9456if (sizeof (ssize_t))
9457 return 0;
9458 ;
9459 return 0;
9460}
ba479fd2 9461_ACEOF
8b4fc07a
NN
9462rm -f conftest.$ac_objext
9463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9464 (eval $ac_compile) 2>conftest.er1
8b4fc07a 9465 ac_status=$?
86da66b5
HPN
9466 grep -v '^ *+' conftest.er1 >conftest.err
9467 rm -f conftest.er1
9468 cat conftest.err >&5
8b4fc07a
NN
9469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9470 (exit $ac_status); } &&
ec6c7392
PB
9471 { ac_try='test -z "$ac_c_werror_flag"
9472 || test ! -s conftest.err'
86da66b5
HPN
9473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9474 (eval $ac_try) 2>&5
9475 ac_status=$?
9476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9477 (exit $ac_status); }; } &&
9478 { ac_try='test -s conftest.$ac_objext'
8b4fc07a
NN
9479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9480 (eval $ac_try) 2>&5
9481 ac_status=$?
9482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9483 (exit $ac_status); }; }; then
cb65112a 9484 ac_cv_type_ssize_t=yes
f12bc141 9485else
8b4fc07a
NN
9486 echo "$as_me: failed program was:" >&5
9487sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9488
8b4fc07a
NN
9489ac_cv_type_ssize_t=no
9490fi
86da66b5 9491rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9492fi
ba479fd2
NN
9493echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9494echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
9495if test $ac_cv_type_ssize_t = yes; then
9496 :
9497else
ba479fd2 9498
8b4fc07a 9499cat >>confdefs.h <<_ACEOF
f12bc141 9500#define ssize_t int
ba479fd2 9501_ACEOF
f12bc141
ZW
9502
9503fi
9504
0b9d02c6 9505
e256b8b6
DA
9506# Try to determine the array type of the second argument of getgroups
9507# for the target system (int or gid_t).
ba479fd2
NN
9508echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9509echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
9510if test "${ac_cv_type_uid_t+set}" = set; then
9511 echo $ECHO_N "(cached) $ECHO_C" >&6
9512else
9513 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9514/* confdefs.h. */
9515_ACEOF
9516cat confdefs.h >>conftest.$ac_ext
9517cat >>conftest.$ac_ext <<_ACEOF
9518/* end confdefs.h. */
e256b8b6 9519#include <sys/types.h>
ba479fd2
NN
9520
9521_ACEOF
e256b8b6 9522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9523 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
9524 ac_cv_type_uid_t=yes
9525else
e256b8b6
DA
9526 ac_cv_type_uid_t=no
9527fi
9528rm -f conftest*
9529
9530fi
ba479fd2
NN
9531echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9532echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 9533if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
9534
9535cat >>confdefs.h <<\_ACEOF
e256b8b6 9536#define uid_t int
ba479fd2 9537_ACEOF
cafe096b 9538
ba479fd2
NN
9539
9540cat >>confdefs.h <<\_ACEOF
e256b8b6 9541#define gid_t int
ba479fd2 9542_ACEOF
e256b8b6
DA
9543
9544fi
9545
ba479fd2
NN
9546echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9547echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
9548if test "${ac_cv_type_getgroups+set}" = set; then
9549 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
9550else
9551 if test "$cross_compiling" = yes; then
9552 ac_cv_type_getgroups=cross
9553else
ba479fd2 9554 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9555/* confdefs.h. */
9556_ACEOF
9557cat confdefs.h >>conftest.$ac_ext
9558cat >>conftest.$ac_ext <<_ACEOF
9559/* end confdefs.h. */
e256b8b6
DA
9560/* Thanks to Mike Rendell for this test. */
9561#include <sys/types.h>
9562#define NGID 256
9563#undef MAX
9564#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
9565
9566int
9567main ()
e256b8b6
DA
9568{
9569 gid_t gidset[NGID];
9570 int i, n;
9571 union { gid_t gval; long lval; } val;
9572
9573 val.lval = -1;
9574 for (i = 0; i < NGID; i++)
9575 gidset[i] = val.gval;
9576 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 9577 gidset);
e256b8b6
DA
9578 /* Exit non-zero if getgroups seems to require an array of ints. This
9579 happens when gid_t is short but getgroups modifies an array of ints. */
9580 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 9581}
ba479fd2
NN
9582_ACEOF
9583rm -f conftest$ac_exeext
9584if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9585 (eval $ac_link) 2>&5
9586 ac_status=$?
9587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9588 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9590 (eval $ac_try) 2>&5
9591 ac_status=$?
9592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9593 (exit $ac_status); }; }; then
9594 ac_cv_type_getgroups=gid_t
63cf211a 9595else
ba479fd2
NN
9596 echo "$as_me: program exited with status $ac_status" >&5
9597echo "$as_me: failed program was:" >&5
9598sed 's/^/| /' conftest.$ac_ext >&5
9599
9600( exit $ac_status )
9601ac_cv_type_getgroups=int
e256b8b6 9602fi
86da66b5 9603rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 9604fi
e256b8b6 9605if test $ac_cv_type_getgroups = cross; then
ba479fd2 9606 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9607/* confdefs.h. */
9608_ACEOF
9609cat confdefs.h >>conftest.$ac_ext
9610cat >>conftest.$ac_ext <<_ACEOF
9611/* end confdefs.h. */
e256b8b6 9612#include <unistd.h>
ba479fd2
NN
9613
9614_ACEOF
e256b8b6 9615if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9616 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
9617 ac_cv_type_getgroups=gid_t
9618else
e256b8b6
DA
9619 ac_cv_type_getgroups=int
9620fi
9621rm -f conftest*
9622
9623fi
9624fi
ba479fd2
NN
9625echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9626echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 9627
ba479fd2 9628cat >>confdefs.h <<_ACEOF
e256b8b6 9629#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 9630_ACEOF
e256b8b6
DA
9631
9632
9633if test "${target}" = "${build}"; then
9634 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9635else
9636 case "${target}" in
9637 # This condition may need some tweaking. It should include all
9638 # targets where the array type of the second argument of getgroups
9639 # is int and the type of gid_t is not equivalent to int.
9640 *-*-sunos* | *-*-ultrix*)
9641 TARGET_GETGROUPS_T=int
9642 ;;
9643 *)
9644 TARGET_GETGROUPS_T=gid_t
9645 ;;
9646 esac
9647fi
9648
9649
3b0727a0 9650
18fc9bd4 9651echo "$as_me:$LINENO: checking for sys/mman.h" >&5
3b0727a0
MR
9652echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
9653if test "${ac_cv_header_sys_mman_h+set}" = set; then
9654 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 9655else
18fc9bd4 9656 cat >conftest.$ac_ext <<_ACEOF
3b0727a0
MR
9657/* confdefs.h. */
9658_ACEOF
9659cat confdefs.h >>conftest.$ac_ext
9660cat >>conftest.$ac_ext <<_ACEOF
9661/* end confdefs.h. */
9662#include <sys/mman.h>
9663_ACEOF
9664if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9665 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9666 ac_status=$?
9667 grep -v '^ *+' conftest.er1 >conftest.err
9668 rm -f conftest.er1
9669 cat conftest.err >&5
9670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9671 (exit $ac_status); } >/dev/null; then
9672 if test -s conftest.err; then
9673 ac_cpp_err=$ac_c_preproc_warn_flag
9674 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9675 else
9676 ac_cpp_err=
9677 fi
9678else
9679 ac_cpp_err=yes
9680fi
9681if test -z "$ac_cpp_err"; then
18fc9bd4 9682 ac_cv_header_sys_mman_h=yes
3b0727a0
MR
9683else
9684 echo "$as_me: failed program was:" >&5
9685sed 's/^/| /' conftest.$ac_ext >&5
9686
18fc9bd4 9687 ac_cv_header_sys_mman_h=no
3b0727a0
MR
9688fi
9689rm -f conftest.err conftest.$ac_ext
9690fi
9691echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9692echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
9693if test $ac_cv_header_sys_mman_h = yes; then
9694 gcc_header_sys_mman_h=yes
9695else
9696 gcc_header_sys_mman_h=no
9697fi
9698
9699echo "$as_me:$LINENO: checking for mmap" >&5
9700echo $ECHO_N "checking for mmap... $ECHO_C" >&6
9701if test "${ac_cv_func_mmap+set}" = set; then
9702 echo $ECHO_N "(cached) $ECHO_C" >&6
9703else
9704 cat >conftest.$ac_ext <<_ACEOF
9705/* confdefs.h. */
9706_ACEOF
9707cat confdefs.h >>conftest.$ac_ext
9708cat >>conftest.$ac_ext <<_ACEOF
9709/* end confdefs.h. */
9710/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9711 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9712#define mmap innocuous_mmap
9713
9714/* System header to define __stub macros and hopefully few prototypes,
9715 which can conflict with char mmap (); below.
9716 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9717 <limits.h> exists even on freestanding compilers. */
9718
9719#ifdef __STDC__
9720# include <limits.h>
9721#else
9722# include <assert.h>
9723#endif
9724
9725#undef mmap
9726
9727/* Override any gcc2 internal prototype to avoid an error. */
9728#ifdef __cplusplus
9729extern "C"
9730{
9731#endif
9732/* We use char because int might match the return type of a gcc2
9733 builtin and then its argument prototype would still apply. */
9734char mmap ();
9735/* The GNU C library defines this for functions which it implements
9736 to always fail with ENOSYS. Some functions are actually named
9737 something starting with __ and the normal name is an alias. */
9738#if defined (__stub_mmap) || defined (__stub___mmap)
9739choke me
9740#else
9741char (*f) () = mmap;
9742#endif
9743#ifdef __cplusplus
9744}
9745#endif
9746
9747int
9748main ()
9749{
9750return f != mmap;
9751 ;
9752 return 0;
9753}
9754_ACEOF
9755rm -f conftest.$ac_objext conftest$ac_exeext
9756if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9757 (eval $ac_link) 2>conftest.er1
9758 ac_status=$?
9759 grep -v '^ *+' conftest.er1 >conftest.err
9760 rm -f conftest.er1
9761 cat conftest.err >&5
9762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9763 (exit $ac_status); } &&
ec6c7392
PB
9764 { ac_try='test -z "$ac_c_werror_flag"
9765 || test ! -s conftest.err'
3b0727a0
MR
9766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9767 (eval $ac_try) 2>&5
9768 ac_status=$?
9769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9770 (exit $ac_status); }; } &&
9771 { ac_try='test -s conftest$ac_exeext'
9772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9773 (eval $ac_try) 2>&5
9774 ac_status=$?
9775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9776 (exit $ac_status); }; }; then
9777 ac_cv_func_mmap=yes
9778else
9779 echo "$as_me: failed program was:" >&5
9780sed 's/^/| /' conftest.$ac_ext >&5
9781
9782ac_cv_func_mmap=no
9783fi
9784rm -f conftest.err conftest.$ac_objext \
9785 conftest$ac_exeext conftest.$ac_ext
9786fi
9787echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9788echo "${ECHO_T}$ac_cv_func_mmap" >&6
9789if test $ac_cv_func_mmap = yes; then
9790 gcc_func_mmap=yes
9791else
9792 gcc_func_mmap=no
9793fi
9794
9795if test "$gcc_header_sys_mman_h" != yes \
9796 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
9797 gcc_cv_func_mmap_file=no
9798 gcc_cv_func_mmap_dev_zero=no
9799 gcc_cv_func_mmap_anon=no
9800else
ba479fd2
NN
9801 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9802echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
9803if test "${gcc_cv_func_mmap_file+set}" = set; then
9804 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 9805else
ba479fd2 9806 # Add a system to this blacklist if
1072ec3f
ZW
9807 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9808 # memory area containing the same data that you'd get if you applied
9809 # read() to the same fd. The only system known to have a problem here
9810 # is VMS, where text files have record structure.
9811 case "$host_os" in
ba479fd2 9812 vms* | ultrix*)
1072ec3f
ZW
9813 gcc_cv_func_mmap_file=no ;;
9814 *)
9815 gcc_cv_func_mmap_file=yes;;
9816 esac
9817fi
ba479fd2
NN
9818echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9819echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9820 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9821echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
9822if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9823 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9824else
9825 # Add a system to this blacklist if it has mmap() but /dev/zero
9826 # does not exist, or if mmapping /dev/zero does not give anonymous
9827 # zeroed pages with both the following properties:
9828 # 1. If you map N consecutive pages in with one call, and then
9829 # unmap any subset of those pages, the pages that were not
9830 # explicitly unmapped remain accessible.
9831 # 2. If you map two adjacent blocks of memory and then unmap them
9832 # both at once, they must both go away.
9833 # Systems known to be in this category are Windows (all variants),
9834 # VMS, and Darwin.
9835 case "$host_os" in
2ce240d3 9836 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
9837 gcc_cv_func_mmap_dev_zero=no ;;
9838 *)
9839 gcc_cv_func_mmap_dev_zero=yes;;
9840 esac
9841fi
ba479fd2
NN
9842echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9843echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
9844
9845 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
9846 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9847echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
9848if test "${gcc_cv_decl_map_anon+set}" = set; then
9849 echo $ECHO_N "(cached) $ECHO_C" >&6
9850else
9851 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9852/* confdefs.h. */
9853_ACEOF
9854cat confdefs.h >>conftest.$ac_ext
9855cat >>conftest.$ac_ext <<_ACEOF
9856/* end confdefs.h. */
1072ec3f
ZW
9857#include <sys/types.h>
9858#include <sys/mman.h>
9859#include <unistd.h>
9860
9861#ifndef MAP_ANONYMOUS
9862#define MAP_ANONYMOUS MAP_ANON
9863#endif
9864
ba479fd2
NN
9865int
9866main ()
9867{
1072ec3f 9868int n = MAP_ANONYMOUS;
ba479fd2
NN
9869 ;
9870 return 0;
9871}
9872_ACEOF
9873rm -f conftest.$ac_objext
9874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9875 (eval $ac_compile) 2>conftest.er1
ba479fd2 9876 ac_status=$?
86da66b5
HPN
9877 grep -v '^ *+' conftest.er1 >conftest.err
9878 rm -f conftest.er1
9879 cat conftest.err >&5
ba479fd2
NN
9880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9881 (exit $ac_status); } &&
ec6c7392
PB
9882 { ac_try='test -z "$ac_c_werror_flag"
9883 || test ! -s conftest.err'
86da66b5
HPN
9884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9885 (eval $ac_try) 2>&5
9886 ac_status=$?
9887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9888 (exit $ac_status); }; } &&
9889 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9891 (eval $ac_try) 2>&5
9892 ac_status=$?
9893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9894 (exit $ac_status); }; }; then
1072ec3f
ZW
9895 gcc_cv_decl_map_anon=yes
9896else
ba479fd2
NN
9897 echo "$as_me: failed program was:" >&5
9898sed 's/^/| /' conftest.$ac_ext >&5
9899
9900gcc_cv_decl_map_anon=no
1072ec3f 9901fi
86da66b5 9902rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 9903fi
ba479fd2
NN
9904echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9905echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
9906
9907 if test $gcc_cv_decl_map_anon = no; then
9908 gcc_cv_func_mmap_anon=no
9909 else
ba479fd2
NN
9910 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9911echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
9912if test "${gcc_cv_func_mmap_anon+set}" = set; then
9913 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9914else
9915 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9916 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9917 # doesn't give anonymous zeroed pages with the same properties listed
9918 # above for use of /dev/zero.
9919 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9920 case "$host_os" in
9921 vms* | cygwin* | pe | mingw* | sco* | udk* )
9922 gcc_cv_func_mmap_anon=no ;;
9923 *)
9924 gcc_cv_func_mmap_anon=yes;;
9925 esac
9926fi
ba479fd2
NN
9927echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9928echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
9929 fi
9930fi
9931
9932if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
9933
9934cat >>confdefs.h <<\_ACEOF
1072ec3f 9935#define HAVE_MMAP_FILE 1
ba479fd2 9936_ACEOF
1072ec3f
ZW
9937
9938fi
9939if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
9940
9941cat >>confdefs.h <<\_ACEOF
1072ec3f 9942#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 9943_ACEOF
1072ec3f
ZW
9944
9945fi
9946if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
9947
9948cat >>confdefs.h <<\_ACEOF
1072ec3f 9949#define HAVE_MMAP_ANON 1
ba479fd2 9950_ACEOF
1072ec3f
ZW
9951
9952fi
9953
b27d2bd5
MK
9954
9955case "${host}" in
ee262b6f 9956*-*-*vms*)
ba479fd2 9957 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
9958 # won't work, and it isn't easily adaptable. It makes more sense to
9959 # just force it.
9960 ac_cv_func_vfork_works=yes
9961 ;;
b27d2bd5 9962esac
ba479fd2
NN
9963echo "$as_me:$LINENO: checking for pid_t" >&5
9964echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
9965if test "${ac_cv_type_pid_t+set}" = set; then
9966 echo $ECHO_N "(cached) $ECHO_C" >&6
9967else
9968 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9969/* confdefs.h. */
9970_ACEOF
9971cat confdefs.h >>conftest.$ac_ext
9972cat >>conftest.$ac_ext <<_ACEOF
9973/* end confdefs.h. */
9974$ac_includes_default
9975int
9976main ()
9977{
9978if ((pid_t *) 0)
9979 return 0;
9980if (sizeof (pid_t))
9981 return 0;
9982 ;
9983 return 0;
9984}
9985_ACEOF
9986rm -f conftest.$ac_objext
9987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9988 (eval $ac_compile) 2>conftest.er1
ba479fd2 9989 ac_status=$?
86da66b5
HPN
9990 grep -v '^ *+' conftest.er1 >conftest.err
9991 rm -f conftest.er1
9992 cat conftest.err >&5
ba479fd2
NN
9993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9994 (exit $ac_status); } &&
ec6c7392
PB
9995 { ac_try='test -z "$ac_c_werror_flag"
9996 || test ! -s conftest.err'
86da66b5
HPN
9997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9998 (eval $ac_try) 2>&5
9999 ac_status=$?
10000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10001 (exit $ac_status); }; } &&
10002 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
10003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10004 (eval $ac_try) 2>&5
10005 ac_status=$?
10006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10007 (exit $ac_status); }; }; then
cb65112a 10008 ac_cv_type_pid_t=yes
c375c43b 10009else
ba479fd2
NN
10010 echo "$as_me: failed program was:" >&5
10011sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10012
ba479fd2
NN
10013ac_cv_type_pid_t=no
10014fi
86da66b5 10015rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10016fi
ba479fd2
NN
10017echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10018echo "${ECHO_T}$ac_cv_type_pid_t" >&6
10019if test $ac_cv_type_pid_t = yes; then
10020 :
10021else
10022
10023cat >>confdefs.h <<_ACEOF
c375c43b 10024#define pid_t int
ba479fd2 10025_ACEOF
c375c43b
KG
10026
10027fi
10028
ba479fd2
NN
10029
10030
10031for ac_header in unistd.h vfork.h
10032do
10033as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18fc9bd4 10034echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
10035echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10036if eval "test \"\${$as_ac_Header+set}\" = set"; then
10037 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10038else
18fc9bd4 10039 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10040/* confdefs.h. */
10041_ACEOF
10042cat confdefs.h >>conftest.$ac_ext
10043cat >>conftest.$ac_ext <<_ACEOF
10044/* end confdefs.h. */
10045#include <$ac_header>
10046_ACEOF
10047if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10048 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10049 ac_status=$?
10050 grep -v '^ *+' conftest.er1 >conftest.err
10051 rm -f conftest.er1
10052 cat conftest.err >&5
10053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10054 (exit $ac_status); } >/dev/null; then
10055 if test -s conftest.err; then
10056 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 10057 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
10058 else
10059 ac_cpp_err=
10060 fi
093e61a6 10061else
ba479fd2
NN
10062 ac_cpp_err=yes
10063fi
10064if test -z "$ac_cpp_err"; then
18fc9bd4 10065 eval "$as_ac_Header=yes"
ba479fd2
NN
10066else
10067 echo "$as_me: failed program was:" >&5
10068sed 's/^/| /' conftest.$ac_ext >&5
10069
18fc9bd4 10070 eval "$as_ac_Header=no"
ba479fd2
NN
10071fi
10072rm -f conftest.err conftest.$ac_ext
c375c43b 10073fi
ba479fd2
NN
10074echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10075echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
10076if test `eval echo '${'$as_ac_Header'}'` = yes; then
10077 cat >>confdefs.h <<_ACEOF
10078#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10079_ACEOF
6e3f3080
NN
10080
10081fi
ba479fd2
NN
10082done
10083
10084
10085
10086for ac_func in fork vfork
10087do
10088as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10089echo "$as_me:$LINENO: checking for $ac_func" >&5
10090echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10091if eval "test \"\${$as_ac_var+set}\" = set"; then
10092 echo $ECHO_N "(cached) $ECHO_C" >&6
10093else
10094 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10095/* confdefs.h. */
10096_ACEOF
10097cat confdefs.h >>conftest.$ac_ext
10098cat >>conftest.$ac_ext <<_ACEOF
10099/* end confdefs.h. */
86da66b5
HPN
10100/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10101 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10102#define $ac_func innocuous_$ac_func
10103
c375c43b 10104/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10105 which can conflict with char $ac_func (); below.
10106 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10107 <limits.h> exists even on freestanding compilers. */
86da66b5 10108
ba479fd2
NN
10109#ifdef __STDC__
10110# include <limits.h>
10111#else
10112# include <assert.h>
10113#endif
86da66b5
HPN
10114
10115#undef $ac_func
10116
6e3f3080 10117/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10118#ifdef __cplusplus
10119extern "C"
10120{
10121#endif
6e3f3080 10122/* We use char because int might match the return type of a gcc2
ba479fd2
NN
10123 builtin and then its argument prototype would still apply. */
10124char $ac_func ();
c375c43b
KG
10125/* The GNU C library defines this for functions which it implements
10126 to always fail with ENOSYS. Some functions are actually named
10127 something starting with __ and the normal name is an alias. */
ba479fd2 10128#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
10129choke me
10130#else
ba479fd2
NN
10131char (*f) () = $ac_func;
10132#endif
10133#ifdef __cplusplus
10134}
c375c43b
KG
10135#endif
10136
ba479fd2
NN
10137int
10138main ()
10139{
10140return f != $ac_func;
10141 ;
10142 return 0;
10143}
10144_ACEOF
10145rm -f conftest.$ac_objext conftest$ac_exeext
10146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10147 (eval $ac_link) 2>conftest.er1
ba479fd2 10148 ac_status=$?
86da66b5
HPN
10149 grep -v '^ *+' conftest.er1 >conftest.err
10150 rm -f conftest.er1
10151 cat conftest.err >&5
ba479fd2
NN
10152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153 (exit $ac_status); } &&
ec6c7392
PB
10154 { ac_try='test -z "$ac_c_werror_flag"
10155 || test ! -s conftest.err'
86da66b5
HPN
10156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10157 (eval $ac_try) 2>&5
10158 ac_status=$?
10159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10160 (exit $ac_status); }; } &&
10161 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10163 (eval $ac_try) 2>&5
10164 ac_status=$?
10165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10166 (exit $ac_status); }; }; then
10167 eval "$as_ac_var=yes"
10168else
10169 echo "$as_me: failed program was:" >&5
10170sed 's/^/| /' conftest.$ac_ext >&5
10171
10172eval "$as_ac_var=no"
10173fi
86da66b5
HPN
10174rm -f conftest.err conftest.$ac_objext \
10175 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
10176fi
10177echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10178echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10179if test `eval echo '${'$as_ac_var'}'` = yes; then
10180 cat >>confdefs.h <<_ACEOF
10181#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10182_ACEOF
10183
c375c43b 10184fi
ba479fd2 10185done
c375c43b 10186
ba479fd2
NN
10187if test "x$ac_cv_func_fork" = xyes; then
10188 echo "$as_me:$LINENO: checking for working fork" >&5
10189echo $ECHO_N "checking for working fork... $ECHO_C" >&6
10190if test "${ac_cv_func_fork_works+set}" = set; then
10191 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10192else
ba479fd2
NN
10193 if test "$cross_compiling" = yes; then
10194 ac_cv_func_fork_works=cross
10195else
10196 cat >conftest.$ac_ext <<_ACEOF
ec6c7392
PB
10197/* By Ruediger Kuhlmann. */
10198 #include <sys/types.h>
10199 #if HAVE_UNISTD_H
10200 # include <unistd.h>
10201 #endif
10202 /* Some systems only have a dummy stub for fork() */
10203 int main ()
10204 {
10205 if (fork() < 0)
10206 exit (1);
10207 exit (0);
10208 }
ba479fd2
NN
10209_ACEOF
10210rm -f conftest$ac_exeext
10211if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10212 (eval $ac_link) 2>&5
10213 ac_status=$?
10214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10215 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10217 (eval $ac_try) 2>&5
10218 ac_status=$?
10219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10220 (exit $ac_status); }; }; then
10221 ac_cv_func_fork_works=yes
10222else
10223 echo "$as_me: program exited with status $ac_status" >&5
10224echo "$as_me: failed program was:" >&5
10225sed 's/^/| /' conftest.$ac_ext >&5
10226
10227( exit $ac_status )
10228ac_cv_func_fork_works=no
10229fi
86da66b5 10230rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
10231fi
10232fi
10233echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10234echo "${ECHO_T}$ac_cv_func_fork_works" >&6
10235
10236else
10237 ac_cv_func_fork_works=$ac_cv_func_fork
10238fi
10239if test "x$ac_cv_func_fork_works" = xcross; then
10240 case $host in
10241 *-*-amigaos* | *-*-msdosdjgpp*)
10242 # Override, as these systems have only a dummy fork() stub
10243 ac_cv_func_fork_works=no
10244 ;;
10245 *)
10246 ac_cv_func_fork_works=yes
10247 ;;
10248 esac
10249 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10250echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 10251fi
c375c43b 10252ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10253if test "x$ac_cv_func_vfork" = xyes; then
10254 echo "$as_me:$LINENO: checking for working vfork" >&5
10255echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
10256if test "${ac_cv_func_vfork_works+set}" = set; then
10257 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10258else
ba479fd2
NN
10259 if test "$cross_compiling" = yes; then
10260 ac_cv_func_vfork_works=cross
10261else
10262 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10263/* confdefs.h. */
10264_ACEOF
10265cat confdefs.h >>conftest.$ac_ext
10266cat >>conftest.$ac_ext <<_ACEOF
10267/* end confdefs.h. */
c375c43b
KG
10268/* Thanks to Paul Eggert for this test. */
10269#include <stdio.h>
ba479fd2 10270#include <stdlib.h>
c375c43b
KG
10271#include <sys/types.h>
10272#include <sys/stat.h>
ba479fd2
NN
10273#include <sys/wait.h>
10274#if HAVE_UNISTD_H
10275# include <unistd.h>
c375c43b 10276#endif
ba479fd2
NN
10277#if HAVE_VFORK_H
10278# include <vfork.h>
c375c43b
KG
10279#endif
10280/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
10281 argument registers are propagated back to the parent. The compiler
10282 is told about this with #include <vfork.h>, but some compilers
10283 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10284 static variable whose address is put into a register that is
10285 clobbered by the vfork. */
10286static void
c375c43b
KG
10287#ifdef __cplusplus
10288sparc_address_test (int arg)
ba479fd2 10289# else
c375c43b
KG
10290sparc_address_test (arg) int arg;
10291#endif
10292{
10293 static pid_t child;
10294 if (!child) {
10295 child = vfork ();
10296 if (child < 0) {
10297 perror ("vfork");
10298 _exit(2);
10299 }
10300 if (!child) {
10301 arg = getpid();
10302 write(-1, "", 0);
10303 _exit (arg);
10304 }
10305 }
10306}
ba479fd2
NN
10307
10308int
10309main ()
10310{
c375c43b
KG
10311 pid_t parent = getpid ();
10312 pid_t child;
10313
ba479fd2 10314 sparc_address_test (0);
c375c43b
KG
10315
10316 child = vfork ();
10317
10318 if (child == 0) {
ba479fd2
NN
10319 /* Here is another test for sparc vfork register problems. This
10320 test uses lots of local variables, at least as many local
10321 variables as main has allocated so far including compiler
10322 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10323 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10324 reuse the register of parent for one of the local variables,
10325 since it will think that parent can't possibly be used any more
10326 in this routine. Assigning to the local variable will thus
10327 munge parent in the parent process. */
c375c43b
KG
10328 pid_t
10329 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10330 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10331 /* Convince the compiler that p..p7 are live; otherwise, it might
10332 use the same hardware register for all 8 local variables. */
10333 if (p != p1 || p != p2 || p != p3 || p != p4
10334 || p != p5 || p != p6 || p != p7)
10335 _exit(1);
10336
ba479fd2
NN
10337 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10338 from child file descriptors. If the child closes a descriptor
10339 before it execs or exits, this munges the parent's descriptor
10340 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10341 _exit(close(fileno(stdout)) != 0);
10342 } else {
10343 int status;
10344 struct stat st;
10345
10346 while (wait(&status) != child)
10347 ;
10348 exit(
10349 /* Was there some problem with vforking? */
10350 child < 0
10351
10352 /* Did the child fail? (This shouldn't happen.) */
10353 || status
10354
10355 /* Did the vfork/compiler bug occur? */
10356 || parent != getpid()
10357
10358 /* Did the file descriptor bug occur? */
10359 || fstat(fileno(stdout), &st) != 0
10360 );
10361 }
10362}
ba479fd2
NN
10363_ACEOF
10364rm -f conftest$ac_exeext
10365if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10366 (eval $ac_link) 2>&5
10367 ac_status=$?
10368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10369 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10371 (eval $ac_try) 2>&5
10372 ac_status=$?
10373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10374 (exit $ac_status); }; }; then
c375c43b
KG
10375 ac_cv_func_vfork_works=yes
10376else
ba479fd2
NN
10377 echo "$as_me: program exited with status $ac_status" >&5
10378echo "$as_me: failed program was:" >&5
10379sed 's/^/| /' conftest.$ac_ext >&5
10380
10381( exit $ac_status )
10382ac_cv_func_vfork_works=no
cafe096b 10383fi
86da66b5 10384rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10385fi
ba479fd2
NN
10386fi
10387echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10388echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 10389
ba479fd2
NN
10390fi;
10391if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 10392 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10393 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10394echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
10395fi
10396
ba479fd2
NN
10397if test "x$ac_cv_func_vfork_works" = xyes; then
10398
10399cat >>confdefs.h <<\_ACEOF
10400#define HAVE_WORKING_VFORK 1
10401_ACEOF
10402
10403else
10404
10405cat >>confdefs.h <<\_ACEOF
c375c43b 10406#define vfork fork
ba479fd2 10407_ACEOF
c375c43b
KG
10408
10409fi
ba479fd2
NN
10410if test "x$ac_cv_func_fork_works" = xyes; then
10411
10412cat >>confdefs.h <<\_ACEOF
10413#define HAVE_WORKING_FORK 1
10414_ACEOF
10415
10416fi
10417
c375c43b 10418
81bf3d9e 10419
dfb77e37
KC
10420 if test "X$prefix" = "XNONE"; then
10421 acl_final_prefix="$ac_default_prefix"
10422 else
10423 acl_final_prefix="$prefix"
10424 fi
10425 if test "X$exec_prefix" = "XNONE"; then
10426 acl_final_exec_prefix='${prefix}'
10427 else
10428 acl_final_exec_prefix="$exec_prefix"
10429 fi
10430 acl_save_prefix="$prefix"
10431 prefix="$acl_final_prefix"
10432 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10433 prefix="$acl_save_prefix"
f91abfce
TT
10434
10435
dfb77e37
KC
10436# Check whether --with-gnu-ld or --without-gnu-ld was given.
10437if test "${with_gnu_ld+set}" = set; then
10438 withval="$with_gnu_ld"
10439 test "$withval" = no || with_gnu_ld=yes
ba479fd2 10440else
dfb77e37
KC
10441 with_gnu_ld=no
10442fi;
10443# Prepare PATH_SEPARATOR.
10444# The user is always right.
10445if test "${PATH_SEPARATOR+set}" != set; then
10446 echo "#! /bin/sh" >conf$$.sh
10447 echo "exit 0" >>conf$$.sh
10448 chmod +x conf$$.sh
10449 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10450 PATH_SEPARATOR=';'
ba479fd2 10451 else
dfb77e37 10452 PATH_SEPARATOR=:
ba479fd2 10453 fi
dfb77e37
KC
10454 rm -f conf$$.sh
10455fi
10456ac_prog=ld
10457if test "$GCC" = yes; then
10458 # Check if gcc -print-prog-name=ld gives a path.
10459 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10460echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10461 case $host in
10462 *-*-mingw*)
10463 # gcc leaves a trailing carriage return which upsets mingw
10464 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10465 *)
10466 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10467 esac
10468 case $ac_prog in
10469 # Accept absolute paths.
10470 [\\/]* | [A-Za-z]:[\\/]*)
10471 re_direlt='/[^/][^/]*/\.\./'
10472 # Canonicalize the path of ld
10473 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10474 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10475 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10476 done
10477 test -z "$LD" && LD="$ac_prog"
10478 ;;
10479 "")
10480 # If it fails, then pretend we aren't using GCC.
10481 ac_prog=ld
10482 ;;
10483 *)
10484 # If it is relative, then search for the first ld in PATH.
10485 with_gnu_ld=unknown
10486 ;;
10487 esac
10488elif test "$with_gnu_ld" = yes; then
10489 echo "$as_me:$LINENO: checking for GNU ld" >&5
10490echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 10491else
dfb77e37
KC
10492 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10493echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 10494fi
dfb77e37
KC
10495if test "${acl_cv_path_LD+set}" = set; then
10496 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 10497else
dfb77e37
KC
10498 if test -z "$LD"; then
10499 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10500 for ac_dir in $PATH; do
10501 test -z "$ac_dir" && ac_dir=.
10502 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10503 acl_cv_path_LD="$ac_dir/$ac_prog"
10504 # Check to see if the program is GNU ld. I'd rather use --version,
10505 # but apparently some GNU ld's only accept -v.
10506 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
10507 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10508 test "$with_gnu_ld" != no && break
10509 else
10510 test "$with_gnu_ld" != yes && break
10511 fi
dfb77e37
KC
10512 fi
10513 done
10514 IFS="$ac_save_ifs"
10515else
10516 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10517fi
10518fi
ba479fd2 10519
dfb77e37
KC
10520LD="$acl_cv_path_LD"
10521if test -n "$LD"; then
10522 echo "$as_me:$LINENO: result: $LD" >&5
10523echo "${ECHO_T}$LD" >&6
10524else
10525 echo "$as_me:$LINENO: result: no" >&5
10526echo "${ECHO_T}no" >&6
ba479fd2 10527fi
dfb77e37
KC
10528test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10529echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10530 { (exit 1); exit 1; }; }
10531echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10532echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10533if test "${acl_cv_prog_gnu_ld+set}" = set; then
10534 echo $ECHO_N "(cached) $ECHO_C" >&6
10535else
10536 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
10537if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10538 acl_cv_prog_gnu_ld=yes
10539else
10540 acl_cv_prog_gnu_ld=no
10541fi
dfb77e37
KC
10542fi
10543echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10544echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10545with_gnu_ld=$acl_cv_prog_gnu_ld
10546
10547
10548
10549 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10550echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10551if test "${acl_cv_rpath+set}" = set; then
10552 echo $ECHO_N "(cached) $ECHO_C" >&6
10553else
10554
10555 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10556 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10557 . ./conftest.sh
10558 rm -f ./conftest.sh
10559 acl_cv_rpath=done
ba479fd2 10560
eb158727 10561fi
dfb77e37
KC
10562echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10563echo "${ECHO_T}$acl_cv_rpath" >&6
10564 wl="$acl_cv_wl"
10565 libext="$acl_cv_libext"
10566 shlibext="$acl_cv_shlibext"
10567 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10568 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10569 hardcode_direct="$acl_cv_hardcode_direct"
10570 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10571 # Check whether --enable-rpath or --disable-rpath was given.
10572if test "${enable_rpath+set}" = set; then
10573 enableval="$enable_rpath"
10574 :
10575else
10576 enable_rpath=yes
10577fi;
10578
10579
10580
10581
10582
10583
10584
10585 use_additional=yes
10586
10587 acl_save_prefix="$prefix"
10588 prefix="$acl_final_prefix"
10589 acl_save_exec_prefix="$exec_prefix"
10590 exec_prefix="$acl_final_exec_prefix"
10591
10592 eval additional_includedir=\"$includedir\"
10593 eval additional_libdir=\"$libdir\"
10594
10595 exec_prefix="$acl_save_exec_prefix"
10596 prefix="$acl_save_prefix"
10597
10598
10599# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10600if test "${with_libiconv_prefix+set}" = set; then
10601 withval="$with_libiconv_prefix"
10602
10603 if test "X$withval" = "Xno"; then
10604 use_additional=no
10605 else
10606 if test "X$withval" = "X"; then
10607
10608 acl_save_prefix="$prefix"
10609 prefix="$acl_final_prefix"
10610 acl_save_exec_prefix="$exec_prefix"
10611 exec_prefix="$acl_final_exec_prefix"
10612
10613 eval additional_includedir=\"$includedir\"
10614 eval additional_libdir=\"$libdir\"
10615
10616 exec_prefix="$acl_save_exec_prefix"
10617 prefix="$acl_save_prefix"
10618
10619 else
10620 additional_includedir="$withval/include"
10621 additional_libdir="$withval/lib"
10622 fi
10623 fi
10624
10625fi;
10626 LIBICONV=
10627 LTLIBICONV=
10628 INCICONV=
10629 rpathdirs=
10630 ltrpathdirs=
10631 names_already_handled=
10632 names_next_round='iconv '
10633 while test -n "$names_next_round"; do
10634 names_this_round="$names_next_round"
10635 names_next_round=
10636 for name in $names_this_round; do
10637 already_handled=
10638 for n in $names_already_handled; do
10639 if test "$n" = "$name"; then
10640 already_handled=yes
10641 break
10642 fi
10643 done
10644 if test -z "$already_handled"; then
10645 names_already_handled="$names_already_handled $name"
10646 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10647 eval value=\"\$HAVE_LIB$uppername\"
10648 if test -n "$value"; then
10649 if test "$value" = yes; then
10650 eval value=\"\$LIB$uppername\"
10651 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10652 eval value=\"\$LTLIB$uppername\"
10653 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10654 else
10655 :
10656 fi
10657 else
10658 found_dir=
10659 found_la=
10660 found_so=
10661 found_a=
10662 if test $use_additional = yes; then
10663 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10664 found_dir="$additional_libdir"
10665 found_so="$additional_libdir/lib$name.$shlibext"
10666 if test -f "$additional_libdir/lib$name.la"; then
10667 found_la="$additional_libdir/lib$name.la"
10668 fi
10669 else
10670 if test -f "$additional_libdir/lib$name.$libext"; then
10671 found_dir="$additional_libdir"
10672 found_a="$additional_libdir/lib$name.$libext"
10673 if test -f "$additional_libdir/lib$name.la"; then
10674 found_la="$additional_libdir/lib$name.la"
10675 fi
10676 fi
10677 fi
10678 fi
10679 if test "X$found_dir" = "X"; then
10680 for x in $LDFLAGS $LTLIBICONV; do
10681
10682 acl_save_prefix="$prefix"
10683 prefix="$acl_final_prefix"
10684 acl_save_exec_prefix="$exec_prefix"
10685 exec_prefix="$acl_final_exec_prefix"
10686 eval x=\"$x\"
10687 exec_prefix="$acl_save_exec_prefix"
10688 prefix="$acl_save_prefix"
10689
10690 case "$x" in
10691 -L*)
10692 dir=`echo "X$x" | sed -e 's/^X-L//'`
10693 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10694 found_dir="$dir"
10695 found_so="$dir/lib$name.$shlibext"
10696 if test -f "$dir/lib$name.la"; then
10697 found_la="$dir/lib$name.la"
10698 fi
10699 else
10700 if test -f "$dir/lib$name.$libext"; then
10701 found_dir="$dir"
10702 found_a="$dir/lib$name.$libext"
10703 if test -f "$dir/lib$name.la"; then
10704 found_la="$dir/lib$name.la"
10705 fi
10706 fi
10707 fi
10708 ;;
10709 esac
10710 if test "X$found_dir" != "X"; then
10711 break
10712 fi
10713 done
10714 fi
10715 if test "X$found_dir" != "X"; then
10716 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10717 if test "X$found_so" != "X"; then
10718 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10719 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10720 else
10721 haveit=
10722 for x in $ltrpathdirs; do
10723 if test "X$x" = "X$found_dir"; then
10724 haveit=yes
10725 break
10726 fi
10727 done
10728 if test -z "$haveit"; then
10729 ltrpathdirs="$ltrpathdirs $found_dir"
10730 fi
10731 if test "$hardcode_direct" = yes; then
10732 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10733 else
10734 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10735 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10736 haveit=
10737 for x in $rpathdirs; do
10738 if test "X$x" = "X$found_dir"; then
10739 haveit=yes
10740 break
10741 fi
10742 done
10743 if test -z "$haveit"; then
10744 rpathdirs="$rpathdirs $found_dir"
10745 fi
10746 else
10747 haveit=
10748 for x in $LDFLAGS $LIBICONV; do
10749
10750 acl_save_prefix="$prefix"
10751 prefix="$acl_final_prefix"
10752 acl_save_exec_prefix="$exec_prefix"
10753 exec_prefix="$acl_final_exec_prefix"
10754 eval x=\"$x\"
10755 exec_prefix="$acl_save_exec_prefix"
10756 prefix="$acl_save_prefix"
10757
10758 if test "X$x" = "X-L$found_dir"; then
10759 haveit=yes
10760 break
10761 fi
10762 done
10763 if test -z "$haveit"; then
10764 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10765 fi
10766 if test "$hardcode_minus_L" != no; then
10767 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10768 else
10769 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10770 fi
10771 fi
10772 fi
10773 fi
10774 else
10775 if test "X$found_a" != "X"; then
10776 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10777 else
10778 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10779 fi
10780 fi
10781 additional_includedir=
10782 case "$found_dir" in
10783 */lib | */lib/)
10784 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10785 additional_includedir="$basedir/include"
10786 ;;
10787 esac
10788 if test "X$additional_includedir" != "X"; then
10789 if test "X$additional_includedir" != "X/usr/include"; then
10790 haveit=
10791 if test "X$additional_includedir" = "X/usr/local/include"; then
10792 if test -n "$GCC"; then
10793 case $host_os in
18fc9bd4 10794 linux*) haveit=yes;;
dfb77e37
KC
10795 esac
10796 fi
10797 fi
10798 if test -z "$haveit"; then
10799 for x in $CPPFLAGS $INCICONV; do
10800
10801 acl_save_prefix="$prefix"
10802 prefix="$acl_final_prefix"
10803 acl_save_exec_prefix="$exec_prefix"
10804 exec_prefix="$acl_final_exec_prefix"
10805 eval x=\"$x\"
10806 exec_prefix="$acl_save_exec_prefix"
10807 prefix="$acl_save_prefix"
10808
10809 if test "X$x" = "X-I$additional_includedir"; then
10810 haveit=yes
10811 break
10812 fi
10813 done
10814 if test -z "$haveit"; then
10815 if test -d "$additional_includedir"; then
10816 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10817 fi
10818 fi
10819 fi
10820 fi
10821 fi
10822 if test -n "$found_la"; then
10823 save_libdir="$libdir"
10824 case "$found_la" in
10825 */* | *\\*) . "$found_la" ;;
10826 *) . "./$found_la" ;;
10827 esac
10828 libdir="$save_libdir"
10829 for dep in $dependency_libs; do
10830 case "$dep" in
10831 -L*)
10832 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10833 if test "X$additional_libdir" != "X/usr/lib"; then
10834 haveit=
10835 if test "X$additional_libdir" = "X/usr/local/lib"; then
10836 if test -n "$GCC"; then
10837 case $host_os in
18fc9bd4 10838 linux*) haveit=yes;;
dfb77e37
KC
10839 esac
10840 fi
10841 fi
10842 if test -z "$haveit"; then
10843 haveit=
10844 for x in $LDFLAGS $LIBICONV; do
10845
10846 acl_save_prefix="$prefix"
10847 prefix="$acl_final_prefix"
10848 acl_save_exec_prefix="$exec_prefix"
10849 exec_prefix="$acl_final_exec_prefix"
10850 eval x=\"$x\"
10851 exec_prefix="$acl_save_exec_prefix"
10852 prefix="$acl_save_prefix"
10853
10854 if test "X$x" = "X-L$additional_libdir"; then
10855 haveit=yes
10856 break
10857 fi
10858 done
10859 if test -z "$haveit"; then
10860 if test -d "$additional_libdir"; then
10861 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10862 fi
10863 fi
10864 haveit=
10865 for x in $LDFLAGS $LTLIBICONV; do
10866
10867 acl_save_prefix="$prefix"
10868 prefix="$acl_final_prefix"
10869 acl_save_exec_prefix="$exec_prefix"
10870 exec_prefix="$acl_final_exec_prefix"
10871 eval x=\"$x\"
10872 exec_prefix="$acl_save_exec_prefix"
10873 prefix="$acl_save_prefix"
10874
10875 if test "X$x" = "X-L$additional_libdir"; then
10876 haveit=yes
10877 break
10878 fi
10879 done
10880 if test -z "$haveit"; then
10881 if test -d "$additional_libdir"; then
10882 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10883 fi
10884 fi
10885 fi
10886 fi
10887 ;;
10888 -R*)
10889 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10890 if test "$enable_rpath" != no; then
10891 haveit=
10892 for x in $rpathdirs; do
10893 if test "X$x" = "X$dir"; then
10894 haveit=yes
10895 break
10896 fi
10897 done
10898 if test -z "$haveit"; then
10899 rpathdirs="$rpathdirs $dir"
10900 fi
10901 haveit=
10902 for x in $ltrpathdirs; do
10903 if test "X$x" = "X$dir"; then
10904 haveit=yes
10905 break
10906 fi
10907 done
10908 if test -z "$haveit"; then
10909 ltrpathdirs="$ltrpathdirs $dir"
10910 fi
10911 fi
10912 ;;
10913 -l*)
10914 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10915 ;;
10916 *.la)
10917 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10918 ;;
10919 *)
10920 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10921 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10922 ;;
10923 esac
10924 done
10925 fi
10926 else
10927 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10928 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10929 fi
10930 fi
10931 fi
10932 done
10933 done
10934 if test "X$rpathdirs" != "X"; then
10935 if test -n "$hardcode_libdir_separator"; then
10936 alldirs=
10937 for found_dir in $rpathdirs; do
10938 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10939 done
10940 acl_save_libdir="$libdir"
10941 libdir="$alldirs"
10942 eval flag=\"$hardcode_libdir_flag_spec\"
10943 libdir="$acl_save_libdir"
10944 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10945 else
10946 for found_dir in $rpathdirs; do
10947 acl_save_libdir="$libdir"
10948 libdir="$found_dir"
10949 eval flag=\"$hardcode_libdir_flag_spec\"
10950 libdir="$acl_save_libdir"
10951 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10952 done
10953 fi
10954 fi
10955 if test "X$ltrpathdirs" != "X"; then
10956 for found_dir in $ltrpathdirs; do
10957 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10958 done
10959 fi
10960
10961
10962
10963
10964
10965
10966
10967 am_save_CPPFLAGS="$CPPFLAGS"
10968
10969 for element in $INCICONV; do
10970 haveit=
10971 for x in $CPPFLAGS; do
10972
10973 acl_save_prefix="$prefix"
10974 prefix="$acl_final_prefix"
10975 acl_save_exec_prefix="$exec_prefix"
10976 exec_prefix="$acl_final_exec_prefix"
10977 eval x=\"$x\"
10978 exec_prefix="$acl_save_exec_prefix"
10979 prefix="$acl_save_prefix"
10980
10981 if test "X$x" = "X$element"; then
10982 haveit=yes
10983 break
10984 fi
10985 done
10986 if test -z "$haveit"; then
10987 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10988 fi
10989 done
eb158727
ZW
10990
10991
ba479fd2
NN
10992 echo "$as_me:$LINENO: checking for iconv" >&5
10993echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10994if test "${am_cv_func_iconv+set}" = set; then
10995 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10996else
ba479fd2 10997
f91abfce
TT
10998 am_cv_func_iconv="no, consider installing GNU libiconv"
10999 am_cv_lib_iconv=no
ba479fd2 11000 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11001/* confdefs.h. */
11002_ACEOF
11003cat confdefs.h >>conftest.$ac_ext
11004cat >>conftest.$ac_ext <<_ACEOF
11005/* end confdefs.h. */
f91abfce
TT
11006#include <stdlib.h>
11007#include <iconv.h>
ba479fd2
NN
11008int
11009main ()
11010{
f91abfce
TT
11011iconv_t cd = iconv_open("","");
11012 iconv(cd,NULL,NULL,NULL,NULL);
11013 iconv_close(cd);
ba479fd2
NN
11014 ;
11015 return 0;
11016}
11017_ACEOF
11018rm -f conftest.$ac_objext conftest$ac_exeext
11019if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 11020 (eval $ac_link) 2>conftest.er1
ba479fd2 11021 ac_status=$?
86da66b5
HPN
11022 grep -v '^ *+' conftest.er1 >conftest.err
11023 rm -f conftest.er1
11024 cat conftest.err >&5
ba479fd2
NN
11025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11026 (exit $ac_status); } &&
ec6c7392
PB
11027 { ac_try='test -z "$ac_c_werror_flag"
11028 || test ! -s conftest.err'
86da66b5
HPN
11029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11030 (eval $ac_try) 2>&5
11031 ac_status=$?
11032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11033 (exit $ac_status); }; } &&
11034 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
11035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11036 (eval $ac_try) 2>&5
11037 ac_status=$?
11038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11039 (exit $ac_status); }; }; then
f91abfce
TT
11040 am_cv_func_iconv=yes
11041else
ba479fd2
NN
11042 echo "$as_me: failed program was:" >&5
11043sed 's/^/| /' conftest.$ac_ext >&5
11044
f91abfce 11045fi
86da66b5
HPN
11046rm -f conftest.err conftest.$ac_objext \
11047 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11048 if test "$am_cv_func_iconv" != yes; then
11049 am_save_LIBS="$LIBS"
dfb77e37 11050 LIBS="$LIBS $LIBICONV"
ba479fd2 11051 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11052/* confdefs.h. */
11053_ACEOF
11054cat confdefs.h >>conftest.$ac_ext
11055cat >>conftest.$ac_ext <<_ACEOF
11056/* end confdefs.h. */
f91abfce
TT
11057#include <stdlib.h>
11058#include <iconv.h>
ba479fd2
NN
11059int
11060main ()
11061{
f91abfce
TT
11062iconv_t cd = iconv_open("","");
11063 iconv(cd,NULL,NULL,NULL,NULL);
11064 iconv_close(cd);
ba479fd2
NN
11065 ;
11066 return 0;
11067}
11068_ACEOF
11069rm -f conftest.$ac_objext conftest$ac_exeext
11070if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 11071 (eval $ac_link) 2>conftest.er1
ba479fd2 11072 ac_status=$?
86da66b5
HPN
11073 grep -v '^ *+' conftest.er1 >conftest.err
11074 rm -f conftest.er1
11075 cat conftest.err >&5
ba479fd2
NN
11076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11077 (exit $ac_status); } &&
ec6c7392
PB
11078 { ac_try='test -z "$ac_c_werror_flag"
11079 || test ! -s conftest.err'
86da66b5
HPN
11080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11081 (eval $ac_try) 2>&5
11082 ac_status=$?
11083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11084 (exit $ac_status); }; } &&
11085 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
11086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11087 (eval $ac_try) 2>&5
11088 ac_status=$?
11089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11090 (exit $ac_status); }; }; then
f91abfce
TT
11091 am_cv_lib_iconv=yes
11092 am_cv_func_iconv=yes
11093else
ba479fd2
NN
11094 echo "$as_me: failed program was:" >&5
11095sed 's/^/| /' conftest.$ac_ext >&5
11096
f91abfce 11097fi
86da66b5
HPN
11098rm -f conftest.err conftest.$ac_objext \
11099 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11100 LIBS="$am_save_LIBS"
11101 fi
6e3f3080 11102
ba479fd2
NN
11103fi
11104echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
11105echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 11106 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11107
11108cat >>confdefs.h <<\_ACEOF
f91abfce 11109#define HAVE_ICONV 1
ba479fd2 11110_ACEOF
f91abfce 11111
dfb77e37
KC
11112 fi
11113 if test "$am_cv_lib_iconv" = yes; then
11114 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
11115echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
11116 echo "$as_me:$LINENO: result: $LIBICONV" >&5
11117echo "${ECHO_T}$LIBICONV" >&6
11118 else
11119 CPPFLAGS="$am_save_CPPFLAGS"
11120 LIBICONV=
11121 LTLIBICONV=
11122 fi
11123
11124
11125
11126 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11127 echo "$as_me:$LINENO: checking for iconv declaration" >&5
11128echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
11129 if test "${am_cv_proto_iconv+set}" = set; then
11130 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11131else
ba479fd2
NN
11132
11133 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11134/* confdefs.h. */
11135_ACEOF
11136cat confdefs.h >>conftest.$ac_ext
11137cat >>conftest.$ac_ext <<_ACEOF
11138/* end confdefs.h. */
f91abfce
TT
11139
11140#include <stdlib.h>
11141#include <iconv.h>
11142extern
11143#ifdef __cplusplus
11144"C"
11145#endif
11146#if defined(__STDC__) || defined(__cplusplus)
11147size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11148#else
11149size_t iconv();
11150#endif
11151
ba479fd2
NN
11152int
11153main ()
11154{
f91abfce 11155
ba479fd2
NN
11156 ;
11157 return 0;
11158}
11159_ACEOF
11160rm -f conftest.$ac_objext
11161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11162 (eval $ac_compile) 2>conftest.er1
ba479fd2 11163 ac_status=$?
86da66b5
HPN
11164 grep -v '^ *+' conftest.er1 >conftest.err
11165 rm -f conftest.er1
11166 cat conftest.err >&5
ba479fd2
NN
11167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11168 (exit $ac_status); } &&
ec6c7392
PB
11169 { ac_try='test -z "$ac_c_werror_flag"
11170 || test ! -s conftest.err'
86da66b5
HPN
11171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11172 (eval $ac_try) 2>&5
11173 ac_status=$?
11174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11175 (exit $ac_status); }; } &&
11176 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11178 (eval $ac_try) 2>&5
11179 ac_status=$?
11180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11181 (exit $ac_status); }; }; then
f91abfce
TT
11182 am_cv_proto_iconv_arg1=""
11183else
ba479fd2
NN
11184 echo "$as_me: failed program was:" >&5
11185sed 's/^/| /' conftest.$ac_ext >&5
11186
11187am_cv_proto_iconv_arg1="const"
f91abfce 11188fi
86da66b5 11189rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
11190 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);"
11191fi
11192
11193 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
11194 echo "$as_me:$LINENO: result: ${ac_t:-
11195 }$am_cv_proto_iconv" >&5
11196echo "${ECHO_T}${ac_t:-
11197 }$am_cv_proto_iconv" >&6
11198
11199cat >>confdefs.h <<_ACEOF
f91abfce 11200#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 11201_ACEOF
f91abfce
TT
11202
11203 fi
f91abfce 11204
56694dd9
ZW
11205# Until we have in-tree GNU iconv:
11206LIBICONV_DEP=
11207
11208
18fc9bd4
RG
11209
11210 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11211echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
11212if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11213 echo $ECHO_N "(cached) $ECHO_C" >&6
11214else
11215 cat >conftest.$ac_ext <<_ACEOF
11216/* confdefs.h. */
11217_ACEOF
11218cat confdefs.h >>conftest.$ac_ext
11219cat >>conftest.$ac_ext <<_ACEOF
11220/* end confdefs.h. */
11221#include <locale.h>
11222int
11223main ()
11224{
11225return LC_MESSAGES
11226 ;
11227 return 0;
11228}
11229_ACEOF
11230rm -f conftest.$ac_objext conftest$ac_exeext
11231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11232 (eval $ac_link) 2>conftest.er1
11233 ac_status=$?
11234 grep -v '^ *+' conftest.er1 >conftest.err
11235 rm -f conftest.er1
11236 cat conftest.err >&5
11237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11238 (exit $ac_status); } &&
11239 { ac_try='test -z "$ac_c_werror_flag"
11240 || test ! -s conftest.err'
11241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11242 (eval $ac_try) 2>&5
11243 ac_status=$?
11244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11245 (exit $ac_status); }; } &&
11246 { ac_try='test -s conftest$ac_exeext'
11247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11248 (eval $ac_try) 2>&5
11249 ac_status=$?
11250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11251 (exit $ac_status); }; }; then
11252 am_cv_val_LC_MESSAGES=yes
11253else
11254 echo "$as_me: failed program was:" >&5
11255sed 's/^/| /' conftest.$ac_ext >&5
11256
11257am_cv_val_LC_MESSAGES=no
11258fi
11259rm -f conftest.err conftest.$ac_objext \
11260 conftest$ac_exeext conftest.$ac_ext
11261fi
11262echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11263echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
11264 if test $am_cv_val_LC_MESSAGES = yes; then
11265
11266cat >>confdefs.h <<\_ACEOF
11267#define HAVE_LC_MESSAGES 1
11268_ACEOF
11269
11270 fi
11271
f91abfce 11272
a03ea89b
BM
11273
11274 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11275echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11276if test "${am_cv_langinfo_codeset+set}" = set; then
11277 echo $ECHO_N "(cached) $ECHO_C" >&6
11278else
11279 cat >conftest.$ac_ext <<_ACEOF
11280/* confdefs.h. */
11281_ACEOF
11282cat confdefs.h >>conftest.$ac_ext
11283cat >>conftest.$ac_ext <<_ACEOF
11284/* end confdefs.h. */
11285#include <langinfo.h>
11286int
11287main ()
11288{
11289char* cs = nl_langinfo(CODESET);
11290 ;
11291 return 0;
11292}
11293_ACEOF
11294rm -f conftest.$ac_objext conftest$ac_exeext
11295if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11296 (eval $ac_link) 2>conftest.er1
11297 ac_status=$?
11298 grep -v '^ *+' conftest.er1 >conftest.err
11299 rm -f conftest.er1
11300 cat conftest.err >&5
11301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11302 (exit $ac_status); } &&
ec6c7392
PB
11303 { ac_try='test -z "$ac_c_werror_flag"
11304 || test ! -s conftest.err'
a03ea89b
BM
11305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11306 (eval $ac_try) 2>&5
11307 ac_status=$?
11308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11309 (exit $ac_status); }; } &&
11310 { ac_try='test -s conftest$ac_exeext'
11311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11312 (eval $ac_try) 2>&5
11313 ac_status=$?
11314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11315 (exit $ac_status); }; }; then
11316 am_cv_langinfo_codeset=yes
11317else
11318 echo "$as_me: failed program was:" >&5
11319sed 's/^/| /' conftest.$ac_ext >&5
11320
11321am_cv_langinfo_codeset=no
11322fi
11323rm -f conftest.err conftest.$ac_objext \
11324 conftest$ac_exeext conftest.$ac_ext
11325
11326fi
11327echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11328echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11329 if test $am_cv_langinfo_codeset = yes; then
11330
11331cat >>confdefs.h <<\_ACEOF
11332#define HAVE_LANGINFO_CODESET 1
11333_ACEOF
11334
11335 fi
11336
11337
86cf1cbd
KG
11338# We will need to find libiberty.h and ansidecl.h
11339saved_CFLAGS="$CFLAGS"
11340CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
6a257778 11362
ad6717df
PB
11363
11364
0d667716
KG
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
367e8319 11375
0d667716
KG
11376
11377
7391b66c 11378
ed5b9f96
GK
11379
11380for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
11381 strsignal strstr strverscmp \
11382 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 11383 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 11384do
ad6717df 11385 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11386echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11387echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11388if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11389 echo $ECHO_N "(cached) $ECHO_C" >&6
11390else
11391 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11392/* confdefs.h. */
11393_ACEOF
11394cat confdefs.h >>conftest.$ac_ext
11395cat >>conftest.$ac_ext <<_ACEOF
11396/* end confdefs.h. */
7afe8c41
KG
11397#undef $ac_tr_decl
11398#define $ac_tr_decl 1
ba479fd2 11399
d02af173 11400#include "ansidecl.h"
86cf1cbd 11401#include "system.h"
f31e826b 11402
ba479fd2
NN
11403int
11404main ()
11405{
86cf1cbd
KG
11406#ifndef $ac_func
11407char *(*pfn) = (char *(*)) $ac_func ;
11408#endif
ba479fd2
NN
11409 ;
11410 return 0;
11411}
11412_ACEOF
11413rm -f conftest.$ac_objext
11414if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11415 (eval $ac_compile) 2>conftest.er1
ba479fd2 11416 ac_status=$?
86da66b5
HPN
11417 grep -v '^ *+' conftest.er1 >conftest.err
11418 rm -f conftest.er1
11419 cat conftest.err >&5
ba479fd2
NN
11420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11421 (exit $ac_status); } &&
ec6c7392
PB
11422 { ac_try='test -z "$ac_c_werror_flag"
11423 || test ! -s conftest.err'
86da66b5
HPN
11424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11425 (eval $ac_try) 2>&5
11426 ac_status=$?
11427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11428 (exit $ac_status); }; } &&
11429 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11431 (eval $ac_try) 2>&5
11432 ac_status=$?
11433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11434 (exit $ac_status); }; }; then
f31e826b 11435 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11436else
ba479fd2
NN
11437 echo "$as_me: failed program was:" >&5
11438sed 's/^/| /' conftest.$ac_ext >&5
11439
11440eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11441fi
86da66b5 11442rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11443fi
11444
f31e826b 11445if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11446 echo "$as_me:$LINENO: result: yes" >&5
11447echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11448#define $ac_tr_decl 1
ba479fd2
NN
11449_ACEOF
11450
81bf3d9e 11451else
ba479fd2
NN
11452 echo "$as_me:$LINENO: result: no" >&5
11453echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11454#define $ac_tr_decl 0
ba479fd2
NN
11455_ACEOF
11456
81bf3d9e
RH
11457fi
11458
11459done
ba479fd2 11460
ba479fd2 11461
ba479fd2 11462
81bf3d9e 11463
81bf3d9e
RH
11464
11465for ac_func in getrlimit setrlimit getrusage
11466do
ad6717df 11467 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11468echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11469echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11470if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11471 echo $ECHO_N "(cached) $ECHO_C" >&6
11472else
11473 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11474/* confdefs.h. */
11475_ACEOF
11476cat confdefs.h >>conftest.$ac_ext
11477cat >>conftest.$ac_ext <<_ACEOF
11478/* end confdefs.h. */
7afe8c41
KG
11479#undef $ac_tr_decl
11480#define $ac_tr_decl 1
ba479fd2 11481
d02af173 11482#include "ansidecl.h"
86cf1cbd 11483#include "system.h"
81bf3d9e
RH
11484#ifdef HAVE_SYS_RESOURCE_H
11485#include <sys/resource.h>
11486#endif
11487
f31e826b 11488
ba479fd2
NN
11489int
11490main ()
11491{
86cf1cbd
KG
11492#ifndef $ac_func
11493char *(*pfn) = (char *(*)) $ac_func ;
11494#endif
ba479fd2
NN
11495 ;
11496 return 0;
11497}
11498_ACEOF
11499rm -f conftest.$ac_objext
11500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11501 (eval $ac_compile) 2>conftest.er1
ba479fd2 11502 ac_status=$?
86da66b5
HPN
11503 grep -v '^ *+' conftest.er1 >conftest.err
11504 rm -f conftest.er1
11505 cat conftest.err >&5
ba479fd2
NN
11506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11507 (exit $ac_status); } &&
ec6c7392
PB
11508 { ac_try='test -z "$ac_c_werror_flag"
11509 || test ! -s conftest.err'
86da66b5
HPN
11510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11511 (eval $ac_try) 2>&5
11512 ac_status=$?
11513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11514 (exit $ac_status); }; } &&
11515 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11517 (eval $ac_try) 2>&5
11518 ac_status=$?
11519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11520 (exit $ac_status); }; }; then
f31e826b 11521 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11522else
ba479fd2
NN
11523 echo "$as_me: failed program was:" >&5
11524sed 's/^/| /' conftest.$ac_ext >&5
11525
11526eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11527fi
86da66b5 11528rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11529fi
11530
f31e826b 11531if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11532 echo "$as_me:$LINENO: result: yes" >&5
11533echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11534#define $ac_tr_decl 1
ba479fd2
NN
11535_ACEOF
11536
81bf3d9e 11537else
ba479fd2
NN
11538 echo "$as_me:$LINENO: result: no" >&5
11539echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11540#define $ac_tr_decl 0
ba479fd2
NN
11541_ACEOF
11542
81bf3d9e
RH
11543fi
11544
11545done
86cf1cbd 11546
81bf3d9e 11547
ba479fd2 11548cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11549/* confdefs.h. */
11550_ACEOF
11551cat confdefs.h >>conftest.$ac_ext
11552cat >>conftest.$ac_ext <<_ACEOF
11553/* end confdefs.h. */
b2522d2b
HPN
11554
11555#include "ansidecl.h"
11556#include "system.h"
11557#ifdef HAVE_SYS_RESOURCE_H
11558#include <sys/resource.h>
11559#endif
11560
ba479fd2
NN
11561int
11562main ()
11563{
b2522d2b 11564rlim_t l = 0;
ba479fd2
NN
11565 ;
11566 return 0;
11567}
11568_ACEOF
11569rm -f conftest.$ac_objext
11570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11571 (eval $ac_compile) 2>conftest.er1
ba479fd2 11572 ac_status=$?
86da66b5
HPN
11573 grep -v '^ *+' conftest.er1 >conftest.err
11574 rm -f conftest.er1
11575 cat conftest.err >&5
ba479fd2
NN
11576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11577 (exit $ac_status); } &&
ec6c7392
PB
11578 { ac_try='test -z "$ac_c_werror_flag"
11579 || test ! -s conftest.err'
86da66b5
HPN
11580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11581 (eval $ac_try) 2>&5
11582 ac_status=$?
11583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11584 (exit $ac_status); }; } &&
11585 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11587 (eval $ac_try) 2>&5
11588 ac_status=$?
11589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11590 (exit $ac_status); }; }; then
b2522d2b
HPN
11591 :
11592else
ba479fd2
NN
11593 echo "$as_me: failed program was:" >&5
11594sed 's/^/| /' conftest.$ac_ext >&5
11595
11596
11597cat >>confdefs.h <<\_ACEOF
b2522d2b 11598#define rlim_t long
ba479fd2 11599_ACEOF
b2522d2b
HPN
11600
11601fi
86da66b5 11602rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 11603
2102b2fe
RS
11604# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11605# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11606# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11607# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 11608
351df804 11609for ac_func in ldgetname
c1800ec8 11610do
ad6717df 11611 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11612echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11613echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11614if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11615 echo $ECHO_N "(cached) $ECHO_C" >&6
11616else
11617 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11618/* confdefs.h. */
11619_ACEOF
11620cat confdefs.h >>conftest.$ac_ext
11621cat >>conftest.$ac_ext <<_ACEOF
11622/* end confdefs.h. */
c1800ec8
ZW
11623#undef $ac_tr_decl
11624#define $ac_tr_decl 1
ba479fd2 11625
351df804
KG
11626#include "ansidecl.h"
11627#include "system.h"
11628#ifdef HAVE_LDFCN_H
2102b2fe
RS
11629#undef FREAD
11630#undef FWRITE
351df804
KG
11631#include <ldfcn.h>
11632#endif
11633
11634
ba479fd2
NN
11635int
11636main ()
11637{
351df804
KG
11638#ifndef $ac_func
11639char *(*pfn) = (char *(*)) $ac_func ;
11640#endif
ba479fd2
NN
11641 ;
11642 return 0;
11643}
11644_ACEOF
11645rm -f conftest.$ac_objext
11646if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11647 (eval $ac_compile) 2>conftest.er1
ba479fd2 11648 ac_status=$?
86da66b5
HPN
11649 grep -v '^ *+' conftest.er1 >conftest.err
11650 rm -f conftest.er1
11651 cat conftest.err >&5
ba479fd2
NN
11652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11653 (exit $ac_status); } &&
ec6c7392
PB
11654 { ac_try='test -z "$ac_c_werror_flag"
11655 || test ! -s conftest.err'
86da66b5
HPN
11656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11657 (eval $ac_try) 2>&5
11658 ac_status=$?
11659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11660 (exit $ac_status); }; } &&
11661 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11663 (eval $ac_try) 2>&5
11664 ac_status=$?
11665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11666 (exit $ac_status); }; }; then
351df804
KG
11667 eval "gcc_cv_have_decl_$ac_func=yes"
11668else
ba479fd2
NN
11669 echo "$as_me: failed program was:" >&5
11670sed 's/^/| /' conftest.$ac_ext >&5
11671
11672eval "gcc_cv_have_decl_$ac_func=no"
351df804 11673fi
86da66b5 11674rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
11675fi
11676
11677if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11678 echo "$as_me:$LINENO: result: yes" >&5
11679echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11680#define $ac_tr_decl 1
ba479fd2
NN
11681_ACEOF
11682
351df804 11683else
ba479fd2
NN
11684 echo "$as_me:$LINENO: result: no" >&5
11685echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11686#define $ac_tr_decl 0
ba479fd2
NN
11687_ACEOF
11688
351df804
KG
11689fi
11690
11691done
ba479fd2 11692
351df804
KG
11693
11694
11695for ac_func in times
11696do
ad6717df 11697 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11698echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11699echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11700if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11701 echo $ECHO_N "(cached) $ECHO_C" >&6
11702else
11703 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11704/* confdefs.h. */
11705_ACEOF
11706cat confdefs.h >>conftest.$ac_ext
11707cat >>conftest.$ac_ext <<_ACEOF
11708/* end confdefs.h. */
351df804
KG
11709#undef $ac_tr_decl
11710#define $ac_tr_decl 1
ba479fd2 11711
c1800ec8
ZW
11712#include "ansidecl.h"
11713#include "system.h"
11714#ifdef HAVE_SYS_TIMES_H
11715#include <sys/times.h>
11716#endif
11717
11718
ba479fd2
NN
11719int
11720main ()
11721{
c1800ec8
ZW
11722#ifndef $ac_func
11723char *(*pfn) = (char *(*)) $ac_func ;
11724#endif
ba479fd2
NN
11725 ;
11726 return 0;
11727}
11728_ACEOF
11729rm -f conftest.$ac_objext
11730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11731 (eval $ac_compile) 2>conftest.er1
ba479fd2 11732 ac_status=$?
86da66b5
HPN
11733 grep -v '^ *+' conftest.er1 >conftest.err
11734 rm -f conftest.er1
11735 cat conftest.err >&5
ba479fd2
NN
11736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11737 (exit $ac_status); } &&
ec6c7392
PB
11738 { ac_try='test -z "$ac_c_werror_flag"
11739 || test ! -s conftest.err'
86da66b5
HPN
11740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11741 (eval $ac_try) 2>&5
11742 ac_status=$?
11743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11744 (exit $ac_status); }; } &&
11745 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11747 (eval $ac_try) 2>&5
11748 ac_status=$?
11749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11750 (exit $ac_status); }; }; then
c1800ec8
ZW
11751 eval "gcc_cv_have_decl_$ac_func=yes"
11752else
ba479fd2
NN
11753 echo "$as_me: failed program was:" >&5
11754sed 's/^/| /' conftest.$ac_ext >&5
11755
11756eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 11757fi
86da66b5 11758rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
11759fi
11760
11761if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11762 echo "$as_me:$LINENO: result: yes" >&5
11763echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11764#define $ac_tr_decl 1
ba479fd2
NN
11765_ACEOF
11766
c1800ec8 11767else
ba479fd2
NN
11768 echo "$as_me:$LINENO: result: no" >&5
11769echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11770#define $ac_tr_decl 0
ba479fd2
NN
11771_ACEOF
11772
c1800ec8
ZW
11773fi
11774
11775done
c1800ec8
ZW
11776
11777
4f6d8cc8
GK
11778
11779for ac_func in sigaltstack
11780do
11781 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
11782echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11783echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11784if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11785 echo $ECHO_N "(cached) $ECHO_C" >&6
11786else
11787 cat >conftest.$ac_ext <<_ACEOF
11788/* confdefs.h. */
11789_ACEOF
11790cat confdefs.h >>conftest.$ac_ext
11791cat >>conftest.$ac_ext <<_ACEOF
11792/* end confdefs.h. */
11793#undef $ac_tr_decl
11794#define $ac_tr_decl 1
11795
11796#include "ansidecl.h"
11797#include "system.h"
11798#include <signal.h>
11799
11800
11801int
11802main ()
11803{
11804#ifndef $ac_func
11805char *(*pfn) = (char *(*)) $ac_func ;
11806#endif
11807 ;
11808 return 0;
11809}
11810_ACEOF
11811rm -f conftest.$ac_objext
11812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11813 (eval $ac_compile) 2>conftest.er1
11814 ac_status=$?
11815 grep -v '^ *+' conftest.er1 >conftest.err
11816 rm -f conftest.er1
11817 cat conftest.err >&5
11818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11819 (exit $ac_status); } &&
ec6c7392
PB
11820 { ac_try='test -z "$ac_c_werror_flag"
11821 || test ! -s conftest.err'
4f6d8cc8
GK
11822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11823 (eval $ac_try) 2>&5
11824 ac_status=$?
11825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11826 (exit $ac_status); }; } &&
11827 { ac_try='test -s conftest.$ac_objext'
11828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11829 (eval $ac_try) 2>&5
11830 ac_status=$?
11831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11832 (exit $ac_status); }; }; then
11833 eval "gcc_cv_have_decl_$ac_func=yes"
11834else
11835 echo "$as_me: failed program was:" >&5
11836sed 's/^/| /' conftest.$ac_ext >&5
11837
11838eval "gcc_cv_have_decl_$ac_func=no"
11839fi
11840rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11841fi
11842
11843if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
11844 echo "$as_me:$LINENO: result: yes" >&5
11845echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
11846#define $ac_tr_decl 1
11847_ACEOF
11848
11849else
11850 echo "$as_me:$LINENO: result: no" >&5
11851echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
11852#define $ac_tr_decl 0
11853_ACEOF
11854
11855fi
11856
11857done
11858
11859
c1800ec8 11860# More time-related stuff.
ba479fd2
NN
11861echo "$as_me:$LINENO: checking for struct tms" >&5
11862echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
11863if test "${ac_cv_struct_tms+set}" = set; then
11864 echo $ECHO_N "(cached) $ECHO_C" >&6
11865else
11866
11867cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11868/* confdefs.h. */
11869_ACEOF
11870cat confdefs.h >>conftest.$ac_ext
11871cat >>conftest.$ac_ext <<_ACEOF
11872/* end confdefs.h. */
c1800ec8
ZW
11873
11874#include "ansidecl.h"
11875#include "system.h"
11876#ifdef HAVE_SYS_TIMES_H
11877#include <sys/times.h>
11878#endif
11879
ba479fd2
NN
11880int
11881main ()
11882{
c1800ec8 11883struct tms tms;
ba479fd2
NN
11884 ;
11885 return 0;
11886}
11887_ACEOF
11888rm -f conftest.$ac_objext
11889if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11890 (eval $ac_compile) 2>conftest.er1
ba479fd2 11891 ac_status=$?
86da66b5
HPN
11892 grep -v '^ *+' conftest.er1 >conftest.err
11893 rm -f conftest.er1
11894 cat conftest.err >&5
ba479fd2
NN
11895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11896 (exit $ac_status); } &&
ec6c7392
PB
11897 { ac_try='test -z "$ac_c_werror_flag"
11898 || test ! -s conftest.err'
86da66b5
HPN
11899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11900 (eval $ac_try) 2>&5
11901 ac_status=$?
11902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11903 (exit $ac_status); }; } &&
11904 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11906 (eval $ac_try) 2>&5
11907 ac_status=$?
11908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11909 (exit $ac_status); }; }; then
c1800ec8
ZW
11910 ac_cv_struct_tms=yes
11911else
ba479fd2
NN
11912 echo "$as_me: failed program was:" >&5
11913sed 's/^/| /' conftest.$ac_ext >&5
11914
11915ac_cv_struct_tms=no
c1800ec8 11916fi
86da66b5 11917rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11918fi
ba479fd2
NN
11919echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11920echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 11921if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
11922
11923cat >>confdefs.h <<\_ACEOF
c1800ec8 11924#define HAVE_STRUCT_TMS 1
ba479fd2 11925_ACEOF
c1800ec8
ZW
11926
11927fi
11928
11929# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11930# revisit after autoconf 2.50.
ba479fd2
NN
11931echo "$as_me:$LINENO: checking for clock_t" >&5
11932echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
11933if test "${gcc_cv_type_clock_t+set}" = set; then
11934 echo $ECHO_N "(cached) $ECHO_C" >&6
11935else
11936
11937cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11938/* confdefs.h. */
11939_ACEOF
11940cat confdefs.h >>conftest.$ac_ext
11941cat >>conftest.$ac_ext <<_ACEOF
11942/* end confdefs.h. */
c1800ec8
ZW
11943
11944#include "ansidecl.h"
11945#include "system.h"
11946
ba479fd2
NN
11947int
11948main ()
11949{
c1800ec8 11950clock_t x;
ba479fd2
NN
11951 ;
11952 return 0;
11953}
11954_ACEOF
11955rm -f conftest.$ac_objext
11956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11957 (eval $ac_compile) 2>conftest.er1
ba479fd2 11958 ac_status=$?
86da66b5
HPN
11959 grep -v '^ *+' conftest.er1 >conftest.err
11960 rm -f conftest.er1
11961 cat conftest.err >&5
ba479fd2
NN
11962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11963 (exit $ac_status); } &&
ec6c7392
PB
11964 { ac_try='test -z "$ac_c_werror_flag"
11965 || test ! -s conftest.err'
86da66b5
HPN
11966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11967 (eval $ac_try) 2>&5
11968 ac_status=$?
11969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11970 (exit $ac_status); }; } &&
11971 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11973 (eval $ac_try) 2>&5
11974 ac_status=$?
11975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11976 (exit $ac_status); }; }; then
c1800ec8
ZW
11977 gcc_cv_type_clock_t=yes
11978else
ba479fd2
NN
11979 echo "$as_me: failed program was:" >&5
11980sed 's/^/| /' conftest.$ac_ext >&5
11981
11982gcc_cv_type_clock_t=no
c1800ec8 11983fi
86da66b5 11984rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11985fi
ba479fd2
NN
11986echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
11987echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 11988if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
11989
11990cat >>confdefs.h <<\_ACEOF
c1800ec8 11991#define HAVE_CLOCK_T 1
ba479fd2 11992_ACEOF
c1800ec8
ZW
11993
11994fi
11995
eb70d86d
AS
11996# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
11997CFLAGS="$saved_CFLAGS"
11998
07cf4226
DM
11999# Check whether --enable-initfini-array or --disable-initfini-array was given.
12000if test "${enable_initfini_array+set}" = set; then
12001 enableval="$enable_initfini_array"
ba479fd2 12002
07cf4226 12003else
ba479fd2
NN
12004
12005echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
12006echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
12007if test "${gcc_cv_initfini_array+set}" = set; then
12008 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 12009else
eb70d86d 12010 if test "$cross_compiling" = yes; then
918c4fe4 12011 gcc_cv_initfini_array=no
eb70d86d 12012else
ba479fd2 12013 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12014/* confdefs.h. */
12015_ACEOF
12016cat confdefs.h >>conftest.$ac_ext
12017cat >>conftest.$ac_ext <<_ACEOF
12018/* end confdefs.h. */
eb70d86d 12019
07cf4226
DM
12020static int x = -1;
12021int main (void) { return x; }
12022int foo (void) { x = 0; }
12023int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
12024_ACEOF
12025rm -f conftest$ac_exeext
12026if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12027 (eval $ac_link) 2>&5
12028 ac_status=$?
12029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12032 (eval $ac_try) 2>&5
12033 ac_status=$?
12034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12035 (exit $ac_status); }; }; then
918c4fe4 12036 gcc_cv_initfini_array=yes
eb70d86d 12037else
ba479fd2
NN
12038 echo "$as_me: program exited with status $ac_status" >&5
12039echo "$as_me: failed program was:" >&5
12040sed 's/^/| /' conftest.$ac_ext >&5
12041
12042( exit $ac_status )
12043gcc_cv_initfini_array=no
eb70d86d 12044fi
86da66b5 12045rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 12046fi
07cf4226 12047fi
ba479fd2
NN
12048echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
12049echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 12050 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 12051
ba479fd2 12052fi;
63cf211a 12053if test $enable_initfini_array = yes; then
ba479fd2
NN
12054
12055cat >>confdefs.h <<\_ACEOF
eb70d86d 12056#define HAVE_INITFINI_ARRAY 1
ba479fd2 12057_ACEOF
07cf4226 12058
eb70d86d 12059fi
81bf3d9e 12060
ba479fd2
NN
12061# mkdir takes a single argument on some systems.
12062echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
12063echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
12064if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
12065 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 12066else
ba479fd2 12067 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12068/* confdefs.h. */
12069_ACEOF
12070cat confdefs.h >>conftest.$ac_ext
12071cat >>conftest.$ac_ext <<_ACEOF
12072/* end confdefs.h. */
75923b2f
MK
12073
12074#include <sys/types.h>
12075#ifdef HAVE_SYS_STAT_H
12076# include <sys/stat.h>
12077#endif
12078#ifdef HAVE_UNISTD_H
12079# include <unistd.h>
12080#endif
12081#ifdef HAVE_DIRECT_H
12082# include <direct.h>
12083#endif
ba479fd2
NN
12084int
12085main ()
12086{
75923b2f 12087mkdir ("foo", 0);
ba479fd2
NN
12088 ;
12089 return 0;
12090}
12091_ACEOF
12092rm -f conftest.$ac_objext
12093if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 12094 (eval $ac_compile) 2>conftest.er1
ba479fd2 12095 ac_status=$?
86da66b5
HPN
12096 grep -v '^ *+' conftest.er1 >conftest.err
12097 rm -f conftest.er1
12098 cat conftest.err >&5
ba479fd2
NN
12099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12100 (exit $ac_status); } &&
ec6c7392
PB
12101 { ac_try='test -z "$ac_c_werror_flag"
12102 || test ! -s conftest.err'
86da66b5
HPN
12103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12104 (eval $ac_try) 2>&5
12105 ac_status=$?
12106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12107 (exit $ac_status); }; } &&
12108 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
12109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12110 (eval $ac_try) 2>&5
12111 ac_status=$?
12112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12113 (exit $ac_status); }; }; then
75923b2f
MK
12114 gcc_cv_mkdir_takes_one_arg=no
12115else
ba479fd2
NN
12116 echo "$as_me: failed program was:" >&5
12117sed 's/^/| /' conftest.$ac_ext >&5
12118
12119gcc_cv_mkdir_takes_one_arg=yes
75923b2f 12120fi
86da66b5 12121rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 12122fi
ba479fd2
NN
12123echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
12124echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 12125if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
12126
12127cat >>confdefs.h <<\_ACEOF
75923b2f 12128#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 12129_ACEOF
75923b2f
MK
12130
12131fi
12132
12133
861bb6c1
JL
12134# File extensions
12135manext='.1'
12136objext='.o'
12137
12138
12139
4977bab6
ZW
12140# With Setjmp/Longjmp based exception handling.
12141# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
12142if test "${enable_sjlj_exceptions+set}" = set; then
12143 enableval="$enable_sjlj_exceptions"
12144 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 12145
ba479fd2
NN
12146cat >>confdefs.h <<_ACEOF
12147#define CONFIG_SJLJ_EXCEPTIONS $sjlj
12148_ACEOF
4977bab6 12149
ba479fd2 12150fi;
4977bab6 12151
443728bb
L
12152# For platforms with the unwind ABI which includes an unwind library,
12153# libunwind, we can choose to use the system libunwind.
4977bab6 12154
443728bb
L
12155# Check whether --with-system-libunwind or --without-system-libunwind was given.
12156if test "${with_system_libunwind+set}" = set; then
12157 withval="$with_system_libunwind"
4977bab6 12158
ba479fd2 12159fi;
4977bab6 12160
34a86c2b
NN
12161# --------------------------------------------------------
12162# Build, host, and target specific configuration fragments
12163# --------------------------------------------------------
12164
5b28c537
NN
12165# Collect build-machine-specific information.
12166. ${srcdir}/config.build
12167
a89ea0df
NN
12168# Collect host-machine-specific information.
12169. ${srcdir}/config.host
12170
ef69da62 12171target_gtfiles=
a89ea0df
NN
12172
12173# Collect target-machine-specific information.
8ad9fb33 12174. ${srcdir}/config.gcc
861bb6c1
JL
12175
12176extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 12177extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
12178
12179# Default the target-machine variables that were not explicitly set.
75bffa71 12180if test x"$tm_file" = x
861bb6c1
JL
12181then tm_file=$cpu_type/$cpu_type.h; fi
12182
6b2adea9 12183if test x"$extra_headers" = x
861bb6c1
JL
12184then extra_headers=; fi
12185
75bffa71 12186if test x$md_file = x
e98e406f 12187then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 12188
75bffa71 12189if test x$out_file = x
861bb6c1
JL
12190then out_file=$cpu_type/$cpu_type.c; fi
12191
75bffa71 12192if test x"$tmake_file" = x
861bb6c1
JL
12193then tmake_file=$cpu_type/t-$cpu_type
12194fi
12195
90e6a802 12196if test x"$dwarf2" = xyes
756ee602 12197then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
12198fi
12199
861bb6c1 12200# Say what files are being used for the output code and MD file.
11642c3a 12201echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
12202echo "Using \`$srcdir/config/$md_file' as machine description file."
12203
11642c3a 12204# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
12205# about them and drop them.
12206
11642c3a
ZW
12207bx=
12208for x in $build_xm_file; do
12209 if test -f $srcdir/config/$x
12210 then bx="$bx $x"
ba479fd2
NN
12211 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12212echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12213 fi
12214done
12215build_xm_file="$bx"
12216
12217hx=
12218for x in $host_xm_file; do
12219 if test -f $srcdir/config/$x
12220 then hx="$hx $x"
ba479fd2
NN
12221 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12222echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12223 fi
12224done
12225host_xm_file="$hx"
12226
12227tx=
12228for x in $xm_file; do
12229 if test -f $srcdir/config/$x
12230 then tx="$tx $x"
ba479fd2
NN
12231 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12232echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12233 fi
12234done
12235xm_file="$tx"
12236
861bb6c1
JL
12237count=a
12238for f in $tm_file; do
12239 count=${count}x
12240done
75bffa71 12241if test $count = ax; then
861bb6c1
JL
12242 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
12243else
12244 echo "Using the following target machine macro files:"
12245 for f in $tm_file; do
12246 echo " $srcdir/config/$f"
12247 done
12248fi
12249
4977bab6 12250if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
12251
12252cat >>confdefs.h <<\_ACEOF
4977bab6 12253#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 12254_ACEOF
4977bab6
ZW
12255
12256fi
12257
99fa8911
AP
12258if test x$use_long_long_for_widest_fast_int = xyes; then
12259
12260cat >>confdefs.h <<\_ACEOF
12261#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12262_ACEOF
12263
12264fi
12265
861bb6c1
JL
12266count=a
12267for f in $host_xm_file; do
12268 count=${count}x
12269done
11642c3a
ZW
12270if test $count = a; then
12271 :
12272elif test $count = ax; then
861bb6c1
JL
12273 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12274else
12275 echo "Using the following host machine macro files:"
12276 for f in $host_xm_file; do
12277 echo " $srcdir/config/$f"
12278 done
12279fi
476d9098 12280echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 12281
75bffa71 12282if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
12283 count=a
12284 for f in $build_xm_file; do
12285 count=${count}x
12286 done
11642c3a
ZW
12287 if test $count = a; then
12288 :
12289 elif test $count = ax; then
861bb6c1
JL
12290 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12291 else
12292 echo "Using the following build machine macro files:"
12293 for f in $build_xm_file; do
12294 echo " $srcdir/config/$f"
12295 done
12296 fi
12297fi
12298
4f6d8cc8
GK
12299case ${host} in
12300 powerpc-*-darwin*)
12301 echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
12302echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6
12303if test "${gcc_cv_mcontext_underscores+set}" = set; then
12304 echo $ECHO_N "(cached) $ECHO_C" >&6
12305else
12306 cat >conftest.$ac_ext <<_ACEOF
12307
de4fb767 12308#include <sys/signal.h>
4f6d8cc8
GK
12309#include <ucontext.h>
12310int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
12311
12312_ACEOF
12313rm -f conftest.$ac_objext
12314if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12315 (eval $ac_compile) 2>conftest.er1
12316 ac_status=$?
12317 grep -v '^ *+' conftest.er1 >conftest.err
12318 rm -f conftest.er1
12319 cat conftest.err >&5
12320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12321 (exit $ac_status); } &&
ec6c7392
PB
12322 { ac_try='test -z "$ac_c_werror_flag"
12323 || test ! -s conftest.err'
4f6d8cc8
GK
12324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12325 (eval $ac_try) 2>&5
12326 ac_status=$?
12327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12328 (exit $ac_status); }; } &&
12329 { ac_try='test -s conftest.$ac_objext'
12330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12331 (eval $ac_try) 2>&5
12332 ac_status=$?
12333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12334 (exit $ac_status); }; }; then
12335 gcc_cv_mcontext_underscores=no
12336else
12337 echo "$as_me: failed program was:" >&5
12338sed 's/^/| /' conftest.$ac_ext >&5
12339
12340gcc_cv_mcontext_underscores=yes
12341fi
12342rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12343fi
12344echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
12345echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6
12346 if test $gcc_cv_mcontext_underscores = yes; then
12347
12348cat >>confdefs.h <<\_ACEOF
12349#define HAS_MCONTEXT_T_UNDERSCORES
12350_ACEOF
12351
12352 fi
12353 ;;
12354esac
12355
8bb915b6
NN
12356# ---------
12357# Threading
12358# ---------
12359
c2e494a8 12360# Check if a valid thread package
615be2cf 12361case ${enable_threads} in
c2e494a8
NN
12362 "" | no)
12363 # No threads
12364 target_thread_file='single'
12365 ;;
12366 yes)
12367 # default
12368 target_thread_file='single'
12369 ;;
18167442 12370 aix | dce | gnat | irix | posix | posix95 | rtems | \
769e49eb 12371 single | solaris | vxworks | win32 )
615be2cf 12372 target_thread_file=${enable_threads}
c2e494a8
NN
12373 ;;
12374 *)
615be2cf 12375 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
12376 exit 1
12377 ;;
12378esac
12379
12380if test x${thread_file} = x; then
12381 # No thread file set by target-specific clauses in config.gcc,
12382 # so use file chosen by default logic above
12383 thread_file=${target_thread_file}
861bb6c1
JL
12384fi
12385
8bb915b6
NN
12386# Make gthr-default.h if we have a thread file.
12387gthread_flags=
12388if test $thread_file != single; then
12389 rm -f gthr-default.h
12390 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12391 gthread_flags=-DHAVE_GTHR_DEFAULT
12392fi
12393
12394
12395# --------
12396# UNSORTED
12397# --------
12398
18fbf599 12399use_cxa_atexit=no
2121a768
JT
12400if test x$enable___cxa_atexit = xyes || \
12401 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599
PB
12402 if test x$host = x$target; then
12403 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
354b7da5
DH
12404echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
12405if test "${ac_cv_func___cxa_atexit+set}" = set; then
12406 echo $ECHO_N "(cached) $ECHO_C" >&6
12407else
12408 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
12409/* confdefs.h. */
12410_ACEOF
12411cat confdefs.h >>conftest.$ac_ext
12412cat >>conftest.$ac_ext <<_ACEOF
12413/* end confdefs.h. */
86da66b5
HPN
12414/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12415 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12416#define __cxa_atexit innocuous___cxa_atexit
12417
354b7da5
DH
12418/* System header to define __stub macros and hopefully few prototypes,
12419 which can conflict with char __cxa_atexit (); below.
12420 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12421 <limits.h> exists even on freestanding compilers. */
86da66b5 12422
354b7da5
DH
12423#ifdef __STDC__
12424# include <limits.h>
12425#else
12426# include <assert.h>
12427#endif
86da66b5
HPN
12428
12429#undef __cxa_atexit
12430
354b7da5
DH
12431/* Override any gcc2 internal prototype to avoid an error. */
12432#ifdef __cplusplus
12433extern "C"
12434{
12435#endif
12436/* We use char because int might match the return type of a gcc2
12437 builtin and then its argument prototype would still apply. */
12438char __cxa_atexit ();
12439/* The GNU C library defines this for functions which it implements
12440 to always fail with ENOSYS. Some functions are actually named
12441 something starting with __ and the normal name is an alias. */
12442#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
12443choke me
12444#else
12445char (*f) () = __cxa_atexit;
12446#endif
12447#ifdef __cplusplus
12448}
12449#endif
12450
12451int
12452main ()
12453{
12454return f != __cxa_atexit;
12455 ;
12456 return 0;
12457}
12458_ACEOF
12459rm -f conftest.$ac_objext conftest$ac_exeext
12460if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12461 (eval $ac_link) 2>conftest.er1
354b7da5 12462 ac_status=$?
86da66b5
HPN
12463 grep -v '^ *+' conftest.er1 >conftest.err
12464 rm -f conftest.er1
12465 cat conftest.err >&5
354b7da5
DH
12466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12467 (exit $ac_status); } &&
ec6c7392
PB
12468 { ac_try='test -z "$ac_c_werror_flag"
12469 || test ! -s conftest.err'
86da66b5
HPN
12470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12471 (eval $ac_try) 2>&5
12472 ac_status=$?
12473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12474 (exit $ac_status); }; } &&
12475 { ac_try='test -s conftest$ac_exeext'
354b7da5
DH
12476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12477 (eval $ac_try) 2>&5
12478 ac_status=$?
12479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12480 (exit $ac_status); }; }; then
12481 ac_cv_func___cxa_atexit=yes
12482else
12483 echo "$as_me: failed program was:" >&5
12484sed 's/^/| /' conftest.$ac_ext >&5
12485
12486ac_cv_func___cxa_atexit=no
12487fi
86da66b5
HPN
12488rm -f conftest.err conftest.$ac_objext \
12489 conftest$ac_exeext conftest.$ac_ext
354b7da5
DH
12490fi
12491echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12492echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
12493if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
12494 use_cxa_atexit=yes
12495else
12496 echo "__cxa_atexit can't be enabled on this target"
12497fi
12498
12499 else
12500 # We can't check for __cxa_atexit when building a cross, so assume
12501 # it is available
12502 use_cxa_atexit=yes
12503 fi
12504 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
12505
12506cat >>confdefs.h <<\_ACEOF
c7b5e395 12507#define DEFAULT_USE_CXA_ATEXIT 2
ba479fd2 12508_ACEOF
2121a768 12509
18fbf599 12510 fi
2121a768
JT
12511fi
12512
a5381466 12513# Look for a file containing extra machine modes.
1c0ca89d
ZW
12514if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12515 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
12516
12517
12518cat >>confdefs.h <<_ACEOF
e22340b0 12519#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 12520_ACEOF
a5381466
ZW
12521
12522fi
12523
75685792
RS
12524# Convert extra_options into a form suitable for Makefile use.
12525extra_opt_files=
12526for f in $extra_options; do
12527 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12528done
12529
12530
b7cb92ad 12531# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 12532# the first file included by config.h.
4977bab6 12533# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 12534# as well. If host!=build, we are in error and need to do more
db81d74a 12535# work to find out the build config parameters.
75bffa71 12536if test x$host = x$build
db81d74a 12537then
eaf4e618 12538 build_auto=auto-host.h
b7cb92ad
JL
12539else
12540 # We create a subdir, then run autoconf in the subdir.
12541 # To prevent recursion we set host and build for the new
12542 # invocation of configure to the build for this invocation
ba479fd2 12543 # of configure.
b7cb92ad
JL
12544 tempdir=build.$$
12545 rm -rf $tempdir
12546 mkdir $tempdir
12547 cd $tempdir
12548 case ${srcdir} in
255b8a49 12549 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
12550 *) realsrcdir=../${srcdir};;
12551 esac
d920e825
L
12552 saved_CFLAGS="${CFLAGS}"
12553 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12554 ${realsrcdir}/configure \
33e70558 12555 --enable-languages=${enable_languages-all} \
534d0cc0 12556 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 12557 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
12558
12559 # We just finished tests for the build machine, so rename
12560 # the file auto-build.h in the gcc directory.
12561 mv auto-host.h ../auto-build.h
12562 cd ..
12563 rm -rf $tempdir
eaf4e618 12564 build_auto=auto-build.h
db81d74a
RH
12565fi
12566
06f0b04c 12567
eaf4e618 12568tm_file="${tm_file} defaults.h"
4977bab6
ZW
12569tm_p_file="${tm_p_file} tm-preds.h"
12570host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12571build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 12572# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 12573# put this back in temporarily.
232b67d9 12574xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 12575
34a86c2b
NN
12576# --------
12577# UNSORTED
12578# --------
12579
cc1e60ea 12580# Compile in configure arguments.
8105825d 12581if test -f configargs.h ; then
cc1e60ea 12582 # Being re-configured.
022dae81 12583 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
12584 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12585else
12586 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12587fi
eeae7b41
DJ
12588
12589# Double all backslashes and backslash all quotes to turn
12590# gcc_config_arguments into a C string.
12591sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12592$gcc_config_arguments
12593EOF
12594gcc_config_arguments_str=`cat conftest.out`
12595rm -f conftest.out
12596
cc1e60ea
JM
12597cat > configargs.h <<EOF
12598/* Generated automatically. */
eeae7b41 12599static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 12600static const char thread_model[] = "$thread_file";
7816bea0
DJ
12601
12602static const struct {
12603 const char *name, *value;
12604} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
12605EOF
12606
ab87f8c8 12607# Internationalization
18fc9bd4
RG
12608# If we haven't got the data from the intl directory,
12609# assume NLS is disabled.
12610USE_NLS=no
12611LIBINTL=
12612LIBINTL_DEP=
12613INCINTL=
12614XGETTEXT=
12615GMSGFMT=
12616POSUB=
12617
12618if test -f ../intl/config.intl; then
12619 . ../intl/config.intl
12620fi
12621echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12622echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
12623if test x"$USE_NLS" != xyes; then
12624 echo "$as_me:$LINENO: result: no" >&5
12625echo "${ECHO_T}no" >&6
12626else
12627 echo "$as_me:$LINENO: result: yes" >&5
12628echo "${ECHO_T}yes" >&6
12629
12630cat >>confdefs.h <<\_ACEOF
12631#define ENABLE_NLS 1
12632_ACEOF
12633
12634
12635 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12636echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
12637 # Look for .po and .gmo files in the source directory.
12638 CATALOGS=
12639 XLINGUAS=
12640 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12641 # If there aren't any .gmo files the shell will give us the
12642 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12643 # weeded out.
12644 case "$cat" in *\**)
12645 continue;;
12646 esac
12647 # The quadruple backslash is collapsed to a double backslash
12648 # by the backticks, then collapsed again by the double quotes,
12649 # leaving us with one backslash in the sed expression (right
12650 # before the dot that mustn't act as a wildcard).
12651 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
12652 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
12653 # The user is allowed to set LINGUAS to a list of languages to
12654 # install catalogs for. If it's empty that means "all of them."
12655 if test "x$LINGUAS" = x; then
12656 CATALOGS="$CATALOGS $cat"
12657 XLINGUAS="$XLINGUAS $lang"
12658 else
12659 case "$LINGUAS" in *$lang*)
12660 CATALOGS="$CATALOGS $cat"
12661 XLINGUAS="$XLINGUAS $lang"
12662 ;;
12663 esac
12664 fi
12665 done
12666 LINGUAS="$XLINGUAS"
12667 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12668echo "${ECHO_T}$LINGUAS" >&6
12669
12670
12671 DATADIRNAME=share
12672
12673 INSTOBJEXT=.mo
12674
12675 GENCAT=gencat
12676
12677 CATOBJEXT=.gmo
12678
12679fi
861bb6c1 12680
56694dd9
ZW
12681# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12682# -liconv on the link line twice.
12683case "$LIBINTL" in *$LIBICONV*)
12684 LIBICONV= ;;
12685esac
dc6746e7 12686
7f970b70
AM
12687# Check whether --enable-secureplt or --disable-secureplt was given.
12688if test "${enable_secureplt+set}" = set; then
12689 enableval="$enable_secureplt"
12690
12691fi;
12692
56694dd9
ZW
12693# Windows32 Registry support for specifying GCC installation paths.
12694# Check whether --enable-win32-registry or --disable-win32-registry was given.
12695if test "${enable_win32_registry+set}" = set; then
12696 enableval="$enable_win32_registry"
dc6746e7 12697
ba479fd2 12698fi;
ba479fd2 12699
a1286ef5
ZW
12700case $host_os in
12701 win32 | pe | cygwin* | mingw32* | uwin*)
12702 if test "x$enable_win32_registry" != xno; then
12703 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
ba479fd2
NN
12704echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
12705if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12706 echo $ECHO_N "(cached) $ECHO_C" >&6
12707else
12708 ac_func_search_save_LIBS=$LIBS
12709ac_cv_search_RegOpenKeyExA=no
12710cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12711/* confdefs.h. */
12712_ACEOF
12713cat confdefs.h >>conftest.$ac_ext
12714cat >>conftest.$ac_ext <<_ACEOF
12715/* end confdefs.h. */
861bb6c1 12716
ab87f8c8 12717/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12718#ifdef __cplusplus
12719extern "C"
12720#endif
ab87f8c8 12721/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12722 builtin and then its argument prototype would still apply. */
12723char RegOpenKeyExA ();
12724int
12725main ()
12726{
12727RegOpenKeyExA ();
12728 ;
12729 return 0;
12730}
12731_ACEOF
12732rm -f conftest.$ac_objext conftest$ac_exeext
12733if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12734 (eval $ac_link) 2>conftest.er1
ba479fd2 12735 ac_status=$?
86da66b5
HPN
12736 grep -v '^ *+' conftest.er1 >conftest.err
12737 rm -f conftest.er1
12738 cat conftest.err >&5
ba479fd2
NN
12739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12740 (exit $ac_status); } &&
ec6c7392
PB
12741 { ac_try='test -z "$ac_c_werror_flag"
12742 || test ! -s conftest.err'
86da66b5
HPN
12743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12744 (eval $ac_try) 2>&5
12745 ac_status=$?
12746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12747 (exit $ac_status); }; } &&
12748 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12750 (eval $ac_try) 2>&5
12751 ac_status=$?
12752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12753 (exit $ac_status); }; }; then
56694dd9 12754 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 12755else
ba479fd2
NN
12756 echo "$as_me: failed program was:" >&5
12757sed 's/^/| /' conftest.$ac_ext >&5
12758
861bb6c1 12759fi
86da66b5
HPN
12760rm -f conftest.err conftest.$ac_objext \
12761 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
12762if test "$ac_cv_search_RegOpenKeyExA" = no; then
12763 for ac_lib in advapi32; do
12764 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12765 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12766/* confdefs.h. */
12767_ACEOF
12768cat confdefs.h >>conftest.$ac_ext
12769cat >>conftest.$ac_ext <<_ACEOF
12770/* end confdefs.h. */
12771
56694dd9 12772/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12773#ifdef __cplusplus
12774extern "C"
12775#endif
56694dd9 12776/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12777 builtin and then its argument prototype would still apply. */
12778char RegOpenKeyExA ();
12779int
12780main ()
12781{
12782RegOpenKeyExA ();
12783 ;
12784 return 0;
12785}
12786_ACEOF
12787rm -f conftest.$ac_objext conftest$ac_exeext
12788if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12789 (eval $ac_link) 2>conftest.er1
ba479fd2 12790 ac_status=$?
86da66b5
HPN
12791 grep -v '^ *+' conftest.er1 >conftest.err
12792 rm -f conftest.er1
12793 cat conftest.err >&5
ba479fd2
NN
12794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12795 (exit $ac_status); } &&
ec6c7392
PB
12796 { ac_try='test -z "$ac_c_werror_flag"
12797 || test ! -s conftest.err'
86da66b5
HPN
12798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12799 (eval $ac_try) 2>&5
12800 ac_status=$?
12801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12802 (exit $ac_status); }; } &&
12803 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12805 (eval $ac_try) 2>&5
12806 ac_status=$?
12807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12808 (exit $ac_status); }; }; then
12809 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 12810break
861bb6c1 12811else
ba479fd2
NN
12812 echo "$as_me: failed program was:" >&5
12813sed 's/^/| /' conftest.$ac_ext >&5
12814
861bb6c1 12815fi
86da66b5
HPN
12816rm -f conftest.err conftest.$ac_objext \
12817 conftest$ac_exeext conftest.$ac_ext
ba479fd2 12818 done
6e3f3080 12819fi
ba479fd2
NN
12820LIBS=$ac_func_search_save_LIBS
12821fi
12822echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
12823echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
12824if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 12825 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 12826
cafe096b 12827else
a1286ef5 12828 enable_win32_registry=no
093e61a6 12829fi
ab87f8c8 12830
a1286ef5
ZW
12831 fi
12832
12833 if test "x$enable_win32_registry" != xno; then
12834
12835cat >>confdefs.h <<\_ACEOF
12836#define ENABLE_WIN32_REGISTRY 1
12837_ACEOF
ab87f8c8 12838
a1286ef5
ZW
12839
12840 if test "x$enable_win32_registry" != xyes \
12841 && test "x$enable_win32_registry" != x; then
ba479fd2
NN
12842
12843cat >>confdefs.h <<_ACEOF
a1286ef5 12844#define WIN32_REGISTRY_KEY "$enable_win32_registry"
ba479fd2 12845_ACEOF
cafe096b 12846
a1286ef5
ZW
12847 fi
12848 fi
12849 ;;
56694dd9 12850esac
ab87f8c8 12851
56694dd9
ZW
12852# Get an absolute path to the GCC top-level source directory
12853holddir=`${PWDCMD-pwd}`
12854cd $srcdir
12855topdir=`${PWDCMD-pwd}`
12856cd $holddir
ab87f8c8 12857
56694dd9 12858# Conditionalize the makefile for this host machine.
2ed26f6b 12859xmake_file=
c406e779 12860for f in ${host_xmake_file}
56694dd9
ZW
12861do
12862 if test -f ${srcdir}/config/$f
12863 then
2ed26f6b 12864 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
12865 fi
12866done
093e61a6 12867
56694dd9 12868# Conditionalize the makefile for this target machine.
2ed26f6b 12869tmake_file_=
c406e779 12870for f in ${tmake_file}
56694dd9
ZW
12871do
12872 if test -f ${srcdir}/config/$f
12873 then
2ed26f6b 12874 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
12875 fi
12876done
2ed26f6b 12877tmake_file="${tmake_file_}"
71a94577 12878
ab87f8c8
JL
12879# If the host doesn't support symlinks, modify CC in
12880# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
12881# Otherwise, we can use "CC=$(CC)".
12882rm -f symtest.tem
35f06ae4
PB
12883case "$LN_S" in
12884 *-s*)
12885 cc_set_by_configure="\$(CC)"
12886 quoted_cc_set_by_configure="\$(CC)"
12887 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12888 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12889 ;;
12890 *)
12891 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
12892 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
12893 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
12894 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
12895 ;;
12896esac
ab87f8c8 12897
5395b47b
NN
12898# This is a terrible hack which will go away some day.
12899host_cc_for_libada=${CC}
1e3fad21
NN
12900
12901
ab87f8c8
JL
12902out_object_file=`basename $out_file .c`.o
12903
75685792
RS
12904tm_file_list="options.h"
12905tm_include_list="options.h"
ab87f8c8 12906for f in $tm_file; do
64ccbc99 12907 case $f in
d02af173 12908 defaults.h )
e22340b0
ZW
12909 tm_file_list="${tm_file_list} \$(srcdir)/$f"
12910 tm_include_list="${tm_include_list} $f"
12911 ;;
12912 * )
12913 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
12914 tm_include_list="${tm_include_list} config/$f"
12915 ;;
64ccbc99 12916 esac
ab87f8c8
JL
12917done
12918
11642c3a 12919tm_p_file_list=
e22340b0 12920tm_p_include_list=
11642c3a 12921for f in $tm_p_file; do
4977bab6
ZW
12922 case $f in
12923 tm-preds.h )
e22340b0
ZW
12924 tm_p_file_list="${tm_p_file_list} $f"
12925 tm_p_include_list="${tm_p_include_list} $f"
12926 ;;
12927 * )
12928 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
12929 tm_p_include_list="${tm_p_include_list} config/$f"
12930 esac
12931done
12932
12933xm_file_list=
12934xm_include_list=
12935for f in $xm_file; do
12936 case $f in
12937 ansidecl.h )
12938 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
12939 xm_include_list="${xm_include_list} $f"
12940 ;;
12941 auto-host.h )
12942 xm_file_list="${xm_file_list} $f"
12943 xm_include_list="${xm_include_list} $f"
12944 ;;
12945 * )
12946 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
12947 xm_include_list="${xm_include_list} config/$f"
12948 ;;
4977bab6 12949 esac
11642c3a
ZW
12950done
12951
ab87f8c8 12952host_xm_file_list=
e22340b0 12953host_xm_include_list=
ab87f8c8 12954for f in $host_xm_file; do
64ccbc99 12955 case $f in
d02af173 12956 ansidecl.h )
e22340b0
ZW
12957 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
12958 host_xm_include_list="${host_xm_include_list} $f"
12959 ;;
e2500fed 12960 auto-host.h )
e22340b0
ZW
12961 host_xm_file_list="${host_xm_file_list} $f"
12962 host_xm_include_list="${host_xm_include_list} $f"
12963 ;;
12964 * )
12965 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
12966 host_xm_include_list="${host_xm_include_list} config/$f"
12967 ;;
64ccbc99 12968 esac
ab87f8c8
JL
12969done
12970
12971build_xm_file_list=
12972for f in $build_xm_file; do
64ccbc99 12973 case $f in
d02af173 12974 ansidecl.h )
e22340b0
ZW
12975 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
12976 build_xm_include_list="${build_xm_include_list} $f"
12977 ;;
e2500fed 12978 auto-build.h | auto-host.h )
e22340b0
ZW
12979 build_xm_file_list="${build_xm_file_list} $f"
12980 build_xm_include_list="${build_xm_include_list} $f"
12981 ;;
12982 * )
12983 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
12984 build_xm_include_list="${build_xm_include_list} config/$f"
12985 ;;
64ccbc99 12986 esac
ab87f8c8
JL
12987done
12988
a078a589
ZW
12989# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
12990# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
12991CROSS=
12992ALL=all.internal
12993SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
12994
12995if test "x$with_build_sysroot" != x; then
12996 build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)'
12997else
12998 # This value is used, even on a native system, because
12999 # CROSS_SYSTEM_HEADER_DIR is just
13000 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
13001 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
13002fi
13003
ab87f8c8
JL
13004if test x$host != x$target
13005then
a078a589
ZW
13006 CROSS="-DCROSS_COMPILE"
13007 ALL=all.cross
160633c6 13008 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 13009 case "$host","$target" in
3a7e8b87
GK
13010 # Darwin crosses can use the host system's libraries and headers,
13011 # because of the fat library support. Of course, it must be the
13012 # same version of Darwin on both sides. Allow the user to
13013 # just say --target=foo-darwin without a version number to mean
13014 # "the version on this system".
13015 *-*-darwin*,*-*-darwin*)
13016 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
13017 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
13018 if test $hostos = $targetos -o $targetos = darwin ; then
13019 CROSS=
13020 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
13021 with_headers=yes
13022 fi
13023 ;;
13024
343f59d9
AM
13025 i?86-*-*,x86_64-*-* \
13026 | powerpc*-*-*,powerpc64*-*-*)
13027 CROSS="$CROSS -DNATIVE_CROSS" ;;
13028 esac
7a615b25 13029elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 13030 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
13031fi
13032
b39d221a
EC
13033# If this is a cross-compiler that does not
13034# have its own set of headers then define
13035# inhibit_libc
13036
dc06db20
R
13037# If this is using newlib, without having the headers available now,
13038# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
13039# This prevents libgcc2 from containing any code which requires libc
13040# support.
160633c6 13041inhibit_libc=false
dc06db20
R
13042if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
13043 test x$with_newlib = xyes ; } &&
e50084fa 13044 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 13045 inhibit_libc=true
b39d221a
EC
13046fi
13047
13048
a078a589
ZW
13049# When building gcc with a cross-compiler, we need to adjust things so
13050# that the generator programs are still built with the native compiler.
13051# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
13052
13053# These are the normal (build=host) settings:
ba479fd2
NN
13054CC_FOR_BUILD='$(CC)'
13055BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 13056STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
13057
13058# Possibly disable fixproto, on a per-target basis.
13059case ${use_fixproto} in
13060 no)
13061 STMP_FIXPROTO=
13062 ;;
13063 yes)
13064 STMP_FIXPROTO=stmp-fixproto
13065 ;;
13066esac
13067
a078a589 13068
83599948
NS
13069# And these apply if build != host, or we are generating coverage data
13070if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 13071then
b11e4747 13072 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 13073
7a615b25 13074 if test "x$TARGET_SYSTEM_ROOT" = x; then
d8e5117d 13075 if test "x$STMP_FIXPROTO" != x; then
de253ca4
GK
13076 STMP_FIXPROTO=stmp-install-fixproto
13077 fi
7a615b25 13078 fi
ab87f8c8
JL
13079fi
13080
13081# Expand extra_headers to include complete path.
13082# This substitutes for lots of t-* files.
13083extra_headers_list=
b1ef58c8
NN
13084# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
13085for file in ${extra_headers} ; do
13086 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
13087done
ab87f8c8 13088
c38f02df
ILT
13089# Define collect2 in Makefile.
13090case $host_can_use_collect2 in
13091 no) collect2= ;;
13092 *) collect2='collect2$(exeext)' ;;
13093esac
13094
13095
ab87f8c8 13096# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
13097case $use_collect2 in
13098 no) use_collect2= ;;
13099 "") ;;
ba479fd2 13100 *)
34a86c2b
NN
13101 host_xm_defines="${host_xm_defines} USE_COLLECT2"
13102 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
13103 case $host_can_use_collect2 in
13104 no)
13105 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
13106echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
13107 { (exit 1); exit 1; }; }
13108 ;;
13109 esac
34a86c2b
NN
13110 ;;
13111esac
ab87f8c8 13112
8bb915b6
NN
13113# ---------------------------
13114# Assembler & linker features
13115# ---------------------------
13116
d869a8c4
NN
13117# Identify the assembler which will work hand-in-glove with the newly
13118# built GCC, so that we can examine its features. This is the assembler
13119# which will be driven by the driver program.
13120#
13121# If build != host, and we aren't building gas in-tree, we identify a
13122# build->target assembler and hope that it will have the same features
13123# as the host->target assembler we'll be using.
981d4858
JM
13124gcc_cv_gas_major_version=
13125gcc_cv_gas_minor_version=
ab87f8c8 13126gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
e8b05380
PB
13127
13128if test "${gcc_cv_as+set}" = set; then
13129 :
13130else
13131
ab87f8c8
JL
13132if test -x "$DEFAULT_ASSEMBLER"; then
13133 gcc_cv_as="$DEFAULT_ASSEMBLER"
34a86c2b 13134elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
13135 && test -f ../gas/Makefile \
13136 && test x$build = x$host; then
e8b05380
PB
13137 gcc_cv_as=../gas/as-new$build_exeext
13138elif test -x as$build_exeext; then
13139 # Build using assembler in the current directory.
13140 gcc_cv_as=./as$build_exeext
13141elif test -x $AS_FOR_TARGET; then
13142 gcc_cv_as="$AS_FOR_TARGET"
13143else
13144 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
13145set dummy $AS_FOR_TARGET; ac_word=$2
13146echo "$as_me:$LINENO: checking for $ac_word" >&5
13147echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13148if test "${ac_cv_path_gcc_cv_as+set}" = set; then
13149 echo $ECHO_N "(cached) $ECHO_C" >&6
13150else
13151 case $gcc_cv_as in
13152 [\\/]* | ?:[\\/]*)
13153 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
13154 ;;
13155 *)
13156 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13157for as_dir in $PATH
13158do
13159 IFS=$as_save_IFS
13160 test -z "$as_dir" && as_dir=.
13161 for ac_exec_ext in '' $ac_executable_extensions; do
13162 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13163 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
13164 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13165 break 2
13166 fi
13167done
13168done
13169
13170 ;;
13171esac
13172fi
13173gcc_cv_as=$ac_cv_path_gcc_cv_as
13174
13175if test -n "$gcc_cv_as"; then
13176 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13177echo "${ECHO_T}$gcc_cv_as" >&6
13178else
13179 echo "$as_me:$LINENO: result: no" >&5
13180echo "${ECHO_T}no" >&6
13181fi
13182
13183fi
13184fi
13185
13186
13187ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
13188
13189
13190echo "$as_me:$LINENO: checking what assembler to use" >&5
13191echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
13192if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
08d105fa
AO
13193 # Single tree build which includes gas. We want to prefer it
13194 # over whatever linker top-level may have detected, since
13195 # we'll use what we're building after installation anyway.
e8b05380
PB
13196 echo "$as_me:$LINENO: result: newly built gas" >&5
13197echo "${ECHO_T}newly built gas" >&6
ad9c4d9f
NN
13198 in_tree_gas=yes
13199 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
13200for f in $gcc_cv_as_bfd_srcdir/configure \
13201 $gcc_cv_as_gas_srcdir/configure \
13202 $gcc_cv_as_gas_srcdir/configure.in \
13203 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 13204 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
13205 if test x$gcc_cv_gas_version != x; then
13206 break
13207 fi
13208done
13209gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
13210gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13211gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
13212case $gcc_cv_gas_patch_version in
13213 "") gcc_cv_gas_patch_version="0" ;;
13214esac
8ada417f
ZW
13215gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
13216 + $gcc_cv_gas_minor_version \) \* 1000 \
13217 + $gcc_cv_gas_patch_version`
ad9c4d9f 13218
5408ac6c
HPN
13219 in_tree_gas_is_elf=no
13220 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
13221 || (grep 'obj_format = multi' ../gas/Makefile \
13222 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
13223 then
13224 in_tree_gas_is_elf=yes
13225 fi
e8b05380
PB
13226else
13227 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13228echo "${ECHO_T}$gcc_cv_as" >&6
13229 in_tree_gas=no
981d4858 13230fi
9e423e6d 13231
e8b05380
PB
13232# Identify the linker which will work hand-in-glove with the newly
13233# built GCC, so that we can examine its features. This is the linker
13234# which will be driven by the driver program.
9f18db39 13235#
e8b05380
PB
13236# If build != host, and we aren't building gas in-tree, we identify a
13237# build->target linker and hope that it will have the same features
13238# as the host->target linker we'll be using.
13239gcc_cv_gld_major_version=
13240gcc_cv_gld_minor_version=
13241gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
13242gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9f18db39 13243
e8b05380
PB
13244if test "${gcc_cv_ld+set}" = set; then
13245 :
9f18db39 13246else
9f18db39 13247
e8b05380
PB
13248if test -x "$DEFAULT_LINKER"; then
13249 gcc_cv_ld="$DEFAULT_LINKER"
13250elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
13251 && test -f ../ld/Makefile \
13252 && test x$build = x$host; then
13253 gcc_cv_ld=../ld/ld-new$build_exeext
13254elif test -x collect-ld$build_exeext; then
13255 # Build using linker in the current directory.
13256 gcc_cv_ld=./collect-ld$build_exeext
13257elif test -x $LD_FOR_TARGET; then
13258 gcc_cv_ld="$LD_FOR_TARGET"
13259else
13260 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
13261set dummy $LD_FOR_TARGET; ac_word=$2
d739199a
DJ
13262echo "$as_me:$LINENO: checking for $ac_word" >&5
13263echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13264if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
d739199a
DJ
13265 echo $ECHO_N "(cached) $ECHO_C" >&6
13266else
e8b05380 13267 case $gcc_cv_ld in
d739199a 13268 [\\/]* | ?:[\\/]*)
e8b05380 13269 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
13270 ;;
13271 *)
13272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13273for as_dir in $PATH
13274do
13275 IFS=$as_save_IFS
13276 test -z "$as_dir" && as_dir=.
13277 for ac_exec_ext in '' $ac_executable_extensions; do
13278 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13279 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13280 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13281 break 2
13282 fi
13283done
13284done
13285
13286 ;;
13287esac
13288fi
e8b05380 13289gcc_cv_ld=$ac_cv_path_gcc_cv_ld
d739199a 13290
e8b05380
PB
13291if test -n "$gcc_cv_ld"; then
13292 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13293echo "${ECHO_T}$gcc_cv_ld" >&6
d739199a
DJ
13294else
13295 echo "$as_me:$LINENO: result: no" >&5
13296echo "${ECHO_T}no" >&6
13297fi
13298
13299fi
e8b05380
PB
13300fi
13301
13302
13303ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
13304
13305
13306echo "$as_me:$LINENO: checking what linker to use" >&5
13307echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
13308if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
13309 # Single tree build which includes ld. We want to prefer it
13310 # over whatever linker top-level may have detected, since
13311 # we'll use what we're building after installation anyway.
13312 echo "$as_me:$LINENO: result: newly built ld" >&5
13313echo "${ECHO_T}newly built ld" >&6
13314 in_tree_ld=yes
13315 in_tree_ld_is_elf=no
13316 if (grep 'EMUL = .*elf' ../ld/Makefile \
13317 || grep 'EMUL = .*linux' ../ld/Makefile \
13318 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
13319 in_tree_ld_is_elf=yes
13320 fi
13321 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
13322 do
13323 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
13324 if test x$gcc_cv_gld_version != x; then
13325 break
13326 fi
13327 done
13328 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
13329 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13330else
13331 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13332echo "${ECHO_T}$gcc_cv_ld" >&6
13333 in_tree_ld=no
13334fi
13335
13336# Figure out what nm we will be using.
13337gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
13338if test "${gcc_cv_nm+set}" = set; then
13339 :
13340else
13341
13342if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
13343 && test -f ../binutils/Makefile \
13344 && test x$build = x$host; then
e8b05380
PB
13345 gcc_cv_nm=../binutils/nm-new$build_exeext
13346elif test -x nm$build_exeext; then
13347 gcc_cv_nm=./nm$build_exeext
13348elif test -x $NM_FOR_TARGET; then
13349 gcc_cv_nm="$NM_FOR_TARGET"
13350else
13351 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
13352set dummy $NM_FOR_TARGET; ac_word=$2
d739199a
DJ
13353echo "$as_me:$LINENO: checking for $ac_word" >&5
13354echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13355if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
d739199a
DJ
13356 echo $ECHO_N "(cached) $ECHO_C" >&6
13357else
e8b05380 13358 case $gcc_cv_nm in
d739199a 13359 [\\/]* | ?:[\\/]*)
e8b05380 13360 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
13361 ;;
13362 *)
13363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13364for as_dir in $PATH
13365do
13366 IFS=$as_save_IFS
13367 test -z "$as_dir" && as_dir=.
13368 for ac_exec_ext in '' $ac_executable_extensions; do
13369 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13370 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13371 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13372 break 2
13373 fi
13374done
13375done
13376
13377 ;;
13378esac
13379fi
e8b05380 13380gcc_cv_nm=$ac_cv_path_gcc_cv_nm
d739199a 13381
e8b05380
PB
13382if test -n "$gcc_cv_nm"; then
13383 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13384echo "${ECHO_T}$gcc_cv_nm" >&6
d739199a
DJ
13385else
13386 echo "$as_me:$LINENO: result: no" >&5
13387echo "${ECHO_T}no" >&6
13388fi
13389
13390fi
e8b05380 13391fi
d739199a 13392
e8b05380
PB
13393
13394echo "$as_me:$LINENO: checking what nm to use" >&5
13395echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
13396if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
13397 # Single tree build which includes binutils.
13398 echo "$as_me:$LINENO: result: newly built nm" >&5
13399echo "${ECHO_T}newly built nm" >&6
13400 in_tree_nm=yes
13401else
13402 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13403echo "${ECHO_T}$gcc_cv_nm" >&6
13404 in_tree_nm=no
13405fi
13406
13407ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
13408
13409
13410# Figure out what objdump we will be using.
13411if test "${gcc_cv_objdump+set}" = set; then
13412 :
13413else
13414
13415if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
13416 && test -f ../binutils/Makefile \
13417 && test x$build = x$host; then
e8b05380
PB
13418 # Single tree build which includes binutils.
13419 gcc_cv_objdump=../binutils/objdump$build_exeext
13420elif test -x objdump$build_exeext; then
13421 gcc_cv_objdump=./objdump$build_exeext
13422elif test -x $OBJDUMP_FOR_TARGET; then
13423 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
13424else
13425 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
13426set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
9f18db39
PB
13427echo "$as_me:$LINENO: checking for $ac_word" >&5
13428echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13429if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
9f18db39
PB
13430 echo $ECHO_N "(cached) $ECHO_C" >&6
13431else
e8b05380 13432 case $gcc_cv_objdump in
9f18db39 13433 [\\/]* | ?:[\\/]*)
e8b05380 13434 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
13435 ;;
13436 *)
13437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 13438for as_dir in $PATH
9f18db39
PB
13439do
13440 IFS=$as_save_IFS
13441 test -z "$as_dir" && as_dir=.
13442 for ac_exec_ext in '' $ac_executable_extensions; do
13443 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13444 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
9f18db39
PB
13445 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13446 break 2
13447 fi
13448done
13449done
779243f7 13450
9f18db39
PB
13451 ;;
13452esac
13453fi
e8b05380 13454gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
9f18db39 13455
e8b05380
PB
13456if test -n "$gcc_cv_objdump"; then
13457 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13458echo "${ECHO_T}$gcc_cv_objdump" >&6
9f18db39
PB
13459else
13460 echo "$as_me:$LINENO: result: no" >&5
13461echo "${ECHO_T}no" >&6
13462fi
13463
e8b05380
PB
13464fi
13465fi
9f18db39 13466
e8b05380
PB
13467
13468echo "$as_me:$LINENO: checking what objdump to use" >&5
13469echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
13470if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
13471 # Single tree build which includes binutils.
13472 echo "$as_me:$LINENO: result: newly built objdump" >&5
13473echo "${ECHO_T}newly built objdump" >&6
13474elif test x$gcc_cv_objdump = x; then
13475 echo "$as_me:$LINENO: result: not found" >&5
13476echo "${ECHO_T}not found" >&6
13477else
13478 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13479echo "${ECHO_T}$gcc_cv_objdump" >&6
a2eafc76 13480fi
3cae5780 13481
981d4858 13482# Figure out what assembler alignment features are present.
ba479fd2
NN
13483echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13484echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
13485if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13486 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13487else
13488 gcc_cv_as_balign_and_p2align=no
13489 if test $in_tree_gas = yes; then
13490 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13491 then gcc_cv_as_balign_and_p2align=yes
13492fi
13493 elif test x$gcc_cv_as != x; then
6e3f3080 13494 echo '.balign 4
8ada417f 13495.p2align 2' > conftest.s
ba479fd2
NN
13496 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13498 (eval $ac_try) 2>&5
13499 ac_status=$?
13500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13501 (exit $ac_status); }; }
8ada417f
ZW
13502 then
13503 gcc_cv_as_balign_and_p2align=yes
13504 else
13505 echo "configure: failed program was" >&5
13506 cat conftest.s >&5
13507 fi
13508 rm -f conftest.o conftest.s
13509 fi
13510fi
ba479fd2
NN
13511echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13512echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 13513if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
13514
13515cat >>confdefs.h <<\_ACEOF
981d4858 13516#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 13517_ACEOF
981d4858 13518
ad9c4d9f
NN
13519fi
13520
ba479fd2
NN
13521echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13522echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
13523if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13524 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13525else
13526 gcc_cv_as_max_skip_p2align=no
13527 if test $in_tree_gas = yes; then
13528 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13529 then gcc_cv_as_max_skip_p2align=yes
13530fi
13531 elif test x$gcc_cv_as != x; then
6e3f3080 13532 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
13533 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13535 (eval $ac_try) 2>&5
13536 ac_status=$?
13537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13538 (exit $ac_status); }; }
8ada417f
ZW
13539 then
13540 gcc_cv_as_max_skip_p2align=yes
13541 else
13542 echo "configure: failed program was" >&5
13543 cat conftest.s >&5
13544 fi
13545 rm -f conftest.o conftest.s
13546 fi
ad9c4d9f 13547fi
ba479fd2
NN
13548echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13549echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 13550if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
13551
13552cat >>confdefs.h <<\_ACEOF
9e423e6d 13553#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 13554_ACEOF
9e423e6d 13555
9e423e6d 13556fi
ad9c4d9f 13557
ba479fd2
NN
13558echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13559echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
13560if test "${gcc_cv_as_subsection_m1+set}" = set; then
13561 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13562else
13563 gcc_cv_as_subsection_m1=no
13564 if test $in_tree_gas = yes; then
13565 if test $in_tree_gas_is_elf = yes \
13566 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13567 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 13568fi
8ada417f 13569 elif test x$gcc_cv_as != x; then
6e3f3080 13570 echo 'conftest_label1: .word 0
d1accaa3
JJ
13571.subsection -1
13572conftest_label2: .word 0
8ada417f 13573.previous' > conftest.s
ba479fd2
NN
13574 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13576 (eval $ac_try) 2>&5
13577 ac_status=$?
13578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13579 (exit $ac_status); }; }
8ada417f
ZW
13580 then
13581 if test x$gcc_cv_nm != x; then
13582 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13583 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13584 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13585 then :
13586 else gcc_cv_as_subsection_m1=yes
13587 fi
13588 rm -f conftest.nm1 conftest.nm2
13589 fi
13590 else
13591 echo "configure: failed program was" >&5
13592 cat conftest.s >&5
13593 fi
13594 rm -f conftest.o conftest.s
13595 fi
981d4858 13596fi
ba479fd2
NN
13597echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13598echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 13599if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
13600
13601cat >>confdefs.h <<\_ACEOF
981d4858 13602#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 13603_ACEOF
981d4858 13604
d1accaa3 13605fi
ad9c4d9f 13606
ba479fd2
NN
13607echo "$as_me:$LINENO: checking assembler for .weak" >&5
13608echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
13609if test "${gcc_cv_as_weak+set}" = set; then
13610 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13611else
13612 gcc_cv_as_weak=no
13613 if test $in_tree_gas = yes; then
13614 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13615 then gcc_cv_as_weak=yes
ad9c4d9f 13616fi
8ada417f 13617 elif test x$gcc_cv_as != x; then
6e3f3080 13618 echo ' .weak foobar' > conftest.s
ba479fd2
NN
13619 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13621 (eval $ac_try) 2>&5
13622 ac_status=$?
13623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13624 (exit $ac_status); }; }
8ada417f
ZW
13625 then
13626 gcc_cv_as_weak=yes
13627 else
13628 echo "configure: failed program was" >&5
13629 cat conftest.s >&5
13630 fi
13631 rm -f conftest.o conftest.s
13632 fi
981d4858 13633fi
ba479fd2
NN
13634echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13635echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 13636if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
13637
13638cat >>confdefs.h <<\_ACEOF
981d4858 13639#define HAVE_GAS_WEAK 1
ba479fd2 13640_ACEOF
981d4858 13641
12822146 13642fi
ad9c4d9f 13643
a0203ca7
AO
13644echo "$as_me:$LINENO: checking assembler for .weakref" >&5
13645echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
13646if test "${gcc_cv_as_weakref+set}" = set; then
13647 echo $ECHO_N "(cached) $ECHO_C" >&6
13648else
13649 gcc_cv_as_weakref=no
13650 if test $in_tree_gas = yes; then
13651 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
13652 then gcc_cv_as_weakref=yes
13653fi
13654 elif test x$gcc_cv_as != x; then
13655 echo ' .weakref foobar, barfnot' > conftest.s
13656 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13658 (eval $ac_try) 2>&5
13659 ac_status=$?
13660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13661 (exit $ac_status); }; }
13662 then
13663 gcc_cv_as_weakref=yes
13664 else
13665 echo "configure: failed program was" >&5
13666 cat conftest.s >&5
13667 fi
13668 rm -f conftest.o conftest.s
13669 fi
13670fi
13671echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
13672echo "${ECHO_T}$gcc_cv_as_weakref" >&6
13673if test $gcc_cv_as_weakref = yes; then
13674
13675cat >>confdefs.h <<\_ACEOF
13676#define HAVE_GAS_WEAKREF 1
13677_ACEOF
13678
13679fi
13680
e41f3691
JDA
13681echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13682echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
13683if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13684 echo $ECHO_N "(cached) $ECHO_C" >&6
13685else
13686 gcc_cv_as_nsubspa_comdat=no
13687 if test $in_tree_gas = yes; then
13688 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13689 then gcc_cv_as_nsubspa_comdat=yes
13690fi
13691 elif test x$gcc_cv_as != x; then
13692 echo ' .SPACE $TEXT$
13693 .NSUBSPA $CODE$,COMDAT' > conftest.s
13694 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13696 (eval $ac_try) 2>&5
13697 ac_status=$?
13698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13699 (exit $ac_status); }; }
13700 then
13701 gcc_cv_as_nsubspa_comdat=yes
13702 else
13703 echo "configure: failed program was" >&5
13704 cat conftest.s >&5
13705 fi
13706 rm -f conftest.o conftest.s
13707 fi
13708fi
13709echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13710echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
13711if test $gcc_cv_as_nsubspa_comdat = yes; then
13712
13713cat >>confdefs.h <<\_ACEOF
13714#define HAVE_GAS_NSUBSPA_COMDAT 1
13715_ACEOF
13716
13717fi
13718
8ada417f
ZW
13719# .hidden needs to be supported in both the assembler and the linker,
13720# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13721# This is irritatingly difficult to feature test for; we have to check the
13722# date string after the version number. If we've got an in-tree
13723# ld, we don't know its patchlevel version, so we set the baseline at 2.13
13724# to be safe.
13725# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
13726echo "$as_me:$LINENO: checking assembler for .hidden" >&5
13727echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
13728if test "${gcc_cv_as_hidden+set}" = set; then
13729 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13730else
13731 gcc_cv_as_hidden=no
13732 if test $in_tree_gas = yes; then
13733 if test $in_tree_gas_is_elf = yes \
13734 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
13735 then gcc_cv_as_hidden=yes
13736fi
13737 elif test x$gcc_cv_as != x; then
6e3f3080 13738 echo ' .hidden foobar
8ada417f 13739foobar:' > conftest.s
ba479fd2
NN
13740 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13742 (eval $ac_try) 2>&5
13743 ac_status=$?
13744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13745 (exit $ac_status); }; }
8ada417f
ZW
13746 then
13747 gcc_cv_as_hidden=yes
13748 else
13749 echo "configure: failed program was" >&5
13750 cat conftest.s >&5
13751 fi
13752 rm -f conftest.o conftest.s
13753 fi
13754fi
ba479fd2
NN
13755echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
13756echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 13757
ad9c4d9f 13758
ba479fd2
NN
13759echo "$as_me:$LINENO: checking linker for .hidden support" >&5
13760echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
13761if test "${gcc_cv_ld_hidden+set}" = set; then
13762 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13763else
13764 if test $in_tree_ld = yes ; then
13765 gcc_cv_ld_hidden=no
13766 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 \
13767 && test $in_tree_ld_is_elf = yes; then
13768 gcc_cv_ld_hidden=yes
13769 fi
13770else
13771 gcc_cv_ld_hidden=yes
bace148a 13772 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
13773 if echo "$ld_ver" | grep GNU > /dev/null; then
13774 ld_vers=`echo $ld_ver | sed -n \
13775 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13776 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13777 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13778 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13779 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
11176d2a
JB
13780 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13781 -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 13782 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
13783 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
13784 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
13785 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
13786 if test 0"$ld_date" -lt 20020404; then
13787 if test -n "$ld_date"; then
13788 # If there was date string, but was earlier than 2002-04-04, fail
13789 gcc_cv_ld_hidden=no
13790 elif test -z "$ld_vers"; then
13791 # If there was no date string nor ld version number, something is wrong
13792 gcc_cv_ld_hidden=no
13793 else
8ada417f
ZW
13794 test -z "$ld_vers_patch" && ld_vers_patch=0
13795 if test "$ld_vers_major" -lt 2; then
13796 gcc_cv_ld_hidden=no
13797 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
13798 gcc_cv_ld_hidden="no"
13799 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
13800 gcc_cv_ld_hidden=no
c72931a6 13801 fi
8ada417f 13802 fi
789b7de5 13803 fi
8ada417f 13804 else
28690784 13805 case "${target}" in
b0fd7d27 13806 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
13807 gcc_cv_ld_hidden=yes
13808 ;;
13809 *)
13810 gcc_cv_ld_hidden=no
13811 ;;
13812 esac
8ada417f
ZW
13813 fi
13814fi
6d07784a 13815fi
ba479fd2
NN
13816echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
13817echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 13818libgcc_visibility=no
ad9c4d9f 13819
232b67d9 13820
8e3940b2 13821if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 13822 libgcc_visibility=yes
ba479fd2
NN
13823
13824cat >>confdefs.h <<\_ACEOF
8ada417f 13825#define HAVE_GAS_HIDDEN 1
ba479fd2 13826_ACEOF
ad9c4d9f
NN
13827
13828fi
13829
8ada417f 13830# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
13831echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
13832echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
13833if test "${gcc_cv_as_leb128+set}" = set; then
13834 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13835else
13836 gcc_cv_as_leb128=no
13837 if test $in_tree_gas = yes; then
13838 if test $in_tree_gas_is_elf = yes \
13839 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
13840 then gcc_cv_as_leb128=yes
13841fi
13842 elif test x$gcc_cv_as != x; then
6e3f3080 13843 echo ' .data
b7460f24
RH
13844 .uleb128 L2 - L1
13845L1:
13846 .uleb128 1280
13847 .sleb128 -1010
8ada417f 13848L2:' > conftest.s
ba479fd2
NN
13849 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13851 (eval $ac_try) 2>&5
13852 ac_status=$?
13853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13854 (exit $ac_status); }; }
8ada417f
ZW
13855 then
13856 # GAS versions before 2.11 do not support uleb128,
13857 # despite appearing to.
13858 # ??? There exists an elf-specific test that will crash
13859 # the assembler. Perhaps it's better to figure out whether
13860 # arbitrary sections are supported and try the test.
bace148a 13861 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
13862 if echo "$as_ver" | grep GNU > /dev/null; then
13863 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
13864 as_major=`echo $as_ver | sed 's/\..*//'`
13865 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
13866 if test $as_major -eq 2 && test $as_minor -lt 11
13867 then :
13868 else gcc_cv_as_leb128=yes
13869 fi
13870 fi
13871 else
13872 echo "configure: failed program was" >&5
13873 cat conftest.s >&5
13874 fi
13875 rm -f conftest.o conftest.s
13876 fi
b7460f24 13877fi
ba479fd2
NN
13878echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
13879echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 13880if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
13881
13882cat >>confdefs.h <<\_ACEOF
b7460f24 13883#define HAVE_AS_LEB128 1
ba479fd2 13884_ACEOF
b7460f24
RH
13885
13886fi
ad9c4d9f 13887
8ada417f
ZW
13888# GAS versions up to and including 2.11.0 may mis-optimize
13889# .eh_frame data.
ba479fd2
NN
13890echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
13891echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
13892if test "${gcc_cv_as_eh_frame+set}" = set; then
13893 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13894else
13895 gcc_cv_as_eh_frame=no
13896 if test $in_tree_gas = yes; then
13897 if test $in_tree_gas_is_elf = yes \
13898 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13899 then gcc_cv_as_eh_frame=yes
ad9c4d9f 13900fi
8ada417f 13901 elif test x$gcc_cv_as != x; then
6e3f3080 13902 echo ' .text
c64688ae
RH
13903.LFB1:
13904 .4byte 0
13905.L1:
13906 .4byte 0
13907.LFE1:
13908 .section .eh_frame,"aw",@progbits
13909__FRAME_BEGIN__:
13910 .4byte .LECIE1-.LSCIE1
13911.LSCIE1:
13912 .4byte 0x0
13913 .byte 0x1
13914 .ascii "z\0"
13915 .byte 0x1
13916 .byte 0x78
13917 .byte 0x1a
13918 .byte 0x0
13919 .byte 0x4
13920 .4byte 1
13921 .p2align 1
13922.LECIE1:
13923.LSFDE1:
13924 .4byte .LEFDE1-.LASFDE1
13925.LASFDE1:
13926 .4byte .LASFDE1-__FRAME_BEGIN__
13927 .4byte .LFB1
13928 .4byte .LFE1-.LFB1
13929 .byte 0x4
13930 .4byte .LFE1-.LFB1
13931 .byte 0x4
13932 .4byte .L1-.LFB1
8ada417f 13933.LEFDE1:' > conftest.s
ba479fd2
NN
13934 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13936 (eval $ac_try) 2>&5
13937 ac_status=$?
13938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13939 (exit $ac_status); }; }
8ada417f
ZW
13940 then
13941 cat > conftest.lit <<EOF
c64688ae
RH
13942 0000 10000000 00000000 017a0001 781a0004 .........z..x...
13943 0010 01000000 12000000 18000000 00000000 ................
093e61a6 13944 0020 08000000 04080000 0044 .........D
01efb963 13945EOF
ba479fd2 13946cat > conftest.big <<EOF
01efb963
AS
13947 0000 00000010 00000000 017a0001 781a0004 .........z..x...
13948 0010 00000001 00000012 00000018 00000000 ................
093e61a6 13949 0020 00000008 04000000 0844 .........D
c64688ae 13950EOF
8ada417f
ZW
13951 # If the assembler didn't choke, and we can objdump,
13952 # and we got the correct data, then succeed.
13953 if test x$gcc_cv_objdump != x \
13954 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
13955 | tail -3 > conftest.got \
13956 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
13957 || cmp conftest.big conftest.got > /dev/null 2>&1; }
13958 then
13959 gcc_cv_as_eh_frame=yes
ba479fd2
NN
13960 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
13961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13962 (eval $ac_try) 2>&5
13963 ac_status=$?
13964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13965 (exit $ac_status); }; }; then
8ada417f
ZW
13966 gcc_cv_as_eh_frame=buggy
13967 else
13968 # Uh oh, what do we do now?
13969 gcc_cv_as_eh_frame=no
13970 fi
13971 else
13972 echo "configure: failed program was" >&5
13973 cat conftest.s >&5
13974 fi
13975 rm -f conftest.o conftest.s
13976 fi
c64688ae 13977fi
ba479fd2
NN
13978echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
13979echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 13980
6e3f3080 13981
63cf211a 13982if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
13983
13984cat >>confdefs.h <<\_ACEOF
8ada417f 13985#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 13986_ACEOF
ad9c4d9f
NN
13987
13988fi
13989
ba479fd2
NN
13990echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13991echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13992if test "${gcc_cv_as_shf_merge+set}" = set; then
13993 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13994else
13995 gcc_cv_as_shf_merge=no
13996 if test $in_tree_gas = yes; then
13997 if test $in_tree_gas_is_elf = yes \
13998 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13999 then gcc_cv_as_shf_merge=yes
14000fi
14001 elif test x$gcc_cv_as != x; then
6e3f3080 14002 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
14003 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14005 (eval $ac_try) 2>&5
14006 ac_status=$?
14007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14008 (exit $ac_status); }; }
8ada417f
ZW
14009 then
14010 gcc_cv_as_shf_merge=yes
14011 else
14012 echo "configure: failed program was" >&5
14013 cat conftest.s >&5
14014 fi
14015 rm -f conftest.o conftest.s
14016 fi
201556f0 14017fi
ba479fd2
NN
14018echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14019echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 14020
c18a5b6c
MM
14021if test $gcc_cv_as_shf_merge = no; then
14022 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14023echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
14024if test "${gcc_cv_as_shf_merge+set}" = set; then
14025 echo $ECHO_N "(cached) $ECHO_C" >&6
14026else
14027 gcc_cv_as_shf_merge=no
14028 if test $in_tree_gas = yes; then
14029 if test $in_tree_gas_is_elf = yes \
14030 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14031 then gcc_cv_as_shf_merge=yes
14032fi
14033 elif test x$gcc_cv_as != x; then
14034 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
14035 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14037 (eval $ac_try) 2>&5
14038 ac_status=$?
14039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14040 (exit $ac_status); }; }
14041 then
14042 gcc_cv_as_shf_merge=yes
14043 else
14044 echo "configure: failed program was" >&5
14045 cat conftest.s >&5
14046 fi
14047 rm -f conftest.o conftest.s
14048 fi
14049fi
14050echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14051echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
14052
14053fi
8ad9fb33 14054
ba479fd2 14055cat >>confdefs.h <<_ACEOF
8ad9fb33 14056#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 14057_ACEOF
201556f0 14058
201556f0 14059
c18a5b6c
MM
14060echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14061echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
14062if test "${gcc_cv_as_comdat_group+set}" = set; then
14063 echo $ECHO_N "(cached) $ECHO_C" >&6
14064else
14065 gcc_cv_as_comdat_group=no
14066 if test $in_tree_gas = yes; then
14067 if test $in_tree_gas_is_elf = yes \
11176d2a 14068 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14069 then gcc_cv_as_comdat_group=yes
14070fi
14071 elif test x$gcc_cv_as != x; then
14072 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
14073 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14075 (eval $ac_try) 2>&5
14076 ac_status=$?
14077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14078 (exit $ac_status); }; }
14079 then
14080 gcc_cv_as_comdat_group=yes
14081 else
14082 echo "configure: failed program was" >&5
14083 cat conftest.s >&5
14084 fi
14085 rm -f conftest.o conftest.s
14086 fi
14087fi
14088echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
14089echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
14090
14091if test $gcc_cv_as_comdat_group = yes; then
14092 gcc_cv_as_comdat_group_percent=no
14093else
14094 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14095echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
14096if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
14097 echo $ECHO_N "(cached) $ECHO_C" >&6
14098else
14099 gcc_cv_as_comdat_group_percent=no
14100 if test $in_tree_gas = yes; then
14101 if test $in_tree_gas_is_elf = yes \
11176d2a 14102 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14103 then gcc_cv_as_comdat_group_percent=yes
14104fi
14105 elif test x$gcc_cv_as != x; then
14106 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
14107 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14109 (eval $ac_try) 2>&5
14110 ac_status=$?
14111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14112 (exit $ac_status); }; }
14113 then
14114 gcc_cv_as_comdat_group_percent=yes
14115 else
14116 echo "configure: failed program was" >&5
14117 cat conftest.s >&5
14118 fi
14119 rm -f conftest.o conftest.s
14120 fi
14121fi
14122echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
14123echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
14124
14125fi
11176d2a
JB
14126if test $in_tree_ld != yes && test x"$ld_vers" != x; then
14127 comdat_group=yes
14128 if test 0"$ld_date" -lt 20050308; then
14129 if test -n "$ld_date"; then
14130 # If there was date string, but was earlier than 2005-03-08, fail
14131 comdat_group=no
14132 elif test "$ld_vers_major" -lt 2; then
14133 comdat_group=no
14134 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
14135 comdat_group=no
14136 fi
14137 fi
1cf0118d
RO
14138else
14139 # assume linkers other than GNU ld don't support COMDAT group
14140 comdat_group=no
14141fi
14142if test $comdat_group = no; then
14143 gcc_cv_as_comdat_group=no
14144 gcc_cv_as_comdat_group_percent=no
11176d2a 14145fi
c18a5b6c
MM
14146
14147cat >>confdefs.h <<_ACEOF
11176d2a 14148#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
14149_ACEOF
14150
14151
8ada417f 14152# Thread-local storage - the check is heavily parametrized.
f996902d
RH
14153conftest_s=
14154tls_first_major=
14155tls_first_minor=
9739c90c 14156tls_as_opt=
f996902d 14157case "$target" in
6f9b006d
RH
14158 alpha*-*-*)
14159 conftest_s='
14160 .section ".tdata","awT",@progbits
14161foo: .long 25
14162 .text
14163 ldq $27,__tls_get_addr($29) !literal!1
14164 lda $16,foo($29) !tlsgd!1
14165 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
14166 ldq $27,__tls_get_addr($29) !literal!2
14167 lda $16,foo($29) !tlsldm!2
14168 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
14169 ldq $1,foo($29) !gotdtprel
14170 ldah $2,foo($29) !dtprelhi
14171 lda $3,foo($2) !dtprello
14172 lda $4,foo($29) !dtprel
14173 ldq $1,foo($29) !gottprel
14174 ldah $2,foo($29) !tprelhi
14175 lda $3,foo($2) !tprello
14176 lda $4,foo($29) !tprel'
14177 tls_first_major=2
14178 tls_first_minor=13
2f3321ca 14179 tls_as_opt=--fatal-warnings
6f9b006d 14180 ;;
e4dd71de
AH
14181 frv*-*-*)
14182 conftest_s='
14183 .section ".tdata","awT",@progbits
14184x: .long 25
14185 .text
14186 call #gettlsoff(x)'
14187 tls_first_major=2
14188 tls_first_minor=14
14189 ;;
51076f96
RC
14190 hppa*-*-linux*)
14191 conftest_s='
14192t1: .reg %r20
14193t2: .reg %r21
14194gp: .reg %r19
14195 .section ".tdata","awT",@progbits
14196foo: .long 25
14197 .text
14198 .align 4
14199 addil LT%foo-$tls_gdidx$,gp
14200 ldo RT%foo-$tls_gdidx$(%r1),%arg0
14201 b __tls_get_addr
14202 nop
14203 addil LT%foo-$tls_ldidx$,gp
14204 b __tls_get_addr
14205 ldo RT%foo-$tls_ldidx$(%r1),%arg0
14206 addil LR%foo-$tls_dtpoff$,%ret0
14207 ldo RR%foo-$tls_dtpoff$(%r1),%t1
14208 mfctl %cr27,%t1
14209 addil LT%foo-$tls_ieoff$,gp
14210 ldw RT%foo-$tls_ieoff$(%r1),%t2
14211 add %t1,%t2,%t3
14212 mfctl %cr27,%t1
14213 addil LR%foo-$tls_leoff$,%t1
14214 ldo RR%foo-$tls_leoff$(%r1),%t2'
14215 tls_first_major=2
14216 tls_first_minor=15
14217 tls_as_opt=--fatal-warnings
14218 ;;
d3585b76
DJ
14219 arm*-*-*)
14220 conftest_s='
14221 .section ".tdata","awT",%progbits
14222foo: .long 25
14223 .text
14224.word foo(gottpoff)
14225.word foo(tpoff)
14226.word foo(tlsgd)
14227.word foo(tlsldm)
14228.word foo(tlsldo)'
14229 tls_first_major=2
14230 tls_first_minor=17
14231 ;;
f996902d
RH
14232 i[34567]86-*-*)
14233 conftest_s='
14234 .section ".tdata","awT",@progbits
14235foo: .long 25
14236 .text
14237 movl %gs:0, %eax
14238 leal foo@TLSGD(,%ebx,1), %eax
14239 leal foo@TLSLDM(%ebx), %eax
14240 leal foo@DTPOFF(%eax), %edx
14241 movl foo@GOTTPOFF(%ebx), %eax
14242 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
14243 addl foo@GOTNTPOFF(%ebx), %eax
14244 movl foo@INDNTPOFF, %eax
f996902d
RH
14245 movl $foo@TPOFF, %eax
14246 subl $foo@TPOFF, %eax
14247 leal foo@NTPOFF(%ecx), %eax'
14248 tls_first_major=2
75d38379 14249 tls_first_minor=14
2f3321ca 14250 tls_as_opt=--fatal-warnings
75d38379
JJ
14251 ;;
14252 x86_64-*-*)
14253 conftest_s='
14254 .section ".tdata","awT",@progbits
14255foo: .long 25
14256 .text
14257 movq %fs:0, %rax
14258 leaq foo@TLSGD(%rip), %rdi
14259 leaq foo@TLSLD(%rip), %rdi
14260 leaq foo@DTPOFF(%rax), %rdx
14261 movq foo@GOTTPOFF(%rip), %rax
14262 movq $foo@TPOFF, %rax'
14263 tls_first_major=2
14264 tls_first_minor=14
2f3321ca 14265 tls_as_opt=--fatal-warnings
f996902d 14266 ;;
7b6e506e
RH
14267 ia64-*-*)
14268 conftest_s='
14269 .section ".tdata","awT",@progbits
14270foo: data8 25
14271 .text
14272 addl r16 = @ltoff(@dtpmod(foo#)), gp
14273 addl r17 = @ltoff(@dtprel(foo#)), gp
14274 addl r18 = @ltoff(@tprel(foo#)), gp
14275 addl r19 = @dtprel(foo#), gp
14276 adds r21 = @dtprel(foo#), r13
14277 movl r23 = @dtprel(foo#)
14278 addl r20 = @tprel(foo#), gp
14279 adds r22 = @tprel(foo#), r13
14280 movl r24 = @tprel(foo#)'
14281 tls_first_major=2
14282 tls_first_minor=13
2f3321ca 14283 tls_as_opt=--fatal-warnings
7b6e506e 14284 ;;
69229b81
DJ
14285 mips*-*-*)
14286 conftest_s='
14287 .section .tdata,"awT",@progbits
14288x:
14289 .word 2
14290 .text
14291 addiu $4, $28, %tlsgd(x)
14292 addiu $4, $28, %tlsldm(x)
14293 lui $4, %dtprel_hi(x)
14294 addiu $4, $4, %dtprel_lo(x)
14295 lw $4, %gottprel(x)($28)
14296 lui $4, %tprel_hi(x)
14297 addiu $4, $4, %tprel_lo(x)'
14298 tls_first_major=2
14299 tls_first_minor=16
14300 tls_as_opt='-32 --fatal-warnings'
14301 ;;
c4501e62
JJ
14302 powerpc-*-*)
14303 conftest_s='
14304 .section ".tdata","awT",@progbits
14305 .align 2
14306ld0: .space 4
14307ld1: .space 4
14308x1: .space 4
14309x2: .space 4
14310x3: .space 4
14311 .text
14312 addi 3,31,ld0@got@tlsgd
14313 bl __tls_get_addr
14314 addi 3,31,x1@got@tlsld
14315 bl __tls_get_addr
14316 addi 9,3,x1@dtprel
14317 addis 9,3,x2@dtprel@ha
14318 addi 9,9,x2@dtprel@l
14319 lwz 9,x3@got@tprel(31)
14320 add 9,9,x@tls
14321 addi 9,2,x1@tprel
14322 addis 9,2,x2@tprel@ha
14323 addi 9,9,x2@tprel@l'
14324 tls_first_major=2
14325 tls_first_minor=14
2f3321ca 14326 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
14327 ;;
14328 powerpc64-*-*)
14329 conftest_s='
14330 .section ".tdata","awT",@progbits
14331 .align 3
14332ld0: .space 8
14333ld1: .space 8
14334x1: .space 8
14335x2: .space 8
14336x3: .space 8
14337 .text
14338 addi 3,2,ld0@got@tlsgd
14339 bl .__tls_get_addr
14340 nop
14341 addi 3,2,ld1@toc
14342 bl .__tls_get_addr
14343 nop
14344 addi 3,2,x1@got@tlsld
14345 bl .__tls_get_addr
14346 nop
14347 addi 9,3,x1@dtprel
14348 bl .__tls_get_addr
14349 nop
14350 addis 9,3,x2@dtprel@ha
14351 addi 9,9,x2@dtprel@l
14352 bl .__tls_get_addr
14353 nop
14354 ld 9,x3@got@dtprel(2)
14355 add 9,9,3
14356 bl .__tls_get_addr
14357 nop'
14358 tls_first_major=2
14359 tls_first_minor=14
2f3321ca 14360 tls_as_opt="-a64 --fatal-warnings"
c4501e62 14361 ;;
fd3cd001
UW
14362 s390-*-*)
14363 conftest_s='
14364 .section ".tdata","awT",@progbits
14365foo: .long 25
14366 .text
14367 .long foo@TLSGD
14368 .long foo@TLSLDM
14369 .long foo@DTPOFF
14370 .long foo@NTPOFF
14371 .long foo@GOTNTPOFF
14372 .long foo@INDNTPOFF
14373 l %r1,foo@GOTNTPOFF(%r12)
14374 l %r1,0(%r1):tls_load:foo
14375 bas %r14,0(%r1,%r13):tls_gdcall:foo
14376 bas %r14,0(%r1,%r13):tls_ldcall:foo'
14377 tls_first_major=2
14378 tls_first_minor=14
2f3321ca 14379 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
14380 ;;
14381 s390x-*-*)
14382 conftest_s='
14383 .section ".tdata","awT",@progbits
14384foo: .long 25
14385 .text
14386 .quad foo@TLSGD
14387 .quad foo@TLSLDM
14388 .quad foo@DTPOFF
14389 .quad foo@NTPOFF
14390 .quad foo@GOTNTPOFF
14391 lg %r1,foo@GOTNTPOFF(%r12)
14392 larl %r1,foo@INDNTPOFF
14393 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
14394 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
14395 tls_first_major=2
14396 tls_first_minor=14
2f3321ca 14397 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 14398 ;;
9ff13962
KK
14399 sh-*-* | sh[34]-*-*)
14400 conftest_s='
14401 .section ".tdata","awT",@progbits
14402foo: .long 25
14403 .text
14404 .long foo@TLSGD
14405 .long foo@TLSLDM
14406 .long foo@DTPOFF
14407 .long foo@GOTTPOFF
14408 .long foo@TPOFF'
14409 tls_first_major=2
14410 tls_first_minor=13
2f3321ca 14411 tls_as_opt=--fatal-warnings
9ff13962 14412 ;;
5751a10b 14413 sparc*-*-*)
2f3321ca 14414 case "$target" in
7935dc1b
EB
14415 sparc*-sun-solaris2.[56789]*)
14416 # TLS was introduced in the Solaris 9 4/04 release but
14417 # we do not enable it by default on Solaris 9 either.
14418 if test "x$enable_tls" = xyes ; then
14419 on_solaris=yes
14420 else
14421 enable_tls=no;
14422 fi
14423 ;;
2f3321ca
EB
14424 sparc*-sun-solaris2.*)
14425 on_solaris=yes
14426 ;;
14427 *)
14428 on_solaris=no
14429 ;;
14430 esac
14431 if test x$on_solaris = xyes && test x$gas_flag = xno; then
14432 conftest_s='
14433 .section ".tdata",#alloc,#write,#tls
14434foo: .long 25
14435 .text
14436 sethi %tgd_hi22(foo), %o0
14437 add %o0, %tgd_lo10(foo), %o1
14438 add %l7, %o1, %o0, %tgd_add(foo)
14439 call __tls_get_addr, %tgd_call(foo)
14440 sethi %tldm_hi22(foo), %l1
14441 add %l1, %tldm_lo10(foo), %l2
14442 add %l7, %l2, %o0, %tldm_add(foo)
14443 call __tls_get_addr, %tldm_call(foo)
14444 sethi %tldo_hix22(foo), %l3
14445 xor %l3, %tldo_lox10(foo), %l4
14446 add %o0, %l4, %l5, %tldo_add(foo)
14447 sethi %tie_hi22(foo), %o3
14448 add %o3, %tie_lo10(foo), %o3
14449 ld [%l7 + %o3], %o2, %tie_ld(foo)
14450 add %g7, %o2, %o4, %tie_add(foo)
14451 sethi %tle_hix22(foo), %l1
14452 xor %l1, %tle_lox10(foo), %o5
14453 ld [%g7 + %o5], %o1'
14454 tls_first_major=0
14455 tls_first_minor=0
14456 else
14457 conftest_s='
5751a10b
JJ
14458 .section ".tdata","awT",@progbits
14459foo: .long 25
14460 .text
14461 sethi %tgd_hi22(foo), %o0
14462 add %o0, %tgd_lo10(foo), %o1
14463 add %l7, %o1, %o0, %tgd_add(foo)
14464 call __tls_get_addr, %tgd_call(foo)
14465 sethi %tldm_hi22(foo), %l1
14466 add %l1, %tldm_lo10(foo), %l2
14467 add %l7, %l2, %o0, %tldm_add(foo)
14468 call __tls_get_addr, %tldm_call(foo)
14469 sethi %tldo_hix22(foo), %l3
14470 xor %l3, %tldo_lox10(foo), %l4
14471 add %o0, %l4, %l5, %tldo_add(foo)
14472 sethi %tie_hi22(foo), %o3
14473 add %o3, %tie_lo10(foo), %o3
14474 ld [%l7 + %o3], %o2, %tie_ld(foo)
14475 add %g7, %o2, %o4, %tie_add(foo)
14476 sethi %tle_hix22(foo), %l1
14477 xor %l1, %tle_lox10(foo), %o5
14478 ld [%g7 + %o5], %o1'
14479 tls_first_major=2
14480 tls_first_minor=14
2f3321ca
EB
14481 tls_as_opt="-32 --fatal-warnings"
14482 fi
5751a10b 14483 ;;
f996902d 14484esac
8dea1cca
DD
14485set_have_as_tls=no
14486if test "x$enable_tls" = xno ; then
14487 : # TLS explicitly disabled.
14488elif test "x$enable_tls" = xyes ; then
14489 set_have_as_tls=yes # TLS explicitly enabled.
14490elif test -z "$tls_first_major"; then
8ada417f
ZW
14491 : # If we don't have a check, assume no support.
14492else
ba479fd2
NN
14493 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
14494echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
14495if test "${gcc_cv_as_tls+set}" = set; then
14496 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14497else
14498 gcc_cv_as_tls=no
14499 if test $in_tree_gas = yes; then
14500 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
14501 then gcc_cv_as_tls=yes
ad9c4d9f 14502fi
8ada417f 14503 elif test x$gcc_cv_as != x; then
6e3f3080 14504 echo "$conftest_s" > conftest.s
2f3321ca 14505 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
14506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14507 (eval $ac_try) 2>&5
14508 ac_status=$?
14509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14510 (exit $ac_status); }; }
8ada417f
ZW
14511 then
14512 gcc_cv_as_tls=yes
14513 else
14514 echo "configure: failed program was" >&5
14515 cat conftest.s >&5
14516 fi
14517 rm -f conftest.o conftest.s
f996902d 14518 fi
f996902d 14519fi
ba479fd2
NN
14520echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
14521echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 14522if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
14523 set_have_as_tls=yes
14524fi
14525fi
14526if test $set_have_as_tls = yes ; then
ba479fd2
NN
14527
14528cat >>confdefs.h <<\_ACEOF
f996902d 14529#define HAVE_AS_TLS 1
ba479fd2 14530_ACEOF
f996902d 14531
8ada417f
ZW
14532fi
14533
14534# Target-specific assembler checks.
f996902d 14535
7e9d8517
L
14536echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
14537echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
14538gcc_cv_ld_static_dynamic=no
14539if test $in_tree_ld = yes ; then
14540 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
14541 gcc_cv_ld_static_dynamic=yes
14542 fi
14543elif test x$gcc_cv_ld != x; then
14544 # Check if linker supports -Bstatic/-Bdynamic option
14545 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
14546 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
14547 gcc_cv_ld_static_dynamic=yes
14548 fi
14549fi
14550if test x"$gcc_cv_ld_static_dynamic" = xyes; then
14551
14552cat >>confdefs.h <<\_ACEOF
14553#define HAVE_LD_STATIC_DYNAMIC 1
14554_ACEOF
14555
14556fi
14557echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14558echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
14559
d594623a
L
14560if test x"$demangler_in_ld" = xyes; then
14561 echo "$as_me:$LINENO: checking linker --demangle support" >&5
14562echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
14563 gcc_cv_ld_demangle=no
14564 if test $in_tree_ld = yes; then
14565 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 \
14566 gcc_cv_ld_demangle=yes
14567 fi
14568 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14569 # Check if the GNU linker supports --demangle option
14570 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14571 gcc_cv_ld_demangle=yes
14572 fi
14573 fi
14574 if test x"$gcc_cv_ld_demangle" = xyes; then
14575
14576cat >>confdefs.h <<\_ACEOF
14577#define HAVE_LD_DEMANGLE 1
14578_ACEOF
14579
14580 fi
14581 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14582echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
14583fi
14584
3a37b08e
RH
14585case "$target" in
14586 # All TARGET_ABI_OSF targets.
14587 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
14588 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14589echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14590if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14591 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 14592else
8ada417f
ZW
14593 gcc_cv_as_alpha_explicit_relocs=no
14594 if test $in_tree_gas = yes; then
14595 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14596 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 14597fi
8ada417f 14598 elif test x$gcc_cv_as != x; then
6e3f3080 14599 echo ' .set nomacro
3a37b08e
RH
14600 .text
14601 extbl $3, $2, $3 !lituse_bytoff!1
14602 ldq $2, a($29) !literal!1
14603 ldq $4, b($29) !literal!2
14604 ldq_u $3, 0($2) !lituse_base!1
14605 ldq $27, f($29) !literal!5
14606 jsr $26, ($27), f !lituse_jsr!5
14607 ldah $29, 0($26) !gpdisp!3
14608 lda $0, c($29) !gprel
14609 ldah $1, d($29) !gprelhigh
14610 lda $1, d($1) !gprellow
8ada417f 14611 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
14612 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14614 (eval $ac_try) 2>&5
14615 ac_status=$?
14616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14617 (exit $ac_status); }; }
8ada417f
ZW
14618 then
14619 gcc_cv_as_alpha_explicit_relocs=yes
14620 else
14621 echo "configure: failed program was" >&5
14622 cat conftest.s >&5
14623 fi
14624 rm -f conftest.o conftest.s
14625 fi
cafe096b 14626fi
ba479fd2
NN
14627echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14628echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 14629if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
14630
14631cat >>confdefs.h <<\_ACEOF
3a37b08e 14632#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 14633_ACEOF
3a37b08e 14634
d006f5eb
RH
14635fi
14636 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
14637echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
14638if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
14639 echo $ECHO_N "(cached) $ECHO_C" >&6
14640else
14641 gcc_cv_as_alpha_jsrdirect_relocs=no
14642 if test $in_tree_gas = yes; then
14643 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
14644 then gcc_cv_as_alpha_jsrdirect_relocs=yes
14645fi
14646 elif test x$gcc_cv_as != x; then
14647 echo ' .set nomacro
14648 .text
14649 ldq $27, a($29) !literal!1
14650 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
14651 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14653 (eval $ac_try) 2>&5
14654 ac_status=$?
14655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14656 (exit $ac_status); }; }
14657 then
14658 gcc_cv_as_alpha_jsrdirect_relocs=yes
14659 else
14660 echo "configure: failed program was" >&5
14661 cat conftest.s >&5
14662 fi
14663 rm -f conftest.o conftest.s
14664 fi
14665fi
14666echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
14667echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
14668if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
14669
14670cat >>confdefs.h <<\_ACEOF
14671#define HAVE_AS_JSRDIRECT_RELOCS 1
14672_ACEOF
14673
86da66b5
HPN
14674fi
14675 ;;
14676
14677 cris-*-*)
14678 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14679echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
14680if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14681 echo $ECHO_N "(cached) $ECHO_C" >&6
14682else
14683 gcc_cv_as_cris_no_mul_bug=no
14684 if test $in_tree_gas = yes; then
14685 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14686 then gcc_cv_as_cris_no_mul_bug=yes
14687fi
14688 elif test x$gcc_cv_as != x; then
14689 echo '.text' > conftest.s
14690 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14692 (eval $ac_try) 2>&5
14693 ac_status=$?
14694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14695 (exit $ac_status); }; }
14696 then
14697 gcc_cv_as_cris_no_mul_bug=yes
14698 else
14699 echo "configure: failed program was" >&5
14700 cat conftest.s >&5
14701 fi
14702 rm -f conftest.o conftest.s
14703 fi
14704fi
14705echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14706echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
14707if test $gcc_cv_as_cris_no_mul_bug = yes; then
14708
14709cat >>confdefs.h <<\_ACEOF
14710#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14711_ACEOF
14712
8ada417f 14713fi
3a37b08e 14714 ;;
8ada417f 14715
1cb36a98 14716 sparc*-*-*)
ba479fd2
NN
14717 echo "$as_me:$LINENO: checking assembler for .register" >&5
14718echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
14719if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14720 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14721else
8ada417f
ZW
14722 gcc_cv_as_sparc_register_op=no
14723 if test x$gcc_cv_as != x; then
6e3f3080 14724 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
14725 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14727 (eval $ac_try) 2>&5
14728 ac_status=$?
14729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14730 (exit $ac_status); }; }
8ada417f
ZW
14731 then
14732 gcc_cv_as_sparc_register_op=yes
14733 else
14734 echo "configure: failed program was" >&5
14735 cat conftest.s >&5
14736 fi
14737 rm -f conftest.o conftest.s
14738 fi
cafe096b 14739fi
ba479fd2
NN
14740echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
14741echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 14742if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
14743
14744cat >>confdefs.h <<\_ACEOF
1cb36a98 14745#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 14746_ACEOF
1cb36a98 14747
8ada417f 14748fi
1cb36a98 14749
ba479fd2
NN
14750 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
14751echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
14752if test "${gcc_cv_as_sparc_relax+set}" = set; then
14753 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 14754else
8ada417f
ZW
14755 gcc_cv_as_sparc_relax=no
14756 if test x$gcc_cv_as != x; then
6e3f3080 14757 echo '.text' > conftest.s
ba479fd2
NN
14758 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
14759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14760 (eval $ac_try) 2>&5
14761 ac_status=$?
14762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14763 (exit $ac_status); }; }
8ada417f
ZW
14764 then
14765 gcc_cv_as_sparc_relax=yes
14766 else
14767 echo "configure: failed program was" >&5
14768 cat conftest.s >&5
14769 fi
14770 rm -f conftest.o conftest.s
14771 fi
cafe096b 14772fi
ba479fd2
NN
14773echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
14774echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 14775if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
14776
14777cat >>confdefs.h <<\_ACEOF
e95b1e6a 14778#define HAVE_AS_RELAX_OPTION 1
ba479fd2 14779_ACEOF
e95b1e6a 14780
8ada417f 14781fi
e95b1e6a 14782
ba479fd2
NN
14783 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
14784echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
14785if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
14786 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 14787else
8ada417f
ZW
14788 gcc_cv_as_sparc_ua_pcrel=no
14789 if test x$gcc_cv_as != x; then
6e3f3080 14790 echo '.text
8ada417f
ZW
14791foo:
14792 nop
14793.data
14794.align 4
14795.byte 0
14796.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
14797 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14799 (eval $ac_try) 2>&5
14800 ac_status=$?
14801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802 (exit $ac_status); }; }
8ada417f
ZW
14803 then
14804 if test x$gcc_cv_ld != x \
14805 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
14806 gcc_cv_as_sparc_ua_pcrel=yes
14807 fi
14808 rm -f conftest
14809 else
14810 echo "configure: failed program was" >&5
14811 cat conftest.s >&5
14812 fi
14813 rm -f conftest.o conftest.s
14814 fi
cafe096b 14815fi
ba479fd2
NN
14816echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
14817echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 14818if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
14819
14820cat >>confdefs.h <<\_ACEOF
17e9e88c 14821#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 14822_ACEOF
17e9e88c 14823
17e9e88c 14824
ba479fd2
NN
14825 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
14826echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
14827if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
14828 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 14829else
8ada417f
ZW
14830 gcc_cv_as_sparc_ua_pcrel_hidden=no
14831 if test x$gcc_cv_as != x; then
6e3f3080 14832 echo '.data
8ada417f
ZW
14833.align 4
14834.byte 0x31
14835.uaword %r_disp32(foo)
14836.byte 0x32, 0x33, 0x34
14837.global foo
14838.hidden foo
14839foo:
14840.skip 4' > conftest.s
ba479fd2
NN
14841 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14843 (eval $ac_try) 2>&5
14844 ac_status=$?
14845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14846 (exit $ac_status); }; }
8ada417f
ZW
14847 then
14848 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
14849 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
14850 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
14851 | grep ' 31000000 07323334' > /dev/null 2>&1; then
14852 if $gcc_cv_objdump -R conftest 2> /dev/null \
14853 | grep 'DISP32' > /dev/null 2>&1; then
14854 :
14855 else
14856 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 14857 fi
8ada417f
ZW
14858 fi
14859 rm -f conftest
14860 else
14861 echo "configure: failed program was" >&5
14862 cat conftest.s >&5
14863 fi
14864 rm -f conftest.o conftest.s
14865 fi
cafe096b 14866fi
ba479fd2
NN
14867echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
14868echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 14869if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
14870
14871cat >>confdefs.h <<\_ACEOF
cf7b8b0d 14872#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 14873_ACEOF
cf7b8b0d 14874
8ada417f 14875fi
ba479fd2 14876
8ada417f 14877fi # unaligned pcrel relocs
cf7b8b0d 14878
ba479fd2
NN
14879 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
14880echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
14881if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
14882 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14883else
8ada417f
ZW
14884 gcc_cv_as_sparc_offsetable_lo10=no
14885 if test x$gcc_cv_as != x; then
6e3f3080 14886 echo '.text
8ada417f
ZW
14887 or %g1, %lo(ab) + 12, %g1
14888 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
14889 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
14890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14891 (eval $ac_try) 2>&5
14892 ac_status=$?
14893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14894 (exit $ac_status); }; }
8ada417f
ZW
14895 then
14896 if test x$gcc_cv_objdump != x \
ecb0ccbc 14897 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 14898 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 14899 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
14900 fi
14901 else
14902 echo "configure: failed program was" >&5
14903 cat conftest.s >&5
14904 fi
14905 rm -f conftest.o conftest.s
14906 fi
cafe096b 14907fi
ba479fd2
NN
14908echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
14909echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 14910if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
14911
14912cat >>confdefs.h <<\_ACEOF
1cb36a98 14913#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 14914_ACEOF
1cb36a98 14915
8ada417f 14916fi
1cb36a98
RH
14917 ;;
14918
c307e6dd 14919 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
14920 case $target_os in
14921 cygwin* | pe | mingw32*)
14922 # Used for DWARF 2 in PE
14923 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
14924echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
14925if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
14926 echo $ECHO_N "(cached) $ECHO_C" >&6
14927else
14928 gcc_cv_as_ix86_pe_secrel32=no
14929 if test $in_tree_gas = yes; then
14930 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14931 then gcc_cv_as_ix86_pe_secrel32=yes
14932fi
14933 elif test x$gcc_cv_as != x; then
14934 echo '.text
14935foo: nop
14936.data
14937 .secrel32 foo' > conftest.s
14938 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14940 (eval $ac_try) 2>&5
14941 ac_status=$?
14942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14943 (exit $ac_status); }; }
14944 then
14945 if test x$gcc_cv_ld != x \
14946 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
14947 gcc_cv_as_ix86_pe_secrel32=yes
14948 fi
14949 rm -f conftest
14950 else
14951 echo "configure: failed program was" >&5
14952 cat conftest.s >&5
14953 fi
14954 rm -f conftest.o conftest.s
14955 fi
14956fi
14957echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
14958echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
14959if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
14960
14961cat >>confdefs.h <<\_ACEOF
14962#define HAVE_GAS_PE_SECREL32_RELOC 1
14963_ACEOF
14964
14965fi
14966 ;;
14967 esac
14968
ba479fd2
NN
14969 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
14970echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
14971if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
14972 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14973else
14974 gcc_cv_as_ix86_filds_fists=no
14975 if test $in_tree_gas = yes; then
14976 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
14977 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 14978fi
8ada417f 14979 elif test x$gcc_cv_as != x; then
6e3f3080 14980 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
14981 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14983 (eval $ac_try) 2>&5
14984 ac_status=$?
14985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14986 (exit $ac_status); }; }
8ada417f
ZW
14987 then
14988 gcc_cv_as_ix86_filds_fists=yes
14989 else
14990 echo "configure: failed program was" >&5
14991 cat conftest.s >&5
981d4858 14992 fi
8ada417f
ZW
14993 rm -f conftest.o conftest.s
14994 fi
14995fi
ba479fd2
NN
14996echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
14997echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 14998if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
14999
15000cat >>confdefs.h <<\_ACEOF
8ada417f 15001#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 15002_ACEOF
ad9c4d9f 15003
f6f5dff2
RO
15004fi
15005
ba479fd2
NN
15006 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
15007echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
15008if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
15009 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
15010else
15011 gcc_cv_as_ix86_cmov_sun_syntax=no
15012 if test x$gcc_cv_as != x; then
6e3f3080 15013 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
15014 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15016 (eval $ac_try) 2>&5
15017 ac_status=$?
15018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15019 (exit $ac_status); }; }
f6f5dff2
RO
15020 then
15021 gcc_cv_as_ix86_cmov_sun_syntax=yes
15022 else
15023 echo "configure: failed program was" >&5
15024 cat conftest.s >&5
15025 fi
15026 rm -f conftest.o conftest.s
15027 fi
15028fi
ba479fd2
NN
15029echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
15030echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 15031if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
15032
15033cat >>confdefs.h <<\_ACEOF
f6f5dff2 15034#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 15035_ACEOF
f6f5dff2 15036
ad9c4d9f
NN
15037fi
15038
6f3ca281
ZW
15039 # This one is used unconditionally by i386.[ch]; it is to be defined
15040 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
15041 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
15042echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
15043if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
15044 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15045else
15046 gcc_cv_as_ix86_gotoff_in_data=no
15047 if test $in_tree_gas = yes; then
15048 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15049 then gcc_cv_as_ix86_gotoff_in_data=yes
15050fi
15051 elif test x$gcc_cv_as != x; then
6e3f3080 15052 echo ' .text
f88c65f7
RH
15053.L0:
15054 nop
15055 .data
8ada417f 15056 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
15057 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15059 (eval $ac_try) 2>&5
15060 ac_status=$?
15061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15062 (exit $ac_status); }; }
8ada417f
ZW
15063 then
15064 gcc_cv_as_ix86_gotoff_in_data=yes
15065 else
15066 echo "configure: failed program was" >&5
15067 cat conftest.s >&5
f88c65f7 15068 fi
8ada417f
ZW
15069 rm -f conftest.o conftest.s
15070 fi
15071fi
ba479fd2
NN
15072echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
15073echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 15074
6f3ca281 15075
ba479fd2 15076cat >>confdefs.h <<_ACEOF
6f3ca281 15077#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 15078_ACEOF
f88c65f7 15079
1cb36a98 15080 ;;
ef1ecf87
RH
15081
15082 ia64*-*-*)
ba479fd2
NN
15083 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
15084echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
15085if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
15086 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 15087else
8ada417f
ZW
15088 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
15089 if test $in_tree_gas = yes; then
15090 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15091 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 15092fi
8ada417f 15093 elif test x$gcc_cv_as != x; then
6e3f3080 15094 echo ' .text
ef1ecf87
RH
15095 addl r15 = @ltoffx(x#), gp
15096 ;;
cfa9ee99 15097 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
15098 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15100 (eval $ac_try) 2>&5
15101 ac_status=$?
15102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15103 (exit $ac_status); }; }
8ada417f 15104 then
cfa9ee99 15105 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
15106 else
15107 echo "configure: failed program was" >&5
15108 cat conftest.s >&5
2c4a9cff 15109 fi
8ada417f
ZW
15110 rm -f conftest.o conftest.s
15111 fi
15112fi
ba479fd2
NN
15113echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
15114echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 15115if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
15116
15117cat >>confdefs.h <<\_ACEOF
cfa9ee99 15118#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 15119_ACEOF
8ada417f 15120
cfa9ee99 15121fi
8ada417f 15122
2c4a9cff 15123 ;;
8ada417f 15124
2c4a9cff 15125 powerpc*-*-*)
8ada417f 15126 case $target in
432218ba
DE
15127 *-*-aix*) conftest_s=' .machine "pwr5"
15128 .csect .text[PR]
6b37db3c 15129 mfcr 3,128';;
8af4d362
PB
15130 *-*-darwin*)
15131 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
15132echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
15133if test "${gcc_cv_as_machine_directive+set}" = set; then
15134 echo $ECHO_N "(cached) $ECHO_C" >&6
15135else
15136 gcc_cv_as_machine_directive=no
15137 if test x$gcc_cv_as != x; then
15138 echo ' .machine ppc7400' > conftest.s
15139 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15141 (eval $ac_try) 2>&5
15142 ac_status=$?
15143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15144 (exit $ac_status); }; }
15145 then
15146 gcc_cv_as_machine_directive=yes
15147 else
15148 echo "configure: failed program was" >&5
15149 cat conftest.s >&5
15150 fi
15151 rm -f conftest.o conftest.s
15152 fi
15153fi
15154echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
15155echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
15156
15157 if test x$gcc_cv_as_machine_directive != xyes; then
15158 echo "*** This target requires an assembler supporting \".machine\"" >&2
15159 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
15160 test x$build = x$target && exit 1
15161 fi
15162 conftest_s=' .text
6b37db3c 15163 mfcr r3,128';;
4c67db14 15164 *) conftest_s=' .machine power4
d2ab3e37 15165 .text
6b37db3c 15166 mfcr 3,128';;
8ada417f 15167 esac
8ada417f 15168
ba479fd2
NN
15169 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
15170echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
15171if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
15172 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 15173else
8ada417f
ZW
15174 gcc_cv_as_powerpc_mfcrf=no
15175 if test $in_tree_gas = yes; then
15176 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15177 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 15178fi
8ada417f 15179 elif test x$gcc_cv_as != x; then
6e3f3080 15180 echo "$conftest_s" > conftest.s
ba479fd2
NN
15181 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15183 (eval $ac_try) 2>&5
15184 ac_status=$?
15185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15186 (exit $ac_status); }; }
8ada417f
ZW
15187 then
15188 gcc_cv_as_powerpc_mfcrf=yes
15189 else
15190 echo "configure: failed program was" >&5
15191 cat conftest.s >&5
15192 fi
15193 rm -f conftest.o conftest.s
15194 fi
2c4a9cff 15195fi
ba479fd2
NN
15196echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
15197echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 15198if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
15199
15200cat >>confdefs.h <<\_ACEOF
2c4a9cff 15201#define HAVE_AS_MFCRF 1
ba479fd2 15202_ACEOF
ef1ecf87 15203
8ada417f 15204fi
432218ba
DE
15205
15206 case $target in
15207 *-*-aix*) conftest_s=' .machine "pwr5"
15208 .csect .text[PR]
15209 popcntb 3,3';;
15210 *) conftest_s=' .machine power5
15211 .text
15212 popcntb 3,3';;
15213 esac
15214
15215 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
15216echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
15217if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
15218 echo $ECHO_N "(cached) $ECHO_C" >&6
15219else
15220 gcc_cv_as_powerpc_popcntb=no
15221 if test $in_tree_gas = yes; then
15222 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15223 then gcc_cv_as_powerpc_popcntb=yes
15224fi
15225 elif test x$gcc_cv_as != x; then
15226 echo "$conftest_s" > conftest.s
15227 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15229 (eval $ac_try) 2>&5
15230 ac_status=$?
15231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15232 (exit $ac_status); }; }
15233 then
15234 gcc_cv_as_powerpc_popcntb=yes
15235 else
15236 echo "configure: failed program was" >&5
15237 cat conftest.s >&5
15238 fi
15239 rm -f conftest.o conftest.s
15240 fi
15241fi
15242echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
15243echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
15244if test $gcc_cv_as_powerpc_popcntb = yes; then
15245
15246cat >>confdefs.h <<\_ACEOF
15247#define HAVE_AS_POPCNTB 1
15248_ACEOF
15249
9719f3b7
DE
15250fi
15251
15252 case $target in
15253 *-*-aix*) conftest_s=' .machine "pwr5x"
15254 .csect .text[PR]
15255 frin 1,1';;
1e04bfdc 15256 *) conftest_s=' .machine power5
9719f3b7
DE
15257 .text
15258 frin 1,1';;
15259 esac
15260
15261 echo "$as_me:$LINENO: checking assembler for fp round support" >&5
15262echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
15263if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
15264 echo $ECHO_N "(cached) $ECHO_C" >&6
15265else
15266 gcc_cv_as_powerpc_fprnd=no
15267 if test $in_tree_gas = yes; then
15268 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15269 then gcc_cv_as_powerpc_fprnd=yes
15270fi
15271 elif test x$gcc_cv_as != x; then
15272 echo "$conftest_s" > conftest.s
15273 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15275 (eval $ac_try) 2>&5
15276 ac_status=$?
15277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15278 (exit $ac_status); }; }
15279 then
15280 gcc_cv_as_powerpc_fprnd=yes
15281 else
15282 echo "configure: failed program was" >&5
15283 cat conftest.s >&5
15284 fi
15285 rm -f conftest.o conftest.s
15286 fi
15287fi
15288echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
15289echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
15290if test $gcc_cv_as_powerpc_fprnd = yes; then
15291
15292cat >>confdefs.h <<\_ACEOF
15293#define HAVE_AS_FPRND 1
15294_ACEOF
15295
432218ba
DE
15296fi
15297
7f970b70
AM
15298 case $target in
15299 *-*-aix*) conftest_s=' .csect .text[PR]
15300LCF..0:
15301 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
15302 *-*-darwin*)
15303 conftest_s=' .text
15304LCF0:
15305 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
15306 *) conftest_s=' .text
15307.LCF0:
15308 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
15309 esac
15310
15311 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
15312echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
15313if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
15314 echo $ECHO_N "(cached) $ECHO_C" >&6
15315else
15316 gcc_cv_as_powerpc_rel16=no
15317 if test $in_tree_gas = yes; then
15318 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15319 then gcc_cv_as_powerpc_rel16=yes
15320fi
15321 elif test x$gcc_cv_as != x; then
15322 echo "$conftest_s" > conftest.s
15323 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15325 (eval $ac_try) 2>&5
15326 ac_status=$?
15327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15328 (exit $ac_status); }; }
15329 then
15330 gcc_cv_as_powerpc_rel16=yes
15331 else
15332 echo "configure: failed program was" >&5
15333 cat conftest.s >&5
15334 fi
15335 rm -f conftest.o conftest.s
15336 fi
15337fi
15338echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
15339echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
15340if test $gcc_cv_as_powerpc_rel16 = yes; then
15341
15342cat >>confdefs.h <<\_ACEOF
15343#define HAVE_AS_REL16 1
15344_ACEOF
15345
15346fi
8ada417f
ZW
15347 ;;
15348
15349 mips*-*-*)
ba479fd2
NN
15350 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
15351echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
15352if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
15353 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15354else
15355 gcc_cv_as_mips_explicit_relocs=no
15356 if test $in_tree_gas = yes; then
15357 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15358 then gcc_cv_as_mips_explicit_relocs=yes
15359fi
15360 elif test x$gcc_cv_as != x; then
6e3f3080 15361 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
15362 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15364 (eval $ac_try) 2>&5
15365 ac_status=$?
15366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15367 (exit $ac_status); }; }
8ada417f
ZW
15368 then
15369 gcc_cv_as_mips_explicit_relocs=yes
15370 else
15371 echo "configure: failed program was" >&5
15372 cat conftest.s >&5
ef1ecf87 15373 fi
8ada417f
ZW
15374 rm -f conftest.o conftest.s
15375 fi
15376fi
ba479fd2
NN
15377echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
15378echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
15379if test $gcc_cv_as_mips_explicit_relocs = yes; then
15380 if test x$target_cpu_default = x
15381 then target_cpu_default=MASK_EXPLICIT_RELOCS
15382 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
15383 fi
15384fi
dbad5e72
SE
15385 ;;
15386esac
8ada417f 15387
dbad5e72
SE
15388# Mips and HP-UX need the GNU assembler.
15389# Linux on IA64 might be able to use the Intel assembler.
15390
15391case "$target" in
15392 mips*-*-* | *-*-hpux* )
82563d35
RS
15393 if test x$gas_flag = xyes \
15394 || test x"$host" != x"$build" \
15395 || test ! -x "$gcc_cv_as" \
15396 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
15397 :
15398 else
15399 echo "*** This configuration requires the GNU assembler" >&2
15400 exit 1
15401 fi
ef1ecf87 15402 ;;
1cb36a98 15403esac
dbad5e72 15404
9d147085
RH
15405# ??? Not all targets support dwarf2 debug_line, even within a version
15406# of gas. Moreover, we need to emit a valid instruction to trigger any
15407# info to the output file. So, as supported targets are added to gas 2.11,
15408# add some instruction here to (also) show we expect this might work.
15409# ??? Once 2.11 is released, probably need to add first known working
15410# version to the per-target configury.
15411case "$target" in
80486e06 15412 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 15413 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
6afdc741 15414 | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-*)
9d147085
RH
15415 insn="nop"
15416 ;;
57116d8d 15417 ia64*-*-* | s390*-*-*)
9d147085
RH
15418 insn="nop 0"
15419 ;;
2853bc5a
HPN
15420 mmix-*-*)
15421 insn="swym 0"
15422 ;;
8ada417f
ZW
15423esac
15424if test x"$insn" != x; then
15425 conftest_s="\
15426 .file 1 \"conftest.s\"
15427 .loc 1 3 0
15428 $insn"
ba479fd2
NN
15429 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
15430echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
15431if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
15432 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15433else
15434 gcc_cv_as_dwarf2_debug_line=no
15435 if test $in_tree_gas = yes; then
15436 if test $in_tree_gas_is_elf = yes \
15437 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15438 then gcc_cv_as_dwarf2_debug_line=yes
15439fi
15440 elif test x$gcc_cv_as != x; then
6e3f3080 15441 echo "$conftest_s" > conftest.s
ba479fd2
NN
15442 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15444 (eval $ac_try) 2>&5
15445 ac_status=$?
15446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15447 (exit $ac_status); }; }
8ada417f 15448 then
080a5bb0
EB
15449 if test x$gcc_cv_objdump != x \
15450 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
15451 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
15452 gcc_cv_as_dwarf2_debug_line=yes
15453 fi
15454 else
15455 echo "configure: failed program was" >&5
15456 cat conftest.s >&5
15457 fi
15458 rm -f conftest.o conftest.s
15459 fi
15460fi
ba479fd2
NN
15461echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
15462echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 15463
ad9c4d9f 15464
8ada417f
ZW
15465# The .debug_line file table must be in the exact order that
15466# we specified the files, since these indices are also used
15467# by DW_AT_decl_file. Approximate this test by testing if
15468# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
15469 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
15470echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
15471if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
15472 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15473else
15474 gcc_cv_as_dwarf2_file_buggy=no
15475 if test x$gcc_cv_as != x; then
6e3f3080 15476 echo ' .file 1 "foo.s"
8ada417f 15477 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
15478 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15480 (eval $ac_try) 2>&5
15481 ac_status=$?
15482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15483 (exit $ac_status); }; }
8ada417f
ZW
15484 then
15485 gcc_cv_as_dwarf2_file_buggy=yes
15486 else
15487 echo "configure: failed program was" >&5
15488 cat conftest.s >&5
15489 fi
15490 rm -f conftest.o conftest.s
15491 fi
ad9c4d9f 15492fi
ba479fd2
NN
15493echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
15494echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
15495
15496
15497 if test $gcc_cv_as_dwarf2_debug_line = yes \
15498 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
15499
15500cat >>confdefs.h <<\_ACEOF
9d147085 15501#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 15502_ACEOF
9d147085 15503
8ada417f 15504 fi
ad9c4d9f 15505
ba479fd2
NN
15506 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
15507echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
15508if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
15509 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15510else
15511 gcc_cv_as_gdwarf2_flag=no
15512 if test $in_tree_gas = yes; then
15513 if test $in_tree_gas_is_elf = yes \
15514 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15515 then gcc_cv_as_gdwarf2_flag=yes
15516fi
15517 elif test x$gcc_cv_as != x; then
6e3f3080 15518 echo "$insn" > conftest.s
ba479fd2
NN
15519 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
15520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15521 (eval $ac_try) 2>&5
15522 ac_status=$?
15523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15524 (exit $ac_status); }; }
8ada417f
ZW
15525 then
15526 gcc_cv_as_gdwarf2_flag=yes
15527 else
15528 echo "configure: failed program was" >&5
15529 cat conftest.s >&5
15530 fi
15531 rm -f conftest.o conftest.s
15532 fi
ad9c4d9f 15533fi
ba479fd2
NN
15534echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
15535echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 15536if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
15537
15538cat >>confdefs.h <<\_ACEOF
5f0e9ea2 15539#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 15540_ACEOF
5f0e9ea2
GK
15541
15542fi
ad9c4d9f 15543
ba479fd2
NN
15544 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
15545echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
15546if test "${gcc_cv_as_gstabs_flag+set}" = set; then
15547 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15548else
15549 gcc_cv_as_gstabs_flag=no
15550 if test $in_tree_gas = yes; then
15551 if test $in_tree_gas_is_elf = yes \
15552 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15553 then gcc_cv_as_gstabs_flag=yes
15554fi
15555 elif test x$gcc_cv_as != x; then
6e3f3080 15556 echo "$insn" > conftest.s
ba479fd2
NN
15557 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
15558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15559 (eval $ac_try) 2>&5
15560 ac_status=$?
15561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15562 (exit $ac_status); }; }
8ada417f
ZW
15563 then
15564 # The native Solaris 9/Intel assembler doesn't understand --gstabs
15565 # and warns about it, but still exits successfully. So check for
15566 # this.
ba479fd2
NN
15567 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
15568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15569 (eval $ac_try) 2>&5
15570 ac_status=$?
15571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15572 (exit $ac_status); }; }
8ada417f
ZW
15573 then :
15574 else gcc_cv_as_gstabs_flag=yes
15575 fi
15576 else
15577 echo "configure: failed program was" >&5
15578 cat conftest.s >&5
15579 fi
15580 rm -f conftest.o conftest.s
15581 fi
ad9c4d9f 15582fi
ba479fd2
NN
15583echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
15584echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 15585if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
15586
15587cat >>confdefs.h <<\_ACEOF
5f0e9ea2 15588#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 15589_ACEOF
5f0e9ea2
GK
15590
15591fi
8ada417f 15592fi
5f0e9ea2 15593
ba479fd2
NN
15594echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
15595echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 15596gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 15597if test $in_tree_ld = yes ; then
5408ac6c
HPN
15598 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 \
15599 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
15600 gcc_cv_ld_ro_rw_mix=read-write
15601 fi
15602elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
15603 echo '.section myfoosect, "a"' > conftest1.s
15604 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 15605 echo '.byte 1' >> conftest2.s
90e145da 15606 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 15607 echo '.byte 0' >> conftest3.s
6cd656d0
KC
15608 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
15609 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
15610 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 15611 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 15612 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 15613 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 15614 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
15615 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
15616 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
15617 gcc_cv_ld_ro_rw_mix=read-only
15618 else
15619 gcc_cv_ld_ro_rw_mix=read-write
15620 fi
15621 fi
15622 fi
15623 rm -f conftest.* conftest[123].*
15624fi
15625if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
15626
15627cat >>confdefs.h <<\_ACEOF
96d0f4dc 15628#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 15629_ACEOF
96d0f4dc
JJ
15630
15631fi
ba479fd2
NN
15632echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
15633echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 15634
ba479fd2
NN
15635echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
15636echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 15637gcc_cv_ld_eh_frame_hdr=no
34a86c2b 15638if test $in_tree_ld = yes ; then
5408ac6c
HPN
15639 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 \
15640 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
15641 gcc_cv_ld_eh_frame_hdr=yes
15642 fi
15643elif test x$gcc_cv_ld != x; then
15644 # Check if linker supports --eh-frame-hdr option
15645 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
15646 gcc_cv_ld_eh_frame_hdr=yes
15647 fi
15648fi
232b67d9 15649
275b60d6 15650if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
15651
15652cat >>confdefs.h <<\_ACEOF
275b60d6 15653#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 15654_ACEOF
275b60d6
JJ
15655
15656fi
ba479fd2
NN
15657echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
15658echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 15659
ba479fd2
NN
15660echo "$as_me:$LINENO: checking linker position independent executable support" >&5
15661echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
15662gcc_cv_ld_pie=no
15663if test $in_tree_ld = yes ; then
5408ac6c
HPN
15664 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 \
15665 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
15666 gcc_cv_ld_pie=yes
15667 fi
15668elif test x$gcc_cv_ld != x; then
15669 # Check if linker supports -pie option
15670 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
15671 gcc_cv_ld_pie=yes
15672 fi
15673fi
15674if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
15675
15676cat >>confdefs.h <<\_ACEOF
24a4dd31 15677#define HAVE_LD_PIE 1
ba479fd2 15678_ACEOF
24a4dd31
JJ
15679
15680fi
ba479fd2
NN
15681echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
15682echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 15683
8bb915b6
NN
15684# --------
15685# UNSORTED
15686# --------
15687
765f1bf9
AM
15688echo "$as_me:$LINENO: checking linker --as-needed support" >&5
15689echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
15690if test "${gcc_cv_ld_as_needed+set}" = set; then
15691 echo $ECHO_N "(cached) $ECHO_C" >&6
15692else
15693 gcc_cv_ld_as_needed=no
765f1bf9
AM
15694if test $in_tree_ld = yes ; then
15695 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 \
15696 && test $in_tree_ld_is_elf = yes; then
15697 gcc_cv_ld_as_needed=yes
15698 fi
15699elif test x$gcc_cv_ld != x; then
15700 # Check if linker supports --as-needed and --no-as-needed options
15701 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
15702 gcc_cv_ld_as_needed=yes
15703 fi
15704fi
82e923f6
RS
15705
15706fi
15707echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
15708echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
15709if test x"$gcc_cv_ld_as_needed" = xyes; then
15710
15711cat >>confdefs.h <<\_ACEOF
15712#define HAVE_LD_AS_NEEDED 1
15713_ACEOF
15714
15715fi
765f1bf9 15716
d82bf747
AM
15717case "$target:$tm_file" in
15718 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
85b776df
AM
15719 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
15720echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
15721if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
15722 echo $ECHO_N "(cached) $ECHO_C" >&6
15723else
15724 gcc_cv_ld_no_dot_syms=no
15725 if test $in_tree_ld = yes ; then
15726 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
15727 gcc_cv_ld_no_dot_syms=yes
15728 fi
15729 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
15730 cat > conftest1.s <<EOF
15731 .text
15732 bl .foo
15733EOF
15734 cat > conftest2.s <<EOF
15735 .section ".opd","aw"
15736 .align 3
15737 .globl foo
15738 .type foo,@function
15739foo:
15740 .quad .LEfoo,.TOC.@tocbase,0
15741 .text
15742.LEfoo:
15743 blr
15744 .size foo,.-.LEfoo
15745EOF
15746 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
15747 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
15748 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
15749 gcc_cv_ld_no_dot_syms=yes
15750 fi
15751 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
15752 fi
15753
15754fi
15755echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
15756echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
15757 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
15758
15759cat >>confdefs.h <<\_ACEOF
15760#define HAVE_LD_NO_DOT_SYMS 1
15761_ACEOF
15762
15763 fi
15764 ;;
15765esac
15766
380e5ca4
MM
15767echo "$as_me:$LINENO: checking linker --sysroot support" >&5
15768echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
15769if test "${gcc_cv_ld_sysroot+set}" = set; then
15770 echo $ECHO_N "(cached) $ECHO_C" >&6
15771else
15772 gcc_cv_ld_sysroot=no
15773 if test $in_tree_ld = yes ; then
15774 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 15775 gcc_cv_ld_sysroot=yes
380e5ca4
MM
15776 fi
15777 elif test x$gcc_cv_ld != x; then
15778 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
15779 gcc_cv_ld_sysroot=yes
15780 fi
15781 fi
15782fi
15783echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
15784echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
15785if test x"$gcc_cv_ld_sysroot" = xyes; then
15786
15787cat >>confdefs.h <<\_ACEOF
15788#define HAVE_LD_SYSROOT 1
15789_ACEOF
15790
15791fi
15792
9fb28a67 15793if test x$with_sysroot = x && test x$host = x$target \
047d636f 15794 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
15795
15796cat >>confdefs.h <<_ACEOF
793e9558 15797#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 15798_ACEOF
793e9558
PB
15799
15800fi
15801
77008252
JJ
15802# Test for stack protector support in target C library.
15803case "$target" in
15804 *-*-linux*)
15805 echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5
15806echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6
15807if test "${gcc_cv_libc_provides_ssp+set}" = set; then
15808 echo $ECHO_N "(cached) $ECHO_C" >&6
15809else
15810 gcc_cv_libc_provides_ssp=no
15811 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
15812 if test "x$with_sysroot" = x; then
15813 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
15814 elif test "x$with_sysroot" = xyes; then
15815 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
15816 else
15817 glibc_header_dir="${with_sysroot}/usr/include"
15818 fi
15819 else
15820 glibc_header_dir=/usr/include
15821 fi
15822 # glibc 2.4 and later provides __stack_chk_fail and
15823 # either __stack_chk_guard, or TLS access to stack guard canary.
15824 if test -f $glibc_header_dir/features.h \
15825 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
15826 $glibc_header_dir/features.h > /dev/null; then
15827 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
15828 $glibc_header_dir/features.h > /dev/null; then
15829 gcc_cv_libc_provides_ssp=yes
15830 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
15831 $glibc_header_dir/features.h > /dev/null \
15832 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
15833 $glibc_header_dir/features.h > /dev/null; then
15834 gcc_cv_libc_provides_ssp=yes
15835 fi
15836 fi
15837fi
15838echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
15839echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;;
15840 *) gcc_cv_libc_provides_ssp=no ;;
15841esac
15842if test x$gcc_cv_libc_provides_ssp = xyes; then
15843
15844cat >>confdefs.h <<\_ACEOF
15845#define TARGET_LIBC_PROVIDES_SSP 1
15846_ACEOF
15847
15848fi
15849
ed965309
JJ
15850# Check if TFmode long double should be used by default or not.
15851# Some glibc targets used DFmode long double, but with glibc 2.4
15852# and later they can use TFmode.
15853case "$target" in
15854 powerpc*-*-*gnu* | \
15855 sparc*-*-linux* | \
15856 s390*-*-linux* | \
15857 alpha*-*-linux*)
15858
15859# Check whether --with-long-double-128 or --without-long-double-128 was given.
15860if test "${with_long_double_128+set}" = set; then
15861 withval="$with_long_double_128"
15862 gcc_cv_target_ldbl128="$with_long_double_128"
15863else
15864 gcc_cv_target_ldbl128=no
15865 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
15866 if test "x$with_sysroot" = x; then
15867 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
15868 elif test "x$with_sysroot" = xyes; then
15869 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
15870 else
15871 glibc_header_dir="${with_sysroot}/usr/include"
15872 fi
15873 else
15874 glibc_header_dir=/usr/include
15875 fi
15876 grep '^ *#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
15877 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
15878 && gcc_cv_target_ldbl128=yes
15879fi;
15880 ;;
15881esac
15882if test x$gcc_cv_target_ldbl128 = xyes; then
15883
15884cat >>confdefs.h <<\_ACEOF
15885#define TARGET_DEFAULT_LONG_DOUBLE_128 1
15886_ACEOF
15887
15888fi
15889
81bf3d9e 15890# Find out what GC implementation we want, or may, use.
ba479fd2 15891
81bf3d9e
RH
15892# Check whether --with-gc or --without-gc was given.
15893if test "${with_gc+set}" = set; then
15894 withval="$with_gc"
15895 case "$withval" in
08cee789 15896 page)
81bf3d9e 15897 GGC=ggc-$withval
08cee789
DJ
15898 ;;
15899 zone)
15900 GGC=ggc-$withval
15901
15902cat >>confdefs.h <<\_ACEOF
15903#define GGC_ZONE 1
15904_ACEOF
15905
81bf3d9e
RH
15906 ;;
15907 *)
ba479fd2
NN
15908 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
15909echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
15910 { (exit 1); exit 1; }; }
81bf3d9e
RH
15911 ;;
15912esac
15913else
005537df 15914 GGC=ggc-page
ba479fd2 15915fi;
81bf3d9e
RH
15916
15917echo "Using $GGC for garbage collection."
15918
3c809ba4 15919# Use the system's zlib library.
b8dad04b
ZW
15920zlibdir=-L../zlib
15921zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 15922
3c809ba4
AG
15923# Check whether --with-system-zlib or --without-system-zlib was given.
15924if test "${with_system_zlib+set}" = set; then
15925 withval="$with_system_zlib"
15926 zlibdir=
15927zlibinc=
15928
ba479fd2 15929fi;
3c809ba4
AG
15930
15931
15932
dc6746e7 15933
ba479fd2
NN
15934echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
15935echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
15936 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
15937if test "${enable_maintainer_mode+set}" = set; then
15938 enableval="$enable_maintainer_mode"
15939 maintainer_mode=$enableval
15940else
15941 maintainer_mode=no
ba479fd2 15942fi;
63cf211a 15943
ba479fd2
NN
15944echo "$as_me:$LINENO: result: $maintainer_mode" >&5
15945echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
15946
15947if test "$maintainer_mode" = "yes"; then
15948 MAINT=''
15949else
15950 MAINT='#'
15951fi
15952
8bb915b6
NN
15953# --------------
15954# Language hooks
15955# --------------
15956
861bb6c1
JL
15957# Make empty files to contain the specs and options for each language.
15958# Then add #include lines to for a compiler that has specs and/or options.
15959
cc11cc9b 15960subdirs=
d7b42618 15961lang_opt_files=
861bb6c1 15962lang_specs_files=
3103b7db 15963lang_tree_files=
861bb6c1
JL
15964# These (without "all_") are set in each config-lang.in.
15965# `language' must be a single word so is spelled singularly.
15966all_languages=
15967all_boot_languages=
15968all_compilers=
15969all_stagestuff=
53c7ffe7 15970all_outputs='Makefile gccbug mklibgcc libada-mk'
861bb6c1 15971# List of language makefile fragments.
2ed26f6b
ZW
15972all_lang_makefrags=
15973# List of language subdirectory makefiles. Deprecated.
861bb6c1 15974all_lang_makefiles=
e2500fed 15975# Files for gengtype
ef69da62 15976all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
15977# Files for gengtype with language
15978all_gtfiles_files_langs=
15979all_gtfiles_files_files=
861bb6c1 15980
cc11cc9b
PB
15981# These are the languages that are set in --enable-languages,
15982# and are available in the GCC tree.
15983all_selected_languages=
15984
861bb6c1
JL
15985# Add the language fragments.
15986# Languages are added via two mechanisms. Some information must be
15987# recorded in makefile variables, these are defined in config-lang.in.
15988# We accumulate them and plug them into the main Makefile.
15989# The other mechanism is a set of hooks for each of the main targets
15990# like `clean', `install', etc.
15991
861bb6c1 15992language_hooks="Make-hooks"
861bb6c1 15993
cc11cc9b 15994for lang in ${srcdir}/*/config-lang.in
861bb6c1 15995do
cc11cc9b
PB
15996 case $lang in
15997 # The odd quoting in the next line works around
15998 # an apparent bug in bash 1.12 on linux.
15999 ${srcdir}/[*]/config-lang.in)
16000 continue ;;
16001 *)
16002 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
16003 if test "x$lang_alias" = x
16004 then
16005 echo "$lang doesn't set \$language." 1>&2
16006 exit 1
16007 fi
16008 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
16009 subdirs="$subdirs $subdir"
16010 case ",$enable_languages," in
16011 *,$lang_alias,*)
16012 all_selected_languages="$all_selected_languages $lang_alias"
16013 if test -f $srcdir/$subdir/lang-specs.h; then
16014 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
16015 fi
16016 ;;
16017 esac
16018
16019 if test -f $srcdir/$subdir/lang.opt; then
16020 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
16021 fi
16022 if test -f $srcdir/$subdir/$subdir-tree.def; then
16023 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
16024 fi
16025
16026 language=
16027 boot_language=
16028 compilers=
16029 stagestuff=
16030 outputs=
16031 gtfiles=
16032 . ${srcdir}/$subdir/config-lang.in
16033 if test "x$language" = x
16034 then
16035 echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2
16036 exit 1
16037 fi
16038 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in"
16039 if test -f ${srcdir}/$subdir/Makefile.in
16040 then all_lang_makefiles="$subdir/Makefile"
16041 fi
16042 all_languages="$all_languages $language"
16043 if test "x$boot_language" = xyes
16044 then
16045 all_boot_languages="$all_boot_languages $language"
16046 fi
16047 all_compilers="$all_compilers $compilers"
16048 all_stagestuff="$all_stagestuff $stagestuff"
16049 all_outputs="$all_outputs $outputs"
16050 all_gtfiles="$all_gtfiles $gtfiles"
16051 for f in $gtfiles
16052 do
16053 all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} "
16054 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
16055 done
16056 ;;
16057 esac
861bb6c1
JL
16058done
16059
8ac9d31f
TJ
16060# Pick up gtfiles for c
16061gtfiles=
cc11cc9b 16062subdir="c"
8ac9d31f
TJ
16063. ${srcdir}/c-config-lang.in
16064all_gtfiles="$all_gtfiles $gtfiles"
c406e779 16065for f in $gtfiles
8ac9d31f 16066do
cc11cc9b 16067 all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} "
8ac9d31f 16068 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
16069done
16070
cbc59f01 16071check_languages=
cc11cc9b 16072for language in $all_selected_languages
cbc59f01 16073do
cc11cc9b 16074 check_languages="$check_languages check-$language"
cbc59f01
DD
16075done
16076
62b81e45 16077# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 16078# lang.${target}. Only do so for selected languages.
861bb6c1
JL
16079
16080rm -f Make-hooks
16081touch Make-hooks
bd97af06 16082target_list="all.cross start.encap rest.encap tags \
b2d7fd7b 16083 install-common install-man install-info dvi html \
a541f69d 16084 uninstall info man srcextra srcman srcinfo \
a03ad584 16085 mostlyclean clean distclean maintainer-clean \
8f231b5d 16086 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
cc11cc9b 16087
861bb6c1
JL
16088for t in $target_list
16089do
16090 x=
cc11cc9b 16091 for lang in $all_selected_languages
861bb6c1 16092 do
cc11cc9b 16093 x="$x $lang.$t"
861bb6c1
JL
16094 done
16095 echo "lang.$t: $x" >> Make-hooks
16096done
16097
8bb915b6
NN
16098# --------
16099# UNSORTED
16100# --------
16101
cc06d68c 16102# Create .gdbinit.
861bb6c1 16103
cc06d68c
GP
16104echo "dir ." > .gdbinit
16105echo "dir ${srcdir}" >> .gdbinit
16106if test x$gdb_needs_out_file_path = xyes
16107then
16108 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
16109fi
16110if test "x$subdirs" != x; then
16111 for s in $subdirs
16112 do
16113 echo "dir ${srcdir}/$s" >> .gdbinit
16114 done
861bb6c1 16115fi
cc06d68c 16116echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 16117
8f8d3278
NC
16118# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
16119# absolute path for gcc_tooldir based on inserting the number of up-directory
16120# movements required to get from $(exec_prefix) to $(prefix) into the basic
16121# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
16122# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
16123# make and thus we'd get different behavior depending on where we built the
16124# sources.
5949a9fc 16125if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 16126 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 16127else
8f8d3278
NC
16128# An explanation of the sed strings:
16129# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
16130# -e 's|/$||' match a trailing forward slash and eliminates it
16131# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 16132# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
16133#
16134# (*) Note this pattern overwrites the first character of the string
16135# with a forward slash if one is not already present. This is not a
16136# problem because the exact names of the sub-directories concerned is
16137# unimportant, just the number of them matters.
16138#
16139# The practical upshot of these patterns is like this:
16140#
16141# prefix exec_prefix result
16142# ------ ----------- ------
16143# /foo /foo/bar ../
16144# /foo/ /foo/bar ../
16145# /foo /foo/bar/ ../
16146# /foo/ /foo/bar/ ../
16147# /foo /foo/bar/ugg ../../
16148#
4c112cda 16149 dollar='$$'
caa55b1e 16150 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
16151fi
16152
16153
2ce3c6c6 16154
2bbea3a6
RH
16155# Find a directory in which to install a shared libgcc.
16156
16157# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
16158if test "${enable_version_specific_runtime_libs+set}" = set; then
16159 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
16160
16161fi;
2bbea3a6
RH
16162
16163
5b15f277
RH
16164# Check whether --with-slibdir or --without-slibdir was given.
16165if test "${with_slibdir+set}" = set; then
16166 withval="$with_slibdir"
16167 slibdir="$with_slibdir"
16168else
16169 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 16170 slibdir='$(libsubdir)'
5b15f277 16171elif test "$host" != "$target"; then
2bbea3a6
RH
16172 slibdir='$(build_tooldir)/lib'
16173else
5b15f277 16174 slibdir='$(libdir)'
2bbea3a6 16175fi
ba479fd2 16176fi;
2bbea3a6
RH
16177
16178
1e6347d8 16179objdir=`${PWDCMD-pwd}`
7e717196
JL
16180
16181
22482f74
MS
16182
16183# Check whether --with-datarootdir or --without-datarootdir was given.
16184if test "${with_datarootdir+set}" = set; then
16185 withval="$with_datarootdir"
16186 datarootdir="\${prefix}/$with_datarootdir"
16187else
16188 datarootdir='$(prefix)/share'
16189fi;
16190
16191
16192
16193# Check whether --with-docdir or --without-docdir was given.
16194if test "${with_docdir+set}" = set; then
16195 withval="$with_docdir"
16196 docdir="\${prefix}/$with_docdir"
16197else
16198 docdir='$(datarootdir)'
16199fi;
16200
16201
16202
16203# Check whether --with-htmldir or --without-htmldir was given.
16204if test "${with_htmldir+set}" = set; then
16205 withval="$with_htmldir"
16206 htmldir="\${prefix}/$with_htmldir"
16207else
16208 htmldir='$(docdir)'
16209fi;
16210
16211
861bb6c1
JL
16212# Substitute configuration variables
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
9b16d2c4 16259
e9a25f70 16260
6e26218f 16261
c8724862 16262
e061d1ce 16263
d8bb17c8 16264
11642c3a
ZW
16265
16266
16267
16268
16269
16270
16271
3d9d2476 16272
e2500fed 16273
51b9ff45 16274
861bb6c1 16275
6e3f3080
NN
16276# Echo link setup.
16277if test x${build} = x${host} ; then
16278 if test x${host} = x${target} ; then
16279 echo "Links are now set up to build a native compiler for ${target}." 1>&2
16280 else
16281 echo "Links are now set up to build a cross-compiler" 1>&2
16282 echo " from ${host} to ${target}." 1>&2
16283 fi
16284else
16285 if test x${host} = x${target} ; then
16286 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
16287 echo " for ${target}." 1>&2
16288 else
16289 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
16290 echo " from ${host} to ${target}." 1>&2
16291 fi
16292fi
16293
6de9cd9a
DN
16294
16295
16296
6e3f3080
NN
16297# Configure the subdirectories
16298# AC_CONFIG_SUBDIRS($subdirs)
16299
16300# Create the Makefile
16301# and configure language subdirectories
ba479fd2 16302 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
16303
16304
ba479fd2 16305 ac_config_commands="$ac_config_commands default"
914c5af7 16306
ba479fd2 16307cat >confcache <<\_ACEOF
6e3f3080
NN
16308# This file is a shell script that caches the results of configure
16309# tests run on this system so they can be shared between configure
ba479fd2
NN
16310# scripts and configure runs, see configure's option --config-cache.
16311# It is not useful on other systems. If it contains results you don't
16312# want to keep, you may remove or edit it.
6e3f3080 16313#
ba479fd2
NN
16314# config.status only pays attention to the cache file if you give it
16315# the --recheck option to rerun configure.
6e3f3080 16316#
ba479fd2
NN
16317# `ac_cv_env_foo' variables (set or unset) will be overridden when
16318# loading this file, other *unset* `ac_cv_foo' will be assigned the
16319# following values.
16320
16321_ACEOF
16322
6e3f3080
NN
16323# The following way of writing the cache mishandles newlines in values,
16324# but we know of no workaround that is simple, portable, and efficient.
16325# So, don't put newlines in cache variables' values.
16326# Ultrix sh set writes to stderr and can't be redirected directly,
16327# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
16328{
16329 (set) 2>&1 |
16330 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16331 *ac_space=\ *)
16332 # `set' does not quote correctly, so add quotes (double-quote
16333 # substitution turns \\\\ into \\, and sed turns \\ into \).
16334 sed -n \
86da66b5
HPN
16335 "s/'/'\\\\''/g;
16336 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ba479fd2
NN
16337 ;;
16338 *)
16339 # `set' quotes correctly as required by POSIX, so do not add quotes.
16340 sed -n \
86da66b5 16341 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
16342 ;;
16343 esac;
16344} |
16345 sed '
16346 t clear
16347 : clear
16348 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16349 t end
16350 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16351 : end' >>confcache
16352if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 16353 if test -w $cache_file; then
ba479fd2
NN
16354 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16355 cat confcache >$cache_file
6e3f3080
NN
16356 else
16357 echo "not updating unwritable cache $cache_file"
16358 fi
16359fi
16360rm -f confcache
16361
16362test "x$prefix" = xNONE && prefix=$ac_default_prefix
16363# Let make expand exec_prefix.
16364test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16365
ba479fd2
NN
16366# VPATH may cause trouble with some makes, so we remove $(srcdir),
16367# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16368# trailing colons and then remove the whole line if VPATH becomes empty
16369# (actually we leave an empty line to preserve line numbers).
6e3f3080 16370if test "x$srcdir" = x.; then
86da66b5 16371 ac_vpsub='/^[ ]*VPATH[ ]*=/{
ba479fd2
NN
16372s/:*\$(srcdir):*/:/;
16373s/:*\${srcdir}:*/:/;
16374s/:*@srcdir@:*/:/;
86da66b5 16375s/^\([^=]*=[ ]*\):*/\1/;
ba479fd2 16376s/:*$//;
86da66b5 16377s/^[^=]*=[ ]*$//;
ba479fd2 16378}'
6e3f3080
NN
16379fi
16380
63cf211a 16381DEFS=-DHAVE_CONFIG_H
6e3f3080 16382
ba479fd2
NN
16383ac_libobjs=
16384ac_ltlibobjs=
16385for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16386 # 1. Remove the extension, and $U if already installed.
16387 ac_i=`echo "$ac_i" |
86da66b5 16388 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
ba479fd2
NN
16389 # 2. Add them.
16390 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
16391 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
16392done
16393LIBOBJS=$ac_libobjs
63cf211a 16394
ba479fd2
NN
16395LTLIBOBJS=$ac_ltlibobjs
16396
16397
16398
16399: ${CONFIG_STATUS=./config.status}
16400ac_clean_files_save=$ac_clean_files
16401ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16402{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16403echo "$as_me: creating $CONFIG_STATUS" >&6;}
16404cat >$CONFIG_STATUS <<_ACEOF
16405#! $SHELL
16406# Generated by $as_me.
6e3f3080
NN
16407# Run this file to recreate the current configuration.
16408# Compiler output produced by configure, useful for debugging
ba479fd2 16409# configure, is in config.log if it exists.
6e3f3080 16410
ba479fd2
NN
16411debug=false
16412ac_cs_recheck=false
16413ac_cs_silent=false
16414SHELL=\${CONFIG_SHELL-$SHELL}
16415_ACEOF
16416
16417cat >>$CONFIG_STATUS <<\_ACEOF
16418## --------------------- ##
16419## M4sh Initialization. ##
16420## --------------------- ##
16421
16422# Be Bourne compatible
16423if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16424 emulate sh
16425 NULLCMD=:
16426 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
16427 # is contrary to our usage. Disable this feature.
16428 alias -g '${1+"$@"}'='"$@"'
16429elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16430 set -o posix
16431fi
86da66b5 16432DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
16433
16434# Support unset when possible.
86da66b5 16435if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
16436 as_unset=unset
16437else
16438 as_unset=false
16439fi
16440
16441
16442# Work around bugs in pre-3.0 UWIN ksh.
16443$as_unset ENV MAIL MAILPATH
16444PS1='$ '
16445PS2='> '
16446PS4='+ '
16447
16448# NLS nuisances.
16449for as_var in \
16450 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
16451 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
16452 LC_TELEPHONE LC_TIME
6e3f3080 16453do
86da66b5 16454 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
16455 eval $as_var=C; export $as_var
16456 else
16457 $as_unset $as_var
16458 fi
6e3f3080
NN
16459done
16460
ba479fd2
NN
16461# Required to use basename.
16462if expr a : '\(a\)' >/dev/null 2>&1; then
16463 as_expr=expr
16464else
16465 as_expr=false
16466fi
6e3f3080 16467
ba479fd2
NN
16468if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
16469 as_basename=basename
16470else
16471 as_basename=false
16472fi
6e3f3080
NN
16473
16474
ba479fd2
NN
16475# Name of the executable.
16476as_me=`$as_basename "$0" ||
16477$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16478 X"$0" : 'X\(//\)$' \| \
16479 X"$0" : 'X\(/\)$' \| \
16480 . : '\(.\)' 2>/dev/null ||
16481echo X/"$0" |
16482 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16483 /^X\/\(\/\/\)$/{ s//\1/; q; }
16484 /^X\/\(\/\).*/{ s//\1/; q; }
16485 s/.*/./; q'`
16486
6e3f3080 16487
ba479fd2
NN
16488# PATH needs CR, and LINENO needs CR and PATH.
16489# Avoid depending upon Character Ranges.
16490as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16491as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16492as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16493as_cr_digits='0123456789'
16494as_cr_alnum=$as_cr_Letters$as_cr_digits
16495
16496# The user is always right.
16497if test "${PATH_SEPARATOR+set}" != set; then
16498 echo "#! /bin/sh" >conf$$.sh
16499 echo "exit 0" >>conf$$.sh
16500 chmod +x conf$$.sh
16501 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
16502 PATH_SEPARATOR=';'
6e3f3080 16503 else
ba479fd2
NN
16504 PATH_SEPARATOR=:
16505 fi
16506 rm -f conf$$.sh
16507fi
16508
16509
16510 as_lineno_1=$LINENO
16511 as_lineno_2=$LINENO
16512 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16513 test "x$as_lineno_1" != "x$as_lineno_2" &&
16514 test "x$as_lineno_3" = "x$as_lineno_2" || {
16515 # Find who we are. Look in the path if we contain no path at all
16516 # relative or not.
16517 case $0 in
16518 *[\\/]* ) as_myself=$0 ;;
16519 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16520for as_dir in $PATH
16521do
16522 IFS=$as_save_IFS
16523 test -z "$as_dir" && as_dir=.
16524 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16525done
16526
16527 ;;
16528 esac
16529 # We did not find ourselves, most probably we were run as `sh COMMAND'
16530 # in which case we are not to be found in the path.
16531 if test "x$as_myself" = x; then
16532 as_myself=$0
16533 fi
16534 if test ! -f "$as_myself"; then
16535 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16536echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16537 { (exit 1); exit 1; }; }
6e3f3080 16538 fi
ba479fd2
NN
16539 case $CONFIG_SHELL in
16540 '')
16541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16542for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16543do
16544 IFS=$as_save_IFS
16545 test -z "$as_dir" && as_dir=.
16546 for as_base in sh bash ksh sh5; do
16547 case $as_dir in
16548 /*)
16549 if ("$as_dir/$as_base" -c '
16550 as_lineno_1=$LINENO
16551 as_lineno_2=$LINENO
16552 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16553 test "x$as_lineno_1" != "x$as_lineno_2" &&
16554 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16555 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
16556 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
16557 CONFIG_SHELL=$as_dir/$as_base
16558 export CONFIG_SHELL
16559 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16560 fi;;
16561 esac
16562 done
16563done
16564;;
16565 esac
16566
16567 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16568 # uniformly replaced by the line number. The first 'sed' inserts a
16569 # line-number line before each line; the second 'sed' does the real
16570 # work. The second script uses 'N' to pair each line-number line
16571 # with the numbered line, and appends trailing '-' during
16572 # substitution so that $LINENO is not a special case at line end.
16573 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16574 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16575 sed '=' <$as_myself |
16576 sed '
16577 N
16578 s,$,-,
16579 : loop
16580 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16581 t loop
16582 s,-$,,
16583 s,^['$as_cr_digits']*\n,,
16584 ' >$as_me.lineno &&
16585 chmod +x $as_me.lineno ||
16586 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16587echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16588 { (exit 1); exit 1; }; }
16589
16590 # Don't try to exec as it changes $[0], causing all sort of problems
16591 # (the dirname of $[0] is not the place where we might find the
16592 # original and so on. Autoconf is especially sensible to this).
16593 . ./$as_me.lineno
16594 # Exit status is that of the last command.
16595 exit
16596}
16597
16598
16599case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16600 *c*,-n*) ECHO_N= ECHO_C='
16601' ECHO_T=' ' ;;
16602 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16603 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16604esac
16605
16606if expr a : '\(a\)' >/dev/null 2>&1; then
16607 as_expr=expr
16608else
16609 as_expr=false
16610fi
16611
16612rm -f conf$$ conf$$.exe conf$$.file
16613echo >conf$$.file
16614if ln -s conf$$.file conf$$ 2>/dev/null; then
16615 # We could just check for DJGPP; but this test a) works b) is more generic
16616 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16617 if test -f conf$$.exe; then
16618 # Don't use ln at all; we don't have any links
16619 as_ln_s='cp -p'
6e3f3080 16620 else
ba479fd2 16621 as_ln_s='ln -s'
6e3f3080 16622 fi
ba479fd2
NN
16623elif ln conf$$.file conf$$ 2>/dev/null; then
16624 as_ln_s=ln
16625else
16626 as_ln_s='cp -p'
16627fi
16628rm -f conf$$ conf$$.exe conf$$.file
16629
16630if mkdir -p . 2>/dev/null; then
16631 as_mkdir_p=:
16632else
86da66b5 16633 test -d ./-p && rmdir ./-p
ba479fd2
NN
16634 as_mkdir_p=false
16635fi
16636
16637as_executable_p="test -f"
16638
16639# Sed expression to map a string onto a valid CPP name.
86da66b5 16640as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
16641
16642# Sed expression to map a string onto a valid variable name.
86da66b5 16643as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
16644
16645
16646# IFS
16647# We need space, tab and new line, in precisely that order.
16648as_nl='
16649'
16650IFS=" $as_nl"
16651
16652# CDPATH.
16653$as_unset CDPATH
16654
16655exec 6>&1
16656
16657# Open the log real soon, to keep \$[0] and so on meaningful, and to
16658# report actual input values of CONFIG_FILES etc. instead of their
16659# values after options handling. Logging --version etc. is OK.
16660exec 5>>config.log
16661{
16662 echo
16663 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16664## Running $as_me. ##
16665_ASBOX
16666} >&5
16667cat >&5 <<_CSEOF
16668
16669This file was extended by $as_me, which was
8ab705be 16670generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
16671
16672 CONFIG_FILES = $CONFIG_FILES
16673 CONFIG_HEADERS = $CONFIG_HEADERS
16674 CONFIG_LINKS = $CONFIG_LINKS
16675 CONFIG_COMMANDS = $CONFIG_COMMANDS
16676 $ $0 $@
16677
16678_CSEOF
16679echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16680echo >&5
16681_ACEOF
16682
16683# Files that config.status was made for.
16684if test -n "$ac_config_files"; then
16685 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16686fi
16687
16688if test -n "$ac_config_headers"; then
16689 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16690fi
16691
16692if test -n "$ac_config_links"; then
16693 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16694fi
16695
16696if test -n "$ac_config_commands"; then
16697 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16698fi
16699
16700cat >>$CONFIG_STATUS <<\_ACEOF
16701
16702ac_cs_usage="\
16703\`$as_me' instantiates files from templates according to the
16704current configuration.
16705
16706Usage: $0 [OPTIONS] [FILE]...
16707
16708 -h, --help print this help, then exit
16709 -V, --version print version number, then exit
16710 -q, --quiet do not print progress messages
16711 -d, --debug don't remove temporary files
16712 --recheck update $as_me by reconfiguring in the same conditions
16713 --file=FILE[:TEMPLATE]
86da66b5 16714 instantiate the configuration file FILE
ba479fd2 16715 --header=FILE[:TEMPLATE]
86da66b5 16716 instantiate the configuration header FILE
ba479fd2
NN
16717
16718Configuration files:
16719$config_files
16720
16721Configuration headers:
16722$config_headers
16723
16724Configuration commands:
16725$config_commands
16726
16727Report bugs to <bug-autoconf@gnu.org>."
16728_ACEOF
16729
16730cat >>$CONFIG_STATUS <<_ACEOF
16731ac_cs_version="\\
16732config.status
8ab705be 16733configured by $0, generated by GNU Autoconf 2.59,
ba479fd2
NN
16734 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16735
86da66b5 16736Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
16737This config.status script is free software; the Free Software Foundation
16738gives unlimited permission to copy, distribute and modify it."
16739srcdir=$srcdir
16740_ACEOF
16741
16742cat >>$CONFIG_STATUS <<\_ACEOF
16743# If no file are specified by the user, then we need to provide default
16744# value. By we need to know if files were specified by the user.
16745ac_need_defaults=:
16746while test $# != 0
16747do
16748 case $1 in
16749 --*=*)
16750 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16751 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16752 ac_shift=:
16753 ;;
16754 -*)
16755 ac_option=$1
16756 ac_optarg=$2
16757 ac_shift=shift
16758 ;;
16759 *) # This is not an option, so the user has probably given explicit
16760 # arguments.
16761 ac_option=$1
16762 ac_need_defaults=false;;
16763 esac
16764
16765 case $ac_option in
16766 # Handling of the options.
16767_ACEOF
16768cat >>$CONFIG_STATUS <<\_ACEOF
16769 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16770 ac_cs_recheck=: ;;
16771 --version | --vers* | -V )
16772 echo "$ac_cs_version"; exit 0 ;;
16773 --he | --h)
16774 # Conflict between --help and --header
16775 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16776Try \`$0 --help' for more information." >&5
16777echo "$as_me: error: ambiguous option: $1
16778Try \`$0 --help' for more information." >&2;}
16779 { (exit 1); exit 1; }; };;
16780 --help | --hel | -h )
16781 echo "$ac_cs_usage"; exit 0 ;;
16782 --debug | --d* | -d )
16783 debug=: ;;
16784 --file | --fil | --fi | --f )
16785 $ac_shift
16786 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
16787 ac_need_defaults=false;;
16788 --header | --heade | --head | --hea )
16789 $ac_shift
16790 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
16791 ac_need_defaults=false;;
16792 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16793 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16794 ac_cs_silent=: ;;
16795
16796 # This is an error.
16797 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16798Try \`$0 --help' for more information." >&5
16799echo "$as_me: error: unrecognized option: $1
16800Try \`$0 --help' for more information." >&2;}
16801 { (exit 1); exit 1; }; } ;;
16802
16803 *) ac_config_targets="$ac_config_targets $1" ;;
16804
16805 esac
16806 shift
6e3f3080 16807done
ba479fd2
NN
16808
16809ac_configure_extra_args=
16810
16811if $ac_cs_silent; then
16812 exec 6>/dev/null
16813 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
16814fi
16815
ba479fd2
NN
16816_ACEOF
16817cat >>$CONFIG_STATUS <<_ACEOF
16818if \$ac_cs_recheck; then
16819 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
16820 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16821fi
861bb6c1 16822
ba479fd2
NN
16823_ACEOF
16824
16825cat >>$CONFIG_STATUS <<_ACEOF
16826#
16827# INIT-COMMANDS section.
16828#
16829
16830subdirs='$subdirs'
ba479fd2
NN
16831
16832_ACEOF
16833
16834
16835
16836cat >>$CONFIG_STATUS <<\_ACEOF
16837for ac_config_target in $ac_config_targets
16838do
16839 case "$ac_config_target" in
16840 # Handling of arguments.
16841 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
16842 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16843 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
16844 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16845echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16846 { (exit 1); exit 1; }; };;
861bb6c1 16847 esac
ba479fd2
NN
16848done
16849
16850# If the user did not use the arguments to specify the items to instantiate,
16851# then the envvar interface is used. Set only those that are not.
16852# We use the long form for the default assignment because of an extremely
16853# bizarre bug on SunOS 4.1.3.
16854if $ac_need_defaults; then
16855 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16856 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16857 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16858fi
16859
16860# Have a temporary directory for convenience. Make it in the build tree
16861# simply because there is no reason to put it here, and in addition,
16862# creating and moving files from /tmp can sometimes cause problems.
16863# Create a temporary directory, and hook for its removal unless debugging.
16864$debug ||
16865{
16866 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16867 trap '{ (exit 1); exit 1; }' 1 2 13 15
16868}
861bb6c1 16869
ba479fd2 16870# Create a (secure) tmp directory for tmp files.
6e3f3080 16871
ba479fd2
NN
16872{
16873 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
16874 test -n "$tmp" && test -d "$tmp"
16875} ||
16876{
16877 tmp=./confstat$$-$RANDOM
16878 (umask 077 && mkdir $tmp)
16879} ||
16880{
16881 echo "$me: cannot create a temporary directory in ." >&2
16882 { (exit 1); exit 1; }
16883}
16884
16885_ACEOF
16886
16887cat >>$CONFIG_STATUS <<_ACEOF
16888
16889#
16890# CONFIG_FILES section.
16891#
16892
16893# No need to generate the scripts if there are no CONFIG_FILES.
16894# This happens for instance when ./config.status config.h
16895if test -n "\$CONFIG_FILES"; then
16896 # Protect against being on the right side of a sed subst in config.status.
16897 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16898 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16899s,@SHELL@,$SHELL,;t t
16900s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16901s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16902s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16903s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16904s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16905s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16906s,@exec_prefix@,$exec_prefix,;t t
16907s,@prefix@,$prefix,;t t
16908s,@program_transform_name@,$program_transform_name,;t t
16909s,@bindir@,$bindir,;t t
16910s,@sbindir@,$sbindir,;t t
16911s,@libexecdir@,$libexecdir,;t t
16912s,@datadir@,$datadir,;t t
16913s,@sysconfdir@,$sysconfdir,;t t
16914s,@sharedstatedir@,$sharedstatedir,;t t
16915s,@localstatedir@,$localstatedir,;t t
16916s,@libdir@,$libdir,;t t
16917s,@includedir@,$includedir,;t t
16918s,@oldincludedir@,$oldincludedir,;t t
16919s,@infodir@,$infodir,;t t
16920s,@mandir@,$mandir,;t t
16921s,@build_alias@,$build_alias,;t t
16922s,@host_alias@,$host_alias,;t t
16923s,@target_alias@,$target_alias,;t t
16924s,@DEFS@,$DEFS,;t t
16925s,@ECHO_C@,$ECHO_C,;t t
16926s,@ECHO_N@,$ECHO_N,;t t
16927s,@ECHO_T@,$ECHO_T,;t t
16928s,@LIBS@,$LIBS,;t t
16929s,@build@,$build,;t t
16930s,@build_cpu@,$build_cpu,;t t
16931s,@build_vendor@,$build_vendor,;t t
16932s,@build_os@,$build_os,;t t
16933s,@host@,$host,;t t
16934s,@host_cpu@,$host_cpu,;t t
16935s,@host_vendor@,$host_vendor,;t t
16936s,@host_os@,$host_os,;t t
16937s,@target@,$target,;t t
16938s,@target_cpu@,$target_cpu,;t t
16939s,@target_vendor@,$target_vendor,;t t
16940s,@target_os@,$target_os,;t t
18fc9bd4
RG
16941s,@target_noncanonical@,$target_noncanonical,;t t
16942s,@build_subdir@,$build_subdir,;t t
16943s,@host_subdir@,$host_subdir,;t t
16944s,@target_subdir@,$target_subdir,;t t
03787dfd 16945s,@GENINSRC@,$GENINSRC,;t t
ba479fd2
NN
16946s,@CC@,$CC,;t t
16947s,@CFLAGS@,$CFLAGS,;t t
16948s,@LDFLAGS@,$LDFLAGS,;t t
16949s,@CPPFLAGS@,$CPPFLAGS,;t t
16950s,@ac_ct_CC@,$ac_ct_CC,;t t
16951s,@EXEEXT@,$EXEEXT,;t t
16952s,@OBJEXT@,$OBJEXT,;t t
16953s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
16954s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
16955s,@CPP@,$CPP,;t t
bf3b7cd3 16956s,@EGREP@,$EGREP,;t t
ba479fd2 16957s,@strict1_warn@,$strict1_warn,;t t
373477bb 16958s,@cxx_compat_warn@,$cxx_compat_warn,;t t
ba479fd2
NN
16959s,@warn_cflags@,$warn_cflags,;t t
16960s,@WERROR@,$WERROR,;t t
16961s,@nocommon_flag@,$nocommon_flag,;t t
13f05fd0 16962s,@TREEBROWSER@,$TREEBROWSER,;t t
ba479fd2
NN
16963s,@valgrind_path@,$valgrind_path,;t t
16964s,@valgrind_path_defines@,$valgrind_path_defines,;t t
16965s,@valgrind_command@,$valgrind_command,;t t
16966s,@coverage_flags@,$coverage_flags,;t t
16967s,@enable_multilib@,$enable_multilib,;t t
486aa804 16968s,@enable_decimal_float@,$enable_decimal_float,;t t
ba479fd2
NN
16969s,@enable_shared@,$enable_shared,;t t
16970s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
16971s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
16972s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
16973s,@onestep@,$onestep,;t t
9288b845
CD
16974s,@datarootdir@,$datarootdir,;t t
16975s,@docdir@,$docdir,;t t
16976s,@htmldir@,$htmldir,;t t
ba479fd2
NN
16977s,@SET_MAKE@,$SET_MAKE,;t t
16978s,@AWK@,$AWK,;t t
ba479fd2 16979s,@LN_S@,$LN_S,;t t
18fc9bd4 16980s,@LN@,$LN,;t t
ba479fd2
NN
16981s,@RANLIB@,$RANLIB,;t t
16982s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
343a6100 16983s,@ranlib_flags@,$ranlib_flags,;t t
ba479fd2
NN
16984s,@INSTALL@,$INSTALL,;t t
16985s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16986s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16987s,@make_compare_target@,$make_compare_target,;t t
16988s,@have_mktemp_command@,$have_mktemp_command,;t t
16989s,@MAKEINFO@,$MAKEINFO,;t t
16990s,@BUILD_INFO@,$BUILD_INFO,;t t
16991s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
16992s,@FLEX@,$FLEX,;t t
16993s,@BISON@,$BISON,;t t
f6a874ac
JW
16994s,@NM@,$NM,;t t
16995s,@AR@,$AR,;t t
ba479fd2
NN
16996s,@stage1_cflags@,$stage1_cflags,;t t
16997s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
16998s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
16999s,@LDEXP_LIB@,$LDEXP_LIB,;t t
17000s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
17001s,@LIBICONV@,$LIBICONV,;t t
dfb77e37 17002s,@LTLIBICONV@,$LTLIBICONV,;t t
ba479fd2
NN
17003s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
17004s,@manext@,$manext,;t t
17005s,@objext@,$objext,;t t
8bb915b6 17006s,@gthread_flags@,$gthread_flags,;t t
ba479fd2 17007s,@extra_modes_file@,$extra_modes_file,;t t
75685792 17008s,@extra_opt_files@,$extra_opt_files,;t t
18fc9bd4
RG
17009s,@USE_NLS@,$USE_NLS,;t t
17010s,@LIBINTL@,$LIBINTL,;t t
17011s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
17012s,@INCINTL@,$INCINTL,;t t
17013s,@XGETTEXT@,$XGETTEXT,;t t
17014s,@GMSGFMT@,$GMSGFMT,;t t
17015s,@POSUB@,$POSUB,;t t
17016s,@CATALOGS@,$CATALOGS,;t t
17017s,@DATADIRNAME@,$DATADIRNAME,;t t
17018s,@INSTOBJEXT@,$INSTOBJEXT,;t t
17019s,@GENCAT@,$GENCAT,;t t
17020s,@CATOBJEXT@,$CATOBJEXT,;t t
5395b47b 17021s,@host_cc_for_libada@,$host_cc_for_libada,;t t
ba479fd2
NN
17022s,@CROSS@,$CROSS,;t t
17023s,@ALL@,$ALL,;t t
17024s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
17025s,@inhibit_libc@,$inhibit_libc,;t t
ba479fd2
NN
17026s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
17027s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17028s,@STMP_FIXINC@,$STMP_FIXINC,;t t
17029s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
c38f02df 17030s,@collect2@,$collect2,;t t
9f18db39
PB
17031s,@gcc_cv_as@,$gcc_cv_as,;t t
17032s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
17033s,@gcc_cv_ld@,$gcc_cv_ld,;t t
17034s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
17035s,@gcc_cv_nm@,$gcc_cv_nm,;t t
17036s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
d739199a 17037s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
ba479fd2 17038s,@libgcc_visibility@,$libgcc_visibility,;t t
ba479fd2
NN
17039s,@GGC@,$GGC,;t t
17040s,@zlibdir@,$zlibdir,;t t
17041s,@zlibinc@,$zlibinc,;t t
17042s,@MAINT@,$MAINT,;t t
17043s,@gcc_tooldir@,$gcc_tooldir,;t t
17044s,@dollar@,$dollar,;t t
17045s,@slibdir@,$slibdir,;t t
17046s,@objdir@,$objdir,;t t
17047s,@subdirs@,$subdirs,;t t
17048s,@srcdir@,$srcdir,;t t
ba479fd2
NN
17049s,@all_boot_languages@,$all_boot_languages,;t t
17050s,@all_compilers@,$all_compilers,;t t
17051s,@all_gtfiles@,$all_gtfiles,;t t
17052s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
17053s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
17054s,@all_lang_makefrags@,$all_lang_makefrags,;t t
17055s,@all_lang_makefiles@,$all_lang_makefiles,;t t
17056s,@all_languages@,$all_languages,;t t
cc11cc9b 17057s,@all_selected_languages@,$all_selected_languages,;t t
ba479fd2
NN
17058s,@all_stagestuff@,$all_stagestuff,;t t
17059s,@build_exeext@,$build_exeext,;t t
17060s,@build_install_headers_dir@,$build_install_headers_dir,;t t
17061s,@build_xm_file_list@,$build_xm_file_list,;t t
17062s,@build_xm_include_list@,$build_xm_include_list,;t t
17063s,@build_xm_defines@,$build_xm_defines,;t t
17064s,@check_languages@,$check_languages,;t t
17065s,@cc_set_by_configure@,$cc_set_by_configure,;t t
17066s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
17067s,@cpp_install_dir@,$cpp_install_dir,;t t
17068s,@xmake_file@,$xmake_file,;t t
17069s,@tmake_file@,$tmake_file,;t t
30500d84 17070s,@extra_gcc_objs@,$extra_gcc_objs,;t t
ba479fd2
NN
17071s,@extra_headers_list@,$extra_headers_list,;t t
17072s,@extra_objs@,$extra_objs,;t t
17073s,@extra_parts@,$extra_parts,;t t
17074s,@extra_passes@,$extra_passes,;t t
17075s,@extra_programs@,$extra_programs,;t t
17076s,@float_h_file@,$float_h_file,;t t
17077s,@gcc_config_arguments@,$gcc_config_arguments,;t t
17078s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
ba479fd2 17079s,@host_exeext@,$host_exeext,;t t
ba479fd2
NN
17080s,@host_xm_file_list@,$host_xm_file_list,;t t
17081s,@host_xm_include_list@,$host_xm_include_list,;t t
17082s,@host_xm_defines@,$host_xm_defines,;t t
17083s,@out_host_hook_obj@,$out_host_hook_obj,;t t
17084s,@install@,$install,;t t
17085s,@lang_opt_files@,$lang_opt_files,;t t
17086s,@lang_specs_files@,$lang_specs_files,;t t
17087s,@lang_tree_files@,$lang_tree_files,;t t
17088s,@local_prefix@,$local_prefix,;t t
17089s,@md_file@,$md_file,;t t
17090s,@objc_boehm_gc@,$objc_boehm_gc,;t t
17091s,@out_file@,$out_file,;t t
17092s,@out_object_file@,$out_object_file,;t t
17093s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
17094s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
ba479fd2
NN
17095s,@thread_file@,$thread_file,;t t
17096s,@tm_file_list@,$tm_file_list,;t t
17097s,@tm_include_list@,$tm_include_list,;t t
17098s,@tm_defines@,$tm_defines,;t t
17099s,@tm_p_file_list@,$tm_p_file_list,;t t
17100s,@tm_p_include_list@,$tm_p_include_list,;t t
17101s,@xm_file_list@,$xm_file_list,;t t
17102s,@xm_include_list@,$xm_include_list,;t t
17103s,@xm_defines@,$xm_defines,;t t
ba479fd2
NN
17104s,@c_target_objs@,$c_target_objs,;t t
17105s,@cxx_target_objs@,$cxx_target_objs,;t t
17106s,@target_cpu_default@,$target_cpu_default,;t t
6de9cd9a
DN
17107s,@GMPLIBS@,$GMPLIBS,;t t
17108s,@GMPINC@,$GMPINC,;t t
ba479fd2
NN
17109s,@LIBOBJS@,$LIBOBJS,;t t
17110s,@LTLIBOBJS@,$LTLIBOBJS,;t t
17111/@language_hooks@/r $language_hooks
17112s,@language_hooks@,,;t t
17113CEOF
17114
17115_ACEOF
17116
17117 cat >>$CONFIG_STATUS <<\_ACEOF
17118 # Split the substitutions into bite-sized pieces for seds with
17119 # small command number limits, like on Digital OSF/1 and HP-UX.
17120 ac_max_sed_lines=48
17121 ac_sed_frag=1 # Number of current file.
17122 ac_beg=1 # First line for current file.
17123 ac_end=$ac_max_sed_lines # Line after last line for current file.
17124 ac_more_lines=:
17125 ac_sed_cmds=
17126 while $ac_more_lines; do
17127 if test $ac_beg -gt 1; then
17128 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17129 else
17130 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17131 fi
17132 if test ! -s $tmp/subs.frag; then
17133 ac_more_lines=false
17134 else
17135 # The purpose of the label and of the branching condition is to
17136 # speed up the sed processing (if there are no `@' at all, there
17137 # is no need to browse any of the substitutions).
17138 # These are the two extra sed commands mentioned above.
17139 (echo ':t
17140 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17141 if test -z "$ac_sed_cmds"; then
86da66b5 17142 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2 17143 else
86da66b5 17144 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2
NN
17145 fi
17146 ac_sed_frag=`expr $ac_sed_frag + 1`
17147 ac_beg=$ac_end
17148 ac_end=`expr $ac_end + $ac_max_sed_lines`
17149 fi
17150 done
17151 if test -z "$ac_sed_cmds"; then
17152 ac_sed_cmds=cat
63cf211a 17153 fi
ba479fd2 17154fi # test -n "$CONFIG_FILES"
cafe096b 17155
ba479fd2
NN
17156_ACEOF
17157cat >>$CONFIG_STATUS <<\_ACEOF
17158for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17159 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17160 case $ac_file in
17161 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
17162 cat >$tmp/stdin
17163 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17164 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 17165 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 17166 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 17167 * ) ac_file_in=$ac_file.in ;;
63cf211a 17168 esac
cafe096b 17169
ba479fd2
NN
17170 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17171 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17172$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17173 X"$ac_file" : 'X\(//\)[^/]' \| \
17174 X"$ac_file" : 'X\(//\)$' \| \
17175 X"$ac_file" : 'X\(/\)' \| \
17176 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17177echo X"$ac_file" |
17178 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17179 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17180 /^X\(\/\/\)$/{ s//\1/; q; }
17181 /^X\(\/\).*/{ s//\1/; q; }
17182 s/.*/./; q'`
17183 { if $as_mkdir_p; then
17184 mkdir -p "$ac_dir"
17185 else
17186 as_dir="$ac_dir"
17187 as_dirs=
17188 while test ! -d "$as_dir"; do
17189 as_dirs="$as_dir $as_dirs"
17190 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17191$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17192 X"$as_dir" : 'X\(//\)[^/]' \| \
17193 X"$as_dir" : 'X\(//\)$' \| \
17194 X"$as_dir" : 'X\(/\)' \| \
17195 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17196echo X"$as_dir" |
17197 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17198 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17199 /^X\(\/\/\)$/{ s//\1/; q; }
17200 /^X\(\/\).*/{ s//\1/; q; }
17201 s/.*/./; q'`
17202 done
17203 test ! -n "$as_dirs" || mkdir $as_dirs
17204 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17205echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17206 { (exit 1); exit 1; }; }; }
6e3f3080 17207
ba479fd2
NN
17208 ac_builddir=.
17209
17210if test "$ac_dir" != .; then
17211 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17212 # A "../" for each directory in $ac_dir_suffix.
17213 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17214else
17215 ac_dir_suffix= ac_top_builddir=
17216fi
17217
17218case $srcdir in
17219 .) # No --srcdir option. We are building in place.
17220 ac_srcdir=.
17221 if test -z "$ac_top_builddir"; then
17222 ac_top_srcdir=.
17223 else
17224 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17225 fi ;;
17226 [\\/]* | ?:[\\/]* ) # Absolute path.
17227 ac_srcdir=$srcdir$ac_dir_suffix;
17228 ac_top_srcdir=$srcdir ;;
17229 *) # Relative path.
17230 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17231 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17232esac
8ab705be
KC
17233
17234# Do not use `cd foo && pwd` to compute absolute paths, because
17235# the directories may not exist.
17236case `pwd` in
17237.) ac_abs_builddir="$ac_dir";;
86da66b5 17238*)
8ab705be
KC
17239 case "$ac_dir" in
17240 .) ac_abs_builddir=`pwd`;;
17241 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17242 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
17243 esac;;
17244esac
8ab705be 17245case $ac_abs_builddir in
86da66b5
HPN
17246.) ac_abs_top_builddir=${ac_top_builddir}.;;
17247*)
17248 case ${ac_top_builddir}. in
8ab705be 17249 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 17250 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 17251 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
17252 esac;;
17253esac
8ab705be 17254case $ac_abs_builddir in
86da66b5
HPN
17255.) ac_abs_srcdir=$ac_srcdir;;
17256*)
17257 case $ac_srcdir in
8ab705be 17258 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 17259 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 17260 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
17261 esac;;
17262esac
8ab705be 17263case $ac_abs_builddir in
86da66b5
HPN
17264.) ac_abs_top_srcdir=$ac_top_srcdir;;
17265*)
17266 case $ac_top_srcdir in
8ab705be 17267 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 17268 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 17269 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
17270 esac;;
17271esac
ba479fd2
NN
17272
17273
17274
ec6c7392
PB
17275 if test x"$ac_file" != x-; then
17276 { echo "$as_me:$LINENO: creating $ac_file" >&5
17277echo "$as_me: creating $ac_file" >&6;}
17278 rm -f "$ac_file"
17279 fi
ba479fd2
NN
17280 # Let's still pretend it is `configure' which instantiates (i.e., don't
17281 # use $as_me), people would be surprised to read:
17282 # /* config.h. Generated by config.status. */
17283 if test x"$ac_file" = x-; then
17284 configure_input=
17285 else
17286 configure_input="$ac_file. "
17287 fi
17288 configure_input=$configure_input"Generated from `echo $ac_file_in |
86da66b5 17289 sed 's,.*/,,'` by configure."
ba479fd2
NN
17290
17291 # First look for the input files in the build tree, otherwise in the
17292 # src tree.
17293 ac_file_inputs=`IFS=:
17294 for f in $ac_file_in; do
17295 case $f in
17296 -) echo $tmp/stdin ;;
17297 [\\/$]*)
86da66b5
HPN
17298 # Absolute (can't be DOS-style, as IFS=:)
17299 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17300echo "$as_me: error: cannot find input file: $f" >&2;}
17301 { (exit 1); exit 1; }; }
86da66b5 17302 echo "$f";;
ba479fd2 17303 *) # Relative
86da66b5
HPN
17304 if test -f "$f"; then
17305 # Build tree
17306 echo "$f"
17307 elif test -f "$srcdir/$f"; then
17308 # Source tree
17309 echo "$srcdir/$f"
17310 else
17311 # /dev/null tree
17312 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17313echo "$as_me: error: cannot find input file: $f" >&2;}
17314 { (exit 1); exit 1; }; }
86da66b5 17315 fi;;
ba479fd2
NN
17316 esac
17317 done` || { (exit 1); exit 1; }
17318_ACEOF
17319cat >>$CONFIG_STATUS <<_ACEOF
17320 sed "$ac_vpsub
17321$extrasub
17322_ACEOF
17323cat >>$CONFIG_STATUS <<\_ACEOF
17324:t
17325/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17326s,@configure_input@,$configure_input,;t t
17327s,@srcdir@,$ac_srcdir,;t t
17328s,@abs_srcdir@,$ac_abs_srcdir,;t t
17329s,@top_srcdir@,$ac_top_srcdir,;t t
17330s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17331s,@builddir@,$ac_builddir,;t t
17332s,@abs_builddir@,$ac_abs_builddir,;t t
17333s,@top_builddir@,$ac_top_builddir,;t t
17334s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17335" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17336 rm -f $tmp/stdin
17337 if test x"$ac_file" != x-; then
17338 mv $tmp/out $ac_file
17339 else
17340 cat $tmp/out
17341 rm -f $tmp/out
17342 fi
17343
17344done
17345_ACEOF
17346cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 17347
ba479fd2
NN
17348#
17349# CONFIG_HEADER section.
17350#
861bb6c1
JL
17351
17352# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17353# NAME is the cpp macro being defined and VALUE is the value it is being given.
17354#
17355# ac_d sets the value in "#define NAME VALUE" lines.
86da66b5
HPN
17356ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17357ac_dB='[ ].*$,\1#\2'
ba479fd2
NN
17358ac_dC=' '
17359ac_dD=',;t'
17360# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
86da66b5 17361ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ba479fd2 17362ac_uB='$,\1#\2define\3'
861bb6c1 17363ac_uC=' '
ba479fd2
NN
17364ac_uD=',;t'
17365
17366for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 17367 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
17368 case $ac_file in
17369 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
17370 cat >$tmp/stdin
17371 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17372 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 17373 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 17374 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 17375 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
17376 esac
17377
ba479fd2
NN
17378 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17379echo "$as_me: creating $ac_file" >&6;}
17380
17381 # First look for the input files in the build tree, otherwise in the
17382 # src tree.
17383 ac_file_inputs=`IFS=:
17384 for f in $ac_file_in; do
17385 case $f in
17386 -) echo $tmp/stdin ;;
17387 [\\/$]*)
86da66b5
HPN
17388 # Absolute (can't be DOS-style, as IFS=:)
17389 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17390echo "$as_me: error: cannot find input file: $f" >&2;}
17391 { (exit 1); exit 1; }; }
86da66b5
HPN
17392 # Do quote $f, to prevent DOS paths from being IFS'd.
17393 echo "$f";;
ba479fd2 17394 *) # Relative
86da66b5
HPN
17395 if test -f "$f"; then
17396 # Build tree
17397 echo "$f"
17398 elif test -f "$srcdir/$f"; then
17399 # Source tree
17400 echo "$srcdir/$f"
17401 else
17402 # /dev/null tree
17403 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17404echo "$as_me: error: cannot find input file: $f" >&2;}
17405 { (exit 1); exit 1; }; }
86da66b5 17406 fi;;
ba479fd2
NN
17407 esac
17408 done` || { (exit 1); exit 1; }
17409 # Remove the trailing spaces.
86da66b5 17410 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
ba479fd2
NN
17411
17412_ACEOF
17413
17414# Transform confdefs.h into two sed scripts, `conftest.defines' and
17415# `conftest.undefs', that substitutes the proper values into
17416# config.h.in to produce config.h. The first handles `#define'
17417# templates, and the second `#undef' templates.
17418# And first: Protect against being on the right side of a sed subst in
17419# config.status. Protect against being in an unquoted here document
17420# in config.status.
17421rm -f conftest.defines conftest.undefs
17422# Using a here document instead of a string reduces the quoting nightmare.
17423# Putting comments in sed scripts is not portable.
17424#
17425# `end' is used to avoid that the second main sed command (meant for
17426# 0-ary CPP macros) applies to n-ary macro definitions.
17427# See the Autoconf documentation for `clear'.
17428cat >confdef2sed.sed <<\_ACEOF
17429s/[\\&,]/\\&/g
17430s,[\\$`],\\&,g
17431t clear
17432: clear
86da66b5 17433s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
ba479fd2 17434t end
86da66b5 17435s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
ba479fd2
NN
17436: end
17437_ACEOF
17438# If some macros were called several times there might be several times
17439# the same #defines, which is useless. Nevertheless, we may not want to
17440# sort them, since we want the *last* AC-DEFINE to be honored.
17441uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17442sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17443rm -f confdef2sed.sed
861bb6c1
JL
17444
17445# This sed command replaces #undef with comments. This is necessary, for
17446# example, in the case of _POSIX_SOURCE, which is predefined and required
17447# on some systems where configure will not decide to define it.
ba479fd2 17448cat >>conftest.undefs <<\_ACEOF
86da66b5 17449s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
ba479fd2
NN
17450_ACEOF
17451
17452# Break up conftest.defines because some shells have a limit on the size
17453# of here documents, and old seds have small limits too (100 cmds).
17454echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
86da66b5 17455echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
ba479fd2
NN
17456echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17457echo ' :' >>$CONFIG_STATUS
17458rm -f conftest.tail
17459while grep . conftest.defines >/dev/null
17460do
17461 # Write a limited-size here document to $tmp/defines.sed.
17462 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17463 # Speed up: don't consider the non `#define' lines.
86da66b5 17464 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
ba479fd2
NN
17465 # Work around the forget-to-reset-the-flag bug.
17466 echo 't clr' >>$CONFIG_STATUS
17467 echo ': clr' >>$CONFIG_STATUS
17468 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
17469 echo 'CEOF
17470 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17471 rm -f $tmp/in
17472 mv $tmp/out $tmp/in
17473' >>$CONFIG_STATUS
17474 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17475 rm -f conftest.defines
17476 mv conftest.tail conftest.defines
17477done
17478rm -f conftest.defines
17479echo ' fi # grep' >>$CONFIG_STATUS
17480echo >>$CONFIG_STATUS
861bb6c1 17481
ba479fd2
NN
17482# Break up conftest.undefs because some shells have a limit on the size
17483# of here documents, and old seds have small limits too (100 cmds).
17484echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 17485rm -f conftest.tail
ba479fd2 17486while grep . conftest.undefs >/dev/null
861bb6c1 17487do
ba479fd2
NN
17488 # Write a limited-size here document to $tmp/undefs.sed.
17489 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17490 # Speed up: don't consider the non `#undef'
86da66b5 17491 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
ba479fd2
NN
17492 # Work around the forget-to-reset-the-flag bug.
17493 echo 't clr' >>$CONFIG_STATUS
17494 echo ': clr' >>$CONFIG_STATUS
17495 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 17496 echo 'CEOF
ba479fd2
NN
17497 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17498 rm -f $tmp/in
17499 mv $tmp/out $tmp/in
17500' >>$CONFIG_STATUS
17501 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17502 rm -f conftest.undefs
17503 mv conftest.tail conftest.undefs
861bb6c1 17504done
ba479fd2
NN
17505rm -f conftest.undefs
17506
17507cat >>$CONFIG_STATUS <<\_ACEOF
17508 # Let's still pretend it is `configure' which instantiates (i.e., don't
17509 # use $as_me), people would be surprised to read:
17510 # /* config.h. Generated by config.status. */
17511 if test x"$ac_file" = x-; then
17512 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 17513 else
ba479fd2 17514 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 17515 fi
ba479fd2
NN
17516 cat $tmp/in >>$tmp/config.h
17517 rm -f $tmp/in
17518 if test x"$ac_file" != x-; then
17519 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
17520 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17521echo "$as_me: $ac_file is unchanged" >&6;}
17522 else
17523 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17524$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17525 X"$ac_file" : 'X\(//\)[^/]' \| \
17526 X"$ac_file" : 'X\(//\)$' \| \
17527 X"$ac_file" : 'X\(/\)' \| \
17528 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17529echo X"$ac_file" |
17530 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17531 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17532 /^X\(\/\/\)$/{ s//\1/; q; }
17533 /^X\(\/\).*/{ s//\1/; q; }
17534 s/.*/./; q'`
17535 { if $as_mkdir_p; then
17536 mkdir -p "$ac_dir"
17537 else
17538 as_dir="$ac_dir"
17539 as_dirs=
17540 while test ! -d "$as_dir"; do
17541 as_dirs="$as_dir $as_dirs"
17542 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17543$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17544 X"$as_dir" : 'X\(//\)[^/]' \| \
17545 X"$as_dir" : 'X\(//\)$' \| \
17546 X"$as_dir" : 'X\(/\)' \| \
17547 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17548echo X"$as_dir" |
17549 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17550 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17551 /^X\(\/\/\)$/{ s//\1/; q; }
17552 /^X\(\/\).*/{ s//\1/; q; }
17553 s/.*/./; q'`
17554 done
17555 test ! -n "$as_dirs" || mkdir $as_dirs
17556 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17557echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17558 { (exit 1); exit 1; }; }; }
63cf211a 17559
ba479fd2
NN
17560 rm -f $ac_file
17561 mv $tmp/config.h $ac_file
17562 fi
17563 else
17564 cat $tmp/config.h
17565 rm -f $tmp/config.h
17566 fi
17567done
17568_ACEOF
17569cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 17570
ba479fd2
NN
17571#
17572# CONFIG_COMMANDS section.
17573#
17574for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17575 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17576 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17577 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
17578$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17579 X"$ac_dest" : 'X\(//\)[^/]' \| \
17580 X"$ac_dest" : 'X\(//\)$' \| \
17581 X"$ac_dest" : 'X\(/\)' \| \
17582 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17583echo X"$ac_dest" |
17584 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17585 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17586 /^X\(\/\/\)$/{ s//\1/; q; }
17587 /^X\(\/\).*/{ s//\1/; q; }
17588 s/.*/./; q'`
86da66b5
HPN
17589 { if $as_mkdir_p; then
17590 mkdir -p "$ac_dir"
17591 else
17592 as_dir="$ac_dir"
17593 as_dirs=
17594 while test ! -d "$as_dir"; do
17595 as_dirs="$as_dir $as_dirs"
17596 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17597$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17598 X"$as_dir" : 'X\(//\)[^/]' \| \
17599 X"$as_dir" : 'X\(//\)$' \| \
17600 X"$as_dir" : 'X\(/\)' \| \
17601 . : '\(.\)' 2>/dev/null ||
17602echo X"$as_dir" |
17603 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17604 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17605 /^X\(\/\/\)$/{ s//\1/; q; }
17606 /^X\(\/\).*/{ s//\1/; q; }
17607 s/.*/./; q'`
17608 done
17609 test ! -n "$as_dirs" || mkdir $as_dirs
17610 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17611echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17612 { (exit 1); exit 1; }; }; }
17613
ba479fd2
NN
17614 ac_builddir=.
17615
17616if test "$ac_dir" != .; then
17617 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17618 # A "../" for each directory in $ac_dir_suffix.
17619 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17620else
17621 ac_dir_suffix= ac_top_builddir=
17622fi
17623
17624case $srcdir in
17625 .) # No --srcdir option. We are building in place.
17626 ac_srcdir=.
17627 if test -z "$ac_top_builddir"; then
17628 ac_top_srcdir=.
17629 else
17630 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17631 fi ;;
17632 [\\/]* | ?:[\\/]* ) # Absolute path.
17633 ac_srcdir=$srcdir$ac_dir_suffix;
17634 ac_top_srcdir=$srcdir ;;
17635 *) # Relative path.
17636 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17637 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17638esac
8ab705be
KC
17639
17640# Do not use `cd foo && pwd` to compute absolute paths, because
17641# the directories may not exist.
17642case `pwd` in
17643.) ac_abs_builddir="$ac_dir";;
86da66b5 17644*)
8ab705be
KC
17645 case "$ac_dir" in
17646 .) ac_abs_builddir=`pwd`;;
17647 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17648 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
17649 esac;;
17650esac
8ab705be 17651case $ac_abs_builddir in
86da66b5
HPN
17652.) ac_abs_top_builddir=${ac_top_builddir}.;;
17653*)
17654 case ${ac_top_builddir}. in
8ab705be 17655 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 17656 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 17657 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
17658 esac;;
17659esac
8ab705be 17660case $ac_abs_builddir in
86da66b5
HPN
17661.) ac_abs_srcdir=$ac_srcdir;;
17662*)
17663 case $ac_srcdir in
8ab705be 17664 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 17665 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 17666 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
17667 esac;;
17668esac
8ab705be 17669case $ac_abs_builddir in
86da66b5
HPN
17670.) ac_abs_top_srcdir=$ac_top_srcdir;;
17671*)
17672 case $ac_top_srcdir in
8ab705be 17673 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 17674 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 17675 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
17676 esac;;
17677esac
ba479fd2
NN
17678
17679
17680 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
17681echo "$as_me: executing $ac_dest commands" >&6;}
17682 case $ac_dest in
17683 default )
f1faaabd
NN
17684case ${CONFIG_HEADERS} in
17685 *auto-host.h:config.in*)
17686 echo > cstamp-h ;;
861bb6c1 17687esac
2ed26f6b 17688# Make sure all the subdirs exist.
3b620440 17689for d in $subdirs doc build
2ed26f6b 17690do
2ed26f6b 17691 test -d $d || mkdir $d
2ed26f6b 17692done
93cf819d
BK
17693# If the host supports symlinks, point stage[1234] at ../stage[1234] so
17694# bootstrapping and the installation procedure can still use
17695# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
17696# FLAGS_TO_PASS has been modified to solve the problem there.
17697# This is virtually a duplicate of what happens in configure.lang; we do
17698# an extra check to make sure this only happens if ln -s can be used.
35f06ae4
PB
17699case "$LN_S" in
17700 *-s*)
17701 for d in ${subdirs} ; do
1e6347d8 17702 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 17703 cd $d
6a1b7268 17704 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
17705 do
17706 rm -f $t
35f06ae4 17707 $LN_S ../$t $t 2>/dev/null
4e8a434e
BK
17708 done
17709 cd $STARTDIR
35f06ae4
PB
17710 done
17711 ;;
17712esac
ba479fd2
NN
17713 ;;
17714 esac
17715done
17716_ACEOF
cafe096b 17717
ba479fd2
NN
17718cat >>$CONFIG_STATUS <<\_ACEOF
17719
17720{ (exit 0); exit 0; }
17721_ACEOF
861bb6c1 17722chmod +x $CONFIG_STATUS
ba479fd2
NN
17723ac_clean_files=$ac_clean_files_save
17724
17725
17726# configure is writing to config.log, and then calls config.status.
17727# config.status does its own redirection, appending to config.log.
17728# Unfortunately, on DOS this fails, as config.log is still kept open
17729# by configure, so config.status won't be able to write to it; its
17730# output is simply discarded. So we exec the FD to /dev/null,
17731# effectively closing config.log, so it can be properly (re)opened and
17732# appended to by config.status. When coming back to configure, we
17733# need to make the FD available again.
17734if test "$no_create" != yes; then
17735 ac_cs_success=:
17736 ac_config_status_args=
17737 test "$silent" = yes &&
17738 ac_config_status_args="$ac_config_status_args --quiet"
17739 exec 5>/dev/null
17740 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17741 exec 5>>config.log
17742 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17743 # would make configure fail if this is the last instruction.
17744 $ac_cs_success || { (exit 1); exit 1; }
17745fi
861bb6c1 17746