]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
re PR bootstrap/17383 (Building in src dir fails)
[thirdparty/gcc.git] / gcc / configure
CommitLineData
005537df 1#! /bin/sh
861bb6c1 2# Guess values for system-dependent variables and create Makefiles.
8ab705be 3# Generated by GNU Autoconf 2.59.
861bb6c1 4#
86da66b5 5# Copyright (C) 2003 Free Software Foundation, Inc.
861bb6c1
JL
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
ba479fd2
NN
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
11
12# Be Bourne compatible
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
21fi
86da66b5 22DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
23
24# Support unset when possible.
86da66b5 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
43do
86da66b5 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
48 fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54else
55 as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
66as_me=`$as_basename "$0" ||
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
76
77
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
96 rm -f conf$$.sh
97fi
98
99
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
116
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
137 /*)
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
166 N
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
210 fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
861bb6c1 217
ba479fd2
NN
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
86da66b5 221 test -d ./-p && rmdir ./-p
ba479fd2
NN
222 as_mkdir_p=false
223fi
224
225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
86da66b5 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
229
230# Sed expression to map a string onto a valid variable name.
86da66b5 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
241$as_unset CDPATH
242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
861bb6c1 254ac_default_prefix=/usr/local
ba479fd2
NN
255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
274ac_unique_file="tree.c"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
5395b47b 312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir gcc_version_trigger gcc_version_full gcc_version GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default set_gcc_lib_path 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.
e1bbfc5c
NS
870 Categories are: assert,fold,gc,gcac,misc,
871 rtlflag,rtl,tree,valgrind,release,yes,all;
74ee1642 872 --enable-mapped-location location_t is fileline integer cookie
ba479fd2 873 --enable-coverage=LEVEL
fb38008e 874 enable compiler's code coverage collection.
ba479fd2
NN
875 Use to measure compiler performance and locate
876 unused parts of the compiler. With LEVEL, specify
877 optimization. Values are opt, noopt,
878 default is noopt
879 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
880 --enable-multilib enable library support for multiple ABIs
881 --enable-__cxa_atexit enable __cxa_atexit for C++
882 --enable-threads enable thread usage for target GCC
883 --enable-threads=LIB use LIB thread package for target GCC
884 --enable-objc-gc enable the use of Boehm's garbage collector with
885 the GNU Objective-C runtime
886 --disable-shared don't provide a shared libgcc
887 --enable-intermodule build the compiler in one step
f3c9f174 888 --enable-languages=LIST specify which front-ends to build
dfb77e37 889 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
890 --enable-initfini-array use .init_array/.fini_array sections
891 --enable-sjlj-exceptions
892 arrange to use setjmp/longjmp exception handling
ba479fd2
NN
893 --disable-win32-registry
894 disable lookup of installation paths in the
895 Registry on Windows hosts
896 --enable-win32-registry enable registry lookup (default)
897 --enable-win32-registry=KEY
898 use KEY instead of GCC version as the last portion
899 of the registry key
900 --enable-maintainer-mode
901 enable make rules and dependencies not useful
902 (and sometimes confusing) to the casual installer
903 --enable-version-specific-runtime-libs
904 specify that runtime libraries should be
905 installed in a compiler-specific directory
093e61a6 906
ba479fd2
NN
907Optional Packages:
908 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
909 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
910 --with-local-prefix=DIR specifies directory to put local include
911 --with-gxx-include-dir=DIR
912 specifies directory to put g++ header files
913 --with-cpp-install-dir=DIR
914 install the user visible C preprocessor in DIR
915 (relative to PREFIX) as well as PREFIX/bin
916 --with-gnu-ld arrange to work with GNU ld.
917 --with-ld arrange to use the specified ld (full pathname)
d594623a 918 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
919 --with-gnu-as arrange to work with GNU as
920 --with-as arrange to use the specified as (full pathname)
921 --with-stabs arrange to use stabs instead of host debug format
922 --with-dwarf2 force the default debug format to be DWARF 2
923 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
dfb77e37
KC
924 --with-gnu-ld assume the C compiler uses GNU ld default=no
925 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
926 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 927 --with-system-libunwind use installed libunwind
59415997 928 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
929 with the compiler
930 --with-system-zlib use installed libz
931 --with-slibdir=DIR shared libraries in DIR LIBDIR
13c22933 932
ba479fd2
NN
933Some influential environment variables:
934 CC C compiler command
935 CFLAGS C compiler flags
936 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
937 nonstandard directory <lib dir>
938 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
939 headers in a nonstandard directory <include dir>
940 CPP C preprocessor
6de9cd9a
DN
941 GMPLIBS How to link GMP
942 GMPINC How to find GMP include files
13c22933 943
ba479fd2
NN
944Use these variables to override the choices made by `configure' or to help
945it to find libraries and programs with nonstandard names/locations.
73458fb7 946
ba479fd2
NN
947_ACEOF
948fi
6e3f3080 949
ba479fd2
NN
950if test "$ac_init_help" = "recursive"; then
951 # If there are subdirs, report their specific --help.
952 ac_popdir=`pwd`
953 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
954 test -d $ac_dir || continue
955 ac_builddir=.
956
957if test "$ac_dir" != .; then
958 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
959 # A "../" for each directory in $ac_dir_suffix.
960 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
961else
962 ac_dir_suffix= ac_top_builddir=
963fi
964
965case $srcdir in
966 .) # No --srcdir option. We are building in place.
967 ac_srcdir=.
968 if test -z "$ac_top_builddir"; then
969 ac_top_srcdir=.
970 else
971 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
972 fi ;;
973 [\\/]* | ?:[\\/]* ) # Absolute path.
974 ac_srcdir=$srcdir$ac_dir_suffix;
975 ac_top_srcdir=$srcdir ;;
976 *) # Relative path.
977 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
978 ac_top_srcdir=$ac_top_builddir$srcdir ;;
979esac
8ab705be
KC
980
981# Do not use `cd foo && pwd` to compute absolute paths, because
982# the directories may not exist.
983case `pwd` in
984.) ac_abs_builddir="$ac_dir";;
86da66b5 985*)
8ab705be
KC
986 case "$ac_dir" in
987 .) ac_abs_builddir=`pwd`;;
988 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
989 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
990 esac;;
991esac
8ab705be 992case $ac_abs_builddir in
86da66b5
HPN
993.) ac_abs_top_builddir=${ac_top_builddir}.;;
994*)
995 case ${ac_top_builddir}. in
8ab705be 996 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 997 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 998 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
999 esac;;
1000esac
8ab705be 1001case $ac_abs_builddir in
86da66b5
HPN
1002.) ac_abs_srcdir=$ac_srcdir;;
1003*)
1004 case $ac_srcdir in
8ab705be 1005 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 1006 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 1007 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
1008 esac;;
1009esac
8ab705be 1010case $ac_abs_builddir in
86da66b5
HPN
1011.) ac_abs_top_srcdir=$ac_top_srcdir;;
1012*)
1013 case $ac_top_srcdir in
8ab705be 1014 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 1015 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 1016 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
1017 esac;;
1018esac
ba479fd2
NN
1019
1020 cd $ac_dir
1021 # Check for guested configure; otherwise get Cygnus style configure.
1022 if test -f $ac_srcdir/configure.gnu; then
1023 echo
1024 $SHELL $ac_srcdir/configure.gnu --help=recursive
1025 elif test -f $ac_srcdir/configure; then
1026 echo
1027 $SHELL $ac_srcdir/configure --help=recursive
1028 elif test -f $ac_srcdir/configure.ac ||
86da66b5 1029 test -f $ac_srcdir/configure.in; then
ba479fd2
NN
1030 echo
1031 $ac_configure --help
1032 else
1033 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1034 fi
215c351a 1035 cd $ac_popdir
ba479fd2
NN
1036 done
1037fi
1038
1039test -n "$ac_init_help" && exit 0
1040if $ac_init_version; then
1041 cat <<\_ACEOF
1042
86da66b5 1043Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1044This configure script is free software; the Free Software Foundation
1045gives unlimited permission to copy, distribute and modify it.
1046_ACEOF
1047 exit 0
1048fi
1049exec 5>config.log
1050cat >&5 <<_ACEOF
1051This file contains any messages produced by compilers while
1052running configure, to aid debugging if configure makes a mistake.
1053
1054It was created by $as_me, which was
8ab705be 1055generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1056
1057 $ $0 $@
1058
1059_ACEOF
1060{
1061cat <<_ASUNAME
1062## --------- ##
1063## Platform. ##
1064## --------- ##
1065
1066hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1067uname -m = `(uname -m) 2>/dev/null || echo unknown`
1068uname -r = `(uname -r) 2>/dev/null || echo unknown`
1069uname -s = `(uname -s) 2>/dev/null || echo unknown`
1070uname -v = `(uname -v) 2>/dev/null || echo unknown`
1071
1072/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1073/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1074
1075/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1076/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1077/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1078hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1079/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1080/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1081/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1082
1083_ASUNAME
1084
1085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1086for as_dir in $PATH
1087do
1088 IFS=$as_save_IFS
1089 test -z "$as_dir" && as_dir=.
1090 echo "PATH: $as_dir"
1091done
1092
1093} >&5
1094
1095cat >&5 <<_ACEOF
1096
1097
1098## ----------- ##
1099## Core tests. ##
1100## ----------- ##
1101
1102_ACEOF
1103
1104
1105# Keep a trace of the command line.
1106# Strip out --no-create and --no-recursion so they do not pile up.
1107# Strip out --silent because we don't want to record it for future runs.
1108# Also quote any args containing shell meta-characters.
1109# Make two passes to allow for proper duplicate-argument suppression.
1110ac_configure_args=
1111ac_configure_args0=
1112ac_configure_args1=
1113ac_sep=
1114ac_must_keep_next=false
1115for ac_pass in 1 2
1116do
1117 for ac_arg
1118 do
1119 case $ac_arg in
1120 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1121 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1122 | -silent | --silent | --silen | --sile | --sil)
1123 continue ;;
1124 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1125 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1126 esac
1127 case $ac_pass in
1128 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1129 2)
1130 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1131 if test $ac_must_keep_next = true; then
86da66b5 1132 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1133 else
86da66b5
HPN
1134 case $ac_arg in
1135 *=* | --config-cache | -C | -disable-* | --disable-* \
1136 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1137 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1138 | -with-* | --with-* | -without-* | --without-* | --x)
1139 case "$ac_configure_args0 " in
1140 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1141 esac
1142 ;;
1143 -* ) ac_must_keep_next=true ;;
1144 esac
ba479fd2
NN
1145 fi
1146 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1147 # Get rid of the leading space.
1148 ac_sep=" "
1149 ;;
1150 esac
1151 done
1152done
1153$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1154$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1155
1156# When interrupted or exit'd, cleanup temporary files, and complete
1157# config.log. We remove comments because anyway the quotes in there
1158# would cause problems or look ugly.
1159# WARNING: Be sure not to use single quotes in there, as some shells,
1160# such as our DU 5.0 friend, will then `close' the trap.
1161trap 'exit_status=$?
1162 # Save into config.log some information that might help in debugging.
1163 {
1164 echo
1165
1166 cat <<\_ASBOX
1167## ---------------- ##
1168## Cache variables. ##
1169## ---------------- ##
1170_ASBOX
1171 echo
1172 # The following way of writing the cache mishandles newlines in values,
1173{
1174 (set) 2>&1 |
1175 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1176 *ac_space=\ *)
1177 sed -n \
86da66b5
HPN
1178 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1179 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
ba479fd2
NN
1180 ;;
1181 *)
1182 sed -n \
86da66b5 1183 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
1184 ;;
1185 esac;
1186}
1187 echo
1188
1189 cat <<\_ASBOX
1190## ----------------- ##
1191## Output variables. ##
1192## ----------------- ##
1193_ASBOX
1194 echo
1195 for ac_var in $ac_subst_vars
1196 do
1197 eval ac_val=$`echo $ac_var`
1198 echo "$ac_var='"'"'$ac_val'"'"'"
1199 done | sort
1200 echo
1201
1202 if test -n "$ac_subst_files"; then
1203 cat <<\_ASBOX
1204## ------------- ##
1205## Output files. ##
1206## ------------- ##
1207_ASBOX
1208 echo
1209 for ac_var in $ac_subst_files
1210 do
1211 eval ac_val=$`echo $ac_var`
86da66b5 1212 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1213 done | sort
1214 echo
1215 fi
1216
1217 if test -s confdefs.h; then
1218 cat <<\_ASBOX
1219## ----------- ##
1220## confdefs.h. ##
1221## ----------- ##
1222_ASBOX
1223 echo
1224 sed "/^$/d" confdefs.h | sort
1225 echo
1226 fi
1227 test "$ac_signal" != 0 &&
1228 echo "$as_me: caught signal $ac_signal"
1229 echo "$as_me: exit $exit_status"
1230 } >&5
86da66b5 1231 rm -f core *.core &&
ba479fd2
NN
1232 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1233 exit $exit_status
1234 ' 0
1235for ac_signal in 1 2 13 15; do
1236 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1237done
1238ac_signal=0
1239
1240# confdefs.h avoids OS command line length limits that DEFS can exceed.
1241rm -rf conftest* confdefs.h
1242# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1243echo >confdefs.h
1244
1245# Predefined preprocessor variables.
1246
1247cat >>confdefs.h <<_ACEOF
1248#define PACKAGE_NAME "$PACKAGE_NAME"
1249_ACEOF
1250
1251
1252cat >>confdefs.h <<_ACEOF
1253#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1254_ACEOF
1255
1256
1257cat >>confdefs.h <<_ACEOF
1258#define PACKAGE_VERSION "$PACKAGE_VERSION"
1259_ACEOF
1260
1261
1262cat >>confdefs.h <<_ACEOF
1263#define PACKAGE_STRING "$PACKAGE_STRING"
1264_ACEOF
1265
1266
1267cat >>confdefs.h <<_ACEOF
1268#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1269_ACEOF
1270
1271
1272# Let the site file select an alternate cache file if it wants to.
1273# Prefer explicitly selected file to automatically selected ones.
1274if test -z "$CONFIG_SITE"; then
1275 if test "x$prefix" != xNONE; then
1276 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1277 else
1278 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1279 fi
1280fi
1281for ac_site_file in $CONFIG_SITE; do
1282 if test -r "$ac_site_file"; then
1283 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1284echo "$as_me: loading site script $ac_site_file" >&6;}
1285 sed 's/^/| /' "$ac_site_file" >&5
1286 . "$ac_site_file"
1287 fi
1288done
1289
1290if test -r "$cache_file"; then
1291 # Some versions of bash will fail to source /dev/null (special
1292 # files actually), so we avoid doing that.
1293 if test -f "$cache_file"; then
1294 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1295echo "$as_me: loading cache $cache_file" >&6;}
1296 case $cache_file in
1297 [\\/]* | ?:[\\/]* ) . $cache_file;;
1298 *) . ./$cache_file;;
1299 esac
1300 fi
1301else
1302 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1303echo "$as_me: creating cache $cache_file" >&6;}
1304 >$cache_file
1305fi
1306
1307# Check that the precious variables saved in the cache have kept the same
1308# value.
1309ac_cache_corrupted=false
1310for ac_var in `(set) 2>&1 |
86da66b5 1311 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1312 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1313 eval ac_new_set=\$ac_env_${ac_var}_set
1314 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1315 eval ac_new_val="\$ac_env_${ac_var}_value"
1316 case $ac_old_set,$ac_new_set in
1317 set,)
1318 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1319echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1320 ac_cache_corrupted=: ;;
1321 ,set)
1322 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1323echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1324 ac_cache_corrupted=: ;;
1325 ,);;
1326 *)
1327 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1328 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1329echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1330 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1331echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1332 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1333echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1334 ac_cache_corrupted=:
ba479fd2
NN
1335 fi;;
1336 esac
1337 # Pass precious variables to config.status.
1338 if test "$ac_new_set" = set; then
1339 case $ac_new_val in
1340 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1341 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1342 *) ac_arg=$ac_var=$ac_new_val ;;
1343 esac
1344 case " $ac_configure_args " in
1345 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1346 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1347 esac
1348 fi
1349done
1350if $ac_cache_corrupted; then
1351 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1352echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1353 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1354echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1355 { (exit 1); exit 1; }; }
1356fi
1357
1358ac_ext=c
1359ac_cpp='$CPP $CPPFLAGS'
1360ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1361ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1362ac_compiler_gnu=$ac_cv_c_compiler_gnu
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
914c5af7 1382
ba479fd2
NN
1383 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1384
1385
06c37c96
NS
1386#Set to 1 on a release branch
1387is_release=
1388
ba479fd2
NN
1389# Determine the host, build, and target systems
1390ac_aux_dir=
1391for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1392 if test -f $ac_dir/install-sh; then
1393 ac_aux_dir=$ac_dir
1394 ac_install_sh="$ac_aux_dir/install-sh -c"
1395 break
1396 elif test -f $ac_dir/install.sh; then
1397 ac_aux_dir=$ac_dir
1398 ac_install_sh="$ac_aux_dir/install.sh -c"
1399 break
1400 elif test -f $ac_dir/shtool; then
1401 ac_aux_dir=$ac_dir
1402 ac_install_sh="$ac_aux_dir/shtool install -c"
1403 break
1404 fi
1405done
1406if test -z "$ac_aux_dir"; then
1407 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1408echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1409 { (exit 1); exit 1; }; }
1410fi
1411ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1412ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1413ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1414
1415# Make sure we can run config.sub.
1416$ac_config_sub sun4 >/dev/null 2>&1 ||
1417 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1418echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1419 { (exit 1); exit 1; }; }
1420
1421echo "$as_me:$LINENO: checking build system type" >&5
1422echo $ECHO_N "checking build system type... $ECHO_C" >&6
1423if test "${ac_cv_build+set}" = set; then
1424 echo $ECHO_N "(cached) $ECHO_C" >&6
1425else
1426 ac_cv_build_alias=$build_alias
1427test -z "$ac_cv_build_alias" &&
1428 ac_cv_build_alias=`$ac_config_guess`
1429test -z "$ac_cv_build_alias" &&
1430 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1431echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1432 { (exit 1); exit 1; }; }
1433ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1434 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1435echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1436 { (exit 1); exit 1; }; }
1437
1438fi
1439echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1440echo "${ECHO_T}$ac_cv_build" >&6
1441build=$ac_cv_build
1442build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1443build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1444build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1445
1446
1447echo "$as_me:$LINENO: checking host system type" >&5
1448echo $ECHO_N "checking host system type... $ECHO_C" >&6
1449if test "${ac_cv_host+set}" = set; then
1450 echo $ECHO_N "(cached) $ECHO_C" >&6
1451else
1452 ac_cv_host_alias=$host_alias
1453test -z "$ac_cv_host_alias" &&
1454 ac_cv_host_alias=$ac_cv_build_alias
1455ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1456 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1457echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1458 { (exit 1); exit 1; }; }
1459
1460fi
1461echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1462echo "${ECHO_T}$ac_cv_host" >&6
1463host=$ac_cv_host
1464host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1465host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1466host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1467
1468
1469echo "$as_me:$LINENO: checking target system type" >&5
1470echo $ECHO_N "checking target system type... $ECHO_C" >&6
1471if test "${ac_cv_target+set}" = set; then
1472 echo $ECHO_N "(cached) $ECHO_C" >&6
1473else
1474 ac_cv_target_alias=$target_alias
1475test "x$ac_cv_target_alias" = "x" &&
1476 ac_cv_target_alias=$ac_cv_host_alias
1477ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1478 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1479echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1480 { (exit 1); exit 1; }; }
1481
1482fi
1483echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1484echo "${ECHO_T}$ac_cv_target" >&6
1485target=$ac_cv_target
1486target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1487target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1488target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1489
1490
1491# The aliases save the names the user supplied, while $host etc.
1492# will get canonicalized.
1493test -n "$target_alias" &&
1494 test "$program_prefix$program_suffix$program_transform_name" = \
1495 NONENONEs,x,x, &&
1496 program_prefix=${target_alias}-
1497
1498# Determine the noncanonical target name, for directory use.
1499 case ${build_alias} in
1500 "") build_noncanonical=${build} ;;
6e3f3080
NN
1501 *) build_noncanonical=${build_alias} ;;
1502esac
73458fb7 1503
4665e56c
NN
1504 case ${host_alias} in
1505 "") host_noncanonical=${build_noncanonical} ;;
1506 *) host_noncanonical=${host_alias} ;;
1507esac
73458fb7 1508
4665e56c
NN
1509 case ${target_alias} in
1510 "") target_noncanonical=${host_noncanonical} ;;
1511 *) target_noncanonical=${target_alias} ;;
1512esac
093e61a6 1513
8f1529e6
L
1514
1515
1516
1517# Determine the target- and build-specific subdirectories
4665e56c
NN
1518 # Prefix 'build-' so this never conflicts with target_subdir.
1519build_subdir="build-${build_noncanonical}"
215c351a
PB
1520# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1521if ( test $srcdir = . && test -d gcc ) \
1522 || test -d $srcdir/../host-${host_noncanonical}; then
1523 host_subdir="host-${host_noncanonical}"
1524else
1525 host_subdir=.
1526fi
4665e56c
NN
1527# No prefix.
1528target_subdir=${target_noncanonical}
ba479fd2 1529
73458fb7 1530
093e61a6 1531# Set program_transform_name
13c22933 1532test "$program_prefix" != NONE &&
ba479fd2 1533 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1534# Use a double $ so make ignores it.
1535test "$program_suffix" != NONE &&
ba479fd2
NN
1536 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1537# Double any \ or $. echo might interpret backslashes.
1538# By default was `s,x,x', remove it if useless.
1539cat <<\_ACEOF >conftest.sed
1540s/[\\$]/&&/g;s/;s,x,x,$//
1541_ACEOF
1542program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1543rm conftest.sed
13c22933
JJ
1544
1545
34a86c2b
NN
1546# Check for bogus environment variables.
1547# Test if LIBRARY_PATH contains the notation for the current directory
1548# since this would lead to problems installing/building glibc.
1549# LIBRARY_PATH contains the current directory if one of the following
1550# is true:
1551# - one of the terminals (":" and ";") is the first or last sign
1552# - two terminals occur directly after each other
1553# - the path contains an element with a dot in it
ba479fd2
NN
1554echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1555echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1556case ${LIBRARY_PATH} in
1557 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1558 library_path_setting="contains current directory"
1559 ;;
1560 *)
1561 library_path_setting="ok"
1562 ;;
1563esac
ba479fd2
NN
1564echo "$as_me:$LINENO: result: $library_path_setting" >&5
1565echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1566if test "$library_path_setting" != "ok"; then
ba479fd2 1567{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1568*** LIBRARY_PATH shouldn't contain the current directory when
1569*** building gcc. Please change the environment variable
ba479fd2
NN
1570*** and run configure again." >&5
1571echo "$as_me: error:
1572*** LIBRARY_PATH shouldn't contain the current directory when
1573*** building gcc. Please change the environment variable
1574*** and run configure again." >&2;}
1575 { (exit 1); exit 1; }; }
e9a25f70
JL
1576fi
1577
34a86c2b
NN
1578# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1579# since this would lead to problems installing/building glibc.
1580# GCC_EXEC_PREFIX contains the current directory if one of the following
1581# is true:
1582# - one of the terminals (":" and ";") is the first or last sign
1583# - two terminals occur directly after each other
1584# - the path contains an element with a dot in it
ba479fd2
NN
1585echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1586echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1587case ${GCC_EXEC_PREFIX} in
1588 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1589 gcc_exec_prefix_setting="contains current directory"
1590 ;;
1591 *)
1592 gcc_exec_prefix_setting="ok"
1593 ;;
1594esac
ba479fd2
NN
1595echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1596echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1597if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1598{ { echo "$as_me:$LINENO: error:
1599*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1600*** building gcc. Please change the environment variable
1601*** and run configure again." >&5
1602echo "$as_me: error:
cafe096b
EC
1603*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1604*** building gcc. Please change the environment variable
ba479fd2
NN
1605*** and run configure again." >&2;}
1606 { (exit 1); exit 1; }; }
34a86c2b
NN
1607fi
1608
4982adbe
RS
1609
1610if test "${with_gcc_version_trigger+set}" = set; then
1611 gcc_version_trigger=$with_gcc_version_trigger
1612else
1613 gcc_version_trigger=$srcdir/../gcc/version.c
1614fi
1615if test -f "${gcc_version_trigger}"; then
1616 gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'`
1617else
1618 gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'`
1619fi
1620gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
1621
1622
1623
1624
1625
34a86c2b
NN
1626# -----------
1627# Directories
1628# -----------
1629
1630# Specify the local prefix
1631local_prefix=
ba479fd2 1632
34a86c2b
NN
1633# Check whether --with-local-prefix or --without-local-prefix was given.
1634if test "${with_local_prefix+set}" = set; then
1635 withval="$with_local_prefix"
1636 case "${withval}" in
ba479fd2
NN
1637yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1638echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1639 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1640no) ;;
1641*) local_prefix=$with_local_prefix ;;
1642esac
ba479fd2 1643fi;
34a86c2b
NN
1644
1645# Default local prefix if it is empty
1646if test x$local_prefix = x; then
1647 local_prefix=/usr/local
1648fi
1649
1650# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1651# passed in by the toplevel make and thus we'd get different behavior
1652# depending on where we built the sources.
1653gcc_gxx_include_dir=
1654# Specify the g++ header file directory
ba479fd2 1655
34a86c2b
NN
1656# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1657if test "${with_gxx_include_dir+set}" = set; then
1658 withval="$with_gxx_include_dir"
1659 case "${withval}" in
ba479fd2
NN
1660yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1661echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1662 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1663no) ;;
1664*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1665esac
ba479fd2 1666fi;
34a86c2b
NN
1667
1668if test x${gcc_gxx_include_dir} = x; then
1669 if test x${enable_version_specific_runtime_libs} = xyes; then
1670 gcc_gxx_include_dir='${libsubdir}/include/c++'
1671 else
4982adbe 1672 libstdcxx_incdir=c++/${gcc_version}
34a86c2b
NN
1673 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
1674 fi
1675fi
1676
ba479fd2 1677
34a86c2b
NN
1678# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1679if test "${with_cpp_install_dir+set}" = set; then
1680 withval="$with_cpp_install_dir"
1681 if test x$withval = xyes; then
ba479fd2
NN
1682 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1683echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1684 { (exit 1); exit 1; }; }
34a86c2b
NN
1685elif test x$withval != xno; then
1686 cpp_install_dir=$withval
1687fi
ba479fd2 1688fi;
34a86c2b 1689
51b9ff45 1690# We would like to our source tree to be readonly. However when releases or
ba479fd2 1691# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1692# various formats of manuals need to be included along with the rest of the
ba479fd2 1693# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1694# just that.
1695
03787dfd
KC
1696echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1697echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1698 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45
KC
1699if test "${enable_generated_files_in_srcdir+set}" = set; then
1700 enableval="$enable_generated_files_in_srcdir"
03787dfd 1701 generated_files_in_srcdir=$enableval
51b9ff45 1702else
03787dfd 1703 generated_files_in_srcdir=no
ba479fd2 1704fi;
51b9ff45 1705
03787dfd
KC
1706echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1707echo "${ECHO_T}$generated_files_in_srcdir" >&6
1708
1709if test "$generated_files_in_srcdir" = "yes"; then
1710 GENINSRC=''
03787dfd
KC
1711else
1712 GENINSRC='#'
03787dfd
KC
1713fi
1714
1715
34a86c2b
NN
1716# -------------------
1717# Find default linker
1718# -------------------
1719
1720# With GNU ld
ba479fd2 1721
34a86c2b
NN
1722# Check whether --with-gnu-ld or --without-gnu-ld was given.
1723if test "${with_gnu_ld+set}" = set; then
1724 withval="$with_gnu_ld"
1725 gnu_ld_flag="$with_gnu_ld"
1726else
1727 gnu_ld_flag=no
ba479fd2 1728fi;
6e3f3080 1729
63cf211a 1730# With pre-defined ld
ba479fd2 1731
34a86c2b
NN
1732# Check whether --with-ld or --without-ld was given.
1733if test "${with_ld+set}" = set; then
1734 withval="$with_ld"
1735 DEFAULT_LINKER="$with_ld"
ba479fd2 1736fi;
34a86c2b
NN
1737if test x"${DEFAULT_LINKER+set}" = x"set"; then
1738 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1739 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1740echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1741 { (exit 1); exit 1; }; }
34a86c2b
NN
1742 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1743 gnu_ld_flag=yes
1744 fi
ba479fd2
NN
1745
1746cat >>confdefs.h <<_ACEOF
34a86c2b 1747#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1748_ACEOF
34a86c2b
NN
1749
1750fi
1751
ba479fd2
NN
1752echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1753echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1754if test x"${DEFAULT_LINKER+set}" = x"set"; then
1755 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1756 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1757echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1758 else
ba479fd2
NN
1759 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1760echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1761 fi
1762else
ba479fd2
NN
1763 echo "$as_me:$LINENO: result: no" >&5
1764echo "${ECHO_T}no" >&6
34a86c2b
NN
1765fi
1766
d594623a
L
1767# With demangler in GNU ld
1768
1769# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
1770if test "${with_demangler_in_ld+set}" = set; then
1771 withval="$with_demangler_in_ld"
1772 demangler_in_ld="$with_demangler_in_ld"
1773else
1774 demangler_in_ld=no
1775fi;
1776
34a86c2b
NN
1777# ----------------------
1778# Find default assembler
1779# ----------------------
1780
1781# With GNU as
ba479fd2 1782
34a86c2b
NN
1783# Check whether --with-gnu-as or --without-gnu-as was given.
1784if test "${with_gnu_as+set}" = set; then
1785 withval="$with_gnu_as"
1786 gas_flag="$with_gnu_as"
1787else
1788 gas_flag=no
ba479fd2 1789fi;
34a86c2b
NN
1790
1791
1792# Check whether --with-as or --without-as was given.
1793if test "${with_as+set}" = set; then
1794 withval="$with_as"
1795 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1796fi;
34a86c2b
NN
1797if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1798 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1799 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1800echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1801 { (exit 1); exit 1; }; }
34a86c2b
NN
1802 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1803 gas_flag=yes
1804 fi
ba479fd2
NN
1805
1806cat >>confdefs.h <<_ACEOF
34a86c2b 1807#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1808_ACEOF
34a86c2b
NN
1809
1810fi
1811
ba479fd2
NN
1812echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1813echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1814if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1815 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1816 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1817echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1818 else
ba479fd2
NN
1819 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1820echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1821 fi
1822else
ba479fd2
NN
1823 echo "$as_me:$LINENO: result: no" >&5
1824echo "${ECHO_T}no" >&6
34a86c2b
NN
1825fi
1826
1827# ---------------
1828# Find C compiler
1829# ---------------
1830
426ca3ca
RO
1831# If a non-executable a.out is present (e.g. created by GNU as above even if
1832# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1833# file, even when creating an executable, so an execution test fails.
1834# Remove possible default executable files to avoid this.
1835#
1836# FIXME: This really belongs into AC_PROG_CC and can be removed once
1837# Autoconf includes it.
1838rm -f a.out a.exe b.out
1839
34a86c2b 1840# Find the native compiler
ba479fd2
NN
1841ac_ext=c
1842ac_cpp='$CPP $CPPFLAGS'
1843ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1844ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1845ac_compiler_gnu=$ac_cv_c_compiler_gnu
1846if test -n "$ac_tool_prefix"; then
1847 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1848set dummy ${ac_tool_prefix}gcc; ac_word=$2
1849echo "$as_me:$LINENO: checking for $ac_word" >&5
1850echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1851if test "${ac_cv_prog_CC+set}" = set; then
1852 echo $ECHO_N "(cached) $ECHO_C" >&6
1853else
1854 if test -n "$CC"; then
1855 ac_cv_prog_CC="$CC" # Let the user override the test.
1856else
1857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1858for as_dir in $PATH
1859do
1860 IFS=$as_save_IFS
1861 test -z "$as_dir" && as_dir=.
1862 for ac_exec_ext in '' $ac_executable_extensions; do
1863 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1864 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1865 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1866 break 2
1867 fi
1868done
1869done
1870
1871fi
1872fi
1873CC=$ac_cv_prog_CC
1874if test -n "$CC"; then
1875 echo "$as_me:$LINENO: result: $CC" >&5
1876echo "${ECHO_T}$CC" >&6
1877else
1878 echo "$as_me:$LINENO: result: no" >&5
1879echo "${ECHO_T}no" >&6
1880fi
1881
1882fi
1883if test -z "$ac_cv_prog_CC"; then
1884 ac_ct_CC=$CC
1885 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1886set dummy gcc; ac_word=$2
ba479fd2
NN
1887echo "$as_me:$LINENO: checking for $ac_word" >&5
1888echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1889if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1890 echo $ECHO_N "(cached) $ECHO_C" >&6
1891else
1892 if test -n "$ac_ct_CC"; then
1893 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1894else
1895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1896for as_dir in $PATH
1897do
1898 IFS=$as_save_IFS
1899 test -z "$as_dir" && as_dir=.
1900 for ac_exec_ext in '' $ac_executable_extensions; do
1901 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1902 ac_cv_prog_ac_ct_CC="gcc"
1903 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1904 break 2
1905 fi
1906done
1907done
1908
1909fi
1910fi
1911ac_ct_CC=$ac_cv_prog_ac_ct_CC
1912if test -n "$ac_ct_CC"; then
1913 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1914echo "${ECHO_T}$ac_ct_CC" >&6
1915else
1916 echo "$as_me:$LINENO: result: no" >&5
1917echo "${ECHO_T}no" >&6
1918fi
1919
1920 CC=$ac_ct_CC
1921else
1922 CC="$ac_cv_prog_CC"
1923fi
1924
1925if test -z "$CC"; then
1926 if test -n "$ac_tool_prefix"; then
1927 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1928set dummy ${ac_tool_prefix}cc; ac_word=$2
1929echo "$as_me:$LINENO: checking for $ac_word" >&5
1930echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1931if test "${ac_cv_prog_CC+set}" = set; then
1932 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1933else
1934 if test -n "$CC"; then
1935 ac_cv_prog_CC="$CC" # Let the user override the test.
1936else
ba479fd2
NN
1937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1938for as_dir in $PATH
1939do
1940 IFS=$as_save_IFS
1941 test -z "$as_dir" && as_dir=.
1942 for ac_exec_ext in '' $ac_executable_extensions; do
1943 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1944 ac_cv_prog_CC="${ac_tool_prefix}cc"
1945 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1946 break 2
1947 fi
1948done
1949done
1950
cd9e5e7c
MK
1951fi
1952fi
ba479fd2 1953CC=$ac_cv_prog_CC
cd9e5e7c 1954if test -n "$CC"; then
ba479fd2
NN
1955 echo "$as_me:$LINENO: result: $CC" >&5
1956echo "${ECHO_T}$CC" >&6
1957else
1958 echo "$as_me:$LINENO: result: no" >&5
1959echo "${ECHO_T}no" >&6
1960fi
1961
1962fi
1963if test -z "$ac_cv_prog_CC"; then
1964 ac_ct_CC=$CC
1965 # Extract the first word of "cc", so it can be a program name with args.
1966set dummy cc; ac_word=$2
1967echo "$as_me:$LINENO: checking for $ac_word" >&5
1968echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1969if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1970 echo $ECHO_N "(cached) $ECHO_C" >&6
1971else
1972 if test -n "$ac_ct_CC"; then
1973 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1974else
1975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1976for as_dir in $PATH
1977do
1978 IFS=$as_save_IFS
1979 test -z "$as_dir" && as_dir=.
1980 for ac_exec_ext in '' $ac_executable_extensions; do
1981 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1982 ac_cv_prog_ac_ct_CC="cc"
1983 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1984 break 2
1985 fi
1986done
1987done
1988
1989fi
1990fi
1991ac_ct_CC=$ac_cv_prog_ac_ct_CC
1992if test -n "$ac_ct_CC"; then
1993 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1994echo "${ECHO_T}$ac_ct_CC" >&6
1995else
1996 echo "$as_me:$LINENO: result: no" >&5
1997echo "${ECHO_T}no" >&6
1998fi
1999
2000 CC=$ac_ct_CC
cd9e5e7c 2001else
ba479fd2 2002 CC="$ac_cv_prog_CC"
e9a25f70 2003fi
6e3f3080 2004
ba479fd2 2005fi
6e3f3080
NN
2006if test -z "$CC"; then
2007 # Extract the first word of "cc", so it can be a program name with args.
2008set dummy cc; ac_word=$2
ba479fd2
NN
2009echo "$as_me:$LINENO: checking for $ac_word" >&5
2010echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2011if test "${ac_cv_prog_CC+set}" = set; then
2012 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2013else
2014 if test -n "$CC"; then
2015 ac_cv_prog_CC="$CC" # Let the user override the test.
2016else
2017 ac_prog_rejected=no
ba479fd2
NN
2018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2019for as_dir in $PATH
2020do
2021 IFS=$as_save_IFS
2022 test -z "$as_dir" && as_dir=.
2023 for ac_exec_ext in '' $ac_executable_extensions; do
2024 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2025 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2026 ac_prog_rejected=yes
2027 continue
2028 fi
2029 ac_cv_prog_CC="cc"
2030 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2031 break 2
2032 fi
2033done
2034done
2035
6e3f3080
NN
2036if test $ac_prog_rejected = yes; then
2037 # We found a bogon in the path, so make sure we never use it.
2038 set dummy $ac_cv_prog_CC
2039 shift
ba479fd2 2040 if test $# != 0; then
6e3f3080
NN
2041 # We chose a different compiler from the bogus one.
2042 # However, it has the same basename, so the bogon will be chosen
2043 # first if we set CC to just the basename; use the full file name.
2044 shift
ba479fd2 2045 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2046 fi
6e3f3080
NN
2047fi
2048fi
2049fi
ba479fd2 2050CC=$ac_cv_prog_CC
6e3f3080 2051if test -n "$CC"; then
ba479fd2
NN
2052 echo "$as_me:$LINENO: result: $CC" >&5
2053echo "${ECHO_T}$CC" >&6
e9a25f70 2054else
ba479fd2
NN
2055 echo "$as_me:$LINENO: result: no" >&5
2056echo "${ECHO_T}no" >&6
e9a25f70 2057fi
6e3f3080 2058
ba479fd2
NN
2059fi
2060if test -z "$CC"; then
2061 if test -n "$ac_tool_prefix"; then
2062 for ac_prog in cl
2063 do
2064 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2065set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2066echo "$as_me:$LINENO: checking for $ac_word" >&5
2067echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2068if test "${ac_cv_prog_CC+set}" = set; then
2069 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2070else
6e3f3080
NN
2071 if test -n "$CC"; then
2072 ac_cv_prog_CC="$CC" # Let the user override the test.
2073else
ba479fd2
NN
2074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2075for as_dir in $PATH
2076do
2077 IFS=$as_save_IFS
2078 test -z "$as_dir" && as_dir=.
2079 for ac_exec_ext in '' $ac_executable_extensions; do
2080 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2081 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2082 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2083 break 2
2084 fi
2085done
2086done
2087
093e61a6 2088fi
6e3f3080 2089fi
ba479fd2 2090CC=$ac_cv_prog_CC
6e3f3080 2091if test -n "$CC"; then
ba479fd2
NN
2092 echo "$as_me:$LINENO: result: $CC" >&5
2093echo "${ECHO_T}$CC" >&6
6e3f3080 2094else
ba479fd2
NN
2095 echo "$as_me:$LINENO: result: no" >&5
2096echo "${ECHO_T}no" >&6
093e61a6 2097fi
cafe096b 2098
ba479fd2
NN
2099 test -n "$CC" && break
2100 done
2101fi
2102if test -z "$CC"; then
2103 ac_ct_CC=$CC
2104 for ac_prog in cl
2105do
2106 # Extract the first word of "$ac_prog", so it can be a program name with args.
2107set dummy $ac_prog; ac_word=$2
2108echo "$as_me:$LINENO: checking for $ac_word" >&5
2109echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2110if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2111 echo $ECHO_N "(cached) $ECHO_C" >&6
2112else
2113 if test -n "$ac_ct_CC"; then
2114 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2115else
2116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2117for as_dir in $PATH
2118do
2119 IFS=$as_save_IFS
2120 test -z "$as_dir" && as_dir=.
2121 for ac_exec_ext in '' $ac_executable_extensions; do
2122 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2123 ac_cv_prog_ac_ct_CC="$ac_prog"
2124 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2125 break 2
2126 fi
2127done
2128done
6e3f3080 2129
ba479fd2
NN
2130fi
2131fi
2132ac_ct_CC=$ac_cv_prog_ac_ct_CC
2133if test -n "$ac_ct_CC"; then
2134 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2135echo "${ECHO_T}$ac_ct_CC" >&6
2136else
2137 echo "$as_me:$LINENO: result: no" >&5
2138echo "${ECHO_T}no" >&6
2139fi
6e3f3080 2140
ba479fd2
NN
2141 test -n "$ac_ct_CC" && break
2142done
63cf211a 2143
ba479fd2
NN
2144 CC=$ac_ct_CC
2145fi
2146
2147fi
2148
2149
2150test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2151See \`config.log' for more details." >&5
2152echo "$as_me: error: no acceptable C compiler found in \$PATH
2153See \`config.log' for more details." >&2;}
2154 { (exit 1); exit 1; }; }
2155
2156# Provide some information about the compiler.
2157echo "$as_me:$LINENO:" \
2158 "checking for C compiler version" >&5
2159ac_compiler=`set X $ac_compile; echo $2`
2160{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2161 (eval $ac_compiler --version </dev/null >&5) 2>&5
2162 ac_status=$?
2163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2164 (exit $ac_status); }
2165{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2166 (eval $ac_compiler -v </dev/null >&5) 2>&5
2167 ac_status=$?
2168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2169 (exit $ac_status); }
2170{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2171 (eval $ac_compiler -V </dev/null >&5) 2>&5
2172 ac_status=$?
2173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2174 (exit $ac_status); }
2175
2176cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2177/* confdefs.h. */
2178_ACEOF
2179cat confdefs.h >>conftest.$ac_ext
2180cat >>conftest.$ac_ext <<_ACEOF
2181/* end confdefs.h. */
2182
2183int
2184main ()
2185{
63cf211a 2186
ba479fd2
NN
2187 ;
2188 return 0;
2189}
2190_ACEOF
2191ac_clean_files_save=$ac_clean_files
2192ac_clean_files="$ac_clean_files a.out a.exe b.out"
2193# Try to create an executable without -o first, disregard a.out.
2194# It will help us diagnose broken compilers, and finding out an intuition
2195# of exeext.
86da66b5
HPN
2196echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2197echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2
NN
2198ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2199if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2200 (eval $ac_link_default) 2>&5
2201 ac_status=$?
2202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2203 (exit $ac_status); }; then
2204 # Find the output, starting from the most likely. This scheme is
2205# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2206# resort.
2207
2208# Be careful to initialize this variable, since it used to be cached.
2209# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2210ac_cv_exeext=
2211# b.out is created by i960 compilers.
2212for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2213do
2214 test -f "$ac_file" || continue
2215 case $ac_file in
2216 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
86da66b5 2217 ;;
ba479fd2 2218 conftest.$ac_ext )
86da66b5
HPN
2219 # This is the source file.
2220 ;;
ba479fd2 2221 [ab].out )
86da66b5
HPN
2222 # We found the default executable, but exeext='' is most
2223 # certainly right.
2224 break;;
ba479fd2 2225 *.* )
86da66b5
HPN
2226 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2227 # FIXME: I believe we export ac_cv_exeext for Libtool,
2228 # but it would be cool to find out if it's true. Does anybody
2229 # maintain Libtool? --akim.
2230 export ac_cv_exeext
2231 break;;
ba479fd2 2232 * )
86da66b5 2233 break;;
ba479fd2
NN
2234 esac
2235done
2236else
2237 echo "$as_me: failed program was:" >&5
2238sed 's/^/| /' conftest.$ac_ext >&5
2239
2240{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2241See \`config.log' for more details." >&5
2242echo "$as_me: error: C compiler cannot create executables
2243See \`config.log' for more details." >&2;}
2244 { (exit 77); exit 77; }; }
2245fi
2246
2247ac_exeext=$ac_cv_exeext
2248echo "$as_me:$LINENO: result: $ac_file" >&5
2249echo "${ECHO_T}$ac_file" >&6
2250
2251# Check the compiler produces executables we can run. If not, either
2252# the compiler is broken, or we cross compile.
2253echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2254echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2255# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2256# If not cross compiling, check that we can run a simple program.
2257if test "$cross_compiling" != yes; then
2258 if { ac_try='./$ac_file'
2259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2260 (eval $ac_try) 2>&5
2261 ac_status=$?
2262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2263 (exit $ac_status); }; }; then
2264 cross_compiling=no
6e3f3080 2265 else
ba479fd2
NN
2266 if test "$cross_compiling" = maybe; then
2267 cross_compiling=yes
2268 else
2269 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2270If you meant to cross compile, use \`--host'.
2271See \`config.log' for more details." >&5
2272echo "$as_me: error: cannot run C compiled programs.
2273If you meant to cross compile, use \`--host'.
2274See \`config.log' for more details." >&2;}
2275 { (exit 1); exit 1; }; }
2276 fi
6e3f3080
NN
2277 fi
2278fi
ba479fd2
NN
2279echo "$as_me:$LINENO: result: yes" >&5
2280echo "${ECHO_T}yes" >&6
2281
2282rm -f a.out a.exe conftest$ac_cv_exeext b.out
2283ac_clean_files=$ac_clean_files_save
2284# Check the compiler produces executables we can run. If not, either
2285# the compiler is broken, or we cross compile.
2286echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2287echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2288echo "$as_me:$LINENO: result: $cross_compiling" >&5
2289echo "${ECHO_T}$cross_compiling" >&6
2290
2291echo "$as_me:$LINENO: checking for suffix of executables" >&5
2292echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2293if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2294 (eval $ac_link) 2>&5
2295 ac_status=$?
2296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2297 (exit $ac_status); }; then
2298 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2299# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2300# work properly (i.e., refer to `conftest.exe'), while it won't with
2301# `rm'.
2302for ac_file in conftest.exe conftest conftest.*; do
2303 test -f "$ac_file" || continue
2304 case $ac_file in
2305 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2306 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
86da66b5
HPN
2307 export ac_cv_exeext
2308 break;;
ba479fd2
NN
2309 * ) break;;
2310 esac
2311done
e9a25f70 2312else
ba479fd2
NN
2313 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2314See \`config.log' for more details." >&5
2315echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2316See \`config.log' for more details." >&2;}
2317 { (exit 1); exit 1; }; }
2318fi
2319
2320rm -f conftest$ac_cv_exeext
2321echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2322echo "${ECHO_T}$ac_cv_exeext" >&6
2323
2324rm -f conftest.$ac_ext
2325EXEEXT=$ac_cv_exeext
2326ac_exeext=$EXEEXT
2327echo "$as_me:$LINENO: checking for suffix of object files" >&5
2328echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2329if test "${ac_cv_objext+set}" = set; then
2330 echo $ECHO_N "(cached) $ECHO_C" >&6
2331else
2332 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2333/* confdefs.h. */
2334_ACEOF
2335cat confdefs.h >>conftest.$ac_ext
2336cat >>conftest.$ac_ext <<_ACEOF
2337/* end confdefs.h. */
2338
2339int
2340main ()
2341{
6e3f3080 2342
ba479fd2
NN
2343 ;
2344 return 0;
2345}
2346_ACEOF
2347rm -f conftest.o conftest.obj
2348if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2349 (eval $ac_compile) 2>&5
2350 ac_status=$?
2351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2352 (exit $ac_status); }; then
2353 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2354 case $ac_file in
2355 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2356 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2357 break;;
2358 esac
2359done
63cf211a 2360else
ba479fd2
NN
2361 echo "$as_me: failed program was:" >&5
2362sed 's/^/| /' conftest.$ac_ext >&5
2363
2364{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2365See \`config.log' for more details." >&5
2366echo "$as_me: error: cannot compute suffix of object files: cannot compile
2367See \`config.log' for more details." >&2;}
2368 { (exit 1); exit 1; }; }
2369fi
2370
2371rm -f conftest.$ac_cv_objext conftest.$ac_ext
2372fi
2373echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2374echo "${ECHO_T}$ac_cv_objext" >&6
2375OBJEXT=$ac_cv_objext
2376ac_objext=$OBJEXT
2377echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2378echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2379if test "${ac_cv_c_compiler_gnu+set}" = set; then
2380 echo $ECHO_N "(cached) $ECHO_C" >&6
2381else
2382 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2383/* confdefs.h. */
2384_ACEOF
2385cat confdefs.h >>conftest.$ac_ext
2386cat >>conftest.$ac_ext <<_ACEOF
2387/* end confdefs.h. */
2388
2389int
2390main ()
2391{
2392#ifndef __GNUC__
2393 choke me
2394#endif
6e3f3080 2395
ba479fd2
NN
2396 ;
2397 return 0;
2398}
2399_ACEOF
2400rm -f conftest.$ac_objext
2401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2402 (eval $ac_compile) 2>conftest.er1
ba479fd2 2403 ac_status=$?
86da66b5
HPN
2404 grep -v '^ *+' conftest.er1 >conftest.err
2405 rm -f conftest.er1
2406 cat conftest.err >&5
ba479fd2
NN
2407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2408 (exit $ac_status); } &&
215c351a
PB
2409 { ac_try='test -z "$ac_c_werror_flag"
2410 || test ! -s conftest.err'
86da66b5
HPN
2411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2412 (eval $ac_try) 2>&5
2413 ac_status=$?
2414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2415 (exit $ac_status); }; } &&
2416 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
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); }; }; then
2422 ac_compiler_gnu=yes
2423else
2424 echo "$as_me: failed program was:" >&5
2425sed 's/^/| /' conftest.$ac_ext >&5
2426
2427ac_compiler_gnu=no
2428fi
86da66b5 2429rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2430ac_cv_c_compiler_gnu=$ac_compiler_gnu
2431
2432fi
2433echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2434echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2435GCC=`test $ac_compiler_gnu = yes && echo yes`
2436ac_test_CFLAGS=${CFLAGS+set}
2437ac_save_CFLAGS=$CFLAGS
2438CFLAGS="-g"
2439echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2440echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2441if test "${ac_cv_prog_cc_g+set}" = set; then
2442 echo $ECHO_N "(cached) $ECHO_C" >&6
2443else
2444 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2445/* confdefs.h. */
2446_ACEOF
2447cat confdefs.h >>conftest.$ac_ext
2448cat >>conftest.$ac_ext <<_ACEOF
2449/* end confdefs.h. */
2450
2451int
2452main ()
2453{
2454
2455 ;
2456 return 0;
2457}
2458_ACEOF
2459rm -f conftest.$ac_objext
2460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2461 (eval $ac_compile) 2>conftest.er1
ba479fd2 2462 ac_status=$?
86da66b5
HPN
2463 grep -v '^ *+' conftest.er1 >conftest.err
2464 rm -f conftest.er1
2465 cat conftest.err >&5
ba479fd2
NN
2466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2467 (exit $ac_status); } &&
215c351a
PB
2468 { ac_try='test -z "$ac_c_werror_flag"
2469 || test ! -s conftest.err'
86da66b5
HPN
2470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2471 (eval $ac_try) 2>&5
2472 ac_status=$?
2473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2474 (exit $ac_status); }; } &&
2475 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
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); }; }; then
6e3f3080
NN
2481 ac_cv_prog_cc_g=yes
2482else
ba479fd2
NN
2483 echo "$as_me: failed program was:" >&5
2484sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2485
ba479fd2 2486ac_cv_prog_cc_g=no
6e3f3080 2487fi
86da66b5 2488rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2489fi
2490echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2491echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2492if test "$ac_test_CFLAGS" = set; then
ba479fd2 2493 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2494elif test $ac_cv_prog_cc_g = yes; then
2495 if test "$GCC" = yes; then
e9a25f70
JL
2496 CFLAGS="-g -O2"
2497 else
cd9e5e7c 2498 CFLAGS="-g"
81814e35 2499 fi
3723cad9 2500else
cd9e5e7c
MK
2501 if test "$GCC" = yes; then
2502 CFLAGS="-O2"
2503 else
2504 CFLAGS=
2505 fi
e9a25f70 2506fi
ba479fd2
NN
2507echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2508echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2509if test "${ac_cv_prog_cc_stdc+set}" = set; then
2510 echo $ECHO_N "(cached) $ECHO_C" >&6
2511else
2512 ac_cv_prog_cc_stdc=no
2513ac_save_CC=$CC
2514cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2515/* confdefs.h. */
2516_ACEOF
2517cat confdefs.h >>conftest.$ac_ext
2518cat >>conftest.$ac_ext <<_ACEOF
2519/* end confdefs.h. */
2520#include <stdarg.h>
2521#include <stdio.h>
2522#include <sys/types.h>
2523#include <sys/stat.h>
2524/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2525struct buf { int x; };
2526FILE * (*rcsopen) (struct buf *, struct stat *, int);
2527static char *e (p, i)
2528 char **p;
2529 int i;
2530{
2531 return p[i];
2532}
2533static char *f (char * (*g) (char **, int), char **p, ...)
2534{
2535 char *s;
2536 va_list v;
2537 va_start (v,p);
2538 s = g (p, va_arg (v,int));
2539 va_end (v);
2540 return s;
2541}
86da66b5
HPN
2542
2543/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2544 function prototypes and stuff, but not '\xHH' hex character constants.
2545 These don't provoke an error unfortunately, instead are silently treated
2546 as 'x'. The following induces an error, until -std1 is added to get
2547 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2548 array size at least. It's necessary to write '\x00'==0 to get something
2549 that's true only with -std1. */
2550int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2551
ba479fd2
NN
2552int test (int i, double x);
2553struct s1 {int (*f) (int a);};
2554struct s2 {int (*f) (double a);};
2555int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2556int argc;
2557char **argv;
2558int
2559main ()
2560{
2561return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2562 ;
2563 return 0;
2564}
2565_ACEOF
2566# Don't try gcc -ansi; that turns off useful extensions and
2567# breaks some systems' header files.
2568# AIX -qlanglvl=ansi
2569# Ultrix and OSF/1 -std1
2570# HP-UX 10.20 and later -Ae
2571# HP-UX older versions -Aa -D_HPUX_SOURCE
2572# SVR4 -Xc -D__EXTENSIONS__
2573for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2574do
2575 CC="$ac_save_CC $ac_arg"
2576 rm -f conftest.$ac_objext
2577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2578 (eval $ac_compile) 2>conftest.er1
ba479fd2 2579 ac_status=$?
86da66b5
HPN
2580 grep -v '^ *+' conftest.er1 >conftest.err
2581 rm -f conftest.er1
2582 cat conftest.err >&5
ba479fd2
NN
2583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2584 (exit $ac_status); } &&
215c351a
PB
2585 { ac_try='test -z "$ac_c_werror_flag"
2586 || test ! -s conftest.err'
86da66b5
HPN
2587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2588 (eval $ac_try) 2>&5
2589 ac_status=$?
2590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2591 (exit $ac_status); }; } &&
2592 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
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); }; }; then
2598 ac_cv_prog_cc_stdc=$ac_arg
2599break
2600else
2601 echo "$as_me: failed program was:" >&5
2602sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2603
ba479fd2 2604fi
86da66b5 2605rm -f conftest.err conftest.$ac_objext
ba479fd2
NN
2606done
2607rm -f conftest.$ac_ext conftest.$ac_objext
2608CC=$ac_save_CC
2609
2610fi
2611
2612case "x$ac_cv_prog_cc_stdc" in
2613 x|xno)
2614 echo "$as_me:$LINENO: result: none needed" >&5
2615echo "${ECHO_T}none needed" >&6 ;;
2616 *)
2617 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2618echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2619 CC="$CC $ac_cv_prog_cc_stdc" ;;
2620esac
2621
2622# Some people use a C++ compiler to compile C. Since we use `exit',
2623# in C++ we need to declare it. In case someone uses the same compiler
2624# for both compiling C and C++ we need to have the C++ compiler decide
2625# the declaration of exit, since it's the most demanding environment.
2626cat >conftest.$ac_ext <<_ACEOF
2627#ifndef __cplusplus
2628 choke me
2629#endif
2630_ACEOF
2631rm -f conftest.$ac_objext
2632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2633 (eval $ac_compile) 2>conftest.er1
ba479fd2 2634 ac_status=$?
86da66b5
HPN
2635 grep -v '^ *+' conftest.er1 >conftest.err
2636 rm -f conftest.er1
2637 cat conftest.err >&5
ba479fd2
NN
2638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2639 (exit $ac_status); } &&
215c351a
PB
2640 { ac_try='test -z "$ac_c_werror_flag"
2641 || test ! -s conftest.err'
86da66b5
HPN
2642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2643 (eval $ac_try) 2>&5
2644 ac_status=$?
2645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2646 (exit $ac_status); }; } &&
2647 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
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); }; }; then
2653 for ac_declaration in \
86da66b5 2654 '' \
ba479fd2
NN
2655 'extern "C" void std::exit (int) throw (); using std::exit;' \
2656 'extern "C" void std::exit (int); using std::exit;' \
2657 'extern "C" void exit (int) throw ();' \
2658 'extern "C" void exit (int);' \
2659 'void exit (int);'
2660do
2661 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2662/* confdefs.h. */
2663_ACEOF
2664cat confdefs.h >>conftest.$ac_ext
2665cat >>conftest.$ac_ext <<_ACEOF
2666/* end confdefs.h. */
33e70558 2667$ac_declaration
86da66b5 2668#include <stdlib.h>
ba479fd2
NN
2669int
2670main ()
2671{
2672exit (42);
2673 ;
2674 return 0;
2675}
2676_ACEOF
2677rm -f conftest.$ac_objext
2678if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2679 (eval $ac_compile) 2>conftest.er1
ba479fd2 2680 ac_status=$?
86da66b5
HPN
2681 grep -v '^ *+' conftest.er1 >conftest.err
2682 rm -f conftest.er1
2683 cat conftest.err >&5
ba479fd2
NN
2684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2685 (exit $ac_status); } &&
215c351a
PB
2686 { ac_try='test -z "$ac_c_werror_flag"
2687 || test ! -s conftest.err'
86da66b5
HPN
2688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2689 (eval $ac_try) 2>&5
2690 ac_status=$?
2691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2692 (exit $ac_status); }; } &&
2693 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
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); }; }; then
2699 :
2700else
2701 echo "$as_me: failed program was:" >&5
2702sed 's/^/| /' conftest.$ac_ext >&5
2703
2704continue
2705fi
86da66b5 2706rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 2707 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2708/* confdefs.h. */
2709_ACEOF
2710cat confdefs.h >>conftest.$ac_ext
2711cat >>conftest.$ac_ext <<_ACEOF
2712/* end confdefs.h. */
2713$ac_declaration
2714int
2715main ()
2716{
2717exit (42);
2718 ;
2719 return 0;
2720}
2721_ACEOF
2722rm -f conftest.$ac_objext
2723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2724 (eval $ac_compile) 2>conftest.er1
ba479fd2 2725 ac_status=$?
86da66b5
HPN
2726 grep -v '^ *+' conftest.er1 >conftest.err
2727 rm -f conftest.er1
2728 cat conftest.err >&5
ba479fd2
NN
2729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2730 (exit $ac_status); } &&
215c351a
PB
2731 { ac_try='test -z "$ac_c_werror_flag"
2732 || test ! -s conftest.err'
86da66b5
HPN
2733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2734 (eval $ac_try) 2>&5
2735 ac_status=$?
2736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2737 (exit $ac_status); }; } &&
2738 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
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); }; }; then
2744 break
3ec83fc2 2745else
ba479fd2
NN
2746 echo "$as_me: failed program was:" >&5
2747sed 's/^/| /' conftest.$ac_ext >&5
2748
6e3f3080 2749fi
86da66b5 2750rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2751done
2752rm -f conftest*
2753if test -n "$ac_declaration"; then
2754 echo '#ifdef __cplusplus' >>confdefs.h
2755 echo $ac_declaration >>confdefs.h
2756 echo '#endif' >>confdefs.h
2757fi
2758
3ec83fc2 2759else
ba479fd2
NN
2760 echo "$as_me: failed program was:" >&5
2761sed 's/^/| /' conftest.$ac_ext >&5
2762
2763fi
86da66b5 2764rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2765ac_ext=c
2766ac_cpp='$CPP $CPPFLAGS'
2767ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2768ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2769ac_compiler_gnu=$ac_cv_c_compiler_gnu
2770
2771if test "x$CC" != xcc; then
2772 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2773echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2774else
2775 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2776echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2777fi
2778set dummy $CC; ac_cc=`echo $2 |
2779 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2780if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2781 echo $ECHO_N "(cached) $ECHO_C" >&6
2782else
2783 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2784/* confdefs.h. */
2785_ACEOF
2786cat confdefs.h >>conftest.$ac_ext
2787cat >>conftest.$ac_ext <<_ACEOF
2788/* end confdefs.h. */
2789
2790int
2791main ()
2792{
2793
2794 ;
2795 return 0;
2796}
2797_ACEOF
3ec83fc2
RH
2798# Make sure it works both with $CC and with simple cc.
2799# We do the test twice because some compilers refuse to overwrite an
2800# existing .o file with -o, though they will create one.
ba479fd2
NN
2801ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2802if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2803 (eval $ac_try) 2>&5
2804 ac_status=$?
2805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2806 (exit $ac_status); } &&
2807 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2808 (eval $ac_try) 2>&5
2809 ac_status=$?
2810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2811 (exit $ac_status); };
3ec83fc2
RH
2812then
2813 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2814 if test "x$CC" != xcc; then
2815 # Test first that cc exists at all.
ba479fd2
NN
2816 if { ac_try='cc -c conftest.$ac_ext >&5'
2817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2818 (eval $ac_try) 2>&5
2819 ac_status=$?
2820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2821 (exit $ac_status); }; }; then
2822 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2823 if { (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); } &&
2828 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2829 (eval $ac_try) 2>&5
2830 ac_status=$?
2831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2832 (exit $ac_status); };
3ec83fc2 2833 then
86da66b5
HPN
2834 # cc works too.
2835 :
3ec83fc2 2836 else
86da66b5
HPN
2837 # cc exists but doesn't like -o.
2838 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2839 fi
2840 fi
2841 fi
2842else
2843 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2844fi
2845rm -f conftest*
2846
2847fi
2848if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2849 echo "$as_me:$LINENO: result: yes" >&5
2850echo "${ECHO_T}yes" >&6
3ec83fc2 2851else
ba479fd2
NN
2852 echo "$as_me:$LINENO: result: no" >&5
2853echo "${ECHO_T}no" >&6
2854
2855cat >>confdefs.h <<\_ACEOF
3ec83fc2 2856#define NO_MINUS_C_MINUS_O 1
ba479fd2 2857_ACEOF
3ec83fc2
RH
2858
2859fi
2860
3b620440
KC
2861# expand $ac_aux_dir to an absolute path
2862am_aux_dir=`cd $ac_aux_dir && pwd`
2863
2864# FIXME: we rely on the cache variable name because
2865# there is no other way.
2866set dummy $CC
2867ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2868if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2869 # Losing compiler, so override with the script.
2870 # FIXME: It is wrong to rewrite CC.
2871 # But if we don't then we get into trouble of one sort or another.
2872 # A longer-term fix would be to have automake use am__CC in this case,
2873 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2874 CC="$am_aux_dir/compile $CC"
2875fi
2876
414d23ae
HPN
2877# autoconf is lame and doesn't give us any substitution variable for this.
2878if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2879 NO_MINUS_C_MINUS_O=yes
2880else
2881 OUTPUT_OPTION='-o $@'
2882fi
2883
2884
2885
73458fb7
NN
2886# -------------------------
2887# Check C compiler features
2888# -------------------------
2889
ba479fd2
NN
2890ac_ext=c
2891ac_cpp='$CPP $CPPFLAGS'
2892ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2893ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2894ac_compiler_gnu=$ac_cv_c_compiler_gnu
2895echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2896echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2897# On Suns, sometimes $CPP names a directory.
2898if test -n "$CPP" && test -d "$CPP"; then
2899 CPP=
2900fi
2901if test -z "$CPP"; then
ba479fd2
NN
2902 if test "${ac_cv_prog_CPP+set}" = set; then
2903 echo $ECHO_N "(cached) $ECHO_C" >&6
2904else
2905 # Double quotes because CPP needs to be expanded
2906 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2907 do
2908 ac_preproc_ok=false
2909for ac_c_preproc_warn_flag in '' yes
2910do
2911 # Use a header file that comes with gcc, so configuring glibc
2912 # with a fresh cross-compiler works.
2913 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2914 # <limits.h> exists even on freestanding compilers.
84c041a1 2915 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2916 # not just through cpp. "Syntax error" is here to catch this case.
2917 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2918/* confdefs.h. */
2919_ACEOF
2920cat confdefs.h >>conftest.$ac_ext
2921cat >>conftest.$ac_ext <<_ACEOF
2922/* end confdefs.h. */
2923#ifdef __STDC__
2924# include <limits.h>
2925#else
2926# include <assert.h>
2927#endif
86da66b5 2928 Syntax error
ba479fd2
NN
2929_ACEOF
2930if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2931 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2932 ac_status=$?
2933 grep -v '^ *+' conftest.er1 >conftest.err
2934 rm -f conftest.er1
2935 cat conftest.err >&5
2936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2937 (exit $ac_status); } >/dev/null; then
2938 if test -s conftest.err; then
2939 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2940 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2941 else
2942 ac_cpp_err=
2943 fi
2944else
2945 ac_cpp_err=yes
2946fi
2947if test -z "$ac_cpp_err"; then
093e61a6 2948 :
cafe096b 2949else
ba479fd2
NN
2950 echo "$as_me: failed program was:" >&5
2951sed 's/^/| /' conftest.$ac_ext >&5
2952
2953 # Broken: fails on valid input.
2954continue
2955fi
2956rm -f conftest.err conftest.$ac_ext
2957
2958 # OK, works on sane cases. Now check whether non-existent headers
2959 # can be detected and how.
2960 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2961/* confdefs.h. */
2962_ACEOF
2963cat confdefs.h >>conftest.$ac_ext
2964cat >>conftest.$ac_ext <<_ACEOF
2965/* end confdefs.h. */
2966#include <ac_nonexistent.h>
2967_ACEOF
2968if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2969 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2970 ac_status=$?
2971 grep -v '^ *+' conftest.er1 >conftest.err
2972 rm -f conftest.er1
2973 cat conftest.err >&5
2974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2975 (exit $ac_status); } >/dev/null; then
2976 if test -s conftest.err; then
2977 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2978 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2979 else
2980 ac_cpp_err=
2981 fi
2982else
2983 ac_cpp_err=yes
2984fi
2985if test -z "$ac_cpp_err"; then
2986 # Broken: success on invalid input.
2987continue
2988else
2989 echo "$as_me: failed program was:" >&5
2990sed 's/^/| /' conftest.$ac_ext >&5
2991
2992 # Passes both tests.
2993ac_preproc_ok=:
2994break
2995fi
2996rm -f conftest.err conftest.$ac_ext
2997
2998done
2999# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3000rm -f conftest.err conftest.$ac_ext
3001if $ac_preproc_ok; then
3002 break
3003fi
3004
3005 done
3006 ac_cv_prog_CPP=$CPP
3007
3008fi
3009 CPP=$ac_cv_prog_CPP
3010else
3011 ac_cv_prog_CPP=$CPP
3012fi
3013echo "$as_me:$LINENO: result: $CPP" >&5
3014echo "${ECHO_T}$CPP" >&6
3015ac_preproc_ok=false
3016for ac_c_preproc_warn_flag in '' yes
3017do
3018 # Use a header file that comes with gcc, so configuring glibc
3019 # with a fresh cross-compiler works.
3020 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3021 # <limits.h> exists even on freestanding compilers.
3022 # On the NeXT, cc -E runs the code through the compiler's parser,
3023 # not just through cpp. "Syntax error" is here to catch this case.
3024 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3025/* confdefs.h. */
3026_ACEOF
3027cat confdefs.h >>conftest.$ac_ext
3028cat >>conftest.$ac_ext <<_ACEOF
3029/* end confdefs.h. */
3030#ifdef __STDC__
3031# include <limits.h>
3032#else
3033# include <assert.h>
3034#endif
86da66b5 3035 Syntax error
ba479fd2
NN
3036_ACEOF
3037if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3038 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3039 ac_status=$?
3040 grep -v '^ *+' conftest.er1 >conftest.err
3041 rm -f conftest.er1
3042 cat conftest.err >&5
3043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3044 (exit $ac_status); } >/dev/null; then
3045 if test -s conftest.err; then
3046 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3047 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3048 else
3049 ac_cpp_err=
3050 fi
3051else
3052 ac_cpp_err=yes
3053fi
3054if test -z "$ac_cpp_err"; then
6e3f3080 3055 :
414d23ae 3056else
ba479fd2
NN
3057 echo "$as_me: failed program was:" >&5
3058sed 's/^/| /' conftest.$ac_ext >&5
3059
3060 # Broken: fails on valid input.
3061continue
3062fi
3063rm -f conftest.err conftest.$ac_ext
3064
3065 # OK, works on sane cases. Now check whether non-existent headers
3066 # can be detected and how.
3067 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3068/* confdefs.h. */
3069_ACEOF
3070cat confdefs.h >>conftest.$ac_ext
3071cat >>conftest.$ac_ext <<_ACEOF
3072/* end confdefs.h. */
3073#include <ac_nonexistent.h>
3074_ACEOF
3075if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3076 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3077 ac_status=$?
3078 grep -v '^ *+' conftest.er1 >conftest.err
3079 rm -f conftest.er1
3080 cat conftest.err >&5
3081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3082 (exit $ac_status); } >/dev/null; then
3083 if test -s conftest.err; then
3084 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3085 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3086 else
3087 ac_cpp_err=
3088 fi
6e3f3080 3089else
ba479fd2 3090 ac_cpp_err=yes
63cf211a 3091fi
ba479fd2
NN
3092if test -z "$ac_cpp_err"; then
3093 # Broken: success on invalid input.
3094continue
3095else
3096 echo "$as_me: failed program was:" >&5
3097sed 's/^/| /' conftest.$ac_ext >&5
3098
3099 # Passes both tests.
3100ac_preproc_ok=:
3101break
63cf211a 3102fi
ba479fd2
NN
3103rm -f conftest.err conftest.$ac_ext
3104
3105done
3106# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3107rm -f conftest.err conftest.$ac_ext
3108if $ac_preproc_ok; then
3109 :
6e3f3080 3110else
ba479fd2
NN
3111 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3112See \`config.log' for more details." >&5
3113echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3114See \`config.log' for more details." >&2;}
3115 { (exit 1); exit 1; }; }
6e3f3080
NN
3116fi
3117
ba479fd2
NN
3118ac_ext=c
3119ac_cpp='$CPP $CPPFLAGS'
3120ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3121ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3122ac_compiler_gnu=$ac_cv_c_compiler_gnu
3123
b5472e1d 3124
ba479fd2
NN
3125echo "$as_me:$LINENO: checking for inline" >&5
3126echo $ECHO_N "checking for inline... $ECHO_C" >&6
3127if test "${ac_cv_c_inline+set}" = set; then
3128 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3129else
3130 ac_cv_c_inline=no
3131for ac_kw in inline __inline__ __inline; do
ba479fd2 3132 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3133/* confdefs.h. */
3134_ACEOF
3135cat confdefs.h >>conftest.$ac_ext
3136cat >>conftest.$ac_ext <<_ACEOF
3137/* end confdefs.h. */
3138#ifndef __cplusplus
3139typedef int foo_t;
3140static $ac_kw foo_t static_foo () {return 0; }
3141$ac_kw foo_t foo () {return 0; }
3142#endif
414d23ae 3143
ba479fd2
NN
3144_ACEOF
3145rm -f conftest.$ac_objext
3146if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3147 (eval $ac_compile) 2>conftest.er1
ba479fd2 3148 ac_status=$?
86da66b5
HPN
3149 grep -v '^ *+' conftest.er1 >conftest.err
3150 rm -f conftest.er1
3151 cat conftest.err >&5
ba479fd2
NN
3152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3153 (exit $ac_status); } &&
215c351a
PB
3154 { ac_try='test -z "$ac_c_werror_flag"
3155 || test ! -s conftest.err'
86da66b5
HPN
3156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3157 (eval $ac_try) 2>&5
3158 ac_status=$?
3159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3160 (exit $ac_status); }; } &&
3161 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3163 (eval $ac_try) 2>&5
3164 ac_status=$?
3165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3166 (exit $ac_status); }; }; then
414d23ae
HPN
3167 ac_cv_c_inline=$ac_kw; break
3168else
ba479fd2
NN
3169 echo "$as_me: failed program was:" >&5
3170sed 's/^/| /' conftest.$ac_ext >&5
3171
414d23ae 3172fi
86da66b5 3173rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3174done
3175
3176fi
ba479fd2
NN
3177echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3178echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3179
3180
ba479fd2 3181case $ac_cv_c_inline in
414d23ae 3182 inline | yes) ;;
86da66b5
HPN
3183 *)
3184 case $ac_cv_c_inline in
3185 no) ac_val=;;
3186 *) ac_val=$ac_cv_c_inline;;
3187 esac
3188 cat >>confdefs.h <<_ACEOF
3189#ifndef __cplusplus
3190#define inline $ac_val
3191#endif
ba479fd2 3192_ACEOF
86da66b5 3193 ;;
414d23ae
HPN
3194esac
3195
414d23ae 3196
ba479fd2
NN
3197echo "$as_me:$LINENO: checking for long long int" >&5
3198echo $ECHO_N "checking for long long int... $ECHO_C" >&6
3199if test "${ac_cv_c_long_long+set}" = set; then
3200 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3201else
ba479fd2 3202 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3203/* confdefs.h. */
3204_ACEOF
3205cat confdefs.h >>conftest.$ac_ext
3206cat >>conftest.$ac_ext <<_ACEOF
3207/* end confdefs.h. */
414d23ae 3208
ba479fd2
NN
3209int
3210main ()
3211{
414d23ae 3212long long int i;
ba479fd2
NN
3213 ;
3214 return 0;
3215}
3216_ACEOF
3217rm -f conftest.$ac_objext
3218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3219 (eval $ac_compile) 2>conftest.er1
ba479fd2 3220 ac_status=$?
86da66b5
HPN
3221 grep -v '^ *+' conftest.er1 >conftest.err
3222 rm -f conftest.er1
3223 cat conftest.err >&5
ba479fd2
NN
3224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3225 (exit $ac_status); } &&
215c351a
PB
3226 { ac_try='test -z "$ac_c_werror_flag"
3227 || test ! -s conftest.err'
86da66b5
HPN
3228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3229 (eval $ac_try) 2>&5
3230 ac_status=$?
3231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3232 (exit $ac_status); }; } &&
3233 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3235 (eval $ac_try) 2>&5
3236 ac_status=$?
3237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3238 (exit $ac_status); }; }; then
414d23ae
HPN
3239 ac_cv_c_long_long=yes
3240else
ba479fd2
NN
3241 echo "$as_me: failed program was:" >&5
3242sed 's/^/| /' conftest.$ac_ext >&5
3243
3244ac_cv_c_long_long=no
414d23ae 3245fi
86da66b5 3246rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3247fi
ba479fd2
NN
3248echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5
3249echo "${ECHO_T}$ac_cv_c_long_long" >&6
63cf211a 3250 if test $ac_cv_c_long_long = yes; then
ba479fd2
NN
3251
3252cat >>confdefs.h <<\_ACEOF
414d23ae 3253#define HAVE_LONG_LONG 1
ba479fd2 3254_ACEOF
414d23ae
HPN
3255
3256 fi
ba479fd2
NN
3257echo "$as_me:$LINENO: checking for __int64" >&5
3258echo $ECHO_N "checking for __int64... $ECHO_C" >&6
3259if test "${ac_cv_c___int64+set}" = set; then
3260 echo $ECHO_N "(cached) $ECHO_C" >&6
3261else
3262 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3263/* confdefs.h. */
3264_ACEOF
3265cat confdefs.h >>conftest.$ac_ext
3266cat >>conftest.$ac_ext <<_ACEOF
3267/* end confdefs.h. */
3268
3269int
3270main ()
3271{
414d23ae 3272__int64 i;
ba479fd2
NN
3273 ;
3274 return 0;
3275}
3276_ACEOF
3277rm -f conftest.$ac_objext
3278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3279 (eval $ac_compile) 2>conftest.er1
ba479fd2 3280 ac_status=$?
86da66b5
HPN
3281 grep -v '^ *+' conftest.er1 >conftest.err
3282 rm -f conftest.er1
3283 cat conftest.err >&5
ba479fd2
NN
3284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3285 (exit $ac_status); } &&
215c351a
PB
3286 { ac_try='test -z "$ac_c_werror_flag"
3287 || test ! -s conftest.err'
86da66b5
HPN
3288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3289 (eval $ac_try) 2>&5
3290 ac_status=$?
3291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3292 (exit $ac_status); }; } &&
3293 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3295 (eval $ac_try) 2>&5
3296 ac_status=$?
3297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3298 (exit $ac_status); }; }; then
414d23ae
HPN
3299 ac_cv_c___int64=yes
3300else
ba479fd2
NN
3301 echo "$as_me: failed program was:" >&5
3302sed 's/^/| /' conftest.$ac_ext >&5
3303
3304ac_cv_c___int64=no
414d23ae 3305fi
86da66b5 3306rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3307fi
ba479fd2
NN
3308echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5
3309echo "${ECHO_T}$ac_cv_c___int64" >&6
63cf211a 3310 if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3311
3312cat >>confdefs.h <<\_ACEOF
414d23ae 3313#define HAVE___INT64 1
ba479fd2 3314_ACEOF
414d23ae
HPN
3315
3316 fi
3317
414d23ae
HPN
3318
3319# sizeof(char) is 1 by definition.
bf3b7cd3
JD
3320
3321echo "$as_me:$LINENO: checking for egrep" >&5
3322echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3323if test "${ac_cv_prog_egrep+set}" = set; then
3324 echo $ECHO_N "(cached) $ECHO_C" >&6
3325else
3326 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3327 then ac_cv_prog_egrep='grep -E'
3328 else ac_cv_prog_egrep='egrep'
3329 fi
3330fi
3331echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3332echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3333 EGREP=$ac_cv_prog_egrep
3334
3335
3336echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3337echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3338if test "${ac_cv_header_stdc+set}" = set; then
3339 echo $ECHO_N "(cached) $ECHO_C" >&6
3340else
3341 cat >conftest.$ac_ext <<_ACEOF
3342/* confdefs.h. */
3343_ACEOF
3344cat confdefs.h >>conftest.$ac_ext
3345cat >>conftest.$ac_ext <<_ACEOF
3346/* end confdefs.h. */
3347#include <stdlib.h>
3348#include <stdarg.h>
3349#include <string.h>
3350#include <float.h>
3351
3352int
3353main ()
3354{
3355
3356 ;
3357 return 0;
3358}
3359_ACEOF
3360rm -f conftest.$ac_objext
3361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3362 (eval $ac_compile) 2>conftest.er1
3363 ac_status=$?
3364 grep -v '^ *+' conftest.er1 >conftest.err
3365 rm -f conftest.er1
3366 cat conftest.err >&5
3367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3368 (exit $ac_status); } &&
215c351a
PB
3369 { ac_try='test -z "$ac_c_werror_flag"
3370 || test ! -s conftest.err'
bf3b7cd3
JD
3371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3372 (eval $ac_try) 2>&5
3373 ac_status=$?
3374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3375 (exit $ac_status); }; } &&
3376 { ac_try='test -s conftest.$ac_objext'
3377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3378 (eval $ac_try) 2>&5
3379 ac_status=$?
3380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3381 (exit $ac_status); }; }; then
3382 ac_cv_header_stdc=yes
3383else
3384 echo "$as_me: failed program was:" >&5
3385sed 's/^/| /' conftest.$ac_ext >&5
3386
3387ac_cv_header_stdc=no
3388fi
3389rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3390
3391if test $ac_cv_header_stdc = yes; then
3392 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3393 cat >conftest.$ac_ext <<_ACEOF
3394/* confdefs.h. */
3395_ACEOF
3396cat confdefs.h >>conftest.$ac_ext
3397cat >>conftest.$ac_ext <<_ACEOF
3398/* end confdefs.h. */
3399#include <string.h>
3400
3401_ACEOF
3402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3403 $EGREP "memchr" >/dev/null 2>&1; then
3404 :
3405else
3406 ac_cv_header_stdc=no
3407fi
3408rm -f conftest*
3409
3410fi
3411
3412if test $ac_cv_header_stdc = yes; then
3413 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3414 cat >conftest.$ac_ext <<_ACEOF
3415/* confdefs.h. */
3416_ACEOF
3417cat confdefs.h >>conftest.$ac_ext
3418cat >>conftest.$ac_ext <<_ACEOF
3419/* end confdefs.h. */
3420#include <stdlib.h>
3421
3422_ACEOF
3423if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3424 $EGREP "free" >/dev/null 2>&1; then
3425 :
3426else
3427 ac_cv_header_stdc=no
3428fi
3429rm -f conftest*
3430
3431fi
3432
3433if test $ac_cv_header_stdc = yes; then
3434 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3435 if test "$cross_compiling" = yes; then
3436 :
3437else
3438 cat >conftest.$ac_ext <<_ACEOF
3439/* confdefs.h. */
3440_ACEOF
3441cat confdefs.h >>conftest.$ac_ext
3442cat >>conftest.$ac_ext <<_ACEOF
3443/* end confdefs.h. */
3444#include <ctype.h>
3445#if ((' ' & 0x0FF) == 0x020)
3446# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3447# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3448#else
3449# define ISLOWER(c) \
3450 (('a' <= (c) && (c) <= 'i') \
3451 || ('j' <= (c) && (c) <= 'r') \
3452 || ('s' <= (c) && (c) <= 'z'))
3453# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3454#endif
3455
3456#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3457int
3458main ()
3459{
3460 int i;
3461 for (i = 0; i < 256; i++)
3462 if (XOR (islower (i), ISLOWER (i))
3463 || toupper (i) != TOUPPER (i))
3464 exit(2);
3465 exit (0);
3466}
3467_ACEOF
3468rm -f conftest$ac_exeext
3469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3470 (eval $ac_link) 2>&5
3471 ac_status=$?
3472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3473 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3475 (eval $ac_try) 2>&5
3476 ac_status=$?
3477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3478 (exit $ac_status); }; }; then
3479 :
3480else
3481 echo "$as_me: program exited with status $ac_status" >&5
3482echo "$as_me: failed program was:" >&5
3483sed 's/^/| /' conftest.$ac_ext >&5
3484
3485( exit $ac_status )
3486ac_cv_header_stdc=no
3487fi
3488rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3489fi
3490fi
3491fi
3492echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3493echo "${ECHO_T}$ac_cv_header_stdc" >&6
3494if test $ac_cv_header_stdc = yes; then
3495
3496cat >>confdefs.h <<\_ACEOF
3497#define STDC_HEADERS 1
3498_ACEOF
3499
3500fi
3501
3502# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3513 inttypes.h stdint.h unistd.h
3514do
3515as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3516echo "$as_me:$LINENO: checking for $ac_header" >&5
3517echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3518if eval "test \"\${$as_ac_Header+set}\" = set"; then
3519 echo $ECHO_N "(cached) $ECHO_C" >&6
3520else
3521 cat >conftest.$ac_ext <<_ACEOF
3522/* confdefs.h. */
3523_ACEOF
3524cat confdefs.h >>conftest.$ac_ext
3525cat >>conftest.$ac_ext <<_ACEOF
3526/* end confdefs.h. */
3527$ac_includes_default
3528
3529#include <$ac_header>
3530_ACEOF
3531rm -f conftest.$ac_objext
3532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3533 (eval $ac_compile) 2>conftest.er1
3534 ac_status=$?
3535 grep -v '^ *+' conftest.er1 >conftest.err
3536 rm -f conftest.er1
3537 cat conftest.err >&5
3538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3539 (exit $ac_status); } &&
215c351a
PB
3540 { ac_try='test -z "$ac_c_werror_flag"
3541 || test ! -s conftest.err'
bf3b7cd3
JD
3542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3543 (eval $ac_try) 2>&5
3544 ac_status=$?
3545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3546 (exit $ac_status); }; } &&
3547 { ac_try='test -s conftest.$ac_objext'
3548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3549 (eval $ac_try) 2>&5
3550 ac_status=$?
3551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3552 (exit $ac_status); }; }; then
3553 eval "$as_ac_Header=yes"
3554else
3555 echo "$as_me: failed program was:" >&5
3556sed 's/^/| /' conftest.$ac_ext >&5
3557
3558eval "$as_ac_Header=no"
3559fi
3560rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3561fi
3562echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3563echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3564if test `eval echo '${'$as_ac_Header'}'` = yes; then
3565 cat >>confdefs.h <<_ACEOF
3566#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3567_ACEOF
3568
3569fi
3570
3571done
3572
3573
3574echo "$as_me:$LINENO: checking for void *" >&5
3575echo $ECHO_N "checking for void *... $ECHO_C" >&6
3576if test "${ac_cv_type_void_p+set}" = set; then
3577 echo $ECHO_N "(cached) $ECHO_C" >&6
3578else
3579 cat >conftest.$ac_ext <<_ACEOF
3580/* confdefs.h. */
3581_ACEOF
3582cat confdefs.h >>conftest.$ac_ext
3583cat >>conftest.$ac_ext <<_ACEOF
3584/* end confdefs.h. */
3585$ac_includes_default
3586int
3587main ()
3588{
3589if ((void * *) 0)
3590 return 0;
3591if (sizeof (void *))
3592 return 0;
3593 ;
3594 return 0;
3595}
3596_ACEOF
3597rm -f conftest.$ac_objext
3598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3599 (eval $ac_compile) 2>conftest.er1
3600 ac_status=$?
3601 grep -v '^ *+' conftest.er1 >conftest.err
3602 rm -f conftest.er1
3603 cat conftest.err >&5
3604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3605 (exit $ac_status); } &&
215c351a
PB
3606 { ac_try='test -z "$ac_c_werror_flag"
3607 || test ! -s conftest.err'
bf3b7cd3
JD
3608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3609 (eval $ac_try) 2>&5
3610 ac_status=$?
3611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3612 (exit $ac_status); }; } &&
3613 { ac_try='test -s conftest.$ac_objext'
3614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3615 (eval $ac_try) 2>&5
3616 ac_status=$?
3617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3618 (exit $ac_status); }; }; then
3619 ac_cv_type_void_p=yes
3620else
3621 echo "$as_me: failed program was:" >&5
3622sed 's/^/| /' conftest.$ac_ext >&5
3623
3624ac_cv_type_void_p=no
3625fi
3626rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3627fi
3628echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3629echo "${ECHO_T}$ac_cv_type_void_p" >&6
3630
ba479fd2
NN
3631echo "$as_me:$LINENO: checking size of void *" >&5
3632echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3633if test "${ac_cv_sizeof_void_p+set}" = set; then
3634 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 3635else
bf3b7cd3
JD
3636 if test "$ac_cv_type_void_p" = yes; then
3637 # The cast to unsigned long works around a bug in the HP C Compiler
3638 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3639 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3640 # This bug is HP SR number 8606223364.
3641 if test "$cross_compiling" = yes; then
3642 # Depending upon the size, compute the lo and hi bounds.
3643cat >conftest.$ac_ext <<_ACEOF
3644/* confdefs.h. */
3645_ACEOF
3646cat confdefs.h >>conftest.$ac_ext
3647cat >>conftest.$ac_ext <<_ACEOF
3648/* end confdefs.h. */
3649$ac_includes_default
3650int
3651main ()
3652{
3653static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
3654test_array [0] = 0
3655
3656 ;
3657 return 0;
3658}
3659_ACEOF
3660rm -f conftest.$ac_objext
3661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3662 (eval $ac_compile) 2>conftest.er1
3663 ac_status=$?
3664 grep -v '^ *+' conftest.er1 >conftest.err
3665 rm -f conftest.er1
3666 cat conftest.err >&5
3667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3668 (exit $ac_status); } &&
215c351a
PB
3669 { ac_try='test -z "$ac_c_werror_flag"
3670 || test ! -s conftest.err'
bf3b7cd3
JD
3671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3672 (eval $ac_try) 2>&5
3673 ac_status=$?
3674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3675 (exit $ac_status); }; } &&
3676 { ac_try='test -s conftest.$ac_objext'
3677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3678 (eval $ac_try) 2>&5
3679 ac_status=$?
3680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3681 (exit $ac_status); }; }; then
3682 ac_lo=0 ac_mid=0
3683 while :; do
3684 cat >conftest.$ac_ext <<_ACEOF
3685/* confdefs.h. */
3686_ACEOF
3687cat confdefs.h >>conftest.$ac_ext
3688cat >>conftest.$ac_ext <<_ACEOF
3689/* end confdefs.h. */
3690$ac_includes_default
3691int
3692main ()
3693{
3694static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3695test_array [0] = 0
3696
3697 ;
3698 return 0;
3699}
3700_ACEOF
3701rm -f conftest.$ac_objext
3702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3703 (eval $ac_compile) 2>conftest.er1
3704 ac_status=$?
3705 grep -v '^ *+' conftest.er1 >conftest.err
3706 rm -f conftest.er1
3707 cat conftest.err >&5
3708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3709 (exit $ac_status); } &&
215c351a
PB
3710 { ac_try='test -z "$ac_c_werror_flag"
3711 || test ! -s conftest.err'
bf3b7cd3
JD
3712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3713 (eval $ac_try) 2>&5
3714 ac_status=$?
3715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3716 (exit $ac_status); }; } &&
3717 { ac_try='test -s conftest.$ac_objext'
3718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3719 (eval $ac_try) 2>&5
3720 ac_status=$?
3721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3722 (exit $ac_status); }; }; then
3723 ac_hi=$ac_mid; break
3724else
3725 echo "$as_me: failed program was:" >&5
3726sed 's/^/| /' conftest.$ac_ext >&5
3727
3728ac_lo=`expr $ac_mid + 1`
3729 if test $ac_lo -le $ac_mid; then
3730 ac_lo= ac_hi=
3731 break
3732 fi
3733 ac_mid=`expr 2 '*' $ac_mid + 1`
3734fi
3735rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3736 done
3737else
3738 echo "$as_me: failed program was:" >&5
3739sed 's/^/| /' conftest.$ac_ext >&5
3740
3741cat >conftest.$ac_ext <<_ACEOF
3742/* confdefs.h. */
3743_ACEOF
3744cat confdefs.h >>conftest.$ac_ext
3745cat >>conftest.$ac_ext <<_ACEOF
3746/* end confdefs.h. */
3747$ac_includes_default
3748int
3749main ()
3750{
3751static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
3752test_array [0] = 0
3753
3754 ;
3755 return 0;
3756}
3757_ACEOF
3758rm -f conftest.$ac_objext
3759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3760 (eval $ac_compile) 2>conftest.er1
3761 ac_status=$?
3762 grep -v '^ *+' conftest.er1 >conftest.err
3763 rm -f conftest.er1
3764 cat conftest.err >&5
3765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3766 (exit $ac_status); } &&
215c351a
PB
3767 { ac_try='test -z "$ac_c_werror_flag"
3768 || test ! -s conftest.err'
bf3b7cd3
JD
3769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3770 (eval $ac_try) 2>&5
3771 ac_status=$?
3772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3773 (exit $ac_status); }; } &&
3774 { ac_try='test -s conftest.$ac_objext'
3775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3776 (eval $ac_try) 2>&5
3777 ac_status=$?
3778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3779 (exit $ac_status); }; }; then
3780 ac_hi=-1 ac_mid=-1
3781 while :; do
3782 cat >conftest.$ac_ext <<_ACEOF
3783/* confdefs.h. */
3784_ACEOF
3785cat confdefs.h >>conftest.$ac_ext
3786cat >>conftest.$ac_ext <<_ACEOF
3787/* end confdefs.h. */
3788$ac_includes_default
3789int
3790main ()
3791{
3792static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
3793test_array [0] = 0
3794
3795 ;
3796 return 0;
3797}
3798_ACEOF
3799rm -f conftest.$ac_objext
3800if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3801 (eval $ac_compile) 2>conftest.er1
3802 ac_status=$?
3803 grep -v '^ *+' conftest.er1 >conftest.err
3804 rm -f conftest.er1
3805 cat conftest.err >&5
3806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3807 (exit $ac_status); } &&
215c351a
PB
3808 { ac_try='test -z "$ac_c_werror_flag"
3809 || test ! -s conftest.err'
bf3b7cd3
JD
3810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3811 (eval $ac_try) 2>&5
3812 ac_status=$?
3813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3814 (exit $ac_status); }; } &&
3815 { ac_try='test -s conftest.$ac_objext'
3816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3817 (eval $ac_try) 2>&5
3818 ac_status=$?
3819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3820 (exit $ac_status); }; }; then
3821 ac_lo=$ac_mid; break
3822else
3823 echo "$as_me: failed program was:" >&5
3824sed 's/^/| /' conftest.$ac_ext >&5
3825
3826ac_hi=`expr '(' $ac_mid ')' - 1`
3827 if test $ac_mid -le $ac_hi; then
3828 ac_lo= ac_hi=
3829 break
3830 fi
3831 ac_mid=`expr 2 '*' $ac_mid`
3832fi
3833rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3834 done
3835else
3836 echo "$as_me: failed program was:" >&5
3837sed 's/^/| /' conftest.$ac_ext >&5
3838
3839ac_lo= ac_hi=
3840fi
3841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3842fi
3843rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3844# Binary search between lo and hi bounds.
3845while test "x$ac_lo" != "x$ac_hi"; do
3846 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3847 cat >conftest.$ac_ext <<_ACEOF
3848/* confdefs.h. */
3849_ACEOF
3850cat confdefs.h >>conftest.$ac_ext
3851cat >>conftest.$ac_ext <<_ACEOF
3852/* end confdefs.h. */
3853$ac_includes_default
3854int
3855main ()
3856{
3857static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3858test_array [0] = 0
3859
3860 ;
3861 return 0;
3862}
3863_ACEOF
3864rm -f conftest.$ac_objext
3865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3866 (eval $ac_compile) 2>conftest.er1
3867 ac_status=$?
3868 grep -v '^ *+' conftest.er1 >conftest.err
3869 rm -f conftest.er1
3870 cat conftest.err >&5
3871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3872 (exit $ac_status); } &&
215c351a
PB
3873 { ac_try='test -z "$ac_c_werror_flag"
3874 || test ! -s conftest.err'
bf3b7cd3
JD
3875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3876 (eval $ac_try) 2>&5
3877 ac_status=$?
3878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3879 (exit $ac_status); }; } &&
3880 { ac_try='test -s conftest.$ac_objext'
3881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3882 (eval $ac_try) 2>&5
3883 ac_status=$?
3884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3885 (exit $ac_status); }; }; then
3886 ac_hi=$ac_mid
3887else
3888 echo "$as_me: failed program was:" >&5
3889sed 's/^/| /' conftest.$ac_ext >&5
3890
3891ac_lo=`expr '(' $ac_mid ')' + 1`
3892fi
3893rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3894done
3895case $ac_lo in
3896?*) ac_cv_sizeof_void_p=$ac_lo;;
3897'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3898See \`config.log' for more details." >&5
3899echo "$as_me: error: cannot compute sizeof (void *), 77
3900See \`config.log' for more details." >&2;}
3901 { (exit 1); exit 1; }; } ;;
3902esac
3903else
3904 if test "$cross_compiling" = yes; then
215c351a
PB
3905 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
3906See \`config.log' for more details." >&5
3907echo "$as_me: error: cannot run test program while cross compiling
3908See \`config.log' for more details." >&2;}
bf3b7cd3
JD
3909 { (exit 1); exit 1; }; }
3910else
3911 cat >conftest.$ac_ext <<_ACEOF
3912/* confdefs.h. */
3913_ACEOF
3914cat confdefs.h >>conftest.$ac_ext
3915cat >>conftest.$ac_ext <<_ACEOF
3916/* end confdefs.h. */
3917$ac_includes_default
3918long longval () { return (long) (sizeof (void *)); }
3919unsigned long ulongval () { return (long) (sizeof (void *)); }
3920#include <stdio.h>
3921#include <stdlib.h>
3922int
3923main ()
3924{
3925
3926 FILE *f = fopen ("conftest.val", "w");
3927 if (! f)
3928 exit (1);
3929 if (((long) (sizeof (void *))) < 0)
3930 {
3931 long i = longval ();
3932 if (i != ((long) (sizeof (void *))))
3933 exit (1);
3934 fprintf (f, "%ld\n", i);
3935 }
3936 else
3937 {
3938 unsigned long i = ulongval ();
3939 if (i != ((long) (sizeof (void *))))
3940 exit (1);
3941 fprintf (f, "%lu\n", i);
3942 }
3943 exit (ferror (f) || fclose (f) != 0);
3944
3945 ;
3946 return 0;
3947}
3948_ACEOF
3949rm -f conftest$ac_exeext
3950if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3951 (eval $ac_link) 2>&5
3952 ac_status=$?
3953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3954 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3956 (eval $ac_try) 2>&5
3957 ac_status=$?
3958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3959 (exit $ac_status); }; }; then
3960 ac_cv_sizeof_void_p=`cat conftest.val`
3961else
3962 echo "$as_me: program exited with status $ac_status" >&5
3963echo "$as_me: failed program was:" >&5
3964sed 's/^/| /' conftest.$ac_ext >&5
3965
3966( exit $ac_status )
3967{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3968See \`config.log' for more details." >&5
3969echo "$as_me: error: cannot compute sizeof (void *), 77
3970See \`config.log' for more details." >&2;}
3971 { (exit 1); exit 1; }; }
3972fi
3973rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3974fi
3975fi
3976rm -f conftest.val
3977else
3978 ac_cv_sizeof_void_p=0
3979fi
3980fi
3981echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3982echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3983cat >>confdefs.h <<_ACEOF
3984#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3985_ACEOF
3986
3987
3988echo "$as_me:$LINENO: checking for short" >&5
3989echo $ECHO_N "checking for short... $ECHO_C" >&6
3990if test "${ac_cv_type_short+set}" = set; then
3991 echo $ECHO_N "(cached) $ECHO_C" >&6
3992else
3993 cat >conftest.$ac_ext <<_ACEOF
3994/* confdefs.h. */
3995_ACEOF
3996cat confdefs.h >>conftest.$ac_ext
3997cat >>conftest.$ac_ext <<_ACEOF
3998/* end confdefs.h. */
3999$ac_includes_default
4000int
4001main ()
4002{
4003if ((short *) 0)
4004 return 0;
4005if (sizeof (short))
4006 return 0;
4007 ;
4008 return 0;
4009}
4010_ACEOF
4011rm -f conftest.$ac_objext
4012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4013 (eval $ac_compile) 2>conftest.er1
4014 ac_status=$?
4015 grep -v '^ *+' conftest.er1 >conftest.err
4016 rm -f conftest.er1
4017 cat conftest.err >&5
4018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4019 (exit $ac_status); } &&
215c351a
PB
4020 { ac_try='test -z "$ac_c_werror_flag"
4021 || test ! -s conftest.err'
bf3b7cd3
JD
4022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4023 (eval $ac_try) 2>&5
4024 ac_status=$?
4025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4026 (exit $ac_status); }; } &&
4027 { ac_try='test -s conftest.$ac_objext'
4028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4029 (eval $ac_try) 2>&5
4030 ac_status=$?
4031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4032 (exit $ac_status); }; }; then
4033 ac_cv_type_short=yes
4034else
4035 echo "$as_me: failed program was:" >&5
4036sed 's/^/| /' conftest.$ac_ext >&5
4037
4038ac_cv_type_short=no
4039fi
4040rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4041fi
4042echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
4043echo "${ECHO_T}$ac_cv_type_short" >&6
4044
4045echo "$as_me:$LINENO: checking size of short" >&5
4046echo $ECHO_N "checking size of short... $ECHO_C" >&6
4047if test "${ac_cv_sizeof_short+set}" = set; then
4048 echo $ECHO_N "(cached) $ECHO_C" >&6
4049else
4050 if test "$ac_cv_type_short" = yes; then
4051 # The cast to unsigned long works around a bug in the HP C Compiler
4052 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4053 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4054 # This bug is HP SR number 8606223364.
4055 if test "$cross_compiling" = yes; then
4056 # Depending upon the size, compute the lo and hi bounds.
4057cat >conftest.$ac_ext <<_ACEOF
4058/* confdefs.h. */
4059_ACEOF
4060cat confdefs.h >>conftest.$ac_ext
4061cat >>conftest.$ac_ext <<_ACEOF
4062/* end confdefs.h. */
4063$ac_includes_default
4064int
4065main ()
4066{
4067static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
4068test_array [0] = 0
4069
4070 ;
4071 return 0;
4072}
4073_ACEOF
4074rm -f conftest.$ac_objext
4075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4076 (eval $ac_compile) 2>conftest.er1
4077 ac_status=$?
4078 grep -v '^ *+' conftest.er1 >conftest.err
4079 rm -f conftest.er1
4080 cat conftest.err >&5
4081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4082 (exit $ac_status); } &&
215c351a
PB
4083 { ac_try='test -z "$ac_c_werror_flag"
4084 || test ! -s conftest.err'
bf3b7cd3
JD
4085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4086 (eval $ac_try) 2>&5
4087 ac_status=$?
4088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4089 (exit $ac_status); }; } &&
4090 { ac_try='test -s conftest.$ac_objext'
4091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4092 (eval $ac_try) 2>&5
4093 ac_status=$?
4094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4095 (exit $ac_status); }; }; then
4096 ac_lo=0 ac_mid=0
4097 while :; do
4098 cat >conftest.$ac_ext <<_ACEOF
4099/* confdefs.h. */
4100_ACEOF
4101cat confdefs.h >>conftest.$ac_ext
4102cat >>conftest.$ac_ext <<_ACEOF
4103/* end confdefs.h. */
4104$ac_includes_default
4105int
4106main ()
4107{
4108static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4109test_array [0] = 0
4110
4111 ;
4112 return 0;
4113}
4114_ACEOF
4115rm -f conftest.$ac_objext
4116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4117 (eval $ac_compile) 2>conftest.er1
4118 ac_status=$?
4119 grep -v '^ *+' conftest.er1 >conftest.err
4120 rm -f conftest.er1
4121 cat conftest.err >&5
4122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4123 (exit $ac_status); } &&
215c351a
PB
4124 { ac_try='test -z "$ac_c_werror_flag"
4125 || test ! -s conftest.err'
bf3b7cd3
JD
4126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4127 (eval $ac_try) 2>&5
4128 ac_status=$?
4129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4130 (exit $ac_status); }; } &&
4131 { ac_try='test -s conftest.$ac_objext'
4132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4133 (eval $ac_try) 2>&5
4134 ac_status=$?
4135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4136 (exit $ac_status); }; }; then
4137 ac_hi=$ac_mid; break
4138else
4139 echo "$as_me: failed program was:" >&5
4140sed 's/^/| /' conftest.$ac_ext >&5
4141
4142ac_lo=`expr $ac_mid + 1`
4143 if test $ac_lo -le $ac_mid; then
4144 ac_lo= ac_hi=
4145 break
4146 fi
4147 ac_mid=`expr 2 '*' $ac_mid + 1`
4148fi
4149rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4150 done
4151else
4152 echo "$as_me: failed program was:" >&5
4153sed 's/^/| /' conftest.$ac_ext >&5
4154
4155cat >conftest.$ac_ext <<_ACEOF
4156/* confdefs.h. */
4157_ACEOF
4158cat confdefs.h >>conftest.$ac_ext
4159cat >>conftest.$ac_ext <<_ACEOF
4160/* end confdefs.h. */
4161$ac_includes_default
4162int
4163main ()
4164{
4165static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
4166test_array [0] = 0
4167
4168 ;
4169 return 0;
4170}
4171_ACEOF
4172rm -f conftest.$ac_objext
4173if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4174 (eval $ac_compile) 2>conftest.er1
4175 ac_status=$?
4176 grep -v '^ *+' conftest.er1 >conftest.err
4177 rm -f conftest.er1
4178 cat conftest.err >&5
4179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4180 (exit $ac_status); } &&
215c351a
PB
4181 { ac_try='test -z "$ac_c_werror_flag"
4182 || test ! -s conftest.err'
bf3b7cd3
JD
4183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4184 (eval $ac_try) 2>&5
4185 ac_status=$?
4186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4187 (exit $ac_status); }; } &&
4188 { ac_try='test -s conftest.$ac_objext'
4189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4190 (eval $ac_try) 2>&5
4191 ac_status=$?
4192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4193 (exit $ac_status); }; }; then
4194 ac_hi=-1 ac_mid=-1
4195 while :; do
4196 cat >conftest.$ac_ext <<_ACEOF
4197/* confdefs.h. */
4198_ACEOF
4199cat confdefs.h >>conftest.$ac_ext
4200cat >>conftest.$ac_ext <<_ACEOF
4201/* end confdefs.h. */
4202$ac_includes_default
4203int
4204main ()
4205{
4206static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
4207test_array [0] = 0
4208
4209 ;
4210 return 0;
4211}
4212_ACEOF
4213rm -f conftest.$ac_objext
4214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4215 (eval $ac_compile) 2>conftest.er1
4216 ac_status=$?
4217 grep -v '^ *+' conftest.er1 >conftest.err
4218 rm -f conftest.er1
4219 cat conftest.err >&5
4220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4221 (exit $ac_status); } &&
215c351a
PB
4222 { ac_try='test -z "$ac_c_werror_flag"
4223 || test ! -s conftest.err'
bf3b7cd3
JD
4224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4225 (eval $ac_try) 2>&5
4226 ac_status=$?
4227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4228 (exit $ac_status); }; } &&
4229 { ac_try='test -s conftest.$ac_objext'
4230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4231 (eval $ac_try) 2>&5
4232 ac_status=$?
4233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4234 (exit $ac_status); }; }; then
4235 ac_lo=$ac_mid; break
4236else
4237 echo "$as_me: failed program was:" >&5
4238sed 's/^/| /' conftest.$ac_ext >&5
4239
4240ac_hi=`expr '(' $ac_mid ')' - 1`
4241 if test $ac_mid -le $ac_hi; then
4242 ac_lo= ac_hi=
4243 break
4244 fi
4245 ac_mid=`expr 2 '*' $ac_mid`
4246fi
4247rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4248 done
4249else
4250 echo "$as_me: failed program was:" >&5
4251sed 's/^/| /' conftest.$ac_ext >&5
4252
4253ac_lo= ac_hi=
4254fi
4255rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4256fi
4257rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4258# Binary search between lo and hi bounds.
4259while test "x$ac_lo" != "x$ac_hi"; do
4260 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4261 cat >conftest.$ac_ext <<_ACEOF
4262/* confdefs.h. */
4263_ACEOF
4264cat confdefs.h >>conftest.$ac_ext
4265cat >>conftest.$ac_ext <<_ACEOF
4266/* end confdefs.h. */
4267$ac_includes_default
4268int
4269main ()
4270{
4271static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4272test_array [0] = 0
4273
4274 ;
4275 return 0;
4276}
4277_ACEOF
4278rm -f conftest.$ac_objext
4279if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4280 (eval $ac_compile) 2>conftest.er1
4281 ac_status=$?
4282 grep -v '^ *+' conftest.er1 >conftest.err
4283 rm -f conftest.er1
4284 cat conftest.err >&5
4285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4286 (exit $ac_status); } &&
215c351a
PB
4287 { ac_try='test -z "$ac_c_werror_flag"
4288 || test ! -s conftest.err'
bf3b7cd3
JD
4289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4290 (eval $ac_try) 2>&5
4291 ac_status=$?
4292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4293 (exit $ac_status); }; } &&
4294 { ac_try='test -s conftest.$ac_objext'
4295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4296 (eval $ac_try) 2>&5
4297 ac_status=$?
4298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4299 (exit $ac_status); }; }; then
4300 ac_hi=$ac_mid
4301else
4302 echo "$as_me: failed program was:" >&5
4303sed 's/^/| /' conftest.$ac_ext >&5
4304
4305ac_lo=`expr '(' $ac_mid ')' + 1`
4306fi
4307rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4308done
4309case $ac_lo in
4310?*) ac_cv_sizeof_short=$ac_lo;;
4311'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4312See \`config.log' for more details." >&5
4313echo "$as_me: error: cannot compute sizeof (short), 77
4314See \`config.log' for more details." >&2;}
4315 { (exit 1); exit 1; }; } ;;
4316esac
4317else
4318 if test "$cross_compiling" = yes; then
215c351a
PB
4319 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4320See \`config.log' for more details." >&5
4321echo "$as_me: error: cannot run test program while cross compiling
4322See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4323 { (exit 1); exit 1; }; }
4324else
4325 cat >conftest.$ac_ext <<_ACEOF
4326/* confdefs.h. */
4327_ACEOF
4328cat confdefs.h >>conftest.$ac_ext
4329cat >>conftest.$ac_ext <<_ACEOF
4330/* end confdefs.h. */
4331$ac_includes_default
4332long longval () { return (long) (sizeof (short)); }
4333unsigned long ulongval () { return (long) (sizeof (short)); }
4334#include <stdio.h>
4335#include <stdlib.h>
4336int
4337main ()
4338{
4339
4340 FILE *f = fopen ("conftest.val", "w");
4341 if (! f)
4342 exit (1);
4343 if (((long) (sizeof (short))) < 0)
4344 {
4345 long i = longval ();
4346 if (i != ((long) (sizeof (short))))
4347 exit (1);
4348 fprintf (f, "%ld\n", i);
4349 }
4350 else
4351 {
4352 unsigned long i = ulongval ();
4353 if (i != ((long) (sizeof (short))))
4354 exit (1);
4355 fprintf (f, "%lu\n", i);
4356 }
4357 exit (ferror (f) || fclose (f) != 0);
4358
4359 ;
4360 return 0;
4361}
4362_ACEOF
4363rm -f conftest$ac_exeext
4364if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4365 (eval $ac_link) 2>&5
4366 ac_status=$?
4367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4368 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4370 (eval $ac_try) 2>&5
4371 ac_status=$?
4372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4373 (exit $ac_status); }; }; then
4374 ac_cv_sizeof_short=`cat conftest.val`
4375else
4376 echo "$as_me: program exited with status $ac_status" >&5
4377echo "$as_me: failed program was:" >&5
4378sed 's/^/| /' conftest.$ac_ext >&5
4379
4380( exit $ac_status )
4381{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4382See \`config.log' for more details." >&5
4383echo "$as_me: error: cannot compute sizeof (short), 77
4384See \`config.log' for more details." >&2;}
4385 { (exit 1); exit 1; }; }
4386fi
4387rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4388fi
4389fi
4390rm -f conftest.val
4391else
4392 ac_cv_sizeof_short=0
4393fi
4394fi
4395echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4396echo "${ECHO_T}$ac_cv_sizeof_short" >&6
4397cat >>confdefs.h <<_ACEOF
4398#define SIZEOF_SHORT $ac_cv_sizeof_short
4399_ACEOF
4400
4401
4402echo "$as_me:$LINENO: checking for int" >&5
4403echo $ECHO_N "checking for int... $ECHO_C" >&6
4404if test "${ac_cv_type_int+set}" = set; then
4405 echo $ECHO_N "(cached) $ECHO_C" >&6
4406else
4407 cat >conftest.$ac_ext <<_ACEOF
4408/* confdefs.h. */
4409_ACEOF
4410cat confdefs.h >>conftest.$ac_ext
4411cat >>conftest.$ac_ext <<_ACEOF
4412/* end confdefs.h. */
4413$ac_includes_default
4414int
4415main ()
4416{
4417if ((int *) 0)
4418 return 0;
4419if (sizeof (int))
4420 return 0;
4421 ;
4422 return 0;
4423}
4424_ACEOF
4425rm -f conftest.$ac_objext
4426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4427 (eval $ac_compile) 2>conftest.er1
4428 ac_status=$?
4429 grep -v '^ *+' conftest.er1 >conftest.err
4430 rm -f conftest.er1
4431 cat conftest.err >&5
4432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4433 (exit $ac_status); } &&
215c351a
PB
4434 { ac_try='test -z "$ac_c_werror_flag"
4435 || test ! -s conftest.err'
bf3b7cd3
JD
4436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4437 (eval $ac_try) 2>&5
4438 ac_status=$?
4439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4440 (exit $ac_status); }; } &&
4441 { ac_try='test -s conftest.$ac_objext'
4442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4443 (eval $ac_try) 2>&5
4444 ac_status=$?
4445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4446 (exit $ac_status); }; }; then
4447 ac_cv_type_int=yes
4448else
4449 echo "$as_me: failed program was:" >&5
4450sed 's/^/| /' conftest.$ac_ext >&5
4451
4452ac_cv_type_int=no
4453fi
4454rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4455fi
4456echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4457echo "${ECHO_T}$ac_cv_type_int" >&6
4458
4459echo "$as_me:$LINENO: checking size of int" >&5
4460echo $ECHO_N "checking size of int... $ECHO_C" >&6
4461if test "${ac_cv_sizeof_int+set}" = set; then
4462 echo $ECHO_N "(cached) $ECHO_C" >&6
4463else
4464 if test "$ac_cv_type_int" = yes; then
4465 # The cast to unsigned long works around a bug in the HP C Compiler
4466 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4467 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4468 # This bug is HP SR number 8606223364.
4469 if test "$cross_compiling" = yes; then
4470 # Depending upon the size, compute the lo and hi bounds.
4471cat >conftest.$ac_ext <<_ACEOF
4472/* confdefs.h. */
4473_ACEOF
4474cat confdefs.h >>conftest.$ac_ext
4475cat >>conftest.$ac_ext <<_ACEOF
4476/* end confdefs.h. */
4477$ac_includes_default
4478int
4479main ()
4480{
4481static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4482test_array [0] = 0
4483
4484 ;
4485 return 0;
4486}
4487_ACEOF
4488rm -f conftest.$ac_objext
4489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4490 (eval $ac_compile) 2>conftest.er1
4491 ac_status=$?
4492 grep -v '^ *+' conftest.er1 >conftest.err
4493 rm -f conftest.er1
4494 cat conftest.err >&5
4495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4496 (exit $ac_status); } &&
215c351a
PB
4497 { ac_try='test -z "$ac_c_werror_flag"
4498 || test ! -s conftest.err'
bf3b7cd3
JD
4499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4500 (eval $ac_try) 2>&5
4501 ac_status=$?
4502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4503 (exit $ac_status); }; } &&
4504 { ac_try='test -s conftest.$ac_objext'
4505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4506 (eval $ac_try) 2>&5
4507 ac_status=$?
4508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4509 (exit $ac_status); }; }; then
4510 ac_lo=0 ac_mid=0
4511 while :; do
4512 cat >conftest.$ac_ext <<_ACEOF
4513/* confdefs.h. */
4514_ACEOF
4515cat confdefs.h >>conftest.$ac_ext
4516cat >>conftest.$ac_ext <<_ACEOF
4517/* end confdefs.h. */
4518$ac_includes_default
4519int
4520main ()
4521{
4522static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4523test_array [0] = 0
4524
4525 ;
4526 return 0;
4527}
4528_ACEOF
4529rm -f conftest.$ac_objext
4530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4531 (eval $ac_compile) 2>conftest.er1
4532 ac_status=$?
4533 grep -v '^ *+' conftest.er1 >conftest.err
4534 rm -f conftest.er1
4535 cat conftest.err >&5
4536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4537 (exit $ac_status); } &&
215c351a
PB
4538 { ac_try='test -z "$ac_c_werror_flag"
4539 || test ! -s conftest.err'
bf3b7cd3
JD
4540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4541 (eval $ac_try) 2>&5
4542 ac_status=$?
4543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4544 (exit $ac_status); }; } &&
4545 { ac_try='test -s conftest.$ac_objext'
4546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4547 (eval $ac_try) 2>&5
4548 ac_status=$?
4549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4550 (exit $ac_status); }; }; then
4551 ac_hi=$ac_mid; break
4552else
4553 echo "$as_me: failed program was:" >&5
4554sed 's/^/| /' conftest.$ac_ext >&5
4555
4556ac_lo=`expr $ac_mid + 1`
4557 if test $ac_lo -le $ac_mid; then
4558 ac_lo= ac_hi=
4559 break
4560 fi
4561 ac_mid=`expr 2 '*' $ac_mid + 1`
4562fi
4563rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4564 done
4565else
4566 echo "$as_me: failed program was:" >&5
4567sed 's/^/| /' conftest.$ac_ext >&5
4568
4569cat >conftest.$ac_ext <<_ACEOF
4570/* confdefs.h. */
4571_ACEOF
4572cat confdefs.h >>conftest.$ac_ext
4573cat >>conftest.$ac_ext <<_ACEOF
4574/* end confdefs.h. */
4575$ac_includes_default
4576int
4577main ()
4578{
4579static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4580test_array [0] = 0
4581
4582 ;
4583 return 0;
4584}
4585_ACEOF
4586rm -f conftest.$ac_objext
4587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4588 (eval $ac_compile) 2>conftest.er1
4589 ac_status=$?
4590 grep -v '^ *+' conftest.er1 >conftest.err
4591 rm -f conftest.er1
4592 cat conftest.err >&5
4593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4594 (exit $ac_status); } &&
215c351a
PB
4595 { ac_try='test -z "$ac_c_werror_flag"
4596 || test ! -s conftest.err'
bf3b7cd3
JD
4597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4598 (eval $ac_try) 2>&5
4599 ac_status=$?
4600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4601 (exit $ac_status); }; } &&
4602 { ac_try='test -s conftest.$ac_objext'
4603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4604 (eval $ac_try) 2>&5
4605 ac_status=$?
4606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4607 (exit $ac_status); }; }; then
4608 ac_hi=-1 ac_mid=-1
4609 while :; do
4610 cat >conftest.$ac_ext <<_ACEOF
4611/* confdefs.h. */
4612_ACEOF
4613cat confdefs.h >>conftest.$ac_ext
4614cat >>conftest.$ac_ext <<_ACEOF
4615/* end confdefs.h. */
4616$ac_includes_default
4617int
4618main ()
4619{
4620static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4621test_array [0] = 0
4622
4623 ;
4624 return 0;
4625}
4626_ACEOF
4627rm -f conftest.$ac_objext
4628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4629 (eval $ac_compile) 2>conftest.er1
4630 ac_status=$?
4631 grep -v '^ *+' conftest.er1 >conftest.err
4632 rm -f conftest.er1
4633 cat conftest.err >&5
4634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4635 (exit $ac_status); } &&
215c351a
PB
4636 { ac_try='test -z "$ac_c_werror_flag"
4637 || test ! -s conftest.err'
bf3b7cd3
JD
4638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4639 (eval $ac_try) 2>&5
4640 ac_status=$?
4641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4642 (exit $ac_status); }; } &&
4643 { ac_try='test -s conftest.$ac_objext'
4644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4645 (eval $ac_try) 2>&5
4646 ac_status=$?
4647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4648 (exit $ac_status); }; }; then
4649 ac_lo=$ac_mid; break
4650else
4651 echo "$as_me: failed program was:" >&5
4652sed 's/^/| /' conftest.$ac_ext >&5
4653
4654ac_hi=`expr '(' $ac_mid ')' - 1`
4655 if test $ac_mid -le $ac_hi; then
4656 ac_lo= ac_hi=
4657 break
4658 fi
4659 ac_mid=`expr 2 '*' $ac_mid`
4660fi
4661rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4662 done
4663else
4664 echo "$as_me: failed program was:" >&5
4665sed 's/^/| /' conftest.$ac_ext >&5
4666
4667ac_lo= ac_hi=
4668fi
4669rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4670fi
4671rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4672# Binary search between lo and hi bounds.
4673while test "x$ac_lo" != "x$ac_hi"; do
4674 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4675 cat >conftest.$ac_ext <<_ACEOF
4676/* confdefs.h. */
4677_ACEOF
4678cat confdefs.h >>conftest.$ac_ext
4679cat >>conftest.$ac_ext <<_ACEOF
4680/* end confdefs.h. */
4681$ac_includes_default
4682int
4683main ()
4684{
4685static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4686test_array [0] = 0
4687
4688 ;
4689 return 0;
4690}
4691_ACEOF
4692rm -f conftest.$ac_objext
4693if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4694 (eval $ac_compile) 2>conftest.er1
4695 ac_status=$?
4696 grep -v '^ *+' conftest.er1 >conftest.err
4697 rm -f conftest.er1
4698 cat conftest.err >&5
4699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4700 (exit $ac_status); } &&
215c351a
PB
4701 { ac_try='test -z "$ac_c_werror_flag"
4702 || test ! -s conftest.err'
bf3b7cd3
JD
4703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4704 (eval $ac_try) 2>&5
4705 ac_status=$?
4706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4707 (exit $ac_status); }; } &&
4708 { ac_try='test -s conftest.$ac_objext'
4709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4710 (eval $ac_try) 2>&5
4711 ac_status=$?
4712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4713 (exit $ac_status); }; }; then
4714 ac_hi=$ac_mid
4715else
4716 echo "$as_me: failed program was:" >&5
4717sed 's/^/| /' conftest.$ac_ext >&5
4718
4719ac_lo=`expr '(' $ac_mid ')' + 1`
4720fi
4721rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4722done
4723case $ac_lo in
4724?*) ac_cv_sizeof_int=$ac_lo;;
4725'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4726See \`config.log' for more details." >&5
4727echo "$as_me: error: cannot compute sizeof (int), 77
4728See \`config.log' for more details." >&2;}
4729 { (exit 1); exit 1; }; } ;;
4730esac
4731else
4732 if test "$cross_compiling" = yes; then
215c351a
PB
4733 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4734See \`config.log' for more details." >&5
4735echo "$as_me: error: cannot run test program while cross compiling
4736See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4737 { (exit 1); exit 1; }; }
4738else
4739 cat >conftest.$ac_ext <<_ACEOF
4740/* confdefs.h. */
4741_ACEOF
4742cat confdefs.h >>conftest.$ac_ext
4743cat >>conftest.$ac_ext <<_ACEOF
4744/* end confdefs.h. */
4745$ac_includes_default
4746long longval () { return (long) (sizeof (int)); }
4747unsigned long ulongval () { return (long) (sizeof (int)); }
4748#include <stdio.h>
4749#include <stdlib.h>
4750int
4751main ()
4752{
4753
4754 FILE *f = fopen ("conftest.val", "w");
4755 if (! f)
4756 exit (1);
4757 if (((long) (sizeof (int))) < 0)
4758 {
4759 long i = longval ();
4760 if (i != ((long) (sizeof (int))))
4761 exit (1);
4762 fprintf (f, "%ld\n", i);
4763 }
4764 else
4765 {
4766 unsigned long i = ulongval ();
4767 if (i != ((long) (sizeof (int))))
4768 exit (1);
4769 fprintf (f, "%lu\n", i);
4770 }
4771 exit (ferror (f) || fclose (f) != 0);
4772
4773 ;
4774 return 0;
4775}
4776_ACEOF
4777rm -f conftest$ac_exeext
4778if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4779 (eval $ac_link) 2>&5
4780 ac_status=$?
4781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4782 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4784 (eval $ac_try) 2>&5
4785 ac_status=$?
4786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4787 (exit $ac_status); }; }; then
4788 ac_cv_sizeof_int=`cat conftest.val`
4789else
4790 echo "$as_me: program exited with status $ac_status" >&5
4791echo "$as_me: failed program was:" >&5
4792sed 's/^/| /' conftest.$ac_ext >&5
4793
4794( exit $ac_status )
4795{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4796See \`config.log' for more details." >&5
4797echo "$as_me: error: cannot compute sizeof (int), 77
4798See \`config.log' for more details." >&2;}
4799 { (exit 1); exit 1; }; }
4800fi
4801rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4802fi
4803fi
4804rm -f conftest.val
4805else
4806 ac_cv_sizeof_int=0
4807fi
4808fi
4809echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4810echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4811cat >>confdefs.h <<_ACEOF
4812#define SIZEOF_INT $ac_cv_sizeof_int
4813_ACEOF
4814
4815
4816echo "$as_me:$LINENO: checking for long" >&5
4817echo $ECHO_N "checking for long... $ECHO_C" >&6
4818if test "${ac_cv_type_long+set}" = set; then
4819 echo $ECHO_N "(cached) $ECHO_C" >&6
4820else
4821 cat >conftest.$ac_ext <<_ACEOF
4822/* confdefs.h. */
4823_ACEOF
4824cat confdefs.h >>conftest.$ac_ext
4825cat >>conftest.$ac_ext <<_ACEOF
4826/* end confdefs.h. */
4827$ac_includes_default
4828int
4829main ()
4830{
4831if ((long *) 0)
4832 return 0;
4833if (sizeof (long))
4834 return 0;
4835 ;
4836 return 0;
4837}
4838_ACEOF
4839rm -f conftest.$ac_objext
4840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4841 (eval $ac_compile) 2>conftest.er1
4842 ac_status=$?
4843 grep -v '^ *+' conftest.er1 >conftest.err
4844 rm -f conftest.er1
4845 cat conftest.err >&5
4846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4847 (exit $ac_status); } &&
215c351a
PB
4848 { ac_try='test -z "$ac_c_werror_flag"
4849 || test ! -s conftest.err'
bf3b7cd3
JD
4850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4851 (eval $ac_try) 2>&5
4852 ac_status=$?
4853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4854 (exit $ac_status); }; } &&
4855 { ac_try='test -s conftest.$ac_objext'
4856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4857 (eval $ac_try) 2>&5
4858 ac_status=$?
4859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4860 (exit $ac_status); }; }; then
4861 ac_cv_type_long=yes
4862else
4863 echo "$as_me: failed program was:" >&5
4864sed 's/^/| /' conftest.$ac_ext >&5
4865
4866ac_cv_type_long=no
4867fi
4868rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4869fi
4870echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4871echo "${ECHO_T}$ac_cv_type_long" >&6
4872
4873echo "$as_me:$LINENO: checking size of long" >&5
4874echo $ECHO_N "checking size of long... $ECHO_C" >&6
4875if test "${ac_cv_sizeof_long+set}" = set; then
4876 echo $ECHO_N "(cached) $ECHO_C" >&6
4877else
4878 if test "$ac_cv_type_long" = yes; then
4879 # The cast to unsigned long works around a bug in the HP C Compiler
4880 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4881 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4882 # This bug is HP SR number 8606223364.
4883 if test "$cross_compiling" = yes; then
4884 # Depending upon the size, compute the lo and hi bounds.
4885cat >conftest.$ac_ext <<_ACEOF
4886/* confdefs.h. */
4887_ACEOF
4888cat confdefs.h >>conftest.$ac_ext
4889cat >>conftest.$ac_ext <<_ACEOF
4890/* end confdefs.h. */
4891$ac_includes_default
4892int
4893main ()
4894{
4895static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
4896test_array [0] = 0
4897
4898 ;
4899 return 0;
4900}
4901_ACEOF
4902rm -f conftest.$ac_objext
4903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4904 (eval $ac_compile) 2>conftest.er1
4905 ac_status=$?
4906 grep -v '^ *+' conftest.er1 >conftest.err
4907 rm -f conftest.er1
4908 cat conftest.err >&5
4909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4910 (exit $ac_status); } &&
215c351a
PB
4911 { ac_try='test -z "$ac_c_werror_flag"
4912 || test ! -s conftest.err'
bf3b7cd3
JD
4913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4914 (eval $ac_try) 2>&5
4915 ac_status=$?
4916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4917 (exit $ac_status); }; } &&
4918 { ac_try='test -s conftest.$ac_objext'
4919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4920 (eval $ac_try) 2>&5
4921 ac_status=$?
4922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4923 (exit $ac_status); }; }; then
4924 ac_lo=0 ac_mid=0
4925 while :; do
4926 cat >conftest.$ac_ext <<_ACEOF
4927/* confdefs.h. */
4928_ACEOF
4929cat confdefs.h >>conftest.$ac_ext
4930cat >>conftest.$ac_ext <<_ACEOF
4931/* end confdefs.h. */
4932$ac_includes_default
4933int
4934main ()
4935{
4936static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4937test_array [0] = 0
4938
4939 ;
4940 return 0;
4941}
4942_ACEOF
4943rm -f conftest.$ac_objext
4944if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4945 (eval $ac_compile) 2>conftest.er1
4946 ac_status=$?
4947 grep -v '^ *+' conftest.er1 >conftest.err
4948 rm -f conftest.er1
4949 cat conftest.err >&5
4950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4951 (exit $ac_status); } &&
215c351a
PB
4952 { ac_try='test -z "$ac_c_werror_flag"
4953 || test ! -s conftest.err'
bf3b7cd3
JD
4954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4955 (eval $ac_try) 2>&5
4956 ac_status=$?
4957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4958 (exit $ac_status); }; } &&
4959 { ac_try='test -s conftest.$ac_objext'
4960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4961 (eval $ac_try) 2>&5
4962 ac_status=$?
4963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4964 (exit $ac_status); }; }; then
4965 ac_hi=$ac_mid; break
4966else
4967 echo "$as_me: failed program was:" >&5
4968sed 's/^/| /' conftest.$ac_ext >&5
4969
4970ac_lo=`expr $ac_mid + 1`
4971 if test $ac_lo -le $ac_mid; then
4972 ac_lo= ac_hi=
4973 break
4974 fi
4975 ac_mid=`expr 2 '*' $ac_mid + 1`
4976fi
4977rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4978 done
4979else
4980 echo "$as_me: failed program was:" >&5
4981sed 's/^/| /' conftest.$ac_ext >&5
4982
4983cat >conftest.$ac_ext <<_ACEOF
4984/* confdefs.h. */
4985_ACEOF
4986cat confdefs.h >>conftest.$ac_ext
4987cat >>conftest.$ac_ext <<_ACEOF
4988/* end confdefs.h. */
4989$ac_includes_default
4990int
4991main ()
4992{
4993static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
4994test_array [0] = 0
4995
4996 ;
4997 return 0;
4998}
4999_ACEOF
5000rm -f conftest.$ac_objext
5001if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5002 (eval $ac_compile) 2>conftest.er1
5003 ac_status=$?
5004 grep -v '^ *+' conftest.er1 >conftest.err
5005 rm -f conftest.er1
5006 cat conftest.err >&5
5007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5008 (exit $ac_status); } &&
215c351a
PB
5009 { ac_try='test -z "$ac_c_werror_flag"
5010 || test ! -s conftest.err'
bf3b7cd3
JD
5011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5012 (eval $ac_try) 2>&5
5013 ac_status=$?
5014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5015 (exit $ac_status); }; } &&
5016 { ac_try='test -s conftest.$ac_objext'
5017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5018 (eval $ac_try) 2>&5
5019 ac_status=$?
5020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5021 (exit $ac_status); }; }; then
5022 ac_hi=-1 ac_mid=-1
5023 while :; do
5024 cat >conftest.$ac_ext <<_ACEOF
5025/* confdefs.h. */
5026_ACEOF
5027cat confdefs.h >>conftest.$ac_ext
5028cat >>conftest.$ac_ext <<_ACEOF
5029/* end confdefs.h. */
5030$ac_includes_default
5031int
5032main ()
5033{
5034static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5035test_array [0] = 0
5036
5037 ;
5038 return 0;
5039}
5040_ACEOF
5041rm -f conftest.$ac_objext
5042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5043 (eval $ac_compile) 2>conftest.er1
5044 ac_status=$?
5045 grep -v '^ *+' conftest.er1 >conftest.err
5046 rm -f conftest.er1
5047 cat conftest.err >&5
5048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5049 (exit $ac_status); } &&
215c351a
PB
5050 { ac_try='test -z "$ac_c_werror_flag"
5051 || test ! -s conftest.err'
bf3b7cd3
JD
5052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5053 (eval $ac_try) 2>&5
5054 ac_status=$?
5055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5056 (exit $ac_status); }; } &&
5057 { ac_try='test -s conftest.$ac_objext'
5058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5059 (eval $ac_try) 2>&5
5060 ac_status=$?
5061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5062 (exit $ac_status); }; }; then
5063 ac_lo=$ac_mid; break
5064else
5065 echo "$as_me: failed program was:" >&5
5066sed 's/^/| /' conftest.$ac_ext >&5
5067
5068ac_hi=`expr '(' $ac_mid ')' - 1`
5069 if test $ac_mid -le $ac_hi; then
5070 ac_lo= ac_hi=
5071 break
5072 fi
5073 ac_mid=`expr 2 '*' $ac_mid`
5074fi
5075rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5076 done
5077else
5078 echo "$as_me: failed program was:" >&5
5079sed 's/^/| /' conftest.$ac_ext >&5
5080
5081ac_lo= ac_hi=
5082fi
5083rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5084fi
5085rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5086# Binary search between lo and hi bounds.
5087while test "x$ac_lo" != "x$ac_hi"; do
5088 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5089 cat >conftest.$ac_ext <<_ACEOF
5090/* confdefs.h. */
5091_ACEOF
5092cat confdefs.h >>conftest.$ac_ext
5093cat >>conftest.$ac_ext <<_ACEOF
5094/* end confdefs.h. */
5095$ac_includes_default
5096int
5097main ()
5098{
5099static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5100test_array [0] = 0
5101
5102 ;
5103 return 0;
5104}
5105_ACEOF
5106rm -f conftest.$ac_objext
5107if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5108 (eval $ac_compile) 2>conftest.er1
5109 ac_status=$?
5110 grep -v '^ *+' conftest.er1 >conftest.err
5111 rm -f conftest.er1
5112 cat conftest.err >&5
5113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5114 (exit $ac_status); } &&
215c351a
PB
5115 { ac_try='test -z "$ac_c_werror_flag"
5116 || test ! -s conftest.err'
bf3b7cd3
JD
5117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5118 (eval $ac_try) 2>&5
5119 ac_status=$?
5120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5121 (exit $ac_status); }; } &&
5122 { ac_try='test -s conftest.$ac_objext'
5123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5124 (eval $ac_try) 2>&5
5125 ac_status=$?
5126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5127 (exit $ac_status); }; }; then
5128 ac_hi=$ac_mid
5129else
5130 echo "$as_me: failed program was:" >&5
5131sed 's/^/| /' conftest.$ac_ext >&5
5132
5133ac_lo=`expr '(' $ac_mid ')' + 1`
5134fi
5135rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5136done
5137case $ac_lo in
5138?*) ac_cv_sizeof_long=$ac_lo;;
5139'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5140See \`config.log' for more details." >&5
5141echo "$as_me: error: cannot compute sizeof (long), 77
5142See \`config.log' for more details." >&2;}
5143 { (exit 1); exit 1; }; } ;;
5144esac
5145else
5146 if test "$cross_compiling" = yes; then
215c351a
PB
5147 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5148See \`config.log' for more details." >&5
5149echo "$as_me: error: cannot run test program while cross compiling
5150See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5151 { (exit 1); exit 1; }; }
5152else
5153 cat >conftest.$ac_ext <<_ACEOF
5154/* confdefs.h. */
5155_ACEOF
5156cat confdefs.h >>conftest.$ac_ext
5157cat >>conftest.$ac_ext <<_ACEOF
5158/* end confdefs.h. */
5159$ac_includes_default
5160long longval () { return (long) (sizeof (long)); }
5161unsigned long ulongval () { return (long) (sizeof (long)); }
5162#include <stdio.h>
5163#include <stdlib.h>
5164int
5165main ()
5166{
5167
5168 FILE *f = fopen ("conftest.val", "w");
5169 if (! f)
5170 exit (1);
5171 if (((long) (sizeof (long))) < 0)
5172 {
5173 long i = longval ();
5174 if (i != ((long) (sizeof (long))))
5175 exit (1);
5176 fprintf (f, "%ld\n", i);
5177 }
5178 else
5179 {
5180 unsigned long i = ulongval ();
5181 if (i != ((long) (sizeof (long))))
5182 exit (1);
5183 fprintf (f, "%lu\n", i);
5184 }
5185 exit (ferror (f) || fclose (f) != 0);
5186
5187 ;
5188 return 0;
5189}
5190_ACEOF
5191rm -f conftest$ac_exeext
5192if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5193 (eval $ac_link) 2>&5
5194 ac_status=$?
5195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5196 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5198 (eval $ac_try) 2>&5
5199 ac_status=$?
5200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5201 (exit $ac_status); }; }; then
5202 ac_cv_sizeof_long=`cat conftest.val`
5203else
5204 echo "$as_me: program exited with status $ac_status" >&5
5205echo "$as_me: failed program was:" >&5
5206sed 's/^/| /' conftest.$ac_ext >&5
5207
5208( exit $ac_status )
5209{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5210See \`config.log' for more details." >&5
5211echo "$as_me: error: cannot compute sizeof (long), 77
5212See \`config.log' for more details." >&2;}
5213 { (exit 1); exit 1; }; }
5214fi
5215rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5216fi
5217fi
5218rm -f conftest.val
5219else
5220 ac_cv_sizeof_long=0
5221fi
5222fi
5223echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5224echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5225cat >>confdefs.h <<_ACEOF
5226#define SIZEOF_LONG $ac_cv_sizeof_long
5227_ACEOF
5228
5229
5230if test $ac_cv_c_long_long = yes; then
5231 echo "$as_me:$LINENO: checking for long long" >&5
5232echo $ECHO_N "checking for long long... $ECHO_C" >&6
5233if test "${ac_cv_type_long_long+set}" = set; then
5234 echo $ECHO_N "(cached) $ECHO_C" >&6
5235else
5236 cat >conftest.$ac_ext <<_ACEOF
5237/* confdefs.h. */
5238_ACEOF
5239cat confdefs.h >>conftest.$ac_ext
5240cat >>conftest.$ac_ext <<_ACEOF
5241/* end confdefs.h. */
5242$ac_includes_default
5243int
5244main ()
5245{
5246if ((long long *) 0)
5247 return 0;
5248if (sizeof (long long))
5249 return 0;
5250 ;
5251 return 0;
5252}
5253_ACEOF
5254rm -f conftest.$ac_objext
5255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5256 (eval $ac_compile) 2>conftest.er1
5257 ac_status=$?
5258 grep -v '^ *+' conftest.er1 >conftest.err
5259 rm -f conftest.er1
5260 cat conftest.err >&5
5261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5262 (exit $ac_status); } &&
215c351a
PB
5263 { ac_try='test -z "$ac_c_werror_flag"
5264 || test ! -s conftest.err'
bf3b7cd3
JD
5265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5266 (eval $ac_try) 2>&5
5267 ac_status=$?
5268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5269 (exit $ac_status); }; } &&
5270 { ac_try='test -s conftest.$ac_objext'
5271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5272 (eval $ac_try) 2>&5
5273 ac_status=$?
5274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5275 (exit $ac_status); }; }; then
5276 ac_cv_type_long_long=yes
5277else
5278 echo "$as_me: failed program was:" >&5
5279sed 's/^/| /' conftest.$ac_ext >&5
5280
5281ac_cv_type_long_long=no
5282fi
5283rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5284fi
5285echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5286echo "${ECHO_T}$ac_cv_type_long_long" >&6
5287
5288echo "$as_me:$LINENO: checking size of long long" >&5
5289echo $ECHO_N "checking size of long long... $ECHO_C" >&6
5290if test "${ac_cv_sizeof_long_long+set}" = set; then
5291 echo $ECHO_N "(cached) $ECHO_C" >&6
5292else
5293 if test "$ac_cv_type_long_long" = yes; then
5294 # The cast to unsigned long works around a bug in the HP C Compiler
5295 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5296 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5297 # This bug is HP SR number 8606223364.
5298 if test "$cross_compiling" = yes; then
5299 # Depending upon the size, compute the lo and hi bounds.
5300cat >conftest.$ac_ext <<_ACEOF
5301/* confdefs.h. */
5302_ACEOF
5303cat confdefs.h >>conftest.$ac_ext
5304cat >>conftest.$ac_ext <<_ACEOF
5305/* end confdefs.h. */
5306$ac_includes_default
5307int
5308main ()
5309{
5310static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
5311test_array [0] = 0
5312
5313 ;
5314 return 0;
5315}
5316_ACEOF
5317rm -f conftest.$ac_objext
5318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5319 (eval $ac_compile) 2>conftest.er1
5320 ac_status=$?
5321 grep -v '^ *+' conftest.er1 >conftest.err
5322 rm -f conftest.er1
5323 cat conftest.err >&5
5324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5325 (exit $ac_status); } &&
215c351a
PB
5326 { ac_try='test -z "$ac_c_werror_flag"
5327 || test ! -s conftest.err'
bf3b7cd3
JD
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); }; } &&
5333 { ac_try='test -s conftest.$ac_objext'
5334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5335 (eval $ac_try) 2>&5
5336 ac_status=$?
5337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338 (exit $ac_status); }; }; then
5339 ac_lo=0 ac_mid=0
5340 while :; do
5341 cat >conftest.$ac_ext <<_ACEOF
5342/* confdefs.h. */
5343_ACEOF
5344cat confdefs.h >>conftest.$ac_ext
5345cat >>conftest.$ac_ext <<_ACEOF
5346/* end confdefs.h. */
5347$ac_includes_default
5348int
5349main ()
5350{
5351static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5352test_array [0] = 0
5353
5354 ;
5355 return 0;
5356}
5357_ACEOF
5358rm -f conftest.$ac_objext
5359if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5360 (eval $ac_compile) 2>conftest.er1
5361 ac_status=$?
5362 grep -v '^ *+' conftest.er1 >conftest.err
5363 rm -f conftest.er1
5364 cat conftest.err >&5
5365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5366 (exit $ac_status); } &&
215c351a
PB
5367 { ac_try='test -z "$ac_c_werror_flag"
5368 || test ! -s conftest.err'
bf3b7cd3
JD
5369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5370 (eval $ac_try) 2>&5
5371 ac_status=$?
5372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5373 (exit $ac_status); }; } &&
5374 { ac_try='test -s conftest.$ac_objext'
5375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5376 (eval $ac_try) 2>&5
5377 ac_status=$?
5378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5379 (exit $ac_status); }; }; then
5380 ac_hi=$ac_mid; break
5381else
5382 echo "$as_me: failed program was:" >&5
5383sed 's/^/| /' conftest.$ac_ext >&5
5384
5385ac_lo=`expr $ac_mid + 1`
5386 if test $ac_lo -le $ac_mid; then
5387 ac_lo= ac_hi=
5388 break
5389 fi
5390 ac_mid=`expr 2 '*' $ac_mid + 1`
5391fi
5392rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5393 done
5394else
5395 echo "$as_me: failed program was:" >&5
5396sed 's/^/| /' conftest.$ac_ext >&5
5397
5398cat >conftest.$ac_ext <<_ACEOF
5399/* confdefs.h. */
5400_ACEOF
5401cat confdefs.h >>conftest.$ac_ext
5402cat >>conftest.$ac_ext <<_ACEOF
5403/* end confdefs.h. */
5404$ac_includes_default
5405int
5406main ()
5407{
5408static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
5409test_array [0] = 0
5410
5411 ;
5412 return 0;
5413}
5414_ACEOF
5415rm -f conftest.$ac_objext
5416if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5417 (eval $ac_compile) 2>conftest.er1
5418 ac_status=$?
5419 grep -v '^ *+' conftest.er1 >conftest.err
5420 rm -f conftest.er1
5421 cat conftest.err >&5
5422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5423 (exit $ac_status); } &&
215c351a
PB
5424 { ac_try='test -z "$ac_c_werror_flag"
5425 || test ! -s conftest.err'
bf3b7cd3
JD
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); }; } &&
5431 { ac_try='test -s conftest.$ac_objext'
5432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5433 (eval $ac_try) 2>&5
5434 ac_status=$?
5435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436 (exit $ac_status); }; }; then
5437 ac_hi=-1 ac_mid=-1
5438 while :; do
5439 cat >conftest.$ac_ext <<_ACEOF
5440/* confdefs.h. */
5441_ACEOF
5442cat confdefs.h >>conftest.$ac_ext
5443cat >>conftest.$ac_ext <<_ACEOF
5444/* end confdefs.h. */
5445$ac_includes_default
5446int
5447main ()
5448{
5449static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
5450test_array [0] = 0
5451
5452 ;
5453 return 0;
5454}
5455_ACEOF
5456rm -f conftest.$ac_objext
5457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5458 (eval $ac_compile) 2>conftest.er1
5459 ac_status=$?
5460 grep -v '^ *+' conftest.er1 >conftest.err
5461 rm -f conftest.er1
5462 cat conftest.err >&5
5463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5464 (exit $ac_status); } &&
215c351a
PB
5465 { ac_try='test -z "$ac_c_werror_flag"
5466 || test ! -s conftest.err'
bf3b7cd3
JD
5467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5468 (eval $ac_try) 2>&5
5469 ac_status=$?
5470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5471 (exit $ac_status); }; } &&
5472 { ac_try='test -s conftest.$ac_objext'
5473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5474 (eval $ac_try) 2>&5
5475 ac_status=$?
5476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5477 (exit $ac_status); }; }; then
5478 ac_lo=$ac_mid; break
5479else
5480 echo "$as_me: failed program was:" >&5
5481sed 's/^/| /' conftest.$ac_ext >&5
5482
5483ac_hi=`expr '(' $ac_mid ')' - 1`
5484 if test $ac_mid -le $ac_hi; then
5485 ac_lo= ac_hi=
5486 break
5487 fi
5488 ac_mid=`expr 2 '*' $ac_mid`
5489fi
5490rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5491 done
5492else
5493 echo "$as_me: failed program was:" >&5
5494sed 's/^/| /' conftest.$ac_ext >&5
5495
5496ac_lo= ac_hi=
5497fi
5498rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5499fi
5500rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5501# Binary search between lo and hi bounds.
5502while test "x$ac_lo" != "x$ac_hi"; do
5503 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5504 cat >conftest.$ac_ext <<_ACEOF
5505/* confdefs.h. */
5506_ACEOF
5507cat confdefs.h >>conftest.$ac_ext
5508cat >>conftest.$ac_ext <<_ACEOF
5509/* end confdefs.h. */
5510$ac_includes_default
5511int
5512main ()
5513{
5514static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5515test_array [0] = 0
5516
5517 ;
5518 return 0;
5519}
5520_ACEOF
5521rm -f conftest.$ac_objext
5522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5523 (eval $ac_compile) 2>conftest.er1
5524 ac_status=$?
5525 grep -v '^ *+' conftest.er1 >conftest.err
5526 rm -f conftest.er1
5527 cat conftest.err >&5
5528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5529 (exit $ac_status); } &&
215c351a
PB
5530 { ac_try='test -z "$ac_c_werror_flag"
5531 || test ! -s conftest.err'
bf3b7cd3
JD
5532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5533 (eval $ac_try) 2>&5
5534 ac_status=$?
5535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5536 (exit $ac_status); }; } &&
5537 { ac_try='test -s conftest.$ac_objext'
5538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5539 (eval $ac_try) 2>&5
5540 ac_status=$?
5541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5542 (exit $ac_status); }; }; then
5543 ac_hi=$ac_mid
5544else
5545 echo "$as_me: failed program was:" >&5
5546sed 's/^/| /' conftest.$ac_ext >&5
5547
5548ac_lo=`expr '(' $ac_mid ')' + 1`
5549fi
5550rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5551done
5552case $ac_lo in
5553?*) ac_cv_sizeof_long_long=$ac_lo;;
5554'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5555See \`config.log' for more details." >&5
5556echo "$as_me: error: cannot compute sizeof (long long), 77
5557See \`config.log' for more details." >&2;}
5558 { (exit 1); exit 1; }; } ;;
5559esac
5560else
5561 if test "$cross_compiling" = yes; then
215c351a
PB
5562 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5563See \`config.log' for more details." >&5
5564echo "$as_me: error: cannot run test program while cross compiling
5565See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5566 { (exit 1); exit 1; }; }
5567else
5568 cat >conftest.$ac_ext <<_ACEOF
5569/* confdefs.h. */
5570_ACEOF
5571cat confdefs.h >>conftest.$ac_ext
5572cat >>conftest.$ac_ext <<_ACEOF
5573/* end confdefs.h. */
5574$ac_includes_default
5575long longval () { return (long) (sizeof (long long)); }
5576unsigned long ulongval () { return (long) (sizeof (long long)); }
5577#include <stdio.h>
5578#include <stdlib.h>
5579int
5580main ()
5581{
5582
5583 FILE *f = fopen ("conftest.val", "w");
5584 if (! f)
5585 exit (1);
5586 if (((long) (sizeof (long long))) < 0)
5587 {
5588 long i = longval ();
5589 if (i != ((long) (sizeof (long long))))
5590 exit (1);
5591 fprintf (f, "%ld\n", i);
5592 }
5593 else
5594 {
5595 unsigned long i = ulongval ();
5596 if (i != ((long) (sizeof (long long))))
5597 exit (1);
5598 fprintf (f, "%lu\n", i);
5599 }
5600 exit (ferror (f) || fclose (f) != 0);
5601
5602 ;
5603 return 0;
5604}
5605_ACEOF
5606rm -f conftest$ac_exeext
5607if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5608 (eval $ac_link) 2>&5
5609 ac_status=$?
5610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5611 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5613 (eval $ac_try) 2>&5
5614 ac_status=$?
5615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5616 (exit $ac_status); }; }; then
5617 ac_cv_sizeof_long_long=`cat conftest.val`
5618else
5619 echo "$as_me: program exited with status $ac_status" >&5
5620echo "$as_me: failed program was:" >&5
5621sed 's/^/| /' conftest.$ac_ext >&5
5622
5623( exit $ac_status )
5624{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5625See \`config.log' for more details." >&5
5626echo "$as_me: error: cannot compute sizeof (long long), 77
5627See \`config.log' for more details." >&2;}
5628 { (exit 1); exit 1; }; }
5629fi
5630rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5631fi
5632fi
5633rm -f conftest.val
5634else
5635 ac_cv_sizeof_long_long=0
5636fi
5637fi
5638echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5639echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
5640cat >>confdefs.h <<_ACEOF
5641#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5642_ACEOF
5643
5644
5645fi
5646if test $ac_cv_c___int64 = yes; then
5647 echo "$as_me:$LINENO: checking for __int64" >&5
5648echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5649if test "${ac_cv_type___int64+set}" = set; then
5650 echo $ECHO_N "(cached) $ECHO_C" >&6
5651else
ba479fd2 5652 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5653/* confdefs.h. */
5654_ACEOF
5655cat confdefs.h >>conftest.$ac_ext
5656cat >>conftest.$ac_ext <<_ACEOF
5657/* end confdefs.h. */
bf3b7cd3 5658$ac_includes_default
ba479fd2
NN
5659int
5660main ()
5661{
bf3b7cd3
JD
5662if ((__int64 *) 0)
5663 return 0;
5664if (sizeof (__int64))
5665 return 0;
ba479fd2
NN
5666 ;
5667 return 0;
5668}
5669_ACEOF
5670rm -f conftest.$ac_objext
5671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5672 (eval $ac_compile) 2>conftest.er1
ba479fd2 5673 ac_status=$?
86da66b5
HPN
5674 grep -v '^ *+' conftest.er1 >conftest.err
5675 rm -f conftest.er1
5676 cat conftest.err >&5
ba479fd2
NN
5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678 (exit $ac_status); } &&
215c351a
PB
5679 { ac_try='test -z "$ac_c_werror_flag"
5680 || test ! -s conftest.err'
86da66b5
HPN
5681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5682 (eval $ac_try) 2>&5
5683 ac_status=$?
5684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5685 (exit $ac_status); }; } &&
5686 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5688 (eval $ac_try) 2>&5
5689 ac_status=$?
5690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5691 (exit $ac_status); }; }; then
bf3b7cd3 5692 ac_cv_type___int64=yes
75b6f3fd 5693else
ba479fd2
NN
5694 echo "$as_me: failed program was:" >&5
5695sed 's/^/| /' conftest.$ac_ext >&5
5696
bf3b7cd3 5697ac_cv_type___int64=no
75b6f3fd 5698fi
86da66b5 5699rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5700fi
bf3b7cd3
JD
5701echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5702echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 5703
bf3b7cd3
JD
5704echo "$as_me:$LINENO: checking size of __int64" >&5
5705echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
5706if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 5707 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 5708else
bf3b7cd3
JD
5709 if test "$ac_cv_type___int64" = yes; then
5710 # The cast to unsigned long works around a bug in the HP C Compiler
5711 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5712 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5713 # This bug is HP SR number 8606223364.
5714 if test "$cross_compiling" = yes; then
5715 # Depending upon the size, compute the lo and hi bounds.
5716cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5717/* confdefs.h. */
5718_ACEOF
5719cat confdefs.h >>conftest.$ac_ext
5720cat >>conftest.$ac_ext <<_ACEOF
5721/* end confdefs.h. */
bf3b7cd3 5722$ac_includes_default
ba479fd2
NN
5723int
5724main ()
5725{
bf3b7cd3
JD
5726static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
5727test_array [0] = 0
5728
ba479fd2
NN
5729 ;
5730 return 0;
5731}
5732_ACEOF
5733rm -f conftest.$ac_objext
5734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5735 (eval $ac_compile) 2>conftest.er1
ba479fd2 5736 ac_status=$?
86da66b5
HPN
5737 grep -v '^ *+' conftest.er1 >conftest.err
5738 rm -f conftest.er1
5739 cat conftest.err >&5
ba479fd2
NN
5740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5741 (exit $ac_status); } &&
215c351a
PB
5742 { ac_try='test -z "$ac_c_werror_flag"
5743 || test ! -s conftest.err'
86da66b5
HPN
5744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5745 (eval $ac_try) 2>&5
5746 ac_status=$?
5747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5748 (exit $ac_status); }; } &&
5749 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5751 (eval $ac_try) 2>&5
5752 ac_status=$?
5753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5754 (exit $ac_status); }; }; then
bf3b7cd3
JD
5755 ac_lo=0 ac_mid=0
5756 while :; do
5757 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5758/* confdefs.h. */
5759_ACEOF
5760cat confdefs.h >>conftest.$ac_ext
5761cat >>conftest.$ac_ext <<_ACEOF
5762/* end confdefs.h. */
bf3b7cd3 5763$ac_includes_default
ba479fd2
NN
5764int
5765main ()
5766{
bf3b7cd3
JD
5767static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5768test_array [0] = 0
5769
ba479fd2
NN
5770 ;
5771 return 0;
5772}
5773_ACEOF
5774rm -f conftest.$ac_objext
5775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5776 (eval $ac_compile) 2>conftest.er1
ba479fd2 5777 ac_status=$?
86da66b5
HPN
5778 grep -v '^ *+' conftest.er1 >conftest.err
5779 rm -f conftest.er1
5780 cat conftest.err >&5
ba479fd2
NN
5781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5782 (exit $ac_status); } &&
215c351a
PB
5783 { ac_try='test -z "$ac_c_werror_flag"
5784 || test ! -s conftest.err'
86da66b5
HPN
5785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5786 (eval $ac_try) 2>&5
5787 ac_status=$?
5788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5789 (exit $ac_status); }; } &&
5790 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5792 (eval $ac_try) 2>&5
5793 ac_status=$?
5794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5795 (exit $ac_status); }; }; then
bf3b7cd3 5796 ac_hi=$ac_mid; break
75e93faa 5797else
ba479fd2
NN
5798 echo "$as_me: failed program was:" >&5
5799sed 's/^/| /' conftest.$ac_ext >&5
5800
bf3b7cd3
JD
5801ac_lo=`expr $ac_mid + 1`
5802 if test $ac_lo -le $ac_mid; then
5803 ac_lo= ac_hi=
5804 break
5805 fi
5806 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 5807fi
86da66b5 5808rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5809 done
75e93faa 5810else
bf3b7cd3
JD
5811 echo "$as_me: failed program was:" >&5
5812sed 's/^/| /' conftest.$ac_ext >&5
5813
5814cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5815/* confdefs.h. */
5816_ACEOF
5817cat confdefs.h >>conftest.$ac_ext
5818cat >>conftest.$ac_ext <<_ACEOF
5819/* end confdefs.h. */
bf3b7cd3 5820$ac_includes_default
ba479fd2
NN
5821int
5822main ()
5823{
bf3b7cd3
JD
5824static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
5825test_array [0] = 0
5826
ba479fd2
NN
5827 ;
5828 return 0;
5829}
5830_ACEOF
5831rm -f conftest.$ac_objext
5832if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5833 (eval $ac_compile) 2>conftest.er1
ba479fd2 5834 ac_status=$?
86da66b5
HPN
5835 grep -v '^ *+' conftest.er1 >conftest.err
5836 rm -f conftest.er1
5837 cat conftest.err >&5
ba479fd2
NN
5838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5839 (exit $ac_status); } &&
215c351a
PB
5840 { ac_try='test -z "$ac_c_werror_flag"
5841 || test ! -s conftest.err'
86da66b5
HPN
5842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5843 (eval $ac_try) 2>&5
5844 ac_status=$?
5845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5846 (exit $ac_status); }; } &&
5847 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5849 (eval $ac_try) 2>&5
5850 ac_status=$?
5851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5852 (exit $ac_status); }; }; then
bf3b7cd3
JD
5853 ac_hi=-1 ac_mid=-1
5854 while :; do
5855 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5856/* confdefs.h. */
5857_ACEOF
5858cat confdefs.h >>conftest.$ac_ext
5859cat >>conftest.$ac_ext <<_ACEOF
5860/* end confdefs.h. */
bf3b7cd3 5861$ac_includes_default
ba479fd2
NN
5862int
5863main ()
5864{
bf3b7cd3
JD
5865static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
5866test_array [0] = 0
5867
ba479fd2
NN
5868 ;
5869 return 0;
5870}
5871_ACEOF
5872rm -f conftest.$ac_objext
5873if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5874 (eval $ac_compile) 2>conftest.er1
ba479fd2 5875 ac_status=$?
86da66b5
HPN
5876 grep -v '^ *+' conftest.er1 >conftest.err
5877 rm -f conftest.er1
5878 cat conftest.err >&5
ba479fd2
NN
5879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880 (exit $ac_status); } &&
215c351a
PB
5881 { ac_try='test -z "$ac_c_werror_flag"
5882 || test ! -s conftest.err'
86da66b5
HPN
5883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5884 (eval $ac_try) 2>&5
5885 ac_status=$?
5886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5887 (exit $ac_status); }; } &&
5888 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5890 (eval $ac_try) 2>&5
5891 ac_status=$?
5892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5893 (exit $ac_status); }; }; then
bf3b7cd3 5894 ac_lo=$ac_mid; break
04cabffc 5895else
ba479fd2
NN
5896 echo "$as_me: failed program was:" >&5
5897sed 's/^/| /' conftest.$ac_ext >&5
5898
bf3b7cd3
JD
5899ac_hi=`expr '(' $ac_mid ')' - 1`
5900 if test $ac_mid -le $ac_hi; then
5901 ac_lo= ac_hi=
5902 break
5903 fi
5904 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 5905fi
86da66b5 5906rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5907 done
5908else
5909 echo "$as_me: failed program was:" >&5
5910sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 5911
bf3b7cd3 5912ac_lo= ac_hi=
414d23ae 5913fi
bf3b7cd3 5914rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5915fi
bf3b7cd3
JD
5916rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5917# Binary search between lo and hi bounds.
5918while test "x$ac_lo" != "x$ac_hi"; do
5919 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 5920 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5921/* confdefs.h. */
5922_ACEOF
5923cat confdefs.h >>conftest.$ac_ext
5924cat >>conftest.$ac_ext <<_ACEOF
5925/* end confdefs.h. */
bf3b7cd3 5926$ac_includes_default
ba479fd2
NN
5927int
5928main ()
5929{
bf3b7cd3
JD
5930static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5931test_array [0] = 0
5932
ba479fd2
NN
5933 ;
5934 return 0;
5935}
5936_ACEOF
5937rm -f conftest.$ac_objext
5938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5939 (eval $ac_compile) 2>conftest.er1
ba479fd2 5940 ac_status=$?
86da66b5
HPN
5941 grep -v '^ *+' conftest.er1 >conftest.err
5942 rm -f conftest.er1
5943 cat conftest.err >&5
ba479fd2
NN
5944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5945 (exit $ac_status); } &&
215c351a
PB
5946 { ac_try='test -z "$ac_c_werror_flag"
5947 || test ! -s conftest.err'
86da66b5
HPN
5948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5949 (eval $ac_try) 2>&5
5950 ac_status=$?
5951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5952 (exit $ac_status); }; } &&
5953 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5955 (eval $ac_try) 2>&5
5956 ac_status=$?
5957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5958 (exit $ac_status); }; }; then
bf3b7cd3 5959 ac_hi=$ac_mid
75e93faa 5960else
ba479fd2
NN
5961 echo "$as_me: failed program was:" >&5
5962sed 's/^/| /' conftest.$ac_ext >&5
5963
bf3b7cd3 5964ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 5965fi
86da66b5 5966rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5967done
bf3b7cd3
JD
5968case $ac_lo in
5969?*) ac_cv_sizeof___int64=$ac_lo;;
5970'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
5971See \`config.log' for more details." >&5
5972echo "$as_me: error: cannot compute sizeof (__int64), 77
5973See \`config.log' for more details." >&2;}
5974 { (exit 1); exit 1; }; } ;;
5975esac
5976else
5977 if test "$cross_compiling" = yes; then
215c351a
PB
5978 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5979See \`config.log' for more details." >&5
5980echo "$as_me: error: cannot run test program while cross compiling
5981See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5982 { (exit 1); exit 1; }; }
5983else
5984 cat >conftest.$ac_ext <<_ACEOF
5985/* confdefs.h. */
5986_ACEOF
5987cat confdefs.h >>conftest.$ac_ext
5988cat >>conftest.$ac_ext <<_ACEOF
5989/* end confdefs.h. */
5990$ac_includes_default
5991long longval () { return (long) (sizeof (__int64)); }
5992unsigned long ulongval () { return (long) (sizeof (__int64)); }
5993#include <stdio.h>
5994#include <stdlib.h>
5995int
5996main ()
5997{
414d23ae 5998
bf3b7cd3
JD
5999 FILE *f = fopen ("conftest.val", "w");
6000 if (! f)
6001 exit (1);
6002 if (((long) (sizeof (__int64))) < 0)
6003 {
6004 long i = longval ();
6005 if (i != ((long) (sizeof (__int64))))
6006 exit (1);
6007 fprintf (f, "%ld\n", i);
6008 }
6009 else
6010 {
6011 unsigned long i = ulongval ();
6012 if (i != ((long) (sizeof (__int64))))
6013 exit (1);
6014 fprintf (f, "%lu\n", i);
6015 }
6016 exit (ferror (f) || fclose (f) != 0);
6017
6018 ;
6019 return 0;
6020}
6021_ACEOF
6022rm -f conftest$ac_exeext
6023if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6024 (eval $ac_link) 2>&5
6025 ac_status=$?
6026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6027 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6029 (eval $ac_try) 2>&5
6030 ac_status=$?
6031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6032 (exit $ac_status); }; }; then
6033 ac_cv_sizeof___int64=`cat conftest.val`
6034else
6035 echo "$as_me: program exited with status $ac_status" >&5
6036echo "$as_me: failed program was:" >&5
6037sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6038
bf3b7cd3
JD
6039( exit $ac_status )
6040{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
6041See \`config.log' for more details." >&5
6042echo "$as_me: error: cannot compute sizeof (__int64), 77
6043See \`config.log' for more details." >&2;}
ba479fd2 6044 { (exit 1); exit 1; }; }
414d23ae 6045fi
bf3b7cd3
JD
6046rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6047fi
6048fi
6049rm -f conftest.val
6050else
6051 ac_cv_sizeof___int64=0
6052fi
6053fi
ba479fd2
NN
6054echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6055echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 6056cat >>confdefs.h <<_ACEOF
414d23ae 6057#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6058_ACEOF
414d23ae 6059
cafe096b 6060
414d23ae
HPN
6061fi
6062
34a86c2b
NN
6063# ---------------------
6064# Warnings and checking
6065# ---------------------
6066
b5472e1d
NN
6067# Check $CC warning features (if it's GCC).
6068# We want to use -pedantic, but we don't want warnings about
6069# * 'long long'
6070# * variadic macros
6071# So, we only use -pedantic if we can disable those warnings.
6072
6073echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6074echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
6075if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6076 echo $ECHO_N "(cached) $ECHO_C" >&6
6077else
6078 save_CFLAGS="$CFLAGS"
6079 CFLAGS="-Wno-long-long"
6080 cat >conftest.$ac_ext <<_ACEOF
6081/* confdefs.h. */
6082_ACEOF
6083cat confdefs.h >>conftest.$ac_ext
6084cat >>conftest.$ac_ext <<_ACEOF
6085/* end confdefs.h. */
6086
6087_ACEOF
6088rm -f conftest.$ac_objext
6089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6090 (eval $ac_compile) 2>conftest.er1
6091 ac_status=$?
6092 grep -v '^ *+' conftest.er1 >conftest.err
6093 rm -f conftest.er1
6094 cat conftest.err >&5
6095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6096 (exit $ac_status); } &&
215c351a
PB
6097 { ac_try='test -z "$ac_c_werror_flag"
6098 || test ! -s conftest.err'
b5472e1d
NN
6099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6100 (eval $ac_try) 2>&5
6101 ac_status=$?
6102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6103 (exit $ac_status); }; } &&
6104 { ac_try='test -s conftest.$ac_objext'
6105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6106 (eval $ac_try) 2>&5
6107 ac_status=$?
6108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6109 (exit $ac_status); }; }; then
6110 ac_cv_prog_cc_w_no_long_long=yes
6111else
6112 echo "$as_me: failed program was:" >&5
6113sed 's/^/| /' conftest.$ac_ext >&5
6114
6115ac_cv_prog_cc_w_no_long_long=no
6116fi
6117rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6118 CFLAGS="$save_CFLAGS"
6119
6120fi
6121echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6122echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
6123
6124echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6125echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
6126if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6127 echo $ECHO_N "(cached) $ECHO_C" >&6
6128else
6129 save_CFLAGS="$CFLAGS"
6130 CFLAGS="-Wno-variadic-macros"
6131 cat >conftest.$ac_ext <<_ACEOF
6132/* confdefs.h. */
6133_ACEOF
6134cat confdefs.h >>conftest.$ac_ext
6135cat >>conftest.$ac_ext <<_ACEOF
6136/* end confdefs.h. */
6137
6138_ACEOF
6139rm -f conftest.$ac_objext
6140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6141 (eval $ac_compile) 2>conftest.er1
6142 ac_status=$?
6143 grep -v '^ *+' conftest.er1 >conftest.err
6144 rm -f conftest.er1
6145 cat conftest.err >&5
6146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6147 (exit $ac_status); } &&
215c351a
PB
6148 { ac_try='test -z "$ac_c_werror_flag"
6149 || test ! -s conftest.err'
b5472e1d
NN
6150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6151 (eval $ac_try) 2>&5
6152 ac_status=$?
6153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6154 (exit $ac_status); }; } &&
6155 { ac_try='test -s conftest.$ac_objext'
6156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6157 (eval $ac_try) 2>&5
6158 ac_status=$?
6159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6160 (exit $ac_status); }; }; then
6161 ac_cv_prog_cc_w_no_variadic_macros=yes
6162else
6163 echo "$as_me: failed program was:" >&5
6164sed 's/^/| /' conftest.$ac_ext >&5
6165
6166ac_cv_prog_cc_w_no_variadic_macros=no
6167fi
6168rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6169 CFLAGS="$save_CFLAGS"
6170
6171fi
6172echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6173echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
6174
34a86c2b 6175strict1_warn=
b5472e1d
NN
6176if test $ac_cv_prog_cc_w_no_long_long = yes \
6177 && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then
6178 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros"
34a86c2b
NN
6179fi
6180
6181
643d3bd2
NN
6182# Add -Wold-style-definition if it's accepted
6183echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6184echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
6185if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6186 echo $ECHO_N "(cached) $ECHO_C" >&6
6187else
6188 save_CFLAGS="$CFLAGS"
6189 CFLAGS="-Wold-style-definition"
6190 cat >conftest.$ac_ext <<_ACEOF
6191/* confdefs.h. */
6192_ACEOF
6193cat confdefs.h >>conftest.$ac_ext
6194cat >>conftest.$ac_ext <<_ACEOF
6195/* end confdefs.h. */
6196
6197_ACEOF
6198rm -f conftest.$ac_objext
6199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6200 (eval $ac_compile) 2>conftest.er1
6201 ac_status=$?
6202 grep -v '^ *+' conftest.er1 >conftest.err
6203 rm -f conftest.er1
6204 cat conftest.err >&5
6205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6206 (exit $ac_status); } &&
215c351a
PB
6207 { ac_try='test -z "$ac_c_werror_flag"
6208 || test ! -s conftest.err'
643d3bd2
NN
6209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6210 (eval $ac_try) 2>&5
6211 ac_status=$?
6212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6213 (exit $ac_status); }; } &&
6214 { ac_try='test -s conftest.$ac_objext'
6215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6216 (eval $ac_try) 2>&5
6217 ac_status=$?
6218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6219 (exit $ac_status); }; }; then
6220 ac_cv_prog_cc_w_old_style_definition=yes
6221else
6222 echo "$as_me: failed program was:" >&5
6223sed 's/^/| /' conftest.$ac_ext >&5
6224
6225ac_cv_prog_cc_w_old_style_definition=no
6226fi
6227rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6228 CFLAGS="$save_CFLAGS"
6229
6230fi
6231echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
6232echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
6233if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
6234 strict1_warn="${strict1_warn} -Wold-style-definition"
6235fi
6236
09a9c095
NN
6237# Enable -Werror, period.
6238# Check whether --enable-werror_always or --disable-werror_always was given.
6239if test "${enable_werror_always+set}" = set; then
6240 enableval="$enable_werror_always"
6241
6242else
6243 enable_werror_always=no
6244fi;
6245if test x${enable_werror_always} = xyes ; then
6246 strict1_warn="${strict1_warn} -Werror"
6247 WERROR=-Werror
6248fi
6249
ba479fd2 6250# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
6251# That's useful for people building cross-compilers, or just running a
6252# quick `make'.
6253warn_cflags=
6254if test "x$GCC" = "xyes"; then
6255 warn_cflags='$(GCC_WARN_CFLAGS)'
6256fi
6257
6258
dd859b8a 6259# Enable -Werror in bootstrap stage2 and later.
dd859b8a
KG
6260# Check whether --enable-werror or --disable-werror was given.
6261if test "${enable_werror+set}" = set; then
6262 enableval="$enable_werror"
ba479fd2 6263
dd859b8a 6264else
06c37c96
NS
6265 if test x$is_release = x ; then
6266 # Default to "yes" on development branches.
dd859b8a 6267 enable_werror=yes
06c37c96
NS
6268else
6269 # Default to "no" on release branches.
6270 enable_werror=no
6271fi
ba479fd2 6272fi;
dd859b8a
KG
6273if test x$enable_werror = xyes ; then
6274 WERROR=-Werror
6275fi
6276
6277
414d23ae
HPN
6278# Enable expensive internal checks
6279# Check whether --enable-checking or --disable-checking was given.
6280if test "${enable_checking+set}" = set; then
6281 enableval="$enable_checking"
e1bbfc5c
NS
6282 ac_checking_flags="${enableval}"
6283else
6284
6285# Determine the default checks.
6286if test x$is_release = x ; then
6287 ac_checking_flags=yes
6288else
6289 ac_checking_flags=release
6290fi
6291fi;
6292ac_assert_checking=1
6293ac_checking=
414d23ae
HPN
6294ac_tree_checking=
6295ac_rtl_checking=
6296ac_rtlflag_checking=
6297ac_gc_checking=
6298ac_gc_always_collect=
5dfa45d0 6299ac_fold_checking=
e1bbfc5c
NS
6300IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6301for check in $ac_checking_flags
6302do
6303 case $check in
6304 yes) ac_assert_checking=1 ; ac_checking=1 ;
6305 ac_tree_checking=1 ; ac_gc_checking=1 ;
6306 ac_rtlflag_checking=1 ;;
6307 no) ac_assert_checking= ; ac_checking= ;
6308 ac_tree_checking= ; ac_rtl_checking= ;
6309 ac_rtlflag_checking= ; ac_gc_checking= ;
6310 ac_gc_always_collect= ; ac_fold_checking= ;;
6311 all) ac_assert_checking=1 ; ac_checking=1 ;
6312 ac_tree_checking=1 ; ac_rtl_checking=1 ;
6313 ac_rtlflag_checking=1 ; ac_gc_checking=1 ;
6314 ac_gc_always_collect=1 ; ac_fold_checking=1 ;;
6315 release) ac_assert_checking=1 ;;
6316 assert) ac_assert_checking=1 ;;
6317 fold) ac_fold_checking=1 ;;
6318 gc) ac_gc_checking=1 ;;
6319 gcac) ac_gc_always_collect=1 ;;
6320 misc) ac_checking=1 ;;
6321 rtlflag) ac_rtlflag_checking=1 ;;
6322 rtl) ac_rtl_checking=1 ;;
6323 tree) ac_tree_checking=1 ;;
6324 valgrind) ac_checking_valgrind=1 ;;
6325 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
6326echo "$as_me: error: unknown check category $check" >&2;}
6327 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
6328 esac
6329done
6330IFS="$ac_save_IFS"
06c37c96 6331
ba479fd2
NN
6332nocommon_flag=""
6333if test x$ac_checking != x ; then
6334
6335cat >>confdefs.h <<\_ACEOF
6336#define ENABLE_CHECKING 1
6337_ACEOF
6338
6339 nocommon_flag=-fno-common
6340fi
6341
06c37c96
NS
6342if test x$ac_assert_checking != x ; then
6343
6344cat >>confdefs.h <<\_ACEOF
6345#define ENABLE_ASSERT_CHECKING 1
6346_ACEOF
6347
6348fi
ba479fd2
NN
6349if test x$ac_tree_checking != x ; then
6350
6351cat >>confdefs.h <<\_ACEOF
6352#define ENABLE_TREE_CHECKING 1
6353_ACEOF
6354
13f05fd0 6355 TREEBROWSER=tree-browser.o
ba479fd2 6356fi
13f05fd0 6357
ba479fd2
NN
6358if test x$ac_rtl_checking != x ; then
6359
6360cat >>confdefs.h <<\_ACEOF
6361#define ENABLE_RTL_CHECKING 1
6362_ACEOF
6363
6364fi
6365if test x$ac_rtlflag_checking != x ; then
6366
6367cat >>confdefs.h <<\_ACEOF
6368#define ENABLE_RTL_FLAG_CHECKING 1
6369_ACEOF
6370
6371fi
6372if test x$ac_gc_checking != x ; then
6373
6374cat >>confdefs.h <<\_ACEOF
6375#define ENABLE_GC_CHECKING 1
6376_ACEOF
6377
6378fi
6379if test x$ac_gc_always_collect != x ; then
6380
6381cat >>confdefs.h <<\_ACEOF
6382#define ENABLE_GC_ALWAYS_COLLECT 1
6383_ACEOF
6384
6385fi
6386if test x$ac_fold_checking != x ; then
6387
6388cat >>confdefs.h <<\_ACEOF
6389#define ENABLE_FOLD_CHECKING 1
6390_ACEOF
6391
6392fi
6393valgrind_path_defines=
6394valgrind_command=
6395
ba479fd2
NN
6396if test "${ac_cv_header_valgrind_h+set}" = set; then
6397 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6398echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6399if test "${ac_cv_header_valgrind_h+set}" = set; then
6400 echo $ECHO_N "(cached) $ECHO_C" >&6
6401fi
6402echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6403echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6404else
6405 # Is the header compilable?
6406echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6407echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
6408cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6409/* confdefs.h. */
6410_ACEOF
6411cat confdefs.h >>conftest.$ac_ext
6412cat >>conftest.$ac_ext <<_ACEOF
6413/* end confdefs.h. */
6414$ac_includes_default
63cf211a 6415#include <valgrind.h>
ba479fd2
NN
6416_ACEOF
6417rm -f conftest.$ac_objext
6418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6419 (eval $ac_compile) 2>conftest.er1
ba479fd2 6420 ac_status=$?
86da66b5
HPN
6421 grep -v '^ *+' conftest.er1 >conftest.err
6422 rm -f conftest.er1
6423 cat conftest.err >&5
ba479fd2
NN
6424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6425 (exit $ac_status); } &&
215c351a
PB
6426 { ac_try='test -z "$ac_c_werror_flag"
6427 || test ! -s conftest.err'
86da66b5
HPN
6428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6429 (eval $ac_try) 2>&5
6430 ac_status=$?
6431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6432 (exit $ac_status); }; } &&
6433 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6435 (eval $ac_try) 2>&5
6436 ac_status=$?
6437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6438 (exit $ac_status); }; }; then
6439 ac_header_compiler=yes
6440else
6441 echo "$as_me: failed program was:" >&5
6442sed 's/^/| /' conftest.$ac_ext >&5
6443
6444ac_header_compiler=no
6445fi
86da66b5 6446rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
6447echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6448echo "${ECHO_T}$ac_header_compiler" >&6
6449
6450# Is the header present?
6451echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6452echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
6453cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6454/* confdefs.h. */
6455_ACEOF
6456cat confdefs.h >>conftest.$ac_ext
6457cat >>conftest.$ac_ext <<_ACEOF
6458/* end confdefs.h. */
6459#include <valgrind.h>
6460_ACEOF
6461if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6462 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6463 ac_status=$?
6464 grep -v '^ *+' conftest.er1 >conftest.err
6465 rm -f conftest.er1
6466 cat conftest.err >&5
6467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6468 (exit $ac_status); } >/dev/null; then
6469 if test -s conftest.err; then
6470 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6471 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6472 else
6473 ac_cpp_err=
6474 fi
6475else
6476 ac_cpp_err=yes
6477fi
6478if test -z "$ac_cpp_err"; then
6479 ac_header_preproc=yes
6480else
6481 echo "$as_me: failed program was:" >&5
6482sed 's/^/| /' conftest.$ac_ext >&5
6483
6484 ac_header_preproc=no
6485fi
6486rm -f conftest.err conftest.$ac_ext
6487echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6488echo "${ECHO_T}$ac_header_preproc" >&6
6489
6490# So? What about this header?
86da66b5
HPN
6491case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6492 yes:no: )
ba479fd2
NN
6493 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6494echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
6495 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6496echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6497 ac_header_preproc=yes
ba479fd2 6498 ;;
86da66b5 6499 no:yes:* )
ba479fd2
NN
6500 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6501echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
6502 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6503echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6504 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6505echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6506 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6507echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
6508 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6509echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
6510 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6511echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
ba479fd2
NN
6512 (
6513 cat <<\_ASBOX
86da66b5
HPN
6514## ------------------------------------------ ##
6515## Report this to the AC_PACKAGE_NAME lists. ##
6516## ------------------------------------------ ##
ba479fd2
NN
6517_ASBOX
6518 ) |
6519 sed "s/^/$as_me: WARNING: /" >&2
6520 ;;
6521esac
6522echo "$as_me:$LINENO: checking for valgrind.h" >&5
6523echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6524if test "${ac_cv_header_valgrind_h+set}" = set; then
6525 echo $ECHO_N "(cached) $ECHO_C" >&6
6526else
6527 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 6528fi
ba479fd2
NN
6529echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6530echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6531
6e3f3080 6532fi
ba479fd2 6533if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
6534 have_valgrind_h=yes
6535else
ba479fd2 6536 have_valgrind_h=no
6938ec6c
NN
6537fi
6538
6539
ba479fd2 6540
414d23ae
HPN
6541if test x$ac_checking_valgrind != x ; then
6542 # It is certainly possible that there's valgrind but no valgrind.h.
6543 # GCC relies on making annotations so we must have both.
ba479fd2
NN
6544 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6545echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
6546 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6547/* confdefs.h. */
6548_ACEOF
6549cat confdefs.h >>conftest.$ac_ext
6550cat >>conftest.$ac_ext <<_ACEOF
6551/* end confdefs.h. */
a207b594 6552#include <valgrind/memcheck.h>
14011ca4
AJ
6553#ifndef VALGRIND_DISCARD
6554#error VALGRIND_DISCARD not defined
6555#endif
ba479fd2
NN
6556_ACEOF
6557if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6558 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6559 ac_status=$?
6560 grep -v '^ *+' conftest.er1 >conftest.err
6561 rm -f conftest.er1
6562 cat conftest.err >&5
6563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6564 (exit $ac_status); } >/dev/null; then
6565 if test -s conftest.err; then
6566 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6567 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6568 else
6569 ac_cpp_err=
6570 fi
6571else
6572 ac_cpp_err=yes
6573fi
6574if test -z "$ac_cpp_err"; then
a207b594
HPN
6575 gcc_cv_header_valgrind_memcheck_h=yes
6576else
ba479fd2
NN
6577 echo "$as_me: failed program was:" >&5
6578sed 's/^/| /' conftest.$ac_ext >&5
6579
a207b594
HPN
6580 gcc_cv_header_valgrind_memcheck_h=no
6581fi
ba479fd2
NN
6582rm -f conftest.err conftest.$ac_ext
6583 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6584echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6585 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6586echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
6587 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6588/* confdefs.h. */
6589_ACEOF
6590cat confdefs.h >>conftest.$ac_ext
6591cat >>conftest.$ac_ext <<_ACEOF
6592/* end confdefs.h. */
a207b594
HPN
6593#include <memcheck.h>
6594#ifndef VALGRIND_DISCARD
6595#error VALGRIND_DISCARD not defined
6596#endif
ba479fd2
NN
6597_ACEOF
6598if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6599 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6600 ac_status=$?
6601 grep -v '^ *+' conftest.er1 >conftest.err
6602 rm -f conftest.er1
6603 cat conftest.err >&5
6604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6605 (exit $ac_status); } >/dev/null; then
6606 if test -s conftest.err; then
6607 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6608 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6609 else
6610 ac_cpp_err=
6611 fi
6612else
6613 ac_cpp_err=yes
6614fi
6615if test -z "$ac_cpp_err"; then
14011ca4
AJ
6616 gcc_cv_header_memcheck_h=yes
6617else
ba479fd2
NN
6618 echo "$as_me: failed program was:" >&5
6619sed 's/^/| /' conftest.$ac_ext >&5
6620
cafe096b
EC
6621 gcc_cv_header_memcheck_h=no
6622fi
ba479fd2
NN
6623rm -f conftest.err conftest.$ac_ext
6624 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6625echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
6626
56694dd9
ZW
6627# Prepare PATH_SEPARATOR.
6628# The user is always right.
6629if test "${PATH_SEPARATOR+set}" != set; then
6630 echo "#! /bin/sh" >conf$$.sh
6631 echo "exit 0" >>conf$$.sh
6632 chmod +x conf$$.sh
6633 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6634 PATH_SEPARATOR=';'
6635 else
6636 PATH_SEPARATOR=:
6637 fi
6638 rm -f conf$$.sh
6639fi
6640
6641# Find out how to test for executable files. Don't use a zero-byte file,
6642# as systems may use methods other than mode bits to determine executability.
6643cat >conf$$.file <<_ASEOF
6644#! /bin/sh
6645exit 0
6646_ASEOF
6647chmod +x conf$$.file
6648if test -x conf$$.file >/dev/null 2>&1; then
6649 ac_executable_p="test -x"
6650else
6651 ac_executable_p="test -f"
6652fi
6653rm -f conf$$.file
6654
6655# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 6656set dummy valgrind; ac_word=$2
ba479fd2
NN
6657echo "$as_me:$LINENO: checking for $ac_word" >&5
6658echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6659if test "${ac_cv_path_valgrind_path+set}" = set; then
6660 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
6661else
6662 case "$valgrind_path" in
56694dd9
ZW
6663 [\\/]* | ?:[\\/]*)
6664 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6665 ;;
414d23ae 6666 *)
56694dd9
ZW
6667 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6668 for ac_dir in $PATH; do
6669 IFS="$ac_save_IFS"
6670 test -z "$ac_dir" && ac_dir=.
6671 for ac_exec_ext in '' $ac_executable_extensions; do
6672 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6673 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6674 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6675 break 2
6676 fi
6677 fi
6678 done
6679 done
6680 IFS="$ac_save_IFS"
6681 ;;
414d23ae 6682esac
75e93faa 6683fi
414d23ae
HPN
6684valgrind_path="$ac_cv_path_valgrind_path"
6685if test -n "$valgrind_path"; then
ba479fd2
NN
6686 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6687echo "${ECHO_T}$valgrind_path" >&6
414d23ae 6688else
ba479fd2
NN
6689 echo "$as_me:$LINENO: result: no" >&5
6690echo "${ECHO_T}no" >&6
414d23ae
HPN
6691fi
6692
a207b594
HPN
6693 if test "x$valgrind_path" = "x" \
6694 || (test $have_valgrind_h = no \
6695 && test $gcc_cv_header_memcheck_h = no \
6696 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
6697 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6698echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6699 { (exit 1); exit 1; }; }
414d23ae
HPN
6700 fi
6701 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6702 valgrind_command="$valgrind_path -q"
ba479fd2
NN
6703
6704cat >>confdefs.h <<\_ACEOF
414d23ae 6705#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 6706_ACEOF
75e93faa 6707
a207b594 6708 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
6709
6710cat >>confdefs.h <<\_ACEOF
a207b594 6711#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 6712_ACEOF
a207b594
HPN
6713
6714 fi
14011ca4 6715 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
6716
6717cat >>confdefs.h <<\_ACEOF
14011ca4 6718#define HAVE_MEMCHECK_H 1
ba479fd2 6719_ACEOF
14011ca4
AJ
6720
6721 fi
414d23ae 6722fi
75e93faa 6723
75e93faa
ZW
6724
6725
74ee1642
PB
6726# Check whether --enable-mapped-location or --disable-mapped-location was given.
6727if test "${enable_mapped_location+set}" = set; then
6728 enableval="$enable_mapped_location"
6729
6730else
6731 enable_mapped_location=no
6732fi;
6733
6734if test "$enable_mapped_location" = yes ; then
6735
6736cat >>confdefs.h <<\_ACEOF
6737#define USE_MAPPED_LOCATION 1
6738_ACEOF
6739
6740fi
6741
414d23ae
HPN
6742# Enable code coverage collection
6743# Check whether --enable-coverage or --disable-coverage was given.
6744if test "${enable_coverage+set}" = set; then
6745 enableval="$enable_coverage"
6746 case "${enableval}" in
6dd297da
NN
6747 yes|noopt)
6748 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6749 ;;
6750 opt)
6751 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6752 ;;
6753 no)
6754 # a.k.a. --disable-coverage
6755 coverage_flags=""
6756 ;;
6757 *)
6758 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
6759echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6760 { (exit 1); exit 1; }; }
6dd297da 6761 ;;
414d23ae 6762esac
75e93faa 6763else
414d23ae 6764 coverage_flags=""
ba479fd2 6765fi;
5c3bc9fb 6766
414d23ae 6767
439a7e54
DN
6768# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
6769if test "${enable_gather_detailed_mem_stats+set}" = set; then
6770 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 6771
439a7e54
DN
6772else
6773 enable_gather_detailed_mem_stats=no
ba479fd2 6774fi;
439a7e54 6775if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
6776
6777cat >>confdefs.h <<\_ACEOF
439a7e54 6778#define GATHER_STATISTICS 1
ba479fd2 6779_ACEOF
439a7e54
DN
6780
6781fi
6782
73458fb7
NN
6783# -------------------------------
6784# Miscenalleous configure options
6785# -------------------------------
34a86c2b
NN
6786
6787# With stabs
ba479fd2 6788
34a86c2b
NN
6789# Check whether --with-stabs or --without-stabs was given.
6790if test "${with_stabs+set}" = set; then
6791 withval="$with_stabs"
6792 stabs="$with_stabs"
6793else
6794 stabs=no
ba479fd2 6795fi;
cafe096b 6796
34a86c2b
NN
6797# Determine whether or not multilibs are enabled.
6798# Check whether --enable-multilib or --disable-multilib was given.
6799if test "${enable_multilib+set}" = set; then
6800 enableval="$enable_multilib"
ba479fd2 6801
34a86c2b
NN
6802else
6803 enable_multilib=yes
ba479fd2 6804fi;
75e93faa 6805
34a86c2b 6806
414d23ae
HPN
6807# Enable __cxa_atexit for C++.
6808# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
6809if test "${enable___cxa_atexit+set}" = set; then
6810 enableval="$enable___cxa_atexit"
75e93faa 6811
ba479fd2 6812fi;
75e93faa 6813
414d23ae
HPN
6814# Enable threads
6815# Pass with no value to take the default
6816# Pass with a value to specify a thread package
6817# Check whether --enable-threads or --disable-threads was given.
6818if test "${enable_threads+set}" = set; then
6819 enableval="$enable_threads"
ba479fd2 6820
414d23ae
HPN
6821else
6822 enable_threads=''
ba479fd2 6823fi;
414d23ae
HPN
6824
6825# Check whether --enable-objc-gc or --disable-objc-gc was given.
6826if test "${enable_objc_gc+set}" = set; then
6827 enableval="$enable_objc_gc"
6828 if test x$enable_objc_gc = xno; then
6829 objc_boehm_gc=''
6830else
6831 objc_boehm_gc=1
6832fi
6833else
6834 objc_boehm_gc=''
ba479fd2 6835fi;
75e93faa
ZW
6836
6837
414d23ae
HPN
6838# Check whether --with-dwarf2 or --without-dwarf2 was given.
6839if test "${with_dwarf2+set}" = set; then
6840 withval="$with_dwarf2"
6841 dwarf2="$with_dwarf2"
75e93faa 6842else
414d23ae 6843 dwarf2=no
ba479fd2 6844fi;
75e93faa 6845
414d23ae
HPN
6846# Check whether --enable-shared or --disable-shared was given.
6847if test "${enable_shared+set}" = set; then
6848 enableval="$enable_shared"
ba479fd2 6849
414d23ae
HPN
6850 case $enable_shared in
6851 yes | no) ;;
6852 *)
6853 enable_shared=no
6854 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6855 for pkg in $enableval; do
6856 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
6857 enable_shared=yes
6858 fi
6859 done
6860 IFS="$ac_save_ifs"
6861 ;;
6862 esac
6863
75e93faa 6864else
414d23ae 6865 enable_shared=yes
ba479fd2 6866fi;
75e93faa 6867
75e93faa 6868
75e93faa 6869
4977bab6
ZW
6870# Check whether --with-sysroot or --without-sysroot was given.
6871if test "${with_sysroot+set}" = set; then
6872 withval="$with_sysroot"
ba479fd2 6873
4977bab6 6874 case ${with_sysroot} in
caa55b1e 6875 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
6876 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
6877 esac
ba479fd2 6878
4977bab6
ZW
6879 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
6880 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
6881
047d636f
DJ
6882 if test "x$exec_prefix" = xNONE; then
6883 if test "x$prefix" = xNONE; then
6884 test_prefix=/usr/local
6885 else
6886 test_prefix=$prefix
6887 fi
6888 else
6889 test_prefix=$exec_prefix
6890 fi
6891 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
6892 "${test_prefix}"|"${test_prefix}/"*|\
6893 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
6894 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
6895 TARGET_SYSTEM_ROOT_DEFINE="$t"
6896 ;;
6897 esac
6898
4977bab6 6899else
ba479fd2 6900
4977bab6 6901 TARGET_SYSTEM_ROOT=
db720d9a 6902 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
6903 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
6904
ba479fd2 6905fi;
4977bab6
ZW
6906
6907
6908
6909
d1bd0ded 6910# Build with intermodule optimisations
d1bd0ded
GK
6911# Check whether --enable-intermodule or --disable-intermodule was given.
6912if test "${enable_intermodule+set}" = set; then
6913 enableval="$enable_intermodule"
0c46c5c7
KC
6914 case ${enable_intermodule} in
6915 yes) onestep="-onestep";;
6916 *) onestep="";;
d1bd0ded 6917esac
0c46c5c7
KC
6918else
6919 onestep=""
ba479fd2 6920fi;
d1bd0ded
GK
6921
6922
f3c9f174
NN
6923# Sanity check enable_languages in case someone does not run the toplevel
6924# configure # script.
6925# Check whether --enable-languages or --disable-languages was given.
6926if test "${enable_languages+set}" = set; then
6927 enableval="$enable_languages"
6928 case ,${enable_languages}, in
6929 ,,|,yes,)
6930 # go safe -- we cannot be much sure without the toplevel
6931 # configure's
6932 # analysis of which target libs are present and usable
6933 enable_languages=c
6934 ;;
6935 *,all,*)
6936 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
6937echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
6938 { (exit 1); exit 1; }; }
6939 ;;
6940 *,c,*)
6941 ;;
6942 *)
6943 enable_languages=c,${enable_languages}
6944 ;;
6945esac
6946else
6947 enable_languages=c
6948fi;
6949
6950subdirs=
6951for lang in ${srcdir}/*/config-lang.in
6952do
6953 case $lang in
6954 # The odd quoting in the next line works around
6955 # an apparent bug in bash 1.12 on linux.
6956 ${srcdir}/[*]/config-lang.in) ;;
6957 *)
6958 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6959 if test "x$lang_alias" = x
6960 then
6961 echo "$lang doesn't set \$language." 1>&2
6962 exit 1
6963 fi
6964 case ",$enable_languages," in
6965 *,$lang_alias,*)
6966 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
6967 esac
6968 ;;
6969 esac
6970done
6971
6972
73458fb7
NN
6973# -------------------------
6974# Checks for other programs
6975# -------------------------
5b67ad6f 6976
ba479fd2
NN
6977echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6978echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
86da66b5 6979set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
ba479fd2
NN
6980if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
6981 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 6982else
ba479fd2 6983 cat >conftest.make <<\_ACEOF
e9a25f70 6984all:
ba479fd2
NN
6985 @echo 'ac_maketemp="$(MAKE)"'
6986_ACEOF
e9a25f70 6987# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 6988eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
6989if test -n "$ac_maketemp"; then
6990 eval ac_cv_prog_make_${ac_make}_set=yes
6991else
6992 eval ac_cv_prog_make_${ac_make}_set=no
6993fi
ba479fd2 6994rm -f conftest.make
e9a25f70
JL
6995fi
6996if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
6997 echo "$as_me:$LINENO: result: yes" >&5
6998echo "${ECHO_T}yes" >&6
e9a25f70
JL
6999 SET_MAKE=
7000else
ba479fd2
NN
7001 echo "$as_me:$LINENO: result: no" >&5
7002echo "${ECHO_T}no" >&6
e9a25f70
JL
7003 SET_MAKE="MAKE=${MAKE-make}"
7004fi
7005
7006
861bb6c1 7007# Find some useful tools
ba479fd2 7008for ac_prog in gawk mawk nawk awk
861bb6c1 7009do
ba479fd2 7010 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 7011set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7012echo "$as_me:$LINENO: checking for $ac_word" >&5
7013echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7014if test "${ac_cv_prog_AWK+set}" = set; then
7015 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7016else
7017 if test -n "$AWK"; then
7018 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7019else
ba479fd2
NN
7020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7021for as_dir in $PATH
7022do
7023 IFS=$as_save_IFS
7024 test -z "$as_dir" && as_dir=.
7025 for ac_exec_ext in '' $ac_executable_extensions; do
7026 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7027 ac_cv_prog_AWK="$ac_prog"
7028 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7029 break 2
7030 fi
7031done
7032done
7033
861bb6c1
JL
7034fi
7035fi
ba479fd2 7036AWK=$ac_cv_prog_AWK
861bb6c1 7037if test -n "$AWK"; then
ba479fd2
NN
7038 echo "$as_me:$LINENO: result: $AWK" >&5
7039echo "${ECHO_T}$AWK" >&6
861bb6c1 7040else
ba479fd2
NN
7041 echo "$as_me:$LINENO: result: no" >&5
7042echo "${ECHO_T}no" >&6
861bb6c1
JL
7043fi
7044
ba479fd2 7045 test -n "$AWK" && break
861bb6c1
JL
7046done
7047
776dc15d 7048# We need awk to create options.c and options.h.
2c4902b9
NN
7049# Bail out if it's missing.
7050case ${AWK} in
ba479fd2
NN
7051 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7052echo "$as_me: error: can't build without awk, bailing out" >&2;}
7053 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
7054esac
7055
ba479fd2
NN
7056echo "$as_me:$LINENO: checking whether ln -s works" >&5
7057echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
7058if test "${gcc_cv_prog_LN_S+set}" = set; then
7059 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7060else
7061 rm -f conftestdata_t
7062echo >conftestdata_f
7063if ln -s conftestdata_f conftestdata_t 2>/dev/null
7064then
7065 gcc_cv_prog_LN_S="ln -s"
7066else
7067 if ln conftestdata_f conftestdata_t 2>/dev/null
7068 then
7069 gcc_cv_prog_LN_S=ln
7070 else
35f06ae4
PB
7071 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7072 then
06c3418c 7073 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
7074 else
7075 gcc_cv_prog_LN_S=cp
7076 fi
0a4b6309
RL
7077 fi
7078fi
7079rm -f conftestdata_f conftestdata_t
7080
7081fi
7082LN_S="$gcc_cv_prog_LN_S"
7083if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
7084 echo "$as_me:$LINENO: result: yes" >&5
7085echo "${ECHO_T}yes" >&6
0a4b6309
RL
7086else
7087 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
7088 echo "$as_me:$LINENO: result: no, using ln" >&5
7089echo "${ECHO_T}no, using ln" >&6
0a4b6309 7090 else
35f06ae4
PB
7091 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7092echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
7093 fi
7094fi
7095
41e622a8
AP
7096echo "$as_me:$LINENO: checking whether ln works" >&5
7097echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
7098if test "${acx_cv_prog_LN+set}" = set; then
7099 echo $ECHO_N "(cached) $ECHO_C" >&6
7100else
7101 rm -f conftestdata_t
7102echo >conftestdata_f
7103if ln conftestdata_f conftestdata_t 2>/dev/null
7104then
7105 acx_cv_prog_LN=ln
7106else
7107 acx_cv_prog_LN=no
7108fi
7109rm -f conftestdata_f conftestdata_t
7110
7111fi
7112if test $acx_cv_prog_LN = no; then
7113 LN="$LN_S"
7114 echo "$as_me:$LINENO: result: no, using $LN" >&5
7115echo "${ECHO_T}no, using $LN" >&6
7116else
7117 LN="$acx_cv_prog_LN"
7118 echo "$as_me:$LINENO: result: yes" >&5
7119echo "${ECHO_T}yes" >&6
7120fi
7121
ba479fd2
NN
7122if test -n "$ac_tool_prefix"; then
7123 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7124set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7125echo "$as_me:$LINENO: checking for $ac_word" >&5
7126echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7127if test "${ac_cv_prog_RANLIB+set}" = set; then
7128 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7129else
7130 if test -n "$RANLIB"; then
7131 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7132else
ba479fd2
NN
7133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7134for as_dir in $PATH
7135do
7136 IFS=$as_save_IFS
7137 test -z "$as_dir" && as_dir=.
7138 for ac_exec_ext in '' $ac_executable_extensions; do
7139 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7140 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7141 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7142 break 2
7143 fi
7144done
7145done
7146
6e3f3080
NN
7147fi
7148fi
ba479fd2 7149RANLIB=$ac_cv_prog_RANLIB
6e3f3080 7150if test -n "$RANLIB"; then
ba479fd2
NN
7151 echo "$as_me:$LINENO: result: $RANLIB" >&5
7152echo "${ECHO_T}$RANLIB" >&6
7153else
7154 echo "$as_me:$LINENO: result: no" >&5
7155echo "${ECHO_T}no" >&6
7156fi
7157
7158fi
7159if test -z "$ac_cv_prog_RANLIB"; then
7160 ac_ct_RANLIB=$RANLIB
7161 # Extract the first word of "ranlib", so it can be a program name with args.
7162set dummy ranlib; ac_word=$2
7163echo "$as_me:$LINENO: checking for $ac_word" >&5
7164echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7165if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7166 echo $ECHO_N "(cached) $ECHO_C" >&6
7167else
7168 if test -n "$ac_ct_RANLIB"; then
7169 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7170else
7171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7172for as_dir in $PATH
7173do
7174 IFS=$as_save_IFS
7175 test -z "$as_dir" && as_dir=.
7176 for ac_exec_ext in '' $ac_executable_extensions; do
7177 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7178 ac_cv_prog_ac_ct_RANLIB="ranlib"
7179 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7180 break 2
7181 fi
7182done
7183done
7184
7185 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7186fi
7187fi
7188ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7189if test -n "$ac_ct_RANLIB"; then
7190 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7191echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 7192else
ba479fd2
NN
7193 echo "$as_me:$LINENO: result: no" >&5
7194echo "${ECHO_T}no" >&6
7195fi
7196
7197 RANLIB=$ac_ct_RANLIB
7198else
7199 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
7200fi
7201
343a6100
MM
7202case "${host}" in
7203*-*-darwin*)
7204 # By default, the Darwin ranlib will not treat common symbols as
7205 # definitions when building the archive table of contents. Other
7206 # ranlibs do that; pass an option to the Darwin ranlib that makes
7207 # it behave similarly.
7208 ranlib_flags="-c"
7209 ;;
7210*)
7211 ranlib_flags=""
7212esac
7213
7214
0a4b6309
RL
7215# Find a good install program. We prefer a C program (faster),
7216# so one script is as good as another. But avoid the broken or
7217# incompatible versions:
7218# SysV /etc/install, /usr/sbin/install
7219# SunOS /usr/etc/install
7220# IRIX /sbin/install
7221# AIX /bin/install
7222# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7223# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7224# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
7225echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7226echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 7227if test -z "$INSTALL"; then
ba479fd2
NN
7228if test "${ac_cv_path_install+set}" = set; then
7229 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7230else
7231 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7232 for ac_dir in $PATH; do
7233 # Account for people who put trailing slashes in PATH elements.
7234 case "$ac_dir/" in
7235 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7236 *)
7237 # OSF1 and SCO ODT 3.0 have their own names for install.
7238 for ac_prog in ginstall scoinst install; do
7239 if test -f $ac_dir/$ac_prog; then
7240 if test $ac_prog = install &&
7241 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7242 # AIX install. It has an incompatible calling convention.
7243 # OSF/1 installbsd also uses dspmsg, but is usable.
7244 :
7245 else
7246 ac_cv_path_install="$ac_dir/$ac_prog -c"
7247 break 2
7248 fi
7249 fi
7250 done
7251 ;;
7252 esac
7253 done
7254 IFS="$ac_save_IFS"
7255
7256fi
7257 if test "${ac_cv_path_install+set}" = set; then
7258 INSTALL="$ac_cv_path_install"
7259 else
7260 # As a last resort, use the slow shell script. We don't cache a
7261 # path for INSTALL within a source directory, because that will
7262 # break other packages using the cache if that directory is
7263 # removed, or if the path is relative.
7264 INSTALL="$ac_install_sh"
7265 fi
7266fi
ba479fd2
NN
7267echo "$as_me:$LINENO: result: $INSTALL" >&5
7268echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
7269
7270# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7271# It thinks the first close brace ends the variable substitution.
7272test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7273
7274test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7275
861bb6c1 7276
3a000df0 7277# See if cmp has --ignore-initial.
ba479fd2
NN
7278echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7279echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
7280if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7281 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
7282else
7283 echo abfoo >t1
7284 echo cdfoo >t2
269a7343 7285 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
7286 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7287 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 7288 :
3a000df0
KC
7289 else
7290 gcc_cv_prog_cmp_skip=gnucompare
7291 fi
269a7343
KG
7292 fi
7293 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7294 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7295 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7296 :
7297 else
7298 gcc_cv_prog_cmp_skip=fastcompare
7299 fi
7300 fi
3a000df0
KC
7301 fi
7302 rm t1 t2
7303
7304fi
ba479fd2
NN
7305echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7306echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
7307make_compare_target=$gcc_cv_prog_cmp_skip
7308
7309
7310
73458fb7
NN
7311# See if we have the mktemp command.
7312# Extract the first word of "mktemp", so it can be a program name with args.
7313set dummy mktemp; ac_word=$2
ba479fd2
NN
7314echo "$as_me:$LINENO: checking for $ac_word" >&5
7315echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7316if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7317 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7318else
7319 if test -n "$have_mktemp_command"; then
7320 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7321else
ba479fd2
NN
7322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7323for as_dir in $PATH
7324do
7325 IFS=$as_save_IFS
7326 test -z "$as_dir" && as_dir=.
7327 for ac_exec_ext in '' $ac_executable_extensions; do
7328 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7329 ac_cv_prog_have_mktemp_command="yes"
7330 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7331 break 2
7332 fi
7333done
7334done
7335
73458fb7
NN
7336 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7337fi
7338fi
ba479fd2 7339have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 7340if test -n "$have_mktemp_command"; then
ba479fd2
NN
7341 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7342echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 7343else
ba479fd2
NN
7344 echo "$as_me:$LINENO: result: no" >&5
7345echo "${ECHO_T}no" >&6
73458fb7
NN
7346fi
7347
7348
7c27e184
PB
7349MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
7350
7351# See if makeinfo has been installed and is modern enough
7352# that we can use it.
7353# Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 7354set dummy makeinfo; ac_word=$2
ba479fd2
NN
7355echo "$as_me:$LINENO: checking for $ac_word" >&5
7356echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7357if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7358 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7359else
7360 if test -n "$MAKEINFO"; then
7361 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7362else
ba479fd2
NN
7363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7364for as_dir in $PATH
7365do
7366 IFS=$as_save_IFS
7367 test -z "$as_dir" && as_dir=.
7368 for ac_exec_ext in '' $ac_executable_extensions; do
7369 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7370 ac_cv_prog_MAKEINFO="makeinfo"
7371 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7372 break 2
7373 fi
7374done
7375done
7376
73458fb7
NN
7377fi
7378fi
ba479fd2 7379MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 7380if test -n "$MAKEINFO"; then
ba479fd2
NN
7381 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7382echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 7383else
ba479fd2
NN
7384 echo "$as_me:$LINENO: result: no" >&5
7385echo "${ECHO_T}no" >&6
73458fb7
NN
7386fi
7387
7388if test -n "$MAKEINFO"; then
7389 # Found it, now check the version.
ba479fd2
NN
7390 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7391echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
7392if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7393 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7394else
7395 ac_prog_version=`$MAKEINFO --version 2>&1 |
7396 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
215c351a 7397 echo "configure:7397: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
7398 case $ac_prog_version in
7399 '') gcc_cv_prog_makeinfo_modern=no;;
7400 4.[2-9]*)
7401 gcc_cv_prog_makeinfo_modern=yes;;
7402 *) gcc_cv_prog_makeinfo_modern=no;;
7403 esac
7404
7405fi
ba479fd2
NN
7406echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7407echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
7408else
7409 gcc_cv_prog_makeinfo_modern=no
7410fi
7411
73458fb7 7412if test $gcc_cv_prog_makeinfo_modern = no; then
7c27e184 7413 MAKEINFO="$MISSING makeinfo"
ba479fd2
NN
7414 { echo "$as_me:$LINENO: WARNING:
7415*** Makeinfo is missing or too old.
7416*** Info documentation will not be built." >&5
7417echo "$as_me: WARNING:
cafe096b 7418*** Makeinfo is missing or too old.
ba479fd2 7419*** Info documentation will not be built." >&2;}
73458fb7
NN
7420 BUILD_INFO=
7421else
ba479fd2 7422 BUILD_INFO=info
73458fb7
NN
7423fi
7424
7c27e184 7425
73458fb7 7426# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
7427echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7428echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 7429if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
7430 echo "$as_me:$LINENO: result: yes" >&5
7431echo "${ECHO_T}yes" >&6
7432 GENERATED_MANPAGES=generated-manpages
73458fb7 7433else
ba479fd2
NN
7434 echo "$as_me:$LINENO: result: no" >&5
7435echo "${ECHO_T}no" >&6
73458fb7
NN
7436 GENERATED_MANPAGES=
7437fi
7438
7c27e184 7439
73458fb7 7440# How about lex?
7c27e184
PB
7441for ac_prog in flex
7442do
7443 # Extract the first word of "$ac_prog", so it can be a program name with args.
7444set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7445echo "$as_me:$LINENO: checking for $ac_word" >&5
7446echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7447if test "${ac_cv_prog_FLEX+set}" = set; then
7448 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7449else
7450 if test -n "$FLEX"; then
7451 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7452else
ba479fd2
NN
7453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7454for as_dir in $PATH
7455do
7456 IFS=$as_save_IFS
7457 test -z "$as_dir" && as_dir=.
7458 for ac_exec_ext in '' $ac_executable_extensions; do
7459 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7460 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
7461 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7462 break 2
7463 fi
7464done
7465done
7466
73458fb7
NN
7467fi
7468fi
ba479fd2 7469FLEX=$ac_cv_prog_FLEX
73458fb7 7470if test -n "$FLEX"; then
ba479fd2
NN
7471 echo "$as_me:$LINENO: result: $FLEX" >&5
7472echo "${ECHO_T}$FLEX" >&6
73458fb7 7473else
ba479fd2
NN
7474 echo "$as_me:$LINENO: result: no" >&5
7475echo "${ECHO_T}no" >&6
73458fb7
NN
7476fi
7477
7c27e184
PB
7478 test -n "$FLEX" && break
7479done
7480test -n "$FLEX" || FLEX="$MISSING flex"
7481
73458fb7
NN
7482
7483# Bison?
7c27e184
PB
7484for ac_prog in bison
7485do
7486 # Extract the first word of "$ac_prog", so it can be a program name with args.
7487set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7488echo "$as_me:$LINENO: checking for $ac_word" >&5
7489echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7490if test "${ac_cv_prog_BISON+set}" = set; then
7491 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7492else
7493 if test -n "$BISON"; then
7494 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7495else
ba479fd2
NN
7496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7497for as_dir in $PATH
7498do
7499 IFS=$as_save_IFS
7500 test -z "$as_dir" && as_dir=.
7501 for ac_exec_ext in '' $ac_executable_extensions; do
7502 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7503 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
7504 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7505 break 2
7506 fi
7507done
7508done
7509
73458fb7
NN
7510fi
7511fi
ba479fd2 7512BISON=$ac_cv_prog_BISON
73458fb7 7513if test -n "$BISON"; then
ba479fd2
NN
7514 echo "$as_me:$LINENO: result: $BISON" >&5
7515echo "${ECHO_T}$BISON" >&6
73458fb7 7516else
ba479fd2
NN
7517 echo "$as_me:$LINENO: result: no" >&5
7518echo "${ECHO_T}no" >&6
73458fb7
NN
7519fi
7520
7c27e184
PB
7521 test -n "$BISON" && break
7522done
7523test -n "$BISON" || BISON="$MISSING bison"
7524
7525
7526# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7527# check for build == host before using them.
73458fb7 7528
f6a874ac 7529# NM
414adbdd
GK
7530if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7531 && test -d ../binutils ; then
f6a874ac
JW
7532 NM='$(objdir)/../binutils/nm-new'
7533else
7534 # Extract the first word of "nm", so it can be a program name with args.
7535set dummy nm; ac_word=$2
7536echo "$as_me:$LINENO: checking for $ac_word" >&5
7537echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7538if test "${ac_cv_prog_NM+set}" = set; then
7539 echo $ECHO_N "(cached) $ECHO_C" >&6
7540else
7541 if test -n "$NM"; then
7542 ac_cv_prog_NM="$NM" # Let the user override the test.
7543else
7544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7545for as_dir in $PATH
7546do
7547 IFS=$as_save_IFS
7548 test -z "$as_dir" && as_dir=.
7549 for ac_exec_ext in '' $ac_executable_extensions; do
7550 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7551 ac_cv_prog_NM="nm"
7552 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7553 break 2
7554 fi
7555done
7556done
7557
7558 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7559fi
7560fi
7561NM=$ac_cv_prog_NM
7562if test -n "$NM"; then
7563 echo "$as_me:$LINENO: result: $NM" >&5
7564echo "${ECHO_T}$NM" >&6
7565else
7566 echo "$as_me:$LINENO: result: no" >&5
7567echo "${ECHO_T}no" >&6
7568fi
7569
7570fi
7571
7572# AR
414adbdd
GK
7573if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7574 && test -d ../binutils ; then
f6a874ac
JW
7575 AR='$(objdir)/../binutils/ar'
7576else
7577 # Extract the first word of "ar", so it can be a program name with args.
7578set dummy ar; ac_word=$2
7579echo "$as_me:$LINENO: checking for $ac_word" >&5
7580echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7581if test "${ac_cv_prog_AR+set}" = set; then
7582 echo $ECHO_N "(cached) $ECHO_C" >&6
7583else
7584 if test -n "$AR"; then
7585 ac_cv_prog_AR="$AR" # Let the user override the test.
7586else
7587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7588for as_dir in $PATH
7589do
7590 IFS=$as_save_IFS
7591 test -z "$as_dir" && as_dir=.
7592 for ac_exec_ext in '' $ac_executable_extensions; do
7593 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7594 ac_cv_prog_AR="ar"
7595 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7596 break 2
7597 fi
7598done
7599done
7600
7601 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7602fi
7603fi
7604AR=$ac_cv_prog_AR
7605if test -n "$AR"; then
7606 echo "$as_me:$LINENO: result: $AR" >&5
7607echo "${ECHO_T}$AR" >&6
7608else
7609 echo "$as_me:$LINENO: result: no" >&5
7610echo "${ECHO_T}no" >&6
7611fi
7612
7613fi
7614
7615
73458fb7
NN
7616# --------------------
7617# Checks for C headers
7618# --------------------
7619
ba479fd2
NN
7620echo "$as_me:$LINENO: checking for GNU C library" >&5
7621echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
7622if test "${gcc_cv_glibc+set}" = set; then
7623 echo $ECHO_N "(cached) $ECHO_C" >&6
7624else
7625 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7626/* confdefs.h. */
7627_ACEOF
7628cat confdefs.h >>conftest.$ac_ext
7629cat >>conftest.$ac_ext <<_ACEOF
7630/* end confdefs.h. */
73458fb7 7631#include <features.h>
ba479fd2
NN
7632int
7633main ()
7634{
73458fb7
NN
7635
7636#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7637#error Not a GNU C library system
7638#endif
ba479fd2
NN
7639 ;
7640 return 0;
7641}
7642_ACEOF
7643rm -f conftest.$ac_objext
7644if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7645 (eval $ac_compile) 2>conftest.er1
ba479fd2 7646 ac_status=$?
86da66b5
HPN
7647 grep -v '^ *+' conftest.er1 >conftest.err
7648 rm -f conftest.er1
7649 cat conftest.err >&5
ba479fd2
NN
7650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7651 (exit $ac_status); } &&
215c351a
PB
7652 { ac_try='test -z "$ac_c_werror_flag"
7653 || test ! -s conftest.err'
86da66b5
HPN
7654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7655 (eval $ac_try) 2>&5
7656 ac_status=$?
7657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7658 (exit $ac_status); }; } &&
7659 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7661 (eval $ac_try) 2>&5
7662 ac_status=$?
7663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7664 (exit $ac_status); }; }; then
73458fb7
NN
7665 gcc_cv_glibc=yes
7666else
ba479fd2
NN
7667 echo "$as_me: failed program was:" >&5
7668sed 's/^/| /' conftest.$ac_ext >&5
7669
7670gcc_cv_glibc=no
73458fb7 7671fi
86da66b5 7672rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
7673fi
7674
ba479fd2
NN
7675echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7676echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 7677if test $gcc_cv_glibc = yes; then
ba479fd2
NN
7678
7679cat >>confdefs.h <<\_ACEOF
73458fb7 7680#define _GNU_SOURCE 1
ba479fd2 7681_ACEOF
73458fb7
NN
7682
7683fi
7684
ca9bc441
NN
7685# Need to reject headers which give warnings, so that the -Werror bootstrap
7686# works later. *sigh* This needs to come before all header checks.
7687
7688ac_c_preproc_warn_flag=yes
7689
ba479fd2
NN
7690echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7691echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7692if test "${ac_cv_header_stdc+set}" = set; then
7693 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7694else
ba479fd2 7695 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7696/* confdefs.h. */
7697_ACEOF
7698cat confdefs.h >>conftest.$ac_ext
7699cat >>conftest.$ac_ext <<_ACEOF
7700/* end confdefs.h. */
956d6950
JL
7701#include <stdlib.h>
7702#include <stdarg.h>
7703#include <string.h>
7704#include <float.h>
ba479fd2
NN
7705
7706int
7707main ()
7708{
7709
7710 ;
7711 return 0;
7712}
7713_ACEOF
7714rm -f conftest.$ac_objext
7715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7716 (eval $ac_compile) 2>conftest.er1
ba479fd2 7717 ac_status=$?
86da66b5
HPN
7718 grep -v '^ *+' conftest.er1 >conftest.err
7719 rm -f conftest.er1
7720 cat conftest.err >&5
ba479fd2
NN
7721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7722 (exit $ac_status); } &&
215c351a
PB
7723 { ac_try='test -z "$ac_c_werror_flag"
7724 || test ! -s conftest.err'
86da66b5
HPN
7725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7726 (eval $ac_try) 2>&5
7727 ac_status=$?
7728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7729 (exit $ac_status); }; } &&
7730 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7732 (eval $ac_try) 2>&5
7733 ac_status=$?
7734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7735 (exit $ac_status); }; }; then
956d6950
JL
7736 ac_cv_header_stdc=yes
7737else
ba479fd2
NN
7738 echo "$as_me: failed program was:" >&5
7739sed 's/^/| /' conftest.$ac_ext >&5
7740
7741ac_cv_header_stdc=no
956d6950 7742fi
86da66b5 7743rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
7744
7745if test $ac_cv_header_stdc = yes; then
7746 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 7747 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7748/* confdefs.h. */
7749_ACEOF
7750cat confdefs.h >>conftest.$ac_ext
7751cat >>conftest.$ac_ext <<_ACEOF
7752/* end confdefs.h. */
956d6950 7753#include <string.h>
ba479fd2
NN
7754
7755_ACEOF
956d6950 7756if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7757 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
7758 :
7759else
956d6950
JL
7760 ac_cv_header_stdc=no
7761fi
7762rm -f conftest*
7763
7764fi
7765
7766if test $ac_cv_header_stdc = yes; then
7767 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 7768 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7769/* confdefs.h. */
7770_ACEOF
7771cat confdefs.h >>conftest.$ac_ext
7772cat >>conftest.$ac_ext <<_ACEOF
7773/* end confdefs.h. */
956d6950 7774#include <stdlib.h>
ba479fd2
NN
7775
7776_ACEOF
956d6950 7777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7778 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
7779 :
7780else
956d6950
JL
7781 ac_cv_header_stdc=no
7782fi
7783rm -f conftest*
7784
7785fi
7786
7787if test $ac_cv_header_stdc = yes; then
7788 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 7789 if test "$cross_compiling" = yes; then
956d6950
JL
7790 :
7791else
ba479fd2 7792 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7793/* confdefs.h. */
7794_ACEOF
7795cat confdefs.h >>conftest.$ac_ext
7796cat >>conftest.$ac_ext <<_ACEOF
7797/* end confdefs.h. */
956d6950 7798#include <ctype.h>
ba479fd2
NN
7799#if ((' ' & 0x0FF) == 0x020)
7800# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7801# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7802#else
7803# define ISLOWER(c) \
86da66b5
HPN
7804 (('a' <= (c) && (c) <= 'i') \
7805 || ('j' <= (c) && (c) <= 'r') \
7806 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
7807# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7808#endif
63cf211a 7809
ba479fd2
NN
7810#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7811int
7812main ()
7813{
7814 int i;
7815 for (i = 0; i < 256; i++)
7816 if (XOR (islower (i), ISLOWER (i))
86da66b5 7817 || toupper (i) != TOUPPER (i))
ba479fd2
NN
7818 exit(2);
7819 exit (0);
7820}
7821_ACEOF
7822rm -f conftest$ac_exeext
7823if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7824 (eval $ac_link) 2>&5
7825 ac_status=$?
7826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7827 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7829 (eval $ac_try) 2>&5
7830 ac_status=$?
7831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7832 (exit $ac_status); }; }; then
956d6950
JL
7833 :
7834else
ba479fd2
NN
7835 echo "$as_me: program exited with status $ac_status" >&5
7836echo "$as_me: failed program was:" >&5
7837sed 's/^/| /' conftest.$ac_ext >&5
7838
7839( exit $ac_status )
7840ac_cv_header_stdc=no
956d6950 7841fi
86da66b5 7842rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 7843fi
956d6950
JL
7844fi
7845fi
ba479fd2
NN
7846echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7847echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 7848if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
7849
7850cat >>confdefs.h <<\_ACEOF
956d6950 7851#define STDC_HEADERS 1
ba479fd2 7852_ACEOF
956d6950
JL
7853
7854fi
7855
ba479fd2
NN
7856echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7857echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
7858if test "${ac_cv_header_time+set}" = set; then
7859 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7860else
ba479fd2 7861 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7862/* confdefs.h. */
7863_ACEOF
7864cat confdefs.h >>conftest.$ac_ext
7865cat >>conftest.$ac_ext <<_ACEOF
7866/* end confdefs.h. */
956d6950
JL
7867#include <sys/types.h>
7868#include <sys/time.h>
7869#include <time.h>
ba479fd2
NN
7870
7871int
7872main ()
7873{
7874if ((struct tm *) 0)
7875return 0;
7876 ;
7877 return 0;
7878}
7879_ACEOF
7880rm -f conftest.$ac_objext
7881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7882 (eval $ac_compile) 2>conftest.er1
ba479fd2 7883 ac_status=$?
86da66b5
HPN
7884 grep -v '^ *+' conftest.er1 >conftest.err
7885 rm -f conftest.er1
7886 cat conftest.err >&5
ba479fd2
NN
7887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7888 (exit $ac_status); } &&
215c351a
PB
7889 { ac_try='test -z "$ac_c_werror_flag"
7890 || test ! -s conftest.err'
86da66b5
HPN
7891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7892 (eval $ac_try) 2>&5
7893 ac_status=$?
7894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7895 (exit $ac_status); }; } &&
7896 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7898 (eval $ac_try) 2>&5
7899 ac_status=$?
7900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7901 (exit $ac_status); }; }; then
956d6950
JL
7902 ac_cv_header_time=yes
7903else
ba479fd2
NN
7904 echo "$as_me: failed program was:" >&5
7905sed 's/^/| /' conftest.$ac_ext >&5
7906
7907ac_cv_header_time=no
956d6950 7908fi
86da66b5 7909rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 7910fi
ba479fd2
NN
7911echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7912echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 7913if test $ac_cv_header_time = yes; then
ba479fd2
NN
7914
7915cat >>confdefs.h <<\_ACEOF
956d6950 7916#define TIME_WITH_SYS_TIME 1
ba479fd2 7917_ACEOF
956d6950
JL
7918
7919fi
7920
41e622a8
AP
7921echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
7922echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
7923if test "${gcc_cv_header_string+set}" = set; then
7924 echo $ECHO_N "(cached) $ECHO_C" >&6
7925else
7926 cat >conftest.$ac_ext <<_ACEOF
7927/* confdefs.h. */
7928_ACEOF
7929cat confdefs.h >>conftest.$ac_ext
7930cat >>conftest.$ac_ext <<_ACEOF
7931/* end confdefs.h. */
7932#include <string.h>
7933#include <strings.h>
7934int
7935main ()
7936{
7937
7938 ;
7939 return 0;
7940}
7941_ACEOF
7942rm -f conftest.$ac_objext
7943if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7944 (eval $ac_compile) 2>conftest.er1
7945 ac_status=$?
7946 grep -v '^ *+' conftest.er1 >conftest.err
7947 rm -f conftest.er1
7948 cat conftest.err >&5
7949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7950 (exit $ac_status); } &&
215c351a
PB
7951 { ac_try='test -z "$ac_c_werror_flag"
7952 || test ! -s conftest.err'
41e622a8
AP
7953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7954 (eval $ac_try) 2>&5
7955 ac_status=$?
7956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7957 (exit $ac_status); }; } &&
7958 { ac_try='test -s conftest.$ac_objext'
7959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7960 (eval $ac_try) 2>&5
7961 ac_status=$?
7962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7963 (exit $ac_status); }; }; then
7964 gcc_cv_header_string=yes
7965else
7966 echo "$as_me: failed program was:" >&5
7967sed 's/^/| /' conftest.$ac_ext >&5
7968
7969gcc_cv_header_string=no
7970fi
7971rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7972fi
7973echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
7974echo "${ECHO_T}$gcc_cv_header_string" >&6
7975if test $gcc_cv_header_string = yes; then
7976
7977cat >>confdefs.h <<\_ACEOF
7978#define STRING_WITH_STRINGS 1
7979_ACEOF
7980
7981fi
7982
ba479fd2
NN
7983echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7984echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
7985if test "${ac_cv_header_sys_wait_h+set}" = set; then
7986 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 7987else
ba479fd2 7988 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7989/* confdefs.h. */
7990_ACEOF
7991cat confdefs.h >>conftest.$ac_ext
7992cat >>conftest.$ac_ext <<_ACEOF
7993/* end confdefs.h. */
e9831ca0
KG
7994#include <sys/types.h>
7995#include <sys/wait.h>
7996#ifndef WEXITSTATUS
ba479fd2 7997# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
7998#endif
7999#ifndef WIFEXITED
ba479fd2 8000# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 8001#endif
ba479fd2
NN
8002
8003int
8004main ()
8005{
8006 int s;
8007 wait (&s);
8008 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8009 ;
8010 return 0;
8011}
8012_ACEOF
8013rm -f conftest.$ac_objext
8014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8015 (eval $ac_compile) 2>conftest.er1
ba479fd2 8016 ac_status=$?
86da66b5
HPN
8017 grep -v '^ *+' conftest.er1 >conftest.err
8018 rm -f conftest.er1
8019 cat conftest.err >&5
ba479fd2
NN
8020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8021 (exit $ac_status); } &&
215c351a
PB
8022 { ac_try='test -z "$ac_c_werror_flag"
8023 || test ! -s conftest.err'
86da66b5
HPN
8024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8025 (eval $ac_try) 2>&5
8026 ac_status=$?
8027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 (exit $ac_status); }; } &&
8029 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8031 (eval $ac_try) 2>&5
8032 ac_status=$?
8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8034 (exit $ac_status); }; }; then
e9831ca0
KG
8035 ac_cv_header_sys_wait_h=yes
8036else
ba479fd2
NN
8037 echo "$as_me: failed program was:" >&5
8038sed 's/^/| /' conftest.$ac_ext >&5
8039
8040ac_cv_header_sys_wait_h=no
e9831ca0 8041fi
86da66b5 8042rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 8043fi
ba479fd2
NN
8044echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8045echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 8046if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
8047
8048cat >>confdefs.h <<\_ACEOF
e9831ca0 8049#define HAVE_SYS_WAIT_H 1
ba479fd2 8050_ACEOF
6e3f3080 8051
63cf211a 8052fi
6e3f3080 8053
ba479fd2
NN
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
dfb77e37
KC
8075
8076for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 8077 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 8078 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 8079 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 8080do
ba479fd2 8081as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 8082echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
8083echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8084if eval "test \"\${$as_ac_Header+set}\" = set"; then
8085 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8086else
ca9bc441 8087 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8088/* confdefs.h. */
8089_ACEOF
8090cat confdefs.h >>conftest.$ac_ext
8091cat >>conftest.$ac_ext <<_ACEOF
8092/* end confdefs.h. */
8093#include <$ac_header>
8094_ACEOF
8095if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8096 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8097 ac_status=$?
8098 grep -v '^ *+' conftest.er1 >conftest.err
8099 rm -f conftest.er1
8100 cat conftest.err >&5
8101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8102 (exit $ac_status); } >/dev/null; then
8103 if test -s conftest.err; then
8104 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8105 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8106 else
8107 ac_cpp_err=
8108 fi
8109else
8110 ac_cpp_err=yes
8111fi
8112if test -z "$ac_cpp_err"; then
ca9bc441 8113 eval "$as_ac_Header=yes"
ba479fd2
NN
8114else
8115 echo "$as_me: failed program was:" >&5
8116sed 's/^/| /' conftest.$ac_ext >&5
8117
ca9bc441 8118 eval "$as_ac_Header=no"
ba479fd2
NN
8119fi
8120rm -f conftest.err conftest.$ac_ext
6e3f3080 8121fi
ba479fd2
NN
8122echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8123echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
8124if test `eval echo '${'$as_ac_Header'}'` = yes; then
8125 cat >>confdefs.h <<_ACEOF
8126#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8127_ACEOF
8128
956d6950
JL
8129fi
8130done
8131
8132
f24af81b 8133# Check for thread headers.
ca9bc441 8134echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
8135echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
8136if test "${ac_cv_header_thread_h+set}" = set; then
8137 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8138else
ca9bc441 8139 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8140/* confdefs.h. */
8141_ACEOF
8142cat confdefs.h >>conftest.$ac_ext
8143cat >>conftest.$ac_ext <<_ACEOF
8144/* end confdefs.h. */
8145#include <thread.h>
8146_ACEOF
8147if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8148 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8149 ac_status=$?
8150 grep -v '^ *+' conftest.er1 >conftest.err
8151 rm -f conftest.er1
8152 cat conftest.err >&5
8153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8154 (exit $ac_status); } >/dev/null; then
8155 if test -s conftest.err; then
8156 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8157 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8158 else
8159 ac_cpp_err=
8160 fi
8161else
8162 ac_cpp_err=yes
8163fi
8164if test -z "$ac_cpp_err"; then
ca9bc441 8165 ac_cv_header_thread_h=yes
ba479fd2
NN
8166else
8167 echo "$as_me: failed program was:" >&5
8168sed 's/^/| /' conftest.$ac_ext >&5
8169
ca9bc441 8170 ac_cv_header_thread_h=no
ba479fd2
NN
8171fi
8172rm -f conftest.err conftest.$ac_ext
6e3f3080 8173fi
ba479fd2
NN
8174echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8175echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 8176if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
8177 have_thread_h=yes
8178else
ba479fd2 8179 have_thread_h=
f24af81b
TT
8180fi
8181
ca9bc441 8182echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
8183echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8184if test "${ac_cv_header_pthread_h+set}" = set; then
8185 echo $ECHO_N "(cached) $ECHO_C" >&6
f24af81b 8186else
ca9bc441 8187 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8188/* confdefs.h. */
8189_ACEOF
8190cat confdefs.h >>conftest.$ac_ext
8191cat >>conftest.$ac_ext <<_ACEOF
8192/* end confdefs.h. */
8193#include <pthread.h>
8194_ACEOF
8195if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8196 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8197 ac_status=$?
8198 grep -v '^ *+' conftest.er1 >conftest.err
8199 rm -f conftest.er1
8200 cat conftest.err >&5
8201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8202 (exit $ac_status); } >/dev/null; then
8203 if test -s conftest.err; then
8204 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8205 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8206 else
8207 ac_cpp_err=
8208 fi
8209else
8210 ac_cpp_err=yes
8211fi
8212if test -z "$ac_cpp_err"; then
ca9bc441 8213 ac_cv_header_pthread_h=yes
ba479fd2
NN
8214else
8215 echo "$as_me: failed program was:" >&5
8216sed 's/^/| /' conftest.$ac_ext >&5
8217
ca9bc441 8218 ac_cv_header_pthread_h=no
ba479fd2
NN
8219fi
8220rm -f conftest.err conftest.$ac_ext
6e3f3080 8221fi
ba479fd2
NN
8222echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8223echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 8224if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
8225 have_pthread_h=yes
8226else
ba479fd2 8227 have_pthread_h=
f24af81b
TT
8228fi
8229
8230
84c041a1 8231# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
8232echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8233echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
8234if test "${gcc_cv_decl_char_bit+set}" = set; then
8235 echo $ECHO_N "(cached) $ECHO_C" >&6
8236else
8237 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8238/* confdefs.h. */
8239_ACEOF
8240cat confdefs.h >>conftest.$ac_ext
8241cat >>conftest.$ac_ext <<_ACEOF
8242/* end confdefs.h. */
75e93faa
ZW
8243#ifdef HAVE_LIMITS_H
8244#include <limits.h>
8245#endif
8246#ifdef CHAR_BIT
8247found
8248#endif
ba479fd2 8249_ACEOF
75e93faa 8250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8251 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
8252 gcc_cv_decl_char_bit=yes
8253else
75e93faa
ZW
8254 gcc_cv_decl_char_bit=no
8255fi
8256rm -f conftest*
8257
8258
8259fi
ba479fd2
NN
8260echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8261echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 8262if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
8263 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8264echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
8265if test "${gcc_cv_c_nbby+set}" = set; then
8266 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
8267else
8268 i=8
8269 gcc_cv_c_nbby=
8270 while test $i -lt 65; do
ba479fd2 8271 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8272/* confdefs.h. */
8273_ACEOF
8274cat confdefs.h >>conftest.$ac_ext
8275cat >>conftest.$ac_ext <<_ACEOF
8276/* end confdefs.h. */
8277
8278int
8279main ()
8280{
4e70264f
ZW
8281switch(0) {
8282 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8283 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8284 ; }
ba479fd2
NN
8285 ;
8286 return 0;
8287}
8288_ACEOF
8289rm -f conftest.$ac_objext
8290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8291 (eval $ac_compile) 2>conftest.er1
ba479fd2 8292 ac_status=$?
86da66b5
HPN
8293 grep -v '^ *+' conftest.er1 >conftest.err
8294 rm -f conftest.er1
8295 cat conftest.err >&5
ba479fd2
NN
8296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8297 (exit $ac_status); } &&
215c351a
PB
8298 { ac_try='test -z "$ac_c_werror_flag"
8299 || test ! -s conftest.err'
86da66b5
HPN
8300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8301 (eval $ac_try) 2>&5
8302 ac_status=$?
8303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8304 (exit $ac_status); }; } &&
8305 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8307 (eval $ac_try) 2>&5
8308 ac_status=$?
8309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8310 (exit $ac_status); }; }; then
4e70264f 8311 gcc_cv_c_nbby=$i; break
75e93faa 8312else
ba479fd2
NN
8313 echo "$as_me: failed program was:" >&5
8314sed 's/^/| /' conftest.$ac_ext >&5
8315
75e93faa 8316fi
86da66b5 8317rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
8318 i=`expr $i + 1`
8319 done
8320 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8321
8322fi
ba479fd2
NN
8323echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8324echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 8325if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
8326 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8327echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8328 { (exit 1); exit 1; }; }
75e93faa 8329else
ba479fd2
NN
8330
8331cat >>confdefs.h <<_ACEOF
75e93faa 8332#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 8333_ACEOF
75e93faa
ZW
8334
8335fi
8336fi
ba479fd2
NN
8337echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8338echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
8339if test "${ac_cv_c_bigendian+set}" = set; then
8340 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 8341else
4977bab6
ZW
8342 ac_cv_c_bigendian=unknown
8343# See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 8344cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8345/* confdefs.h. */
8346_ACEOF
8347cat confdefs.h >>conftest.$ac_ext
8348cat >>conftest.$ac_ext <<_ACEOF
8349/* end confdefs.h. */
4977bab6
ZW
8350#include <sys/types.h>
8351#include <sys/param.h>
ba479fd2
NN
8352int
8353main ()
8354{
2d6eb5bf 8355
4977bab6
ZW
8356#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8357 bogus endian macros
84c041a1 8358#endif
ba479fd2
NN
8359 ;
8360 return 0;
8361}
8362_ACEOF
8363rm -f conftest.$ac_objext
8364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8365 (eval $ac_compile) 2>conftest.er1
ba479fd2 8366 ac_status=$?
86da66b5
HPN
8367 grep -v '^ *+' conftest.er1 >conftest.err
8368 rm -f conftest.er1
8369 cat conftest.err >&5
ba479fd2
NN
8370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8371 (exit $ac_status); } &&
215c351a
PB
8372 { ac_try='test -z "$ac_c_werror_flag"
8373 || test ! -s conftest.err'
86da66b5
HPN
8374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8375 (eval $ac_try) 2>&5
8376 ac_status=$?
8377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8378 (exit $ac_status); }; } &&
8379 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8381 (eval $ac_try) 2>&5
8382 ac_status=$?
8383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8384 (exit $ac_status); }; }; then
4977bab6 8385 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 8386cat >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. */
4977bab6
ZW
8392#include <sys/types.h>
8393#include <sys/param.h>
ba479fd2
NN
8394int
8395main ()
8396{
4977bab6
ZW
8397
8398#if BYTE_ORDER != BIG_ENDIAN
8399 not big endian
84c041a1 8400#endif
ba479fd2
NN
8401 ;
8402 return 0;
8403}
8404_ACEOF
8405rm -f conftest.$ac_objext
8406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8407 (eval $ac_compile) 2>conftest.er1
ba479fd2 8408 ac_status=$?
86da66b5
HPN
8409 grep -v '^ *+' conftest.er1 >conftest.err
8410 rm -f conftest.er1
8411 cat conftest.err >&5
ba479fd2
NN
8412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8413 (exit $ac_status); } &&
215c351a
PB
8414 { ac_try='test -z "$ac_c_werror_flag"
8415 || test ! -s conftest.err'
86da66b5
HPN
8416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8417 (eval $ac_try) 2>&5
8418 ac_status=$?
8419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8420 (exit $ac_status); }; } &&
8421 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8423 (eval $ac_try) 2>&5
8424 ac_status=$?
8425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8426 (exit $ac_status); }; }; then
4977bab6
ZW
8427 ac_cv_c_bigendian=yes
8428else
ba479fd2
NN
8429 echo "$as_me: failed program was:" >&5
8430sed 's/^/| /' conftest.$ac_ext >&5
8431
8432ac_cv_c_bigendian=no
4977bab6 8433fi
86da66b5 8434rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8435else
ba479fd2
NN
8436 echo "$as_me: failed program was:" >&5
8437sed 's/^/| /' conftest.$ac_ext >&5
8438
4977bab6 8439fi
86da66b5 8440rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6
ZW
8441if test $ac_cv_c_bigendian = unknown; then
8442if test "$cross_compiling" = yes; then
ba479fd2
NN
8443 echo $ac_n "cross-compiling... " 2>&6
8444else
8445 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8446/* confdefs.h. */
8447_ACEOF
8448cat confdefs.h >>conftest.$ac_ext
8449cat >>conftest.$ac_ext <<_ACEOF
8450/* end confdefs.h. */
4977bab6
ZW
8451main () {
8452 /* Are we little or big endian? From Harbison&Steele. */
8453 union
8454 {
8455 long l;
8456 char c[sizeof (long)];
8457 } u;
8458 u.l = 1;
8459 exit (u.c[sizeof (long) - 1] == 1);
8460}
ba479fd2
NN
8461_ACEOF
8462rm -f conftest$ac_exeext
8463if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8464 (eval $ac_link) 2>&5
8465 ac_status=$?
8466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8467 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8469 (eval $ac_try) 2>&5
8470 ac_status=$?
8471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8472 (exit $ac_status); }; }; then
4977bab6
ZW
8473 ac_cv_c_bigendian=no
8474else
ba479fd2
NN
8475 echo "$as_me: program exited with status $ac_status" >&5
8476echo "$as_me: failed program was:" >&5
8477sed 's/^/| /' conftest.$ac_ext >&5
8478
8479( exit $ac_status )
8480ac_cv_c_bigendian=yes
4977bab6 8481fi
86da66b5 8482rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 8483fi
4977bab6
ZW
8484fi
8485fi
ba479fd2
NN
8486echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8487echo "${ECHO_T}$ac_cv_c_bigendian" >&6
4977bab6 8488if test $ac_cv_c_bigendian = unknown; then
ba479fd2
NN
8489echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
8490echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
2d6eb5bf 8491
4977bab6
ZW
8492cat >conftest.c <<EOF
8493short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8494short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8495void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
8496short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8497short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8498void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
8499int main() { _ascii (); _ebcdic (); return 0; }
8500EOF
8501 if test -f conftest.c ; then
3beb1315 8502 if ${CC-cc} ${CFLAGS} -c conftest.c -o conftest.o && test -f conftest.o ; then
4977bab6
ZW
8503 if test `grep -l BIGenDianSyS conftest.o` ; then
8504 echo $ac_n ' big endian probe OK, ' 1>&6
8505 ac_cv_c_bigendian=yes
8506 fi
8507 if test `grep -l LiTTleEnDian conftest.o` ; then
8508 echo $ac_n ' little endian probe OK, ' 1>&6
8509 if test $ac_cv_c_bigendian = yes ; then
8510 ac_cv_c_bigendian=unknown;
8511 else
8512 ac_cv_c_bigendian=no
8513 fi
8514 fi
8515 echo $ac_n 'guessing bigendian ... ' >&6
8516 fi
8517 fi
ba479fd2
NN
8518echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8519echo "${ECHO_T}$ac_cv_c_bigendian" >&6
84c041a1 8520fi
4977bab6 8521if test $ac_cv_c_bigendian = yes; then
ba479fd2
NN
8522
8523cat >>confdefs.h <<\_ACEOF
4977bab6 8524#define WORDS_BIGENDIAN 1
ba479fd2 8525_ACEOF
cafe096b 8526
ba479fd2
NN
8527
8528cat >>confdefs.h <<\_ACEOF
84c041a1 8529#define HOST_WORDS_BIG_ENDIAN 1
ba479fd2 8530_ACEOF
84c041a1 8531
4977bab6
ZW
8532 BYTEORDER=4321
8533else
8534 BYTEORDER=1234
8535fi
ba479fd2
NN
8536
8537cat >>confdefs.h <<_ACEOF
4977bab6 8538#define BYTEORDER $BYTEORDER
ba479fd2 8539_ACEOF
4977bab6
ZW
8540
8541if test $ac_cv_c_bigendian = unknown; then
3beb1315
HPN
8542 { { echo "$as_me:$LINENO: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&5
8543echo "$as_me: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&2;}
8544 { (exit 1); exit 1; }; }
84c041a1
ZW
8545fi
8546
75e93faa 8547
73458fb7
NN
8548# --------
8549# UNSORTED
8550# --------
1e608388 8551
73458fb7
NN
8552# Stage specific cflags for build.
8553stage1_cflags=
8554case $build in
8555vax-*-*)
8556 if test x$GCC = xyes
8557 then
8558 stage1_cflags="-Wa,-J"
8559 else
8560 stage1_cflags="-J"
8561 fi
8562 ;;
8563powerpc-*-darwin*)
8564 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
8565 # sources; use -no-cpp-precomp to get to GNU cpp.
8566 # Apple's GCC has bugs in designated initializer handling, so disable
8567 # that too.
8568 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
8569 ;;
8570esac
1e608388 8571
1e608388 8572
4e70264f
ZW
8573# These libraries may be used by collect2.
8574# We may need a special search path to get them linked.
ba479fd2
NN
8575echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8576echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
8577if test "${gcc_cv_collect2_libs+set}" = set; then
8578 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
8579else
8580 save_LIBS="$LIBS"
7f2749d4 8581for libs in '' -lld -lmld \
4e70264f
ZW
8582 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8583 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8584do
8585 LIBS="$libs"
ba479fd2 8586 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8587/* confdefs.h. */
8588_ACEOF
8589cat confdefs.h >>conftest.$ac_ext
8590cat >>conftest.$ac_ext <<_ACEOF
8591/* end confdefs.h. */
8592
4e70264f 8593/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8594#ifdef __cplusplus
8595extern "C"
8596#endif
4e70264f 8597/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8598 builtin and then its argument prototype would still apply. */
8599char ldopen ();
8600int
8601main ()
8602{
8603ldopen ();
8604 ;
8605 return 0;
8606}
8607_ACEOF
8608rm -f conftest.$ac_objext conftest$ac_exeext
8609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8610 (eval $ac_link) 2>conftest.er1
ba479fd2 8611 ac_status=$?
86da66b5
HPN
8612 grep -v '^ *+' conftest.er1 >conftest.err
8613 rm -f conftest.er1
8614 cat conftest.err >&5
ba479fd2
NN
8615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8616 (exit $ac_status); } &&
215c351a
PB
8617 { ac_try='test -z "$ac_c_werror_flag"
8618 || test ! -s conftest.err'
86da66b5
HPN
8619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8620 (eval $ac_try) 2>&5
8621 ac_status=$?
8622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8623 (exit $ac_status); }; } &&
8624 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8626 (eval $ac_try) 2>&5
8627 ac_status=$?
8628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8629 (exit $ac_status); }; }; then
4e70264f
ZW
8630 gcc_cv_collect2_libs="$libs"; break
8631else
ba479fd2
NN
8632 echo "$as_me: failed program was:" >&5
8633sed 's/^/| /' conftest.$ac_ext >&5
8634
4e70264f 8635fi
86da66b5
HPN
8636rm -f conftest.err conftest.$ac_objext \
8637 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8638done
8639LIBS="$save_LIBS"
8640test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8641fi
ba479fd2
NN
8642echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8643echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
8644case $gcc_cv_collect2_libs in
8645 "none required") ;;
8646 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8647esac
8648
8649
7f2749d4
RK
8650# When building Ada code on Alpha, we need exc_resume which is usually in
8651# -lexc. So test for it.
8652save_LIBS="$LIBS"
8653LIBS=
ba479fd2
NN
8654echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8655echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
8656if test "${ac_cv_search_exc_resume+set}" = set; then
8657 echo $ECHO_N "(cached) $ECHO_C" >&6
8658else
8659 ac_func_search_save_LIBS=$LIBS
8660ac_cv_search_exc_resume=no
8661cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8662/* confdefs.h. */
8663_ACEOF
8664cat confdefs.h >>conftest.$ac_ext
8665cat >>conftest.$ac_ext <<_ACEOF
8666/* end confdefs.h. */
7f2749d4 8667
7f2749d4 8668/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8669#ifdef __cplusplus
8670extern "C"
8671#endif
7f2749d4 8672/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8673 builtin and then its argument prototype would still apply. */
8674char exc_resume ();
8675int
8676main ()
8677{
8678exc_resume ();
8679 ;
8680 return 0;
8681}
8682_ACEOF
8683rm -f conftest.$ac_objext conftest$ac_exeext
8684if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8685 (eval $ac_link) 2>conftest.er1
ba479fd2 8686 ac_status=$?
86da66b5
HPN
8687 grep -v '^ *+' conftest.er1 >conftest.err
8688 rm -f conftest.er1
8689 cat conftest.err >&5
ba479fd2
NN
8690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8691 (exit $ac_status); } &&
215c351a
PB
8692 { ac_try='test -z "$ac_c_werror_flag"
8693 || test ! -s conftest.err'
86da66b5
HPN
8694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8695 (eval $ac_try) 2>&5
8696 ac_status=$?
8697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8698 (exit $ac_status); }; } &&
8699 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8701 (eval $ac_try) 2>&5
8702 ac_status=$?
8703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8704 (exit $ac_status); }; }; then
7f2749d4
RK
8705 ac_cv_search_exc_resume="none required"
8706else
ba479fd2
NN
8707 echo "$as_me: failed program was:" >&5
8708sed 's/^/| /' conftest.$ac_ext >&5
8709
7f2749d4 8710fi
86da66b5
HPN
8711rm -f conftest.err conftest.$ac_objext \
8712 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8713if test "$ac_cv_search_exc_resume" = no; then
8714 for ac_lib in exc; do
8715 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8716 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8717/* confdefs.h. */
8718_ACEOF
8719cat confdefs.h >>conftest.$ac_ext
8720cat >>conftest.$ac_ext <<_ACEOF
8721/* end confdefs.h. */
8722
7f2749d4 8723/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8724#ifdef __cplusplus
8725extern "C"
8726#endif
7f2749d4 8727/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8728 builtin and then its argument prototype would still apply. */
8729char exc_resume ();
8730int
8731main ()
8732{
8733exc_resume ();
8734 ;
8735 return 0;
8736}
8737_ACEOF
8738rm -f conftest.$ac_objext conftest$ac_exeext
8739if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8740 (eval $ac_link) 2>conftest.er1
ba479fd2 8741 ac_status=$?
86da66b5
HPN
8742 grep -v '^ *+' conftest.er1 >conftest.err
8743 rm -f conftest.er1
8744 cat conftest.err >&5
ba479fd2
NN
8745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8746 (exit $ac_status); } &&
215c351a
PB
8747 { ac_try='test -z "$ac_c_werror_flag"
8748 || test ! -s conftest.err'
86da66b5
HPN
8749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8750 (eval $ac_try) 2>&5
8751 ac_status=$?
8752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8753 (exit $ac_status); }; } &&
8754 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8756 (eval $ac_try) 2>&5
8757 ac_status=$?
8758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8759 (exit $ac_status); }; }; then
8760 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
8761break
8762else
ba479fd2
NN
8763 echo "$as_me: failed program was:" >&5
8764sed 's/^/| /' conftest.$ac_ext >&5
8765
cafe096b 8766fi
86da66b5
HPN
8767rm -f conftest.err conftest.$ac_objext \
8768 conftest$ac_exeext conftest.$ac_ext
ba479fd2 8769 done
6e3f3080 8770fi
ba479fd2
NN
8771LIBS=$ac_func_search_save_LIBS
8772fi
8773echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
8774echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
8775if test "$ac_cv_search_exc_resume" != no; then
63cf211a 8776 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 8777
7f2749d4 8778fi
ba479fd2 8779
7f2749d4
RK
8780GNAT_LIBEXC="$LIBS"
8781LIBS="$save_LIBS"
8782
8783
62c9aa5f
ZW
8784# Some systems put ldexp and frexp in libm instead of libc; assume
8785# they're both in the same place. jcf-dump needs them.
8786save_LIBS="$LIBS"
8787LIBS=
ba479fd2
NN
8788echo "$as_me:$LINENO: checking for library containing ldexp" >&5
8789echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
8790if test "${ac_cv_search_ldexp+set}" = set; then
8791 echo $ECHO_N "(cached) $ECHO_C" >&6
8792else
8793 ac_func_search_save_LIBS=$LIBS
8794ac_cv_search_ldexp=no
8795cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8796/* confdefs.h. */
8797_ACEOF
8798cat confdefs.h >>conftest.$ac_ext
8799cat >>conftest.$ac_ext <<_ACEOF
8800/* end confdefs.h. */
62c9aa5f 8801
62c9aa5f 8802/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8803#ifdef __cplusplus
8804extern "C"
8805#endif
62c9aa5f 8806/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8807 builtin and then its argument prototype would still apply. */
8808char ldexp ();
8809int
8810main ()
8811{
8812ldexp ();
8813 ;
8814 return 0;
8815}
8816_ACEOF
8817rm -f conftest.$ac_objext conftest$ac_exeext
8818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8819 (eval $ac_link) 2>conftest.er1
ba479fd2 8820 ac_status=$?
86da66b5
HPN
8821 grep -v '^ *+' conftest.er1 >conftest.err
8822 rm -f conftest.er1
8823 cat conftest.err >&5
ba479fd2
NN
8824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8825 (exit $ac_status); } &&
215c351a
PB
8826 { ac_try='test -z "$ac_c_werror_flag"
8827 || test ! -s conftest.err'
86da66b5
HPN
8828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8829 (eval $ac_try) 2>&5
8830 ac_status=$?
8831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8832 (exit $ac_status); }; } &&
8833 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8835 (eval $ac_try) 2>&5
8836 ac_status=$?
8837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8838 (exit $ac_status); }; }; then
62c9aa5f
ZW
8839 ac_cv_search_ldexp="none required"
8840else
ba479fd2
NN
8841 echo "$as_me: failed program was:" >&5
8842sed 's/^/| /' conftest.$ac_ext >&5
8843
62c9aa5f 8844fi
86da66b5
HPN
8845rm -f conftest.err conftest.$ac_objext \
8846 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8847if test "$ac_cv_search_ldexp" = no; then
8848 for ac_lib in m; do
8849 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8850 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8851/* confdefs.h. */
8852_ACEOF
8853cat confdefs.h >>conftest.$ac_ext
8854cat >>conftest.$ac_ext <<_ACEOF
8855/* end confdefs.h. */
8856
62c9aa5f 8857/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8858#ifdef __cplusplus
8859extern "C"
8860#endif
62c9aa5f 8861/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8862 builtin and then its argument prototype would still apply. */
8863char ldexp ();
8864int
8865main ()
8866{
8867ldexp ();
8868 ;
8869 return 0;
8870}
8871_ACEOF
8872rm -f conftest.$ac_objext conftest$ac_exeext
8873if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8874 (eval $ac_link) 2>conftest.er1
ba479fd2 8875 ac_status=$?
86da66b5
HPN
8876 grep -v '^ *+' conftest.er1 >conftest.err
8877 rm -f conftest.er1
8878 cat conftest.err >&5
ba479fd2
NN
8879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8880 (exit $ac_status); } &&
215c351a
PB
8881 { ac_try='test -z "$ac_c_werror_flag"
8882 || test ! -s conftest.err'
86da66b5
HPN
8883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8884 (eval $ac_try) 2>&5
8885 ac_status=$?
8886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8887 (exit $ac_status); }; } &&
8888 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8890 (eval $ac_try) 2>&5
8891 ac_status=$?
8892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8893 (exit $ac_status); }; }; then
8894 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
8895break
8896else
ba479fd2
NN
8897 echo "$as_me: failed program was:" >&5
8898sed 's/^/| /' conftest.$ac_ext >&5
8899
cafe096b 8900fi
86da66b5
HPN
8901rm -f conftest.err conftest.$ac_objext \
8902 conftest$ac_exeext conftest.$ac_ext
ba479fd2 8903 done
6e3f3080 8904fi
ba479fd2
NN
8905LIBS=$ac_func_search_save_LIBS
8906fi
8907echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
8908echo "${ECHO_T}$ac_cv_search_ldexp" >&6
8909if test "$ac_cv_search_ldexp" != no; then
63cf211a 8910 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 8911
62c9aa5f 8912fi
ba479fd2 8913
62c9aa5f
ZW
8914LDEXP_LIB="$LIBS"
8915LIBS="$save_LIBS"
8916
8917
956d6950
JL
8918# Use <inttypes.h> only if it exists,
8919# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
8920echo "$as_me:$LINENO: checking for inttypes.h" >&5
8921echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
8922if test "${gcc_cv_header_inttypes_h+set}" = set; then
8923 echo $ECHO_N "(cached) $ECHO_C" >&6
8924else
8925 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8926/* confdefs.h. */
8927_ACEOF
8928cat confdefs.h >>conftest.$ac_ext
8929cat >>conftest.$ac_ext <<_ACEOF
8930/* end confdefs.h. */
956d6950
JL
8931#include <sys/types.h>
8932#include <inttypes.h>
ba479fd2
NN
8933int
8934main ()
8935{
956d6950 8936intmax_t i = -1;
ba479fd2
NN
8937 ;
8938 return 0;
8939}
8940_ACEOF
8941rm -f conftest.$ac_objext
8942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8943 (eval $ac_compile) 2>conftest.er1
ba479fd2 8944 ac_status=$?
86da66b5
HPN
8945 grep -v '^ *+' conftest.er1 >conftest.err
8946 rm -f conftest.er1
8947 cat conftest.err >&5
ba479fd2
NN
8948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8949 (exit $ac_status); } &&
215c351a
PB
8950 { ac_try='test -z "$ac_c_werror_flag"
8951 || test ! -s conftest.err'
86da66b5
HPN
8952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8953 (eval $ac_try) 2>&5
8954 ac_status=$?
8955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8956 (exit $ac_status); }; } &&
8957 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8959 (eval $ac_try) 2>&5
8960 ac_status=$?
8961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8962 (exit $ac_status); }; }; then
0056a9b5 8963 gcc_cv_header_inttypes_h=yes
956d6950 8964else
ba479fd2
NN
8965 echo "$as_me: failed program was:" >&5
8966sed 's/^/| /' conftest.$ac_ext >&5
8967
8968gcc_cv_header_inttypes_h=no
956d6950 8969fi
86da66b5 8970rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
8971fi
8972
ba479fd2
NN
8973echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
8974echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 8975if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
8976
8977cat >>confdefs.h <<\_ACEOF
0056a9b5 8978#define HAVE_INTTYPES_H 1
ba479fd2 8979_ACEOF
0056a9b5
KG
8980
8981fi
956d6950 8982
c149cc37 8983
ba479fd2
NN
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
6af8c740
KG
9009for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
9010 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
4e87a651 9011 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
56694dd9
ZW
9012 scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \
9013 setlocale
956d6950 9014do
ba479fd2
NN
9015as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9016echo "$as_me:$LINENO: checking for $ac_func" >&5
9017echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9018if eval "test \"\${$as_ac_var+set}\" = set"; then
9019 echo $ECHO_N "(cached) $ECHO_C" >&6
9020else
9021 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9022/* confdefs.h. */
9023_ACEOF
9024cat confdefs.h >>conftest.$ac_ext
9025cat >>conftest.$ac_ext <<_ACEOF
9026/* end confdefs.h. */
86da66b5
HPN
9027/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9028 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9029#define $ac_func innocuous_$ac_func
9030
956d6950 9031/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9032 which can conflict with char $ac_func (); below.
9033 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9034 <limits.h> exists even on freestanding compilers. */
86da66b5 9035
ba479fd2
NN
9036#ifdef __STDC__
9037# include <limits.h>
9038#else
9039# include <assert.h>
9040#endif
86da66b5
HPN
9041
9042#undef $ac_func
9043
6e3f3080 9044/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9045#ifdef __cplusplus
9046extern "C"
9047{
9048#endif
6e3f3080 9049/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9050 builtin and then its argument prototype would still apply. */
9051char $ac_func ();
956d6950
JL
9052/* The GNU C library defines this for functions which it implements
9053 to always fail with ENOSYS. Some functions are actually named
9054 something starting with __ and the normal name is an alias. */
9055#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9056choke me
9057#else
ba479fd2
NN
9058char (*f) () = $ac_func;
9059#endif
9060#ifdef __cplusplus
9061}
956d6950
JL
9062#endif
9063
ba479fd2
NN
9064int
9065main ()
9066{
9067return f != $ac_func;
9068 ;
9069 return 0;
9070}
9071_ACEOF
9072rm -f conftest.$ac_objext conftest$ac_exeext
9073if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9074 (eval $ac_link) 2>conftest.er1
ba479fd2 9075 ac_status=$?
86da66b5
HPN
9076 grep -v '^ *+' conftest.er1 >conftest.err
9077 rm -f conftest.er1
9078 cat conftest.err >&5
ba479fd2
NN
9079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9080 (exit $ac_status); } &&
215c351a
PB
9081 { ac_try='test -z "$ac_c_werror_flag"
9082 || test ! -s conftest.err'
86da66b5
HPN
9083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9084 (eval $ac_try) 2>&5
9085 ac_status=$?
9086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9087 (exit $ac_status); }; } &&
9088 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9090 (eval $ac_try) 2>&5
9091 ac_status=$?
9092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9093 (exit $ac_status); }; }; then
9094 eval "$as_ac_var=yes"
9095else
9096 echo "$as_me: failed program was:" >&5
9097sed 's/^/| /' conftest.$ac_ext >&5
9098
9099eval "$as_ac_var=no"
9100fi
86da66b5
HPN
9101rm -f conftest.err conftest.$ac_objext \
9102 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9103fi
9104echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9105echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9106if test `eval echo '${'$as_ac_var'}'` = yes; then
9107 cat >>confdefs.h <<_ACEOF
9108#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9109_ACEOF
956d6950 9110
956d6950
JL
9111fi
9112done
9113
6885fc87 9114
39f6c4c8 9115if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
9116 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9117echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
9118if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9119 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9120else
9121 if test "$cross_compiling" = yes; then
9122 gcc_cv_func_mbstowcs_works=yes
9123else
ba479fd2 9124 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9125/* confdefs.h. */
9126_ACEOF
9127cat confdefs.h >>conftest.$ac_ext
9128cat >>conftest.$ac_ext <<_ACEOF
9129/* end confdefs.h. */
39f6c4c8
KW
9130#include <stdlib.h>
9131int main()
9132{
9133 mbstowcs(0, "", 0);
9134 return 0;
9135}
ba479fd2
NN
9136_ACEOF
9137rm -f conftest$ac_exeext
9138if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9139 (eval $ac_link) 2>&5
9140 ac_status=$?
9141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9142 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9144 (eval $ac_try) 2>&5
9145 ac_status=$?
9146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9147 (exit $ac_status); }; }; then
39f6c4c8
KW
9148 gcc_cv_func_mbstowcs_works=yes
9149else
ba479fd2
NN
9150 echo "$as_me: program exited with status $ac_status" >&5
9151echo "$as_me: failed program was:" >&5
9152sed 's/^/| /' conftest.$ac_ext >&5
9153
9154( exit $ac_status )
9155gcc_cv_func_mbstowcs_works=no
39f6c4c8 9156fi
86da66b5 9157rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 9158fi
39f6c4c8 9159fi
ba479fd2
NN
9160echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9161echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 9162 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
9163
9164cat >>confdefs.h <<\_ACEOF
39f6c4c8 9165#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 9166_ACEOF
39f6c4c8
KW
9167
9168 fi
9169fi
9170
ba479fd2
NN
9171echo "$as_me:$LINENO: checking for ssize_t" >&5
9172echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
9173if test "${ac_cv_type_ssize_t+set}" = set; then
9174 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 9175else
ba479fd2 9176 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9177/* confdefs.h. */
9178_ACEOF
9179cat confdefs.h >>conftest.$ac_ext
9180cat >>conftest.$ac_ext <<_ACEOF
9181/* end confdefs.h. */
8b4fc07a
NN
9182$ac_includes_default
9183int
9184main ()
9185{
9186if ((ssize_t *) 0)
9187 return 0;
9188if (sizeof (ssize_t))
9189 return 0;
9190 ;
9191 return 0;
9192}
ba479fd2 9193_ACEOF
8b4fc07a
NN
9194rm -f conftest.$ac_objext
9195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9196 (eval $ac_compile) 2>conftest.er1
8b4fc07a 9197 ac_status=$?
86da66b5
HPN
9198 grep -v '^ *+' conftest.er1 >conftest.err
9199 rm -f conftest.er1
9200 cat conftest.err >&5
8b4fc07a
NN
9201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9202 (exit $ac_status); } &&
215c351a
PB
9203 { ac_try='test -z "$ac_c_werror_flag"
9204 || test ! -s conftest.err'
86da66b5
HPN
9205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9206 (eval $ac_try) 2>&5
9207 ac_status=$?
9208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9209 (exit $ac_status); }; } &&
9210 { ac_try='test -s conftest.$ac_objext'
8b4fc07a
NN
9211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9212 (eval $ac_try) 2>&5
9213 ac_status=$?
9214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9215 (exit $ac_status); }; }; then
cb65112a 9216 ac_cv_type_ssize_t=yes
f12bc141 9217else
8b4fc07a
NN
9218 echo "$as_me: failed program was:" >&5
9219sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9220
8b4fc07a
NN
9221ac_cv_type_ssize_t=no
9222fi
86da66b5 9223rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9224fi
ba479fd2
NN
9225echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9226echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
9227if test $ac_cv_type_ssize_t = yes; then
9228 :
9229else
ba479fd2 9230
8b4fc07a 9231cat >>confdefs.h <<_ACEOF
f12bc141 9232#define ssize_t int
ba479fd2 9233_ACEOF
f12bc141
ZW
9234
9235fi
9236
0b9d02c6 9237
e256b8b6
DA
9238# Try to determine the array type of the second argument of getgroups
9239# for the target system (int or gid_t).
ba479fd2
NN
9240echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9241echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
9242if test "${ac_cv_type_uid_t+set}" = set; then
9243 echo $ECHO_N "(cached) $ECHO_C" >&6
9244else
9245 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9246/* confdefs.h. */
9247_ACEOF
9248cat confdefs.h >>conftest.$ac_ext
9249cat >>conftest.$ac_ext <<_ACEOF
9250/* end confdefs.h. */
e256b8b6 9251#include <sys/types.h>
ba479fd2
NN
9252
9253_ACEOF
e256b8b6 9254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9255 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
9256 ac_cv_type_uid_t=yes
9257else
e256b8b6
DA
9258 ac_cv_type_uid_t=no
9259fi
9260rm -f conftest*
9261
9262fi
ba479fd2
NN
9263echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9264echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 9265if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
9266
9267cat >>confdefs.h <<\_ACEOF
e256b8b6 9268#define uid_t int
ba479fd2 9269_ACEOF
cafe096b 9270
ba479fd2
NN
9271
9272cat >>confdefs.h <<\_ACEOF
e256b8b6 9273#define gid_t int
ba479fd2 9274_ACEOF
e256b8b6
DA
9275
9276fi
9277
ba479fd2
NN
9278echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9279echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
9280if test "${ac_cv_type_getgroups+set}" = set; then
9281 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
9282else
9283 if test "$cross_compiling" = yes; then
9284 ac_cv_type_getgroups=cross
9285else
ba479fd2 9286 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9287/* confdefs.h. */
9288_ACEOF
9289cat confdefs.h >>conftest.$ac_ext
9290cat >>conftest.$ac_ext <<_ACEOF
9291/* end confdefs.h. */
e256b8b6
DA
9292/* Thanks to Mike Rendell for this test. */
9293#include <sys/types.h>
9294#define NGID 256
9295#undef MAX
9296#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
9297
9298int
9299main ()
e256b8b6
DA
9300{
9301 gid_t gidset[NGID];
9302 int i, n;
9303 union { gid_t gval; long lval; } val;
9304
9305 val.lval = -1;
9306 for (i = 0; i < NGID; i++)
9307 gidset[i] = val.gval;
9308 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 9309 gidset);
e256b8b6
DA
9310 /* Exit non-zero if getgroups seems to require an array of ints. This
9311 happens when gid_t is short but getgroups modifies an array of ints. */
9312 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 9313}
ba479fd2
NN
9314_ACEOF
9315rm -f conftest$ac_exeext
9316if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9317 (eval $ac_link) 2>&5
9318 ac_status=$?
9319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9320 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9322 (eval $ac_try) 2>&5
9323 ac_status=$?
9324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9325 (exit $ac_status); }; }; then
9326 ac_cv_type_getgroups=gid_t
63cf211a 9327else
ba479fd2
NN
9328 echo "$as_me: program exited with status $ac_status" >&5
9329echo "$as_me: failed program was:" >&5
9330sed 's/^/| /' conftest.$ac_ext >&5
9331
9332( exit $ac_status )
9333ac_cv_type_getgroups=int
e256b8b6 9334fi
86da66b5 9335rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 9336fi
e256b8b6 9337if test $ac_cv_type_getgroups = cross; then
ba479fd2 9338 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9339/* confdefs.h. */
9340_ACEOF
9341cat confdefs.h >>conftest.$ac_ext
9342cat >>conftest.$ac_ext <<_ACEOF
9343/* end confdefs.h. */
e256b8b6 9344#include <unistd.h>
ba479fd2
NN
9345
9346_ACEOF
e256b8b6 9347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9348 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
9349 ac_cv_type_getgroups=gid_t
9350else
e256b8b6
DA
9351 ac_cv_type_getgroups=int
9352fi
9353rm -f conftest*
9354
9355fi
9356fi
ba479fd2
NN
9357echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9358echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 9359
ba479fd2 9360cat >>confdefs.h <<_ACEOF
e256b8b6 9361#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 9362_ACEOF
e256b8b6
DA
9363
9364
9365if test "${target}" = "${build}"; then
9366 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9367else
9368 case "${target}" in
9369 # This condition may need some tweaking. It should include all
9370 # targets where the array type of the second argument of getgroups
9371 # is int and the type of gid_t is not equivalent to int.
9372 *-*-sunos* | *-*-ultrix*)
9373 TARGET_GETGROUPS_T=int
9374 ;;
9375 *)
9376 TARGET_GETGROUPS_T=gid_t
9377 ;;
9378 esac
9379fi
9380
9381
ba479fd2
NN
9382echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5
9383echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6
9384if test "${gcc_cv_func_printf_ptr+set}" = set; then
9385 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
9386else
9387 if test "$cross_compiling" = yes; then
9388 gcc_cv_func_printf_ptr=no
9389else
ba479fd2 9390 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9391/* confdefs.h. */
9392_ACEOF
9393cat confdefs.h >>conftest.$ac_ext
9394cat >>conftest.$ac_ext <<_ACEOF
9395/* end confdefs.h. */
0a4b6309
RL
9396#include <stdio.h>
9397
86cf1cbd 9398int main()
0a4b6309
RL
9399{
9400 char buf[64];
9401 char *p = buf, *q = NULL;
9402 sprintf(buf, "%p", p);
9403 sscanf(buf, "%p", &q);
86cf1cbd 9404 return (p != q);
0a4b6309 9405}
ba479fd2
NN
9406_ACEOF
9407rm -f conftest$ac_exeext
9408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9409 (eval $ac_link) 2>&5
9410 ac_status=$?
9411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9412 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9414 (eval $ac_try) 2>&5
9415 ac_status=$?
9416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9417 (exit $ac_status); }; }; then
0a4b6309
RL
9418 gcc_cv_func_printf_ptr=yes
9419else
ba479fd2
NN
9420 echo "$as_me: program exited with status $ac_status" >&5
9421echo "$as_me: failed program was:" >&5
9422sed 's/^/| /' conftest.$ac_ext >&5
9423
9424( exit $ac_status )
9425gcc_cv_func_printf_ptr=no
0a4b6309 9426fi
86da66b5 9427rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0a4b6309 9428fi
0a4b6309
RL
9429rm -f core core.* *.core
9430fi
ba479fd2
NN
9431echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5
9432echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6
63cf211a 9433if test $gcc_cv_func_printf_ptr = yes ; then
ba479fd2
NN
9434
9435cat >>confdefs.h <<\_ACEOF
0a4b6309 9436#define HAVE_PRINTF_PTR 1
ba479fd2 9437_ACEOF
0a4b6309
RL
9438
9439fi
9440
3b0727a0
MR
9441
9442echo "$as_me:$LINENO: checking for sys/mman.h" >&5
9443echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
9444if test "${ac_cv_header_sys_mman_h+set}" = set; then
9445 echo $ECHO_N "(cached) $ECHO_C" >&6
9446else
9447 cat >conftest.$ac_ext <<_ACEOF
9448/* confdefs.h. */
9449_ACEOF
9450cat confdefs.h >>conftest.$ac_ext
9451cat >>conftest.$ac_ext <<_ACEOF
9452/* end confdefs.h. */
9453#include <sys/mman.h>
9454_ACEOF
9455if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9456 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9457 ac_status=$?
9458 grep -v '^ *+' conftest.er1 >conftest.err
9459 rm -f conftest.er1
9460 cat conftest.err >&5
9461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9462 (exit $ac_status); } >/dev/null; then
9463 if test -s conftest.err; then
9464 ac_cpp_err=$ac_c_preproc_warn_flag
9465 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9466 else
9467 ac_cpp_err=
9468 fi
9469else
9470 ac_cpp_err=yes
9471fi
9472if test -z "$ac_cpp_err"; then
9473 ac_cv_header_sys_mman_h=yes
9474else
9475 echo "$as_me: failed program was:" >&5
9476sed 's/^/| /' conftest.$ac_ext >&5
9477
9478 ac_cv_header_sys_mman_h=no
9479fi
9480rm -f conftest.err conftest.$ac_ext
9481fi
9482echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9483echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
9484if test $ac_cv_header_sys_mman_h = yes; then
9485 gcc_header_sys_mman_h=yes
9486else
9487 gcc_header_sys_mman_h=no
9488fi
9489
9490echo "$as_me:$LINENO: checking for mmap" >&5
9491echo $ECHO_N "checking for mmap... $ECHO_C" >&6
9492if test "${ac_cv_func_mmap+set}" = set; then
9493 echo $ECHO_N "(cached) $ECHO_C" >&6
9494else
9495 cat >conftest.$ac_ext <<_ACEOF
9496/* confdefs.h. */
9497_ACEOF
9498cat confdefs.h >>conftest.$ac_ext
9499cat >>conftest.$ac_ext <<_ACEOF
9500/* end confdefs.h. */
9501/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9502 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9503#define mmap innocuous_mmap
9504
9505/* System header to define __stub macros and hopefully few prototypes,
9506 which can conflict with char mmap (); below.
9507 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9508 <limits.h> exists even on freestanding compilers. */
9509
9510#ifdef __STDC__
9511# include <limits.h>
9512#else
9513# include <assert.h>
9514#endif
9515
9516#undef mmap
9517
9518/* Override any gcc2 internal prototype to avoid an error. */
9519#ifdef __cplusplus
9520extern "C"
9521{
9522#endif
9523/* We use char because int might match the return type of a gcc2
9524 builtin and then its argument prototype would still apply. */
9525char mmap ();
9526/* The GNU C library defines this for functions which it implements
9527 to always fail with ENOSYS. Some functions are actually named
9528 something starting with __ and the normal name is an alias. */
9529#if defined (__stub_mmap) || defined (__stub___mmap)
9530choke me
9531#else
9532char (*f) () = mmap;
9533#endif
9534#ifdef __cplusplus
9535}
9536#endif
9537
9538int
9539main ()
9540{
9541return f != mmap;
9542 ;
9543 return 0;
9544}
9545_ACEOF
9546rm -f conftest.$ac_objext conftest$ac_exeext
9547if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9548 (eval $ac_link) 2>conftest.er1
9549 ac_status=$?
9550 grep -v '^ *+' conftest.er1 >conftest.err
9551 rm -f conftest.er1
9552 cat conftest.err >&5
9553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9554 (exit $ac_status); } &&
215c351a
PB
9555 { ac_try='test -z "$ac_c_werror_flag"
9556 || test ! -s conftest.err'
3b0727a0
MR
9557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9558 (eval $ac_try) 2>&5
9559 ac_status=$?
9560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9561 (exit $ac_status); }; } &&
9562 { ac_try='test -s conftest$ac_exeext'
9563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9564 (eval $ac_try) 2>&5
9565 ac_status=$?
9566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9567 (exit $ac_status); }; }; then
9568 ac_cv_func_mmap=yes
9569else
9570 echo "$as_me: failed program was:" >&5
9571sed 's/^/| /' conftest.$ac_ext >&5
9572
9573ac_cv_func_mmap=no
9574fi
9575rm -f conftest.err conftest.$ac_objext \
9576 conftest$ac_exeext conftest.$ac_ext
9577fi
9578echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9579echo "${ECHO_T}$ac_cv_func_mmap" >&6
9580if test $ac_cv_func_mmap = yes; then
9581 gcc_func_mmap=yes
9582else
9583 gcc_func_mmap=no
9584fi
9585
9586if test "$gcc_header_sys_mman_h" != yes \
9587 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
9588 gcc_cv_func_mmap_file=no
9589 gcc_cv_func_mmap_dev_zero=no
9590 gcc_cv_func_mmap_anon=no
9591else
ba479fd2
NN
9592 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9593echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
9594if test "${gcc_cv_func_mmap_file+set}" = set; then
9595 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 9596else
ba479fd2 9597 # Add a system to this blacklist if
1072ec3f
ZW
9598 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9599 # memory area containing the same data that you'd get if you applied
9600 # read() to the same fd. The only system known to have a problem here
9601 # is VMS, where text files have record structure.
9602 case "$host_os" in
ba479fd2 9603 vms* | ultrix*)
1072ec3f
ZW
9604 gcc_cv_func_mmap_file=no ;;
9605 *)
9606 gcc_cv_func_mmap_file=yes;;
9607 esac
9608fi
ba479fd2
NN
9609echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9610echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9611 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9612echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
9613if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9614 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9615else
9616 # Add a system to this blacklist if it has mmap() but /dev/zero
9617 # does not exist, or if mmapping /dev/zero does not give anonymous
9618 # zeroed pages with both the following properties:
9619 # 1. If you map N consecutive pages in with one call, and then
9620 # unmap any subset of those pages, the pages that were not
9621 # explicitly unmapped remain accessible.
9622 # 2. If you map two adjacent blocks of memory and then unmap them
9623 # both at once, they must both go away.
9624 # Systems known to be in this category are Windows (all variants),
9625 # VMS, and Darwin.
9626 case "$host_os" in
2ce240d3 9627 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
9628 gcc_cv_func_mmap_dev_zero=no ;;
9629 *)
9630 gcc_cv_func_mmap_dev_zero=yes;;
9631 esac
9632fi
ba479fd2
NN
9633echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9634echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
9635
9636 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
9637 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9638echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
9639if test "${gcc_cv_decl_map_anon+set}" = set; then
9640 echo $ECHO_N "(cached) $ECHO_C" >&6
9641else
9642 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9643/* confdefs.h. */
9644_ACEOF
9645cat confdefs.h >>conftest.$ac_ext
9646cat >>conftest.$ac_ext <<_ACEOF
9647/* end confdefs.h. */
1072ec3f
ZW
9648#include <sys/types.h>
9649#include <sys/mman.h>
9650#include <unistd.h>
9651
9652#ifndef MAP_ANONYMOUS
9653#define MAP_ANONYMOUS MAP_ANON
9654#endif
9655
ba479fd2
NN
9656int
9657main ()
9658{
1072ec3f 9659int n = MAP_ANONYMOUS;
ba479fd2
NN
9660 ;
9661 return 0;
9662}
9663_ACEOF
9664rm -f conftest.$ac_objext
9665if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9666 (eval $ac_compile) 2>conftest.er1
ba479fd2 9667 ac_status=$?
86da66b5
HPN
9668 grep -v '^ *+' conftest.er1 >conftest.err
9669 rm -f conftest.er1
9670 cat conftest.err >&5
ba479fd2
NN
9671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9672 (exit $ac_status); } &&
215c351a
PB
9673 { ac_try='test -z "$ac_c_werror_flag"
9674 || test ! -s conftest.err'
86da66b5
HPN
9675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9676 (eval $ac_try) 2>&5
9677 ac_status=$?
9678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9679 (exit $ac_status); }; } &&
9680 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9682 (eval $ac_try) 2>&5
9683 ac_status=$?
9684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9685 (exit $ac_status); }; }; then
1072ec3f
ZW
9686 gcc_cv_decl_map_anon=yes
9687else
ba479fd2
NN
9688 echo "$as_me: failed program was:" >&5
9689sed 's/^/| /' conftest.$ac_ext >&5
9690
9691gcc_cv_decl_map_anon=no
1072ec3f 9692fi
86da66b5 9693rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 9694fi
ba479fd2
NN
9695echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9696echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
9697
9698 if test $gcc_cv_decl_map_anon = no; then
9699 gcc_cv_func_mmap_anon=no
9700 else
ba479fd2
NN
9701 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9702echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
9703if test "${gcc_cv_func_mmap_anon+set}" = set; then
9704 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9705else
9706 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9707 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9708 # doesn't give anonymous zeroed pages with the same properties listed
9709 # above for use of /dev/zero.
9710 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9711 case "$host_os" in
9712 vms* | cygwin* | pe | mingw* | sco* | udk* )
9713 gcc_cv_func_mmap_anon=no ;;
9714 *)
9715 gcc_cv_func_mmap_anon=yes;;
9716 esac
9717fi
ba479fd2
NN
9718echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9719echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
9720 fi
9721fi
9722
9723if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
9724
9725cat >>confdefs.h <<\_ACEOF
1072ec3f 9726#define HAVE_MMAP_FILE 1
ba479fd2 9727_ACEOF
1072ec3f
ZW
9728
9729fi
9730if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
9731
9732cat >>confdefs.h <<\_ACEOF
1072ec3f 9733#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 9734_ACEOF
1072ec3f
ZW
9735
9736fi
9737if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
9738
9739cat >>confdefs.h <<\_ACEOF
1072ec3f 9740#define HAVE_MMAP_ANON 1
ba479fd2 9741_ACEOF
1072ec3f
ZW
9742
9743fi
9744
b27d2bd5
MK
9745
9746case "${host}" in
ee262b6f 9747*-*-*vms*)
ba479fd2 9748 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
9749 # won't work, and it isn't easily adaptable. It makes more sense to
9750 # just force it.
9751 ac_cv_func_vfork_works=yes
9752 ;;
b27d2bd5 9753esac
ba479fd2
NN
9754echo "$as_me:$LINENO: checking for pid_t" >&5
9755echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
9756if test "${ac_cv_type_pid_t+set}" = set; then
9757 echo $ECHO_N "(cached) $ECHO_C" >&6
9758else
9759 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9760/* confdefs.h. */
9761_ACEOF
9762cat confdefs.h >>conftest.$ac_ext
9763cat >>conftest.$ac_ext <<_ACEOF
9764/* end confdefs.h. */
9765$ac_includes_default
9766int
9767main ()
9768{
9769if ((pid_t *) 0)
9770 return 0;
9771if (sizeof (pid_t))
9772 return 0;
9773 ;
9774 return 0;
9775}
9776_ACEOF
9777rm -f conftest.$ac_objext
9778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9779 (eval $ac_compile) 2>conftest.er1
ba479fd2 9780 ac_status=$?
86da66b5
HPN
9781 grep -v '^ *+' conftest.er1 >conftest.err
9782 rm -f conftest.er1
9783 cat conftest.err >&5
ba479fd2
NN
9784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9785 (exit $ac_status); } &&
215c351a
PB
9786 { ac_try='test -z "$ac_c_werror_flag"
9787 || test ! -s conftest.err'
86da66b5
HPN
9788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9789 (eval $ac_try) 2>&5
9790 ac_status=$?
9791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9792 (exit $ac_status); }; } &&
9793 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9795 (eval $ac_try) 2>&5
9796 ac_status=$?
9797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9798 (exit $ac_status); }; }; then
cb65112a 9799 ac_cv_type_pid_t=yes
c375c43b 9800else
ba479fd2
NN
9801 echo "$as_me: failed program was:" >&5
9802sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9803
ba479fd2
NN
9804ac_cv_type_pid_t=no
9805fi
86da66b5 9806rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9807fi
ba479fd2
NN
9808echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
9809echo "${ECHO_T}$ac_cv_type_pid_t" >&6
9810if test $ac_cv_type_pid_t = yes; then
9811 :
9812else
9813
9814cat >>confdefs.h <<_ACEOF
c375c43b 9815#define pid_t int
ba479fd2 9816_ACEOF
c375c43b
KG
9817
9818fi
9819
ba479fd2
NN
9820
9821
9822for ac_header in unistd.h vfork.h
9823do
9824as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 9825echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
9826echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9827if eval "test \"\${$as_ac_Header+set}\" = set"; then
9828 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9829else
ca9bc441 9830 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9831/* confdefs.h. */
9832_ACEOF
9833cat confdefs.h >>conftest.$ac_ext
9834cat >>conftest.$ac_ext <<_ACEOF
9835/* end confdefs.h. */
9836#include <$ac_header>
9837_ACEOF
9838if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9839 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9840 ac_status=$?
9841 grep -v '^ *+' conftest.er1 >conftest.err
9842 rm -f conftest.er1
9843 cat conftest.err >&5
9844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9845 (exit $ac_status); } >/dev/null; then
9846 if test -s conftest.err; then
9847 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 9848 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
9849 else
9850 ac_cpp_err=
9851 fi
093e61a6 9852else
ba479fd2
NN
9853 ac_cpp_err=yes
9854fi
9855if test -z "$ac_cpp_err"; then
ca9bc441 9856 eval "$as_ac_Header=yes"
ba479fd2
NN
9857else
9858 echo "$as_me: failed program was:" >&5
9859sed 's/^/| /' conftest.$ac_ext >&5
9860
ca9bc441 9861 eval "$as_ac_Header=no"
ba479fd2
NN
9862fi
9863rm -f conftest.err conftest.$ac_ext
c375c43b 9864fi
ba479fd2
NN
9865echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9866echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
9867if test `eval echo '${'$as_ac_Header'}'` = yes; then
9868 cat >>confdefs.h <<_ACEOF
9869#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9870_ACEOF
6e3f3080
NN
9871
9872fi
ba479fd2
NN
9873done
9874
9875
9876
9877for ac_func in fork vfork
9878do
9879as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9880echo "$as_me:$LINENO: checking for $ac_func" >&5
9881echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9882if eval "test \"\${$as_ac_var+set}\" = set"; then
9883 echo $ECHO_N "(cached) $ECHO_C" >&6
9884else
9885 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9886/* confdefs.h. */
9887_ACEOF
9888cat confdefs.h >>conftest.$ac_ext
9889cat >>conftest.$ac_ext <<_ACEOF
9890/* end confdefs.h. */
86da66b5
HPN
9891/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9892 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9893#define $ac_func innocuous_$ac_func
9894
c375c43b 9895/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9896 which can conflict with char $ac_func (); below.
9897 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9898 <limits.h> exists even on freestanding compilers. */
86da66b5 9899
ba479fd2
NN
9900#ifdef __STDC__
9901# include <limits.h>
9902#else
9903# include <assert.h>
9904#endif
86da66b5
HPN
9905
9906#undef $ac_func
9907
6e3f3080 9908/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9909#ifdef __cplusplus
9910extern "C"
9911{
9912#endif
6e3f3080 9913/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9914 builtin and then its argument prototype would still apply. */
9915char $ac_func ();
c375c43b
KG
9916/* The GNU C library defines this for functions which it implements
9917 to always fail with ENOSYS. Some functions are actually named
9918 something starting with __ and the normal name is an alias. */
ba479fd2 9919#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
9920choke me
9921#else
ba479fd2
NN
9922char (*f) () = $ac_func;
9923#endif
9924#ifdef __cplusplus
9925}
c375c43b
KG
9926#endif
9927
ba479fd2
NN
9928int
9929main ()
9930{
9931return f != $ac_func;
9932 ;
9933 return 0;
9934}
9935_ACEOF
9936rm -f conftest.$ac_objext conftest$ac_exeext
9937if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9938 (eval $ac_link) 2>conftest.er1
ba479fd2 9939 ac_status=$?
86da66b5
HPN
9940 grep -v '^ *+' conftest.er1 >conftest.err
9941 rm -f conftest.er1
9942 cat conftest.err >&5
ba479fd2
NN
9943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9944 (exit $ac_status); } &&
215c351a
PB
9945 { ac_try='test -z "$ac_c_werror_flag"
9946 || test ! -s conftest.err'
86da66b5
HPN
9947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9948 (eval $ac_try) 2>&5
9949 ac_status=$?
9950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9951 (exit $ac_status); }; } &&
9952 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9954 (eval $ac_try) 2>&5
9955 ac_status=$?
9956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9957 (exit $ac_status); }; }; then
9958 eval "$as_ac_var=yes"
9959else
9960 echo "$as_me: failed program was:" >&5
9961sed 's/^/| /' conftest.$ac_ext >&5
9962
9963eval "$as_ac_var=no"
9964fi
86da66b5
HPN
9965rm -f conftest.err conftest.$ac_objext \
9966 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9967fi
9968echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9969echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9970if test `eval echo '${'$as_ac_var'}'` = yes; then
9971 cat >>confdefs.h <<_ACEOF
9972#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9973_ACEOF
9974
c375c43b 9975fi
ba479fd2 9976done
c375c43b 9977
ba479fd2
NN
9978if test "x$ac_cv_func_fork" = xyes; then
9979 echo "$as_me:$LINENO: checking for working fork" >&5
9980echo $ECHO_N "checking for working fork... $ECHO_C" >&6
9981if test "${ac_cv_func_fork_works+set}" = set; then
9982 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 9983else
ba479fd2
NN
9984 if test "$cross_compiling" = yes; then
9985 ac_cv_func_fork_works=cross
9986else
9987 cat >conftest.$ac_ext <<_ACEOF
9988/* By Ruediger Kuhlmann. */
9989 #include <sys/types.h>
9990 #if HAVE_UNISTD_H
9991 # include <unistd.h>
9992 #endif
9993 /* Some systems only have a dummy stub for fork() */
9994 int main ()
9995 {
86da66b5
HPN
9996 if (fork() < 0)
9997 exit (1);
9998 exit (0);
ba479fd2
NN
9999 }
10000_ACEOF
10001rm -f conftest$ac_exeext
10002if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10003 (eval $ac_link) 2>&5
10004 ac_status=$?
10005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10006 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10008 (eval $ac_try) 2>&5
10009 ac_status=$?
10010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10011 (exit $ac_status); }; }; then
10012 ac_cv_func_fork_works=yes
10013else
10014 echo "$as_me: program exited with status $ac_status" >&5
10015echo "$as_me: failed program was:" >&5
10016sed 's/^/| /' conftest.$ac_ext >&5
10017
10018( exit $ac_status )
10019ac_cv_func_fork_works=no
10020fi
86da66b5 10021rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
10022fi
10023fi
10024echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10025echo "${ECHO_T}$ac_cv_func_fork_works" >&6
10026
10027else
10028 ac_cv_func_fork_works=$ac_cv_func_fork
10029fi
10030if test "x$ac_cv_func_fork_works" = xcross; then
10031 case $host in
10032 *-*-amigaos* | *-*-msdosdjgpp*)
10033 # Override, as these systems have only a dummy fork() stub
10034 ac_cv_func_fork_works=no
10035 ;;
10036 *)
10037 ac_cv_func_fork_works=yes
10038 ;;
10039 esac
10040 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10041echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 10042fi
c375c43b 10043ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10044if test "x$ac_cv_func_vfork" = xyes; then
10045 echo "$as_me:$LINENO: checking for working vfork" >&5
10046echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
10047if test "${ac_cv_func_vfork_works+set}" = set; then
10048 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10049else
ba479fd2
NN
10050 if test "$cross_compiling" = yes; then
10051 ac_cv_func_vfork_works=cross
10052else
10053 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10054/* confdefs.h. */
10055_ACEOF
10056cat confdefs.h >>conftest.$ac_ext
10057cat >>conftest.$ac_ext <<_ACEOF
10058/* end confdefs.h. */
c375c43b
KG
10059/* Thanks to Paul Eggert for this test. */
10060#include <stdio.h>
ba479fd2 10061#include <stdlib.h>
c375c43b
KG
10062#include <sys/types.h>
10063#include <sys/stat.h>
ba479fd2
NN
10064#include <sys/wait.h>
10065#if HAVE_UNISTD_H
10066# include <unistd.h>
c375c43b 10067#endif
ba479fd2
NN
10068#if HAVE_VFORK_H
10069# include <vfork.h>
c375c43b
KG
10070#endif
10071/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
10072 argument registers are propagated back to the parent. The compiler
10073 is told about this with #include <vfork.h>, but some compilers
10074 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10075 static variable whose address is put into a register that is
10076 clobbered by the vfork. */
10077static void
c375c43b
KG
10078#ifdef __cplusplus
10079sparc_address_test (int arg)
ba479fd2 10080# else
c375c43b
KG
10081sparc_address_test (arg) int arg;
10082#endif
10083{
10084 static pid_t child;
10085 if (!child) {
10086 child = vfork ();
10087 if (child < 0) {
10088 perror ("vfork");
10089 _exit(2);
10090 }
10091 if (!child) {
10092 arg = getpid();
10093 write(-1, "", 0);
10094 _exit (arg);
10095 }
10096 }
10097}
ba479fd2
NN
10098
10099int
10100main ()
10101{
c375c43b
KG
10102 pid_t parent = getpid ();
10103 pid_t child;
10104
ba479fd2 10105 sparc_address_test (0);
c375c43b
KG
10106
10107 child = vfork ();
10108
10109 if (child == 0) {
ba479fd2
NN
10110 /* Here is another test for sparc vfork register problems. This
10111 test uses lots of local variables, at least as many local
10112 variables as main has allocated so far including compiler
10113 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10114 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10115 reuse the register of parent for one of the local variables,
10116 since it will think that parent can't possibly be used any more
10117 in this routine. Assigning to the local variable will thus
10118 munge parent in the parent process. */
c375c43b
KG
10119 pid_t
10120 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10121 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10122 /* Convince the compiler that p..p7 are live; otherwise, it might
10123 use the same hardware register for all 8 local variables. */
10124 if (p != p1 || p != p2 || p != p3 || p != p4
10125 || p != p5 || p != p6 || p != p7)
10126 _exit(1);
10127
ba479fd2
NN
10128 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10129 from child file descriptors. If the child closes a descriptor
10130 before it execs or exits, this munges the parent's descriptor
10131 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10132 _exit(close(fileno(stdout)) != 0);
10133 } else {
10134 int status;
10135 struct stat st;
10136
10137 while (wait(&status) != child)
10138 ;
10139 exit(
10140 /* Was there some problem with vforking? */
10141 child < 0
10142
10143 /* Did the child fail? (This shouldn't happen.) */
10144 || status
10145
10146 /* Did the vfork/compiler bug occur? */
10147 || parent != getpid()
10148
10149 /* Did the file descriptor bug occur? */
10150 || fstat(fileno(stdout), &st) != 0
10151 );
10152 }
10153}
ba479fd2
NN
10154_ACEOF
10155rm -f conftest$ac_exeext
10156if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10157 (eval $ac_link) 2>&5
10158 ac_status=$?
10159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10160 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10162 (eval $ac_try) 2>&5
10163 ac_status=$?
10164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10165 (exit $ac_status); }; }; then
c375c43b
KG
10166 ac_cv_func_vfork_works=yes
10167else
ba479fd2
NN
10168 echo "$as_me: program exited with status $ac_status" >&5
10169echo "$as_me: failed program was:" >&5
10170sed 's/^/| /' conftest.$ac_ext >&5
10171
10172( exit $ac_status )
10173ac_cv_func_vfork_works=no
cafe096b 10174fi
86da66b5 10175rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10176fi
ba479fd2
NN
10177fi
10178echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10179echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 10180
ba479fd2
NN
10181fi;
10182if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 10183 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10184 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10185echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
10186fi
10187
ba479fd2
NN
10188if test "x$ac_cv_func_vfork_works" = xyes; then
10189
10190cat >>confdefs.h <<\_ACEOF
10191#define HAVE_WORKING_VFORK 1
10192_ACEOF
10193
10194else
10195
10196cat >>confdefs.h <<\_ACEOF
c375c43b 10197#define vfork fork
ba479fd2 10198_ACEOF
c375c43b
KG
10199
10200fi
ba479fd2
NN
10201if test "x$ac_cv_func_fork_works" = xyes; then
10202
10203cat >>confdefs.h <<\_ACEOF
10204#define HAVE_WORKING_FORK 1
10205_ACEOF
10206
10207fi
10208
c375c43b 10209
81bf3d9e 10210
dfb77e37
KC
10211 if test "X$prefix" = "XNONE"; then
10212 acl_final_prefix="$ac_default_prefix"
10213 else
10214 acl_final_prefix="$prefix"
10215 fi
10216 if test "X$exec_prefix" = "XNONE"; then
10217 acl_final_exec_prefix='${prefix}'
10218 else
10219 acl_final_exec_prefix="$exec_prefix"
10220 fi
10221 acl_save_prefix="$prefix"
10222 prefix="$acl_final_prefix"
10223 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10224 prefix="$acl_save_prefix"
f91abfce
TT
10225
10226
dfb77e37
KC
10227# Check whether --with-gnu-ld or --without-gnu-ld was given.
10228if test "${with_gnu_ld+set}" = set; then
10229 withval="$with_gnu_ld"
10230 test "$withval" = no || with_gnu_ld=yes
ba479fd2 10231else
dfb77e37
KC
10232 with_gnu_ld=no
10233fi;
10234# Prepare PATH_SEPARATOR.
10235# The user is always right.
10236if test "${PATH_SEPARATOR+set}" != set; then
10237 echo "#! /bin/sh" >conf$$.sh
10238 echo "exit 0" >>conf$$.sh
10239 chmod +x conf$$.sh
10240 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10241 PATH_SEPARATOR=';'
ba479fd2 10242 else
dfb77e37 10243 PATH_SEPARATOR=:
ba479fd2 10244 fi
dfb77e37
KC
10245 rm -f conf$$.sh
10246fi
10247ac_prog=ld
10248if test "$GCC" = yes; then
10249 # Check if gcc -print-prog-name=ld gives a path.
10250 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10251echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10252 case $host in
10253 *-*-mingw*)
10254 # gcc leaves a trailing carriage return which upsets mingw
10255 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10256 *)
10257 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10258 esac
10259 case $ac_prog in
10260 # Accept absolute paths.
10261 [\\/]* | [A-Za-z]:[\\/]*)
10262 re_direlt='/[^/][^/]*/\.\./'
10263 # Canonicalize the path of ld
10264 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10265 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10266 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10267 done
10268 test -z "$LD" && LD="$ac_prog"
10269 ;;
10270 "")
10271 # If it fails, then pretend we aren't using GCC.
10272 ac_prog=ld
10273 ;;
10274 *)
10275 # If it is relative, then search for the first ld in PATH.
10276 with_gnu_ld=unknown
10277 ;;
10278 esac
10279elif test "$with_gnu_ld" = yes; then
10280 echo "$as_me:$LINENO: checking for GNU ld" >&5
10281echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 10282else
dfb77e37
KC
10283 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10284echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 10285fi
dfb77e37
KC
10286if test "${acl_cv_path_LD+set}" = set; then
10287 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 10288else
dfb77e37
KC
10289 if test -z "$LD"; then
10290 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10291 for ac_dir in $PATH; do
10292 test -z "$ac_dir" && ac_dir=.
10293 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10294 acl_cv_path_LD="$ac_dir/$ac_prog"
10295 # Check to see if the program is GNU ld. I'd rather use --version,
10296 # but apparently some GNU ld's only accept -v.
10297 # Break only if it was the GNU/non-GNU ld that we prefer.
10298 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10299 test "$with_gnu_ld" != no && break
10300 else
10301 test "$with_gnu_ld" != yes && break
10302 fi
10303 fi
10304 done
10305 IFS="$ac_save_ifs"
10306else
10307 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10308fi
10309fi
ba479fd2 10310
dfb77e37
KC
10311LD="$acl_cv_path_LD"
10312if test -n "$LD"; then
10313 echo "$as_me:$LINENO: result: $LD" >&5
10314echo "${ECHO_T}$LD" >&6
10315else
10316 echo "$as_me:$LINENO: result: no" >&5
10317echo "${ECHO_T}no" >&6
ba479fd2 10318fi
dfb77e37
KC
10319test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10320echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10321 { (exit 1); exit 1; }; }
10322echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10323echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10324if test "${acl_cv_prog_gnu_ld+set}" = set; then
10325 echo $ECHO_N "(cached) $ECHO_C" >&6
10326else
10327 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10328if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10329 acl_cv_prog_gnu_ld=yes
10330else
10331 acl_cv_prog_gnu_ld=no
6e3f3080 10332fi
dfb77e37
KC
10333fi
10334echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10335echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10336with_gnu_ld=$acl_cv_prog_gnu_ld
10337
10338
10339
10340 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10341echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10342if test "${acl_cv_rpath+set}" = set; then
10343 echo $ECHO_N "(cached) $ECHO_C" >&6
10344else
10345
10346 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10347 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10348 . ./conftest.sh
10349 rm -f ./conftest.sh
10350 acl_cv_rpath=done
ba479fd2 10351
eb158727 10352fi
dfb77e37
KC
10353echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10354echo "${ECHO_T}$acl_cv_rpath" >&6
10355 wl="$acl_cv_wl"
10356 libext="$acl_cv_libext"
10357 shlibext="$acl_cv_shlibext"
10358 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10359 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10360 hardcode_direct="$acl_cv_hardcode_direct"
10361 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10362 # Check whether --enable-rpath or --disable-rpath was given.
10363if test "${enable_rpath+set}" = set; then
10364 enableval="$enable_rpath"
10365 :
10366else
10367 enable_rpath=yes
10368fi;
10369
10370
10371
10372
10373
10374
10375
10376 use_additional=yes
10377
10378 acl_save_prefix="$prefix"
10379 prefix="$acl_final_prefix"
10380 acl_save_exec_prefix="$exec_prefix"
10381 exec_prefix="$acl_final_exec_prefix"
10382
10383 eval additional_includedir=\"$includedir\"
10384 eval additional_libdir=\"$libdir\"
10385
10386 exec_prefix="$acl_save_exec_prefix"
10387 prefix="$acl_save_prefix"
10388
10389
10390# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10391if test "${with_libiconv_prefix+set}" = set; then
10392 withval="$with_libiconv_prefix"
10393
10394 if test "X$withval" = "Xno"; then
10395 use_additional=no
10396 else
10397 if test "X$withval" = "X"; then
10398
10399 acl_save_prefix="$prefix"
10400 prefix="$acl_final_prefix"
10401 acl_save_exec_prefix="$exec_prefix"
10402 exec_prefix="$acl_final_exec_prefix"
10403
10404 eval additional_includedir=\"$includedir\"
10405 eval additional_libdir=\"$libdir\"
10406
10407 exec_prefix="$acl_save_exec_prefix"
10408 prefix="$acl_save_prefix"
10409
10410 else
10411 additional_includedir="$withval/include"
10412 additional_libdir="$withval/lib"
10413 fi
10414 fi
10415
10416fi;
10417 LIBICONV=
10418 LTLIBICONV=
10419 INCICONV=
10420 rpathdirs=
10421 ltrpathdirs=
10422 names_already_handled=
10423 names_next_round='iconv '
10424 while test -n "$names_next_round"; do
10425 names_this_round="$names_next_round"
10426 names_next_round=
10427 for name in $names_this_round; do
10428 already_handled=
10429 for n in $names_already_handled; do
10430 if test "$n" = "$name"; then
10431 already_handled=yes
10432 break
10433 fi
10434 done
10435 if test -z "$already_handled"; then
10436 names_already_handled="$names_already_handled $name"
10437 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10438 eval value=\"\$HAVE_LIB$uppername\"
10439 if test -n "$value"; then
10440 if test "$value" = yes; then
10441 eval value=\"\$LIB$uppername\"
10442 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10443 eval value=\"\$LTLIB$uppername\"
10444 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10445 else
10446 :
10447 fi
10448 else
10449 found_dir=
10450 found_la=
10451 found_so=
10452 found_a=
10453 if test $use_additional = yes; then
10454 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10455 found_dir="$additional_libdir"
10456 found_so="$additional_libdir/lib$name.$shlibext"
10457 if test -f "$additional_libdir/lib$name.la"; then
10458 found_la="$additional_libdir/lib$name.la"
10459 fi
10460 else
10461 if test -f "$additional_libdir/lib$name.$libext"; then
10462 found_dir="$additional_libdir"
10463 found_a="$additional_libdir/lib$name.$libext"
10464 if test -f "$additional_libdir/lib$name.la"; then
10465 found_la="$additional_libdir/lib$name.la"
10466 fi
10467 fi
10468 fi
10469 fi
10470 if test "X$found_dir" = "X"; then
10471 for x in $LDFLAGS $LTLIBICONV; do
10472
10473 acl_save_prefix="$prefix"
10474 prefix="$acl_final_prefix"
10475 acl_save_exec_prefix="$exec_prefix"
10476 exec_prefix="$acl_final_exec_prefix"
10477 eval x=\"$x\"
10478 exec_prefix="$acl_save_exec_prefix"
10479 prefix="$acl_save_prefix"
10480
10481 case "$x" in
10482 -L*)
10483 dir=`echo "X$x" | sed -e 's/^X-L//'`
10484 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10485 found_dir="$dir"
10486 found_so="$dir/lib$name.$shlibext"
10487 if test -f "$dir/lib$name.la"; then
10488 found_la="$dir/lib$name.la"
10489 fi
10490 else
10491 if test -f "$dir/lib$name.$libext"; then
10492 found_dir="$dir"
10493 found_a="$dir/lib$name.$libext"
10494 if test -f "$dir/lib$name.la"; then
10495 found_la="$dir/lib$name.la"
10496 fi
10497 fi
10498 fi
10499 ;;
10500 esac
10501 if test "X$found_dir" != "X"; then
10502 break
10503 fi
10504 done
10505 fi
10506 if test "X$found_dir" != "X"; then
10507 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10508 if test "X$found_so" != "X"; then
10509 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10510 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10511 else
10512 haveit=
10513 for x in $ltrpathdirs; do
10514 if test "X$x" = "X$found_dir"; then
10515 haveit=yes
10516 break
10517 fi
10518 done
10519 if test -z "$haveit"; then
10520 ltrpathdirs="$ltrpathdirs $found_dir"
10521 fi
10522 if test "$hardcode_direct" = yes; then
10523 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10524 else
10525 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10526 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10527 haveit=
10528 for x in $rpathdirs; do
10529 if test "X$x" = "X$found_dir"; then
10530 haveit=yes
10531 break
10532 fi
10533 done
10534 if test -z "$haveit"; then
10535 rpathdirs="$rpathdirs $found_dir"
10536 fi
10537 else
10538 haveit=
10539 for x in $LDFLAGS $LIBICONV; do
10540
10541 acl_save_prefix="$prefix"
10542 prefix="$acl_final_prefix"
10543 acl_save_exec_prefix="$exec_prefix"
10544 exec_prefix="$acl_final_exec_prefix"
10545 eval x=\"$x\"
10546 exec_prefix="$acl_save_exec_prefix"
10547 prefix="$acl_save_prefix"
10548
10549 if test "X$x" = "X-L$found_dir"; then
10550 haveit=yes
10551 break
10552 fi
10553 done
10554 if test -z "$haveit"; then
10555 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10556 fi
10557 if test "$hardcode_minus_L" != no; then
10558 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10559 else
10560 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10561 fi
10562 fi
10563 fi
10564 fi
10565 else
10566 if test "X$found_a" != "X"; then
10567 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10568 else
10569 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10570 fi
10571 fi
10572 additional_includedir=
10573 case "$found_dir" in
10574 */lib | */lib/)
10575 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10576 additional_includedir="$basedir/include"
10577 ;;
10578 esac
10579 if test "X$additional_includedir" != "X"; then
10580 if test "X$additional_includedir" != "X/usr/include"; then
10581 haveit=
10582 if test "X$additional_includedir" = "X/usr/local/include"; then
10583 if test -n "$GCC"; then
10584 case $host_os in
10585 linux*) haveit=yes;;
10586 esac
10587 fi
10588 fi
10589 if test -z "$haveit"; then
10590 for x in $CPPFLAGS $INCICONV; do
10591
10592 acl_save_prefix="$prefix"
10593 prefix="$acl_final_prefix"
10594 acl_save_exec_prefix="$exec_prefix"
10595 exec_prefix="$acl_final_exec_prefix"
10596 eval x=\"$x\"
10597 exec_prefix="$acl_save_exec_prefix"
10598 prefix="$acl_save_prefix"
10599
10600 if test "X$x" = "X-I$additional_includedir"; then
10601 haveit=yes
10602 break
10603 fi
10604 done
10605 if test -z "$haveit"; then
10606 if test -d "$additional_includedir"; then
10607 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10608 fi
10609 fi
10610 fi
10611 fi
10612 fi
10613 if test -n "$found_la"; then
10614 save_libdir="$libdir"
10615 case "$found_la" in
10616 */* | *\\*) . "$found_la" ;;
10617 *) . "./$found_la" ;;
10618 esac
10619 libdir="$save_libdir"
10620 for dep in $dependency_libs; do
10621 case "$dep" in
10622 -L*)
10623 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10624 if test "X$additional_libdir" != "X/usr/lib"; then
10625 haveit=
10626 if test "X$additional_libdir" = "X/usr/local/lib"; then
10627 if test -n "$GCC"; then
10628 case $host_os in
10629 linux*) haveit=yes;;
10630 esac
10631 fi
10632 fi
10633 if test -z "$haveit"; then
10634 haveit=
10635 for x in $LDFLAGS $LIBICONV; do
10636
10637 acl_save_prefix="$prefix"
10638 prefix="$acl_final_prefix"
10639 acl_save_exec_prefix="$exec_prefix"
10640 exec_prefix="$acl_final_exec_prefix"
10641 eval x=\"$x\"
10642 exec_prefix="$acl_save_exec_prefix"
10643 prefix="$acl_save_prefix"
10644
10645 if test "X$x" = "X-L$additional_libdir"; then
10646 haveit=yes
10647 break
10648 fi
10649 done
10650 if test -z "$haveit"; then
10651 if test -d "$additional_libdir"; then
10652 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10653 fi
10654 fi
10655 haveit=
10656 for x in $LDFLAGS $LTLIBICONV; do
10657
10658 acl_save_prefix="$prefix"
10659 prefix="$acl_final_prefix"
10660 acl_save_exec_prefix="$exec_prefix"
10661 exec_prefix="$acl_final_exec_prefix"
10662 eval x=\"$x\"
10663 exec_prefix="$acl_save_exec_prefix"
10664 prefix="$acl_save_prefix"
10665
10666 if test "X$x" = "X-L$additional_libdir"; then
10667 haveit=yes
10668 break
10669 fi
10670 done
10671 if test -z "$haveit"; then
10672 if test -d "$additional_libdir"; then
10673 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10674 fi
10675 fi
10676 fi
10677 fi
10678 ;;
10679 -R*)
10680 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10681 if test "$enable_rpath" != no; then
10682 haveit=
10683 for x in $rpathdirs; do
10684 if test "X$x" = "X$dir"; then
10685 haveit=yes
10686 break
10687 fi
10688 done
10689 if test -z "$haveit"; then
10690 rpathdirs="$rpathdirs $dir"
10691 fi
10692 haveit=
10693 for x in $ltrpathdirs; do
10694 if test "X$x" = "X$dir"; then
10695 haveit=yes
10696 break
10697 fi
10698 done
10699 if test -z "$haveit"; then
10700 ltrpathdirs="$ltrpathdirs $dir"
10701 fi
10702 fi
10703 ;;
10704 -l*)
10705 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10706 ;;
10707 *.la)
10708 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10709 ;;
10710 *)
10711 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10712 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10713 ;;
10714 esac
10715 done
10716 fi
10717 else
10718 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10719 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10720 fi
10721 fi
10722 fi
10723 done
10724 done
10725 if test "X$rpathdirs" != "X"; then
10726 if test -n "$hardcode_libdir_separator"; then
10727 alldirs=
10728 for found_dir in $rpathdirs; do
10729 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10730 done
10731 acl_save_libdir="$libdir"
10732 libdir="$alldirs"
10733 eval flag=\"$hardcode_libdir_flag_spec\"
10734 libdir="$acl_save_libdir"
10735 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10736 else
10737 for found_dir in $rpathdirs; do
10738 acl_save_libdir="$libdir"
10739 libdir="$found_dir"
10740 eval flag=\"$hardcode_libdir_flag_spec\"
10741 libdir="$acl_save_libdir"
10742 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10743 done
10744 fi
10745 fi
10746 if test "X$ltrpathdirs" != "X"; then
10747 for found_dir in $ltrpathdirs; do
10748 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10749 done
10750 fi
10751
10752
10753
10754
10755
10756
10757
10758 am_save_CPPFLAGS="$CPPFLAGS"
10759
10760 for element in $INCICONV; do
10761 haveit=
10762 for x in $CPPFLAGS; do
10763
10764 acl_save_prefix="$prefix"
10765 prefix="$acl_final_prefix"
10766 acl_save_exec_prefix="$exec_prefix"
10767 exec_prefix="$acl_final_exec_prefix"
10768 eval x=\"$x\"
10769 exec_prefix="$acl_save_exec_prefix"
10770 prefix="$acl_save_prefix"
10771
10772 if test "X$x" = "X$element"; then
10773 haveit=yes
10774 break
10775 fi
10776 done
10777 if test -z "$haveit"; then
10778 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10779 fi
10780 done
eb158727
ZW
10781
10782
ba479fd2
NN
10783 echo "$as_me:$LINENO: checking for iconv" >&5
10784echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10785if test "${am_cv_func_iconv+set}" = set; then
10786 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10787else
ba479fd2 10788
f91abfce
TT
10789 am_cv_func_iconv="no, consider installing GNU libiconv"
10790 am_cv_lib_iconv=no
ba479fd2 10791 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10792/* confdefs.h. */
10793_ACEOF
10794cat confdefs.h >>conftest.$ac_ext
10795cat >>conftest.$ac_ext <<_ACEOF
10796/* end confdefs.h. */
f91abfce
TT
10797#include <stdlib.h>
10798#include <iconv.h>
ba479fd2
NN
10799int
10800main ()
10801{
f91abfce
TT
10802iconv_t cd = iconv_open("","");
10803 iconv(cd,NULL,NULL,NULL,NULL);
10804 iconv_close(cd);
ba479fd2
NN
10805 ;
10806 return 0;
10807}
10808_ACEOF
10809rm -f conftest.$ac_objext conftest$ac_exeext
10810if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10811 (eval $ac_link) 2>conftest.er1
ba479fd2 10812 ac_status=$?
86da66b5
HPN
10813 grep -v '^ *+' conftest.er1 >conftest.err
10814 rm -f conftest.er1
10815 cat conftest.err >&5
ba479fd2
NN
10816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10817 (exit $ac_status); } &&
215c351a
PB
10818 { ac_try='test -z "$ac_c_werror_flag"
10819 || test ! -s conftest.err'
86da66b5
HPN
10820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10821 (eval $ac_try) 2>&5
10822 ac_status=$?
10823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10824 (exit $ac_status); }; } &&
10825 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10827 (eval $ac_try) 2>&5
10828 ac_status=$?
10829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10830 (exit $ac_status); }; }; then
f91abfce
TT
10831 am_cv_func_iconv=yes
10832else
ba479fd2
NN
10833 echo "$as_me: failed program was:" >&5
10834sed 's/^/| /' conftest.$ac_ext >&5
10835
f91abfce 10836fi
86da66b5
HPN
10837rm -f conftest.err conftest.$ac_objext \
10838 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
10839 if test "$am_cv_func_iconv" != yes; then
10840 am_save_LIBS="$LIBS"
dfb77e37 10841 LIBS="$LIBS $LIBICONV"
ba479fd2 10842 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10843/* confdefs.h. */
10844_ACEOF
10845cat confdefs.h >>conftest.$ac_ext
10846cat >>conftest.$ac_ext <<_ACEOF
10847/* end confdefs.h. */
f91abfce
TT
10848#include <stdlib.h>
10849#include <iconv.h>
ba479fd2
NN
10850int
10851main ()
10852{
f91abfce
TT
10853iconv_t cd = iconv_open("","");
10854 iconv(cd,NULL,NULL,NULL,NULL);
10855 iconv_close(cd);
ba479fd2
NN
10856 ;
10857 return 0;
10858}
10859_ACEOF
10860rm -f conftest.$ac_objext conftest$ac_exeext
10861if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10862 (eval $ac_link) 2>conftest.er1
ba479fd2 10863 ac_status=$?
86da66b5
HPN
10864 grep -v '^ *+' conftest.er1 >conftest.err
10865 rm -f conftest.er1
10866 cat conftest.err >&5
ba479fd2
NN
10867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10868 (exit $ac_status); } &&
215c351a
PB
10869 { ac_try='test -z "$ac_c_werror_flag"
10870 || test ! -s conftest.err'
86da66b5
HPN
10871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10872 (eval $ac_try) 2>&5
10873 ac_status=$?
10874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10875 (exit $ac_status); }; } &&
10876 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10878 (eval $ac_try) 2>&5
10879 ac_status=$?
10880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10881 (exit $ac_status); }; }; then
f91abfce
TT
10882 am_cv_lib_iconv=yes
10883 am_cv_func_iconv=yes
10884else
ba479fd2
NN
10885 echo "$as_me: failed program was:" >&5
10886sed 's/^/| /' conftest.$ac_ext >&5
10887
f91abfce 10888fi
86da66b5
HPN
10889rm -f conftest.err conftest.$ac_objext \
10890 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
10891 LIBS="$am_save_LIBS"
10892 fi
6e3f3080 10893
ba479fd2
NN
10894fi
10895echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
10896echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 10897 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
10898
10899cat >>confdefs.h <<\_ACEOF
f91abfce 10900#define HAVE_ICONV 1
ba479fd2 10901_ACEOF
f91abfce 10902
dfb77e37
KC
10903 fi
10904 if test "$am_cv_lib_iconv" = yes; then
10905 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
10906echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
10907 echo "$as_me:$LINENO: result: $LIBICONV" >&5
10908echo "${ECHO_T}$LIBICONV" >&6
10909 else
10910 CPPFLAGS="$am_save_CPPFLAGS"
10911 LIBICONV=
10912 LTLIBICONV=
10913 fi
10914
10915
10916
10917 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
10918 echo "$as_me:$LINENO: checking for iconv declaration" >&5
10919echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
10920 if test "${am_cv_proto_iconv+set}" = set; then
10921 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10922else
ba479fd2
NN
10923
10924 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10925/* confdefs.h. */
10926_ACEOF
10927cat confdefs.h >>conftest.$ac_ext
10928cat >>conftest.$ac_ext <<_ACEOF
10929/* end confdefs.h. */
f91abfce
TT
10930
10931#include <stdlib.h>
10932#include <iconv.h>
10933extern
10934#ifdef __cplusplus
10935"C"
10936#endif
10937#if defined(__STDC__) || defined(__cplusplus)
10938size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10939#else
10940size_t iconv();
10941#endif
10942
ba479fd2
NN
10943int
10944main ()
10945{
f91abfce 10946
ba479fd2
NN
10947 ;
10948 return 0;
10949}
10950_ACEOF
10951rm -f conftest.$ac_objext
10952if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 10953 (eval $ac_compile) 2>conftest.er1
ba479fd2 10954 ac_status=$?
86da66b5
HPN
10955 grep -v '^ *+' conftest.er1 >conftest.err
10956 rm -f conftest.er1
10957 cat conftest.err >&5
ba479fd2
NN
10958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10959 (exit $ac_status); } &&
215c351a
PB
10960 { ac_try='test -z "$ac_c_werror_flag"
10961 || test ! -s conftest.err'
86da66b5
HPN
10962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10963 (eval $ac_try) 2>&5
10964 ac_status=$?
10965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10966 (exit $ac_status); }; } &&
10967 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
10968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10969 (eval $ac_try) 2>&5
10970 ac_status=$?
10971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10972 (exit $ac_status); }; }; then
f91abfce
TT
10973 am_cv_proto_iconv_arg1=""
10974else
ba479fd2
NN
10975 echo "$as_me: failed program was:" >&5
10976sed 's/^/| /' conftest.$ac_ext >&5
10977
10978am_cv_proto_iconv_arg1="const"
f91abfce 10979fi
86da66b5 10980rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
10981 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);"
10982fi
10983
10984 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
10985 echo "$as_me:$LINENO: result: ${ac_t:-
10986 }$am_cv_proto_iconv" >&5
10987echo "${ECHO_T}${ac_t:-
10988 }$am_cv_proto_iconv" >&6
10989
10990cat >>confdefs.h <<_ACEOF
f91abfce 10991#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 10992_ACEOF
f91abfce
TT
10993
10994 fi
f91abfce 10995
56694dd9
ZW
10996# Until we have in-tree GNU iconv:
10997LIBICONV_DEP=
10998
10999
11000
ba479fd2
NN
11001 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11002echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
11003if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11004 echo $ECHO_N "(cached) $ECHO_C" >&6
56694dd9 11005else
ba479fd2 11006 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11007/* confdefs.h. */
11008_ACEOF
11009cat confdefs.h >>conftest.$ac_ext
11010cat >>conftest.$ac_ext <<_ACEOF
11011/* end confdefs.h. */
56694dd9 11012#include <locale.h>
ba479fd2
NN
11013int
11014main ()
11015{
56694dd9 11016return LC_MESSAGES
ba479fd2
NN
11017 ;
11018 return 0;
11019}
11020_ACEOF
11021rm -f conftest.$ac_objext conftest$ac_exeext
11022if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 11023 (eval $ac_link) 2>conftest.er1
ba479fd2 11024 ac_status=$?
86da66b5
HPN
11025 grep -v '^ *+' conftest.er1 >conftest.err
11026 rm -f conftest.er1
11027 cat conftest.err >&5
ba479fd2
NN
11028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11029 (exit $ac_status); } &&
215c351a
PB
11030 { ac_try='test -z "$ac_c_werror_flag"
11031 || test ! -s conftest.err'
86da66b5
HPN
11032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11033 (eval $ac_try) 2>&5
11034 ac_status=$?
11035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11036 (exit $ac_status); }; } &&
11037 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
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); }; }; then
56694dd9
ZW
11043 am_cv_val_LC_MESSAGES=yes
11044else
ba479fd2
NN
11045 echo "$as_me: failed program was:" >&5
11046sed 's/^/| /' conftest.$ac_ext >&5
11047
11048am_cv_val_LC_MESSAGES=no
56694dd9 11049fi
86da66b5
HPN
11050rm -f conftest.err conftest.$ac_objext \
11051 conftest$ac_exeext conftest.$ac_ext
56694dd9 11052fi
ba479fd2
NN
11053echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11054echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
63cf211a 11055 if test $am_cv_val_LC_MESSAGES = yes; then
ba479fd2
NN
11056
11057cat >>confdefs.h <<\_ACEOF
56694dd9 11058#define HAVE_LC_MESSAGES 1
ba479fd2 11059_ACEOF
56694dd9
ZW
11060
11061 fi
11062
f91abfce 11063
a03ea89b
BM
11064
11065 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11066echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11067if test "${am_cv_langinfo_codeset+set}" = set; then
11068 echo $ECHO_N "(cached) $ECHO_C" >&6
11069else
11070 cat >conftest.$ac_ext <<_ACEOF
11071/* confdefs.h. */
11072_ACEOF
11073cat confdefs.h >>conftest.$ac_ext
11074cat >>conftest.$ac_ext <<_ACEOF
11075/* end confdefs.h. */
11076#include <langinfo.h>
11077int
11078main ()
11079{
11080char* cs = nl_langinfo(CODESET);
11081 ;
11082 return 0;
11083}
11084_ACEOF
11085rm -f conftest.$ac_objext conftest$ac_exeext
11086if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11087 (eval $ac_link) 2>conftest.er1
11088 ac_status=$?
11089 grep -v '^ *+' conftest.er1 >conftest.err
11090 rm -f conftest.er1
11091 cat conftest.err >&5
11092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11093 (exit $ac_status); } &&
215c351a
PB
11094 { ac_try='test -z "$ac_c_werror_flag"
11095 || test ! -s conftest.err'
a03ea89b
BM
11096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11097 (eval $ac_try) 2>&5
11098 ac_status=$?
11099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11100 (exit $ac_status); }; } &&
11101 { ac_try='test -s conftest$ac_exeext'
11102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11103 (eval $ac_try) 2>&5
11104 ac_status=$?
11105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11106 (exit $ac_status); }; }; then
11107 am_cv_langinfo_codeset=yes
11108else
11109 echo "$as_me: failed program was:" >&5
11110sed 's/^/| /' conftest.$ac_ext >&5
11111
11112am_cv_langinfo_codeset=no
11113fi
11114rm -f conftest.err conftest.$ac_objext \
11115 conftest$ac_exeext conftest.$ac_ext
11116
11117fi
11118echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11119echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11120 if test $am_cv_langinfo_codeset = yes; then
11121
11122cat >>confdefs.h <<\_ACEOF
11123#define HAVE_LANGINFO_CODESET 1
11124_ACEOF
11125
11126 fi
11127
11128
86cf1cbd
KG
11129# We will need to find libiberty.h and ansidecl.h
11130saved_CFLAGS="$CFLAGS"
11131CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
6a257778 11153
ad6717df
PB
11154
11155
8e944909 11156for ac_func in getenv atol sbrk abort atof getcwd getwd \
3b681e9d 11157 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
236ce4b2 11158 fprintf_unlocked strstr errno snprintf vasprintf \
6a257778 11159 malloc realloc calloc free basename getopt clock getpagesize
81bf3d9e 11160do
ad6717df 11161 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11162echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11163echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11164if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11165 echo $ECHO_N "(cached) $ECHO_C" >&6
11166else
11167 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11168/* confdefs.h. */
11169_ACEOF
11170cat confdefs.h >>conftest.$ac_ext
11171cat >>conftest.$ac_ext <<_ACEOF
11172/* end confdefs.h. */
7afe8c41
KG
11173#undef $ac_tr_decl
11174#define $ac_tr_decl 1
ba479fd2 11175
d02af173 11176#include "ansidecl.h"
86cf1cbd 11177#include "system.h"
f31e826b 11178
ba479fd2
NN
11179int
11180main ()
11181{
86cf1cbd
KG
11182#ifndef $ac_func
11183char *(*pfn) = (char *(*)) $ac_func ;
11184#endif
ba479fd2
NN
11185 ;
11186 return 0;
11187}
11188_ACEOF
11189rm -f conftest.$ac_objext
11190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11191 (eval $ac_compile) 2>conftest.er1
ba479fd2 11192 ac_status=$?
86da66b5
HPN
11193 grep -v '^ *+' conftest.er1 >conftest.err
11194 rm -f conftest.er1
11195 cat conftest.err >&5
ba479fd2
NN
11196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11197 (exit $ac_status); } &&
215c351a
PB
11198 { ac_try='test -z "$ac_c_werror_flag"
11199 || test ! -s conftest.err'
86da66b5
HPN
11200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11201 (eval $ac_try) 2>&5
11202 ac_status=$?
11203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11204 (exit $ac_status); }; } &&
11205 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11207 (eval $ac_try) 2>&5
11208 ac_status=$?
11209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11210 (exit $ac_status); }; }; then
f31e826b 11211 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11212else
ba479fd2
NN
11213 echo "$as_me: failed program was:" >&5
11214sed 's/^/| /' conftest.$ac_ext >&5
11215
11216eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11217fi
86da66b5 11218rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11219fi
11220
f31e826b 11221if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11222 echo "$as_me:$LINENO: result: yes" >&5
11223echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11224#define $ac_tr_decl 1
ba479fd2
NN
11225_ACEOF
11226
81bf3d9e 11227else
ba479fd2
NN
11228 echo "$as_me:$LINENO: result: no" >&5
11229echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11230#define $ac_tr_decl 0
ba479fd2
NN
11231_ACEOF
11232
81bf3d9e
RH
11233fi
11234
11235done
ba479fd2 11236
ba479fd2 11237
ba479fd2 11238
81bf3d9e 11239
81bf3d9e
RH
11240
11241for ac_func in getrlimit setrlimit getrusage
11242do
ad6717df 11243 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11244echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11245echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11246if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11247 echo $ECHO_N "(cached) $ECHO_C" >&6
11248else
11249 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11250/* confdefs.h. */
11251_ACEOF
11252cat confdefs.h >>conftest.$ac_ext
11253cat >>conftest.$ac_ext <<_ACEOF
11254/* end confdefs.h. */
7afe8c41
KG
11255#undef $ac_tr_decl
11256#define $ac_tr_decl 1
ba479fd2 11257
d02af173 11258#include "ansidecl.h"
86cf1cbd 11259#include "system.h"
81bf3d9e
RH
11260#ifdef HAVE_SYS_RESOURCE_H
11261#include <sys/resource.h>
11262#endif
11263
f31e826b 11264
ba479fd2
NN
11265int
11266main ()
11267{
86cf1cbd
KG
11268#ifndef $ac_func
11269char *(*pfn) = (char *(*)) $ac_func ;
11270#endif
ba479fd2
NN
11271 ;
11272 return 0;
11273}
11274_ACEOF
11275rm -f conftest.$ac_objext
11276if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11277 (eval $ac_compile) 2>conftest.er1
ba479fd2 11278 ac_status=$?
86da66b5
HPN
11279 grep -v '^ *+' conftest.er1 >conftest.err
11280 rm -f conftest.er1
11281 cat conftest.err >&5
ba479fd2
NN
11282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11283 (exit $ac_status); } &&
215c351a
PB
11284 { ac_try='test -z "$ac_c_werror_flag"
11285 || test ! -s conftest.err'
86da66b5
HPN
11286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11287 (eval $ac_try) 2>&5
11288 ac_status=$?
11289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11290 (exit $ac_status); }; } &&
11291 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11293 (eval $ac_try) 2>&5
11294 ac_status=$?
11295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11296 (exit $ac_status); }; }; then
f31e826b 11297 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11298else
ba479fd2
NN
11299 echo "$as_me: failed program was:" >&5
11300sed 's/^/| /' conftest.$ac_ext >&5
11301
11302eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11303fi
86da66b5 11304rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11305fi
11306
f31e826b 11307if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11308 echo "$as_me:$LINENO: result: yes" >&5
11309echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11310#define $ac_tr_decl 1
ba479fd2
NN
11311_ACEOF
11312
81bf3d9e 11313else
ba479fd2
NN
11314 echo "$as_me:$LINENO: result: no" >&5
11315echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11316#define $ac_tr_decl 0
ba479fd2
NN
11317_ACEOF
11318
81bf3d9e
RH
11319fi
11320
11321done
86cf1cbd 11322
81bf3d9e 11323
ba479fd2 11324cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11325/* confdefs.h. */
11326_ACEOF
11327cat confdefs.h >>conftest.$ac_ext
11328cat >>conftest.$ac_ext <<_ACEOF
11329/* end confdefs.h. */
b2522d2b
HPN
11330
11331#include "ansidecl.h"
11332#include "system.h"
11333#ifdef HAVE_SYS_RESOURCE_H
11334#include <sys/resource.h>
11335#endif
11336
ba479fd2
NN
11337int
11338main ()
11339{
b2522d2b 11340rlim_t l = 0;
ba479fd2
NN
11341 ;
11342 return 0;
11343}
11344_ACEOF
11345rm -f conftest.$ac_objext
11346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11347 (eval $ac_compile) 2>conftest.er1
ba479fd2 11348 ac_status=$?
86da66b5
HPN
11349 grep -v '^ *+' conftest.er1 >conftest.err
11350 rm -f conftest.er1
11351 cat conftest.err >&5
ba479fd2
NN
11352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11353 (exit $ac_status); } &&
215c351a
PB
11354 { ac_try='test -z "$ac_c_werror_flag"
11355 || test ! -s conftest.err'
86da66b5
HPN
11356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11357 (eval $ac_try) 2>&5
11358 ac_status=$?
11359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11360 (exit $ac_status); }; } &&
11361 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11363 (eval $ac_try) 2>&5
11364 ac_status=$?
11365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11366 (exit $ac_status); }; }; then
b2522d2b
HPN
11367 :
11368else
ba479fd2
NN
11369 echo "$as_me: failed program was:" >&5
11370sed 's/^/| /' conftest.$ac_ext >&5
11371
11372
11373cat >>confdefs.h <<\_ACEOF
b2522d2b 11374#define rlim_t long
ba479fd2 11375_ACEOF
b2522d2b
HPN
11376
11377fi
86da66b5 11378rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 11379
2102b2fe
RS
11380# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11381# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11382# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11383# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 11384
351df804 11385for ac_func in ldgetname
c1800ec8 11386do
ad6717df 11387 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11388echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11389echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11390if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11391 echo $ECHO_N "(cached) $ECHO_C" >&6
11392else
11393 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11394/* confdefs.h. */
11395_ACEOF
11396cat confdefs.h >>conftest.$ac_ext
11397cat >>conftest.$ac_ext <<_ACEOF
11398/* end confdefs.h. */
c1800ec8
ZW
11399#undef $ac_tr_decl
11400#define $ac_tr_decl 1
ba479fd2 11401
351df804
KG
11402#include "ansidecl.h"
11403#include "system.h"
11404#ifdef HAVE_LDFCN_H
2102b2fe
RS
11405#undef FREAD
11406#undef FWRITE
351df804
KG
11407#include <ldfcn.h>
11408#endif
11409
11410
ba479fd2
NN
11411int
11412main ()
11413{
351df804
KG
11414#ifndef $ac_func
11415char *(*pfn) = (char *(*)) $ac_func ;
11416#endif
ba479fd2
NN
11417 ;
11418 return 0;
11419}
11420_ACEOF
11421rm -f conftest.$ac_objext
11422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11423 (eval $ac_compile) 2>conftest.er1
ba479fd2 11424 ac_status=$?
86da66b5
HPN
11425 grep -v '^ *+' conftest.er1 >conftest.err
11426 rm -f conftest.er1
11427 cat conftest.err >&5
ba479fd2
NN
11428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11429 (exit $ac_status); } &&
215c351a
PB
11430 { ac_try='test -z "$ac_c_werror_flag"
11431 || test ! -s conftest.err'
86da66b5
HPN
11432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11433 (eval $ac_try) 2>&5
11434 ac_status=$?
11435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11436 (exit $ac_status); }; } &&
11437 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11439 (eval $ac_try) 2>&5
11440 ac_status=$?
11441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11442 (exit $ac_status); }; }; then
351df804
KG
11443 eval "gcc_cv_have_decl_$ac_func=yes"
11444else
ba479fd2
NN
11445 echo "$as_me: failed program was:" >&5
11446sed 's/^/| /' conftest.$ac_ext >&5
11447
11448eval "gcc_cv_have_decl_$ac_func=no"
351df804 11449fi
86da66b5 11450rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
11451fi
11452
11453if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11454 echo "$as_me:$LINENO: result: yes" >&5
11455echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11456#define $ac_tr_decl 1
ba479fd2
NN
11457_ACEOF
11458
351df804 11459else
ba479fd2
NN
11460 echo "$as_me:$LINENO: result: no" >&5
11461echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11462#define $ac_tr_decl 0
ba479fd2
NN
11463_ACEOF
11464
351df804
KG
11465fi
11466
11467done
ba479fd2 11468
351df804
KG
11469
11470
11471for ac_func in times
11472do
ad6717df 11473 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11474echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11475echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11476if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11477 echo $ECHO_N "(cached) $ECHO_C" >&6
11478else
11479 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11480/* confdefs.h. */
11481_ACEOF
11482cat confdefs.h >>conftest.$ac_ext
11483cat >>conftest.$ac_ext <<_ACEOF
11484/* end confdefs.h. */
351df804
KG
11485#undef $ac_tr_decl
11486#define $ac_tr_decl 1
ba479fd2 11487
c1800ec8
ZW
11488#include "ansidecl.h"
11489#include "system.h"
11490#ifdef HAVE_SYS_TIMES_H
11491#include <sys/times.h>
11492#endif
11493
11494
ba479fd2
NN
11495int
11496main ()
11497{
c1800ec8
ZW
11498#ifndef $ac_func
11499char *(*pfn) = (char *(*)) $ac_func ;
11500#endif
ba479fd2
NN
11501 ;
11502 return 0;
11503}
11504_ACEOF
11505rm -f conftest.$ac_objext
11506if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11507 (eval $ac_compile) 2>conftest.er1
ba479fd2 11508 ac_status=$?
86da66b5
HPN
11509 grep -v '^ *+' conftest.er1 >conftest.err
11510 rm -f conftest.er1
11511 cat conftest.err >&5
ba479fd2
NN
11512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11513 (exit $ac_status); } &&
215c351a
PB
11514 { ac_try='test -z "$ac_c_werror_flag"
11515 || test ! -s conftest.err'
86da66b5
HPN
11516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11517 (eval $ac_try) 2>&5
11518 ac_status=$?
11519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11520 (exit $ac_status); }; } &&
11521 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11523 (eval $ac_try) 2>&5
11524 ac_status=$?
11525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11526 (exit $ac_status); }; }; then
c1800ec8
ZW
11527 eval "gcc_cv_have_decl_$ac_func=yes"
11528else
ba479fd2
NN
11529 echo "$as_me: failed program was:" >&5
11530sed 's/^/| /' conftest.$ac_ext >&5
11531
11532eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 11533fi
86da66b5 11534rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
11535fi
11536
11537if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11538 echo "$as_me:$LINENO: result: yes" >&5
11539echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11540#define $ac_tr_decl 1
ba479fd2
NN
11541_ACEOF
11542
c1800ec8 11543else
ba479fd2
NN
11544 echo "$as_me:$LINENO: result: no" >&5
11545echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11546#define $ac_tr_decl 0
ba479fd2
NN
11547_ACEOF
11548
c1800ec8
ZW
11549fi
11550
11551done
c1800ec8
ZW
11552
11553
11554# More time-related stuff.
ba479fd2
NN
11555echo "$as_me:$LINENO: checking for struct tms" >&5
11556echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
11557if test "${ac_cv_struct_tms+set}" = set; then
11558 echo $ECHO_N "(cached) $ECHO_C" >&6
11559else
11560
11561cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11562/* confdefs.h. */
11563_ACEOF
11564cat confdefs.h >>conftest.$ac_ext
11565cat >>conftest.$ac_ext <<_ACEOF
11566/* end confdefs.h. */
c1800ec8
ZW
11567
11568#include "ansidecl.h"
11569#include "system.h"
11570#ifdef HAVE_SYS_TIMES_H
11571#include <sys/times.h>
11572#endif
11573
ba479fd2
NN
11574int
11575main ()
11576{
c1800ec8 11577struct tms tms;
ba479fd2
NN
11578 ;
11579 return 0;
11580}
11581_ACEOF
11582rm -f conftest.$ac_objext
11583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11584 (eval $ac_compile) 2>conftest.er1
ba479fd2 11585 ac_status=$?
86da66b5
HPN
11586 grep -v '^ *+' conftest.er1 >conftest.err
11587 rm -f conftest.er1
11588 cat conftest.err >&5
ba479fd2
NN
11589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11590 (exit $ac_status); } &&
215c351a
PB
11591 { ac_try='test -z "$ac_c_werror_flag"
11592 || test ! -s conftest.err'
86da66b5
HPN
11593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11594 (eval $ac_try) 2>&5
11595 ac_status=$?
11596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11597 (exit $ac_status); }; } &&
11598 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11600 (eval $ac_try) 2>&5
11601 ac_status=$?
11602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11603 (exit $ac_status); }; }; then
c1800ec8
ZW
11604 ac_cv_struct_tms=yes
11605else
ba479fd2
NN
11606 echo "$as_me: failed program was:" >&5
11607sed 's/^/| /' conftest.$ac_ext >&5
11608
11609ac_cv_struct_tms=no
c1800ec8 11610fi
86da66b5 11611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11612fi
ba479fd2
NN
11613echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11614echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 11615if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
11616
11617cat >>confdefs.h <<\_ACEOF
c1800ec8 11618#define HAVE_STRUCT_TMS 1
ba479fd2 11619_ACEOF
c1800ec8
ZW
11620
11621fi
11622
11623# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11624# revisit after autoconf 2.50.
ba479fd2
NN
11625echo "$as_me:$LINENO: checking for clock_t" >&5
11626echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
11627if test "${gcc_cv_type_clock_t+set}" = set; then
11628 echo $ECHO_N "(cached) $ECHO_C" >&6
11629else
11630
11631cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11632/* confdefs.h. */
11633_ACEOF
11634cat confdefs.h >>conftest.$ac_ext
11635cat >>conftest.$ac_ext <<_ACEOF
11636/* end confdefs.h. */
c1800ec8
ZW
11637
11638#include "ansidecl.h"
11639#include "system.h"
11640
ba479fd2
NN
11641int
11642main ()
11643{
c1800ec8 11644clock_t x;
ba479fd2
NN
11645 ;
11646 return 0;
11647}
11648_ACEOF
11649rm -f conftest.$ac_objext
11650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11651 (eval $ac_compile) 2>conftest.er1
ba479fd2 11652 ac_status=$?
86da66b5
HPN
11653 grep -v '^ *+' conftest.er1 >conftest.err
11654 rm -f conftest.er1
11655 cat conftest.err >&5
ba479fd2
NN
11656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11657 (exit $ac_status); } &&
215c351a
PB
11658 { ac_try='test -z "$ac_c_werror_flag"
11659 || test ! -s conftest.err'
86da66b5
HPN
11660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11661 (eval $ac_try) 2>&5
11662 ac_status=$?
11663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11664 (exit $ac_status); }; } &&
11665 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11667 (eval $ac_try) 2>&5
11668 ac_status=$?
11669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11670 (exit $ac_status); }; }; then
c1800ec8
ZW
11671 gcc_cv_type_clock_t=yes
11672else
ba479fd2
NN
11673 echo "$as_me: failed program was:" >&5
11674sed 's/^/| /' conftest.$ac_ext >&5
11675
11676gcc_cv_type_clock_t=no
c1800ec8 11677fi
86da66b5 11678rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11679fi
ba479fd2
NN
11680echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
11681echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 11682if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
11683
11684cat >>confdefs.h <<\_ACEOF
c1800ec8 11685#define HAVE_CLOCK_T 1
ba479fd2 11686_ACEOF
c1800ec8
ZW
11687
11688fi
11689
eb70d86d
AS
11690# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
11691CFLAGS="$saved_CFLAGS"
11692
07cf4226
DM
11693# Check whether --enable-initfini-array or --disable-initfini-array was given.
11694if test "${enable_initfini_array+set}" = set; then
11695 enableval="$enable_initfini_array"
ba479fd2 11696
07cf4226 11697else
ba479fd2
NN
11698
11699echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
11700echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
11701if test "${gcc_cv_initfini_array+set}" = set; then
11702 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 11703else
eb70d86d 11704 if test "$cross_compiling" = yes; then
918c4fe4 11705 gcc_cv_initfini_array=no
eb70d86d 11706else
ba479fd2 11707 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11708/* confdefs.h. */
11709_ACEOF
11710cat confdefs.h >>conftest.$ac_ext
11711cat >>conftest.$ac_ext <<_ACEOF
11712/* end confdefs.h. */
eb70d86d 11713
07cf4226
DM
11714static int x = -1;
11715int main (void) { return x; }
11716int foo (void) { x = 0; }
11717int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
11718_ACEOF
11719rm -f conftest$ac_exeext
11720if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11721 (eval $ac_link) 2>&5
11722 ac_status=$?
11723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11724 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11726 (eval $ac_try) 2>&5
11727 ac_status=$?
11728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11729 (exit $ac_status); }; }; then
918c4fe4 11730 gcc_cv_initfini_array=yes
eb70d86d 11731else
ba479fd2
NN
11732 echo "$as_me: program exited with status $ac_status" >&5
11733echo "$as_me: failed program was:" >&5
11734sed 's/^/| /' conftest.$ac_ext >&5
11735
11736( exit $ac_status )
11737gcc_cv_initfini_array=no
eb70d86d 11738fi
86da66b5 11739rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 11740fi
07cf4226 11741fi
ba479fd2
NN
11742echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
11743echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 11744 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 11745
ba479fd2 11746fi;
63cf211a 11747if test $enable_initfini_array = yes; then
ba479fd2
NN
11748
11749cat >>confdefs.h <<\_ACEOF
eb70d86d 11750#define HAVE_INITFINI_ARRAY 1
ba479fd2 11751_ACEOF
07cf4226 11752
eb70d86d 11753fi
81bf3d9e 11754
ba479fd2
NN
11755# mkdir takes a single argument on some systems.
11756echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
11757echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
11758if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
11759 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 11760else
ba479fd2 11761 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11762/* confdefs.h. */
11763_ACEOF
11764cat confdefs.h >>conftest.$ac_ext
11765cat >>conftest.$ac_ext <<_ACEOF
11766/* end confdefs.h. */
75923b2f
MK
11767
11768#include <sys/types.h>
11769#ifdef HAVE_SYS_STAT_H
11770# include <sys/stat.h>
11771#endif
11772#ifdef HAVE_UNISTD_H
11773# include <unistd.h>
11774#endif
11775#ifdef HAVE_DIRECT_H
11776# include <direct.h>
11777#endif
ba479fd2
NN
11778int
11779main ()
11780{
75923b2f 11781mkdir ("foo", 0);
ba479fd2
NN
11782 ;
11783 return 0;
11784}
11785_ACEOF
11786rm -f conftest.$ac_objext
11787if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11788 (eval $ac_compile) 2>conftest.er1
ba479fd2 11789 ac_status=$?
86da66b5
HPN
11790 grep -v '^ *+' conftest.er1 >conftest.err
11791 rm -f conftest.er1
11792 cat conftest.err >&5
ba479fd2
NN
11793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11794 (exit $ac_status); } &&
215c351a
PB
11795 { ac_try='test -z "$ac_c_werror_flag"
11796 || test ! -s conftest.err'
86da66b5
HPN
11797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11798 (eval $ac_try) 2>&5
11799 ac_status=$?
11800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11801 (exit $ac_status); }; } &&
11802 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11804 (eval $ac_try) 2>&5
11805 ac_status=$?
11806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11807 (exit $ac_status); }; }; then
75923b2f
MK
11808 gcc_cv_mkdir_takes_one_arg=no
11809else
ba479fd2
NN
11810 echo "$as_me: failed program was:" >&5
11811sed 's/^/| /' conftest.$ac_ext >&5
11812
11813gcc_cv_mkdir_takes_one_arg=yes
75923b2f 11814fi
86da66b5 11815rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 11816fi
ba479fd2
NN
11817echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
11818echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 11819if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
11820
11821cat >>confdefs.h <<\_ACEOF
75923b2f 11822#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 11823_ACEOF
75923b2f
MK
11824
11825fi
11826
11827
861bb6c1
JL
11828# File extensions
11829manext='.1'
11830objext='.o'
11831
11832
11833
4977bab6
ZW
11834# With Setjmp/Longjmp based exception handling.
11835# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
11836if test "${enable_sjlj_exceptions+set}" = set; then
11837 enableval="$enable_sjlj_exceptions"
11838 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 11839
ba479fd2
NN
11840cat >>confdefs.h <<_ACEOF
11841#define CONFIG_SJLJ_EXCEPTIONS $sjlj
11842_ACEOF
4977bab6 11843
ba479fd2 11844fi;
4977bab6 11845
443728bb
L
11846# For platforms with the unwind ABI which includes an unwind library,
11847# libunwind, we can choose to use the system libunwind.
4977bab6 11848
443728bb
L
11849# Check whether --with-system-libunwind or --without-system-libunwind was given.
11850if test "${with_system_libunwind+set}" = set; then
11851 withval="$with_system_libunwind"
4977bab6 11852
ba479fd2 11853fi;
4977bab6 11854
34a86c2b
NN
11855# --------------------------------------------------------
11856# Build, host, and target specific configuration fragments
11857# --------------------------------------------------------
11858
5b28c537
NN
11859# Collect build-machine-specific information.
11860. ${srcdir}/config.build
11861
a89ea0df
NN
11862# Collect host-machine-specific information.
11863. ${srcdir}/config.host
11864
ef69da62 11865target_gtfiles=
a89ea0df
NN
11866
11867# Collect target-machine-specific information.
8ad9fb33 11868. ${srcdir}/config.gcc
861bb6c1
JL
11869
11870extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 11871extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
11872
11873# Default the target-machine variables that were not explicitly set.
75bffa71 11874if test x"$tm_file" = x
861bb6c1
JL
11875then tm_file=$cpu_type/$cpu_type.h; fi
11876
6b2adea9 11877if test x"$extra_headers" = x
861bb6c1
JL
11878then extra_headers=; fi
11879
75bffa71 11880if test x$md_file = x
e98e406f 11881then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 11882
75bffa71 11883if test x$out_file = x
861bb6c1
JL
11884then out_file=$cpu_type/$cpu_type.c; fi
11885
75bffa71 11886if test x"$tmake_file" = x
861bb6c1
JL
11887then tmake_file=$cpu_type/t-$cpu_type
11888fi
11889
90e6a802 11890if test x"$dwarf2" = xyes
756ee602 11891then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
11892fi
11893
861bb6c1 11894# Say what files are being used for the output code and MD file.
11642c3a 11895echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
11896echo "Using \`$srcdir/config/$md_file' as machine description file."
11897
11642c3a 11898# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
11899# about them and drop them.
11900
11642c3a
ZW
11901bx=
11902for x in $build_xm_file; do
11903 if test -f $srcdir/config/$x
11904 then bx="$bx $x"
ba479fd2
NN
11905 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11906echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11907 fi
11908done
11909build_xm_file="$bx"
11910
11911hx=
11912for x in $host_xm_file; do
11913 if test -f $srcdir/config/$x
11914 then hx="$hx $x"
ba479fd2
NN
11915 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11916echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11917 fi
11918done
11919host_xm_file="$hx"
11920
11921tx=
11922for x in $xm_file; do
11923 if test -f $srcdir/config/$x
11924 then tx="$tx $x"
ba479fd2
NN
11925 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11926echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11927 fi
11928done
11929xm_file="$tx"
11930
861bb6c1
JL
11931count=a
11932for f in $tm_file; do
11933 count=${count}x
11934done
75bffa71 11935if test $count = ax; then
861bb6c1
JL
11936 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
11937else
11938 echo "Using the following target machine macro files:"
11939 for f in $tm_file; do
11940 echo " $srcdir/config/$f"
11941 done
11942fi
11943
4977bab6 11944if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
11945
11946cat >>confdefs.h <<\_ACEOF
4977bab6 11947#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 11948_ACEOF
4977bab6
ZW
11949
11950fi
11951
99fa8911
AP
11952if test x$use_long_long_for_widest_fast_int = xyes; then
11953
11954cat >>confdefs.h <<\_ACEOF
11955#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
11956_ACEOF
11957
11958fi
11959
861bb6c1
JL
11960count=a
11961for f in $host_xm_file; do
11962 count=${count}x
11963done
11642c3a
ZW
11964if test $count = a; then
11965 :
11966elif test $count = ax; then
861bb6c1
JL
11967 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
11968else
11969 echo "Using the following host machine macro files:"
11970 for f in $host_xm_file; do
11971 echo " $srcdir/config/$f"
11972 done
11973fi
476d9098 11974echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 11975
75bffa71 11976if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
11977 count=a
11978 for f in $build_xm_file; do
11979 count=${count}x
11980 done
11642c3a
ZW
11981 if test $count = a; then
11982 :
11983 elif test $count = ax; then
861bb6c1
JL
11984 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
11985 else
11986 echo "Using the following build machine macro files:"
11987 for f in $build_xm_file; do
11988 echo " $srcdir/config/$f"
11989 done
11990 fi
11991fi
11992
8bb915b6
NN
11993# ---------
11994# Threading
11995# ---------
11996
c2e494a8 11997# Check if a valid thread package
615be2cf 11998case ${enable_threads} in
c2e494a8
NN
11999 "" | no)
12000 # No threads
12001 target_thread_file='single'
12002 ;;
12003 yes)
12004 # default
12005 target_thread_file='single'
12006 ;;
18167442 12007 aix | dce | gnat | irix | posix | posix95 | rtems | \
769e49eb 12008 single | solaris | vxworks | win32 )
615be2cf 12009 target_thread_file=${enable_threads}
c2e494a8
NN
12010 ;;
12011 *)
615be2cf 12012 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
12013 exit 1
12014 ;;
12015esac
12016
12017if test x${thread_file} = x; then
12018 # No thread file set by target-specific clauses in config.gcc,
12019 # so use file chosen by default logic above
12020 thread_file=${target_thread_file}
861bb6c1
JL
12021fi
12022
8bb915b6
NN
12023# Make gthr-default.h if we have a thread file.
12024gthread_flags=
12025if test $thread_file != single; then
12026 rm -f gthr-default.h
12027 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12028 gthread_flags=-DHAVE_GTHR_DEFAULT
12029fi
12030
12031
12032# --------
12033# UNSORTED
12034# --------
12035
18fbf599 12036use_cxa_atexit=no
2121a768
JT
12037if test x$enable___cxa_atexit = xyes || \
12038 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599
PB
12039 if test x$host = x$target; then
12040 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
354b7da5
DH
12041echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
12042if test "${ac_cv_func___cxa_atexit+set}" = set; then
12043 echo $ECHO_N "(cached) $ECHO_C" >&6
12044else
12045 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
12046/* confdefs.h. */
12047_ACEOF
12048cat confdefs.h >>conftest.$ac_ext
12049cat >>conftest.$ac_ext <<_ACEOF
12050/* end confdefs.h. */
86da66b5
HPN
12051/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12052 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12053#define __cxa_atexit innocuous___cxa_atexit
12054
354b7da5
DH
12055/* System header to define __stub macros and hopefully few prototypes,
12056 which can conflict with char __cxa_atexit (); below.
12057 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12058 <limits.h> exists even on freestanding compilers. */
86da66b5 12059
354b7da5
DH
12060#ifdef __STDC__
12061# include <limits.h>
12062#else
12063# include <assert.h>
12064#endif
86da66b5
HPN
12065
12066#undef __cxa_atexit
12067
354b7da5
DH
12068/* Override any gcc2 internal prototype to avoid an error. */
12069#ifdef __cplusplus
12070extern "C"
12071{
12072#endif
12073/* We use char because int might match the return type of a gcc2
12074 builtin and then its argument prototype would still apply. */
12075char __cxa_atexit ();
12076/* The GNU C library defines this for functions which it implements
12077 to always fail with ENOSYS. Some functions are actually named
12078 something starting with __ and the normal name is an alias. */
12079#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
12080choke me
12081#else
12082char (*f) () = __cxa_atexit;
12083#endif
12084#ifdef __cplusplus
12085}
12086#endif
12087
12088int
12089main ()
12090{
12091return f != __cxa_atexit;
12092 ;
12093 return 0;
12094}
12095_ACEOF
12096rm -f conftest.$ac_objext conftest$ac_exeext
12097if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12098 (eval $ac_link) 2>conftest.er1
354b7da5 12099 ac_status=$?
86da66b5
HPN
12100 grep -v '^ *+' conftest.er1 >conftest.err
12101 rm -f conftest.er1
12102 cat conftest.err >&5
354b7da5
DH
12103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12104 (exit $ac_status); } &&
215c351a
PB
12105 { ac_try='test -z "$ac_c_werror_flag"
12106 || test ! -s conftest.err'
86da66b5
HPN
12107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12108 (eval $ac_try) 2>&5
12109 ac_status=$?
12110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12111 (exit $ac_status); }; } &&
12112 { ac_try='test -s conftest$ac_exeext'
354b7da5
DH
12113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12114 (eval $ac_try) 2>&5
12115 ac_status=$?
12116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12117 (exit $ac_status); }; }; then
12118 ac_cv_func___cxa_atexit=yes
12119else
12120 echo "$as_me: failed program was:" >&5
12121sed 's/^/| /' conftest.$ac_ext >&5
12122
12123ac_cv_func___cxa_atexit=no
12124fi
86da66b5
HPN
12125rm -f conftest.err conftest.$ac_objext \
12126 conftest$ac_exeext conftest.$ac_ext
354b7da5
DH
12127fi
12128echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12129echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
12130if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
12131 use_cxa_atexit=yes
12132else
12133 echo "__cxa_atexit can't be enabled on this target"
12134fi
12135
12136 else
12137 # We can't check for __cxa_atexit when building a cross, so assume
12138 # it is available
12139 use_cxa_atexit=yes
12140 fi
12141 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
12142
12143cat >>confdefs.h <<\_ACEOF
2121a768 12144#define DEFAULT_USE_CXA_ATEXIT 1
ba479fd2 12145_ACEOF
2121a768 12146
18fbf599 12147 fi
2121a768
JT
12148fi
12149
a5381466 12150# Look for a file containing extra machine modes.
1c0ca89d
ZW
12151if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12152 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
12153
12154
12155cat >>confdefs.h <<_ACEOF
e22340b0 12156#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 12157_ACEOF
a5381466
ZW
12158
12159fi
12160
b7cb92ad 12161# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 12162# the first file included by config.h.
4977bab6 12163# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 12164# as well. If host!=build, we are in error and need to do more
db81d74a 12165# work to find out the build config parameters.
75bffa71 12166if test x$host = x$build
db81d74a 12167then
eaf4e618 12168 build_auto=auto-host.h
b7cb92ad
JL
12169else
12170 # We create a subdir, then run autoconf in the subdir.
12171 # To prevent recursion we set host and build for the new
12172 # invocation of configure to the build for this invocation
ba479fd2 12173 # of configure.
b7cb92ad
JL
12174 tempdir=build.$$
12175 rm -rf $tempdir
12176 mkdir $tempdir
12177 cd $tempdir
12178 case ${srcdir} in
255b8a49 12179 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
12180 *) realsrcdir=../${srcdir};;
12181 esac
d920e825
L
12182 saved_CFLAGS="${CFLAGS}"
12183 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12184 ${realsrcdir}/configure \
33e70558 12185 --enable-languages=${enable_languages-all} \
534d0cc0 12186 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 12187 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
12188
12189 # We just finished tests for the build machine, so rename
12190 # the file auto-build.h in the gcc directory.
12191 mv auto-host.h ../auto-build.h
12192 cd ..
12193 rm -rf $tempdir
eaf4e618 12194 build_auto=auto-build.h
db81d74a
RH
12195fi
12196
06f0b04c 12197
eaf4e618 12198tm_file="${tm_file} defaults.h"
4977bab6
ZW
12199tm_p_file="${tm_p_file} tm-preds.h"
12200host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12201build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 12202# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477
KG
12203# put this back in temporarily.
12204xm_file="ansidecl.h ${xm_file}"
0056a9b5 12205
34a86c2b
NN
12206# --------
12207# UNSORTED
12208# --------
12209
cc1e60ea 12210# Compile in configure arguments.
8105825d 12211if test -f configargs.h ; then
cc1e60ea 12212 # Being re-configured.
022dae81 12213 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
12214 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12215else
12216 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12217fi
eeae7b41
DJ
12218
12219# Double all backslashes and backslash all quotes to turn
12220# gcc_config_arguments into a C string.
12221sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12222$gcc_config_arguments
12223EOF
12224gcc_config_arguments_str=`cat conftest.out`
12225rm -f conftest.out
12226
cc1e60ea
JM
12227cat > configargs.h <<EOF
12228/* Generated automatically. */
eeae7b41 12229static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 12230static const char thread_model[] = "$thread_file";
7816bea0
DJ
12231
12232static const struct {
12233 const char *name, *value;
12234} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
12235EOF
12236
ab87f8c8
JL
12237# Internationalization
12238PACKAGE=gcc
12239VERSION="$gcc_version"
861bb6c1 12240
c2c36d38
MK
12241cat >>confdefs.h <<_ACEOF
12242#define PACKAGE "$PACKAGE"
12243_ACEOF
12244
12245
ab87f8c8
JL
12246
12247
56694dd9
ZW
12248# If we haven't got the data from the intl directory,
12249# assume NLS is disabled.
ba479fd2
NN
12250USE_NLS=no
12251LIBINTL=
12252LIBINTL_DEP=
12253INCINTL=
12254XGETTEXT=
12255GMSGFMT=
12256POSUB=
56694dd9
ZW
12257if test -f ../intl/config.intl; then
12258 . ../intl/config.intl
093e61a6 12259fi
ba479fd2
NN
12260echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12261echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
56694dd9 12262if test x"$USE_NLS" != xyes; then
ba479fd2
NN
12263 echo "$as_me:$LINENO: result: no" >&5
12264echo "${ECHO_T}no" >&6
56694dd9 12265else
ba479fd2
NN
12266 echo "$as_me:$LINENO: result: yes" >&5
12267echo "${ECHO_T}yes" >&6
12268
12269cat >>confdefs.h <<\_ACEOF
56694dd9 12270#define ENABLE_NLS 1
ba479fd2 12271_ACEOF
56694dd9 12272
093e61a6 12273
ba479fd2
NN
12274 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12275echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
56694dd9 12276 # Look for .po and .gmo files in the source directory.
ba479fd2 12277 CATALOGS=
56694dd9
ZW
12278 XLINGUAS=
12279 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12280 # If there aren't any .gmo files the shell will give us the
12281 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12282 # weeded out.
12283 case "$cat" in *\**)
12284 continue;;
12285 esac
12286 # The quadruple backslash is collapsed to a double backslash
12287 # by the backticks, then collapsed again by the double quotes,
12288 # leaving us with one backslash in the sed expression (right
12289 # before the dot that mustn't act as a wildcard).
12290 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
12291 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
12292 # The user is allowed to set LINGUAS to a list of languages to
12293 # install catalogs for. If it's empty that means "all of them."
12294 if test "x$LINGUAS" = x; then
12295 CATALOGS="$CATALOGS $cat"
12296 XLINGUAS="$XLINGUAS $lang"
12297 else
12298 case "$LINGUAS" in *$lang*)
12299 CATALOGS="$CATALOGS $cat"
12300 XLINGUAS="$XLINGUAS $lang"
12301 ;;
12302 esac
12303 fi
12304 done
12305 LINGUAS="$XLINGUAS"
ba479fd2
NN
12306 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12307echo "${ECHO_T}$LINGUAS" >&6
56694dd9 12308fi
861bb6c1 12309
56694dd9
ZW
12310# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12311# -liconv on the link line twice.
12312case "$LIBINTL" in *$LIBICONV*)
12313 LIBICONV= ;;
12314esac
dc6746e7 12315
56694dd9
ZW
12316# Windows32 Registry support for specifying GCC installation paths.
12317# Check whether --enable-win32-registry or --disable-win32-registry was given.
12318if test "${enable_win32_registry+set}" = set; then
12319 enableval="$enable_win32_registry"
dc6746e7 12320
ba479fd2 12321fi;
56694dd9
ZW
12322case $host_os in
12323 win32 | pe | cygwin* | mingw32* | uwin*)
ba479fd2
NN
12324echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5
12325echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6
56694dd9 12326if test "x$enable_win32_registry" != xno; then
ba479fd2
NN
12327
12328cat >>confdefs.h <<\_ACEOF
56694dd9 12329#define ENABLE_WIN32_REGISTRY 1
ba479fd2
NN
12330_ACEOF
12331
12332 echo "$as_me:$LINENO: result: yes" >&5
12333echo "${ECHO_T}yes" >&6
12334 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
12335echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
12336if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12337 echo $ECHO_N "(cached) $ECHO_C" >&6
12338else
12339 ac_func_search_save_LIBS=$LIBS
12340ac_cv_search_RegOpenKeyExA=no
12341cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12342/* confdefs.h. */
12343_ACEOF
12344cat confdefs.h >>conftest.$ac_ext
12345cat >>conftest.$ac_ext <<_ACEOF
12346/* end confdefs.h. */
861bb6c1 12347
ab87f8c8 12348/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12349#ifdef __cplusplus
12350extern "C"
12351#endif
ab87f8c8 12352/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12353 builtin and then its argument prototype would still apply. */
12354char RegOpenKeyExA ();
12355int
12356main ()
12357{
12358RegOpenKeyExA ();
12359 ;
12360 return 0;
12361}
12362_ACEOF
12363rm -f conftest.$ac_objext conftest$ac_exeext
12364if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12365 (eval $ac_link) 2>conftest.er1
ba479fd2 12366 ac_status=$?
86da66b5
HPN
12367 grep -v '^ *+' conftest.er1 >conftest.err
12368 rm -f conftest.er1
12369 cat conftest.err >&5
ba479fd2
NN
12370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12371 (exit $ac_status); } &&
215c351a
PB
12372 { ac_try='test -z "$ac_c_werror_flag"
12373 || test ! -s conftest.err'
86da66b5
HPN
12374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12375 (eval $ac_try) 2>&5
12376 ac_status=$?
12377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12378 (exit $ac_status); }; } &&
12379 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12381 (eval $ac_try) 2>&5
12382 ac_status=$?
12383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12384 (exit $ac_status); }; }; then
56694dd9 12385 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 12386else
ba479fd2
NN
12387 echo "$as_me: failed program was:" >&5
12388sed 's/^/| /' conftest.$ac_ext >&5
12389
861bb6c1 12390fi
86da66b5
HPN
12391rm -f conftest.err conftest.$ac_objext \
12392 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
12393if test "$ac_cv_search_RegOpenKeyExA" = no; then
12394 for ac_lib in advapi32; do
12395 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12396 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12397/* confdefs.h. */
12398_ACEOF
12399cat confdefs.h >>conftest.$ac_ext
12400cat >>conftest.$ac_ext <<_ACEOF
12401/* end confdefs.h. */
12402
56694dd9 12403/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12404#ifdef __cplusplus
12405extern "C"
12406#endif
56694dd9 12407/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12408 builtin and then its argument prototype would still apply. */
12409char RegOpenKeyExA ();
12410int
12411main ()
12412{
12413RegOpenKeyExA ();
12414 ;
12415 return 0;
12416}
12417_ACEOF
12418rm -f conftest.$ac_objext conftest$ac_exeext
12419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12420 (eval $ac_link) 2>conftest.er1
ba479fd2 12421 ac_status=$?
86da66b5
HPN
12422 grep -v '^ *+' conftest.er1 >conftest.err
12423 rm -f conftest.er1
12424 cat conftest.err >&5
ba479fd2
NN
12425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12426 (exit $ac_status); } &&
215c351a
PB
12427 { ac_try='test -z "$ac_c_werror_flag"
12428 || test ! -s conftest.err'
86da66b5
HPN
12429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12430 (eval $ac_try) 2>&5
12431 ac_status=$?
12432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12433 (exit $ac_status); }; } &&
12434 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12436 (eval $ac_try) 2>&5
12437 ac_status=$?
12438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12439 (exit $ac_status); }; }; then
12440 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 12441break
861bb6c1 12442else
ba479fd2
NN
12443 echo "$as_me: failed program was:" >&5
12444sed 's/^/| /' conftest.$ac_ext >&5
12445
861bb6c1 12446fi
86da66b5
HPN
12447rm -f conftest.err conftest.$ac_objext \
12448 conftest$ac_exeext conftest.$ac_ext
ba479fd2 12449 done
6e3f3080 12450fi
ba479fd2
NN
12451LIBS=$ac_func_search_save_LIBS
12452fi
12453echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
12454echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
12455if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 12456 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 12457
ab87f8c8 12458fi
ba479fd2 12459
cafe096b 12460else
ba479fd2
NN
12461 echo "$as_me:$LINENO: result: no" >&5
12462echo "${ECHO_T}no" >&6
093e61a6 12463fi
ab87f8c8 12464
56694dd9
ZW
12465# Check if user specified a different registry key.
12466case "x${enable_win32_registry}" in
12467x | xyes)
12468 # default.
12469 gcc_cv_win32_registry_key="$VERSION"
12470 ;;
12471xno)
12472 # no registry lookup.
12473 gcc_cv_win32_registry_key=''
12474 ;;
12475*)
12476 # user-specified key.
12477 gcc_cv_win32_registry_key="$enable_win32_registry"
12478 ;;
12479esac
ab87f8c8 12480
56694dd9 12481if test "x$enable_win32_registry" != xno; then
ba479fd2
NN
12482 echo "$as_me:$LINENO: checking registry key on windows hosts" >&5
12483echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6
12484
12485cat >>confdefs.h <<_ACEOF
56694dd9 12486#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
ba479fd2 12487_ACEOF
cafe096b 12488
ba479fd2
NN
12489 echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5
12490echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6
093e61a6 12491fi
56694dd9
ZW
12492;;
12493esac
ab87f8c8 12494
56694dd9
ZW
12495# Get an absolute path to the GCC top-level source directory
12496holddir=`${PWDCMD-pwd}`
12497cd $srcdir
12498topdir=`${PWDCMD-pwd}`
12499cd $holddir
ab87f8c8 12500
56694dd9 12501# Conditionalize the makefile for this host machine.
2ed26f6b 12502xmake_file=
c406e779 12503for f in ${host_xmake_file}
56694dd9
ZW
12504do
12505 if test -f ${srcdir}/config/$f
12506 then
2ed26f6b 12507 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
12508 fi
12509done
093e61a6 12510
56694dd9 12511# Conditionalize the makefile for this target machine.
2ed26f6b 12512tmake_file_=
c406e779 12513for f in ${tmake_file}
56694dd9
ZW
12514do
12515 if test -f ${srcdir}/config/$f
12516 then
2ed26f6b 12517 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
12518 fi
12519done
2ed26f6b 12520tmake_file="${tmake_file_}"
71a94577 12521
ab87f8c8
JL
12522# If the host doesn't support symlinks, modify CC in
12523# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
12524# Otherwise, we can use "CC=$(CC)".
12525rm -f symtest.tem
35f06ae4
PB
12526case "$LN_S" in
12527 *-s*)
12528 cc_set_by_configure="\$(CC)"
12529 quoted_cc_set_by_configure="\$(CC)"
12530 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12531 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12532 ;;
12533 *)
12534 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
12535 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
12536 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
12537 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
12538 ;;
12539esac
ab87f8c8 12540
5395b47b
NN
12541# This is a terrible hack which will go away some day.
12542host_cc_for_libada=${CC}
1e3fad21
NN
12543
12544
ab87f8c8
JL
12545out_object_file=`basename $out_file .c`.o
12546
12547tm_file_list=
e22340b0 12548tm_include_list=
ab87f8c8 12549for f in $tm_file; do
64ccbc99 12550 case $f in
d02af173 12551 defaults.h )
e22340b0
ZW
12552 tm_file_list="${tm_file_list} \$(srcdir)/$f"
12553 tm_include_list="${tm_include_list} $f"
12554 ;;
12555 * )
12556 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
12557 tm_include_list="${tm_include_list} config/$f"
12558 ;;
64ccbc99 12559 esac
ab87f8c8
JL
12560done
12561
11642c3a 12562tm_p_file_list=
e22340b0 12563tm_p_include_list=
11642c3a 12564for f in $tm_p_file; do
4977bab6
ZW
12565 case $f in
12566 tm-preds.h )
e22340b0
ZW
12567 tm_p_file_list="${tm_p_file_list} $f"
12568 tm_p_include_list="${tm_p_include_list} $f"
12569 ;;
12570 * )
12571 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
12572 tm_p_include_list="${tm_p_include_list} config/$f"
12573 esac
12574done
12575
12576xm_file_list=
12577xm_include_list=
12578for f in $xm_file; do
12579 case $f in
12580 ansidecl.h )
12581 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
12582 xm_include_list="${xm_include_list} $f"
12583 ;;
12584 auto-host.h )
12585 xm_file_list="${xm_file_list} $f"
12586 xm_include_list="${xm_include_list} $f"
12587 ;;
12588 * )
12589 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
12590 xm_include_list="${xm_include_list} config/$f"
12591 ;;
4977bab6 12592 esac
11642c3a
ZW
12593done
12594
ab87f8c8 12595host_xm_file_list=
e22340b0 12596host_xm_include_list=
ab87f8c8 12597for f in $host_xm_file; do
64ccbc99 12598 case $f in
d02af173 12599 ansidecl.h )
e22340b0
ZW
12600 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
12601 host_xm_include_list="${host_xm_include_list} $f"
12602 ;;
e2500fed 12603 auto-host.h )
e22340b0
ZW
12604 host_xm_file_list="${host_xm_file_list} $f"
12605 host_xm_include_list="${host_xm_include_list} $f"
12606 ;;
12607 * )
12608 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
12609 host_xm_include_list="${host_xm_include_list} config/$f"
12610 ;;
64ccbc99 12611 esac
ab87f8c8
JL
12612done
12613
12614build_xm_file_list=
12615for f in $build_xm_file; do
64ccbc99 12616 case $f in
d02af173 12617 ansidecl.h )
e22340b0
ZW
12618 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
12619 build_xm_include_list="${build_xm_include_list} $f"
12620 ;;
e2500fed 12621 auto-build.h | auto-host.h )
e22340b0
ZW
12622 build_xm_file_list="${build_xm_file_list} $f"
12623 build_xm_include_list="${build_xm_include_list} $f"
12624 ;;
12625 * )
12626 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
12627 build_xm_include_list="${build_xm_include_list} config/$f"
12628 ;;
64ccbc99 12629 esac
ab87f8c8
JL
12630done
12631
a078a589
ZW
12632# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
12633# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
12634CROSS=
12635ALL=all.internal
12636SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
12637if test x$host != x$target
12638then
a078a589
ZW
12639 CROSS="-DCROSS_COMPILE"
12640 ALL=all.cross
12641 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
343f59d9 12642 case "$host","$target" in
3a7e8b87
GK
12643 # Darwin crosses can use the host system's libraries and headers,
12644 # because of the fat library support. Of course, it must be the
12645 # same version of Darwin on both sides. Allow the user to
12646 # just say --target=foo-darwin without a version number to mean
12647 # "the version on this system".
12648 *-*-darwin*,*-*-darwin*)
12649 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
12650 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
12651 if test $hostos = $targetos -o $targetos = darwin ; then
12652 CROSS=
12653 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
12654 with_headers=yes
12655 fi
12656 ;;
12657
343f59d9
AM
12658 i?86-*-*,x86_64-*-* \
12659 | powerpc*-*-*,powerpc64*-*-*)
12660 CROSS="$CROSS -DNATIVE_CROSS" ;;
12661 esac
7a615b25
AO
12662elif test "x$TARGET_SYSTEM_ROOT" != x; then
12663 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
12664 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
12665fi
12666
b39d221a
EC
12667# If this is a cross-compiler that does not
12668# have its own set of headers then define
12669# inhibit_libc
12670
dc06db20
R
12671# If this is using newlib, without having the headers available now,
12672# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
12673# This prevents libgcc2 from containing any code which requires libc
12674# support.
b39d221a 12675inhibit_libc=
dc06db20
R
12676if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
12677 test x$with_newlib = xyes ; } &&
e50084fa 12678 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
b39d221a 12679 inhibit_libc=-Dinhibit_libc
b39d221a
EC
12680fi
12681
12682
a078a589
ZW
12683# When building gcc with a cross-compiler, we need to adjust things so
12684# that the generator programs are still built with the native compiler.
12685# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
12686
12687# These are the normal (build=host) settings:
ba479fd2
NN
12688CC_FOR_BUILD='$(CC)'
12689BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 12690STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
12691
12692# Possibly disable fixproto, on a per-target basis.
12693case ${use_fixproto} in
12694 no)
12695 STMP_FIXPROTO=
12696 ;;
12697 yes)
12698 STMP_FIXPROTO=stmp-fixproto
12699 ;;
12700esac
12701
a078a589 12702
83599948
NS
12703# And these apply if build != host, or we are generating coverage data
12704if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 12705then
b11e4747 12706 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 12707
7a615b25 12708 if test "x$TARGET_SYSTEM_ROOT" = x; then
de253ca4
GK
12709 if "x$STMP_FIXPROTO" != x ; then
12710 STMP_FIXPROTO=stmp-install-fixproto
12711 fi
7a615b25 12712 fi
ab87f8c8
JL
12713fi
12714
12715# Expand extra_headers to include complete path.
12716# This substitutes for lots of t-* files.
12717extra_headers_list=
b1ef58c8
NN
12718# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
12719for file in ${extra_headers} ; do
12720 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
12721done
ab87f8c8 12722
c38f02df
ILT
12723# Define collect2 in Makefile.
12724case $host_can_use_collect2 in
12725 no) collect2= ;;
12726 *) collect2='collect2$(exeext)' ;;
12727esac
12728
12729
ab87f8c8 12730# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
12731case $use_collect2 in
12732 no) use_collect2= ;;
12733 "") ;;
ba479fd2 12734 *)
34a86c2b
NN
12735 host_xm_defines="${host_xm_defines} USE_COLLECT2"
12736 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
12737 case $host_can_use_collect2 in
12738 no)
12739 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
12740echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
12741 { (exit 1); exit 1; }; }
12742 ;;
12743 esac
34a86c2b
NN
12744 ;;
12745esac
ab87f8c8 12746
8bb915b6
NN
12747# ---------------------------
12748# Assembler & linker features
12749# ---------------------------
12750
d869a8c4
NN
12751# Identify the assembler which will work hand-in-glove with the newly
12752# built GCC, so that we can examine its features. This is the assembler
12753# which will be driven by the driver program.
12754#
12755# If build != host, and we aren't building gas in-tree, we identify a
12756# build->target assembler and hope that it will have the same features
12757# as the host->target assembler we'll be using.
ba479fd2
NN
12758echo "$as_me:$LINENO: checking what assembler to use" >&5
12759echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
34a86c2b 12760in_tree_gas=no
ab87f8c8 12761gcc_cv_as=
981d4858
JM
12762gcc_cv_gas_major_version=
12763gcc_cv_gas_minor_version=
ab87f8c8
JL
12764gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
12765if test -x "$DEFAULT_ASSEMBLER"; then
12766 gcc_cv_as="$DEFAULT_ASSEMBLER"
57991eba 12767elif test -x as$build_exeext; then
ab87f8c8 12768 # Build using assembler in the current directory.
57991eba 12769 gcc_cv_as=./as$build_exeext
34a86c2b 12770elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
12771 && test -f ../gas/Makefile \
12772 && test x$build = x$host; then
12773 # Single tree build which includes gas. We want to prefer it
12774 # over whatever linker top-level may have detected, since
12775 # we'll use what we're building after installation anyway.
ad9c4d9f
NN
12776 in_tree_gas=yes
12777 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
12778for f in $gcc_cv_as_bfd_srcdir/configure \
12779 $gcc_cv_as_gas_srcdir/configure \
12780 $gcc_cv_as_gas_srcdir/configure.in \
12781 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 12782 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
12783 if test x$gcc_cv_gas_version != x; then
12784 break
12785 fi
12786done
12787gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
12788gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
12789gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
12790case $gcc_cv_gas_patch_version in
12791 "") gcc_cv_gas_patch_version="0" ;;
12792esac
8ada417f
ZW
12793gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
12794 + $gcc_cv_gas_minor_version \) \* 1000 \
12795 + $gcc_cv_gas_patch_version`
ad9c4d9f 12796
57991eba
PB
12797 rm -f as$build_exeext
12798 $LN_S ../gas/as-new$build_exeext as$build_exeext 2>/dev/null
5408ac6c
HPN
12799 in_tree_gas_is_elf=no
12800 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
12801 || (grep 'obj_format = multi' ../gas/Makefile \
12802 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
12803 then
12804 in_tree_gas_is_elf=yes
12805 fi
08d105fa
AO
12806elif test -x "$AS_FOR_TARGET"; then
12807 gcc_cv_as="$AS_FOR_TARGET"
12808elif test -x "$AS" && test x$host = x$target; then
12809 gcc_cv_as="$AS"
981d4858 12810fi
9e423e6d 12811
534d0cc0 12812if test "x$gcc_cv_as" = x; then
779243f7
JL
12813 # Search the same directories that the installed compiler will
12814 # search. Else we may find the wrong assembler and lose. If we
12815 # do not find a suitable assembler binary, then try the user's
12816 # path.
12817 #
12818 # Also note we have to check MD_EXEC_PREFIX before checking the
12819 # user's path. Unfortunately, there is no good way to get at the
12820 # value of MD_EXEC_PREFIX here. So we do a brute force search
12821 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
12822 # to be fixed as part of the make/configure rewrite too.
12823
12824 if test "x$exec_prefix" = xNONE; then
12825 if test "x$prefix" = xNONE; then
12826 test_prefix=/usr/local
12827 else
12828 test_prefix=$prefix
12829 fi
12830 else
12831 test_prefix=$exec_prefix
12832 fi
12833
12834 # If the loop below does not find an assembler, then use whatever
12835 # one we can find in the users's path.
12836 # user's path.
55a2ea2a 12837 if test "x$program_prefix" != xNONE; then
57991eba 12838 gcc_cv_as=${program_prefix}as$build_exeext
55a2ea2a 12839 else
57991eba 12840 gcc_cv_as=`echo as | sed "${program_transform_name}"`$build_exeext
55a2ea2a
AM
12841 fi
12842
21addcd9
PB
12843 if test x$host = x$build; then
12844 test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
12845 $test_prefix/libexec/gcc/$target_noncanonical \
12846 /usr/lib/gcc/$target_noncanonical/$gcc_version \
12847 /usr/lib/gcc/$target_noncanonical \
12848 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
12849 $test_prefix/$target_noncanonical/bin"
12850 else
12851 test_dirs=
12852 fi
55a2ea2a
AM
12853
12854 if test x$host = x$target; then
12855 test_dirs="$test_dirs \
779243f7
JL
12856 /usr/libexec \
12857 /usr/ccs/gcc \
12858 /usr/ccs/bin \
12859 /udk/usr/ccs/bin \
12860 /bsd43/usr/lib/cmplrs/cc \
12861 /usr/cross64/usr/bin \
12862 /usr/lib/cmplrs/cc \
12863 /sysv/usr/lib/cmplrs/cc \
12864 /svr4/usr/lib/cmplrs/cc \
12865 /usr/bin"
55a2ea2a 12866 fi
779243f7
JL
12867
12868 for dir in $test_dirs; do
57991eba
PB
12869 if test -x $dir/as$build_exeext; then
12870 gcc_cv_as=$dir/as$build_exeext
779243f7
JL
12871 break;
12872 fi
12873 done
9e423e6d 12874fi
34a86c2b
NN
12875case $in_tree_gas in
12876 yes)
ba479fd2
NN
12877 echo "$as_me:$LINENO: result: \"newly built gas\"" >&5
12878echo "${ECHO_T}\"newly built gas\"" >&6
34a86c2b
NN
12879 ;;
12880 no)
ba479fd2
NN
12881 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
12882echo "${ECHO_T}$gcc_cv_as" >&6
34a86c2b
NN
12883 ;;
12884esac
981d4858 12885
d869a8c4
NN
12886# Identify the linker which will work hand-in-glove with the newly
12887# built GCC, so that we can examine its features. This is the linker
12888# which will be driven by the driver program.
12889#
12890# If build != host, and we aren't building gas in-tree, we identify a
12891# build->target linker and hope that it will have the same features
12892# as the host->target linker we'll be using.
ba479fd2
NN
12893echo "$as_me:$LINENO: checking what linker to use" >&5
12894echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
34a86c2b 12895in_tree_ld=no
275b60d6
JJ
12896gcc_cv_ld=
12897gcc_cv_gld_major_version=
12898gcc_cv_gld_minor_version=
12899gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
12900gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
12901if test -x "$DEFAULT_LINKER"; then
12902 gcc_cv_ld="$DEFAULT_LINKER"
57991eba 12903elif test -x collect-ld$build_exeext; then
275b60d6 12904 # Build using linker in the current directory.
57991eba 12905 gcc_cv_ld=./collect-ld$build_exeext
34a86c2b 12906elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
08d105fa
AO
12907 && test -f ../ld/Makefile \
12908 && test x$build = x$host; then
12909 # Single tree build which includes ld. We want to prefer it
12910 # over whatever linker top-level may have detected, since
12911 # we'll use what we're building after installation anyway.
34a86c2b 12912 in_tree_ld=yes
5408ac6c
HPN
12913 in_tree_ld_is_elf=no
12914 if (grep 'EMUL = .*elf' ../ld/Makefile \
8a45d680
AN
12915 || grep 'EMUL = .*linux' ../ld/Makefile \
12916 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
5408ac6c
HPN
12917 in_tree_ld_is_elf=yes
12918 fi
275b60d6
JJ
12919 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
12920 do
58ea87a9 12921 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
275b60d6
JJ
12922 if test x$gcc_cv_gld_version != x; then
12923 break
12924 fi
12925 done
12926 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
12927 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
57991eba
PB
12928 rm -f collect-ld$build_exeext
12929 $LN_S ../ld/ld-new$build_exeext collect-ld$build_exeext 2>/dev/null
08d105fa
AO
12930elif test -x "$LD_FOR_TARGET"; then
12931 gcc_cv_ld="$LD_FOR_TARGET"
12932elif test -x "$LD" && test x$host = x$target; then
12933 gcc_cv_ld="$LD"
275b60d6
JJ
12934fi
12935
534d0cc0 12936if test "x$gcc_cv_ld" = x; then
275b60d6
JJ
12937 # Search the same directories that the installed compiler will
12938 # search. Else we may find the wrong linker and lose. If we
12939 # do not find a suitable linker binary, then try the user's
12940 # path.
12941 #
12942 # Also note we have to check MD_EXEC_PREFIX before checking the
12943 # user's path. Unfortunately, there is no good way to get at the
12944 # value of MD_EXEC_PREFIX here. So we do a brute force search
12945 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
12946 # to be fixed as part of the make/configure rewrite too.
12947
12948 if test "x$exec_prefix" = xNONE; then
12949 if test "x$prefix" = xNONE; then
12950 test_prefix=/usr/local
12951 else
12952 test_prefix=$prefix
12953 fi
12954 else
12955 test_prefix=$exec_prefix
12956 fi
12957
12958 # If the loop below does not find an linker, then use whatever
12959 # one we can find in the users's path.
12960 # user's path.
55a2ea2a 12961 if test "x$program_prefix" != xNONE; then
57991eba 12962 gcc_cv_ld=${program_prefix}ld$build_exeext
55a2ea2a 12963 else
57991eba 12964 gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$build_exeext
55a2ea2a
AM
12965 fi
12966
21addcd9
PB
12967 if test x$host = x$build; then
12968 test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
12969 $test_prefix/libexec/gcc/$target_noncanonical \
12970 /usr/lib/gcc/$target_noncanonical/$gcc_version \
12971 /usr/lib/gcc/$target_noncanonical \
12972 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
12973 $test_prefix/$target_noncanonical/bin"
12974 else
12975 test_dirs=
12976 fi
55a2ea2a
AM
12977
12978 if test x$host = x$target; then
12979 test_dirs="$test_dirs \
275b60d6
JJ
12980 /usr/libexec \
12981 /usr/ccs/gcc \
12982 /usr/ccs/bin \
12983 /udk/usr/ccs/bin \
12984 /bsd43/usr/lib/cmplrs/cc \
12985 /usr/cross64/usr/bin \
12986 /usr/lib/cmplrs/cc \
12987 /sysv/usr/lib/cmplrs/cc \
12988 /svr4/usr/lib/cmplrs/cc \
12989 /usr/bin"
55a2ea2a 12990 fi
275b60d6
JJ
12991
12992 for dir in $test_dirs; do
57991eba
PB
12993 if test -x $dir/ld$build_exeext; then
12994 gcc_cv_ld=$dir/ld$build_exeext
275b60d6
JJ
12995 break;
12996 fi
12997 done
12998fi
34a86c2b
NN
12999case $in_tree_ld in
13000 yes)
ba479fd2
NN
13001 echo "$as_me:$LINENO: result: \"newly built ld\"" >&5
13002echo "${ECHO_T}\"newly built ld\"" >&6
34a86c2b
NN
13003 ;;
13004 no)
ba479fd2
NN
13005 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13006echo "${ECHO_T}$gcc_cv_ld" >&6
34a86c2b
NN
13007 ;;
13008esac
275b60d6 13009
981d4858 13010# Figure out what nm we will be using.
f9c1196a 13011gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
ba479fd2
NN
13012echo "$as_me:$LINENO: checking what nm to use" >&5
13013echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
f9c1196a 13014in_tree_nm=no
57991eba
PB
13015if test -x nm$build_exeext; then
13016 gcc_cv_nm=./nm$build_exeext
f9c1196a
ZW
13017elif test -f $gcc_cv_binutils_srcdir/configure.in \
13018 && test -f ../binutils/Makefile; then
13019 # Single tree build which includes binutils.
13020 in_tree_nm=yes
57991eba
PB
13021 gcc_cv_nm=./nm$build_exeext
13022 rm -f nm$build_exeext
13023 $LN_S ../binutils/nm-new$build_exeext nm$build_exeext 2>/dev/null
534d0cc0 13024elif test "x$program_prefix" != xNONE; then
57991eba 13025 gcc_cv_nm=${program_prefix}nm$build_exeext
534d0cc0 13026else
57991eba 13027 gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$build_exeext
981d4858 13028fi
f9c1196a 13029case $in_tree_nm in
ba479fd2
NN
13030 yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5
13031echo "${ECHO_T}\"newly built nm\"" >&6 ;;
13032 no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13033echo "${ECHO_T}$gcc_cv_nm" >&6 ;;
f9c1196a 13034esac
981d4858 13035
3cae5780 13036# Figure out what objdump we will be using.
ba479fd2
NN
13037echo "$as_me:$LINENO: checking what objdump to use" >&5
13038echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
f9c1196a 13039in_tree_objdump=no
57991eba
PB
13040if test -x objdump$build_exeext; then
13041 gcc_cv_objdump=./objdump$build_exeext
f9c1196a
ZW
13042elif test -f $gcc_cv_binutils_srcdir/configure.in \
13043 && test -f ../binutils/Makefile; then
13044 # Single tree build which includes binutils.
13045 in_tree_objdump=yes
57991eba
PB
13046 gcc_cv_objdump=./objdump$build_exeext
13047 rm -f objdump$build_exeext
13048 $LN_S ../binutils/objdump$build_exeext objdump$build_exeext 2>/dev/null
534d0cc0 13049elif test "x$program_prefix" != xNONE; then
57991eba 13050 gcc_cv_objdump=${program_prefix}objdump$build_exeext
534d0cc0 13051else
f9c1196a 13052 gcc_cv_objdump=`echo objdump | \
57991eba 13053 sed "${program_transform_name}"`$build_exeext
3cae5780 13054fi
f9c1196a 13055case $in_tree_objdump in
ba479fd2
NN
13056 yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5
13057echo "${ECHO_T}\"newly built objdump\"" >&6 ;;
13058 no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13059echo "${ECHO_T}$gcc_cv_objdump" >&6 ;;
f9c1196a 13060esac
3cae5780 13061
981d4858 13062# Figure out what assembler alignment features are present.
ba479fd2
NN
13063echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13064echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
13065if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13066 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13067else
13068 gcc_cv_as_balign_and_p2align=no
13069 if test $in_tree_gas = yes; then
13070 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13071 then gcc_cv_as_balign_and_p2align=yes
13072fi
13073 elif test x$gcc_cv_as != x; then
6e3f3080 13074 echo '.balign 4
8ada417f 13075.p2align 2' > conftest.s
ba479fd2
NN
13076 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13078 (eval $ac_try) 2>&5
13079 ac_status=$?
13080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13081 (exit $ac_status); }; }
8ada417f
ZW
13082 then
13083 gcc_cv_as_balign_and_p2align=yes
13084 else
13085 echo "configure: failed program was" >&5
13086 cat conftest.s >&5
13087 fi
13088 rm -f conftest.o conftest.s
13089 fi
13090fi
ba479fd2
NN
13091echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13092echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 13093if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
13094
13095cat >>confdefs.h <<\_ACEOF
981d4858 13096#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 13097_ACEOF
981d4858 13098
ad9c4d9f
NN
13099fi
13100
ba479fd2
NN
13101echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13102echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
13103if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13104 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13105else
13106 gcc_cv_as_max_skip_p2align=no
13107 if test $in_tree_gas = yes; then
13108 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13109 then gcc_cv_as_max_skip_p2align=yes
13110fi
13111 elif test x$gcc_cv_as != x; then
6e3f3080 13112 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
13113 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13115 (eval $ac_try) 2>&5
13116 ac_status=$?
13117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13118 (exit $ac_status); }; }
8ada417f
ZW
13119 then
13120 gcc_cv_as_max_skip_p2align=yes
13121 else
13122 echo "configure: failed program was" >&5
13123 cat conftest.s >&5
13124 fi
13125 rm -f conftest.o conftest.s
13126 fi
ad9c4d9f 13127fi
ba479fd2
NN
13128echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13129echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 13130if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
13131
13132cat >>confdefs.h <<\_ACEOF
9e423e6d 13133#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 13134_ACEOF
9e423e6d 13135
9e423e6d 13136fi
ad9c4d9f 13137
ba479fd2
NN
13138echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13139echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
13140if test "${gcc_cv_as_subsection_m1+set}" = set; then
13141 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13142else
13143 gcc_cv_as_subsection_m1=no
13144 if test $in_tree_gas = yes; then
13145 if test $in_tree_gas_is_elf = yes \
13146 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13147 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 13148fi
8ada417f 13149 elif test x$gcc_cv_as != x; then
6e3f3080 13150 echo 'conftest_label1: .word 0
d1accaa3
JJ
13151.subsection -1
13152conftest_label2: .word 0
8ada417f 13153.previous' > conftest.s
ba479fd2
NN
13154 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13156 (eval $ac_try) 2>&5
13157 ac_status=$?
13158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13159 (exit $ac_status); }; }
8ada417f
ZW
13160 then
13161 if test x$gcc_cv_nm != x; then
13162 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13163 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13164 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13165 then :
13166 else gcc_cv_as_subsection_m1=yes
13167 fi
13168 rm -f conftest.nm1 conftest.nm2
13169 fi
13170 else
13171 echo "configure: failed program was" >&5
13172 cat conftest.s >&5
13173 fi
13174 rm -f conftest.o conftest.s
13175 fi
981d4858 13176fi
ba479fd2
NN
13177echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13178echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 13179if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
13180
13181cat >>confdefs.h <<\_ACEOF
981d4858 13182#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 13183_ACEOF
981d4858 13184
d1accaa3 13185fi
ad9c4d9f 13186
ba479fd2
NN
13187echo "$as_me:$LINENO: checking assembler for .weak" >&5
13188echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
13189if test "${gcc_cv_as_weak+set}" = set; then
13190 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13191else
13192 gcc_cv_as_weak=no
13193 if test $in_tree_gas = yes; then
13194 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13195 then gcc_cv_as_weak=yes
ad9c4d9f 13196fi
8ada417f 13197 elif test x$gcc_cv_as != x; then
6e3f3080 13198 echo ' .weak foobar' > conftest.s
ba479fd2
NN
13199 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13201 (eval $ac_try) 2>&5
13202 ac_status=$?
13203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13204 (exit $ac_status); }; }
8ada417f
ZW
13205 then
13206 gcc_cv_as_weak=yes
13207 else
13208 echo "configure: failed program was" >&5
13209 cat conftest.s >&5
13210 fi
13211 rm -f conftest.o conftest.s
13212 fi
981d4858 13213fi
ba479fd2
NN
13214echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13215echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 13216if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
13217
13218cat >>confdefs.h <<\_ACEOF
981d4858 13219#define HAVE_GAS_WEAK 1
ba479fd2 13220_ACEOF
981d4858 13221
12822146 13222fi
ad9c4d9f 13223
e41f3691
JDA
13224echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13225echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
13226if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13227 echo $ECHO_N "(cached) $ECHO_C" >&6
13228else
13229 gcc_cv_as_nsubspa_comdat=no
13230 if test $in_tree_gas = yes; then
13231 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13232 then gcc_cv_as_nsubspa_comdat=yes
13233fi
13234 elif test x$gcc_cv_as != x; then
13235 echo ' .SPACE $TEXT$
13236 .NSUBSPA $CODE$,COMDAT' > conftest.s
13237 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13239 (eval $ac_try) 2>&5
13240 ac_status=$?
13241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13242 (exit $ac_status); }; }
13243 then
13244 gcc_cv_as_nsubspa_comdat=yes
13245 else
13246 echo "configure: failed program was" >&5
13247 cat conftest.s >&5
13248 fi
13249 rm -f conftest.o conftest.s
13250 fi
13251fi
13252echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13253echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
13254if test $gcc_cv_as_nsubspa_comdat = yes; then
13255
13256cat >>confdefs.h <<\_ACEOF
13257#define HAVE_GAS_NSUBSPA_COMDAT 1
13258_ACEOF
13259
13260fi
13261
8ada417f
ZW
13262# .hidden needs to be supported in both the assembler and the linker,
13263# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13264# This is irritatingly difficult to feature test for; we have to check the
13265# date string after the version number. If we've got an in-tree
13266# ld, we don't know its patchlevel version, so we set the baseline at 2.13
13267# to be safe.
13268# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
13269echo "$as_me:$LINENO: checking assembler for .hidden" >&5
13270echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
13271if test "${gcc_cv_as_hidden+set}" = set; then
13272 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13273else
13274 gcc_cv_as_hidden=no
13275 if test $in_tree_gas = yes; then
13276 if test $in_tree_gas_is_elf = yes \
13277 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
13278 then gcc_cv_as_hidden=yes
13279fi
13280 elif test x$gcc_cv_as != x; then
6e3f3080 13281 echo ' .hidden foobar
8ada417f 13282foobar:' > conftest.s
ba479fd2
NN
13283 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13285 (eval $ac_try) 2>&5
13286 ac_status=$?
13287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13288 (exit $ac_status); }; }
8ada417f
ZW
13289 then
13290 gcc_cv_as_hidden=yes
13291 else
13292 echo "configure: failed program was" >&5
13293 cat conftest.s >&5
13294 fi
13295 rm -f conftest.o conftest.s
13296 fi
13297fi
ba479fd2
NN
13298echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
13299echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 13300
ad9c4d9f 13301
ba479fd2
NN
13302echo "$as_me:$LINENO: checking linker for .hidden support" >&5
13303echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
13304if test "${gcc_cv_ld_hidden+set}" = set; then
13305 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13306else
13307 if test $in_tree_ld = yes ; then
13308 gcc_cv_ld_hidden=no
13309 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 \
13310 && test $in_tree_ld_is_elf = yes; then
13311 gcc_cv_ld_hidden=yes
13312 fi
13313else
13314 gcc_cv_ld_hidden=yes
bace148a 13315 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
13316 if echo "$ld_ver" | grep GNU > /dev/null; then
13317 ld_vers=`echo $ld_ver | sed -n \
13318 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13319 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13320 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13321 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13322 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13323 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
13324 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'`
13325 if test 0"$ld_date" -lt 20020404; then
13326 if test -n "$ld_date"; then
13327 # If there was date string, but was earlier than 2002-04-04, fail
13328 gcc_cv_ld_hidden=no
13329 elif test -z "$ld_vers"; then
13330 # If there was no date string nor ld version number, something is wrong
13331 gcc_cv_ld_hidden=no
13332 else
13333 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
13334 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
13335 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
13336 test -z "$ld_vers_patch" && ld_vers_patch=0
13337 if test "$ld_vers_major" -lt 2; then
13338 gcc_cv_ld_hidden=no
13339 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
13340 gcc_cv_ld_hidden="no"
13341 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
13342 gcc_cv_ld_hidden=no
c72931a6 13343 fi
8ada417f 13344 fi
789b7de5 13345 fi
8ada417f 13346 else
28690784 13347 case "${target}" in
b0fd7d27 13348 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
13349 gcc_cv_ld_hidden=yes
13350 ;;
13351 *)
13352 gcc_cv_ld_hidden=no
13353 ;;
13354 esac
8ada417f
ZW
13355 fi
13356fi
6d07784a 13357fi
ba479fd2
NN
13358echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
13359echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 13360libgcc_visibility=no
ad9c4d9f 13361
8e3940b2 13362if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 13363 libgcc_visibility=yes
ba479fd2
NN
13364
13365cat >>confdefs.h <<\_ACEOF
8ada417f 13366#define HAVE_GAS_HIDDEN 1
ba479fd2 13367_ACEOF
ad9c4d9f
NN
13368
13369fi
13370
8ada417f 13371# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
13372echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
13373echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
13374if test "${gcc_cv_as_leb128+set}" = set; then
13375 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13376else
13377 gcc_cv_as_leb128=no
13378 if test $in_tree_gas = yes; then
13379 if test $in_tree_gas_is_elf = yes \
13380 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
13381 then gcc_cv_as_leb128=yes
13382fi
13383 elif test x$gcc_cv_as != x; then
6e3f3080 13384 echo ' .data
b7460f24
RH
13385 .uleb128 L2 - L1
13386L1:
13387 .uleb128 1280
13388 .sleb128 -1010
8ada417f 13389L2:' > conftest.s
ba479fd2
NN
13390 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13392 (eval $ac_try) 2>&5
13393 ac_status=$?
13394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13395 (exit $ac_status); }; }
8ada417f
ZW
13396 then
13397 # GAS versions before 2.11 do not support uleb128,
13398 # despite appearing to.
13399 # ??? There exists an elf-specific test that will crash
13400 # the assembler. Perhaps it's better to figure out whether
13401 # arbitrary sections are supported and try the test.
bace148a 13402 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
13403 if echo "$as_ver" | grep GNU > /dev/null; then
13404 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
13405 as_major=`echo $as_ver | sed 's/\..*//'`
13406 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
13407 if test $as_major -eq 2 && test $as_minor -lt 11
13408 then :
13409 else gcc_cv_as_leb128=yes
13410 fi
13411 fi
13412 else
13413 echo "configure: failed program was" >&5
13414 cat conftest.s >&5
13415 fi
13416 rm -f conftest.o conftest.s
13417 fi
b7460f24 13418fi
ba479fd2
NN
13419echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
13420echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 13421if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
13422
13423cat >>confdefs.h <<\_ACEOF
b7460f24 13424#define HAVE_AS_LEB128 1
ba479fd2 13425_ACEOF
b7460f24
RH
13426
13427fi
ad9c4d9f 13428
8ada417f
ZW
13429# GAS versions up to and including 2.11.0 may mis-optimize
13430# .eh_frame data.
ba479fd2
NN
13431echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
13432echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
13433if test "${gcc_cv_as_eh_frame+set}" = set; then
13434 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13435else
13436 gcc_cv_as_eh_frame=no
13437 if test $in_tree_gas = yes; then
13438 if test $in_tree_gas_is_elf = yes \
13439 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13440 then gcc_cv_as_eh_frame=yes
ad9c4d9f 13441fi
8ada417f 13442 elif test x$gcc_cv_as != x; then
6e3f3080 13443 echo ' .text
c64688ae
RH
13444.LFB1:
13445 .4byte 0
13446.L1:
13447 .4byte 0
13448.LFE1:
13449 .section .eh_frame,"aw",@progbits
13450__FRAME_BEGIN__:
13451 .4byte .LECIE1-.LSCIE1
13452.LSCIE1:
13453 .4byte 0x0
13454 .byte 0x1
13455 .ascii "z\0"
13456 .byte 0x1
13457 .byte 0x78
13458 .byte 0x1a
13459 .byte 0x0
13460 .byte 0x4
13461 .4byte 1
13462 .p2align 1
13463.LECIE1:
13464.LSFDE1:
13465 .4byte .LEFDE1-.LASFDE1
13466.LASFDE1:
13467 .4byte .LASFDE1-__FRAME_BEGIN__
13468 .4byte .LFB1
13469 .4byte .LFE1-.LFB1
13470 .byte 0x4
13471 .4byte .LFE1-.LFB1
13472 .byte 0x4
13473 .4byte .L1-.LFB1
8ada417f 13474.LEFDE1:' > conftest.s
ba479fd2
NN
13475 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13477 (eval $ac_try) 2>&5
13478 ac_status=$?
13479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13480 (exit $ac_status); }; }
8ada417f
ZW
13481 then
13482 cat > conftest.lit <<EOF
c64688ae
RH
13483 0000 10000000 00000000 017a0001 781a0004 .........z..x...
13484 0010 01000000 12000000 18000000 00000000 ................
093e61a6 13485 0020 08000000 04080000 0044 .........D
01efb963 13486EOF
ba479fd2 13487cat > conftest.big <<EOF
01efb963
AS
13488 0000 00000010 00000000 017a0001 781a0004 .........z..x...
13489 0010 00000001 00000012 00000018 00000000 ................
093e61a6 13490 0020 00000008 04000000 0844 .........D
c64688ae 13491EOF
8ada417f
ZW
13492 # If the assembler didn't choke, and we can objdump,
13493 # and we got the correct data, then succeed.
13494 if test x$gcc_cv_objdump != x \
13495 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
13496 | tail -3 > conftest.got \
13497 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
13498 || cmp conftest.big conftest.got > /dev/null 2>&1; }
13499 then
13500 gcc_cv_as_eh_frame=yes
ba479fd2
NN
13501 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
13502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13503 (eval $ac_try) 2>&5
13504 ac_status=$?
13505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13506 (exit $ac_status); }; }; then
8ada417f
ZW
13507 gcc_cv_as_eh_frame=buggy
13508 else
13509 # Uh oh, what do we do now?
13510 gcc_cv_as_eh_frame=no
13511 fi
13512 else
13513 echo "configure: failed program was" >&5
13514 cat conftest.s >&5
13515 fi
13516 rm -f conftest.o conftest.s
13517 fi
c64688ae 13518fi
ba479fd2
NN
13519echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
13520echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 13521
6e3f3080 13522
63cf211a 13523if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
13524
13525cat >>confdefs.h <<\_ACEOF
8ada417f 13526#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 13527_ACEOF
ad9c4d9f
NN
13528
13529fi
13530
ba479fd2
NN
13531echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13532echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13533if test "${gcc_cv_as_shf_merge+set}" = set; then
13534 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13535else
13536 gcc_cv_as_shf_merge=no
13537 if test $in_tree_gas = yes; then
13538 if test $in_tree_gas_is_elf = yes \
13539 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13540 then gcc_cv_as_shf_merge=yes
13541fi
13542 elif test x$gcc_cv_as != x; then
6e3f3080 13543 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
13544 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13546 (eval $ac_try) 2>&5
13547 ac_status=$?
13548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13549 (exit $ac_status); }; }
8ada417f
ZW
13550 then
13551 gcc_cv_as_shf_merge=yes
13552 else
13553 echo "configure: failed program was" >&5
13554 cat conftest.s >&5
13555 fi
13556 rm -f conftest.o conftest.s
13557 fi
201556f0 13558fi
ba479fd2
NN
13559echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13560echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 13561
c18a5b6c
MM
13562if test $gcc_cv_as_shf_merge = no; then
13563 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13564echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13565if test "${gcc_cv_as_shf_merge+set}" = set; then
13566 echo $ECHO_N "(cached) $ECHO_C" >&6
13567else
13568 gcc_cv_as_shf_merge=no
13569 if test $in_tree_gas = yes; then
13570 if test $in_tree_gas_is_elf = yes \
13571 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13572 then gcc_cv_as_shf_merge=yes
13573fi
13574 elif test x$gcc_cv_as != x; then
13575 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
13576 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13578 (eval $ac_try) 2>&5
13579 ac_status=$?
13580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13581 (exit $ac_status); }; }
13582 then
13583 gcc_cv_as_shf_merge=yes
13584 else
13585 echo "configure: failed program was" >&5
13586 cat conftest.s >&5
13587 fi
13588 rm -f conftest.o conftest.s
13589 fi
13590fi
13591echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13592echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
13593
13594fi
8ad9fb33 13595
ba479fd2 13596cat >>confdefs.h <<_ACEOF
8ad9fb33 13597#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 13598_ACEOF
201556f0 13599
201556f0 13600
c18a5b6c
MM
13601echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13602echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13603if test "${gcc_cv_as_comdat_group+set}" = set; then
13604 echo $ECHO_N "(cached) $ECHO_C" >&6
13605else
13606 gcc_cv_as_comdat_group=no
13607 if test $in_tree_gas = yes; then
13608 if test $in_tree_gas_is_elf = yes \
13609 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13610 then gcc_cv_as_comdat_group=yes
13611fi
13612 elif test x$gcc_cv_as != x; then
13613 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
13614 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13616 (eval $ac_try) 2>&5
13617 ac_status=$?
13618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13619 (exit $ac_status); }; }
13620 then
13621 gcc_cv_as_comdat_group=yes
13622 else
13623 echo "configure: failed program was" >&5
13624 cat conftest.s >&5
13625 fi
13626 rm -f conftest.o conftest.s
13627 fi
13628fi
13629echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
13630echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
13631
13632if test $gcc_cv_as_comdat_group = yes; then
13633 gcc_cv_as_comdat_group_percent=no
13634else
13635 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13636echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13637if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
13638 echo $ECHO_N "(cached) $ECHO_C" >&6
13639else
13640 gcc_cv_as_comdat_group_percent=no
13641 if test $in_tree_gas = yes; then
13642 if test $in_tree_gas_is_elf = yes \
13643 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13644 then gcc_cv_as_comdat_group_percent=yes
13645fi
13646 elif test x$gcc_cv_as != x; then
13647 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
13648 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13650 (eval $ac_try) 2>&5
13651 ac_status=$?
13652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13653 (exit $ac_status); }; }
13654 then
13655 gcc_cv_as_comdat_group_percent=yes
13656 else
13657 echo "configure: failed program was" >&5
13658 cat conftest.s >&5
13659 fi
13660 rm -f conftest.o conftest.s
13661 fi
13662fi
13663echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
13664echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
13665
13666fi
13667
13668cat >>confdefs.h <<_ACEOF
13669#define HAVE_GAS_COMDAT_GROUP `if test $gcc_cv_as_comdat_group = yes || test $gcc_cv_as_comdat_group_percent = yes; then echo 1; else echo 0; fi`
13670_ACEOF
13671
13672
8ada417f 13673# Thread-local storage - the check is heavily parametrized.
f996902d
RH
13674conftest_s=
13675tls_first_major=
13676tls_first_minor=
9739c90c 13677tls_as_opt=
f996902d 13678case "$target" in
6f9b006d
RH
13679 alpha*-*-*)
13680 conftest_s='
13681 .section ".tdata","awT",@progbits
13682foo: .long 25
13683 .text
13684 ldq $27,__tls_get_addr($29) !literal!1
13685 lda $16,foo($29) !tlsgd!1
13686 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
13687 ldq $27,__tls_get_addr($29) !literal!2
13688 lda $16,foo($29) !tlsldm!2
13689 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
13690 ldq $1,foo($29) !gotdtprel
13691 ldah $2,foo($29) !dtprelhi
13692 lda $3,foo($2) !dtprello
13693 lda $4,foo($29) !dtprel
13694 ldq $1,foo($29) !gottprel
13695 ldah $2,foo($29) !tprelhi
13696 lda $3,foo($2) !tprello
13697 lda $4,foo($29) !tprel'
13698 tls_first_major=2
13699 tls_first_minor=13
2f3321ca 13700 tls_as_opt=--fatal-warnings
6f9b006d 13701 ;;
e4dd71de
AH
13702 frv*-*-*)
13703 conftest_s='
13704 .section ".tdata","awT",@progbits
13705x: .long 25
13706 .text
13707 call #gettlsoff(x)'
13708 tls_first_major=2
13709 tls_first_minor=14
13710 ;;
f996902d
RH
13711 i[34567]86-*-*)
13712 conftest_s='
13713 .section ".tdata","awT",@progbits
13714foo: .long 25
13715 .text
13716 movl %gs:0, %eax
13717 leal foo@TLSGD(,%ebx,1), %eax
13718 leal foo@TLSLDM(%ebx), %eax
13719 leal foo@DTPOFF(%eax), %edx
13720 movl foo@GOTTPOFF(%ebx), %eax
13721 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
13722 addl foo@GOTNTPOFF(%ebx), %eax
13723 movl foo@INDNTPOFF, %eax
f996902d
RH
13724 movl $foo@TPOFF, %eax
13725 subl $foo@TPOFF, %eax
13726 leal foo@NTPOFF(%ecx), %eax'
13727 tls_first_major=2
75d38379 13728 tls_first_minor=14
2f3321ca 13729 tls_as_opt=--fatal-warnings
75d38379
JJ
13730 ;;
13731 x86_64-*-*)
13732 conftest_s='
13733 .section ".tdata","awT",@progbits
13734foo: .long 25
13735 .text
13736 movq %fs:0, %rax
13737 leaq foo@TLSGD(%rip), %rdi
13738 leaq foo@TLSLD(%rip), %rdi
13739 leaq foo@DTPOFF(%rax), %rdx
13740 movq foo@GOTTPOFF(%rip), %rax
13741 movq $foo@TPOFF, %rax'
13742 tls_first_major=2
13743 tls_first_minor=14
2f3321ca 13744 tls_as_opt=--fatal-warnings
f996902d 13745 ;;
7b6e506e
RH
13746 ia64-*-*)
13747 conftest_s='
13748 .section ".tdata","awT",@progbits
13749foo: data8 25
13750 .text
13751 addl r16 = @ltoff(@dtpmod(foo#)), gp
13752 addl r17 = @ltoff(@dtprel(foo#)), gp
13753 addl r18 = @ltoff(@tprel(foo#)), gp
13754 addl r19 = @dtprel(foo#), gp
13755 adds r21 = @dtprel(foo#), r13
13756 movl r23 = @dtprel(foo#)
13757 addl r20 = @tprel(foo#), gp
13758 adds r22 = @tprel(foo#), r13
13759 movl r24 = @tprel(foo#)'
13760 tls_first_major=2
13761 tls_first_minor=13
2f3321ca 13762 tls_as_opt=--fatal-warnings
7b6e506e 13763 ;;
c4501e62
JJ
13764 powerpc-*-*)
13765 conftest_s='
13766 .section ".tdata","awT",@progbits
13767 .align 2
13768ld0: .space 4
13769ld1: .space 4
13770x1: .space 4
13771x2: .space 4
13772x3: .space 4
13773 .text
13774 addi 3,31,ld0@got@tlsgd
13775 bl __tls_get_addr
13776 addi 3,31,x1@got@tlsld
13777 bl __tls_get_addr
13778 addi 9,3,x1@dtprel
13779 addis 9,3,x2@dtprel@ha
13780 addi 9,9,x2@dtprel@l
13781 lwz 9,x3@got@tprel(31)
13782 add 9,9,x@tls
13783 addi 9,2,x1@tprel
13784 addis 9,2,x2@tprel@ha
13785 addi 9,9,x2@tprel@l'
13786 tls_first_major=2
13787 tls_first_minor=14
2f3321ca 13788 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
13789 ;;
13790 powerpc64-*-*)
13791 conftest_s='
13792 .section ".tdata","awT",@progbits
13793 .align 3
13794ld0: .space 8
13795ld1: .space 8
13796x1: .space 8
13797x2: .space 8
13798x3: .space 8
13799 .text
13800 addi 3,2,ld0@got@tlsgd
13801 bl .__tls_get_addr
13802 nop
13803 addi 3,2,ld1@toc
13804 bl .__tls_get_addr
13805 nop
13806 addi 3,2,x1@got@tlsld
13807 bl .__tls_get_addr
13808 nop
13809 addi 9,3,x1@dtprel
13810 bl .__tls_get_addr
13811 nop
13812 addis 9,3,x2@dtprel@ha
13813 addi 9,9,x2@dtprel@l
13814 bl .__tls_get_addr
13815 nop
13816 ld 9,x3@got@dtprel(2)
13817 add 9,9,3
13818 bl .__tls_get_addr
13819 nop'
13820 tls_first_major=2
13821 tls_first_minor=14
2f3321ca 13822 tls_as_opt="-a64 --fatal-warnings"
c4501e62 13823 ;;
fd3cd001
UW
13824 s390-*-*)
13825 conftest_s='
13826 .section ".tdata","awT",@progbits
13827foo: .long 25
13828 .text
13829 .long foo@TLSGD
13830 .long foo@TLSLDM
13831 .long foo@DTPOFF
13832 .long foo@NTPOFF
13833 .long foo@GOTNTPOFF
13834 .long foo@INDNTPOFF
13835 l %r1,foo@GOTNTPOFF(%r12)
13836 l %r1,0(%r1):tls_load:foo
13837 bas %r14,0(%r1,%r13):tls_gdcall:foo
13838 bas %r14,0(%r1,%r13):tls_ldcall:foo'
13839 tls_first_major=2
13840 tls_first_minor=14
2f3321ca 13841 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
13842 ;;
13843 s390x-*-*)
13844 conftest_s='
13845 .section ".tdata","awT",@progbits
13846foo: .long 25
13847 .text
13848 .quad foo@TLSGD
13849 .quad foo@TLSLDM
13850 .quad foo@DTPOFF
13851 .quad foo@NTPOFF
13852 .quad foo@GOTNTPOFF
13853 lg %r1,foo@GOTNTPOFF(%r12)
13854 larl %r1,foo@INDNTPOFF
13855 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
13856 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
13857 tls_first_major=2
13858 tls_first_minor=14
2f3321ca 13859 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 13860 ;;
9ff13962
KK
13861 sh-*-* | sh[34]-*-*)
13862 conftest_s='
13863 .section ".tdata","awT",@progbits
13864foo: .long 25
13865 .text
13866 .long foo@TLSGD
13867 .long foo@TLSLDM
13868 .long foo@DTPOFF
13869 .long foo@GOTTPOFF
13870 .long foo@TPOFF'
13871 tls_first_major=2
13872 tls_first_minor=13
2f3321ca 13873 tls_as_opt=--fatal-warnings
9ff13962 13874 ;;
5751a10b 13875 sparc*-*-*)
2f3321ca
EB
13876 case "$target" in
13877 sparc*-sun-solaris2.*)
13878 on_solaris=yes
13879 ;;
13880 *)
13881 on_solaris=no
13882 ;;
13883 esac
13884 if test x$on_solaris = xyes && test x$gas_flag = xno; then
13885 conftest_s='
13886 .section ".tdata",#alloc,#write,#tls
13887foo: .long 25
13888 .text
13889 sethi %tgd_hi22(foo), %o0
13890 add %o0, %tgd_lo10(foo), %o1
13891 add %l7, %o1, %o0, %tgd_add(foo)
13892 call __tls_get_addr, %tgd_call(foo)
13893 sethi %tldm_hi22(foo), %l1
13894 add %l1, %tldm_lo10(foo), %l2
13895 add %l7, %l2, %o0, %tldm_add(foo)
13896 call __tls_get_addr, %tldm_call(foo)
13897 sethi %tldo_hix22(foo), %l3
13898 xor %l3, %tldo_lox10(foo), %l4
13899 add %o0, %l4, %l5, %tldo_add(foo)
13900 sethi %tie_hi22(foo), %o3
13901 add %o3, %tie_lo10(foo), %o3
13902 ld [%l7 + %o3], %o2, %tie_ld(foo)
13903 add %g7, %o2, %o4, %tie_add(foo)
13904 sethi %tle_hix22(foo), %l1
13905 xor %l1, %tle_lox10(foo), %o5
13906 ld [%g7 + %o5], %o1'
13907 tls_first_major=0
13908 tls_first_minor=0
13909 else
13910 conftest_s='
5751a10b
JJ
13911 .section ".tdata","awT",@progbits
13912foo: .long 25
13913 .text
13914 sethi %tgd_hi22(foo), %o0
13915 add %o0, %tgd_lo10(foo), %o1
13916 add %l7, %o1, %o0, %tgd_add(foo)
13917 call __tls_get_addr, %tgd_call(foo)
13918 sethi %tldm_hi22(foo), %l1
13919 add %l1, %tldm_lo10(foo), %l2
13920 add %l7, %l2, %o0, %tldm_add(foo)
13921 call __tls_get_addr, %tldm_call(foo)
13922 sethi %tldo_hix22(foo), %l3
13923 xor %l3, %tldo_lox10(foo), %l4
13924 add %o0, %l4, %l5, %tldo_add(foo)
13925 sethi %tie_hi22(foo), %o3
13926 add %o3, %tie_lo10(foo), %o3
13927 ld [%l7 + %o3], %o2, %tie_ld(foo)
13928 add %g7, %o2, %o4, %tie_add(foo)
13929 sethi %tle_hix22(foo), %l1
13930 xor %l1, %tle_lox10(foo), %o5
13931 ld [%g7 + %o5], %o1'
13932 tls_first_major=2
13933 tls_first_minor=14
2f3321ca
EB
13934 tls_as_opt="-32 --fatal-warnings"
13935 fi
5751a10b 13936 ;;
f996902d
RH
13937esac
13938if test -z "$tls_first_major"; then
8ada417f
ZW
13939 : # If we don't have a check, assume no support.
13940else
ba479fd2
NN
13941 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
13942echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
13943if test "${gcc_cv_as_tls+set}" = set; then
13944 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13945else
13946 gcc_cv_as_tls=no
13947 if test $in_tree_gas = yes; then
13948 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
13949 then gcc_cv_as_tls=yes
ad9c4d9f 13950fi
8ada417f 13951 elif test x$gcc_cv_as != x; then
6e3f3080 13952 echo "$conftest_s" > conftest.s
2f3321ca 13953 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
13954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13955 (eval $ac_try) 2>&5
13956 ac_status=$?
13957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13958 (exit $ac_status); }; }
8ada417f
ZW
13959 then
13960 gcc_cv_as_tls=yes
13961 else
13962 echo "configure: failed program was" >&5
13963 cat conftest.s >&5
13964 fi
13965 rm -f conftest.o conftest.s
f996902d 13966 fi
f996902d 13967fi
ba479fd2
NN
13968echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
13969echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 13970if test $gcc_cv_as_tls = yes; then
ba479fd2
NN
13971
13972cat >>confdefs.h <<\_ACEOF
f996902d 13973#define HAVE_AS_TLS 1
ba479fd2 13974_ACEOF
f996902d
RH
13975
13976fi
8ada417f
ZW
13977fi
13978
13979# Target-specific assembler checks.
f996902d 13980
7e9d8517
L
13981echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
13982echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
13983gcc_cv_ld_static_dynamic=no
13984if test $in_tree_ld = yes ; then
13985 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
13986 gcc_cv_ld_static_dynamic=yes
13987 fi
13988elif test x$gcc_cv_ld != x; then
13989 # Check if linker supports -Bstatic/-Bdynamic option
13990 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
13991 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
13992 gcc_cv_ld_static_dynamic=yes
13993 fi
13994fi
13995if test x"$gcc_cv_ld_static_dynamic" = xyes; then
13996
13997cat >>confdefs.h <<\_ACEOF
13998#define HAVE_LD_STATIC_DYNAMIC 1
13999_ACEOF
14000
14001fi
14002echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14003echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
14004
d594623a
L
14005if test x"$demangler_in_ld" = xyes; then
14006 echo "$as_me:$LINENO: checking linker --demangle support" >&5
14007echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
14008 gcc_cv_ld_demangle=no
14009 if test $in_tree_ld = yes; then
14010 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 \
14011 gcc_cv_ld_demangle=yes
14012 fi
14013 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14014 # Check if the GNU linker supports --demangle option
14015 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14016 gcc_cv_ld_demangle=yes
14017 fi
14018 fi
14019 if test x"$gcc_cv_ld_demangle" = xyes; then
14020
14021cat >>confdefs.h <<\_ACEOF
14022#define HAVE_LD_DEMANGLE 1
14023_ACEOF
14024
14025 fi
14026 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14027echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
14028fi
14029
3a37b08e
RH
14030case "$target" in
14031 # All TARGET_ABI_OSF targets.
14032 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
14033 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14034echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14035if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14036 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 14037else
8ada417f
ZW
14038 gcc_cv_as_alpha_explicit_relocs=no
14039 if test $in_tree_gas = yes; then
14040 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14041 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 14042fi
8ada417f 14043 elif test x$gcc_cv_as != x; then
6e3f3080 14044 echo ' .set nomacro
3a37b08e
RH
14045 .text
14046 extbl $3, $2, $3 !lituse_bytoff!1
14047 ldq $2, a($29) !literal!1
14048 ldq $4, b($29) !literal!2
14049 ldq_u $3, 0($2) !lituse_base!1
14050 ldq $27, f($29) !literal!5
14051 jsr $26, ($27), f !lituse_jsr!5
14052 ldah $29, 0($26) !gpdisp!3
14053 lda $0, c($29) !gprel
14054 ldah $1, d($29) !gprelhigh
14055 lda $1, d($1) !gprellow
8ada417f 14056 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
14057 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14059 (eval $ac_try) 2>&5
14060 ac_status=$?
14061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14062 (exit $ac_status); }; }
8ada417f
ZW
14063 then
14064 gcc_cv_as_alpha_explicit_relocs=yes
14065 else
14066 echo "configure: failed program was" >&5
14067 cat conftest.s >&5
14068 fi
14069 rm -f conftest.o conftest.s
14070 fi
cafe096b 14071fi
ba479fd2
NN
14072echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14073echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 14074if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
14075
14076cat >>confdefs.h <<\_ACEOF
3a37b08e 14077#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 14078_ACEOF
3a37b08e 14079
86da66b5
HPN
14080fi
14081 ;;
14082
14083 cris-*-*)
14084 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14085echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
14086if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14087 echo $ECHO_N "(cached) $ECHO_C" >&6
14088else
14089 gcc_cv_as_cris_no_mul_bug=no
14090 if test $in_tree_gas = yes; then
14091 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14092 then gcc_cv_as_cris_no_mul_bug=yes
14093fi
14094 elif test x$gcc_cv_as != x; then
14095 echo '.text' > conftest.s
14096 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14098 (eval $ac_try) 2>&5
14099 ac_status=$?
14100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14101 (exit $ac_status); }; }
14102 then
14103 gcc_cv_as_cris_no_mul_bug=yes
14104 else
14105 echo "configure: failed program was" >&5
14106 cat conftest.s >&5
14107 fi
14108 rm -f conftest.o conftest.s
14109 fi
14110fi
14111echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14112echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
14113if test $gcc_cv_as_cris_no_mul_bug = yes; then
14114
14115cat >>confdefs.h <<\_ACEOF
14116#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14117_ACEOF
14118
8ada417f 14119fi
3a37b08e 14120 ;;
8ada417f 14121
1cb36a98 14122 sparc*-*-*)
ba479fd2
NN
14123 echo "$as_me:$LINENO: checking assembler for .register" >&5
14124echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
14125if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14126 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14127else
8ada417f
ZW
14128 gcc_cv_as_sparc_register_op=no
14129 if test x$gcc_cv_as != x; then
6e3f3080 14130 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
14131 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14133 (eval $ac_try) 2>&5
14134 ac_status=$?
14135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14136 (exit $ac_status); }; }
8ada417f
ZW
14137 then
14138 gcc_cv_as_sparc_register_op=yes
14139 else
14140 echo "configure: failed program was" >&5
14141 cat conftest.s >&5
14142 fi
14143 rm -f conftest.o conftest.s
14144 fi
cafe096b 14145fi
ba479fd2
NN
14146echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
14147echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 14148if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
14149
14150cat >>confdefs.h <<\_ACEOF
1cb36a98 14151#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 14152_ACEOF
1cb36a98 14153
8ada417f 14154fi
1cb36a98 14155
ba479fd2
NN
14156 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
14157echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
14158if test "${gcc_cv_as_sparc_relax+set}" = set; then
14159 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 14160else
8ada417f
ZW
14161 gcc_cv_as_sparc_relax=no
14162 if test x$gcc_cv_as != x; then
6e3f3080 14163 echo '.text' > conftest.s
ba479fd2
NN
14164 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
14165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14166 (eval $ac_try) 2>&5
14167 ac_status=$?
14168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14169 (exit $ac_status); }; }
8ada417f
ZW
14170 then
14171 gcc_cv_as_sparc_relax=yes
14172 else
14173 echo "configure: failed program was" >&5
14174 cat conftest.s >&5
14175 fi
14176 rm -f conftest.o conftest.s
14177 fi
cafe096b 14178fi
ba479fd2
NN
14179echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
14180echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 14181if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
14182
14183cat >>confdefs.h <<\_ACEOF
e95b1e6a 14184#define HAVE_AS_RELAX_OPTION 1
ba479fd2 14185_ACEOF
e95b1e6a 14186
8ada417f 14187fi
e95b1e6a 14188
ba479fd2
NN
14189 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
14190echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
14191if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
14192 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 14193else
8ada417f
ZW
14194 gcc_cv_as_sparc_ua_pcrel=no
14195 if test x$gcc_cv_as != x; then
6e3f3080 14196 echo '.text
8ada417f
ZW
14197foo:
14198 nop
14199.data
14200.align 4
14201.byte 0
14202.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
14203 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14205 (eval $ac_try) 2>&5
14206 ac_status=$?
14207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14208 (exit $ac_status); }; }
8ada417f
ZW
14209 then
14210 if test x$gcc_cv_ld != x \
14211 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
14212 gcc_cv_as_sparc_ua_pcrel=yes
14213 fi
14214 rm -f conftest
14215 else
14216 echo "configure: failed program was" >&5
14217 cat conftest.s >&5
14218 fi
14219 rm -f conftest.o conftest.s
14220 fi
cafe096b 14221fi
ba479fd2
NN
14222echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
14223echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 14224if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
14225
14226cat >>confdefs.h <<\_ACEOF
17e9e88c 14227#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 14228_ACEOF
17e9e88c 14229
17e9e88c 14230
ba479fd2
NN
14231 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
14232echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
14233if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
14234 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 14235else
8ada417f
ZW
14236 gcc_cv_as_sparc_ua_pcrel_hidden=no
14237 if test x$gcc_cv_as != x; then
6e3f3080 14238 echo '.data
8ada417f
ZW
14239.align 4
14240.byte 0x31
14241.uaword %r_disp32(foo)
14242.byte 0x32, 0x33, 0x34
14243.global foo
14244.hidden foo
14245foo:
14246.skip 4' > conftest.s
ba479fd2
NN
14247 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14249 (eval $ac_try) 2>&5
14250 ac_status=$?
14251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14252 (exit $ac_status); }; }
8ada417f
ZW
14253 then
14254 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
14255 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
14256 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
14257 | grep ' 31000000 07323334' > /dev/null 2>&1; then
14258 if $gcc_cv_objdump -R conftest 2> /dev/null \
14259 | grep 'DISP32' > /dev/null 2>&1; then
14260 :
14261 else
14262 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 14263 fi
8ada417f
ZW
14264 fi
14265 rm -f conftest
14266 else
14267 echo "configure: failed program was" >&5
14268 cat conftest.s >&5
14269 fi
14270 rm -f conftest.o conftest.s
14271 fi
cafe096b 14272fi
ba479fd2
NN
14273echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
14274echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 14275if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
14276
14277cat >>confdefs.h <<\_ACEOF
cf7b8b0d 14278#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 14279_ACEOF
cf7b8b0d 14280
8ada417f 14281fi
ba479fd2 14282
8ada417f 14283fi # unaligned pcrel relocs
cf7b8b0d 14284
ba479fd2
NN
14285 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
14286echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
14287if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
14288 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14289else
8ada417f
ZW
14290 gcc_cv_as_sparc_offsetable_lo10=no
14291 if test x$gcc_cv_as != x; then
6e3f3080 14292 echo '.text
8ada417f
ZW
14293 or %g1, %lo(ab) + 12, %g1
14294 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
14295 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
14296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14297 (eval $ac_try) 2>&5
14298 ac_status=$?
14299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14300 (exit $ac_status); }; }
8ada417f
ZW
14301 then
14302 if test x$gcc_cv_objdump != x \
ecb0ccbc 14303 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 14304 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 14305 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
14306 fi
14307 else
14308 echo "configure: failed program was" >&5
14309 cat conftest.s >&5
14310 fi
14311 rm -f conftest.o conftest.s
14312 fi
cafe096b 14313fi
ba479fd2
NN
14314echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
14315echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 14316if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
14317
14318cat >>confdefs.h <<\_ACEOF
1cb36a98 14319#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 14320_ACEOF
1cb36a98 14321
8ada417f 14322fi
1cb36a98
RH
14323 ;;
14324
c307e6dd 14325 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
14326 case $target_os in
14327 cygwin* | pe | mingw32*)
14328 # Used for DWARF 2 in PE
14329 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
14330echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
14331if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
14332 echo $ECHO_N "(cached) $ECHO_C" >&6
14333else
14334 gcc_cv_as_ix86_pe_secrel32=no
14335 if test $in_tree_gas = yes; then
14336 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14337 then gcc_cv_as_ix86_pe_secrel32=yes
14338fi
14339 elif test x$gcc_cv_as != x; then
14340 echo '.text
14341foo: nop
14342.data
14343 .secrel32 foo' > conftest.s
14344 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14346 (eval $ac_try) 2>&5
14347 ac_status=$?
14348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14349 (exit $ac_status); }; }
14350 then
14351 if test x$gcc_cv_ld != x \
14352 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
14353 gcc_cv_as_ix86_pe_secrel32=yes
14354 fi
14355 rm -f conftest
14356 else
14357 echo "configure: failed program was" >&5
14358 cat conftest.s >&5
14359 fi
14360 rm -f conftest.o conftest.s
14361 fi
14362fi
14363echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
14364echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
14365if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
14366
14367cat >>confdefs.h <<\_ACEOF
14368#define HAVE_GAS_PE_SECREL32_RELOC 1
14369_ACEOF
14370
14371fi
14372 ;;
14373 esac
14374
ba479fd2
NN
14375 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
14376echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
14377if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
14378 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14379else
14380 gcc_cv_as_ix86_filds_fists=no
14381 if test $in_tree_gas = yes; then
14382 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
14383 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 14384fi
8ada417f 14385 elif test x$gcc_cv_as != x; then
6e3f3080 14386 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
14387 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14389 (eval $ac_try) 2>&5
14390 ac_status=$?
14391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14392 (exit $ac_status); }; }
8ada417f
ZW
14393 then
14394 gcc_cv_as_ix86_filds_fists=yes
14395 else
14396 echo "configure: failed program was" >&5
14397 cat conftest.s >&5
981d4858 14398 fi
8ada417f
ZW
14399 rm -f conftest.o conftest.s
14400 fi
14401fi
ba479fd2
NN
14402echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
14403echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 14404if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
14405
14406cat >>confdefs.h <<\_ACEOF
8ada417f 14407#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 14408_ACEOF
ad9c4d9f 14409
f6f5dff2
RO
14410fi
14411
ba479fd2
NN
14412 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
14413echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
14414if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
14415 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
14416else
14417 gcc_cv_as_ix86_cmov_sun_syntax=no
14418 if test x$gcc_cv_as != x; then
6e3f3080 14419 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
14420 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14422 (eval $ac_try) 2>&5
14423 ac_status=$?
14424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14425 (exit $ac_status); }; }
f6f5dff2
RO
14426 then
14427 gcc_cv_as_ix86_cmov_sun_syntax=yes
14428 else
14429 echo "configure: failed program was" >&5
14430 cat conftest.s >&5
14431 fi
14432 rm -f conftest.o conftest.s
14433 fi
14434fi
ba479fd2
NN
14435echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
14436echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 14437if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
14438
14439cat >>confdefs.h <<\_ACEOF
f6f5dff2 14440#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 14441_ACEOF
f6f5dff2 14442
ad9c4d9f
NN
14443fi
14444
6f3ca281
ZW
14445 # This one is used unconditionally by i386.[ch]; it is to be defined
14446 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
14447 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
14448echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
14449if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
14450 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14451else
14452 gcc_cv_as_ix86_gotoff_in_data=no
14453 if test $in_tree_gas = yes; then
14454 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14455 then gcc_cv_as_ix86_gotoff_in_data=yes
14456fi
14457 elif test x$gcc_cv_as != x; then
6e3f3080 14458 echo ' .text
f88c65f7
RH
14459.L0:
14460 nop
14461 .data
8ada417f 14462 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
14463 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14465 (eval $ac_try) 2>&5
14466 ac_status=$?
14467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14468 (exit $ac_status); }; }
8ada417f
ZW
14469 then
14470 gcc_cv_as_ix86_gotoff_in_data=yes
14471 else
14472 echo "configure: failed program was" >&5
14473 cat conftest.s >&5
f88c65f7 14474 fi
8ada417f
ZW
14475 rm -f conftest.o conftest.s
14476 fi
14477fi
ba479fd2
NN
14478echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
14479echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 14480
6f3ca281 14481
ba479fd2 14482cat >>confdefs.h <<_ACEOF
6f3ca281 14483#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 14484_ACEOF
f88c65f7 14485
1cb36a98 14486 ;;
ef1ecf87
RH
14487
14488 ia64*-*-*)
ba479fd2
NN
14489 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
14490echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
14491if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
14492 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 14493else
8ada417f
ZW
14494 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
14495 if test $in_tree_gas = yes; then
14496 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14497 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 14498fi
8ada417f 14499 elif test x$gcc_cv_as != x; then
6e3f3080 14500 echo ' .text
ef1ecf87
RH
14501 addl r15 = @ltoffx(x#), gp
14502 ;;
cfa9ee99 14503 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
14504 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14506 (eval $ac_try) 2>&5
14507 ac_status=$?
14508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14509 (exit $ac_status); }; }
8ada417f 14510 then
cfa9ee99 14511 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
14512 else
14513 echo "configure: failed program was" >&5
14514 cat conftest.s >&5
2c4a9cff 14515 fi
8ada417f
ZW
14516 rm -f conftest.o conftest.s
14517 fi
14518fi
ba479fd2
NN
14519echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
14520echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 14521if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
14522
14523cat >>confdefs.h <<\_ACEOF
cfa9ee99 14524#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 14525_ACEOF
8ada417f 14526
cfa9ee99 14527fi
8ada417f 14528
2c4a9cff 14529 ;;
8ada417f 14530
2c4a9cff 14531 powerpc*-*-*)
8ada417f 14532 case $target in
6b37db3c
DE
14533 *-*-aix*) conftest_s=' .csect .text[PR]
14534 mfcr 3,128';;
8af4d362
PB
14535 *-*-darwin*)
14536 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
14537echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
14538if test "${gcc_cv_as_machine_directive+set}" = set; then
14539 echo $ECHO_N "(cached) $ECHO_C" >&6
14540else
14541 gcc_cv_as_machine_directive=no
14542 if test x$gcc_cv_as != x; then
14543 echo ' .machine ppc7400' > conftest.s
14544 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14546 (eval $ac_try) 2>&5
14547 ac_status=$?
14548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14549 (exit $ac_status); }; }
14550 then
14551 gcc_cv_as_machine_directive=yes
14552 else
14553 echo "configure: failed program was" >&5
14554 cat conftest.s >&5
14555 fi
14556 rm -f conftest.o conftest.s
14557 fi
14558fi
14559echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
14560echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
14561
14562 if test x$gcc_cv_as_machine_directive != xyes; then
14563 echo "*** This target requires an assembler supporting \".machine\"" >&2
14564 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
14565 test x$build = x$target && exit 1
14566 fi
14567 conftest_s=' .text
6b37db3c 14568 mfcr r3,128';;
4c67db14 14569 *) conftest_s=' .machine power4
d2ab3e37 14570 .text
6b37db3c 14571 mfcr 3,128';;
8ada417f 14572 esac
8ada417f 14573
ba479fd2
NN
14574 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
14575echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
14576if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
14577 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 14578else
8ada417f
ZW
14579 gcc_cv_as_powerpc_mfcrf=no
14580 if test $in_tree_gas = yes; then
14581 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14582 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 14583fi
8ada417f 14584 elif test x$gcc_cv_as != x; then
6e3f3080 14585 echo "$conftest_s" > conftest.s
ba479fd2
NN
14586 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14588 (eval $ac_try) 2>&5
14589 ac_status=$?
14590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14591 (exit $ac_status); }; }
8ada417f
ZW
14592 then
14593 gcc_cv_as_powerpc_mfcrf=yes
14594 else
14595 echo "configure: failed program was" >&5
14596 cat conftest.s >&5
14597 fi
14598 rm -f conftest.o conftest.s
14599 fi
2c4a9cff 14600fi
ba479fd2
NN
14601echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
14602echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 14603if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
14604
14605cat >>confdefs.h <<\_ACEOF
2c4a9cff 14606#define HAVE_AS_MFCRF 1
ba479fd2 14607_ACEOF
ef1ecf87 14608
8ada417f
ZW
14609fi
14610 ;;
14611
14612 mips*-*-*)
ba479fd2
NN
14613 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14614echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14615if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
14616 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14617else
14618 gcc_cv_as_mips_explicit_relocs=no
14619 if test $in_tree_gas = yes; then
14620 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14621 then gcc_cv_as_mips_explicit_relocs=yes
14622fi
14623 elif test x$gcc_cv_as != x; then
6e3f3080 14624 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
14625 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14627 (eval $ac_try) 2>&5
14628 ac_status=$?
14629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14630 (exit $ac_status); }; }
8ada417f
ZW
14631 then
14632 gcc_cv_as_mips_explicit_relocs=yes
14633 else
14634 echo "configure: failed program was" >&5
14635 cat conftest.s >&5
ef1ecf87 14636 fi
8ada417f
ZW
14637 rm -f conftest.o conftest.s
14638 fi
14639fi
ba479fd2
NN
14640echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
14641echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
14642if test $gcc_cv_as_mips_explicit_relocs = yes; then
14643 if test x$target_cpu_default = x
14644 then target_cpu_default=MASK_EXPLICIT_RELOCS
14645 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
14646 fi
14647fi
14648
82563d35
RS
14649 if test x$gas_flag = xyes \
14650 || test x"$host" != x"$build" \
14651 || test ! -x "$gcc_cv_as" \
14652 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
14653 :
14654 else
14655 echo "*** This configuration requires the GNU assembler" >&2
14656 exit 1
14657 fi
ef1ecf87 14658 ;;
1cb36a98 14659esac
9d147085
RH
14660# ??? Not all targets support dwarf2 debug_line, even within a version
14661# of gas. Moreover, we need to emit a valid instruction to trigger any
14662# info to the output file. So, as supported targets are added to gas 2.11,
14663# add some instruction here to (also) show we expect this might work.
14664# ??? Once 2.11 is released, probably need to add first known working
14665# version to the per-target configury.
14666case "$target" in
80486e06 14667 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 14668 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
d116bdf8 14669 | xstormy16*-*-* | cris-*-* | xtensa-*-*)
9d147085
RH
14670 insn="nop"
14671 ;;
57116d8d 14672 ia64*-*-* | s390*-*-*)
9d147085
RH
14673 insn="nop 0"
14674 ;;
2853bc5a
HPN
14675 mmix-*-*)
14676 insn="swym 0"
14677 ;;
8ada417f
ZW
14678esac
14679if test x"$insn" != x; then
14680 conftest_s="\
14681 .file 1 \"conftest.s\"
14682 .loc 1 3 0
14683 $insn"
ba479fd2
NN
14684 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
14685echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
14686if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
14687 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14688else
14689 gcc_cv_as_dwarf2_debug_line=no
14690 if test $in_tree_gas = yes; then
14691 if test $in_tree_gas_is_elf = yes \
14692 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14693 then gcc_cv_as_dwarf2_debug_line=yes
14694fi
14695 elif test x$gcc_cv_as != x; then
6e3f3080 14696 echo "$conftest_s" > conftest.s
ba479fd2
NN
14697 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14699 (eval $ac_try) 2>&5
14700 ac_status=$?
14701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14702 (exit $ac_status); }; }
8ada417f 14703 then
080a5bb0
EB
14704 if test x$gcc_cv_objdump != x \
14705 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
14706 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
14707 gcc_cv_as_dwarf2_debug_line=yes
14708 fi
14709 else
14710 echo "configure: failed program was" >&5
14711 cat conftest.s >&5
14712 fi
14713 rm -f conftest.o conftest.s
14714 fi
14715fi
ba479fd2
NN
14716echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
14717echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 14718
ad9c4d9f 14719
8ada417f
ZW
14720# The .debug_line file table must be in the exact order that
14721# we specified the files, since these indices are also used
14722# by DW_AT_decl_file. Approximate this test by testing if
14723# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
14724 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
14725echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
14726if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
14727 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14728else
14729 gcc_cv_as_dwarf2_file_buggy=no
14730 if test x$gcc_cv_as != x; then
6e3f3080 14731 echo ' .file 1 "foo.s"
8ada417f 14732 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
14733 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14735 (eval $ac_try) 2>&5
14736 ac_status=$?
14737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14738 (exit $ac_status); }; }
8ada417f
ZW
14739 then
14740 gcc_cv_as_dwarf2_file_buggy=yes
14741 else
14742 echo "configure: failed program was" >&5
14743 cat conftest.s >&5
14744 fi
14745 rm -f conftest.o conftest.s
14746 fi
ad9c4d9f 14747fi
ba479fd2
NN
14748echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
14749echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
14750
14751
14752 if test $gcc_cv_as_dwarf2_debug_line = yes \
14753 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
14754
14755cat >>confdefs.h <<\_ACEOF
9d147085 14756#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 14757_ACEOF
9d147085 14758
8ada417f 14759 fi
ad9c4d9f 14760
ba479fd2
NN
14761 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
14762echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
14763if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
14764 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14765else
14766 gcc_cv_as_gdwarf2_flag=no
14767 if test $in_tree_gas = yes; then
14768 if test $in_tree_gas_is_elf = yes \
14769 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14770 then gcc_cv_as_gdwarf2_flag=yes
14771fi
14772 elif test x$gcc_cv_as != x; then
6e3f3080 14773 echo "$insn" > conftest.s
ba479fd2
NN
14774 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
14775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14776 (eval $ac_try) 2>&5
14777 ac_status=$?
14778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14779 (exit $ac_status); }; }
8ada417f
ZW
14780 then
14781 gcc_cv_as_gdwarf2_flag=yes
14782 else
14783 echo "configure: failed program was" >&5
14784 cat conftest.s >&5
14785 fi
14786 rm -f conftest.o conftest.s
14787 fi
ad9c4d9f 14788fi
ba479fd2
NN
14789echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
14790echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 14791if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
14792
14793cat >>confdefs.h <<\_ACEOF
5f0e9ea2 14794#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 14795_ACEOF
5f0e9ea2
GK
14796
14797fi
ad9c4d9f 14798
ba479fd2
NN
14799 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
14800echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
14801if test "${gcc_cv_as_gstabs_flag+set}" = set; then
14802 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14803else
14804 gcc_cv_as_gstabs_flag=no
14805 if test $in_tree_gas = yes; then
14806 if test $in_tree_gas_is_elf = yes \
14807 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14808 then gcc_cv_as_gstabs_flag=yes
14809fi
14810 elif test x$gcc_cv_as != x; then
6e3f3080 14811 echo "$insn" > conftest.s
ba479fd2
NN
14812 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
14813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14814 (eval $ac_try) 2>&5
14815 ac_status=$?
14816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14817 (exit $ac_status); }; }
8ada417f
ZW
14818 then
14819 # The native Solaris 9/Intel assembler doesn't understand --gstabs
14820 # and warns about it, but still exits successfully. So check for
14821 # this.
ba479fd2
NN
14822 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
14823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14824 (eval $ac_try) 2>&5
14825 ac_status=$?
14826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14827 (exit $ac_status); }; }
8ada417f
ZW
14828 then :
14829 else gcc_cv_as_gstabs_flag=yes
14830 fi
14831 else
14832 echo "configure: failed program was" >&5
14833 cat conftest.s >&5
14834 fi
14835 rm -f conftest.o conftest.s
14836 fi
ad9c4d9f 14837fi
ba479fd2
NN
14838echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
14839echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 14840if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
14841
14842cat >>confdefs.h <<\_ACEOF
5f0e9ea2 14843#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 14844_ACEOF
5f0e9ea2
GK
14845
14846fi
8ada417f 14847fi
5f0e9ea2 14848
ba479fd2
NN
14849echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
14850echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 14851gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 14852if test $in_tree_ld = yes ; then
5408ac6c
HPN
14853 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 \
14854 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
14855 gcc_cv_ld_ro_rw_mix=read-write
14856 fi
14857elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
14858 echo '.section myfoosect, "a"' > conftest1.s
14859 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 14860 echo '.byte 1' >> conftest2.s
90e145da 14861 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 14862 echo '.byte 0' >> conftest3.s
6cd656d0
KC
14863 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
14864 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
14865 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 14866 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 14867 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 14868 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 14869 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
14870 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
14871 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
14872 gcc_cv_ld_ro_rw_mix=read-only
14873 else
14874 gcc_cv_ld_ro_rw_mix=read-write
14875 fi
14876 fi
14877 fi
14878 rm -f conftest.* conftest[123].*
14879fi
14880if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
14881
14882cat >>confdefs.h <<\_ACEOF
96d0f4dc 14883#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 14884_ACEOF
96d0f4dc
JJ
14885
14886fi
ba479fd2
NN
14887echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
14888echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 14889
ba479fd2
NN
14890echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
14891echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 14892gcc_cv_ld_eh_frame_hdr=no
34a86c2b 14893if test $in_tree_ld = yes ; then
5408ac6c
HPN
14894 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 \
14895 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
14896 gcc_cv_ld_eh_frame_hdr=yes
14897 fi
14898elif test x$gcc_cv_ld != x; then
14899 # Check if linker supports --eh-frame-hdr option
14900 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
14901 gcc_cv_ld_eh_frame_hdr=yes
14902 fi
14903fi
14904if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
14905
14906cat >>confdefs.h <<\_ACEOF
275b60d6 14907#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 14908_ACEOF
275b60d6
JJ
14909
14910fi
ba479fd2
NN
14911echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
14912echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 14913
ba479fd2
NN
14914echo "$as_me:$LINENO: checking linker position independent executable support" >&5
14915echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
14916gcc_cv_ld_pie=no
14917if test $in_tree_ld = yes ; then
5408ac6c
HPN
14918 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 \
14919 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
14920 gcc_cv_ld_pie=yes
14921 fi
14922elif test x$gcc_cv_ld != x; then
14923 # Check if linker supports -pie option
14924 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
14925 gcc_cv_ld_pie=yes
14926 fi
14927fi
14928if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
14929
14930cat >>confdefs.h <<\_ACEOF
24a4dd31 14931#define HAVE_LD_PIE 1
ba479fd2 14932_ACEOF
24a4dd31
JJ
14933
14934fi
ba479fd2
NN
14935echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
14936echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 14937
8bb915b6
NN
14938# --------
14939# UNSORTED
14940# --------
14941
765f1bf9
AM
14942echo "$as_me:$LINENO: checking linker --as-needed support" >&5
14943echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
14944if test "${gcc_cv_ld_as_needed+set}" = set; then
14945 echo $ECHO_N "(cached) $ECHO_C" >&6
14946else
14947 gcc_cv_ld_as_needed=no
765f1bf9
AM
14948if test $in_tree_ld = yes ; then
14949 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 \
14950 && test $in_tree_ld_is_elf = yes; then
14951 gcc_cv_ld_as_needed=yes
14952 fi
14953elif test x$gcc_cv_ld != x; then
14954 # Check if linker supports --as-needed and --no-as-needed options
14955 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
14956 gcc_cv_ld_as_needed=yes
14957 fi
14958fi
82e923f6
RS
14959
14960fi
14961echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
14962echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
14963if test x"$gcc_cv_ld_as_needed" = xyes; then
14964
14965cat >>confdefs.h <<\_ACEOF
14966#define HAVE_LD_AS_NEEDED 1
14967_ACEOF
14968
14969fi
765f1bf9 14970
85b776df
AM
14971case "$target" in
14972 powerpc64*-*-linux*)
14973 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
14974echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
14975if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
14976 echo $ECHO_N "(cached) $ECHO_C" >&6
14977else
14978 gcc_cv_ld_no_dot_syms=no
14979 if test $in_tree_ld = yes ; then
14980 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
14981 gcc_cv_ld_no_dot_syms=yes
14982 fi
14983 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
14984 cat > conftest1.s <<EOF
14985 .text
14986 bl .foo
14987EOF
14988 cat > conftest2.s <<EOF
14989 .section ".opd","aw"
14990 .align 3
14991 .globl foo
14992 .type foo,@function
14993foo:
14994 .quad .LEfoo,.TOC.@tocbase,0
14995 .text
14996.LEfoo:
14997 blr
14998 .size foo,.-.LEfoo
14999EOF
15000 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
15001 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
15002 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
15003 gcc_cv_ld_no_dot_syms=yes
15004 fi
15005 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
15006 fi
15007
15008fi
15009echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
15010echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
15011 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
15012
15013cat >>confdefs.h <<\_ACEOF
15014#define HAVE_LD_NO_DOT_SYMS 1
15015_ACEOF
15016
15017 fi
15018 ;;
15019esac
15020
9fb28a67 15021if test x$with_sysroot = x && test x$host = x$target \
047d636f 15022 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
15023
15024cat >>confdefs.h <<_ACEOF
793e9558 15025#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 15026_ACEOF
793e9558
PB
15027
15028fi
15029
81bf3d9e 15030# Find out what GC implementation we want, or may, use.
ba479fd2 15031
81bf3d9e
RH
15032# Check whether --with-gc or --without-gc was given.
15033if test "${with_gc+set}" = set; then
15034 withval="$with_gc"
15035 case "$withval" in
59415997 15036 page | zone)
81bf3d9e
RH
15037 GGC=ggc-$withval
15038 ;;
15039 *)
ba479fd2
NN
15040 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
15041echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
15042 { (exit 1); exit 1; }; }
81bf3d9e
RH
15043 ;;
15044esac
15045else
005537df 15046 GGC=ggc-page
ba479fd2 15047fi;
81bf3d9e
RH
15048
15049echo "Using $GGC for garbage collection."
15050
3c809ba4 15051# Use the system's zlib library.
b8dad04b
ZW
15052zlibdir=-L../zlib
15053zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 15054
3c809ba4
AG
15055# Check whether --with-system-zlib or --without-system-zlib was given.
15056if test "${with_system_zlib+set}" = set; then
15057 withval="$with_system_zlib"
15058 zlibdir=
15059zlibinc=
15060
ba479fd2 15061fi;
3c809ba4
AG
15062
15063
15064
dc6746e7 15065
ba479fd2
NN
15066echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
15067echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
15068 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
15069if test "${enable_maintainer_mode+set}" = set; then
15070 enableval="$enable_maintainer_mode"
15071 maintainer_mode=$enableval
15072else
15073 maintainer_mode=no
ba479fd2 15074fi;
63cf211a 15075
ba479fd2
NN
15076echo "$as_me:$LINENO: result: $maintainer_mode" >&5
15077echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
15078
15079if test "$maintainer_mode" = "yes"; then
15080 MAINT=''
15081else
15082 MAINT='#'
15083fi
15084
8bb915b6
NN
15085# --------------
15086# Language hooks
15087# --------------
15088
861bb6c1
JL
15089# Make empty files to contain the specs and options for each language.
15090# Then add #include lines to for a compiler that has specs and/or options.
15091
d7b42618 15092lang_opt_files=
861bb6c1 15093lang_specs_files=
3103b7db 15094lang_tree_files=
861bb6c1
JL
15095for subdir in . $subdirs
15096do
d7b42618
NB
15097 if test -f $srcdir/$subdir/lang.opt; then
15098 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
15099 fi
75bffa71 15100 if test -f $srcdir/$subdir/lang-specs.h; then
0d24f4d1 15101 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
861bb6c1 15102 fi
3103b7db 15103 if test -f $srcdir/$subdir/$subdir-tree.def; then
0d24f4d1 15104 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
3103b7db 15105 fi
861bb6c1
JL
15106done
15107
15108# These (without "all_") are set in each config-lang.in.
15109# `language' must be a single word so is spelled singularly.
15110all_languages=
15111all_boot_languages=
15112all_compilers=
15113all_stagestuff=
53c7ffe7 15114all_outputs='Makefile gccbug mklibgcc libada-mk'
861bb6c1 15115# List of language makefile fragments.
2ed26f6b
ZW
15116all_lang_makefrags=
15117# List of language subdirectory makefiles. Deprecated.
861bb6c1 15118all_lang_makefiles=
e2500fed 15119# Files for gengtype
ef69da62 15120all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
15121# Files for gengtype with language
15122all_gtfiles_files_langs=
15123all_gtfiles_files_files=
861bb6c1
JL
15124
15125# Add the language fragments.
15126# Languages are added via two mechanisms. Some information must be
15127# recorded in makefile variables, these are defined in config-lang.in.
15128# We accumulate them and plug them into the main Makefile.
15129# The other mechanism is a set of hooks for each of the main targets
15130# like `clean', `install', etc.
15131
861bb6c1 15132language_hooks="Make-hooks"
861bb6c1 15133
c406e779 15134for s in $subdirs
861bb6c1 15135do
861bb6c1
JL
15136 language=
15137 boot_language=
15138 compilers=
15139 stagestuff=
861bb6c1 15140 outputs=
e2500fed 15141 gtfiles=
861bb6c1 15142 . ${srcdir}/$s/config-lang.in
75bffa71 15143 if test "x$language" = x
861bb6c1
JL
15144 then
15145 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
15146 exit 1
15147 fi
2ed26f6b 15148 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
72aaffbd 15149 if test -f ${srcdir}/$s/Makefile.in
2ed26f6b 15150 then all_lang_makefiles="$s/Makefile"
72aaffbd 15151 fi
861bb6c1 15152 all_languages="$all_languages $language"
75bffa71 15153 if test "x$boot_language" = xyes
861bb6c1
JL
15154 then
15155 all_boot_languages="$all_boot_languages $language"
15156 fi
15157 all_compilers="$all_compilers $compilers"
15158 all_stagestuff="$all_stagestuff $stagestuff"
861bb6c1 15159 all_outputs="$all_outputs $outputs"
e2500fed 15160 all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15161 for f in $gtfiles
8ac9d31f 15162 do
8ac9d31f
TJ
15163 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
15164 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f 15165 done
861bb6c1
JL
15166done
15167
8ac9d31f
TJ
15168# Pick up gtfiles for c
15169gtfiles=
15170s="c"
15171. ${srcdir}/c-config-lang.in
15172all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15173for f in $gtfiles
8ac9d31f 15174do
8ac9d31f
TJ
15175 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
15176 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
15177done
15178
cbc59f01 15179check_languages=
c406e779 15180for language in $all_languages
cbc59f01 15181do
cbc59f01 15182 check_languages="$check_languages check-$language"
cbc59f01
DD
15183done
15184
62b81e45
MM
15185# We link each language in with a set of hooks, reached indirectly via
15186# lang.${target}.
861bb6c1
JL
15187
15188rm -f Make-hooks
15189touch Make-hooks
65ebbf81 15190target_list="all.build all.cross start.encap rest.encap tags \
a207b594 15191 install-normal install-common install-man \
a541f69d 15192 uninstall info man srcextra srcman srcinfo \
a03ad584 15193 mostlyclean clean distclean maintainer-clean \
8f231b5d 15194 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
861bb6c1
JL
15195for t in $target_list
15196do
15197 x=
c406e779 15198 for lang in $all_languages
861bb6c1 15199 do
ab87f8c8 15200 x="$x $lang.$t"
861bb6c1
JL
15201 done
15202 echo "lang.$t: $x" >> Make-hooks
15203done
15204
8bb915b6
NN
15205# --------
15206# UNSORTED
15207# --------
15208
cc06d68c 15209# Create .gdbinit.
861bb6c1 15210
cc06d68c
GP
15211echo "dir ." > .gdbinit
15212echo "dir ${srcdir}" >> .gdbinit
15213if test x$gdb_needs_out_file_path = xyes
15214then
15215 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
15216fi
15217if test "x$subdirs" != x; then
15218 for s in $subdirs
15219 do
15220 echo "dir ${srcdir}/$s" >> .gdbinit
15221 done
861bb6c1 15222fi
cc06d68c 15223echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 15224
8f8d3278
NC
15225# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
15226# absolute path for gcc_tooldir based on inserting the number of up-directory
15227# movements required to get from $(exec_prefix) to $(prefix) into the basic
15228# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
15229# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
15230# make and thus we'd get different behavior depending on where we built the
15231# sources.
5949a9fc 15232if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 15233 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 15234else
8f8d3278
NC
15235# An explanation of the sed strings:
15236# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
15237# -e 's|/$||' match a trailing forward slash and eliminates it
15238# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 15239# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
15240#
15241# (*) Note this pattern overwrites the first character of the string
15242# with a forward slash if one is not already present. This is not a
15243# problem because the exact names of the sub-directories concerned is
15244# unimportant, just the number of them matters.
15245#
15246# The practical upshot of these patterns is like this:
15247#
15248# prefix exec_prefix result
15249# ------ ----------- ------
15250# /foo /foo/bar ../
15251# /foo/ /foo/bar ../
15252# /foo /foo/bar/ ../
15253# /foo/ /foo/bar/ ../
15254# /foo /foo/bar/ugg ../../
15255#
4c112cda 15256 dollar='$$'
caa55b1e 15257 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
15258fi
15259
15260
2ce3c6c6 15261
2bbea3a6
RH
15262# Find a directory in which to install a shared libgcc.
15263
15264# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
15265if test "${enable_version_specific_runtime_libs+set}" = set; then
15266 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
15267
15268fi;
2bbea3a6
RH
15269
15270
5b15f277
RH
15271# Check whether --with-slibdir or --without-slibdir was given.
15272if test "${with_slibdir+set}" = set; then
15273 withval="$with_slibdir"
15274 slibdir="$with_slibdir"
15275else
15276 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 15277 slibdir='$(libsubdir)'
5b15f277 15278elif test "$host" != "$target"; then
2bbea3a6
RH
15279 slibdir='$(build_tooldir)/lib'
15280else
5b15f277 15281 slibdir='$(libdir)'
2bbea3a6 15282fi
ba479fd2 15283fi;
2bbea3a6
RH
15284
15285
1e6347d8 15286objdir=`${PWDCMD-pwd}`
7e717196
JL
15287
15288
861bb6c1
JL
15289# Substitute configuration variables
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
9b16d2c4 15336
e9a25f70 15337
6e26218f 15338
c8724862 15339
e061d1ce 15340
d8bb17c8 15341
11642c3a
ZW
15342
15343
15344
15345
15346
15347
15348
3d9d2476 15349
8ac9d31f 15350
4c4a5bbc 15351
4c4a5bbc
L
15352
15353
15354if test x"$SET_GCC_LIB_PATH_CMD" != x; then
15355 # SET_GCC_LIB_PATH_CMD is "XXX=path; export XXX;". It is expanded to
15356 #
15357 # eval "set_gcc_lib_path=XXX=path; export XXX;"
15358 #
15359 eval "set_gcc_lib_path=$SET_GCC_LIB_PATH_CMD"
15360 # It will set set_gcc_lib_path to "export XXX=path" for GNU make.
15361 set_gcc_lib_path="export $set_gcc_lib_path"
15362else
15363 set_gcc_lib_path=
15364fi
e2500fed 15365
51b9ff45 15366
861bb6c1 15367
6e3f3080
NN
15368# Echo link setup.
15369if test x${build} = x${host} ; then
15370 if test x${host} = x${target} ; then
15371 echo "Links are now set up to build a native compiler for ${target}." 1>&2
15372 else
15373 echo "Links are now set up to build a cross-compiler" 1>&2
15374 echo " from ${host} to ${target}." 1>&2
15375 fi
15376else
15377 if test x${host} = x${target} ; then
15378 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
15379 echo " for ${target}." 1>&2
15380 else
15381 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
15382 echo " from ${host} to ${target}." 1>&2
15383 fi
15384fi
15385
6de9cd9a
DN
15386
15387
15388
6e3f3080
NN
15389# Configure the subdirectories
15390# AC_CONFIG_SUBDIRS($subdirs)
15391
15392# Create the Makefile
15393# and configure language subdirectories
ba479fd2 15394 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
15395
15396
ba479fd2 15397 ac_config_commands="$ac_config_commands default"
914c5af7 15398
ba479fd2 15399cat >confcache <<\_ACEOF
6e3f3080
NN
15400# This file is a shell script that caches the results of configure
15401# tests run on this system so they can be shared between configure
ba479fd2
NN
15402# scripts and configure runs, see configure's option --config-cache.
15403# It is not useful on other systems. If it contains results you don't
15404# want to keep, you may remove or edit it.
6e3f3080 15405#
ba479fd2
NN
15406# config.status only pays attention to the cache file if you give it
15407# the --recheck option to rerun configure.
6e3f3080 15408#
ba479fd2
NN
15409# `ac_cv_env_foo' variables (set or unset) will be overridden when
15410# loading this file, other *unset* `ac_cv_foo' will be assigned the
15411# following values.
15412
15413_ACEOF
15414
6e3f3080
NN
15415# The following way of writing the cache mishandles newlines in values,
15416# but we know of no workaround that is simple, portable, and efficient.
15417# So, don't put newlines in cache variables' values.
15418# Ultrix sh set writes to stderr and can't be redirected directly,
15419# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
15420{
15421 (set) 2>&1 |
15422 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15423 *ac_space=\ *)
15424 # `set' does not quote correctly, so add quotes (double-quote
15425 # substitution turns \\\\ into \\, and sed turns \\ into \).
15426 sed -n \
86da66b5
HPN
15427 "s/'/'\\\\''/g;
15428 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ba479fd2
NN
15429 ;;
15430 *)
15431 # `set' quotes correctly as required by POSIX, so do not add quotes.
15432 sed -n \
86da66b5 15433 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
15434 ;;
15435 esac;
15436} |
15437 sed '
15438 t clear
15439 : clear
15440 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15441 t end
15442 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15443 : end' >>confcache
15444if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 15445 if test -w $cache_file; then
ba479fd2
NN
15446 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15447 cat confcache >$cache_file
6e3f3080
NN
15448 else
15449 echo "not updating unwritable cache $cache_file"
15450 fi
15451fi
15452rm -f confcache
15453
15454test "x$prefix" = xNONE && prefix=$ac_default_prefix
15455# Let make expand exec_prefix.
15456test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15457
ba479fd2
NN
15458# VPATH may cause trouble with some makes, so we remove $(srcdir),
15459# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15460# trailing colons and then remove the whole line if VPATH becomes empty
15461# (actually we leave an empty line to preserve line numbers).
6e3f3080 15462if test "x$srcdir" = x.; then
86da66b5 15463 ac_vpsub='/^[ ]*VPATH[ ]*=/{
ba479fd2
NN
15464s/:*\$(srcdir):*/:/;
15465s/:*\${srcdir}:*/:/;
15466s/:*@srcdir@:*/:/;
86da66b5 15467s/^\([^=]*=[ ]*\):*/\1/;
ba479fd2 15468s/:*$//;
86da66b5 15469s/^[^=]*=[ ]*$//;
ba479fd2 15470}'
6e3f3080
NN
15471fi
15472
63cf211a 15473DEFS=-DHAVE_CONFIG_H
6e3f3080 15474
ba479fd2
NN
15475ac_libobjs=
15476ac_ltlibobjs=
15477for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15478 # 1. Remove the extension, and $U if already installed.
15479 ac_i=`echo "$ac_i" |
86da66b5 15480 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
ba479fd2
NN
15481 # 2. Add them.
15482 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
15483 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
15484done
15485LIBOBJS=$ac_libobjs
63cf211a 15486
ba479fd2
NN
15487LTLIBOBJS=$ac_ltlibobjs
15488
15489
15490
15491: ${CONFIG_STATUS=./config.status}
15492ac_clean_files_save=$ac_clean_files
15493ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15494{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15495echo "$as_me: creating $CONFIG_STATUS" >&6;}
15496cat >$CONFIG_STATUS <<_ACEOF
15497#! $SHELL
15498# Generated by $as_me.
6e3f3080
NN
15499# Run this file to recreate the current configuration.
15500# Compiler output produced by configure, useful for debugging
ba479fd2 15501# configure, is in config.log if it exists.
6e3f3080 15502
ba479fd2
NN
15503debug=false
15504ac_cs_recheck=false
15505ac_cs_silent=false
15506SHELL=\${CONFIG_SHELL-$SHELL}
15507_ACEOF
15508
15509cat >>$CONFIG_STATUS <<\_ACEOF
15510## --------------------- ##
15511## M4sh Initialization. ##
15512## --------------------- ##
15513
15514# Be Bourne compatible
15515if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15516 emulate sh
15517 NULLCMD=:
15518 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
15519 # is contrary to our usage. Disable this feature.
15520 alias -g '${1+"$@"}'='"$@"'
15521elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15522 set -o posix
15523fi
86da66b5 15524DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
15525
15526# Support unset when possible.
86da66b5 15527if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
15528 as_unset=unset
15529else
15530 as_unset=false
15531fi
15532
15533
15534# Work around bugs in pre-3.0 UWIN ksh.
15535$as_unset ENV MAIL MAILPATH
15536PS1='$ '
15537PS2='> '
15538PS4='+ '
15539
15540# NLS nuisances.
15541for as_var in \
15542 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
15543 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
15544 LC_TELEPHONE LC_TIME
6e3f3080 15545do
86da66b5 15546 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
15547 eval $as_var=C; export $as_var
15548 else
15549 $as_unset $as_var
15550 fi
6e3f3080
NN
15551done
15552
ba479fd2
NN
15553# Required to use basename.
15554if expr a : '\(a\)' >/dev/null 2>&1; then
15555 as_expr=expr
15556else
15557 as_expr=false
15558fi
6e3f3080 15559
ba479fd2
NN
15560if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
15561 as_basename=basename
15562else
15563 as_basename=false
15564fi
6e3f3080
NN
15565
15566
ba479fd2
NN
15567# Name of the executable.
15568as_me=`$as_basename "$0" ||
15569$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15570 X"$0" : 'X\(//\)$' \| \
15571 X"$0" : 'X\(/\)$' \| \
15572 . : '\(.\)' 2>/dev/null ||
15573echo X/"$0" |
15574 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15575 /^X\/\(\/\/\)$/{ s//\1/; q; }
15576 /^X\/\(\/\).*/{ s//\1/; q; }
15577 s/.*/./; q'`
15578
6e3f3080 15579
ba479fd2
NN
15580# PATH needs CR, and LINENO needs CR and PATH.
15581# Avoid depending upon Character Ranges.
15582as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15583as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15584as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15585as_cr_digits='0123456789'
15586as_cr_alnum=$as_cr_Letters$as_cr_digits
15587
15588# The user is always right.
15589if test "${PATH_SEPARATOR+set}" != set; then
15590 echo "#! /bin/sh" >conf$$.sh
15591 echo "exit 0" >>conf$$.sh
15592 chmod +x conf$$.sh
15593 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
15594 PATH_SEPARATOR=';'
6e3f3080 15595 else
ba479fd2
NN
15596 PATH_SEPARATOR=:
15597 fi
15598 rm -f conf$$.sh
15599fi
15600
15601
15602 as_lineno_1=$LINENO
15603 as_lineno_2=$LINENO
15604 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15605 test "x$as_lineno_1" != "x$as_lineno_2" &&
15606 test "x$as_lineno_3" = "x$as_lineno_2" || {
15607 # Find who we are. Look in the path if we contain no path at all
15608 # relative or not.
15609 case $0 in
15610 *[\\/]* ) as_myself=$0 ;;
15611 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15612for as_dir in $PATH
15613do
15614 IFS=$as_save_IFS
15615 test -z "$as_dir" && as_dir=.
15616 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15617done
15618
15619 ;;
15620 esac
15621 # We did not find ourselves, most probably we were run as `sh COMMAND'
15622 # in which case we are not to be found in the path.
15623 if test "x$as_myself" = x; then
15624 as_myself=$0
15625 fi
15626 if test ! -f "$as_myself"; then
15627 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
15628echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
15629 { (exit 1); exit 1; }; }
6e3f3080 15630 fi
ba479fd2
NN
15631 case $CONFIG_SHELL in
15632 '')
15633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15634for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
15635do
15636 IFS=$as_save_IFS
15637 test -z "$as_dir" && as_dir=.
15638 for as_base in sh bash ksh sh5; do
15639 case $as_dir in
15640 /*)
15641 if ("$as_dir/$as_base" -c '
15642 as_lineno_1=$LINENO
15643 as_lineno_2=$LINENO
15644 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15645 test "x$as_lineno_1" != "x$as_lineno_2" &&
15646 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
15647 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
15648 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
15649 CONFIG_SHELL=$as_dir/$as_base
15650 export CONFIG_SHELL
15651 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
15652 fi;;
15653 esac
15654 done
15655done
15656;;
15657 esac
15658
15659 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
15660 # uniformly replaced by the line number. The first 'sed' inserts a
15661 # line-number line before each line; the second 'sed' does the real
15662 # work. The second script uses 'N' to pair each line-number line
15663 # with the numbered line, and appends trailing '-' during
15664 # substitution so that $LINENO is not a special case at line end.
15665 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
15666 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
15667 sed '=' <$as_myself |
15668 sed '
15669 N
15670 s,$,-,
15671 : loop
15672 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
15673 t loop
15674 s,-$,,
15675 s,^['$as_cr_digits']*\n,,
15676 ' >$as_me.lineno &&
15677 chmod +x $as_me.lineno ||
15678 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
15679echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
15680 { (exit 1); exit 1; }; }
15681
15682 # Don't try to exec as it changes $[0], causing all sort of problems
15683 # (the dirname of $[0] is not the place where we might find the
15684 # original and so on. Autoconf is especially sensible to this).
15685 . ./$as_me.lineno
15686 # Exit status is that of the last command.
15687 exit
15688}
15689
15690
15691case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
15692 *c*,-n*) ECHO_N= ECHO_C='
15693' ECHO_T=' ' ;;
15694 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
15695 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
15696esac
15697
15698if expr a : '\(a\)' >/dev/null 2>&1; then
15699 as_expr=expr
15700else
15701 as_expr=false
15702fi
15703
15704rm -f conf$$ conf$$.exe conf$$.file
15705echo >conf$$.file
15706if ln -s conf$$.file conf$$ 2>/dev/null; then
15707 # We could just check for DJGPP; but this test a) works b) is more generic
15708 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15709 if test -f conf$$.exe; then
15710 # Don't use ln at all; we don't have any links
15711 as_ln_s='cp -p'
6e3f3080 15712 else
ba479fd2 15713 as_ln_s='ln -s'
6e3f3080 15714 fi
ba479fd2
NN
15715elif ln conf$$.file conf$$ 2>/dev/null; then
15716 as_ln_s=ln
15717else
15718 as_ln_s='cp -p'
15719fi
15720rm -f conf$$ conf$$.exe conf$$.file
15721
15722if mkdir -p . 2>/dev/null; then
15723 as_mkdir_p=:
15724else
86da66b5 15725 test -d ./-p && rmdir ./-p
ba479fd2
NN
15726 as_mkdir_p=false
15727fi
15728
15729as_executable_p="test -f"
15730
15731# Sed expression to map a string onto a valid CPP name.
86da66b5 15732as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
15733
15734# Sed expression to map a string onto a valid variable name.
86da66b5 15735as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
15736
15737
15738# IFS
15739# We need space, tab and new line, in precisely that order.
15740as_nl='
15741'
15742IFS=" $as_nl"
15743
15744# CDPATH.
15745$as_unset CDPATH
15746
15747exec 6>&1
15748
15749# Open the log real soon, to keep \$[0] and so on meaningful, and to
15750# report actual input values of CONFIG_FILES etc. instead of their
15751# values after options handling. Logging --version etc. is OK.
15752exec 5>>config.log
15753{
15754 echo
15755 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15756## Running $as_me. ##
15757_ASBOX
15758} >&5
15759cat >&5 <<_CSEOF
15760
15761This file was extended by $as_me, which was
8ab705be 15762generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
15763
15764 CONFIG_FILES = $CONFIG_FILES
15765 CONFIG_HEADERS = $CONFIG_HEADERS
15766 CONFIG_LINKS = $CONFIG_LINKS
15767 CONFIG_COMMANDS = $CONFIG_COMMANDS
15768 $ $0 $@
15769
15770_CSEOF
15771echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
15772echo >&5
15773_ACEOF
15774
15775# Files that config.status was made for.
15776if test -n "$ac_config_files"; then
15777 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15778fi
15779
15780if test -n "$ac_config_headers"; then
15781 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15782fi
15783
15784if test -n "$ac_config_links"; then
15785 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15786fi
15787
15788if test -n "$ac_config_commands"; then
15789 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15790fi
15791
15792cat >>$CONFIG_STATUS <<\_ACEOF
15793
15794ac_cs_usage="\
15795\`$as_me' instantiates files from templates according to the
15796current configuration.
15797
15798Usage: $0 [OPTIONS] [FILE]...
15799
15800 -h, --help print this help, then exit
15801 -V, --version print version number, then exit
15802 -q, --quiet do not print progress messages
15803 -d, --debug don't remove temporary files
15804 --recheck update $as_me by reconfiguring in the same conditions
15805 --file=FILE[:TEMPLATE]
86da66b5 15806 instantiate the configuration file FILE
ba479fd2 15807 --header=FILE[:TEMPLATE]
86da66b5 15808 instantiate the configuration header FILE
ba479fd2
NN
15809
15810Configuration files:
15811$config_files
15812
15813Configuration headers:
15814$config_headers
15815
15816Configuration commands:
15817$config_commands
15818
15819Report bugs to <bug-autoconf@gnu.org>."
15820_ACEOF
15821
15822cat >>$CONFIG_STATUS <<_ACEOF
15823ac_cs_version="\\
15824config.status
8ab705be 15825configured by $0, generated by GNU Autoconf 2.59,
ba479fd2
NN
15826 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15827
86da66b5 15828Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
15829This config.status script is free software; the Free Software Foundation
15830gives unlimited permission to copy, distribute and modify it."
15831srcdir=$srcdir
15832_ACEOF
15833
15834cat >>$CONFIG_STATUS <<\_ACEOF
15835# If no file are specified by the user, then we need to provide default
15836# value. By we need to know if files were specified by the user.
15837ac_need_defaults=:
15838while test $# != 0
15839do
15840 case $1 in
15841 --*=*)
15842 ac_option=`expr "x$1" : 'x\([^=]*\)='`
15843 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15844 ac_shift=:
15845 ;;
15846 -*)
15847 ac_option=$1
15848 ac_optarg=$2
15849 ac_shift=shift
15850 ;;
15851 *) # This is not an option, so the user has probably given explicit
15852 # arguments.
15853 ac_option=$1
15854 ac_need_defaults=false;;
15855 esac
15856
15857 case $ac_option in
15858 # Handling of the options.
15859_ACEOF
15860cat >>$CONFIG_STATUS <<\_ACEOF
15861 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15862 ac_cs_recheck=: ;;
15863 --version | --vers* | -V )
15864 echo "$ac_cs_version"; exit 0 ;;
15865 --he | --h)
15866 # Conflict between --help and --header
15867 { { echo "$as_me:$LINENO: error: ambiguous option: $1
15868Try \`$0 --help' for more information." >&5
15869echo "$as_me: error: ambiguous option: $1
15870Try \`$0 --help' for more information." >&2;}
15871 { (exit 1); exit 1; }; };;
15872 --help | --hel | -h )
15873 echo "$ac_cs_usage"; exit 0 ;;
15874 --debug | --d* | -d )
15875 debug=: ;;
15876 --file | --fil | --fi | --f )
15877 $ac_shift
15878 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
15879 ac_need_defaults=false;;
15880 --header | --heade | --head | --hea )
15881 $ac_shift
15882 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
15883 ac_need_defaults=false;;
15884 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15885 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15886 ac_cs_silent=: ;;
15887
15888 # This is an error.
15889 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
15890Try \`$0 --help' for more information." >&5
15891echo "$as_me: error: unrecognized option: $1
15892Try \`$0 --help' for more information." >&2;}
15893 { (exit 1); exit 1; }; } ;;
15894
15895 *) ac_config_targets="$ac_config_targets $1" ;;
15896
15897 esac
15898 shift
6e3f3080 15899done
ba479fd2
NN
15900
15901ac_configure_extra_args=
15902
15903if $ac_cs_silent; then
15904 exec 6>/dev/null
15905 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
15906fi
15907
ba479fd2
NN
15908_ACEOF
15909cat >>$CONFIG_STATUS <<_ACEOF
15910if \$ac_cs_recheck; then
15911 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
15912 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15913fi
861bb6c1 15914
ba479fd2
NN
15915_ACEOF
15916
15917cat >>$CONFIG_STATUS <<_ACEOF
15918#
15919# INIT-COMMANDS section.
15920#
15921
15922subdirs='$subdirs'
ba479fd2
NN
15923
15924_ACEOF
15925
15926
15927
15928cat >>$CONFIG_STATUS <<\_ACEOF
15929for ac_config_target in $ac_config_targets
15930do
15931 case "$ac_config_target" in
15932 # Handling of arguments.
15933 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
15934 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15935 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
15936 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
15937echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15938 { (exit 1); exit 1; }; };;
861bb6c1 15939 esac
ba479fd2
NN
15940done
15941
15942# If the user did not use the arguments to specify the items to instantiate,
15943# then the envvar interface is used. Set only those that are not.
15944# We use the long form for the default assignment because of an extremely
15945# bizarre bug on SunOS 4.1.3.
15946if $ac_need_defaults; then
15947 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15948 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15949 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15950fi
15951
15952# Have a temporary directory for convenience. Make it in the build tree
15953# simply because there is no reason to put it here, and in addition,
15954# creating and moving files from /tmp can sometimes cause problems.
15955# Create a temporary directory, and hook for its removal unless debugging.
15956$debug ||
15957{
15958 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15959 trap '{ (exit 1); exit 1; }' 1 2 13 15
15960}
861bb6c1 15961
ba479fd2 15962# Create a (secure) tmp directory for tmp files.
6e3f3080 15963
ba479fd2
NN
15964{
15965 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
15966 test -n "$tmp" && test -d "$tmp"
15967} ||
15968{
15969 tmp=./confstat$$-$RANDOM
15970 (umask 077 && mkdir $tmp)
15971} ||
15972{
15973 echo "$me: cannot create a temporary directory in ." >&2
15974 { (exit 1); exit 1; }
15975}
15976
15977_ACEOF
15978
15979cat >>$CONFIG_STATUS <<_ACEOF
15980
15981#
15982# CONFIG_FILES section.
15983#
15984
15985# No need to generate the scripts if there are no CONFIG_FILES.
15986# This happens for instance when ./config.status config.h
15987if test -n "\$CONFIG_FILES"; then
15988 # Protect against being on the right side of a sed subst in config.status.
15989 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15990 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15991s,@SHELL@,$SHELL,;t t
15992s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15993s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15994s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15995s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15996s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15997s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15998s,@exec_prefix@,$exec_prefix,;t t
15999s,@prefix@,$prefix,;t t
16000s,@program_transform_name@,$program_transform_name,;t t
16001s,@bindir@,$bindir,;t t
16002s,@sbindir@,$sbindir,;t t
16003s,@libexecdir@,$libexecdir,;t t
16004s,@datadir@,$datadir,;t t
16005s,@sysconfdir@,$sysconfdir,;t t
16006s,@sharedstatedir@,$sharedstatedir,;t t
16007s,@localstatedir@,$localstatedir,;t t
16008s,@libdir@,$libdir,;t t
16009s,@includedir@,$includedir,;t t
16010s,@oldincludedir@,$oldincludedir,;t t
16011s,@infodir@,$infodir,;t t
16012s,@mandir@,$mandir,;t t
16013s,@build_alias@,$build_alias,;t t
16014s,@host_alias@,$host_alias,;t t
16015s,@target_alias@,$target_alias,;t t
16016s,@DEFS@,$DEFS,;t t
16017s,@ECHO_C@,$ECHO_C,;t t
16018s,@ECHO_N@,$ECHO_N,;t t
16019s,@ECHO_T@,$ECHO_T,;t t
16020s,@LIBS@,$LIBS,;t t
16021s,@build@,$build,;t t
16022s,@build_cpu@,$build_cpu,;t t
16023s,@build_vendor@,$build_vendor,;t t
16024s,@build_os@,$build_os,;t t
16025s,@host@,$host,;t t
16026s,@host_cpu@,$host_cpu,;t t
16027s,@host_vendor@,$host_vendor,;t t
16028s,@host_os@,$host_os,;t t
16029s,@target@,$target,;t t
16030s,@target_cpu@,$target_cpu,;t t
16031s,@target_vendor@,$target_vendor,;t t
16032s,@target_os@,$target_os,;t t
8f1529e6 16033s,@target_noncanonical@,$target_noncanonical,;t t
ba479fd2
NN
16034s,@build_subdir@,$build_subdir,;t t
16035s,@host_subdir@,$host_subdir,;t t
16036s,@target_subdir@,$target_subdir,;t t
4982adbe
RS
16037s,@gcc_version_trigger@,$gcc_version_trigger,;t t
16038s,@gcc_version_full@,$gcc_version_full,;t t
16039s,@gcc_version@,$gcc_version,;t t
03787dfd 16040s,@GENINSRC@,$GENINSRC,;t t
ba479fd2
NN
16041s,@CC@,$CC,;t t
16042s,@CFLAGS@,$CFLAGS,;t t
16043s,@LDFLAGS@,$LDFLAGS,;t t
16044s,@CPPFLAGS@,$CPPFLAGS,;t t
16045s,@ac_ct_CC@,$ac_ct_CC,;t t
16046s,@EXEEXT@,$EXEEXT,;t t
16047s,@OBJEXT@,$OBJEXT,;t t
16048s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
16049s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
16050s,@CPP@,$CPP,;t t
bf3b7cd3 16051s,@EGREP@,$EGREP,;t t
ba479fd2
NN
16052s,@strict1_warn@,$strict1_warn,;t t
16053s,@warn_cflags@,$warn_cflags,;t t
16054s,@WERROR@,$WERROR,;t t
16055s,@nocommon_flag@,$nocommon_flag,;t t
13f05fd0 16056s,@TREEBROWSER@,$TREEBROWSER,;t t
ba479fd2
NN
16057s,@valgrind_path@,$valgrind_path,;t t
16058s,@valgrind_path_defines@,$valgrind_path_defines,;t t
16059s,@valgrind_command@,$valgrind_command,;t t
16060s,@coverage_flags@,$coverage_flags,;t t
16061s,@enable_multilib@,$enable_multilib,;t t
16062s,@enable_shared@,$enable_shared,;t t
16063s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
16064s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
16065s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
16066s,@onestep@,$onestep,;t t
16067s,@SET_MAKE@,$SET_MAKE,;t t
16068s,@AWK@,$AWK,;t t
ba479fd2 16069s,@LN_S@,$LN_S,;t t
41e622a8 16070s,@LN@,$LN,;t t
ba479fd2
NN
16071s,@RANLIB@,$RANLIB,;t t
16072s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
343a6100 16073s,@ranlib_flags@,$ranlib_flags,;t t
ba479fd2
NN
16074s,@INSTALL@,$INSTALL,;t t
16075s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16076s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16077s,@make_compare_target@,$make_compare_target,;t t
16078s,@have_mktemp_command@,$have_mktemp_command,;t t
16079s,@MAKEINFO@,$MAKEINFO,;t t
16080s,@BUILD_INFO@,$BUILD_INFO,;t t
16081s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
16082s,@FLEX@,$FLEX,;t t
16083s,@BISON@,$BISON,;t t
f6a874ac
JW
16084s,@NM@,$NM,;t t
16085s,@AR@,$AR,;t t
ba479fd2
NN
16086s,@stage1_cflags@,$stage1_cflags,;t t
16087s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
16088s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
16089s,@LDEXP_LIB@,$LDEXP_LIB,;t t
16090s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
16091s,@LIBICONV@,$LIBICONV,;t t
dfb77e37 16092s,@LTLIBICONV@,$LTLIBICONV,;t t
ba479fd2
NN
16093s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
16094s,@manext@,$manext,;t t
16095s,@objext@,$objext,;t t
8bb915b6 16096s,@gthread_flags@,$gthread_flags,;t t
ba479fd2 16097s,@extra_modes_file@,$extra_modes_file,;t t
ba479fd2
NN
16098s,@PACKAGE@,$PACKAGE,;t t
16099s,@VERSION@,$VERSION,;t t
16100s,@USE_NLS@,$USE_NLS,;t t
16101s,@LIBINTL@,$LIBINTL,;t t
16102s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
16103s,@INCINTL@,$INCINTL,;t t
16104s,@XGETTEXT@,$XGETTEXT,;t t
16105s,@GMSGFMT@,$GMSGFMT,;t t
16106s,@POSUB@,$POSUB,;t t
16107s,@CATALOGS@,$CATALOGS,;t t
5395b47b 16108s,@host_cc_for_libada@,$host_cc_for_libada,;t t
ba479fd2
NN
16109s,@CROSS@,$CROSS,;t t
16110s,@ALL@,$ALL,;t t
16111s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
16112s,@inhibit_libc@,$inhibit_libc,;t t
ba479fd2
NN
16113s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
16114s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16115s,@STMP_FIXINC@,$STMP_FIXINC,;t t
16116s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
c38f02df 16117s,@collect2@,$collect2,;t t
ba479fd2 16118s,@libgcc_visibility@,$libgcc_visibility,;t t
ba479fd2
NN
16119s,@GGC@,$GGC,;t t
16120s,@zlibdir@,$zlibdir,;t t
16121s,@zlibinc@,$zlibinc,;t t
16122s,@MAINT@,$MAINT,;t t
16123s,@gcc_tooldir@,$gcc_tooldir,;t t
16124s,@dollar@,$dollar,;t t
16125s,@slibdir@,$slibdir,;t t
16126s,@objdir@,$objdir,;t t
16127s,@subdirs@,$subdirs,;t t
16128s,@srcdir@,$srcdir,;t t
ba479fd2
NN
16129s,@all_boot_languages@,$all_boot_languages,;t t
16130s,@all_compilers@,$all_compilers,;t t
16131s,@all_gtfiles@,$all_gtfiles,;t t
16132s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
16133s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
16134s,@all_lang_makefrags@,$all_lang_makefrags,;t t
16135s,@all_lang_makefiles@,$all_lang_makefiles,;t t
16136s,@all_languages@,$all_languages,;t t
16137s,@all_stagestuff@,$all_stagestuff,;t t
16138s,@build_exeext@,$build_exeext,;t t
16139s,@build_install_headers_dir@,$build_install_headers_dir,;t t
16140s,@build_xm_file_list@,$build_xm_file_list,;t t
16141s,@build_xm_include_list@,$build_xm_include_list,;t t
16142s,@build_xm_defines@,$build_xm_defines,;t t
16143s,@check_languages@,$check_languages,;t t
16144s,@cc_set_by_configure@,$cc_set_by_configure,;t t
16145s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
16146s,@cpp_install_dir@,$cpp_install_dir,;t t
16147s,@xmake_file@,$xmake_file,;t t
16148s,@tmake_file@,$tmake_file,;t t
30500d84 16149s,@extra_gcc_objs@,$extra_gcc_objs,;t t
ba479fd2
NN
16150s,@extra_headers_list@,$extra_headers_list,;t t
16151s,@extra_objs@,$extra_objs,;t t
16152s,@extra_parts@,$extra_parts,;t t
16153s,@extra_passes@,$extra_passes,;t t
16154s,@extra_programs@,$extra_programs,;t t
16155s,@float_h_file@,$float_h_file,;t t
16156s,@gcc_config_arguments@,$gcc_config_arguments,;t t
16157s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
16158s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
ba479fd2 16159s,@host_exeext@,$host_exeext,;t t
ba479fd2
NN
16160s,@host_xm_file_list@,$host_xm_file_list,;t t
16161s,@host_xm_include_list@,$host_xm_include_list,;t t
16162s,@host_xm_defines@,$host_xm_defines,;t t
16163s,@out_host_hook_obj@,$out_host_hook_obj,;t t
16164s,@install@,$install,;t t
16165s,@lang_opt_files@,$lang_opt_files,;t t
16166s,@lang_specs_files@,$lang_specs_files,;t t
16167s,@lang_tree_files@,$lang_tree_files,;t t
16168s,@local_prefix@,$local_prefix,;t t
16169s,@md_file@,$md_file,;t t
16170s,@objc_boehm_gc@,$objc_boehm_gc,;t t
16171s,@out_file@,$out_file,;t t
16172s,@out_object_file@,$out_object_file,;t t
16173s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
16174s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
ba479fd2
NN
16175s,@thread_file@,$thread_file,;t t
16176s,@tm_file_list@,$tm_file_list,;t t
16177s,@tm_include_list@,$tm_include_list,;t t
16178s,@tm_defines@,$tm_defines,;t t
16179s,@tm_p_file_list@,$tm_p_file_list,;t t
16180s,@tm_p_include_list@,$tm_p_include_list,;t t
16181s,@xm_file_list@,$xm_file_list,;t t
16182s,@xm_include_list@,$xm_include_list,;t t
16183s,@xm_defines@,$xm_defines,;t t
ba479fd2
NN
16184s,@c_target_objs@,$c_target_objs,;t t
16185s,@cxx_target_objs@,$cxx_target_objs,;t t
16186s,@target_cpu_default@,$target_cpu_default,;t t
4c4a5bbc 16187s,@set_gcc_lib_path@,$set_gcc_lib_path,;t t
6de9cd9a
DN
16188s,@GMPLIBS@,$GMPLIBS,;t t
16189s,@GMPINC@,$GMPINC,;t t
ba479fd2
NN
16190s,@LIBOBJS@,$LIBOBJS,;t t
16191s,@LTLIBOBJS@,$LTLIBOBJS,;t t
16192/@language_hooks@/r $language_hooks
16193s,@language_hooks@,,;t t
16194CEOF
16195
16196_ACEOF
16197
16198 cat >>$CONFIG_STATUS <<\_ACEOF
16199 # Split the substitutions into bite-sized pieces for seds with
16200 # small command number limits, like on Digital OSF/1 and HP-UX.
16201 ac_max_sed_lines=48
16202 ac_sed_frag=1 # Number of current file.
16203 ac_beg=1 # First line for current file.
16204 ac_end=$ac_max_sed_lines # Line after last line for current file.
16205 ac_more_lines=:
16206 ac_sed_cmds=
16207 while $ac_more_lines; do
16208 if test $ac_beg -gt 1; then
16209 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16210 else
16211 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16212 fi
16213 if test ! -s $tmp/subs.frag; then
16214 ac_more_lines=false
16215 else
16216 # The purpose of the label and of the branching condition is to
16217 # speed up the sed processing (if there are no `@' at all, there
16218 # is no need to browse any of the substitutions).
16219 # These are the two extra sed commands mentioned above.
16220 (echo ':t
16221 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16222 if test -z "$ac_sed_cmds"; then
86da66b5 16223 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2 16224 else
86da66b5 16225 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2
NN
16226 fi
16227 ac_sed_frag=`expr $ac_sed_frag + 1`
16228 ac_beg=$ac_end
16229 ac_end=`expr $ac_end + $ac_max_sed_lines`
16230 fi
16231 done
16232 if test -z "$ac_sed_cmds"; then
16233 ac_sed_cmds=cat
63cf211a 16234 fi
ba479fd2 16235fi # test -n "$CONFIG_FILES"
cafe096b 16236
ba479fd2
NN
16237_ACEOF
16238cat >>$CONFIG_STATUS <<\_ACEOF
16239for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16240 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16241 case $ac_file in
16242 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
16243 cat >$tmp/stdin
16244 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16245 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16246 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 16247 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16248 * ) ac_file_in=$ac_file.in ;;
63cf211a 16249 esac
cafe096b 16250
ba479fd2
NN
16251 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16252 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16253$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16254 X"$ac_file" : 'X\(//\)[^/]' \| \
16255 X"$ac_file" : 'X\(//\)$' \| \
16256 X"$ac_file" : 'X\(/\)' \| \
16257 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16258echo X"$ac_file" |
16259 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16260 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16261 /^X\(\/\/\)$/{ s//\1/; q; }
16262 /^X\(\/\).*/{ s//\1/; q; }
16263 s/.*/./; q'`
16264 { if $as_mkdir_p; then
16265 mkdir -p "$ac_dir"
16266 else
16267 as_dir="$ac_dir"
16268 as_dirs=
16269 while test ! -d "$as_dir"; do
16270 as_dirs="$as_dir $as_dirs"
16271 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16272$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16273 X"$as_dir" : 'X\(//\)[^/]' \| \
16274 X"$as_dir" : 'X\(//\)$' \| \
16275 X"$as_dir" : 'X\(/\)' \| \
16276 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16277echo X"$as_dir" |
16278 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16279 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16280 /^X\(\/\/\)$/{ s//\1/; q; }
16281 /^X\(\/\).*/{ s//\1/; q; }
16282 s/.*/./; q'`
16283 done
16284 test ! -n "$as_dirs" || mkdir $as_dirs
16285 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16286echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16287 { (exit 1); exit 1; }; }; }
6e3f3080 16288
ba479fd2
NN
16289 ac_builddir=.
16290
16291if test "$ac_dir" != .; then
16292 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16293 # A "../" for each directory in $ac_dir_suffix.
16294 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16295else
16296 ac_dir_suffix= ac_top_builddir=
16297fi
16298
16299case $srcdir in
16300 .) # No --srcdir option. We are building in place.
16301 ac_srcdir=.
16302 if test -z "$ac_top_builddir"; then
16303 ac_top_srcdir=.
16304 else
16305 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16306 fi ;;
16307 [\\/]* | ?:[\\/]* ) # Absolute path.
16308 ac_srcdir=$srcdir$ac_dir_suffix;
16309 ac_top_srcdir=$srcdir ;;
16310 *) # Relative path.
16311 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16312 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16313esac
8ab705be
KC
16314
16315# Do not use `cd foo && pwd` to compute absolute paths, because
16316# the directories may not exist.
16317case `pwd` in
16318.) ac_abs_builddir="$ac_dir";;
86da66b5 16319*)
8ab705be
KC
16320 case "$ac_dir" in
16321 .) ac_abs_builddir=`pwd`;;
16322 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
16323 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
16324 esac;;
16325esac
8ab705be 16326case $ac_abs_builddir in
86da66b5
HPN
16327.) ac_abs_top_builddir=${ac_top_builddir}.;;
16328*)
16329 case ${ac_top_builddir}. in
8ab705be 16330 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 16331 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 16332 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
16333 esac;;
16334esac
8ab705be 16335case $ac_abs_builddir in
86da66b5
HPN
16336.) ac_abs_srcdir=$ac_srcdir;;
16337*)
16338 case $ac_srcdir in
8ab705be 16339 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 16340 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 16341 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
16342 esac;;
16343esac
8ab705be 16344case $ac_abs_builddir in
86da66b5
HPN
16345.) ac_abs_top_srcdir=$ac_top_srcdir;;
16346*)
16347 case $ac_top_srcdir in
8ab705be 16348 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 16349 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 16350 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
16351 esac;;
16352esac
ba479fd2
NN
16353
16354
16355
215c351a
PB
16356 if test x"$ac_file" != x-; then
16357 { echo "$as_me:$LINENO: creating $ac_file" >&5
16358echo "$as_me: creating $ac_file" >&6;}
16359 rm -f "$ac_file"
16360 fi
ba479fd2
NN
16361 # Let's still pretend it is `configure' which instantiates (i.e., don't
16362 # use $as_me), people would be surprised to read:
16363 # /* config.h. Generated by config.status. */
16364 if test x"$ac_file" = x-; then
16365 configure_input=
16366 else
16367 configure_input="$ac_file. "
16368 fi
16369 configure_input=$configure_input"Generated from `echo $ac_file_in |
86da66b5 16370 sed 's,.*/,,'` by configure."
ba479fd2
NN
16371
16372 # First look for the input files in the build tree, otherwise in the
16373 # src tree.
16374 ac_file_inputs=`IFS=:
16375 for f in $ac_file_in; do
16376 case $f in
16377 -) echo $tmp/stdin ;;
16378 [\\/$]*)
86da66b5
HPN
16379 # Absolute (can't be DOS-style, as IFS=:)
16380 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16381echo "$as_me: error: cannot find input file: $f" >&2;}
16382 { (exit 1); exit 1; }; }
86da66b5 16383 echo "$f";;
ba479fd2 16384 *) # Relative
86da66b5
HPN
16385 if test -f "$f"; then
16386 # Build tree
16387 echo "$f"
16388 elif test -f "$srcdir/$f"; then
16389 # Source tree
16390 echo "$srcdir/$f"
16391 else
16392 # /dev/null tree
16393 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16394echo "$as_me: error: cannot find input file: $f" >&2;}
16395 { (exit 1); exit 1; }; }
86da66b5 16396 fi;;
ba479fd2
NN
16397 esac
16398 done` || { (exit 1); exit 1; }
16399_ACEOF
16400cat >>$CONFIG_STATUS <<_ACEOF
16401 sed "$ac_vpsub
16402$extrasub
16403_ACEOF
16404cat >>$CONFIG_STATUS <<\_ACEOF
16405:t
16406/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16407s,@configure_input@,$configure_input,;t t
16408s,@srcdir@,$ac_srcdir,;t t
16409s,@abs_srcdir@,$ac_abs_srcdir,;t t
16410s,@top_srcdir@,$ac_top_srcdir,;t t
16411s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16412s,@builddir@,$ac_builddir,;t t
16413s,@abs_builddir@,$ac_abs_builddir,;t t
16414s,@top_builddir@,$ac_top_builddir,;t t
16415s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16416" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16417 rm -f $tmp/stdin
16418 if test x"$ac_file" != x-; then
16419 mv $tmp/out $ac_file
16420 else
16421 cat $tmp/out
16422 rm -f $tmp/out
16423 fi
16424
16425done
16426_ACEOF
16427cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 16428
ba479fd2
NN
16429#
16430# CONFIG_HEADER section.
16431#
861bb6c1
JL
16432
16433# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16434# NAME is the cpp macro being defined and VALUE is the value it is being given.
16435#
16436# ac_d sets the value in "#define NAME VALUE" lines.
86da66b5
HPN
16437ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16438ac_dB='[ ].*$,\1#\2'
ba479fd2
NN
16439ac_dC=' '
16440ac_dD=',;t'
16441# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
86da66b5 16442ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ba479fd2 16443ac_uB='$,\1#\2define\3'
861bb6c1 16444ac_uC=' '
ba479fd2
NN
16445ac_uD=',;t'
16446
16447for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 16448 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
16449 case $ac_file in
16450 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
16451 cat >$tmp/stdin
16452 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16453 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16454 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 16455 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16456 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
16457 esac
16458
ba479fd2
NN
16459 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16460echo "$as_me: creating $ac_file" >&6;}
16461
16462 # First look for the input files in the build tree, otherwise in the
16463 # src tree.
16464 ac_file_inputs=`IFS=:
16465 for f in $ac_file_in; do
16466 case $f in
16467 -) echo $tmp/stdin ;;
16468 [\\/$]*)
86da66b5
HPN
16469 # Absolute (can't be DOS-style, as IFS=:)
16470 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16471echo "$as_me: error: cannot find input file: $f" >&2;}
16472 { (exit 1); exit 1; }; }
86da66b5
HPN
16473 # Do quote $f, to prevent DOS paths from being IFS'd.
16474 echo "$f";;
ba479fd2 16475 *) # Relative
86da66b5
HPN
16476 if test -f "$f"; then
16477 # Build tree
16478 echo "$f"
16479 elif test -f "$srcdir/$f"; then
16480 # Source tree
16481 echo "$srcdir/$f"
16482 else
16483 # /dev/null tree
16484 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16485echo "$as_me: error: cannot find input file: $f" >&2;}
16486 { (exit 1); exit 1; }; }
86da66b5 16487 fi;;
ba479fd2
NN
16488 esac
16489 done` || { (exit 1); exit 1; }
16490 # Remove the trailing spaces.
86da66b5 16491 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
ba479fd2
NN
16492
16493_ACEOF
16494
16495# Transform confdefs.h into two sed scripts, `conftest.defines' and
16496# `conftest.undefs', that substitutes the proper values into
16497# config.h.in to produce config.h. The first handles `#define'
16498# templates, and the second `#undef' templates.
16499# And first: Protect against being on the right side of a sed subst in
16500# config.status. Protect against being in an unquoted here document
16501# in config.status.
16502rm -f conftest.defines conftest.undefs
16503# Using a here document instead of a string reduces the quoting nightmare.
16504# Putting comments in sed scripts is not portable.
16505#
16506# `end' is used to avoid that the second main sed command (meant for
16507# 0-ary CPP macros) applies to n-ary macro definitions.
16508# See the Autoconf documentation for `clear'.
16509cat >confdef2sed.sed <<\_ACEOF
16510s/[\\&,]/\\&/g
16511s,[\\$`],\\&,g
16512t clear
16513: clear
86da66b5 16514s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
ba479fd2 16515t end
86da66b5 16516s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
ba479fd2
NN
16517: end
16518_ACEOF
16519# If some macros were called several times there might be several times
16520# the same #defines, which is useless. Nevertheless, we may not want to
16521# sort them, since we want the *last* AC-DEFINE to be honored.
16522uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16523sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16524rm -f confdef2sed.sed
861bb6c1
JL
16525
16526# This sed command replaces #undef with comments. This is necessary, for
16527# example, in the case of _POSIX_SOURCE, which is predefined and required
16528# on some systems where configure will not decide to define it.
ba479fd2 16529cat >>conftest.undefs <<\_ACEOF
86da66b5 16530s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
ba479fd2
NN
16531_ACEOF
16532
16533# Break up conftest.defines because some shells have a limit on the size
16534# of here documents, and old seds have small limits too (100 cmds).
16535echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
86da66b5 16536echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
ba479fd2
NN
16537echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16538echo ' :' >>$CONFIG_STATUS
16539rm -f conftest.tail
16540while grep . conftest.defines >/dev/null
16541do
16542 # Write a limited-size here document to $tmp/defines.sed.
16543 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16544 # Speed up: don't consider the non `#define' lines.
86da66b5 16545 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
ba479fd2
NN
16546 # Work around the forget-to-reset-the-flag bug.
16547 echo 't clr' >>$CONFIG_STATUS
16548 echo ': clr' >>$CONFIG_STATUS
16549 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
16550 echo 'CEOF
16551 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16552 rm -f $tmp/in
16553 mv $tmp/out $tmp/in
16554' >>$CONFIG_STATUS
16555 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16556 rm -f conftest.defines
16557 mv conftest.tail conftest.defines
16558done
16559rm -f conftest.defines
16560echo ' fi # grep' >>$CONFIG_STATUS
16561echo >>$CONFIG_STATUS
861bb6c1 16562
ba479fd2
NN
16563# Break up conftest.undefs because some shells have a limit on the size
16564# of here documents, and old seds have small limits too (100 cmds).
16565echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 16566rm -f conftest.tail
ba479fd2 16567while grep . conftest.undefs >/dev/null
861bb6c1 16568do
ba479fd2
NN
16569 # Write a limited-size here document to $tmp/undefs.sed.
16570 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16571 # Speed up: don't consider the non `#undef'
86da66b5 16572 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
ba479fd2
NN
16573 # Work around the forget-to-reset-the-flag bug.
16574 echo 't clr' >>$CONFIG_STATUS
16575 echo ': clr' >>$CONFIG_STATUS
16576 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 16577 echo 'CEOF
ba479fd2
NN
16578 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16579 rm -f $tmp/in
16580 mv $tmp/out $tmp/in
16581' >>$CONFIG_STATUS
16582 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16583 rm -f conftest.undefs
16584 mv conftest.tail conftest.undefs
861bb6c1 16585done
ba479fd2
NN
16586rm -f conftest.undefs
16587
16588cat >>$CONFIG_STATUS <<\_ACEOF
16589 # Let's still pretend it is `configure' which instantiates (i.e., don't
16590 # use $as_me), people would be surprised to read:
16591 # /* config.h. Generated by config.status. */
16592 if test x"$ac_file" = x-; then
16593 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 16594 else
ba479fd2 16595 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 16596 fi
ba479fd2
NN
16597 cat $tmp/in >>$tmp/config.h
16598 rm -f $tmp/in
16599 if test x"$ac_file" != x-; then
16600 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
16601 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16602echo "$as_me: $ac_file is unchanged" >&6;}
16603 else
16604 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16605$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16606 X"$ac_file" : 'X\(//\)[^/]' \| \
16607 X"$ac_file" : 'X\(//\)$' \| \
16608 X"$ac_file" : 'X\(/\)' \| \
16609 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16610echo X"$ac_file" |
16611 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16612 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16613 /^X\(\/\/\)$/{ s//\1/; q; }
16614 /^X\(\/\).*/{ s//\1/; q; }
16615 s/.*/./; q'`
16616 { if $as_mkdir_p; then
16617 mkdir -p "$ac_dir"
16618 else
16619 as_dir="$ac_dir"
16620 as_dirs=
16621 while test ! -d "$as_dir"; do
16622 as_dirs="$as_dir $as_dirs"
16623 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16624$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16625 X"$as_dir" : 'X\(//\)[^/]' \| \
16626 X"$as_dir" : 'X\(//\)$' \| \
16627 X"$as_dir" : 'X\(/\)' \| \
16628 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16629echo X"$as_dir" |
16630 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16631 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16632 /^X\(\/\/\)$/{ s//\1/; q; }
16633 /^X\(\/\).*/{ s//\1/; q; }
16634 s/.*/./; q'`
16635 done
16636 test ! -n "$as_dirs" || mkdir $as_dirs
16637 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16638echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16639 { (exit 1); exit 1; }; }; }
63cf211a 16640
ba479fd2
NN
16641 rm -f $ac_file
16642 mv $tmp/config.h $ac_file
16643 fi
16644 else
16645 cat $tmp/config.h
16646 rm -f $tmp/config.h
16647 fi
16648done
16649_ACEOF
16650cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 16651
ba479fd2
NN
16652#
16653# CONFIG_COMMANDS section.
16654#
16655for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16656 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16657 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16658 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
16659$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16660 X"$ac_dest" : 'X\(//\)[^/]' \| \
16661 X"$ac_dest" : 'X\(//\)$' \| \
16662 X"$ac_dest" : 'X\(/\)' \| \
16663 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16664echo X"$ac_dest" |
16665 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16666 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16667 /^X\(\/\/\)$/{ s//\1/; q; }
16668 /^X\(\/\).*/{ s//\1/; q; }
16669 s/.*/./; q'`
86da66b5
HPN
16670 { if $as_mkdir_p; then
16671 mkdir -p "$ac_dir"
16672 else
16673 as_dir="$ac_dir"
16674 as_dirs=
16675 while test ! -d "$as_dir"; do
16676 as_dirs="$as_dir $as_dirs"
16677 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16678$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16679 X"$as_dir" : 'X\(//\)[^/]' \| \
16680 X"$as_dir" : 'X\(//\)$' \| \
16681 X"$as_dir" : 'X\(/\)' \| \
16682 . : '\(.\)' 2>/dev/null ||
16683echo X"$as_dir" |
16684 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16685 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16686 /^X\(\/\/\)$/{ s//\1/; q; }
16687 /^X\(\/\).*/{ s//\1/; q; }
16688 s/.*/./; q'`
16689 done
16690 test ! -n "$as_dirs" || mkdir $as_dirs
16691 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16692echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16693 { (exit 1); exit 1; }; }; }
16694
ba479fd2
NN
16695 ac_builddir=.
16696
16697if test "$ac_dir" != .; then
16698 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16699 # A "../" for each directory in $ac_dir_suffix.
16700 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16701else
16702 ac_dir_suffix= ac_top_builddir=
16703fi
16704
16705case $srcdir in
16706 .) # No --srcdir option. We are building in place.
16707 ac_srcdir=.
16708 if test -z "$ac_top_builddir"; then
16709 ac_top_srcdir=.
16710 else
16711 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16712 fi ;;
16713 [\\/]* | ?:[\\/]* ) # Absolute path.
16714 ac_srcdir=$srcdir$ac_dir_suffix;
16715 ac_top_srcdir=$srcdir ;;
16716 *) # Relative path.
16717 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16718 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16719esac
8ab705be
KC
16720
16721# Do not use `cd foo && pwd` to compute absolute paths, because
16722# the directories may not exist.
16723case `pwd` in
16724.) ac_abs_builddir="$ac_dir";;
86da66b5 16725*)
8ab705be
KC
16726 case "$ac_dir" in
16727 .) ac_abs_builddir=`pwd`;;
16728 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
16729 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
16730 esac;;
16731esac
8ab705be 16732case $ac_abs_builddir in
86da66b5
HPN
16733.) ac_abs_top_builddir=${ac_top_builddir}.;;
16734*)
16735 case ${ac_top_builddir}. in
8ab705be 16736 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 16737 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 16738 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
16739 esac;;
16740esac
8ab705be 16741case $ac_abs_builddir in
86da66b5
HPN
16742.) ac_abs_srcdir=$ac_srcdir;;
16743*)
16744 case $ac_srcdir in
8ab705be 16745 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 16746 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 16747 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
16748 esac;;
16749esac
8ab705be 16750case $ac_abs_builddir in
86da66b5
HPN
16751.) ac_abs_top_srcdir=$ac_top_srcdir;;
16752*)
16753 case $ac_top_srcdir in
8ab705be 16754 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 16755 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 16756 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
16757 esac;;
16758esac
ba479fd2
NN
16759
16760
16761 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
16762echo "$as_me: executing $ac_dest commands" >&6;}
16763 case $ac_dest in
16764 default )
f1faaabd
NN
16765case ${CONFIG_HEADERS} in
16766 *auto-host.h:config.in*)
16767 echo > cstamp-h ;;
861bb6c1 16768esac
2ed26f6b 16769# Make sure all the subdirs exist.
3b620440 16770for d in $subdirs doc build
2ed26f6b 16771do
2ed26f6b 16772 test -d $d || mkdir $d
2ed26f6b 16773done
93cf819d
BK
16774# If the host supports symlinks, point stage[1234] at ../stage[1234] so
16775# bootstrapping and the installation procedure can still use
16776# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
16777# FLAGS_TO_PASS has been modified to solve the problem there.
16778# This is virtually a duplicate of what happens in configure.lang; we do
16779# an extra check to make sure this only happens if ln -s can be used.
35f06ae4
PB
16780case "$LN_S" in
16781 *-s*)
16782 for d in ${subdirs} ; do
1e6347d8 16783 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 16784 cd $d
6a1b7268 16785 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
16786 do
16787 rm -f $t
35f06ae4 16788 $LN_S ../$t $t 2>/dev/null
4e8a434e
BK
16789 done
16790 cd $STARTDIR
35f06ae4
PB
16791 done
16792 ;;
16793esac
ba479fd2
NN
16794 ;;
16795 esac
16796done
16797_ACEOF
cafe096b 16798
ba479fd2
NN
16799cat >>$CONFIG_STATUS <<\_ACEOF
16800
16801{ (exit 0); exit 0; }
16802_ACEOF
861bb6c1 16803chmod +x $CONFIG_STATUS
ba479fd2
NN
16804ac_clean_files=$ac_clean_files_save
16805
16806
16807# configure is writing to config.log, and then calls config.status.
16808# config.status does its own redirection, appending to config.log.
16809# Unfortunately, on DOS this fails, as config.log is still kept open
16810# by configure, so config.status won't be able to write to it; its
16811# output is simply discarded. So we exec the FD to /dev/null,
16812# effectively closing config.log, so it can be properly (re)opened and
16813# appended to by config.status. When coming back to configure, we
16814# need to make the FD available again.
16815if test "$no_create" != yes; then
16816 ac_cs_success=:
16817 ac_config_status_args=
16818 test "$silent" = yes &&
16819 ac_config_status_args="$ac_config_status_args --quiet"
16820 exec 5>/dev/null
16821 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16822 exec 5>>config.log
16823 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16824 # would make configure fail if this is the last instruction.
16825 $ac_cs_success || { (exit 1); exit 1; }
16826fi
861bb6c1 16827