]> gcc.gnu.org Git - gcc.git/blame - gcc/configure
configure.in: Fix thinko in previous check-in.
[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
1546bb64 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_libsubdir 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)
1546bb64 915 --with-build-libsubdir=DIR Directory where to find libraries for build system
ba479fd2
NN
916 --with-local-prefix=DIR specifies directory to put local include
917 --with-gxx-include-dir=DIR
918 specifies directory to put g++ header files
919 --with-cpp-install-dir=DIR
920 install the user visible C preprocessor in DIR
921 (relative to PREFIX) as well as PREFIX/bin
922 --with-gnu-ld arrange to work with GNU ld.
923 --with-ld arrange to use the specified ld (full pathname)
d594623a 924 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
925 --with-gnu-as arrange to work with GNU as
926 --with-as arrange to use the specified as (full pathname)
927 --with-stabs arrange to use stabs instead of host debug format
928 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
929 --with-build-sysroot=sysroot
930 use sysroot as the system root during the build
ba479fd2 931 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
dfb77e37
KC
932 --with-gnu-ld assume the C compiler uses GNU ld default=no
933 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
934 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 935 --with-system-libunwind use installed libunwind
ed965309 936 --with-long-double-128 Use 128-bit long double by default.
59415997 937 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
938 with the compiler
939 --with-system-zlib use installed libz
22482f74
MS
940 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
941 --with-datarootdir=DIR Use DIR as the data root [PREFIX/share]
942 --with-docdir=DIR Install documentation in DIR [DATAROOTDIR]
943 --with-htmldir=DIR html documentation in in DIR [DOCDIR]
13c22933 944
ba479fd2
NN
945Some influential environment variables:
946 CC C compiler command
947 CFLAGS C compiler flags
948 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
949 nonstandard directory <lib dir>
950 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
951 headers in a nonstandard directory <include dir>
952 CPP C preprocessor
6de9cd9a
DN
953 GMPLIBS How to link GMP
954 GMPINC How to find GMP include files
13c22933 955
ba479fd2
NN
956Use these variables to override the choices made by `configure' or to help
957it to find libraries and programs with nonstandard names/locations.
73458fb7 958
ba479fd2
NN
959_ACEOF
960fi
6e3f3080 961
ba479fd2
NN
962if test "$ac_init_help" = "recursive"; then
963 # If there are subdirs, report their specific --help.
964 ac_popdir=`pwd`
965 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
966 test -d $ac_dir || continue
967 ac_builddir=.
968
969if test "$ac_dir" != .; then
970 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
971 # A "../" for each directory in $ac_dir_suffix.
972 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
973else
974 ac_dir_suffix= ac_top_builddir=
975fi
976
977case $srcdir in
978 .) # No --srcdir option. We are building in place.
979 ac_srcdir=.
980 if test -z "$ac_top_builddir"; then
981 ac_top_srcdir=.
982 else
983 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
984 fi ;;
985 [\\/]* | ?:[\\/]* ) # Absolute path.
986 ac_srcdir=$srcdir$ac_dir_suffix;
987 ac_top_srcdir=$srcdir ;;
988 *) # Relative path.
989 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
990 ac_top_srcdir=$ac_top_builddir$srcdir ;;
991esac
8ab705be
KC
992
993# Do not use `cd foo && pwd` to compute absolute paths, because
994# the directories may not exist.
995case `pwd` in
996.) ac_abs_builddir="$ac_dir";;
86da66b5 997*)
8ab705be
KC
998 case "$ac_dir" in
999 .) ac_abs_builddir=`pwd`;;
1000 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1001 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
1002 esac;;
1003esac
8ab705be 1004case $ac_abs_builddir in
86da66b5
HPN
1005.) ac_abs_top_builddir=${ac_top_builddir}.;;
1006*)
1007 case ${ac_top_builddir}. in
8ab705be 1008 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 1009 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 1010 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
1011 esac;;
1012esac
8ab705be 1013case $ac_abs_builddir in
86da66b5
HPN
1014.) ac_abs_srcdir=$ac_srcdir;;
1015*)
1016 case $ac_srcdir in
8ab705be 1017 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 1018 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 1019 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
1020 esac;;
1021esac
8ab705be 1022case $ac_abs_builddir in
86da66b5
HPN
1023.) ac_abs_top_srcdir=$ac_top_srcdir;;
1024*)
1025 case $ac_top_srcdir in
8ab705be 1026 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 1027 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 1028 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
1029 esac;;
1030esac
ba479fd2
NN
1031
1032 cd $ac_dir
1033 # Check for guested configure; otherwise get Cygnus style configure.
1034 if test -f $ac_srcdir/configure.gnu; then
1035 echo
1036 $SHELL $ac_srcdir/configure.gnu --help=recursive
1037 elif test -f $ac_srcdir/configure; then
1038 echo
1039 $SHELL $ac_srcdir/configure --help=recursive
1040 elif test -f $ac_srcdir/configure.ac ||
86da66b5 1041 test -f $ac_srcdir/configure.in; then
ba479fd2
NN
1042 echo
1043 $ac_configure --help
1044 else
1045 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1046 fi
ec6c7392 1047 cd $ac_popdir
ba479fd2
NN
1048 done
1049fi
1050
1051test -n "$ac_init_help" && exit 0
1052if $ac_init_version; then
1053 cat <<\_ACEOF
1054
86da66b5 1055Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1056This configure script is free software; the Free Software Foundation
1057gives unlimited permission to copy, distribute and modify it.
1058_ACEOF
1059 exit 0
1060fi
1061exec 5>config.log
1062cat >&5 <<_ACEOF
1063This file contains any messages produced by compilers while
1064running configure, to aid debugging if configure makes a mistake.
1065
1066It was created by $as_me, which was
8ab705be 1067generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1068
1069 $ $0 $@
1070
1071_ACEOF
1072{
1073cat <<_ASUNAME
1074## --------- ##
1075## Platform. ##
1076## --------- ##
1077
1078hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1079uname -m = `(uname -m) 2>/dev/null || echo unknown`
1080uname -r = `(uname -r) 2>/dev/null || echo unknown`
1081uname -s = `(uname -s) 2>/dev/null || echo unknown`
1082uname -v = `(uname -v) 2>/dev/null || echo unknown`
1083
1084/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1085/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1086
1087/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1088/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1089/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1090hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1091/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1092/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1093/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1094
1095_ASUNAME
1096
1097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1098for as_dir in $PATH
1099do
1100 IFS=$as_save_IFS
1101 test -z "$as_dir" && as_dir=.
1102 echo "PATH: $as_dir"
1103done
1104
1105} >&5
1106
1107cat >&5 <<_ACEOF
1108
1109
1110## ----------- ##
1111## Core tests. ##
1112## ----------- ##
1113
1114_ACEOF
1115
1116
1117# Keep a trace of the command line.
1118# Strip out --no-create and --no-recursion so they do not pile up.
1119# Strip out --silent because we don't want to record it for future runs.
1120# Also quote any args containing shell meta-characters.
1121# Make two passes to allow for proper duplicate-argument suppression.
1122ac_configure_args=
1123ac_configure_args0=
1124ac_configure_args1=
1125ac_sep=
1126ac_must_keep_next=false
1127for ac_pass in 1 2
1128do
1129 for ac_arg
1130 do
1131 case $ac_arg in
1132 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1133 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1134 | -silent | --silent | --silen | --sile | --sil)
1135 continue ;;
1136 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1137 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1138 esac
1139 case $ac_pass in
1140 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1141 2)
1142 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1143 if test $ac_must_keep_next = true; then
86da66b5 1144 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1145 else
86da66b5
HPN
1146 case $ac_arg in
1147 *=* | --config-cache | -C | -disable-* | --disable-* \
1148 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1149 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1150 | -with-* | --with-* | -without-* | --without-* | --x)
1151 case "$ac_configure_args0 " in
1152 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1153 esac
1154 ;;
1155 -* ) ac_must_keep_next=true ;;
1156 esac
ba479fd2
NN
1157 fi
1158 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1159 # Get rid of the leading space.
1160 ac_sep=" "
1161 ;;
1162 esac
1163 done
1164done
1165$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1166$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1167
1168# When interrupted or exit'd, cleanup temporary files, and complete
1169# config.log. We remove comments because anyway the quotes in there
1170# would cause problems or look ugly.
1171# WARNING: Be sure not to use single quotes in there, as some shells,
1172# such as our DU 5.0 friend, will then `close' the trap.
1173trap 'exit_status=$?
1174 # Save into config.log some information that might help in debugging.
1175 {
1176 echo
1177
1178 cat <<\_ASBOX
1179## ---------------- ##
1180## Cache variables. ##
1181## ---------------- ##
1182_ASBOX
1183 echo
1184 # The following way of writing the cache mishandles newlines in values,
1185{
1186 (set) 2>&1 |
1187 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1188 *ac_space=\ *)
1189 sed -n \
86da66b5
HPN
1190 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1191 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
ba479fd2
NN
1192 ;;
1193 *)
1194 sed -n \
86da66b5 1195 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
1196 ;;
1197 esac;
1198}
1199 echo
1200
1201 cat <<\_ASBOX
1202## ----------------- ##
1203## Output variables. ##
1204## ----------------- ##
1205_ASBOX
1206 echo
1207 for ac_var in $ac_subst_vars
1208 do
1209 eval ac_val=$`echo $ac_var`
1210 echo "$ac_var='"'"'$ac_val'"'"'"
1211 done | sort
1212 echo
1213
1214 if test -n "$ac_subst_files"; then
1215 cat <<\_ASBOX
1216## ------------- ##
1217## Output files. ##
1218## ------------- ##
1219_ASBOX
1220 echo
1221 for ac_var in $ac_subst_files
1222 do
1223 eval ac_val=$`echo $ac_var`
86da66b5 1224 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1225 done | sort
1226 echo
1227 fi
1228
1229 if test -s confdefs.h; then
1230 cat <<\_ASBOX
1231## ----------- ##
1232## confdefs.h. ##
1233## ----------- ##
1234_ASBOX
1235 echo
1236 sed "/^$/d" confdefs.h | sort
1237 echo
1238 fi
1239 test "$ac_signal" != 0 &&
1240 echo "$as_me: caught signal $ac_signal"
1241 echo "$as_me: exit $exit_status"
1242 } >&5
86da66b5 1243 rm -f core *.core &&
ba479fd2
NN
1244 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1245 exit $exit_status
1246 ' 0
1247for ac_signal in 1 2 13 15; do
1248 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1249done
1250ac_signal=0
1251
1252# confdefs.h avoids OS command line length limits that DEFS can exceed.
1253rm -rf conftest* confdefs.h
1254# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1255echo >confdefs.h
1256
1257# Predefined preprocessor variables.
1258
1259cat >>confdefs.h <<_ACEOF
1260#define PACKAGE_NAME "$PACKAGE_NAME"
1261_ACEOF
1262
1263
1264cat >>confdefs.h <<_ACEOF
1265#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1266_ACEOF
1267
1268
1269cat >>confdefs.h <<_ACEOF
1270#define PACKAGE_VERSION "$PACKAGE_VERSION"
1271_ACEOF
1272
1273
1274cat >>confdefs.h <<_ACEOF
1275#define PACKAGE_STRING "$PACKAGE_STRING"
1276_ACEOF
1277
1278
1279cat >>confdefs.h <<_ACEOF
1280#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1281_ACEOF
1282
1283
1284# Let the site file select an alternate cache file if it wants to.
1285# Prefer explicitly selected file to automatically selected ones.
1286if test -z "$CONFIG_SITE"; then
1287 if test "x$prefix" != xNONE; then
1288 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1289 else
1290 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1291 fi
1292fi
1293for ac_site_file in $CONFIG_SITE; do
1294 if test -r "$ac_site_file"; then
1295 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1296echo "$as_me: loading site script $ac_site_file" >&6;}
1297 sed 's/^/| /' "$ac_site_file" >&5
1298 . "$ac_site_file"
1299 fi
1300done
1301
1302if test -r "$cache_file"; then
1303 # Some versions of bash will fail to source /dev/null (special
1304 # files actually), so we avoid doing that.
1305 if test -f "$cache_file"; then
1306 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1307echo "$as_me: loading cache $cache_file" >&6;}
1308 case $cache_file in
1309 [\\/]* | ?:[\\/]* ) . $cache_file;;
1310 *) . ./$cache_file;;
1311 esac
1312 fi
1313else
1314 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1315echo "$as_me: creating cache $cache_file" >&6;}
1316 >$cache_file
1317fi
1318
1319# Check that the precious variables saved in the cache have kept the same
1320# value.
1321ac_cache_corrupted=false
1322for ac_var in `(set) 2>&1 |
86da66b5 1323 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1324 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1325 eval ac_new_set=\$ac_env_${ac_var}_set
1326 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1327 eval ac_new_val="\$ac_env_${ac_var}_value"
1328 case $ac_old_set,$ac_new_set in
1329 set,)
1330 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1331echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1332 ac_cache_corrupted=: ;;
1333 ,set)
1334 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1335echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1336 ac_cache_corrupted=: ;;
1337 ,);;
1338 *)
1339 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1340 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1341echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1342 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1343echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1344 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1345echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1346 ac_cache_corrupted=:
ba479fd2
NN
1347 fi;;
1348 esac
1349 # Pass precious variables to config.status.
1350 if test "$ac_new_set" = set; then
1351 case $ac_new_val in
1352 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1353 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1354 *) ac_arg=$ac_var=$ac_new_val ;;
1355 esac
1356 case " $ac_configure_args " in
1357 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1358 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1359 esac
1360 fi
1361done
1362if $ac_cache_corrupted; then
1363 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1364echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1365 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1366echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1367 { (exit 1); exit 1; }; }
1368fi
1369
1370ac_ext=c
1371ac_cpp='$CPP $CPPFLAGS'
1372ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1373ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1374ac_compiler_gnu=$ac_cv_c_compiler_gnu
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
914c5af7 1394
ba479fd2
NN
1395 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1396
1397
9f18db39
PB
1398gcc_version=`cat $srcdir/BASE-VER`
1399
ba479fd2
NN
1400# Determine the host, build, and target systems
1401ac_aux_dir=
1402for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1403 if test -f $ac_dir/install-sh; then
1404 ac_aux_dir=$ac_dir
1405 ac_install_sh="$ac_aux_dir/install-sh -c"
1406 break
1407 elif test -f $ac_dir/install.sh; then
1408 ac_aux_dir=$ac_dir
1409 ac_install_sh="$ac_aux_dir/install.sh -c"
1410 break
1411 elif test -f $ac_dir/shtool; then
1412 ac_aux_dir=$ac_dir
1413 ac_install_sh="$ac_aux_dir/shtool install -c"
1414 break
1415 fi
1416done
1417if test -z "$ac_aux_dir"; then
1418 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1419echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1420 { (exit 1); exit 1; }; }
1421fi
1422ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1423ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1424ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1425
1426# Make sure we can run config.sub.
1427$ac_config_sub sun4 >/dev/null 2>&1 ||
1428 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1429echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1430 { (exit 1); exit 1; }; }
1431
1432echo "$as_me:$LINENO: checking build system type" >&5
1433echo $ECHO_N "checking build system type... $ECHO_C" >&6
1434if test "${ac_cv_build+set}" = set; then
1435 echo $ECHO_N "(cached) $ECHO_C" >&6
1436else
1437 ac_cv_build_alias=$build_alias
1438test -z "$ac_cv_build_alias" &&
1439 ac_cv_build_alias=`$ac_config_guess`
1440test -z "$ac_cv_build_alias" &&
1441 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1442echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1443 { (exit 1); exit 1; }; }
1444ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1445 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1446echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1447 { (exit 1); exit 1; }; }
1448
1449fi
1450echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1451echo "${ECHO_T}$ac_cv_build" >&6
1452build=$ac_cv_build
1453build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1454build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1455build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1456
1457
1458echo "$as_me:$LINENO: checking host system type" >&5
1459echo $ECHO_N "checking host system type... $ECHO_C" >&6
1460if test "${ac_cv_host+set}" = set; then
1461 echo $ECHO_N "(cached) $ECHO_C" >&6
1462else
1463 ac_cv_host_alias=$host_alias
1464test -z "$ac_cv_host_alias" &&
1465 ac_cv_host_alias=$ac_cv_build_alias
1466ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1467 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1468echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1469 { (exit 1); exit 1; }; }
1470
1471fi
1472echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1473echo "${ECHO_T}$ac_cv_host" >&6
1474host=$ac_cv_host
1475host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1476host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1477host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1478
1479
1480echo "$as_me:$LINENO: checking target system type" >&5
1481echo $ECHO_N "checking target system type... $ECHO_C" >&6
1482if test "${ac_cv_target+set}" = set; then
1483 echo $ECHO_N "(cached) $ECHO_C" >&6
1484else
1485 ac_cv_target_alias=$target_alias
1486test "x$ac_cv_target_alias" = "x" &&
1487 ac_cv_target_alias=$ac_cv_host_alias
1488ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1489 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1490echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1491 { (exit 1); exit 1; }; }
1492
1493fi
1494echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1495echo "${ECHO_T}$ac_cv_target" >&6
1496target=$ac_cv_target
1497target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1498target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1499target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1500
1501
1502# The aliases save the names the user supplied, while $host etc.
1503# will get canonicalized.
1504test -n "$target_alias" &&
1505 test "$program_prefix$program_suffix$program_transform_name" = \
1506 NONENONEs,x,x, &&
1507 program_prefix=${target_alias}-
1508
1509# Determine the noncanonical target name, for directory use.
18fc9bd4
RG
1510 case ${build_alias} in
1511 "") build_noncanonical=${build} ;;
1512 *) build_noncanonical=${build_alias} ;;
1513esac
1514
1515 case ${host_alias} in
1516 "") host_noncanonical=${build_noncanonical} ;;
1517 *) host_noncanonical=${host_alias} ;;
1518esac
1519
1520 case ${target_alias} in
1521 "") target_noncanonical=${host_noncanonical} ;;
1522 *) target_noncanonical=${target_alias} ;;
1523esac
1524
1525
1526
8f1529e6
L
1527
1528# Determine the target- and build-specific subdirectories
18fc9bd4
RG
1529 # Prefix 'build-' so this never conflicts with target_subdir.
1530build_subdir="build-${build_noncanonical}"
1546bb64
PB
1531
1532# Check whether --with-build-libsubdir or --without-build-libsubdir was given.
1533if test "${with_build_libsubdir+set}" = set; then
1534 withval="$with_build_libsubdir"
1535 build_libsubdir="$withval"
1536else
1537 build_libsubdir="$build_subdir"
1538fi;
18fc9bd4
RG
1539# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1540if ( test $srcdir = . && test -d gcc ) \
1541 || test -d $srcdir/../host-${host_noncanonical}; then
1542 host_subdir="host-${host_noncanonical}"
1543else
1544 host_subdir=.
1545fi
1546# No prefix.
1547target_subdir=${target_noncanonical}
1548
73458fb7 1549
093e61a6 1550# Set program_transform_name
13c22933 1551test "$program_prefix" != NONE &&
ba479fd2 1552 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1553# Use a double $ so make ignores it.
1554test "$program_suffix" != NONE &&
ba479fd2
NN
1555 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1556# Double any \ or $. echo might interpret backslashes.
1557# By default was `s,x,x', remove it if useless.
1558cat <<\_ACEOF >conftest.sed
1559s/[\\$]/&&/g;s/;s,x,x,$//
1560_ACEOF
1561program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1562rm conftest.sed
13c22933
JJ
1563
1564
34a86c2b
NN
1565# Check for bogus environment variables.
1566# Test if LIBRARY_PATH contains the notation for the current directory
1567# since this would lead to problems installing/building glibc.
1568# LIBRARY_PATH contains the current directory if one of the following
1569# is true:
1570# - one of the terminals (":" and ";") is the first or last sign
1571# - two terminals occur directly after each other
1572# - the path contains an element with a dot in it
ba479fd2
NN
1573echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1574echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1575case ${LIBRARY_PATH} in
1576 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1577 library_path_setting="contains current directory"
1578 ;;
1579 *)
1580 library_path_setting="ok"
1581 ;;
1582esac
ba479fd2
NN
1583echo "$as_me:$LINENO: result: $library_path_setting" >&5
1584echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1585if test "$library_path_setting" != "ok"; then
ba479fd2 1586{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1587*** LIBRARY_PATH shouldn't contain the current directory when
1588*** building gcc. Please change the environment variable
ba479fd2
NN
1589*** and run configure again." >&5
1590echo "$as_me: error:
1591*** LIBRARY_PATH shouldn't contain the current directory when
1592*** building gcc. Please change the environment variable
1593*** and run configure again." >&2;}
1594 { (exit 1); exit 1; }; }
e9a25f70
JL
1595fi
1596
34a86c2b
NN
1597# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1598# since this would lead to problems installing/building glibc.
1599# GCC_EXEC_PREFIX contains the current directory if one of the following
1600# is true:
1601# - one of the terminals (":" and ";") is the first or last sign
1602# - two terminals occur directly after each other
1603# - the path contains an element with a dot in it
ba479fd2
NN
1604echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1605echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1606case ${GCC_EXEC_PREFIX} in
1607 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1608 gcc_exec_prefix_setting="contains current directory"
1609 ;;
1610 *)
1611 gcc_exec_prefix_setting="ok"
1612 ;;
1613esac
ba479fd2
NN
1614echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1615echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1616if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1617{ { echo "$as_me:$LINENO: error:
1618*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1619*** building gcc. Please change the environment variable
1620*** and run configure again." >&5
1621echo "$as_me: error:
cafe096b
EC
1622*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1623*** building gcc. Please change the environment variable
ba479fd2
NN
1624*** and run configure again." >&2;}
1625 { (exit 1); exit 1; }; }
34a86c2b
NN
1626fi
1627
1628# -----------
1629# Directories
1630# -----------
1631
1632# Specify the local prefix
1633local_prefix=
ba479fd2 1634
34a86c2b
NN
1635# Check whether --with-local-prefix or --without-local-prefix was given.
1636if test "${with_local_prefix+set}" = set; then
1637 withval="$with_local_prefix"
1638 case "${withval}" in
ba479fd2
NN
1639yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1640echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1641 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1642no) ;;
1643*) local_prefix=$with_local_prefix ;;
1644esac
ba479fd2 1645fi;
34a86c2b
NN
1646
1647# Default local prefix if it is empty
1648if test x$local_prefix = x; then
1649 local_prefix=/usr/local
1650fi
1651
1652# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1653# passed in by the toplevel make and thus we'd get different behavior
1654# depending on where we built the sources.
1655gcc_gxx_include_dir=
1656# Specify the g++ header file directory
ba479fd2 1657
34a86c2b
NN
1658# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1659if test "${with_gxx_include_dir+set}" = set; then
1660 withval="$with_gxx_include_dir"
1661 case "${withval}" in
ba479fd2
NN
1662yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1663echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1664 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1665no) ;;
1666*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1667esac
ba479fd2 1668fi;
34a86c2b 1669
0f57bf40 1670# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
34a86c2b
NN
1671if test x${gcc_gxx_include_dir} = x; then
1672 if test x${enable_version_specific_runtime_libs} = xyes; then
1673 gcc_gxx_include_dir='${libsubdir}/include/c++'
1674 else
0f57bf40
MM
1675 libstdcxx_incdir='include/c++/$(version)'
1676 if test x$host != x$target; then
1677 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
1678 fi
1679 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/$libstdcxx_incdir"
34a86c2b
NN
1680 fi
1681fi
1682
ba479fd2 1683
34a86c2b
NN
1684# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1685if test "${with_cpp_install_dir+set}" = set; then
1686 withval="$with_cpp_install_dir"
1687 if test x$withval = xyes; then
ba479fd2
NN
1688 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1689echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1690 { (exit 1); exit 1; }; }
34a86c2b
NN
1691elif test x$withval != xno; then
1692 cpp_install_dir=$withval
1693fi
ba479fd2 1694fi;
34a86c2b 1695
51b9ff45 1696# We would like to our source tree to be readonly. However when releases or
ba479fd2 1697# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1698# various formats of manuals need to be included along with the rest of the
ba479fd2 1699# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1700# just that.
1701
03787dfd
KC
1702echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1703echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1704 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45
KC
1705if test "${enable_generated_files_in_srcdir+set}" = set; then
1706 enableval="$enable_generated_files_in_srcdir"
03787dfd 1707 generated_files_in_srcdir=$enableval
51b9ff45 1708else
03787dfd 1709 generated_files_in_srcdir=no
ba479fd2 1710fi;
51b9ff45 1711
03787dfd
KC
1712echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1713echo "${ECHO_T}$generated_files_in_srcdir" >&6
1714
1715if test "$generated_files_in_srcdir" = "yes"; then
1716 GENINSRC=''
03787dfd
KC
1717else
1718 GENINSRC='#'
03787dfd
KC
1719fi
1720
1721
34a86c2b
NN
1722# -------------------
1723# Find default linker
1724# -------------------
1725
1726# With GNU ld
ba479fd2 1727
34a86c2b
NN
1728# Check whether --with-gnu-ld or --without-gnu-ld was given.
1729if test "${with_gnu_ld+set}" = set; then
1730 withval="$with_gnu_ld"
1731 gnu_ld_flag="$with_gnu_ld"
1732else
1733 gnu_ld_flag=no
ba479fd2 1734fi;
6e3f3080 1735
63cf211a 1736# With pre-defined ld
ba479fd2 1737
34a86c2b
NN
1738# Check whether --with-ld or --without-ld was given.
1739if test "${with_ld+set}" = set; then
1740 withval="$with_ld"
1741 DEFAULT_LINKER="$with_ld"
ba479fd2 1742fi;
34a86c2b
NN
1743if test x"${DEFAULT_LINKER+set}" = x"set"; then
1744 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1745 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1746echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1747 { (exit 1); exit 1; }; }
34a86c2b
NN
1748 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1749 gnu_ld_flag=yes
1750 fi
ba479fd2
NN
1751
1752cat >>confdefs.h <<_ACEOF
34a86c2b 1753#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1754_ACEOF
34a86c2b
NN
1755
1756fi
1757
ba479fd2
NN
1758echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1759echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1760if test x"${DEFAULT_LINKER+set}" = x"set"; then
1761 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1762 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1763echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1764 else
ba479fd2
NN
1765 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1766echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1767 fi
1768else
ba479fd2
NN
1769 echo "$as_me:$LINENO: result: no" >&5
1770echo "${ECHO_T}no" >&6
34a86c2b
NN
1771fi
1772
d594623a
L
1773# With demangler in GNU ld
1774
1775# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
1776if test "${with_demangler_in_ld+set}" = set; then
1777 withval="$with_demangler_in_ld"
1778 demangler_in_ld="$with_demangler_in_ld"
1779else
1780 demangler_in_ld=no
1781fi;
1782
34a86c2b
NN
1783# ----------------------
1784# Find default assembler
1785# ----------------------
1786
1787# With GNU as
ba479fd2 1788
34a86c2b
NN
1789# Check whether --with-gnu-as or --without-gnu-as was given.
1790if test "${with_gnu_as+set}" = set; then
1791 withval="$with_gnu_as"
1792 gas_flag="$with_gnu_as"
1793else
1794 gas_flag=no
ba479fd2 1795fi;
34a86c2b
NN
1796
1797
1798# Check whether --with-as or --without-as was given.
1799if test "${with_as+set}" = set; then
1800 withval="$with_as"
1801 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1802fi;
34a86c2b
NN
1803if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1804 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1805 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1806echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1807 { (exit 1); exit 1; }; }
34a86c2b
NN
1808 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1809 gas_flag=yes
1810 fi
ba479fd2
NN
1811
1812cat >>confdefs.h <<_ACEOF
34a86c2b 1813#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1814_ACEOF
34a86c2b
NN
1815
1816fi
1817
ba479fd2
NN
1818echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1819echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1820if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1821 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1822 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1823echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1824 else
ba479fd2
NN
1825 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1826echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1827 fi
1828else
ba479fd2
NN
1829 echo "$as_me:$LINENO: result: no" >&5
1830echo "${ECHO_T}no" >&6
34a86c2b
NN
1831fi
1832
1833# ---------------
1834# Find C compiler
1835# ---------------
1836
426ca3ca
RO
1837# If a non-executable a.out is present (e.g. created by GNU as above even if
1838# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1839# file, even when creating an executable, so an execution test fails.
1840# Remove possible default executable files to avoid this.
1841#
1842# FIXME: This really belongs into AC_PROG_CC and can be removed once
1843# Autoconf includes it.
1844rm -f a.out a.exe b.out
1845
34a86c2b 1846# Find the native compiler
ba479fd2
NN
1847ac_ext=c
1848ac_cpp='$CPP $CPPFLAGS'
1849ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1850ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1851ac_compiler_gnu=$ac_cv_c_compiler_gnu
1852if test -n "$ac_tool_prefix"; then
1853 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1854set dummy ${ac_tool_prefix}gcc; ac_word=$2
1855echo "$as_me:$LINENO: checking for $ac_word" >&5
1856echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1857if test "${ac_cv_prog_CC+set}" = set; then
1858 echo $ECHO_N "(cached) $ECHO_C" >&6
1859else
1860 if test -n "$CC"; then
1861 ac_cv_prog_CC="$CC" # Let the user override the test.
1862else
1863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1864for as_dir in $PATH
1865do
1866 IFS=$as_save_IFS
1867 test -z "$as_dir" && as_dir=.
1868 for ac_exec_ext in '' $ac_executable_extensions; do
1869 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1870 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1871 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1872 break 2
1873 fi
1874done
1875done
1876
1877fi
1878fi
1879CC=$ac_cv_prog_CC
1880if test -n "$CC"; then
1881 echo "$as_me:$LINENO: result: $CC" >&5
1882echo "${ECHO_T}$CC" >&6
1883else
1884 echo "$as_me:$LINENO: result: no" >&5
1885echo "${ECHO_T}no" >&6
1886fi
1887
1888fi
1889if test -z "$ac_cv_prog_CC"; then
1890 ac_ct_CC=$CC
1891 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1892set dummy gcc; ac_word=$2
ba479fd2
NN
1893echo "$as_me:$LINENO: checking for $ac_word" >&5
1894echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1895if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1896 echo $ECHO_N "(cached) $ECHO_C" >&6
1897else
1898 if test -n "$ac_ct_CC"; then
1899 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1900else
1901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1902for as_dir in $PATH
1903do
1904 IFS=$as_save_IFS
1905 test -z "$as_dir" && as_dir=.
1906 for ac_exec_ext in '' $ac_executable_extensions; do
1907 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1908 ac_cv_prog_ac_ct_CC="gcc"
1909 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1910 break 2
1911 fi
1912done
1913done
1914
1915fi
1916fi
1917ac_ct_CC=$ac_cv_prog_ac_ct_CC
1918if test -n "$ac_ct_CC"; then
1919 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1920echo "${ECHO_T}$ac_ct_CC" >&6
1921else
1922 echo "$as_me:$LINENO: result: no" >&5
1923echo "${ECHO_T}no" >&6
1924fi
1925
1926 CC=$ac_ct_CC
1927else
1928 CC="$ac_cv_prog_CC"
1929fi
1930
1931if test -z "$CC"; then
1932 if test -n "$ac_tool_prefix"; then
1933 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1934set dummy ${ac_tool_prefix}cc; ac_word=$2
1935echo "$as_me:$LINENO: checking for $ac_word" >&5
1936echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1937if test "${ac_cv_prog_CC+set}" = set; then
1938 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1939else
1940 if test -n "$CC"; then
1941 ac_cv_prog_CC="$CC" # Let the user override the test.
1942else
ba479fd2
NN
1943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1944for as_dir in $PATH
1945do
1946 IFS=$as_save_IFS
1947 test -z "$as_dir" && as_dir=.
1948 for ac_exec_ext in '' $ac_executable_extensions; do
1949 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1950 ac_cv_prog_CC="${ac_tool_prefix}cc"
1951 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1952 break 2
1953 fi
1954done
1955done
1956
cd9e5e7c
MK
1957fi
1958fi
ba479fd2 1959CC=$ac_cv_prog_CC
cd9e5e7c 1960if test -n "$CC"; then
ba479fd2
NN
1961 echo "$as_me:$LINENO: result: $CC" >&5
1962echo "${ECHO_T}$CC" >&6
1963else
1964 echo "$as_me:$LINENO: result: no" >&5
1965echo "${ECHO_T}no" >&6
1966fi
1967
1968fi
1969if test -z "$ac_cv_prog_CC"; then
1970 ac_ct_CC=$CC
1971 # Extract the first word of "cc", so it can be a program name with args.
1972set dummy cc; ac_word=$2
1973echo "$as_me:$LINENO: checking for $ac_word" >&5
1974echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1975if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1976 echo $ECHO_N "(cached) $ECHO_C" >&6
1977else
1978 if test -n "$ac_ct_CC"; then
1979 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1980else
1981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1982for as_dir in $PATH
1983do
1984 IFS=$as_save_IFS
1985 test -z "$as_dir" && as_dir=.
1986 for ac_exec_ext in '' $ac_executable_extensions; do
1987 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1988 ac_cv_prog_ac_ct_CC="cc"
1989 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1990 break 2
1991 fi
1992done
1993done
1994
1995fi
1996fi
1997ac_ct_CC=$ac_cv_prog_ac_ct_CC
1998if test -n "$ac_ct_CC"; then
1999 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2000echo "${ECHO_T}$ac_ct_CC" >&6
2001else
2002 echo "$as_me:$LINENO: result: no" >&5
2003echo "${ECHO_T}no" >&6
2004fi
2005
2006 CC=$ac_ct_CC
cd9e5e7c 2007else
ba479fd2 2008 CC="$ac_cv_prog_CC"
e9a25f70 2009fi
6e3f3080 2010
ba479fd2 2011fi
6e3f3080
NN
2012if test -z "$CC"; then
2013 # Extract the first word of "cc", so it can be a program name with args.
2014set dummy cc; ac_word=$2
ba479fd2
NN
2015echo "$as_me:$LINENO: checking for $ac_word" >&5
2016echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2017if test "${ac_cv_prog_CC+set}" = set; then
2018 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2019else
2020 if test -n "$CC"; then
2021 ac_cv_prog_CC="$CC" # Let the user override the test.
2022else
2023 ac_prog_rejected=no
ba479fd2
NN
2024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2025for as_dir in $PATH
2026do
2027 IFS=$as_save_IFS
2028 test -z "$as_dir" && as_dir=.
2029 for ac_exec_ext in '' $ac_executable_extensions; do
2030 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2031 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2032 ac_prog_rejected=yes
2033 continue
2034 fi
2035 ac_cv_prog_CC="cc"
2036 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2037 break 2
2038 fi
2039done
2040done
2041
6e3f3080
NN
2042if test $ac_prog_rejected = yes; then
2043 # We found a bogon in the path, so make sure we never use it.
2044 set dummy $ac_cv_prog_CC
2045 shift
ba479fd2 2046 if test $# != 0; then
6e3f3080
NN
2047 # We chose a different compiler from the bogus one.
2048 # However, it has the same basename, so the bogon will be chosen
2049 # first if we set CC to just the basename; use the full file name.
2050 shift
ba479fd2 2051 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2052 fi
6e3f3080
NN
2053fi
2054fi
2055fi
ba479fd2 2056CC=$ac_cv_prog_CC
6e3f3080 2057if test -n "$CC"; then
ba479fd2
NN
2058 echo "$as_me:$LINENO: result: $CC" >&5
2059echo "${ECHO_T}$CC" >&6
e9a25f70 2060else
ba479fd2
NN
2061 echo "$as_me:$LINENO: result: no" >&5
2062echo "${ECHO_T}no" >&6
e9a25f70 2063fi
6e3f3080 2064
ba479fd2
NN
2065fi
2066if test -z "$CC"; then
2067 if test -n "$ac_tool_prefix"; then
2068 for ac_prog in cl
2069 do
2070 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2071set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2072echo "$as_me:$LINENO: checking for $ac_word" >&5
2073echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2074if test "${ac_cv_prog_CC+set}" = set; then
2075 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2076else
6e3f3080
NN
2077 if test -n "$CC"; then
2078 ac_cv_prog_CC="$CC" # Let the user override the test.
2079else
ba479fd2
NN
2080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2081for as_dir in $PATH
2082do
2083 IFS=$as_save_IFS
2084 test -z "$as_dir" && as_dir=.
2085 for ac_exec_ext in '' $ac_executable_extensions; do
2086 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2087 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2088 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2089 break 2
2090 fi
2091done
2092done
2093
093e61a6 2094fi
6e3f3080 2095fi
ba479fd2 2096CC=$ac_cv_prog_CC
6e3f3080 2097if test -n "$CC"; then
ba479fd2
NN
2098 echo "$as_me:$LINENO: result: $CC" >&5
2099echo "${ECHO_T}$CC" >&6
6e3f3080 2100else
ba479fd2
NN
2101 echo "$as_me:$LINENO: result: no" >&5
2102echo "${ECHO_T}no" >&6
093e61a6 2103fi
cafe096b 2104
ba479fd2
NN
2105 test -n "$CC" && break
2106 done
2107fi
2108if test -z "$CC"; then
2109 ac_ct_CC=$CC
2110 for ac_prog in cl
2111do
2112 # Extract the first word of "$ac_prog", so it can be a program name with args.
2113set dummy $ac_prog; ac_word=$2
2114echo "$as_me:$LINENO: checking for $ac_word" >&5
2115echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2116if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2117 echo $ECHO_N "(cached) $ECHO_C" >&6
2118else
2119 if test -n "$ac_ct_CC"; then
2120 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2121else
2122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2123for as_dir in $PATH
2124do
2125 IFS=$as_save_IFS
2126 test -z "$as_dir" && as_dir=.
2127 for ac_exec_ext in '' $ac_executable_extensions; do
2128 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2129 ac_cv_prog_ac_ct_CC="$ac_prog"
2130 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2131 break 2
2132 fi
2133done
2134done
6e3f3080 2135
ba479fd2
NN
2136fi
2137fi
2138ac_ct_CC=$ac_cv_prog_ac_ct_CC
2139if test -n "$ac_ct_CC"; then
2140 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2141echo "${ECHO_T}$ac_ct_CC" >&6
2142else
2143 echo "$as_me:$LINENO: result: no" >&5
2144echo "${ECHO_T}no" >&6
2145fi
6e3f3080 2146
ba479fd2
NN
2147 test -n "$ac_ct_CC" && break
2148done
63cf211a 2149
ba479fd2
NN
2150 CC=$ac_ct_CC
2151fi
2152
2153fi
2154
2155
2156test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2157See \`config.log' for more details." >&5
2158echo "$as_me: error: no acceptable C compiler found in \$PATH
2159See \`config.log' for more details." >&2;}
2160 { (exit 1); exit 1; }; }
2161
2162# Provide some information about the compiler.
2163echo "$as_me:$LINENO:" \
2164 "checking for C compiler version" >&5
2165ac_compiler=`set X $ac_compile; echo $2`
2166{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2167 (eval $ac_compiler --version </dev/null >&5) 2>&5
2168 ac_status=$?
2169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2170 (exit $ac_status); }
2171{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2172 (eval $ac_compiler -v </dev/null >&5) 2>&5
2173 ac_status=$?
2174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2175 (exit $ac_status); }
2176{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2177 (eval $ac_compiler -V </dev/null >&5) 2>&5
2178 ac_status=$?
2179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2180 (exit $ac_status); }
2181
2182cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2183/* confdefs.h. */
2184_ACEOF
2185cat confdefs.h >>conftest.$ac_ext
2186cat >>conftest.$ac_ext <<_ACEOF
2187/* end confdefs.h. */
2188
2189int
2190main ()
2191{
63cf211a 2192
ba479fd2
NN
2193 ;
2194 return 0;
2195}
2196_ACEOF
2197ac_clean_files_save=$ac_clean_files
2198ac_clean_files="$ac_clean_files a.out a.exe b.out"
2199# Try to create an executable without -o first, disregard a.out.
2200# It will help us diagnose broken compilers, and finding out an intuition
2201# of exeext.
86da66b5
HPN
2202echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2203echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2
NN
2204ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2205if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2206 (eval $ac_link_default) 2>&5
2207 ac_status=$?
2208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2209 (exit $ac_status); }; then
2210 # Find the output, starting from the most likely. This scheme is
2211# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2212# resort.
2213
2214# Be careful to initialize this variable, since it used to be cached.
2215# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2216ac_cv_exeext=
2217# b.out is created by i960 compilers.
2218for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2219do
2220 test -f "$ac_file" || continue
2221 case $ac_file in
2222 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
86da66b5 2223 ;;
ba479fd2 2224 conftest.$ac_ext )
86da66b5
HPN
2225 # This is the source file.
2226 ;;
ba479fd2 2227 [ab].out )
86da66b5
HPN
2228 # We found the default executable, but exeext='' is most
2229 # certainly right.
2230 break;;
ba479fd2 2231 *.* )
86da66b5
HPN
2232 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2233 # FIXME: I believe we export ac_cv_exeext for Libtool,
2234 # but it would be cool to find out if it's true. Does anybody
2235 # maintain Libtool? --akim.
2236 export ac_cv_exeext
2237 break;;
ba479fd2 2238 * )
86da66b5 2239 break;;
ba479fd2
NN
2240 esac
2241done
2242else
2243 echo "$as_me: failed program was:" >&5
2244sed 's/^/| /' conftest.$ac_ext >&5
2245
2246{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2247See \`config.log' for more details." >&5
2248echo "$as_me: error: C compiler cannot create executables
2249See \`config.log' for more details." >&2;}
2250 { (exit 77); exit 77; }; }
2251fi
2252
2253ac_exeext=$ac_cv_exeext
2254echo "$as_me:$LINENO: result: $ac_file" >&5
2255echo "${ECHO_T}$ac_file" >&6
2256
2257# Check the compiler produces executables we can run. If not, either
2258# the compiler is broken, or we cross compile.
2259echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2260echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2261# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2262# If not cross compiling, check that we can run a simple program.
2263if test "$cross_compiling" != yes; then
2264 if { ac_try='./$ac_file'
2265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2266 (eval $ac_try) 2>&5
2267 ac_status=$?
2268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2269 (exit $ac_status); }; }; then
2270 cross_compiling=no
6e3f3080 2271 else
ba479fd2
NN
2272 if test "$cross_compiling" = maybe; then
2273 cross_compiling=yes
2274 else
2275 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2276If you meant to cross compile, use \`--host'.
2277See \`config.log' for more details." >&5
2278echo "$as_me: error: cannot run C compiled programs.
2279If you meant to cross compile, use \`--host'.
2280See \`config.log' for more details." >&2;}
2281 { (exit 1); exit 1; }; }
2282 fi
6e3f3080
NN
2283 fi
2284fi
ba479fd2
NN
2285echo "$as_me:$LINENO: result: yes" >&5
2286echo "${ECHO_T}yes" >&6
2287
2288rm -f a.out a.exe conftest$ac_cv_exeext b.out
2289ac_clean_files=$ac_clean_files_save
2290# Check the compiler produces executables we can run. If not, either
2291# the compiler is broken, or we cross compile.
2292echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2293echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2294echo "$as_me:$LINENO: result: $cross_compiling" >&5
2295echo "${ECHO_T}$cross_compiling" >&6
2296
2297echo "$as_me:$LINENO: checking for suffix of executables" >&5
2298echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2299if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2300 (eval $ac_link) 2>&5
2301 ac_status=$?
2302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2303 (exit $ac_status); }; then
2304 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2305# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2306# work properly (i.e., refer to `conftest.exe'), while it won't with
2307# `rm'.
2308for ac_file in conftest.exe conftest conftest.*; do
2309 test -f "$ac_file" || continue
2310 case $ac_file in
2311 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2312 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
86da66b5
HPN
2313 export ac_cv_exeext
2314 break;;
ba479fd2
NN
2315 * ) break;;
2316 esac
2317done
e9a25f70 2318else
ba479fd2
NN
2319 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2320See \`config.log' for more details." >&5
2321echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2322See \`config.log' for more details." >&2;}
2323 { (exit 1); exit 1; }; }
2324fi
2325
2326rm -f conftest$ac_cv_exeext
2327echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2328echo "${ECHO_T}$ac_cv_exeext" >&6
2329
2330rm -f conftest.$ac_ext
2331EXEEXT=$ac_cv_exeext
2332ac_exeext=$EXEEXT
2333echo "$as_me:$LINENO: checking for suffix of object files" >&5
2334echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2335if test "${ac_cv_objext+set}" = set; then
2336 echo $ECHO_N "(cached) $ECHO_C" >&6
2337else
2338 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2339/* confdefs.h. */
2340_ACEOF
2341cat confdefs.h >>conftest.$ac_ext
2342cat >>conftest.$ac_ext <<_ACEOF
2343/* end confdefs.h. */
2344
2345int
2346main ()
2347{
6e3f3080 2348
ba479fd2
NN
2349 ;
2350 return 0;
2351}
2352_ACEOF
2353rm -f conftest.o conftest.obj
2354if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2355 (eval $ac_compile) 2>&5
2356 ac_status=$?
2357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2358 (exit $ac_status); }; then
2359 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2360 case $ac_file in
2361 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2362 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2363 break;;
2364 esac
2365done
63cf211a 2366else
ba479fd2
NN
2367 echo "$as_me: failed program was:" >&5
2368sed 's/^/| /' conftest.$ac_ext >&5
2369
2370{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2371See \`config.log' for more details." >&5
2372echo "$as_me: error: cannot compute suffix of object files: cannot compile
2373See \`config.log' for more details." >&2;}
2374 { (exit 1); exit 1; }; }
2375fi
2376
2377rm -f conftest.$ac_cv_objext conftest.$ac_ext
2378fi
2379echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2380echo "${ECHO_T}$ac_cv_objext" >&6
2381OBJEXT=$ac_cv_objext
2382ac_objext=$OBJEXT
2383echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2384echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2385if test "${ac_cv_c_compiler_gnu+set}" = set; then
2386 echo $ECHO_N "(cached) $ECHO_C" >&6
2387else
2388 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2389/* confdefs.h. */
2390_ACEOF
2391cat confdefs.h >>conftest.$ac_ext
2392cat >>conftest.$ac_ext <<_ACEOF
2393/* end confdefs.h. */
2394
2395int
2396main ()
2397{
2398#ifndef __GNUC__
2399 choke me
2400#endif
6e3f3080 2401
ba479fd2
NN
2402 ;
2403 return 0;
2404}
2405_ACEOF
2406rm -f conftest.$ac_objext
2407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2408 (eval $ac_compile) 2>conftest.er1
ba479fd2 2409 ac_status=$?
86da66b5
HPN
2410 grep -v '^ *+' conftest.er1 >conftest.err
2411 rm -f conftest.er1
2412 cat conftest.err >&5
ba479fd2
NN
2413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2414 (exit $ac_status); } &&
ec6c7392
PB
2415 { ac_try='test -z "$ac_c_werror_flag"
2416 || test ! -s conftest.err'
86da66b5
HPN
2417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2418 (eval $ac_try) 2>&5
2419 ac_status=$?
2420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2421 (exit $ac_status); }; } &&
2422 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2424 (eval $ac_try) 2>&5
2425 ac_status=$?
2426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2427 (exit $ac_status); }; }; then
2428 ac_compiler_gnu=yes
2429else
2430 echo "$as_me: failed program was:" >&5
2431sed 's/^/| /' conftest.$ac_ext >&5
2432
2433ac_compiler_gnu=no
2434fi
86da66b5 2435rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2436ac_cv_c_compiler_gnu=$ac_compiler_gnu
2437
2438fi
2439echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2440echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2441GCC=`test $ac_compiler_gnu = yes && echo yes`
2442ac_test_CFLAGS=${CFLAGS+set}
2443ac_save_CFLAGS=$CFLAGS
2444CFLAGS="-g"
2445echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2446echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2447if test "${ac_cv_prog_cc_g+set}" = set; then
2448 echo $ECHO_N "(cached) $ECHO_C" >&6
2449else
2450 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2451/* confdefs.h. */
2452_ACEOF
2453cat confdefs.h >>conftest.$ac_ext
2454cat >>conftest.$ac_ext <<_ACEOF
2455/* end confdefs.h. */
2456
2457int
2458main ()
2459{
2460
2461 ;
2462 return 0;
2463}
2464_ACEOF
2465rm -f conftest.$ac_objext
2466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2467 (eval $ac_compile) 2>conftest.er1
ba479fd2 2468 ac_status=$?
86da66b5
HPN
2469 grep -v '^ *+' conftest.er1 >conftest.err
2470 rm -f conftest.er1
2471 cat conftest.err >&5
ba479fd2
NN
2472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2473 (exit $ac_status); } &&
ec6c7392
PB
2474 { ac_try='test -z "$ac_c_werror_flag"
2475 || test ! -s conftest.err'
86da66b5
HPN
2476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2477 (eval $ac_try) 2>&5
2478 ac_status=$?
2479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2480 (exit $ac_status); }; } &&
2481 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2483 (eval $ac_try) 2>&5
2484 ac_status=$?
2485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2486 (exit $ac_status); }; }; then
6e3f3080
NN
2487 ac_cv_prog_cc_g=yes
2488else
ba479fd2
NN
2489 echo "$as_me: failed program was:" >&5
2490sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2491
ba479fd2 2492ac_cv_prog_cc_g=no
6e3f3080 2493fi
86da66b5 2494rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2495fi
2496echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2497echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2498if test "$ac_test_CFLAGS" = set; then
ba479fd2 2499 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2500elif test $ac_cv_prog_cc_g = yes; then
2501 if test "$GCC" = yes; then
e9a25f70
JL
2502 CFLAGS="-g -O2"
2503 else
cd9e5e7c 2504 CFLAGS="-g"
81814e35 2505 fi
3723cad9 2506else
cd9e5e7c
MK
2507 if test "$GCC" = yes; then
2508 CFLAGS="-O2"
2509 else
2510 CFLAGS=
2511 fi
e9a25f70 2512fi
ba479fd2
NN
2513echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2514echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2515if test "${ac_cv_prog_cc_stdc+set}" = set; then
2516 echo $ECHO_N "(cached) $ECHO_C" >&6
2517else
2518 ac_cv_prog_cc_stdc=no
2519ac_save_CC=$CC
2520cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2521/* confdefs.h. */
2522_ACEOF
2523cat confdefs.h >>conftest.$ac_ext
2524cat >>conftest.$ac_ext <<_ACEOF
2525/* end confdefs.h. */
2526#include <stdarg.h>
2527#include <stdio.h>
2528#include <sys/types.h>
2529#include <sys/stat.h>
2530/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2531struct buf { int x; };
2532FILE * (*rcsopen) (struct buf *, struct stat *, int);
2533static char *e (p, i)
2534 char **p;
2535 int i;
2536{
2537 return p[i];
2538}
2539static char *f (char * (*g) (char **, int), char **p, ...)
2540{
2541 char *s;
2542 va_list v;
2543 va_start (v,p);
2544 s = g (p, va_arg (v,int));
2545 va_end (v);
2546 return s;
2547}
86da66b5
HPN
2548
2549/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2550 function prototypes and stuff, but not '\xHH' hex character constants.
2551 These don't provoke an error unfortunately, instead are silently treated
2552 as 'x'. The following induces an error, until -std1 is added to get
2553 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2554 array size at least. It's necessary to write '\x00'==0 to get something
2555 that's true only with -std1. */
2556int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2557
ba479fd2
NN
2558int test (int i, double x);
2559struct s1 {int (*f) (int a);};
2560struct s2 {int (*f) (double a);};
2561int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2562int argc;
2563char **argv;
2564int
2565main ()
2566{
2567return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2568 ;
2569 return 0;
2570}
2571_ACEOF
2572# Don't try gcc -ansi; that turns off useful extensions and
2573# breaks some systems' header files.
2574# AIX -qlanglvl=ansi
2575# Ultrix and OSF/1 -std1
2576# HP-UX 10.20 and later -Ae
2577# HP-UX older versions -Aa -D_HPUX_SOURCE
2578# SVR4 -Xc -D__EXTENSIONS__
2579for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2580do
2581 CC="$ac_save_CC $ac_arg"
2582 rm -f conftest.$ac_objext
2583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2584 (eval $ac_compile) 2>conftest.er1
ba479fd2 2585 ac_status=$?
86da66b5
HPN
2586 grep -v '^ *+' conftest.er1 >conftest.err
2587 rm -f conftest.er1
2588 cat conftest.err >&5
ba479fd2
NN
2589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2590 (exit $ac_status); } &&
ec6c7392
PB
2591 { ac_try='test -z "$ac_c_werror_flag"
2592 || test ! -s conftest.err'
86da66b5
HPN
2593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2594 (eval $ac_try) 2>&5
2595 ac_status=$?
2596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2597 (exit $ac_status); }; } &&
2598 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2600 (eval $ac_try) 2>&5
2601 ac_status=$?
2602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2603 (exit $ac_status); }; }; then
2604 ac_cv_prog_cc_stdc=$ac_arg
2605break
2606else
2607 echo "$as_me: failed program was:" >&5
2608sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2609
ba479fd2 2610fi
86da66b5 2611rm -f conftest.err conftest.$ac_objext
ba479fd2
NN
2612done
2613rm -f conftest.$ac_ext conftest.$ac_objext
2614CC=$ac_save_CC
2615
2616fi
2617
2618case "x$ac_cv_prog_cc_stdc" in
2619 x|xno)
2620 echo "$as_me:$LINENO: result: none needed" >&5
2621echo "${ECHO_T}none needed" >&6 ;;
2622 *)
2623 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2624echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2625 CC="$CC $ac_cv_prog_cc_stdc" ;;
2626esac
2627
2628# Some people use a C++ compiler to compile C. Since we use `exit',
2629# in C++ we need to declare it. In case someone uses the same compiler
2630# for both compiling C and C++ we need to have the C++ compiler decide
2631# the declaration of exit, since it's the most demanding environment.
2632cat >conftest.$ac_ext <<_ACEOF
2633#ifndef __cplusplus
2634 choke me
2635#endif
2636_ACEOF
2637rm -f conftest.$ac_objext
2638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2639 (eval $ac_compile) 2>conftest.er1
ba479fd2 2640 ac_status=$?
86da66b5
HPN
2641 grep -v '^ *+' conftest.er1 >conftest.err
2642 rm -f conftest.er1
2643 cat conftest.err >&5
ba479fd2
NN
2644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2645 (exit $ac_status); } &&
ec6c7392
PB
2646 { ac_try='test -z "$ac_c_werror_flag"
2647 || test ! -s conftest.err'
86da66b5
HPN
2648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2649 (eval $ac_try) 2>&5
2650 ac_status=$?
2651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2652 (exit $ac_status); }; } &&
2653 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2655 (eval $ac_try) 2>&5
2656 ac_status=$?
2657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2658 (exit $ac_status); }; }; then
2659 for ac_declaration in \
86da66b5 2660 '' \
ba479fd2
NN
2661 'extern "C" void std::exit (int) throw (); using std::exit;' \
2662 'extern "C" void std::exit (int); using std::exit;' \
2663 'extern "C" void exit (int) throw ();' \
2664 'extern "C" void exit (int);' \
2665 'void exit (int);'
2666do
2667 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2668/* confdefs.h. */
2669_ACEOF
2670cat confdefs.h >>conftest.$ac_ext
2671cat >>conftest.$ac_ext <<_ACEOF
2672/* end confdefs.h. */
33e70558 2673$ac_declaration
86da66b5 2674#include <stdlib.h>
ba479fd2
NN
2675int
2676main ()
2677{
2678exit (42);
2679 ;
2680 return 0;
2681}
2682_ACEOF
2683rm -f conftest.$ac_objext
2684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2685 (eval $ac_compile) 2>conftest.er1
ba479fd2 2686 ac_status=$?
86da66b5
HPN
2687 grep -v '^ *+' conftest.er1 >conftest.err
2688 rm -f conftest.er1
2689 cat conftest.err >&5
ba479fd2
NN
2690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2691 (exit $ac_status); } &&
ec6c7392
PB
2692 { ac_try='test -z "$ac_c_werror_flag"
2693 || test ! -s conftest.err'
86da66b5
HPN
2694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2695 (eval $ac_try) 2>&5
2696 ac_status=$?
2697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2698 (exit $ac_status); }; } &&
2699 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2701 (eval $ac_try) 2>&5
2702 ac_status=$?
2703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2704 (exit $ac_status); }; }; then
2705 :
2706else
2707 echo "$as_me: failed program was:" >&5
2708sed 's/^/| /' conftest.$ac_ext >&5
2709
2710continue
2711fi
86da66b5 2712rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 2713 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2714/* confdefs.h. */
2715_ACEOF
2716cat confdefs.h >>conftest.$ac_ext
2717cat >>conftest.$ac_ext <<_ACEOF
2718/* end confdefs.h. */
2719$ac_declaration
2720int
2721main ()
2722{
2723exit (42);
2724 ;
2725 return 0;
2726}
2727_ACEOF
2728rm -f conftest.$ac_objext
2729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2730 (eval $ac_compile) 2>conftest.er1
ba479fd2 2731 ac_status=$?
86da66b5
HPN
2732 grep -v '^ *+' conftest.er1 >conftest.err
2733 rm -f conftest.er1
2734 cat conftest.err >&5
ba479fd2
NN
2735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2736 (exit $ac_status); } &&
ec6c7392
PB
2737 { ac_try='test -z "$ac_c_werror_flag"
2738 || test ! -s conftest.err'
86da66b5
HPN
2739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2740 (eval $ac_try) 2>&5
2741 ac_status=$?
2742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2743 (exit $ac_status); }; } &&
2744 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2746 (eval $ac_try) 2>&5
2747 ac_status=$?
2748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2749 (exit $ac_status); }; }; then
2750 break
3ec83fc2 2751else
ba479fd2
NN
2752 echo "$as_me: failed program was:" >&5
2753sed 's/^/| /' conftest.$ac_ext >&5
2754
6e3f3080 2755fi
86da66b5 2756rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2757done
2758rm -f conftest*
2759if test -n "$ac_declaration"; then
2760 echo '#ifdef __cplusplus' >>confdefs.h
2761 echo $ac_declaration >>confdefs.h
2762 echo '#endif' >>confdefs.h
2763fi
2764
3ec83fc2 2765else
ba479fd2
NN
2766 echo "$as_me: failed program was:" >&5
2767sed 's/^/| /' conftest.$ac_ext >&5
2768
2769fi
86da66b5 2770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2771ac_ext=c
2772ac_cpp='$CPP $CPPFLAGS'
2773ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2774ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2775ac_compiler_gnu=$ac_cv_c_compiler_gnu
2776
2777if test "x$CC" != xcc; then
2778 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2779echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2780else
2781 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2782echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2783fi
2784set dummy $CC; ac_cc=`echo $2 |
2785 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2786if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2787 echo $ECHO_N "(cached) $ECHO_C" >&6
2788else
2789 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2790/* confdefs.h. */
2791_ACEOF
2792cat confdefs.h >>conftest.$ac_ext
2793cat >>conftest.$ac_ext <<_ACEOF
2794/* end confdefs.h. */
2795
2796int
2797main ()
2798{
2799
2800 ;
2801 return 0;
2802}
2803_ACEOF
3ec83fc2
RH
2804# Make sure it works both with $CC and with simple cc.
2805# We do the test twice because some compilers refuse to overwrite an
2806# existing .o file with -o, though they will create one.
ba479fd2
NN
2807ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2808if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2809 (eval $ac_try) 2>&5
2810 ac_status=$?
2811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2812 (exit $ac_status); } &&
2813 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2814 (eval $ac_try) 2>&5
2815 ac_status=$?
2816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2817 (exit $ac_status); };
3ec83fc2
RH
2818then
2819 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2820 if test "x$CC" != xcc; then
2821 # Test first that cc exists at all.
ba479fd2
NN
2822 if { ac_try='cc -c conftest.$ac_ext >&5'
2823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2824 (eval $ac_try) 2>&5
2825 ac_status=$?
2826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2827 (exit $ac_status); }; }; then
2828 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2829 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2830 (eval $ac_try) 2>&5
2831 ac_status=$?
2832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2833 (exit $ac_status); } &&
2834 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2835 (eval $ac_try) 2>&5
2836 ac_status=$?
2837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2838 (exit $ac_status); };
3ec83fc2 2839 then
86da66b5
HPN
2840 # cc works too.
2841 :
3ec83fc2 2842 else
86da66b5
HPN
2843 # cc exists but doesn't like -o.
2844 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2845 fi
2846 fi
2847 fi
2848else
2849 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2850fi
2851rm -f conftest*
2852
2853fi
2854if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2855 echo "$as_me:$LINENO: result: yes" >&5
2856echo "${ECHO_T}yes" >&6
3ec83fc2 2857else
ba479fd2
NN
2858 echo "$as_me:$LINENO: result: no" >&5
2859echo "${ECHO_T}no" >&6
2860
2861cat >>confdefs.h <<\_ACEOF
3ec83fc2 2862#define NO_MINUS_C_MINUS_O 1
ba479fd2 2863_ACEOF
3ec83fc2
RH
2864
2865fi
2866
3b620440
KC
2867# expand $ac_aux_dir to an absolute path
2868am_aux_dir=`cd $ac_aux_dir && pwd`
2869
2870# FIXME: we rely on the cache variable name because
2871# there is no other way.
2872set dummy $CC
2873ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2874if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2875 # Losing compiler, so override with the script.
2876 # FIXME: It is wrong to rewrite CC.
2877 # But if we don't then we get into trouble of one sort or another.
2878 # A longer-term fix would be to have automake use am__CC in this case,
2879 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2880 CC="$am_aux_dir/compile $CC"
2881fi
2882
414d23ae
HPN
2883# autoconf is lame and doesn't give us any substitution variable for this.
2884if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2885 NO_MINUS_C_MINUS_O=yes
2886else
2887 OUTPUT_OPTION='-o $@'
2888fi
2889
2890
2891
ec6c7392
PB
2892# Remove the -O2: for historical reasons, unless bootstrapping we prefer
2893# optimizations to be activated explicitly by the toplevel.
2894case "$CC" in
2895 */prev-gcc/xgcc*) ;;
2896 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
2897esac
2898
2899
73458fb7
NN
2900# -------------------------
2901# Check C compiler features
2902# -------------------------
2903
ba479fd2
NN
2904ac_ext=c
2905ac_cpp='$CPP $CPPFLAGS'
2906ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2907ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2908ac_compiler_gnu=$ac_cv_c_compiler_gnu
2909echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2910echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2911# On Suns, sometimes $CPP names a directory.
2912if test -n "$CPP" && test -d "$CPP"; then
2913 CPP=
2914fi
2915if test -z "$CPP"; then
ba479fd2
NN
2916 if test "${ac_cv_prog_CPP+set}" = set; then
2917 echo $ECHO_N "(cached) $ECHO_C" >&6
2918else
2919 # Double quotes because CPP needs to be expanded
2920 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2921 do
2922 ac_preproc_ok=false
2923for ac_c_preproc_warn_flag in '' yes
2924do
2925 # Use a header file that comes with gcc, so configuring glibc
2926 # with a fresh cross-compiler works.
2927 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2928 # <limits.h> exists even on freestanding compilers.
84c041a1 2929 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2930 # not just through cpp. "Syntax error" is here to catch this case.
2931 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2932/* confdefs.h. */
2933_ACEOF
2934cat confdefs.h >>conftest.$ac_ext
2935cat >>conftest.$ac_ext <<_ACEOF
2936/* end confdefs.h. */
2937#ifdef __STDC__
2938# include <limits.h>
2939#else
2940# include <assert.h>
2941#endif
86da66b5 2942 Syntax error
ba479fd2
NN
2943_ACEOF
2944if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2945 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2946 ac_status=$?
2947 grep -v '^ *+' conftest.er1 >conftest.err
2948 rm -f conftest.er1
2949 cat conftest.err >&5
2950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2951 (exit $ac_status); } >/dev/null; then
2952 if test -s conftest.err; then
2953 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2954 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2955 else
2956 ac_cpp_err=
2957 fi
2958else
2959 ac_cpp_err=yes
2960fi
2961if test -z "$ac_cpp_err"; then
093e61a6 2962 :
cafe096b 2963else
ba479fd2
NN
2964 echo "$as_me: failed program was:" >&5
2965sed 's/^/| /' conftest.$ac_ext >&5
2966
2967 # Broken: fails on valid input.
2968continue
2969fi
2970rm -f conftest.err conftest.$ac_ext
2971
2972 # OK, works on sane cases. Now check whether non-existent headers
2973 # can be detected and how.
2974 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2975/* confdefs.h. */
2976_ACEOF
2977cat confdefs.h >>conftest.$ac_ext
2978cat >>conftest.$ac_ext <<_ACEOF
2979/* end confdefs.h. */
2980#include <ac_nonexistent.h>
2981_ACEOF
2982if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2983 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2984 ac_status=$?
2985 grep -v '^ *+' conftest.er1 >conftest.err
2986 rm -f conftest.er1
2987 cat conftest.err >&5
2988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2989 (exit $ac_status); } >/dev/null; then
2990 if test -s conftest.err; then
2991 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2992 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2993 else
2994 ac_cpp_err=
2995 fi
2996else
2997 ac_cpp_err=yes
2998fi
2999if test -z "$ac_cpp_err"; then
3000 # Broken: success on invalid input.
3001continue
3002else
3003 echo "$as_me: failed program was:" >&5
3004sed 's/^/| /' conftest.$ac_ext >&5
3005
3006 # Passes both tests.
3007ac_preproc_ok=:
3008break
3009fi
3010rm -f conftest.err conftest.$ac_ext
3011
3012done
3013# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3014rm -f conftest.err conftest.$ac_ext
3015if $ac_preproc_ok; then
3016 break
3017fi
3018
3019 done
3020 ac_cv_prog_CPP=$CPP
3021
3022fi
3023 CPP=$ac_cv_prog_CPP
3024else
3025 ac_cv_prog_CPP=$CPP
3026fi
3027echo "$as_me:$LINENO: result: $CPP" >&5
3028echo "${ECHO_T}$CPP" >&6
3029ac_preproc_ok=false
3030for ac_c_preproc_warn_flag in '' yes
3031do
3032 # Use a header file that comes with gcc, so configuring glibc
3033 # with a fresh cross-compiler works.
3034 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3035 # <limits.h> exists even on freestanding compilers.
3036 # On the NeXT, cc -E runs the code through the compiler's parser,
3037 # not just through cpp. "Syntax error" is here to catch this case.
3038 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3039/* confdefs.h. */
3040_ACEOF
3041cat confdefs.h >>conftest.$ac_ext
3042cat >>conftest.$ac_ext <<_ACEOF
3043/* end confdefs.h. */
3044#ifdef __STDC__
3045# include <limits.h>
3046#else
3047# include <assert.h>
3048#endif
86da66b5 3049 Syntax error
ba479fd2
NN
3050_ACEOF
3051if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3052 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3053 ac_status=$?
3054 grep -v '^ *+' conftest.er1 >conftest.err
3055 rm -f conftest.er1
3056 cat conftest.err >&5
3057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3058 (exit $ac_status); } >/dev/null; then
3059 if test -s conftest.err; then
3060 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3061 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3062 else
3063 ac_cpp_err=
3064 fi
3065else
3066 ac_cpp_err=yes
3067fi
3068if test -z "$ac_cpp_err"; then
6e3f3080 3069 :
414d23ae 3070else
ba479fd2
NN
3071 echo "$as_me: failed program was:" >&5
3072sed 's/^/| /' conftest.$ac_ext >&5
3073
3074 # Broken: fails on valid input.
3075continue
3076fi
3077rm -f conftest.err conftest.$ac_ext
3078
3079 # OK, works on sane cases. Now check whether non-existent headers
3080 # can be detected and how.
3081 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3082/* confdefs.h. */
3083_ACEOF
3084cat confdefs.h >>conftest.$ac_ext
3085cat >>conftest.$ac_ext <<_ACEOF
3086/* end confdefs.h. */
3087#include <ac_nonexistent.h>
3088_ACEOF
3089if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3090 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3091 ac_status=$?
3092 grep -v '^ *+' conftest.er1 >conftest.err
3093 rm -f conftest.er1
3094 cat conftest.err >&5
3095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3096 (exit $ac_status); } >/dev/null; then
3097 if test -s conftest.err; then
3098 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3099 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3100 else
3101 ac_cpp_err=
3102 fi
6e3f3080 3103else
ba479fd2 3104 ac_cpp_err=yes
63cf211a 3105fi
ba479fd2
NN
3106if test -z "$ac_cpp_err"; then
3107 # Broken: success on invalid input.
3108continue
3109else
3110 echo "$as_me: failed program was:" >&5
3111sed 's/^/| /' conftest.$ac_ext >&5
3112
3113 # Passes both tests.
3114ac_preproc_ok=:
3115break
63cf211a 3116fi
ba479fd2
NN
3117rm -f conftest.err conftest.$ac_ext
3118
3119done
3120# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3121rm -f conftest.err conftest.$ac_ext
3122if $ac_preproc_ok; then
3123 :
6e3f3080 3124else
ba479fd2
NN
3125 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3126See \`config.log' for more details." >&5
3127echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3128See \`config.log' for more details." >&2;}
3129 { (exit 1); exit 1; }; }
6e3f3080
NN
3130fi
3131
ba479fd2
NN
3132ac_ext=c
3133ac_cpp='$CPP $CPPFLAGS'
3134ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3135ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3136ac_compiler_gnu=$ac_cv_c_compiler_gnu
3137
b5472e1d 3138
ba479fd2
NN
3139echo "$as_me:$LINENO: checking for inline" >&5
3140echo $ECHO_N "checking for inline... $ECHO_C" >&6
3141if test "${ac_cv_c_inline+set}" = set; then
3142 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3143else
3144 ac_cv_c_inline=no
3145for ac_kw in inline __inline__ __inline; do
ba479fd2 3146 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3147/* confdefs.h. */
3148_ACEOF
3149cat confdefs.h >>conftest.$ac_ext
3150cat >>conftest.$ac_ext <<_ACEOF
3151/* end confdefs.h. */
3152#ifndef __cplusplus
3153typedef int foo_t;
3154static $ac_kw foo_t static_foo () {return 0; }
3155$ac_kw foo_t foo () {return 0; }
3156#endif
414d23ae 3157
ba479fd2
NN
3158_ACEOF
3159rm -f conftest.$ac_objext
3160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3161 (eval $ac_compile) 2>conftest.er1
ba479fd2 3162 ac_status=$?
86da66b5
HPN
3163 grep -v '^ *+' conftest.er1 >conftest.err
3164 rm -f conftest.er1
3165 cat conftest.err >&5
ba479fd2
NN
3166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3167 (exit $ac_status); } &&
ec6c7392
PB
3168 { ac_try='test -z "$ac_c_werror_flag"
3169 || test ! -s conftest.err'
86da66b5
HPN
3170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3171 (eval $ac_try) 2>&5
3172 ac_status=$?
3173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3174 (exit $ac_status); }; } &&
3175 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3177 (eval $ac_try) 2>&5
3178 ac_status=$?
3179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3180 (exit $ac_status); }; }; then
414d23ae
HPN
3181 ac_cv_c_inline=$ac_kw; break
3182else
ba479fd2
NN
3183 echo "$as_me: failed program was:" >&5
3184sed 's/^/| /' conftest.$ac_ext >&5
3185
414d23ae 3186fi
86da66b5 3187rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3188done
3189
3190fi
ba479fd2
NN
3191echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3192echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3193
3194
ba479fd2 3195case $ac_cv_c_inline in
414d23ae 3196 inline | yes) ;;
86da66b5
HPN
3197 *)
3198 case $ac_cv_c_inline in
3199 no) ac_val=;;
3200 *) ac_val=$ac_cv_c_inline;;
3201 esac
3202 cat >>confdefs.h <<_ACEOF
3203#ifndef __cplusplus
3204#define inline $ac_val
3205#endif
ba479fd2 3206_ACEOF
86da66b5 3207 ;;
414d23ae
HPN
3208esac
3209
414d23ae 3210
414d23ae 3211# sizeof(char) is 1 by definition.
bf3b7cd3
JD
3212
3213echo "$as_me:$LINENO: checking for egrep" >&5
3214echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3215if test "${ac_cv_prog_egrep+set}" = set; then
3216 echo $ECHO_N "(cached) $ECHO_C" >&6
3217else
3218 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3219 then ac_cv_prog_egrep='grep -E'
3220 else ac_cv_prog_egrep='egrep'
3221 fi
3222fi
3223echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3224echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3225 EGREP=$ac_cv_prog_egrep
3226
3227
3228echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3229echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3230if test "${ac_cv_header_stdc+set}" = set; then
3231 echo $ECHO_N "(cached) $ECHO_C" >&6
3232else
3233 cat >conftest.$ac_ext <<_ACEOF
3234/* confdefs.h. */
3235_ACEOF
3236cat confdefs.h >>conftest.$ac_ext
3237cat >>conftest.$ac_ext <<_ACEOF
3238/* end confdefs.h. */
3239#include <stdlib.h>
3240#include <stdarg.h>
3241#include <string.h>
3242#include <float.h>
3243
3244int
3245main ()
3246{
3247
3248 ;
3249 return 0;
3250}
3251_ACEOF
3252rm -f conftest.$ac_objext
3253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3254 (eval $ac_compile) 2>conftest.er1
3255 ac_status=$?
3256 grep -v '^ *+' conftest.er1 >conftest.err
3257 rm -f conftest.er1
3258 cat conftest.err >&5
3259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3260 (exit $ac_status); } &&
ec6c7392
PB
3261 { ac_try='test -z "$ac_c_werror_flag"
3262 || test ! -s conftest.err'
bf3b7cd3
JD
3263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3264 (eval $ac_try) 2>&5
3265 ac_status=$?
3266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3267 (exit $ac_status); }; } &&
3268 { ac_try='test -s conftest.$ac_objext'
3269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3270 (eval $ac_try) 2>&5
3271 ac_status=$?
3272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3273 (exit $ac_status); }; }; then
3274 ac_cv_header_stdc=yes
3275else
3276 echo "$as_me: failed program was:" >&5
3277sed 's/^/| /' conftest.$ac_ext >&5
3278
3279ac_cv_header_stdc=no
3280fi
3281rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3282
3283if test $ac_cv_header_stdc = yes; then
3284 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3285 cat >conftest.$ac_ext <<_ACEOF
3286/* confdefs.h. */
3287_ACEOF
3288cat confdefs.h >>conftest.$ac_ext
3289cat >>conftest.$ac_ext <<_ACEOF
3290/* end confdefs.h. */
3291#include <string.h>
3292
3293_ACEOF
3294if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3295 $EGREP "memchr" >/dev/null 2>&1; then
3296 :
3297else
3298 ac_cv_header_stdc=no
3299fi
3300rm -f conftest*
3301
3302fi
3303
3304if test $ac_cv_header_stdc = yes; then
3305 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3306 cat >conftest.$ac_ext <<_ACEOF
3307/* confdefs.h. */
3308_ACEOF
3309cat confdefs.h >>conftest.$ac_ext
3310cat >>conftest.$ac_ext <<_ACEOF
3311/* end confdefs.h. */
3312#include <stdlib.h>
3313
3314_ACEOF
3315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3316 $EGREP "free" >/dev/null 2>&1; then
3317 :
3318else
3319 ac_cv_header_stdc=no
3320fi
3321rm -f conftest*
3322
3323fi
3324
3325if test $ac_cv_header_stdc = yes; then
3326 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3327 if test "$cross_compiling" = yes; then
3328 :
3329else
3330 cat >conftest.$ac_ext <<_ACEOF
3331/* confdefs.h. */
3332_ACEOF
3333cat confdefs.h >>conftest.$ac_ext
3334cat >>conftest.$ac_ext <<_ACEOF
3335/* end confdefs.h. */
3336#include <ctype.h>
3337#if ((' ' & 0x0FF) == 0x020)
3338# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3339# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3340#else
3341# define ISLOWER(c) \
3342 (('a' <= (c) && (c) <= 'i') \
3343 || ('j' <= (c) && (c) <= 'r') \
3344 || ('s' <= (c) && (c) <= 'z'))
3345# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3346#endif
3347
3348#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3349int
3350main ()
3351{
3352 int i;
3353 for (i = 0; i < 256; i++)
3354 if (XOR (islower (i), ISLOWER (i))
3355 || toupper (i) != TOUPPER (i))
3356 exit(2);
3357 exit (0);
3358}
3359_ACEOF
3360rm -f conftest$ac_exeext
3361if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3362 (eval $ac_link) 2>&5
3363 ac_status=$?
3364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3365 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3367 (eval $ac_try) 2>&5
3368 ac_status=$?
3369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3370 (exit $ac_status); }; }; then
3371 :
3372else
3373 echo "$as_me: program exited with status $ac_status" >&5
3374echo "$as_me: failed program was:" >&5
3375sed 's/^/| /' conftest.$ac_ext >&5
3376
3377( exit $ac_status )
3378ac_cv_header_stdc=no
3379fi
3380rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3381fi
3382fi
3383fi
3384echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3385echo "${ECHO_T}$ac_cv_header_stdc" >&6
3386if test $ac_cv_header_stdc = yes; then
3387
3388cat >>confdefs.h <<\_ACEOF
3389#define STDC_HEADERS 1
3390_ACEOF
3391
3392fi
3393
3394# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3405 inttypes.h stdint.h unistd.h
3406do
3407as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3408echo "$as_me:$LINENO: checking for $ac_header" >&5
3409echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3410if eval "test \"\${$as_ac_Header+set}\" = set"; then
3411 echo $ECHO_N "(cached) $ECHO_C" >&6
3412else
3413 cat >conftest.$ac_ext <<_ACEOF
3414/* confdefs.h. */
3415_ACEOF
3416cat confdefs.h >>conftest.$ac_ext
3417cat >>conftest.$ac_ext <<_ACEOF
3418/* end confdefs.h. */
3419$ac_includes_default
3420
3421#include <$ac_header>
3422_ACEOF
3423rm -f conftest.$ac_objext
3424if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3425 (eval $ac_compile) 2>conftest.er1
3426 ac_status=$?
3427 grep -v '^ *+' conftest.er1 >conftest.err
3428 rm -f conftest.er1
3429 cat conftest.err >&5
3430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3431 (exit $ac_status); } &&
ec6c7392
PB
3432 { ac_try='test -z "$ac_c_werror_flag"
3433 || test ! -s conftest.err'
bf3b7cd3
JD
3434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3435 (eval $ac_try) 2>&5
3436 ac_status=$?
3437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3438 (exit $ac_status); }; } &&
3439 { ac_try='test -s conftest.$ac_objext'
3440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3441 (eval $ac_try) 2>&5
3442 ac_status=$?
3443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3444 (exit $ac_status); }; }; then
3445 eval "$as_ac_Header=yes"
3446else
3447 echo "$as_me: failed program was:" >&5
3448sed 's/^/| /' conftest.$ac_ext >&5
3449
3450eval "$as_ac_Header=no"
3451fi
3452rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3453fi
3454echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3455echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3456if test `eval echo '${'$as_ac_Header'}'` = yes; then
3457 cat >>confdefs.h <<_ACEOF
3458#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3459_ACEOF
3460
3461fi
3462
3463done
3464
3465
3466echo "$as_me:$LINENO: checking for void *" >&5
3467echo $ECHO_N "checking for void *... $ECHO_C" >&6
3468if test "${ac_cv_type_void_p+set}" = set; then
3469 echo $ECHO_N "(cached) $ECHO_C" >&6
3470else
3471 cat >conftest.$ac_ext <<_ACEOF
3472/* confdefs.h. */
3473_ACEOF
3474cat confdefs.h >>conftest.$ac_ext
3475cat >>conftest.$ac_ext <<_ACEOF
3476/* end confdefs.h. */
3477$ac_includes_default
3478int
3479main ()
3480{
3481if ((void * *) 0)
3482 return 0;
3483if (sizeof (void *))
3484 return 0;
3485 ;
3486 return 0;
3487}
3488_ACEOF
3489rm -f conftest.$ac_objext
3490if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3491 (eval $ac_compile) 2>conftest.er1
3492 ac_status=$?
3493 grep -v '^ *+' conftest.er1 >conftest.err
3494 rm -f conftest.er1
3495 cat conftest.err >&5
3496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3497 (exit $ac_status); } &&
ec6c7392
PB
3498 { ac_try='test -z "$ac_c_werror_flag"
3499 || test ! -s conftest.err'
bf3b7cd3
JD
3500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3501 (eval $ac_try) 2>&5
3502 ac_status=$?
3503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3504 (exit $ac_status); }; } &&
3505 { ac_try='test -s conftest.$ac_objext'
3506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3507 (eval $ac_try) 2>&5
3508 ac_status=$?
3509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3510 (exit $ac_status); }; }; then
3511 ac_cv_type_void_p=yes
3512else
3513 echo "$as_me: failed program was:" >&5
3514sed 's/^/| /' conftest.$ac_ext >&5
3515
3516ac_cv_type_void_p=no
3517fi
3518rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3519fi
3520echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3521echo "${ECHO_T}$ac_cv_type_void_p" >&6
3522
ba479fd2
NN
3523echo "$as_me:$LINENO: checking size of void *" >&5
3524echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3525if test "${ac_cv_sizeof_void_p+set}" = set; then
3526 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 3527else
bf3b7cd3
JD
3528 if test "$ac_cv_type_void_p" = yes; then
3529 # The cast to unsigned long works around a bug in the HP C Compiler
3530 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3531 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3532 # This bug is HP SR number 8606223364.
3533 if test "$cross_compiling" = yes; then
3534 # Depending upon the size, compute the lo and hi bounds.
3535cat >conftest.$ac_ext <<_ACEOF
3536/* confdefs.h. */
3537_ACEOF
3538cat confdefs.h >>conftest.$ac_ext
3539cat >>conftest.$ac_ext <<_ACEOF
3540/* end confdefs.h. */
3541$ac_includes_default
3542int
3543main ()
3544{
3545static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
3546test_array [0] = 0
3547
3548 ;
3549 return 0;
3550}
3551_ACEOF
3552rm -f conftest.$ac_objext
3553if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3554 (eval $ac_compile) 2>conftest.er1
3555 ac_status=$?
3556 grep -v '^ *+' conftest.er1 >conftest.err
3557 rm -f conftest.er1
3558 cat conftest.err >&5
3559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3560 (exit $ac_status); } &&
ec6c7392
PB
3561 { ac_try='test -z "$ac_c_werror_flag"
3562 || test ! -s conftest.err'
bf3b7cd3
JD
3563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3564 (eval $ac_try) 2>&5
3565 ac_status=$?
3566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3567 (exit $ac_status); }; } &&
3568 { ac_try='test -s conftest.$ac_objext'
3569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3570 (eval $ac_try) 2>&5
3571 ac_status=$?
3572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3573 (exit $ac_status); }; }; then
3574 ac_lo=0 ac_mid=0
3575 while :; do
3576 cat >conftest.$ac_ext <<_ACEOF
3577/* confdefs.h. */
3578_ACEOF
3579cat confdefs.h >>conftest.$ac_ext
3580cat >>conftest.$ac_ext <<_ACEOF
3581/* end confdefs.h. */
3582$ac_includes_default
3583int
3584main ()
3585{
3586static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3587test_array [0] = 0
3588
3589 ;
3590 return 0;
3591}
3592_ACEOF
3593rm -f conftest.$ac_objext
3594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3595 (eval $ac_compile) 2>conftest.er1
3596 ac_status=$?
3597 grep -v '^ *+' conftest.er1 >conftest.err
3598 rm -f conftest.er1
3599 cat conftest.err >&5
3600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3601 (exit $ac_status); } &&
ec6c7392
PB
3602 { ac_try='test -z "$ac_c_werror_flag"
3603 || test ! -s conftest.err'
bf3b7cd3
JD
3604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3605 (eval $ac_try) 2>&5
3606 ac_status=$?
3607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3608 (exit $ac_status); }; } &&
3609 { ac_try='test -s conftest.$ac_objext'
3610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3611 (eval $ac_try) 2>&5
3612 ac_status=$?
3613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3614 (exit $ac_status); }; }; then
3615 ac_hi=$ac_mid; break
3616else
3617 echo "$as_me: failed program was:" >&5
3618sed 's/^/| /' conftest.$ac_ext >&5
3619
3620ac_lo=`expr $ac_mid + 1`
3621 if test $ac_lo -le $ac_mid; then
3622 ac_lo= ac_hi=
3623 break
3624 fi
3625 ac_mid=`expr 2 '*' $ac_mid + 1`
3626fi
3627rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3628 done
3629else
3630 echo "$as_me: failed program was:" >&5
3631sed 's/^/| /' conftest.$ac_ext >&5
3632
3633cat >conftest.$ac_ext <<_ACEOF
3634/* confdefs.h. */
3635_ACEOF
3636cat confdefs.h >>conftest.$ac_ext
3637cat >>conftest.$ac_ext <<_ACEOF
3638/* end confdefs.h. */
3639$ac_includes_default
3640int
3641main ()
3642{
3643static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
3644test_array [0] = 0
3645
3646 ;
3647 return 0;
3648}
3649_ACEOF
3650rm -f conftest.$ac_objext
3651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3652 (eval $ac_compile) 2>conftest.er1
3653 ac_status=$?
3654 grep -v '^ *+' conftest.er1 >conftest.err
3655 rm -f conftest.er1
3656 cat conftest.err >&5
3657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3658 (exit $ac_status); } &&
ec6c7392
PB
3659 { ac_try='test -z "$ac_c_werror_flag"
3660 || test ! -s conftest.err'
bf3b7cd3
JD
3661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3662 (eval $ac_try) 2>&5
3663 ac_status=$?
3664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3665 (exit $ac_status); }; } &&
3666 { ac_try='test -s conftest.$ac_objext'
3667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3668 (eval $ac_try) 2>&5
3669 ac_status=$?
3670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3671 (exit $ac_status); }; }; then
3672 ac_hi=-1 ac_mid=-1
3673 while :; do
3674 cat >conftest.$ac_ext <<_ACEOF
3675/* confdefs.h. */
3676_ACEOF
3677cat confdefs.h >>conftest.$ac_ext
3678cat >>conftest.$ac_ext <<_ACEOF
3679/* end confdefs.h. */
3680$ac_includes_default
3681int
3682main ()
3683{
3684static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
3685test_array [0] = 0
3686
3687 ;
3688 return 0;
3689}
3690_ACEOF
3691rm -f conftest.$ac_objext
3692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3693 (eval $ac_compile) 2>conftest.er1
3694 ac_status=$?
3695 grep -v '^ *+' conftest.er1 >conftest.err
3696 rm -f conftest.er1
3697 cat conftest.err >&5
3698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3699 (exit $ac_status); } &&
ec6c7392
PB
3700 { ac_try='test -z "$ac_c_werror_flag"
3701 || test ! -s conftest.err'
bf3b7cd3
JD
3702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3703 (eval $ac_try) 2>&5
3704 ac_status=$?
3705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3706 (exit $ac_status); }; } &&
3707 { ac_try='test -s conftest.$ac_objext'
3708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3709 (eval $ac_try) 2>&5
3710 ac_status=$?
3711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3712 (exit $ac_status); }; }; then
3713 ac_lo=$ac_mid; break
3714else
3715 echo "$as_me: failed program was:" >&5
3716sed 's/^/| /' conftest.$ac_ext >&5
3717
3718ac_hi=`expr '(' $ac_mid ')' - 1`
3719 if test $ac_mid -le $ac_hi; then
3720 ac_lo= ac_hi=
3721 break
3722 fi
3723 ac_mid=`expr 2 '*' $ac_mid`
3724fi
3725rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3726 done
3727else
3728 echo "$as_me: failed program was:" >&5
3729sed 's/^/| /' conftest.$ac_ext >&5
3730
3731ac_lo= ac_hi=
3732fi
3733rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3734fi
3735rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3736# Binary search between lo and hi bounds.
3737while test "x$ac_lo" != "x$ac_hi"; do
3738 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3739 cat >conftest.$ac_ext <<_ACEOF
3740/* confdefs.h. */
3741_ACEOF
3742cat confdefs.h >>conftest.$ac_ext
3743cat >>conftest.$ac_ext <<_ACEOF
3744/* end confdefs.h. */
3745$ac_includes_default
3746int
3747main ()
3748{
3749static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3750test_array [0] = 0
3751
3752 ;
3753 return 0;
3754}
3755_ACEOF
3756rm -f conftest.$ac_objext
3757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3758 (eval $ac_compile) 2>conftest.er1
3759 ac_status=$?
3760 grep -v '^ *+' conftest.er1 >conftest.err
3761 rm -f conftest.er1
3762 cat conftest.err >&5
3763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3764 (exit $ac_status); } &&
ec6c7392
PB
3765 { ac_try='test -z "$ac_c_werror_flag"
3766 || test ! -s conftest.err'
bf3b7cd3
JD
3767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3768 (eval $ac_try) 2>&5
3769 ac_status=$?
3770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3771 (exit $ac_status); }; } &&
3772 { ac_try='test -s conftest.$ac_objext'
3773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3774 (eval $ac_try) 2>&5
3775 ac_status=$?
3776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3777 (exit $ac_status); }; }; then
3778 ac_hi=$ac_mid
3779else
3780 echo "$as_me: failed program was:" >&5
3781sed 's/^/| /' conftest.$ac_ext >&5
3782
3783ac_lo=`expr '(' $ac_mid ')' + 1`
3784fi
3785rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3786done
3787case $ac_lo in
3788?*) ac_cv_sizeof_void_p=$ac_lo;;
3789'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3790See \`config.log' for more details." >&5
3791echo "$as_me: error: cannot compute sizeof (void *), 77
3792See \`config.log' for more details." >&2;}
3793 { (exit 1); exit 1; }; } ;;
3794esac
3795else
3796 if test "$cross_compiling" = yes; then
ec6c7392
PB
3797 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
3798See \`config.log' for more details." >&5
3799echo "$as_me: error: cannot run test program while cross compiling
3800See \`config.log' for more details." >&2;}
bf3b7cd3
JD
3801 { (exit 1); exit 1; }; }
3802else
3803 cat >conftest.$ac_ext <<_ACEOF
3804/* confdefs.h. */
3805_ACEOF
3806cat confdefs.h >>conftest.$ac_ext
3807cat >>conftest.$ac_ext <<_ACEOF
3808/* end confdefs.h. */
3809$ac_includes_default
3810long longval () { return (long) (sizeof (void *)); }
3811unsigned long ulongval () { return (long) (sizeof (void *)); }
3812#include <stdio.h>
3813#include <stdlib.h>
3814int
3815main ()
3816{
3817
3818 FILE *f = fopen ("conftest.val", "w");
3819 if (! f)
3820 exit (1);
3821 if (((long) (sizeof (void *))) < 0)
3822 {
3823 long i = longval ();
3824 if (i != ((long) (sizeof (void *))))
3825 exit (1);
3826 fprintf (f, "%ld\n", i);
3827 }
3828 else
3829 {
3830 unsigned long i = ulongval ();
3831 if (i != ((long) (sizeof (void *))))
3832 exit (1);
3833 fprintf (f, "%lu\n", i);
3834 }
3835 exit (ferror (f) || fclose (f) != 0);
3836
3837 ;
3838 return 0;
3839}
3840_ACEOF
3841rm -f conftest$ac_exeext
3842if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3843 (eval $ac_link) 2>&5
3844 ac_status=$?
3845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3846 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3848 (eval $ac_try) 2>&5
3849 ac_status=$?
3850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3851 (exit $ac_status); }; }; then
3852 ac_cv_sizeof_void_p=`cat conftest.val`
3853else
3854 echo "$as_me: program exited with status $ac_status" >&5
3855echo "$as_me: failed program was:" >&5
3856sed 's/^/| /' conftest.$ac_ext >&5
3857
3858( exit $ac_status )
3859{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3860See \`config.log' for more details." >&5
3861echo "$as_me: error: cannot compute sizeof (void *), 77
3862See \`config.log' for more details." >&2;}
3863 { (exit 1); exit 1; }; }
3864fi
3865rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3866fi
3867fi
3868rm -f conftest.val
3869else
3870 ac_cv_sizeof_void_p=0
3871fi
3872fi
3873echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3874echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3875cat >>confdefs.h <<_ACEOF
3876#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3877_ACEOF
3878
3879
3880echo "$as_me:$LINENO: checking for short" >&5
3881echo $ECHO_N "checking for short... $ECHO_C" >&6
3882if test "${ac_cv_type_short+set}" = set; then
3883 echo $ECHO_N "(cached) $ECHO_C" >&6
3884else
3885 cat >conftest.$ac_ext <<_ACEOF
3886/* confdefs.h. */
3887_ACEOF
3888cat confdefs.h >>conftest.$ac_ext
3889cat >>conftest.$ac_ext <<_ACEOF
3890/* end confdefs.h. */
3891$ac_includes_default
3892int
3893main ()
3894{
3895if ((short *) 0)
3896 return 0;
3897if (sizeof (short))
3898 return 0;
3899 ;
3900 return 0;
3901}
3902_ACEOF
3903rm -f conftest.$ac_objext
3904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3905 (eval $ac_compile) 2>conftest.er1
3906 ac_status=$?
3907 grep -v '^ *+' conftest.er1 >conftest.err
3908 rm -f conftest.er1
3909 cat conftest.err >&5
3910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3911 (exit $ac_status); } &&
ec6c7392
PB
3912 { ac_try='test -z "$ac_c_werror_flag"
3913 || test ! -s conftest.err'
bf3b7cd3
JD
3914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3915 (eval $ac_try) 2>&5
3916 ac_status=$?
3917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3918 (exit $ac_status); }; } &&
3919 { ac_try='test -s conftest.$ac_objext'
3920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3921 (eval $ac_try) 2>&5
3922 ac_status=$?
3923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3924 (exit $ac_status); }; }; then
3925 ac_cv_type_short=yes
3926else
3927 echo "$as_me: failed program was:" >&5
3928sed 's/^/| /' conftest.$ac_ext >&5
3929
3930ac_cv_type_short=no
3931fi
3932rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3933fi
3934echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
3935echo "${ECHO_T}$ac_cv_type_short" >&6
3936
3937echo "$as_me:$LINENO: checking size of short" >&5
3938echo $ECHO_N "checking size of short... $ECHO_C" >&6
3939if test "${ac_cv_sizeof_short+set}" = set; then
3940 echo $ECHO_N "(cached) $ECHO_C" >&6
3941else
3942 if test "$ac_cv_type_short" = yes; then
3943 # The cast to unsigned long works around a bug in the HP C Compiler
3944 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3945 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3946 # This bug is HP SR number 8606223364.
3947 if test "$cross_compiling" = yes; then
3948 # Depending upon the size, compute the lo and hi bounds.
3949cat >conftest.$ac_ext <<_ACEOF
3950/* confdefs.h. */
3951_ACEOF
3952cat confdefs.h >>conftest.$ac_ext
3953cat >>conftest.$ac_ext <<_ACEOF
3954/* end confdefs.h. */
3955$ac_includes_default
3956int
3957main ()
3958{
3959static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
3960test_array [0] = 0
3961
3962 ;
3963 return 0;
3964}
3965_ACEOF
3966rm -f conftest.$ac_objext
3967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3968 (eval $ac_compile) 2>conftest.er1
3969 ac_status=$?
3970 grep -v '^ *+' conftest.er1 >conftest.err
3971 rm -f conftest.er1
3972 cat conftest.err >&5
3973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3974 (exit $ac_status); } &&
ec6c7392
PB
3975 { ac_try='test -z "$ac_c_werror_flag"
3976 || test ! -s conftest.err'
bf3b7cd3
JD
3977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3978 (eval $ac_try) 2>&5
3979 ac_status=$?
3980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3981 (exit $ac_status); }; } &&
3982 { ac_try='test -s conftest.$ac_objext'
3983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3984 (eval $ac_try) 2>&5
3985 ac_status=$?
3986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3987 (exit $ac_status); }; }; then
3988 ac_lo=0 ac_mid=0
3989 while :; do
3990 cat >conftest.$ac_ext <<_ACEOF
3991/* confdefs.h. */
3992_ACEOF
3993cat confdefs.h >>conftest.$ac_ext
3994cat >>conftest.$ac_ext <<_ACEOF
3995/* end confdefs.h. */
3996$ac_includes_default
3997int
3998main ()
3999{
4000static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4001test_array [0] = 0
4002
4003 ;
4004 return 0;
4005}
4006_ACEOF
4007rm -f conftest.$ac_objext
4008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4009 (eval $ac_compile) 2>conftest.er1
4010 ac_status=$?
4011 grep -v '^ *+' conftest.er1 >conftest.err
4012 rm -f conftest.er1
4013 cat conftest.err >&5
4014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4015 (exit $ac_status); } &&
ec6c7392
PB
4016 { ac_try='test -z "$ac_c_werror_flag"
4017 || test ! -s conftest.err'
bf3b7cd3
JD
4018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4019 (eval $ac_try) 2>&5
4020 ac_status=$?
4021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4022 (exit $ac_status); }; } &&
4023 { ac_try='test -s conftest.$ac_objext'
4024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4025 (eval $ac_try) 2>&5
4026 ac_status=$?
4027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4028 (exit $ac_status); }; }; then
4029 ac_hi=$ac_mid; break
4030else
4031 echo "$as_me: failed program was:" >&5
4032sed 's/^/| /' conftest.$ac_ext >&5
4033
4034ac_lo=`expr $ac_mid + 1`
4035 if test $ac_lo -le $ac_mid; then
4036 ac_lo= ac_hi=
4037 break
4038 fi
4039 ac_mid=`expr 2 '*' $ac_mid + 1`
4040fi
4041rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4042 done
4043else
4044 echo "$as_me: failed program was:" >&5
4045sed 's/^/| /' conftest.$ac_ext >&5
4046
4047cat >conftest.$ac_ext <<_ACEOF
4048/* confdefs.h. */
4049_ACEOF
4050cat confdefs.h >>conftest.$ac_ext
4051cat >>conftest.$ac_ext <<_ACEOF
4052/* end confdefs.h. */
4053$ac_includes_default
4054int
4055main ()
4056{
4057static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
4058test_array [0] = 0
4059
4060 ;
4061 return 0;
4062}
4063_ACEOF
4064rm -f conftest.$ac_objext
4065if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4066 (eval $ac_compile) 2>conftest.er1
4067 ac_status=$?
4068 grep -v '^ *+' conftest.er1 >conftest.err
4069 rm -f conftest.er1
4070 cat conftest.err >&5
4071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4072 (exit $ac_status); } &&
ec6c7392
PB
4073 { ac_try='test -z "$ac_c_werror_flag"
4074 || test ! -s conftest.err'
bf3b7cd3
JD
4075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4076 (eval $ac_try) 2>&5
4077 ac_status=$?
4078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4079 (exit $ac_status); }; } &&
4080 { ac_try='test -s conftest.$ac_objext'
4081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4082 (eval $ac_try) 2>&5
4083 ac_status=$?
4084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085 (exit $ac_status); }; }; then
4086 ac_hi=-1 ac_mid=-1
4087 while :; do
4088 cat >conftest.$ac_ext <<_ACEOF
4089/* confdefs.h. */
4090_ACEOF
4091cat confdefs.h >>conftest.$ac_ext
4092cat >>conftest.$ac_ext <<_ACEOF
4093/* end confdefs.h. */
4094$ac_includes_default
4095int
4096main ()
4097{
4098static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
4099test_array [0] = 0
4100
4101 ;
4102 return 0;
4103}
4104_ACEOF
4105rm -f conftest.$ac_objext
4106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4107 (eval $ac_compile) 2>conftest.er1
4108 ac_status=$?
4109 grep -v '^ *+' conftest.er1 >conftest.err
4110 rm -f conftest.er1
4111 cat conftest.err >&5
4112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4113 (exit $ac_status); } &&
ec6c7392
PB
4114 { ac_try='test -z "$ac_c_werror_flag"
4115 || test ! -s conftest.err'
bf3b7cd3
JD
4116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4117 (eval $ac_try) 2>&5
4118 ac_status=$?
4119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4120 (exit $ac_status); }; } &&
4121 { ac_try='test -s conftest.$ac_objext'
4122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4123 (eval $ac_try) 2>&5
4124 ac_status=$?
4125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126 (exit $ac_status); }; }; then
4127 ac_lo=$ac_mid; break
4128else
4129 echo "$as_me: failed program was:" >&5
4130sed 's/^/| /' conftest.$ac_ext >&5
4131
4132ac_hi=`expr '(' $ac_mid ')' - 1`
4133 if test $ac_mid -le $ac_hi; then
4134 ac_lo= ac_hi=
4135 break
4136 fi
4137 ac_mid=`expr 2 '*' $ac_mid`
4138fi
4139rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4140 done
4141else
4142 echo "$as_me: failed program was:" >&5
4143sed 's/^/| /' conftest.$ac_ext >&5
4144
4145ac_lo= ac_hi=
4146fi
4147rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4148fi
4149rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4150# Binary search between lo and hi bounds.
4151while test "x$ac_lo" != "x$ac_hi"; do
4152 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4153 cat >conftest.$ac_ext <<_ACEOF
4154/* confdefs.h. */
4155_ACEOF
4156cat confdefs.h >>conftest.$ac_ext
4157cat >>conftest.$ac_ext <<_ACEOF
4158/* end confdefs.h. */
4159$ac_includes_default
4160int
4161main ()
4162{
4163static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4164test_array [0] = 0
4165
4166 ;
4167 return 0;
4168}
4169_ACEOF
4170rm -f conftest.$ac_objext
4171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4172 (eval $ac_compile) 2>conftest.er1
4173 ac_status=$?
4174 grep -v '^ *+' conftest.er1 >conftest.err
4175 rm -f conftest.er1
4176 cat conftest.err >&5
4177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4178 (exit $ac_status); } &&
ec6c7392
PB
4179 { ac_try='test -z "$ac_c_werror_flag"
4180 || test ! -s conftest.err'
bf3b7cd3
JD
4181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4182 (eval $ac_try) 2>&5
4183 ac_status=$?
4184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4185 (exit $ac_status); }; } &&
4186 { ac_try='test -s conftest.$ac_objext'
4187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4188 (eval $ac_try) 2>&5
4189 ac_status=$?
4190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4191 (exit $ac_status); }; }; then
4192 ac_hi=$ac_mid
4193else
4194 echo "$as_me: failed program was:" >&5
4195sed 's/^/| /' conftest.$ac_ext >&5
4196
4197ac_lo=`expr '(' $ac_mid ')' + 1`
4198fi
4199rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4200done
4201case $ac_lo in
4202?*) ac_cv_sizeof_short=$ac_lo;;
4203'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4204See \`config.log' for more details." >&5
4205echo "$as_me: error: cannot compute sizeof (short), 77
4206See \`config.log' for more details." >&2;}
4207 { (exit 1); exit 1; }; } ;;
4208esac
4209else
4210 if test "$cross_compiling" = yes; then
ec6c7392
PB
4211 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4212See \`config.log' for more details." >&5
4213echo "$as_me: error: cannot run test program while cross compiling
4214See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4215 { (exit 1); exit 1; }; }
4216else
4217 cat >conftest.$ac_ext <<_ACEOF
4218/* confdefs.h. */
4219_ACEOF
4220cat confdefs.h >>conftest.$ac_ext
4221cat >>conftest.$ac_ext <<_ACEOF
4222/* end confdefs.h. */
4223$ac_includes_default
4224long longval () { return (long) (sizeof (short)); }
4225unsigned long ulongval () { return (long) (sizeof (short)); }
4226#include <stdio.h>
4227#include <stdlib.h>
4228int
4229main ()
4230{
4231
4232 FILE *f = fopen ("conftest.val", "w");
4233 if (! f)
4234 exit (1);
4235 if (((long) (sizeof (short))) < 0)
4236 {
4237 long i = longval ();
4238 if (i != ((long) (sizeof (short))))
4239 exit (1);
4240 fprintf (f, "%ld\n", i);
4241 }
4242 else
4243 {
4244 unsigned long i = ulongval ();
4245 if (i != ((long) (sizeof (short))))
4246 exit (1);
4247 fprintf (f, "%lu\n", i);
4248 }
4249 exit (ferror (f) || fclose (f) != 0);
4250
4251 ;
4252 return 0;
4253}
4254_ACEOF
4255rm -f conftest$ac_exeext
4256if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4257 (eval $ac_link) 2>&5
4258 ac_status=$?
4259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4260 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4262 (eval $ac_try) 2>&5
4263 ac_status=$?
4264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4265 (exit $ac_status); }; }; then
4266 ac_cv_sizeof_short=`cat conftest.val`
4267else
4268 echo "$as_me: program exited with status $ac_status" >&5
4269echo "$as_me: failed program was:" >&5
4270sed 's/^/| /' conftest.$ac_ext >&5
4271
4272( exit $ac_status )
4273{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4274See \`config.log' for more details." >&5
4275echo "$as_me: error: cannot compute sizeof (short), 77
4276See \`config.log' for more details." >&2;}
4277 { (exit 1); exit 1; }; }
4278fi
4279rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4280fi
4281fi
4282rm -f conftest.val
4283else
4284 ac_cv_sizeof_short=0
4285fi
4286fi
4287echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4288echo "${ECHO_T}$ac_cv_sizeof_short" >&6
4289cat >>confdefs.h <<_ACEOF
4290#define SIZEOF_SHORT $ac_cv_sizeof_short
4291_ACEOF
4292
4293
4294echo "$as_me:$LINENO: checking for int" >&5
4295echo $ECHO_N "checking for int... $ECHO_C" >&6
4296if test "${ac_cv_type_int+set}" = set; then
4297 echo $ECHO_N "(cached) $ECHO_C" >&6
4298else
4299 cat >conftest.$ac_ext <<_ACEOF
4300/* confdefs.h. */
4301_ACEOF
4302cat confdefs.h >>conftest.$ac_ext
4303cat >>conftest.$ac_ext <<_ACEOF
4304/* end confdefs.h. */
4305$ac_includes_default
4306int
4307main ()
4308{
4309if ((int *) 0)
4310 return 0;
4311if (sizeof (int))
4312 return 0;
4313 ;
4314 return 0;
4315}
4316_ACEOF
4317rm -f conftest.$ac_objext
4318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4319 (eval $ac_compile) 2>conftest.er1
4320 ac_status=$?
4321 grep -v '^ *+' conftest.er1 >conftest.err
4322 rm -f conftest.er1
4323 cat conftest.err >&5
4324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4325 (exit $ac_status); } &&
ec6c7392
PB
4326 { ac_try='test -z "$ac_c_werror_flag"
4327 || test ! -s conftest.err'
bf3b7cd3
JD
4328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4329 (eval $ac_try) 2>&5
4330 ac_status=$?
4331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4332 (exit $ac_status); }; } &&
4333 { ac_try='test -s conftest.$ac_objext'
4334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4335 (eval $ac_try) 2>&5
4336 ac_status=$?
4337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4338 (exit $ac_status); }; }; then
4339 ac_cv_type_int=yes
4340else
4341 echo "$as_me: failed program was:" >&5
4342sed 's/^/| /' conftest.$ac_ext >&5
4343
4344ac_cv_type_int=no
4345fi
4346rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4347fi
4348echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4349echo "${ECHO_T}$ac_cv_type_int" >&6
4350
4351echo "$as_me:$LINENO: checking size of int" >&5
4352echo $ECHO_N "checking size of int... $ECHO_C" >&6
4353if test "${ac_cv_sizeof_int+set}" = set; then
4354 echo $ECHO_N "(cached) $ECHO_C" >&6
4355else
4356 if test "$ac_cv_type_int" = yes; then
4357 # The cast to unsigned long works around a bug in the HP C Compiler
4358 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4359 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4360 # This bug is HP SR number 8606223364.
4361 if test "$cross_compiling" = yes; then
4362 # Depending upon the size, compute the lo and hi bounds.
4363cat >conftest.$ac_ext <<_ACEOF
4364/* confdefs.h. */
4365_ACEOF
4366cat confdefs.h >>conftest.$ac_ext
4367cat >>conftest.$ac_ext <<_ACEOF
4368/* end confdefs.h. */
4369$ac_includes_default
4370int
4371main ()
4372{
4373static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4374test_array [0] = 0
4375
4376 ;
4377 return 0;
4378}
4379_ACEOF
4380rm -f conftest.$ac_objext
4381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4382 (eval $ac_compile) 2>conftest.er1
4383 ac_status=$?
4384 grep -v '^ *+' conftest.er1 >conftest.err
4385 rm -f conftest.er1
4386 cat conftest.err >&5
4387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4388 (exit $ac_status); } &&
ec6c7392
PB
4389 { ac_try='test -z "$ac_c_werror_flag"
4390 || test ! -s conftest.err'
bf3b7cd3
JD
4391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4392 (eval $ac_try) 2>&5
4393 ac_status=$?
4394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4395 (exit $ac_status); }; } &&
4396 { ac_try='test -s conftest.$ac_objext'
4397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4398 (eval $ac_try) 2>&5
4399 ac_status=$?
4400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4401 (exit $ac_status); }; }; then
4402 ac_lo=0 ac_mid=0
4403 while :; do
4404 cat >conftest.$ac_ext <<_ACEOF
4405/* confdefs.h. */
4406_ACEOF
4407cat confdefs.h >>conftest.$ac_ext
4408cat >>conftest.$ac_ext <<_ACEOF
4409/* end confdefs.h. */
4410$ac_includes_default
4411int
4412main ()
4413{
4414static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4415test_array [0] = 0
4416
4417 ;
4418 return 0;
4419}
4420_ACEOF
4421rm -f conftest.$ac_objext
4422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4423 (eval $ac_compile) 2>conftest.er1
4424 ac_status=$?
4425 grep -v '^ *+' conftest.er1 >conftest.err
4426 rm -f conftest.er1
4427 cat conftest.err >&5
4428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4429 (exit $ac_status); } &&
ec6c7392
PB
4430 { ac_try='test -z "$ac_c_werror_flag"
4431 || test ! -s conftest.err'
bf3b7cd3
JD
4432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4433 (eval $ac_try) 2>&5
4434 ac_status=$?
4435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4436 (exit $ac_status); }; } &&
4437 { ac_try='test -s conftest.$ac_objext'
4438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4439 (eval $ac_try) 2>&5
4440 ac_status=$?
4441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4442 (exit $ac_status); }; }; then
4443 ac_hi=$ac_mid; break
4444else
4445 echo "$as_me: failed program was:" >&5
4446sed 's/^/| /' conftest.$ac_ext >&5
4447
4448ac_lo=`expr $ac_mid + 1`
4449 if test $ac_lo -le $ac_mid; then
4450 ac_lo= ac_hi=
4451 break
4452 fi
4453 ac_mid=`expr 2 '*' $ac_mid + 1`
4454fi
4455rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4456 done
4457else
4458 echo "$as_me: failed program was:" >&5
4459sed 's/^/| /' conftest.$ac_ext >&5
4460
4461cat >conftest.$ac_ext <<_ACEOF
4462/* confdefs.h. */
4463_ACEOF
4464cat confdefs.h >>conftest.$ac_ext
4465cat >>conftest.$ac_ext <<_ACEOF
4466/* end confdefs.h. */
4467$ac_includes_default
4468int
4469main ()
4470{
4471static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4472test_array [0] = 0
4473
4474 ;
4475 return 0;
4476}
4477_ACEOF
4478rm -f conftest.$ac_objext
4479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4480 (eval $ac_compile) 2>conftest.er1
4481 ac_status=$?
4482 grep -v '^ *+' conftest.er1 >conftest.err
4483 rm -f conftest.er1
4484 cat conftest.err >&5
4485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4486 (exit $ac_status); } &&
ec6c7392
PB
4487 { ac_try='test -z "$ac_c_werror_flag"
4488 || test ! -s conftest.err'
bf3b7cd3
JD
4489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4490 (eval $ac_try) 2>&5
4491 ac_status=$?
4492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4493 (exit $ac_status); }; } &&
4494 { ac_try='test -s conftest.$ac_objext'
4495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4496 (eval $ac_try) 2>&5
4497 ac_status=$?
4498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4499 (exit $ac_status); }; }; then
4500 ac_hi=-1 ac_mid=-1
4501 while :; do
4502 cat >conftest.$ac_ext <<_ACEOF
4503/* confdefs.h. */
4504_ACEOF
4505cat confdefs.h >>conftest.$ac_ext
4506cat >>conftest.$ac_ext <<_ACEOF
4507/* end confdefs.h. */
4508$ac_includes_default
4509int
4510main ()
4511{
4512static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4513test_array [0] = 0
4514
4515 ;
4516 return 0;
4517}
4518_ACEOF
4519rm -f conftest.$ac_objext
4520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4521 (eval $ac_compile) 2>conftest.er1
4522 ac_status=$?
4523 grep -v '^ *+' conftest.er1 >conftest.err
4524 rm -f conftest.er1
4525 cat conftest.err >&5
4526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4527 (exit $ac_status); } &&
ec6c7392
PB
4528 { ac_try='test -z "$ac_c_werror_flag"
4529 || test ! -s conftest.err'
bf3b7cd3
JD
4530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4531 (eval $ac_try) 2>&5
4532 ac_status=$?
4533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4534 (exit $ac_status); }; } &&
4535 { ac_try='test -s conftest.$ac_objext'
4536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4537 (eval $ac_try) 2>&5
4538 ac_status=$?
4539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4540 (exit $ac_status); }; }; then
4541 ac_lo=$ac_mid; break
4542else
4543 echo "$as_me: failed program was:" >&5
4544sed 's/^/| /' conftest.$ac_ext >&5
4545
4546ac_hi=`expr '(' $ac_mid ')' - 1`
4547 if test $ac_mid -le $ac_hi; then
4548 ac_lo= ac_hi=
4549 break
4550 fi
4551 ac_mid=`expr 2 '*' $ac_mid`
4552fi
4553rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4554 done
4555else
4556 echo "$as_me: failed program was:" >&5
4557sed 's/^/| /' conftest.$ac_ext >&5
4558
4559ac_lo= ac_hi=
4560fi
4561rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4562fi
4563rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4564# Binary search between lo and hi bounds.
4565while test "x$ac_lo" != "x$ac_hi"; do
4566 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4567 cat >conftest.$ac_ext <<_ACEOF
4568/* confdefs.h. */
4569_ACEOF
4570cat confdefs.h >>conftest.$ac_ext
4571cat >>conftest.$ac_ext <<_ACEOF
4572/* end confdefs.h. */
4573$ac_includes_default
4574int
4575main ()
4576{
4577static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4578test_array [0] = 0
4579
4580 ;
4581 return 0;
4582}
4583_ACEOF
4584rm -f conftest.$ac_objext
4585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4586 (eval $ac_compile) 2>conftest.er1
4587 ac_status=$?
4588 grep -v '^ *+' conftest.er1 >conftest.err
4589 rm -f conftest.er1
4590 cat conftest.err >&5
4591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4592 (exit $ac_status); } &&
ec6c7392
PB
4593 { ac_try='test -z "$ac_c_werror_flag"
4594 || test ! -s conftest.err'
bf3b7cd3
JD
4595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4596 (eval $ac_try) 2>&5
4597 ac_status=$?
4598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4599 (exit $ac_status); }; } &&
4600 { ac_try='test -s conftest.$ac_objext'
4601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4602 (eval $ac_try) 2>&5
4603 ac_status=$?
4604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4605 (exit $ac_status); }; }; then
4606 ac_hi=$ac_mid
4607else
4608 echo "$as_me: failed program was:" >&5
4609sed 's/^/| /' conftest.$ac_ext >&5
4610
4611ac_lo=`expr '(' $ac_mid ')' + 1`
4612fi
4613rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4614done
4615case $ac_lo in
4616?*) ac_cv_sizeof_int=$ac_lo;;
4617'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4618See \`config.log' for more details." >&5
4619echo "$as_me: error: cannot compute sizeof (int), 77
4620See \`config.log' for more details." >&2;}
4621 { (exit 1); exit 1; }; } ;;
4622esac
4623else
4624 if test "$cross_compiling" = yes; then
ec6c7392
PB
4625 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4626See \`config.log' for more details." >&5
4627echo "$as_me: error: cannot run test program while cross compiling
4628See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4629 { (exit 1); exit 1; }; }
4630else
4631 cat >conftest.$ac_ext <<_ACEOF
4632/* confdefs.h. */
4633_ACEOF
4634cat confdefs.h >>conftest.$ac_ext
4635cat >>conftest.$ac_ext <<_ACEOF
4636/* end confdefs.h. */
4637$ac_includes_default
4638long longval () { return (long) (sizeof (int)); }
4639unsigned long ulongval () { return (long) (sizeof (int)); }
4640#include <stdio.h>
4641#include <stdlib.h>
4642int
4643main ()
4644{
4645
4646 FILE *f = fopen ("conftest.val", "w");
4647 if (! f)
4648 exit (1);
4649 if (((long) (sizeof (int))) < 0)
4650 {
4651 long i = longval ();
4652 if (i != ((long) (sizeof (int))))
4653 exit (1);
4654 fprintf (f, "%ld\n", i);
4655 }
4656 else
4657 {
4658 unsigned long i = ulongval ();
4659 if (i != ((long) (sizeof (int))))
4660 exit (1);
4661 fprintf (f, "%lu\n", i);
4662 }
4663 exit (ferror (f) || fclose (f) != 0);
4664
4665 ;
4666 return 0;
4667}
4668_ACEOF
4669rm -f conftest$ac_exeext
4670if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4671 (eval $ac_link) 2>&5
4672 ac_status=$?
4673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4674 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4676 (eval $ac_try) 2>&5
4677 ac_status=$?
4678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4679 (exit $ac_status); }; }; then
4680 ac_cv_sizeof_int=`cat conftest.val`
4681else
4682 echo "$as_me: program exited with status $ac_status" >&5
4683echo "$as_me: failed program was:" >&5
4684sed 's/^/| /' conftest.$ac_ext >&5
4685
4686( exit $ac_status )
4687{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4688See \`config.log' for more details." >&5
4689echo "$as_me: error: cannot compute sizeof (int), 77
4690See \`config.log' for more details." >&2;}
4691 { (exit 1); exit 1; }; }
4692fi
4693rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4694fi
4695fi
4696rm -f conftest.val
4697else
4698 ac_cv_sizeof_int=0
4699fi
4700fi
4701echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4702echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4703cat >>confdefs.h <<_ACEOF
4704#define SIZEOF_INT $ac_cv_sizeof_int
4705_ACEOF
4706
4707
4708echo "$as_me:$LINENO: checking for long" >&5
4709echo $ECHO_N "checking for long... $ECHO_C" >&6
4710if test "${ac_cv_type_long+set}" = set; then
4711 echo $ECHO_N "(cached) $ECHO_C" >&6
4712else
4713 cat >conftest.$ac_ext <<_ACEOF
4714/* confdefs.h. */
4715_ACEOF
4716cat confdefs.h >>conftest.$ac_ext
4717cat >>conftest.$ac_ext <<_ACEOF
4718/* end confdefs.h. */
4719$ac_includes_default
4720int
4721main ()
4722{
4723if ((long *) 0)
4724 return 0;
4725if (sizeof (long))
4726 return 0;
4727 ;
4728 return 0;
4729}
4730_ACEOF
4731rm -f conftest.$ac_objext
4732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4733 (eval $ac_compile) 2>conftest.er1
4734 ac_status=$?
4735 grep -v '^ *+' conftest.er1 >conftest.err
4736 rm -f conftest.er1
4737 cat conftest.err >&5
4738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4739 (exit $ac_status); } &&
ec6c7392
PB
4740 { ac_try='test -z "$ac_c_werror_flag"
4741 || test ! -s conftest.err'
bf3b7cd3
JD
4742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4743 (eval $ac_try) 2>&5
4744 ac_status=$?
4745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4746 (exit $ac_status); }; } &&
4747 { ac_try='test -s conftest.$ac_objext'
4748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4749 (eval $ac_try) 2>&5
4750 ac_status=$?
4751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4752 (exit $ac_status); }; }; then
4753 ac_cv_type_long=yes
4754else
4755 echo "$as_me: failed program was:" >&5
4756sed 's/^/| /' conftest.$ac_ext >&5
4757
4758ac_cv_type_long=no
4759fi
4760rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4761fi
4762echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4763echo "${ECHO_T}$ac_cv_type_long" >&6
4764
4765echo "$as_me:$LINENO: checking size of long" >&5
4766echo $ECHO_N "checking size of long... $ECHO_C" >&6
4767if test "${ac_cv_sizeof_long+set}" = set; then
4768 echo $ECHO_N "(cached) $ECHO_C" >&6
4769else
4770 if test "$ac_cv_type_long" = yes; then
4771 # The cast to unsigned long works around a bug in the HP C Compiler
4772 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4773 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4774 # This bug is HP SR number 8606223364.
4775 if test "$cross_compiling" = yes; then
4776 # Depending upon the size, compute the lo and hi bounds.
4777cat >conftest.$ac_ext <<_ACEOF
4778/* confdefs.h. */
4779_ACEOF
4780cat confdefs.h >>conftest.$ac_ext
4781cat >>conftest.$ac_ext <<_ACEOF
4782/* end confdefs.h. */
4783$ac_includes_default
4784int
4785main ()
4786{
4787static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
4788test_array [0] = 0
4789
4790 ;
4791 return 0;
4792}
4793_ACEOF
4794rm -f conftest.$ac_objext
4795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4796 (eval $ac_compile) 2>conftest.er1
4797 ac_status=$?
4798 grep -v '^ *+' conftest.er1 >conftest.err
4799 rm -f conftest.er1
4800 cat conftest.err >&5
4801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4802 (exit $ac_status); } &&
ec6c7392
PB
4803 { ac_try='test -z "$ac_c_werror_flag"
4804 || test ! -s conftest.err'
bf3b7cd3
JD
4805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4806 (eval $ac_try) 2>&5
4807 ac_status=$?
4808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809 (exit $ac_status); }; } &&
4810 { ac_try='test -s conftest.$ac_objext'
4811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4812 (eval $ac_try) 2>&5
4813 ac_status=$?
4814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815 (exit $ac_status); }; }; then
4816 ac_lo=0 ac_mid=0
4817 while :; do
4818 cat >conftest.$ac_ext <<_ACEOF
4819/* confdefs.h. */
4820_ACEOF
4821cat confdefs.h >>conftest.$ac_ext
4822cat >>conftest.$ac_ext <<_ACEOF
4823/* end confdefs.h. */
4824$ac_includes_default
4825int
4826main ()
4827{
4828static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4829test_array [0] = 0
4830
4831 ;
4832 return 0;
4833}
4834_ACEOF
4835rm -f conftest.$ac_objext
4836if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4837 (eval $ac_compile) 2>conftest.er1
4838 ac_status=$?
4839 grep -v '^ *+' conftest.er1 >conftest.err
4840 rm -f conftest.er1
4841 cat conftest.err >&5
4842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4843 (exit $ac_status); } &&
ec6c7392
PB
4844 { ac_try='test -z "$ac_c_werror_flag"
4845 || test ! -s conftest.err'
bf3b7cd3
JD
4846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4847 (eval $ac_try) 2>&5
4848 ac_status=$?
4849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4850 (exit $ac_status); }; } &&
4851 { ac_try='test -s conftest.$ac_objext'
4852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4853 (eval $ac_try) 2>&5
4854 ac_status=$?
4855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4856 (exit $ac_status); }; }; then
4857 ac_hi=$ac_mid; break
4858else
4859 echo "$as_me: failed program was:" >&5
4860sed 's/^/| /' conftest.$ac_ext >&5
4861
4862ac_lo=`expr $ac_mid + 1`
4863 if test $ac_lo -le $ac_mid; then
4864 ac_lo= ac_hi=
4865 break
4866 fi
4867 ac_mid=`expr 2 '*' $ac_mid + 1`
4868fi
4869rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4870 done
4871else
4872 echo "$as_me: failed program was:" >&5
4873sed 's/^/| /' conftest.$ac_ext >&5
4874
4875cat >conftest.$ac_ext <<_ACEOF
4876/* confdefs.h. */
4877_ACEOF
4878cat confdefs.h >>conftest.$ac_ext
4879cat >>conftest.$ac_ext <<_ACEOF
4880/* end confdefs.h. */
4881$ac_includes_default
4882int
4883main ()
4884{
4885static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
4886test_array [0] = 0
4887
4888 ;
4889 return 0;
4890}
4891_ACEOF
4892rm -f conftest.$ac_objext
4893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4894 (eval $ac_compile) 2>conftest.er1
4895 ac_status=$?
4896 grep -v '^ *+' conftest.er1 >conftest.err
4897 rm -f conftest.er1
4898 cat conftest.err >&5
4899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4900 (exit $ac_status); } &&
ec6c7392
PB
4901 { ac_try='test -z "$ac_c_werror_flag"
4902 || test ! -s conftest.err'
bf3b7cd3
JD
4903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4904 (eval $ac_try) 2>&5
4905 ac_status=$?
4906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4907 (exit $ac_status); }; } &&
4908 { ac_try='test -s conftest.$ac_objext'
4909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4910 (eval $ac_try) 2>&5
4911 ac_status=$?
4912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4913 (exit $ac_status); }; }; then
4914 ac_hi=-1 ac_mid=-1
4915 while :; do
4916 cat >conftest.$ac_ext <<_ACEOF
4917/* confdefs.h. */
4918_ACEOF
4919cat confdefs.h >>conftest.$ac_ext
4920cat >>conftest.$ac_ext <<_ACEOF
4921/* end confdefs.h. */
4922$ac_includes_default
4923int
4924main ()
4925{
4926static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
4927test_array [0] = 0
4928
4929 ;
4930 return 0;
4931}
4932_ACEOF
4933rm -f conftest.$ac_objext
4934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4935 (eval $ac_compile) 2>conftest.er1
4936 ac_status=$?
4937 grep -v '^ *+' conftest.er1 >conftest.err
4938 rm -f conftest.er1
4939 cat conftest.err >&5
4940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4941 (exit $ac_status); } &&
ec6c7392
PB
4942 { ac_try='test -z "$ac_c_werror_flag"
4943 || test ! -s conftest.err'
bf3b7cd3
JD
4944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4945 (eval $ac_try) 2>&5
4946 ac_status=$?
4947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4948 (exit $ac_status); }; } &&
4949 { ac_try='test -s conftest.$ac_objext'
4950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4951 (eval $ac_try) 2>&5
4952 ac_status=$?
4953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4954 (exit $ac_status); }; }; then
4955 ac_lo=$ac_mid; break
4956else
4957 echo "$as_me: failed program was:" >&5
4958sed 's/^/| /' conftest.$ac_ext >&5
4959
4960ac_hi=`expr '(' $ac_mid ')' - 1`
4961 if test $ac_mid -le $ac_hi; then
4962 ac_lo= ac_hi=
4963 break
4964 fi
4965 ac_mid=`expr 2 '*' $ac_mid`
4966fi
4967rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4968 done
4969else
4970 echo "$as_me: failed program was:" >&5
4971sed 's/^/| /' conftest.$ac_ext >&5
4972
4973ac_lo= ac_hi=
4974fi
4975rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4976fi
4977rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4978# Binary search between lo and hi bounds.
4979while test "x$ac_lo" != "x$ac_hi"; do
4980 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4981 cat >conftest.$ac_ext <<_ACEOF
4982/* confdefs.h. */
4983_ACEOF
4984cat confdefs.h >>conftest.$ac_ext
4985cat >>conftest.$ac_ext <<_ACEOF
4986/* end confdefs.h. */
4987$ac_includes_default
4988int
4989main ()
4990{
4991static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4992test_array [0] = 0
4993
4994 ;
4995 return 0;
4996}
4997_ACEOF
4998rm -f conftest.$ac_objext
4999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5000 (eval $ac_compile) 2>conftest.er1
5001 ac_status=$?
5002 grep -v '^ *+' conftest.er1 >conftest.err
5003 rm -f conftest.er1
5004 cat conftest.err >&5
5005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5006 (exit $ac_status); } &&
ec6c7392
PB
5007 { ac_try='test -z "$ac_c_werror_flag"
5008 || test ! -s conftest.err'
bf3b7cd3
JD
5009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5010 (eval $ac_try) 2>&5
5011 ac_status=$?
5012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5013 (exit $ac_status); }; } &&
5014 { ac_try='test -s conftest.$ac_objext'
5015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5016 (eval $ac_try) 2>&5
5017 ac_status=$?
5018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5019 (exit $ac_status); }; }; then
5020 ac_hi=$ac_mid
5021else
5022 echo "$as_me: failed program was:" >&5
5023sed 's/^/| /' conftest.$ac_ext >&5
5024
5025ac_lo=`expr '(' $ac_mid ')' + 1`
5026fi
5027rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5028done
5029case $ac_lo in
5030?*) ac_cv_sizeof_long=$ac_lo;;
5031'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5032See \`config.log' for more details." >&5
5033echo "$as_me: error: cannot compute sizeof (long), 77
5034See \`config.log' for more details." >&2;}
5035 { (exit 1); exit 1; }; } ;;
5036esac
5037else
5038 if test "$cross_compiling" = yes; then
ec6c7392
PB
5039 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5040See \`config.log' for more details." >&5
5041echo "$as_me: error: cannot run test program while cross compiling
5042See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5043 { (exit 1); exit 1; }; }
5044else
5045 cat >conftest.$ac_ext <<_ACEOF
5046/* confdefs.h. */
5047_ACEOF
5048cat confdefs.h >>conftest.$ac_ext
5049cat >>conftest.$ac_ext <<_ACEOF
5050/* end confdefs.h. */
5051$ac_includes_default
5052long longval () { return (long) (sizeof (long)); }
5053unsigned long ulongval () { return (long) (sizeof (long)); }
5054#include <stdio.h>
5055#include <stdlib.h>
5056int
5057main ()
5058{
5059
5060 FILE *f = fopen ("conftest.val", "w");
5061 if (! f)
5062 exit (1);
5063 if (((long) (sizeof (long))) < 0)
5064 {
5065 long i = longval ();
5066 if (i != ((long) (sizeof (long))))
5067 exit (1);
5068 fprintf (f, "%ld\n", i);
5069 }
5070 else
5071 {
5072 unsigned long i = ulongval ();
5073 if (i != ((long) (sizeof (long))))
5074 exit (1);
5075 fprintf (f, "%lu\n", i);
5076 }
5077 exit (ferror (f) || fclose (f) != 0);
5078
5079 ;
5080 return 0;
5081}
5082_ACEOF
5083rm -f conftest$ac_exeext
5084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5085 (eval $ac_link) 2>&5
5086 ac_status=$?
5087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5088 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5090 (eval $ac_try) 2>&5
5091 ac_status=$?
5092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5093 (exit $ac_status); }; }; then
5094 ac_cv_sizeof_long=`cat conftest.val`
5095else
5096 echo "$as_me: program exited with status $ac_status" >&5
5097echo "$as_me: failed program was:" >&5
5098sed 's/^/| /' conftest.$ac_ext >&5
5099
5100( exit $ac_status )
5101{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5102See \`config.log' for more details." >&5
5103echo "$as_me: error: cannot compute sizeof (long), 77
5104See \`config.log' for more details." >&2;}
5105 { (exit 1); exit 1; }; }
5106fi
5107rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5108fi
5109fi
5110rm -f conftest.val
5111else
5112 ac_cv_sizeof_long=0
5113fi
5114fi
5115echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5116echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5117cat >>confdefs.h <<_ACEOF
5118#define SIZEOF_LONG $ac_cv_sizeof_long
5119_ACEOF
5120
5121
5ec1c5e6
KC
5122echo "$as_me:$LINENO: checking for long long" >&5
5123echo $ECHO_N "checking for long long... $ECHO_C" >&6
5124if test "${ac_cv_type_long_long+set}" = set; then
5125 echo $ECHO_N "(cached) $ECHO_C" >&6
5126else
5127 cat >conftest.$ac_ext <<_ACEOF
5128/* confdefs.h. */
5129_ACEOF
5130cat confdefs.h >>conftest.$ac_ext
5131cat >>conftest.$ac_ext <<_ACEOF
5132/* end confdefs.h. */
5133$ac_includes_default
5134int
5135main ()
5136{
5137if ((long long *) 0)
5138 return 0;
5139if (sizeof (long long))
5140 return 0;
5141 ;
5142 return 0;
5143}
5144_ACEOF
5145rm -f conftest.$ac_objext
5146if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5147 (eval $ac_compile) 2>conftest.er1
5148 ac_status=$?
5149 grep -v '^ *+' conftest.er1 >conftest.err
5150 rm -f conftest.er1
5151 cat conftest.err >&5
5152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5153 (exit $ac_status); } &&
ec6c7392
PB
5154 { ac_try='test -z "$ac_c_werror_flag"
5155 || test ! -s conftest.err'
5ec1c5e6
KC
5156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5157 (eval $ac_try) 2>&5
5158 ac_status=$?
5159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5160 (exit $ac_status); }; } &&
5161 { ac_try='test -s conftest.$ac_objext'
5162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5163 (eval $ac_try) 2>&5
5164 ac_status=$?
5165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5166 (exit $ac_status); }; }; then
5167 ac_cv_type_long_long=yes
5168else
5169 echo "$as_me: failed program was:" >&5
5170sed 's/^/| /' conftest.$ac_ext >&5
5171
5172ac_cv_type_long_long=no
5173fi
5174rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5175fi
5176echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5177echo "${ECHO_T}$ac_cv_type_long_long" >&6
5178if test $ac_cv_type_long_long = yes; then
5179
5180cat >>confdefs.h <<_ACEOF
5181#define HAVE_LONG_LONG 1
5182_ACEOF
5183
5184echo "$as_me:$LINENO: checking for long long" >&5
bf3b7cd3
JD
5185echo $ECHO_N "checking for long long... $ECHO_C" >&6
5186if test "${ac_cv_type_long_long+set}" = set; then
5187 echo $ECHO_N "(cached) $ECHO_C" >&6
5188else
5189 cat >conftest.$ac_ext <<_ACEOF
5190/* confdefs.h. */
5191_ACEOF
5192cat confdefs.h >>conftest.$ac_ext
5193cat >>conftest.$ac_ext <<_ACEOF
5194/* end confdefs.h. */
5195$ac_includes_default
5196int
5197main ()
5198{
5199if ((long long *) 0)
5200 return 0;
5201if (sizeof (long long))
5202 return 0;
5203 ;
5204 return 0;
5205}
5206_ACEOF
5207rm -f conftest.$ac_objext
5208if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5209 (eval $ac_compile) 2>conftest.er1
5210 ac_status=$?
5211 grep -v '^ *+' conftest.er1 >conftest.err
5212 rm -f conftest.er1
5213 cat conftest.err >&5
5214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5215 (exit $ac_status); } &&
ec6c7392
PB
5216 { ac_try='test -z "$ac_c_werror_flag"
5217 || test ! -s conftest.err'
bf3b7cd3
JD
5218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5219 (eval $ac_try) 2>&5
5220 ac_status=$?
5221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5222 (exit $ac_status); }; } &&
5223 { ac_try='test -s conftest.$ac_objext'
5224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5225 (eval $ac_try) 2>&5
5226 ac_status=$?
5227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5228 (exit $ac_status); }; }; then
5229 ac_cv_type_long_long=yes
5230else
5231 echo "$as_me: failed program was:" >&5
5232sed 's/^/| /' conftest.$ac_ext >&5
5233
5234ac_cv_type_long_long=no
5235fi
5236rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5237fi
5238echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5239echo "${ECHO_T}$ac_cv_type_long_long" >&6
5240
5241echo "$as_me:$LINENO: checking size of long long" >&5
5242echo $ECHO_N "checking size of long long... $ECHO_C" >&6
5243if test "${ac_cv_sizeof_long_long+set}" = set; then
5244 echo $ECHO_N "(cached) $ECHO_C" >&6
5245else
5246 if test "$ac_cv_type_long_long" = yes; then
5247 # The cast to unsigned long works around a bug in the HP C Compiler
5248 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5249 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5250 # This bug is HP SR number 8606223364.
5251 if test "$cross_compiling" = yes; then
5252 # Depending upon the size, compute the lo and hi bounds.
5253cat >conftest.$ac_ext <<_ACEOF
5254/* confdefs.h. */
5255_ACEOF
5256cat confdefs.h >>conftest.$ac_ext
5257cat >>conftest.$ac_ext <<_ACEOF
5258/* end confdefs.h. */
5259$ac_includes_default
5260int
5261main ()
5262{
5263static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
5264test_array [0] = 0
5265
5266 ;
5267 return 0;
5268}
5269_ACEOF
5270rm -f conftest.$ac_objext
5271if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5272 (eval $ac_compile) 2>conftest.er1
5273 ac_status=$?
5274 grep -v '^ *+' conftest.er1 >conftest.err
5275 rm -f conftest.er1
5276 cat conftest.err >&5
5277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5278 (exit $ac_status); } &&
ec6c7392
PB
5279 { ac_try='test -z "$ac_c_werror_flag"
5280 || test ! -s conftest.err'
bf3b7cd3
JD
5281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5282 (eval $ac_try) 2>&5
5283 ac_status=$?
5284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5285 (exit $ac_status); }; } &&
5286 { ac_try='test -s conftest.$ac_objext'
5287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5288 (eval $ac_try) 2>&5
5289 ac_status=$?
5290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5291 (exit $ac_status); }; }; then
5292 ac_lo=0 ac_mid=0
5293 while :; do
5294 cat >conftest.$ac_ext <<_ACEOF
5295/* confdefs.h. */
5296_ACEOF
5297cat confdefs.h >>conftest.$ac_ext
5298cat >>conftest.$ac_ext <<_ACEOF
5299/* end confdefs.h. */
5300$ac_includes_default
5301int
5302main ()
5303{
5304static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5305test_array [0] = 0
5306
5307 ;
5308 return 0;
5309}
5310_ACEOF
5311rm -f conftest.$ac_objext
5312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5313 (eval $ac_compile) 2>conftest.er1
5314 ac_status=$?
5315 grep -v '^ *+' conftest.er1 >conftest.err
5316 rm -f conftest.er1
5317 cat conftest.err >&5
5318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5319 (exit $ac_status); } &&
ec6c7392
PB
5320 { ac_try='test -z "$ac_c_werror_flag"
5321 || test ! -s conftest.err'
bf3b7cd3
JD
5322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5323 (eval $ac_try) 2>&5
5324 ac_status=$?
5325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5326 (exit $ac_status); }; } &&
5327 { ac_try='test -s conftest.$ac_objext'
5328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5329 (eval $ac_try) 2>&5
5330 ac_status=$?
5331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5332 (exit $ac_status); }; }; then
5333 ac_hi=$ac_mid; break
5334else
5335 echo "$as_me: failed program was:" >&5
5336sed 's/^/| /' conftest.$ac_ext >&5
5337
5338ac_lo=`expr $ac_mid + 1`
5339 if test $ac_lo -le $ac_mid; then
5340 ac_lo= ac_hi=
5341 break
5342 fi
5343 ac_mid=`expr 2 '*' $ac_mid + 1`
5344fi
5345rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5346 done
5347else
5348 echo "$as_me: failed program was:" >&5
5349sed 's/^/| /' conftest.$ac_ext >&5
5350
5351cat >conftest.$ac_ext <<_ACEOF
5352/* confdefs.h. */
5353_ACEOF
5354cat confdefs.h >>conftest.$ac_ext
5355cat >>conftest.$ac_ext <<_ACEOF
5356/* end confdefs.h. */
5357$ac_includes_default
5358int
5359main ()
5360{
5361static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
5362test_array [0] = 0
5363
5364 ;
5365 return 0;
5366}
5367_ACEOF
5368rm -f conftest.$ac_objext
5369if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5370 (eval $ac_compile) 2>conftest.er1
5371 ac_status=$?
5372 grep -v '^ *+' conftest.er1 >conftest.err
5373 rm -f conftest.er1
5374 cat conftest.err >&5
5375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5376 (exit $ac_status); } &&
ec6c7392
PB
5377 { ac_try='test -z "$ac_c_werror_flag"
5378 || test ! -s conftest.err'
bf3b7cd3
JD
5379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5380 (eval $ac_try) 2>&5
5381 ac_status=$?
5382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5383 (exit $ac_status); }; } &&
5384 { ac_try='test -s conftest.$ac_objext'
5385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5386 (eval $ac_try) 2>&5
5387 ac_status=$?
5388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5389 (exit $ac_status); }; }; then
5390 ac_hi=-1 ac_mid=-1
5391 while :; do
5392 cat >conftest.$ac_ext <<_ACEOF
5393/* confdefs.h. */
5394_ACEOF
5395cat confdefs.h >>conftest.$ac_ext
5396cat >>conftest.$ac_ext <<_ACEOF
5397/* end confdefs.h. */
5398$ac_includes_default
5399int
5400main ()
5401{
5402static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
5403test_array [0] = 0
5404
5405 ;
5406 return 0;
5407}
5408_ACEOF
5409rm -f conftest.$ac_objext
5410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5411 (eval $ac_compile) 2>conftest.er1
5412 ac_status=$?
5413 grep -v '^ *+' conftest.er1 >conftest.err
5414 rm -f conftest.er1
5415 cat conftest.err >&5
5416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5417 (exit $ac_status); } &&
ec6c7392
PB
5418 { ac_try='test -z "$ac_c_werror_flag"
5419 || test ! -s conftest.err'
bf3b7cd3
JD
5420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5421 (eval $ac_try) 2>&5
5422 ac_status=$?
5423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5424 (exit $ac_status); }; } &&
5425 { ac_try='test -s conftest.$ac_objext'
5426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5427 (eval $ac_try) 2>&5
5428 ac_status=$?
5429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5430 (exit $ac_status); }; }; then
5431 ac_lo=$ac_mid; break
5432else
5433 echo "$as_me: failed program was:" >&5
5434sed 's/^/| /' conftest.$ac_ext >&5
5435
5436ac_hi=`expr '(' $ac_mid ')' - 1`
5437 if test $ac_mid -le $ac_hi; then
5438 ac_lo= ac_hi=
5439 break
5440 fi
5441 ac_mid=`expr 2 '*' $ac_mid`
5442fi
5443rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5444 done
5445else
5446 echo "$as_me: failed program was:" >&5
5447sed 's/^/| /' conftest.$ac_ext >&5
5448
5449ac_lo= ac_hi=
5450fi
5451rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5452fi
5453rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5454# Binary search between lo and hi bounds.
5455while test "x$ac_lo" != "x$ac_hi"; do
5456 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5457 cat >conftest.$ac_ext <<_ACEOF
5458/* confdefs.h. */
5459_ACEOF
5460cat confdefs.h >>conftest.$ac_ext
5461cat >>conftest.$ac_ext <<_ACEOF
5462/* end confdefs.h. */
5463$ac_includes_default
5464int
5465main ()
5466{
5467static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5468test_array [0] = 0
5469
5470 ;
5471 return 0;
5472}
5473_ACEOF
5474rm -f conftest.$ac_objext
5475if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5476 (eval $ac_compile) 2>conftest.er1
5477 ac_status=$?
5478 grep -v '^ *+' conftest.er1 >conftest.err
5479 rm -f conftest.er1
5480 cat conftest.err >&5
5481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5482 (exit $ac_status); } &&
ec6c7392
PB
5483 { ac_try='test -z "$ac_c_werror_flag"
5484 || test ! -s conftest.err'
bf3b7cd3
JD
5485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5486 (eval $ac_try) 2>&5
5487 ac_status=$?
5488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5489 (exit $ac_status); }; } &&
5490 { ac_try='test -s conftest.$ac_objext'
5491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5492 (eval $ac_try) 2>&5
5493 ac_status=$?
5494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5495 (exit $ac_status); }; }; then
5496 ac_hi=$ac_mid
5497else
5498 echo "$as_me: failed program was:" >&5
5499sed 's/^/| /' conftest.$ac_ext >&5
5500
5501ac_lo=`expr '(' $ac_mid ')' + 1`
5502fi
5503rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5504done
5505case $ac_lo in
5506?*) ac_cv_sizeof_long_long=$ac_lo;;
5507'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5508See \`config.log' for more details." >&5
5509echo "$as_me: error: cannot compute sizeof (long long), 77
5510See \`config.log' for more details." >&2;}
5511 { (exit 1); exit 1; }; } ;;
5512esac
5513else
5514 if test "$cross_compiling" = yes; then
ec6c7392
PB
5515 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5516See \`config.log' for more details." >&5
5517echo "$as_me: error: cannot run test program while cross compiling
5518See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5519 { (exit 1); exit 1; }; }
5520else
5521 cat >conftest.$ac_ext <<_ACEOF
5522/* confdefs.h. */
5523_ACEOF
5524cat confdefs.h >>conftest.$ac_ext
5525cat >>conftest.$ac_ext <<_ACEOF
5526/* end confdefs.h. */
5527$ac_includes_default
5528long longval () { return (long) (sizeof (long long)); }
5529unsigned long ulongval () { return (long) (sizeof (long long)); }
5530#include <stdio.h>
5531#include <stdlib.h>
5532int
5533main ()
5534{
5535
5536 FILE *f = fopen ("conftest.val", "w");
5537 if (! f)
5538 exit (1);
5539 if (((long) (sizeof (long long))) < 0)
5540 {
5541 long i = longval ();
5542 if (i != ((long) (sizeof (long long))))
5543 exit (1);
5544 fprintf (f, "%ld\n", i);
5545 }
5546 else
5547 {
5548 unsigned long i = ulongval ();
5549 if (i != ((long) (sizeof (long long))))
5550 exit (1);
5551 fprintf (f, "%lu\n", i);
5552 }
5553 exit (ferror (f) || fclose (f) != 0);
5554
5555 ;
5556 return 0;
5557}
5558_ACEOF
5559rm -f conftest$ac_exeext
5560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5561 (eval $ac_link) 2>&5
5562 ac_status=$?
5563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5564 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5566 (eval $ac_try) 2>&5
5567 ac_status=$?
5568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5569 (exit $ac_status); }; }; then
5570 ac_cv_sizeof_long_long=`cat conftest.val`
5571else
5572 echo "$as_me: program exited with status $ac_status" >&5
5573echo "$as_me: failed program was:" >&5
5574sed 's/^/| /' conftest.$ac_ext >&5
5575
5576( exit $ac_status )
5577{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5578See \`config.log' for more details." >&5
5579echo "$as_me: error: cannot compute sizeof (long long), 77
5580See \`config.log' for more details." >&2;}
5581 { (exit 1); exit 1; }; }
5582fi
5583rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5584fi
5585fi
5586rm -f conftest.val
5587else
5588 ac_cv_sizeof_long_long=0
5589fi
5590fi
5591echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5592echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
5593cat >>confdefs.h <<_ACEOF
5594#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5595_ACEOF
5596
5597
5598fi
5ec1c5e6
KC
5599
5600echo "$as_me:$LINENO: checking for __int64" >&5
5601echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5602if test "${ac_cv_type___int64+set}" = set; then
5603 echo $ECHO_N "(cached) $ECHO_C" >&6
5604else
5605 cat >conftest.$ac_ext <<_ACEOF
5606/* confdefs.h. */
5607_ACEOF
5608cat confdefs.h >>conftest.$ac_ext
5609cat >>conftest.$ac_ext <<_ACEOF
5610/* end confdefs.h. */
5611$ac_includes_default
5612int
5613main ()
5614{
5615if ((__int64 *) 0)
5616 return 0;
5617if (sizeof (__int64))
5618 return 0;
5619 ;
5620 return 0;
5621}
5622_ACEOF
5623rm -f conftest.$ac_objext
5624if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5625 (eval $ac_compile) 2>conftest.er1
5626 ac_status=$?
5627 grep -v '^ *+' conftest.er1 >conftest.err
5628 rm -f conftest.er1
5629 cat conftest.err >&5
5630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5631 (exit $ac_status); } &&
ec6c7392
PB
5632 { ac_try='test -z "$ac_c_werror_flag"
5633 || test ! -s conftest.err'
5ec1c5e6
KC
5634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5635 (eval $ac_try) 2>&5
5636 ac_status=$?
5637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5638 (exit $ac_status); }; } &&
5639 { ac_try='test -s conftest.$ac_objext'
5640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5641 (eval $ac_try) 2>&5
5642 ac_status=$?
5643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5644 (exit $ac_status); }; }; then
5645 ac_cv_type___int64=yes
5646else
5647 echo "$as_me: failed program was:" >&5
5648sed 's/^/| /' conftest.$ac_ext >&5
5649
5650ac_cv_type___int64=no
5651fi
5652rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5653fi
5654echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5655echo "${ECHO_T}$ac_cv_type___int64" >&6
5656if test $ac_cv_type___int64 = yes; then
5657
5658cat >>confdefs.h <<_ACEOF
5659#define HAVE___INT64 1
5660_ACEOF
5661
5662echo "$as_me:$LINENO: checking for __int64" >&5
bf3b7cd3
JD
5663echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5664if test "${ac_cv_type___int64+set}" = set; then
5665 echo $ECHO_N "(cached) $ECHO_C" >&6
5666else
ba479fd2 5667 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5668/* confdefs.h. */
5669_ACEOF
5670cat confdefs.h >>conftest.$ac_ext
5671cat >>conftest.$ac_ext <<_ACEOF
5672/* end confdefs.h. */
bf3b7cd3 5673$ac_includes_default
ba479fd2
NN
5674int
5675main ()
5676{
bf3b7cd3
JD
5677if ((__int64 *) 0)
5678 return 0;
5679if (sizeof (__int64))
5680 return 0;
ba479fd2
NN
5681 ;
5682 return 0;
5683}
5684_ACEOF
5685rm -f conftest.$ac_objext
5686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5687 (eval $ac_compile) 2>conftest.er1
ba479fd2 5688 ac_status=$?
86da66b5
HPN
5689 grep -v '^ *+' conftest.er1 >conftest.err
5690 rm -f conftest.er1
5691 cat conftest.err >&5
ba479fd2
NN
5692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5693 (exit $ac_status); } &&
ec6c7392
PB
5694 { ac_try='test -z "$ac_c_werror_flag"
5695 || test ! -s conftest.err'
86da66b5
HPN
5696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5697 (eval $ac_try) 2>&5
5698 ac_status=$?
5699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5700 (exit $ac_status); }; } &&
5701 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5703 (eval $ac_try) 2>&5
5704 ac_status=$?
5705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5706 (exit $ac_status); }; }; then
bf3b7cd3 5707 ac_cv_type___int64=yes
75b6f3fd 5708else
ba479fd2
NN
5709 echo "$as_me: failed program was:" >&5
5710sed 's/^/| /' conftest.$ac_ext >&5
5711
bf3b7cd3 5712ac_cv_type___int64=no
75b6f3fd 5713fi
86da66b5 5714rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5715fi
bf3b7cd3
JD
5716echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5717echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 5718
bf3b7cd3
JD
5719echo "$as_me:$LINENO: checking size of __int64" >&5
5720echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
5721if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 5722 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 5723else
bf3b7cd3
JD
5724 if test "$ac_cv_type___int64" = yes; then
5725 # The cast to unsigned long works around a bug in the HP C Compiler
5726 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5727 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5728 # This bug is HP SR number 8606223364.
5729 if test "$cross_compiling" = yes; then
5730 # Depending upon the size, compute the lo and hi bounds.
5731cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5732/* confdefs.h. */
5733_ACEOF
5734cat confdefs.h >>conftest.$ac_ext
5735cat >>conftest.$ac_ext <<_ACEOF
5736/* end confdefs.h. */
bf3b7cd3 5737$ac_includes_default
ba479fd2
NN
5738int
5739main ()
5740{
bf3b7cd3
JD
5741static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
5742test_array [0] = 0
5743
ba479fd2
NN
5744 ;
5745 return 0;
5746}
5747_ACEOF
5748rm -f conftest.$ac_objext
5749if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5750 (eval $ac_compile) 2>conftest.er1
ba479fd2 5751 ac_status=$?
86da66b5
HPN
5752 grep -v '^ *+' conftest.er1 >conftest.err
5753 rm -f conftest.er1
5754 cat conftest.err >&5
ba479fd2
NN
5755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5756 (exit $ac_status); } &&
ec6c7392
PB
5757 { ac_try='test -z "$ac_c_werror_flag"
5758 || test ! -s conftest.err'
86da66b5
HPN
5759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5760 (eval $ac_try) 2>&5
5761 ac_status=$?
5762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5763 (exit $ac_status); }; } &&
5764 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5766 (eval $ac_try) 2>&5
5767 ac_status=$?
5768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5769 (exit $ac_status); }; }; then
bf3b7cd3
JD
5770 ac_lo=0 ac_mid=0
5771 while :; do
5772 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5773/* confdefs.h. */
5774_ACEOF
5775cat confdefs.h >>conftest.$ac_ext
5776cat >>conftest.$ac_ext <<_ACEOF
5777/* end confdefs.h. */
bf3b7cd3 5778$ac_includes_default
ba479fd2
NN
5779int
5780main ()
5781{
bf3b7cd3
JD
5782static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5783test_array [0] = 0
5784
ba479fd2
NN
5785 ;
5786 return 0;
5787}
5788_ACEOF
5789rm -f conftest.$ac_objext
5790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5791 (eval $ac_compile) 2>conftest.er1
ba479fd2 5792 ac_status=$?
86da66b5
HPN
5793 grep -v '^ *+' conftest.er1 >conftest.err
5794 rm -f conftest.er1
5795 cat conftest.err >&5
ba479fd2
NN
5796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5797 (exit $ac_status); } &&
ec6c7392
PB
5798 { ac_try='test -z "$ac_c_werror_flag"
5799 || test ! -s conftest.err'
86da66b5
HPN
5800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5801 (eval $ac_try) 2>&5
5802 ac_status=$?
5803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5804 (exit $ac_status); }; } &&
5805 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5807 (eval $ac_try) 2>&5
5808 ac_status=$?
5809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5810 (exit $ac_status); }; }; then
bf3b7cd3 5811 ac_hi=$ac_mid; break
75e93faa 5812else
ba479fd2
NN
5813 echo "$as_me: failed program was:" >&5
5814sed 's/^/| /' conftest.$ac_ext >&5
5815
bf3b7cd3
JD
5816ac_lo=`expr $ac_mid + 1`
5817 if test $ac_lo -le $ac_mid; then
5818 ac_lo= ac_hi=
5819 break
5820 fi
5821 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 5822fi
86da66b5 5823rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5824 done
75e93faa 5825else
bf3b7cd3
JD
5826 echo "$as_me: failed program was:" >&5
5827sed 's/^/| /' conftest.$ac_ext >&5
5828
5829cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5830/* confdefs.h. */
5831_ACEOF
5832cat confdefs.h >>conftest.$ac_ext
5833cat >>conftest.$ac_ext <<_ACEOF
5834/* end confdefs.h. */
bf3b7cd3 5835$ac_includes_default
ba479fd2
NN
5836int
5837main ()
5838{
bf3b7cd3
JD
5839static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
5840test_array [0] = 0
5841
ba479fd2
NN
5842 ;
5843 return 0;
5844}
5845_ACEOF
5846rm -f conftest.$ac_objext
5847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5848 (eval $ac_compile) 2>conftest.er1
ba479fd2 5849 ac_status=$?
86da66b5
HPN
5850 grep -v '^ *+' conftest.er1 >conftest.err
5851 rm -f conftest.er1
5852 cat conftest.err >&5
ba479fd2
NN
5853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5854 (exit $ac_status); } &&
ec6c7392
PB
5855 { ac_try='test -z "$ac_c_werror_flag"
5856 || test ! -s conftest.err'
86da66b5
HPN
5857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5858 (eval $ac_try) 2>&5
5859 ac_status=$?
5860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5861 (exit $ac_status); }; } &&
5862 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5864 (eval $ac_try) 2>&5
5865 ac_status=$?
5866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867 (exit $ac_status); }; }; then
bf3b7cd3
JD
5868 ac_hi=-1 ac_mid=-1
5869 while :; do
5870 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5871/* confdefs.h. */
5872_ACEOF
5873cat confdefs.h >>conftest.$ac_ext
5874cat >>conftest.$ac_ext <<_ACEOF
5875/* end confdefs.h. */
bf3b7cd3 5876$ac_includes_default
ba479fd2
NN
5877int
5878main ()
5879{
bf3b7cd3
JD
5880static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
5881test_array [0] = 0
5882
ba479fd2
NN
5883 ;
5884 return 0;
5885}
5886_ACEOF
5887rm -f conftest.$ac_objext
5888if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5889 (eval $ac_compile) 2>conftest.er1
ba479fd2 5890 ac_status=$?
86da66b5
HPN
5891 grep -v '^ *+' conftest.er1 >conftest.err
5892 rm -f conftest.er1
5893 cat conftest.err >&5
ba479fd2
NN
5894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5895 (exit $ac_status); } &&
ec6c7392
PB
5896 { ac_try='test -z "$ac_c_werror_flag"
5897 || test ! -s conftest.err'
86da66b5
HPN
5898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5899 (eval $ac_try) 2>&5
5900 ac_status=$?
5901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5902 (exit $ac_status); }; } &&
5903 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5905 (eval $ac_try) 2>&5
5906 ac_status=$?
5907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5908 (exit $ac_status); }; }; then
bf3b7cd3 5909 ac_lo=$ac_mid; break
04cabffc 5910else
ba479fd2
NN
5911 echo "$as_me: failed program was:" >&5
5912sed 's/^/| /' conftest.$ac_ext >&5
5913
bf3b7cd3
JD
5914ac_hi=`expr '(' $ac_mid ')' - 1`
5915 if test $ac_mid -le $ac_hi; then
5916 ac_lo= ac_hi=
5917 break
5918 fi
5919 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 5920fi
86da66b5 5921rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5922 done
5923else
5924 echo "$as_me: failed program was:" >&5
5925sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 5926
bf3b7cd3 5927ac_lo= ac_hi=
414d23ae 5928fi
bf3b7cd3 5929rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5930fi
bf3b7cd3
JD
5931rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5932# Binary search between lo and hi bounds.
5933while test "x$ac_lo" != "x$ac_hi"; do
5934 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 5935 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5936/* confdefs.h. */
5937_ACEOF
5938cat confdefs.h >>conftest.$ac_ext
5939cat >>conftest.$ac_ext <<_ACEOF
5940/* end confdefs.h. */
bf3b7cd3 5941$ac_includes_default
ba479fd2
NN
5942int
5943main ()
5944{
bf3b7cd3
JD
5945static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5946test_array [0] = 0
5947
ba479fd2
NN
5948 ;
5949 return 0;
5950}
5951_ACEOF
5952rm -f conftest.$ac_objext
5953if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5954 (eval $ac_compile) 2>conftest.er1
ba479fd2 5955 ac_status=$?
86da66b5
HPN
5956 grep -v '^ *+' conftest.er1 >conftest.err
5957 rm -f conftest.er1
5958 cat conftest.err >&5
ba479fd2
NN
5959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5960 (exit $ac_status); } &&
ec6c7392
PB
5961 { ac_try='test -z "$ac_c_werror_flag"
5962 || test ! -s conftest.err'
86da66b5
HPN
5963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5964 (eval $ac_try) 2>&5
5965 ac_status=$?
5966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5967 (exit $ac_status); }; } &&
5968 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5970 (eval $ac_try) 2>&5
5971 ac_status=$?
5972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5973 (exit $ac_status); }; }; then
bf3b7cd3 5974 ac_hi=$ac_mid
75e93faa 5975else
ba479fd2
NN
5976 echo "$as_me: failed program was:" >&5
5977sed 's/^/| /' conftest.$ac_ext >&5
5978
bf3b7cd3 5979ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 5980fi
86da66b5 5981rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5982done
bf3b7cd3
JD
5983case $ac_lo in
5984?*) ac_cv_sizeof___int64=$ac_lo;;
5985'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
5986See \`config.log' for more details." >&5
5987echo "$as_me: error: cannot compute sizeof (__int64), 77
5988See \`config.log' for more details." >&2;}
5989 { (exit 1); exit 1; }; } ;;
5990esac
5991else
5992 if test "$cross_compiling" = yes; then
ec6c7392
PB
5993 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5994See \`config.log' for more details." >&5
5995echo "$as_me: error: cannot run test program while cross compiling
5996See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5997 { (exit 1); exit 1; }; }
5998else
5999 cat >conftest.$ac_ext <<_ACEOF
6000/* confdefs.h. */
6001_ACEOF
6002cat confdefs.h >>conftest.$ac_ext
6003cat >>conftest.$ac_ext <<_ACEOF
6004/* end confdefs.h. */
6005$ac_includes_default
6006long longval () { return (long) (sizeof (__int64)); }
6007unsigned long ulongval () { return (long) (sizeof (__int64)); }
6008#include <stdio.h>
6009#include <stdlib.h>
6010int
6011main ()
6012{
414d23ae 6013
bf3b7cd3
JD
6014 FILE *f = fopen ("conftest.val", "w");
6015 if (! f)
6016 exit (1);
6017 if (((long) (sizeof (__int64))) < 0)
6018 {
6019 long i = longval ();
6020 if (i != ((long) (sizeof (__int64))))
6021 exit (1);
6022 fprintf (f, "%ld\n", i);
6023 }
6024 else
6025 {
6026 unsigned long i = ulongval ();
6027 if (i != ((long) (sizeof (__int64))))
6028 exit (1);
6029 fprintf (f, "%lu\n", i);
6030 }
6031 exit (ferror (f) || fclose (f) != 0);
6032
6033 ;
6034 return 0;
6035}
6036_ACEOF
6037rm -f conftest$ac_exeext
6038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6039 (eval $ac_link) 2>&5
6040 ac_status=$?
6041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6044 (eval $ac_try) 2>&5
6045 ac_status=$?
6046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6047 (exit $ac_status); }; }; then
6048 ac_cv_sizeof___int64=`cat conftest.val`
6049else
6050 echo "$as_me: program exited with status $ac_status" >&5
6051echo "$as_me: failed program was:" >&5
6052sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6053
bf3b7cd3
JD
6054( exit $ac_status )
6055{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
6056See \`config.log' for more details." >&5
6057echo "$as_me: error: cannot compute sizeof (__int64), 77
6058See \`config.log' for more details." >&2;}
ba479fd2 6059 { (exit 1); exit 1; }; }
414d23ae 6060fi
bf3b7cd3
JD
6061rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6062fi
6063fi
6064rm -f conftest.val
6065else
6066 ac_cv_sizeof___int64=0
6067fi
6068fi
ba479fd2
NN
6069echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6070echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 6071cat >>confdefs.h <<_ACEOF
414d23ae 6072#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6073_ACEOF
414d23ae 6074
cafe096b 6075
414d23ae
HPN
6076fi
6077
5ec1c5e6 6078
34a86c2b
NN
6079# ---------------------
6080# Warnings and checking
6081# ---------------------
6082
b5472e1d
NN
6083# Check $CC warning features (if it's GCC).
6084# We want to use -pedantic, but we don't want warnings about
6085# * 'long long'
6086# * variadic macros
89a42ac8 6087# * overlong strings
b5472e1d
NN
6088# So, we only use -pedantic if we can disable those warnings.
6089
6090echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6091echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
6092if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6093 echo $ECHO_N "(cached) $ECHO_C" >&6
6094else
6095 save_CFLAGS="$CFLAGS"
6096 CFLAGS="-Wno-long-long"
6097 cat >conftest.$ac_ext <<_ACEOF
6098/* confdefs.h. */
6099_ACEOF
6100cat confdefs.h >>conftest.$ac_ext
6101cat >>conftest.$ac_ext <<_ACEOF
6102/* end confdefs.h. */
6103
6104_ACEOF
6105rm -f conftest.$ac_objext
6106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6107 (eval $ac_compile) 2>conftest.er1
6108 ac_status=$?
6109 grep -v '^ *+' conftest.er1 >conftest.err
6110 rm -f conftest.er1
6111 cat conftest.err >&5
6112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6113 (exit $ac_status); } &&
ec6c7392
PB
6114 { ac_try='test -z "$ac_c_werror_flag"
6115 || test ! -s conftest.err'
b5472e1d
NN
6116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6117 (eval $ac_try) 2>&5
6118 ac_status=$?
6119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6120 (exit $ac_status); }; } &&
6121 { ac_try='test -s conftest.$ac_objext'
6122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6123 (eval $ac_try) 2>&5
6124 ac_status=$?
6125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6126 (exit $ac_status); }; }; then
6127 ac_cv_prog_cc_w_no_long_long=yes
6128else
6129 echo "$as_me: failed program was:" >&5
6130sed 's/^/| /' conftest.$ac_ext >&5
6131
6132ac_cv_prog_cc_w_no_long_long=no
6133fi
6134rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6135 CFLAGS="$save_CFLAGS"
6136
6137fi
6138echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6139echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
6140
6141echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6142echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
6143if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6144 echo $ECHO_N "(cached) $ECHO_C" >&6
6145else
6146 save_CFLAGS="$CFLAGS"
6147 CFLAGS="-Wno-variadic-macros"
6148 cat >conftest.$ac_ext <<_ACEOF
6149/* confdefs.h. */
6150_ACEOF
6151cat confdefs.h >>conftest.$ac_ext
6152cat >>conftest.$ac_ext <<_ACEOF
6153/* end confdefs.h. */
6154
6155_ACEOF
6156rm -f conftest.$ac_objext
6157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6158 (eval $ac_compile) 2>conftest.er1
6159 ac_status=$?
6160 grep -v '^ *+' conftest.er1 >conftest.err
6161 rm -f conftest.er1
6162 cat conftest.err >&5
6163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6164 (exit $ac_status); } &&
ec6c7392
PB
6165 { ac_try='test -z "$ac_c_werror_flag"
6166 || test ! -s conftest.err'
b5472e1d
NN
6167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6168 (eval $ac_try) 2>&5
6169 ac_status=$?
6170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6171 (exit $ac_status); }; } &&
6172 { ac_try='test -s conftest.$ac_objext'
6173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6174 (eval $ac_try) 2>&5
6175 ac_status=$?
6176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6177 (exit $ac_status); }; }; then
6178 ac_cv_prog_cc_w_no_variadic_macros=yes
6179else
6180 echo "$as_me: failed program was:" >&5
6181sed 's/^/| /' conftest.$ac_ext >&5
6182
6183ac_cv_prog_cc_w_no_variadic_macros=no
6184fi
6185rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6186 CFLAGS="$save_CFLAGS"
6187
6188fi
6189echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6190echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
6191
89a42ac8
ZW
6192echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5
6193echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6
6194if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then
6195 echo $ECHO_N "(cached) $ECHO_C" >&6
6196else
6197 save_CFLAGS="$CFLAGS"
6198 CFLAGS="-Wno-overlength-strings"
6199 cat >conftest.$ac_ext <<_ACEOF
6200/* confdefs.h. */
6201_ACEOF
6202cat confdefs.h >>conftest.$ac_ext
6203cat >>conftest.$ac_ext <<_ACEOF
6204/* end confdefs.h. */
6205
6206_ACEOF
6207rm -f conftest.$ac_objext
6208if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6209 (eval $ac_compile) 2>conftest.er1
6210 ac_status=$?
6211 grep -v '^ *+' conftest.er1 >conftest.err
6212 rm -f conftest.er1
6213 cat conftest.err >&5
6214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6215 (exit $ac_status); } &&
ec6c7392
PB
6216 { ac_try='test -z "$ac_c_werror_flag"
6217 || test ! -s conftest.err'
89a42ac8
ZW
6218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6219 (eval $ac_try) 2>&5
6220 ac_status=$?
6221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6222 (exit $ac_status); }; } &&
6223 { ac_try='test -s conftest.$ac_objext'
6224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6225 (eval $ac_try) 2>&5
6226 ac_status=$?
6227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6228 (exit $ac_status); }; }; then
6229 ac_cv_prog_cc_w_no_overlength_strings=yes
6230else
6231 echo "$as_me: failed program was:" >&5
6232sed 's/^/| /' conftest.$ac_ext >&5
6233
6234ac_cv_prog_cc_w_no_overlength_strings=no
6235fi
6236rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6237 CFLAGS="$save_CFLAGS"
6238
6239fi
6240echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5
6241echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6
6242
34a86c2b 6243strict1_warn=
b5472e1d 6244if test $ac_cv_prog_cc_w_no_long_long = yes \
89a42ac8
ZW
6245 && test $ac_cv_prog_cc_w_no_variadic_macros = yes \
6246 && test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then
6247 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
34a86c2b
NN
6248fi
6249
643d3bd2
NN
6250# Add -Wold-style-definition if it's accepted
6251echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6252echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
6253if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6254 echo $ECHO_N "(cached) $ECHO_C" >&6
6255else
6256 save_CFLAGS="$CFLAGS"
6257 CFLAGS="-Wold-style-definition"
6258 cat >conftest.$ac_ext <<_ACEOF
6259/* confdefs.h. */
6260_ACEOF
6261cat confdefs.h >>conftest.$ac_ext
6262cat >>conftest.$ac_ext <<_ACEOF
6263/* end confdefs.h. */
6264
6265_ACEOF
6266rm -f conftest.$ac_objext
6267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6268 (eval $ac_compile) 2>conftest.er1
6269 ac_status=$?
6270 grep -v '^ *+' conftest.er1 >conftest.err
6271 rm -f conftest.er1
6272 cat conftest.err >&5
6273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6274 (exit $ac_status); } &&
ec6c7392
PB
6275 { ac_try='test -z "$ac_c_werror_flag"
6276 || test ! -s conftest.err'
643d3bd2
NN
6277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6278 (eval $ac_try) 2>&5
6279 ac_status=$?
6280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6281 (exit $ac_status); }; } &&
6282 { ac_try='test -s conftest.$ac_objext'
6283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6284 (eval $ac_try) 2>&5
6285 ac_status=$?
6286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6287 (exit $ac_status); }; }; then
6288 ac_cv_prog_cc_w_old_style_definition=yes
6289else
6290 echo "$as_me: failed program was:" >&5
6291sed 's/^/| /' conftest.$ac_ext >&5
6292
6293ac_cv_prog_cc_w_old_style_definition=no
6294fi
6295rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6296 CFLAGS="$save_CFLAGS"
6297
6298fi
6299echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
6300echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
6301if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
6302 strict1_warn="${strict1_warn} -Wold-style-definition"
6303fi
6304
ac0f3f39
KG
6305# Add -Wmissing-format-attribute if it's accepted
6306echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5
6307echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6
6308if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then
6309 echo $ECHO_N "(cached) $ECHO_C" >&6
6310else
6311 save_CFLAGS="$CFLAGS"
6312 CFLAGS="-Wmissing-format-attribute"
6313 cat >conftest.$ac_ext <<_ACEOF
6314/* confdefs.h. */
6315_ACEOF
6316cat confdefs.h >>conftest.$ac_ext
6317cat >>conftest.$ac_ext <<_ACEOF
6318/* end confdefs.h. */
6319
6320_ACEOF
6321rm -f conftest.$ac_objext
6322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6323 (eval $ac_compile) 2>conftest.er1
6324 ac_status=$?
6325 grep -v '^ *+' conftest.er1 >conftest.err
6326 rm -f conftest.er1
6327 cat conftest.err >&5
6328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6329 (exit $ac_status); } &&
ec6c7392
PB
6330 { ac_try='test -z "$ac_c_werror_flag"
6331 || test ! -s conftest.err'
ac0f3f39
KG
6332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6333 (eval $ac_try) 2>&5
6334 ac_status=$?
6335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6336 (exit $ac_status); }; } &&
6337 { ac_try='test -s conftest.$ac_objext'
6338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6339 (eval $ac_try) 2>&5
6340 ac_status=$?
6341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6342 (exit $ac_status); }; }; then
6343 ac_cv_prog_cc_w_missing_format_attribute=yes
6344else
6345 echo "$as_me: failed program was:" >&5
6346sed 's/^/| /' conftest.$ac_ext >&5
6347
6348ac_cv_prog_cc_w_missing_format_attribute=no
6349fi
6350rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6351 CFLAGS="$save_CFLAGS"
6352
6353fi
6354echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5
6355echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6
6356if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then
6357 strict1_warn="${strict1_warn} -Wmissing-format-attribute"
6358fi
6359
09a9c095
NN
6360# Enable -Werror, period.
6361# Check whether --enable-werror_always or --disable-werror_always was given.
6362if test "${enable_werror_always+set}" = set; then
6363 enableval="$enable_werror_always"
6364
6365else
6366 enable_werror_always=no
6367fi;
6368if test x${enable_werror_always} = xyes ; then
6369 strict1_warn="${strict1_warn} -Werror"
6370 WERROR=-Werror
6371fi
6372
ac0f3f39
KG
6373
6374
373477bb
GDR
6375# Get C++ compatibility warning flag, if supported.
6376echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5
6377echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6
6378if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then
6379 echo $ECHO_N "(cached) $ECHO_C" >&6
6380else
6381 save_CFLAGS="$CFLAGS"
6382 CFLAGS="-Wc++-compat"
6383 cat >conftest.$ac_ext <<_ACEOF
6384/* confdefs.h. */
6385_ACEOF
6386cat confdefs.h >>conftest.$ac_ext
6387cat >>conftest.$ac_ext <<_ACEOF
6388/* end confdefs.h. */
6389
6390_ACEOF
6391rm -f conftest.$ac_objext
6392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6393 (eval $ac_compile) 2>conftest.er1
6394 ac_status=$?
6395 grep -v '^ *+' conftest.er1 >conftest.err
6396 rm -f conftest.er1
6397 cat conftest.err >&5
6398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6399 (exit $ac_status); } &&
ec6c7392
PB
6400 { ac_try='test -z "$ac_c_werror_flag"
6401 || test ! -s conftest.err'
373477bb
GDR
6402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6403 (eval $ac_try) 2>&5
6404 ac_status=$?
6405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6406 (exit $ac_status); }; } &&
6407 { ac_try='test -s conftest.$ac_objext'
6408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6409 (eval $ac_try) 2>&5
6410 ac_status=$?
6411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6412 (exit $ac_status); }; }; then
6413 ac_cv_prog_cc_w_cxx_compat=yes
6414else
6415 echo "$as_me: failed program was:" >&5
6416sed 's/^/| /' conftest.$ac_ext >&5
6417
6418ac_cv_prog_cc_w_cxx_compat=no
6419fi
6420rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6421 CFLAGS="$save_CFLAGS"
6422
6423fi
6424echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5
6425echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6
6426if test x${ac_cv_prog_cc_w_cxx_compat} = xyes; then
6427 cxx_compat_warn="-Wc++-compat"
6428fi
6429
6430
6431
ba479fd2 6432# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
6433# That's useful for people building cross-compilers, or just running a
6434# quick `make'.
6435warn_cflags=
6436if test "x$GCC" = "xyes"; then
6437 warn_cflags='$(GCC_WARN_CFLAGS)'
6438fi
6439
6440
dd859b8a 6441# Enable -Werror in bootstrap stage2 and later.
a1286ef5
ZW
6442is_release=
6443if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6444 is_release=yes
6445fi
dd859b8a
KG
6446# Check whether --enable-werror or --disable-werror was given.
6447if test "${enable_werror+set}" = set; then
6448 enableval="$enable_werror"
ba479fd2 6449
dd859b8a 6450else
06c37c96
NS
6451 if test x$is_release = x ; then
6452 # Default to "yes" on development branches.
dd859b8a 6453 enable_werror=yes
06c37c96
NS
6454else
6455 # Default to "no" on release branches.
6456 enable_werror=no
6457fi
ba479fd2 6458fi;
dd859b8a
KG
6459if test x$enable_werror = xyes ; then
6460 WERROR=-Werror
6461fi
6462
6463
414d23ae
HPN
6464# Enable expensive internal checks
6465# Check whether --enable-checking or --disable-checking was given.
6466if test "${enable_checking+set}" = set; then
6467 enableval="$enable_checking"
e1bbfc5c
NS
6468 ac_checking_flags="${enableval}"
6469else
6470
6471# Determine the default checks.
6472if test x$is_release = x ; then
6473 ac_checking_flags=yes
6474else
6475 ac_checking_flags=release
6476fi
6477fi;
6478ac_assert_checking=1
6479ac_checking=
cdce5c16
NS
6480ac_fold_checking=
6481ac_gc_checking=
6482ac_gc_always_collect=
414d23ae
HPN
6483ac_rtl_checking=
6484ac_rtlflag_checking=
b53ef395 6485ac_runtime_checking=1
cdce5c16
NS
6486ac_tree_checking=
6487ac_valgrind_checking=
e1bbfc5c
NS
6488IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6489for check in $ac_checking_flags
6490do
6491 case $check in
cdce5c16 6492 # these set all the flags to specific states
e1bbfc5c 6493 yes) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6494 ac_fold_checking= ; ac_gc_checking=1 ;
6495 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6496 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
cdce5c16
NS
6497 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6498 no|none) ac_assert_checking= ; ac_checking= ;
6499 ac_fold_checking= ; ac_gc_checking= ;
6500 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6501 ac_rtlflag_checking= ; ac_runtime_checking= ;
cdce5c16 6502 ac_tree_checking= ; ac_valgrind_checking= ;;
e1bbfc5c 6503 all) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6504 ac_fold_checking=1 ; ac_gc_checking=1 ;
6505 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
6506 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6507 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6508 release) ac_assert_checking=1 ; ac_checking= ;
6509 ac_fold_checking= ; ac_gc_checking= ;
6510 ac_gc_always_collect= ; ac_rtl_checking= ;
6511 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6512 ac_tree_checking= ; ac_valgrind_checking= ;;
6513 # these enable particular checks
e1bbfc5c
NS
6514 assert) ac_assert_checking=1 ;;
6515 fold) ac_fold_checking=1 ;;
6516 gc) ac_gc_checking=1 ;;
6517 gcac) ac_gc_always_collect=1 ;;
6518 misc) ac_checking=1 ;;
e1bbfc5c 6519 rtl) ac_rtl_checking=1 ;;
cdce5c16 6520 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 6521 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 6522 tree) ac_tree_checking=1 ;;
cdce5c16 6523 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 6524 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
6525echo "$as_me: error: unknown check category $check" >&2;}
6526 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
6527 esac
6528done
6529IFS="$ac_save_IFS"
06c37c96 6530
ba479fd2
NN
6531nocommon_flag=""
6532if test x$ac_checking != x ; then
6533
6534cat >>confdefs.h <<\_ACEOF
6535#define ENABLE_CHECKING 1
6536_ACEOF
6537
6538 nocommon_flag=-fno-common
6539fi
6540
06c37c96
NS
6541if test x$ac_assert_checking != x ; then
6542
6543cat >>confdefs.h <<\_ACEOF
6544#define ENABLE_ASSERT_CHECKING 1
6545_ACEOF
6546
b53ef395 6547fi
232b67d9 6548
b53ef395
NS
6549if test x$ac_runtime_checking != x ; then
6550
6551cat >>confdefs.h <<\_ACEOF
6552#define ENABLE_RUNTIME_CHECKING 1
6553_ACEOF
6554
06c37c96 6555fi
ba479fd2
NN
6556if test x$ac_tree_checking != x ; then
6557
6558cat >>confdefs.h <<\_ACEOF
6559#define ENABLE_TREE_CHECKING 1
6560_ACEOF
6561
13f05fd0 6562 TREEBROWSER=tree-browser.o
ba479fd2 6563fi
13f05fd0 6564
ba479fd2
NN
6565if test x$ac_rtl_checking != x ; then
6566
6567cat >>confdefs.h <<\_ACEOF
6568#define ENABLE_RTL_CHECKING 1
6569_ACEOF
6570
6571fi
6572if test x$ac_rtlflag_checking != x ; then
6573
6574cat >>confdefs.h <<\_ACEOF
6575#define ENABLE_RTL_FLAG_CHECKING 1
6576_ACEOF
6577
6578fi
6579if test x$ac_gc_checking != x ; then
6580
6581cat >>confdefs.h <<\_ACEOF
6582#define ENABLE_GC_CHECKING 1
6583_ACEOF
6584
6585fi
6586if test x$ac_gc_always_collect != x ; then
6587
6588cat >>confdefs.h <<\_ACEOF
6589#define ENABLE_GC_ALWAYS_COLLECT 1
6590_ACEOF
6591
6592fi
6593if test x$ac_fold_checking != x ; then
6594
6595cat >>confdefs.h <<\_ACEOF
6596#define ENABLE_FOLD_CHECKING 1
6597_ACEOF
6598
6599fi
6600valgrind_path_defines=
6601valgrind_command=
6602
ba479fd2
NN
6603if test "${ac_cv_header_valgrind_h+set}" = set; then
6604 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6605echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6606if test "${ac_cv_header_valgrind_h+set}" = set; then
6607 echo $ECHO_N "(cached) $ECHO_C" >&6
6608fi
6609echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6610echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6611else
6612 # Is the header compilable?
6613echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6614echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
6615cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6616/* confdefs.h. */
6617_ACEOF
6618cat confdefs.h >>conftest.$ac_ext
6619cat >>conftest.$ac_ext <<_ACEOF
6620/* end confdefs.h. */
6621$ac_includes_default
63cf211a 6622#include <valgrind.h>
ba479fd2
NN
6623_ACEOF
6624rm -f conftest.$ac_objext
6625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6626 (eval $ac_compile) 2>conftest.er1
ba479fd2 6627 ac_status=$?
86da66b5
HPN
6628 grep -v '^ *+' conftest.er1 >conftest.err
6629 rm -f conftest.er1
6630 cat conftest.err >&5
ba479fd2
NN
6631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6632 (exit $ac_status); } &&
ec6c7392
PB
6633 { ac_try='test -z "$ac_c_werror_flag"
6634 || test ! -s conftest.err'
86da66b5
HPN
6635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6636 (eval $ac_try) 2>&5
6637 ac_status=$?
6638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6639 (exit $ac_status); }; } &&
6640 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6642 (eval $ac_try) 2>&5
6643 ac_status=$?
6644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6645 (exit $ac_status); }; }; then
6646 ac_header_compiler=yes
6647else
6648 echo "$as_me: failed program was:" >&5
6649sed 's/^/| /' conftest.$ac_ext >&5
6650
6651ac_header_compiler=no
6652fi
86da66b5 6653rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
6654echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6655echo "${ECHO_T}$ac_header_compiler" >&6
6656
6657# Is the header present?
6658echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6659echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
6660cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6661/* confdefs.h. */
6662_ACEOF
6663cat confdefs.h >>conftest.$ac_ext
6664cat >>conftest.$ac_ext <<_ACEOF
6665/* end confdefs.h. */
6666#include <valgrind.h>
6667_ACEOF
6668if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6669 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6670 ac_status=$?
6671 grep -v '^ *+' conftest.er1 >conftest.err
6672 rm -f conftest.er1
6673 cat conftest.err >&5
6674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6675 (exit $ac_status); } >/dev/null; then
6676 if test -s conftest.err; then
6677 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6678 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6679 else
6680 ac_cpp_err=
6681 fi
6682else
6683 ac_cpp_err=yes
6684fi
6685if test -z "$ac_cpp_err"; then
6686 ac_header_preproc=yes
6687else
6688 echo "$as_me: failed program was:" >&5
6689sed 's/^/| /' conftest.$ac_ext >&5
6690
6691 ac_header_preproc=no
6692fi
6693rm -f conftest.err conftest.$ac_ext
6694echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6695echo "${ECHO_T}$ac_header_preproc" >&6
6696
6697# So? What about this header?
86da66b5
HPN
6698case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6699 yes:no: )
ba479fd2
NN
6700 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6701echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
6702 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6703echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6704 ac_header_preproc=yes
ba479fd2 6705 ;;
86da66b5 6706 no:yes:* )
ba479fd2
NN
6707 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6708echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
6709 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6710echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6711 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6712echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6713 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6714echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
6715 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6716echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
6717 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6718echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
ba479fd2
NN
6719 (
6720 cat <<\_ASBOX
86da66b5
HPN
6721## ------------------------------------------ ##
6722## Report this to the AC_PACKAGE_NAME lists. ##
6723## ------------------------------------------ ##
ba479fd2
NN
6724_ASBOX
6725 ) |
6726 sed "s/^/$as_me: WARNING: /" >&2
6727 ;;
6728esac
6729echo "$as_me:$LINENO: checking for valgrind.h" >&5
6730echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6731if test "${ac_cv_header_valgrind_h+set}" = set; then
6732 echo $ECHO_N "(cached) $ECHO_C" >&6
6733else
6734 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 6735fi
ba479fd2
NN
6736echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6737echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6738
6e3f3080 6739fi
ba479fd2 6740if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
6741 have_valgrind_h=yes
6742else
ba479fd2 6743 have_valgrind_h=no
6938ec6c
NN
6744fi
6745
6746
ba479fd2 6747
cdce5c16 6748if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
6749 # It is certainly possible that there's valgrind but no valgrind.h.
6750 # GCC relies on making annotations so we must have both.
ba479fd2
NN
6751 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6752echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
6753 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6754/* confdefs.h. */
6755_ACEOF
6756cat confdefs.h >>conftest.$ac_ext
6757cat >>conftest.$ac_ext <<_ACEOF
6758/* end confdefs.h. */
a207b594 6759#include <valgrind/memcheck.h>
14011ca4
AJ
6760#ifndef VALGRIND_DISCARD
6761#error VALGRIND_DISCARD not defined
6762#endif
ba479fd2
NN
6763_ACEOF
6764if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6765 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6766 ac_status=$?
6767 grep -v '^ *+' conftest.er1 >conftest.err
6768 rm -f conftest.er1
6769 cat conftest.err >&5
6770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6771 (exit $ac_status); } >/dev/null; then
6772 if test -s conftest.err; then
6773 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6774 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6775 else
6776 ac_cpp_err=
6777 fi
6778else
6779 ac_cpp_err=yes
6780fi
6781if test -z "$ac_cpp_err"; then
a207b594
HPN
6782 gcc_cv_header_valgrind_memcheck_h=yes
6783else
ba479fd2
NN
6784 echo "$as_me: failed program was:" >&5
6785sed 's/^/| /' conftest.$ac_ext >&5
6786
a207b594
HPN
6787 gcc_cv_header_valgrind_memcheck_h=no
6788fi
ba479fd2
NN
6789rm -f conftest.err conftest.$ac_ext
6790 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6791echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6792 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6793echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
6794 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6795/* confdefs.h. */
6796_ACEOF
6797cat confdefs.h >>conftest.$ac_ext
6798cat >>conftest.$ac_ext <<_ACEOF
6799/* end confdefs.h. */
a207b594
HPN
6800#include <memcheck.h>
6801#ifndef VALGRIND_DISCARD
6802#error VALGRIND_DISCARD not defined
6803#endif
ba479fd2
NN
6804_ACEOF
6805if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6806 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6807 ac_status=$?
6808 grep -v '^ *+' conftest.er1 >conftest.err
6809 rm -f conftest.er1
6810 cat conftest.err >&5
6811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6812 (exit $ac_status); } >/dev/null; then
6813 if test -s conftest.err; then
6814 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6815 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6816 else
6817 ac_cpp_err=
6818 fi
6819else
6820 ac_cpp_err=yes
6821fi
6822if test -z "$ac_cpp_err"; then
14011ca4
AJ
6823 gcc_cv_header_memcheck_h=yes
6824else
ba479fd2
NN
6825 echo "$as_me: failed program was:" >&5
6826sed 's/^/| /' conftest.$ac_ext >&5
6827
cafe096b
EC
6828 gcc_cv_header_memcheck_h=no
6829fi
ba479fd2
NN
6830rm -f conftest.err conftest.$ac_ext
6831 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6832echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
6833
56694dd9
ZW
6834# Prepare PATH_SEPARATOR.
6835# The user is always right.
6836if test "${PATH_SEPARATOR+set}" != set; then
6837 echo "#! /bin/sh" >conf$$.sh
6838 echo "exit 0" >>conf$$.sh
6839 chmod +x conf$$.sh
6840 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6841 PATH_SEPARATOR=';'
6842 else
6843 PATH_SEPARATOR=:
6844 fi
6845 rm -f conf$$.sh
6846fi
6847
6848# Find out how to test for executable files. Don't use a zero-byte file,
6849# as systems may use methods other than mode bits to determine executability.
6850cat >conf$$.file <<_ASEOF
6851#! /bin/sh
6852exit 0
6853_ASEOF
6854chmod +x conf$$.file
6855if test -x conf$$.file >/dev/null 2>&1; then
6856 ac_executable_p="test -x"
6857else
6858 ac_executable_p="test -f"
6859fi
6860rm -f conf$$.file
6861
6862# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 6863set dummy valgrind; ac_word=$2
ba479fd2
NN
6864echo "$as_me:$LINENO: checking for $ac_word" >&5
6865echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6866if test "${ac_cv_path_valgrind_path+set}" = set; then
6867 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
6868else
6869 case "$valgrind_path" in
56694dd9
ZW
6870 [\\/]* | ?:[\\/]*)
6871 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6872 ;;
414d23ae 6873 *)
56694dd9
ZW
6874 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6875 for ac_dir in $PATH; do
6876 IFS="$ac_save_IFS"
6877 test -z "$ac_dir" && ac_dir=.
6878 for ac_exec_ext in '' $ac_executable_extensions; do
6879 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6880 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6881 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6882 break 2
6883 fi
6884 fi
6885 done
6886 done
6887 IFS="$ac_save_IFS"
6888 ;;
414d23ae 6889esac
75e93faa 6890fi
414d23ae
HPN
6891valgrind_path="$ac_cv_path_valgrind_path"
6892if test -n "$valgrind_path"; then
ba479fd2
NN
6893 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6894echo "${ECHO_T}$valgrind_path" >&6
414d23ae 6895else
ba479fd2
NN
6896 echo "$as_me:$LINENO: result: no" >&5
6897echo "${ECHO_T}no" >&6
414d23ae
HPN
6898fi
6899
a207b594
HPN
6900 if test "x$valgrind_path" = "x" \
6901 || (test $have_valgrind_h = no \
6902 && test $gcc_cv_header_memcheck_h = no \
6903 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
6904 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6905echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6906 { (exit 1); exit 1; }; }
414d23ae
HPN
6907 fi
6908 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6909 valgrind_command="$valgrind_path -q"
ba479fd2
NN
6910
6911cat >>confdefs.h <<\_ACEOF
414d23ae 6912#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 6913_ACEOF
75e93faa 6914
a207b594 6915 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
6916
6917cat >>confdefs.h <<\_ACEOF
a207b594 6918#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 6919_ACEOF
a207b594
HPN
6920
6921 fi
14011ca4 6922 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
6923
6924cat >>confdefs.h <<\_ACEOF
14011ca4 6925#define HAVE_MEMCHECK_H 1
ba479fd2 6926_ACEOF
14011ca4
AJ
6927
6928 fi
414d23ae 6929fi
75e93faa 6930
75e93faa
ZW
6931
6932
74ee1642
PB
6933# Check whether --enable-mapped-location or --disable-mapped-location was given.
6934if test "${enable_mapped_location+set}" = set; then
6935 enableval="$enable_mapped_location"
6936
6937else
6938 enable_mapped_location=no
6939fi;
6940
6941if test "$enable_mapped_location" = yes ; then
6942
6943cat >>confdefs.h <<\_ACEOF
6944#define USE_MAPPED_LOCATION 1
6945_ACEOF
6946
6947fi
6948
414d23ae
HPN
6949# Enable code coverage collection
6950# Check whether --enable-coverage or --disable-coverage was given.
6951if test "${enable_coverage+set}" = set; then
6952 enableval="$enable_coverage"
6953 case "${enableval}" in
6dd297da
NN
6954 yes|noopt)
6955 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6956 ;;
6957 opt)
6958 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6959 ;;
6960 no)
6961 # a.k.a. --disable-coverage
6962 coverage_flags=""
6963 ;;
6964 *)
6965 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
6966echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6967 { (exit 1); exit 1; }; }
6dd297da 6968 ;;
414d23ae 6969esac
75e93faa 6970else
414d23ae 6971 coverage_flags=""
ba479fd2 6972fi;
5c3bc9fb 6973
414d23ae 6974
439a7e54
DN
6975# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
6976if test "${enable_gather_detailed_mem_stats+set}" = set; then
6977 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 6978
439a7e54
DN
6979else
6980 enable_gather_detailed_mem_stats=no
ba479fd2 6981fi;
439a7e54 6982if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
6983
6984cat >>confdefs.h <<\_ACEOF
439a7e54 6985#define GATHER_STATISTICS 1
ba479fd2 6986_ACEOF
439a7e54
DN
6987
6988fi
6989
73458fb7
NN
6990# -------------------------------
6991# Miscenalleous configure options
6992# -------------------------------
34a86c2b
NN
6993
6994# With stabs
ba479fd2 6995
34a86c2b
NN
6996# Check whether --with-stabs or --without-stabs was given.
6997if test "${with_stabs+set}" = set; then
6998 withval="$with_stabs"
6999 stabs="$with_stabs"
7000else
7001 stabs=no
ba479fd2 7002fi;
cafe096b 7003
34a86c2b
NN
7004# Determine whether or not multilibs are enabled.
7005# Check whether --enable-multilib or --disable-multilib was given.
7006if test "${enable_multilib+set}" = set; then
7007 enableval="$enable_multilib"
ba479fd2 7008
34a86c2b
NN
7009else
7010 enable_multilib=yes
ba479fd2 7011fi;
75e93faa 7012
34a86c2b 7013
414d23ae
HPN
7014# Enable __cxa_atexit for C++.
7015# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
7016if test "${enable___cxa_atexit+set}" = set; then
7017 enableval="$enable___cxa_atexit"
75e93faa 7018
ba479fd2 7019fi;
75e93faa 7020
486aa804
BE
7021# Enable C extension for decimal float if target supports it.
7022# Check whether --enable-decimal-float or --disable-decimal-float was given.
7023if test "${enable_decimal_float+set}" = set; then
7024 enableval="$enable_decimal_float"
7025
7026 if test x$enablevar = xyes ; then
7027 case $target in
7028 powerpc*-*-linux* | i?86*-*-linux*)
a4a9df5f 7029 enable_decimal_float=yes
486aa804
BE
7030 ;;
7031 *)
7032 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
7033echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
7034 enable_decimal_float=no
7035 ;;
7036 esac
7037 fi
7038
7039else
a4a9df5f 7040 enable_decimal_float=no
486aa804
BE
7041fi;
7042
7043
7044
7045dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi`
7046
7047cat >>confdefs.h <<_ACEOF
7048#define ENABLE_DECIMAL_FLOAT $dfp
7049_ACEOF
7050
7051
414d23ae
HPN
7052# Enable threads
7053# Pass with no value to take the default
7054# Pass with a value to specify a thread package
7055# Check whether --enable-threads or --disable-threads was given.
7056if test "${enable_threads+set}" = set; then
7057 enableval="$enable_threads"
ba479fd2 7058
414d23ae
HPN
7059else
7060 enable_threads=''
ba479fd2 7061fi;
414d23ae 7062
8dea1cca
DD
7063# Check whether --enable-tls or --disable-tls was given.
7064if test "${enable_tls+set}" = set; then
7065 enableval="$enable_tls"
7066
7067 case $enable_tls in
7068 yes | no) ;;
7069 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
7070Valid choices are 'yes' and 'no'." >&5
7071echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
7072Valid choices are 'yes' and 'no'." >&2;}
7073 { (exit 1); exit 1; }; } ;;
7074 esac
7075
7076else
7077 enable_tls=''
7078fi;
7079
414d23ae
HPN
7080# Check whether --enable-objc-gc or --disable-objc-gc was given.
7081if test "${enable_objc_gc+set}" = set; then
7082 enableval="$enable_objc_gc"
7083 if test x$enable_objc_gc = xno; then
7084 objc_boehm_gc=''
7085else
7086 objc_boehm_gc=1
7087fi
7088else
7089 objc_boehm_gc=''
ba479fd2 7090fi;
75e93faa
ZW
7091
7092
414d23ae
HPN
7093# Check whether --with-dwarf2 or --without-dwarf2 was given.
7094if test "${with_dwarf2+set}" = set; then
7095 withval="$with_dwarf2"
7096 dwarf2="$with_dwarf2"
75e93faa 7097else
414d23ae 7098 dwarf2=no
ba479fd2 7099fi;
75e93faa 7100
414d23ae
HPN
7101# Check whether --enable-shared or --disable-shared was given.
7102if test "${enable_shared+set}" = set; then
7103 enableval="$enable_shared"
ba479fd2 7104
414d23ae
HPN
7105 case $enable_shared in
7106 yes | no) ;;
7107 *)
7108 enable_shared=no
7109 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
7110 for pkg in $enableval; do
7111 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
7112 enable_shared=yes
7113 fi
7114 done
7115 IFS="$ac_save_ifs"
7116 ;;
7117 esac
7118
75e93faa 7119else
414d23ae 7120 enable_shared=yes
ba479fd2 7121fi;
75e93faa 7122
75e93faa 7123
75e93faa 7124
160633c6
MM
7125# Check whether --with-build-sysroot or --without-build-sysroot was given.
7126if test "${with_build_sysroot+set}" = set; then
7127 withval="$with_build_sysroot"
7128
7129fi;
7130
7131
4977bab6
ZW
7132# Check whether --with-sysroot or --without-sysroot was given.
7133if test "${with_sysroot+set}" = set; then
7134 withval="$with_sysroot"
ba479fd2 7135
4977bab6 7136 case ${with_sysroot} in
caa55b1e 7137 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
7138 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
7139 esac
ba479fd2 7140
4977bab6
ZW
7141 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
7142 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
7143
047d636f
DJ
7144 if test "x$exec_prefix" = xNONE; then
7145 if test "x$prefix" = xNONE; then
7146 test_prefix=/usr/local
7147 else
7148 test_prefix=$prefix
7149 fi
7150 else
7151 test_prefix=$exec_prefix
7152 fi
7153 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
7154 "${test_prefix}"|"${test_prefix}/"*|\
7155 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
7156 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
7157 TARGET_SYSTEM_ROOT_DEFINE="$t"
7158 ;;
7159 esac
7160
4977bab6 7161else
ba479fd2 7162
4977bab6 7163 TARGET_SYSTEM_ROOT=
db720d9a 7164 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
7165 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
7166
ba479fd2 7167fi;
4977bab6
ZW
7168
7169
7170
7171
d1bd0ded 7172# Build with intermodule optimisations
d1bd0ded
GK
7173# Check whether --enable-intermodule or --disable-intermodule was given.
7174if test "${enable_intermodule+set}" = set; then
7175 enableval="$enable_intermodule"
0c46c5c7
KC
7176 case ${enable_intermodule} in
7177 yes) onestep="-onestep";;
7178 *) onestep="";;
d1bd0ded 7179esac
0c46c5c7
KC
7180else
7181 onestep=""
ba479fd2 7182fi;
d1bd0ded
GK
7183
7184
f3c9f174
NN
7185# Sanity check enable_languages in case someone does not run the toplevel
7186# configure # script.
7187# Check whether --enable-languages or --disable-languages was given.
7188if test "${enable_languages+set}" = set; then
7189 enableval="$enable_languages"
7190 case ,${enable_languages}, in
7191 ,,|,yes,)
7192 # go safe -- we cannot be much sure without the toplevel
7193 # configure's
7194 # analysis of which target libs are present and usable
7195 enable_languages=c
7196 ;;
7197 *,all,*)
7198 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
7199echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
7200 { (exit 1); exit 1; }; }
7201 ;;
7202 *,c,*)
7203 ;;
7204 *)
7205 enable_languages=c,${enable_languages}
7206 ;;
7207esac
7208else
7209 enable_languages=c
7210fi;
7211
9288b845
CD
7212# Used by documentation targets
7213
7214
7215
f3c9f174 7216
73458fb7
NN
7217# -------------------------
7218# Checks for other programs
7219# -------------------------
5b67ad6f 7220
ba479fd2
NN
7221echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7222echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
86da66b5 7223set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
ba479fd2
NN
7224if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
7225 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 7226else
ba479fd2 7227 cat >conftest.make <<\_ACEOF
e9a25f70 7228all:
ba479fd2
NN
7229 @echo 'ac_maketemp="$(MAKE)"'
7230_ACEOF
e9a25f70 7231# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 7232eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
7233if test -n "$ac_maketemp"; then
7234 eval ac_cv_prog_make_${ac_make}_set=yes
7235else
7236 eval ac_cv_prog_make_${ac_make}_set=no
7237fi
ba479fd2 7238rm -f conftest.make
e9a25f70
JL
7239fi
7240if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
7241 echo "$as_me:$LINENO: result: yes" >&5
7242echo "${ECHO_T}yes" >&6
e9a25f70
JL
7243 SET_MAKE=
7244else
ba479fd2
NN
7245 echo "$as_me:$LINENO: result: no" >&5
7246echo "${ECHO_T}no" >&6
e9a25f70
JL
7247 SET_MAKE="MAKE=${MAKE-make}"
7248fi
7249
7250
861bb6c1 7251# Find some useful tools
ba479fd2 7252for ac_prog in gawk mawk nawk awk
861bb6c1 7253do
ba479fd2 7254 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 7255set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7256echo "$as_me:$LINENO: checking for $ac_word" >&5
7257echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7258if test "${ac_cv_prog_AWK+set}" = set; then
7259 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7260else
7261 if test -n "$AWK"; then
7262 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7263else
ba479fd2
NN
7264as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7265for as_dir in $PATH
7266do
7267 IFS=$as_save_IFS
7268 test -z "$as_dir" && as_dir=.
7269 for ac_exec_ext in '' $ac_executable_extensions; do
7270 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7271 ac_cv_prog_AWK="$ac_prog"
7272 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7273 break 2
7274 fi
7275done
7276done
7277
861bb6c1
JL
7278fi
7279fi
ba479fd2 7280AWK=$ac_cv_prog_AWK
861bb6c1 7281if test -n "$AWK"; then
ba479fd2
NN
7282 echo "$as_me:$LINENO: result: $AWK" >&5
7283echo "${ECHO_T}$AWK" >&6
861bb6c1 7284else
ba479fd2
NN
7285 echo "$as_me:$LINENO: result: no" >&5
7286echo "${ECHO_T}no" >&6
861bb6c1
JL
7287fi
7288
ba479fd2 7289 test -n "$AWK" && break
861bb6c1
JL
7290done
7291
776dc15d 7292# We need awk to create options.c and options.h.
2c4902b9
NN
7293# Bail out if it's missing.
7294case ${AWK} in
ba479fd2
NN
7295 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7296echo "$as_me: error: can't build without awk, bailing out" >&2;}
7297 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
7298esac
7299
ba479fd2
NN
7300echo "$as_me:$LINENO: checking whether ln -s works" >&5
7301echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
7302if test "${gcc_cv_prog_LN_S+set}" = set; then
7303 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7304else
7305 rm -f conftestdata_t
7306echo >conftestdata_f
7307if ln -s conftestdata_f conftestdata_t 2>/dev/null
7308then
7309 gcc_cv_prog_LN_S="ln -s"
7310else
7311 if ln conftestdata_f conftestdata_t 2>/dev/null
7312 then
7313 gcc_cv_prog_LN_S=ln
7314 else
35f06ae4
PB
7315 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7316 then
06c3418c 7317 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
7318 else
7319 gcc_cv_prog_LN_S=cp
7320 fi
0a4b6309
RL
7321 fi
7322fi
7323rm -f conftestdata_f conftestdata_t
7324
7325fi
7326LN_S="$gcc_cv_prog_LN_S"
7327if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
7328 echo "$as_me:$LINENO: result: yes" >&5
7329echo "${ECHO_T}yes" >&6
0a4b6309
RL
7330else
7331 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
7332 echo "$as_me:$LINENO: result: no, using ln" >&5
7333echo "${ECHO_T}no, using ln" >&6
0a4b6309 7334 else
35f06ae4
PB
7335 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7336echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
7337 fi
7338fi
7339
18fc9bd4
RG
7340echo "$as_me:$LINENO: checking whether ln works" >&5
7341echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
7342if test "${acx_cv_prog_LN+set}" = set; then
7343 echo $ECHO_N "(cached) $ECHO_C" >&6
7344else
7345 rm -f conftestdata_t
7346echo >conftestdata_f
7347if ln conftestdata_f conftestdata_t 2>/dev/null
7348then
7349 acx_cv_prog_LN=ln
7350else
7351 acx_cv_prog_LN=no
7352fi
7353rm -f conftestdata_f conftestdata_t
7354
7355fi
7356if test $acx_cv_prog_LN = no; then
7357 LN="$LN_S"
7358 echo "$as_me:$LINENO: result: no, using $LN" >&5
7359echo "${ECHO_T}no, using $LN" >&6
7360else
7361 LN="$acx_cv_prog_LN"
7362 echo "$as_me:$LINENO: result: yes" >&5
7363echo "${ECHO_T}yes" >&6
7364fi
7365
ba479fd2
NN
7366if test -n "$ac_tool_prefix"; then
7367 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7368set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7369echo "$as_me:$LINENO: checking for $ac_word" >&5
7370echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7371if test "${ac_cv_prog_RANLIB+set}" = set; then
7372 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7373else
7374 if test -n "$RANLIB"; then
7375 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7376else
ba479fd2
NN
7377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7378for as_dir in $PATH
7379do
7380 IFS=$as_save_IFS
7381 test -z "$as_dir" && as_dir=.
7382 for ac_exec_ext in '' $ac_executable_extensions; do
7383 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7384 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7385 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7386 break 2
7387 fi
7388done
7389done
7390
6e3f3080
NN
7391fi
7392fi
ba479fd2 7393RANLIB=$ac_cv_prog_RANLIB
6e3f3080 7394if test -n "$RANLIB"; then
ba479fd2
NN
7395 echo "$as_me:$LINENO: result: $RANLIB" >&5
7396echo "${ECHO_T}$RANLIB" >&6
7397else
7398 echo "$as_me:$LINENO: result: no" >&5
7399echo "${ECHO_T}no" >&6
7400fi
7401
7402fi
7403if test -z "$ac_cv_prog_RANLIB"; then
7404 ac_ct_RANLIB=$RANLIB
7405 # Extract the first word of "ranlib", so it can be a program name with args.
7406set dummy ranlib; ac_word=$2
7407echo "$as_me:$LINENO: checking for $ac_word" >&5
7408echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7409if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7410 echo $ECHO_N "(cached) $ECHO_C" >&6
7411else
7412 if test -n "$ac_ct_RANLIB"; then
7413 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7414else
7415as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7416for as_dir in $PATH
7417do
7418 IFS=$as_save_IFS
7419 test -z "$as_dir" && as_dir=.
7420 for ac_exec_ext in '' $ac_executable_extensions; do
7421 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7422 ac_cv_prog_ac_ct_RANLIB="ranlib"
7423 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7424 break 2
7425 fi
7426done
7427done
7428
7429 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7430fi
7431fi
7432ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7433if test -n "$ac_ct_RANLIB"; then
7434 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7435echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 7436else
ba479fd2
NN
7437 echo "$as_me:$LINENO: result: no" >&5
7438echo "${ECHO_T}no" >&6
7439fi
7440
7441 RANLIB=$ac_ct_RANLIB
7442else
7443 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
7444fi
7445
343a6100
MM
7446case "${host}" in
7447*-*-darwin*)
7448 # By default, the Darwin ranlib will not treat common symbols as
7449 # definitions when building the archive table of contents. Other
7450 # ranlibs do that; pass an option to the Darwin ranlib that makes
7451 # it behave similarly.
7452 ranlib_flags="-c"
7453 ;;
7454*)
7455 ranlib_flags=""
7456esac
7457
7458
0a4b6309
RL
7459# Find a good install program. We prefer a C program (faster),
7460# so one script is as good as another. But avoid the broken or
7461# incompatible versions:
7462# SysV /etc/install, /usr/sbin/install
7463# SunOS /usr/etc/install
7464# IRIX /sbin/install
7465# AIX /bin/install
7466# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7467# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7468# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
7469echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7470echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 7471if test -z "$INSTALL"; then
ba479fd2
NN
7472if test "${ac_cv_path_install+set}" = set; then
7473 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7474else
7475 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7476 for ac_dir in $PATH; do
7477 # Account for people who put trailing slashes in PATH elements.
7478 case "$ac_dir/" in
7479 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7480 *)
7481 # OSF1 and SCO ODT 3.0 have their own names for install.
7482 for ac_prog in ginstall scoinst install; do
7483 if test -f $ac_dir/$ac_prog; then
7484 if test $ac_prog = install &&
7485 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7486 # AIX install. It has an incompatible calling convention.
7487 # OSF/1 installbsd also uses dspmsg, but is usable.
7488 :
7489 else
7490 ac_cv_path_install="$ac_dir/$ac_prog -c"
7491 break 2
7492 fi
7493 fi
7494 done
7495 ;;
7496 esac
7497 done
7498 IFS="$ac_save_IFS"
7499
7500fi
7501 if test "${ac_cv_path_install+set}" = set; then
7502 INSTALL="$ac_cv_path_install"
7503 else
7504 # As a last resort, use the slow shell script. We don't cache a
7505 # path for INSTALL within a source directory, because that will
7506 # break other packages using the cache if that directory is
7507 # removed, or if the path is relative.
7508 INSTALL="$ac_install_sh"
7509 fi
7510fi
ba479fd2
NN
7511echo "$as_me:$LINENO: result: $INSTALL" >&5
7512echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
7513
7514# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7515# It thinks the first close brace ends the variable substitution.
7516test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7517
7518test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7519
861bb6c1 7520
3a000df0 7521# See if cmp has --ignore-initial.
ba479fd2
NN
7522echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7523echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
7524if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7525 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
7526else
7527 echo abfoo >t1
7528 echo cdfoo >t2
269a7343 7529 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
7530 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7531 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 7532 :
3a000df0
KC
7533 else
7534 gcc_cv_prog_cmp_skip=gnucompare
7535 fi
269a7343
KG
7536 fi
7537 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7538 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7539 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7540 :
7541 else
7542 gcc_cv_prog_cmp_skip=fastcompare
7543 fi
7544 fi
3a000df0
KC
7545 fi
7546 rm t1 t2
7547
7548fi
ba479fd2
NN
7549echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7550echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
7551make_compare_target=$gcc_cv_prog_cmp_skip
7552
7553
7554
73458fb7
NN
7555# See if we have the mktemp command.
7556# Extract the first word of "mktemp", so it can be a program name with args.
7557set dummy mktemp; ac_word=$2
ba479fd2
NN
7558echo "$as_me:$LINENO: checking for $ac_word" >&5
7559echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7560if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7561 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7562else
7563 if test -n "$have_mktemp_command"; then
7564 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7565else
ba479fd2
NN
7566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7567for as_dir in $PATH
7568do
7569 IFS=$as_save_IFS
7570 test -z "$as_dir" && as_dir=.
7571 for ac_exec_ext in '' $ac_executable_extensions; do
7572 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7573 ac_cv_prog_have_mktemp_command="yes"
7574 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7575 break 2
7576 fi
7577done
7578done
7579
73458fb7
NN
7580 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7581fi
7582fi
ba479fd2 7583have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 7584if test -n "$have_mktemp_command"; then
ba479fd2
NN
7585 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7586echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 7587else
ba479fd2
NN
7588 echo "$as_me:$LINENO: result: no" >&5
7589echo "${ECHO_T}no" >&6
73458fb7
NN
7590fi
7591
7592
7c27e184
PB
7593MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
7594
7595# See if makeinfo has been installed and is modern enough
7596# that we can use it.
9f18db39
PB
7597
7598ac_executable_extensions="$build_exeext"
7599
7c27e184 7600# Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 7601set dummy makeinfo; ac_word=$2
ba479fd2
NN
7602echo "$as_me:$LINENO: checking for $ac_word" >&5
7603echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7604if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7605 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7606else
7607 if test -n "$MAKEINFO"; then
7608 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7609else
ba479fd2
NN
7610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7611for as_dir in $PATH
7612do
7613 IFS=$as_save_IFS
7614 test -z "$as_dir" && as_dir=.
7615 for ac_exec_ext in '' $ac_executable_extensions; do
7616 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7617 ac_cv_prog_MAKEINFO="makeinfo"
7618 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7619 break 2
7620 fi
7621done
7622done
7623
73458fb7
NN
7624fi
7625fi
ba479fd2 7626MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 7627if test -n "$MAKEINFO"; then
ba479fd2
NN
7628 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7629echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 7630else
ba479fd2
NN
7631 echo "$as_me:$LINENO: result: no" >&5
7632echo "${ECHO_T}no" >&6
73458fb7
NN
7633fi
7634
7635if test -n "$MAKEINFO"; then
7636 # Found it, now check the version.
ba479fd2
NN
7637 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7638echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
7639if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7640 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7641else
7642 ac_prog_version=`$MAKEINFO --version 2>&1 |
7643 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
1546bb64 7644 echo "configure:7644: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
7645 case $ac_prog_version in
7646 '') gcc_cv_prog_makeinfo_modern=no;;
1a598a97 7647 4.[4-9]*)
73458fb7
NN
7648 gcc_cv_prog_makeinfo_modern=yes;;
7649 *) gcc_cv_prog_makeinfo_modern=no;;
7650 esac
7651
7652fi
ba479fd2
NN
7653echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7654echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
7655else
7656 gcc_cv_prog_makeinfo_modern=no
7657fi
7658
73458fb7 7659if test $gcc_cv_prog_makeinfo_modern = no; then
7c27e184 7660 MAKEINFO="$MISSING makeinfo"
ba479fd2
NN
7661 { echo "$as_me:$LINENO: WARNING:
7662*** Makeinfo is missing or too old.
7663*** Info documentation will not be built." >&5
7664echo "$as_me: WARNING:
cafe096b 7665*** Makeinfo is missing or too old.
ba479fd2 7666*** Info documentation will not be built." >&2;}
73458fb7
NN
7667 BUILD_INFO=
7668else
ba479fd2 7669 BUILD_INFO=info
73458fb7
NN
7670fi
7671
7c27e184 7672
73458fb7 7673# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
7674echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7675echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 7676if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
7677 echo "$as_me:$LINENO: result: yes" >&5
7678echo "${ECHO_T}yes" >&6
7679 GENERATED_MANPAGES=generated-manpages
73458fb7 7680else
ba479fd2
NN
7681 echo "$as_me:$LINENO: result: no" >&5
7682echo "${ECHO_T}no" >&6
73458fb7
NN
7683 GENERATED_MANPAGES=
7684fi
7685
7c27e184 7686
73458fb7 7687# How about lex?
7c27e184
PB
7688for ac_prog in flex
7689do
7690 # Extract the first word of "$ac_prog", so it can be a program name with args.
7691set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7692echo "$as_me:$LINENO: checking for $ac_word" >&5
7693echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7694if test "${ac_cv_prog_FLEX+set}" = set; then
7695 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7696else
7697 if test -n "$FLEX"; then
7698 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7699else
ba479fd2
NN
7700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7701for as_dir in $PATH
7702do
7703 IFS=$as_save_IFS
7704 test -z "$as_dir" && as_dir=.
7705 for ac_exec_ext in '' $ac_executable_extensions; do
7706 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7707 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
7708 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7709 break 2
7710 fi
7711done
7712done
7713
73458fb7
NN
7714fi
7715fi
ba479fd2 7716FLEX=$ac_cv_prog_FLEX
73458fb7 7717if test -n "$FLEX"; then
ba479fd2
NN
7718 echo "$as_me:$LINENO: result: $FLEX" >&5
7719echo "${ECHO_T}$FLEX" >&6
73458fb7 7720else
ba479fd2
NN
7721 echo "$as_me:$LINENO: result: no" >&5
7722echo "${ECHO_T}no" >&6
73458fb7
NN
7723fi
7724
7c27e184
PB
7725 test -n "$FLEX" && break
7726done
7727test -n "$FLEX" || FLEX="$MISSING flex"
7728
73458fb7
NN
7729
7730# Bison?
7c27e184
PB
7731for ac_prog in bison
7732do
7733 # Extract the first word of "$ac_prog", so it can be a program name with args.
7734set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7735echo "$as_me:$LINENO: checking for $ac_word" >&5
7736echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7737if test "${ac_cv_prog_BISON+set}" = set; then
7738 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7739else
7740 if test -n "$BISON"; then
7741 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7742else
ba479fd2
NN
7743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7744for as_dir in $PATH
7745do
7746 IFS=$as_save_IFS
7747 test -z "$as_dir" && as_dir=.
7748 for ac_exec_ext in '' $ac_executable_extensions; do
7749 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7750 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
7751 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7752 break 2
7753 fi
7754done
7755done
7756
73458fb7
NN
7757fi
7758fi
ba479fd2 7759BISON=$ac_cv_prog_BISON
73458fb7 7760if test -n "$BISON"; then
ba479fd2
NN
7761 echo "$as_me:$LINENO: result: $BISON" >&5
7762echo "${ECHO_T}$BISON" >&6
73458fb7 7763else
ba479fd2
NN
7764 echo "$as_me:$LINENO: result: no" >&5
7765echo "${ECHO_T}no" >&6
73458fb7
NN
7766fi
7767
7c27e184
PB
7768 test -n "$BISON" && break
7769done
7770test -n "$BISON" || BISON="$MISSING bison"
7771
7772
7773# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7774# check for build == host before using them.
73458fb7 7775
f6a874ac 7776# NM
414adbdd
GK
7777if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7778 && test -d ../binutils ; then
f6a874ac
JW
7779 NM='$(objdir)/../binutils/nm-new'
7780else
7781 # Extract the first word of "nm", so it can be a program name with args.
7782set dummy nm; ac_word=$2
7783echo "$as_me:$LINENO: checking for $ac_word" >&5
7784echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7785if test "${ac_cv_prog_NM+set}" = set; then
7786 echo $ECHO_N "(cached) $ECHO_C" >&6
7787else
7788 if test -n "$NM"; then
7789 ac_cv_prog_NM="$NM" # Let the user override the test.
7790else
7791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7792for as_dir in $PATH
7793do
7794 IFS=$as_save_IFS
7795 test -z "$as_dir" && as_dir=.
7796 for ac_exec_ext in '' $ac_executable_extensions; do
7797 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7798 ac_cv_prog_NM="nm"
7799 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7800 break 2
7801 fi
7802done
7803done
7804
7805 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7806fi
7807fi
7808NM=$ac_cv_prog_NM
7809if test -n "$NM"; then
7810 echo "$as_me:$LINENO: result: $NM" >&5
7811echo "${ECHO_T}$NM" >&6
7812else
7813 echo "$as_me:$LINENO: result: no" >&5
7814echo "${ECHO_T}no" >&6
7815fi
7816
7817fi
7818
7819# AR
414adbdd
GK
7820if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7821 && test -d ../binutils ; then
f6a874ac
JW
7822 AR='$(objdir)/../binutils/ar'
7823else
7824 # Extract the first word of "ar", so it can be a program name with args.
7825set dummy ar; ac_word=$2
7826echo "$as_me:$LINENO: checking for $ac_word" >&5
7827echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7828if test "${ac_cv_prog_AR+set}" = set; then
7829 echo $ECHO_N "(cached) $ECHO_C" >&6
7830else
7831 if test -n "$AR"; then
7832 ac_cv_prog_AR="$AR" # Let the user override the test.
7833else
7834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7835for as_dir in $PATH
7836do
7837 IFS=$as_save_IFS
7838 test -z "$as_dir" && as_dir=.
7839 for ac_exec_ext in '' $ac_executable_extensions; do
7840 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7841 ac_cv_prog_AR="ar"
7842 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7843 break 2
7844 fi
7845done
7846done
7847
7848 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7849fi
7850fi
7851AR=$ac_cv_prog_AR
7852if test -n "$AR"; then
7853 echo "$as_me:$LINENO: result: $AR" >&5
7854echo "${ECHO_T}$AR" >&6
7855else
7856 echo "$as_me:$LINENO: result: no" >&5
7857echo "${ECHO_T}no" >&6
7858fi
7859
7860fi
7861
7862
73458fb7
NN
7863# --------------------
7864# Checks for C headers
7865# --------------------
7866
ba479fd2
NN
7867echo "$as_me:$LINENO: checking for GNU C library" >&5
7868echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
7869if test "${gcc_cv_glibc+set}" = set; then
7870 echo $ECHO_N "(cached) $ECHO_C" >&6
7871else
7872 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7873/* confdefs.h. */
7874_ACEOF
7875cat confdefs.h >>conftest.$ac_ext
7876cat >>conftest.$ac_ext <<_ACEOF
7877/* end confdefs.h. */
73458fb7 7878#include <features.h>
ba479fd2
NN
7879int
7880main ()
7881{
73458fb7
NN
7882
7883#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7884#error Not a GNU C library system
7885#endif
ba479fd2
NN
7886 ;
7887 return 0;
7888}
7889_ACEOF
7890rm -f conftest.$ac_objext
7891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7892 (eval $ac_compile) 2>conftest.er1
ba479fd2 7893 ac_status=$?
86da66b5
HPN
7894 grep -v '^ *+' conftest.er1 >conftest.err
7895 rm -f conftest.er1
7896 cat conftest.err >&5
ba479fd2
NN
7897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7898 (exit $ac_status); } &&
ec6c7392
PB
7899 { ac_try='test -z "$ac_c_werror_flag"
7900 || test ! -s conftest.err'
86da66b5
HPN
7901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7902 (eval $ac_try) 2>&5
7903 ac_status=$?
7904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7905 (exit $ac_status); }; } &&
7906 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7908 (eval $ac_try) 2>&5
7909 ac_status=$?
7910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7911 (exit $ac_status); }; }; then
73458fb7
NN
7912 gcc_cv_glibc=yes
7913else
ba479fd2
NN
7914 echo "$as_me: failed program was:" >&5
7915sed 's/^/| /' conftest.$ac_ext >&5
7916
7917gcc_cv_glibc=no
73458fb7 7918fi
86da66b5 7919rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
7920fi
7921
ba479fd2
NN
7922echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7923echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 7924if test $gcc_cv_glibc = yes; then
ba479fd2
NN
7925
7926cat >>confdefs.h <<\_ACEOF
73458fb7 7927#define _GNU_SOURCE 1
ba479fd2 7928_ACEOF
73458fb7
NN
7929
7930fi
7931
ca9bc441
NN
7932# Need to reject headers which give warnings, so that the -Werror bootstrap
7933# works later. *sigh* This needs to come before all header checks.
18fc9bd4 7934
ca9bc441
NN
7935ac_c_preproc_warn_flag=yes
7936
ba479fd2
NN
7937echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7938echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7939if test "${ac_cv_header_stdc+set}" = set; then
7940 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7941else
ba479fd2 7942 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7943/* confdefs.h. */
7944_ACEOF
7945cat confdefs.h >>conftest.$ac_ext
7946cat >>conftest.$ac_ext <<_ACEOF
7947/* end confdefs.h. */
956d6950
JL
7948#include <stdlib.h>
7949#include <stdarg.h>
7950#include <string.h>
7951#include <float.h>
ba479fd2
NN
7952
7953int
7954main ()
7955{
7956
7957 ;
7958 return 0;
7959}
7960_ACEOF
7961rm -f conftest.$ac_objext
7962if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7963 (eval $ac_compile) 2>conftest.er1
ba479fd2 7964 ac_status=$?
86da66b5
HPN
7965 grep -v '^ *+' conftest.er1 >conftest.err
7966 rm -f conftest.er1
7967 cat conftest.err >&5
ba479fd2
NN
7968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7969 (exit $ac_status); } &&
ec6c7392
PB
7970 { ac_try='test -z "$ac_c_werror_flag"
7971 || test ! -s conftest.err'
86da66b5
HPN
7972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7973 (eval $ac_try) 2>&5
7974 ac_status=$?
7975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7976 (exit $ac_status); }; } &&
7977 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7979 (eval $ac_try) 2>&5
7980 ac_status=$?
7981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7982 (exit $ac_status); }; }; then
956d6950
JL
7983 ac_cv_header_stdc=yes
7984else
ba479fd2
NN
7985 echo "$as_me: failed program was:" >&5
7986sed 's/^/| /' conftest.$ac_ext >&5
7987
7988ac_cv_header_stdc=no
956d6950 7989fi
86da66b5 7990rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
7991
7992if test $ac_cv_header_stdc = yes; then
7993 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 7994 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7995/* confdefs.h. */
7996_ACEOF
7997cat confdefs.h >>conftest.$ac_ext
7998cat >>conftest.$ac_ext <<_ACEOF
7999/* end confdefs.h. */
956d6950 8000#include <string.h>
ba479fd2
NN
8001
8002_ACEOF
956d6950 8003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8004 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
8005 :
8006else
956d6950
JL
8007 ac_cv_header_stdc=no
8008fi
8009rm -f conftest*
8010
8011fi
8012
8013if test $ac_cv_header_stdc = yes; then
8014 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 8015 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8016/* confdefs.h. */
8017_ACEOF
8018cat confdefs.h >>conftest.$ac_ext
8019cat >>conftest.$ac_ext <<_ACEOF
8020/* end confdefs.h. */
956d6950 8021#include <stdlib.h>
ba479fd2
NN
8022
8023_ACEOF
956d6950 8024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8025 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
8026 :
8027else
956d6950
JL
8028 ac_cv_header_stdc=no
8029fi
8030rm -f conftest*
8031
8032fi
8033
8034if test $ac_cv_header_stdc = yes; then
8035 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 8036 if test "$cross_compiling" = yes; then
956d6950
JL
8037 :
8038else
ba479fd2 8039 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8040/* confdefs.h. */
8041_ACEOF
8042cat confdefs.h >>conftest.$ac_ext
8043cat >>conftest.$ac_ext <<_ACEOF
8044/* end confdefs.h. */
956d6950 8045#include <ctype.h>
ba479fd2
NN
8046#if ((' ' & 0x0FF) == 0x020)
8047# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8048# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8049#else
8050# define ISLOWER(c) \
86da66b5
HPN
8051 (('a' <= (c) && (c) <= 'i') \
8052 || ('j' <= (c) && (c) <= 'r') \
8053 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
8054# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8055#endif
63cf211a 8056
ba479fd2
NN
8057#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8058int
8059main ()
8060{
8061 int i;
8062 for (i = 0; i < 256; i++)
8063 if (XOR (islower (i), ISLOWER (i))
86da66b5 8064 || toupper (i) != TOUPPER (i))
ba479fd2
NN
8065 exit(2);
8066 exit (0);
8067}
8068_ACEOF
8069rm -f conftest$ac_exeext
8070if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8071 (eval $ac_link) 2>&5
8072 ac_status=$?
8073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8076 (eval $ac_try) 2>&5
8077 ac_status=$?
8078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8079 (exit $ac_status); }; }; then
956d6950
JL
8080 :
8081else
ba479fd2
NN
8082 echo "$as_me: program exited with status $ac_status" >&5
8083echo "$as_me: failed program was:" >&5
8084sed 's/^/| /' conftest.$ac_ext >&5
8085
8086( exit $ac_status )
8087ac_cv_header_stdc=no
956d6950 8088fi
86da66b5 8089rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 8090fi
956d6950
JL
8091fi
8092fi
ba479fd2
NN
8093echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8094echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 8095if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
8096
8097cat >>confdefs.h <<\_ACEOF
956d6950 8098#define STDC_HEADERS 1
ba479fd2 8099_ACEOF
956d6950
JL
8100
8101fi
8102
ba479fd2
NN
8103echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
8104echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
8105if test "${ac_cv_header_time+set}" = set; then
8106 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8107else
ba479fd2 8108 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8109/* confdefs.h. */
8110_ACEOF
8111cat confdefs.h >>conftest.$ac_ext
8112cat >>conftest.$ac_ext <<_ACEOF
8113/* end confdefs.h. */
956d6950
JL
8114#include <sys/types.h>
8115#include <sys/time.h>
8116#include <time.h>
ba479fd2
NN
8117
8118int
8119main ()
8120{
8121if ((struct tm *) 0)
8122return 0;
8123 ;
8124 return 0;
8125}
8126_ACEOF
8127rm -f conftest.$ac_objext
8128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8129 (eval $ac_compile) 2>conftest.er1
ba479fd2 8130 ac_status=$?
86da66b5
HPN
8131 grep -v '^ *+' conftest.er1 >conftest.err
8132 rm -f conftest.er1
8133 cat conftest.err >&5
ba479fd2
NN
8134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8135 (exit $ac_status); } &&
ec6c7392
PB
8136 { ac_try='test -z "$ac_c_werror_flag"
8137 || test ! -s conftest.err'
86da66b5
HPN
8138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8139 (eval $ac_try) 2>&5
8140 ac_status=$?
8141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8142 (exit $ac_status); }; } &&
8143 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8145 (eval $ac_try) 2>&5
8146 ac_status=$?
8147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8148 (exit $ac_status); }; }; then
956d6950
JL
8149 ac_cv_header_time=yes
8150else
ba479fd2
NN
8151 echo "$as_me: failed program was:" >&5
8152sed 's/^/| /' conftest.$ac_ext >&5
8153
8154ac_cv_header_time=no
956d6950 8155fi
86da66b5 8156rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 8157fi
ba479fd2
NN
8158echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
8159echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 8160if test $ac_cv_header_time = yes; then
ba479fd2
NN
8161
8162cat >>confdefs.h <<\_ACEOF
956d6950 8163#define TIME_WITH_SYS_TIME 1
ba479fd2 8164_ACEOF
956d6950
JL
8165
8166fi
8167
18fc9bd4
RG
8168echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
8169echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
8170if test "${gcc_cv_header_string+set}" = set; then
8171 echo $ECHO_N "(cached) $ECHO_C" >&6
8172else
8173 cat >conftest.$ac_ext <<_ACEOF
8174/* confdefs.h. */
8175_ACEOF
8176cat confdefs.h >>conftest.$ac_ext
8177cat >>conftest.$ac_ext <<_ACEOF
8178/* end confdefs.h. */
8179#include <string.h>
8180#include <strings.h>
8181int
8182main ()
8183{
8184
8185 ;
8186 return 0;
8187}
8188_ACEOF
8189rm -f conftest.$ac_objext
8190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8191 (eval $ac_compile) 2>conftest.er1
8192 ac_status=$?
8193 grep -v '^ *+' conftest.er1 >conftest.err
8194 rm -f conftest.er1
8195 cat conftest.err >&5
8196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8197 (exit $ac_status); } &&
8198 { ac_try='test -z "$ac_c_werror_flag"
8199 || test ! -s conftest.err'
8200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8201 (eval $ac_try) 2>&5
8202 ac_status=$?
8203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8204 (exit $ac_status); }; } &&
8205 { ac_try='test -s conftest.$ac_objext'
8206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8207 (eval $ac_try) 2>&5
8208 ac_status=$?
8209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8210 (exit $ac_status); }; }; then
8211 gcc_cv_header_string=yes
8212else
8213 echo "$as_me: failed program was:" >&5
8214sed 's/^/| /' conftest.$ac_ext >&5
8215
8216gcc_cv_header_string=no
8217fi
8218rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8219fi
8220echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
8221echo "${ECHO_T}$gcc_cv_header_string" >&6
8222if test $gcc_cv_header_string = yes; then
8223
8224cat >>confdefs.h <<\_ACEOF
8225#define STRING_WITH_STRINGS 1
8226_ACEOF
8227
8228fi
8229
ba479fd2
NN
8230echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
8231echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
8232if test "${ac_cv_header_sys_wait_h+set}" = set; then
8233 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 8234else
ba479fd2 8235 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8236/* confdefs.h. */
8237_ACEOF
8238cat confdefs.h >>conftest.$ac_ext
8239cat >>conftest.$ac_ext <<_ACEOF
8240/* end confdefs.h. */
e9831ca0
KG
8241#include <sys/types.h>
8242#include <sys/wait.h>
8243#ifndef WEXITSTATUS
ba479fd2 8244# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
8245#endif
8246#ifndef WIFEXITED
ba479fd2 8247# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 8248#endif
ba479fd2
NN
8249
8250int
8251main ()
8252{
8253 int s;
8254 wait (&s);
8255 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8256 ;
8257 return 0;
8258}
8259_ACEOF
8260rm -f conftest.$ac_objext
8261if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8262 (eval $ac_compile) 2>conftest.er1
ba479fd2 8263 ac_status=$?
86da66b5
HPN
8264 grep -v '^ *+' conftest.er1 >conftest.err
8265 rm -f conftest.er1
8266 cat conftest.err >&5
ba479fd2
NN
8267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8268 (exit $ac_status); } &&
ec6c7392
PB
8269 { ac_try='test -z "$ac_c_werror_flag"
8270 || test ! -s conftest.err'
86da66b5
HPN
8271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8272 (eval $ac_try) 2>&5
8273 ac_status=$?
8274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8275 (exit $ac_status); }; } &&
8276 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8278 (eval $ac_try) 2>&5
8279 ac_status=$?
8280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8281 (exit $ac_status); }; }; then
e9831ca0
KG
8282 ac_cv_header_sys_wait_h=yes
8283else
ba479fd2
NN
8284 echo "$as_me: failed program was:" >&5
8285sed 's/^/| /' conftest.$ac_ext >&5
8286
8287ac_cv_header_sys_wait_h=no
e9831ca0 8288fi
86da66b5 8289rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 8290fi
ba479fd2
NN
8291echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8292echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 8293if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
8294
8295cat >>confdefs.h <<\_ACEOF
e9831ca0 8296#define HAVE_SYS_WAIT_H 1
ba479fd2 8297_ACEOF
6e3f3080 8298
63cf211a 8299fi
6e3f3080 8300
ba479fd2
NN
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
dfb77e37
KC
8322
8323for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 8324 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 8325 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 8326 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 8327do
ba479fd2 8328as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18fc9bd4 8329echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
8330echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8331if eval "test \"\${$as_ac_Header+set}\" = set"; then
8332 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8333else
18fc9bd4 8334 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8335/* confdefs.h. */
8336_ACEOF
8337cat confdefs.h >>conftest.$ac_ext
8338cat >>conftest.$ac_ext <<_ACEOF
8339/* end confdefs.h. */
8340#include <$ac_header>
8341_ACEOF
8342if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8343 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8344 ac_status=$?
8345 grep -v '^ *+' conftest.er1 >conftest.err
8346 rm -f conftest.er1
8347 cat conftest.err >&5
8348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8349 (exit $ac_status); } >/dev/null; then
8350 if test -s conftest.err; then
8351 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8352 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8353 else
8354 ac_cpp_err=
8355 fi
8356else
8357 ac_cpp_err=yes
8358fi
8359if test -z "$ac_cpp_err"; then
18fc9bd4 8360 eval "$as_ac_Header=yes"
ba479fd2
NN
8361else
8362 echo "$as_me: failed program was:" >&5
8363sed 's/^/| /' conftest.$ac_ext >&5
8364
18fc9bd4 8365 eval "$as_ac_Header=no"
ba479fd2
NN
8366fi
8367rm -f conftest.err conftest.$ac_ext
6e3f3080 8368fi
ba479fd2
NN
8369echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8370echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
8371if test `eval echo '${'$as_ac_Header'}'` = yes; then
8372 cat >>confdefs.h <<_ACEOF
8373#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8374_ACEOF
8375
956d6950
JL
8376fi
8377done
8378
8379
f24af81b 8380# Check for thread headers.
18fc9bd4 8381echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
8382echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
8383if test "${ac_cv_header_thread_h+set}" = set; then
8384 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8385else
18fc9bd4 8386 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8387/* confdefs.h. */
8388_ACEOF
8389cat confdefs.h >>conftest.$ac_ext
8390cat >>conftest.$ac_ext <<_ACEOF
8391/* end confdefs.h. */
8392#include <thread.h>
8393_ACEOF
8394if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8395 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8396 ac_status=$?
8397 grep -v '^ *+' conftest.er1 >conftest.err
8398 rm -f conftest.er1
8399 cat conftest.err >&5
8400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8401 (exit $ac_status); } >/dev/null; then
8402 if test -s conftest.err; then
8403 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8404 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8405 else
8406 ac_cpp_err=
8407 fi
8408else
8409 ac_cpp_err=yes
8410fi
8411if test -z "$ac_cpp_err"; then
18fc9bd4 8412 ac_cv_header_thread_h=yes
ba479fd2
NN
8413else
8414 echo "$as_me: failed program was:" >&5
8415sed 's/^/| /' conftest.$ac_ext >&5
8416
18fc9bd4 8417 ac_cv_header_thread_h=no
ba479fd2
NN
8418fi
8419rm -f conftest.err conftest.$ac_ext
6e3f3080 8420fi
ba479fd2
NN
8421echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8422echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 8423if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
8424 have_thread_h=yes
8425else
ba479fd2 8426 have_thread_h=
f24af81b
TT
8427fi
8428
18fc9bd4 8429echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
8430echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8431if test "${ac_cv_header_pthread_h+set}" = set; then
8432 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 8433else
18fc9bd4 8434 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8435/* confdefs.h. */
8436_ACEOF
8437cat confdefs.h >>conftest.$ac_ext
8438cat >>conftest.$ac_ext <<_ACEOF
8439/* end confdefs.h. */
8440#include <pthread.h>
8441_ACEOF
8442if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8443 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8444 ac_status=$?
8445 grep -v '^ *+' conftest.er1 >conftest.err
8446 rm -f conftest.er1
8447 cat conftest.err >&5
8448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8449 (exit $ac_status); } >/dev/null; then
8450 if test -s conftest.err; then
8451 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8452 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8453 else
8454 ac_cpp_err=
8455 fi
8456else
8457 ac_cpp_err=yes
8458fi
18fc9bd4
RG
8459if test -z "$ac_cpp_err"; then
8460 ac_cv_header_pthread_h=yes
ba479fd2 8461else
18fc9bd4
RG
8462 echo "$as_me: failed program was:" >&5
8463sed 's/^/| /' conftest.$ac_ext >&5
8464
8465 ac_cv_header_pthread_h=no
8466fi
8467rm -f conftest.err conftest.$ac_ext
6e3f3080 8468fi
ba479fd2
NN
8469echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8470echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 8471if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
8472 have_pthread_h=yes
8473else
ba479fd2 8474 have_pthread_h=
f24af81b
TT
8475fi
8476
8477
84c041a1 8478# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
8479echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8480echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
8481if test "${gcc_cv_decl_char_bit+set}" = set; then
8482 echo $ECHO_N "(cached) $ECHO_C" >&6
8483else
8484 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8485/* confdefs.h. */
8486_ACEOF
8487cat confdefs.h >>conftest.$ac_ext
8488cat >>conftest.$ac_ext <<_ACEOF
8489/* end confdefs.h. */
75e93faa
ZW
8490#ifdef HAVE_LIMITS_H
8491#include <limits.h>
8492#endif
8493#ifdef CHAR_BIT
8494found
8495#endif
ba479fd2 8496_ACEOF
75e93faa 8497if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8498 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
8499 gcc_cv_decl_char_bit=yes
8500else
75e93faa
ZW
8501 gcc_cv_decl_char_bit=no
8502fi
8503rm -f conftest*
8504
8505
8506fi
ba479fd2
NN
8507echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8508echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 8509if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
8510 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8511echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
8512if test "${gcc_cv_c_nbby+set}" = set; then
8513 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
8514else
8515 i=8
8516 gcc_cv_c_nbby=
8517 while test $i -lt 65; do
ba479fd2 8518 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8519/* confdefs.h. */
8520_ACEOF
8521cat confdefs.h >>conftest.$ac_ext
8522cat >>conftest.$ac_ext <<_ACEOF
8523/* end confdefs.h. */
8524
8525int
8526main ()
8527{
4e70264f
ZW
8528switch(0) {
8529 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8530 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8531 ; }
ba479fd2
NN
8532 ;
8533 return 0;
8534}
8535_ACEOF
8536rm -f conftest.$ac_objext
8537if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8538 (eval $ac_compile) 2>conftest.er1
ba479fd2 8539 ac_status=$?
86da66b5
HPN
8540 grep -v '^ *+' conftest.er1 >conftest.err
8541 rm -f conftest.er1
8542 cat conftest.err >&5
ba479fd2
NN
8543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8544 (exit $ac_status); } &&
ec6c7392
PB
8545 { ac_try='test -z "$ac_c_werror_flag"
8546 || test ! -s conftest.err'
86da66b5
HPN
8547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8548 (eval $ac_try) 2>&5
8549 ac_status=$?
8550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8551 (exit $ac_status); }; } &&
8552 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8554 (eval $ac_try) 2>&5
8555 ac_status=$?
8556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8557 (exit $ac_status); }; }; then
4e70264f 8558 gcc_cv_c_nbby=$i; break
75e93faa 8559else
ba479fd2
NN
8560 echo "$as_me: failed program was:" >&5
8561sed 's/^/| /' conftest.$ac_ext >&5
8562
75e93faa 8563fi
86da66b5 8564rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
8565 i=`expr $i + 1`
8566 done
8567 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8568
8569fi
ba479fd2
NN
8570echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8571echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 8572if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
8573 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8574echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8575 { (exit 1); exit 1; }; }
75e93faa 8576else
ba479fd2
NN
8577
8578cat >>confdefs.h <<_ACEOF
75e93faa 8579#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 8580_ACEOF
75e93faa
ZW
8581
8582fi
8583fi
ba479fd2
NN
8584echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8585echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
8586if test "${ac_cv_c_bigendian+set}" = set; then
8587 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 8588else
9791c75c 8589 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 8590cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8591/* confdefs.h. */
8592_ACEOF
8593cat confdefs.h >>conftest.$ac_ext
8594cat >>conftest.$ac_ext <<_ACEOF
8595/* end confdefs.h. */
4977bab6
ZW
8596#include <sys/types.h>
8597#include <sys/param.h>
9791c75c 8598
ba479fd2
NN
8599int
8600main ()
8601{
4977bab6
ZW
8602#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8603 bogus endian macros
84c041a1 8604#endif
9791c75c 8605
ba479fd2
NN
8606 ;
8607 return 0;
8608}
8609_ACEOF
8610rm -f conftest.$ac_objext
8611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8612 (eval $ac_compile) 2>conftest.er1
ba479fd2 8613 ac_status=$?
86da66b5
HPN
8614 grep -v '^ *+' conftest.er1 >conftest.err
8615 rm -f conftest.er1
8616 cat conftest.err >&5
ba479fd2
NN
8617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8618 (exit $ac_status); } &&
ec6c7392
PB
8619 { ac_try='test -z "$ac_c_werror_flag"
8620 || test ! -s conftest.err'
86da66b5
HPN
8621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8622 (eval $ac_try) 2>&5
8623 ac_status=$?
8624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8625 (exit $ac_status); }; } &&
8626 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8628 (eval $ac_try) 2>&5
8629 ac_status=$?
8630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8631 (exit $ac_status); }; }; then
4977bab6 8632 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 8633cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8634/* confdefs.h. */
8635_ACEOF
8636cat confdefs.h >>conftest.$ac_ext
8637cat >>conftest.$ac_ext <<_ACEOF
8638/* end confdefs.h. */
4977bab6
ZW
8639#include <sys/types.h>
8640#include <sys/param.h>
9791c75c 8641
ba479fd2
NN
8642int
8643main ()
8644{
4977bab6
ZW
8645#if BYTE_ORDER != BIG_ENDIAN
8646 not big endian
84c041a1 8647#endif
9791c75c 8648
ba479fd2
NN
8649 ;
8650 return 0;
8651}
8652_ACEOF
8653rm -f conftest.$ac_objext
8654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8655 (eval $ac_compile) 2>conftest.er1
ba479fd2 8656 ac_status=$?
86da66b5
HPN
8657 grep -v '^ *+' conftest.er1 >conftest.err
8658 rm -f conftest.er1
8659 cat conftest.err >&5
ba479fd2
NN
8660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8661 (exit $ac_status); } &&
ec6c7392
PB
8662 { ac_try='test -z "$ac_c_werror_flag"
8663 || test ! -s conftest.err'
86da66b5
HPN
8664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8665 (eval $ac_try) 2>&5
8666 ac_status=$?
8667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8668 (exit $ac_status); }; } &&
8669 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8671 (eval $ac_try) 2>&5
8672 ac_status=$?
8673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8674 (exit $ac_status); }; }; then
4977bab6
ZW
8675 ac_cv_c_bigendian=yes
8676else
ba479fd2
NN
8677 echo "$as_me: failed program was:" >&5
8678sed 's/^/| /' conftest.$ac_ext >&5
8679
8680ac_cv_c_bigendian=no
4977bab6 8681fi
86da66b5 8682rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8683else
ba479fd2
NN
8684 echo "$as_me: failed program was:" >&5
8685sed 's/^/| /' conftest.$ac_ext >&5
8686
9791c75c
KC
8687# It does not; compile a test program.
8688if test "$cross_compiling" = yes; then
8689 # try to guess the endianness by grepping values into an object file
8690 ac_cv_c_bigendian=unknown
8691 cat >conftest.$ac_ext <<_ACEOF
8692/* confdefs.h. */
8693_ACEOF
8694cat confdefs.h >>conftest.$ac_ext
8695cat >>conftest.$ac_ext <<_ACEOF
8696/* end confdefs.h. */
8697short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8698short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8699void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
8700short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8701short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8702void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
8703int
8704main ()
8705{
8706 _ascii (); _ebcdic ();
8707 ;
8708 return 0;
8709}
8710_ACEOF
8711rm -f conftest.$ac_objext
8712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8713 (eval $ac_compile) 2>conftest.er1
8714 ac_status=$?
8715 grep -v '^ *+' conftest.er1 >conftest.err
8716 rm -f conftest.er1
8717 cat conftest.err >&5
8718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8719 (exit $ac_status); } &&
ec6c7392
PB
8720 { ac_try='test -z "$ac_c_werror_flag"
8721 || test ! -s conftest.err'
9791c75c
KC
8722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8723 (eval $ac_try) 2>&5
8724 ac_status=$?
8725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8726 (exit $ac_status); }; } &&
8727 { ac_try='test -s conftest.$ac_objext'
8728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8729 (eval $ac_try) 2>&5
8730 ac_status=$?
8731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8732 (exit $ac_status); }; }; then
8733 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
8734 ac_cv_c_bigendian=yes
8735fi
8736if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8737 if test "$ac_cv_c_bigendian" = unknown; then
8738 ac_cv_c_bigendian=no
8739 else
8740 # finding both strings is unlikely to happen, but who knows?
8741 ac_cv_c_bigendian=unknown
8742 fi
8743fi
8744else
8745 echo "$as_me: failed program was:" >&5
8746sed 's/^/| /' conftest.$ac_ext >&5
8747
4977bab6 8748fi
86da66b5 8749rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
8750else
8751 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8752/* confdefs.h. */
8753_ACEOF
8754cat confdefs.h >>conftest.$ac_ext
8755cat >>conftest.$ac_ext <<_ACEOF
8756/* end confdefs.h. */
9791c75c
KC
8757int
8758main ()
8759{
4977bab6
ZW
8760 /* Are we little or big endian? From Harbison&Steele. */
8761 union
8762 {
8763 long l;
8764 char c[sizeof (long)];
8765 } u;
8766 u.l = 1;
8767 exit (u.c[sizeof (long) - 1] == 1);
8768}
ba479fd2
NN
8769_ACEOF
8770rm -f conftest$ac_exeext
8771if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8772 (eval $ac_link) 2>&5
8773 ac_status=$?
8774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8775 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8777 (eval $ac_try) 2>&5
8778 ac_status=$?
8779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8780 (exit $ac_status); }; }; then
4977bab6
ZW
8781 ac_cv_c_bigendian=no
8782else
ba479fd2
NN
8783 echo "$as_me: program exited with status $ac_status" >&5
8784echo "$as_me: failed program was:" >&5
8785sed 's/^/| /' conftest.$ac_ext >&5
8786
8787( exit $ac_status )
8788ac_cv_c_bigendian=yes
4977bab6 8789fi
86da66b5 8790rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 8791fi
4977bab6 8792fi
9791c75c 8793rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8794fi
ba479fd2
NN
8795echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8796echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
8797case $ac_cv_c_bigendian in
8798 yes)
ba479fd2
NN
8799
8800cat >>confdefs.h <<\_ACEOF
4977bab6 8801#define WORDS_BIGENDIAN 1
ba479fd2 8802_ACEOF
9791c75c
KC
8803 ;;
8804 no)
8805 ;;
8806 *)
8807 { { echo "$as_me:$LINENO: error: unknown endianness
8808presetting ac_cv_c_bigendian=no (or yes) will help" >&5
8809echo "$as_me: error: unknown endianness
8810presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
8811 { (exit 1); exit 1; }; } ;;
8812esac
84c041a1 8813
75e93faa 8814
73458fb7
NN
8815# --------
8816# UNSORTED
8817# --------
1e608388 8818
73458fb7
NN
8819# Stage specific cflags for build.
8820stage1_cflags=
8821case $build in
8822vax-*-*)
8823 if test x$GCC = xyes
8824 then
8825 stage1_cflags="-Wa,-J"
8826 else
8827 stage1_cflags="-J"
8828 fi
8829 ;;
8830powerpc-*-darwin*)
8831 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
8832 # sources; use -no-cpp-precomp to get to GNU cpp.
8833 # Apple's GCC has bugs in designated initializer handling, so disable
8834 # that too.
8835 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
8836 ;;
8837esac
1e608388 8838
1e608388 8839
4e70264f
ZW
8840# These libraries may be used by collect2.
8841# We may need a special search path to get them linked.
ba479fd2
NN
8842echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8843echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
8844if test "${gcc_cv_collect2_libs+set}" = set; then
8845 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
8846else
8847 save_LIBS="$LIBS"
7f2749d4 8848for libs in '' -lld -lmld \
4e70264f
ZW
8849 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8850 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8851do
8852 LIBS="$libs"
ba479fd2 8853 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8854/* confdefs.h. */
8855_ACEOF
8856cat confdefs.h >>conftest.$ac_ext
8857cat >>conftest.$ac_ext <<_ACEOF
8858/* end confdefs.h. */
8859
4e70264f 8860/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8861#ifdef __cplusplus
8862extern "C"
8863#endif
4e70264f 8864/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8865 builtin and then its argument prototype would still apply. */
8866char ldopen ();
8867int
8868main ()
8869{
8870ldopen ();
8871 ;
8872 return 0;
8873}
8874_ACEOF
8875rm -f conftest.$ac_objext conftest$ac_exeext
8876if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8877 (eval $ac_link) 2>conftest.er1
ba479fd2 8878 ac_status=$?
86da66b5
HPN
8879 grep -v '^ *+' conftest.er1 >conftest.err
8880 rm -f conftest.er1
8881 cat conftest.err >&5
ba479fd2
NN
8882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8883 (exit $ac_status); } &&
ec6c7392
PB
8884 { ac_try='test -z "$ac_c_werror_flag"
8885 || test ! -s conftest.err'
86da66b5
HPN
8886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8887 (eval $ac_try) 2>&5
8888 ac_status=$?
8889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8890 (exit $ac_status); }; } &&
8891 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8893 (eval $ac_try) 2>&5
8894 ac_status=$?
8895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8896 (exit $ac_status); }; }; then
4e70264f
ZW
8897 gcc_cv_collect2_libs="$libs"; break
8898else
ba479fd2
NN
8899 echo "$as_me: failed program was:" >&5
8900sed 's/^/| /' conftest.$ac_ext >&5
8901
4e70264f 8902fi
86da66b5
HPN
8903rm -f conftest.err conftest.$ac_objext \
8904 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8905done
8906LIBS="$save_LIBS"
8907test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8908fi
ba479fd2
NN
8909echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8910echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
8911case $gcc_cv_collect2_libs in
8912 "none required") ;;
8913 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8914esac
8915
8916
7f2749d4
RK
8917# When building Ada code on Alpha, we need exc_resume which is usually in
8918# -lexc. So test for it.
8919save_LIBS="$LIBS"
8920LIBS=
ba479fd2
NN
8921echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8922echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
8923if test "${ac_cv_search_exc_resume+set}" = set; then
8924 echo $ECHO_N "(cached) $ECHO_C" >&6
8925else
8926 ac_func_search_save_LIBS=$LIBS
8927ac_cv_search_exc_resume=no
8928cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8929/* confdefs.h. */
8930_ACEOF
8931cat confdefs.h >>conftest.$ac_ext
8932cat >>conftest.$ac_ext <<_ACEOF
8933/* end confdefs.h. */
7f2749d4 8934
7f2749d4 8935/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8936#ifdef __cplusplus
8937extern "C"
8938#endif
7f2749d4 8939/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8940 builtin and then its argument prototype would still apply. */
8941char exc_resume ();
8942int
8943main ()
8944{
8945exc_resume ();
8946 ;
8947 return 0;
8948}
8949_ACEOF
8950rm -f conftest.$ac_objext conftest$ac_exeext
8951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8952 (eval $ac_link) 2>conftest.er1
ba479fd2 8953 ac_status=$?
86da66b5
HPN
8954 grep -v '^ *+' conftest.er1 >conftest.err
8955 rm -f conftest.er1
8956 cat conftest.err >&5
ba479fd2
NN
8957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8958 (exit $ac_status); } &&
ec6c7392
PB
8959 { ac_try='test -z "$ac_c_werror_flag"
8960 || test ! -s conftest.err'
86da66b5
HPN
8961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8962 (eval $ac_try) 2>&5
8963 ac_status=$?
8964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8965 (exit $ac_status); }; } &&
8966 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8968 (eval $ac_try) 2>&5
8969 ac_status=$?
8970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8971 (exit $ac_status); }; }; then
7f2749d4
RK
8972 ac_cv_search_exc_resume="none required"
8973else
ba479fd2
NN
8974 echo "$as_me: failed program was:" >&5
8975sed 's/^/| /' conftest.$ac_ext >&5
8976
7f2749d4 8977fi
86da66b5
HPN
8978rm -f conftest.err conftest.$ac_objext \
8979 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8980if test "$ac_cv_search_exc_resume" = no; then
8981 for ac_lib in exc; do
8982 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8983 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8984/* confdefs.h. */
8985_ACEOF
8986cat confdefs.h >>conftest.$ac_ext
8987cat >>conftest.$ac_ext <<_ACEOF
8988/* end confdefs.h. */
8989
7f2749d4 8990/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8991#ifdef __cplusplus
8992extern "C"
8993#endif
7f2749d4 8994/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8995 builtin and then its argument prototype would still apply. */
8996char exc_resume ();
8997int
8998main ()
8999{
9000exc_resume ();
9001 ;
9002 return 0;
9003}
9004_ACEOF
9005rm -f conftest.$ac_objext conftest$ac_exeext
9006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9007 (eval $ac_link) 2>conftest.er1
ba479fd2 9008 ac_status=$?
86da66b5
HPN
9009 grep -v '^ *+' conftest.er1 >conftest.err
9010 rm -f conftest.er1
9011 cat conftest.err >&5
ba479fd2
NN
9012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9013 (exit $ac_status); } &&
ec6c7392
PB
9014 { ac_try='test -z "$ac_c_werror_flag"
9015 || test ! -s conftest.err'
86da66b5
HPN
9016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9017 (eval $ac_try) 2>&5
9018 ac_status=$?
9019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9020 (exit $ac_status); }; } &&
9021 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9023 (eval $ac_try) 2>&5
9024 ac_status=$?
9025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9026 (exit $ac_status); }; }; then
9027 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
9028break
9029else
ba479fd2
NN
9030 echo "$as_me: failed program was:" >&5
9031sed 's/^/| /' conftest.$ac_ext >&5
9032
cafe096b 9033fi
86da66b5
HPN
9034rm -f conftest.err conftest.$ac_objext \
9035 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9036 done
6e3f3080 9037fi
ba479fd2
NN
9038LIBS=$ac_func_search_save_LIBS
9039fi
9040echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
9041echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
9042if test "$ac_cv_search_exc_resume" != no; then
63cf211a 9043 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 9044
7f2749d4 9045fi
ba479fd2 9046
7f2749d4
RK
9047GNAT_LIBEXC="$LIBS"
9048LIBS="$save_LIBS"
9049
9050
62c9aa5f
ZW
9051# Some systems put ldexp and frexp in libm instead of libc; assume
9052# they're both in the same place. jcf-dump needs them.
9053save_LIBS="$LIBS"
9054LIBS=
ba479fd2
NN
9055echo "$as_me:$LINENO: checking for library containing ldexp" >&5
9056echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
9057if test "${ac_cv_search_ldexp+set}" = set; then
9058 echo $ECHO_N "(cached) $ECHO_C" >&6
9059else
9060 ac_func_search_save_LIBS=$LIBS
9061ac_cv_search_ldexp=no
9062cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9063/* confdefs.h. */
9064_ACEOF
9065cat confdefs.h >>conftest.$ac_ext
9066cat >>conftest.$ac_ext <<_ACEOF
9067/* end confdefs.h. */
62c9aa5f 9068
62c9aa5f 9069/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9070#ifdef __cplusplus
9071extern "C"
9072#endif
62c9aa5f 9073/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9074 builtin and then its argument prototype would still apply. */
9075char ldexp ();
9076int
9077main ()
9078{
9079ldexp ();
9080 ;
9081 return 0;
9082}
9083_ACEOF
9084rm -f conftest.$ac_objext conftest$ac_exeext
9085if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9086 (eval $ac_link) 2>conftest.er1
ba479fd2 9087 ac_status=$?
86da66b5
HPN
9088 grep -v '^ *+' conftest.er1 >conftest.err
9089 rm -f conftest.er1
9090 cat conftest.err >&5
ba479fd2
NN
9091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9092 (exit $ac_status); } &&
ec6c7392
PB
9093 { ac_try='test -z "$ac_c_werror_flag"
9094 || test ! -s conftest.err'
86da66b5
HPN
9095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9096 (eval $ac_try) 2>&5
9097 ac_status=$?
9098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9099 (exit $ac_status); }; } &&
9100 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9102 (eval $ac_try) 2>&5
9103 ac_status=$?
9104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9105 (exit $ac_status); }; }; then
62c9aa5f
ZW
9106 ac_cv_search_ldexp="none required"
9107else
ba479fd2
NN
9108 echo "$as_me: failed program was:" >&5
9109sed 's/^/| /' conftest.$ac_ext >&5
9110
62c9aa5f 9111fi
86da66b5
HPN
9112rm -f conftest.err conftest.$ac_objext \
9113 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9114if test "$ac_cv_search_ldexp" = no; then
9115 for ac_lib in m; do
9116 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9117 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9118/* confdefs.h. */
9119_ACEOF
9120cat confdefs.h >>conftest.$ac_ext
9121cat >>conftest.$ac_ext <<_ACEOF
9122/* end confdefs.h. */
9123
62c9aa5f 9124/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9125#ifdef __cplusplus
9126extern "C"
9127#endif
62c9aa5f 9128/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9129 builtin and then its argument prototype would still apply. */
9130char ldexp ();
9131int
9132main ()
9133{
9134ldexp ();
9135 ;
9136 return 0;
9137}
9138_ACEOF
9139rm -f conftest.$ac_objext conftest$ac_exeext
9140if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9141 (eval $ac_link) 2>conftest.er1
ba479fd2 9142 ac_status=$?
86da66b5
HPN
9143 grep -v '^ *+' conftest.er1 >conftest.err
9144 rm -f conftest.er1
9145 cat conftest.err >&5
ba479fd2
NN
9146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9147 (exit $ac_status); } &&
ec6c7392
PB
9148 { ac_try='test -z "$ac_c_werror_flag"
9149 || test ! -s conftest.err'
86da66b5
HPN
9150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9151 (eval $ac_try) 2>&5
9152 ac_status=$?
9153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9154 (exit $ac_status); }; } &&
9155 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9157 (eval $ac_try) 2>&5
9158 ac_status=$?
9159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9160 (exit $ac_status); }; }; then
9161 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
9162break
9163else
ba479fd2
NN
9164 echo "$as_me: failed program was:" >&5
9165sed 's/^/| /' conftest.$ac_ext >&5
9166
cafe096b 9167fi
86da66b5
HPN
9168rm -f conftest.err conftest.$ac_objext \
9169 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9170 done
6e3f3080 9171fi
ba479fd2
NN
9172LIBS=$ac_func_search_save_LIBS
9173fi
9174echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
9175echo "${ECHO_T}$ac_cv_search_ldexp" >&6
9176if test "$ac_cv_search_ldexp" != no; then
63cf211a 9177 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 9178
62c9aa5f 9179fi
ba479fd2 9180
62c9aa5f
ZW
9181LDEXP_LIB="$LIBS"
9182LIBS="$save_LIBS"
9183
9184
956d6950
JL
9185# Use <inttypes.h> only if it exists,
9186# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
9187echo "$as_me:$LINENO: checking for inttypes.h" >&5
9188echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
9189if test "${gcc_cv_header_inttypes_h+set}" = set; then
9190 echo $ECHO_N "(cached) $ECHO_C" >&6
9191else
9192 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9193/* confdefs.h. */
9194_ACEOF
9195cat confdefs.h >>conftest.$ac_ext
9196cat >>conftest.$ac_ext <<_ACEOF
9197/* end confdefs.h. */
956d6950
JL
9198#include <sys/types.h>
9199#include <inttypes.h>
ba479fd2
NN
9200int
9201main ()
9202{
956d6950 9203intmax_t i = -1;
ba479fd2
NN
9204 ;
9205 return 0;
9206}
9207_ACEOF
9208rm -f conftest.$ac_objext
9209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9210 (eval $ac_compile) 2>conftest.er1
ba479fd2 9211 ac_status=$?
86da66b5
HPN
9212 grep -v '^ *+' conftest.er1 >conftest.err
9213 rm -f conftest.er1
9214 cat conftest.err >&5
ba479fd2
NN
9215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9216 (exit $ac_status); } &&
ec6c7392
PB
9217 { ac_try='test -z "$ac_c_werror_flag"
9218 || test ! -s conftest.err'
86da66b5
HPN
9219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9220 (eval $ac_try) 2>&5
9221 ac_status=$?
9222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9223 (exit $ac_status); }; } &&
9224 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9226 (eval $ac_try) 2>&5
9227 ac_status=$?
9228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9229 (exit $ac_status); }; }; then
0056a9b5 9230 gcc_cv_header_inttypes_h=yes
956d6950 9231else
ba479fd2
NN
9232 echo "$as_me: failed program was:" >&5
9233sed 's/^/| /' conftest.$ac_ext >&5
9234
9235gcc_cv_header_inttypes_h=no
956d6950 9236fi
86da66b5 9237rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
9238fi
9239
ba479fd2
NN
9240echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
9241echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 9242if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
9243
9244cat >>confdefs.h <<\_ACEOF
0056a9b5 9245#define HAVE_INTTYPES_H 1
ba479fd2 9246_ACEOF
0056a9b5
KG
9247
9248fi
956d6950 9249
c149cc37 9250
ba479fd2
NN
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
0d667716
KG
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
ba479fd2
NN
9279
9280
9281
9282
9283
9284
9285
9286
52a6edcc 9287for ac_func in times clock kill getrlimit setrlimit atoll atoq \
0d667716
KG
9288 sysconf strsignal getrusage nl_langinfo scandir alphasort \
9289 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9290 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 9291do
ba479fd2
NN
9292as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9293echo "$as_me:$LINENO: checking for $ac_func" >&5
9294echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9295if eval "test \"\${$as_ac_var+set}\" = set"; then
9296 echo $ECHO_N "(cached) $ECHO_C" >&6
9297else
9298 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9299/* confdefs.h. */
9300_ACEOF
9301cat confdefs.h >>conftest.$ac_ext
9302cat >>conftest.$ac_ext <<_ACEOF
9303/* end confdefs.h. */
86da66b5
HPN
9304/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9305 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9306#define $ac_func innocuous_$ac_func
9307
956d6950 9308/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9309 which can conflict with char $ac_func (); below.
9310 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9311 <limits.h> exists even on freestanding compilers. */
86da66b5 9312
ba479fd2
NN
9313#ifdef __STDC__
9314# include <limits.h>
9315#else
9316# include <assert.h>
9317#endif
86da66b5
HPN
9318
9319#undef $ac_func
9320
6e3f3080 9321/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9322#ifdef __cplusplus
9323extern "C"
9324{
9325#endif
6e3f3080 9326/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9327 builtin and then its argument prototype would still apply. */
9328char $ac_func ();
956d6950
JL
9329/* The GNU C library defines this for functions which it implements
9330 to always fail with ENOSYS. Some functions are actually named
9331 something starting with __ and the normal name is an alias. */
9332#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9333choke me
9334#else
ba479fd2
NN
9335char (*f) () = $ac_func;
9336#endif
9337#ifdef __cplusplus
9338}
956d6950
JL
9339#endif
9340
ba479fd2
NN
9341int
9342main ()
9343{
9344return f != $ac_func;
9345 ;
9346 return 0;
9347}
9348_ACEOF
9349rm -f conftest.$ac_objext conftest$ac_exeext
9350if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9351 (eval $ac_link) 2>conftest.er1
ba479fd2 9352 ac_status=$?
86da66b5
HPN
9353 grep -v '^ *+' conftest.er1 >conftest.err
9354 rm -f conftest.er1
9355 cat conftest.err >&5
ba479fd2
NN
9356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9357 (exit $ac_status); } &&
ec6c7392
PB
9358 { ac_try='test -z "$ac_c_werror_flag"
9359 || test ! -s conftest.err'
86da66b5
HPN
9360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9361 (eval $ac_try) 2>&5
9362 ac_status=$?
9363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9364 (exit $ac_status); }; } &&
9365 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9367 (eval $ac_try) 2>&5
9368 ac_status=$?
9369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9370 (exit $ac_status); }; }; then
9371 eval "$as_ac_var=yes"
9372else
9373 echo "$as_me: failed program was:" >&5
9374sed 's/^/| /' conftest.$ac_ext >&5
9375
9376eval "$as_ac_var=no"
9377fi
86da66b5
HPN
9378rm -f conftest.err conftest.$ac_objext \
9379 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9380fi
9381echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9382echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9383if test `eval echo '${'$as_ac_var'}'` = yes; then
9384 cat >>confdefs.h <<_ACEOF
9385#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9386_ACEOF
956d6950 9387
956d6950
JL
9388fi
9389done
9390
6885fc87 9391
39f6c4c8 9392if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
9393 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9394echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
9395if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9396 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9397else
9398 if test "$cross_compiling" = yes; then
9399 gcc_cv_func_mbstowcs_works=yes
9400else
ba479fd2 9401 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9402/* confdefs.h. */
9403_ACEOF
9404cat confdefs.h >>conftest.$ac_ext
9405cat >>conftest.$ac_ext <<_ACEOF
9406/* end confdefs.h. */
39f6c4c8
KW
9407#include <stdlib.h>
9408int main()
9409{
9410 mbstowcs(0, "", 0);
9411 return 0;
9412}
ba479fd2
NN
9413_ACEOF
9414rm -f conftest$ac_exeext
9415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9416 (eval $ac_link) 2>&5
9417 ac_status=$?
9418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9419 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9421 (eval $ac_try) 2>&5
9422 ac_status=$?
9423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9424 (exit $ac_status); }; }; then
39f6c4c8
KW
9425 gcc_cv_func_mbstowcs_works=yes
9426else
ba479fd2
NN
9427 echo "$as_me: program exited with status $ac_status" >&5
9428echo "$as_me: failed program was:" >&5
9429sed 's/^/| /' conftest.$ac_ext >&5
9430
9431( exit $ac_status )
9432gcc_cv_func_mbstowcs_works=no
39f6c4c8 9433fi
86da66b5 9434rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 9435fi
39f6c4c8 9436fi
ba479fd2
NN
9437echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9438echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 9439 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
9440
9441cat >>confdefs.h <<\_ACEOF
39f6c4c8 9442#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 9443_ACEOF
39f6c4c8
KW
9444
9445 fi
9446fi
9447
ba479fd2
NN
9448echo "$as_me:$LINENO: checking for ssize_t" >&5
9449echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
9450if test "${ac_cv_type_ssize_t+set}" = set; then
9451 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 9452else
ba479fd2 9453 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9454/* confdefs.h. */
9455_ACEOF
9456cat confdefs.h >>conftest.$ac_ext
9457cat >>conftest.$ac_ext <<_ACEOF
9458/* end confdefs.h. */
8b4fc07a
NN
9459$ac_includes_default
9460int
9461main ()
9462{
9463if ((ssize_t *) 0)
9464 return 0;
9465if (sizeof (ssize_t))
9466 return 0;
9467 ;
9468 return 0;
9469}
ba479fd2 9470_ACEOF
8b4fc07a
NN
9471rm -f conftest.$ac_objext
9472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9473 (eval $ac_compile) 2>conftest.er1
8b4fc07a 9474 ac_status=$?
86da66b5
HPN
9475 grep -v '^ *+' conftest.er1 >conftest.err
9476 rm -f conftest.er1
9477 cat conftest.err >&5
8b4fc07a
NN
9478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9479 (exit $ac_status); } &&
ec6c7392
PB
9480 { ac_try='test -z "$ac_c_werror_flag"
9481 || test ! -s conftest.err'
86da66b5
HPN
9482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9483 (eval $ac_try) 2>&5
9484 ac_status=$?
9485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9486 (exit $ac_status); }; } &&
9487 { ac_try='test -s conftest.$ac_objext'
8b4fc07a
NN
9488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9489 (eval $ac_try) 2>&5
9490 ac_status=$?
9491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9492 (exit $ac_status); }; }; then
cb65112a 9493 ac_cv_type_ssize_t=yes
f12bc141 9494else
8b4fc07a
NN
9495 echo "$as_me: failed program was:" >&5
9496sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9497
8b4fc07a
NN
9498ac_cv_type_ssize_t=no
9499fi
86da66b5 9500rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9501fi
ba479fd2
NN
9502echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9503echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
9504if test $ac_cv_type_ssize_t = yes; then
9505 :
9506else
ba479fd2 9507
8b4fc07a 9508cat >>confdefs.h <<_ACEOF
f12bc141 9509#define ssize_t int
ba479fd2 9510_ACEOF
f12bc141
ZW
9511
9512fi
9513
0b9d02c6 9514
e256b8b6
DA
9515# Try to determine the array type of the second argument of getgroups
9516# for the target system (int or gid_t).
ba479fd2
NN
9517echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9518echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
9519if test "${ac_cv_type_uid_t+set}" = set; then
9520 echo $ECHO_N "(cached) $ECHO_C" >&6
9521else
9522 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9523/* confdefs.h. */
9524_ACEOF
9525cat confdefs.h >>conftest.$ac_ext
9526cat >>conftest.$ac_ext <<_ACEOF
9527/* end confdefs.h. */
e256b8b6 9528#include <sys/types.h>
ba479fd2
NN
9529
9530_ACEOF
e256b8b6 9531if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9532 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
9533 ac_cv_type_uid_t=yes
9534else
e256b8b6
DA
9535 ac_cv_type_uid_t=no
9536fi
9537rm -f conftest*
9538
9539fi
ba479fd2
NN
9540echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9541echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 9542if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
9543
9544cat >>confdefs.h <<\_ACEOF
e256b8b6 9545#define uid_t int
ba479fd2 9546_ACEOF
cafe096b 9547
ba479fd2
NN
9548
9549cat >>confdefs.h <<\_ACEOF
e256b8b6 9550#define gid_t int
ba479fd2 9551_ACEOF
e256b8b6
DA
9552
9553fi
9554
ba479fd2
NN
9555echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9556echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
9557if test "${ac_cv_type_getgroups+set}" = set; then
9558 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
9559else
9560 if test "$cross_compiling" = yes; then
9561 ac_cv_type_getgroups=cross
9562else
ba479fd2 9563 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9564/* confdefs.h. */
9565_ACEOF
9566cat confdefs.h >>conftest.$ac_ext
9567cat >>conftest.$ac_ext <<_ACEOF
9568/* end confdefs.h. */
e256b8b6
DA
9569/* Thanks to Mike Rendell for this test. */
9570#include <sys/types.h>
9571#define NGID 256
9572#undef MAX
9573#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
9574
9575int
9576main ()
e256b8b6
DA
9577{
9578 gid_t gidset[NGID];
9579 int i, n;
9580 union { gid_t gval; long lval; } val;
9581
9582 val.lval = -1;
9583 for (i = 0; i < NGID; i++)
9584 gidset[i] = val.gval;
9585 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 9586 gidset);
e256b8b6
DA
9587 /* Exit non-zero if getgroups seems to require an array of ints. This
9588 happens when gid_t is short but getgroups modifies an array of ints. */
9589 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 9590}
ba479fd2
NN
9591_ACEOF
9592rm -f conftest$ac_exeext
9593if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9594 (eval $ac_link) 2>&5
9595 ac_status=$?
9596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9597 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9599 (eval $ac_try) 2>&5
9600 ac_status=$?
9601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9602 (exit $ac_status); }; }; then
9603 ac_cv_type_getgroups=gid_t
63cf211a 9604else
ba479fd2
NN
9605 echo "$as_me: program exited with status $ac_status" >&5
9606echo "$as_me: failed program was:" >&5
9607sed 's/^/| /' conftest.$ac_ext >&5
9608
9609( exit $ac_status )
9610ac_cv_type_getgroups=int
e256b8b6 9611fi
86da66b5 9612rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 9613fi
e256b8b6 9614if test $ac_cv_type_getgroups = cross; then
ba479fd2 9615 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9616/* confdefs.h. */
9617_ACEOF
9618cat confdefs.h >>conftest.$ac_ext
9619cat >>conftest.$ac_ext <<_ACEOF
9620/* end confdefs.h. */
e256b8b6 9621#include <unistd.h>
ba479fd2
NN
9622
9623_ACEOF
e256b8b6 9624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9625 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
9626 ac_cv_type_getgroups=gid_t
9627else
e256b8b6
DA
9628 ac_cv_type_getgroups=int
9629fi
9630rm -f conftest*
9631
9632fi
9633fi
ba479fd2
NN
9634echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9635echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 9636
ba479fd2 9637cat >>confdefs.h <<_ACEOF
e256b8b6 9638#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 9639_ACEOF
e256b8b6
DA
9640
9641
9642if test "${target}" = "${build}"; then
9643 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9644else
9645 case "${target}" in
9646 # This condition may need some tweaking. It should include all
9647 # targets where the array type of the second argument of getgroups
9648 # is int and the type of gid_t is not equivalent to int.
9649 *-*-sunos* | *-*-ultrix*)
9650 TARGET_GETGROUPS_T=int
9651 ;;
9652 *)
9653 TARGET_GETGROUPS_T=gid_t
9654 ;;
9655 esac
9656fi
9657
9658
3b0727a0 9659
18fc9bd4 9660echo "$as_me:$LINENO: checking for sys/mman.h" >&5
3b0727a0
MR
9661echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
9662if test "${ac_cv_header_sys_mman_h+set}" = set; then
9663 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 9664else
18fc9bd4 9665 cat >conftest.$ac_ext <<_ACEOF
3b0727a0
MR
9666/* confdefs.h. */
9667_ACEOF
9668cat confdefs.h >>conftest.$ac_ext
9669cat >>conftest.$ac_ext <<_ACEOF
9670/* end confdefs.h. */
9671#include <sys/mman.h>
9672_ACEOF
9673if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9674 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9675 ac_status=$?
9676 grep -v '^ *+' conftest.er1 >conftest.err
9677 rm -f conftest.er1
9678 cat conftest.err >&5
9679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9680 (exit $ac_status); } >/dev/null; then
9681 if test -s conftest.err; then
9682 ac_cpp_err=$ac_c_preproc_warn_flag
9683 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9684 else
9685 ac_cpp_err=
9686 fi
9687else
9688 ac_cpp_err=yes
9689fi
9690if test -z "$ac_cpp_err"; then
18fc9bd4 9691 ac_cv_header_sys_mman_h=yes
3b0727a0
MR
9692else
9693 echo "$as_me: failed program was:" >&5
9694sed 's/^/| /' conftest.$ac_ext >&5
9695
18fc9bd4 9696 ac_cv_header_sys_mman_h=no
3b0727a0
MR
9697fi
9698rm -f conftest.err conftest.$ac_ext
9699fi
9700echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9701echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
9702if test $ac_cv_header_sys_mman_h = yes; then
9703 gcc_header_sys_mman_h=yes
9704else
9705 gcc_header_sys_mman_h=no
9706fi
9707
9708echo "$as_me:$LINENO: checking for mmap" >&5
9709echo $ECHO_N "checking for mmap... $ECHO_C" >&6
9710if test "${ac_cv_func_mmap+set}" = set; then
9711 echo $ECHO_N "(cached) $ECHO_C" >&6
9712else
9713 cat >conftest.$ac_ext <<_ACEOF
9714/* confdefs.h. */
9715_ACEOF
9716cat confdefs.h >>conftest.$ac_ext
9717cat >>conftest.$ac_ext <<_ACEOF
9718/* end confdefs.h. */
9719/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9720 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9721#define mmap innocuous_mmap
9722
9723/* System header to define __stub macros and hopefully few prototypes,
9724 which can conflict with char mmap (); below.
9725 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9726 <limits.h> exists even on freestanding compilers. */
9727
9728#ifdef __STDC__
9729# include <limits.h>
9730#else
9731# include <assert.h>
9732#endif
9733
9734#undef mmap
9735
9736/* Override any gcc2 internal prototype to avoid an error. */
9737#ifdef __cplusplus
9738extern "C"
9739{
9740#endif
9741/* We use char because int might match the return type of a gcc2
9742 builtin and then its argument prototype would still apply. */
9743char mmap ();
9744/* The GNU C library defines this for functions which it implements
9745 to always fail with ENOSYS. Some functions are actually named
9746 something starting with __ and the normal name is an alias. */
9747#if defined (__stub_mmap) || defined (__stub___mmap)
9748choke me
9749#else
9750char (*f) () = mmap;
9751#endif
9752#ifdef __cplusplus
9753}
9754#endif
9755
9756int
9757main ()
9758{
9759return f != mmap;
9760 ;
9761 return 0;
9762}
9763_ACEOF
9764rm -f conftest.$ac_objext conftest$ac_exeext
9765if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9766 (eval $ac_link) 2>conftest.er1
9767 ac_status=$?
9768 grep -v '^ *+' conftest.er1 >conftest.err
9769 rm -f conftest.er1
9770 cat conftest.err >&5
9771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772 (exit $ac_status); } &&
ec6c7392
PB
9773 { ac_try='test -z "$ac_c_werror_flag"
9774 || test ! -s conftest.err'
3b0727a0
MR
9775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9776 (eval $ac_try) 2>&5
9777 ac_status=$?
9778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9779 (exit $ac_status); }; } &&
9780 { ac_try='test -s conftest$ac_exeext'
9781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9782 (eval $ac_try) 2>&5
9783 ac_status=$?
9784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9785 (exit $ac_status); }; }; then
9786 ac_cv_func_mmap=yes
9787else
9788 echo "$as_me: failed program was:" >&5
9789sed 's/^/| /' conftest.$ac_ext >&5
9790
9791ac_cv_func_mmap=no
9792fi
9793rm -f conftest.err conftest.$ac_objext \
9794 conftest$ac_exeext conftest.$ac_ext
9795fi
9796echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9797echo "${ECHO_T}$ac_cv_func_mmap" >&6
9798if test $ac_cv_func_mmap = yes; then
9799 gcc_func_mmap=yes
9800else
9801 gcc_func_mmap=no
9802fi
9803
9804if test "$gcc_header_sys_mman_h" != yes \
9805 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
9806 gcc_cv_func_mmap_file=no
9807 gcc_cv_func_mmap_dev_zero=no
9808 gcc_cv_func_mmap_anon=no
9809else
ba479fd2
NN
9810 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9811echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
9812if test "${gcc_cv_func_mmap_file+set}" = set; then
9813 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 9814else
ba479fd2 9815 # Add a system to this blacklist if
1072ec3f
ZW
9816 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9817 # memory area containing the same data that you'd get if you applied
9818 # read() to the same fd. The only system known to have a problem here
9819 # is VMS, where text files have record structure.
9820 case "$host_os" in
ba479fd2 9821 vms* | ultrix*)
1072ec3f
ZW
9822 gcc_cv_func_mmap_file=no ;;
9823 *)
9824 gcc_cv_func_mmap_file=yes;;
9825 esac
9826fi
ba479fd2
NN
9827echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9828echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9829 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9830echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
9831if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9832 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9833else
9834 # Add a system to this blacklist if it has mmap() but /dev/zero
9835 # does not exist, or if mmapping /dev/zero does not give anonymous
9836 # zeroed pages with both the following properties:
9837 # 1. If you map N consecutive pages in with one call, and then
9838 # unmap any subset of those pages, the pages that were not
9839 # explicitly unmapped remain accessible.
9840 # 2. If you map two adjacent blocks of memory and then unmap them
9841 # both at once, they must both go away.
9842 # Systems known to be in this category are Windows (all variants),
9843 # VMS, and Darwin.
9844 case "$host_os" in
2ce240d3 9845 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
9846 gcc_cv_func_mmap_dev_zero=no ;;
9847 *)
9848 gcc_cv_func_mmap_dev_zero=yes;;
9849 esac
9850fi
ba479fd2
NN
9851echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9852echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
9853
9854 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
9855 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9856echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
9857if test "${gcc_cv_decl_map_anon+set}" = set; then
9858 echo $ECHO_N "(cached) $ECHO_C" >&6
9859else
9860 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9861/* confdefs.h. */
9862_ACEOF
9863cat confdefs.h >>conftest.$ac_ext
9864cat >>conftest.$ac_ext <<_ACEOF
9865/* end confdefs.h. */
1072ec3f
ZW
9866#include <sys/types.h>
9867#include <sys/mman.h>
9868#include <unistd.h>
9869
9870#ifndef MAP_ANONYMOUS
9871#define MAP_ANONYMOUS MAP_ANON
9872#endif
9873
ba479fd2
NN
9874int
9875main ()
9876{
1072ec3f 9877int n = MAP_ANONYMOUS;
ba479fd2
NN
9878 ;
9879 return 0;
9880}
9881_ACEOF
9882rm -f conftest.$ac_objext
9883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9884 (eval $ac_compile) 2>conftest.er1
ba479fd2 9885 ac_status=$?
86da66b5
HPN
9886 grep -v '^ *+' conftest.er1 >conftest.err
9887 rm -f conftest.er1
9888 cat conftest.err >&5
ba479fd2
NN
9889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9890 (exit $ac_status); } &&
ec6c7392
PB
9891 { ac_try='test -z "$ac_c_werror_flag"
9892 || test ! -s conftest.err'
86da66b5
HPN
9893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9894 (eval $ac_try) 2>&5
9895 ac_status=$?
9896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9897 (exit $ac_status); }; } &&
9898 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9900 (eval $ac_try) 2>&5
9901 ac_status=$?
9902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9903 (exit $ac_status); }; }; then
1072ec3f
ZW
9904 gcc_cv_decl_map_anon=yes
9905else
ba479fd2
NN
9906 echo "$as_me: failed program was:" >&5
9907sed 's/^/| /' conftest.$ac_ext >&5
9908
9909gcc_cv_decl_map_anon=no
1072ec3f 9910fi
86da66b5 9911rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 9912fi
ba479fd2
NN
9913echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9914echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
9915
9916 if test $gcc_cv_decl_map_anon = no; then
9917 gcc_cv_func_mmap_anon=no
9918 else
ba479fd2
NN
9919 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9920echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
9921if test "${gcc_cv_func_mmap_anon+set}" = set; then
9922 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9923else
9924 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9925 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9926 # doesn't give anonymous zeroed pages with the same properties listed
9927 # above for use of /dev/zero.
9928 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9929 case "$host_os" in
9930 vms* | cygwin* | pe | mingw* | sco* | udk* )
9931 gcc_cv_func_mmap_anon=no ;;
9932 *)
9933 gcc_cv_func_mmap_anon=yes;;
9934 esac
9935fi
ba479fd2
NN
9936echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9937echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
9938 fi
9939fi
9940
9941if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
9942
9943cat >>confdefs.h <<\_ACEOF
1072ec3f 9944#define HAVE_MMAP_FILE 1
ba479fd2 9945_ACEOF
1072ec3f
ZW
9946
9947fi
9948if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
9949
9950cat >>confdefs.h <<\_ACEOF
1072ec3f 9951#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 9952_ACEOF
1072ec3f
ZW
9953
9954fi
9955if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
9956
9957cat >>confdefs.h <<\_ACEOF
1072ec3f 9958#define HAVE_MMAP_ANON 1
ba479fd2 9959_ACEOF
1072ec3f
ZW
9960
9961fi
9962
b27d2bd5
MK
9963
9964case "${host}" in
ee262b6f 9965*-*-*vms*)
ba479fd2 9966 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
9967 # won't work, and it isn't easily adaptable. It makes more sense to
9968 # just force it.
9969 ac_cv_func_vfork_works=yes
9970 ;;
b27d2bd5 9971esac
ba479fd2
NN
9972echo "$as_me:$LINENO: checking for pid_t" >&5
9973echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
9974if test "${ac_cv_type_pid_t+set}" = set; then
9975 echo $ECHO_N "(cached) $ECHO_C" >&6
9976else
9977 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9978/* confdefs.h. */
9979_ACEOF
9980cat confdefs.h >>conftest.$ac_ext
9981cat >>conftest.$ac_ext <<_ACEOF
9982/* end confdefs.h. */
9983$ac_includes_default
9984int
9985main ()
9986{
9987if ((pid_t *) 0)
9988 return 0;
9989if (sizeof (pid_t))
9990 return 0;
9991 ;
9992 return 0;
9993}
9994_ACEOF
9995rm -f conftest.$ac_objext
9996if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9997 (eval $ac_compile) 2>conftest.er1
ba479fd2 9998 ac_status=$?
86da66b5
HPN
9999 grep -v '^ *+' conftest.er1 >conftest.err
10000 rm -f conftest.er1
10001 cat conftest.err >&5
ba479fd2
NN
10002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10003 (exit $ac_status); } &&
ec6c7392
PB
10004 { ac_try='test -z "$ac_c_werror_flag"
10005 || test ! -s conftest.err'
86da66b5
HPN
10006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10007 (eval $ac_try) 2>&5
10008 ac_status=$?
10009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10010 (exit $ac_status); }; } &&
10011 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
10012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10013 (eval $ac_try) 2>&5
10014 ac_status=$?
10015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10016 (exit $ac_status); }; }; then
cb65112a 10017 ac_cv_type_pid_t=yes
c375c43b 10018else
ba479fd2
NN
10019 echo "$as_me: failed program was:" >&5
10020sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10021
ba479fd2
NN
10022ac_cv_type_pid_t=no
10023fi
86da66b5 10024rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10025fi
ba479fd2
NN
10026echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10027echo "${ECHO_T}$ac_cv_type_pid_t" >&6
10028if test $ac_cv_type_pid_t = yes; then
10029 :
10030else
10031
10032cat >>confdefs.h <<_ACEOF
c375c43b 10033#define pid_t int
ba479fd2 10034_ACEOF
c375c43b
KG
10035
10036fi
10037
ba479fd2
NN
10038
10039
10040for ac_header in unistd.h vfork.h
10041do
10042as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18fc9bd4 10043echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
10044echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10045if eval "test \"\${$as_ac_Header+set}\" = set"; then
10046 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10047else
18fc9bd4 10048 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10049/* confdefs.h. */
10050_ACEOF
10051cat confdefs.h >>conftest.$ac_ext
10052cat >>conftest.$ac_ext <<_ACEOF
10053/* end confdefs.h. */
10054#include <$ac_header>
10055_ACEOF
10056if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10057 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10058 ac_status=$?
10059 grep -v '^ *+' conftest.er1 >conftest.err
10060 rm -f conftest.er1
10061 cat conftest.err >&5
10062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10063 (exit $ac_status); } >/dev/null; then
10064 if test -s conftest.err; then
10065 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 10066 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
10067 else
10068 ac_cpp_err=
10069 fi
093e61a6 10070else
ba479fd2
NN
10071 ac_cpp_err=yes
10072fi
10073if test -z "$ac_cpp_err"; then
18fc9bd4 10074 eval "$as_ac_Header=yes"
ba479fd2
NN
10075else
10076 echo "$as_me: failed program was:" >&5
10077sed 's/^/| /' conftest.$ac_ext >&5
10078
18fc9bd4 10079 eval "$as_ac_Header=no"
ba479fd2
NN
10080fi
10081rm -f conftest.err conftest.$ac_ext
c375c43b 10082fi
ba479fd2
NN
10083echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10084echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
10085if test `eval echo '${'$as_ac_Header'}'` = yes; then
10086 cat >>confdefs.h <<_ACEOF
10087#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10088_ACEOF
6e3f3080
NN
10089
10090fi
ba479fd2
NN
10091done
10092
10093
10094
10095for ac_func in fork vfork
10096do
10097as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10098echo "$as_me:$LINENO: checking for $ac_func" >&5
10099echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10100if eval "test \"\${$as_ac_var+set}\" = set"; then
10101 echo $ECHO_N "(cached) $ECHO_C" >&6
10102else
10103 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10104/* confdefs.h. */
10105_ACEOF
10106cat confdefs.h >>conftest.$ac_ext
10107cat >>conftest.$ac_ext <<_ACEOF
10108/* end confdefs.h. */
86da66b5
HPN
10109/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10110 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10111#define $ac_func innocuous_$ac_func
10112
c375c43b 10113/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10114 which can conflict with char $ac_func (); below.
10115 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10116 <limits.h> exists even on freestanding compilers. */
86da66b5 10117
ba479fd2
NN
10118#ifdef __STDC__
10119# include <limits.h>
10120#else
10121# include <assert.h>
10122#endif
86da66b5
HPN
10123
10124#undef $ac_func
10125
6e3f3080 10126/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
10127#ifdef __cplusplus
10128extern "C"
10129{
10130#endif
6e3f3080 10131/* We use char because int might match the return type of a gcc2
ba479fd2
NN
10132 builtin and then its argument prototype would still apply. */
10133char $ac_func ();
c375c43b
KG
10134/* The GNU C library defines this for functions which it implements
10135 to always fail with ENOSYS. Some functions are actually named
10136 something starting with __ and the normal name is an alias. */
ba479fd2 10137#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
10138choke me
10139#else
ba479fd2
NN
10140char (*f) () = $ac_func;
10141#endif
10142#ifdef __cplusplus
10143}
c375c43b
KG
10144#endif
10145
ba479fd2
NN
10146int
10147main ()
10148{
10149return f != $ac_func;
10150 ;
10151 return 0;
10152}
10153_ACEOF
10154rm -f conftest.$ac_objext conftest$ac_exeext
10155if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10156 (eval $ac_link) 2>conftest.er1
ba479fd2 10157 ac_status=$?
86da66b5
HPN
10158 grep -v '^ *+' conftest.er1 >conftest.err
10159 rm -f conftest.er1
10160 cat conftest.err >&5
ba479fd2
NN
10161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10162 (exit $ac_status); } &&
ec6c7392
PB
10163 { ac_try='test -z "$ac_c_werror_flag"
10164 || test ! -s conftest.err'
86da66b5
HPN
10165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10166 (eval $ac_try) 2>&5
10167 ac_status=$?
10168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10169 (exit $ac_status); }; } &&
10170 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10172 (eval $ac_try) 2>&5
10173 ac_status=$?
10174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10175 (exit $ac_status); }; }; then
10176 eval "$as_ac_var=yes"
10177else
10178 echo "$as_me: failed program was:" >&5
10179sed 's/^/| /' conftest.$ac_ext >&5
10180
10181eval "$as_ac_var=no"
10182fi
86da66b5
HPN
10183rm -f conftest.err conftest.$ac_objext \
10184 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
10185fi
10186echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10187echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10188if test `eval echo '${'$as_ac_var'}'` = yes; then
10189 cat >>confdefs.h <<_ACEOF
10190#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10191_ACEOF
10192
c375c43b 10193fi
ba479fd2 10194done
c375c43b 10195
ba479fd2
NN
10196if test "x$ac_cv_func_fork" = xyes; then
10197 echo "$as_me:$LINENO: checking for working fork" >&5
10198echo $ECHO_N "checking for working fork... $ECHO_C" >&6
10199if test "${ac_cv_func_fork_works+set}" = set; then
10200 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10201else
ba479fd2
NN
10202 if test "$cross_compiling" = yes; then
10203 ac_cv_func_fork_works=cross
10204else
10205 cat >conftest.$ac_ext <<_ACEOF
ec6c7392
PB
10206/* By Ruediger Kuhlmann. */
10207 #include <sys/types.h>
10208 #if HAVE_UNISTD_H
10209 # include <unistd.h>
10210 #endif
10211 /* Some systems only have a dummy stub for fork() */
10212 int main ()
10213 {
10214 if (fork() < 0)
10215 exit (1);
10216 exit (0);
10217 }
ba479fd2
NN
10218_ACEOF
10219rm -f conftest$ac_exeext
10220if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10221 (eval $ac_link) 2>&5
10222 ac_status=$?
10223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10224 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10226 (eval $ac_try) 2>&5
10227 ac_status=$?
10228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10229 (exit $ac_status); }; }; then
10230 ac_cv_func_fork_works=yes
10231else
10232 echo "$as_me: program exited with status $ac_status" >&5
10233echo "$as_me: failed program was:" >&5
10234sed 's/^/| /' conftest.$ac_ext >&5
10235
10236( exit $ac_status )
10237ac_cv_func_fork_works=no
10238fi
86da66b5 10239rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
10240fi
10241fi
10242echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10243echo "${ECHO_T}$ac_cv_func_fork_works" >&6
10244
10245else
10246 ac_cv_func_fork_works=$ac_cv_func_fork
10247fi
10248if test "x$ac_cv_func_fork_works" = xcross; then
10249 case $host in
10250 *-*-amigaos* | *-*-msdosdjgpp*)
10251 # Override, as these systems have only a dummy fork() stub
10252 ac_cv_func_fork_works=no
10253 ;;
10254 *)
10255 ac_cv_func_fork_works=yes
10256 ;;
10257 esac
10258 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10259echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 10260fi
c375c43b 10261ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10262if test "x$ac_cv_func_vfork" = xyes; then
10263 echo "$as_me:$LINENO: checking for working vfork" >&5
10264echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
10265if test "${ac_cv_func_vfork_works+set}" = set; then
10266 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10267else
ba479fd2
NN
10268 if test "$cross_compiling" = yes; then
10269 ac_cv_func_vfork_works=cross
10270else
10271 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10272/* confdefs.h. */
10273_ACEOF
10274cat confdefs.h >>conftest.$ac_ext
10275cat >>conftest.$ac_ext <<_ACEOF
10276/* end confdefs.h. */
c375c43b
KG
10277/* Thanks to Paul Eggert for this test. */
10278#include <stdio.h>
ba479fd2 10279#include <stdlib.h>
c375c43b
KG
10280#include <sys/types.h>
10281#include <sys/stat.h>
ba479fd2
NN
10282#include <sys/wait.h>
10283#if HAVE_UNISTD_H
10284# include <unistd.h>
c375c43b 10285#endif
ba479fd2
NN
10286#if HAVE_VFORK_H
10287# include <vfork.h>
c375c43b
KG
10288#endif
10289/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
10290 argument registers are propagated back to the parent. The compiler
10291 is told about this with #include <vfork.h>, but some compilers
10292 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10293 static variable whose address is put into a register that is
10294 clobbered by the vfork. */
10295static void
c375c43b
KG
10296#ifdef __cplusplus
10297sparc_address_test (int arg)
ba479fd2 10298# else
c375c43b
KG
10299sparc_address_test (arg) int arg;
10300#endif
10301{
10302 static pid_t child;
10303 if (!child) {
10304 child = vfork ();
10305 if (child < 0) {
10306 perror ("vfork");
10307 _exit(2);
10308 }
10309 if (!child) {
10310 arg = getpid();
10311 write(-1, "", 0);
10312 _exit (arg);
10313 }
10314 }
10315}
ba479fd2
NN
10316
10317int
10318main ()
10319{
c375c43b
KG
10320 pid_t parent = getpid ();
10321 pid_t child;
10322
ba479fd2 10323 sparc_address_test (0);
c375c43b
KG
10324
10325 child = vfork ();
10326
10327 if (child == 0) {
ba479fd2
NN
10328 /* Here is another test for sparc vfork register problems. This
10329 test uses lots of local variables, at least as many local
10330 variables as main has allocated so far including compiler
10331 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10332 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10333 reuse the register of parent for one of the local variables,
10334 since it will think that parent can't possibly be used any more
10335 in this routine. Assigning to the local variable will thus
10336 munge parent in the parent process. */
c375c43b
KG
10337 pid_t
10338 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10339 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10340 /* Convince the compiler that p..p7 are live; otherwise, it might
10341 use the same hardware register for all 8 local variables. */
10342 if (p != p1 || p != p2 || p != p3 || p != p4
10343 || p != p5 || p != p6 || p != p7)
10344 _exit(1);
10345
ba479fd2
NN
10346 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10347 from child file descriptors. If the child closes a descriptor
10348 before it execs or exits, this munges the parent's descriptor
10349 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10350 _exit(close(fileno(stdout)) != 0);
10351 } else {
10352 int status;
10353 struct stat st;
10354
10355 while (wait(&status) != child)
10356 ;
10357 exit(
10358 /* Was there some problem with vforking? */
10359 child < 0
10360
10361 /* Did the child fail? (This shouldn't happen.) */
10362 || status
10363
10364 /* Did the vfork/compiler bug occur? */
10365 || parent != getpid()
10366
10367 /* Did the file descriptor bug occur? */
10368 || fstat(fileno(stdout), &st) != 0
10369 );
10370 }
10371}
ba479fd2
NN
10372_ACEOF
10373rm -f conftest$ac_exeext
10374if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10375 (eval $ac_link) 2>&5
10376 ac_status=$?
10377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10378 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10380 (eval $ac_try) 2>&5
10381 ac_status=$?
10382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10383 (exit $ac_status); }; }; then
c375c43b
KG
10384 ac_cv_func_vfork_works=yes
10385else
ba479fd2
NN
10386 echo "$as_me: program exited with status $ac_status" >&5
10387echo "$as_me: failed program was:" >&5
10388sed 's/^/| /' conftest.$ac_ext >&5
10389
10390( exit $ac_status )
10391ac_cv_func_vfork_works=no
cafe096b 10392fi
86da66b5 10393rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10394fi
ba479fd2
NN
10395fi
10396echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10397echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 10398
ba479fd2
NN
10399fi;
10400if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 10401 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10402 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10403echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
10404fi
10405
ba479fd2
NN
10406if test "x$ac_cv_func_vfork_works" = xyes; then
10407
10408cat >>confdefs.h <<\_ACEOF
10409#define HAVE_WORKING_VFORK 1
10410_ACEOF
10411
10412else
10413
10414cat >>confdefs.h <<\_ACEOF
c375c43b 10415#define vfork fork
ba479fd2 10416_ACEOF
c375c43b
KG
10417
10418fi
ba479fd2
NN
10419if test "x$ac_cv_func_fork_works" = xyes; then
10420
10421cat >>confdefs.h <<\_ACEOF
10422#define HAVE_WORKING_FORK 1
10423_ACEOF
10424
10425fi
10426
c375c43b 10427
81bf3d9e 10428
dfb77e37
KC
10429 if test "X$prefix" = "XNONE"; then
10430 acl_final_prefix="$ac_default_prefix"
10431 else
10432 acl_final_prefix="$prefix"
10433 fi
10434 if test "X$exec_prefix" = "XNONE"; then
10435 acl_final_exec_prefix='${prefix}'
10436 else
10437 acl_final_exec_prefix="$exec_prefix"
10438 fi
10439 acl_save_prefix="$prefix"
10440 prefix="$acl_final_prefix"
10441 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10442 prefix="$acl_save_prefix"
f91abfce
TT
10443
10444
dfb77e37
KC
10445# Check whether --with-gnu-ld or --without-gnu-ld was given.
10446if test "${with_gnu_ld+set}" = set; then
10447 withval="$with_gnu_ld"
10448 test "$withval" = no || with_gnu_ld=yes
ba479fd2 10449else
dfb77e37
KC
10450 with_gnu_ld=no
10451fi;
10452# Prepare PATH_SEPARATOR.
10453# The user is always right.
10454if test "${PATH_SEPARATOR+set}" != set; then
10455 echo "#! /bin/sh" >conf$$.sh
10456 echo "exit 0" >>conf$$.sh
10457 chmod +x conf$$.sh
10458 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10459 PATH_SEPARATOR=';'
ba479fd2 10460 else
dfb77e37 10461 PATH_SEPARATOR=:
ba479fd2 10462 fi
dfb77e37
KC
10463 rm -f conf$$.sh
10464fi
10465ac_prog=ld
10466if test "$GCC" = yes; then
10467 # Check if gcc -print-prog-name=ld gives a path.
10468 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10469echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10470 case $host in
10471 *-*-mingw*)
10472 # gcc leaves a trailing carriage return which upsets mingw
10473 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10474 *)
10475 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10476 esac
10477 case $ac_prog in
10478 # Accept absolute paths.
10479 [\\/]* | [A-Za-z]:[\\/]*)
10480 re_direlt='/[^/][^/]*/\.\./'
10481 # Canonicalize the path of ld
10482 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10483 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10484 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10485 done
10486 test -z "$LD" && LD="$ac_prog"
10487 ;;
10488 "")
10489 # If it fails, then pretend we aren't using GCC.
10490 ac_prog=ld
10491 ;;
10492 *)
10493 # If it is relative, then search for the first ld in PATH.
10494 with_gnu_ld=unknown
10495 ;;
10496 esac
10497elif test "$with_gnu_ld" = yes; then
10498 echo "$as_me:$LINENO: checking for GNU ld" >&5
10499echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 10500else
dfb77e37
KC
10501 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10502echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 10503fi
dfb77e37
KC
10504if test "${acl_cv_path_LD+set}" = set; then
10505 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 10506else
dfb77e37
KC
10507 if test -z "$LD"; then
10508 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10509 for ac_dir in $PATH; do
10510 test -z "$ac_dir" && ac_dir=.
10511 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10512 acl_cv_path_LD="$ac_dir/$ac_prog"
10513 # Check to see if the program is GNU ld. I'd rather use --version,
10514 # but apparently some GNU ld's only accept -v.
10515 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
10516 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10517 test "$with_gnu_ld" != no && break
10518 else
10519 test "$with_gnu_ld" != yes && break
10520 fi
dfb77e37
KC
10521 fi
10522 done
10523 IFS="$ac_save_ifs"
10524else
10525 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10526fi
10527fi
ba479fd2 10528
dfb77e37
KC
10529LD="$acl_cv_path_LD"
10530if test -n "$LD"; then
10531 echo "$as_me:$LINENO: result: $LD" >&5
10532echo "${ECHO_T}$LD" >&6
10533else
10534 echo "$as_me:$LINENO: result: no" >&5
10535echo "${ECHO_T}no" >&6
ba479fd2 10536fi
dfb77e37
KC
10537test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10538echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10539 { (exit 1); exit 1; }; }
10540echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10541echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10542if test "${acl_cv_prog_gnu_ld+set}" = set; then
10543 echo $ECHO_N "(cached) $ECHO_C" >&6
10544else
10545 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
10546if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10547 acl_cv_prog_gnu_ld=yes
10548else
10549 acl_cv_prog_gnu_ld=no
10550fi
dfb77e37
KC
10551fi
10552echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10553echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10554with_gnu_ld=$acl_cv_prog_gnu_ld
10555
10556
10557
10558 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10559echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10560if test "${acl_cv_rpath+set}" = set; then
10561 echo $ECHO_N "(cached) $ECHO_C" >&6
10562else
10563
10564 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10565 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10566 . ./conftest.sh
10567 rm -f ./conftest.sh
10568 acl_cv_rpath=done
ba479fd2 10569
eb158727 10570fi
dfb77e37
KC
10571echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10572echo "${ECHO_T}$acl_cv_rpath" >&6
10573 wl="$acl_cv_wl"
10574 libext="$acl_cv_libext"
10575 shlibext="$acl_cv_shlibext"
10576 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10577 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10578 hardcode_direct="$acl_cv_hardcode_direct"
10579 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10580 # Check whether --enable-rpath or --disable-rpath was given.
10581if test "${enable_rpath+set}" = set; then
10582 enableval="$enable_rpath"
10583 :
10584else
10585 enable_rpath=yes
10586fi;
10587
10588
10589
10590
10591
10592
10593
10594 use_additional=yes
10595
10596 acl_save_prefix="$prefix"
10597 prefix="$acl_final_prefix"
10598 acl_save_exec_prefix="$exec_prefix"
10599 exec_prefix="$acl_final_exec_prefix"
10600
10601 eval additional_includedir=\"$includedir\"
10602 eval additional_libdir=\"$libdir\"
10603
10604 exec_prefix="$acl_save_exec_prefix"
10605 prefix="$acl_save_prefix"
10606
10607
10608# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10609if test "${with_libiconv_prefix+set}" = set; then
10610 withval="$with_libiconv_prefix"
10611
10612 if test "X$withval" = "Xno"; then
10613 use_additional=no
10614 else
10615 if test "X$withval" = "X"; then
10616
10617 acl_save_prefix="$prefix"
10618 prefix="$acl_final_prefix"
10619 acl_save_exec_prefix="$exec_prefix"
10620 exec_prefix="$acl_final_exec_prefix"
10621
10622 eval additional_includedir=\"$includedir\"
10623 eval additional_libdir=\"$libdir\"
10624
10625 exec_prefix="$acl_save_exec_prefix"
10626 prefix="$acl_save_prefix"
10627
10628 else
10629 additional_includedir="$withval/include"
10630 additional_libdir="$withval/lib"
10631 fi
10632 fi
10633
10634fi;
10635 LIBICONV=
10636 LTLIBICONV=
10637 INCICONV=
10638 rpathdirs=
10639 ltrpathdirs=
10640 names_already_handled=
10641 names_next_round='iconv '
10642 while test -n "$names_next_round"; do
10643 names_this_round="$names_next_round"
10644 names_next_round=
10645 for name in $names_this_round; do
10646 already_handled=
10647 for n in $names_already_handled; do
10648 if test "$n" = "$name"; then
10649 already_handled=yes
10650 break
10651 fi
10652 done
10653 if test -z "$already_handled"; then
10654 names_already_handled="$names_already_handled $name"
10655 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10656 eval value=\"\$HAVE_LIB$uppername\"
10657 if test -n "$value"; then
10658 if test "$value" = yes; then
10659 eval value=\"\$LIB$uppername\"
10660 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10661 eval value=\"\$LTLIB$uppername\"
10662 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10663 else
10664 :
10665 fi
10666 else
10667 found_dir=
10668 found_la=
10669 found_so=
10670 found_a=
10671 if test $use_additional = yes; then
10672 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10673 found_dir="$additional_libdir"
10674 found_so="$additional_libdir/lib$name.$shlibext"
10675 if test -f "$additional_libdir/lib$name.la"; then
10676 found_la="$additional_libdir/lib$name.la"
10677 fi
10678 else
10679 if test -f "$additional_libdir/lib$name.$libext"; then
10680 found_dir="$additional_libdir"
10681 found_a="$additional_libdir/lib$name.$libext"
10682 if test -f "$additional_libdir/lib$name.la"; then
10683 found_la="$additional_libdir/lib$name.la"
10684 fi
10685 fi
10686 fi
10687 fi
10688 if test "X$found_dir" = "X"; then
10689 for x in $LDFLAGS $LTLIBICONV; do
10690
10691 acl_save_prefix="$prefix"
10692 prefix="$acl_final_prefix"
10693 acl_save_exec_prefix="$exec_prefix"
10694 exec_prefix="$acl_final_exec_prefix"
10695 eval x=\"$x\"
10696 exec_prefix="$acl_save_exec_prefix"
10697 prefix="$acl_save_prefix"
10698
10699 case "$x" in
10700 -L*)
10701 dir=`echo "X$x" | sed -e 's/^X-L//'`
10702 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10703 found_dir="$dir"
10704 found_so="$dir/lib$name.$shlibext"
10705 if test -f "$dir/lib$name.la"; then
10706 found_la="$dir/lib$name.la"
10707 fi
10708 else
10709 if test -f "$dir/lib$name.$libext"; then
10710 found_dir="$dir"
10711 found_a="$dir/lib$name.$libext"
10712 if test -f "$dir/lib$name.la"; then
10713 found_la="$dir/lib$name.la"
10714 fi
10715 fi
10716 fi
10717 ;;
10718 esac
10719 if test "X$found_dir" != "X"; then
10720 break
10721 fi
10722 done
10723 fi
10724 if test "X$found_dir" != "X"; then
10725 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10726 if test "X$found_so" != "X"; then
10727 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10728 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10729 else
10730 haveit=
10731 for x in $ltrpathdirs; do
10732 if test "X$x" = "X$found_dir"; then
10733 haveit=yes
10734 break
10735 fi
10736 done
10737 if test -z "$haveit"; then
10738 ltrpathdirs="$ltrpathdirs $found_dir"
10739 fi
10740 if test "$hardcode_direct" = yes; then
10741 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10742 else
10743 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10744 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10745 haveit=
10746 for x in $rpathdirs; do
10747 if test "X$x" = "X$found_dir"; then
10748 haveit=yes
10749 break
10750 fi
10751 done
10752 if test -z "$haveit"; then
10753 rpathdirs="$rpathdirs $found_dir"
10754 fi
10755 else
10756 haveit=
10757 for x in $LDFLAGS $LIBICONV; do
10758
10759 acl_save_prefix="$prefix"
10760 prefix="$acl_final_prefix"
10761 acl_save_exec_prefix="$exec_prefix"
10762 exec_prefix="$acl_final_exec_prefix"
10763 eval x=\"$x\"
10764 exec_prefix="$acl_save_exec_prefix"
10765 prefix="$acl_save_prefix"
10766
10767 if test "X$x" = "X-L$found_dir"; then
10768 haveit=yes
10769 break
10770 fi
10771 done
10772 if test -z "$haveit"; then
10773 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10774 fi
10775 if test "$hardcode_minus_L" != no; then
10776 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10777 else
10778 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10779 fi
10780 fi
10781 fi
10782 fi
10783 else
10784 if test "X$found_a" != "X"; then
10785 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10786 else
10787 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10788 fi
10789 fi
10790 additional_includedir=
10791 case "$found_dir" in
10792 */lib | */lib/)
10793 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10794 additional_includedir="$basedir/include"
10795 ;;
10796 esac
10797 if test "X$additional_includedir" != "X"; then
10798 if test "X$additional_includedir" != "X/usr/include"; then
10799 haveit=
10800 if test "X$additional_includedir" = "X/usr/local/include"; then
10801 if test -n "$GCC"; then
10802 case $host_os in
18fc9bd4 10803 linux*) haveit=yes;;
dfb77e37
KC
10804 esac
10805 fi
10806 fi
10807 if test -z "$haveit"; then
10808 for x in $CPPFLAGS $INCICONV; do
10809
10810 acl_save_prefix="$prefix"
10811 prefix="$acl_final_prefix"
10812 acl_save_exec_prefix="$exec_prefix"
10813 exec_prefix="$acl_final_exec_prefix"
10814 eval x=\"$x\"
10815 exec_prefix="$acl_save_exec_prefix"
10816 prefix="$acl_save_prefix"
10817
10818 if test "X$x" = "X-I$additional_includedir"; then
10819 haveit=yes
10820 break
10821 fi
10822 done
10823 if test -z "$haveit"; then
10824 if test -d "$additional_includedir"; then
10825 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10826 fi
10827 fi
10828 fi
10829 fi
10830 fi
10831 if test -n "$found_la"; then
10832 save_libdir="$libdir"
10833 case "$found_la" in
10834 */* | *\\*) . "$found_la" ;;
10835 *) . "./$found_la" ;;
10836 esac
10837 libdir="$save_libdir"
10838 for dep in $dependency_libs; do
10839 case "$dep" in
10840 -L*)
10841 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10842 if test "X$additional_libdir" != "X/usr/lib"; then
10843 haveit=
10844 if test "X$additional_libdir" = "X/usr/local/lib"; then
10845 if test -n "$GCC"; then
10846 case $host_os in
18fc9bd4 10847 linux*) haveit=yes;;
dfb77e37
KC
10848 esac
10849 fi
10850 fi
10851 if test -z "$haveit"; then
10852 haveit=
10853 for x in $LDFLAGS $LIBICONV; do
10854
10855 acl_save_prefix="$prefix"
10856 prefix="$acl_final_prefix"
10857 acl_save_exec_prefix="$exec_prefix"
10858 exec_prefix="$acl_final_exec_prefix"
10859 eval x=\"$x\"
10860 exec_prefix="$acl_save_exec_prefix"
10861 prefix="$acl_save_prefix"
10862
10863 if test "X$x" = "X-L$additional_libdir"; then
10864 haveit=yes
10865 break
10866 fi
10867 done
10868 if test -z "$haveit"; then
10869 if test -d "$additional_libdir"; then
10870 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10871 fi
10872 fi
10873 haveit=
10874 for x in $LDFLAGS $LTLIBICONV; do
10875
10876 acl_save_prefix="$prefix"
10877 prefix="$acl_final_prefix"
10878 acl_save_exec_prefix="$exec_prefix"
10879 exec_prefix="$acl_final_exec_prefix"
10880 eval x=\"$x\"
10881 exec_prefix="$acl_save_exec_prefix"
10882 prefix="$acl_save_prefix"
10883
10884 if test "X$x" = "X-L$additional_libdir"; then
10885 haveit=yes
10886 break
10887 fi
10888 done
10889 if test -z "$haveit"; then
10890 if test -d "$additional_libdir"; then
10891 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10892 fi
10893 fi
10894 fi
10895 fi
10896 ;;
10897 -R*)
10898 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10899 if test "$enable_rpath" != no; then
10900 haveit=
10901 for x in $rpathdirs; do
10902 if test "X$x" = "X$dir"; then
10903 haveit=yes
10904 break
10905 fi
10906 done
10907 if test -z "$haveit"; then
10908 rpathdirs="$rpathdirs $dir"
10909 fi
10910 haveit=
10911 for x in $ltrpathdirs; do
10912 if test "X$x" = "X$dir"; then
10913 haveit=yes
10914 break
10915 fi
10916 done
10917 if test -z "$haveit"; then
10918 ltrpathdirs="$ltrpathdirs $dir"
10919 fi
10920 fi
10921 ;;
10922 -l*)
10923 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10924 ;;
10925 *.la)
10926 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10927 ;;
10928 *)
10929 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10930 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10931 ;;
10932 esac
10933 done
10934 fi
10935 else
10936 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10937 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10938 fi
10939 fi
10940 fi
10941 done
10942 done
10943 if test "X$rpathdirs" != "X"; then
10944 if test -n "$hardcode_libdir_separator"; then
10945 alldirs=
10946 for found_dir in $rpathdirs; do
10947 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10948 done
10949 acl_save_libdir="$libdir"
10950 libdir="$alldirs"
10951 eval flag=\"$hardcode_libdir_flag_spec\"
10952 libdir="$acl_save_libdir"
10953 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10954 else
10955 for found_dir in $rpathdirs; do
10956 acl_save_libdir="$libdir"
10957 libdir="$found_dir"
10958 eval flag=\"$hardcode_libdir_flag_spec\"
10959 libdir="$acl_save_libdir"
10960 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10961 done
10962 fi
10963 fi
10964 if test "X$ltrpathdirs" != "X"; then
10965 for found_dir in $ltrpathdirs; do
10966 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10967 done
10968 fi
10969
10970
10971
10972
10973
10974
10975
10976 am_save_CPPFLAGS="$CPPFLAGS"
10977
10978 for element in $INCICONV; do
10979 haveit=
10980 for x in $CPPFLAGS; do
10981
10982 acl_save_prefix="$prefix"
10983 prefix="$acl_final_prefix"
10984 acl_save_exec_prefix="$exec_prefix"
10985 exec_prefix="$acl_final_exec_prefix"
10986 eval x=\"$x\"
10987 exec_prefix="$acl_save_exec_prefix"
10988 prefix="$acl_save_prefix"
10989
10990 if test "X$x" = "X$element"; then
10991 haveit=yes
10992 break
10993 fi
10994 done
10995 if test -z "$haveit"; then
10996 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10997 fi
10998 done
eb158727
ZW
10999
11000
ba479fd2
NN
11001 echo "$as_me:$LINENO: checking for iconv" >&5
11002echo $ECHO_N "checking for iconv... $ECHO_C" >&6
11003if test "${am_cv_func_iconv+set}" = set; then
11004 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11005else
ba479fd2 11006
f91abfce
TT
11007 am_cv_func_iconv="no, consider installing GNU libiconv"
11008 am_cv_lib_iconv=no
ba479fd2 11009 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11010/* confdefs.h. */
11011_ACEOF
11012cat confdefs.h >>conftest.$ac_ext
11013cat >>conftest.$ac_ext <<_ACEOF
11014/* end confdefs.h. */
f91abfce
TT
11015#include <stdlib.h>
11016#include <iconv.h>
ba479fd2
NN
11017int
11018main ()
11019{
f91abfce
TT
11020iconv_t cd = iconv_open("","");
11021 iconv(cd,NULL,NULL,NULL,NULL);
11022 iconv_close(cd);
ba479fd2
NN
11023 ;
11024 return 0;
11025}
11026_ACEOF
11027rm -f conftest.$ac_objext conftest$ac_exeext
11028if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 11029 (eval $ac_link) 2>conftest.er1
ba479fd2 11030 ac_status=$?
86da66b5
HPN
11031 grep -v '^ *+' conftest.er1 >conftest.err
11032 rm -f conftest.er1
11033 cat conftest.err >&5
ba479fd2
NN
11034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11035 (exit $ac_status); } &&
ec6c7392
PB
11036 { ac_try='test -z "$ac_c_werror_flag"
11037 || test ! -s conftest.err'
86da66b5
HPN
11038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11039 (eval $ac_try) 2>&5
11040 ac_status=$?
11041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11042 (exit $ac_status); }; } &&
11043 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
11044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11045 (eval $ac_try) 2>&5
11046 ac_status=$?
11047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11048 (exit $ac_status); }; }; then
f91abfce
TT
11049 am_cv_func_iconv=yes
11050else
ba479fd2
NN
11051 echo "$as_me: failed program was:" >&5
11052sed 's/^/| /' conftest.$ac_ext >&5
11053
f91abfce 11054fi
86da66b5
HPN
11055rm -f conftest.err conftest.$ac_objext \
11056 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11057 if test "$am_cv_func_iconv" != yes; then
11058 am_save_LIBS="$LIBS"
dfb77e37 11059 LIBS="$LIBS $LIBICONV"
ba479fd2 11060 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11061/* confdefs.h. */
11062_ACEOF
11063cat confdefs.h >>conftest.$ac_ext
11064cat >>conftest.$ac_ext <<_ACEOF
11065/* end confdefs.h. */
f91abfce
TT
11066#include <stdlib.h>
11067#include <iconv.h>
ba479fd2
NN
11068int
11069main ()
11070{
f91abfce
TT
11071iconv_t cd = iconv_open("","");
11072 iconv(cd,NULL,NULL,NULL,NULL);
11073 iconv_close(cd);
ba479fd2
NN
11074 ;
11075 return 0;
11076}
11077_ACEOF
11078rm -f conftest.$ac_objext conftest$ac_exeext
11079if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 11080 (eval $ac_link) 2>conftest.er1
ba479fd2 11081 ac_status=$?
86da66b5
HPN
11082 grep -v '^ *+' conftest.er1 >conftest.err
11083 rm -f conftest.er1
11084 cat conftest.err >&5
ba479fd2
NN
11085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11086 (exit $ac_status); } &&
ec6c7392
PB
11087 { ac_try='test -z "$ac_c_werror_flag"
11088 || test ! -s conftest.err'
86da66b5
HPN
11089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11090 (eval $ac_try) 2>&5
11091 ac_status=$?
11092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11093 (exit $ac_status); }; } &&
11094 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
11095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11096 (eval $ac_try) 2>&5
11097 ac_status=$?
11098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11099 (exit $ac_status); }; }; then
f91abfce
TT
11100 am_cv_lib_iconv=yes
11101 am_cv_func_iconv=yes
11102else
ba479fd2
NN
11103 echo "$as_me: failed program was:" >&5
11104sed 's/^/| /' conftest.$ac_ext >&5
11105
f91abfce 11106fi
86da66b5
HPN
11107rm -f conftest.err conftest.$ac_objext \
11108 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11109 LIBS="$am_save_LIBS"
11110 fi
6e3f3080 11111
ba479fd2
NN
11112fi
11113echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
11114echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 11115 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11116
11117cat >>confdefs.h <<\_ACEOF
f91abfce 11118#define HAVE_ICONV 1
ba479fd2 11119_ACEOF
f91abfce 11120
dfb77e37
KC
11121 fi
11122 if test "$am_cv_lib_iconv" = yes; then
11123 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
11124echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
11125 echo "$as_me:$LINENO: result: $LIBICONV" >&5
11126echo "${ECHO_T}$LIBICONV" >&6
11127 else
11128 CPPFLAGS="$am_save_CPPFLAGS"
11129 LIBICONV=
11130 LTLIBICONV=
11131 fi
11132
11133
11134
11135 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11136 echo "$as_me:$LINENO: checking for iconv declaration" >&5
11137echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
11138 if test "${am_cv_proto_iconv+set}" = set; then
11139 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11140else
ba479fd2
NN
11141
11142 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11143/* confdefs.h. */
11144_ACEOF
11145cat confdefs.h >>conftest.$ac_ext
11146cat >>conftest.$ac_ext <<_ACEOF
11147/* end confdefs.h. */
f91abfce
TT
11148
11149#include <stdlib.h>
11150#include <iconv.h>
11151extern
11152#ifdef __cplusplus
11153"C"
11154#endif
11155#if defined(__STDC__) || defined(__cplusplus)
11156size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11157#else
11158size_t iconv();
11159#endif
11160
ba479fd2
NN
11161int
11162main ()
11163{
f91abfce 11164
ba479fd2
NN
11165 ;
11166 return 0;
11167}
11168_ACEOF
11169rm -f conftest.$ac_objext
11170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11171 (eval $ac_compile) 2>conftest.er1
ba479fd2 11172 ac_status=$?
86da66b5
HPN
11173 grep -v '^ *+' conftest.er1 >conftest.err
11174 rm -f conftest.er1
11175 cat conftest.err >&5
ba479fd2
NN
11176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11177 (exit $ac_status); } &&
ec6c7392
PB
11178 { ac_try='test -z "$ac_c_werror_flag"
11179 || test ! -s conftest.err'
86da66b5
HPN
11180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11181 (eval $ac_try) 2>&5
11182 ac_status=$?
11183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11184 (exit $ac_status); }; } &&
11185 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11187 (eval $ac_try) 2>&5
11188 ac_status=$?
11189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11190 (exit $ac_status); }; }; then
f91abfce
TT
11191 am_cv_proto_iconv_arg1=""
11192else
ba479fd2
NN
11193 echo "$as_me: failed program was:" >&5
11194sed 's/^/| /' conftest.$ac_ext >&5
11195
11196am_cv_proto_iconv_arg1="const"
f91abfce 11197fi
86da66b5 11198rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
11199 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);"
11200fi
11201
11202 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
11203 echo "$as_me:$LINENO: result: ${ac_t:-
11204 }$am_cv_proto_iconv" >&5
11205echo "${ECHO_T}${ac_t:-
11206 }$am_cv_proto_iconv" >&6
11207
11208cat >>confdefs.h <<_ACEOF
f91abfce 11209#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 11210_ACEOF
f91abfce
TT
11211
11212 fi
f91abfce 11213
56694dd9
ZW
11214# Until we have in-tree GNU iconv:
11215LIBICONV_DEP=
11216
11217
18fc9bd4
RG
11218
11219 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11220echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
11221if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11222 echo $ECHO_N "(cached) $ECHO_C" >&6
11223else
11224 cat >conftest.$ac_ext <<_ACEOF
11225/* confdefs.h. */
11226_ACEOF
11227cat confdefs.h >>conftest.$ac_ext
11228cat >>conftest.$ac_ext <<_ACEOF
11229/* end confdefs.h. */
11230#include <locale.h>
11231int
11232main ()
11233{
11234return LC_MESSAGES
11235 ;
11236 return 0;
11237}
11238_ACEOF
11239rm -f conftest.$ac_objext conftest$ac_exeext
11240if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11241 (eval $ac_link) 2>conftest.er1
11242 ac_status=$?
11243 grep -v '^ *+' conftest.er1 >conftest.err
11244 rm -f conftest.er1
11245 cat conftest.err >&5
11246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11247 (exit $ac_status); } &&
11248 { ac_try='test -z "$ac_c_werror_flag"
11249 || test ! -s conftest.err'
11250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11251 (eval $ac_try) 2>&5
11252 ac_status=$?
11253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11254 (exit $ac_status); }; } &&
11255 { ac_try='test -s conftest$ac_exeext'
11256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11257 (eval $ac_try) 2>&5
11258 ac_status=$?
11259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11260 (exit $ac_status); }; }; then
11261 am_cv_val_LC_MESSAGES=yes
11262else
11263 echo "$as_me: failed program was:" >&5
11264sed 's/^/| /' conftest.$ac_ext >&5
11265
11266am_cv_val_LC_MESSAGES=no
11267fi
11268rm -f conftest.err conftest.$ac_objext \
11269 conftest$ac_exeext conftest.$ac_ext
11270fi
11271echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11272echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
11273 if test $am_cv_val_LC_MESSAGES = yes; then
11274
11275cat >>confdefs.h <<\_ACEOF
11276#define HAVE_LC_MESSAGES 1
11277_ACEOF
11278
11279 fi
11280
f91abfce 11281
a03ea89b
BM
11282
11283 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11284echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11285if test "${am_cv_langinfo_codeset+set}" = set; then
11286 echo $ECHO_N "(cached) $ECHO_C" >&6
11287else
11288 cat >conftest.$ac_ext <<_ACEOF
11289/* confdefs.h. */
11290_ACEOF
11291cat confdefs.h >>conftest.$ac_ext
11292cat >>conftest.$ac_ext <<_ACEOF
11293/* end confdefs.h. */
11294#include <langinfo.h>
11295int
11296main ()
11297{
11298char* cs = nl_langinfo(CODESET);
11299 ;
11300 return 0;
11301}
11302_ACEOF
11303rm -f conftest.$ac_objext conftest$ac_exeext
11304if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11305 (eval $ac_link) 2>conftest.er1
11306 ac_status=$?
11307 grep -v '^ *+' conftest.er1 >conftest.err
11308 rm -f conftest.er1
11309 cat conftest.err >&5
11310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11311 (exit $ac_status); } &&
ec6c7392
PB
11312 { ac_try='test -z "$ac_c_werror_flag"
11313 || test ! -s conftest.err'
a03ea89b
BM
11314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11315 (eval $ac_try) 2>&5
11316 ac_status=$?
11317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11318 (exit $ac_status); }; } &&
11319 { ac_try='test -s conftest$ac_exeext'
11320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11321 (eval $ac_try) 2>&5
11322 ac_status=$?
11323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11324 (exit $ac_status); }; }; then
11325 am_cv_langinfo_codeset=yes
11326else
11327 echo "$as_me: failed program was:" >&5
11328sed 's/^/| /' conftest.$ac_ext >&5
11329
11330am_cv_langinfo_codeset=no
11331fi
11332rm -f conftest.err conftest.$ac_objext \
11333 conftest$ac_exeext conftest.$ac_ext
11334
11335fi
11336echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11337echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11338 if test $am_cv_langinfo_codeset = yes; then
11339
11340cat >>confdefs.h <<\_ACEOF
11341#define HAVE_LANGINFO_CODESET 1
11342_ACEOF
11343
11344 fi
11345
11346
86cf1cbd
KG
11347# We will need to find libiberty.h and ansidecl.h
11348saved_CFLAGS="$CFLAGS"
11349CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
6a257778 11371
ad6717df
PB
11372
11373
0d667716
KG
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
367e8319 11384
0d667716
KG
11385
11386
7391b66c 11387
ed5b9f96
GK
11388
11389for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
11390 strsignal strstr strverscmp \
11391 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 11392 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 11393do
ad6717df 11394 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11395echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11396echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11397if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11398 echo $ECHO_N "(cached) $ECHO_C" >&6
11399else
11400 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11401/* confdefs.h. */
11402_ACEOF
11403cat confdefs.h >>conftest.$ac_ext
11404cat >>conftest.$ac_ext <<_ACEOF
11405/* end confdefs.h. */
7afe8c41
KG
11406#undef $ac_tr_decl
11407#define $ac_tr_decl 1
ba479fd2 11408
d02af173 11409#include "ansidecl.h"
86cf1cbd 11410#include "system.h"
f31e826b 11411
ba479fd2
NN
11412int
11413main ()
11414{
86cf1cbd
KG
11415#ifndef $ac_func
11416char *(*pfn) = (char *(*)) $ac_func ;
11417#endif
ba479fd2
NN
11418 ;
11419 return 0;
11420}
11421_ACEOF
11422rm -f conftest.$ac_objext
11423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11424 (eval $ac_compile) 2>conftest.er1
ba479fd2 11425 ac_status=$?
86da66b5
HPN
11426 grep -v '^ *+' conftest.er1 >conftest.err
11427 rm -f conftest.er1
11428 cat conftest.err >&5
ba479fd2
NN
11429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11430 (exit $ac_status); } &&
ec6c7392
PB
11431 { ac_try='test -z "$ac_c_werror_flag"
11432 || test ! -s conftest.err'
86da66b5
HPN
11433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11434 (eval $ac_try) 2>&5
11435 ac_status=$?
11436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11437 (exit $ac_status); }; } &&
11438 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11440 (eval $ac_try) 2>&5
11441 ac_status=$?
11442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11443 (exit $ac_status); }; }; then
f31e826b 11444 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11445else
ba479fd2
NN
11446 echo "$as_me: failed program was:" >&5
11447sed 's/^/| /' conftest.$ac_ext >&5
11448
11449eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11450fi
86da66b5 11451rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11452fi
11453
f31e826b 11454if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11455 echo "$as_me:$LINENO: result: yes" >&5
11456echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11457#define $ac_tr_decl 1
ba479fd2
NN
11458_ACEOF
11459
81bf3d9e 11460else
ba479fd2
NN
11461 echo "$as_me:$LINENO: result: no" >&5
11462echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11463#define $ac_tr_decl 0
ba479fd2
NN
11464_ACEOF
11465
81bf3d9e
RH
11466fi
11467
11468done
ba479fd2 11469
ba479fd2 11470
ba479fd2 11471
81bf3d9e 11472
81bf3d9e
RH
11473
11474for ac_func in getrlimit setrlimit getrusage
11475do
ad6717df 11476 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11477echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11478echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11479if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11480 echo $ECHO_N "(cached) $ECHO_C" >&6
11481else
11482 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11483/* confdefs.h. */
11484_ACEOF
11485cat confdefs.h >>conftest.$ac_ext
11486cat >>conftest.$ac_ext <<_ACEOF
11487/* end confdefs.h. */
7afe8c41
KG
11488#undef $ac_tr_decl
11489#define $ac_tr_decl 1
ba479fd2 11490
d02af173 11491#include "ansidecl.h"
86cf1cbd 11492#include "system.h"
81bf3d9e
RH
11493#ifdef HAVE_SYS_RESOURCE_H
11494#include <sys/resource.h>
11495#endif
11496
f31e826b 11497
ba479fd2
NN
11498int
11499main ()
11500{
86cf1cbd
KG
11501#ifndef $ac_func
11502char *(*pfn) = (char *(*)) $ac_func ;
11503#endif
ba479fd2
NN
11504 ;
11505 return 0;
11506}
11507_ACEOF
11508rm -f conftest.$ac_objext
11509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11510 (eval $ac_compile) 2>conftest.er1
ba479fd2 11511 ac_status=$?
86da66b5
HPN
11512 grep -v '^ *+' conftest.er1 >conftest.err
11513 rm -f conftest.er1
11514 cat conftest.err >&5
ba479fd2
NN
11515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11516 (exit $ac_status); } &&
ec6c7392
PB
11517 { ac_try='test -z "$ac_c_werror_flag"
11518 || test ! -s conftest.err'
86da66b5
HPN
11519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11520 (eval $ac_try) 2>&5
11521 ac_status=$?
11522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11523 (exit $ac_status); }; } &&
11524 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11526 (eval $ac_try) 2>&5
11527 ac_status=$?
11528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11529 (exit $ac_status); }; }; then
f31e826b 11530 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11531else
ba479fd2
NN
11532 echo "$as_me: failed program was:" >&5
11533sed 's/^/| /' conftest.$ac_ext >&5
11534
11535eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11536fi
86da66b5 11537rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11538fi
11539
f31e826b 11540if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11541 echo "$as_me:$LINENO: result: yes" >&5
11542echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11543#define $ac_tr_decl 1
ba479fd2
NN
11544_ACEOF
11545
81bf3d9e 11546else
ba479fd2
NN
11547 echo "$as_me:$LINENO: result: no" >&5
11548echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11549#define $ac_tr_decl 0
ba479fd2
NN
11550_ACEOF
11551
81bf3d9e
RH
11552fi
11553
11554done
86cf1cbd 11555
81bf3d9e 11556
ba479fd2 11557cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11558/* confdefs.h. */
11559_ACEOF
11560cat confdefs.h >>conftest.$ac_ext
11561cat >>conftest.$ac_ext <<_ACEOF
11562/* end confdefs.h. */
b2522d2b
HPN
11563
11564#include "ansidecl.h"
11565#include "system.h"
11566#ifdef HAVE_SYS_RESOURCE_H
11567#include <sys/resource.h>
11568#endif
11569
ba479fd2
NN
11570int
11571main ()
11572{
b2522d2b 11573rlim_t l = 0;
ba479fd2
NN
11574 ;
11575 return 0;
11576}
11577_ACEOF
11578rm -f conftest.$ac_objext
11579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11580 (eval $ac_compile) 2>conftest.er1
ba479fd2 11581 ac_status=$?
86da66b5
HPN
11582 grep -v '^ *+' conftest.er1 >conftest.err
11583 rm -f conftest.er1
11584 cat conftest.err >&5
ba479fd2
NN
11585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11586 (exit $ac_status); } &&
ec6c7392
PB
11587 { ac_try='test -z "$ac_c_werror_flag"
11588 || test ! -s conftest.err'
86da66b5
HPN
11589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11590 (eval $ac_try) 2>&5
11591 ac_status=$?
11592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11593 (exit $ac_status); }; } &&
11594 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11596 (eval $ac_try) 2>&5
11597 ac_status=$?
11598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11599 (exit $ac_status); }; }; then
b2522d2b
HPN
11600 :
11601else
ba479fd2
NN
11602 echo "$as_me: failed program was:" >&5
11603sed 's/^/| /' conftest.$ac_ext >&5
11604
11605
11606cat >>confdefs.h <<\_ACEOF
b2522d2b 11607#define rlim_t long
ba479fd2 11608_ACEOF
b2522d2b
HPN
11609
11610fi
86da66b5 11611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 11612
2102b2fe
RS
11613# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11614# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11615# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11616# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 11617
351df804 11618for ac_func in ldgetname
c1800ec8 11619do
ad6717df 11620 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11621echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11622echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11623if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11624 echo $ECHO_N "(cached) $ECHO_C" >&6
11625else
11626 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11627/* confdefs.h. */
11628_ACEOF
11629cat confdefs.h >>conftest.$ac_ext
11630cat >>conftest.$ac_ext <<_ACEOF
11631/* end confdefs.h. */
c1800ec8
ZW
11632#undef $ac_tr_decl
11633#define $ac_tr_decl 1
ba479fd2 11634
351df804
KG
11635#include "ansidecl.h"
11636#include "system.h"
11637#ifdef HAVE_LDFCN_H
2102b2fe
RS
11638#undef FREAD
11639#undef FWRITE
351df804
KG
11640#include <ldfcn.h>
11641#endif
11642
11643
ba479fd2
NN
11644int
11645main ()
11646{
351df804
KG
11647#ifndef $ac_func
11648char *(*pfn) = (char *(*)) $ac_func ;
11649#endif
ba479fd2
NN
11650 ;
11651 return 0;
11652}
11653_ACEOF
11654rm -f conftest.$ac_objext
11655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11656 (eval $ac_compile) 2>conftest.er1
ba479fd2 11657 ac_status=$?
86da66b5
HPN
11658 grep -v '^ *+' conftest.er1 >conftest.err
11659 rm -f conftest.er1
11660 cat conftest.err >&5
ba479fd2
NN
11661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11662 (exit $ac_status); } &&
ec6c7392
PB
11663 { ac_try='test -z "$ac_c_werror_flag"
11664 || test ! -s conftest.err'
86da66b5
HPN
11665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11666 (eval $ac_try) 2>&5
11667 ac_status=$?
11668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11669 (exit $ac_status); }; } &&
11670 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11672 (eval $ac_try) 2>&5
11673 ac_status=$?
11674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11675 (exit $ac_status); }; }; then
351df804
KG
11676 eval "gcc_cv_have_decl_$ac_func=yes"
11677else
ba479fd2
NN
11678 echo "$as_me: failed program was:" >&5
11679sed 's/^/| /' conftest.$ac_ext >&5
11680
11681eval "gcc_cv_have_decl_$ac_func=no"
351df804 11682fi
86da66b5 11683rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
11684fi
11685
11686if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11687 echo "$as_me:$LINENO: result: yes" >&5
11688echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11689#define $ac_tr_decl 1
ba479fd2
NN
11690_ACEOF
11691
351df804 11692else
ba479fd2
NN
11693 echo "$as_me:$LINENO: result: no" >&5
11694echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11695#define $ac_tr_decl 0
ba479fd2
NN
11696_ACEOF
11697
351df804
KG
11698fi
11699
11700done
ba479fd2 11701
351df804
KG
11702
11703
11704for ac_func in times
11705do
ad6717df 11706 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11707echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11708echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11709if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11710 echo $ECHO_N "(cached) $ECHO_C" >&6
11711else
11712 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11713/* confdefs.h. */
11714_ACEOF
11715cat confdefs.h >>conftest.$ac_ext
11716cat >>conftest.$ac_ext <<_ACEOF
11717/* end confdefs.h. */
351df804
KG
11718#undef $ac_tr_decl
11719#define $ac_tr_decl 1
ba479fd2 11720
c1800ec8
ZW
11721#include "ansidecl.h"
11722#include "system.h"
11723#ifdef HAVE_SYS_TIMES_H
11724#include <sys/times.h>
11725#endif
11726
11727
ba479fd2
NN
11728int
11729main ()
11730{
c1800ec8
ZW
11731#ifndef $ac_func
11732char *(*pfn) = (char *(*)) $ac_func ;
11733#endif
ba479fd2
NN
11734 ;
11735 return 0;
11736}
11737_ACEOF
11738rm -f conftest.$ac_objext
11739if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11740 (eval $ac_compile) 2>conftest.er1
ba479fd2 11741 ac_status=$?
86da66b5
HPN
11742 grep -v '^ *+' conftest.er1 >conftest.err
11743 rm -f conftest.er1
11744 cat conftest.err >&5
ba479fd2
NN
11745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11746 (exit $ac_status); } &&
ec6c7392
PB
11747 { ac_try='test -z "$ac_c_werror_flag"
11748 || test ! -s conftest.err'
86da66b5
HPN
11749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11750 (eval $ac_try) 2>&5
11751 ac_status=$?
11752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11753 (exit $ac_status); }; } &&
11754 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11756 (eval $ac_try) 2>&5
11757 ac_status=$?
11758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11759 (exit $ac_status); }; }; then
c1800ec8
ZW
11760 eval "gcc_cv_have_decl_$ac_func=yes"
11761else
ba479fd2
NN
11762 echo "$as_me: failed program was:" >&5
11763sed 's/^/| /' conftest.$ac_ext >&5
11764
11765eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 11766fi
86da66b5 11767rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
11768fi
11769
11770if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11771 echo "$as_me:$LINENO: result: yes" >&5
11772echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11773#define $ac_tr_decl 1
ba479fd2
NN
11774_ACEOF
11775
c1800ec8 11776else
ba479fd2
NN
11777 echo "$as_me:$LINENO: result: no" >&5
11778echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11779#define $ac_tr_decl 0
ba479fd2
NN
11780_ACEOF
11781
c1800ec8
ZW
11782fi
11783
11784done
c1800ec8
ZW
11785
11786
4f6d8cc8
GK
11787
11788for ac_func in sigaltstack
11789do
11790 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
11791echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11792echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11793if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11794 echo $ECHO_N "(cached) $ECHO_C" >&6
11795else
11796 cat >conftest.$ac_ext <<_ACEOF
11797/* confdefs.h. */
11798_ACEOF
11799cat confdefs.h >>conftest.$ac_ext
11800cat >>conftest.$ac_ext <<_ACEOF
11801/* end confdefs.h. */
11802#undef $ac_tr_decl
11803#define $ac_tr_decl 1
11804
11805#include "ansidecl.h"
11806#include "system.h"
11807#include <signal.h>
11808
11809
11810int
11811main ()
11812{
11813#ifndef $ac_func
11814char *(*pfn) = (char *(*)) $ac_func ;
11815#endif
11816 ;
11817 return 0;
11818}
11819_ACEOF
11820rm -f conftest.$ac_objext
11821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11822 (eval $ac_compile) 2>conftest.er1
11823 ac_status=$?
11824 grep -v '^ *+' conftest.er1 >conftest.err
11825 rm -f conftest.er1
11826 cat conftest.err >&5
11827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11828 (exit $ac_status); } &&
ec6c7392
PB
11829 { ac_try='test -z "$ac_c_werror_flag"
11830 || test ! -s conftest.err'
4f6d8cc8
GK
11831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11832 (eval $ac_try) 2>&5
11833 ac_status=$?
11834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11835 (exit $ac_status); }; } &&
11836 { ac_try='test -s conftest.$ac_objext'
11837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11838 (eval $ac_try) 2>&5
11839 ac_status=$?
11840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11841 (exit $ac_status); }; }; then
11842 eval "gcc_cv_have_decl_$ac_func=yes"
11843else
11844 echo "$as_me: failed program was:" >&5
11845sed 's/^/| /' conftest.$ac_ext >&5
11846
11847eval "gcc_cv_have_decl_$ac_func=no"
11848fi
11849rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11850fi
11851
11852if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
11853 echo "$as_me:$LINENO: result: yes" >&5
11854echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
11855#define $ac_tr_decl 1
11856_ACEOF
11857
11858else
11859 echo "$as_me:$LINENO: result: no" >&5
11860echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
11861#define $ac_tr_decl 0
11862_ACEOF
11863
11864fi
11865
11866done
11867
11868
c1800ec8 11869# More time-related stuff.
ba479fd2
NN
11870echo "$as_me:$LINENO: checking for struct tms" >&5
11871echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
11872if test "${ac_cv_struct_tms+set}" = set; then
11873 echo $ECHO_N "(cached) $ECHO_C" >&6
11874else
11875
11876cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11877/* confdefs.h. */
11878_ACEOF
11879cat confdefs.h >>conftest.$ac_ext
11880cat >>conftest.$ac_ext <<_ACEOF
11881/* end confdefs.h. */
c1800ec8
ZW
11882
11883#include "ansidecl.h"
11884#include "system.h"
11885#ifdef HAVE_SYS_TIMES_H
11886#include <sys/times.h>
11887#endif
11888
ba479fd2
NN
11889int
11890main ()
11891{
c1800ec8 11892struct tms tms;
ba479fd2
NN
11893 ;
11894 return 0;
11895}
11896_ACEOF
11897rm -f conftest.$ac_objext
11898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11899 (eval $ac_compile) 2>conftest.er1
ba479fd2 11900 ac_status=$?
86da66b5
HPN
11901 grep -v '^ *+' conftest.er1 >conftest.err
11902 rm -f conftest.er1
11903 cat conftest.err >&5
ba479fd2
NN
11904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11905 (exit $ac_status); } &&
ec6c7392
PB
11906 { ac_try='test -z "$ac_c_werror_flag"
11907 || test ! -s conftest.err'
86da66b5
HPN
11908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11909 (eval $ac_try) 2>&5
11910 ac_status=$?
11911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11912 (exit $ac_status); }; } &&
11913 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11915 (eval $ac_try) 2>&5
11916 ac_status=$?
11917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11918 (exit $ac_status); }; }; then
c1800ec8
ZW
11919 ac_cv_struct_tms=yes
11920else
ba479fd2
NN
11921 echo "$as_me: failed program was:" >&5
11922sed 's/^/| /' conftest.$ac_ext >&5
11923
11924ac_cv_struct_tms=no
c1800ec8 11925fi
86da66b5 11926rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11927fi
ba479fd2
NN
11928echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11929echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 11930if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
11931
11932cat >>confdefs.h <<\_ACEOF
c1800ec8 11933#define HAVE_STRUCT_TMS 1
ba479fd2 11934_ACEOF
c1800ec8
ZW
11935
11936fi
11937
11938# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11939# revisit after autoconf 2.50.
ba479fd2
NN
11940echo "$as_me:$LINENO: checking for clock_t" >&5
11941echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
11942if test "${gcc_cv_type_clock_t+set}" = set; then
11943 echo $ECHO_N "(cached) $ECHO_C" >&6
11944else
11945
11946cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11947/* confdefs.h. */
11948_ACEOF
11949cat confdefs.h >>conftest.$ac_ext
11950cat >>conftest.$ac_ext <<_ACEOF
11951/* end confdefs.h. */
c1800ec8
ZW
11952
11953#include "ansidecl.h"
11954#include "system.h"
11955
ba479fd2
NN
11956int
11957main ()
11958{
c1800ec8 11959clock_t x;
ba479fd2
NN
11960 ;
11961 return 0;
11962}
11963_ACEOF
11964rm -f conftest.$ac_objext
11965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11966 (eval $ac_compile) 2>conftest.er1
ba479fd2 11967 ac_status=$?
86da66b5
HPN
11968 grep -v '^ *+' conftest.er1 >conftest.err
11969 rm -f conftest.er1
11970 cat conftest.err >&5
ba479fd2
NN
11971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11972 (exit $ac_status); } &&
ec6c7392
PB
11973 { ac_try='test -z "$ac_c_werror_flag"
11974 || test ! -s conftest.err'
86da66b5
HPN
11975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11976 (eval $ac_try) 2>&5
11977 ac_status=$?
11978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11979 (exit $ac_status); }; } &&
11980 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11982 (eval $ac_try) 2>&5
11983 ac_status=$?
11984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11985 (exit $ac_status); }; }; then
c1800ec8
ZW
11986 gcc_cv_type_clock_t=yes
11987else
ba479fd2
NN
11988 echo "$as_me: failed program was:" >&5
11989sed 's/^/| /' conftest.$ac_ext >&5
11990
11991gcc_cv_type_clock_t=no
c1800ec8 11992fi
86da66b5 11993rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11994fi
ba479fd2
NN
11995echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
11996echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 11997if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
11998
11999cat >>confdefs.h <<\_ACEOF
c1800ec8 12000#define HAVE_CLOCK_T 1
ba479fd2 12001_ACEOF
c1800ec8
ZW
12002
12003fi
12004
eb70d86d
AS
12005# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
12006CFLAGS="$saved_CFLAGS"
12007
07cf4226
DM
12008# Check whether --enable-initfini-array or --disable-initfini-array was given.
12009if test "${enable_initfini_array+set}" = set; then
12010 enableval="$enable_initfini_array"
ba479fd2 12011
07cf4226 12012else
ba479fd2
NN
12013
12014echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
12015echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
12016if test "${gcc_cv_initfini_array+set}" = set; then
12017 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 12018else
eb70d86d 12019 if test "$cross_compiling" = yes; then
918c4fe4 12020 gcc_cv_initfini_array=no
eb70d86d 12021else
ba479fd2 12022 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12023/* confdefs.h. */
12024_ACEOF
12025cat confdefs.h >>conftest.$ac_ext
12026cat >>conftest.$ac_ext <<_ACEOF
12027/* end confdefs.h. */
eb70d86d 12028
07cf4226
DM
12029static int x = -1;
12030int main (void) { return x; }
12031int foo (void) { x = 0; }
12032int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
12033_ACEOF
12034rm -f conftest$ac_exeext
12035if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12036 (eval $ac_link) 2>&5
12037 ac_status=$?
12038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12039 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12041 (eval $ac_try) 2>&5
12042 ac_status=$?
12043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12044 (exit $ac_status); }; }; then
918c4fe4 12045 gcc_cv_initfini_array=yes
eb70d86d 12046else
ba479fd2
NN
12047 echo "$as_me: program exited with status $ac_status" >&5
12048echo "$as_me: failed program was:" >&5
12049sed 's/^/| /' conftest.$ac_ext >&5
12050
12051( exit $ac_status )
12052gcc_cv_initfini_array=no
eb70d86d 12053fi
86da66b5 12054rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 12055fi
07cf4226 12056fi
ba479fd2
NN
12057echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
12058echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 12059 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 12060
ba479fd2 12061fi;
63cf211a 12062if test $enable_initfini_array = yes; then
ba479fd2
NN
12063
12064cat >>confdefs.h <<\_ACEOF
eb70d86d 12065#define HAVE_INITFINI_ARRAY 1
ba479fd2 12066_ACEOF
07cf4226 12067
eb70d86d 12068fi
81bf3d9e 12069
ba479fd2
NN
12070# mkdir takes a single argument on some systems.
12071echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
12072echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
12073if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
12074 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 12075else
ba479fd2 12076 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12077/* confdefs.h. */
12078_ACEOF
12079cat confdefs.h >>conftest.$ac_ext
12080cat >>conftest.$ac_ext <<_ACEOF
12081/* end confdefs.h. */
75923b2f
MK
12082
12083#include <sys/types.h>
12084#ifdef HAVE_SYS_STAT_H
12085# include <sys/stat.h>
12086#endif
12087#ifdef HAVE_UNISTD_H
12088# include <unistd.h>
12089#endif
12090#ifdef HAVE_DIRECT_H
12091# include <direct.h>
12092#endif
ba479fd2
NN
12093int
12094main ()
12095{
75923b2f 12096mkdir ("foo", 0);
ba479fd2
NN
12097 ;
12098 return 0;
12099}
12100_ACEOF
12101rm -f conftest.$ac_objext
12102if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 12103 (eval $ac_compile) 2>conftest.er1
ba479fd2 12104 ac_status=$?
86da66b5
HPN
12105 grep -v '^ *+' conftest.er1 >conftest.err
12106 rm -f conftest.er1
12107 cat conftest.err >&5
ba479fd2
NN
12108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12109 (exit $ac_status); } &&
ec6c7392
PB
12110 { ac_try='test -z "$ac_c_werror_flag"
12111 || test ! -s conftest.err'
86da66b5
HPN
12112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12113 (eval $ac_try) 2>&5
12114 ac_status=$?
12115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12116 (exit $ac_status); }; } &&
12117 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
12118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12119 (eval $ac_try) 2>&5
12120 ac_status=$?
12121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12122 (exit $ac_status); }; }; then
75923b2f
MK
12123 gcc_cv_mkdir_takes_one_arg=no
12124else
ba479fd2
NN
12125 echo "$as_me: failed program was:" >&5
12126sed 's/^/| /' conftest.$ac_ext >&5
12127
12128gcc_cv_mkdir_takes_one_arg=yes
75923b2f 12129fi
86da66b5 12130rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 12131fi
ba479fd2
NN
12132echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
12133echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 12134if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
12135
12136cat >>confdefs.h <<\_ACEOF
75923b2f 12137#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 12138_ACEOF
75923b2f
MK
12139
12140fi
12141
12142
861bb6c1
JL
12143# File extensions
12144manext='.1'
12145objext='.o'
12146
12147
12148
4977bab6
ZW
12149# With Setjmp/Longjmp based exception handling.
12150# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
12151if test "${enable_sjlj_exceptions+set}" = set; then
12152 enableval="$enable_sjlj_exceptions"
12153 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 12154
ba479fd2
NN
12155cat >>confdefs.h <<_ACEOF
12156#define CONFIG_SJLJ_EXCEPTIONS $sjlj
12157_ACEOF
4977bab6 12158
ba479fd2 12159fi;
4977bab6 12160
443728bb
L
12161# For platforms with the unwind ABI which includes an unwind library,
12162# libunwind, we can choose to use the system libunwind.
4977bab6 12163
443728bb
L
12164# Check whether --with-system-libunwind or --without-system-libunwind was given.
12165if test "${with_system_libunwind+set}" = set; then
12166 withval="$with_system_libunwind"
4977bab6 12167
ba479fd2 12168fi;
4977bab6 12169
34a86c2b
NN
12170# --------------------------------------------------------
12171# Build, host, and target specific configuration fragments
12172# --------------------------------------------------------
12173
5b28c537
NN
12174# Collect build-machine-specific information.
12175. ${srcdir}/config.build
12176
a89ea0df
NN
12177# Collect host-machine-specific information.
12178. ${srcdir}/config.host
12179
ef69da62 12180target_gtfiles=
a89ea0df
NN
12181
12182# Collect target-machine-specific information.
8ad9fb33 12183. ${srcdir}/config.gcc
861bb6c1
JL
12184
12185extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 12186extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
12187
12188# Default the target-machine variables that were not explicitly set.
75bffa71 12189if test x"$tm_file" = x
861bb6c1
JL
12190then tm_file=$cpu_type/$cpu_type.h; fi
12191
6b2adea9 12192if test x"$extra_headers" = x
861bb6c1
JL
12193then extra_headers=; fi
12194
75bffa71 12195if test x$md_file = x
e98e406f 12196then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 12197
75bffa71 12198if test x$out_file = x
861bb6c1
JL
12199then out_file=$cpu_type/$cpu_type.c; fi
12200
75bffa71 12201if test x"$tmake_file" = x
861bb6c1
JL
12202then tmake_file=$cpu_type/t-$cpu_type
12203fi
12204
90e6a802 12205if test x"$dwarf2" = xyes
756ee602 12206then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
12207fi
12208
861bb6c1 12209# Say what files are being used for the output code and MD file.
11642c3a 12210echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
12211echo "Using \`$srcdir/config/$md_file' as machine description file."
12212
11642c3a 12213# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
12214# about them and drop them.
12215
11642c3a
ZW
12216bx=
12217for x in $build_xm_file; do
12218 if test -f $srcdir/config/$x
12219 then bx="$bx $x"
ba479fd2
NN
12220 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12221echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12222 fi
12223done
12224build_xm_file="$bx"
12225
12226hx=
12227for x in $host_xm_file; do
12228 if test -f $srcdir/config/$x
12229 then hx="$hx $x"
ba479fd2
NN
12230 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12231echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12232 fi
12233done
12234host_xm_file="$hx"
12235
12236tx=
12237for x in $xm_file; do
12238 if test -f $srcdir/config/$x
12239 then tx="$tx $x"
ba479fd2
NN
12240 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12241echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12242 fi
12243done
12244xm_file="$tx"
12245
861bb6c1
JL
12246count=a
12247for f in $tm_file; do
12248 count=${count}x
12249done
75bffa71 12250if test $count = ax; then
861bb6c1
JL
12251 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
12252else
12253 echo "Using the following target machine macro files:"
12254 for f in $tm_file; do
12255 echo " $srcdir/config/$f"
12256 done
12257fi
12258
4977bab6 12259if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
12260
12261cat >>confdefs.h <<\_ACEOF
4977bab6 12262#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 12263_ACEOF
4977bab6
ZW
12264
12265fi
12266
99fa8911
AP
12267if test x$use_long_long_for_widest_fast_int = xyes; then
12268
12269cat >>confdefs.h <<\_ACEOF
12270#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12271_ACEOF
12272
12273fi
12274
861bb6c1
JL
12275count=a
12276for f in $host_xm_file; do
12277 count=${count}x
12278done
11642c3a
ZW
12279if test $count = a; then
12280 :
12281elif test $count = ax; then
861bb6c1
JL
12282 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12283else
12284 echo "Using the following host machine macro files:"
12285 for f in $host_xm_file; do
12286 echo " $srcdir/config/$f"
12287 done
12288fi
476d9098 12289echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 12290
75bffa71 12291if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
12292 count=a
12293 for f in $build_xm_file; do
12294 count=${count}x
12295 done
11642c3a
ZW
12296 if test $count = a; then
12297 :
12298 elif test $count = ax; then
861bb6c1
JL
12299 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12300 else
12301 echo "Using the following build machine macro files:"
12302 for f in $build_xm_file; do
12303 echo " $srcdir/config/$f"
12304 done
12305 fi
12306fi
12307
4f6d8cc8
GK
12308case ${host} in
12309 powerpc-*-darwin*)
12310 echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
12311echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6
12312if test "${gcc_cv_mcontext_underscores+set}" = set; then
12313 echo $ECHO_N "(cached) $ECHO_C" >&6
12314else
12315 cat >conftest.$ac_ext <<_ACEOF
12316
de4fb767 12317#include <sys/signal.h>
4f6d8cc8
GK
12318#include <ucontext.h>
12319int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
12320
12321_ACEOF
12322rm -f conftest.$ac_objext
12323if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12324 (eval $ac_compile) 2>conftest.er1
12325 ac_status=$?
12326 grep -v '^ *+' conftest.er1 >conftest.err
12327 rm -f conftest.er1
12328 cat conftest.err >&5
12329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12330 (exit $ac_status); } &&
ec6c7392
PB
12331 { ac_try='test -z "$ac_c_werror_flag"
12332 || test ! -s conftest.err'
4f6d8cc8
GK
12333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12334 (eval $ac_try) 2>&5
12335 ac_status=$?
12336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12337 (exit $ac_status); }; } &&
12338 { ac_try='test -s conftest.$ac_objext'
12339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12340 (eval $ac_try) 2>&5
12341 ac_status=$?
12342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12343 (exit $ac_status); }; }; then
12344 gcc_cv_mcontext_underscores=no
12345else
12346 echo "$as_me: failed program was:" >&5
12347sed 's/^/| /' conftest.$ac_ext >&5
12348
12349gcc_cv_mcontext_underscores=yes
12350fi
12351rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12352fi
12353echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
12354echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6
12355 if test $gcc_cv_mcontext_underscores = yes; then
12356
12357cat >>confdefs.h <<\_ACEOF
12358#define HAS_MCONTEXT_T_UNDERSCORES
12359_ACEOF
12360
12361 fi
12362 ;;
12363esac
12364
8bb915b6
NN
12365# ---------
12366# Threading
12367# ---------
12368
c2e494a8 12369# Check if a valid thread package
615be2cf 12370case ${enable_threads} in
c2e494a8
NN
12371 "" | no)
12372 # No threads
12373 target_thread_file='single'
12374 ;;
12375 yes)
12376 # default
12377 target_thread_file='single'
12378 ;;
18167442 12379 aix | dce | gnat | irix | posix | posix95 | rtems | \
769e49eb 12380 single | solaris | vxworks | win32 )
615be2cf 12381 target_thread_file=${enable_threads}
c2e494a8
NN
12382 ;;
12383 *)
615be2cf 12384 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
12385 exit 1
12386 ;;
12387esac
12388
12389if test x${thread_file} = x; then
12390 # No thread file set by target-specific clauses in config.gcc,
12391 # so use file chosen by default logic above
12392 thread_file=${target_thread_file}
861bb6c1
JL
12393fi
12394
8bb915b6
NN
12395# Make gthr-default.h if we have a thread file.
12396gthread_flags=
12397if test $thread_file != single; then
12398 rm -f gthr-default.h
12399 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12400 gthread_flags=-DHAVE_GTHR_DEFAULT
12401fi
12402
12403
12404# --------
12405# UNSORTED
12406# --------
12407
18fbf599 12408use_cxa_atexit=no
2121a768
JT
12409if test x$enable___cxa_atexit = xyes || \
12410 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599
PB
12411 if test x$host = x$target; then
12412 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
354b7da5
DH
12413echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
12414if test "${ac_cv_func___cxa_atexit+set}" = set; then
12415 echo $ECHO_N "(cached) $ECHO_C" >&6
12416else
12417 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
12418/* confdefs.h. */
12419_ACEOF
12420cat confdefs.h >>conftest.$ac_ext
12421cat >>conftest.$ac_ext <<_ACEOF
12422/* end confdefs.h. */
86da66b5
HPN
12423/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12424 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12425#define __cxa_atexit innocuous___cxa_atexit
12426
354b7da5
DH
12427/* System header to define __stub macros and hopefully few prototypes,
12428 which can conflict with char __cxa_atexit (); below.
12429 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12430 <limits.h> exists even on freestanding compilers. */
86da66b5 12431
354b7da5
DH
12432#ifdef __STDC__
12433# include <limits.h>
12434#else
12435# include <assert.h>
12436#endif
86da66b5
HPN
12437
12438#undef __cxa_atexit
12439
354b7da5
DH
12440/* Override any gcc2 internal prototype to avoid an error. */
12441#ifdef __cplusplus
12442extern "C"
12443{
12444#endif
12445/* We use char because int might match the return type of a gcc2
12446 builtin and then its argument prototype would still apply. */
12447char __cxa_atexit ();
12448/* The GNU C library defines this for functions which it implements
12449 to always fail with ENOSYS. Some functions are actually named
12450 something starting with __ and the normal name is an alias. */
12451#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
12452choke me
12453#else
12454char (*f) () = __cxa_atexit;
12455#endif
12456#ifdef __cplusplus
12457}
12458#endif
12459
12460int
12461main ()
12462{
12463return f != __cxa_atexit;
12464 ;
12465 return 0;
12466}
12467_ACEOF
12468rm -f conftest.$ac_objext conftest$ac_exeext
12469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12470 (eval $ac_link) 2>conftest.er1
354b7da5 12471 ac_status=$?
86da66b5
HPN
12472 grep -v '^ *+' conftest.er1 >conftest.err
12473 rm -f conftest.er1
12474 cat conftest.err >&5
354b7da5
DH
12475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12476 (exit $ac_status); } &&
ec6c7392
PB
12477 { ac_try='test -z "$ac_c_werror_flag"
12478 || test ! -s conftest.err'
86da66b5
HPN
12479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12480 (eval $ac_try) 2>&5
12481 ac_status=$?
12482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12483 (exit $ac_status); }; } &&
12484 { ac_try='test -s conftest$ac_exeext'
354b7da5
DH
12485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12486 (eval $ac_try) 2>&5
12487 ac_status=$?
12488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12489 (exit $ac_status); }; }; then
12490 ac_cv_func___cxa_atexit=yes
12491else
12492 echo "$as_me: failed program was:" >&5
12493sed 's/^/| /' conftest.$ac_ext >&5
12494
12495ac_cv_func___cxa_atexit=no
12496fi
86da66b5
HPN
12497rm -f conftest.err conftest.$ac_objext \
12498 conftest$ac_exeext conftest.$ac_ext
354b7da5
DH
12499fi
12500echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12501echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
12502if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
12503 use_cxa_atexit=yes
12504else
12505 echo "__cxa_atexit can't be enabled on this target"
12506fi
12507
12508 else
12509 # We can't check for __cxa_atexit when building a cross, so assume
12510 # it is available
12511 use_cxa_atexit=yes
12512 fi
12513 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
12514
12515cat >>confdefs.h <<\_ACEOF
c7b5e395 12516#define DEFAULT_USE_CXA_ATEXIT 2
ba479fd2 12517_ACEOF
2121a768 12518
18fbf599 12519 fi
2121a768
JT
12520fi
12521
a5381466 12522# Look for a file containing extra machine modes.
1c0ca89d
ZW
12523if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12524 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
12525
12526
12527cat >>confdefs.h <<_ACEOF
e22340b0 12528#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 12529_ACEOF
a5381466
ZW
12530
12531fi
12532
75685792
RS
12533# Convert extra_options into a form suitable for Makefile use.
12534extra_opt_files=
12535for f in $extra_options; do
12536 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12537done
12538
12539
b7cb92ad 12540# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 12541# the first file included by config.h.
4977bab6 12542# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 12543# as well. If host!=build, we are in error and need to do more
db81d74a 12544# work to find out the build config parameters.
75bffa71 12545if test x$host = x$build
db81d74a 12546then
eaf4e618 12547 build_auto=auto-host.h
b7cb92ad
JL
12548else
12549 # We create a subdir, then run autoconf in the subdir.
12550 # To prevent recursion we set host and build for the new
12551 # invocation of configure to the build for this invocation
ba479fd2 12552 # of configure.
b7cb92ad
JL
12553 tempdir=build.$$
12554 rm -rf $tempdir
12555 mkdir $tempdir
12556 cd $tempdir
12557 case ${srcdir} in
255b8a49 12558 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
12559 *) realsrcdir=../${srcdir};;
12560 esac
d920e825
L
12561 saved_CFLAGS="${CFLAGS}"
12562 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12563 ${realsrcdir}/configure \
33e70558 12564 --enable-languages=${enable_languages-all} \
534d0cc0 12565 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 12566 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
12567
12568 # We just finished tests for the build machine, so rename
12569 # the file auto-build.h in the gcc directory.
12570 mv auto-host.h ../auto-build.h
12571 cd ..
12572 rm -rf $tempdir
eaf4e618 12573 build_auto=auto-build.h
db81d74a
RH
12574fi
12575
06f0b04c 12576
eaf4e618 12577tm_file="${tm_file} defaults.h"
4977bab6
ZW
12578tm_p_file="${tm_p_file} tm-preds.h"
12579host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12580build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 12581# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 12582# put this back in temporarily.
232b67d9 12583xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 12584
34a86c2b
NN
12585# --------
12586# UNSORTED
12587# --------
12588
cc1e60ea 12589# Compile in configure arguments.
8105825d 12590if test -f configargs.h ; then
cc1e60ea 12591 # Being re-configured.
022dae81 12592 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
12593 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12594else
12595 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12596fi
eeae7b41
DJ
12597
12598# Double all backslashes and backslash all quotes to turn
12599# gcc_config_arguments into a C string.
12600sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12601$gcc_config_arguments
12602EOF
12603gcc_config_arguments_str=`cat conftest.out`
12604rm -f conftest.out
12605
cc1e60ea
JM
12606cat > configargs.h <<EOF
12607/* Generated automatically. */
eeae7b41 12608static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 12609static const char thread_model[] = "$thread_file";
7816bea0
DJ
12610
12611static const struct {
12612 const char *name, *value;
12613} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
12614EOF
12615
ab87f8c8 12616# Internationalization
18fc9bd4
RG
12617# If we haven't got the data from the intl directory,
12618# assume NLS is disabled.
12619USE_NLS=no
12620LIBINTL=
12621LIBINTL_DEP=
12622INCINTL=
12623XGETTEXT=
12624GMSGFMT=
12625POSUB=
12626
12627if test -f ../intl/config.intl; then
12628 . ../intl/config.intl
12629fi
12630echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12631echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
12632if test x"$USE_NLS" != xyes; then
12633 echo "$as_me:$LINENO: result: no" >&5
12634echo "${ECHO_T}no" >&6
12635else
12636 echo "$as_me:$LINENO: result: yes" >&5
12637echo "${ECHO_T}yes" >&6
12638
12639cat >>confdefs.h <<\_ACEOF
12640#define ENABLE_NLS 1
12641_ACEOF
12642
12643
12644 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12645echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
12646 # Look for .po and .gmo files in the source directory.
12647 CATALOGS=
12648 XLINGUAS=
12649 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12650 # If there aren't any .gmo files the shell will give us the
12651 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12652 # weeded out.
12653 case "$cat" in *\**)
12654 continue;;
12655 esac
12656 # The quadruple backslash is collapsed to a double backslash
12657 # by the backticks, then collapsed again by the double quotes,
12658 # leaving us with one backslash in the sed expression (right
12659 # before the dot that mustn't act as a wildcard).
12660 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
12661 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
12662 # The user is allowed to set LINGUAS to a list of languages to
12663 # install catalogs for. If it's empty that means "all of them."
12664 if test "x$LINGUAS" = x; then
12665 CATALOGS="$CATALOGS $cat"
12666 XLINGUAS="$XLINGUAS $lang"
12667 else
12668 case "$LINGUAS" in *$lang*)
12669 CATALOGS="$CATALOGS $cat"
12670 XLINGUAS="$XLINGUAS $lang"
12671 ;;
12672 esac
12673 fi
12674 done
12675 LINGUAS="$XLINGUAS"
12676 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12677echo "${ECHO_T}$LINGUAS" >&6
12678
12679
12680 DATADIRNAME=share
12681
12682 INSTOBJEXT=.mo
12683
12684 GENCAT=gencat
12685
12686 CATOBJEXT=.gmo
12687
12688fi
861bb6c1 12689
56694dd9
ZW
12690# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12691# -liconv on the link line twice.
12692case "$LIBINTL" in *$LIBICONV*)
12693 LIBICONV= ;;
12694esac
dc6746e7 12695
7f970b70
AM
12696# Check whether --enable-secureplt or --disable-secureplt was given.
12697if test "${enable_secureplt+set}" = set; then
12698 enableval="$enable_secureplt"
12699
12700fi;
12701
56694dd9
ZW
12702# Windows32 Registry support for specifying GCC installation paths.
12703# Check whether --enable-win32-registry or --disable-win32-registry was given.
12704if test "${enable_win32_registry+set}" = set; then
12705 enableval="$enable_win32_registry"
dc6746e7 12706
ba479fd2 12707fi;
ba479fd2 12708
a1286ef5
ZW
12709case $host_os in
12710 win32 | pe | cygwin* | mingw32* | uwin*)
12711 if test "x$enable_win32_registry" != xno; then
12712 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
ba479fd2
NN
12713echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
12714if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12715 echo $ECHO_N "(cached) $ECHO_C" >&6
12716else
12717 ac_func_search_save_LIBS=$LIBS
12718ac_cv_search_RegOpenKeyExA=no
12719cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12720/* confdefs.h. */
12721_ACEOF
12722cat confdefs.h >>conftest.$ac_ext
12723cat >>conftest.$ac_ext <<_ACEOF
12724/* end confdefs.h. */
861bb6c1 12725
ab87f8c8 12726/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12727#ifdef __cplusplus
12728extern "C"
12729#endif
ab87f8c8 12730/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12731 builtin and then its argument prototype would still apply. */
12732char RegOpenKeyExA ();
12733int
12734main ()
12735{
12736RegOpenKeyExA ();
12737 ;
12738 return 0;
12739}
12740_ACEOF
12741rm -f conftest.$ac_objext conftest$ac_exeext
12742if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12743 (eval $ac_link) 2>conftest.er1
ba479fd2 12744 ac_status=$?
86da66b5
HPN
12745 grep -v '^ *+' conftest.er1 >conftest.err
12746 rm -f conftest.er1
12747 cat conftest.err >&5
ba479fd2
NN
12748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12749 (exit $ac_status); } &&
ec6c7392
PB
12750 { ac_try='test -z "$ac_c_werror_flag"
12751 || test ! -s conftest.err'
86da66b5
HPN
12752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12753 (eval $ac_try) 2>&5
12754 ac_status=$?
12755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12756 (exit $ac_status); }; } &&
12757 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12759 (eval $ac_try) 2>&5
12760 ac_status=$?
12761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12762 (exit $ac_status); }; }; then
56694dd9 12763 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 12764else
ba479fd2
NN
12765 echo "$as_me: failed program was:" >&5
12766sed 's/^/| /' conftest.$ac_ext >&5
12767
861bb6c1 12768fi
86da66b5
HPN
12769rm -f conftest.err conftest.$ac_objext \
12770 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
12771if test "$ac_cv_search_RegOpenKeyExA" = no; then
12772 for ac_lib in advapi32; do
12773 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12774 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12775/* confdefs.h. */
12776_ACEOF
12777cat confdefs.h >>conftest.$ac_ext
12778cat >>conftest.$ac_ext <<_ACEOF
12779/* end confdefs.h. */
12780
56694dd9 12781/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12782#ifdef __cplusplus
12783extern "C"
12784#endif
56694dd9 12785/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12786 builtin and then its argument prototype would still apply. */
12787char RegOpenKeyExA ();
12788int
12789main ()
12790{
12791RegOpenKeyExA ();
12792 ;
12793 return 0;
12794}
12795_ACEOF
12796rm -f conftest.$ac_objext conftest$ac_exeext
12797if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12798 (eval $ac_link) 2>conftest.er1
ba479fd2 12799 ac_status=$?
86da66b5
HPN
12800 grep -v '^ *+' conftest.er1 >conftest.err
12801 rm -f conftest.er1
12802 cat conftest.err >&5
ba479fd2
NN
12803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12804 (exit $ac_status); } &&
ec6c7392
PB
12805 { ac_try='test -z "$ac_c_werror_flag"
12806 || test ! -s conftest.err'
86da66b5
HPN
12807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12808 (eval $ac_try) 2>&5
12809 ac_status=$?
12810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12811 (exit $ac_status); }; } &&
12812 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12814 (eval $ac_try) 2>&5
12815 ac_status=$?
12816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12817 (exit $ac_status); }; }; then
12818 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 12819break
861bb6c1 12820else
ba479fd2
NN
12821 echo "$as_me: failed program was:" >&5
12822sed 's/^/| /' conftest.$ac_ext >&5
12823
861bb6c1 12824fi
86da66b5
HPN
12825rm -f conftest.err conftest.$ac_objext \
12826 conftest$ac_exeext conftest.$ac_ext
ba479fd2 12827 done
6e3f3080 12828fi
ba479fd2
NN
12829LIBS=$ac_func_search_save_LIBS
12830fi
12831echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
12832echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
12833if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 12834 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 12835
cafe096b 12836else
a1286ef5 12837 enable_win32_registry=no
093e61a6 12838fi
ab87f8c8 12839
a1286ef5
ZW
12840 fi
12841
12842 if test "x$enable_win32_registry" != xno; then
12843
12844cat >>confdefs.h <<\_ACEOF
12845#define ENABLE_WIN32_REGISTRY 1
12846_ACEOF
ab87f8c8 12847
a1286ef5
ZW
12848
12849 if test "x$enable_win32_registry" != xyes \
12850 && test "x$enable_win32_registry" != x; then
ba479fd2
NN
12851
12852cat >>confdefs.h <<_ACEOF
a1286ef5 12853#define WIN32_REGISTRY_KEY "$enable_win32_registry"
ba479fd2 12854_ACEOF
cafe096b 12855
a1286ef5
ZW
12856 fi
12857 fi
12858 ;;
56694dd9 12859esac
ab87f8c8 12860
56694dd9
ZW
12861# Get an absolute path to the GCC top-level source directory
12862holddir=`${PWDCMD-pwd}`
12863cd $srcdir
12864topdir=`${PWDCMD-pwd}`
12865cd $holddir
ab87f8c8 12866
56694dd9 12867# Conditionalize the makefile for this host machine.
2ed26f6b 12868xmake_file=
c406e779 12869for f in ${host_xmake_file}
56694dd9
ZW
12870do
12871 if test -f ${srcdir}/config/$f
12872 then
2ed26f6b 12873 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
12874 fi
12875done
093e61a6 12876
56694dd9 12877# Conditionalize the makefile for this target machine.
2ed26f6b 12878tmake_file_=
c406e779 12879for f in ${tmake_file}
56694dd9
ZW
12880do
12881 if test -f ${srcdir}/config/$f
12882 then
2ed26f6b 12883 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
12884 fi
12885done
2ed26f6b 12886tmake_file="${tmake_file_}"
71a94577 12887
ab87f8c8
JL
12888# If the host doesn't support symlinks, modify CC in
12889# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
12890# Otherwise, we can use "CC=$(CC)".
12891rm -f symtest.tem
35f06ae4
PB
12892case "$LN_S" in
12893 *-s*)
12894 cc_set_by_configure="\$(CC)"
12895 quoted_cc_set_by_configure="\$(CC)"
12896 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12897 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12898 ;;
12899 *)
12900 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
12901 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
12902 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
12903 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
12904 ;;
12905esac
ab87f8c8 12906
5395b47b
NN
12907# This is a terrible hack which will go away some day.
12908host_cc_for_libada=${CC}
1e3fad21
NN
12909
12910
ab87f8c8
JL
12911out_object_file=`basename $out_file .c`.o
12912
75685792
RS
12913tm_file_list="options.h"
12914tm_include_list="options.h"
ab87f8c8 12915for f in $tm_file; do
64ccbc99 12916 case $f in
d02af173 12917 defaults.h )
e22340b0
ZW
12918 tm_file_list="${tm_file_list} \$(srcdir)/$f"
12919 tm_include_list="${tm_include_list} $f"
12920 ;;
12921 * )
12922 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
12923 tm_include_list="${tm_include_list} config/$f"
12924 ;;
64ccbc99 12925 esac
ab87f8c8
JL
12926done
12927
11642c3a 12928tm_p_file_list=
e22340b0 12929tm_p_include_list=
11642c3a 12930for f in $tm_p_file; do
4977bab6
ZW
12931 case $f in
12932 tm-preds.h )
e22340b0
ZW
12933 tm_p_file_list="${tm_p_file_list} $f"
12934 tm_p_include_list="${tm_p_include_list} $f"
12935 ;;
12936 * )
12937 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
12938 tm_p_include_list="${tm_p_include_list} config/$f"
12939 esac
12940done
12941
12942xm_file_list=
12943xm_include_list=
12944for f in $xm_file; do
12945 case $f in
12946 ansidecl.h )
12947 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
12948 xm_include_list="${xm_include_list} $f"
12949 ;;
12950 auto-host.h )
12951 xm_file_list="${xm_file_list} $f"
12952 xm_include_list="${xm_include_list} $f"
12953 ;;
12954 * )
12955 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
12956 xm_include_list="${xm_include_list} config/$f"
12957 ;;
4977bab6 12958 esac
11642c3a
ZW
12959done
12960
ab87f8c8 12961host_xm_file_list=
e22340b0 12962host_xm_include_list=
ab87f8c8 12963for f in $host_xm_file; do
64ccbc99 12964 case $f in
d02af173 12965 ansidecl.h )
e22340b0
ZW
12966 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
12967 host_xm_include_list="${host_xm_include_list} $f"
12968 ;;
e2500fed 12969 auto-host.h )
e22340b0
ZW
12970 host_xm_file_list="${host_xm_file_list} $f"
12971 host_xm_include_list="${host_xm_include_list} $f"
12972 ;;
12973 * )
12974 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
12975 host_xm_include_list="${host_xm_include_list} config/$f"
12976 ;;
64ccbc99 12977 esac
ab87f8c8
JL
12978done
12979
12980build_xm_file_list=
12981for f in $build_xm_file; do
64ccbc99 12982 case $f in
d02af173 12983 ansidecl.h )
e22340b0
ZW
12984 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
12985 build_xm_include_list="${build_xm_include_list} $f"
12986 ;;
e2500fed 12987 auto-build.h | auto-host.h )
e22340b0
ZW
12988 build_xm_file_list="${build_xm_file_list} $f"
12989 build_xm_include_list="${build_xm_include_list} $f"
12990 ;;
12991 * )
12992 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
12993 build_xm_include_list="${build_xm_include_list} config/$f"
12994 ;;
64ccbc99 12995 esac
ab87f8c8
JL
12996done
12997
a078a589
ZW
12998# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
12999# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
13000CROSS=
13001ALL=all.internal
13002SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
13003
13004if test "x$with_build_sysroot" != x; then
13005 build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)'
13006else
13007 # This value is used, even on a native system, because
13008 # CROSS_SYSTEM_HEADER_DIR is just
13009 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
13010 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
13011fi
13012
ab87f8c8
JL
13013if test x$host != x$target
13014then
a078a589
ZW
13015 CROSS="-DCROSS_COMPILE"
13016 ALL=all.cross
160633c6 13017 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 13018 case "$host","$target" in
3a7e8b87
GK
13019 # Darwin crosses can use the host system's libraries and headers,
13020 # because of the fat library support. Of course, it must be the
13021 # same version of Darwin on both sides. Allow the user to
13022 # just say --target=foo-darwin without a version number to mean
13023 # "the version on this system".
13024 *-*-darwin*,*-*-darwin*)
13025 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
13026 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
13027 if test $hostos = $targetos -o $targetos = darwin ; then
13028 CROSS=
13029 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
13030 with_headers=yes
13031 fi
13032 ;;
13033
343f59d9
AM
13034 i?86-*-*,x86_64-*-* \
13035 | powerpc*-*-*,powerpc64*-*-*)
13036 CROSS="$CROSS -DNATIVE_CROSS" ;;
13037 esac
7a615b25 13038elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 13039 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
13040fi
13041
b39d221a
EC
13042# If this is a cross-compiler that does not
13043# have its own set of headers then define
13044# inhibit_libc
13045
dc06db20
R
13046# If this is using newlib, without having the headers available now,
13047# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
13048# This prevents libgcc2 from containing any code which requires libc
13049# support.
160633c6 13050inhibit_libc=false
dc06db20
R
13051if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
13052 test x$with_newlib = xyes ; } &&
e50084fa 13053 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 13054 inhibit_libc=true
b39d221a
EC
13055fi
13056
13057
a078a589
ZW
13058# When building gcc with a cross-compiler, we need to adjust things so
13059# that the generator programs are still built with the native compiler.
13060# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
13061
13062# These are the normal (build=host) settings:
ba479fd2
NN
13063CC_FOR_BUILD='$(CC)'
13064BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 13065STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
13066
13067# Possibly disable fixproto, on a per-target basis.
13068case ${use_fixproto} in
13069 no)
13070 STMP_FIXPROTO=
13071 ;;
13072 yes)
13073 STMP_FIXPROTO=stmp-fixproto
13074 ;;
13075esac
13076
a078a589 13077
83599948
NS
13078# And these apply if build != host, or we are generating coverage data
13079if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 13080then
b11e4747 13081 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 13082
7a615b25 13083 if test "x$TARGET_SYSTEM_ROOT" = x; then
d8e5117d 13084 if test "x$STMP_FIXPROTO" != x; then
de253ca4
GK
13085 STMP_FIXPROTO=stmp-install-fixproto
13086 fi
7a615b25 13087 fi
ab87f8c8
JL
13088fi
13089
13090# Expand extra_headers to include complete path.
13091# This substitutes for lots of t-* files.
13092extra_headers_list=
b1ef58c8
NN
13093# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
13094for file in ${extra_headers} ; do
13095 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
13096done
ab87f8c8 13097
c38f02df
ILT
13098# Define collect2 in Makefile.
13099case $host_can_use_collect2 in
13100 no) collect2= ;;
13101 *) collect2='collect2$(exeext)' ;;
13102esac
13103
13104
ab87f8c8 13105# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
13106case $use_collect2 in
13107 no) use_collect2= ;;
13108 "") ;;
ba479fd2 13109 *)
34a86c2b
NN
13110 host_xm_defines="${host_xm_defines} USE_COLLECT2"
13111 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
13112 case $host_can_use_collect2 in
13113 no)
13114 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
13115echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
13116 { (exit 1); exit 1; }; }
13117 ;;
13118 esac
34a86c2b
NN
13119 ;;
13120esac
ab87f8c8 13121
8bb915b6
NN
13122# ---------------------------
13123# Assembler & linker features
13124# ---------------------------
13125
d869a8c4
NN
13126# Identify the assembler which will work hand-in-glove with the newly
13127# built GCC, so that we can examine its features. This is the assembler
13128# which will be driven by the driver program.
13129#
13130# If build != host, and we aren't building gas in-tree, we identify a
13131# build->target assembler and hope that it will have the same features
13132# as the host->target assembler we'll be using.
981d4858
JM
13133gcc_cv_gas_major_version=
13134gcc_cv_gas_minor_version=
ab87f8c8 13135gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
e8b05380
PB
13136
13137if test "${gcc_cv_as+set}" = set; then
13138 :
13139else
13140
ab87f8c8
JL
13141if test -x "$DEFAULT_ASSEMBLER"; then
13142 gcc_cv_as="$DEFAULT_ASSEMBLER"
34a86c2b 13143elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
13144 && test -f ../gas/Makefile \
13145 && test x$build = x$host; then
e8b05380
PB
13146 gcc_cv_as=../gas/as-new$build_exeext
13147elif test -x as$build_exeext; then
13148 # Build using assembler in the current directory.
13149 gcc_cv_as=./as$build_exeext
13150elif test -x $AS_FOR_TARGET; then
13151 gcc_cv_as="$AS_FOR_TARGET"
13152else
13153 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
13154set dummy $AS_FOR_TARGET; ac_word=$2
13155echo "$as_me:$LINENO: checking for $ac_word" >&5
13156echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13157if test "${ac_cv_path_gcc_cv_as+set}" = set; then
13158 echo $ECHO_N "(cached) $ECHO_C" >&6
13159else
13160 case $gcc_cv_as in
13161 [\\/]* | ?:[\\/]*)
13162 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
13163 ;;
13164 *)
13165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13166for as_dir in $PATH
13167do
13168 IFS=$as_save_IFS
13169 test -z "$as_dir" && as_dir=.
13170 for ac_exec_ext in '' $ac_executable_extensions; do
13171 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13172 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
13173 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13174 break 2
13175 fi
13176done
13177done
13178
13179 ;;
13180esac
13181fi
13182gcc_cv_as=$ac_cv_path_gcc_cv_as
13183
13184if test -n "$gcc_cv_as"; then
13185 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13186echo "${ECHO_T}$gcc_cv_as" >&6
13187else
13188 echo "$as_me:$LINENO: result: no" >&5
13189echo "${ECHO_T}no" >&6
13190fi
13191
13192fi
13193fi
13194
13195
13196ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
13197
13198
13199echo "$as_me:$LINENO: checking what assembler to use" >&5
13200echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
13201if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
08d105fa
AO
13202 # Single tree build which includes gas. We want to prefer it
13203 # over whatever linker top-level may have detected, since
13204 # we'll use what we're building after installation anyway.
e8b05380
PB
13205 echo "$as_me:$LINENO: result: newly built gas" >&5
13206echo "${ECHO_T}newly built gas" >&6
ad9c4d9f
NN
13207 in_tree_gas=yes
13208 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
13209for f in $gcc_cv_as_bfd_srcdir/configure \
13210 $gcc_cv_as_gas_srcdir/configure \
13211 $gcc_cv_as_gas_srcdir/configure.in \
13212 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 13213 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
13214 if test x$gcc_cv_gas_version != x; then
13215 break
13216 fi
13217done
13218gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
13219gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13220gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
13221case $gcc_cv_gas_patch_version in
13222 "") gcc_cv_gas_patch_version="0" ;;
13223esac
8ada417f
ZW
13224gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
13225 + $gcc_cv_gas_minor_version \) \* 1000 \
13226 + $gcc_cv_gas_patch_version`
ad9c4d9f 13227
5408ac6c
HPN
13228 in_tree_gas_is_elf=no
13229 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
13230 || (grep 'obj_format = multi' ../gas/Makefile \
13231 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
13232 then
13233 in_tree_gas_is_elf=yes
13234 fi
e8b05380
PB
13235else
13236 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13237echo "${ECHO_T}$gcc_cv_as" >&6
13238 in_tree_gas=no
981d4858 13239fi
9e423e6d 13240
e8b05380
PB
13241# Identify the linker which will work hand-in-glove with the newly
13242# built GCC, so that we can examine its features. This is the linker
13243# which will be driven by the driver program.
9f18db39 13244#
e8b05380
PB
13245# If build != host, and we aren't building gas in-tree, we identify a
13246# build->target linker and hope that it will have the same features
13247# as the host->target linker we'll be using.
13248gcc_cv_gld_major_version=
13249gcc_cv_gld_minor_version=
13250gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
13251gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9f18db39 13252
e8b05380
PB
13253if test "${gcc_cv_ld+set}" = set; then
13254 :
9f18db39 13255else
9f18db39 13256
e8b05380
PB
13257if test -x "$DEFAULT_LINKER"; then
13258 gcc_cv_ld="$DEFAULT_LINKER"
13259elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
13260 && test -f ../ld/Makefile \
13261 && test x$build = x$host; then
13262 gcc_cv_ld=../ld/ld-new$build_exeext
13263elif test -x collect-ld$build_exeext; then
13264 # Build using linker in the current directory.
13265 gcc_cv_ld=./collect-ld$build_exeext
13266elif test -x $LD_FOR_TARGET; then
13267 gcc_cv_ld="$LD_FOR_TARGET"
13268else
13269 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
13270set dummy $LD_FOR_TARGET; ac_word=$2
d739199a
DJ
13271echo "$as_me:$LINENO: checking for $ac_word" >&5
13272echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13273if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
d739199a
DJ
13274 echo $ECHO_N "(cached) $ECHO_C" >&6
13275else
e8b05380 13276 case $gcc_cv_ld in
d739199a 13277 [\\/]* | ?:[\\/]*)
e8b05380 13278 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
13279 ;;
13280 *)
13281 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13282for as_dir in $PATH
13283do
13284 IFS=$as_save_IFS
13285 test -z "$as_dir" && as_dir=.
13286 for ac_exec_ext in '' $ac_executable_extensions; do
13287 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13288 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13289 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13290 break 2
13291 fi
13292done
13293done
13294
13295 ;;
13296esac
13297fi
e8b05380 13298gcc_cv_ld=$ac_cv_path_gcc_cv_ld
d739199a 13299
e8b05380
PB
13300if test -n "$gcc_cv_ld"; then
13301 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13302echo "${ECHO_T}$gcc_cv_ld" >&6
d739199a
DJ
13303else
13304 echo "$as_me:$LINENO: result: no" >&5
13305echo "${ECHO_T}no" >&6
13306fi
13307
13308fi
e8b05380
PB
13309fi
13310
13311
13312ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
13313
13314
13315echo "$as_me:$LINENO: checking what linker to use" >&5
13316echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
13317if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
13318 # Single tree build which includes ld. We want to prefer it
13319 # over whatever linker top-level may have detected, since
13320 # we'll use what we're building after installation anyway.
13321 echo "$as_me:$LINENO: result: newly built ld" >&5
13322echo "${ECHO_T}newly built ld" >&6
13323 in_tree_ld=yes
13324 in_tree_ld_is_elf=no
13325 if (grep 'EMUL = .*elf' ../ld/Makefile \
13326 || grep 'EMUL = .*linux' ../ld/Makefile \
13327 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
13328 in_tree_ld_is_elf=yes
13329 fi
13330 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
13331 do
13332 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
13333 if test x$gcc_cv_gld_version != x; then
13334 break
13335 fi
13336 done
13337 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
13338 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13339else
13340 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13341echo "${ECHO_T}$gcc_cv_ld" >&6
13342 in_tree_ld=no
13343fi
13344
13345# Figure out what nm we will be using.
13346gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
13347if test "${gcc_cv_nm+set}" = set; then
13348 :
13349else
13350
13351if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
13352 && test -f ../binutils/Makefile \
13353 && test x$build = x$host; then
e8b05380
PB
13354 gcc_cv_nm=../binutils/nm-new$build_exeext
13355elif test -x nm$build_exeext; then
13356 gcc_cv_nm=./nm$build_exeext
13357elif test -x $NM_FOR_TARGET; then
13358 gcc_cv_nm="$NM_FOR_TARGET"
13359else
13360 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
13361set dummy $NM_FOR_TARGET; ac_word=$2
d739199a
DJ
13362echo "$as_me:$LINENO: checking for $ac_word" >&5
13363echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13364if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
d739199a
DJ
13365 echo $ECHO_N "(cached) $ECHO_C" >&6
13366else
e8b05380 13367 case $gcc_cv_nm in
d739199a 13368 [\\/]* | ?:[\\/]*)
e8b05380 13369 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
13370 ;;
13371 *)
13372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13373for as_dir in $PATH
13374do
13375 IFS=$as_save_IFS
13376 test -z "$as_dir" && as_dir=.
13377 for ac_exec_ext in '' $ac_executable_extensions; do
13378 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13379 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13380 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13381 break 2
13382 fi
13383done
13384done
13385
13386 ;;
13387esac
13388fi
e8b05380 13389gcc_cv_nm=$ac_cv_path_gcc_cv_nm
d739199a 13390
e8b05380
PB
13391if test -n "$gcc_cv_nm"; then
13392 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13393echo "${ECHO_T}$gcc_cv_nm" >&6
d739199a
DJ
13394else
13395 echo "$as_me:$LINENO: result: no" >&5
13396echo "${ECHO_T}no" >&6
13397fi
13398
13399fi
e8b05380 13400fi
d739199a 13401
e8b05380
PB
13402
13403echo "$as_me:$LINENO: checking what nm to use" >&5
13404echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
13405if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
13406 # Single tree build which includes binutils.
13407 echo "$as_me:$LINENO: result: newly built nm" >&5
13408echo "${ECHO_T}newly built nm" >&6
13409 in_tree_nm=yes
13410else
13411 echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13412echo "${ECHO_T}$gcc_cv_nm" >&6
13413 in_tree_nm=no
13414fi
13415
13416ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
13417
13418
13419# Figure out what objdump we will be using.
13420if test "${gcc_cv_objdump+set}" = set; then
13421 :
13422else
13423
13424if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
13425 && test -f ../binutils/Makefile \
13426 && test x$build = x$host; then
e8b05380
PB
13427 # Single tree build which includes binutils.
13428 gcc_cv_objdump=../binutils/objdump$build_exeext
13429elif test -x objdump$build_exeext; then
13430 gcc_cv_objdump=./objdump$build_exeext
13431elif test -x $OBJDUMP_FOR_TARGET; then
13432 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
13433else
13434 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
13435set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
9f18db39
PB
13436echo "$as_me:$LINENO: checking for $ac_word" >&5
13437echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
e8b05380 13438if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
9f18db39
PB
13439 echo $ECHO_N "(cached) $ECHO_C" >&6
13440else
e8b05380 13441 case $gcc_cv_objdump in
9f18db39 13442 [\\/]* | ?:[\\/]*)
e8b05380 13443 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
13444 ;;
13445 *)
13446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 13447for as_dir in $PATH
9f18db39
PB
13448do
13449 IFS=$as_save_IFS
13450 test -z "$as_dir" && as_dir=.
13451 for ac_exec_ext in '' $ac_executable_extensions; do
13452 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e8b05380 13453 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
9f18db39
PB
13454 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13455 break 2
13456 fi
13457done
13458done
779243f7 13459
9f18db39
PB
13460 ;;
13461esac
13462fi
e8b05380 13463gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
9f18db39 13464
e8b05380
PB
13465if test -n "$gcc_cv_objdump"; then
13466 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13467echo "${ECHO_T}$gcc_cv_objdump" >&6
9f18db39
PB
13468else
13469 echo "$as_me:$LINENO: result: no" >&5
13470echo "${ECHO_T}no" >&6
13471fi
13472
e8b05380
PB
13473fi
13474fi
9f18db39 13475
e8b05380
PB
13476
13477echo "$as_me:$LINENO: checking what objdump to use" >&5
13478echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
13479if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
13480 # Single tree build which includes binutils.
13481 echo "$as_me:$LINENO: result: newly built objdump" >&5
13482echo "${ECHO_T}newly built objdump" >&6
13483elif test x$gcc_cv_objdump = x; then
13484 echo "$as_me:$LINENO: result: not found" >&5
13485echo "${ECHO_T}not found" >&6
13486else
13487 echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13488echo "${ECHO_T}$gcc_cv_objdump" >&6
a2eafc76 13489fi
3cae5780 13490
981d4858 13491# Figure out what assembler alignment features are present.
ba479fd2
NN
13492echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13493echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
13494if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13495 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13496else
13497 gcc_cv_as_balign_and_p2align=no
13498 if test $in_tree_gas = yes; then
13499 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13500 then gcc_cv_as_balign_and_p2align=yes
13501fi
13502 elif test x$gcc_cv_as != x; then
6e3f3080 13503 echo '.balign 4
8ada417f 13504.p2align 2' > conftest.s
ba479fd2
NN
13505 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13507 (eval $ac_try) 2>&5
13508 ac_status=$?
13509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13510 (exit $ac_status); }; }
8ada417f
ZW
13511 then
13512 gcc_cv_as_balign_and_p2align=yes
13513 else
13514 echo "configure: failed program was" >&5
13515 cat conftest.s >&5
13516 fi
13517 rm -f conftest.o conftest.s
13518 fi
13519fi
ba479fd2
NN
13520echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13521echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 13522if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
13523
13524cat >>confdefs.h <<\_ACEOF
981d4858 13525#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 13526_ACEOF
981d4858 13527
ad9c4d9f
NN
13528fi
13529
ba479fd2
NN
13530echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13531echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
13532if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13533 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13534else
13535 gcc_cv_as_max_skip_p2align=no
13536 if test $in_tree_gas = yes; then
13537 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13538 then gcc_cv_as_max_skip_p2align=yes
13539fi
13540 elif test x$gcc_cv_as != x; then
6e3f3080 13541 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
13542 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13544 (eval $ac_try) 2>&5
13545 ac_status=$?
13546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13547 (exit $ac_status); }; }
8ada417f
ZW
13548 then
13549 gcc_cv_as_max_skip_p2align=yes
13550 else
13551 echo "configure: failed program was" >&5
13552 cat conftest.s >&5
13553 fi
13554 rm -f conftest.o conftest.s
13555 fi
ad9c4d9f 13556fi
ba479fd2
NN
13557echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13558echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 13559if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
13560
13561cat >>confdefs.h <<\_ACEOF
9e423e6d 13562#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 13563_ACEOF
9e423e6d 13564
9e423e6d 13565fi
ad9c4d9f 13566
ba479fd2
NN
13567echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13568echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
13569if test "${gcc_cv_as_subsection_m1+set}" = set; then
13570 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13571else
13572 gcc_cv_as_subsection_m1=no
13573 if test $in_tree_gas = yes; then
13574 if test $in_tree_gas_is_elf = yes \
13575 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13576 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 13577fi
8ada417f 13578 elif test x$gcc_cv_as != x; then
6e3f3080 13579 echo 'conftest_label1: .word 0
d1accaa3
JJ
13580.subsection -1
13581conftest_label2: .word 0
8ada417f 13582.previous' > conftest.s
ba479fd2
NN
13583 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13585 (eval $ac_try) 2>&5
13586 ac_status=$?
13587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13588 (exit $ac_status); }; }
8ada417f
ZW
13589 then
13590 if test x$gcc_cv_nm != x; then
13591 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13592 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13593 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13594 then :
13595 else gcc_cv_as_subsection_m1=yes
13596 fi
13597 rm -f conftest.nm1 conftest.nm2
13598 fi
13599 else
13600 echo "configure: failed program was" >&5
13601 cat conftest.s >&5
13602 fi
13603 rm -f conftest.o conftest.s
13604 fi
981d4858 13605fi
ba479fd2
NN
13606echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13607echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 13608if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
13609
13610cat >>confdefs.h <<\_ACEOF
981d4858 13611#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 13612_ACEOF
981d4858 13613
d1accaa3 13614fi
ad9c4d9f 13615
ba479fd2
NN
13616echo "$as_me:$LINENO: checking assembler for .weak" >&5
13617echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
13618if test "${gcc_cv_as_weak+set}" = set; then
13619 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13620else
13621 gcc_cv_as_weak=no
13622 if test $in_tree_gas = yes; then
13623 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13624 then gcc_cv_as_weak=yes
ad9c4d9f 13625fi
8ada417f 13626 elif test x$gcc_cv_as != x; then
6e3f3080 13627 echo ' .weak foobar' > conftest.s
ba479fd2
NN
13628 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13630 (eval $ac_try) 2>&5
13631 ac_status=$?
13632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13633 (exit $ac_status); }; }
8ada417f
ZW
13634 then
13635 gcc_cv_as_weak=yes
13636 else
13637 echo "configure: failed program was" >&5
13638 cat conftest.s >&5
13639 fi
13640 rm -f conftest.o conftest.s
13641 fi
981d4858 13642fi
ba479fd2
NN
13643echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13644echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 13645if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
13646
13647cat >>confdefs.h <<\_ACEOF
981d4858 13648#define HAVE_GAS_WEAK 1
ba479fd2 13649_ACEOF
981d4858 13650
12822146 13651fi
ad9c4d9f 13652
a0203ca7
AO
13653echo "$as_me:$LINENO: checking assembler for .weakref" >&5
13654echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
13655if test "${gcc_cv_as_weakref+set}" = set; then
13656 echo $ECHO_N "(cached) $ECHO_C" >&6
13657else
13658 gcc_cv_as_weakref=no
13659 if test $in_tree_gas = yes; then
13660 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
13661 then gcc_cv_as_weakref=yes
13662fi
13663 elif test x$gcc_cv_as != x; then
13664 echo ' .weakref foobar, barfnot' > conftest.s
13665 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13667 (eval $ac_try) 2>&5
13668 ac_status=$?
13669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13670 (exit $ac_status); }; }
13671 then
13672 gcc_cv_as_weakref=yes
13673 else
13674 echo "configure: failed program was" >&5
13675 cat conftest.s >&5
13676 fi
13677 rm -f conftest.o conftest.s
13678 fi
13679fi
13680echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
13681echo "${ECHO_T}$gcc_cv_as_weakref" >&6
13682if test $gcc_cv_as_weakref = yes; then
13683
13684cat >>confdefs.h <<\_ACEOF
13685#define HAVE_GAS_WEAKREF 1
13686_ACEOF
13687
13688fi
13689
e41f3691
JDA
13690echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13691echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
13692if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13693 echo $ECHO_N "(cached) $ECHO_C" >&6
13694else
13695 gcc_cv_as_nsubspa_comdat=no
13696 if test $in_tree_gas = yes; then
13697 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13698 then gcc_cv_as_nsubspa_comdat=yes
13699fi
13700 elif test x$gcc_cv_as != x; then
13701 echo ' .SPACE $TEXT$
13702 .NSUBSPA $CODE$,COMDAT' > conftest.s
13703 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13705 (eval $ac_try) 2>&5
13706 ac_status=$?
13707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13708 (exit $ac_status); }; }
13709 then
13710 gcc_cv_as_nsubspa_comdat=yes
13711 else
13712 echo "configure: failed program was" >&5
13713 cat conftest.s >&5
13714 fi
13715 rm -f conftest.o conftest.s
13716 fi
13717fi
13718echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13719echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
13720if test $gcc_cv_as_nsubspa_comdat = yes; then
13721
13722cat >>confdefs.h <<\_ACEOF
13723#define HAVE_GAS_NSUBSPA_COMDAT 1
13724_ACEOF
13725
13726fi
13727
8ada417f
ZW
13728# .hidden needs to be supported in both the assembler and the linker,
13729# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13730# This is irritatingly difficult to feature test for; we have to check the
13731# date string after the version number. If we've got an in-tree
13732# ld, we don't know its patchlevel version, so we set the baseline at 2.13
13733# to be safe.
13734# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
13735echo "$as_me:$LINENO: checking assembler for .hidden" >&5
13736echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
13737if test "${gcc_cv_as_hidden+set}" = set; then
13738 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13739else
13740 gcc_cv_as_hidden=no
13741 if test $in_tree_gas = yes; then
13742 if test $in_tree_gas_is_elf = yes \
13743 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
13744 then gcc_cv_as_hidden=yes
13745fi
13746 elif test x$gcc_cv_as != x; then
6e3f3080 13747 echo ' .hidden foobar
8ada417f 13748foobar:' > conftest.s
ba479fd2
NN
13749 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13751 (eval $ac_try) 2>&5
13752 ac_status=$?
13753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13754 (exit $ac_status); }; }
8ada417f
ZW
13755 then
13756 gcc_cv_as_hidden=yes
13757 else
13758 echo "configure: failed program was" >&5
13759 cat conftest.s >&5
13760 fi
13761 rm -f conftest.o conftest.s
13762 fi
13763fi
ba479fd2
NN
13764echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
13765echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 13766
ad9c4d9f 13767
ba479fd2
NN
13768echo "$as_me:$LINENO: checking linker for .hidden support" >&5
13769echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
13770if test "${gcc_cv_ld_hidden+set}" = set; then
13771 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13772else
13773 if test $in_tree_ld = yes ; then
13774 gcc_cv_ld_hidden=no
13775 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 \
13776 && test $in_tree_ld_is_elf = yes; then
13777 gcc_cv_ld_hidden=yes
13778 fi
13779else
13780 gcc_cv_ld_hidden=yes
bace148a 13781 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
13782 if echo "$ld_ver" | grep GNU > /dev/null; then
13783 ld_vers=`echo $ld_ver | sed -n \
13784 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13785 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13786 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13787 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13788 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
11176d2a
JB
13789 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13790 -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 13791 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
13792 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
13793 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
13794 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
13795 if test 0"$ld_date" -lt 20020404; then
13796 if test -n "$ld_date"; then
13797 # If there was date string, but was earlier than 2002-04-04, fail
13798 gcc_cv_ld_hidden=no
13799 elif test -z "$ld_vers"; then
13800 # If there was no date string nor ld version number, something is wrong
13801 gcc_cv_ld_hidden=no
13802 else
8ada417f
ZW
13803 test -z "$ld_vers_patch" && ld_vers_patch=0
13804 if test "$ld_vers_major" -lt 2; then
13805 gcc_cv_ld_hidden=no
13806 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
13807 gcc_cv_ld_hidden="no"
13808 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
13809 gcc_cv_ld_hidden=no
c72931a6 13810 fi
8ada417f 13811 fi
789b7de5 13812 fi
8ada417f 13813 else
28690784 13814 case "${target}" in
b0fd7d27 13815 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
13816 gcc_cv_ld_hidden=yes
13817 ;;
13818 *)
13819 gcc_cv_ld_hidden=no
13820 ;;
13821 esac
8ada417f
ZW
13822 fi
13823fi
6d07784a 13824fi
ba479fd2
NN
13825echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
13826echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 13827libgcc_visibility=no
ad9c4d9f 13828
232b67d9 13829
8e3940b2 13830if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 13831 libgcc_visibility=yes
ba479fd2
NN
13832
13833cat >>confdefs.h <<\_ACEOF
8ada417f 13834#define HAVE_GAS_HIDDEN 1
ba479fd2 13835_ACEOF
ad9c4d9f
NN
13836
13837fi
13838
8ada417f 13839# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
13840echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
13841echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
13842if test "${gcc_cv_as_leb128+set}" = set; then
13843 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13844else
13845 gcc_cv_as_leb128=no
13846 if test $in_tree_gas = yes; then
13847 if test $in_tree_gas_is_elf = yes \
13848 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
13849 then gcc_cv_as_leb128=yes
13850fi
13851 elif test x$gcc_cv_as != x; then
6e3f3080 13852 echo ' .data
b7460f24
RH
13853 .uleb128 L2 - L1
13854L1:
13855 .uleb128 1280
13856 .sleb128 -1010
8ada417f 13857L2:' > conftest.s
ba479fd2
NN
13858 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13860 (eval $ac_try) 2>&5
13861 ac_status=$?
13862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13863 (exit $ac_status); }; }
8ada417f
ZW
13864 then
13865 # GAS versions before 2.11 do not support uleb128,
13866 # despite appearing to.
13867 # ??? There exists an elf-specific test that will crash
13868 # the assembler. Perhaps it's better to figure out whether
13869 # arbitrary sections are supported and try the test.
bace148a 13870 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
13871 if echo "$as_ver" | grep GNU > /dev/null; then
13872 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
13873 as_major=`echo $as_ver | sed 's/\..*//'`
13874 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
13875 if test $as_major -eq 2 && test $as_minor -lt 11
13876 then :
13877 else gcc_cv_as_leb128=yes
13878 fi
13879 fi
13880 else
13881 echo "configure: failed program was" >&5
13882 cat conftest.s >&5
13883 fi
13884 rm -f conftest.o conftest.s
13885 fi
b7460f24 13886fi
ba479fd2
NN
13887echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
13888echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 13889if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
13890
13891cat >>confdefs.h <<\_ACEOF
b7460f24 13892#define HAVE_AS_LEB128 1
ba479fd2 13893_ACEOF
b7460f24
RH
13894
13895fi
ad9c4d9f 13896
8ada417f
ZW
13897# GAS versions up to and including 2.11.0 may mis-optimize
13898# .eh_frame data.
ba479fd2
NN
13899echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
13900echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
13901if test "${gcc_cv_as_eh_frame+set}" = set; then
13902 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13903else
13904 gcc_cv_as_eh_frame=no
13905 if test $in_tree_gas = yes; then
13906 if test $in_tree_gas_is_elf = yes \
13907 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13908 then gcc_cv_as_eh_frame=yes
ad9c4d9f 13909fi
8ada417f 13910 elif test x$gcc_cv_as != x; then
6e3f3080 13911 echo ' .text
c64688ae
RH
13912.LFB1:
13913 .4byte 0
13914.L1:
13915 .4byte 0
13916.LFE1:
13917 .section .eh_frame,"aw",@progbits
13918__FRAME_BEGIN__:
13919 .4byte .LECIE1-.LSCIE1
13920.LSCIE1:
13921 .4byte 0x0
13922 .byte 0x1
13923 .ascii "z\0"
13924 .byte 0x1
13925 .byte 0x78
13926 .byte 0x1a
13927 .byte 0x0
13928 .byte 0x4
13929 .4byte 1
13930 .p2align 1
13931.LECIE1:
13932.LSFDE1:
13933 .4byte .LEFDE1-.LASFDE1
13934.LASFDE1:
13935 .4byte .LASFDE1-__FRAME_BEGIN__
13936 .4byte .LFB1
13937 .4byte .LFE1-.LFB1
13938 .byte 0x4
13939 .4byte .LFE1-.LFB1
13940 .byte 0x4
13941 .4byte .L1-.LFB1
8ada417f 13942.LEFDE1:' > conftest.s
ba479fd2
NN
13943 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13945 (eval $ac_try) 2>&5
13946 ac_status=$?
13947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13948 (exit $ac_status); }; }
8ada417f
ZW
13949 then
13950 cat > conftest.lit <<EOF
c64688ae
RH
13951 0000 10000000 00000000 017a0001 781a0004 .........z..x...
13952 0010 01000000 12000000 18000000 00000000 ................
093e61a6 13953 0020 08000000 04080000 0044 .........D
01efb963 13954EOF
ba479fd2 13955cat > conftest.big <<EOF
01efb963
AS
13956 0000 00000010 00000000 017a0001 781a0004 .........z..x...
13957 0010 00000001 00000012 00000018 00000000 ................
093e61a6 13958 0020 00000008 04000000 0844 .........D
c64688ae 13959EOF
8ada417f
ZW
13960 # If the assembler didn't choke, and we can objdump,
13961 # and we got the correct data, then succeed.
13962 if test x$gcc_cv_objdump != x \
13963 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
13964 | tail -3 > conftest.got \
13965 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
13966 || cmp conftest.big conftest.got > /dev/null 2>&1; }
13967 then
13968 gcc_cv_as_eh_frame=yes
ba479fd2
NN
13969 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
13970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13971 (eval $ac_try) 2>&5
13972 ac_status=$?
13973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13974 (exit $ac_status); }; }; then
8ada417f
ZW
13975 gcc_cv_as_eh_frame=buggy
13976 else
13977 # Uh oh, what do we do now?
13978 gcc_cv_as_eh_frame=no
13979 fi
13980 else
13981 echo "configure: failed program was" >&5
13982 cat conftest.s >&5
13983 fi
13984 rm -f conftest.o conftest.s
13985 fi
c64688ae 13986fi
ba479fd2
NN
13987echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
13988echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 13989
6e3f3080 13990
63cf211a 13991if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
13992
13993cat >>confdefs.h <<\_ACEOF
8ada417f 13994#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 13995_ACEOF
ad9c4d9f
NN
13996
13997fi
13998
ba479fd2
NN
13999echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14000echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
14001if test "${gcc_cv_as_shf_merge+set}" = set; then
14002 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14003else
14004 gcc_cv_as_shf_merge=no
14005 if test $in_tree_gas = yes; then
14006 if test $in_tree_gas_is_elf = yes \
14007 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14008 then gcc_cv_as_shf_merge=yes
14009fi
14010 elif test x$gcc_cv_as != x; then
6e3f3080 14011 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
14012 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14014 (eval $ac_try) 2>&5
14015 ac_status=$?
14016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14017 (exit $ac_status); }; }
8ada417f
ZW
14018 then
14019 gcc_cv_as_shf_merge=yes
14020 else
14021 echo "configure: failed program was" >&5
14022 cat conftest.s >&5
14023 fi
14024 rm -f conftest.o conftest.s
14025 fi
201556f0 14026fi
ba479fd2
NN
14027echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14028echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 14029
c18a5b6c
MM
14030if test $gcc_cv_as_shf_merge = no; then
14031 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14032echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
14033if test "${gcc_cv_as_shf_merge+set}" = set; then
14034 echo $ECHO_N "(cached) $ECHO_C" >&6
14035else
14036 gcc_cv_as_shf_merge=no
14037 if test $in_tree_gas = yes; then
14038 if test $in_tree_gas_is_elf = yes \
14039 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14040 then gcc_cv_as_shf_merge=yes
14041fi
14042 elif test x$gcc_cv_as != x; then
14043 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
14044 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14046 (eval $ac_try) 2>&5
14047 ac_status=$?
14048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14049 (exit $ac_status); }; }
14050 then
14051 gcc_cv_as_shf_merge=yes
14052 else
14053 echo "configure: failed program was" >&5
14054 cat conftest.s >&5
14055 fi
14056 rm -f conftest.o conftest.s
14057 fi
14058fi
14059echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14060echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
14061
14062fi
8ad9fb33 14063
ba479fd2 14064cat >>confdefs.h <<_ACEOF
8ad9fb33 14065#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 14066_ACEOF
201556f0 14067
201556f0 14068
c18a5b6c
MM
14069echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14070echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
14071if test "${gcc_cv_as_comdat_group+set}" = set; then
14072 echo $ECHO_N "(cached) $ECHO_C" >&6
14073else
14074 gcc_cv_as_comdat_group=no
14075 if test $in_tree_gas = yes; then
14076 if test $in_tree_gas_is_elf = yes \
11176d2a 14077 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14078 then gcc_cv_as_comdat_group=yes
14079fi
14080 elif test x$gcc_cv_as != x; then
14081 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
14082 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14084 (eval $ac_try) 2>&5
14085 ac_status=$?
14086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14087 (exit $ac_status); }; }
14088 then
14089 gcc_cv_as_comdat_group=yes
14090 else
14091 echo "configure: failed program was" >&5
14092 cat conftest.s >&5
14093 fi
14094 rm -f conftest.o conftest.s
14095 fi
14096fi
14097echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
14098echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
14099
14100if test $gcc_cv_as_comdat_group = yes; then
14101 gcc_cv_as_comdat_group_percent=no
14102else
14103 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14104echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
14105if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
14106 echo $ECHO_N "(cached) $ECHO_C" >&6
14107else
14108 gcc_cv_as_comdat_group_percent=no
14109 if test $in_tree_gas = yes; then
14110 if test $in_tree_gas_is_elf = yes \
11176d2a 14111 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14112 then gcc_cv_as_comdat_group_percent=yes
14113fi
14114 elif test x$gcc_cv_as != x; then
14115 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
14116 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14118 (eval $ac_try) 2>&5
14119 ac_status=$?
14120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14121 (exit $ac_status); }; }
14122 then
14123 gcc_cv_as_comdat_group_percent=yes
14124 else
14125 echo "configure: failed program was" >&5
14126 cat conftest.s >&5
14127 fi
14128 rm -f conftest.o conftest.s
14129 fi
14130fi
14131echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
14132echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
14133
14134fi
11176d2a
JB
14135if test $in_tree_ld != yes && test x"$ld_vers" != x; then
14136 comdat_group=yes
14137 if test 0"$ld_date" -lt 20050308; then
14138 if test -n "$ld_date"; then
14139 # If there was date string, but was earlier than 2005-03-08, fail
14140 comdat_group=no
14141 elif test "$ld_vers_major" -lt 2; then
14142 comdat_group=no
14143 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
14144 comdat_group=no
14145 fi
14146 fi
1cf0118d
RO
14147else
14148 # assume linkers other than GNU ld don't support COMDAT group
14149 comdat_group=no
14150fi
14151if test $comdat_group = no; then
14152 gcc_cv_as_comdat_group=no
14153 gcc_cv_as_comdat_group_percent=no
11176d2a 14154fi
c18a5b6c
MM
14155
14156cat >>confdefs.h <<_ACEOF
11176d2a 14157#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
14158_ACEOF
14159
14160
8ada417f 14161# Thread-local storage - the check is heavily parametrized.
f996902d
RH
14162conftest_s=
14163tls_first_major=
14164tls_first_minor=
9739c90c 14165tls_as_opt=
f996902d 14166case "$target" in
6f9b006d
RH
14167 alpha*-*-*)
14168 conftest_s='
14169 .section ".tdata","awT",@progbits
14170foo: .long 25
14171 .text
14172 ldq $27,__tls_get_addr($29) !literal!1
14173 lda $16,foo($29) !tlsgd!1
14174 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
14175 ldq $27,__tls_get_addr($29) !literal!2
14176 lda $16,foo($29) !tlsldm!2
14177 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
14178 ldq $1,foo($29) !gotdtprel
14179 ldah $2,foo($29) !dtprelhi
14180 lda $3,foo($2) !dtprello
14181 lda $4,foo($29) !dtprel
14182 ldq $1,foo($29) !gottprel
14183 ldah $2,foo($29) !tprelhi
14184 lda $3,foo($2) !tprello
14185 lda $4,foo($29) !tprel'
14186 tls_first_major=2
14187 tls_first_minor=13
2f3321ca 14188 tls_as_opt=--fatal-warnings
6f9b006d 14189 ;;
e4dd71de
AH
14190 frv*-*-*)
14191 conftest_s='
14192 .section ".tdata","awT",@progbits
14193x: .long 25
14194 .text
14195 call #gettlsoff(x)'
14196 tls_first_major=2
14197 tls_first_minor=14
14198 ;;
51076f96
RC
14199 hppa*-*-linux*)
14200 conftest_s='
14201t1: .reg %r20
14202t2: .reg %r21
14203gp: .reg %r19
14204 .section ".tdata","awT",@progbits
14205foo: .long 25
14206 .text
14207 .align 4
14208 addil LT%foo-$tls_gdidx$,gp
14209 ldo RT%foo-$tls_gdidx$(%r1),%arg0
14210 b __tls_get_addr
14211 nop
14212 addil LT%foo-$tls_ldidx$,gp
14213 b __tls_get_addr
14214 ldo RT%foo-$tls_ldidx$(%r1),%arg0
14215 addil LR%foo-$tls_dtpoff$,%ret0
14216 ldo RR%foo-$tls_dtpoff$(%r1),%t1
14217 mfctl %cr27,%t1
14218 addil LT%foo-$tls_ieoff$,gp
14219 ldw RT%foo-$tls_ieoff$(%r1),%t2
14220 add %t1,%t2,%t3
14221 mfctl %cr27,%t1
14222 addil LR%foo-$tls_leoff$,%t1
14223 ldo RR%foo-$tls_leoff$(%r1),%t2'
14224 tls_first_major=2
14225 tls_first_minor=15
14226 tls_as_opt=--fatal-warnings
14227 ;;
d3585b76
DJ
14228 arm*-*-*)
14229 conftest_s='
14230 .section ".tdata","awT",%progbits
14231foo: .long 25
14232 .text
14233.word foo(gottpoff)
14234.word foo(tpoff)
14235.word foo(tlsgd)
14236.word foo(tlsldm)
14237.word foo(tlsldo)'
14238 tls_first_major=2
14239 tls_first_minor=17
14240 ;;
f996902d
RH
14241 i[34567]86-*-*)
14242 conftest_s='
14243 .section ".tdata","awT",@progbits
14244foo: .long 25
14245 .text
14246 movl %gs:0, %eax
14247 leal foo@TLSGD(,%ebx,1), %eax
14248 leal foo@TLSLDM(%ebx), %eax
14249 leal foo@DTPOFF(%eax), %edx
14250 movl foo@GOTTPOFF(%ebx), %eax
14251 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
14252 addl foo@GOTNTPOFF(%ebx), %eax
14253 movl foo@INDNTPOFF, %eax
f996902d
RH
14254 movl $foo@TPOFF, %eax
14255 subl $foo@TPOFF, %eax
14256 leal foo@NTPOFF(%ecx), %eax'
14257 tls_first_major=2
75d38379 14258 tls_first_minor=14
2f3321ca 14259 tls_as_opt=--fatal-warnings
75d38379
JJ
14260 ;;
14261 x86_64-*-*)
14262 conftest_s='
14263 .section ".tdata","awT",@progbits
14264foo: .long 25
14265 .text
14266 movq %fs:0, %rax
14267 leaq foo@TLSGD(%rip), %rdi
14268 leaq foo@TLSLD(%rip), %rdi
14269 leaq foo@DTPOFF(%rax), %rdx
14270 movq foo@GOTTPOFF(%rip), %rax
14271 movq $foo@TPOFF, %rax'
14272 tls_first_major=2
14273 tls_first_minor=14
2f3321ca 14274 tls_as_opt=--fatal-warnings
f996902d 14275 ;;
7b6e506e
RH
14276 ia64-*-*)
14277 conftest_s='
14278 .section ".tdata","awT",@progbits
14279foo: data8 25
14280 .text
14281 addl r16 = @ltoff(@dtpmod(foo#)), gp
14282 addl r17 = @ltoff(@dtprel(foo#)), gp
14283 addl r18 = @ltoff(@tprel(foo#)), gp
14284 addl r19 = @dtprel(foo#), gp
14285 adds r21 = @dtprel(foo#), r13
14286 movl r23 = @dtprel(foo#)
14287 addl r20 = @tprel(foo#), gp
14288 adds r22 = @tprel(foo#), r13
14289 movl r24 = @tprel(foo#)'
14290 tls_first_major=2
14291 tls_first_minor=13
2f3321ca 14292 tls_as_opt=--fatal-warnings
7b6e506e 14293 ;;
69229b81
DJ
14294 mips*-*-*)
14295 conftest_s='
14296 .section .tdata,"awT",@progbits
14297x:
14298 .word 2
14299 .text
14300 addiu $4, $28, %tlsgd(x)
14301 addiu $4, $28, %tlsldm(x)
14302 lui $4, %dtprel_hi(x)
14303 addiu $4, $4, %dtprel_lo(x)
14304 lw $4, %gottprel(x)($28)
14305 lui $4, %tprel_hi(x)
14306 addiu $4, $4, %tprel_lo(x)'
14307 tls_first_major=2
14308 tls_first_minor=16
14309 tls_as_opt='-32 --fatal-warnings'
14310 ;;
c4501e62
JJ
14311 powerpc-*-*)
14312 conftest_s='
14313 .section ".tdata","awT",@progbits
14314 .align 2
14315ld0: .space 4
14316ld1: .space 4
14317x1: .space 4
14318x2: .space 4
14319x3: .space 4
14320 .text
14321 addi 3,31,ld0@got@tlsgd
14322 bl __tls_get_addr
14323 addi 3,31,x1@got@tlsld
14324 bl __tls_get_addr
14325 addi 9,3,x1@dtprel
14326 addis 9,3,x2@dtprel@ha
14327 addi 9,9,x2@dtprel@l
14328 lwz 9,x3@got@tprel(31)
14329 add 9,9,x@tls
14330 addi 9,2,x1@tprel
14331 addis 9,2,x2@tprel@ha
14332 addi 9,9,x2@tprel@l'
14333 tls_first_major=2
14334 tls_first_minor=14
2f3321ca 14335 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
14336 ;;
14337 powerpc64-*-*)
14338 conftest_s='
14339 .section ".tdata","awT",@progbits
14340 .align 3
14341ld0: .space 8
14342ld1: .space 8
14343x1: .space 8
14344x2: .space 8
14345x3: .space 8
14346 .text
14347 addi 3,2,ld0@got@tlsgd
14348 bl .__tls_get_addr
14349 nop
14350 addi 3,2,ld1@toc
14351 bl .__tls_get_addr
14352 nop
14353 addi 3,2,x1@got@tlsld
14354 bl .__tls_get_addr
14355 nop
14356 addi 9,3,x1@dtprel
14357 bl .__tls_get_addr
14358 nop
14359 addis 9,3,x2@dtprel@ha
14360 addi 9,9,x2@dtprel@l
14361 bl .__tls_get_addr
14362 nop
14363 ld 9,x3@got@dtprel(2)
14364 add 9,9,3
14365 bl .__tls_get_addr
14366 nop'
14367 tls_first_major=2
14368 tls_first_minor=14
2f3321ca 14369 tls_as_opt="-a64 --fatal-warnings"
c4501e62 14370 ;;
fd3cd001
UW
14371 s390-*-*)
14372 conftest_s='
14373 .section ".tdata","awT",@progbits
14374foo: .long 25
14375 .text
14376 .long foo@TLSGD
14377 .long foo@TLSLDM
14378 .long foo@DTPOFF
14379 .long foo@NTPOFF
14380 .long foo@GOTNTPOFF
14381 .long foo@INDNTPOFF
14382 l %r1,foo@GOTNTPOFF(%r12)
14383 l %r1,0(%r1):tls_load:foo
14384 bas %r14,0(%r1,%r13):tls_gdcall:foo
14385 bas %r14,0(%r1,%r13):tls_ldcall:foo'
14386 tls_first_major=2
14387 tls_first_minor=14
2f3321ca 14388 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
14389 ;;
14390 s390x-*-*)
14391 conftest_s='
14392 .section ".tdata","awT",@progbits
14393foo: .long 25
14394 .text
14395 .quad foo@TLSGD
14396 .quad foo@TLSLDM
14397 .quad foo@DTPOFF
14398 .quad foo@NTPOFF
14399 .quad foo@GOTNTPOFF
14400 lg %r1,foo@GOTNTPOFF(%r12)
14401 larl %r1,foo@INDNTPOFF
14402 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
14403 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
14404 tls_first_major=2
14405 tls_first_minor=14
2f3321ca 14406 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 14407 ;;
9ff13962
KK
14408 sh-*-* | sh[34]-*-*)
14409 conftest_s='
14410 .section ".tdata","awT",@progbits
14411foo: .long 25
14412 .text
14413 .long foo@TLSGD
14414 .long foo@TLSLDM
14415 .long foo@DTPOFF
14416 .long foo@GOTTPOFF
14417 .long foo@TPOFF'
14418 tls_first_major=2
14419 tls_first_minor=13
2f3321ca 14420 tls_as_opt=--fatal-warnings
9ff13962 14421 ;;
5751a10b 14422 sparc*-*-*)
2f3321ca 14423 case "$target" in
7935dc1b
EB
14424 sparc*-sun-solaris2.[56789]*)
14425 # TLS was introduced in the Solaris 9 4/04 release but
14426 # we do not enable it by default on Solaris 9 either.
14427 if test "x$enable_tls" = xyes ; then
14428 on_solaris=yes
14429 else
14430 enable_tls=no;
14431 fi
14432 ;;
2f3321ca
EB
14433 sparc*-sun-solaris2.*)
14434 on_solaris=yes
14435 ;;
14436 *)
14437 on_solaris=no
14438 ;;
14439 esac
14440 if test x$on_solaris = xyes && test x$gas_flag = xno; then
14441 conftest_s='
14442 .section ".tdata",#alloc,#write,#tls
14443foo: .long 25
14444 .text
14445 sethi %tgd_hi22(foo), %o0
14446 add %o0, %tgd_lo10(foo), %o1
14447 add %l7, %o1, %o0, %tgd_add(foo)
14448 call __tls_get_addr, %tgd_call(foo)
14449 sethi %tldm_hi22(foo), %l1
14450 add %l1, %tldm_lo10(foo), %l2
14451 add %l7, %l2, %o0, %tldm_add(foo)
14452 call __tls_get_addr, %tldm_call(foo)
14453 sethi %tldo_hix22(foo), %l3
14454 xor %l3, %tldo_lox10(foo), %l4
14455 add %o0, %l4, %l5, %tldo_add(foo)
14456 sethi %tie_hi22(foo), %o3
14457 add %o3, %tie_lo10(foo), %o3
14458 ld [%l7 + %o3], %o2, %tie_ld(foo)
14459 add %g7, %o2, %o4, %tie_add(foo)
14460 sethi %tle_hix22(foo), %l1
14461 xor %l1, %tle_lox10(foo), %o5
14462 ld [%g7 + %o5], %o1'
14463 tls_first_major=0
14464 tls_first_minor=0
14465 else
14466 conftest_s='
5751a10b
JJ
14467 .section ".tdata","awT",@progbits
14468foo: .long 25
14469 .text
14470 sethi %tgd_hi22(foo), %o0
14471 add %o0, %tgd_lo10(foo), %o1
14472 add %l7, %o1, %o0, %tgd_add(foo)
14473 call __tls_get_addr, %tgd_call(foo)
14474 sethi %tldm_hi22(foo), %l1
14475 add %l1, %tldm_lo10(foo), %l2
14476 add %l7, %l2, %o0, %tldm_add(foo)
14477 call __tls_get_addr, %tldm_call(foo)
14478 sethi %tldo_hix22(foo), %l3
14479 xor %l3, %tldo_lox10(foo), %l4
14480 add %o0, %l4, %l5, %tldo_add(foo)
14481 sethi %tie_hi22(foo), %o3
14482 add %o3, %tie_lo10(foo), %o3
14483 ld [%l7 + %o3], %o2, %tie_ld(foo)
14484 add %g7, %o2, %o4, %tie_add(foo)
14485 sethi %tle_hix22(foo), %l1
14486 xor %l1, %tle_lox10(foo), %o5
14487 ld [%g7 + %o5], %o1'
14488 tls_first_major=2
14489 tls_first_minor=14
2f3321ca
EB
14490 tls_as_opt="-32 --fatal-warnings"
14491 fi
5751a10b 14492 ;;
f996902d 14493esac
8dea1cca
DD
14494set_have_as_tls=no
14495if test "x$enable_tls" = xno ; then
14496 : # TLS explicitly disabled.
14497elif test "x$enable_tls" = xyes ; then
14498 set_have_as_tls=yes # TLS explicitly enabled.
14499elif test -z "$tls_first_major"; then
8ada417f
ZW
14500 : # If we don't have a check, assume no support.
14501else
ba479fd2
NN
14502 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
14503echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
14504if test "${gcc_cv_as_tls+set}" = set; then
14505 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14506else
14507 gcc_cv_as_tls=no
14508 if test $in_tree_gas = yes; then
14509 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
14510 then gcc_cv_as_tls=yes
ad9c4d9f 14511fi
8ada417f 14512 elif test x$gcc_cv_as != x; then
6e3f3080 14513 echo "$conftest_s" > conftest.s
2f3321ca 14514 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
14515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14516 (eval $ac_try) 2>&5
14517 ac_status=$?
14518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14519 (exit $ac_status); }; }
8ada417f
ZW
14520 then
14521 gcc_cv_as_tls=yes
14522 else
14523 echo "configure: failed program was" >&5
14524 cat conftest.s >&5
14525 fi
14526 rm -f conftest.o conftest.s
f996902d 14527 fi
f996902d 14528fi
ba479fd2
NN
14529echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
14530echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 14531if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
14532 set_have_as_tls=yes
14533fi
14534fi
14535if test $set_have_as_tls = yes ; then
ba479fd2
NN
14536
14537cat >>confdefs.h <<\_ACEOF
f996902d 14538#define HAVE_AS_TLS 1
ba479fd2 14539_ACEOF
f996902d 14540
8ada417f
ZW
14541fi
14542
14543# Target-specific assembler checks.
f996902d 14544
7e9d8517
L
14545echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
14546echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
14547gcc_cv_ld_static_dynamic=no
14548if test $in_tree_ld = yes ; then
14549 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
14550 gcc_cv_ld_static_dynamic=yes
14551 fi
14552elif test x$gcc_cv_ld != x; then
14553 # Check if linker supports -Bstatic/-Bdynamic option
14554 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
14555 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
14556 gcc_cv_ld_static_dynamic=yes
14557 fi
14558fi
14559if test x"$gcc_cv_ld_static_dynamic" = xyes; then
14560
14561cat >>confdefs.h <<\_ACEOF
14562#define HAVE_LD_STATIC_DYNAMIC 1
14563_ACEOF
14564
14565fi
14566echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14567echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
14568
d594623a
L
14569if test x"$demangler_in_ld" = xyes; then
14570 echo "$as_me:$LINENO: checking linker --demangle support" >&5
14571echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
14572 gcc_cv_ld_demangle=no
14573 if test $in_tree_ld = yes; then
14574 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 \
14575 gcc_cv_ld_demangle=yes
14576 fi
14577 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14578 # Check if the GNU linker supports --demangle option
14579 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14580 gcc_cv_ld_demangle=yes
14581 fi
14582 fi
14583 if test x"$gcc_cv_ld_demangle" = xyes; then
14584
14585cat >>confdefs.h <<\_ACEOF
14586#define HAVE_LD_DEMANGLE 1
14587_ACEOF
14588
14589 fi
14590 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14591echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
14592fi
14593
3a37b08e
RH
14594case "$target" in
14595 # All TARGET_ABI_OSF targets.
14596 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
14597 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14598echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14599if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14600 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 14601else
8ada417f
ZW
14602 gcc_cv_as_alpha_explicit_relocs=no
14603 if test $in_tree_gas = yes; then
14604 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14605 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 14606fi
8ada417f 14607 elif test x$gcc_cv_as != x; then
6e3f3080 14608 echo ' .set nomacro
3a37b08e
RH
14609 .text
14610 extbl $3, $2, $3 !lituse_bytoff!1
14611 ldq $2, a($29) !literal!1
14612 ldq $4, b($29) !literal!2
14613 ldq_u $3, 0($2) !lituse_base!1
14614 ldq $27, f($29) !literal!5
14615 jsr $26, ($27), f !lituse_jsr!5
14616 ldah $29, 0($26) !gpdisp!3
14617 lda $0, c($29) !gprel
14618 ldah $1, d($29) !gprelhigh
14619 lda $1, d($1) !gprellow
8ada417f 14620 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
14621 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14623 (eval $ac_try) 2>&5
14624 ac_status=$?
14625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14626 (exit $ac_status); }; }
8ada417f
ZW
14627 then
14628 gcc_cv_as_alpha_explicit_relocs=yes
14629 else
14630 echo "configure: failed program was" >&5
14631 cat conftest.s >&5
14632 fi
14633 rm -f conftest.o conftest.s
14634 fi
cafe096b 14635fi
ba479fd2
NN
14636echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14637echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 14638if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
14639
14640cat >>confdefs.h <<\_ACEOF
3a37b08e 14641#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 14642_ACEOF
3a37b08e 14643
d006f5eb
RH
14644fi
14645 echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
14646echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
14647if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
14648 echo $ECHO_N "(cached) $ECHO_C" >&6
14649else
14650 gcc_cv_as_alpha_jsrdirect_relocs=no
14651 if test $in_tree_gas = yes; then
14652 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
14653 then gcc_cv_as_alpha_jsrdirect_relocs=yes
14654fi
14655 elif test x$gcc_cv_as != x; then
14656 echo ' .set nomacro
14657 .text
14658 ldq $27, a($29) !literal!1
14659 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
14660 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14662 (eval $ac_try) 2>&5
14663 ac_status=$?
14664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14665 (exit $ac_status); }; }
14666 then
14667 gcc_cv_as_alpha_jsrdirect_relocs=yes
14668 else
14669 echo "configure: failed program was" >&5
14670 cat conftest.s >&5
14671 fi
14672 rm -f conftest.o conftest.s
14673 fi
14674fi
14675echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
14676echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
14677if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
14678
14679cat >>confdefs.h <<\_ACEOF
14680#define HAVE_AS_JSRDIRECT_RELOCS 1
14681_ACEOF
14682
86da66b5
HPN
14683fi
14684 ;;
14685
14686 cris-*-*)
14687 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14688echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
14689if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14690 echo $ECHO_N "(cached) $ECHO_C" >&6
14691else
14692 gcc_cv_as_cris_no_mul_bug=no
14693 if test $in_tree_gas = yes; then
14694 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14695 then gcc_cv_as_cris_no_mul_bug=yes
14696fi
14697 elif test x$gcc_cv_as != x; then
14698 echo '.text' > conftest.s
14699 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14701 (eval $ac_try) 2>&5
14702 ac_status=$?
14703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14704 (exit $ac_status); }; }
14705 then
14706 gcc_cv_as_cris_no_mul_bug=yes
14707 else
14708 echo "configure: failed program was" >&5
14709 cat conftest.s >&5
14710 fi
14711 rm -f conftest.o conftest.s
14712 fi
14713fi
14714echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14715echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
14716if test $gcc_cv_as_cris_no_mul_bug = yes; then
14717
14718cat >>confdefs.h <<\_ACEOF
14719#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14720_ACEOF
14721
8ada417f 14722fi
3a37b08e 14723 ;;
8ada417f 14724
1cb36a98 14725 sparc*-*-*)
ba479fd2
NN
14726 echo "$as_me:$LINENO: checking assembler for .register" >&5
14727echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
14728if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14729 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14730else
8ada417f
ZW
14731 gcc_cv_as_sparc_register_op=no
14732 if test x$gcc_cv_as != x; then
6e3f3080 14733 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
14734 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14736 (eval $ac_try) 2>&5
14737 ac_status=$?
14738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14739 (exit $ac_status); }; }
8ada417f
ZW
14740 then
14741 gcc_cv_as_sparc_register_op=yes
14742 else
14743 echo "configure: failed program was" >&5
14744 cat conftest.s >&5
14745 fi
14746 rm -f conftest.o conftest.s
14747 fi
cafe096b 14748fi
ba479fd2
NN
14749echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
14750echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 14751if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
14752
14753cat >>confdefs.h <<\_ACEOF
1cb36a98 14754#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 14755_ACEOF
1cb36a98 14756
8ada417f 14757fi
1cb36a98 14758
ba479fd2
NN
14759 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
14760echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
14761if test "${gcc_cv_as_sparc_relax+set}" = set; then
14762 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 14763else
8ada417f
ZW
14764 gcc_cv_as_sparc_relax=no
14765 if test x$gcc_cv_as != x; then
6e3f3080 14766 echo '.text' > conftest.s
ba479fd2
NN
14767 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
14768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14769 (eval $ac_try) 2>&5
14770 ac_status=$?
14771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14772 (exit $ac_status); }; }
8ada417f
ZW
14773 then
14774 gcc_cv_as_sparc_relax=yes
14775 else
14776 echo "configure: failed program was" >&5
14777 cat conftest.s >&5
14778 fi
14779 rm -f conftest.o conftest.s
14780 fi
cafe096b 14781fi
ba479fd2
NN
14782echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
14783echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 14784if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
14785
14786cat >>confdefs.h <<\_ACEOF
e95b1e6a 14787#define HAVE_AS_RELAX_OPTION 1
ba479fd2 14788_ACEOF
e95b1e6a 14789
8ada417f 14790fi
e95b1e6a 14791
ba479fd2
NN
14792 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
14793echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
14794if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
14795 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 14796else
8ada417f
ZW
14797 gcc_cv_as_sparc_ua_pcrel=no
14798 if test x$gcc_cv_as != x; then
6e3f3080 14799 echo '.text
8ada417f
ZW
14800foo:
14801 nop
14802.data
14803.align 4
14804.byte 0
14805.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
14806 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14808 (eval $ac_try) 2>&5
14809 ac_status=$?
14810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14811 (exit $ac_status); }; }
8ada417f
ZW
14812 then
14813 if test x$gcc_cv_ld != x \
14814 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
14815 gcc_cv_as_sparc_ua_pcrel=yes
14816 fi
14817 rm -f conftest
14818 else
14819 echo "configure: failed program was" >&5
14820 cat conftest.s >&5
14821 fi
14822 rm -f conftest.o conftest.s
14823 fi
cafe096b 14824fi
ba479fd2
NN
14825echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
14826echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 14827if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
14828
14829cat >>confdefs.h <<\_ACEOF
17e9e88c 14830#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 14831_ACEOF
17e9e88c 14832
17e9e88c 14833
ba479fd2
NN
14834 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
14835echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
14836if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
14837 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 14838else
8ada417f
ZW
14839 gcc_cv_as_sparc_ua_pcrel_hidden=no
14840 if test x$gcc_cv_as != x; then
6e3f3080 14841 echo '.data
8ada417f
ZW
14842.align 4
14843.byte 0x31
14844.uaword %r_disp32(foo)
14845.byte 0x32, 0x33, 0x34
14846.global foo
14847.hidden foo
14848foo:
14849.skip 4' > conftest.s
ba479fd2
NN
14850 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14852 (eval $ac_try) 2>&5
14853 ac_status=$?
14854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14855 (exit $ac_status); }; }
8ada417f
ZW
14856 then
14857 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
14858 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
14859 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
14860 | grep ' 31000000 07323334' > /dev/null 2>&1; then
14861 if $gcc_cv_objdump -R conftest 2> /dev/null \
14862 | grep 'DISP32' > /dev/null 2>&1; then
14863 :
14864 else
14865 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 14866 fi
8ada417f
ZW
14867 fi
14868 rm -f conftest
14869 else
14870 echo "configure: failed program was" >&5
14871 cat conftest.s >&5
14872 fi
14873 rm -f conftest.o conftest.s
14874 fi
cafe096b 14875fi
ba479fd2
NN
14876echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
14877echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 14878if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
14879
14880cat >>confdefs.h <<\_ACEOF
cf7b8b0d 14881#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 14882_ACEOF
cf7b8b0d 14883
8ada417f 14884fi
ba479fd2 14885
8ada417f 14886fi # unaligned pcrel relocs
cf7b8b0d 14887
ba479fd2
NN
14888 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
14889echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
14890if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
14891 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14892else
8ada417f
ZW
14893 gcc_cv_as_sparc_offsetable_lo10=no
14894 if test x$gcc_cv_as != x; then
6e3f3080 14895 echo '.text
8ada417f
ZW
14896 or %g1, %lo(ab) + 12, %g1
14897 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
14898 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
14899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14900 (eval $ac_try) 2>&5
14901 ac_status=$?
14902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14903 (exit $ac_status); }; }
8ada417f
ZW
14904 then
14905 if test x$gcc_cv_objdump != x \
ecb0ccbc 14906 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 14907 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 14908 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
14909 fi
14910 else
14911 echo "configure: failed program was" >&5
14912 cat conftest.s >&5
14913 fi
14914 rm -f conftest.o conftest.s
14915 fi
cafe096b 14916fi
ba479fd2
NN
14917echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
14918echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 14919if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
14920
14921cat >>confdefs.h <<\_ACEOF
1cb36a98 14922#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 14923_ACEOF
1cb36a98 14924
8ada417f 14925fi
1cb36a98
RH
14926 ;;
14927
c307e6dd 14928 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
14929 case $target_os in
14930 cygwin* | pe | mingw32*)
14931 # Used for DWARF 2 in PE
14932 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
14933echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
14934if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
14935 echo $ECHO_N "(cached) $ECHO_C" >&6
14936else
14937 gcc_cv_as_ix86_pe_secrel32=no
14938 if test $in_tree_gas = yes; then
14939 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14940 then gcc_cv_as_ix86_pe_secrel32=yes
14941fi
14942 elif test x$gcc_cv_as != x; then
14943 echo '.text
14944foo: nop
14945.data
14946 .secrel32 foo' > conftest.s
14947 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14949 (eval $ac_try) 2>&5
14950 ac_status=$?
14951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14952 (exit $ac_status); }; }
14953 then
14954 if test x$gcc_cv_ld != x \
14955 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
14956 gcc_cv_as_ix86_pe_secrel32=yes
14957 fi
14958 rm -f conftest
14959 else
14960 echo "configure: failed program was" >&5
14961 cat conftest.s >&5
14962 fi
14963 rm -f conftest.o conftest.s
14964 fi
14965fi
14966echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
14967echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
14968if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
14969
14970cat >>confdefs.h <<\_ACEOF
14971#define HAVE_GAS_PE_SECREL32_RELOC 1
14972_ACEOF
14973
14974fi
14975 ;;
14976 esac
14977
ba479fd2
NN
14978 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
14979echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
14980if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
14981 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14982else
14983 gcc_cv_as_ix86_filds_fists=no
14984 if test $in_tree_gas = yes; then
14985 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
14986 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 14987fi
8ada417f 14988 elif test x$gcc_cv_as != x; then
6e3f3080 14989 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
14990 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14992 (eval $ac_try) 2>&5
14993 ac_status=$?
14994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14995 (exit $ac_status); }; }
8ada417f
ZW
14996 then
14997 gcc_cv_as_ix86_filds_fists=yes
14998 else
14999 echo "configure: failed program was" >&5
15000 cat conftest.s >&5
981d4858 15001 fi
8ada417f
ZW
15002 rm -f conftest.o conftest.s
15003 fi
15004fi
ba479fd2
NN
15005echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
15006echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 15007if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
15008
15009cat >>confdefs.h <<\_ACEOF
8ada417f 15010#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 15011_ACEOF
ad9c4d9f 15012
f6f5dff2
RO
15013fi
15014
ba479fd2
NN
15015 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
15016echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
15017if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
15018 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
15019else
15020 gcc_cv_as_ix86_cmov_sun_syntax=no
15021 if test x$gcc_cv_as != x; then
6e3f3080 15022 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
15023 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15025 (eval $ac_try) 2>&5
15026 ac_status=$?
15027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15028 (exit $ac_status); }; }
f6f5dff2
RO
15029 then
15030 gcc_cv_as_ix86_cmov_sun_syntax=yes
15031 else
15032 echo "configure: failed program was" >&5
15033 cat conftest.s >&5
15034 fi
15035 rm -f conftest.o conftest.s
15036 fi
15037fi
ba479fd2
NN
15038echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
15039echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 15040if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
15041
15042cat >>confdefs.h <<\_ACEOF
f6f5dff2 15043#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 15044_ACEOF
f6f5dff2 15045
ad9c4d9f
NN
15046fi
15047
6f3ca281
ZW
15048 # This one is used unconditionally by i386.[ch]; it is to be defined
15049 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
15050 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
15051echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
15052if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
15053 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15054else
15055 gcc_cv_as_ix86_gotoff_in_data=no
15056 if test $in_tree_gas = yes; then
15057 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15058 then gcc_cv_as_ix86_gotoff_in_data=yes
15059fi
15060 elif test x$gcc_cv_as != x; then
6e3f3080 15061 echo ' .text
f88c65f7
RH
15062.L0:
15063 nop
15064 .data
8ada417f 15065 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
15066 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15068 (eval $ac_try) 2>&5
15069 ac_status=$?
15070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15071 (exit $ac_status); }; }
8ada417f
ZW
15072 then
15073 gcc_cv_as_ix86_gotoff_in_data=yes
15074 else
15075 echo "configure: failed program was" >&5
15076 cat conftest.s >&5
f88c65f7 15077 fi
8ada417f
ZW
15078 rm -f conftest.o conftest.s
15079 fi
15080fi
ba479fd2
NN
15081echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
15082echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 15083
6f3ca281 15084
ba479fd2 15085cat >>confdefs.h <<_ACEOF
6f3ca281 15086#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 15087_ACEOF
f88c65f7 15088
1cb36a98 15089 ;;
ef1ecf87
RH
15090
15091 ia64*-*-*)
ba479fd2
NN
15092 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
15093echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
15094if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
15095 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 15096else
8ada417f
ZW
15097 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
15098 if test $in_tree_gas = yes; then
15099 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15100 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 15101fi
8ada417f 15102 elif test x$gcc_cv_as != x; then
6e3f3080 15103 echo ' .text
ef1ecf87
RH
15104 addl r15 = @ltoffx(x#), gp
15105 ;;
cfa9ee99 15106 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
15107 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15109 (eval $ac_try) 2>&5
15110 ac_status=$?
15111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15112 (exit $ac_status); }; }
8ada417f 15113 then
cfa9ee99 15114 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
15115 else
15116 echo "configure: failed program was" >&5
15117 cat conftest.s >&5
2c4a9cff 15118 fi
8ada417f
ZW
15119 rm -f conftest.o conftest.s
15120 fi
15121fi
ba479fd2
NN
15122echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
15123echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 15124if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
15125
15126cat >>confdefs.h <<\_ACEOF
cfa9ee99 15127#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 15128_ACEOF
8ada417f 15129
cfa9ee99 15130fi
8ada417f 15131
2c4a9cff 15132 ;;
8ada417f 15133
2c4a9cff 15134 powerpc*-*-*)
8ada417f 15135 case $target in
432218ba
DE
15136 *-*-aix*) conftest_s=' .machine "pwr5"
15137 .csect .text[PR]
6b37db3c 15138 mfcr 3,128';;
8af4d362
PB
15139 *-*-darwin*)
15140 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
15141echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
15142if test "${gcc_cv_as_machine_directive+set}" = set; then
15143 echo $ECHO_N "(cached) $ECHO_C" >&6
15144else
15145 gcc_cv_as_machine_directive=no
15146 if test x$gcc_cv_as != x; then
15147 echo ' .machine ppc7400' > conftest.s
15148 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15150 (eval $ac_try) 2>&5
15151 ac_status=$?
15152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15153 (exit $ac_status); }; }
15154 then
15155 gcc_cv_as_machine_directive=yes
15156 else
15157 echo "configure: failed program was" >&5
15158 cat conftest.s >&5
15159 fi
15160 rm -f conftest.o conftest.s
15161 fi
15162fi
15163echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
15164echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
15165
15166 if test x$gcc_cv_as_machine_directive != xyes; then
15167 echo "*** This target requires an assembler supporting \".machine\"" >&2
15168 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
15169 test x$build = x$target && exit 1
15170 fi
15171 conftest_s=' .text
6b37db3c 15172 mfcr r3,128';;
4c67db14 15173 *) conftest_s=' .machine power4
d2ab3e37 15174 .text
6b37db3c 15175 mfcr 3,128';;
8ada417f 15176 esac
8ada417f 15177
ba479fd2
NN
15178 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
15179echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
15180if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
15181 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 15182else
8ada417f
ZW
15183 gcc_cv_as_powerpc_mfcrf=no
15184 if test $in_tree_gas = yes; then
15185 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15186 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 15187fi
8ada417f 15188 elif test x$gcc_cv_as != x; then
6e3f3080 15189 echo "$conftest_s" > conftest.s
ba479fd2
NN
15190 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15192 (eval $ac_try) 2>&5
15193 ac_status=$?
15194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15195 (exit $ac_status); }; }
8ada417f
ZW
15196 then
15197 gcc_cv_as_powerpc_mfcrf=yes
15198 else
15199 echo "configure: failed program was" >&5
15200 cat conftest.s >&5
15201 fi
15202 rm -f conftest.o conftest.s
15203 fi
2c4a9cff 15204fi
ba479fd2
NN
15205echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
15206echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 15207if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
15208
15209cat >>confdefs.h <<\_ACEOF
2c4a9cff 15210#define HAVE_AS_MFCRF 1
ba479fd2 15211_ACEOF
ef1ecf87 15212
8ada417f 15213fi
432218ba
DE
15214
15215 case $target in
15216 *-*-aix*) conftest_s=' .machine "pwr5"
15217 .csect .text[PR]
15218 popcntb 3,3';;
15219 *) conftest_s=' .machine power5
15220 .text
15221 popcntb 3,3';;
15222 esac
15223
15224 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
15225echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
15226if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
15227 echo $ECHO_N "(cached) $ECHO_C" >&6
15228else
15229 gcc_cv_as_powerpc_popcntb=no
15230 if test $in_tree_gas = yes; then
15231 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15232 then gcc_cv_as_powerpc_popcntb=yes
15233fi
15234 elif test x$gcc_cv_as != x; then
15235 echo "$conftest_s" > conftest.s
15236 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15238 (eval $ac_try) 2>&5
15239 ac_status=$?
15240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15241 (exit $ac_status); }; }
15242 then
15243 gcc_cv_as_powerpc_popcntb=yes
15244 else
15245 echo "configure: failed program was" >&5
15246 cat conftest.s >&5
15247 fi
15248 rm -f conftest.o conftest.s
15249 fi
15250fi
15251echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
15252echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
15253if test $gcc_cv_as_powerpc_popcntb = yes; then
15254
15255cat >>confdefs.h <<\_ACEOF
15256#define HAVE_AS_POPCNTB 1
15257_ACEOF
15258
9719f3b7
DE
15259fi
15260
15261 case $target in
15262 *-*-aix*) conftest_s=' .machine "pwr5x"
15263 .csect .text[PR]
15264 frin 1,1';;
1e04bfdc 15265 *) conftest_s=' .machine power5
9719f3b7
DE
15266 .text
15267 frin 1,1';;
15268 esac
15269
15270 echo "$as_me:$LINENO: checking assembler for fp round support" >&5
15271echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
15272if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
15273 echo $ECHO_N "(cached) $ECHO_C" >&6
15274else
15275 gcc_cv_as_powerpc_fprnd=no
15276 if test $in_tree_gas = yes; then
15277 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15278 then gcc_cv_as_powerpc_fprnd=yes
15279fi
15280 elif test x$gcc_cv_as != x; then
15281 echo "$conftest_s" > conftest.s
15282 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15284 (eval $ac_try) 2>&5
15285 ac_status=$?
15286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15287 (exit $ac_status); }; }
15288 then
15289 gcc_cv_as_powerpc_fprnd=yes
15290 else
15291 echo "configure: failed program was" >&5
15292 cat conftest.s >&5
15293 fi
15294 rm -f conftest.o conftest.s
15295 fi
15296fi
15297echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
15298echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
15299if test $gcc_cv_as_powerpc_fprnd = yes; then
15300
15301cat >>confdefs.h <<\_ACEOF
15302#define HAVE_AS_FPRND 1
15303_ACEOF
15304
432218ba
DE
15305fi
15306
7f970b70
AM
15307 case $target in
15308 *-*-aix*) conftest_s=' .csect .text[PR]
15309LCF..0:
15310 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
15311 *-*-darwin*)
15312 conftest_s=' .text
15313LCF0:
15314 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
15315 *) conftest_s=' .text
15316.LCF0:
15317 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
15318 esac
15319
15320 echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
15321echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
15322if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
15323 echo $ECHO_N "(cached) $ECHO_C" >&6
15324else
15325 gcc_cv_as_powerpc_rel16=no
15326 if test $in_tree_gas = yes; then
15327 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15328 then gcc_cv_as_powerpc_rel16=yes
15329fi
15330 elif test x$gcc_cv_as != x; then
15331 echo "$conftest_s" > conftest.s
15332 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15334 (eval $ac_try) 2>&5
15335 ac_status=$?
15336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15337 (exit $ac_status); }; }
15338 then
15339 gcc_cv_as_powerpc_rel16=yes
15340 else
15341 echo "configure: failed program was" >&5
15342 cat conftest.s >&5
15343 fi
15344 rm -f conftest.o conftest.s
15345 fi
15346fi
15347echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
15348echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
15349if test $gcc_cv_as_powerpc_rel16 = yes; then
15350
15351cat >>confdefs.h <<\_ACEOF
15352#define HAVE_AS_REL16 1
15353_ACEOF
15354
15355fi
8ada417f
ZW
15356 ;;
15357
15358 mips*-*-*)
ba479fd2
NN
15359 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
15360echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
15361if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
15362 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15363else
15364 gcc_cv_as_mips_explicit_relocs=no
15365 if test $in_tree_gas = yes; then
15366 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15367 then gcc_cv_as_mips_explicit_relocs=yes
15368fi
15369 elif test x$gcc_cv_as != x; then
6e3f3080 15370 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
15371 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15373 (eval $ac_try) 2>&5
15374 ac_status=$?
15375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15376 (exit $ac_status); }; }
8ada417f
ZW
15377 then
15378 gcc_cv_as_mips_explicit_relocs=yes
15379 else
15380 echo "configure: failed program was" >&5
15381 cat conftest.s >&5
ef1ecf87 15382 fi
8ada417f
ZW
15383 rm -f conftest.o conftest.s
15384 fi
15385fi
ba479fd2
NN
15386echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
15387echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
15388if test $gcc_cv_as_mips_explicit_relocs = yes; then
15389 if test x$target_cpu_default = x
15390 then target_cpu_default=MASK_EXPLICIT_RELOCS
15391 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
15392 fi
15393fi
dbad5e72
SE
15394 ;;
15395esac
8ada417f 15396
dbad5e72
SE
15397# Mips and HP-UX need the GNU assembler.
15398# Linux on IA64 might be able to use the Intel assembler.
15399
15400case "$target" in
15401 mips*-*-* | *-*-hpux* )
82563d35
RS
15402 if test x$gas_flag = xyes \
15403 || test x"$host" != x"$build" \
15404 || test ! -x "$gcc_cv_as" \
15405 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
15406 :
15407 else
15408 echo "*** This configuration requires the GNU assembler" >&2
15409 exit 1
15410 fi
ef1ecf87 15411 ;;
1cb36a98 15412esac
dbad5e72 15413
9d147085
RH
15414# ??? Not all targets support dwarf2 debug_line, even within a version
15415# of gas. Moreover, we need to emit a valid instruction to trigger any
15416# info to the output file. So, as supported targets are added to gas 2.11,
15417# add some instruction here to (also) show we expect this might work.
15418# ??? Once 2.11 is released, probably need to add first known working
15419# version to the per-target configury.
15420case "$target" in
80486e06 15421 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 15422 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
6afdc741 15423 | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-*)
9d147085
RH
15424 insn="nop"
15425 ;;
57116d8d 15426 ia64*-*-* | s390*-*-*)
9d147085
RH
15427 insn="nop 0"
15428 ;;
2853bc5a
HPN
15429 mmix-*-*)
15430 insn="swym 0"
15431 ;;
8ada417f
ZW
15432esac
15433if test x"$insn" != x; then
15434 conftest_s="\
15435 .file 1 \"conftest.s\"
15436 .loc 1 3 0
15437 $insn"
ba479fd2
NN
15438 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
15439echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
15440if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
15441 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15442else
15443 gcc_cv_as_dwarf2_debug_line=no
15444 if test $in_tree_gas = yes; then
15445 if test $in_tree_gas_is_elf = yes \
15446 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15447 then gcc_cv_as_dwarf2_debug_line=yes
15448fi
15449 elif test x$gcc_cv_as != x; then
6e3f3080 15450 echo "$conftest_s" > conftest.s
ba479fd2
NN
15451 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15453 (eval $ac_try) 2>&5
15454 ac_status=$?
15455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15456 (exit $ac_status); }; }
8ada417f 15457 then
080a5bb0
EB
15458 if test x$gcc_cv_objdump != x \
15459 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
15460 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
15461 gcc_cv_as_dwarf2_debug_line=yes
15462 fi
15463 else
15464 echo "configure: failed program was" >&5
15465 cat conftest.s >&5
15466 fi
15467 rm -f conftest.o conftest.s
15468 fi
15469fi
ba479fd2
NN
15470echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
15471echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 15472
ad9c4d9f 15473
8ada417f
ZW
15474# The .debug_line file table must be in the exact order that
15475# we specified the files, since these indices are also used
15476# by DW_AT_decl_file. Approximate this test by testing if
15477# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
15478 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
15479echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
15480if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
15481 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15482else
15483 gcc_cv_as_dwarf2_file_buggy=no
15484 if test x$gcc_cv_as != x; then
6e3f3080 15485 echo ' .file 1 "foo.s"
8ada417f 15486 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
15487 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15489 (eval $ac_try) 2>&5
15490 ac_status=$?
15491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15492 (exit $ac_status); }; }
8ada417f
ZW
15493 then
15494 gcc_cv_as_dwarf2_file_buggy=yes
15495 else
15496 echo "configure: failed program was" >&5
15497 cat conftest.s >&5
15498 fi
15499 rm -f conftest.o conftest.s
15500 fi
ad9c4d9f 15501fi
ba479fd2
NN
15502echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
15503echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
15504
15505
15506 if test $gcc_cv_as_dwarf2_debug_line = yes \
15507 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
15508
15509cat >>confdefs.h <<\_ACEOF
9d147085 15510#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 15511_ACEOF
9d147085 15512
8ada417f 15513 fi
ad9c4d9f 15514
ba479fd2
NN
15515 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
15516echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
15517if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
15518 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15519else
15520 gcc_cv_as_gdwarf2_flag=no
15521 if test $in_tree_gas = yes; then
15522 if test $in_tree_gas_is_elf = yes \
15523 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15524 then gcc_cv_as_gdwarf2_flag=yes
15525fi
15526 elif test x$gcc_cv_as != x; then
6e3f3080 15527 echo "$insn" > conftest.s
ba479fd2
NN
15528 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
15529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15530 (eval $ac_try) 2>&5
15531 ac_status=$?
15532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15533 (exit $ac_status); }; }
8ada417f
ZW
15534 then
15535 gcc_cv_as_gdwarf2_flag=yes
15536 else
15537 echo "configure: failed program was" >&5
15538 cat conftest.s >&5
15539 fi
15540 rm -f conftest.o conftest.s
15541 fi
ad9c4d9f 15542fi
ba479fd2
NN
15543echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
15544echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 15545if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
15546
15547cat >>confdefs.h <<\_ACEOF
5f0e9ea2 15548#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 15549_ACEOF
5f0e9ea2
GK
15550
15551fi
ad9c4d9f 15552
ba479fd2
NN
15553 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
15554echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
15555if test "${gcc_cv_as_gstabs_flag+set}" = set; then
15556 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15557else
15558 gcc_cv_as_gstabs_flag=no
15559 if test $in_tree_gas = yes; then
15560 if test $in_tree_gas_is_elf = yes \
15561 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15562 then gcc_cv_as_gstabs_flag=yes
15563fi
15564 elif test x$gcc_cv_as != x; then
6e3f3080 15565 echo "$insn" > conftest.s
ba479fd2
NN
15566 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
15567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15568 (eval $ac_try) 2>&5
15569 ac_status=$?
15570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15571 (exit $ac_status); }; }
8ada417f
ZW
15572 then
15573 # The native Solaris 9/Intel assembler doesn't understand --gstabs
15574 # and warns about it, but still exits successfully. So check for
15575 # this.
ba479fd2
NN
15576 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
15577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15578 (eval $ac_try) 2>&5
15579 ac_status=$?
15580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15581 (exit $ac_status); }; }
8ada417f
ZW
15582 then :
15583 else gcc_cv_as_gstabs_flag=yes
15584 fi
15585 else
15586 echo "configure: failed program was" >&5
15587 cat conftest.s >&5
15588 fi
15589 rm -f conftest.o conftest.s
15590 fi
ad9c4d9f 15591fi
ba479fd2
NN
15592echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
15593echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 15594if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
15595
15596cat >>confdefs.h <<\_ACEOF
5f0e9ea2 15597#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 15598_ACEOF
5f0e9ea2
GK
15599
15600fi
8ada417f 15601fi
5f0e9ea2 15602
ba479fd2
NN
15603echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
15604echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 15605gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 15606if test $in_tree_ld = yes ; then
5408ac6c
HPN
15607 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 \
15608 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
15609 gcc_cv_ld_ro_rw_mix=read-write
15610 fi
15611elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
15612 echo '.section myfoosect, "a"' > conftest1.s
15613 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 15614 echo '.byte 1' >> conftest2.s
90e145da 15615 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 15616 echo '.byte 0' >> conftest3.s
6cd656d0
KC
15617 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
15618 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
15619 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 15620 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 15621 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 15622 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 15623 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
15624 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
15625 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
15626 gcc_cv_ld_ro_rw_mix=read-only
15627 else
15628 gcc_cv_ld_ro_rw_mix=read-write
15629 fi
15630 fi
15631 fi
15632 rm -f conftest.* conftest[123].*
15633fi
15634if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
15635
15636cat >>confdefs.h <<\_ACEOF
96d0f4dc 15637#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 15638_ACEOF
96d0f4dc
JJ
15639
15640fi
ba479fd2
NN
15641echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
15642echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 15643
ba479fd2
NN
15644echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
15645echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 15646gcc_cv_ld_eh_frame_hdr=no
34a86c2b 15647if test $in_tree_ld = yes ; then
5408ac6c
HPN
15648 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 \
15649 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
15650 gcc_cv_ld_eh_frame_hdr=yes
15651 fi
15652elif test x$gcc_cv_ld != x; then
15653 # Check if linker supports --eh-frame-hdr option
15654 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
15655 gcc_cv_ld_eh_frame_hdr=yes
15656 fi
15657fi
232b67d9 15658
275b60d6 15659if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
15660
15661cat >>confdefs.h <<\_ACEOF
275b60d6 15662#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 15663_ACEOF
275b60d6
JJ
15664
15665fi
ba479fd2
NN
15666echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
15667echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 15668
ba479fd2
NN
15669echo "$as_me:$LINENO: checking linker position independent executable support" >&5
15670echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
15671gcc_cv_ld_pie=no
15672if test $in_tree_ld = yes ; then
5408ac6c
HPN
15673 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 \
15674 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
15675 gcc_cv_ld_pie=yes
15676 fi
15677elif test x$gcc_cv_ld != x; then
15678 # Check if linker supports -pie option
15679 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
15680 gcc_cv_ld_pie=yes
15681 fi
15682fi
15683if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
15684
15685cat >>confdefs.h <<\_ACEOF
24a4dd31 15686#define HAVE_LD_PIE 1
ba479fd2 15687_ACEOF
24a4dd31
JJ
15688
15689fi
ba479fd2
NN
15690echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
15691echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 15692
8bb915b6
NN
15693# --------
15694# UNSORTED
15695# --------
15696
765f1bf9
AM
15697echo "$as_me:$LINENO: checking linker --as-needed support" >&5
15698echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
15699if test "${gcc_cv_ld_as_needed+set}" = set; then
15700 echo $ECHO_N "(cached) $ECHO_C" >&6
15701else
15702 gcc_cv_ld_as_needed=no
765f1bf9
AM
15703if test $in_tree_ld = yes ; then
15704 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 \
15705 && test $in_tree_ld_is_elf = yes; then
15706 gcc_cv_ld_as_needed=yes
15707 fi
15708elif test x$gcc_cv_ld != x; then
15709 # Check if linker supports --as-needed and --no-as-needed options
15710 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
15711 gcc_cv_ld_as_needed=yes
15712 fi
15713fi
82e923f6
RS
15714
15715fi
15716echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
15717echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
15718if test x"$gcc_cv_ld_as_needed" = xyes; then
15719
15720cat >>confdefs.h <<\_ACEOF
15721#define HAVE_LD_AS_NEEDED 1
15722_ACEOF
15723
15724fi
765f1bf9 15725
d82bf747
AM
15726case "$target:$tm_file" in
15727 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
85b776df
AM
15728 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
15729echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
15730if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
15731 echo $ECHO_N "(cached) $ECHO_C" >&6
15732else
15733 gcc_cv_ld_no_dot_syms=no
15734 if test $in_tree_ld = yes ; then
15735 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
15736 gcc_cv_ld_no_dot_syms=yes
15737 fi
15738 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
15739 cat > conftest1.s <<EOF
15740 .text
15741 bl .foo
15742EOF
15743 cat > conftest2.s <<EOF
15744 .section ".opd","aw"
15745 .align 3
15746 .globl foo
15747 .type foo,@function
15748foo:
15749 .quad .LEfoo,.TOC.@tocbase,0
15750 .text
15751.LEfoo:
15752 blr
15753 .size foo,.-.LEfoo
15754EOF
15755 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
15756 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
15757 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
15758 gcc_cv_ld_no_dot_syms=yes
15759 fi
15760 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
15761 fi
15762
15763fi
15764echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
15765echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
15766 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
15767
15768cat >>confdefs.h <<\_ACEOF
15769#define HAVE_LD_NO_DOT_SYMS 1
15770_ACEOF
15771
15772 fi
15773 ;;
15774esac
15775
380e5ca4
MM
15776echo "$as_me:$LINENO: checking linker --sysroot support" >&5
15777echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
15778if test "${gcc_cv_ld_sysroot+set}" = set; then
15779 echo $ECHO_N "(cached) $ECHO_C" >&6
15780else
15781 gcc_cv_ld_sysroot=no
15782 if test $in_tree_ld = yes ; then
15783 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 15784 gcc_cv_ld_sysroot=yes
380e5ca4
MM
15785 fi
15786 elif test x$gcc_cv_ld != x; then
15787 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
15788 gcc_cv_ld_sysroot=yes
15789 fi
15790 fi
15791fi
15792echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
15793echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
15794if test x"$gcc_cv_ld_sysroot" = xyes; then
15795
15796cat >>confdefs.h <<\_ACEOF
15797#define HAVE_LD_SYSROOT 1
15798_ACEOF
15799
15800fi
15801
9fb28a67 15802if test x$with_sysroot = x && test x$host = x$target \
047d636f 15803 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
15804
15805cat >>confdefs.h <<_ACEOF
793e9558 15806#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 15807_ACEOF
793e9558
PB
15808
15809fi
15810
77008252
JJ
15811# Test for stack protector support in target C library.
15812case "$target" in
15813 *-*-linux*)
15814 echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5
15815echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6
15816if test "${gcc_cv_libc_provides_ssp+set}" = set; then
15817 echo $ECHO_N "(cached) $ECHO_C" >&6
15818else
15819 gcc_cv_libc_provides_ssp=no
15820 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
15821 if test "x$with_sysroot" = x; then
15822 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
15823 elif test "x$with_sysroot" = xyes; then
15824 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
15825 else
15826 glibc_header_dir="${with_sysroot}/usr/include"
15827 fi
15828 else
15829 glibc_header_dir=/usr/include
15830 fi
15831 # glibc 2.4 and later provides __stack_chk_fail and
15832 # either __stack_chk_guard, or TLS access to stack guard canary.
15833 if test -f $glibc_header_dir/features.h \
15834 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
15835 $glibc_header_dir/features.h > /dev/null; then
15836 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
15837 $glibc_header_dir/features.h > /dev/null; then
15838 gcc_cv_libc_provides_ssp=yes
15839 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
15840 $glibc_header_dir/features.h > /dev/null \
15841 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
15842 $glibc_header_dir/features.h > /dev/null; then
15843 gcc_cv_libc_provides_ssp=yes
15844 fi
15845 fi
15846fi
15847echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
15848echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;;
15849 *) gcc_cv_libc_provides_ssp=no ;;
15850esac
15851if test x$gcc_cv_libc_provides_ssp = xyes; then
15852
15853cat >>confdefs.h <<\_ACEOF
15854#define TARGET_LIBC_PROVIDES_SSP 1
15855_ACEOF
15856
15857fi
15858
ed965309
JJ
15859# Check if TFmode long double should be used by default or not.
15860# Some glibc targets used DFmode long double, but with glibc 2.4
15861# and later they can use TFmode.
15862case "$target" in
15863 powerpc*-*-*gnu* | \
15864 sparc*-*-linux* | \
15865 s390*-*-linux* | \
15866 alpha*-*-linux*)
15867
15868# Check whether --with-long-double-128 or --without-long-double-128 was given.
15869if test "${with_long_double_128+set}" = set; then
15870 withval="$with_long_double_128"
15871 gcc_cv_target_ldbl128="$with_long_double_128"
15872else
15873 gcc_cv_target_ldbl128=no
15874 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
15875 if test "x$with_sysroot" = x; then
15876 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
15877 elif test "x$with_sysroot" = xyes; then
15878 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
15879 else
15880 glibc_header_dir="${with_sysroot}/usr/include"
15881 fi
15882 else
15883 glibc_header_dir=/usr/include
15884 fi
15885 grep '^ *#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
15886 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
15887 && gcc_cv_target_ldbl128=yes
15888fi;
15889 ;;
15890esac
15891if test x$gcc_cv_target_ldbl128 = xyes; then
15892
15893cat >>confdefs.h <<\_ACEOF
15894#define TARGET_DEFAULT_LONG_DOUBLE_128 1
15895_ACEOF
15896
15897fi
15898
81bf3d9e 15899# Find out what GC implementation we want, or may, use.
ba479fd2 15900
81bf3d9e
RH
15901# Check whether --with-gc or --without-gc was given.
15902if test "${with_gc+set}" = set; then
15903 withval="$with_gc"
15904 case "$withval" in
08cee789 15905 page)
81bf3d9e 15906 GGC=ggc-$withval
08cee789
DJ
15907 ;;
15908 zone)
15909 GGC=ggc-$withval
15910
15911cat >>confdefs.h <<\_ACEOF
15912#define GGC_ZONE 1
15913_ACEOF
15914
81bf3d9e
RH
15915 ;;
15916 *)
ba479fd2
NN
15917 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
15918echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
15919 { (exit 1); exit 1; }; }
81bf3d9e
RH
15920 ;;
15921esac
15922else
005537df 15923 GGC=ggc-page
ba479fd2 15924fi;
81bf3d9e
RH
15925
15926echo "Using $GGC for garbage collection."
15927
3c809ba4 15928# Use the system's zlib library.
b8dad04b
ZW
15929zlibdir=-L../zlib
15930zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 15931
3c809ba4
AG
15932# Check whether --with-system-zlib or --without-system-zlib was given.
15933if test "${with_system_zlib+set}" = set; then
15934 withval="$with_system_zlib"
15935 zlibdir=
15936zlibinc=
15937
ba479fd2 15938fi;
3c809ba4
AG
15939
15940
15941
dc6746e7 15942
ba479fd2
NN
15943echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
15944echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
15945 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
15946if test "${enable_maintainer_mode+set}" = set; then
15947 enableval="$enable_maintainer_mode"
15948 maintainer_mode=$enableval
15949else
15950 maintainer_mode=no
ba479fd2 15951fi;
63cf211a 15952
ba479fd2
NN
15953echo "$as_me:$LINENO: result: $maintainer_mode" >&5
15954echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
15955
15956if test "$maintainer_mode" = "yes"; then
15957 MAINT=''
15958else
15959 MAINT='#'
15960fi
15961
8bb915b6
NN
15962# --------------
15963# Language hooks
15964# --------------
15965
861bb6c1
JL
15966# Make empty files to contain the specs and options for each language.
15967# Then add #include lines to for a compiler that has specs and/or options.
15968
cc11cc9b 15969subdirs=
d7b42618 15970lang_opt_files=
861bb6c1 15971lang_specs_files=
3103b7db 15972lang_tree_files=
861bb6c1
JL
15973# These (without "all_") are set in each config-lang.in.
15974# `language' must be a single word so is spelled singularly.
15975all_languages=
15976all_boot_languages=
15977all_compilers=
15978all_stagestuff=
53c7ffe7 15979all_outputs='Makefile gccbug mklibgcc libada-mk'
861bb6c1 15980# List of language makefile fragments.
2ed26f6b
ZW
15981all_lang_makefrags=
15982# List of language subdirectory makefiles. Deprecated.
861bb6c1 15983all_lang_makefiles=
e2500fed 15984# Files for gengtype
ef69da62 15985all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
15986# Files for gengtype with language
15987all_gtfiles_files_langs=
15988all_gtfiles_files_files=
861bb6c1 15989
cc11cc9b
PB
15990# These are the languages that are set in --enable-languages,
15991# and are available in the GCC tree.
15992all_selected_languages=
15993
861bb6c1
JL
15994# Add the language fragments.
15995# Languages are added via two mechanisms. Some information must be
15996# recorded in makefile variables, these are defined in config-lang.in.
15997# We accumulate them and plug them into the main Makefile.
15998# The other mechanism is a set of hooks for each of the main targets
15999# like `clean', `install', etc.
16000
861bb6c1 16001language_hooks="Make-hooks"
861bb6c1 16002
cc11cc9b 16003for lang in ${srcdir}/*/config-lang.in
861bb6c1 16004do
1546bb64
PB
16005 test "$lang" = "${srcdir}/*/config-lang.in" && continue
16006
cc11cc9b
PB
16007 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
16008 if test "x$lang_alias" = x
16009 then
16010 echo "$lang doesn't set \$language." 1>&2
16011 exit 1
16012 fi
16013 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
16014 subdirs="$subdirs $subdir"
16015 case ",$enable_languages," in
16016 *,$lang_alias,*)
16017 all_selected_languages="$all_selected_languages $lang_alias"
16018 if test -f $srcdir/$subdir/lang-specs.h; then
16019 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
16020 fi
16021 ;;
16022 esac
16023
cc11cc9b
PB
16024 language=
16025 boot_language=
16026 compilers=
16027 stagestuff=
16028 outputs=
16029 gtfiles=
1546bb64 16030 subdir_requires=
cc11cc9b
PB
16031 . ${srcdir}/$subdir/config-lang.in
16032 if test "x$language" = x
16033 then
16034 echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2
16035 exit 1
16036 fi
1546bb64
PB
16037
16038 ok=:
16039 case ",$enable_languages," in
16040 *,$lang_alias,*) ;;
16041 *)
16042 for i in $subdir_requires; do
b6348cb3 16043 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
16044 ok=false
16045 break
16046 done
16047 ;;
16048 esac
16049 $ok || continue
16050
cc11cc9b 16051 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in"
1546bb64
PB
16052 if test -f $srcdir/$subdir/lang.opt; then
16053 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
16054 fi
16055 if test -f $srcdir/$subdir/$subdir-tree.def; then
16056 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
16057 fi
cc11cc9b
PB
16058 if test -f ${srcdir}/$subdir/Makefile.in
16059 then all_lang_makefiles="$subdir/Makefile"
16060 fi
16061 all_languages="$all_languages $language"
16062 if test "x$boot_language" = xyes
16063 then
16064 all_boot_languages="$all_boot_languages $language"
16065 fi
16066 all_compilers="$all_compilers $compilers"
16067 all_stagestuff="$all_stagestuff $stagestuff"
16068 all_outputs="$all_outputs $outputs"
16069 all_gtfiles="$all_gtfiles $gtfiles"
1546bb64
PB
16070 for f in $gtfiles
16071 do
16072 all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} "
16073 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
16074 done
861bb6c1
JL
16075done
16076
8ac9d31f
TJ
16077# Pick up gtfiles for c
16078gtfiles=
cc11cc9b 16079subdir="c"
8ac9d31f
TJ
16080. ${srcdir}/c-config-lang.in
16081all_gtfiles="$all_gtfiles $gtfiles"
c406e779 16082for f in $gtfiles
8ac9d31f 16083do
cc11cc9b 16084 all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} "
8ac9d31f 16085 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
16086done
16087
cbc59f01 16088check_languages=
cc11cc9b 16089for language in $all_selected_languages
cbc59f01 16090do
cc11cc9b 16091 check_languages="$check_languages check-$language"
cbc59f01
DD
16092done
16093
62b81e45 16094# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 16095# lang.${target}. Only do so for selected languages.
861bb6c1
JL
16096
16097rm -f Make-hooks
16098touch Make-hooks
bd97af06 16099target_list="all.cross start.encap rest.encap tags \
b2d7fd7b 16100 install-common install-man install-info dvi html \
a541f69d 16101 uninstall info man srcextra srcman srcinfo \
a03ad584 16102 mostlyclean clean distclean maintainer-clean \
8f231b5d 16103 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
cc11cc9b 16104
861bb6c1
JL
16105for t in $target_list
16106do
16107 x=
cc11cc9b 16108 for lang in $all_selected_languages
861bb6c1 16109 do
cc11cc9b 16110 x="$x $lang.$t"
861bb6c1
JL
16111 done
16112 echo "lang.$t: $x" >> Make-hooks
16113done
16114
8bb915b6
NN
16115# --------
16116# UNSORTED
16117# --------
16118
cc06d68c 16119# Create .gdbinit.
861bb6c1 16120
cc06d68c
GP
16121echo "dir ." > .gdbinit
16122echo "dir ${srcdir}" >> .gdbinit
16123if test x$gdb_needs_out_file_path = xyes
16124then
16125 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
16126fi
16127if test "x$subdirs" != x; then
16128 for s in $subdirs
16129 do
16130 echo "dir ${srcdir}/$s" >> .gdbinit
16131 done
861bb6c1 16132fi
cc06d68c 16133echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 16134
8f8d3278
NC
16135# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
16136# absolute path for gcc_tooldir based on inserting the number of up-directory
16137# movements required to get from $(exec_prefix) to $(prefix) into the basic
16138# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
16139# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
16140# make and thus we'd get different behavior depending on where we built the
16141# sources.
5949a9fc 16142if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 16143 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 16144else
8f8d3278
NC
16145# An explanation of the sed strings:
16146# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
16147# -e 's|/$||' match a trailing forward slash and eliminates it
16148# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 16149# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
16150#
16151# (*) Note this pattern overwrites the first character of the string
16152# with a forward slash if one is not already present. This is not a
16153# problem because the exact names of the sub-directories concerned is
16154# unimportant, just the number of them matters.
16155#
16156# The practical upshot of these patterns is like this:
16157#
16158# prefix exec_prefix result
16159# ------ ----------- ------
16160# /foo /foo/bar ../
16161# /foo/ /foo/bar ../
16162# /foo /foo/bar/ ../
16163# /foo/ /foo/bar/ ../
16164# /foo /foo/bar/ugg ../../
16165#
4c112cda 16166 dollar='$$'
caa55b1e 16167 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
16168fi
16169
16170
2ce3c6c6 16171
2bbea3a6
RH
16172# Find a directory in which to install a shared libgcc.
16173
16174# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
16175if test "${enable_version_specific_runtime_libs+set}" = set; then
16176 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
16177
16178fi;
2bbea3a6
RH
16179
16180
5b15f277
RH
16181# Check whether --with-slibdir or --without-slibdir was given.
16182if test "${with_slibdir+set}" = set; then
16183 withval="$with_slibdir"
16184 slibdir="$with_slibdir"
16185else
16186 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 16187 slibdir='$(libsubdir)'
5b15f277 16188elif test "$host" != "$target"; then
2bbea3a6
RH
16189 slibdir='$(build_tooldir)/lib'
16190else
5b15f277 16191 slibdir='$(libdir)'
2bbea3a6 16192fi
ba479fd2 16193fi;
2bbea3a6
RH
16194
16195
1e6347d8 16196objdir=`${PWDCMD-pwd}`
7e717196
JL
16197
16198
22482f74
MS
16199
16200# Check whether --with-datarootdir or --without-datarootdir was given.
16201if test "${with_datarootdir+set}" = set; then
16202 withval="$with_datarootdir"
16203 datarootdir="\${prefix}/$with_datarootdir"
16204else
16205 datarootdir='$(prefix)/share'
16206fi;
16207
16208
16209
16210# Check whether --with-docdir or --without-docdir was given.
16211if test "${with_docdir+set}" = set; then
16212 withval="$with_docdir"
16213 docdir="\${prefix}/$with_docdir"
16214else
16215 docdir='$(datarootdir)'
16216fi;
16217
16218
16219
16220# Check whether --with-htmldir or --without-htmldir was given.
16221if test "${with_htmldir+set}" = set; then
16222 withval="$with_htmldir"
16223 htmldir="\${prefix}/$with_htmldir"
16224else
16225 htmldir='$(docdir)'
16226fi;
16227
16228
861bb6c1
JL
16229# Substitute configuration variables
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
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
9b16d2c4 16276
e9a25f70 16277
6e26218f 16278
c8724862 16279
e061d1ce 16280
d8bb17c8 16281
11642c3a
ZW
16282
16283
16284
16285
16286
16287
16288
3d9d2476 16289
e2500fed 16290
51b9ff45 16291
861bb6c1 16292
6e3f3080
NN
16293# Echo link setup.
16294if test x${build} = x${host} ; then
16295 if test x${host} = x${target} ; then
16296 echo "Links are now set up to build a native compiler for ${target}." 1>&2
16297 else
16298 echo "Links are now set up to build a cross-compiler" 1>&2
16299 echo " from ${host} to ${target}." 1>&2
16300 fi
16301else
16302 if test x${host} = x${target} ; then
16303 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
16304 echo " for ${target}." 1>&2
16305 else
16306 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
16307 echo " from ${host} to ${target}." 1>&2
16308 fi
16309fi
16310
6de9cd9a
DN
16311
16312
16313
6e3f3080
NN
16314# Configure the subdirectories
16315# AC_CONFIG_SUBDIRS($subdirs)
16316
16317# Create the Makefile
16318# and configure language subdirectories
ba479fd2 16319 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
16320
16321
ba479fd2 16322 ac_config_commands="$ac_config_commands default"
914c5af7 16323
ba479fd2 16324cat >confcache <<\_ACEOF
6e3f3080
NN
16325# This file is a shell script that caches the results of configure
16326# tests run on this system so they can be shared between configure
ba479fd2
NN
16327# scripts and configure runs, see configure's option --config-cache.
16328# It is not useful on other systems. If it contains results you don't
16329# want to keep, you may remove or edit it.
6e3f3080 16330#
ba479fd2
NN
16331# config.status only pays attention to the cache file if you give it
16332# the --recheck option to rerun configure.
6e3f3080 16333#
ba479fd2
NN
16334# `ac_cv_env_foo' variables (set or unset) will be overridden when
16335# loading this file, other *unset* `ac_cv_foo' will be assigned the
16336# following values.
16337
16338_ACEOF
16339
6e3f3080
NN
16340# The following way of writing the cache mishandles newlines in values,
16341# but we know of no workaround that is simple, portable, and efficient.
16342# So, don't put newlines in cache variables' values.
16343# Ultrix sh set writes to stderr and can't be redirected directly,
16344# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
16345{
16346 (set) 2>&1 |
16347 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16348 *ac_space=\ *)
16349 # `set' does not quote correctly, so add quotes (double-quote
16350 # substitution turns \\\\ into \\, and sed turns \\ into \).
16351 sed -n \
86da66b5
HPN
16352 "s/'/'\\\\''/g;
16353 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ba479fd2
NN
16354 ;;
16355 *)
16356 # `set' quotes correctly as required by POSIX, so do not add quotes.
16357 sed -n \
86da66b5 16358 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
16359 ;;
16360 esac;
16361} |
16362 sed '
16363 t clear
16364 : clear
16365 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16366 t end
16367 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16368 : end' >>confcache
16369if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 16370 if test -w $cache_file; then
ba479fd2
NN
16371 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16372 cat confcache >$cache_file
6e3f3080
NN
16373 else
16374 echo "not updating unwritable cache $cache_file"
16375 fi
16376fi
16377rm -f confcache
16378
16379test "x$prefix" = xNONE && prefix=$ac_default_prefix
16380# Let make expand exec_prefix.
16381test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16382
ba479fd2
NN
16383# VPATH may cause trouble with some makes, so we remove $(srcdir),
16384# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16385# trailing colons and then remove the whole line if VPATH becomes empty
16386# (actually we leave an empty line to preserve line numbers).
6e3f3080 16387if test "x$srcdir" = x.; then
86da66b5 16388 ac_vpsub='/^[ ]*VPATH[ ]*=/{
ba479fd2
NN
16389s/:*\$(srcdir):*/:/;
16390s/:*\${srcdir}:*/:/;
16391s/:*@srcdir@:*/:/;
86da66b5 16392s/^\([^=]*=[ ]*\):*/\1/;
ba479fd2 16393s/:*$//;
86da66b5 16394s/^[^=]*=[ ]*$//;
ba479fd2 16395}'
6e3f3080
NN
16396fi
16397
63cf211a 16398DEFS=-DHAVE_CONFIG_H
6e3f3080 16399
ba479fd2
NN
16400ac_libobjs=
16401ac_ltlibobjs=
16402for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16403 # 1. Remove the extension, and $U if already installed.
16404 ac_i=`echo "$ac_i" |
86da66b5 16405 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
ba479fd2
NN
16406 # 2. Add them.
16407 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
16408 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
16409done
16410LIBOBJS=$ac_libobjs
63cf211a 16411
ba479fd2
NN
16412LTLIBOBJS=$ac_ltlibobjs
16413
16414
16415
16416: ${CONFIG_STATUS=./config.status}
16417ac_clean_files_save=$ac_clean_files
16418ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16419{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16420echo "$as_me: creating $CONFIG_STATUS" >&6;}
16421cat >$CONFIG_STATUS <<_ACEOF
16422#! $SHELL
16423# Generated by $as_me.
6e3f3080
NN
16424# Run this file to recreate the current configuration.
16425# Compiler output produced by configure, useful for debugging
ba479fd2 16426# configure, is in config.log if it exists.
6e3f3080 16427
ba479fd2
NN
16428debug=false
16429ac_cs_recheck=false
16430ac_cs_silent=false
16431SHELL=\${CONFIG_SHELL-$SHELL}
16432_ACEOF
16433
16434cat >>$CONFIG_STATUS <<\_ACEOF
16435## --------------------- ##
16436## M4sh Initialization. ##
16437## --------------------- ##
16438
16439# Be Bourne compatible
16440if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16441 emulate sh
16442 NULLCMD=:
16443 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
16444 # is contrary to our usage. Disable this feature.
16445 alias -g '${1+"$@"}'='"$@"'
16446elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16447 set -o posix
16448fi
86da66b5 16449DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
16450
16451# Support unset when possible.
86da66b5 16452if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
16453 as_unset=unset
16454else
16455 as_unset=false
16456fi
16457
16458
16459# Work around bugs in pre-3.0 UWIN ksh.
16460$as_unset ENV MAIL MAILPATH
16461PS1='$ '
16462PS2='> '
16463PS4='+ '
16464
16465# NLS nuisances.
16466for as_var in \
16467 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
16468 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
16469 LC_TELEPHONE LC_TIME
6e3f3080 16470do
86da66b5 16471 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
16472 eval $as_var=C; export $as_var
16473 else
16474 $as_unset $as_var
16475 fi
6e3f3080
NN
16476done
16477
ba479fd2
NN
16478# Required to use basename.
16479if expr a : '\(a\)' >/dev/null 2>&1; then
16480 as_expr=expr
16481else
16482 as_expr=false
16483fi
6e3f3080 16484
ba479fd2
NN
16485if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
16486 as_basename=basename
16487else
16488 as_basename=false
16489fi
6e3f3080
NN
16490
16491
ba479fd2
NN
16492# Name of the executable.
16493as_me=`$as_basename "$0" ||
16494$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16495 X"$0" : 'X\(//\)$' \| \
16496 X"$0" : 'X\(/\)$' \| \
16497 . : '\(.\)' 2>/dev/null ||
16498echo X/"$0" |
16499 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16500 /^X\/\(\/\/\)$/{ s//\1/; q; }
16501 /^X\/\(\/\).*/{ s//\1/; q; }
16502 s/.*/./; q'`
16503
6e3f3080 16504
ba479fd2
NN
16505# PATH needs CR, and LINENO needs CR and PATH.
16506# Avoid depending upon Character Ranges.
16507as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16508as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16509as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16510as_cr_digits='0123456789'
16511as_cr_alnum=$as_cr_Letters$as_cr_digits
16512
16513# The user is always right.
16514if test "${PATH_SEPARATOR+set}" != set; then
16515 echo "#! /bin/sh" >conf$$.sh
16516 echo "exit 0" >>conf$$.sh
16517 chmod +x conf$$.sh
16518 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
16519 PATH_SEPARATOR=';'
6e3f3080 16520 else
ba479fd2
NN
16521 PATH_SEPARATOR=:
16522 fi
16523 rm -f conf$$.sh
16524fi
16525
16526
16527 as_lineno_1=$LINENO
16528 as_lineno_2=$LINENO
16529 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16530 test "x$as_lineno_1" != "x$as_lineno_2" &&
16531 test "x$as_lineno_3" = "x$as_lineno_2" || {
16532 # Find who we are. Look in the path if we contain no path at all
16533 # relative or not.
16534 case $0 in
16535 *[\\/]* ) as_myself=$0 ;;
16536 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16537for as_dir in $PATH
16538do
16539 IFS=$as_save_IFS
16540 test -z "$as_dir" && as_dir=.
16541 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16542done
16543
16544 ;;
16545 esac
16546 # We did not find ourselves, most probably we were run as `sh COMMAND'
16547 # in which case we are not to be found in the path.
16548 if test "x$as_myself" = x; then
16549 as_myself=$0
16550 fi
16551 if test ! -f "$as_myself"; then
16552 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16553echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16554 { (exit 1); exit 1; }; }
6e3f3080 16555 fi
ba479fd2
NN
16556 case $CONFIG_SHELL in
16557 '')
16558 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16559for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16560do
16561 IFS=$as_save_IFS
16562 test -z "$as_dir" && as_dir=.
16563 for as_base in sh bash ksh sh5; do
16564 case $as_dir in
16565 /*)
16566 if ("$as_dir/$as_base" -c '
16567 as_lineno_1=$LINENO
16568 as_lineno_2=$LINENO
16569 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16570 test "x$as_lineno_1" != "x$as_lineno_2" &&
16571 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16572 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
16573 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
16574 CONFIG_SHELL=$as_dir/$as_base
16575 export CONFIG_SHELL
16576 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16577 fi;;
16578 esac
16579 done
16580done
16581;;
16582 esac
16583
16584 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16585 # uniformly replaced by the line number. The first 'sed' inserts a
16586 # line-number line before each line; the second 'sed' does the real
16587 # work. The second script uses 'N' to pair each line-number line
16588 # with the numbered line, and appends trailing '-' during
16589 # substitution so that $LINENO is not a special case at line end.
16590 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16591 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16592 sed '=' <$as_myself |
16593 sed '
16594 N
16595 s,$,-,
16596 : loop
16597 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16598 t loop
16599 s,-$,,
16600 s,^['$as_cr_digits']*\n,,
16601 ' >$as_me.lineno &&
16602 chmod +x $as_me.lineno ||
16603 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16604echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16605 { (exit 1); exit 1; }; }
16606
16607 # Don't try to exec as it changes $[0], causing all sort of problems
16608 # (the dirname of $[0] is not the place where we might find the
16609 # original and so on. Autoconf is especially sensible to this).
16610 . ./$as_me.lineno
16611 # Exit status is that of the last command.
16612 exit
16613}
16614
16615
16616case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16617 *c*,-n*) ECHO_N= ECHO_C='
16618' ECHO_T=' ' ;;
16619 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16620 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16621esac
16622
16623if expr a : '\(a\)' >/dev/null 2>&1; then
16624 as_expr=expr
16625else
16626 as_expr=false
16627fi
16628
16629rm -f conf$$ conf$$.exe conf$$.file
16630echo >conf$$.file
16631if ln -s conf$$.file conf$$ 2>/dev/null; then
16632 # We could just check for DJGPP; but this test a) works b) is more generic
16633 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16634 if test -f conf$$.exe; then
16635 # Don't use ln at all; we don't have any links
16636 as_ln_s='cp -p'
6e3f3080 16637 else
ba479fd2 16638 as_ln_s='ln -s'
6e3f3080 16639 fi
ba479fd2
NN
16640elif ln conf$$.file conf$$ 2>/dev/null; then
16641 as_ln_s=ln
16642else
16643 as_ln_s='cp -p'
16644fi
16645rm -f conf$$ conf$$.exe conf$$.file
16646
16647if mkdir -p . 2>/dev/null; then
16648 as_mkdir_p=:
16649else
86da66b5 16650 test -d ./-p && rmdir ./-p
ba479fd2
NN
16651 as_mkdir_p=false
16652fi
16653
16654as_executable_p="test -f"
16655
16656# Sed expression to map a string onto a valid CPP name.
86da66b5 16657as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
16658
16659# Sed expression to map a string onto a valid variable name.
86da66b5 16660as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
16661
16662
16663# IFS
16664# We need space, tab and new line, in precisely that order.
16665as_nl='
16666'
16667IFS=" $as_nl"
16668
16669# CDPATH.
16670$as_unset CDPATH
16671
16672exec 6>&1
16673
16674# Open the log real soon, to keep \$[0] and so on meaningful, and to
16675# report actual input values of CONFIG_FILES etc. instead of their
16676# values after options handling. Logging --version etc. is OK.
16677exec 5>>config.log
16678{
16679 echo
16680 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16681## Running $as_me. ##
16682_ASBOX
16683} >&5
16684cat >&5 <<_CSEOF
16685
16686This file was extended by $as_me, which was
8ab705be 16687generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
16688
16689 CONFIG_FILES = $CONFIG_FILES
16690 CONFIG_HEADERS = $CONFIG_HEADERS
16691 CONFIG_LINKS = $CONFIG_LINKS
16692 CONFIG_COMMANDS = $CONFIG_COMMANDS
16693 $ $0 $@
16694
16695_CSEOF
16696echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16697echo >&5
16698_ACEOF
16699
16700# Files that config.status was made for.
16701if test -n "$ac_config_files"; then
16702 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16703fi
16704
16705if test -n "$ac_config_headers"; then
16706 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16707fi
16708
16709if test -n "$ac_config_links"; then
16710 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16711fi
16712
16713if test -n "$ac_config_commands"; then
16714 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16715fi
16716
16717cat >>$CONFIG_STATUS <<\_ACEOF
16718
16719ac_cs_usage="\
16720\`$as_me' instantiates files from templates according to the
16721current configuration.
16722
16723Usage: $0 [OPTIONS] [FILE]...
16724
16725 -h, --help print this help, then exit
16726 -V, --version print version number, then exit
16727 -q, --quiet do not print progress messages
16728 -d, --debug don't remove temporary files
16729 --recheck update $as_me by reconfiguring in the same conditions
16730 --file=FILE[:TEMPLATE]
86da66b5 16731 instantiate the configuration file FILE
ba479fd2 16732 --header=FILE[:TEMPLATE]
86da66b5 16733 instantiate the configuration header FILE
ba479fd2
NN
16734
16735Configuration files:
16736$config_files
16737
16738Configuration headers:
16739$config_headers
16740
16741Configuration commands:
16742$config_commands
16743
16744Report bugs to <bug-autoconf@gnu.org>."
16745_ACEOF
16746
16747cat >>$CONFIG_STATUS <<_ACEOF
16748ac_cs_version="\\
16749config.status
8ab705be 16750configured by $0, generated by GNU Autoconf 2.59,
ba479fd2
NN
16751 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16752
86da66b5 16753Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
16754This config.status script is free software; the Free Software Foundation
16755gives unlimited permission to copy, distribute and modify it."
16756srcdir=$srcdir
16757_ACEOF
16758
16759cat >>$CONFIG_STATUS <<\_ACEOF
16760# If no file are specified by the user, then we need to provide default
16761# value. By we need to know if files were specified by the user.
16762ac_need_defaults=:
16763while test $# != 0
16764do
16765 case $1 in
16766 --*=*)
16767 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16768 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16769 ac_shift=:
16770 ;;
16771 -*)
16772 ac_option=$1
16773 ac_optarg=$2
16774 ac_shift=shift
16775 ;;
16776 *) # This is not an option, so the user has probably given explicit
16777 # arguments.
16778 ac_option=$1
16779 ac_need_defaults=false;;
16780 esac
16781
16782 case $ac_option in
16783 # Handling of the options.
16784_ACEOF
16785cat >>$CONFIG_STATUS <<\_ACEOF
16786 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16787 ac_cs_recheck=: ;;
16788 --version | --vers* | -V )
16789 echo "$ac_cs_version"; exit 0 ;;
16790 --he | --h)
16791 # Conflict between --help and --header
16792 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16793Try \`$0 --help' for more information." >&5
16794echo "$as_me: error: ambiguous option: $1
16795Try \`$0 --help' for more information." >&2;}
16796 { (exit 1); exit 1; }; };;
16797 --help | --hel | -h )
16798 echo "$ac_cs_usage"; exit 0 ;;
16799 --debug | --d* | -d )
16800 debug=: ;;
16801 --file | --fil | --fi | --f )
16802 $ac_shift
16803 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
16804 ac_need_defaults=false;;
16805 --header | --heade | --head | --hea )
16806 $ac_shift
16807 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
16808 ac_need_defaults=false;;
16809 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16810 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16811 ac_cs_silent=: ;;
16812
16813 # This is an error.
16814 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16815Try \`$0 --help' for more information." >&5
16816echo "$as_me: error: unrecognized option: $1
16817Try \`$0 --help' for more information." >&2;}
16818 { (exit 1); exit 1; }; } ;;
16819
16820 *) ac_config_targets="$ac_config_targets $1" ;;
16821
16822 esac
16823 shift
6e3f3080 16824done
ba479fd2
NN
16825
16826ac_configure_extra_args=
16827
16828if $ac_cs_silent; then
16829 exec 6>/dev/null
16830 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
16831fi
16832
ba479fd2
NN
16833_ACEOF
16834cat >>$CONFIG_STATUS <<_ACEOF
16835if \$ac_cs_recheck; then
16836 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
16837 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16838fi
861bb6c1 16839
ba479fd2
NN
16840_ACEOF
16841
16842cat >>$CONFIG_STATUS <<_ACEOF
16843#
16844# INIT-COMMANDS section.
16845#
16846
16847subdirs='$subdirs'
ba479fd2
NN
16848
16849_ACEOF
16850
16851
16852
16853cat >>$CONFIG_STATUS <<\_ACEOF
16854for ac_config_target in $ac_config_targets
16855do
16856 case "$ac_config_target" in
16857 # Handling of arguments.
16858 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
16859 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16860 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
16861 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16862echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16863 { (exit 1); exit 1; }; };;
861bb6c1 16864 esac
ba479fd2
NN
16865done
16866
16867# If the user did not use the arguments to specify the items to instantiate,
16868# then the envvar interface is used. Set only those that are not.
16869# We use the long form for the default assignment because of an extremely
16870# bizarre bug on SunOS 4.1.3.
16871if $ac_need_defaults; then
16872 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16873 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16874 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16875fi
16876
16877# Have a temporary directory for convenience. Make it in the build tree
16878# simply because there is no reason to put it here, and in addition,
16879# creating and moving files from /tmp can sometimes cause problems.
16880# Create a temporary directory, and hook for its removal unless debugging.
16881$debug ||
16882{
16883 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16884 trap '{ (exit 1); exit 1; }' 1 2 13 15
16885}
861bb6c1 16886
ba479fd2 16887# Create a (secure) tmp directory for tmp files.
6e3f3080 16888
ba479fd2
NN
16889{
16890 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
16891 test -n "$tmp" && test -d "$tmp"
16892} ||
16893{
16894 tmp=./confstat$$-$RANDOM
16895 (umask 077 && mkdir $tmp)
16896} ||
16897{
16898 echo "$me: cannot create a temporary directory in ." >&2
16899 { (exit 1); exit 1; }
16900}
16901
16902_ACEOF
16903
16904cat >>$CONFIG_STATUS <<_ACEOF
16905
16906#
16907# CONFIG_FILES section.
16908#
16909
16910# No need to generate the scripts if there are no CONFIG_FILES.
16911# This happens for instance when ./config.status config.h
16912if test -n "\$CONFIG_FILES"; then
16913 # Protect against being on the right side of a sed subst in config.status.
16914 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16915 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16916s,@SHELL@,$SHELL,;t t
16917s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16918s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16919s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16920s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16921s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16922s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16923s,@exec_prefix@,$exec_prefix,;t t
16924s,@prefix@,$prefix,;t t
16925s,@program_transform_name@,$program_transform_name,;t t
16926s,@bindir@,$bindir,;t t
16927s,@sbindir@,$sbindir,;t t
16928s,@libexecdir@,$libexecdir,;t t
16929s,@datadir@,$datadir,;t t
16930s,@sysconfdir@,$sysconfdir,;t t
16931s,@sharedstatedir@,$sharedstatedir,;t t
16932s,@localstatedir@,$localstatedir,;t t
16933s,@libdir@,$libdir,;t t
16934s,@includedir@,$includedir,;t t
16935s,@oldincludedir@,$oldincludedir,;t t
16936s,@infodir@,$infodir,;t t
16937s,@mandir@,$mandir,;t t
16938s,@build_alias@,$build_alias,;t t
16939s,@host_alias@,$host_alias,;t t
16940s,@target_alias@,$target_alias,;t t
16941s,@DEFS@,$DEFS,;t t
16942s,@ECHO_C@,$ECHO_C,;t t
16943s,@ECHO_N@,$ECHO_N,;t t
16944s,@ECHO_T@,$ECHO_T,;t t
16945s,@LIBS@,$LIBS,;t t
16946s,@build@,$build,;t t
16947s,@build_cpu@,$build_cpu,;t t
16948s,@build_vendor@,$build_vendor,;t t
16949s,@build_os@,$build_os,;t t
16950s,@host@,$host,;t t
16951s,@host_cpu@,$host_cpu,;t t
16952s,@host_vendor@,$host_vendor,;t t
16953s,@host_os@,$host_os,;t t
16954s,@target@,$target,;t t
16955s,@target_cpu@,$target_cpu,;t t
16956s,@target_vendor@,$target_vendor,;t t
16957s,@target_os@,$target_os,;t t
18fc9bd4 16958s,@target_noncanonical@,$target_noncanonical,;t t
1546bb64 16959s,@build_libsubdir@,$build_libsubdir,;t t
18fc9bd4
RG
16960s,@build_subdir@,$build_subdir,;t t
16961s,@host_subdir@,$host_subdir,;t t
16962s,@target_subdir@,$target_subdir,;t t
03787dfd 16963s,@GENINSRC@,$GENINSRC,;t t
ba479fd2
NN
16964s,@CC@,$CC,;t t
16965s,@CFLAGS@,$CFLAGS,;t t
16966s,@LDFLAGS@,$LDFLAGS,;t t
16967s,@CPPFLAGS@,$CPPFLAGS,;t t
16968s,@ac_ct_CC@,$ac_ct_CC,;t t
16969s,@EXEEXT@,$EXEEXT,;t t
16970s,@OBJEXT@,$OBJEXT,;t t
16971s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
16972s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
16973s,@CPP@,$CPP,;t t
bf3b7cd3 16974s,@EGREP@,$EGREP,;t t
ba479fd2 16975s,@strict1_warn@,$strict1_warn,;t t
373477bb 16976s,@cxx_compat_warn@,$cxx_compat_warn,;t t
ba479fd2
NN
16977s,@warn_cflags@,$warn_cflags,;t t
16978s,@WERROR@,$WERROR,;t t
16979s,@nocommon_flag@,$nocommon_flag,;t t
13f05fd0 16980s,@TREEBROWSER@,$TREEBROWSER,;t t
ba479fd2
NN
16981s,@valgrind_path@,$valgrind_path,;t t
16982s,@valgrind_path_defines@,$valgrind_path_defines,;t t
16983s,@valgrind_command@,$valgrind_command,;t t
16984s,@coverage_flags@,$coverage_flags,;t t
16985s,@enable_multilib@,$enable_multilib,;t t
486aa804 16986s,@enable_decimal_float@,$enable_decimal_float,;t t
ba479fd2
NN
16987s,@enable_shared@,$enable_shared,;t t
16988s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
16989s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
16990s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
16991s,@onestep@,$onestep,;t t
9288b845
CD
16992s,@datarootdir@,$datarootdir,;t t
16993s,@docdir@,$docdir,;t t
16994s,@htmldir@,$htmldir,;t t
ba479fd2
NN
16995s,@SET_MAKE@,$SET_MAKE,;t t
16996s,@AWK@,$AWK,;t t
ba479fd2 16997s,@LN_S@,$LN_S,;t t
18fc9bd4 16998s,@LN@,$LN,;t t
ba479fd2
NN
16999s,@RANLIB@,$RANLIB,;t t
17000s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
343a6100 17001s,@ranlib_flags@,$ranlib_flags,;t t
ba479fd2
NN
17002s,@INSTALL@,$INSTALL,;t t
17003s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17004s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17005s,@make_compare_target@,$make_compare_target,;t t
17006s,@have_mktemp_command@,$have_mktemp_command,;t t
17007s,@MAKEINFO@,$MAKEINFO,;t t
17008s,@BUILD_INFO@,$BUILD_INFO,;t t
17009s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
17010s,@FLEX@,$FLEX,;t t
17011s,@BISON@,$BISON,;t t
f6a874ac
JW
17012s,@NM@,$NM,;t t
17013s,@AR@,$AR,;t t
ba479fd2
NN
17014s,@stage1_cflags@,$stage1_cflags,;t t
17015s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
17016s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
17017s,@LDEXP_LIB@,$LDEXP_LIB,;t t
17018s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
17019s,@LIBICONV@,$LIBICONV,;t t
dfb77e37 17020s,@LTLIBICONV@,$LTLIBICONV,;t t
ba479fd2
NN
17021s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
17022s,@manext@,$manext,;t t
17023s,@objext@,$objext,;t t
8bb915b6 17024s,@gthread_flags@,$gthread_flags,;t t
ba479fd2 17025s,@extra_modes_file@,$extra_modes_file,;t t
75685792 17026s,@extra_opt_files@,$extra_opt_files,;t t
18fc9bd4
RG
17027s,@USE_NLS@,$USE_NLS,;t t
17028s,@LIBINTL@,$LIBINTL,;t t
17029s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
17030s,@INCINTL@,$INCINTL,;t t
17031s,@XGETTEXT@,$XGETTEXT,;t t
17032s,@GMSGFMT@,$GMSGFMT,;t t
17033s,@POSUB@,$POSUB,;t t
17034s,@CATALOGS@,$CATALOGS,;t t
17035s,@DATADIRNAME@,$DATADIRNAME,;t t
17036s,@INSTOBJEXT@,$INSTOBJEXT,;t t
17037s,@GENCAT@,$GENCAT,;t t
17038s,@CATOBJEXT@,$CATOBJEXT,;t t
5395b47b 17039s,@host_cc_for_libada@,$host_cc_for_libada,;t t
ba479fd2
NN
17040s,@CROSS@,$CROSS,;t t
17041s,@ALL@,$ALL,;t t
17042s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
17043s,@inhibit_libc@,$inhibit_libc,;t t
ba479fd2
NN
17044s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
17045s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17046s,@STMP_FIXINC@,$STMP_FIXINC,;t t
17047s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
c38f02df 17048s,@collect2@,$collect2,;t t
9f18db39
PB
17049s,@gcc_cv_as@,$gcc_cv_as,;t t
17050s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
17051s,@gcc_cv_ld@,$gcc_cv_ld,;t t
17052s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
17053s,@gcc_cv_nm@,$gcc_cv_nm,;t t
17054s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
d739199a 17055s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
ba479fd2 17056s,@libgcc_visibility@,$libgcc_visibility,;t t
ba479fd2
NN
17057s,@GGC@,$GGC,;t t
17058s,@zlibdir@,$zlibdir,;t t
17059s,@zlibinc@,$zlibinc,;t t
17060s,@MAINT@,$MAINT,;t t
17061s,@gcc_tooldir@,$gcc_tooldir,;t t
17062s,@dollar@,$dollar,;t t
17063s,@slibdir@,$slibdir,;t t
17064s,@objdir@,$objdir,;t t
17065s,@subdirs@,$subdirs,;t t
17066s,@srcdir@,$srcdir,;t t
ba479fd2
NN
17067s,@all_boot_languages@,$all_boot_languages,;t t
17068s,@all_compilers@,$all_compilers,;t t
17069s,@all_gtfiles@,$all_gtfiles,;t t
17070s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
17071s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
17072s,@all_lang_makefrags@,$all_lang_makefrags,;t t
17073s,@all_lang_makefiles@,$all_lang_makefiles,;t t
17074s,@all_languages@,$all_languages,;t t
cc11cc9b 17075s,@all_selected_languages@,$all_selected_languages,;t t
ba479fd2
NN
17076s,@all_stagestuff@,$all_stagestuff,;t t
17077s,@build_exeext@,$build_exeext,;t t
17078s,@build_install_headers_dir@,$build_install_headers_dir,;t t
17079s,@build_xm_file_list@,$build_xm_file_list,;t t
17080s,@build_xm_include_list@,$build_xm_include_list,;t t
17081s,@build_xm_defines@,$build_xm_defines,;t t
17082s,@check_languages@,$check_languages,;t t
17083s,@cc_set_by_configure@,$cc_set_by_configure,;t t
17084s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
17085s,@cpp_install_dir@,$cpp_install_dir,;t t
17086s,@xmake_file@,$xmake_file,;t t
17087s,@tmake_file@,$tmake_file,;t t
30500d84 17088s,@extra_gcc_objs@,$extra_gcc_objs,;t t
ba479fd2
NN
17089s,@extra_headers_list@,$extra_headers_list,;t t
17090s,@extra_objs@,$extra_objs,;t t
17091s,@extra_parts@,$extra_parts,;t t
17092s,@extra_passes@,$extra_passes,;t t
17093s,@extra_programs@,$extra_programs,;t t
17094s,@float_h_file@,$float_h_file,;t t
17095s,@gcc_config_arguments@,$gcc_config_arguments,;t t
17096s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
ba479fd2 17097s,@host_exeext@,$host_exeext,;t t
ba479fd2
NN
17098s,@host_xm_file_list@,$host_xm_file_list,;t t
17099s,@host_xm_include_list@,$host_xm_include_list,;t t
17100s,@host_xm_defines@,$host_xm_defines,;t t
17101s,@out_host_hook_obj@,$out_host_hook_obj,;t t
17102s,@install@,$install,;t t
17103s,@lang_opt_files@,$lang_opt_files,;t t
17104s,@lang_specs_files@,$lang_specs_files,;t t
17105s,@lang_tree_files@,$lang_tree_files,;t t
17106s,@local_prefix@,$local_prefix,;t t
17107s,@md_file@,$md_file,;t t
17108s,@objc_boehm_gc@,$objc_boehm_gc,;t t
17109s,@out_file@,$out_file,;t t
17110s,@out_object_file@,$out_object_file,;t t
17111s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
17112s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
ba479fd2
NN
17113s,@thread_file@,$thread_file,;t t
17114s,@tm_file_list@,$tm_file_list,;t t
17115s,@tm_include_list@,$tm_include_list,;t t
17116s,@tm_defines@,$tm_defines,;t t
17117s,@tm_p_file_list@,$tm_p_file_list,;t t
17118s,@tm_p_include_list@,$tm_p_include_list,;t t
17119s,@xm_file_list@,$xm_file_list,;t t
17120s,@xm_include_list@,$xm_include_list,;t t
17121s,@xm_defines@,$xm_defines,;t t
ba479fd2
NN
17122s,@c_target_objs@,$c_target_objs,;t t
17123s,@cxx_target_objs@,$cxx_target_objs,;t t
17124s,@target_cpu_default@,$target_cpu_default,;t t
6de9cd9a
DN
17125s,@GMPLIBS@,$GMPLIBS,;t t
17126s,@GMPINC@,$GMPINC,;t t
ba479fd2
NN
17127s,@LIBOBJS@,$LIBOBJS,;t t
17128s,@LTLIBOBJS@,$LTLIBOBJS,;t t
17129/@language_hooks@/r $language_hooks
17130s,@language_hooks@,,;t t
17131CEOF
17132
17133_ACEOF
17134
17135 cat >>$CONFIG_STATUS <<\_ACEOF
17136 # Split the substitutions into bite-sized pieces for seds with
17137 # small command number limits, like on Digital OSF/1 and HP-UX.
17138 ac_max_sed_lines=48
17139 ac_sed_frag=1 # Number of current file.
17140 ac_beg=1 # First line for current file.
17141 ac_end=$ac_max_sed_lines # Line after last line for current file.
17142 ac_more_lines=:
17143 ac_sed_cmds=
17144 while $ac_more_lines; do
17145 if test $ac_beg -gt 1; then
17146 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17147 else
17148 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17149 fi
17150 if test ! -s $tmp/subs.frag; then
17151 ac_more_lines=false
17152 else
17153 # The purpose of the label and of the branching condition is to
17154 # speed up the sed processing (if there are no `@' at all, there
17155 # is no need to browse any of the substitutions).
17156 # These are the two extra sed commands mentioned above.
17157 (echo ':t
17158 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17159 if test -z "$ac_sed_cmds"; then
86da66b5 17160 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2 17161 else
86da66b5 17162 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2
NN
17163 fi
17164 ac_sed_frag=`expr $ac_sed_frag + 1`
17165 ac_beg=$ac_end
17166 ac_end=`expr $ac_end + $ac_max_sed_lines`
17167 fi
17168 done
17169 if test -z "$ac_sed_cmds"; then
17170 ac_sed_cmds=cat
63cf211a 17171 fi
ba479fd2 17172fi # test -n "$CONFIG_FILES"
cafe096b 17173
ba479fd2
NN
17174_ACEOF
17175cat >>$CONFIG_STATUS <<\_ACEOF
17176for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17177 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17178 case $ac_file in
17179 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
17180 cat >$tmp/stdin
17181 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17182 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 17183 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 17184 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 17185 * ) ac_file_in=$ac_file.in ;;
63cf211a 17186 esac
cafe096b 17187
ba479fd2
NN
17188 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17189 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17190$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17191 X"$ac_file" : 'X\(//\)[^/]' \| \
17192 X"$ac_file" : 'X\(//\)$' \| \
17193 X"$ac_file" : 'X\(/\)' \| \
17194 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17195echo X"$ac_file" |
17196 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17197 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17198 /^X\(\/\/\)$/{ s//\1/; q; }
17199 /^X\(\/\).*/{ s//\1/; q; }
17200 s/.*/./; q'`
17201 { if $as_mkdir_p; then
17202 mkdir -p "$ac_dir"
17203 else
17204 as_dir="$ac_dir"
17205 as_dirs=
17206 while test ! -d "$as_dir"; do
17207 as_dirs="$as_dir $as_dirs"
17208 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17209$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17210 X"$as_dir" : 'X\(//\)[^/]' \| \
17211 X"$as_dir" : 'X\(//\)$' \| \
17212 X"$as_dir" : 'X\(/\)' \| \
17213 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17214echo X"$as_dir" |
17215 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17216 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17217 /^X\(\/\/\)$/{ s//\1/; q; }
17218 /^X\(\/\).*/{ s//\1/; q; }
17219 s/.*/./; q'`
17220 done
17221 test ! -n "$as_dirs" || mkdir $as_dirs
17222 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17223echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17224 { (exit 1); exit 1; }; }; }
6e3f3080 17225
ba479fd2
NN
17226 ac_builddir=.
17227
17228if test "$ac_dir" != .; then
17229 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17230 # A "../" for each directory in $ac_dir_suffix.
17231 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17232else
17233 ac_dir_suffix= ac_top_builddir=
17234fi
17235
17236case $srcdir in
17237 .) # No --srcdir option. We are building in place.
17238 ac_srcdir=.
17239 if test -z "$ac_top_builddir"; then
17240 ac_top_srcdir=.
17241 else
17242 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17243 fi ;;
17244 [\\/]* | ?:[\\/]* ) # Absolute path.
17245 ac_srcdir=$srcdir$ac_dir_suffix;
17246 ac_top_srcdir=$srcdir ;;
17247 *) # Relative path.
17248 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17249 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17250esac
8ab705be
KC
17251
17252# Do not use `cd foo && pwd` to compute absolute paths, because
17253# the directories may not exist.
17254case `pwd` in
17255.) ac_abs_builddir="$ac_dir";;
86da66b5 17256*)
8ab705be
KC
17257 case "$ac_dir" in
17258 .) ac_abs_builddir=`pwd`;;
17259 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17260 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
17261 esac;;
17262esac
8ab705be 17263case $ac_abs_builddir in
86da66b5
HPN
17264.) ac_abs_top_builddir=${ac_top_builddir}.;;
17265*)
17266 case ${ac_top_builddir}. in
8ab705be 17267 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 17268 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 17269 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
17270 esac;;
17271esac
8ab705be 17272case $ac_abs_builddir in
86da66b5
HPN
17273.) ac_abs_srcdir=$ac_srcdir;;
17274*)
17275 case $ac_srcdir in
8ab705be 17276 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 17277 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 17278 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
17279 esac;;
17280esac
8ab705be 17281case $ac_abs_builddir in
86da66b5
HPN
17282.) ac_abs_top_srcdir=$ac_top_srcdir;;
17283*)
17284 case $ac_top_srcdir in
8ab705be 17285 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 17286 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 17287 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
17288 esac;;
17289esac
ba479fd2
NN
17290
17291
17292
ec6c7392
PB
17293 if test x"$ac_file" != x-; then
17294 { echo "$as_me:$LINENO: creating $ac_file" >&5
17295echo "$as_me: creating $ac_file" >&6;}
17296 rm -f "$ac_file"
17297 fi
ba479fd2
NN
17298 # Let's still pretend it is `configure' which instantiates (i.e., don't
17299 # use $as_me), people would be surprised to read:
17300 # /* config.h. Generated by config.status. */
17301 if test x"$ac_file" = x-; then
17302 configure_input=
17303 else
17304 configure_input="$ac_file. "
17305 fi
17306 configure_input=$configure_input"Generated from `echo $ac_file_in |
86da66b5 17307 sed 's,.*/,,'` by configure."
ba479fd2
NN
17308
17309 # First look for the input files in the build tree, otherwise in the
17310 # src tree.
17311 ac_file_inputs=`IFS=:
17312 for f in $ac_file_in; do
17313 case $f in
17314 -) echo $tmp/stdin ;;
17315 [\\/$]*)
86da66b5
HPN
17316 # Absolute (can't be DOS-style, as IFS=:)
17317 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17318echo "$as_me: error: cannot find input file: $f" >&2;}
17319 { (exit 1); exit 1; }; }
86da66b5 17320 echo "$f";;
ba479fd2 17321 *) # Relative
86da66b5
HPN
17322 if test -f "$f"; then
17323 # Build tree
17324 echo "$f"
17325 elif test -f "$srcdir/$f"; then
17326 # Source tree
17327 echo "$srcdir/$f"
17328 else
17329 # /dev/null tree
17330 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17331echo "$as_me: error: cannot find input file: $f" >&2;}
17332 { (exit 1); exit 1; }; }
86da66b5 17333 fi;;
ba479fd2
NN
17334 esac
17335 done` || { (exit 1); exit 1; }
17336_ACEOF
17337cat >>$CONFIG_STATUS <<_ACEOF
17338 sed "$ac_vpsub
17339$extrasub
17340_ACEOF
17341cat >>$CONFIG_STATUS <<\_ACEOF
17342:t
17343/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17344s,@configure_input@,$configure_input,;t t
17345s,@srcdir@,$ac_srcdir,;t t
17346s,@abs_srcdir@,$ac_abs_srcdir,;t t
17347s,@top_srcdir@,$ac_top_srcdir,;t t
17348s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17349s,@builddir@,$ac_builddir,;t t
17350s,@abs_builddir@,$ac_abs_builddir,;t t
17351s,@top_builddir@,$ac_top_builddir,;t t
17352s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17353" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17354 rm -f $tmp/stdin
17355 if test x"$ac_file" != x-; then
17356 mv $tmp/out $ac_file
17357 else
17358 cat $tmp/out
17359 rm -f $tmp/out
17360 fi
17361
17362done
17363_ACEOF
17364cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 17365
ba479fd2
NN
17366#
17367# CONFIG_HEADER section.
17368#
861bb6c1
JL
17369
17370# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17371# NAME is the cpp macro being defined and VALUE is the value it is being given.
17372#
17373# ac_d sets the value in "#define NAME VALUE" lines.
86da66b5
HPN
17374ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17375ac_dB='[ ].*$,\1#\2'
ba479fd2
NN
17376ac_dC=' '
17377ac_dD=',;t'
17378# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
86da66b5 17379ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ba479fd2 17380ac_uB='$,\1#\2define\3'
861bb6c1 17381ac_uC=' '
ba479fd2
NN
17382ac_uD=',;t'
17383
17384for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 17385 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
17386 case $ac_file in
17387 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
17388 cat >$tmp/stdin
17389 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17390 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 17391 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 17392 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 17393 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
17394 esac
17395
ba479fd2
NN
17396 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17397echo "$as_me: creating $ac_file" >&6;}
17398
17399 # First look for the input files in the build tree, otherwise in the
17400 # src tree.
17401 ac_file_inputs=`IFS=:
17402 for f in $ac_file_in; do
17403 case $f in
17404 -) echo $tmp/stdin ;;
17405 [\\/$]*)
86da66b5
HPN
17406 # Absolute (can't be DOS-style, as IFS=:)
17407 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17408echo "$as_me: error: cannot find input file: $f" >&2;}
17409 { (exit 1); exit 1; }; }
86da66b5
HPN
17410 # Do quote $f, to prevent DOS paths from being IFS'd.
17411 echo "$f";;
ba479fd2 17412 *) # Relative
86da66b5
HPN
17413 if test -f "$f"; then
17414 # Build tree
17415 echo "$f"
17416 elif test -f "$srcdir/$f"; then
17417 # Source tree
17418 echo "$srcdir/$f"
17419 else
17420 # /dev/null tree
17421 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
17422echo "$as_me: error: cannot find input file: $f" >&2;}
17423 { (exit 1); exit 1; }; }
86da66b5 17424 fi;;
ba479fd2
NN
17425 esac
17426 done` || { (exit 1); exit 1; }
17427 # Remove the trailing spaces.
86da66b5 17428 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
ba479fd2
NN
17429
17430_ACEOF
17431
17432# Transform confdefs.h into two sed scripts, `conftest.defines' and
17433# `conftest.undefs', that substitutes the proper values into
17434# config.h.in to produce config.h. The first handles `#define'
17435# templates, and the second `#undef' templates.
17436# And first: Protect against being on the right side of a sed subst in
17437# config.status. Protect against being in an unquoted here document
17438# in config.status.
17439rm -f conftest.defines conftest.undefs
17440# Using a here document instead of a string reduces the quoting nightmare.
17441# Putting comments in sed scripts is not portable.
17442#
17443# `end' is used to avoid that the second main sed command (meant for
17444# 0-ary CPP macros) applies to n-ary macro definitions.
17445# See the Autoconf documentation for `clear'.
17446cat >confdef2sed.sed <<\_ACEOF
17447s/[\\&,]/\\&/g
17448s,[\\$`],\\&,g
17449t clear
17450: clear
86da66b5 17451s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
ba479fd2 17452t end
86da66b5 17453s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
ba479fd2
NN
17454: end
17455_ACEOF
17456# If some macros were called several times there might be several times
17457# the same #defines, which is useless. Nevertheless, we may not want to
17458# sort them, since we want the *last* AC-DEFINE to be honored.
17459uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17460sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17461rm -f confdef2sed.sed
861bb6c1
JL
17462
17463# This sed command replaces #undef with comments. This is necessary, for
17464# example, in the case of _POSIX_SOURCE, which is predefined and required
17465# on some systems where configure will not decide to define it.
ba479fd2 17466cat >>conftest.undefs <<\_ACEOF
86da66b5 17467s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
ba479fd2
NN
17468_ACEOF
17469
17470# Break up conftest.defines because some shells have a limit on the size
17471# of here documents, and old seds have small limits too (100 cmds).
17472echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
86da66b5 17473echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
ba479fd2
NN
17474echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17475echo ' :' >>$CONFIG_STATUS
17476rm -f conftest.tail
17477while grep . conftest.defines >/dev/null
17478do
17479 # Write a limited-size here document to $tmp/defines.sed.
17480 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17481 # Speed up: don't consider the non `#define' lines.
86da66b5 17482 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
ba479fd2
NN
17483 # Work around the forget-to-reset-the-flag bug.
17484 echo 't clr' >>$CONFIG_STATUS
17485 echo ': clr' >>$CONFIG_STATUS
17486 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
17487 echo 'CEOF
17488 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17489 rm -f $tmp/in
17490 mv $tmp/out $tmp/in
17491' >>$CONFIG_STATUS
17492 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17493 rm -f conftest.defines
17494 mv conftest.tail conftest.defines
17495done
17496rm -f conftest.defines
17497echo ' fi # grep' >>$CONFIG_STATUS
17498echo >>$CONFIG_STATUS
861bb6c1 17499
ba479fd2
NN
17500# Break up conftest.undefs because some shells have a limit on the size
17501# of here documents, and old seds have small limits too (100 cmds).
17502echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 17503rm -f conftest.tail
ba479fd2 17504while grep . conftest.undefs >/dev/null
861bb6c1 17505do
ba479fd2
NN
17506 # Write a limited-size here document to $tmp/undefs.sed.
17507 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17508 # Speed up: don't consider the non `#undef'
86da66b5 17509 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
ba479fd2
NN
17510 # Work around the forget-to-reset-the-flag bug.
17511 echo 't clr' >>$CONFIG_STATUS
17512 echo ': clr' >>$CONFIG_STATUS
17513 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 17514 echo 'CEOF
ba479fd2
NN
17515 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17516 rm -f $tmp/in
17517 mv $tmp/out $tmp/in
17518' >>$CONFIG_STATUS
17519 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17520 rm -f conftest.undefs
17521 mv conftest.tail conftest.undefs
861bb6c1 17522done
ba479fd2
NN
17523rm -f conftest.undefs
17524
17525cat >>$CONFIG_STATUS <<\_ACEOF
17526 # Let's still pretend it is `configure' which instantiates (i.e., don't
17527 # use $as_me), people would be surprised to read:
17528 # /* config.h. Generated by config.status. */
17529 if test x"$ac_file" = x-; then
17530 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 17531 else
ba479fd2 17532 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 17533 fi
ba479fd2
NN
17534 cat $tmp/in >>$tmp/config.h
17535 rm -f $tmp/in
17536 if test x"$ac_file" != x-; then
17537 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
17538 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17539echo "$as_me: $ac_file is unchanged" >&6;}
17540 else
17541 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17542$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17543 X"$ac_file" : 'X\(//\)[^/]' \| \
17544 X"$ac_file" : 'X\(//\)$' \| \
17545 X"$ac_file" : 'X\(/\)' \| \
17546 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17547echo X"$ac_file" |
17548 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17549 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17550 /^X\(\/\/\)$/{ s//\1/; q; }
17551 /^X\(\/\).*/{ s//\1/; q; }
17552 s/.*/./; q'`
17553 { if $as_mkdir_p; then
17554 mkdir -p "$ac_dir"
17555 else
17556 as_dir="$ac_dir"
17557 as_dirs=
17558 while test ! -d "$as_dir"; do
17559 as_dirs="$as_dir $as_dirs"
17560 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17561$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17562 X"$as_dir" : 'X\(//\)[^/]' \| \
17563 X"$as_dir" : 'X\(//\)$' \| \
17564 X"$as_dir" : 'X\(/\)' \| \
17565 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17566echo X"$as_dir" |
17567 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17568 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17569 /^X\(\/\/\)$/{ s//\1/; q; }
17570 /^X\(\/\).*/{ s//\1/; q; }
17571 s/.*/./; q'`
17572 done
17573 test ! -n "$as_dirs" || mkdir $as_dirs
17574 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17575echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17576 { (exit 1); exit 1; }; }; }
63cf211a 17577
ba479fd2
NN
17578 rm -f $ac_file
17579 mv $tmp/config.h $ac_file
17580 fi
17581 else
17582 cat $tmp/config.h
17583 rm -f $tmp/config.h
17584 fi
17585done
17586_ACEOF
17587cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 17588
ba479fd2
NN
17589#
17590# CONFIG_COMMANDS section.
17591#
17592for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17593 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17594 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17595 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
17596$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
17597 X"$ac_dest" : 'X\(//\)[^/]' \| \
17598 X"$ac_dest" : 'X\(//\)$' \| \
17599 X"$ac_dest" : 'X\(/\)' \| \
17600 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
17601echo X"$ac_dest" |
17602 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17603 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17604 /^X\(\/\/\)$/{ s//\1/; q; }
17605 /^X\(\/\).*/{ s//\1/; q; }
17606 s/.*/./; q'`
86da66b5
HPN
17607 { if $as_mkdir_p; then
17608 mkdir -p "$ac_dir"
17609 else
17610 as_dir="$ac_dir"
17611 as_dirs=
17612 while test ! -d "$as_dir"; do
17613 as_dirs="$as_dir $as_dirs"
17614 as_dir=`(dirname "$as_dir") 2>/dev/null ||
17615$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17616 X"$as_dir" : 'X\(//\)[^/]' \| \
17617 X"$as_dir" : 'X\(//\)$' \| \
17618 X"$as_dir" : 'X\(/\)' \| \
17619 . : '\(.\)' 2>/dev/null ||
17620echo X"$as_dir" |
17621 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17622 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17623 /^X\(\/\/\)$/{ s//\1/; q; }
17624 /^X\(\/\).*/{ s//\1/; q; }
17625 s/.*/./; q'`
17626 done
17627 test ! -n "$as_dirs" || mkdir $as_dirs
17628 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17629echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17630 { (exit 1); exit 1; }; }; }
17631
ba479fd2
NN
17632 ac_builddir=.
17633
17634if test "$ac_dir" != .; then
17635 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17636 # A "../" for each directory in $ac_dir_suffix.
17637 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17638else
17639 ac_dir_suffix= ac_top_builddir=
17640fi
17641
17642case $srcdir in
17643 .) # No --srcdir option. We are building in place.
17644 ac_srcdir=.
17645 if test -z "$ac_top_builddir"; then
17646 ac_top_srcdir=.
17647 else
17648 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17649 fi ;;
17650 [\\/]* | ?:[\\/]* ) # Absolute path.
17651 ac_srcdir=$srcdir$ac_dir_suffix;
17652 ac_top_srcdir=$srcdir ;;
17653 *) # Relative path.
17654 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17655 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17656esac
8ab705be
KC
17657
17658# Do not use `cd foo && pwd` to compute absolute paths, because
17659# the directories may not exist.
17660case `pwd` in
17661.) ac_abs_builddir="$ac_dir";;
86da66b5 17662*)
8ab705be
KC
17663 case "$ac_dir" in
17664 .) ac_abs_builddir=`pwd`;;
17665 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17666 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
17667 esac;;
17668esac
8ab705be 17669case $ac_abs_builddir in
86da66b5
HPN
17670.) ac_abs_top_builddir=${ac_top_builddir}.;;
17671*)
17672 case ${ac_top_builddir}. in
8ab705be 17673 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 17674 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 17675 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
17676 esac;;
17677esac
8ab705be 17678case $ac_abs_builddir in
86da66b5
HPN
17679.) ac_abs_srcdir=$ac_srcdir;;
17680*)
17681 case $ac_srcdir in
8ab705be 17682 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 17683 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 17684 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
17685 esac;;
17686esac
8ab705be 17687case $ac_abs_builddir in
86da66b5
HPN
17688.) ac_abs_top_srcdir=$ac_top_srcdir;;
17689*)
17690 case $ac_top_srcdir in
8ab705be 17691 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 17692 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 17693 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
17694 esac;;
17695esac
ba479fd2
NN
17696
17697
17698 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
17699echo "$as_me: executing $ac_dest commands" >&6;}
17700 case $ac_dest in
17701 default )
f1faaabd
NN
17702case ${CONFIG_HEADERS} in
17703 *auto-host.h:config.in*)
17704 echo > cstamp-h ;;
861bb6c1 17705esac
2ed26f6b 17706# Make sure all the subdirs exist.
3b620440 17707for d in $subdirs doc build
2ed26f6b 17708do
2ed26f6b 17709 test -d $d || mkdir $d
2ed26f6b 17710done
93cf819d
BK
17711# If the host supports symlinks, point stage[1234] at ../stage[1234] so
17712# bootstrapping and the installation procedure can still use
17713# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
17714# FLAGS_TO_PASS has been modified to solve the problem there.
17715# This is virtually a duplicate of what happens in configure.lang; we do
17716# an extra check to make sure this only happens if ln -s can be used.
35f06ae4
PB
17717case "$LN_S" in
17718 *-s*)
17719 for d in ${subdirs} ; do
1e6347d8 17720 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 17721 cd $d
6a1b7268 17722 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
17723 do
17724 rm -f $t
35f06ae4 17725 $LN_S ../$t $t 2>/dev/null
4e8a434e
BK
17726 done
17727 cd $STARTDIR
35f06ae4
PB
17728 done
17729 ;;
17730esac
ba479fd2
NN
17731 ;;
17732 esac
17733done
17734_ACEOF
cafe096b 17735
ba479fd2
NN
17736cat >>$CONFIG_STATUS <<\_ACEOF
17737
17738{ (exit 0); exit 0; }
17739_ACEOF
861bb6c1 17740chmod +x $CONFIG_STATUS
ba479fd2
NN
17741ac_clean_files=$ac_clean_files_save
17742
17743
17744# configure is writing to config.log, and then calls config.status.
17745# config.status does its own redirection, appending to config.log.
17746# Unfortunately, on DOS this fails, as config.log is still kept open
17747# by configure, so config.status won't be able to write to it; its
17748# output is simply discarded. So we exec the FD to /dev/null,
17749# effectively closing config.log, so it can be properly (re)opened and
17750# appended to by config.status. When coming back to configure, we
17751# need to make the FD available again.
17752if test "$no_create" != yes; then
17753 ac_cs_success=:
17754 ac_config_status_args=
17755 test "$silent" = yes &&
17756 ac_config_status_args="$ac_config_status_args --quiet"
17757 exec 5>/dev/null
17758 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17759 exec 5>>config.log
17760 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17761 # would make configure fail if this is the last instruction.
17762 $ac_cs_success || { (exit 1); exit 1; }
17763fi
861bb6c1 17764
This page took 5.027218 seconds and 5 git commands to generate.