]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
* intrinsic.texi: Fix typos.
[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
0bff65e7 312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
ba479fd2 313ac_subst_files='language_hooks'
861bb6c1
JL
314
315# Initialize some variables set by options.
ba479fd2
NN
316ac_init_help=
317ac_init_version=false
861bb6c1
JL
318# The variables have the same names as the options, with
319# dashes changed to underlines.
ba479fd2 320cache_file=/dev/null
861bb6c1 321exec_prefix=NONE
861bb6c1 322no_create=
861bb6c1
JL
323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
861bb6c1
JL
331verbose=
332x_includes=NONE
333x_libraries=NONE
ba479fd2
NN
334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
861bb6c1
JL
340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
861bb6c1
JL
353ac_prev=
354for ac_option
355do
861bb6c1
JL
356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
361 fi
362
ba479fd2 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
861bb6c1
JL
364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
ba479fd2 367 case $ac_option in
861bb6c1
JL
368
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 372 bindir=$ac_optarg ;;
861bb6c1
JL
373
374 -build | --build | --buil | --bui | --bu)
ba479fd2 375 ac_prev=build_alias ;;
861bb6c1 376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 377 build_alias=$ac_optarg ;;
861bb6c1
JL
378
379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
861bb6c1
JL
388
389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
ba479fd2 393 datadir=$ac_optarg ;;
861bb6c1
JL
394
395 -disable-* | --disable-*)
ba479fd2 396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 397 # Reject names that are not valid shell variable names.
ba479fd2
NN
398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
861bb6c1
JL
403
404 -enable-* | --enable-*)
ba479fd2 405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 406 # Reject names that are not valid shell variable names.
ba479fd2
NN
407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
413 *) ac_optarg=yes ;;
414 esac
ba479fd2 415 eval "enable_$ac_feature='$ac_optarg'" ;;
861bb6c1
JL
416
417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
ba479fd2 424 exec_prefix=$ac_optarg ;;
861bb6c1
JL
425
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
429
ba479fd2
NN
430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
861bb6c1
JL
436
437 -host | --host | --hos | --ho)
ba479fd2 438 ac_prev=host_alias ;;
861bb6c1 439 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 440 host_alias=$ac_optarg ;;
861bb6c1
JL
441
442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 447 includedir=$ac_optarg ;;
861bb6c1
JL
448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 452 infodir=$ac_optarg ;;
861bb6c1
JL
453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 457 libdir=$ac_optarg ;;
861bb6c1
JL
458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
ba479fd2 464 libexecdir=$ac_optarg ;;
861bb6c1
JL
465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
ba479fd2 473 localstatedir=$ac_optarg ;;
861bb6c1
JL
474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 478 mandir=$ac_optarg ;;
861bb6c1
JL
479
480 -nfp | --nfp | --nf)
481 # Obsolete; use --without-fp.
482 with_fp=no ;;
483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 485 | --no-cr | --no-c | -n)
861bb6c1
JL
486 no_create=yes ;;
487
488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
491
492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 499 oldincludedir=$ac_optarg ;;
861bb6c1
JL
500
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 504 prefix=$ac_optarg ;;
861bb6c1
JL
505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 511 program_prefix=$ac_optarg ;;
861bb6c1
JL
512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 518 program_suffix=$ac_optarg ;;
861bb6c1
JL
519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 535 program_transform_name=$ac_optarg ;;
861bb6c1
JL
536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
ba479fd2 545 sbindir=$ac_optarg ;;
861bb6c1
JL
546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
ba479fd2 556 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
557
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
ba479fd2 561 site=$ac_optarg ;;
861bb6c1
JL
562
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 566 srcdir=$ac_optarg ;;
861bb6c1
JL
567
568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 573 sysconfdir=$ac_optarg ;;
861bb6c1
JL
574
575 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 576 ac_prev=target_alias ;;
861bb6c1 577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 578 target_alias=$ac_optarg ;;
861bb6c1
JL
579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
ba479fd2
NN
583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
861bb6c1
JL
585
586 -with-* | --with-*)
ba479fd2 587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 588 # Reject names that are not valid shell variable names.
ba479fd2
NN
589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
861bb6c1 592 ac_package=`echo $ac_package| sed 's/-/_/g'`
ba479fd2
NN
593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
595 *) ac_optarg=yes ;;
596 esac
ba479fd2 597 eval "with_$ac_package='$ac_optarg'" ;;
861bb6c1
JL
598
599 -without-* | --without-*)
ba479fd2 600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 601 # Reject names that are not valid shell variable names.
ba479fd2
NN
602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
861bb6c1
JL
607
608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 617 x_includes=$ac_optarg ;;
861bb6c1
JL
618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 624 x_libraries=$ac_optarg ;;
861bb6c1 625
ba479fd2
NN
626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
861bb6c1
JL
629 ;;
630
ba479fd2
NN
631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
861bb6c1 641 *)
ba479fd2
NN
642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
647 ;;
648
649 esac
650done
651
652if test -n "$ac_prev"; then
ba479fd2
NN
653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
63cf211a 656fi
63cf211a 657
ba479fd2
NN
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
666 esac
667done
093e61a6 668
ba479fd2
NN
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
86da66b5 671 localstatedir libdir includedir oldincludedir infodir mandir
861bb6c1 672do
ba479fd2
NN
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
861bb6c1
JL
678 esac
679done
680
ba479fd2
NN
681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
687
688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
6e3f3080 698
ba479fd2
NN
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
861bb6c1 703
861bb6c1
JL
704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707 ac_srcdir_defaulted=yes
708 # Try the directory containing this script, then its parent.
ba479fd2
NN
709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
861bb6c1
JL
721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
ba479fd2
NN
730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
63cf211a 732 else
ba479fd2
NN
733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
63cf211a
NN
735 fi
736fi
ba479fd2
NN
737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
6de9cd9a
DN
773ac_env_GMPLIBS_set=${GMPLIBS+set}
774ac_env_GMPLIBS_value=$GMPLIBS
775ac_cv_env_GMPLIBS_set=${GMPLIBS+set}
776ac_cv_env_GMPLIBS_value=$GMPLIBS
777ac_env_GMPINC_set=${GMPINC+set}
778ac_env_GMPINC_value=$GMPINC
779ac_cv_env_GMPINC_set=${GMPINC+set}
780ac_cv_env_GMPINC_value=$GMPINC
63cf211a 781
ba479fd2
NN
782#
783# Report the --help message.
784#
785if test "$ac_init_help" = "long"; then
786 # Omit some internal or obsolete options to make the list less imposing.
787 # This message is too long to be a string in the A/UX 3.1 sh.
788 cat <<_ACEOF
789\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 790
ba479fd2 791Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 792
ba479fd2
NN
793To assign environment variables (e.g., CC, CFLAGS...), specify them as
794VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 795
ba479fd2 796Defaults for the options are specified in brackets.
861bb6c1 797
ba479fd2
NN
798Configuration:
799 -h, --help display this help and exit
800 --help=short display options specific to this package
801 --help=recursive display the short help of all the included packages
802 -V, --version display version information and exit
803 -q, --quiet, --silent do not print \`checking...' messages
804 --cache-file=FILE cache test results in FILE [disabled]
805 -C, --config-cache alias for \`--cache-file=config.cache'
806 -n, --no-create do not create output files
807 --srcdir=DIR find the sources in DIR [configure dir or \`..']
808
809_ACEOF
810
811 cat <<_ACEOF
812Installation directories:
813 --prefix=PREFIX install architecture-independent files in PREFIX
86da66b5 814 [$ac_default_prefix]
ba479fd2 815 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
86da66b5 816 [PREFIX]
861bb6c1 817
ba479fd2
NN
818By default, \`make install' will install all the files in
819\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
820an installation prefix other than \`$ac_default_prefix' using \`--prefix',
821for instance \`--prefix=\$HOME'.
13c22933 822
ba479fd2 823For better control, use the options below.
13c22933 824
ba479fd2
NN
825Fine tuning of the installation directories:
826 --bindir=DIR user executables [EPREFIX/bin]
827 --sbindir=DIR system admin executables [EPREFIX/sbin]
828 --libexecdir=DIR program executables [EPREFIX/libexec]
829 --datadir=DIR read-only architecture-independent data [PREFIX/share]
830 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
831 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
832 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
833 --libdir=DIR object code libraries [EPREFIX/lib]
834 --includedir=DIR C header files [PREFIX/include]
835 --oldincludedir=DIR C header files for non-gcc [/usr/include]
836 --infodir=DIR info documentation [PREFIX/info]
837 --mandir=DIR man documentation [PREFIX/man]
838_ACEOF
13c22933 839
ba479fd2 840 cat <<\_ACEOF
13c22933 841
ba479fd2
NN
842Program names:
843 --program-prefix=PREFIX prepend PREFIX to installed program names
844 --program-suffix=SUFFIX append SUFFIX to installed program names
845 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 846
ba479fd2
NN
847System types:
848 --build=BUILD configure for building on BUILD [guessed]
849 --host=HOST cross-compile to build programs to run on HOST [BUILD]
850 --target=TARGET configure for building compilers for TARGET [HOST]
851_ACEOF
13c22933
JJ
852fi
853
ba479fd2 854if test -n "$ac_init_help"; then
13c22933 855
ba479fd2 856 cat <<\_ACEOF
13c22933 857
ba479fd2
NN
858Optional Features:
859 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
860 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
861 --enable-generated-files-in-srcdir
862 put copies of generated files in source dir
863 intended for creating source tarballs for users
864 without texinfo bison or flex.
09a9c095 865 --enable-werror-always enable -Werror always
ba479fd2
NN
866 --enable-werror enable -Werror in bootstrap stage2 and later
867 --enable-checking=LIST
868 enable expensive run-time checks. With LIST,
869 enable only specific categories of checks.
cdce5c16
NS
870 Categories are: yes,no,all,none,release.
871 Flags are: assert,fold,gc,gcac,misc,
872 rtlflag,rtl,runtime,tree,valgrind.
74ee1642 873 --enable-mapped-location location_t is fileline integer cookie
ba479fd2 874 --enable-coverage=LEVEL
fb38008e 875 enable compiler's code coverage collection.
ba479fd2
NN
876 Use to measure compiler performance and locate
877 unused parts of the compiler. With LEVEL, specify
878 optimization. Values are opt, noopt,
879 default is noopt
880 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
881 --enable-multilib enable library support for multiple ABIs
882 --enable-__cxa_atexit enable __cxa_atexit for C++
883 --enable-threads enable thread usage for target GCC
884 --enable-threads=LIB use LIB thread package for target GCC
885 --enable-objc-gc enable the use of Boehm's garbage collector with
886 the GNU Objective-C runtime
887 --disable-shared don't provide a shared libgcc
888 --enable-intermodule build the compiler in one step
f3c9f174 889 --enable-languages=LIST specify which front-ends to build
dfb77e37 890 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
891 --enable-initfini-array use .init_array/.fini_array sections
892 --enable-sjlj-exceptions
893 arrange to use setjmp/longjmp exception handling
ba479fd2
NN
894 --disable-win32-registry
895 disable lookup of installation paths in the
896 Registry on Windows hosts
897 --enable-win32-registry enable registry lookup (default)
898 --enable-win32-registry=KEY
899 use KEY instead of GCC version as the last portion
900 of the registry key
901 --enable-maintainer-mode
902 enable make rules and dependencies not useful
903 (and sometimes confusing) to the casual installer
904 --enable-version-specific-runtime-libs
905 specify that runtime libraries should be
906 installed in a compiler-specific directory
093e61a6 907
ba479fd2
NN
908Optional Packages:
909 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
910 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
911 --with-local-prefix=DIR specifies directory to put local include
912 --with-gxx-include-dir=DIR
913 specifies directory to put g++ header files
914 --with-cpp-install-dir=DIR
915 install the user visible C preprocessor in DIR
916 (relative to PREFIX) as well as PREFIX/bin
917 --with-gnu-ld arrange to work with GNU ld.
918 --with-ld arrange to use the specified ld (full pathname)
d594623a 919 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
920 --with-gnu-as arrange to work with GNU as
921 --with-as arrange to use the specified as (full pathname)
922 --with-stabs arrange to use stabs instead of host debug format
923 --with-dwarf2 force the default debug format to be DWARF 2
924 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
dfb77e37
KC
925 --with-gnu-ld assume the C compiler uses GNU ld default=no
926 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
927 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 928 --with-system-libunwind use installed libunwind
59415997 929 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
930 with the compiler
931 --with-system-zlib use installed libz
932 --with-slibdir=DIR shared libraries in DIR LIBDIR
13c22933 933
ba479fd2
NN
934Some influential environment variables:
935 CC C compiler command
936 CFLAGS C compiler flags
937 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
938 nonstandard directory <lib dir>
939 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
940 headers in a nonstandard directory <include dir>
941 CPP C preprocessor
6de9cd9a
DN
942 GMPLIBS How to link GMP
943 GMPINC How to find GMP include files
13c22933 944
ba479fd2
NN
945Use these variables to override the choices made by `configure' or to help
946it to find libraries and programs with nonstandard names/locations.
73458fb7 947
ba479fd2
NN
948_ACEOF
949fi
6e3f3080 950
ba479fd2
NN
951if test "$ac_init_help" = "recursive"; then
952 # If there are subdirs, report their specific --help.
953 ac_popdir=`pwd`
954 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
955 test -d $ac_dir || continue
956 ac_builddir=.
957
958if test "$ac_dir" != .; then
959 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
960 # A "../" for each directory in $ac_dir_suffix.
961 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
962else
963 ac_dir_suffix= ac_top_builddir=
964fi
965
966case $srcdir in
967 .) # No --srcdir option. We are building in place.
968 ac_srcdir=.
969 if test -z "$ac_top_builddir"; then
970 ac_top_srcdir=.
971 else
972 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
973 fi ;;
974 [\\/]* | ?:[\\/]* ) # Absolute path.
975 ac_srcdir=$srcdir$ac_dir_suffix;
976 ac_top_srcdir=$srcdir ;;
977 *) # Relative path.
978 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
979 ac_top_srcdir=$ac_top_builddir$srcdir ;;
980esac
8ab705be
KC
981
982# Do not use `cd foo && pwd` to compute absolute paths, because
983# the directories may not exist.
984case `pwd` in
985.) ac_abs_builddir="$ac_dir";;
86da66b5 986*)
8ab705be
KC
987 case "$ac_dir" in
988 .) ac_abs_builddir=`pwd`;;
989 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
990 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
991 esac;;
992esac
8ab705be 993case $ac_abs_builddir in
86da66b5
HPN
994.) ac_abs_top_builddir=${ac_top_builddir}.;;
995*)
996 case ${ac_top_builddir}. in
8ab705be 997 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 998 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 999 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
1000 esac;;
1001esac
8ab705be 1002case $ac_abs_builddir in
86da66b5
HPN
1003.) ac_abs_srcdir=$ac_srcdir;;
1004*)
1005 case $ac_srcdir in
8ab705be 1006 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 1007 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 1008 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
1009 esac;;
1010esac
8ab705be 1011case $ac_abs_builddir in
86da66b5
HPN
1012.) ac_abs_top_srcdir=$ac_top_srcdir;;
1013*)
1014 case $ac_top_srcdir in
8ab705be 1015 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 1016 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 1017 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
1018 esac;;
1019esac
ba479fd2
NN
1020
1021 cd $ac_dir
1022 # Check for guested configure; otherwise get Cygnus style configure.
1023 if test -f $ac_srcdir/configure.gnu; then
1024 echo
1025 $SHELL $ac_srcdir/configure.gnu --help=recursive
1026 elif test -f $ac_srcdir/configure; then
1027 echo
1028 $SHELL $ac_srcdir/configure --help=recursive
1029 elif test -f $ac_srcdir/configure.ac ||
86da66b5 1030 test -f $ac_srcdir/configure.in; then
ba479fd2
NN
1031 echo
1032 $ac_configure --help
1033 else
1034 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1035 fi
a1286ef5 1036 cd $ac_popdir
ba479fd2
NN
1037 done
1038fi
1039
1040test -n "$ac_init_help" && exit 0
1041if $ac_init_version; then
1042 cat <<\_ACEOF
1043
86da66b5 1044Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1045This configure script is free software; the Free Software Foundation
1046gives unlimited permission to copy, distribute and modify it.
1047_ACEOF
1048 exit 0
1049fi
1050exec 5>config.log
1051cat >&5 <<_ACEOF
1052This file contains any messages produced by compilers while
1053running configure, to aid debugging if configure makes a mistake.
1054
1055It was created by $as_me, which was
8ab705be 1056generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1057
1058 $ $0 $@
1059
1060_ACEOF
1061{
1062cat <<_ASUNAME
1063## --------- ##
1064## Platform. ##
1065## --------- ##
1066
1067hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1068uname -m = `(uname -m) 2>/dev/null || echo unknown`
1069uname -r = `(uname -r) 2>/dev/null || echo unknown`
1070uname -s = `(uname -s) 2>/dev/null || echo unknown`
1071uname -v = `(uname -v) 2>/dev/null || echo unknown`
1072
1073/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1074/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1075
1076/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1077/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1078/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1079hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1080/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1081/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1082/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1083
1084_ASUNAME
1085
1086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1087for as_dir in $PATH
1088do
1089 IFS=$as_save_IFS
1090 test -z "$as_dir" && as_dir=.
1091 echo "PATH: $as_dir"
1092done
1093
1094} >&5
1095
1096cat >&5 <<_ACEOF
1097
1098
1099## ----------- ##
1100## Core tests. ##
1101## ----------- ##
1102
1103_ACEOF
1104
1105
1106# Keep a trace of the command line.
1107# Strip out --no-create and --no-recursion so they do not pile up.
1108# Strip out --silent because we don't want to record it for future runs.
1109# Also quote any args containing shell meta-characters.
1110# Make two passes to allow for proper duplicate-argument suppression.
1111ac_configure_args=
1112ac_configure_args0=
1113ac_configure_args1=
1114ac_sep=
1115ac_must_keep_next=false
1116for ac_pass in 1 2
1117do
1118 for ac_arg
1119 do
1120 case $ac_arg in
1121 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1122 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1123 | -silent | --silent | --silen | --sile | --sil)
1124 continue ;;
1125 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1126 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1127 esac
1128 case $ac_pass in
1129 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1130 2)
1131 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1132 if test $ac_must_keep_next = true; then
86da66b5 1133 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1134 else
86da66b5
HPN
1135 case $ac_arg in
1136 *=* | --config-cache | -C | -disable-* | --disable-* \
1137 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1138 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1139 | -with-* | --with-* | -without-* | --without-* | --x)
1140 case "$ac_configure_args0 " in
1141 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1142 esac
1143 ;;
1144 -* ) ac_must_keep_next=true ;;
1145 esac
ba479fd2
NN
1146 fi
1147 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1148 # Get rid of the leading space.
1149 ac_sep=" "
1150 ;;
1151 esac
1152 done
1153done
1154$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1155$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1156
1157# When interrupted or exit'd, cleanup temporary files, and complete
1158# config.log. We remove comments because anyway the quotes in there
1159# would cause problems or look ugly.
1160# WARNING: Be sure not to use single quotes in there, as some shells,
1161# such as our DU 5.0 friend, will then `close' the trap.
1162trap 'exit_status=$?
1163 # Save into config.log some information that might help in debugging.
1164 {
1165 echo
1166
1167 cat <<\_ASBOX
1168## ---------------- ##
1169## Cache variables. ##
1170## ---------------- ##
1171_ASBOX
1172 echo
1173 # The following way of writing the cache mishandles newlines in values,
1174{
1175 (set) 2>&1 |
1176 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1177 *ac_space=\ *)
1178 sed -n \
86da66b5
HPN
1179 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1180 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
ba479fd2
NN
1181 ;;
1182 *)
1183 sed -n \
86da66b5 1184 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
1185 ;;
1186 esac;
1187}
1188 echo
1189
1190 cat <<\_ASBOX
1191## ----------------- ##
1192## Output variables. ##
1193## ----------------- ##
1194_ASBOX
1195 echo
1196 for ac_var in $ac_subst_vars
1197 do
1198 eval ac_val=$`echo $ac_var`
1199 echo "$ac_var='"'"'$ac_val'"'"'"
1200 done | sort
1201 echo
1202
1203 if test -n "$ac_subst_files"; then
1204 cat <<\_ASBOX
1205## ------------- ##
1206## Output files. ##
1207## ------------- ##
1208_ASBOX
1209 echo
1210 for ac_var in $ac_subst_files
1211 do
1212 eval ac_val=$`echo $ac_var`
86da66b5 1213 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1214 done | sort
1215 echo
1216 fi
1217
1218 if test -s confdefs.h; then
1219 cat <<\_ASBOX
1220## ----------- ##
1221## confdefs.h. ##
1222## ----------- ##
1223_ASBOX
1224 echo
1225 sed "/^$/d" confdefs.h | sort
1226 echo
1227 fi
1228 test "$ac_signal" != 0 &&
1229 echo "$as_me: caught signal $ac_signal"
1230 echo "$as_me: exit $exit_status"
1231 } >&5
86da66b5 1232 rm -f core *.core &&
ba479fd2
NN
1233 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1234 exit $exit_status
1235 ' 0
1236for ac_signal in 1 2 13 15; do
1237 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1238done
1239ac_signal=0
1240
1241# confdefs.h avoids OS command line length limits that DEFS can exceed.
1242rm -rf conftest* confdefs.h
1243# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1244echo >confdefs.h
1245
1246# Predefined preprocessor variables.
1247
1248cat >>confdefs.h <<_ACEOF
1249#define PACKAGE_NAME "$PACKAGE_NAME"
1250_ACEOF
1251
1252
1253cat >>confdefs.h <<_ACEOF
1254#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1255_ACEOF
1256
1257
1258cat >>confdefs.h <<_ACEOF
1259#define PACKAGE_VERSION "$PACKAGE_VERSION"
1260_ACEOF
1261
1262
1263cat >>confdefs.h <<_ACEOF
1264#define PACKAGE_STRING "$PACKAGE_STRING"
1265_ACEOF
1266
1267
1268cat >>confdefs.h <<_ACEOF
1269#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1270_ACEOF
1271
1272
1273# Let the site file select an alternate cache file if it wants to.
1274# Prefer explicitly selected file to automatically selected ones.
1275if test -z "$CONFIG_SITE"; then
1276 if test "x$prefix" != xNONE; then
1277 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1278 else
1279 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1280 fi
1281fi
1282for ac_site_file in $CONFIG_SITE; do
1283 if test -r "$ac_site_file"; then
1284 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1285echo "$as_me: loading site script $ac_site_file" >&6;}
1286 sed 's/^/| /' "$ac_site_file" >&5
1287 . "$ac_site_file"
1288 fi
1289done
1290
1291if test -r "$cache_file"; then
1292 # Some versions of bash will fail to source /dev/null (special
1293 # files actually), so we avoid doing that.
1294 if test -f "$cache_file"; then
1295 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1296echo "$as_me: loading cache $cache_file" >&6;}
1297 case $cache_file in
1298 [\\/]* | ?:[\\/]* ) . $cache_file;;
1299 *) . ./$cache_file;;
1300 esac
1301 fi
1302else
1303 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1304echo "$as_me: creating cache $cache_file" >&6;}
1305 >$cache_file
1306fi
1307
1308# Check that the precious variables saved in the cache have kept the same
1309# value.
1310ac_cache_corrupted=false
1311for ac_var in `(set) 2>&1 |
86da66b5 1312 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1313 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1314 eval ac_new_set=\$ac_env_${ac_var}_set
1315 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1316 eval ac_new_val="\$ac_env_${ac_var}_value"
1317 case $ac_old_set,$ac_new_set in
1318 set,)
1319 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1320echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1321 ac_cache_corrupted=: ;;
1322 ,set)
1323 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1324echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1325 ac_cache_corrupted=: ;;
1326 ,);;
1327 *)
1328 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1329 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1330echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1331 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1332echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1333 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1334echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1335 ac_cache_corrupted=:
ba479fd2
NN
1336 fi;;
1337 esac
1338 # Pass precious variables to config.status.
1339 if test "$ac_new_set" = set; then
1340 case $ac_new_val in
1341 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1342 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1343 *) ac_arg=$ac_var=$ac_new_val ;;
1344 esac
1345 case " $ac_configure_args " in
1346 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1347 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1348 esac
1349 fi
1350done
1351if $ac_cache_corrupted; then
1352 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1353echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1354 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1355echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1356 { (exit 1); exit 1; }; }
1357fi
1358
1359ac_ext=c
1360ac_cpp='$CPP $CPPFLAGS'
1361ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1362ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1363ac_compiler_gnu=$ac_cv_c_compiler_gnu
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
914c5af7 1383
ba479fd2
NN
1384 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1385
1386
1387# Determine the host, build, and target systems
1388ac_aux_dir=
1389for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1390 if test -f $ac_dir/install-sh; then
1391 ac_aux_dir=$ac_dir
1392 ac_install_sh="$ac_aux_dir/install-sh -c"
1393 break
1394 elif test -f $ac_dir/install.sh; then
1395 ac_aux_dir=$ac_dir
1396 ac_install_sh="$ac_aux_dir/install.sh -c"
1397 break
1398 elif test -f $ac_dir/shtool; then
1399 ac_aux_dir=$ac_dir
1400 ac_install_sh="$ac_aux_dir/shtool install -c"
1401 break
1402 fi
1403done
1404if test -z "$ac_aux_dir"; then
1405 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1406echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1407 { (exit 1); exit 1; }; }
1408fi
1409ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1410ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1411ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1412
1413# Make sure we can run config.sub.
1414$ac_config_sub sun4 >/dev/null 2>&1 ||
1415 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1416echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1417 { (exit 1); exit 1; }; }
1418
1419echo "$as_me:$LINENO: checking build system type" >&5
1420echo $ECHO_N "checking build system type... $ECHO_C" >&6
1421if test "${ac_cv_build+set}" = set; then
1422 echo $ECHO_N "(cached) $ECHO_C" >&6
1423else
1424 ac_cv_build_alias=$build_alias
1425test -z "$ac_cv_build_alias" &&
1426 ac_cv_build_alias=`$ac_config_guess`
1427test -z "$ac_cv_build_alias" &&
1428 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1429echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1430 { (exit 1); exit 1; }; }
1431ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1432 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1433echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1434 { (exit 1); exit 1; }; }
1435
1436fi
1437echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1438echo "${ECHO_T}$ac_cv_build" >&6
1439build=$ac_cv_build
1440build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1441build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1442build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1443
1444
1445echo "$as_me:$LINENO: checking host system type" >&5
1446echo $ECHO_N "checking host system type... $ECHO_C" >&6
1447if test "${ac_cv_host+set}" = set; then
1448 echo $ECHO_N "(cached) $ECHO_C" >&6
1449else
1450 ac_cv_host_alias=$host_alias
1451test -z "$ac_cv_host_alias" &&
1452 ac_cv_host_alias=$ac_cv_build_alias
1453ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1454 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1455echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1456 { (exit 1); exit 1; }; }
1457
1458fi
1459echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1460echo "${ECHO_T}$ac_cv_host" >&6
1461host=$ac_cv_host
1462host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1463host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1464host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1465
1466
1467echo "$as_me:$LINENO: checking target system type" >&5
1468echo $ECHO_N "checking target system type... $ECHO_C" >&6
1469if test "${ac_cv_target+set}" = set; then
1470 echo $ECHO_N "(cached) $ECHO_C" >&6
1471else
1472 ac_cv_target_alias=$target_alias
1473test "x$ac_cv_target_alias" = "x" &&
1474 ac_cv_target_alias=$ac_cv_host_alias
1475ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1476 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1477echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1478 { (exit 1); exit 1; }; }
1479
1480fi
1481echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1482echo "${ECHO_T}$ac_cv_target" >&6
1483target=$ac_cv_target
1484target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1485target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1486target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1487
1488
1489# The aliases save the names the user supplied, while $host etc.
1490# will get canonicalized.
1491test -n "$target_alias" &&
1492 test "$program_prefix$program_suffix$program_transform_name" = \
1493 NONENONEs,x,x, &&
1494 program_prefix=${target_alias}-
1495
1496# Determine the noncanonical target name, for directory use.
1497 case ${build_alias} in
1498 "") build_noncanonical=${build} ;;
6e3f3080
NN
1499 *) build_noncanonical=${build_alias} ;;
1500esac
73458fb7 1501
4665e56c
NN
1502 case ${host_alias} in
1503 "") host_noncanonical=${build_noncanonical} ;;
1504 *) host_noncanonical=${host_alias} ;;
1505esac
73458fb7 1506
4665e56c
NN
1507 case ${target_alias} in
1508 "") target_noncanonical=${host_noncanonical} ;;
1509 *) target_noncanonical=${target_alias} ;;
1510esac
093e61a6 1511
8f1529e6
L
1512
1513
1514
1515# Determine the target- and build-specific subdirectories
4665e56c
NN
1516 # Prefix 'build-' so this never conflicts with target_subdir.
1517build_subdir="build-${build_noncanonical}"
215c351a
PB
1518# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1519if ( test $srcdir = . && test -d gcc ) \
1520 || test -d $srcdir/../host-${host_noncanonical}; then
1521 host_subdir="host-${host_noncanonical}"
1522else
1523 host_subdir=.
1524fi
4665e56c
NN
1525# No prefix.
1526target_subdir=${target_noncanonical}
ba479fd2 1527
73458fb7 1528
093e61a6 1529# Set program_transform_name
13c22933 1530test "$program_prefix" != NONE &&
ba479fd2 1531 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1532# Use a double $ so make ignores it.
1533test "$program_suffix" != NONE &&
ba479fd2
NN
1534 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1535# Double any \ or $. echo might interpret backslashes.
1536# By default was `s,x,x', remove it if useless.
1537cat <<\_ACEOF >conftest.sed
1538s/[\\$]/&&/g;s/;s,x,x,$//
1539_ACEOF
1540program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1541rm conftest.sed
13c22933
JJ
1542
1543
34a86c2b
NN
1544# Check for bogus environment variables.
1545# Test if LIBRARY_PATH contains the notation for the current directory
1546# since this would lead to problems installing/building glibc.
1547# LIBRARY_PATH contains the current directory if one of the following
1548# is true:
1549# - one of the terminals (":" and ";") is the first or last sign
1550# - two terminals occur directly after each other
1551# - the path contains an element with a dot in it
ba479fd2
NN
1552echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1553echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1554case ${LIBRARY_PATH} in
1555 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1556 library_path_setting="contains current directory"
1557 ;;
1558 *)
1559 library_path_setting="ok"
1560 ;;
1561esac
ba479fd2
NN
1562echo "$as_me:$LINENO: result: $library_path_setting" >&5
1563echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1564if test "$library_path_setting" != "ok"; then
ba479fd2 1565{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1566*** LIBRARY_PATH shouldn't contain the current directory when
1567*** building gcc. Please change the environment variable
ba479fd2
NN
1568*** and run configure again." >&5
1569echo "$as_me: error:
1570*** LIBRARY_PATH shouldn't contain the current directory when
1571*** building gcc. Please change the environment variable
1572*** and run configure again." >&2;}
1573 { (exit 1); exit 1; }; }
e9a25f70
JL
1574fi
1575
34a86c2b
NN
1576# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1577# since this would lead to problems installing/building glibc.
1578# GCC_EXEC_PREFIX contains the current directory if one of the following
1579# is true:
1580# - one of the terminals (":" and ";") is the first or last sign
1581# - two terminals occur directly after each other
1582# - the path contains an element with a dot in it
ba479fd2
NN
1583echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1584echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1585case ${GCC_EXEC_PREFIX} in
1586 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1587 gcc_exec_prefix_setting="contains current directory"
1588 ;;
1589 *)
1590 gcc_exec_prefix_setting="ok"
1591 ;;
1592esac
ba479fd2
NN
1593echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1594echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1595if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1596{ { echo "$as_me:$LINENO: error:
1597*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1598*** building gcc. Please change the environment variable
1599*** and run configure again." >&5
1600echo "$as_me: error:
cafe096b
EC
1601*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1602*** building gcc. Please change the environment variable
ba479fd2
NN
1603*** and run configure again." >&2;}
1604 { (exit 1); exit 1; }; }
34a86c2b
NN
1605fi
1606
1607# -----------
1608# Directories
1609# -----------
1610
1611# Specify the local prefix
1612local_prefix=
ba479fd2 1613
34a86c2b
NN
1614# Check whether --with-local-prefix or --without-local-prefix was given.
1615if test "${with_local_prefix+set}" = set; then
1616 withval="$with_local_prefix"
1617 case "${withval}" in
ba479fd2
NN
1618yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1619echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1620 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1621no) ;;
1622*) local_prefix=$with_local_prefix ;;
1623esac
ba479fd2 1624fi;
34a86c2b
NN
1625
1626# Default local prefix if it is empty
1627if test x$local_prefix = x; then
1628 local_prefix=/usr/local
1629fi
1630
1631# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1632# passed in by the toplevel make and thus we'd get different behavior
1633# depending on where we built the sources.
1634gcc_gxx_include_dir=
1635# Specify the g++ header file directory
ba479fd2 1636
34a86c2b
NN
1637# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1638if test "${with_gxx_include_dir+set}" = set; then
1639 withval="$with_gxx_include_dir"
1640 case "${withval}" in
ba479fd2
NN
1641yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1642echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1643 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1644no) ;;
1645*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1646esac
ba479fd2 1647fi;
34a86c2b
NN
1648
1649if test x${gcc_gxx_include_dir} = x; then
1650 if test x${enable_version_specific_runtime_libs} = xyes; then
1651 gcc_gxx_include_dir='${libsubdir}/include/c++'
1652 else
a1286ef5 1653 libstdcxx_incdir='c++/$(version)'
34a86c2b
NN
1654 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
1655 fi
1656fi
1657
ba479fd2 1658
34a86c2b
NN
1659# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1660if test "${with_cpp_install_dir+set}" = set; then
1661 withval="$with_cpp_install_dir"
1662 if test x$withval = xyes; then
ba479fd2
NN
1663 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1664echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1665 { (exit 1); exit 1; }; }
34a86c2b
NN
1666elif test x$withval != xno; then
1667 cpp_install_dir=$withval
1668fi
ba479fd2 1669fi;
34a86c2b 1670
51b9ff45 1671# We would like to our source tree to be readonly. However when releases or
ba479fd2 1672# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1673# various formats of manuals need to be included along with the rest of the
ba479fd2 1674# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1675# just that.
1676
03787dfd
KC
1677echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1678echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1679 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45
KC
1680if test "${enable_generated_files_in_srcdir+set}" = set; then
1681 enableval="$enable_generated_files_in_srcdir"
03787dfd 1682 generated_files_in_srcdir=$enableval
51b9ff45 1683else
03787dfd 1684 generated_files_in_srcdir=no
ba479fd2 1685fi;
51b9ff45 1686
03787dfd
KC
1687echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1688echo "${ECHO_T}$generated_files_in_srcdir" >&6
1689
1690if test "$generated_files_in_srcdir" = "yes"; then
1691 GENINSRC=''
03787dfd
KC
1692else
1693 GENINSRC='#'
03787dfd
KC
1694fi
1695
1696
34a86c2b
NN
1697# -------------------
1698# Find default linker
1699# -------------------
1700
1701# With GNU ld
ba479fd2 1702
34a86c2b
NN
1703# Check whether --with-gnu-ld or --without-gnu-ld was given.
1704if test "${with_gnu_ld+set}" = set; then
1705 withval="$with_gnu_ld"
1706 gnu_ld_flag="$with_gnu_ld"
1707else
1708 gnu_ld_flag=no
ba479fd2 1709fi;
6e3f3080 1710
63cf211a 1711# With pre-defined ld
ba479fd2 1712
34a86c2b
NN
1713# Check whether --with-ld or --without-ld was given.
1714if test "${with_ld+set}" = set; then
1715 withval="$with_ld"
1716 DEFAULT_LINKER="$with_ld"
ba479fd2 1717fi;
34a86c2b
NN
1718if test x"${DEFAULT_LINKER+set}" = x"set"; then
1719 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1720 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1721echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1722 { (exit 1); exit 1; }; }
34a86c2b
NN
1723 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1724 gnu_ld_flag=yes
1725 fi
ba479fd2
NN
1726
1727cat >>confdefs.h <<_ACEOF
34a86c2b 1728#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1729_ACEOF
34a86c2b
NN
1730
1731fi
1732
ba479fd2
NN
1733echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1734echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1735if test x"${DEFAULT_LINKER+set}" = x"set"; then
1736 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1737 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1738echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1739 else
ba479fd2
NN
1740 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1741echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1742 fi
1743else
ba479fd2
NN
1744 echo "$as_me:$LINENO: result: no" >&5
1745echo "${ECHO_T}no" >&6
34a86c2b
NN
1746fi
1747
d594623a
L
1748# With demangler in GNU ld
1749
1750# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
1751if test "${with_demangler_in_ld+set}" = set; then
1752 withval="$with_demangler_in_ld"
1753 demangler_in_ld="$with_demangler_in_ld"
1754else
1755 demangler_in_ld=no
1756fi;
1757
34a86c2b
NN
1758# ----------------------
1759# Find default assembler
1760# ----------------------
1761
1762# With GNU as
ba479fd2 1763
34a86c2b
NN
1764# Check whether --with-gnu-as or --without-gnu-as was given.
1765if test "${with_gnu_as+set}" = set; then
1766 withval="$with_gnu_as"
1767 gas_flag="$with_gnu_as"
1768else
1769 gas_flag=no
ba479fd2 1770fi;
34a86c2b
NN
1771
1772
1773# Check whether --with-as or --without-as was given.
1774if test "${with_as+set}" = set; then
1775 withval="$with_as"
1776 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1777fi;
34a86c2b
NN
1778if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1779 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1780 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1781echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1782 { (exit 1); exit 1; }; }
34a86c2b
NN
1783 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1784 gas_flag=yes
1785 fi
ba479fd2
NN
1786
1787cat >>confdefs.h <<_ACEOF
34a86c2b 1788#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1789_ACEOF
34a86c2b
NN
1790
1791fi
1792
ba479fd2
NN
1793echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1794echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1795if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1796 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1797 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1798echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1799 else
ba479fd2
NN
1800 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1801echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1802 fi
1803else
ba479fd2
NN
1804 echo "$as_me:$LINENO: result: no" >&5
1805echo "${ECHO_T}no" >&6
34a86c2b
NN
1806fi
1807
1808# ---------------
1809# Find C compiler
1810# ---------------
1811
426ca3ca
RO
1812# If a non-executable a.out is present (e.g. created by GNU as above even if
1813# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1814# file, even when creating an executable, so an execution test fails.
1815# Remove possible default executable files to avoid this.
1816#
1817# FIXME: This really belongs into AC_PROG_CC and can be removed once
1818# Autoconf includes it.
1819rm -f a.out a.exe b.out
1820
34a86c2b 1821# Find the native compiler
ba479fd2
NN
1822ac_ext=c
1823ac_cpp='$CPP $CPPFLAGS'
1824ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1825ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1826ac_compiler_gnu=$ac_cv_c_compiler_gnu
1827if test -n "$ac_tool_prefix"; then
1828 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1829set dummy ${ac_tool_prefix}gcc; ac_word=$2
1830echo "$as_me:$LINENO: checking for $ac_word" >&5
1831echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1832if test "${ac_cv_prog_CC+set}" = set; then
1833 echo $ECHO_N "(cached) $ECHO_C" >&6
1834else
1835 if test -n "$CC"; then
1836 ac_cv_prog_CC="$CC" # Let the user override the test.
1837else
1838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1839for as_dir in $PATH
1840do
1841 IFS=$as_save_IFS
1842 test -z "$as_dir" && as_dir=.
1843 for ac_exec_ext in '' $ac_executable_extensions; do
1844 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1845 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1846 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1847 break 2
1848 fi
1849done
1850done
1851
1852fi
1853fi
1854CC=$ac_cv_prog_CC
1855if test -n "$CC"; then
1856 echo "$as_me:$LINENO: result: $CC" >&5
1857echo "${ECHO_T}$CC" >&6
1858else
1859 echo "$as_me:$LINENO: result: no" >&5
1860echo "${ECHO_T}no" >&6
1861fi
1862
1863fi
1864if test -z "$ac_cv_prog_CC"; then
1865 ac_ct_CC=$CC
1866 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1867set dummy gcc; ac_word=$2
ba479fd2
NN
1868echo "$as_me:$LINENO: checking for $ac_word" >&5
1869echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1870if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1871 echo $ECHO_N "(cached) $ECHO_C" >&6
1872else
1873 if test -n "$ac_ct_CC"; then
1874 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1875else
1876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1877for as_dir in $PATH
1878do
1879 IFS=$as_save_IFS
1880 test -z "$as_dir" && as_dir=.
1881 for ac_exec_ext in '' $ac_executable_extensions; do
1882 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1883 ac_cv_prog_ac_ct_CC="gcc"
1884 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1885 break 2
1886 fi
1887done
1888done
1889
1890fi
1891fi
1892ac_ct_CC=$ac_cv_prog_ac_ct_CC
1893if test -n "$ac_ct_CC"; then
1894 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1895echo "${ECHO_T}$ac_ct_CC" >&6
1896else
1897 echo "$as_me:$LINENO: result: no" >&5
1898echo "${ECHO_T}no" >&6
1899fi
1900
1901 CC=$ac_ct_CC
1902else
1903 CC="$ac_cv_prog_CC"
1904fi
1905
1906if test -z "$CC"; then
1907 if test -n "$ac_tool_prefix"; then
1908 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1909set dummy ${ac_tool_prefix}cc; ac_word=$2
1910echo "$as_me:$LINENO: checking for $ac_word" >&5
1911echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1912if test "${ac_cv_prog_CC+set}" = set; then
1913 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1914else
1915 if test -n "$CC"; then
1916 ac_cv_prog_CC="$CC" # Let the user override the test.
1917else
ba479fd2
NN
1918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1919for as_dir in $PATH
1920do
1921 IFS=$as_save_IFS
1922 test -z "$as_dir" && as_dir=.
1923 for ac_exec_ext in '' $ac_executable_extensions; do
1924 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1925 ac_cv_prog_CC="${ac_tool_prefix}cc"
1926 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1927 break 2
1928 fi
1929done
1930done
1931
cd9e5e7c
MK
1932fi
1933fi
ba479fd2 1934CC=$ac_cv_prog_CC
cd9e5e7c 1935if test -n "$CC"; then
ba479fd2
NN
1936 echo "$as_me:$LINENO: result: $CC" >&5
1937echo "${ECHO_T}$CC" >&6
1938else
1939 echo "$as_me:$LINENO: result: no" >&5
1940echo "${ECHO_T}no" >&6
1941fi
1942
1943fi
1944if test -z "$ac_cv_prog_CC"; then
1945 ac_ct_CC=$CC
1946 # Extract the first word of "cc", so it can be a program name with args.
1947set dummy cc; ac_word=$2
1948echo "$as_me:$LINENO: checking for $ac_word" >&5
1949echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1950if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1951 echo $ECHO_N "(cached) $ECHO_C" >&6
1952else
1953 if test -n "$ac_ct_CC"; then
1954 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1955else
1956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1957for as_dir in $PATH
1958do
1959 IFS=$as_save_IFS
1960 test -z "$as_dir" && as_dir=.
1961 for ac_exec_ext in '' $ac_executable_extensions; do
1962 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1963 ac_cv_prog_ac_ct_CC="cc"
1964 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1965 break 2
1966 fi
1967done
1968done
1969
1970fi
1971fi
1972ac_ct_CC=$ac_cv_prog_ac_ct_CC
1973if test -n "$ac_ct_CC"; then
1974 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1975echo "${ECHO_T}$ac_ct_CC" >&6
1976else
1977 echo "$as_me:$LINENO: result: no" >&5
1978echo "${ECHO_T}no" >&6
1979fi
1980
1981 CC=$ac_ct_CC
cd9e5e7c 1982else
ba479fd2 1983 CC="$ac_cv_prog_CC"
e9a25f70 1984fi
6e3f3080 1985
ba479fd2 1986fi
6e3f3080
NN
1987if test -z "$CC"; then
1988 # Extract the first word of "cc", so it can be a program name with args.
1989set dummy cc; ac_word=$2
ba479fd2
NN
1990echo "$as_me:$LINENO: checking for $ac_word" >&5
1991echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1992if test "${ac_cv_prog_CC+set}" = set; then
1993 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
1994else
1995 if test -n "$CC"; then
1996 ac_cv_prog_CC="$CC" # Let the user override the test.
1997else
1998 ac_prog_rejected=no
ba479fd2
NN
1999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2000for as_dir in $PATH
2001do
2002 IFS=$as_save_IFS
2003 test -z "$as_dir" && as_dir=.
2004 for ac_exec_ext in '' $ac_executable_extensions; do
2005 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2006 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2007 ac_prog_rejected=yes
2008 continue
2009 fi
2010 ac_cv_prog_CC="cc"
2011 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2012 break 2
2013 fi
2014done
2015done
2016
6e3f3080
NN
2017if test $ac_prog_rejected = yes; then
2018 # We found a bogon in the path, so make sure we never use it.
2019 set dummy $ac_cv_prog_CC
2020 shift
ba479fd2 2021 if test $# != 0; then
6e3f3080
NN
2022 # We chose a different compiler from the bogus one.
2023 # However, it has the same basename, so the bogon will be chosen
2024 # first if we set CC to just the basename; use the full file name.
2025 shift
ba479fd2 2026 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2027 fi
6e3f3080
NN
2028fi
2029fi
2030fi
ba479fd2 2031CC=$ac_cv_prog_CC
6e3f3080 2032if test -n "$CC"; then
ba479fd2
NN
2033 echo "$as_me:$LINENO: result: $CC" >&5
2034echo "${ECHO_T}$CC" >&6
e9a25f70 2035else
ba479fd2
NN
2036 echo "$as_me:$LINENO: result: no" >&5
2037echo "${ECHO_T}no" >&6
e9a25f70 2038fi
6e3f3080 2039
ba479fd2
NN
2040fi
2041if test -z "$CC"; then
2042 if test -n "$ac_tool_prefix"; then
2043 for ac_prog in cl
2044 do
2045 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2046set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2047echo "$as_me:$LINENO: checking for $ac_word" >&5
2048echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2049if test "${ac_cv_prog_CC+set}" = set; then
2050 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2051else
6e3f3080
NN
2052 if test -n "$CC"; then
2053 ac_cv_prog_CC="$CC" # Let the user override the test.
2054else
ba479fd2
NN
2055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2056for as_dir in $PATH
2057do
2058 IFS=$as_save_IFS
2059 test -z "$as_dir" && as_dir=.
2060 for ac_exec_ext in '' $ac_executable_extensions; do
2061 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2062 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2063 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2064 break 2
2065 fi
2066done
2067done
2068
093e61a6 2069fi
6e3f3080 2070fi
ba479fd2 2071CC=$ac_cv_prog_CC
6e3f3080 2072if test -n "$CC"; then
ba479fd2
NN
2073 echo "$as_me:$LINENO: result: $CC" >&5
2074echo "${ECHO_T}$CC" >&6
6e3f3080 2075else
ba479fd2
NN
2076 echo "$as_me:$LINENO: result: no" >&5
2077echo "${ECHO_T}no" >&6
093e61a6 2078fi
cafe096b 2079
ba479fd2
NN
2080 test -n "$CC" && break
2081 done
2082fi
2083if test -z "$CC"; then
2084 ac_ct_CC=$CC
2085 for ac_prog in cl
2086do
2087 # Extract the first word of "$ac_prog", so it can be a program name with args.
2088set dummy $ac_prog; ac_word=$2
2089echo "$as_me:$LINENO: checking for $ac_word" >&5
2090echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2091if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2092 echo $ECHO_N "(cached) $ECHO_C" >&6
2093else
2094 if test -n "$ac_ct_CC"; then
2095 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2096else
2097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2098for as_dir in $PATH
2099do
2100 IFS=$as_save_IFS
2101 test -z "$as_dir" && as_dir=.
2102 for ac_exec_ext in '' $ac_executable_extensions; do
2103 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2104 ac_cv_prog_ac_ct_CC="$ac_prog"
2105 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2106 break 2
2107 fi
2108done
2109done
6e3f3080 2110
ba479fd2
NN
2111fi
2112fi
2113ac_ct_CC=$ac_cv_prog_ac_ct_CC
2114if test -n "$ac_ct_CC"; then
2115 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2116echo "${ECHO_T}$ac_ct_CC" >&6
2117else
2118 echo "$as_me:$LINENO: result: no" >&5
2119echo "${ECHO_T}no" >&6
2120fi
6e3f3080 2121
ba479fd2
NN
2122 test -n "$ac_ct_CC" && break
2123done
63cf211a 2124
ba479fd2
NN
2125 CC=$ac_ct_CC
2126fi
2127
2128fi
2129
2130
2131test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2132See \`config.log' for more details." >&5
2133echo "$as_me: error: no acceptable C compiler found in \$PATH
2134See \`config.log' for more details." >&2;}
2135 { (exit 1); exit 1; }; }
2136
2137# Provide some information about the compiler.
2138echo "$as_me:$LINENO:" \
2139 "checking for C compiler version" >&5
2140ac_compiler=`set X $ac_compile; echo $2`
2141{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2142 (eval $ac_compiler --version </dev/null >&5) 2>&5
2143 ac_status=$?
2144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2145 (exit $ac_status); }
2146{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2147 (eval $ac_compiler -v </dev/null >&5) 2>&5
2148 ac_status=$?
2149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2150 (exit $ac_status); }
2151{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2152 (eval $ac_compiler -V </dev/null >&5) 2>&5
2153 ac_status=$?
2154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2155 (exit $ac_status); }
2156
2157cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2158/* confdefs.h. */
2159_ACEOF
2160cat confdefs.h >>conftest.$ac_ext
2161cat >>conftest.$ac_ext <<_ACEOF
2162/* end confdefs.h. */
2163
2164int
2165main ()
2166{
63cf211a 2167
ba479fd2
NN
2168 ;
2169 return 0;
2170}
2171_ACEOF
2172ac_clean_files_save=$ac_clean_files
2173ac_clean_files="$ac_clean_files a.out a.exe b.out"
2174# Try to create an executable without -o first, disregard a.out.
2175# It will help us diagnose broken compilers, and finding out an intuition
2176# of exeext.
86da66b5
HPN
2177echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2178echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2
NN
2179ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2180if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2181 (eval $ac_link_default) 2>&5
2182 ac_status=$?
2183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2184 (exit $ac_status); }; then
2185 # Find the output, starting from the most likely. This scheme is
2186# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2187# resort.
2188
2189# Be careful to initialize this variable, since it used to be cached.
2190# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2191ac_cv_exeext=
2192# b.out is created by i960 compilers.
2193for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2194do
2195 test -f "$ac_file" || continue
2196 case $ac_file in
2197 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
86da66b5 2198 ;;
ba479fd2 2199 conftest.$ac_ext )
86da66b5
HPN
2200 # This is the source file.
2201 ;;
ba479fd2 2202 [ab].out )
86da66b5
HPN
2203 # We found the default executable, but exeext='' is most
2204 # certainly right.
2205 break;;
ba479fd2 2206 *.* )
86da66b5
HPN
2207 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2208 # FIXME: I believe we export ac_cv_exeext for Libtool,
2209 # but it would be cool to find out if it's true. Does anybody
2210 # maintain Libtool? --akim.
2211 export ac_cv_exeext
2212 break;;
ba479fd2 2213 * )
86da66b5 2214 break;;
ba479fd2
NN
2215 esac
2216done
2217else
2218 echo "$as_me: failed program was:" >&5
2219sed 's/^/| /' conftest.$ac_ext >&5
2220
2221{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2222See \`config.log' for more details." >&5
2223echo "$as_me: error: C compiler cannot create executables
2224See \`config.log' for more details." >&2;}
2225 { (exit 77); exit 77; }; }
2226fi
2227
2228ac_exeext=$ac_cv_exeext
2229echo "$as_me:$LINENO: result: $ac_file" >&5
2230echo "${ECHO_T}$ac_file" >&6
2231
2232# Check the compiler produces executables we can run. If not, either
2233# the compiler is broken, or we cross compile.
2234echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2235echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2236# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2237# If not cross compiling, check that we can run a simple program.
2238if test "$cross_compiling" != yes; then
2239 if { ac_try='./$ac_file'
2240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2241 (eval $ac_try) 2>&5
2242 ac_status=$?
2243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2244 (exit $ac_status); }; }; then
2245 cross_compiling=no
6e3f3080 2246 else
ba479fd2
NN
2247 if test "$cross_compiling" = maybe; then
2248 cross_compiling=yes
2249 else
2250 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2251If you meant to cross compile, use \`--host'.
2252See \`config.log' for more details." >&5
2253echo "$as_me: error: cannot run C compiled programs.
2254If you meant to cross compile, use \`--host'.
2255See \`config.log' for more details." >&2;}
2256 { (exit 1); exit 1; }; }
2257 fi
6e3f3080
NN
2258 fi
2259fi
ba479fd2
NN
2260echo "$as_me:$LINENO: result: yes" >&5
2261echo "${ECHO_T}yes" >&6
2262
2263rm -f a.out a.exe conftest$ac_cv_exeext b.out
2264ac_clean_files=$ac_clean_files_save
2265# Check the compiler produces executables we can run. If not, either
2266# the compiler is broken, or we cross compile.
2267echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2268echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2269echo "$as_me:$LINENO: result: $cross_compiling" >&5
2270echo "${ECHO_T}$cross_compiling" >&6
2271
2272echo "$as_me:$LINENO: checking for suffix of executables" >&5
2273echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2274if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2275 (eval $ac_link) 2>&5
2276 ac_status=$?
2277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2278 (exit $ac_status); }; then
2279 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2280# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2281# work properly (i.e., refer to `conftest.exe'), while it won't with
2282# `rm'.
2283for ac_file in conftest.exe conftest conftest.*; do
2284 test -f "$ac_file" || continue
2285 case $ac_file in
2286 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2287 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
86da66b5
HPN
2288 export ac_cv_exeext
2289 break;;
ba479fd2
NN
2290 * ) break;;
2291 esac
2292done
e9a25f70 2293else
ba479fd2
NN
2294 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2295See \`config.log' for more details." >&5
2296echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2297See \`config.log' for more details." >&2;}
2298 { (exit 1); exit 1; }; }
2299fi
2300
2301rm -f conftest$ac_cv_exeext
2302echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2303echo "${ECHO_T}$ac_cv_exeext" >&6
2304
2305rm -f conftest.$ac_ext
2306EXEEXT=$ac_cv_exeext
2307ac_exeext=$EXEEXT
2308echo "$as_me:$LINENO: checking for suffix of object files" >&5
2309echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2310if test "${ac_cv_objext+set}" = set; then
2311 echo $ECHO_N "(cached) $ECHO_C" >&6
2312else
2313 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2314/* confdefs.h. */
2315_ACEOF
2316cat confdefs.h >>conftest.$ac_ext
2317cat >>conftest.$ac_ext <<_ACEOF
2318/* end confdefs.h. */
2319
2320int
2321main ()
2322{
6e3f3080 2323
ba479fd2
NN
2324 ;
2325 return 0;
2326}
2327_ACEOF
2328rm -f conftest.o conftest.obj
2329if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2330 (eval $ac_compile) 2>&5
2331 ac_status=$?
2332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2333 (exit $ac_status); }; then
2334 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2335 case $ac_file in
2336 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2337 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2338 break;;
2339 esac
2340done
63cf211a 2341else
ba479fd2
NN
2342 echo "$as_me: failed program was:" >&5
2343sed 's/^/| /' conftest.$ac_ext >&5
2344
2345{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2346See \`config.log' for more details." >&5
2347echo "$as_me: error: cannot compute suffix of object files: cannot compile
2348See \`config.log' for more details." >&2;}
2349 { (exit 1); exit 1; }; }
2350fi
2351
2352rm -f conftest.$ac_cv_objext conftest.$ac_ext
2353fi
2354echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2355echo "${ECHO_T}$ac_cv_objext" >&6
2356OBJEXT=$ac_cv_objext
2357ac_objext=$OBJEXT
2358echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2359echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2360if test "${ac_cv_c_compiler_gnu+set}" = set; then
2361 echo $ECHO_N "(cached) $ECHO_C" >&6
2362else
2363 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2364/* confdefs.h. */
2365_ACEOF
2366cat confdefs.h >>conftest.$ac_ext
2367cat >>conftest.$ac_ext <<_ACEOF
2368/* end confdefs.h. */
2369
2370int
2371main ()
2372{
2373#ifndef __GNUC__
2374 choke me
2375#endif
6e3f3080 2376
ba479fd2
NN
2377 ;
2378 return 0;
2379}
2380_ACEOF
2381rm -f conftest.$ac_objext
2382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2383 (eval $ac_compile) 2>conftest.er1
ba479fd2 2384 ac_status=$?
86da66b5
HPN
2385 grep -v '^ *+' conftest.er1 >conftest.err
2386 rm -f conftest.er1
2387 cat conftest.err >&5
ba479fd2
NN
2388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2389 (exit $ac_status); } &&
a1286ef5
ZW
2390 { ac_try='test -z "$ac_c_werror_flag"
2391 || test ! -s conftest.err'
86da66b5
HPN
2392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2393 (eval $ac_try) 2>&5
2394 ac_status=$?
2395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2396 (exit $ac_status); }; } &&
2397 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2399 (eval $ac_try) 2>&5
2400 ac_status=$?
2401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2402 (exit $ac_status); }; }; then
2403 ac_compiler_gnu=yes
2404else
2405 echo "$as_me: failed program was:" >&5
2406sed 's/^/| /' conftest.$ac_ext >&5
2407
2408ac_compiler_gnu=no
2409fi
86da66b5 2410rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2411ac_cv_c_compiler_gnu=$ac_compiler_gnu
2412
2413fi
2414echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2415echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2416GCC=`test $ac_compiler_gnu = yes && echo yes`
2417ac_test_CFLAGS=${CFLAGS+set}
2418ac_save_CFLAGS=$CFLAGS
2419CFLAGS="-g"
2420echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2421echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2422if test "${ac_cv_prog_cc_g+set}" = set; then
2423 echo $ECHO_N "(cached) $ECHO_C" >&6
2424else
2425 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2426/* confdefs.h. */
2427_ACEOF
2428cat confdefs.h >>conftest.$ac_ext
2429cat >>conftest.$ac_ext <<_ACEOF
2430/* end confdefs.h. */
2431
2432int
2433main ()
2434{
2435
2436 ;
2437 return 0;
2438}
2439_ACEOF
2440rm -f conftest.$ac_objext
2441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2442 (eval $ac_compile) 2>conftest.er1
ba479fd2 2443 ac_status=$?
86da66b5
HPN
2444 grep -v '^ *+' conftest.er1 >conftest.err
2445 rm -f conftest.er1
2446 cat conftest.err >&5
ba479fd2
NN
2447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2448 (exit $ac_status); } &&
a1286ef5
ZW
2449 { ac_try='test -z "$ac_c_werror_flag"
2450 || test ! -s conftest.err'
86da66b5
HPN
2451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2452 (eval $ac_try) 2>&5
2453 ac_status=$?
2454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2455 (exit $ac_status); }; } &&
2456 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2458 (eval $ac_try) 2>&5
2459 ac_status=$?
2460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2461 (exit $ac_status); }; }; then
6e3f3080
NN
2462 ac_cv_prog_cc_g=yes
2463else
ba479fd2
NN
2464 echo "$as_me: failed program was:" >&5
2465sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2466
ba479fd2 2467ac_cv_prog_cc_g=no
6e3f3080 2468fi
86da66b5 2469rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2470fi
2471echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2472echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2473if test "$ac_test_CFLAGS" = set; then
ba479fd2 2474 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2475elif test $ac_cv_prog_cc_g = yes; then
2476 if test "$GCC" = yes; then
e9a25f70
JL
2477 CFLAGS="-g -O2"
2478 else
cd9e5e7c 2479 CFLAGS="-g"
81814e35 2480 fi
3723cad9 2481else
cd9e5e7c
MK
2482 if test "$GCC" = yes; then
2483 CFLAGS="-O2"
2484 else
2485 CFLAGS=
2486 fi
e9a25f70 2487fi
ba479fd2
NN
2488echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2489echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2490if test "${ac_cv_prog_cc_stdc+set}" = set; then
2491 echo $ECHO_N "(cached) $ECHO_C" >&6
2492else
2493 ac_cv_prog_cc_stdc=no
2494ac_save_CC=$CC
2495cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2496/* confdefs.h. */
2497_ACEOF
2498cat confdefs.h >>conftest.$ac_ext
2499cat >>conftest.$ac_ext <<_ACEOF
2500/* end confdefs.h. */
2501#include <stdarg.h>
2502#include <stdio.h>
2503#include <sys/types.h>
2504#include <sys/stat.h>
2505/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2506struct buf { int x; };
2507FILE * (*rcsopen) (struct buf *, struct stat *, int);
2508static char *e (p, i)
2509 char **p;
2510 int i;
2511{
2512 return p[i];
2513}
2514static char *f (char * (*g) (char **, int), char **p, ...)
2515{
2516 char *s;
2517 va_list v;
2518 va_start (v,p);
2519 s = g (p, va_arg (v,int));
2520 va_end (v);
2521 return s;
2522}
86da66b5
HPN
2523
2524/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2525 function prototypes and stuff, but not '\xHH' hex character constants.
2526 These don't provoke an error unfortunately, instead are silently treated
2527 as 'x'. The following induces an error, until -std1 is added to get
2528 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2529 array size at least. It's necessary to write '\x00'==0 to get something
2530 that's true only with -std1. */
2531int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2532
ba479fd2
NN
2533int test (int i, double x);
2534struct s1 {int (*f) (int a);};
2535struct s2 {int (*f) (double a);};
2536int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2537int argc;
2538char **argv;
2539int
2540main ()
2541{
2542return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2543 ;
2544 return 0;
2545}
2546_ACEOF
2547# Don't try gcc -ansi; that turns off useful extensions and
2548# breaks some systems' header files.
2549# AIX -qlanglvl=ansi
2550# Ultrix and OSF/1 -std1
2551# HP-UX 10.20 and later -Ae
2552# HP-UX older versions -Aa -D_HPUX_SOURCE
2553# SVR4 -Xc -D__EXTENSIONS__
2554for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2555do
2556 CC="$ac_save_CC $ac_arg"
2557 rm -f conftest.$ac_objext
2558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2559 (eval $ac_compile) 2>conftest.er1
ba479fd2 2560 ac_status=$?
86da66b5
HPN
2561 grep -v '^ *+' conftest.er1 >conftest.err
2562 rm -f conftest.er1
2563 cat conftest.err >&5
ba479fd2
NN
2564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2565 (exit $ac_status); } &&
a1286ef5
ZW
2566 { ac_try='test -z "$ac_c_werror_flag"
2567 || test ! -s conftest.err'
86da66b5
HPN
2568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2569 (eval $ac_try) 2>&5
2570 ac_status=$?
2571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2572 (exit $ac_status); }; } &&
2573 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2575 (eval $ac_try) 2>&5
2576 ac_status=$?
2577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2578 (exit $ac_status); }; }; then
2579 ac_cv_prog_cc_stdc=$ac_arg
2580break
2581else
2582 echo "$as_me: failed program was:" >&5
2583sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2584
ba479fd2 2585fi
86da66b5 2586rm -f conftest.err conftest.$ac_objext
ba479fd2
NN
2587done
2588rm -f conftest.$ac_ext conftest.$ac_objext
2589CC=$ac_save_CC
2590
2591fi
2592
2593case "x$ac_cv_prog_cc_stdc" in
2594 x|xno)
2595 echo "$as_me:$LINENO: result: none needed" >&5
2596echo "${ECHO_T}none needed" >&6 ;;
2597 *)
2598 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2599echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2600 CC="$CC $ac_cv_prog_cc_stdc" ;;
2601esac
2602
2603# Some people use a C++ compiler to compile C. Since we use `exit',
2604# in C++ we need to declare it. In case someone uses the same compiler
2605# for both compiling C and C++ we need to have the C++ compiler decide
2606# the declaration of exit, since it's the most demanding environment.
2607cat >conftest.$ac_ext <<_ACEOF
2608#ifndef __cplusplus
2609 choke me
2610#endif
2611_ACEOF
2612rm -f conftest.$ac_objext
2613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2614 (eval $ac_compile) 2>conftest.er1
ba479fd2 2615 ac_status=$?
86da66b5
HPN
2616 grep -v '^ *+' conftest.er1 >conftest.err
2617 rm -f conftest.er1
2618 cat conftest.err >&5
ba479fd2
NN
2619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2620 (exit $ac_status); } &&
a1286ef5
ZW
2621 { ac_try='test -z "$ac_c_werror_flag"
2622 || test ! -s conftest.err'
86da66b5
HPN
2623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2624 (eval $ac_try) 2>&5
2625 ac_status=$?
2626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2627 (exit $ac_status); }; } &&
2628 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2630 (eval $ac_try) 2>&5
2631 ac_status=$?
2632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2633 (exit $ac_status); }; }; then
2634 for ac_declaration in \
86da66b5 2635 '' \
ba479fd2
NN
2636 'extern "C" void std::exit (int) throw (); using std::exit;' \
2637 'extern "C" void std::exit (int); using std::exit;' \
2638 'extern "C" void exit (int) throw ();' \
2639 'extern "C" void exit (int);' \
2640 'void exit (int);'
2641do
2642 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2643/* confdefs.h. */
2644_ACEOF
2645cat confdefs.h >>conftest.$ac_ext
2646cat >>conftest.$ac_ext <<_ACEOF
2647/* end confdefs.h. */
33e70558 2648$ac_declaration
86da66b5 2649#include <stdlib.h>
ba479fd2
NN
2650int
2651main ()
2652{
2653exit (42);
2654 ;
2655 return 0;
2656}
2657_ACEOF
2658rm -f conftest.$ac_objext
2659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2660 (eval $ac_compile) 2>conftest.er1
ba479fd2 2661 ac_status=$?
86da66b5
HPN
2662 grep -v '^ *+' conftest.er1 >conftest.err
2663 rm -f conftest.er1
2664 cat conftest.err >&5
ba479fd2
NN
2665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2666 (exit $ac_status); } &&
a1286ef5
ZW
2667 { ac_try='test -z "$ac_c_werror_flag"
2668 || test ! -s conftest.err'
86da66b5
HPN
2669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2670 (eval $ac_try) 2>&5
2671 ac_status=$?
2672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2673 (exit $ac_status); }; } &&
2674 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2676 (eval $ac_try) 2>&5
2677 ac_status=$?
2678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2679 (exit $ac_status); }; }; then
2680 :
2681else
2682 echo "$as_me: failed program was:" >&5
2683sed 's/^/| /' conftest.$ac_ext >&5
2684
2685continue
2686fi
86da66b5 2687rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 2688 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2689/* confdefs.h. */
2690_ACEOF
2691cat confdefs.h >>conftest.$ac_ext
2692cat >>conftest.$ac_ext <<_ACEOF
2693/* end confdefs.h. */
2694$ac_declaration
2695int
2696main ()
2697{
2698exit (42);
2699 ;
2700 return 0;
2701}
2702_ACEOF
2703rm -f conftest.$ac_objext
2704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2705 (eval $ac_compile) 2>conftest.er1
ba479fd2 2706 ac_status=$?
86da66b5
HPN
2707 grep -v '^ *+' conftest.er1 >conftest.err
2708 rm -f conftest.er1
2709 cat conftest.err >&5
ba479fd2
NN
2710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2711 (exit $ac_status); } &&
a1286ef5
ZW
2712 { ac_try='test -z "$ac_c_werror_flag"
2713 || test ! -s conftest.err'
86da66b5
HPN
2714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2715 (eval $ac_try) 2>&5
2716 ac_status=$?
2717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2718 (exit $ac_status); }; } &&
2719 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2721 (eval $ac_try) 2>&5
2722 ac_status=$?
2723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2724 (exit $ac_status); }; }; then
2725 break
3ec83fc2 2726else
ba479fd2
NN
2727 echo "$as_me: failed program was:" >&5
2728sed 's/^/| /' conftest.$ac_ext >&5
2729
6e3f3080 2730fi
86da66b5 2731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2732done
2733rm -f conftest*
2734if test -n "$ac_declaration"; then
2735 echo '#ifdef __cplusplus' >>confdefs.h
2736 echo $ac_declaration >>confdefs.h
2737 echo '#endif' >>confdefs.h
2738fi
2739
3ec83fc2 2740else
ba479fd2
NN
2741 echo "$as_me: failed program was:" >&5
2742sed 's/^/| /' conftest.$ac_ext >&5
2743
2744fi
86da66b5 2745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2746ac_ext=c
2747ac_cpp='$CPP $CPPFLAGS'
2748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2750ac_compiler_gnu=$ac_cv_c_compiler_gnu
2751
2752if test "x$CC" != xcc; then
2753 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2754echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2755else
2756 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2757echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2758fi
2759set dummy $CC; ac_cc=`echo $2 |
2760 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2761if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2762 echo $ECHO_N "(cached) $ECHO_C" >&6
2763else
2764 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2765/* confdefs.h. */
2766_ACEOF
2767cat confdefs.h >>conftest.$ac_ext
2768cat >>conftest.$ac_ext <<_ACEOF
2769/* end confdefs.h. */
2770
2771int
2772main ()
2773{
2774
2775 ;
2776 return 0;
2777}
2778_ACEOF
3ec83fc2
RH
2779# Make sure it works both with $CC and with simple cc.
2780# We do the test twice because some compilers refuse to overwrite an
2781# existing .o file with -o, though they will create one.
ba479fd2
NN
2782ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2783if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2784 (eval $ac_try) 2>&5
2785 ac_status=$?
2786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2787 (exit $ac_status); } &&
2788 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2789 (eval $ac_try) 2>&5
2790 ac_status=$?
2791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2792 (exit $ac_status); };
3ec83fc2
RH
2793then
2794 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2795 if test "x$CC" != xcc; then
2796 # Test first that cc exists at all.
ba479fd2
NN
2797 if { ac_try='cc -c conftest.$ac_ext >&5'
2798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2799 (eval $ac_try) 2>&5
2800 ac_status=$?
2801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2802 (exit $ac_status); }; }; then
2803 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2804 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2805 (eval $ac_try) 2>&5
2806 ac_status=$?
2807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2808 (exit $ac_status); } &&
2809 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2810 (eval $ac_try) 2>&5
2811 ac_status=$?
2812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2813 (exit $ac_status); };
3ec83fc2 2814 then
86da66b5
HPN
2815 # cc works too.
2816 :
3ec83fc2 2817 else
86da66b5
HPN
2818 # cc exists but doesn't like -o.
2819 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2820 fi
2821 fi
2822 fi
2823else
2824 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2825fi
2826rm -f conftest*
2827
2828fi
2829if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2830 echo "$as_me:$LINENO: result: yes" >&5
2831echo "${ECHO_T}yes" >&6
3ec83fc2 2832else
ba479fd2
NN
2833 echo "$as_me:$LINENO: result: no" >&5
2834echo "${ECHO_T}no" >&6
2835
2836cat >>confdefs.h <<\_ACEOF
3ec83fc2 2837#define NO_MINUS_C_MINUS_O 1
ba479fd2 2838_ACEOF
3ec83fc2
RH
2839
2840fi
2841
3b620440
KC
2842# expand $ac_aux_dir to an absolute path
2843am_aux_dir=`cd $ac_aux_dir && pwd`
2844
2845# FIXME: we rely on the cache variable name because
2846# there is no other way.
2847set dummy $CC
2848ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2849if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2850 # Losing compiler, so override with the script.
2851 # FIXME: It is wrong to rewrite CC.
2852 # But if we don't then we get into trouble of one sort or another.
2853 # A longer-term fix would be to have automake use am__CC in this case,
2854 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2855 CC="$am_aux_dir/compile $CC"
2856fi
2857
414d23ae
HPN
2858# autoconf is lame and doesn't give us any substitution variable for this.
2859if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2860 NO_MINUS_C_MINUS_O=yes
2861else
2862 OUTPUT_OPTION='-o $@'
2863fi
2864
2865
2866
73458fb7
NN
2867# -------------------------
2868# Check C compiler features
2869# -------------------------
2870
ba479fd2
NN
2871ac_ext=c
2872ac_cpp='$CPP $CPPFLAGS'
2873ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2874ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2875ac_compiler_gnu=$ac_cv_c_compiler_gnu
2876echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2877echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2878# On Suns, sometimes $CPP names a directory.
2879if test -n "$CPP" && test -d "$CPP"; then
2880 CPP=
2881fi
2882if test -z "$CPP"; then
ba479fd2
NN
2883 if test "${ac_cv_prog_CPP+set}" = set; then
2884 echo $ECHO_N "(cached) $ECHO_C" >&6
2885else
2886 # Double quotes because CPP needs to be expanded
2887 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2888 do
2889 ac_preproc_ok=false
2890for ac_c_preproc_warn_flag in '' yes
2891do
2892 # Use a header file that comes with gcc, so configuring glibc
2893 # with a fresh cross-compiler works.
2894 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2895 # <limits.h> exists even on freestanding compilers.
84c041a1 2896 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2897 # not just through cpp. "Syntax error" is here to catch this case.
2898 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2899/* confdefs.h. */
2900_ACEOF
2901cat confdefs.h >>conftest.$ac_ext
2902cat >>conftest.$ac_ext <<_ACEOF
2903/* end confdefs.h. */
2904#ifdef __STDC__
2905# include <limits.h>
2906#else
2907# include <assert.h>
2908#endif
86da66b5 2909 Syntax error
ba479fd2
NN
2910_ACEOF
2911if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2912 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2913 ac_status=$?
2914 grep -v '^ *+' conftest.er1 >conftest.err
2915 rm -f conftest.er1
2916 cat conftest.err >&5
2917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2918 (exit $ac_status); } >/dev/null; then
2919 if test -s conftest.err; then
2920 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2921 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2922 else
2923 ac_cpp_err=
2924 fi
2925else
2926 ac_cpp_err=yes
2927fi
2928if test -z "$ac_cpp_err"; then
093e61a6 2929 :
cafe096b 2930else
ba479fd2
NN
2931 echo "$as_me: failed program was:" >&5
2932sed 's/^/| /' conftest.$ac_ext >&5
2933
2934 # Broken: fails on valid input.
2935continue
2936fi
2937rm -f conftest.err conftest.$ac_ext
2938
2939 # OK, works on sane cases. Now check whether non-existent headers
2940 # can be detected and how.
2941 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2942/* confdefs.h. */
2943_ACEOF
2944cat confdefs.h >>conftest.$ac_ext
2945cat >>conftest.$ac_ext <<_ACEOF
2946/* end confdefs.h. */
2947#include <ac_nonexistent.h>
2948_ACEOF
2949if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2950 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2951 ac_status=$?
2952 grep -v '^ *+' conftest.er1 >conftest.err
2953 rm -f conftest.er1
2954 cat conftest.err >&5
2955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2956 (exit $ac_status); } >/dev/null; then
2957 if test -s conftest.err; then
2958 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2959 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2960 else
2961 ac_cpp_err=
2962 fi
2963else
2964 ac_cpp_err=yes
2965fi
2966if test -z "$ac_cpp_err"; then
2967 # Broken: success on invalid input.
2968continue
2969else
2970 echo "$as_me: failed program was:" >&5
2971sed 's/^/| /' conftest.$ac_ext >&5
2972
2973 # Passes both tests.
2974ac_preproc_ok=:
2975break
2976fi
2977rm -f conftest.err conftest.$ac_ext
2978
2979done
2980# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2981rm -f conftest.err conftest.$ac_ext
2982if $ac_preproc_ok; then
2983 break
2984fi
2985
2986 done
2987 ac_cv_prog_CPP=$CPP
2988
2989fi
2990 CPP=$ac_cv_prog_CPP
2991else
2992 ac_cv_prog_CPP=$CPP
2993fi
2994echo "$as_me:$LINENO: result: $CPP" >&5
2995echo "${ECHO_T}$CPP" >&6
2996ac_preproc_ok=false
2997for ac_c_preproc_warn_flag in '' yes
2998do
2999 # Use a header file that comes with gcc, so configuring glibc
3000 # with a fresh cross-compiler works.
3001 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3002 # <limits.h> exists even on freestanding compilers.
3003 # On the NeXT, cc -E runs the code through the compiler's parser,
3004 # not just through cpp. "Syntax error" is here to catch this case.
3005 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3006/* confdefs.h. */
3007_ACEOF
3008cat confdefs.h >>conftest.$ac_ext
3009cat >>conftest.$ac_ext <<_ACEOF
3010/* end confdefs.h. */
3011#ifdef __STDC__
3012# include <limits.h>
3013#else
3014# include <assert.h>
3015#endif
86da66b5 3016 Syntax error
ba479fd2
NN
3017_ACEOF
3018if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3019 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3020 ac_status=$?
3021 grep -v '^ *+' conftest.er1 >conftest.err
3022 rm -f conftest.er1
3023 cat conftest.err >&5
3024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3025 (exit $ac_status); } >/dev/null; then
3026 if test -s conftest.err; then
3027 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3028 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3029 else
3030 ac_cpp_err=
3031 fi
3032else
3033 ac_cpp_err=yes
3034fi
3035if test -z "$ac_cpp_err"; then
6e3f3080 3036 :
414d23ae 3037else
ba479fd2
NN
3038 echo "$as_me: failed program was:" >&5
3039sed 's/^/| /' conftest.$ac_ext >&5
3040
3041 # Broken: fails on valid input.
3042continue
3043fi
3044rm -f conftest.err conftest.$ac_ext
3045
3046 # OK, works on sane cases. Now check whether non-existent headers
3047 # can be detected and how.
3048 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3049/* confdefs.h. */
3050_ACEOF
3051cat confdefs.h >>conftest.$ac_ext
3052cat >>conftest.$ac_ext <<_ACEOF
3053/* end confdefs.h. */
3054#include <ac_nonexistent.h>
3055_ACEOF
3056if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3057 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3058 ac_status=$?
3059 grep -v '^ *+' conftest.er1 >conftest.err
3060 rm -f conftest.er1
3061 cat conftest.err >&5
3062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3063 (exit $ac_status); } >/dev/null; then
3064 if test -s conftest.err; then
3065 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3066 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3067 else
3068 ac_cpp_err=
3069 fi
6e3f3080 3070else
ba479fd2 3071 ac_cpp_err=yes
63cf211a 3072fi
ba479fd2
NN
3073if test -z "$ac_cpp_err"; then
3074 # Broken: success on invalid input.
3075continue
3076else
3077 echo "$as_me: failed program was:" >&5
3078sed 's/^/| /' conftest.$ac_ext >&5
3079
3080 # Passes both tests.
3081ac_preproc_ok=:
3082break
63cf211a 3083fi
ba479fd2
NN
3084rm -f conftest.err conftest.$ac_ext
3085
3086done
3087# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3088rm -f conftest.err conftest.$ac_ext
3089if $ac_preproc_ok; then
3090 :
6e3f3080 3091else
ba479fd2
NN
3092 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3093See \`config.log' for more details." >&5
3094echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3095See \`config.log' for more details." >&2;}
3096 { (exit 1); exit 1; }; }
6e3f3080
NN
3097fi
3098
ba479fd2
NN
3099ac_ext=c
3100ac_cpp='$CPP $CPPFLAGS'
3101ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3102ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3103ac_compiler_gnu=$ac_cv_c_compiler_gnu
3104
b5472e1d 3105
ba479fd2
NN
3106echo "$as_me:$LINENO: checking for inline" >&5
3107echo $ECHO_N "checking for inline... $ECHO_C" >&6
3108if test "${ac_cv_c_inline+set}" = set; then
3109 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3110else
3111 ac_cv_c_inline=no
3112for ac_kw in inline __inline__ __inline; do
ba479fd2 3113 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3114/* confdefs.h. */
3115_ACEOF
3116cat confdefs.h >>conftest.$ac_ext
3117cat >>conftest.$ac_ext <<_ACEOF
3118/* end confdefs.h. */
3119#ifndef __cplusplus
3120typedef int foo_t;
3121static $ac_kw foo_t static_foo () {return 0; }
3122$ac_kw foo_t foo () {return 0; }
3123#endif
414d23ae 3124
ba479fd2
NN
3125_ACEOF
3126rm -f conftest.$ac_objext
3127if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3128 (eval $ac_compile) 2>conftest.er1
ba479fd2 3129 ac_status=$?
86da66b5
HPN
3130 grep -v '^ *+' conftest.er1 >conftest.err
3131 rm -f conftest.er1
3132 cat conftest.err >&5
ba479fd2
NN
3133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3134 (exit $ac_status); } &&
a1286ef5
ZW
3135 { ac_try='test -z "$ac_c_werror_flag"
3136 || test ! -s conftest.err'
86da66b5
HPN
3137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3138 (eval $ac_try) 2>&5
3139 ac_status=$?
3140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3141 (exit $ac_status); }; } &&
3142 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3144 (eval $ac_try) 2>&5
3145 ac_status=$?
3146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3147 (exit $ac_status); }; }; then
414d23ae
HPN
3148 ac_cv_c_inline=$ac_kw; break
3149else
ba479fd2
NN
3150 echo "$as_me: failed program was:" >&5
3151sed 's/^/| /' conftest.$ac_ext >&5
3152
414d23ae 3153fi
86da66b5 3154rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3155done
3156
3157fi
ba479fd2
NN
3158echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3159echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3160
3161
ba479fd2 3162case $ac_cv_c_inline in
414d23ae 3163 inline | yes) ;;
86da66b5
HPN
3164 *)
3165 case $ac_cv_c_inline in
3166 no) ac_val=;;
3167 *) ac_val=$ac_cv_c_inline;;
3168 esac
3169 cat >>confdefs.h <<_ACEOF
3170#ifndef __cplusplus
3171#define inline $ac_val
3172#endif
ba479fd2 3173_ACEOF
86da66b5 3174 ;;
414d23ae
HPN
3175esac
3176
414d23ae 3177
ba479fd2
NN
3178echo "$as_me:$LINENO: checking for long long int" >&5
3179echo $ECHO_N "checking for long long int... $ECHO_C" >&6
3180if test "${ac_cv_c_long_long+set}" = set; then
3181 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3182else
ba479fd2 3183 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3184/* confdefs.h. */
3185_ACEOF
3186cat confdefs.h >>conftest.$ac_ext
3187cat >>conftest.$ac_ext <<_ACEOF
3188/* end confdefs.h. */
414d23ae 3189
ba479fd2
NN
3190int
3191main ()
3192{
414d23ae 3193long long int i;
ba479fd2
NN
3194 ;
3195 return 0;
3196}
3197_ACEOF
3198rm -f conftest.$ac_objext
3199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3200 (eval $ac_compile) 2>conftest.er1
ba479fd2 3201 ac_status=$?
86da66b5
HPN
3202 grep -v '^ *+' conftest.er1 >conftest.err
3203 rm -f conftest.er1
3204 cat conftest.err >&5
ba479fd2
NN
3205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3206 (exit $ac_status); } &&
a1286ef5
ZW
3207 { ac_try='test -z "$ac_c_werror_flag"
3208 || test ! -s conftest.err'
86da66b5
HPN
3209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3210 (eval $ac_try) 2>&5
3211 ac_status=$?
3212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3213 (exit $ac_status); }; } &&
3214 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3216 (eval $ac_try) 2>&5
3217 ac_status=$?
3218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3219 (exit $ac_status); }; }; then
414d23ae
HPN
3220 ac_cv_c_long_long=yes
3221else
ba479fd2
NN
3222 echo "$as_me: failed program was:" >&5
3223sed 's/^/| /' conftest.$ac_ext >&5
3224
3225ac_cv_c_long_long=no
414d23ae 3226fi
86da66b5 3227rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3228fi
ba479fd2
NN
3229echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5
3230echo "${ECHO_T}$ac_cv_c_long_long" >&6
63cf211a 3231 if test $ac_cv_c_long_long = yes; then
ba479fd2
NN
3232
3233cat >>confdefs.h <<\_ACEOF
414d23ae 3234#define HAVE_LONG_LONG 1
ba479fd2 3235_ACEOF
414d23ae
HPN
3236
3237 fi
ba479fd2
NN
3238echo "$as_me:$LINENO: checking for __int64" >&5
3239echo $ECHO_N "checking for __int64... $ECHO_C" >&6
3240if test "${ac_cv_c___int64+set}" = set; then
3241 echo $ECHO_N "(cached) $ECHO_C" >&6
3242else
3243 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3244/* confdefs.h. */
3245_ACEOF
3246cat confdefs.h >>conftest.$ac_ext
3247cat >>conftest.$ac_ext <<_ACEOF
3248/* end confdefs.h. */
3249
3250int
3251main ()
3252{
414d23ae 3253__int64 i;
ba479fd2
NN
3254 ;
3255 return 0;
3256}
3257_ACEOF
3258rm -f conftest.$ac_objext
3259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3260 (eval $ac_compile) 2>conftest.er1
ba479fd2 3261 ac_status=$?
86da66b5
HPN
3262 grep -v '^ *+' conftest.er1 >conftest.err
3263 rm -f conftest.er1
3264 cat conftest.err >&5
ba479fd2
NN
3265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3266 (exit $ac_status); } &&
a1286ef5
ZW
3267 { ac_try='test -z "$ac_c_werror_flag"
3268 || test ! -s conftest.err'
86da66b5
HPN
3269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3270 (eval $ac_try) 2>&5
3271 ac_status=$?
3272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3273 (exit $ac_status); }; } &&
3274 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3276 (eval $ac_try) 2>&5
3277 ac_status=$?
3278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3279 (exit $ac_status); }; }; then
414d23ae
HPN
3280 ac_cv_c___int64=yes
3281else
ba479fd2
NN
3282 echo "$as_me: failed program was:" >&5
3283sed 's/^/| /' conftest.$ac_ext >&5
3284
3285ac_cv_c___int64=no
414d23ae 3286fi
86da66b5 3287rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3288fi
ba479fd2
NN
3289echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5
3290echo "${ECHO_T}$ac_cv_c___int64" >&6
63cf211a 3291 if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3292
3293cat >>confdefs.h <<\_ACEOF
414d23ae 3294#define HAVE___INT64 1
ba479fd2 3295_ACEOF
414d23ae
HPN
3296
3297 fi
3298
414d23ae
HPN
3299
3300# sizeof(char) is 1 by definition.
bf3b7cd3
JD
3301
3302echo "$as_me:$LINENO: checking for egrep" >&5
3303echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3304if test "${ac_cv_prog_egrep+set}" = set; then
3305 echo $ECHO_N "(cached) $ECHO_C" >&6
3306else
3307 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3308 then ac_cv_prog_egrep='grep -E'
3309 else ac_cv_prog_egrep='egrep'
3310 fi
3311fi
3312echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3313echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3314 EGREP=$ac_cv_prog_egrep
3315
3316
3317echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3318echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3319if test "${ac_cv_header_stdc+set}" = set; then
3320 echo $ECHO_N "(cached) $ECHO_C" >&6
3321else
3322 cat >conftest.$ac_ext <<_ACEOF
3323/* confdefs.h. */
3324_ACEOF
3325cat confdefs.h >>conftest.$ac_ext
3326cat >>conftest.$ac_ext <<_ACEOF
3327/* end confdefs.h. */
3328#include <stdlib.h>
3329#include <stdarg.h>
3330#include <string.h>
3331#include <float.h>
3332
3333int
3334main ()
3335{
3336
3337 ;
3338 return 0;
3339}
3340_ACEOF
3341rm -f conftest.$ac_objext
3342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3343 (eval $ac_compile) 2>conftest.er1
3344 ac_status=$?
3345 grep -v '^ *+' conftest.er1 >conftest.err
3346 rm -f conftest.er1
3347 cat conftest.err >&5
3348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3349 (exit $ac_status); } &&
a1286ef5
ZW
3350 { ac_try='test -z "$ac_c_werror_flag"
3351 || test ! -s conftest.err'
bf3b7cd3
JD
3352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3353 (eval $ac_try) 2>&5
3354 ac_status=$?
3355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3356 (exit $ac_status); }; } &&
3357 { ac_try='test -s conftest.$ac_objext'
3358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3359 (eval $ac_try) 2>&5
3360 ac_status=$?
3361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3362 (exit $ac_status); }; }; then
3363 ac_cv_header_stdc=yes
3364else
3365 echo "$as_me: failed program was:" >&5
3366sed 's/^/| /' conftest.$ac_ext >&5
3367
3368ac_cv_header_stdc=no
3369fi
3370rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3371
3372if test $ac_cv_header_stdc = yes; then
3373 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3374 cat >conftest.$ac_ext <<_ACEOF
3375/* confdefs.h. */
3376_ACEOF
3377cat confdefs.h >>conftest.$ac_ext
3378cat >>conftest.$ac_ext <<_ACEOF
3379/* end confdefs.h. */
3380#include <string.h>
3381
3382_ACEOF
3383if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3384 $EGREP "memchr" >/dev/null 2>&1; then
3385 :
3386else
3387 ac_cv_header_stdc=no
3388fi
3389rm -f conftest*
3390
3391fi
3392
3393if test $ac_cv_header_stdc = yes; then
3394 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3395 cat >conftest.$ac_ext <<_ACEOF
3396/* confdefs.h. */
3397_ACEOF
3398cat confdefs.h >>conftest.$ac_ext
3399cat >>conftest.$ac_ext <<_ACEOF
3400/* end confdefs.h. */
3401#include <stdlib.h>
3402
3403_ACEOF
3404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3405 $EGREP "free" >/dev/null 2>&1; then
3406 :
3407else
3408 ac_cv_header_stdc=no
3409fi
3410rm -f conftest*
3411
3412fi
3413
3414if test $ac_cv_header_stdc = yes; then
3415 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3416 if test "$cross_compiling" = yes; then
3417 :
3418else
3419 cat >conftest.$ac_ext <<_ACEOF
3420/* confdefs.h. */
3421_ACEOF
3422cat confdefs.h >>conftest.$ac_ext
3423cat >>conftest.$ac_ext <<_ACEOF
3424/* end confdefs.h. */
3425#include <ctype.h>
3426#if ((' ' & 0x0FF) == 0x020)
3427# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3428# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3429#else
3430# define ISLOWER(c) \
3431 (('a' <= (c) && (c) <= 'i') \
3432 || ('j' <= (c) && (c) <= 'r') \
3433 || ('s' <= (c) && (c) <= 'z'))
3434# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3435#endif
3436
3437#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3438int
3439main ()
3440{
3441 int i;
3442 for (i = 0; i < 256; i++)
3443 if (XOR (islower (i), ISLOWER (i))
3444 || toupper (i) != TOUPPER (i))
3445 exit(2);
3446 exit (0);
3447}
3448_ACEOF
3449rm -f conftest$ac_exeext
3450if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3451 (eval $ac_link) 2>&5
3452 ac_status=$?
3453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3454 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3456 (eval $ac_try) 2>&5
3457 ac_status=$?
3458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3459 (exit $ac_status); }; }; then
3460 :
3461else
3462 echo "$as_me: program exited with status $ac_status" >&5
3463echo "$as_me: failed program was:" >&5
3464sed 's/^/| /' conftest.$ac_ext >&5
3465
3466( exit $ac_status )
3467ac_cv_header_stdc=no
3468fi
3469rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3470fi
3471fi
3472fi
3473echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3474echo "${ECHO_T}$ac_cv_header_stdc" >&6
3475if test $ac_cv_header_stdc = yes; then
3476
3477cat >>confdefs.h <<\_ACEOF
3478#define STDC_HEADERS 1
3479_ACEOF
3480
3481fi
3482
3483# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3494 inttypes.h stdint.h unistd.h
3495do
3496as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3497echo "$as_me:$LINENO: checking for $ac_header" >&5
3498echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3499if eval "test \"\${$as_ac_Header+set}\" = set"; then
3500 echo $ECHO_N "(cached) $ECHO_C" >&6
3501else
3502 cat >conftest.$ac_ext <<_ACEOF
3503/* confdefs.h. */
3504_ACEOF
3505cat confdefs.h >>conftest.$ac_ext
3506cat >>conftest.$ac_ext <<_ACEOF
3507/* end confdefs.h. */
3508$ac_includes_default
3509
3510#include <$ac_header>
3511_ACEOF
3512rm -f conftest.$ac_objext
3513if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3514 (eval $ac_compile) 2>conftest.er1
3515 ac_status=$?
3516 grep -v '^ *+' conftest.er1 >conftest.err
3517 rm -f conftest.er1
3518 cat conftest.err >&5
3519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3520 (exit $ac_status); } &&
a1286ef5
ZW
3521 { ac_try='test -z "$ac_c_werror_flag"
3522 || test ! -s conftest.err'
bf3b7cd3
JD
3523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3524 (eval $ac_try) 2>&5
3525 ac_status=$?
3526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3527 (exit $ac_status); }; } &&
3528 { ac_try='test -s conftest.$ac_objext'
3529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3530 (eval $ac_try) 2>&5
3531 ac_status=$?
3532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3533 (exit $ac_status); }; }; then
3534 eval "$as_ac_Header=yes"
3535else
3536 echo "$as_me: failed program was:" >&5
3537sed 's/^/| /' conftest.$ac_ext >&5
3538
3539eval "$as_ac_Header=no"
3540fi
3541rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3542fi
3543echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3544echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3545if test `eval echo '${'$as_ac_Header'}'` = yes; then
3546 cat >>confdefs.h <<_ACEOF
3547#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3548_ACEOF
3549
3550fi
3551
3552done
3553
3554
3555echo "$as_me:$LINENO: checking for void *" >&5
3556echo $ECHO_N "checking for void *... $ECHO_C" >&6
3557if test "${ac_cv_type_void_p+set}" = set; then
3558 echo $ECHO_N "(cached) $ECHO_C" >&6
3559else
3560 cat >conftest.$ac_ext <<_ACEOF
3561/* confdefs.h. */
3562_ACEOF
3563cat confdefs.h >>conftest.$ac_ext
3564cat >>conftest.$ac_ext <<_ACEOF
3565/* end confdefs.h. */
3566$ac_includes_default
3567int
3568main ()
3569{
3570if ((void * *) 0)
3571 return 0;
3572if (sizeof (void *))
3573 return 0;
3574 ;
3575 return 0;
3576}
3577_ACEOF
3578rm -f conftest.$ac_objext
3579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3580 (eval $ac_compile) 2>conftest.er1
3581 ac_status=$?
3582 grep -v '^ *+' conftest.er1 >conftest.err
3583 rm -f conftest.er1
3584 cat conftest.err >&5
3585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3586 (exit $ac_status); } &&
a1286ef5
ZW
3587 { ac_try='test -z "$ac_c_werror_flag"
3588 || test ! -s conftest.err'
bf3b7cd3
JD
3589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3590 (eval $ac_try) 2>&5
3591 ac_status=$?
3592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3593 (exit $ac_status); }; } &&
3594 { ac_try='test -s conftest.$ac_objext'
3595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3596 (eval $ac_try) 2>&5
3597 ac_status=$?
3598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3599 (exit $ac_status); }; }; then
3600 ac_cv_type_void_p=yes
3601else
3602 echo "$as_me: failed program was:" >&5
3603sed 's/^/| /' conftest.$ac_ext >&5
3604
3605ac_cv_type_void_p=no
3606fi
3607rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3608fi
3609echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3610echo "${ECHO_T}$ac_cv_type_void_p" >&6
3611
ba479fd2
NN
3612echo "$as_me:$LINENO: checking size of void *" >&5
3613echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3614if test "${ac_cv_sizeof_void_p+set}" = set; then
3615 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 3616else
bf3b7cd3
JD
3617 if test "$ac_cv_type_void_p" = yes; then
3618 # The cast to unsigned long works around a bug in the HP C Compiler
3619 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3620 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3621 # This bug is HP SR number 8606223364.
3622 if test "$cross_compiling" = yes; then
3623 # Depending upon the size, compute the lo and hi bounds.
3624cat >conftest.$ac_ext <<_ACEOF
3625/* confdefs.h. */
3626_ACEOF
3627cat confdefs.h >>conftest.$ac_ext
3628cat >>conftest.$ac_ext <<_ACEOF
3629/* end confdefs.h. */
3630$ac_includes_default
3631int
3632main ()
3633{
3634static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
3635test_array [0] = 0
3636
3637 ;
3638 return 0;
3639}
3640_ACEOF
3641rm -f conftest.$ac_objext
3642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3643 (eval $ac_compile) 2>conftest.er1
3644 ac_status=$?
3645 grep -v '^ *+' conftest.er1 >conftest.err
3646 rm -f conftest.er1
3647 cat conftest.err >&5
3648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3649 (exit $ac_status); } &&
a1286ef5
ZW
3650 { ac_try='test -z "$ac_c_werror_flag"
3651 || test ! -s conftest.err'
bf3b7cd3
JD
3652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3653 (eval $ac_try) 2>&5
3654 ac_status=$?
3655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3656 (exit $ac_status); }; } &&
3657 { ac_try='test -s conftest.$ac_objext'
3658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3659 (eval $ac_try) 2>&5
3660 ac_status=$?
3661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3662 (exit $ac_status); }; }; then
3663 ac_lo=0 ac_mid=0
3664 while :; do
3665 cat >conftest.$ac_ext <<_ACEOF
3666/* confdefs.h. */
3667_ACEOF
3668cat confdefs.h >>conftest.$ac_ext
3669cat >>conftest.$ac_ext <<_ACEOF
3670/* end confdefs.h. */
3671$ac_includes_default
3672int
3673main ()
3674{
3675static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3676test_array [0] = 0
3677
3678 ;
3679 return 0;
3680}
3681_ACEOF
3682rm -f conftest.$ac_objext
3683if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3684 (eval $ac_compile) 2>conftest.er1
3685 ac_status=$?
3686 grep -v '^ *+' conftest.er1 >conftest.err
3687 rm -f conftest.er1
3688 cat conftest.err >&5
3689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3690 (exit $ac_status); } &&
a1286ef5
ZW
3691 { ac_try='test -z "$ac_c_werror_flag"
3692 || test ! -s conftest.err'
bf3b7cd3
JD
3693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3694 (eval $ac_try) 2>&5
3695 ac_status=$?
3696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3697 (exit $ac_status); }; } &&
3698 { ac_try='test -s conftest.$ac_objext'
3699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3700 (eval $ac_try) 2>&5
3701 ac_status=$?
3702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3703 (exit $ac_status); }; }; then
3704 ac_hi=$ac_mid; break
3705else
3706 echo "$as_me: failed program was:" >&5
3707sed 's/^/| /' conftest.$ac_ext >&5
3708
3709ac_lo=`expr $ac_mid + 1`
3710 if test $ac_lo -le $ac_mid; then
3711 ac_lo= ac_hi=
3712 break
3713 fi
3714 ac_mid=`expr 2 '*' $ac_mid + 1`
3715fi
3716rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3717 done
3718else
3719 echo "$as_me: failed program was:" >&5
3720sed 's/^/| /' conftest.$ac_ext >&5
3721
3722cat >conftest.$ac_ext <<_ACEOF
3723/* confdefs.h. */
3724_ACEOF
3725cat confdefs.h >>conftest.$ac_ext
3726cat >>conftest.$ac_ext <<_ACEOF
3727/* end confdefs.h. */
3728$ac_includes_default
3729int
3730main ()
3731{
3732static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
3733test_array [0] = 0
3734
3735 ;
3736 return 0;
3737}
3738_ACEOF
3739rm -f conftest.$ac_objext
3740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3741 (eval $ac_compile) 2>conftest.er1
3742 ac_status=$?
3743 grep -v '^ *+' conftest.er1 >conftest.err
3744 rm -f conftest.er1
3745 cat conftest.err >&5
3746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3747 (exit $ac_status); } &&
a1286ef5
ZW
3748 { ac_try='test -z "$ac_c_werror_flag"
3749 || test ! -s conftest.err'
bf3b7cd3
JD
3750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3751 (eval $ac_try) 2>&5
3752 ac_status=$?
3753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3754 (exit $ac_status); }; } &&
3755 { ac_try='test -s conftest.$ac_objext'
3756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3757 (eval $ac_try) 2>&5
3758 ac_status=$?
3759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3760 (exit $ac_status); }; }; then
3761 ac_hi=-1 ac_mid=-1
3762 while :; do
3763 cat >conftest.$ac_ext <<_ACEOF
3764/* confdefs.h. */
3765_ACEOF
3766cat confdefs.h >>conftest.$ac_ext
3767cat >>conftest.$ac_ext <<_ACEOF
3768/* end confdefs.h. */
3769$ac_includes_default
3770int
3771main ()
3772{
3773static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
3774test_array [0] = 0
3775
3776 ;
3777 return 0;
3778}
3779_ACEOF
3780rm -f conftest.$ac_objext
3781if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3782 (eval $ac_compile) 2>conftest.er1
3783 ac_status=$?
3784 grep -v '^ *+' conftest.er1 >conftest.err
3785 rm -f conftest.er1
3786 cat conftest.err >&5
3787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3788 (exit $ac_status); } &&
a1286ef5
ZW
3789 { ac_try='test -z "$ac_c_werror_flag"
3790 || test ! -s conftest.err'
bf3b7cd3
JD
3791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3792 (eval $ac_try) 2>&5
3793 ac_status=$?
3794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3795 (exit $ac_status); }; } &&
3796 { ac_try='test -s conftest.$ac_objext'
3797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3798 (eval $ac_try) 2>&5
3799 ac_status=$?
3800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3801 (exit $ac_status); }; }; then
3802 ac_lo=$ac_mid; break
3803else
3804 echo "$as_me: failed program was:" >&5
3805sed 's/^/| /' conftest.$ac_ext >&5
3806
3807ac_hi=`expr '(' $ac_mid ')' - 1`
3808 if test $ac_mid -le $ac_hi; then
3809 ac_lo= ac_hi=
3810 break
3811 fi
3812 ac_mid=`expr 2 '*' $ac_mid`
3813fi
3814rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3815 done
3816else
3817 echo "$as_me: failed program was:" >&5
3818sed 's/^/| /' conftest.$ac_ext >&5
3819
3820ac_lo= ac_hi=
3821fi
3822rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3823fi
3824rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3825# Binary search between lo and hi bounds.
3826while test "x$ac_lo" != "x$ac_hi"; do
3827 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3828 cat >conftest.$ac_ext <<_ACEOF
3829/* confdefs.h. */
3830_ACEOF
3831cat confdefs.h >>conftest.$ac_ext
3832cat >>conftest.$ac_ext <<_ACEOF
3833/* end confdefs.h. */
3834$ac_includes_default
3835int
3836main ()
3837{
3838static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3839test_array [0] = 0
3840
3841 ;
3842 return 0;
3843}
3844_ACEOF
3845rm -f conftest.$ac_objext
3846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3847 (eval $ac_compile) 2>conftest.er1
3848 ac_status=$?
3849 grep -v '^ *+' conftest.er1 >conftest.err
3850 rm -f conftest.er1
3851 cat conftest.err >&5
3852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3853 (exit $ac_status); } &&
a1286ef5
ZW
3854 { ac_try='test -z "$ac_c_werror_flag"
3855 || test ! -s conftest.err'
bf3b7cd3
JD
3856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3857 (eval $ac_try) 2>&5
3858 ac_status=$?
3859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3860 (exit $ac_status); }; } &&
3861 { ac_try='test -s conftest.$ac_objext'
3862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3863 (eval $ac_try) 2>&5
3864 ac_status=$?
3865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3866 (exit $ac_status); }; }; then
3867 ac_hi=$ac_mid
3868else
3869 echo "$as_me: failed program was:" >&5
3870sed 's/^/| /' conftest.$ac_ext >&5
3871
3872ac_lo=`expr '(' $ac_mid ')' + 1`
3873fi
3874rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3875done
3876case $ac_lo in
3877?*) ac_cv_sizeof_void_p=$ac_lo;;
3878'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3879See \`config.log' for more details." >&5
3880echo "$as_me: error: cannot compute sizeof (void *), 77
3881See \`config.log' for more details." >&2;}
3882 { (exit 1); exit 1; }; } ;;
3883esac
3884else
3885 if test "$cross_compiling" = yes; then
a1286ef5
ZW
3886 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
3887See \`config.log' for more details." >&5
3888echo "$as_me: error: cannot run test program while cross compiling
3889See \`config.log' for more details." >&2;}
bf3b7cd3
JD
3890 { (exit 1); exit 1; }; }
3891else
3892 cat >conftest.$ac_ext <<_ACEOF
3893/* confdefs.h. */
3894_ACEOF
3895cat confdefs.h >>conftest.$ac_ext
3896cat >>conftest.$ac_ext <<_ACEOF
3897/* end confdefs.h. */
3898$ac_includes_default
3899long longval () { return (long) (sizeof (void *)); }
3900unsigned long ulongval () { return (long) (sizeof (void *)); }
3901#include <stdio.h>
3902#include <stdlib.h>
3903int
3904main ()
3905{
3906
3907 FILE *f = fopen ("conftest.val", "w");
3908 if (! f)
3909 exit (1);
3910 if (((long) (sizeof (void *))) < 0)
3911 {
3912 long i = longval ();
3913 if (i != ((long) (sizeof (void *))))
3914 exit (1);
3915 fprintf (f, "%ld\n", i);
3916 }
3917 else
3918 {
3919 unsigned long i = ulongval ();
3920 if (i != ((long) (sizeof (void *))))
3921 exit (1);
3922 fprintf (f, "%lu\n", i);
3923 }
3924 exit (ferror (f) || fclose (f) != 0);
3925
3926 ;
3927 return 0;
3928}
3929_ACEOF
3930rm -f conftest$ac_exeext
3931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3932 (eval $ac_link) 2>&5
3933 ac_status=$?
3934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3935 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3937 (eval $ac_try) 2>&5
3938 ac_status=$?
3939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3940 (exit $ac_status); }; }; then
3941 ac_cv_sizeof_void_p=`cat conftest.val`
3942else
3943 echo "$as_me: program exited with status $ac_status" >&5
3944echo "$as_me: failed program was:" >&5
3945sed 's/^/| /' conftest.$ac_ext >&5
3946
3947( exit $ac_status )
3948{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3949See \`config.log' for more details." >&5
3950echo "$as_me: error: cannot compute sizeof (void *), 77
3951See \`config.log' for more details." >&2;}
3952 { (exit 1); exit 1; }; }
3953fi
3954rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3955fi
3956fi
3957rm -f conftest.val
3958else
3959 ac_cv_sizeof_void_p=0
3960fi
3961fi
3962echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3963echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3964cat >>confdefs.h <<_ACEOF
3965#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3966_ACEOF
3967
3968
3969echo "$as_me:$LINENO: checking for short" >&5
3970echo $ECHO_N "checking for short... $ECHO_C" >&6
3971if test "${ac_cv_type_short+set}" = set; then
3972 echo $ECHO_N "(cached) $ECHO_C" >&6
3973else
3974 cat >conftest.$ac_ext <<_ACEOF
3975/* confdefs.h. */
3976_ACEOF
3977cat confdefs.h >>conftest.$ac_ext
3978cat >>conftest.$ac_ext <<_ACEOF
3979/* end confdefs.h. */
3980$ac_includes_default
3981int
3982main ()
3983{
3984if ((short *) 0)
3985 return 0;
3986if (sizeof (short))
3987 return 0;
3988 ;
3989 return 0;
3990}
3991_ACEOF
3992rm -f conftest.$ac_objext
3993if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3994 (eval $ac_compile) 2>conftest.er1
3995 ac_status=$?
3996 grep -v '^ *+' conftest.er1 >conftest.err
3997 rm -f conftest.er1
3998 cat conftest.err >&5
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); } &&
a1286ef5
ZW
4001 { ac_try='test -z "$ac_c_werror_flag"
4002 || test ! -s conftest.err'
bf3b7cd3
JD
4003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4004 (eval $ac_try) 2>&5
4005 ac_status=$?
4006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4007 (exit $ac_status); }; } &&
4008 { ac_try='test -s conftest.$ac_objext'
4009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4010 (eval $ac_try) 2>&5
4011 ac_status=$?
4012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4013 (exit $ac_status); }; }; then
4014 ac_cv_type_short=yes
4015else
4016 echo "$as_me: failed program was:" >&5
4017sed 's/^/| /' conftest.$ac_ext >&5
4018
4019ac_cv_type_short=no
4020fi
4021rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4022fi
4023echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
4024echo "${ECHO_T}$ac_cv_type_short" >&6
4025
4026echo "$as_me:$LINENO: checking size of short" >&5
4027echo $ECHO_N "checking size of short... $ECHO_C" >&6
4028if test "${ac_cv_sizeof_short+set}" = set; then
4029 echo $ECHO_N "(cached) $ECHO_C" >&6
4030else
4031 if test "$ac_cv_type_short" = yes; then
4032 # The cast to unsigned long works around a bug in the HP C Compiler
4033 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4034 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4035 # This bug is HP SR number 8606223364.
4036 if test "$cross_compiling" = yes; then
4037 # Depending upon the size, compute the lo and hi bounds.
4038cat >conftest.$ac_ext <<_ACEOF
4039/* confdefs.h. */
4040_ACEOF
4041cat confdefs.h >>conftest.$ac_ext
4042cat >>conftest.$ac_ext <<_ACEOF
4043/* end confdefs.h. */
4044$ac_includes_default
4045int
4046main ()
4047{
4048static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
4049test_array [0] = 0
4050
4051 ;
4052 return 0;
4053}
4054_ACEOF
4055rm -f conftest.$ac_objext
4056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4057 (eval $ac_compile) 2>conftest.er1
4058 ac_status=$?
4059 grep -v '^ *+' conftest.er1 >conftest.err
4060 rm -f conftest.er1
4061 cat conftest.err >&5
4062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4063 (exit $ac_status); } &&
a1286ef5
ZW
4064 { ac_try='test -z "$ac_c_werror_flag"
4065 || test ! -s conftest.err'
bf3b7cd3
JD
4066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4067 (eval $ac_try) 2>&5
4068 ac_status=$?
4069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4070 (exit $ac_status); }; } &&
4071 { ac_try='test -s conftest.$ac_objext'
4072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4073 (eval $ac_try) 2>&5
4074 ac_status=$?
4075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4076 (exit $ac_status); }; }; then
4077 ac_lo=0 ac_mid=0
4078 while :; do
4079 cat >conftest.$ac_ext <<_ACEOF
4080/* confdefs.h. */
4081_ACEOF
4082cat confdefs.h >>conftest.$ac_ext
4083cat >>conftest.$ac_ext <<_ACEOF
4084/* end confdefs.h. */
4085$ac_includes_default
4086int
4087main ()
4088{
4089static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4090test_array [0] = 0
4091
4092 ;
4093 return 0;
4094}
4095_ACEOF
4096rm -f conftest.$ac_objext
4097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4098 (eval $ac_compile) 2>conftest.er1
4099 ac_status=$?
4100 grep -v '^ *+' conftest.er1 >conftest.err
4101 rm -f conftest.er1
4102 cat conftest.err >&5
4103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4104 (exit $ac_status); } &&
a1286ef5
ZW
4105 { ac_try='test -z "$ac_c_werror_flag"
4106 || test ! -s conftest.err'
bf3b7cd3
JD
4107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4108 (eval $ac_try) 2>&5
4109 ac_status=$?
4110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4111 (exit $ac_status); }; } &&
4112 { ac_try='test -s conftest.$ac_objext'
4113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4114 (eval $ac_try) 2>&5
4115 ac_status=$?
4116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4117 (exit $ac_status); }; }; then
4118 ac_hi=$ac_mid; break
4119else
4120 echo "$as_me: failed program was:" >&5
4121sed 's/^/| /' conftest.$ac_ext >&5
4122
4123ac_lo=`expr $ac_mid + 1`
4124 if test $ac_lo -le $ac_mid; then
4125 ac_lo= ac_hi=
4126 break
4127 fi
4128 ac_mid=`expr 2 '*' $ac_mid + 1`
4129fi
4130rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4131 done
4132else
4133 echo "$as_me: failed program was:" >&5
4134sed 's/^/| /' conftest.$ac_ext >&5
4135
4136cat >conftest.$ac_ext <<_ACEOF
4137/* confdefs.h. */
4138_ACEOF
4139cat confdefs.h >>conftest.$ac_ext
4140cat >>conftest.$ac_ext <<_ACEOF
4141/* end confdefs.h. */
4142$ac_includes_default
4143int
4144main ()
4145{
4146static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
4147test_array [0] = 0
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
4153rm -f conftest.$ac_objext
4154if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4155 (eval $ac_compile) 2>conftest.er1
4156 ac_status=$?
4157 grep -v '^ *+' conftest.er1 >conftest.err
4158 rm -f conftest.er1
4159 cat conftest.err >&5
4160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4161 (exit $ac_status); } &&
a1286ef5
ZW
4162 { ac_try='test -z "$ac_c_werror_flag"
4163 || test ! -s conftest.err'
bf3b7cd3
JD
4164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4165 (eval $ac_try) 2>&5
4166 ac_status=$?
4167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4168 (exit $ac_status); }; } &&
4169 { ac_try='test -s conftest.$ac_objext'
4170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4171 (eval $ac_try) 2>&5
4172 ac_status=$?
4173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4174 (exit $ac_status); }; }; then
4175 ac_hi=-1 ac_mid=-1
4176 while :; do
4177 cat >conftest.$ac_ext <<_ACEOF
4178/* confdefs.h. */
4179_ACEOF
4180cat confdefs.h >>conftest.$ac_ext
4181cat >>conftest.$ac_ext <<_ACEOF
4182/* end confdefs.h. */
4183$ac_includes_default
4184int
4185main ()
4186{
4187static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
4188test_array [0] = 0
4189
4190 ;
4191 return 0;
4192}
4193_ACEOF
4194rm -f conftest.$ac_objext
4195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4196 (eval $ac_compile) 2>conftest.er1
4197 ac_status=$?
4198 grep -v '^ *+' conftest.er1 >conftest.err
4199 rm -f conftest.er1
4200 cat conftest.err >&5
4201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4202 (exit $ac_status); } &&
a1286ef5
ZW
4203 { ac_try='test -z "$ac_c_werror_flag"
4204 || test ! -s conftest.err'
bf3b7cd3
JD
4205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4206 (eval $ac_try) 2>&5
4207 ac_status=$?
4208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4209 (exit $ac_status); }; } &&
4210 { ac_try='test -s conftest.$ac_objext'
4211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4212 (eval $ac_try) 2>&5
4213 ac_status=$?
4214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4215 (exit $ac_status); }; }; then
4216 ac_lo=$ac_mid; break
4217else
4218 echo "$as_me: failed program was:" >&5
4219sed 's/^/| /' conftest.$ac_ext >&5
4220
4221ac_hi=`expr '(' $ac_mid ')' - 1`
4222 if test $ac_mid -le $ac_hi; then
4223 ac_lo= ac_hi=
4224 break
4225 fi
4226 ac_mid=`expr 2 '*' $ac_mid`
4227fi
4228rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4229 done
4230else
4231 echo "$as_me: failed program was:" >&5
4232sed 's/^/| /' conftest.$ac_ext >&5
4233
4234ac_lo= ac_hi=
4235fi
4236rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4237fi
4238rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4239# Binary search between lo and hi bounds.
4240while test "x$ac_lo" != "x$ac_hi"; do
4241 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4242 cat >conftest.$ac_ext <<_ACEOF
4243/* confdefs.h. */
4244_ACEOF
4245cat confdefs.h >>conftest.$ac_ext
4246cat >>conftest.$ac_ext <<_ACEOF
4247/* end confdefs.h. */
4248$ac_includes_default
4249int
4250main ()
4251{
4252static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4253test_array [0] = 0
4254
4255 ;
4256 return 0;
4257}
4258_ACEOF
4259rm -f conftest.$ac_objext
4260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4261 (eval $ac_compile) 2>conftest.er1
4262 ac_status=$?
4263 grep -v '^ *+' conftest.er1 >conftest.err
4264 rm -f conftest.er1
4265 cat conftest.err >&5
4266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4267 (exit $ac_status); } &&
a1286ef5
ZW
4268 { ac_try='test -z "$ac_c_werror_flag"
4269 || test ! -s conftest.err'
bf3b7cd3
JD
4270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4271 (eval $ac_try) 2>&5
4272 ac_status=$?
4273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4274 (exit $ac_status); }; } &&
4275 { ac_try='test -s conftest.$ac_objext'
4276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4277 (eval $ac_try) 2>&5
4278 ac_status=$?
4279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4280 (exit $ac_status); }; }; then
4281 ac_hi=$ac_mid
4282else
4283 echo "$as_me: failed program was:" >&5
4284sed 's/^/| /' conftest.$ac_ext >&5
4285
4286ac_lo=`expr '(' $ac_mid ')' + 1`
4287fi
4288rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4289done
4290case $ac_lo in
4291?*) ac_cv_sizeof_short=$ac_lo;;
4292'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4293See \`config.log' for more details." >&5
4294echo "$as_me: error: cannot compute sizeof (short), 77
4295See \`config.log' for more details." >&2;}
4296 { (exit 1); exit 1; }; } ;;
4297esac
4298else
4299 if test "$cross_compiling" = yes; then
a1286ef5
ZW
4300 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4301See \`config.log' for more details." >&5
4302echo "$as_me: error: cannot run test program while cross compiling
4303See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4304 { (exit 1); exit 1; }; }
4305else
4306 cat >conftest.$ac_ext <<_ACEOF
4307/* confdefs.h. */
4308_ACEOF
4309cat confdefs.h >>conftest.$ac_ext
4310cat >>conftest.$ac_ext <<_ACEOF
4311/* end confdefs.h. */
4312$ac_includes_default
4313long longval () { return (long) (sizeof (short)); }
4314unsigned long ulongval () { return (long) (sizeof (short)); }
4315#include <stdio.h>
4316#include <stdlib.h>
4317int
4318main ()
4319{
4320
4321 FILE *f = fopen ("conftest.val", "w");
4322 if (! f)
4323 exit (1);
4324 if (((long) (sizeof (short))) < 0)
4325 {
4326 long i = longval ();
4327 if (i != ((long) (sizeof (short))))
4328 exit (1);
4329 fprintf (f, "%ld\n", i);
4330 }
4331 else
4332 {
4333 unsigned long i = ulongval ();
4334 if (i != ((long) (sizeof (short))))
4335 exit (1);
4336 fprintf (f, "%lu\n", i);
4337 }
4338 exit (ferror (f) || fclose (f) != 0);
4339
4340 ;
4341 return 0;
4342}
4343_ACEOF
4344rm -f conftest$ac_exeext
4345if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4346 (eval $ac_link) 2>&5
4347 ac_status=$?
4348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4351 (eval $ac_try) 2>&5
4352 ac_status=$?
4353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4354 (exit $ac_status); }; }; then
4355 ac_cv_sizeof_short=`cat conftest.val`
4356else
4357 echo "$as_me: program exited with status $ac_status" >&5
4358echo "$as_me: failed program was:" >&5
4359sed 's/^/| /' conftest.$ac_ext >&5
4360
4361( exit $ac_status )
4362{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4363See \`config.log' for more details." >&5
4364echo "$as_me: error: cannot compute sizeof (short), 77
4365See \`config.log' for more details." >&2;}
4366 { (exit 1); exit 1; }; }
4367fi
4368rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4369fi
4370fi
4371rm -f conftest.val
4372else
4373 ac_cv_sizeof_short=0
4374fi
4375fi
4376echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4377echo "${ECHO_T}$ac_cv_sizeof_short" >&6
4378cat >>confdefs.h <<_ACEOF
4379#define SIZEOF_SHORT $ac_cv_sizeof_short
4380_ACEOF
4381
4382
4383echo "$as_me:$LINENO: checking for int" >&5
4384echo $ECHO_N "checking for int... $ECHO_C" >&6
4385if test "${ac_cv_type_int+set}" = set; then
4386 echo $ECHO_N "(cached) $ECHO_C" >&6
4387else
4388 cat >conftest.$ac_ext <<_ACEOF
4389/* confdefs.h. */
4390_ACEOF
4391cat confdefs.h >>conftest.$ac_ext
4392cat >>conftest.$ac_ext <<_ACEOF
4393/* end confdefs.h. */
4394$ac_includes_default
4395int
4396main ()
4397{
4398if ((int *) 0)
4399 return 0;
4400if (sizeof (int))
4401 return 0;
4402 ;
4403 return 0;
4404}
4405_ACEOF
4406rm -f conftest.$ac_objext
4407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4408 (eval $ac_compile) 2>conftest.er1
4409 ac_status=$?
4410 grep -v '^ *+' conftest.er1 >conftest.err
4411 rm -f conftest.er1
4412 cat conftest.err >&5
4413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4414 (exit $ac_status); } &&
a1286ef5
ZW
4415 { ac_try='test -z "$ac_c_werror_flag"
4416 || test ! -s conftest.err'
bf3b7cd3
JD
4417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4418 (eval $ac_try) 2>&5
4419 ac_status=$?
4420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4421 (exit $ac_status); }; } &&
4422 { ac_try='test -s conftest.$ac_objext'
4423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4424 (eval $ac_try) 2>&5
4425 ac_status=$?
4426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4427 (exit $ac_status); }; }; then
4428 ac_cv_type_int=yes
4429else
4430 echo "$as_me: failed program was:" >&5
4431sed 's/^/| /' conftest.$ac_ext >&5
4432
4433ac_cv_type_int=no
4434fi
4435rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4436fi
4437echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4438echo "${ECHO_T}$ac_cv_type_int" >&6
4439
4440echo "$as_me:$LINENO: checking size of int" >&5
4441echo $ECHO_N "checking size of int... $ECHO_C" >&6
4442if test "${ac_cv_sizeof_int+set}" = set; then
4443 echo $ECHO_N "(cached) $ECHO_C" >&6
4444else
4445 if test "$ac_cv_type_int" = yes; then
4446 # The cast to unsigned long works around a bug in the HP C Compiler
4447 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4448 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4449 # This bug is HP SR number 8606223364.
4450 if test "$cross_compiling" = yes; then
4451 # Depending upon the size, compute the lo and hi bounds.
4452cat >conftest.$ac_ext <<_ACEOF
4453/* confdefs.h. */
4454_ACEOF
4455cat confdefs.h >>conftest.$ac_ext
4456cat >>conftest.$ac_ext <<_ACEOF
4457/* end confdefs.h. */
4458$ac_includes_default
4459int
4460main ()
4461{
4462static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4463test_array [0] = 0
4464
4465 ;
4466 return 0;
4467}
4468_ACEOF
4469rm -f conftest.$ac_objext
4470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4471 (eval $ac_compile) 2>conftest.er1
4472 ac_status=$?
4473 grep -v '^ *+' conftest.er1 >conftest.err
4474 rm -f conftest.er1
4475 cat conftest.err >&5
4476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4477 (exit $ac_status); } &&
a1286ef5
ZW
4478 { ac_try='test -z "$ac_c_werror_flag"
4479 || test ! -s conftest.err'
bf3b7cd3
JD
4480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4481 (eval $ac_try) 2>&5
4482 ac_status=$?
4483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484 (exit $ac_status); }; } &&
4485 { ac_try='test -s conftest.$ac_objext'
4486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4487 (eval $ac_try) 2>&5
4488 ac_status=$?
4489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4490 (exit $ac_status); }; }; then
4491 ac_lo=0 ac_mid=0
4492 while :; do
4493 cat >conftest.$ac_ext <<_ACEOF
4494/* confdefs.h. */
4495_ACEOF
4496cat confdefs.h >>conftest.$ac_ext
4497cat >>conftest.$ac_ext <<_ACEOF
4498/* end confdefs.h. */
4499$ac_includes_default
4500int
4501main ()
4502{
4503static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4504test_array [0] = 0
4505
4506 ;
4507 return 0;
4508}
4509_ACEOF
4510rm -f conftest.$ac_objext
4511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4512 (eval $ac_compile) 2>conftest.er1
4513 ac_status=$?
4514 grep -v '^ *+' conftest.er1 >conftest.err
4515 rm -f conftest.er1
4516 cat conftest.err >&5
4517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4518 (exit $ac_status); } &&
a1286ef5
ZW
4519 { ac_try='test -z "$ac_c_werror_flag"
4520 || test ! -s conftest.err'
bf3b7cd3
JD
4521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4522 (eval $ac_try) 2>&5
4523 ac_status=$?
4524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4525 (exit $ac_status); }; } &&
4526 { ac_try='test -s conftest.$ac_objext'
4527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4528 (eval $ac_try) 2>&5
4529 ac_status=$?
4530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4531 (exit $ac_status); }; }; then
4532 ac_hi=$ac_mid; break
4533else
4534 echo "$as_me: failed program was:" >&5
4535sed 's/^/| /' conftest.$ac_ext >&5
4536
4537ac_lo=`expr $ac_mid + 1`
4538 if test $ac_lo -le $ac_mid; then
4539 ac_lo= ac_hi=
4540 break
4541 fi
4542 ac_mid=`expr 2 '*' $ac_mid + 1`
4543fi
4544rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4545 done
4546else
4547 echo "$as_me: failed program was:" >&5
4548sed 's/^/| /' conftest.$ac_ext >&5
4549
4550cat >conftest.$ac_ext <<_ACEOF
4551/* confdefs.h. */
4552_ACEOF
4553cat confdefs.h >>conftest.$ac_ext
4554cat >>conftest.$ac_ext <<_ACEOF
4555/* end confdefs.h. */
4556$ac_includes_default
4557int
4558main ()
4559{
4560static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4561test_array [0] = 0
4562
4563 ;
4564 return 0;
4565}
4566_ACEOF
4567rm -f conftest.$ac_objext
4568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4569 (eval $ac_compile) 2>conftest.er1
4570 ac_status=$?
4571 grep -v '^ *+' conftest.er1 >conftest.err
4572 rm -f conftest.er1
4573 cat conftest.err >&5
4574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4575 (exit $ac_status); } &&
a1286ef5
ZW
4576 { ac_try='test -z "$ac_c_werror_flag"
4577 || test ! -s conftest.err'
bf3b7cd3
JD
4578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4579 (eval $ac_try) 2>&5
4580 ac_status=$?
4581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4582 (exit $ac_status); }; } &&
4583 { ac_try='test -s conftest.$ac_objext'
4584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4585 (eval $ac_try) 2>&5
4586 ac_status=$?
4587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4588 (exit $ac_status); }; }; then
4589 ac_hi=-1 ac_mid=-1
4590 while :; do
4591 cat >conftest.$ac_ext <<_ACEOF
4592/* confdefs.h. */
4593_ACEOF
4594cat confdefs.h >>conftest.$ac_ext
4595cat >>conftest.$ac_ext <<_ACEOF
4596/* end confdefs.h. */
4597$ac_includes_default
4598int
4599main ()
4600{
4601static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4602test_array [0] = 0
4603
4604 ;
4605 return 0;
4606}
4607_ACEOF
4608rm -f conftest.$ac_objext
4609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4610 (eval $ac_compile) 2>conftest.er1
4611 ac_status=$?
4612 grep -v '^ *+' conftest.er1 >conftest.err
4613 rm -f conftest.er1
4614 cat conftest.err >&5
4615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4616 (exit $ac_status); } &&
a1286ef5
ZW
4617 { ac_try='test -z "$ac_c_werror_flag"
4618 || test ! -s conftest.err'
bf3b7cd3
JD
4619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4620 (eval $ac_try) 2>&5
4621 ac_status=$?
4622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4623 (exit $ac_status); }; } &&
4624 { ac_try='test -s conftest.$ac_objext'
4625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4626 (eval $ac_try) 2>&5
4627 ac_status=$?
4628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4629 (exit $ac_status); }; }; then
4630 ac_lo=$ac_mid; break
4631else
4632 echo "$as_me: failed program was:" >&5
4633sed 's/^/| /' conftest.$ac_ext >&5
4634
4635ac_hi=`expr '(' $ac_mid ')' - 1`
4636 if test $ac_mid -le $ac_hi; then
4637 ac_lo= ac_hi=
4638 break
4639 fi
4640 ac_mid=`expr 2 '*' $ac_mid`
4641fi
4642rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4643 done
4644else
4645 echo "$as_me: failed program was:" >&5
4646sed 's/^/| /' conftest.$ac_ext >&5
4647
4648ac_lo= ac_hi=
4649fi
4650rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4651fi
4652rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4653# Binary search between lo and hi bounds.
4654while test "x$ac_lo" != "x$ac_hi"; do
4655 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4656 cat >conftest.$ac_ext <<_ACEOF
4657/* confdefs.h. */
4658_ACEOF
4659cat confdefs.h >>conftest.$ac_ext
4660cat >>conftest.$ac_ext <<_ACEOF
4661/* end confdefs.h. */
4662$ac_includes_default
4663int
4664main ()
4665{
4666static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4667test_array [0] = 0
4668
4669 ;
4670 return 0;
4671}
4672_ACEOF
4673rm -f conftest.$ac_objext
4674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4675 (eval $ac_compile) 2>conftest.er1
4676 ac_status=$?
4677 grep -v '^ *+' conftest.er1 >conftest.err
4678 rm -f conftest.er1
4679 cat conftest.err >&5
4680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4681 (exit $ac_status); } &&
a1286ef5
ZW
4682 { ac_try='test -z "$ac_c_werror_flag"
4683 || test ! -s conftest.err'
bf3b7cd3
JD
4684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4685 (eval $ac_try) 2>&5
4686 ac_status=$?
4687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4688 (exit $ac_status); }; } &&
4689 { ac_try='test -s conftest.$ac_objext'
4690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4691 (eval $ac_try) 2>&5
4692 ac_status=$?
4693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4694 (exit $ac_status); }; }; then
4695 ac_hi=$ac_mid
4696else
4697 echo "$as_me: failed program was:" >&5
4698sed 's/^/| /' conftest.$ac_ext >&5
4699
4700ac_lo=`expr '(' $ac_mid ')' + 1`
4701fi
4702rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4703done
4704case $ac_lo in
4705?*) ac_cv_sizeof_int=$ac_lo;;
4706'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4707See \`config.log' for more details." >&5
4708echo "$as_me: error: cannot compute sizeof (int), 77
4709See \`config.log' for more details." >&2;}
4710 { (exit 1); exit 1; }; } ;;
4711esac
4712else
4713 if test "$cross_compiling" = yes; then
a1286ef5
ZW
4714 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4715See \`config.log' for more details." >&5
4716echo "$as_me: error: cannot run test program while cross compiling
4717See \`config.log' for more details." >&2;}
bf3b7cd3
JD
4718 { (exit 1); exit 1; }; }
4719else
4720 cat >conftest.$ac_ext <<_ACEOF
4721/* confdefs.h. */
4722_ACEOF
4723cat confdefs.h >>conftest.$ac_ext
4724cat >>conftest.$ac_ext <<_ACEOF
4725/* end confdefs.h. */
4726$ac_includes_default
4727long longval () { return (long) (sizeof (int)); }
4728unsigned long ulongval () { return (long) (sizeof (int)); }
4729#include <stdio.h>
4730#include <stdlib.h>
4731int
4732main ()
4733{
4734
4735 FILE *f = fopen ("conftest.val", "w");
4736 if (! f)
4737 exit (1);
4738 if (((long) (sizeof (int))) < 0)
4739 {
4740 long i = longval ();
4741 if (i != ((long) (sizeof (int))))
4742 exit (1);
4743 fprintf (f, "%ld\n", i);
4744 }
4745 else
4746 {
4747 unsigned long i = ulongval ();
4748 if (i != ((long) (sizeof (int))))
4749 exit (1);
4750 fprintf (f, "%lu\n", i);
4751 }
4752 exit (ferror (f) || fclose (f) != 0);
4753
4754 ;
4755 return 0;
4756}
4757_ACEOF
4758rm -f conftest$ac_exeext
4759if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4760 (eval $ac_link) 2>&5
4761 ac_status=$?
4762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4763 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4765 (eval $ac_try) 2>&5
4766 ac_status=$?
4767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4768 (exit $ac_status); }; }; then
4769 ac_cv_sizeof_int=`cat conftest.val`
4770else
4771 echo "$as_me: program exited with status $ac_status" >&5
4772echo "$as_me: failed program was:" >&5
4773sed 's/^/| /' conftest.$ac_ext >&5
4774
4775( exit $ac_status )
4776{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4777See \`config.log' for more details." >&5
4778echo "$as_me: error: cannot compute sizeof (int), 77
4779See \`config.log' for more details." >&2;}
4780 { (exit 1); exit 1; }; }
4781fi
4782rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4783fi
4784fi
4785rm -f conftest.val
4786else
4787 ac_cv_sizeof_int=0
4788fi
4789fi
4790echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4791echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4792cat >>confdefs.h <<_ACEOF
4793#define SIZEOF_INT $ac_cv_sizeof_int
4794_ACEOF
4795
4796
4797echo "$as_me:$LINENO: checking for long" >&5
4798echo $ECHO_N "checking for long... $ECHO_C" >&6
4799if test "${ac_cv_type_long+set}" = set; then
4800 echo $ECHO_N "(cached) $ECHO_C" >&6
4801else
4802 cat >conftest.$ac_ext <<_ACEOF
4803/* confdefs.h. */
4804_ACEOF
4805cat confdefs.h >>conftest.$ac_ext
4806cat >>conftest.$ac_ext <<_ACEOF
4807/* end confdefs.h. */
4808$ac_includes_default
4809int
4810main ()
4811{
4812if ((long *) 0)
4813 return 0;
4814if (sizeof (long))
4815 return 0;
4816 ;
4817 return 0;
4818}
4819_ACEOF
4820rm -f conftest.$ac_objext
4821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4822 (eval $ac_compile) 2>conftest.er1
4823 ac_status=$?
4824 grep -v '^ *+' conftest.er1 >conftest.err
4825 rm -f conftest.er1
4826 cat conftest.err >&5
4827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4828 (exit $ac_status); } &&
a1286ef5
ZW
4829 { ac_try='test -z "$ac_c_werror_flag"
4830 || test ! -s conftest.err'
bf3b7cd3
JD
4831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4832 (eval $ac_try) 2>&5
4833 ac_status=$?
4834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4835 (exit $ac_status); }; } &&
4836 { ac_try='test -s conftest.$ac_objext'
4837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4838 (eval $ac_try) 2>&5
4839 ac_status=$?
4840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4841 (exit $ac_status); }; }; then
4842 ac_cv_type_long=yes
4843else
4844 echo "$as_me: failed program was:" >&5
4845sed 's/^/| /' conftest.$ac_ext >&5
4846
4847ac_cv_type_long=no
4848fi
4849rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4850fi
4851echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4852echo "${ECHO_T}$ac_cv_type_long" >&6
4853
4854echo "$as_me:$LINENO: checking size of long" >&5
4855echo $ECHO_N "checking size of long... $ECHO_C" >&6
4856if test "${ac_cv_sizeof_long+set}" = set; then
4857 echo $ECHO_N "(cached) $ECHO_C" >&6
4858else
4859 if test "$ac_cv_type_long" = yes; then
4860 # The cast to unsigned long works around a bug in the HP C Compiler
4861 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4862 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4863 # This bug is HP SR number 8606223364.
4864 if test "$cross_compiling" = yes; then
4865 # Depending upon the size, compute the lo and hi bounds.
4866cat >conftest.$ac_ext <<_ACEOF
4867/* confdefs.h. */
4868_ACEOF
4869cat confdefs.h >>conftest.$ac_ext
4870cat >>conftest.$ac_ext <<_ACEOF
4871/* end confdefs.h. */
4872$ac_includes_default
4873int
4874main ()
4875{
4876static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
4877test_array [0] = 0
4878
4879 ;
4880 return 0;
4881}
4882_ACEOF
4883rm -f conftest.$ac_objext
4884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4885 (eval $ac_compile) 2>conftest.er1
4886 ac_status=$?
4887 grep -v '^ *+' conftest.er1 >conftest.err
4888 rm -f conftest.er1
4889 cat conftest.err >&5
4890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4891 (exit $ac_status); } &&
a1286ef5
ZW
4892 { ac_try='test -z "$ac_c_werror_flag"
4893 || test ! -s conftest.err'
bf3b7cd3
JD
4894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4895 (eval $ac_try) 2>&5
4896 ac_status=$?
4897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4898 (exit $ac_status); }; } &&
4899 { ac_try='test -s conftest.$ac_objext'
4900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4901 (eval $ac_try) 2>&5
4902 ac_status=$?
4903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4904 (exit $ac_status); }; }; then
4905 ac_lo=0 ac_mid=0
4906 while :; do
4907 cat >conftest.$ac_ext <<_ACEOF
4908/* confdefs.h. */
4909_ACEOF
4910cat confdefs.h >>conftest.$ac_ext
4911cat >>conftest.$ac_ext <<_ACEOF
4912/* end confdefs.h. */
4913$ac_includes_default
4914int
4915main ()
4916{
4917static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4918test_array [0] = 0
4919
4920 ;
4921 return 0;
4922}
4923_ACEOF
4924rm -f conftest.$ac_objext
4925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4926 (eval $ac_compile) 2>conftest.er1
4927 ac_status=$?
4928 grep -v '^ *+' conftest.er1 >conftest.err
4929 rm -f conftest.er1
4930 cat conftest.err >&5
4931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4932 (exit $ac_status); } &&
a1286ef5
ZW
4933 { ac_try='test -z "$ac_c_werror_flag"
4934 || test ! -s conftest.err'
bf3b7cd3
JD
4935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4936 (eval $ac_try) 2>&5
4937 ac_status=$?
4938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4939 (exit $ac_status); }; } &&
4940 { ac_try='test -s conftest.$ac_objext'
4941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4942 (eval $ac_try) 2>&5
4943 ac_status=$?
4944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4945 (exit $ac_status); }; }; then
4946 ac_hi=$ac_mid; break
4947else
4948 echo "$as_me: failed program was:" >&5
4949sed 's/^/| /' conftest.$ac_ext >&5
4950
4951ac_lo=`expr $ac_mid + 1`
4952 if test $ac_lo -le $ac_mid; then
4953 ac_lo= ac_hi=
4954 break
4955 fi
4956 ac_mid=`expr 2 '*' $ac_mid + 1`
4957fi
4958rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4959 done
4960else
4961 echo "$as_me: failed program was:" >&5
4962sed 's/^/| /' conftest.$ac_ext >&5
4963
4964cat >conftest.$ac_ext <<_ACEOF
4965/* confdefs.h. */
4966_ACEOF
4967cat confdefs.h >>conftest.$ac_ext
4968cat >>conftest.$ac_ext <<_ACEOF
4969/* end confdefs.h. */
4970$ac_includes_default
4971int
4972main ()
4973{
4974static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
4975test_array [0] = 0
4976
4977 ;
4978 return 0;
4979}
4980_ACEOF
4981rm -f conftest.$ac_objext
4982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4983 (eval $ac_compile) 2>conftest.er1
4984 ac_status=$?
4985 grep -v '^ *+' conftest.er1 >conftest.err
4986 rm -f conftest.er1
4987 cat conftest.err >&5
4988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4989 (exit $ac_status); } &&
a1286ef5
ZW
4990 { ac_try='test -z "$ac_c_werror_flag"
4991 || test ! -s conftest.err'
bf3b7cd3
JD
4992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4993 (eval $ac_try) 2>&5
4994 ac_status=$?
4995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4996 (exit $ac_status); }; } &&
4997 { ac_try='test -s conftest.$ac_objext'
4998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4999 (eval $ac_try) 2>&5
5000 ac_status=$?
5001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5002 (exit $ac_status); }; }; then
5003 ac_hi=-1 ac_mid=-1
5004 while :; do
5005 cat >conftest.$ac_ext <<_ACEOF
5006/* confdefs.h. */
5007_ACEOF
5008cat confdefs.h >>conftest.$ac_ext
5009cat >>conftest.$ac_ext <<_ACEOF
5010/* end confdefs.h. */
5011$ac_includes_default
5012int
5013main ()
5014{
5015static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5016test_array [0] = 0
5017
5018 ;
5019 return 0;
5020}
5021_ACEOF
5022rm -f conftest.$ac_objext
5023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5024 (eval $ac_compile) 2>conftest.er1
5025 ac_status=$?
5026 grep -v '^ *+' conftest.er1 >conftest.err
5027 rm -f conftest.er1
5028 cat conftest.err >&5
5029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5030 (exit $ac_status); } &&
a1286ef5
ZW
5031 { ac_try='test -z "$ac_c_werror_flag"
5032 || test ! -s conftest.err'
bf3b7cd3
JD
5033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5034 (eval $ac_try) 2>&5
5035 ac_status=$?
5036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5037 (exit $ac_status); }; } &&
5038 { ac_try='test -s conftest.$ac_objext'
5039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5040 (eval $ac_try) 2>&5
5041 ac_status=$?
5042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5043 (exit $ac_status); }; }; then
5044 ac_lo=$ac_mid; break
5045else
5046 echo "$as_me: failed program was:" >&5
5047sed 's/^/| /' conftest.$ac_ext >&5
5048
5049ac_hi=`expr '(' $ac_mid ')' - 1`
5050 if test $ac_mid -le $ac_hi; then
5051 ac_lo= ac_hi=
5052 break
5053 fi
5054 ac_mid=`expr 2 '*' $ac_mid`
5055fi
5056rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5057 done
5058else
5059 echo "$as_me: failed program was:" >&5
5060sed 's/^/| /' conftest.$ac_ext >&5
5061
5062ac_lo= ac_hi=
5063fi
5064rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5065fi
5066rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5067# Binary search between lo and hi bounds.
5068while test "x$ac_lo" != "x$ac_hi"; do
5069 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5070 cat >conftest.$ac_ext <<_ACEOF
5071/* confdefs.h. */
5072_ACEOF
5073cat confdefs.h >>conftest.$ac_ext
5074cat >>conftest.$ac_ext <<_ACEOF
5075/* end confdefs.h. */
5076$ac_includes_default
5077int
5078main ()
5079{
5080static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5081test_array [0] = 0
5082
5083 ;
5084 return 0;
5085}
5086_ACEOF
5087rm -f conftest.$ac_objext
5088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5089 (eval $ac_compile) 2>conftest.er1
5090 ac_status=$?
5091 grep -v '^ *+' conftest.er1 >conftest.err
5092 rm -f conftest.er1
5093 cat conftest.err >&5
5094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5095 (exit $ac_status); } &&
a1286ef5
ZW
5096 { ac_try='test -z "$ac_c_werror_flag"
5097 || test ! -s conftest.err'
bf3b7cd3
JD
5098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5099 (eval $ac_try) 2>&5
5100 ac_status=$?
5101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5102 (exit $ac_status); }; } &&
5103 { ac_try='test -s conftest.$ac_objext'
5104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5105 (eval $ac_try) 2>&5
5106 ac_status=$?
5107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5108 (exit $ac_status); }; }; then
5109 ac_hi=$ac_mid
5110else
5111 echo "$as_me: failed program was:" >&5
5112sed 's/^/| /' conftest.$ac_ext >&5
5113
5114ac_lo=`expr '(' $ac_mid ')' + 1`
5115fi
5116rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5117done
5118case $ac_lo in
5119?*) ac_cv_sizeof_long=$ac_lo;;
5120'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5121See \`config.log' for more details." >&5
5122echo "$as_me: error: cannot compute sizeof (long), 77
5123See \`config.log' for more details." >&2;}
5124 { (exit 1); exit 1; }; } ;;
5125esac
5126else
5127 if test "$cross_compiling" = yes; then
a1286ef5
ZW
5128 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5129See \`config.log' for more details." >&5
5130echo "$as_me: error: cannot run test program while cross compiling
5131See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5132 { (exit 1); exit 1; }; }
5133else
5134 cat >conftest.$ac_ext <<_ACEOF
5135/* confdefs.h. */
5136_ACEOF
5137cat confdefs.h >>conftest.$ac_ext
5138cat >>conftest.$ac_ext <<_ACEOF
5139/* end confdefs.h. */
5140$ac_includes_default
5141long longval () { return (long) (sizeof (long)); }
5142unsigned long ulongval () { return (long) (sizeof (long)); }
5143#include <stdio.h>
5144#include <stdlib.h>
5145int
5146main ()
5147{
5148
5149 FILE *f = fopen ("conftest.val", "w");
5150 if (! f)
5151 exit (1);
5152 if (((long) (sizeof (long))) < 0)
5153 {
5154 long i = longval ();
5155 if (i != ((long) (sizeof (long))))
5156 exit (1);
5157 fprintf (f, "%ld\n", i);
5158 }
5159 else
5160 {
5161 unsigned long i = ulongval ();
5162 if (i != ((long) (sizeof (long))))
5163 exit (1);
5164 fprintf (f, "%lu\n", i);
5165 }
5166 exit (ferror (f) || fclose (f) != 0);
5167
5168 ;
5169 return 0;
5170}
5171_ACEOF
5172rm -f conftest$ac_exeext
5173if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5174 (eval $ac_link) 2>&5
5175 ac_status=$?
5176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5177 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5179 (eval $ac_try) 2>&5
5180 ac_status=$?
5181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5182 (exit $ac_status); }; }; then
5183 ac_cv_sizeof_long=`cat conftest.val`
5184else
5185 echo "$as_me: program exited with status $ac_status" >&5
5186echo "$as_me: failed program was:" >&5
5187sed 's/^/| /' conftest.$ac_ext >&5
5188
5189( exit $ac_status )
5190{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5191See \`config.log' for more details." >&5
5192echo "$as_me: error: cannot compute sizeof (long), 77
5193See \`config.log' for more details." >&2;}
5194 { (exit 1); exit 1; }; }
5195fi
5196rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5197fi
5198fi
5199rm -f conftest.val
5200else
5201 ac_cv_sizeof_long=0
5202fi
5203fi
5204echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5205echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5206cat >>confdefs.h <<_ACEOF
5207#define SIZEOF_LONG $ac_cv_sizeof_long
5208_ACEOF
5209
5210
5211if test $ac_cv_c_long_long = yes; then
5212 echo "$as_me:$LINENO: checking for long long" >&5
5213echo $ECHO_N "checking for long long... $ECHO_C" >&6
5214if test "${ac_cv_type_long_long+set}" = set; then
5215 echo $ECHO_N "(cached) $ECHO_C" >&6
5216else
5217 cat >conftest.$ac_ext <<_ACEOF
5218/* confdefs.h. */
5219_ACEOF
5220cat confdefs.h >>conftest.$ac_ext
5221cat >>conftest.$ac_ext <<_ACEOF
5222/* end confdefs.h. */
5223$ac_includes_default
5224int
5225main ()
5226{
5227if ((long long *) 0)
5228 return 0;
5229if (sizeof (long long))
5230 return 0;
5231 ;
5232 return 0;
5233}
5234_ACEOF
5235rm -f conftest.$ac_objext
5236if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5237 (eval $ac_compile) 2>conftest.er1
5238 ac_status=$?
5239 grep -v '^ *+' conftest.er1 >conftest.err
5240 rm -f conftest.er1
5241 cat conftest.err >&5
5242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5243 (exit $ac_status); } &&
a1286ef5
ZW
5244 { ac_try='test -z "$ac_c_werror_flag"
5245 || test ! -s conftest.err'
bf3b7cd3
JD
5246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5247 (eval $ac_try) 2>&5
5248 ac_status=$?
5249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5250 (exit $ac_status); }; } &&
5251 { ac_try='test -s conftest.$ac_objext'
5252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5253 (eval $ac_try) 2>&5
5254 ac_status=$?
5255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5256 (exit $ac_status); }; }; then
5257 ac_cv_type_long_long=yes
5258else
5259 echo "$as_me: failed program was:" >&5
5260sed 's/^/| /' conftest.$ac_ext >&5
5261
5262ac_cv_type_long_long=no
5263fi
5264rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5265fi
5266echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5267echo "${ECHO_T}$ac_cv_type_long_long" >&6
5268
5269echo "$as_me:$LINENO: checking size of long long" >&5
5270echo $ECHO_N "checking size of long long... $ECHO_C" >&6
5271if test "${ac_cv_sizeof_long_long+set}" = set; then
5272 echo $ECHO_N "(cached) $ECHO_C" >&6
5273else
5274 if test "$ac_cv_type_long_long" = yes; then
5275 # The cast to unsigned long works around a bug in the HP C Compiler
5276 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5277 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5278 # This bug is HP SR number 8606223364.
5279 if test "$cross_compiling" = yes; then
5280 # Depending upon the size, compute the lo and hi bounds.
5281cat >conftest.$ac_ext <<_ACEOF
5282/* confdefs.h. */
5283_ACEOF
5284cat confdefs.h >>conftest.$ac_ext
5285cat >>conftest.$ac_ext <<_ACEOF
5286/* end confdefs.h. */
5287$ac_includes_default
5288int
5289main ()
5290{
5291static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
5292test_array [0] = 0
5293
5294 ;
5295 return 0;
5296}
5297_ACEOF
5298rm -f conftest.$ac_objext
5299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5300 (eval $ac_compile) 2>conftest.er1
5301 ac_status=$?
5302 grep -v '^ *+' conftest.er1 >conftest.err
5303 rm -f conftest.er1
5304 cat conftest.err >&5
5305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5306 (exit $ac_status); } &&
a1286ef5
ZW
5307 { ac_try='test -z "$ac_c_werror_flag"
5308 || test ! -s conftest.err'
bf3b7cd3
JD
5309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5310 (eval $ac_try) 2>&5
5311 ac_status=$?
5312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5313 (exit $ac_status); }; } &&
5314 { ac_try='test -s conftest.$ac_objext'
5315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5316 (eval $ac_try) 2>&5
5317 ac_status=$?
5318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5319 (exit $ac_status); }; }; then
5320 ac_lo=0 ac_mid=0
5321 while :; do
5322 cat >conftest.$ac_ext <<_ACEOF
5323/* confdefs.h. */
5324_ACEOF
5325cat confdefs.h >>conftest.$ac_ext
5326cat >>conftest.$ac_ext <<_ACEOF
5327/* end confdefs.h. */
5328$ac_includes_default
5329int
5330main ()
5331{
5332static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5333test_array [0] = 0
5334
5335 ;
5336 return 0;
5337}
5338_ACEOF
5339rm -f conftest.$ac_objext
5340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5341 (eval $ac_compile) 2>conftest.er1
5342 ac_status=$?
5343 grep -v '^ *+' conftest.er1 >conftest.err
5344 rm -f conftest.er1
5345 cat conftest.err >&5
5346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5347 (exit $ac_status); } &&
a1286ef5
ZW
5348 { ac_try='test -z "$ac_c_werror_flag"
5349 || test ! -s conftest.err'
bf3b7cd3
JD
5350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5351 (eval $ac_try) 2>&5
5352 ac_status=$?
5353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5354 (exit $ac_status); }; } &&
5355 { ac_try='test -s conftest.$ac_objext'
5356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5357 (eval $ac_try) 2>&5
5358 ac_status=$?
5359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5360 (exit $ac_status); }; }; then
5361 ac_hi=$ac_mid; break
5362else
5363 echo "$as_me: failed program was:" >&5
5364sed 's/^/| /' conftest.$ac_ext >&5
5365
5366ac_lo=`expr $ac_mid + 1`
5367 if test $ac_lo -le $ac_mid; then
5368 ac_lo= ac_hi=
5369 break
5370 fi
5371 ac_mid=`expr 2 '*' $ac_mid + 1`
5372fi
5373rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5374 done
5375else
5376 echo "$as_me: failed program was:" >&5
5377sed 's/^/| /' conftest.$ac_ext >&5
5378
5379cat >conftest.$ac_ext <<_ACEOF
5380/* confdefs.h. */
5381_ACEOF
5382cat confdefs.h >>conftest.$ac_ext
5383cat >>conftest.$ac_ext <<_ACEOF
5384/* end confdefs.h. */
5385$ac_includes_default
5386int
5387main ()
5388{
5389static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
5390test_array [0] = 0
5391
5392 ;
5393 return 0;
5394}
5395_ACEOF
5396rm -f conftest.$ac_objext
5397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5398 (eval $ac_compile) 2>conftest.er1
5399 ac_status=$?
5400 grep -v '^ *+' conftest.er1 >conftest.err
5401 rm -f conftest.er1
5402 cat conftest.err >&5
5403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5404 (exit $ac_status); } &&
a1286ef5
ZW
5405 { ac_try='test -z "$ac_c_werror_flag"
5406 || test ! -s conftest.err'
bf3b7cd3
JD
5407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5408 (eval $ac_try) 2>&5
5409 ac_status=$?
5410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5411 (exit $ac_status); }; } &&
5412 { ac_try='test -s conftest.$ac_objext'
5413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5414 (eval $ac_try) 2>&5
5415 ac_status=$?
5416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5417 (exit $ac_status); }; }; then
5418 ac_hi=-1 ac_mid=-1
5419 while :; do
5420 cat >conftest.$ac_ext <<_ACEOF
5421/* confdefs.h. */
5422_ACEOF
5423cat confdefs.h >>conftest.$ac_ext
5424cat >>conftest.$ac_ext <<_ACEOF
5425/* end confdefs.h. */
5426$ac_includes_default
5427int
5428main ()
5429{
5430static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
5431test_array [0] = 0
5432
5433 ;
5434 return 0;
5435}
5436_ACEOF
5437rm -f conftest.$ac_objext
5438if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5439 (eval $ac_compile) 2>conftest.er1
5440 ac_status=$?
5441 grep -v '^ *+' conftest.er1 >conftest.err
5442 rm -f conftest.er1
5443 cat conftest.err >&5
5444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5445 (exit $ac_status); } &&
a1286ef5
ZW
5446 { ac_try='test -z "$ac_c_werror_flag"
5447 || test ! -s conftest.err'
bf3b7cd3
JD
5448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5449 (eval $ac_try) 2>&5
5450 ac_status=$?
5451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5452 (exit $ac_status); }; } &&
5453 { ac_try='test -s conftest.$ac_objext'
5454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5455 (eval $ac_try) 2>&5
5456 ac_status=$?
5457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5458 (exit $ac_status); }; }; then
5459 ac_lo=$ac_mid; break
5460else
5461 echo "$as_me: failed program was:" >&5
5462sed 's/^/| /' conftest.$ac_ext >&5
5463
5464ac_hi=`expr '(' $ac_mid ')' - 1`
5465 if test $ac_mid -le $ac_hi; then
5466 ac_lo= ac_hi=
5467 break
5468 fi
5469 ac_mid=`expr 2 '*' $ac_mid`
5470fi
5471rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5472 done
5473else
5474 echo "$as_me: failed program was:" >&5
5475sed 's/^/| /' conftest.$ac_ext >&5
5476
5477ac_lo= ac_hi=
5478fi
5479rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5480fi
5481rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5482# Binary search between lo and hi bounds.
5483while test "x$ac_lo" != "x$ac_hi"; do
5484 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5485 cat >conftest.$ac_ext <<_ACEOF
5486/* confdefs.h. */
5487_ACEOF
5488cat confdefs.h >>conftest.$ac_ext
5489cat >>conftest.$ac_ext <<_ACEOF
5490/* end confdefs.h. */
5491$ac_includes_default
5492int
5493main ()
5494{
5495static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5496test_array [0] = 0
5497
5498 ;
5499 return 0;
5500}
5501_ACEOF
5502rm -f conftest.$ac_objext
5503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5504 (eval $ac_compile) 2>conftest.er1
5505 ac_status=$?
5506 grep -v '^ *+' conftest.er1 >conftest.err
5507 rm -f conftest.er1
5508 cat conftest.err >&5
5509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5510 (exit $ac_status); } &&
a1286ef5
ZW
5511 { ac_try='test -z "$ac_c_werror_flag"
5512 || test ! -s conftest.err'
bf3b7cd3
JD
5513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5514 (eval $ac_try) 2>&5
5515 ac_status=$?
5516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5517 (exit $ac_status); }; } &&
5518 { ac_try='test -s conftest.$ac_objext'
5519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5520 (eval $ac_try) 2>&5
5521 ac_status=$?
5522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5523 (exit $ac_status); }; }; then
5524 ac_hi=$ac_mid
5525else
5526 echo "$as_me: failed program was:" >&5
5527sed 's/^/| /' conftest.$ac_ext >&5
5528
5529ac_lo=`expr '(' $ac_mid ')' + 1`
5530fi
5531rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5532done
5533case $ac_lo in
5534?*) ac_cv_sizeof_long_long=$ac_lo;;
5535'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5536See \`config.log' for more details." >&5
5537echo "$as_me: error: cannot compute sizeof (long long), 77
5538See \`config.log' for more details." >&2;}
5539 { (exit 1); exit 1; }; } ;;
5540esac
5541else
5542 if test "$cross_compiling" = yes; then
a1286ef5
ZW
5543 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5544See \`config.log' for more details." >&5
5545echo "$as_me: error: cannot run test program while cross compiling
5546See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5547 { (exit 1); exit 1; }; }
5548else
5549 cat >conftest.$ac_ext <<_ACEOF
5550/* confdefs.h. */
5551_ACEOF
5552cat confdefs.h >>conftest.$ac_ext
5553cat >>conftest.$ac_ext <<_ACEOF
5554/* end confdefs.h. */
5555$ac_includes_default
5556long longval () { return (long) (sizeof (long long)); }
5557unsigned long ulongval () { return (long) (sizeof (long long)); }
5558#include <stdio.h>
5559#include <stdlib.h>
5560int
5561main ()
5562{
5563
5564 FILE *f = fopen ("conftest.val", "w");
5565 if (! f)
5566 exit (1);
5567 if (((long) (sizeof (long long))) < 0)
5568 {
5569 long i = longval ();
5570 if (i != ((long) (sizeof (long long))))
5571 exit (1);
5572 fprintf (f, "%ld\n", i);
5573 }
5574 else
5575 {
5576 unsigned long i = ulongval ();
5577 if (i != ((long) (sizeof (long long))))
5578 exit (1);
5579 fprintf (f, "%lu\n", i);
5580 }
5581 exit (ferror (f) || fclose (f) != 0);
5582
5583 ;
5584 return 0;
5585}
5586_ACEOF
5587rm -f conftest$ac_exeext
5588if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5589 (eval $ac_link) 2>&5
5590 ac_status=$?
5591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5592 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5594 (eval $ac_try) 2>&5
5595 ac_status=$?
5596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5597 (exit $ac_status); }; }; then
5598 ac_cv_sizeof_long_long=`cat conftest.val`
5599else
5600 echo "$as_me: program exited with status $ac_status" >&5
5601echo "$as_me: failed program was:" >&5
5602sed 's/^/| /' conftest.$ac_ext >&5
5603
5604( exit $ac_status )
5605{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5606See \`config.log' for more details." >&5
5607echo "$as_me: error: cannot compute sizeof (long long), 77
5608See \`config.log' for more details." >&2;}
5609 { (exit 1); exit 1; }; }
5610fi
5611rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5612fi
5613fi
5614rm -f conftest.val
5615else
5616 ac_cv_sizeof_long_long=0
5617fi
5618fi
5619echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5620echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
5621cat >>confdefs.h <<_ACEOF
5622#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5623_ACEOF
5624
5625
5626fi
5627if test $ac_cv_c___int64 = yes; then
5628 echo "$as_me:$LINENO: checking for __int64" >&5
5629echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5630if test "${ac_cv_type___int64+set}" = set; then
5631 echo $ECHO_N "(cached) $ECHO_C" >&6
5632else
ba479fd2 5633 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5634/* confdefs.h. */
5635_ACEOF
5636cat confdefs.h >>conftest.$ac_ext
5637cat >>conftest.$ac_ext <<_ACEOF
5638/* end confdefs.h. */
bf3b7cd3 5639$ac_includes_default
ba479fd2
NN
5640int
5641main ()
5642{
bf3b7cd3
JD
5643if ((__int64 *) 0)
5644 return 0;
5645if (sizeof (__int64))
5646 return 0;
ba479fd2
NN
5647 ;
5648 return 0;
5649}
5650_ACEOF
5651rm -f conftest.$ac_objext
5652if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5653 (eval $ac_compile) 2>conftest.er1
ba479fd2 5654 ac_status=$?
86da66b5
HPN
5655 grep -v '^ *+' conftest.er1 >conftest.err
5656 rm -f conftest.er1
5657 cat conftest.err >&5
ba479fd2
NN
5658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5659 (exit $ac_status); } &&
a1286ef5
ZW
5660 { ac_try='test -z "$ac_c_werror_flag"
5661 || test ! -s conftest.err'
86da66b5
HPN
5662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5663 (eval $ac_try) 2>&5
5664 ac_status=$?
5665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5666 (exit $ac_status); }; } &&
5667 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5669 (eval $ac_try) 2>&5
5670 ac_status=$?
5671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5672 (exit $ac_status); }; }; then
bf3b7cd3 5673 ac_cv_type___int64=yes
75b6f3fd 5674else
ba479fd2
NN
5675 echo "$as_me: failed program was:" >&5
5676sed 's/^/| /' conftest.$ac_ext >&5
5677
bf3b7cd3 5678ac_cv_type___int64=no
75b6f3fd 5679fi
86da66b5 5680rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 5681fi
bf3b7cd3
JD
5682echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5683echo "${ECHO_T}$ac_cv_type___int64" >&6
75b6f3fd 5684
bf3b7cd3
JD
5685echo "$as_me:$LINENO: checking size of __int64" >&5
5686echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
5687if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 5688 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 5689else
bf3b7cd3
JD
5690 if test "$ac_cv_type___int64" = yes; then
5691 # The cast to unsigned long works around a bug in the HP C Compiler
5692 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5693 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5694 # This bug is HP SR number 8606223364.
5695 if test "$cross_compiling" = yes; then
5696 # Depending upon the size, compute the lo and hi bounds.
5697cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5698/* confdefs.h. */
5699_ACEOF
5700cat confdefs.h >>conftest.$ac_ext
5701cat >>conftest.$ac_ext <<_ACEOF
5702/* end confdefs.h. */
bf3b7cd3 5703$ac_includes_default
ba479fd2
NN
5704int
5705main ()
5706{
bf3b7cd3
JD
5707static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
5708test_array [0] = 0
5709
ba479fd2
NN
5710 ;
5711 return 0;
5712}
5713_ACEOF
5714rm -f conftest.$ac_objext
5715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5716 (eval $ac_compile) 2>conftest.er1
ba479fd2 5717 ac_status=$?
86da66b5
HPN
5718 grep -v '^ *+' conftest.er1 >conftest.err
5719 rm -f conftest.er1
5720 cat conftest.err >&5
ba479fd2
NN
5721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5722 (exit $ac_status); } &&
a1286ef5
ZW
5723 { ac_try='test -z "$ac_c_werror_flag"
5724 || test ! -s conftest.err'
86da66b5
HPN
5725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5726 (eval $ac_try) 2>&5
5727 ac_status=$?
5728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5729 (exit $ac_status); }; } &&
5730 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5732 (eval $ac_try) 2>&5
5733 ac_status=$?
5734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5735 (exit $ac_status); }; }; then
bf3b7cd3
JD
5736 ac_lo=0 ac_mid=0
5737 while :; do
5738 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5739/* confdefs.h. */
5740_ACEOF
5741cat confdefs.h >>conftest.$ac_ext
5742cat >>conftest.$ac_ext <<_ACEOF
5743/* end confdefs.h. */
bf3b7cd3 5744$ac_includes_default
ba479fd2
NN
5745int
5746main ()
5747{
bf3b7cd3
JD
5748static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5749test_array [0] = 0
5750
ba479fd2
NN
5751 ;
5752 return 0;
5753}
5754_ACEOF
5755rm -f conftest.$ac_objext
5756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5757 (eval $ac_compile) 2>conftest.er1
ba479fd2 5758 ac_status=$?
86da66b5
HPN
5759 grep -v '^ *+' conftest.er1 >conftest.err
5760 rm -f conftest.er1
5761 cat conftest.err >&5
ba479fd2
NN
5762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5763 (exit $ac_status); } &&
a1286ef5
ZW
5764 { ac_try='test -z "$ac_c_werror_flag"
5765 || test ! -s conftest.err'
86da66b5
HPN
5766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5767 (eval $ac_try) 2>&5
5768 ac_status=$?
5769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5770 (exit $ac_status); }; } &&
5771 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5773 (eval $ac_try) 2>&5
5774 ac_status=$?
5775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5776 (exit $ac_status); }; }; then
bf3b7cd3 5777 ac_hi=$ac_mid; break
75e93faa 5778else
ba479fd2
NN
5779 echo "$as_me: failed program was:" >&5
5780sed 's/^/| /' conftest.$ac_ext >&5
5781
bf3b7cd3
JD
5782ac_lo=`expr $ac_mid + 1`
5783 if test $ac_lo -le $ac_mid; then
5784 ac_lo= ac_hi=
5785 break
5786 fi
5787 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 5788fi
86da66b5 5789rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5790 done
75e93faa 5791else
bf3b7cd3
JD
5792 echo "$as_me: failed program was:" >&5
5793sed 's/^/| /' conftest.$ac_ext >&5
5794
5795cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5796/* confdefs.h. */
5797_ACEOF
5798cat confdefs.h >>conftest.$ac_ext
5799cat >>conftest.$ac_ext <<_ACEOF
5800/* end confdefs.h. */
bf3b7cd3 5801$ac_includes_default
ba479fd2
NN
5802int
5803main ()
5804{
bf3b7cd3
JD
5805static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
5806test_array [0] = 0
5807
ba479fd2
NN
5808 ;
5809 return 0;
5810}
5811_ACEOF
5812rm -f conftest.$ac_objext
5813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5814 (eval $ac_compile) 2>conftest.er1
ba479fd2 5815 ac_status=$?
86da66b5
HPN
5816 grep -v '^ *+' conftest.er1 >conftest.err
5817 rm -f conftest.er1
5818 cat conftest.err >&5
ba479fd2
NN
5819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820 (exit $ac_status); } &&
a1286ef5
ZW
5821 { ac_try='test -z "$ac_c_werror_flag"
5822 || test ! -s conftest.err'
86da66b5
HPN
5823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5824 (eval $ac_try) 2>&5
5825 ac_status=$?
5826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5827 (exit $ac_status); }; } &&
5828 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5830 (eval $ac_try) 2>&5
5831 ac_status=$?
5832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5833 (exit $ac_status); }; }; then
bf3b7cd3
JD
5834 ac_hi=-1 ac_mid=-1
5835 while :; do
5836 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5837/* confdefs.h. */
5838_ACEOF
5839cat confdefs.h >>conftest.$ac_ext
5840cat >>conftest.$ac_ext <<_ACEOF
5841/* end confdefs.h. */
bf3b7cd3 5842$ac_includes_default
ba479fd2
NN
5843int
5844main ()
5845{
bf3b7cd3
JD
5846static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
5847test_array [0] = 0
5848
ba479fd2
NN
5849 ;
5850 return 0;
5851}
5852_ACEOF
5853rm -f conftest.$ac_objext
5854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5855 (eval $ac_compile) 2>conftest.er1
ba479fd2 5856 ac_status=$?
86da66b5
HPN
5857 grep -v '^ *+' conftest.er1 >conftest.err
5858 rm -f conftest.er1
5859 cat conftest.err >&5
ba479fd2
NN
5860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5861 (exit $ac_status); } &&
a1286ef5
ZW
5862 { ac_try='test -z "$ac_c_werror_flag"
5863 || test ! -s conftest.err'
86da66b5
HPN
5864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5865 (eval $ac_try) 2>&5
5866 ac_status=$?
5867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5868 (exit $ac_status); }; } &&
5869 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5871 (eval $ac_try) 2>&5
5872 ac_status=$?
5873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5874 (exit $ac_status); }; }; then
bf3b7cd3 5875 ac_lo=$ac_mid; break
04cabffc 5876else
ba479fd2
NN
5877 echo "$as_me: failed program was:" >&5
5878sed 's/^/| /' conftest.$ac_ext >&5
5879
bf3b7cd3
JD
5880ac_hi=`expr '(' $ac_mid ')' - 1`
5881 if test $ac_mid -le $ac_hi; then
5882 ac_lo= ac_hi=
5883 break
5884 fi
5885 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 5886fi
86da66b5 5887rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5888 done
5889else
5890 echo "$as_me: failed program was:" >&5
5891sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 5892
bf3b7cd3 5893ac_lo= ac_hi=
414d23ae 5894fi
bf3b7cd3 5895rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5896fi
bf3b7cd3
JD
5897rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5898# Binary search between lo and hi bounds.
5899while test "x$ac_lo" != "x$ac_hi"; do
5900 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 5901 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5902/* confdefs.h. */
5903_ACEOF
5904cat confdefs.h >>conftest.$ac_ext
5905cat >>conftest.$ac_ext <<_ACEOF
5906/* end confdefs.h. */
bf3b7cd3 5907$ac_includes_default
ba479fd2
NN
5908int
5909main ()
5910{
bf3b7cd3
JD
5911static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5912test_array [0] = 0
5913
ba479fd2
NN
5914 ;
5915 return 0;
5916}
5917_ACEOF
5918rm -f conftest.$ac_objext
5919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5920 (eval $ac_compile) 2>conftest.er1
ba479fd2 5921 ac_status=$?
86da66b5
HPN
5922 grep -v '^ *+' conftest.er1 >conftest.err
5923 rm -f conftest.er1
5924 cat conftest.err >&5
ba479fd2
NN
5925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5926 (exit $ac_status); } &&
a1286ef5
ZW
5927 { ac_try='test -z "$ac_c_werror_flag"
5928 || test ! -s conftest.err'
86da66b5
HPN
5929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5930 (eval $ac_try) 2>&5
5931 ac_status=$?
5932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5933 (exit $ac_status); }; } &&
5934 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5936 (eval $ac_try) 2>&5
5937 ac_status=$?
5938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5939 (exit $ac_status); }; }; then
bf3b7cd3 5940 ac_hi=$ac_mid
75e93faa 5941else
ba479fd2
NN
5942 echo "$as_me: failed program was:" >&5
5943sed 's/^/| /' conftest.$ac_ext >&5
5944
bf3b7cd3 5945ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 5946fi
86da66b5 5947rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 5948done
bf3b7cd3
JD
5949case $ac_lo in
5950?*) ac_cv_sizeof___int64=$ac_lo;;
5951'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
5952See \`config.log' for more details." >&5
5953echo "$as_me: error: cannot compute sizeof (__int64), 77
5954See \`config.log' for more details." >&2;}
5955 { (exit 1); exit 1; }; } ;;
5956esac
5957else
5958 if test "$cross_compiling" = yes; then
a1286ef5
ZW
5959 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5960See \`config.log' for more details." >&5
5961echo "$as_me: error: cannot run test program while cross compiling
5962See \`config.log' for more details." >&2;}
bf3b7cd3
JD
5963 { (exit 1); exit 1; }; }
5964else
5965 cat >conftest.$ac_ext <<_ACEOF
5966/* confdefs.h. */
5967_ACEOF
5968cat confdefs.h >>conftest.$ac_ext
5969cat >>conftest.$ac_ext <<_ACEOF
5970/* end confdefs.h. */
5971$ac_includes_default
5972long longval () { return (long) (sizeof (__int64)); }
5973unsigned long ulongval () { return (long) (sizeof (__int64)); }
5974#include <stdio.h>
5975#include <stdlib.h>
5976int
5977main ()
5978{
414d23ae 5979
bf3b7cd3
JD
5980 FILE *f = fopen ("conftest.val", "w");
5981 if (! f)
5982 exit (1);
5983 if (((long) (sizeof (__int64))) < 0)
5984 {
5985 long i = longval ();
5986 if (i != ((long) (sizeof (__int64))))
5987 exit (1);
5988 fprintf (f, "%ld\n", i);
5989 }
5990 else
5991 {
5992 unsigned long i = ulongval ();
5993 if (i != ((long) (sizeof (__int64))))
5994 exit (1);
5995 fprintf (f, "%lu\n", i);
5996 }
5997 exit (ferror (f) || fclose (f) != 0);
5998
5999 ;
6000 return 0;
6001}
6002_ACEOF
6003rm -f conftest$ac_exeext
6004if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6005 (eval $ac_link) 2>&5
6006 ac_status=$?
6007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6008 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6010 (eval $ac_try) 2>&5
6011 ac_status=$?
6012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6013 (exit $ac_status); }; }; then
6014 ac_cv_sizeof___int64=`cat conftest.val`
6015else
6016 echo "$as_me: program exited with status $ac_status" >&5
6017echo "$as_me: failed program was:" >&5
6018sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6019
bf3b7cd3
JD
6020( exit $ac_status )
6021{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
6022See \`config.log' for more details." >&5
6023echo "$as_me: error: cannot compute sizeof (__int64), 77
6024See \`config.log' for more details." >&2;}
ba479fd2 6025 { (exit 1); exit 1; }; }
414d23ae 6026fi
bf3b7cd3
JD
6027rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6028fi
6029fi
6030rm -f conftest.val
6031else
6032 ac_cv_sizeof___int64=0
6033fi
6034fi
ba479fd2
NN
6035echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6036echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
ba479fd2 6037cat >>confdefs.h <<_ACEOF
414d23ae 6038#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6039_ACEOF
414d23ae 6040
cafe096b 6041
414d23ae
HPN
6042fi
6043
34a86c2b
NN
6044# ---------------------
6045# Warnings and checking
6046# ---------------------
6047
b5472e1d
NN
6048# Check $CC warning features (if it's GCC).
6049# We want to use -pedantic, but we don't want warnings about
6050# * 'long long'
6051# * variadic macros
6052# So, we only use -pedantic if we can disable those warnings.
6053
6054echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6055echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
6056if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6057 echo $ECHO_N "(cached) $ECHO_C" >&6
6058else
6059 save_CFLAGS="$CFLAGS"
6060 CFLAGS="-Wno-long-long"
6061 cat >conftest.$ac_ext <<_ACEOF
6062/* confdefs.h. */
6063_ACEOF
6064cat confdefs.h >>conftest.$ac_ext
6065cat >>conftest.$ac_ext <<_ACEOF
6066/* end confdefs.h. */
6067
6068_ACEOF
6069rm -f conftest.$ac_objext
6070if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6071 (eval $ac_compile) 2>conftest.er1
6072 ac_status=$?
6073 grep -v '^ *+' conftest.er1 >conftest.err
6074 rm -f conftest.er1
6075 cat conftest.err >&5
6076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6077 (exit $ac_status); } &&
a1286ef5
ZW
6078 { ac_try='test -z "$ac_c_werror_flag"
6079 || test ! -s conftest.err'
b5472e1d
NN
6080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6081 (eval $ac_try) 2>&5
6082 ac_status=$?
6083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6084 (exit $ac_status); }; } &&
6085 { ac_try='test -s conftest.$ac_objext'
6086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6087 (eval $ac_try) 2>&5
6088 ac_status=$?
6089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6090 (exit $ac_status); }; }; then
6091 ac_cv_prog_cc_w_no_long_long=yes
6092else
6093 echo "$as_me: failed program was:" >&5
6094sed 's/^/| /' conftest.$ac_ext >&5
6095
6096ac_cv_prog_cc_w_no_long_long=no
6097fi
6098rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6099 CFLAGS="$save_CFLAGS"
6100
6101fi
6102echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6103echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
6104
6105echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6106echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
6107if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6108 echo $ECHO_N "(cached) $ECHO_C" >&6
6109else
6110 save_CFLAGS="$CFLAGS"
6111 CFLAGS="-Wno-variadic-macros"
6112 cat >conftest.$ac_ext <<_ACEOF
6113/* confdefs.h. */
6114_ACEOF
6115cat confdefs.h >>conftest.$ac_ext
6116cat >>conftest.$ac_ext <<_ACEOF
6117/* end confdefs.h. */
6118
6119_ACEOF
6120rm -f conftest.$ac_objext
6121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6122 (eval $ac_compile) 2>conftest.er1
6123 ac_status=$?
6124 grep -v '^ *+' conftest.er1 >conftest.err
6125 rm -f conftest.er1
6126 cat conftest.err >&5
6127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6128 (exit $ac_status); } &&
a1286ef5
ZW
6129 { ac_try='test -z "$ac_c_werror_flag"
6130 || test ! -s conftest.err'
b5472e1d
NN
6131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6132 (eval $ac_try) 2>&5
6133 ac_status=$?
6134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6135 (exit $ac_status); }; } &&
6136 { ac_try='test -s conftest.$ac_objext'
6137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6138 (eval $ac_try) 2>&5
6139 ac_status=$?
6140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6141 (exit $ac_status); }; }; then
6142 ac_cv_prog_cc_w_no_variadic_macros=yes
6143else
6144 echo "$as_me: failed program was:" >&5
6145sed 's/^/| /' conftest.$ac_ext >&5
6146
6147ac_cv_prog_cc_w_no_variadic_macros=no
6148fi
6149rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6150 CFLAGS="$save_CFLAGS"
6151
6152fi
6153echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6154echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
6155
34a86c2b 6156strict1_warn=
b5472e1d
NN
6157if test $ac_cv_prog_cc_w_no_long_long = yes \
6158 && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then
6159 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros"
34a86c2b
NN
6160fi
6161
6162
643d3bd2
NN
6163# Add -Wold-style-definition if it's accepted
6164echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6165echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
6166if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6167 echo $ECHO_N "(cached) $ECHO_C" >&6
6168else
6169 save_CFLAGS="$CFLAGS"
6170 CFLAGS="-Wold-style-definition"
6171 cat >conftest.$ac_ext <<_ACEOF
6172/* confdefs.h. */
6173_ACEOF
6174cat confdefs.h >>conftest.$ac_ext
6175cat >>conftest.$ac_ext <<_ACEOF
6176/* end confdefs.h. */
6177
6178_ACEOF
6179rm -f conftest.$ac_objext
6180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6181 (eval $ac_compile) 2>conftest.er1
6182 ac_status=$?
6183 grep -v '^ *+' conftest.er1 >conftest.err
6184 rm -f conftest.er1
6185 cat conftest.err >&5
6186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6187 (exit $ac_status); } &&
a1286ef5
ZW
6188 { ac_try='test -z "$ac_c_werror_flag"
6189 || test ! -s conftest.err'
643d3bd2
NN
6190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6191 (eval $ac_try) 2>&5
6192 ac_status=$?
6193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6194 (exit $ac_status); }; } &&
6195 { ac_try='test -s conftest.$ac_objext'
6196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6197 (eval $ac_try) 2>&5
6198 ac_status=$?
6199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6200 (exit $ac_status); }; }; then
6201 ac_cv_prog_cc_w_old_style_definition=yes
6202else
6203 echo "$as_me: failed program was:" >&5
6204sed 's/^/| /' conftest.$ac_ext >&5
6205
6206ac_cv_prog_cc_w_old_style_definition=no
6207fi
6208rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6209 CFLAGS="$save_CFLAGS"
6210
6211fi
6212echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
6213echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
6214if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
6215 strict1_warn="${strict1_warn} -Wold-style-definition"
6216fi
6217
09a9c095
NN
6218# Enable -Werror, period.
6219# Check whether --enable-werror_always or --disable-werror_always was given.
6220if test "${enable_werror_always+set}" = set; then
6221 enableval="$enable_werror_always"
6222
6223else
6224 enable_werror_always=no
6225fi;
6226if test x${enable_werror_always} = xyes ; then
6227 strict1_warn="${strict1_warn} -Werror"
6228 WERROR=-Werror
6229fi
6230
ba479fd2 6231# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
6232# That's useful for people building cross-compilers, or just running a
6233# quick `make'.
6234warn_cflags=
6235if test "x$GCC" = "xyes"; then
6236 warn_cflags='$(GCC_WARN_CFLAGS)'
6237fi
6238
6239
dd859b8a 6240# Enable -Werror in bootstrap stage2 and later.
a1286ef5
ZW
6241is_release=
6242if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6243 is_release=yes
6244fi
dd859b8a
KG
6245# Check whether --enable-werror or --disable-werror was given.
6246if test "${enable_werror+set}" = set; then
6247 enableval="$enable_werror"
ba479fd2 6248
dd859b8a 6249else
06c37c96
NS
6250 if test x$is_release = x ; then
6251 # Default to "yes" on development branches.
dd859b8a 6252 enable_werror=yes
06c37c96
NS
6253else
6254 # Default to "no" on release branches.
6255 enable_werror=no
6256fi
ba479fd2 6257fi;
dd859b8a
KG
6258if test x$enable_werror = xyes ; then
6259 WERROR=-Werror
6260fi
6261
6262
414d23ae
HPN
6263# Enable expensive internal checks
6264# Check whether --enable-checking or --disable-checking was given.
6265if test "${enable_checking+set}" = set; then
6266 enableval="$enable_checking"
e1bbfc5c
NS
6267 ac_checking_flags="${enableval}"
6268else
6269
6270# Determine the default checks.
6271if test x$is_release = x ; then
6272 ac_checking_flags=yes
6273else
6274 ac_checking_flags=release
6275fi
6276fi;
6277ac_assert_checking=1
6278ac_checking=
cdce5c16
NS
6279ac_fold_checking=
6280ac_gc_checking=
6281ac_gc_always_collect=
414d23ae
HPN
6282ac_rtl_checking=
6283ac_rtlflag_checking=
b53ef395 6284ac_runtime_checking=1
cdce5c16
NS
6285ac_tree_checking=
6286ac_valgrind_checking=
e1bbfc5c
NS
6287IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6288for check in $ac_checking_flags
6289do
6290 case $check in
cdce5c16 6291 # these set all the flags to specific states
e1bbfc5c 6292 yes) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6293 ac_fold_checking= ; ac_gc_checking=1 ;
6294 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6295 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
cdce5c16
NS
6296 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6297 no|none) ac_assert_checking= ; ac_checking= ;
6298 ac_fold_checking= ; ac_gc_checking= ;
6299 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 6300 ac_rtlflag_checking= ; ac_runtime_checking= ;
cdce5c16 6301 ac_tree_checking= ; ac_valgrind_checking= ;;
e1bbfc5c 6302 all) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
6303 ac_fold_checking=1 ; ac_gc_checking=1 ;
6304 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
6305 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6306 ac_tree_checking=1 ; ac_valgrind_checking= ;;
6307 release) ac_assert_checking=1 ; ac_checking= ;
6308 ac_fold_checking= ; ac_gc_checking= ;
6309 ac_gc_always_collect= ; ac_rtl_checking= ;
6310 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6311 ac_tree_checking= ; ac_valgrind_checking= ;;
6312 # these enable particular checks
e1bbfc5c
NS
6313 assert) ac_assert_checking=1 ;;
6314 fold) ac_fold_checking=1 ;;
6315 gc) ac_gc_checking=1 ;;
6316 gcac) ac_gc_always_collect=1 ;;
6317 misc) ac_checking=1 ;;
e1bbfc5c 6318 rtl) ac_rtl_checking=1 ;;
cdce5c16 6319 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 6320 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 6321 tree) ac_tree_checking=1 ;;
cdce5c16 6322 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 6323 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
6324echo "$as_me: error: unknown check category $check" >&2;}
6325 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
6326 esac
6327done
6328IFS="$ac_save_IFS"
06c37c96 6329
ba479fd2
NN
6330nocommon_flag=""
6331if test x$ac_checking != x ; then
6332
6333cat >>confdefs.h <<\_ACEOF
6334#define ENABLE_CHECKING 1
6335_ACEOF
6336
6337 nocommon_flag=-fno-common
6338fi
6339
06c37c96
NS
6340if test x$ac_assert_checking != x ; then
6341
6342cat >>confdefs.h <<\_ACEOF
6343#define ENABLE_ASSERT_CHECKING 1
6344_ACEOF
6345
b53ef395 6346fi
232b67d9 6347
b53ef395
NS
6348if test x$ac_runtime_checking != x ; then
6349
6350cat >>confdefs.h <<\_ACEOF
6351#define ENABLE_RUNTIME_CHECKING 1
6352_ACEOF
6353
06c37c96 6354fi
ba479fd2
NN
6355if test x$ac_tree_checking != x ; then
6356
6357cat >>confdefs.h <<\_ACEOF
6358#define ENABLE_TREE_CHECKING 1
6359_ACEOF
6360
13f05fd0 6361 TREEBROWSER=tree-browser.o
ba479fd2 6362fi
13f05fd0 6363
ba479fd2
NN
6364if test x$ac_rtl_checking != x ; then
6365
6366cat >>confdefs.h <<\_ACEOF
6367#define ENABLE_RTL_CHECKING 1
6368_ACEOF
6369
6370fi
6371if test x$ac_rtlflag_checking != x ; then
6372
6373cat >>confdefs.h <<\_ACEOF
6374#define ENABLE_RTL_FLAG_CHECKING 1
6375_ACEOF
6376
6377fi
6378if test x$ac_gc_checking != x ; then
6379
6380cat >>confdefs.h <<\_ACEOF
6381#define ENABLE_GC_CHECKING 1
6382_ACEOF
6383
6384fi
6385if test x$ac_gc_always_collect != x ; then
6386
6387cat >>confdefs.h <<\_ACEOF
6388#define ENABLE_GC_ALWAYS_COLLECT 1
6389_ACEOF
6390
6391fi
6392if test x$ac_fold_checking != x ; then
6393
6394cat >>confdefs.h <<\_ACEOF
6395#define ENABLE_FOLD_CHECKING 1
6396_ACEOF
6397
6398fi
6399valgrind_path_defines=
6400valgrind_command=
6401
ba479fd2
NN
6402if test "${ac_cv_header_valgrind_h+set}" = set; then
6403 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6404echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6405if test "${ac_cv_header_valgrind_h+set}" = set; then
6406 echo $ECHO_N "(cached) $ECHO_C" >&6
6407fi
6408echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6409echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6410else
6411 # Is the header compilable?
6412echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6413echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
6414cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6415/* confdefs.h. */
6416_ACEOF
6417cat confdefs.h >>conftest.$ac_ext
6418cat >>conftest.$ac_ext <<_ACEOF
6419/* end confdefs.h. */
6420$ac_includes_default
63cf211a 6421#include <valgrind.h>
ba479fd2
NN
6422_ACEOF
6423rm -f conftest.$ac_objext
6424if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6425 (eval $ac_compile) 2>conftest.er1
ba479fd2 6426 ac_status=$?
86da66b5
HPN
6427 grep -v '^ *+' conftest.er1 >conftest.err
6428 rm -f conftest.er1
6429 cat conftest.err >&5
ba479fd2
NN
6430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6431 (exit $ac_status); } &&
a1286ef5
ZW
6432 { ac_try='test -z "$ac_c_werror_flag"
6433 || test ! -s conftest.err'
86da66b5
HPN
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); }; } &&
6439 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6441 (eval $ac_try) 2>&5
6442 ac_status=$?
6443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6444 (exit $ac_status); }; }; then
6445 ac_header_compiler=yes
6446else
6447 echo "$as_me: failed program was:" >&5
6448sed 's/^/| /' conftest.$ac_ext >&5
6449
6450ac_header_compiler=no
6451fi
86da66b5 6452rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
6453echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6454echo "${ECHO_T}$ac_header_compiler" >&6
6455
6456# Is the header present?
6457echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6458echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
6459cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6460/* confdefs.h. */
6461_ACEOF
6462cat confdefs.h >>conftest.$ac_ext
6463cat >>conftest.$ac_ext <<_ACEOF
6464/* end confdefs.h. */
6465#include <valgrind.h>
6466_ACEOF
6467if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6468 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6469 ac_status=$?
6470 grep -v '^ *+' conftest.er1 >conftest.err
6471 rm -f conftest.er1
6472 cat conftest.err >&5
6473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6474 (exit $ac_status); } >/dev/null; then
6475 if test -s conftest.err; then
6476 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6477 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6478 else
6479 ac_cpp_err=
6480 fi
6481else
6482 ac_cpp_err=yes
6483fi
6484if test -z "$ac_cpp_err"; then
6485 ac_header_preproc=yes
6486else
6487 echo "$as_me: failed program was:" >&5
6488sed 's/^/| /' conftest.$ac_ext >&5
6489
6490 ac_header_preproc=no
6491fi
6492rm -f conftest.err conftest.$ac_ext
6493echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6494echo "${ECHO_T}$ac_header_preproc" >&6
6495
6496# So? What about this header?
86da66b5
HPN
6497case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6498 yes:no: )
ba479fd2
NN
6499 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6500echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
6501 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6502echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6503 ac_header_preproc=yes
ba479fd2 6504 ;;
86da66b5 6505 no:yes:* )
ba479fd2
NN
6506 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6507echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
6508 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
6509echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
6510 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6511echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6512 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
6513echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
6514 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6515echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
6516 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6517echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
ba479fd2
NN
6518 (
6519 cat <<\_ASBOX
86da66b5
HPN
6520## ------------------------------------------ ##
6521## Report this to the AC_PACKAGE_NAME lists. ##
6522## ------------------------------------------ ##
ba479fd2
NN
6523_ASBOX
6524 ) |
6525 sed "s/^/$as_me: WARNING: /" >&2
6526 ;;
6527esac
6528echo "$as_me:$LINENO: checking for valgrind.h" >&5
6529echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6530if test "${ac_cv_header_valgrind_h+set}" = set; then
6531 echo $ECHO_N "(cached) $ECHO_C" >&6
6532else
6533 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 6534fi
ba479fd2
NN
6535echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6536echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6537
6e3f3080 6538fi
ba479fd2 6539if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
6540 have_valgrind_h=yes
6541else
ba479fd2 6542 have_valgrind_h=no
6938ec6c
NN
6543fi
6544
6545
ba479fd2 6546
cdce5c16 6547if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
6548 # It is certainly possible that there's valgrind but no valgrind.h.
6549 # GCC relies on making annotations so we must have both.
ba479fd2
NN
6550 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6551echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
6552 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6553/* confdefs.h. */
6554_ACEOF
6555cat confdefs.h >>conftest.$ac_ext
6556cat >>conftest.$ac_ext <<_ACEOF
6557/* end confdefs.h. */
a207b594 6558#include <valgrind/memcheck.h>
14011ca4
AJ
6559#ifndef VALGRIND_DISCARD
6560#error VALGRIND_DISCARD not defined
6561#endif
ba479fd2
NN
6562_ACEOF
6563if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6564 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6565 ac_status=$?
6566 grep -v '^ *+' conftest.er1 >conftest.err
6567 rm -f conftest.er1
6568 cat conftest.err >&5
6569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6570 (exit $ac_status); } >/dev/null; then
6571 if test -s conftest.err; then
6572 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6573 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6574 else
6575 ac_cpp_err=
6576 fi
6577else
6578 ac_cpp_err=yes
6579fi
6580if test -z "$ac_cpp_err"; then
a207b594
HPN
6581 gcc_cv_header_valgrind_memcheck_h=yes
6582else
ba479fd2
NN
6583 echo "$as_me: failed program was:" >&5
6584sed 's/^/| /' conftest.$ac_ext >&5
6585
a207b594
HPN
6586 gcc_cv_header_valgrind_memcheck_h=no
6587fi
ba479fd2
NN
6588rm -f conftest.err conftest.$ac_ext
6589 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6590echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6591 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6592echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
6593 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6594/* confdefs.h. */
6595_ACEOF
6596cat confdefs.h >>conftest.$ac_ext
6597cat >>conftest.$ac_ext <<_ACEOF
6598/* end confdefs.h. */
a207b594
HPN
6599#include <memcheck.h>
6600#ifndef VALGRIND_DISCARD
6601#error VALGRIND_DISCARD not defined
6602#endif
ba479fd2
NN
6603_ACEOF
6604if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6605 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6606 ac_status=$?
6607 grep -v '^ *+' conftest.er1 >conftest.err
6608 rm -f conftest.er1
6609 cat conftest.err >&5
6610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6611 (exit $ac_status); } >/dev/null; then
6612 if test -s conftest.err; then
6613 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 6614 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
6615 else
6616 ac_cpp_err=
6617 fi
6618else
6619 ac_cpp_err=yes
6620fi
6621if test -z "$ac_cpp_err"; then
14011ca4
AJ
6622 gcc_cv_header_memcheck_h=yes
6623else
ba479fd2
NN
6624 echo "$as_me: failed program was:" >&5
6625sed 's/^/| /' conftest.$ac_ext >&5
6626
cafe096b
EC
6627 gcc_cv_header_memcheck_h=no
6628fi
ba479fd2
NN
6629rm -f conftest.err conftest.$ac_ext
6630 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6631echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
6632
56694dd9
ZW
6633# Prepare PATH_SEPARATOR.
6634# The user is always right.
6635if test "${PATH_SEPARATOR+set}" != set; then
6636 echo "#! /bin/sh" >conf$$.sh
6637 echo "exit 0" >>conf$$.sh
6638 chmod +x conf$$.sh
6639 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6640 PATH_SEPARATOR=';'
6641 else
6642 PATH_SEPARATOR=:
6643 fi
6644 rm -f conf$$.sh
6645fi
6646
6647# Find out how to test for executable files. Don't use a zero-byte file,
6648# as systems may use methods other than mode bits to determine executability.
6649cat >conf$$.file <<_ASEOF
6650#! /bin/sh
6651exit 0
6652_ASEOF
6653chmod +x conf$$.file
6654if test -x conf$$.file >/dev/null 2>&1; then
6655 ac_executable_p="test -x"
6656else
6657 ac_executable_p="test -f"
6658fi
6659rm -f conf$$.file
6660
6661# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 6662set dummy valgrind; ac_word=$2
ba479fd2
NN
6663echo "$as_me:$LINENO: checking for $ac_word" >&5
6664echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6665if test "${ac_cv_path_valgrind_path+set}" = set; then
6666 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
6667else
6668 case "$valgrind_path" in
56694dd9
ZW
6669 [\\/]* | ?:[\\/]*)
6670 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6671 ;;
414d23ae 6672 *)
56694dd9
ZW
6673 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6674 for ac_dir in $PATH; do
6675 IFS="$ac_save_IFS"
6676 test -z "$ac_dir" && ac_dir=.
6677 for ac_exec_ext in '' $ac_executable_extensions; do
6678 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6679 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6680 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6681 break 2
6682 fi
6683 fi
6684 done
6685 done
6686 IFS="$ac_save_IFS"
6687 ;;
414d23ae 6688esac
75e93faa 6689fi
414d23ae
HPN
6690valgrind_path="$ac_cv_path_valgrind_path"
6691if test -n "$valgrind_path"; then
ba479fd2
NN
6692 echo "$as_me:$LINENO: result: $valgrind_path" >&5
6693echo "${ECHO_T}$valgrind_path" >&6
414d23ae 6694else
ba479fd2
NN
6695 echo "$as_me:$LINENO: result: no" >&5
6696echo "${ECHO_T}no" >&6
414d23ae
HPN
6697fi
6698
a207b594
HPN
6699 if test "x$valgrind_path" = "x" \
6700 || (test $have_valgrind_h = no \
6701 && test $gcc_cv_header_memcheck_h = no \
6702 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
6703 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6704echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6705 { (exit 1); exit 1; }; }
414d23ae
HPN
6706 fi
6707 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6708 valgrind_command="$valgrind_path -q"
ba479fd2
NN
6709
6710cat >>confdefs.h <<\_ACEOF
414d23ae 6711#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 6712_ACEOF
75e93faa 6713
a207b594 6714 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
6715
6716cat >>confdefs.h <<\_ACEOF
a207b594 6717#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 6718_ACEOF
a207b594
HPN
6719
6720 fi
14011ca4 6721 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
6722
6723cat >>confdefs.h <<\_ACEOF
14011ca4 6724#define HAVE_MEMCHECK_H 1
ba479fd2 6725_ACEOF
14011ca4
AJ
6726
6727 fi
414d23ae 6728fi
75e93faa 6729
75e93faa
ZW
6730
6731
74ee1642
PB
6732# Check whether --enable-mapped-location or --disable-mapped-location was given.
6733if test "${enable_mapped_location+set}" = set; then
6734 enableval="$enable_mapped_location"
6735
6736else
6737 enable_mapped_location=no
6738fi;
6739
6740if test "$enable_mapped_location" = yes ; then
6741
6742cat >>confdefs.h <<\_ACEOF
6743#define USE_MAPPED_LOCATION 1
6744_ACEOF
6745
6746fi
6747
414d23ae
HPN
6748# Enable code coverage collection
6749# Check whether --enable-coverage or --disable-coverage was given.
6750if test "${enable_coverage+set}" = set; then
6751 enableval="$enable_coverage"
6752 case "${enableval}" in
6dd297da
NN
6753 yes|noopt)
6754 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6755 ;;
6756 opt)
6757 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6758 ;;
6759 no)
6760 # a.k.a. --disable-coverage
6761 coverage_flags=""
6762 ;;
6763 *)
6764 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
6765echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6766 { (exit 1); exit 1; }; }
6dd297da 6767 ;;
414d23ae 6768esac
75e93faa 6769else
414d23ae 6770 coverage_flags=""
ba479fd2 6771fi;
5c3bc9fb 6772
414d23ae 6773
439a7e54
DN
6774# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
6775if test "${enable_gather_detailed_mem_stats+set}" = set; then
6776 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 6777
439a7e54
DN
6778else
6779 enable_gather_detailed_mem_stats=no
ba479fd2 6780fi;
439a7e54 6781if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
6782
6783cat >>confdefs.h <<\_ACEOF
439a7e54 6784#define GATHER_STATISTICS 1
ba479fd2 6785_ACEOF
439a7e54
DN
6786
6787fi
6788
73458fb7
NN
6789# -------------------------------
6790# Miscenalleous configure options
6791# -------------------------------
34a86c2b
NN
6792
6793# With stabs
ba479fd2 6794
34a86c2b
NN
6795# Check whether --with-stabs or --without-stabs was given.
6796if test "${with_stabs+set}" = set; then
6797 withval="$with_stabs"
6798 stabs="$with_stabs"
6799else
6800 stabs=no
ba479fd2 6801fi;
cafe096b 6802
34a86c2b
NN
6803# Determine whether or not multilibs are enabled.
6804# Check whether --enable-multilib or --disable-multilib was given.
6805if test "${enable_multilib+set}" = set; then
6806 enableval="$enable_multilib"
ba479fd2 6807
34a86c2b
NN
6808else
6809 enable_multilib=yes
ba479fd2 6810fi;
75e93faa 6811
34a86c2b 6812
414d23ae
HPN
6813# Enable __cxa_atexit for C++.
6814# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
6815if test "${enable___cxa_atexit+set}" = set; then
6816 enableval="$enable___cxa_atexit"
75e93faa 6817
ba479fd2 6818fi;
75e93faa 6819
414d23ae
HPN
6820# Enable threads
6821# Pass with no value to take the default
6822# Pass with a value to specify a thread package
6823# Check whether --enable-threads or --disable-threads was given.
6824if test "${enable_threads+set}" = set; then
6825 enableval="$enable_threads"
ba479fd2 6826
414d23ae
HPN
6827else
6828 enable_threads=''
ba479fd2 6829fi;
414d23ae
HPN
6830
6831# Check whether --enable-objc-gc or --disable-objc-gc was given.
6832if test "${enable_objc_gc+set}" = set; then
6833 enableval="$enable_objc_gc"
6834 if test x$enable_objc_gc = xno; then
6835 objc_boehm_gc=''
6836else
6837 objc_boehm_gc=1
6838fi
6839else
6840 objc_boehm_gc=''
ba479fd2 6841fi;
75e93faa
ZW
6842
6843
414d23ae
HPN
6844# Check whether --with-dwarf2 or --without-dwarf2 was given.
6845if test "${with_dwarf2+set}" = set; then
6846 withval="$with_dwarf2"
6847 dwarf2="$with_dwarf2"
75e93faa 6848else
414d23ae 6849 dwarf2=no
ba479fd2 6850fi;
75e93faa 6851
414d23ae
HPN
6852# Check whether --enable-shared or --disable-shared was given.
6853if test "${enable_shared+set}" = set; then
6854 enableval="$enable_shared"
ba479fd2 6855
414d23ae
HPN
6856 case $enable_shared in
6857 yes | no) ;;
6858 *)
6859 enable_shared=no
6860 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
6861 for pkg in $enableval; do
6862 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
6863 enable_shared=yes
6864 fi
6865 done
6866 IFS="$ac_save_ifs"
6867 ;;
6868 esac
6869
75e93faa 6870else
414d23ae 6871 enable_shared=yes
ba479fd2 6872fi;
75e93faa 6873
75e93faa 6874
75e93faa 6875
4977bab6
ZW
6876# Check whether --with-sysroot or --without-sysroot was given.
6877if test "${with_sysroot+set}" = set; then
6878 withval="$with_sysroot"
ba479fd2 6879
4977bab6 6880 case ${with_sysroot} in
caa55b1e 6881 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
6882 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
6883 esac
ba479fd2 6884
4977bab6
ZW
6885 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
6886 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
6887
047d636f
DJ
6888 if test "x$exec_prefix" = xNONE; then
6889 if test "x$prefix" = xNONE; then
6890 test_prefix=/usr/local
6891 else
6892 test_prefix=$prefix
6893 fi
6894 else
6895 test_prefix=$exec_prefix
6896 fi
6897 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
6898 "${test_prefix}"|"${test_prefix}/"*|\
6899 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
6900 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
6901 TARGET_SYSTEM_ROOT_DEFINE="$t"
6902 ;;
6903 esac
6904
4977bab6 6905else
ba479fd2 6906
4977bab6 6907 TARGET_SYSTEM_ROOT=
db720d9a 6908 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
6909 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
6910
ba479fd2 6911fi;
4977bab6
ZW
6912
6913
6914
6915
d1bd0ded 6916# Build with intermodule optimisations
d1bd0ded
GK
6917# Check whether --enable-intermodule or --disable-intermodule was given.
6918if test "${enable_intermodule+set}" = set; then
6919 enableval="$enable_intermodule"
0c46c5c7
KC
6920 case ${enable_intermodule} in
6921 yes) onestep="-onestep";;
6922 *) onestep="";;
d1bd0ded 6923esac
0c46c5c7
KC
6924else
6925 onestep=""
ba479fd2 6926fi;
d1bd0ded
GK
6927
6928
f3c9f174
NN
6929# Sanity check enable_languages in case someone does not run the toplevel
6930# configure # script.
6931# Check whether --enable-languages or --disable-languages was given.
6932if test "${enable_languages+set}" = set; then
6933 enableval="$enable_languages"
6934 case ,${enable_languages}, in
6935 ,,|,yes,)
6936 # go safe -- we cannot be much sure without the toplevel
6937 # configure's
6938 # analysis of which target libs are present and usable
6939 enable_languages=c
6940 ;;
6941 *,all,*)
6942 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
6943echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
6944 { (exit 1); exit 1; }; }
6945 ;;
6946 *,c,*)
6947 ;;
6948 *)
6949 enable_languages=c,${enable_languages}
6950 ;;
6951esac
6952else
6953 enable_languages=c
6954fi;
6955
6956subdirs=
6957for lang in ${srcdir}/*/config-lang.in
6958do
6959 case $lang in
6960 # The odd quoting in the next line works around
6961 # an apparent bug in bash 1.12 on linux.
6962 ${srcdir}/[*]/config-lang.in) ;;
6963 *)
6964 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6965 if test "x$lang_alias" = x
6966 then
6967 echo "$lang doesn't set \$language." 1>&2
6968 exit 1
6969 fi
6970 case ",$enable_languages," in
6971 *,$lang_alias,*)
6972 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
6973 esac
6974 ;;
6975 esac
6976done
6977
6978
73458fb7
NN
6979# -------------------------
6980# Checks for other programs
6981# -------------------------
5b67ad6f 6982
ba479fd2
NN
6983echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6984echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
86da66b5 6985set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
ba479fd2
NN
6986if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
6987 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 6988else
ba479fd2 6989 cat >conftest.make <<\_ACEOF
e9a25f70 6990all:
ba479fd2
NN
6991 @echo 'ac_maketemp="$(MAKE)"'
6992_ACEOF
e9a25f70 6993# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 6994eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
6995if test -n "$ac_maketemp"; then
6996 eval ac_cv_prog_make_${ac_make}_set=yes
6997else
6998 eval ac_cv_prog_make_${ac_make}_set=no
6999fi
ba479fd2 7000rm -f conftest.make
e9a25f70
JL
7001fi
7002if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
7003 echo "$as_me:$LINENO: result: yes" >&5
7004echo "${ECHO_T}yes" >&6
e9a25f70
JL
7005 SET_MAKE=
7006else
ba479fd2
NN
7007 echo "$as_me:$LINENO: result: no" >&5
7008echo "${ECHO_T}no" >&6
e9a25f70
JL
7009 SET_MAKE="MAKE=${MAKE-make}"
7010fi
7011
7012
861bb6c1 7013# Find some useful tools
ba479fd2 7014for ac_prog in gawk mawk nawk awk
861bb6c1 7015do
ba479fd2 7016 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 7017set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7018echo "$as_me:$LINENO: checking for $ac_word" >&5
7019echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7020if test "${ac_cv_prog_AWK+set}" = set; then
7021 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7022else
7023 if test -n "$AWK"; then
7024 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7025else
ba479fd2
NN
7026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7027for as_dir in $PATH
7028do
7029 IFS=$as_save_IFS
7030 test -z "$as_dir" && as_dir=.
7031 for ac_exec_ext in '' $ac_executable_extensions; do
7032 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7033 ac_cv_prog_AWK="$ac_prog"
7034 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7035 break 2
7036 fi
7037done
7038done
7039
861bb6c1
JL
7040fi
7041fi
ba479fd2 7042AWK=$ac_cv_prog_AWK
861bb6c1 7043if test -n "$AWK"; then
ba479fd2
NN
7044 echo "$as_me:$LINENO: result: $AWK" >&5
7045echo "${ECHO_T}$AWK" >&6
861bb6c1 7046else
ba479fd2
NN
7047 echo "$as_me:$LINENO: result: no" >&5
7048echo "${ECHO_T}no" >&6
861bb6c1
JL
7049fi
7050
ba479fd2 7051 test -n "$AWK" && break
861bb6c1
JL
7052done
7053
776dc15d 7054# We need awk to create options.c and options.h.
2c4902b9
NN
7055# Bail out if it's missing.
7056case ${AWK} in
ba479fd2
NN
7057 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7058echo "$as_me: error: can't build without awk, bailing out" >&2;}
7059 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
7060esac
7061
ba479fd2
NN
7062echo "$as_me:$LINENO: checking whether ln -s works" >&5
7063echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
7064if test "${gcc_cv_prog_LN_S+set}" = set; then
7065 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7066else
7067 rm -f conftestdata_t
7068echo >conftestdata_f
7069if ln -s conftestdata_f conftestdata_t 2>/dev/null
7070then
7071 gcc_cv_prog_LN_S="ln -s"
7072else
7073 if ln conftestdata_f conftestdata_t 2>/dev/null
7074 then
7075 gcc_cv_prog_LN_S=ln
7076 else
35f06ae4
PB
7077 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7078 then
06c3418c 7079 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
7080 else
7081 gcc_cv_prog_LN_S=cp
7082 fi
0a4b6309
RL
7083 fi
7084fi
7085rm -f conftestdata_f conftestdata_t
7086
7087fi
7088LN_S="$gcc_cv_prog_LN_S"
7089if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
7090 echo "$as_me:$LINENO: result: yes" >&5
7091echo "${ECHO_T}yes" >&6
0a4b6309
RL
7092else
7093 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
7094 echo "$as_me:$LINENO: result: no, using ln" >&5
7095echo "${ECHO_T}no, using ln" >&6
0a4b6309 7096 else
35f06ae4
PB
7097 echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7098echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
0a4b6309
RL
7099 fi
7100fi
7101
41e622a8
AP
7102echo "$as_me:$LINENO: checking whether ln works" >&5
7103echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
7104if test "${acx_cv_prog_LN+set}" = set; then
7105 echo $ECHO_N "(cached) $ECHO_C" >&6
7106else
7107 rm -f conftestdata_t
7108echo >conftestdata_f
7109if ln conftestdata_f conftestdata_t 2>/dev/null
7110then
7111 acx_cv_prog_LN=ln
7112else
7113 acx_cv_prog_LN=no
7114fi
7115rm -f conftestdata_f conftestdata_t
7116
7117fi
7118if test $acx_cv_prog_LN = no; then
7119 LN="$LN_S"
7120 echo "$as_me:$LINENO: result: no, using $LN" >&5
7121echo "${ECHO_T}no, using $LN" >&6
7122else
7123 LN="$acx_cv_prog_LN"
7124 echo "$as_me:$LINENO: result: yes" >&5
7125echo "${ECHO_T}yes" >&6
7126fi
7127
ba479fd2
NN
7128if test -n "$ac_tool_prefix"; then
7129 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7130set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7131echo "$as_me:$LINENO: checking for $ac_word" >&5
7132echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7133if test "${ac_cv_prog_RANLIB+set}" = set; then
7134 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7135else
7136 if test -n "$RANLIB"; then
7137 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7138else
ba479fd2
NN
7139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7140for as_dir in $PATH
7141do
7142 IFS=$as_save_IFS
7143 test -z "$as_dir" && as_dir=.
7144 for ac_exec_ext in '' $ac_executable_extensions; do
7145 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7146 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7147 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7148 break 2
7149 fi
7150done
7151done
7152
6e3f3080
NN
7153fi
7154fi
ba479fd2 7155RANLIB=$ac_cv_prog_RANLIB
6e3f3080 7156if test -n "$RANLIB"; then
ba479fd2
NN
7157 echo "$as_me:$LINENO: result: $RANLIB" >&5
7158echo "${ECHO_T}$RANLIB" >&6
7159else
7160 echo "$as_me:$LINENO: result: no" >&5
7161echo "${ECHO_T}no" >&6
7162fi
7163
7164fi
7165if test -z "$ac_cv_prog_RANLIB"; then
7166 ac_ct_RANLIB=$RANLIB
7167 # Extract the first word of "ranlib", so it can be a program name with args.
7168set dummy ranlib; ac_word=$2
7169echo "$as_me:$LINENO: checking for $ac_word" >&5
7170echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7171if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7172 echo $ECHO_N "(cached) $ECHO_C" >&6
7173else
7174 if test -n "$ac_ct_RANLIB"; then
7175 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7176else
7177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7178for as_dir in $PATH
7179do
7180 IFS=$as_save_IFS
7181 test -z "$as_dir" && as_dir=.
7182 for ac_exec_ext in '' $ac_executable_extensions; do
7183 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7184 ac_cv_prog_ac_ct_RANLIB="ranlib"
7185 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7186 break 2
7187 fi
7188done
7189done
7190
7191 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7192fi
7193fi
7194ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7195if test -n "$ac_ct_RANLIB"; then
7196 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7197echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 7198else
ba479fd2
NN
7199 echo "$as_me:$LINENO: result: no" >&5
7200echo "${ECHO_T}no" >&6
7201fi
7202
7203 RANLIB=$ac_ct_RANLIB
7204else
7205 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
7206fi
7207
343a6100
MM
7208case "${host}" in
7209*-*-darwin*)
7210 # By default, the Darwin ranlib will not treat common symbols as
7211 # definitions when building the archive table of contents. Other
7212 # ranlibs do that; pass an option to the Darwin ranlib that makes
7213 # it behave similarly.
7214 ranlib_flags="-c"
7215 ;;
7216*)
7217 ranlib_flags=""
7218esac
7219
7220
0a4b6309
RL
7221# Find a good install program. We prefer a C program (faster),
7222# so one script is as good as another. But avoid the broken or
7223# incompatible versions:
7224# SysV /etc/install, /usr/sbin/install
7225# SunOS /usr/etc/install
7226# IRIX /sbin/install
7227# AIX /bin/install
7228# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7229# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7230# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
7231echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7232echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 7233if test -z "$INSTALL"; then
ba479fd2
NN
7234if test "${ac_cv_path_install+set}" = set; then
7235 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7236else
7237 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7238 for ac_dir in $PATH; do
7239 # Account for people who put trailing slashes in PATH elements.
7240 case "$ac_dir/" in
7241 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7242 *)
7243 # OSF1 and SCO ODT 3.0 have their own names for install.
7244 for ac_prog in ginstall scoinst install; do
7245 if test -f $ac_dir/$ac_prog; then
7246 if test $ac_prog = install &&
7247 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7248 # AIX install. It has an incompatible calling convention.
7249 # OSF/1 installbsd also uses dspmsg, but is usable.
7250 :
7251 else
7252 ac_cv_path_install="$ac_dir/$ac_prog -c"
7253 break 2
7254 fi
7255 fi
7256 done
7257 ;;
7258 esac
7259 done
7260 IFS="$ac_save_IFS"
7261
7262fi
7263 if test "${ac_cv_path_install+set}" = set; then
7264 INSTALL="$ac_cv_path_install"
7265 else
7266 # As a last resort, use the slow shell script. We don't cache a
7267 # path for INSTALL within a source directory, because that will
7268 # break other packages using the cache if that directory is
7269 # removed, or if the path is relative.
7270 INSTALL="$ac_install_sh"
7271 fi
7272fi
ba479fd2
NN
7273echo "$as_me:$LINENO: result: $INSTALL" >&5
7274echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
7275
7276# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7277# It thinks the first close brace ends the variable substitution.
7278test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7279
7280test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7281
861bb6c1 7282
3a000df0 7283# See if cmp has --ignore-initial.
ba479fd2
NN
7284echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7285echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
7286if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7287 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
7288else
7289 echo abfoo >t1
7290 echo cdfoo >t2
269a7343 7291 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
7292 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7293 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 7294 :
3a000df0
KC
7295 else
7296 gcc_cv_prog_cmp_skip=gnucompare
7297 fi
269a7343
KG
7298 fi
7299 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7300 if cmp t1 t2 2 2 > /dev/null 2>&1; then
7301 if cmp t1 t2 1 1 > /dev/null 2>&1; then
7302 :
7303 else
7304 gcc_cv_prog_cmp_skip=fastcompare
7305 fi
7306 fi
3a000df0
KC
7307 fi
7308 rm t1 t2
7309
7310fi
ba479fd2
NN
7311echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7312echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
7313make_compare_target=$gcc_cv_prog_cmp_skip
7314
7315
7316
73458fb7
NN
7317# See if we have the mktemp command.
7318# Extract the first word of "mktemp", so it can be a program name with args.
7319set dummy mktemp; ac_word=$2
ba479fd2
NN
7320echo "$as_me:$LINENO: checking for $ac_word" >&5
7321echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7322if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7323 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7324else
7325 if test -n "$have_mktemp_command"; then
7326 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7327else
ba479fd2
NN
7328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7329for as_dir in $PATH
7330do
7331 IFS=$as_save_IFS
7332 test -z "$as_dir" && as_dir=.
7333 for ac_exec_ext in '' $ac_executable_extensions; do
7334 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7335 ac_cv_prog_have_mktemp_command="yes"
7336 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7337 break 2
7338 fi
7339done
7340done
7341
73458fb7
NN
7342 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7343fi
7344fi
ba479fd2 7345have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 7346if test -n "$have_mktemp_command"; then
ba479fd2
NN
7347 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7348echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 7349else
ba479fd2
NN
7350 echo "$as_me:$LINENO: result: no" >&5
7351echo "${ECHO_T}no" >&6
73458fb7
NN
7352fi
7353
7354
7c27e184
PB
7355MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
7356
7357# See if makeinfo has been installed and is modern enough
7358# that we can use it.
7359# Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 7360set dummy makeinfo; ac_word=$2
ba479fd2
NN
7361echo "$as_me:$LINENO: checking for $ac_word" >&5
7362echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7363if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7364 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7365else
7366 if test -n "$MAKEINFO"; then
7367 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7368else
ba479fd2
NN
7369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7370for as_dir in $PATH
7371do
7372 IFS=$as_save_IFS
7373 test -z "$as_dir" && as_dir=.
7374 for ac_exec_ext in '' $ac_executable_extensions; do
7375 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7376 ac_cv_prog_MAKEINFO="makeinfo"
7377 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7378 break 2
7379 fi
7380done
7381done
7382
73458fb7
NN
7383fi
7384fi
ba479fd2 7385MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 7386if test -n "$MAKEINFO"; then
ba479fd2
NN
7387 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7388echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 7389else
ba479fd2
NN
7390 echo "$as_me:$LINENO: result: no" >&5
7391echo "${ECHO_T}no" >&6
73458fb7
NN
7392fi
7393
7394if test -n "$MAKEINFO"; then
7395 # Found it, now check the version.
ba479fd2
NN
7396 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7397echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
7398if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7399 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7400else
7401 ac_prog_version=`$MAKEINFO --version 2>&1 |
7402 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
232b67d9 7403 echo "configure:7403: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
7404 case $ac_prog_version in
7405 '') gcc_cv_prog_makeinfo_modern=no;;
7406 4.[2-9]*)
7407 gcc_cv_prog_makeinfo_modern=yes;;
7408 *) gcc_cv_prog_makeinfo_modern=no;;
7409 esac
7410
7411fi
ba479fd2
NN
7412echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7413echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
7414else
7415 gcc_cv_prog_makeinfo_modern=no
7416fi
7417
73458fb7 7418if test $gcc_cv_prog_makeinfo_modern = no; then
7c27e184 7419 MAKEINFO="$MISSING makeinfo"
ba479fd2
NN
7420 { echo "$as_me:$LINENO: WARNING:
7421*** Makeinfo is missing or too old.
7422*** Info documentation will not be built." >&5
7423echo "$as_me: WARNING:
cafe096b 7424*** Makeinfo is missing or too old.
ba479fd2 7425*** Info documentation will not be built." >&2;}
73458fb7
NN
7426 BUILD_INFO=
7427else
ba479fd2 7428 BUILD_INFO=info
73458fb7
NN
7429fi
7430
7c27e184 7431
73458fb7 7432# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
7433echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7434echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 7435if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
7436 echo "$as_me:$LINENO: result: yes" >&5
7437echo "${ECHO_T}yes" >&6
7438 GENERATED_MANPAGES=generated-manpages
73458fb7 7439else
ba479fd2
NN
7440 echo "$as_me:$LINENO: result: no" >&5
7441echo "${ECHO_T}no" >&6
73458fb7
NN
7442 GENERATED_MANPAGES=
7443fi
7444
7c27e184 7445
73458fb7 7446# How about lex?
7c27e184
PB
7447for ac_prog in flex
7448do
7449 # Extract the first word of "$ac_prog", so it can be a program name with args.
7450set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7451echo "$as_me:$LINENO: checking for $ac_word" >&5
7452echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7453if test "${ac_cv_prog_FLEX+set}" = set; then
7454 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7455else
7456 if test -n "$FLEX"; then
7457 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7458else
ba479fd2
NN
7459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7460for as_dir in $PATH
7461do
7462 IFS=$as_save_IFS
7463 test -z "$as_dir" && as_dir=.
7464 for ac_exec_ext in '' $ac_executable_extensions; do
7465 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7466 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
7467 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7468 break 2
7469 fi
7470done
7471done
7472
73458fb7
NN
7473fi
7474fi
ba479fd2 7475FLEX=$ac_cv_prog_FLEX
73458fb7 7476if test -n "$FLEX"; then
ba479fd2
NN
7477 echo "$as_me:$LINENO: result: $FLEX" >&5
7478echo "${ECHO_T}$FLEX" >&6
73458fb7 7479else
ba479fd2
NN
7480 echo "$as_me:$LINENO: result: no" >&5
7481echo "${ECHO_T}no" >&6
73458fb7
NN
7482fi
7483
7c27e184
PB
7484 test -n "$FLEX" && break
7485done
7486test -n "$FLEX" || FLEX="$MISSING flex"
7487
73458fb7
NN
7488
7489# Bison?
7c27e184
PB
7490for ac_prog in bison
7491do
7492 # Extract the first word of "$ac_prog", so it can be a program name with args.
7493set dummy $ac_prog; ac_word=$2
ba479fd2
NN
7494echo "$as_me:$LINENO: checking for $ac_word" >&5
7495echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7496if test "${ac_cv_prog_BISON+set}" = set; then
7497 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
7498else
7499 if test -n "$BISON"; then
7500 ac_cv_prog_BISON="$BISON" # Let the user override the test.
7501else
ba479fd2
NN
7502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7503for as_dir in $PATH
7504do
7505 IFS=$as_save_IFS
7506 test -z "$as_dir" && as_dir=.
7507 for ac_exec_ext in '' $ac_executable_extensions; do
7508 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7c27e184 7509 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
7510 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7511 break 2
7512 fi
7513done
7514done
7515
73458fb7
NN
7516fi
7517fi
ba479fd2 7518BISON=$ac_cv_prog_BISON
73458fb7 7519if test -n "$BISON"; then
ba479fd2
NN
7520 echo "$as_me:$LINENO: result: $BISON" >&5
7521echo "${ECHO_T}$BISON" >&6
73458fb7 7522else
ba479fd2
NN
7523 echo "$as_me:$LINENO: result: no" >&5
7524echo "${ECHO_T}no" >&6
73458fb7
NN
7525fi
7526
7c27e184
PB
7527 test -n "$BISON" && break
7528done
7529test -n "$BISON" || BISON="$MISSING bison"
7530
7531
7532# Binutils are not build modules, unlike bison/flex/makeinfo. So we
7533# check for build == host before using them.
73458fb7 7534
f6a874ac 7535# NM
414adbdd
GK
7536if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7537 && test -d ../binutils ; then
f6a874ac
JW
7538 NM='$(objdir)/../binutils/nm-new'
7539else
7540 # Extract the first word of "nm", so it can be a program name with args.
7541set dummy nm; ac_word=$2
7542echo "$as_me:$LINENO: checking for $ac_word" >&5
7543echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7544if test "${ac_cv_prog_NM+set}" = set; then
7545 echo $ECHO_N "(cached) $ECHO_C" >&6
7546else
7547 if test -n "$NM"; then
7548 ac_cv_prog_NM="$NM" # Let the user override the test.
7549else
7550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7551for as_dir in $PATH
7552do
7553 IFS=$as_save_IFS
7554 test -z "$as_dir" && as_dir=.
7555 for ac_exec_ext in '' $ac_executable_extensions; do
7556 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7557 ac_cv_prog_NM="nm"
7558 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7559 break 2
7560 fi
7561done
7562done
7563
7564 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7565fi
7566fi
7567NM=$ac_cv_prog_NM
7568if test -n "$NM"; then
7569 echo "$as_me:$LINENO: result: $NM" >&5
7570echo "${ECHO_T}$NM" >&6
7571else
7572 echo "$as_me:$LINENO: result: no" >&5
7573echo "${ECHO_T}no" >&6
7574fi
7575
7576fi
7577
7578# AR
414adbdd
GK
7579if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7580 && test -d ../binutils ; then
f6a874ac
JW
7581 AR='$(objdir)/../binutils/ar'
7582else
7583 # Extract the first word of "ar", so it can be a program name with args.
7584set dummy ar; ac_word=$2
7585echo "$as_me:$LINENO: checking for $ac_word" >&5
7586echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7587if test "${ac_cv_prog_AR+set}" = set; then
7588 echo $ECHO_N "(cached) $ECHO_C" >&6
7589else
7590 if test -n "$AR"; then
7591 ac_cv_prog_AR="$AR" # Let the user override the test.
7592else
7593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7594for as_dir in $PATH
7595do
7596 IFS=$as_save_IFS
7597 test -z "$as_dir" && as_dir=.
7598 for ac_exec_ext in '' $ac_executable_extensions; do
7599 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7600 ac_cv_prog_AR="ar"
7601 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7602 break 2
7603 fi
7604done
7605done
7606
7607 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7608fi
7609fi
7610AR=$ac_cv_prog_AR
7611if test -n "$AR"; then
7612 echo "$as_me:$LINENO: result: $AR" >&5
7613echo "${ECHO_T}$AR" >&6
7614else
7615 echo "$as_me:$LINENO: result: no" >&5
7616echo "${ECHO_T}no" >&6
7617fi
7618
7619fi
7620
7621
73458fb7
NN
7622# --------------------
7623# Checks for C headers
7624# --------------------
7625
ba479fd2
NN
7626echo "$as_me:$LINENO: checking for GNU C library" >&5
7627echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
7628if test "${gcc_cv_glibc+set}" = set; then
7629 echo $ECHO_N "(cached) $ECHO_C" >&6
7630else
7631 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7632/* confdefs.h. */
7633_ACEOF
7634cat confdefs.h >>conftest.$ac_ext
7635cat >>conftest.$ac_ext <<_ACEOF
7636/* end confdefs.h. */
73458fb7 7637#include <features.h>
ba479fd2
NN
7638int
7639main ()
7640{
73458fb7
NN
7641
7642#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7643#error Not a GNU C library system
7644#endif
ba479fd2
NN
7645 ;
7646 return 0;
7647}
7648_ACEOF
7649rm -f conftest.$ac_objext
7650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7651 (eval $ac_compile) 2>conftest.er1
ba479fd2 7652 ac_status=$?
86da66b5
HPN
7653 grep -v '^ *+' conftest.er1 >conftest.err
7654 rm -f conftest.er1
7655 cat conftest.err >&5
ba479fd2
NN
7656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7657 (exit $ac_status); } &&
a1286ef5
ZW
7658 { ac_try='test -z "$ac_c_werror_flag"
7659 || test ! -s conftest.err'
86da66b5
HPN
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); }; } &&
7665 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7667 (eval $ac_try) 2>&5
7668 ac_status=$?
7669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7670 (exit $ac_status); }; }; then
73458fb7
NN
7671 gcc_cv_glibc=yes
7672else
ba479fd2
NN
7673 echo "$as_me: failed program was:" >&5
7674sed 's/^/| /' conftest.$ac_ext >&5
7675
7676gcc_cv_glibc=no
73458fb7 7677fi
86da66b5 7678rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
7679fi
7680
ba479fd2
NN
7681echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7682echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 7683if test $gcc_cv_glibc = yes; then
ba479fd2
NN
7684
7685cat >>confdefs.h <<\_ACEOF
73458fb7 7686#define _GNU_SOURCE 1
ba479fd2 7687_ACEOF
73458fb7
NN
7688
7689fi
7690
ca9bc441
NN
7691# Need to reject headers which give warnings, so that the -Werror bootstrap
7692# works later. *sigh* This needs to come before all header checks.
7693
7694ac_c_preproc_warn_flag=yes
7695
ba479fd2
NN
7696echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7697echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7698if test "${ac_cv_header_stdc+set}" = set; then
7699 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7700else
ba479fd2 7701 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7702/* confdefs.h. */
7703_ACEOF
7704cat confdefs.h >>conftest.$ac_ext
7705cat >>conftest.$ac_ext <<_ACEOF
7706/* end confdefs.h. */
956d6950
JL
7707#include <stdlib.h>
7708#include <stdarg.h>
7709#include <string.h>
7710#include <float.h>
ba479fd2
NN
7711
7712int
7713main ()
7714{
7715
7716 ;
7717 return 0;
7718}
7719_ACEOF
7720rm -f conftest.$ac_objext
7721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7722 (eval $ac_compile) 2>conftest.er1
ba479fd2 7723 ac_status=$?
86da66b5
HPN
7724 grep -v '^ *+' conftest.er1 >conftest.err
7725 rm -f conftest.er1
7726 cat conftest.err >&5
ba479fd2
NN
7727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7728 (exit $ac_status); } &&
a1286ef5
ZW
7729 { ac_try='test -z "$ac_c_werror_flag"
7730 || test ! -s conftest.err'
86da66b5
HPN
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); }; } &&
7736 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7738 (eval $ac_try) 2>&5
7739 ac_status=$?
7740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7741 (exit $ac_status); }; }; then
956d6950
JL
7742 ac_cv_header_stdc=yes
7743else
ba479fd2
NN
7744 echo "$as_me: failed program was:" >&5
7745sed 's/^/| /' conftest.$ac_ext >&5
7746
7747ac_cv_header_stdc=no
956d6950 7748fi
86da66b5 7749rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
7750
7751if test $ac_cv_header_stdc = yes; then
7752 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 7753 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7754/* confdefs.h. */
7755_ACEOF
7756cat confdefs.h >>conftest.$ac_ext
7757cat >>conftest.$ac_ext <<_ACEOF
7758/* end confdefs.h. */
956d6950 7759#include <string.h>
ba479fd2
NN
7760
7761_ACEOF
956d6950 7762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7763 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
7764 :
7765else
956d6950
JL
7766 ac_cv_header_stdc=no
7767fi
7768rm -f conftest*
7769
7770fi
7771
7772if test $ac_cv_header_stdc = yes; then
7773 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 7774 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7775/* confdefs.h. */
7776_ACEOF
7777cat confdefs.h >>conftest.$ac_ext
7778cat >>conftest.$ac_ext <<_ACEOF
7779/* end confdefs.h. */
956d6950 7780#include <stdlib.h>
ba479fd2
NN
7781
7782_ACEOF
956d6950 7783if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7784 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
7785 :
7786else
956d6950
JL
7787 ac_cv_header_stdc=no
7788fi
7789rm -f conftest*
7790
7791fi
7792
7793if test $ac_cv_header_stdc = yes; then
7794 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 7795 if test "$cross_compiling" = yes; then
956d6950
JL
7796 :
7797else
ba479fd2 7798 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7799/* confdefs.h. */
7800_ACEOF
7801cat confdefs.h >>conftest.$ac_ext
7802cat >>conftest.$ac_ext <<_ACEOF
7803/* end confdefs.h. */
956d6950 7804#include <ctype.h>
ba479fd2
NN
7805#if ((' ' & 0x0FF) == 0x020)
7806# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7807# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7808#else
7809# define ISLOWER(c) \
86da66b5
HPN
7810 (('a' <= (c) && (c) <= 'i') \
7811 || ('j' <= (c) && (c) <= 'r') \
7812 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
7813# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7814#endif
63cf211a 7815
ba479fd2
NN
7816#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7817int
7818main ()
7819{
7820 int i;
7821 for (i = 0; i < 256; i++)
7822 if (XOR (islower (i), ISLOWER (i))
86da66b5 7823 || toupper (i) != TOUPPER (i))
ba479fd2
NN
7824 exit(2);
7825 exit (0);
7826}
7827_ACEOF
7828rm -f conftest$ac_exeext
7829if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7830 (eval $ac_link) 2>&5
7831 ac_status=$?
7832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7833 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7835 (eval $ac_try) 2>&5
7836 ac_status=$?
7837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7838 (exit $ac_status); }; }; then
956d6950
JL
7839 :
7840else
ba479fd2
NN
7841 echo "$as_me: program exited with status $ac_status" >&5
7842echo "$as_me: failed program was:" >&5
7843sed 's/^/| /' conftest.$ac_ext >&5
7844
7845( exit $ac_status )
7846ac_cv_header_stdc=no
956d6950 7847fi
86da66b5 7848rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 7849fi
956d6950
JL
7850fi
7851fi
ba479fd2
NN
7852echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7853echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 7854if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
7855
7856cat >>confdefs.h <<\_ACEOF
956d6950 7857#define STDC_HEADERS 1
ba479fd2 7858_ACEOF
956d6950
JL
7859
7860fi
7861
ba479fd2
NN
7862echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7863echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
7864if test "${ac_cv_header_time+set}" = set; then
7865 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 7866else
ba479fd2 7867 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7868/* confdefs.h. */
7869_ACEOF
7870cat confdefs.h >>conftest.$ac_ext
7871cat >>conftest.$ac_ext <<_ACEOF
7872/* end confdefs.h. */
956d6950
JL
7873#include <sys/types.h>
7874#include <sys/time.h>
7875#include <time.h>
ba479fd2
NN
7876
7877int
7878main ()
7879{
7880if ((struct tm *) 0)
7881return 0;
7882 ;
7883 return 0;
7884}
7885_ACEOF
7886rm -f conftest.$ac_objext
7887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7888 (eval $ac_compile) 2>conftest.er1
ba479fd2 7889 ac_status=$?
86da66b5
HPN
7890 grep -v '^ *+' conftest.er1 >conftest.err
7891 rm -f conftest.er1
7892 cat conftest.err >&5
ba479fd2
NN
7893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7894 (exit $ac_status); } &&
a1286ef5
ZW
7895 { ac_try='test -z "$ac_c_werror_flag"
7896 || test ! -s conftest.err'
86da66b5
HPN
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); }; } &&
7902 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7904 (eval $ac_try) 2>&5
7905 ac_status=$?
7906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7907 (exit $ac_status); }; }; then
956d6950
JL
7908 ac_cv_header_time=yes
7909else
ba479fd2
NN
7910 echo "$as_me: failed program was:" >&5
7911sed 's/^/| /' conftest.$ac_ext >&5
7912
7913ac_cv_header_time=no
956d6950 7914fi
86da66b5 7915rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 7916fi
ba479fd2
NN
7917echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7918echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 7919if test $ac_cv_header_time = yes; then
ba479fd2
NN
7920
7921cat >>confdefs.h <<\_ACEOF
956d6950 7922#define TIME_WITH_SYS_TIME 1
ba479fd2 7923_ACEOF
956d6950
JL
7924
7925fi
7926
41e622a8
AP
7927echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
7928echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
7929if test "${gcc_cv_header_string+set}" = set; then
7930 echo $ECHO_N "(cached) $ECHO_C" >&6
7931else
7932 cat >conftest.$ac_ext <<_ACEOF
7933/* confdefs.h. */
7934_ACEOF
7935cat confdefs.h >>conftest.$ac_ext
7936cat >>conftest.$ac_ext <<_ACEOF
7937/* end confdefs.h. */
7938#include <string.h>
7939#include <strings.h>
7940int
7941main ()
7942{
7943
7944 ;
7945 return 0;
7946}
7947_ACEOF
7948rm -f conftest.$ac_objext
7949if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7950 (eval $ac_compile) 2>conftest.er1
7951 ac_status=$?
7952 grep -v '^ *+' conftest.er1 >conftest.err
7953 rm -f conftest.er1
7954 cat conftest.err >&5
7955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7956 (exit $ac_status); } &&
a1286ef5
ZW
7957 { ac_try='test -z "$ac_c_werror_flag"
7958 || test ! -s conftest.err'
41e622a8
AP
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); }; } &&
7964 { ac_try='test -s conftest.$ac_objext'
7965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7966 (eval $ac_try) 2>&5
7967 ac_status=$?
7968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7969 (exit $ac_status); }; }; then
7970 gcc_cv_header_string=yes
7971else
7972 echo "$as_me: failed program was:" >&5
7973sed 's/^/| /' conftest.$ac_ext >&5
7974
7975gcc_cv_header_string=no
7976fi
7977rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7978fi
7979echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
7980echo "${ECHO_T}$gcc_cv_header_string" >&6
7981if test $gcc_cv_header_string = yes; then
7982
7983cat >>confdefs.h <<\_ACEOF
7984#define STRING_WITH_STRINGS 1
7985_ACEOF
7986
7987fi
7988
ba479fd2
NN
7989echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7990echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
7991if test "${ac_cv_header_sys_wait_h+set}" = set; then
7992 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 7993else
ba479fd2 7994 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7995/* confdefs.h. */
7996_ACEOF
7997cat confdefs.h >>conftest.$ac_ext
7998cat >>conftest.$ac_ext <<_ACEOF
7999/* end confdefs.h. */
e9831ca0
KG
8000#include <sys/types.h>
8001#include <sys/wait.h>
8002#ifndef WEXITSTATUS
ba479fd2 8003# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
8004#endif
8005#ifndef WIFEXITED
ba479fd2 8006# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 8007#endif
ba479fd2
NN
8008
8009int
8010main ()
8011{
8012 int s;
8013 wait (&s);
8014 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8015 ;
8016 return 0;
8017}
8018_ACEOF
8019rm -f conftest.$ac_objext
8020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8021 (eval $ac_compile) 2>conftest.er1
ba479fd2 8022 ac_status=$?
86da66b5
HPN
8023 grep -v '^ *+' conftest.er1 >conftest.err
8024 rm -f conftest.er1
8025 cat conftest.err >&5
ba479fd2
NN
8026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8027 (exit $ac_status); } &&
a1286ef5
ZW
8028 { ac_try='test -z "$ac_c_werror_flag"
8029 || test ! -s conftest.err'
86da66b5
HPN
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); }; } &&
8035 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8037 (eval $ac_try) 2>&5
8038 ac_status=$?
8039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8040 (exit $ac_status); }; }; then
e9831ca0
KG
8041 ac_cv_header_sys_wait_h=yes
8042else
ba479fd2
NN
8043 echo "$as_me: failed program was:" >&5
8044sed 's/^/| /' conftest.$ac_ext >&5
8045
8046ac_cv_header_sys_wait_h=no
e9831ca0 8047fi
86da66b5 8048rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 8049fi
ba479fd2
NN
8050echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8051echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 8052if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
8053
8054cat >>confdefs.h <<\_ACEOF
e9831ca0 8055#define HAVE_SYS_WAIT_H 1
ba479fd2 8056_ACEOF
6e3f3080 8057
63cf211a 8058fi
6e3f3080 8059
ba479fd2
NN
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
dfb77e37
KC
8081
8082for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 8083 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 8084 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 8085 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 8086do
ba479fd2 8087as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 8088echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
8089echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8090if eval "test \"\${$as_ac_Header+set}\" = set"; then
8091 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8092else
ca9bc441 8093 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8094/* confdefs.h. */
8095_ACEOF
8096cat confdefs.h >>conftest.$ac_ext
8097cat >>conftest.$ac_ext <<_ACEOF
8098/* end confdefs.h. */
8099#include <$ac_header>
8100_ACEOF
8101if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8102 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8103 ac_status=$?
8104 grep -v '^ *+' conftest.er1 >conftest.err
8105 rm -f conftest.er1
8106 cat conftest.err >&5
8107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8108 (exit $ac_status); } >/dev/null; then
8109 if test -s conftest.err; then
8110 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8111 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8112 else
8113 ac_cpp_err=
8114 fi
8115else
8116 ac_cpp_err=yes
8117fi
8118if test -z "$ac_cpp_err"; then
ca9bc441 8119 eval "$as_ac_Header=yes"
ba479fd2
NN
8120else
8121 echo "$as_me: failed program was:" >&5
8122sed 's/^/| /' conftest.$ac_ext >&5
8123
ca9bc441 8124 eval "$as_ac_Header=no"
ba479fd2
NN
8125fi
8126rm -f conftest.err conftest.$ac_ext
6e3f3080 8127fi
ba479fd2
NN
8128echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8129echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
8130if test `eval echo '${'$as_ac_Header'}'` = yes; then
8131 cat >>confdefs.h <<_ACEOF
8132#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8133_ACEOF
8134
956d6950
JL
8135fi
8136done
8137
8138
f24af81b 8139# Check for thread headers.
ca9bc441 8140echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
8141echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
8142if test "${ac_cv_header_thread_h+set}" = set; then
8143 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 8144else
ca9bc441 8145 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8146/* confdefs.h. */
8147_ACEOF
8148cat confdefs.h >>conftest.$ac_ext
8149cat >>conftest.$ac_ext <<_ACEOF
8150/* end confdefs.h. */
8151#include <thread.h>
8152_ACEOF
8153if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8154 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8155 ac_status=$?
8156 grep -v '^ *+' conftest.er1 >conftest.err
8157 rm -f conftest.er1
8158 cat conftest.err >&5
8159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8160 (exit $ac_status); } >/dev/null; then
8161 if test -s conftest.err; then
8162 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8163 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8164 else
8165 ac_cpp_err=
8166 fi
8167else
8168 ac_cpp_err=yes
8169fi
8170if test -z "$ac_cpp_err"; then
ca9bc441 8171 ac_cv_header_thread_h=yes
ba479fd2
NN
8172else
8173 echo "$as_me: failed program was:" >&5
8174sed 's/^/| /' conftest.$ac_ext >&5
8175
ca9bc441 8176 ac_cv_header_thread_h=no
ba479fd2
NN
8177fi
8178rm -f conftest.err conftest.$ac_ext
6e3f3080 8179fi
ba479fd2
NN
8180echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8181echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 8182if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
8183 have_thread_h=yes
8184else
ba479fd2 8185 have_thread_h=
f24af81b
TT
8186fi
8187
ca9bc441 8188echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
8189echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8190if test "${ac_cv_header_pthread_h+set}" = set; then
8191 echo $ECHO_N "(cached) $ECHO_C" >&6
f24af81b 8192else
ca9bc441 8193 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8194/* confdefs.h. */
8195_ACEOF
8196cat confdefs.h >>conftest.$ac_ext
8197cat >>conftest.$ac_ext <<_ACEOF
8198/* end confdefs.h. */
8199#include <pthread.h>
8200_ACEOF
8201if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8202 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8203 ac_status=$?
8204 grep -v '^ *+' conftest.er1 >conftest.err
8205 rm -f conftest.er1
8206 cat conftest.err >&5
8207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8208 (exit $ac_status); } >/dev/null; then
8209 if test -s conftest.err; then
8210 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 8211 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
8212 else
8213 ac_cpp_err=
8214 fi
8215else
8216 ac_cpp_err=yes
8217fi
8218if test -z "$ac_cpp_err"; then
ca9bc441 8219 ac_cv_header_pthread_h=yes
ba479fd2
NN
8220else
8221 echo "$as_me: failed program was:" >&5
8222sed 's/^/| /' conftest.$ac_ext >&5
8223
ca9bc441 8224 ac_cv_header_pthread_h=no
ba479fd2
NN
8225fi
8226rm -f conftest.err conftest.$ac_ext
6e3f3080 8227fi
ba479fd2
NN
8228echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8229echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 8230if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
8231 have_pthread_h=yes
8232else
ba479fd2 8233 have_pthread_h=
f24af81b
TT
8234fi
8235
8236
84c041a1 8237# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
8238echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8239echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
8240if test "${gcc_cv_decl_char_bit+set}" = set; then
8241 echo $ECHO_N "(cached) $ECHO_C" >&6
8242else
8243 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8244/* confdefs.h. */
8245_ACEOF
8246cat confdefs.h >>conftest.$ac_ext
8247cat >>conftest.$ac_ext <<_ACEOF
8248/* end confdefs.h. */
75e93faa
ZW
8249#ifdef HAVE_LIMITS_H
8250#include <limits.h>
8251#endif
8252#ifdef CHAR_BIT
8253found
8254#endif
ba479fd2 8255_ACEOF
75e93faa 8256if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8257 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
8258 gcc_cv_decl_char_bit=yes
8259else
75e93faa
ZW
8260 gcc_cv_decl_char_bit=no
8261fi
8262rm -f conftest*
8263
8264
8265fi
ba479fd2
NN
8266echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8267echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 8268if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
8269 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8270echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
8271if test "${gcc_cv_c_nbby+set}" = set; then
8272 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
8273else
8274 i=8
8275 gcc_cv_c_nbby=
8276 while test $i -lt 65; do
ba479fd2 8277 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8278/* confdefs.h. */
8279_ACEOF
8280cat confdefs.h >>conftest.$ac_ext
8281cat >>conftest.$ac_ext <<_ACEOF
8282/* end confdefs.h. */
8283
8284int
8285main ()
8286{
4e70264f
ZW
8287switch(0) {
8288 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8289 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8290 ; }
ba479fd2
NN
8291 ;
8292 return 0;
8293}
8294_ACEOF
8295rm -f conftest.$ac_objext
8296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8297 (eval $ac_compile) 2>conftest.er1
ba479fd2 8298 ac_status=$?
86da66b5
HPN
8299 grep -v '^ *+' conftest.er1 >conftest.err
8300 rm -f conftest.er1
8301 cat conftest.err >&5
ba479fd2
NN
8302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8303 (exit $ac_status); } &&
a1286ef5
ZW
8304 { ac_try='test -z "$ac_c_werror_flag"
8305 || test ! -s conftest.err'
86da66b5
HPN
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); }; } &&
8311 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8313 (eval $ac_try) 2>&5
8314 ac_status=$?
8315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8316 (exit $ac_status); }; }; then
4e70264f 8317 gcc_cv_c_nbby=$i; break
75e93faa 8318else
ba479fd2
NN
8319 echo "$as_me: failed program was:" >&5
8320sed 's/^/| /' conftest.$ac_ext >&5
8321
75e93faa 8322fi
86da66b5 8323rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
8324 i=`expr $i + 1`
8325 done
8326 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8327
8328fi
ba479fd2
NN
8329echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8330echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 8331if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
8332 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8333echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8334 { (exit 1); exit 1; }; }
75e93faa 8335else
ba479fd2
NN
8336
8337cat >>confdefs.h <<_ACEOF
75e93faa 8338#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 8339_ACEOF
75e93faa
ZW
8340
8341fi
8342fi
ba479fd2
NN
8343echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8344echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
8345if test "${ac_cv_c_bigendian+set}" = set; then
8346 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 8347else
9791c75c 8348 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 8349cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8350/* confdefs.h. */
8351_ACEOF
8352cat confdefs.h >>conftest.$ac_ext
8353cat >>conftest.$ac_ext <<_ACEOF
8354/* end confdefs.h. */
4977bab6
ZW
8355#include <sys/types.h>
8356#include <sys/param.h>
9791c75c 8357
ba479fd2
NN
8358int
8359main ()
8360{
4977bab6
ZW
8361#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8362 bogus endian macros
84c041a1 8363#endif
9791c75c 8364
ba479fd2
NN
8365 ;
8366 return 0;
8367}
8368_ACEOF
8369rm -f conftest.$ac_objext
8370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8371 (eval $ac_compile) 2>conftest.er1
ba479fd2 8372 ac_status=$?
86da66b5
HPN
8373 grep -v '^ *+' conftest.er1 >conftest.err
8374 rm -f conftest.er1
8375 cat conftest.err >&5
ba479fd2
NN
8376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8377 (exit $ac_status); } &&
a1286ef5
ZW
8378 { ac_try='test -z "$ac_c_werror_flag"
8379 || test ! -s conftest.err'
86da66b5
HPN
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); }; } &&
8385 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8387 (eval $ac_try) 2>&5
8388 ac_status=$?
8389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8390 (exit $ac_status); }; }; then
4977bab6 8391 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 8392cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8393/* confdefs.h. */
8394_ACEOF
8395cat confdefs.h >>conftest.$ac_ext
8396cat >>conftest.$ac_ext <<_ACEOF
8397/* end confdefs.h. */
4977bab6
ZW
8398#include <sys/types.h>
8399#include <sys/param.h>
9791c75c 8400
ba479fd2
NN
8401int
8402main ()
8403{
4977bab6
ZW
8404#if BYTE_ORDER != BIG_ENDIAN
8405 not big endian
84c041a1 8406#endif
9791c75c 8407
ba479fd2
NN
8408 ;
8409 return 0;
8410}
8411_ACEOF
8412rm -f conftest.$ac_objext
8413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8414 (eval $ac_compile) 2>conftest.er1
ba479fd2 8415 ac_status=$?
86da66b5
HPN
8416 grep -v '^ *+' conftest.er1 >conftest.err
8417 rm -f conftest.er1
8418 cat conftest.err >&5
ba479fd2
NN
8419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8420 (exit $ac_status); } &&
a1286ef5
ZW
8421 { ac_try='test -z "$ac_c_werror_flag"
8422 || test ! -s conftest.err'
86da66b5
HPN
8423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8424 (eval $ac_try) 2>&5
8425 ac_status=$?
8426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8427 (exit $ac_status); }; } &&
8428 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8430 (eval $ac_try) 2>&5
8431 ac_status=$?
8432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8433 (exit $ac_status); }; }; then
4977bab6
ZW
8434 ac_cv_c_bigendian=yes
8435else
ba479fd2
NN
8436 echo "$as_me: failed program was:" >&5
8437sed 's/^/| /' conftest.$ac_ext >&5
8438
8439ac_cv_c_bigendian=no
4977bab6 8440fi
86da66b5 8441rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8442else
ba479fd2
NN
8443 echo "$as_me: failed program was:" >&5
8444sed 's/^/| /' conftest.$ac_ext >&5
8445
9791c75c
KC
8446# It does not; compile a test program.
8447if test "$cross_compiling" = yes; then
8448 # try to guess the endianness by grepping values into an object file
8449 ac_cv_c_bigendian=unknown
8450 cat >conftest.$ac_ext <<_ACEOF
8451/* confdefs.h. */
8452_ACEOF
8453cat confdefs.h >>conftest.$ac_ext
8454cat >>conftest.$ac_ext <<_ACEOF
8455/* end confdefs.h. */
8456short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8457short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8458void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
8459short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8460short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8461void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
8462int
8463main ()
8464{
8465 _ascii (); _ebcdic ();
8466 ;
8467 return 0;
8468}
8469_ACEOF
8470rm -f conftest.$ac_objext
8471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8472 (eval $ac_compile) 2>conftest.er1
8473 ac_status=$?
8474 grep -v '^ *+' conftest.er1 >conftest.err
8475 rm -f conftest.er1
8476 cat conftest.err >&5
8477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8478 (exit $ac_status); } &&
8479 { ac_try='test -z "$ac_c_werror_flag"
8480 || test ! -s conftest.err'
8481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8482 (eval $ac_try) 2>&5
8483 ac_status=$?
8484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8485 (exit $ac_status); }; } &&
8486 { ac_try='test -s conftest.$ac_objext'
8487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8488 (eval $ac_try) 2>&5
8489 ac_status=$?
8490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491 (exit $ac_status); }; }; then
8492 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
8493 ac_cv_c_bigendian=yes
8494fi
8495if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8496 if test "$ac_cv_c_bigendian" = unknown; then
8497 ac_cv_c_bigendian=no
8498 else
8499 # finding both strings is unlikely to happen, but who knows?
8500 ac_cv_c_bigendian=unknown
8501 fi
8502fi
8503else
8504 echo "$as_me: failed program was:" >&5
8505sed 's/^/| /' conftest.$ac_ext >&5
8506
4977bab6 8507fi
86da66b5 8508rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
8509else
8510 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8511/* confdefs.h. */
8512_ACEOF
8513cat confdefs.h >>conftest.$ac_ext
8514cat >>conftest.$ac_ext <<_ACEOF
8515/* end confdefs.h. */
9791c75c
KC
8516int
8517main ()
8518{
4977bab6
ZW
8519 /* Are we little or big endian? From Harbison&Steele. */
8520 union
8521 {
8522 long l;
8523 char c[sizeof (long)];
8524 } u;
8525 u.l = 1;
8526 exit (u.c[sizeof (long) - 1] == 1);
8527}
ba479fd2
NN
8528_ACEOF
8529rm -f conftest$ac_exeext
8530if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8531 (eval $ac_link) 2>&5
8532 ac_status=$?
8533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8536 (eval $ac_try) 2>&5
8537 ac_status=$?
8538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539 (exit $ac_status); }; }; then
4977bab6
ZW
8540 ac_cv_c_bigendian=no
8541else
ba479fd2
NN
8542 echo "$as_me: program exited with status $ac_status" >&5
8543echo "$as_me: failed program was:" >&5
8544sed 's/^/| /' conftest.$ac_ext >&5
8545
8546( exit $ac_status )
8547ac_cv_c_bigendian=yes
4977bab6 8548fi
86da66b5 8549rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 8550fi
4977bab6 8551fi
9791c75c 8552rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 8553fi
ba479fd2
NN
8554echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8555echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9791c75c
KC
8556case $ac_cv_c_bigendian in
8557 yes)
ba479fd2
NN
8558
8559cat >>confdefs.h <<\_ACEOF
4977bab6 8560#define WORDS_BIGENDIAN 1
ba479fd2 8561_ACEOF
9791c75c
KC
8562 ;;
8563 no)
8564 ;;
8565 *)
8566 { { echo "$as_me:$LINENO: error: unknown endianness
8567presetting ac_cv_c_bigendian=no (or yes) will help" >&5
8568echo "$as_me: error: unknown endianness
8569presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
8570 { (exit 1); exit 1; }; } ;;
8571esac
84c041a1 8572
75e93faa 8573
73458fb7
NN
8574# --------
8575# UNSORTED
8576# --------
1e608388 8577
73458fb7
NN
8578# Stage specific cflags for build.
8579stage1_cflags=
8580case $build in
8581vax-*-*)
8582 if test x$GCC = xyes
8583 then
8584 stage1_cflags="-Wa,-J"
8585 else
8586 stage1_cflags="-J"
8587 fi
8588 ;;
8589powerpc-*-darwin*)
8590 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
8591 # sources; use -no-cpp-precomp to get to GNU cpp.
8592 # Apple's GCC has bugs in designated initializer handling, so disable
8593 # that too.
8594 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
8595 ;;
8596esac
1e608388 8597
1e608388 8598
4e70264f
ZW
8599# These libraries may be used by collect2.
8600# We may need a special search path to get them linked.
ba479fd2
NN
8601echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8602echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
8603if test "${gcc_cv_collect2_libs+set}" = set; then
8604 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
8605else
8606 save_LIBS="$LIBS"
7f2749d4 8607for libs in '' -lld -lmld \
4e70264f
ZW
8608 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8609 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8610do
8611 LIBS="$libs"
ba479fd2 8612 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8613/* confdefs.h. */
8614_ACEOF
8615cat confdefs.h >>conftest.$ac_ext
8616cat >>conftest.$ac_ext <<_ACEOF
8617/* end confdefs.h. */
8618
4e70264f 8619/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8620#ifdef __cplusplus
8621extern "C"
8622#endif
4e70264f 8623/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8624 builtin and then its argument prototype would still apply. */
8625char ldopen ();
8626int
8627main ()
8628{
8629ldopen ();
8630 ;
8631 return 0;
8632}
8633_ACEOF
8634rm -f conftest.$ac_objext conftest$ac_exeext
8635if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8636 (eval $ac_link) 2>conftest.er1
ba479fd2 8637 ac_status=$?
86da66b5
HPN
8638 grep -v '^ *+' conftest.er1 >conftest.err
8639 rm -f conftest.er1
8640 cat conftest.err >&5
ba479fd2
NN
8641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8642 (exit $ac_status); } &&
a1286ef5
ZW
8643 { ac_try='test -z "$ac_c_werror_flag"
8644 || test ! -s conftest.err'
86da66b5
HPN
8645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8646 (eval $ac_try) 2>&5
8647 ac_status=$?
8648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8649 (exit $ac_status); }; } &&
8650 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8652 (eval $ac_try) 2>&5
8653 ac_status=$?
8654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8655 (exit $ac_status); }; }; then
4e70264f
ZW
8656 gcc_cv_collect2_libs="$libs"; break
8657else
ba479fd2
NN
8658 echo "$as_me: failed program was:" >&5
8659sed 's/^/| /' conftest.$ac_ext >&5
8660
4e70264f 8661fi
86da66b5
HPN
8662rm -f conftest.err conftest.$ac_objext \
8663 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
8664done
8665LIBS="$save_LIBS"
8666test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8667fi
ba479fd2
NN
8668echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8669echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
8670case $gcc_cv_collect2_libs in
8671 "none required") ;;
8672 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8673esac
8674
8675
7f2749d4
RK
8676# When building Ada code on Alpha, we need exc_resume which is usually in
8677# -lexc. So test for it.
8678save_LIBS="$LIBS"
8679LIBS=
ba479fd2
NN
8680echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8681echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
8682if test "${ac_cv_search_exc_resume+set}" = set; then
8683 echo $ECHO_N "(cached) $ECHO_C" >&6
8684else
8685 ac_func_search_save_LIBS=$LIBS
8686ac_cv_search_exc_resume=no
8687cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8688/* confdefs.h. */
8689_ACEOF
8690cat confdefs.h >>conftest.$ac_ext
8691cat >>conftest.$ac_ext <<_ACEOF
8692/* end confdefs.h. */
7f2749d4 8693
7f2749d4 8694/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8695#ifdef __cplusplus
8696extern "C"
8697#endif
7f2749d4 8698/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8699 builtin and then its argument prototype would still apply. */
8700char exc_resume ();
8701int
8702main ()
8703{
8704exc_resume ();
8705 ;
8706 return 0;
8707}
8708_ACEOF
8709rm -f conftest.$ac_objext conftest$ac_exeext
8710if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8711 (eval $ac_link) 2>conftest.er1
ba479fd2 8712 ac_status=$?
86da66b5
HPN
8713 grep -v '^ *+' conftest.er1 >conftest.err
8714 rm -f conftest.er1
8715 cat conftest.err >&5
ba479fd2
NN
8716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8717 (exit $ac_status); } &&
a1286ef5
ZW
8718 { ac_try='test -z "$ac_c_werror_flag"
8719 || test ! -s conftest.err'
86da66b5
HPN
8720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8721 (eval $ac_try) 2>&5
8722 ac_status=$?
8723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8724 (exit $ac_status); }; } &&
8725 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8727 (eval $ac_try) 2>&5
8728 ac_status=$?
8729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8730 (exit $ac_status); }; }; then
7f2749d4
RK
8731 ac_cv_search_exc_resume="none required"
8732else
ba479fd2
NN
8733 echo "$as_me: failed program was:" >&5
8734sed 's/^/| /' conftest.$ac_ext >&5
8735
7f2749d4 8736fi
86da66b5
HPN
8737rm -f conftest.err conftest.$ac_objext \
8738 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8739if test "$ac_cv_search_exc_resume" = no; then
8740 for ac_lib in exc; do
8741 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8742 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8743/* confdefs.h. */
8744_ACEOF
8745cat confdefs.h >>conftest.$ac_ext
8746cat >>conftest.$ac_ext <<_ACEOF
8747/* end confdefs.h. */
8748
7f2749d4 8749/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8750#ifdef __cplusplus
8751extern "C"
8752#endif
7f2749d4 8753/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8754 builtin and then its argument prototype would still apply. */
8755char exc_resume ();
8756int
8757main ()
8758{
8759exc_resume ();
8760 ;
8761 return 0;
8762}
8763_ACEOF
8764rm -f conftest.$ac_objext conftest$ac_exeext
8765if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8766 (eval $ac_link) 2>conftest.er1
ba479fd2 8767 ac_status=$?
86da66b5
HPN
8768 grep -v '^ *+' conftest.er1 >conftest.err
8769 rm -f conftest.er1
8770 cat conftest.err >&5
ba479fd2
NN
8771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8772 (exit $ac_status); } &&
a1286ef5
ZW
8773 { ac_try='test -z "$ac_c_werror_flag"
8774 || test ! -s conftest.err'
86da66b5
HPN
8775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8776 (eval $ac_try) 2>&5
8777 ac_status=$?
8778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8779 (exit $ac_status); }; } &&
8780 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8782 (eval $ac_try) 2>&5
8783 ac_status=$?
8784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8785 (exit $ac_status); }; }; then
8786 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
8787break
8788else
ba479fd2
NN
8789 echo "$as_me: failed program was:" >&5
8790sed 's/^/| /' conftest.$ac_ext >&5
8791
cafe096b 8792fi
86da66b5
HPN
8793rm -f conftest.err conftest.$ac_objext \
8794 conftest$ac_exeext conftest.$ac_ext
ba479fd2 8795 done
6e3f3080 8796fi
ba479fd2
NN
8797LIBS=$ac_func_search_save_LIBS
8798fi
8799echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
8800echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
8801if test "$ac_cv_search_exc_resume" != no; then
63cf211a 8802 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 8803
7f2749d4 8804fi
ba479fd2 8805
7f2749d4
RK
8806GNAT_LIBEXC="$LIBS"
8807LIBS="$save_LIBS"
8808
8809
62c9aa5f
ZW
8810# Some systems put ldexp and frexp in libm instead of libc; assume
8811# they're both in the same place. jcf-dump needs them.
8812save_LIBS="$LIBS"
8813LIBS=
ba479fd2
NN
8814echo "$as_me:$LINENO: checking for library containing ldexp" >&5
8815echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
8816if test "${ac_cv_search_ldexp+set}" = set; then
8817 echo $ECHO_N "(cached) $ECHO_C" >&6
8818else
8819 ac_func_search_save_LIBS=$LIBS
8820ac_cv_search_ldexp=no
8821cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8822/* confdefs.h. */
8823_ACEOF
8824cat confdefs.h >>conftest.$ac_ext
8825cat >>conftest.$ac_ext <<_ACEOF
8826/* end confdefs.h. */
62c9aa5f 8827
62c9aa5f 8828/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8829#ifdef __cplusplus
8830extern "C"
8831#endif
62c9aa5f 8832/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8833 builtin and then its argument prototype would still apply. */
8834char ldexp ();
8835int
8836main ()
8837{
8838ldexp ();
8839 ;
8840 return 0;
8841}
8842_ACEOF
8843rm -f conftest.$ac_objext conftest$ac_exeext
8844if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8845 (eval $ac_link) 2>conftest.er1
ba479fd2 8846 ac_status=$?
86da66b5
HPN
8847 grep -v '^ *+' conftest.er1 >conftest.err
8848 rm -f conftest.er1
8849 cat conftest.err >&5
ba479fd2
NN
8850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8851 (exit $ac_status); } &&
a1286ef5
ZW
8852 { ac_try='test -z "$ac_c_werror_flag"
8853 || test ! -s conftest.err'
86da66b5
HPN
8854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8855 (eval $ac_try) 2>&5
8856 ac_status=$?
8857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8858 (exit $ac_status); }; } &&
8859 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8861 (eval $ac_try) 2>&5
8862 ac_status=$?
8863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8864 (exit $ac_status); }; }; then
62c9aa5f
ZW
8865 ac_cv_search_ldexp="none required"
8866else
ba479fd2
NN
8867 echo "$as_me: failed program was:" >&5
8868sed 's/^/| /' conftest.$ac_ext >&5
8869
62c9aa5f 8870fi
86da66b5
HPN
8871rm -f conftest.err conftest.$ac_objext \
8872 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8873if test "$ac_cv_search_ldexp" = no; then
8874 for ac_lib in m; do
8875 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8876 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8877/* confdefs.h. */
8878_ACEOF
8879cat confdefs.h >>conftest.$ac_ext
8880cat >>conftest.$ac_ext <<_ACEOF
8881/* end confdefs.h. */
8882
62c9aa5f 8883/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8884#ifdef __cplusplus
8885extern "C"
8886#endif
62c9aa5f 8887/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8888 builtin and then its argument prototype would still apply. */
8889char ldexp ();
8890int
8891main ()
8892{
8893ldexp ();
8894 ;
8895 return 0;
8896}
8897_ACEOF
8898rm -f conftest.$ac_objext conftest$ac_exeext
8899if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8900 (eval $ac_link) 2>conftest.er1
ba479fd2 8901 ac_status=$?
86da66b5
HPN
8902 grep -v '^ *+' conftest.er1 >conftest.err
8903 rm -f conftest.er1
8904 cat conftest.err >&5
ba479fd2
NN
8905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8906 (exit $ac_status); } &&
a1286ef5
ZW
8907 { ac_try='test -z "$ac_c_werror_flag"
8908 || test ! -s conftest.err'
86da66b5
HPN
8909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8910 (eval $ac_try) 2>&5
8911 ac_status=$?
8912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8913 (exit $ac_status); }; } &&
8914 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8916 (eval $ac_try) 2>&5
8917 ac_status=$?
8918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8919 (exit $ac_status); }; }; then
8920 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
8921break
8922else
ba479fd2
NN
8923 echo "$as_me: failed program was:" >&5
8924sed 's/^/| /' conftest.$ac_ext >&5
8925
cafe096b 8926fi
86da66b5
HPN
8927rm -f conftest.err conftest.$ac_objext \
8928 conftest$ac_exeext conftest.$ac_ext
ba479fd2 8929 done
6e3f3080 8930fi
ba479fd2
NN
8931LIBS=$ac_func_search_save_LIBS
8932fi
8933echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
8934echo "${ECHO_T}$ac_cv_search_ldexp" >&6
8935if test "$ac_cv_search_ldexp" != no; then
63cf211a 8936 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 8937
62c9aa5f 8938fi
ba479fd2 8939
62c9aa5f
ZW
8940LDEXP_LIB="$LIBS"
8941LIBS="$save_LIBS"
8942
8943
956d6950
JL
8944# Use <inttypes.h> only if it exists,
8945# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
8946echo "$as_me:$LINENO: checking for inttypes.h" >&5
8947echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
8948if test "${gcc_cv_header_inttypes_h+set}" = set; then
8949 echo $ECHO_N "(cached) $ECHO_C" >&6
8950else
8951 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8952/* confdefs.h. */
8953_ACEOF
8954cat confdefs.h >>conftest.$ac_ext
8955cat >>conftest.$ac_ext <<_ACEOF
8956/* end confdefs.h. */
956d6950
JL
8957#include <sys/types.h>
8958#include <inttypes.h>
ba479fd2
NN
8959int
8960main ()
8961{
956d6950 8962intmax_t i = -1;
ba479fd2
NN
8963 ;
8964 return 0;
8965}
8966_ACEOF
8967rm -f conftest.$ac_objext
8968if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8969 (eval $ac_compile) 2>conftest.er1
ba479fd2 8970 ac_status=$?
86da66b5
HPN
8971 grep -v '^ *+' conftest.er1 >conftest.err
8972 rm -f conftest.er1
8973 cat conftest.err >&5
ba479fd2
NN
8974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8975 (exit $ac_status); } &&
a1286ef5
ZW
8976 { ac_try='test -z "$ac_c_werror_flag"
8977 || test ! -s conftest.err'
86da66b5
HPN
8978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8979 (eval $ac_try) 2>&5
8980 ac_status=$?
8981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8982 (exit $ac_status); }; } &&
8983 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8985 (eval $ac_try) 2>&5
8986 ac_status=$?
8987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8988 (exit $ac_status); }; }; then
0056a9b5 8989 gcc_cv_header_inttypes_h=yes
956d6950 8990else
ba479fd2
NN
8991 echo "$as_me: failed program was:" >&5
8992sed 's/^/| /' conftest.$ac_ext >&5
8993
8994gcc_cv_header_inttypes_h=no
956d6950 8995fi
86da66b5 8996rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
8997fi
8998
ba479fd2
NN
8999echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
9000echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 9001if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
9002
9003cat >>confdefs.h <<\_ACEOF
0056a9b5 9004#define HAVE_INTTYPES_H 1
ba479fd2 9005_ACEOF
0056a9b5
KG
9006
9007fi
956d6950 9008
c149cc37 9009
ba479fd2
NN
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
0d667716
KG
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
ba479fd2
NN
9038
9039
9040
9041
9042
9043
9044
9045
9046
6af8c740 9047for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
0d667716
KG
9048 sysconf strsignal getrusage nl_langinfo scandir alphasort \
9049 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9050 clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
956d6950 9051do
ba479fd2
NN
9052as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9053echo "$as_me:$LINENO: checking for $ac_func" >&5
9054echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9055if eval "test \"\${$as_ac_var+set}\" = set"; then
9056 echo $ECHO_N "(cached) $ECHO_C" >&6
9057else
9058 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9059/* confdefs.h. */
9060_ACEOF
9061cat confdefs.h >>conftest.$ac_ext
9062cat >>conftest.$ac_ext <<_ACEOF
9063/* end confdefs.h. */
86da66b5
HPN
9064/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9065 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9066#define $ac_func innocuous_$ac_func
9067
956d6950 9068/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9069 which can conflict with char $ac_func (); below.
9070 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9071 <limits.h> exists even on freestanding compilers. */
86da66b5 9072
ba479fd2
NN
9073#ifdef __STDC__
9074# include <limits.h>
9075#else
9076# include <assert.h>
9077#endif
86da66b5
HPN
9078
9079#undef $ac_func
9080
6e3f3080 9081/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9082#ifdef __cplusplus
9083extern "C"
9084{
9085#endif
6e3f3080 9086/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9087 builtin and then its argument prototype would still apply. */
9088char $ac_func ();
956d6950
JL
9089/* The GNU C library defines this for functions which it implements
9090 to always fail with ENOSYS. Some functions are actually named
9091 something starting with __ and the normal name is an alias. */
9092#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9093choke me
9094#else
ba479fd2
NN
9095char (*f) () = $ac_func;
9096#endif
9097#ifdef __cplusplus
9098}
956d6950
JL
9099#endif
9100
ba479fd2
NN
9101int
9102main ()
9103{
9104return f != $ac_func;
9105 ;
9106 return 0;
9107}
9108_ACEOF
9109rm -f conftest.$ac_objext conftest$ac_exeext
9110if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9111 (eval $ac_link) 2>conftest.er1
ba479fd2 9112 ac_status=$?
86da66b5
HPN
9113 grep -v '^ *+' conftest.er1 >conftest.err
9114 rm -f conftest.er1
9115 cat conftest.err >&5
ba479fd2
NN
9116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9117 (exit $ac_status); } &&
a1286ef5
ZW
9118 { ac_try='test -z "$ac_c_werror_flag"
9119 || test ! -s conftest.err'
86da66b5
HPN
9120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9121 (eval $ac_try) 2>&5
9122 ac_status=$?
9123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9124 (exit $ac_status); }; } &&
9125 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9127 (eval $ac_try) 2>&5
9128 ac_status=$?
9129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9130 (exit $ac_status); }; }; then
9131 eval "$as_ac_var=yes"
9132else
9133 echo "$as_me: failed program was:" >&5
9134sed 's/^/| /' conftest.$ac_ext >&5
9135
9136eval "$as_ac_var=no"
9137fi
86da66b5
HPN
9138rm -f conftest.err conftest.$ac_objext \
9139 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9140fi
9141echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9142echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9143if test `eval echo '${'$as_ac_var'}'` = yes; then
9144 cat >>confdefs.h <<_ACEOF
9145#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9146_ACEOF
956d6950 9147
956d6950
JL
9148fi
9149done
9150
6885fc87 9151
39f6c4c8 9152if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
9153 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9154echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
9155if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9156 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9157else
9158 if test "$cross_compiling" = yes; then
9159 gcc_cv_func_mbstowcs_works=yes
9160else
ba479fd2 9161 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9162/* confdefs.h. */
9163_ACEOF
9164cat confdefs.h >>conftest.$ac_ext
9165cat >>conftest.$ac_ext <<_ACEOF
9166/* end confdefs.h. */
39f6c4c8
KW
9167#include <stdlib.h>
9168int main()
9169{
9170 mbstowcs(0, "", 0);
9171 return 0;
9172}
ba479fd2
NN
9173_ACEOF
9174rm -f conftest$ac_exeext
9175if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9176 (eval $ac_link) 2>&5
9177 ac_status=$?
9178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9179 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9181 (eval $ac_try) 2>&5
9182 ac_status=$?
9183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9184 (exit $ac_status); }; }; then
39f6c4c8
KW
9185 gcc_cv_func_mbstowcs_works=yes
9186else
ba479fd2
NN
9187 echo "$as_me: program exited with status $ac_status" >&5
9188echo "$as_me: failed program was:" >&5
9189sed 's/^/| /' conftest.$ac_ext >&5
9190
9191( exit $ac_status )
9192gcc_cv_func_mbstowcs_works=no
39f6c4c8 9193fi
86da66b5 9194rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 9195fi
39f6c4c8 9196fi
ba479fd2
NN
9197echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9198echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 9199 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
9200
9201cat >>confdefs.h <<\_ACEOF
39f6c4c8 9202#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 9203_ACEOF
39f6c4c8
KW
9204
9205 fi
9206fi
9207
ba479fd2
NN
9208echo "$as_me:$LINENO: checking for ssize_t" >&5
9209echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
9210if test "${ac_cv_type_ssize_t+set}" = set; then
9211 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 9212else
ba479fd2 9213 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9214/* confdefs.h. */
9215_ACEOF
9216cat confdefs.h >>conftest.$ac_ext
9217cat >>conftest.$ac_ext <<_ACEOF
9218/* end confdefs.h. */
8b4fc07a
NN
9219$ac_includes_default
9220int
9221main ()
9222{
9223if ((ssize_t *) 0)
9224 return 0;
9225if (sizeof (ssize_t))
9226 return 0;
9227 ;
9228 return 0;
9229}
ba479fd2 9230_ACEOF
8b4fc07a
NN
9231rm -f conftest.$ac_objext
9232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9233 (eval $ac_compile) 2>conftest.er1
8b4fc07a 9234 ac_status=$?
86da66b5
HPN
9235 grep -v '^ *+' conftest.er1 >conftest.err
9236 rm -f conftest.er1
9237 cat conftest.err >&5
8b4fc07a
NN
9238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9239 (exit $ac_status); } &&
a1286ef5
ZW
9240 { ac_try='test -z "$ac_c_werror_flag"
9241 || test ! -s conftest.err'
86da66b5
HPN
9242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9243 (eval $ac_try) 2>&5
9244 ac_status=$?
9245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9246 (exit $ac_status); }; } &&
9247 { ac_try='test -s conftest.$ac_objext'
8b4fc07a
NN
9248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9249 (eval $ac_try) 2>&5
9250 ac_status=$?
9251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9252 (exit $ac_status); }; }; then
cb65112a 9253 ac_cv_type_ssize_t=yes
f12bc141 9254else
8b4fc07a
NN
9255 echo "$as_me: failed program was:" >&5
9256sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9257
8b4fc07a
NN
9258ac_cv_type_ssize_t=no
9259fi
86da66b5 9260rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9261fi
ba479fd2
NN
9262echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9263echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
9264if test $ac_cv_type_ssize_t = yes; then
9265 :
9266else
ba479fd2 9267
8b4fc07a 9268cat >>confdefs.h <<_ACEOF
f12bc141 9269#define ssize_t int
ba479fd2 9270_ACEOF
f12bc141
ZW
9271
9272fi
9273
0b9d02c6 9274
e256b8b6
DA
9275# Try to determine the array type of the second argument of getgroups
9276# for the target system (int or gid_t).
ba479fd2
NN
9277echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9278echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
9279if test "${ac_cv_type_uid_t+set}" = set; then
9280 echo $ECHO_N "(cached) $ECHO_C" >&6
9281else
9282 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9283/* confdefs.h. */
9284_ACEOF
9285cat confdefs.h >>conftest.$ac_ext
9286cat >>conftest.$ac_ext <<_ACEOF
9287/* end confdefs.h. */
e256b8b6 9288#include <sys/types.h>
ba479fd2
NN
9289
9290_ACEOF
e256b8b6 9291if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9292 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
9293 ac_cv_type_uid_t=yes
9294else
e256b8b6
DA
9295 ac_cv_type_uid_t=no
9296fi
9297rm -f conftest*
9298
9299fi
ba479fd2
NN
9300echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9301echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 9302if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
9303
9304cat >>confdefs.h <<\_ACEOF
e256b8b6 9305#define uid_t int
ba479fd2 9306_ACEOF
cafe096b 9307
ba479fd2
NN
9308
9309cat >>confdefs.h <<\_ACEOF
e256b8b6 9310#define gid_t int
ba479fd2 9311_ACEOF
e256b8b6
DA
9312
9313fi
9314
ba479fd2
NN
9315echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9316echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
9317if test "${ac_cv_type_getgroups+set}" = set; then
9318 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
9319else
9320 if test "$cross_compiling" = yes; then
9321 ac_cv_type_getgroups=cross
9322else
ba479fd2 9323 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9324/* confdefs.h. */
9325_ACEOF
9326cat confdefs.h >>conftest.$ac_ext
9327cat >>conftest.$ac_ext <<_ACEOF
9328/* end confdefs.h. */
e256b8b6
DA
9329/* Thanks to Mike Rendell for this test. */
9330#include <sys/types.h>
9331#define NGID 256
9332#undef MAX
9333#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
9334
9335int
9336main ()
e256b8b6
DA
9337{
9338 gid_t gidset[NGID];
9339 int i, n;
9340 union { gid_t gval; long lval; } val;
9341
9342 val.lval = -1;
9343 for (i = 0; i < NGID; i++)
9344 gidset[i] = val.gval;
9345 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 9346 gidset);
e256b8b6
DA
9347 /* Exit non-zero if getgroups seems to require an array of ints. This
9348 happens when gid_t is short but getgroups modifies an array of ints. */
9349 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 9350}
ba479fd2
NN
9351_ACEOF
9352rm -f conftest$ac_exeext
9353if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9354 (eval $ac_link) 2>&5
9355 ac_status=$?
9356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9357 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9359 (eval $ac_try) 2>&5
9360 ac_status=$?
9361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9362 (exit $ac_status); }; }; then
9363 ac_cv_type_getgroups=gid_t
63cf211a 9364else
ba479fd2
NN
9365 echo "$as_me: program exited with status $ac_status" >&5
9366echo "$as_me: failed program was:" >&5
9367sed 's/^/| /' conftest.$ac_ext >&5
9368
9369( exit $ac_status )
9370ac_cv_type_getgroups=int
e256b8b6 9371fi
86da66b5 9372rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 9373fi
e256b8b6 9374if test $ac_cv_type_getgroups = cross; then
ba479fd2 9375 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9376/* confdefs.h. */
9377_ACEOF
9378cat confdefs.h >>conftest.$ac_ext
9379cat >>conftest.$ac_ext <<_ACEOF
9380/* end confdefs.h. */
e256b8b6 9381#include <unistd.h>
ba479fd2
NN
9382
9383_ACEOF
e256b8b6 9384if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9385 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
9386 ac_cv_type_getgroups=gid_t
9387else
e256b8b6
DA
9388 ac_cv_type_getgroups=int
9389fi
9390rm -f conftest*
9391
9392fi
9393fi
ba479fd2
NN
9394echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9395echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 9396
ba479fd2 9397cat >>confdefs.h <<_ACEOF
e256b8b6 9398#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 9399_ACEOF
e256b8b6
DA
9400
9401
9402if test "${target}" = "${build}"; then
9403 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9404else
9405 case "${target}" in
9406 # This condition may need some tweaking. It should include all
9407 # targets where the array type of the second argument of getgroups
9408 # is int and the type of gid_t is not equivalent to int.
9409 *-*-sunos* | *-*-ultrix*)
9410 TARGET_GETGROUPS_T=int
9411 ;;
9412 *)
9413 TARGET_GETGROUPS_T=gid_t
9414 ;;
9415 esac
9416fi
9417
9418
ba479fd2
NN
9419echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5
9420echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6
9421if test "${gcc_cv_func_printf_ptr+set}" = set; then
9422 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
9423else
9424 if test "$cross_compiling" = yes; then
9425 gcc_cv_func_printf_ptr=no
9426else
ba479fd2 9427 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9428/* confdefs.h. */
9429_ACEOF
9430cat confdefs.h >>conftest.$ac_ext
9431cat >>conftest.$ac_ext <<_ACEOF
9432/* end confdefs.h. */
0a4b6309
RL
9433#include <stdio.h>
9434
86cf1cbd 9435int main()
0a4b6309
RL
9436{
9437 char buf[64];
9438 char *p = buf, *q = NULL;
9439 sprintf(buf, "%p", p);
9440 sscanf(buf, "%p", &q);
86cf1cbd 9441 return (p != q);
0a4b6309 9442}
ba479fd2
NN
9443_ACEOF
9444rm -f conftest$ac_exeext
9445if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9446 (eval $ac_link) 2>&5
9447 ac_status=$?
9448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9449 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9451 (eval $ac_try) 2>&5
9452 ac_status=$?
9453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9454 (exit $ac_status); }; }; then
0a4b6309
RL
9455 gcc_cv_func_printf_ptr=yes
9456else
ba479fd2
NN
9457 echo "$as_me: program exited with status $ac_status" >&5
9458echo "$as_me: failed program was:" >&5
9459sed 's/^/| /' conftest.$ac_ext >&5
9460
9461( exit $ac_status )
9462gcc_cv_func_printf_ptr=no
0a4b6309 9463fi
86da66b5 9464rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0a4b6309 9465fi
0a4b6309
RL
9466rm -f core core.* *.core
9467fi
ba479fd2
NN
9468echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5
9469echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6
63cf211a 9470if test $gcc_cv_func_printf_ptr = yes ; then
ba479fd2
NN
9471
9472cat >>confdefs.h <<\_ACEOF
0a4b6309 9473#define HAVE_PRINTF_PTR 1
ba479fd2 9474_ACEOF
0a4b6309
RL
9475
9476fi
9477
3b0727a0
MR
9478
9479echo "$as_me:$LINENO: checking for sys/mman.h" >&5
9480echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
9481if test "${ac_cv_header_sys_mman_h+set}" = set; then
9482 echo $ECHO_N "(cached) $ECHO_C" >&6
9483else
9484 cat >conftest.$ac_ext <<_ACEOF
9485/* confdefs.h. */
9486_ACEOF
9487cat confdefs.h >>conftest.$ac_ext
9488cat >>conftest.$ac_ext <<_ACEOF
9489/* end confdefs.h. */
9490#include <sys/mman.h>
9491_ACEOF
9492if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9493 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9494 ac_status=$?
9495 grep -v '^ *+' conftest.er1 >conftest.err
9496 rm -f conftest.er1
9497 cat conftest.err >&5
9498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9499 (exit $ac_status); } >/dev/null; then
9500 if test -s conftest.err; then
9501 ac_cpp_err=$ac_c_preproc_warn_flag
9502 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9503 else
9504 ac_cpp_err=
9505 fi
9506else
9507 ac_cpp_err=yes
9508fi
9509if test -z "$ac_cpp_err"; then
9510 ac_cv_header_sys_mman_h=yes
9511else
9512 echo "$as_me: failed program was:" >&5
9513sed 's/^/| /' conftest.$ac_ext >&5
9514
9515 ac_cv_header_sys_mman_h=no
9516fi
9517rm -f conftest.err conftest.$ac_ext
9518fi
9519echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9520echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
9521if test $ac_cv_header_sys_mman_h = yes; then
9522 gcc_header_sys_mman_h=yes
9523else
9524 gcc_header_sys_mman_h=no
9525fi
9526
9527echo "$as_me:$LINENO: checking for mmap" >&5
9528echo $ECHO_N "checking for mmap... $ECHO_C" >&6
9529if test "${ac_cv_func_mmap+set}" = set; then
9530 echo $ECHO_N "(cached) $ECHO_C" >&6
9531else
9532 cat >conftest.$ac_ext <<_ACEOF
9533/* confdefs.h. */
9534_ACEOF
9535cat confdefs.h >>conftest.$ac_ext
9536cat >>conftest.$ac_ext <<_ACEOF
9537/* end confdefs.h. */
9538/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9539 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9540#define mmap innocuous_mmap
9541
9542/* System header to define __stub macros and hopefully few prototypes,
9543 which can conflict with char mmap (); below.
9544 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9545 <limits.h> exists even on freestanding compilers. */
9546
9547#ifdef __STDC__
9548# include <limits.h>
9549#else
9550# include <assert.h>
9551#endif
9552
9553#undef mmap
9554
9555/* Override any gcc2 internal prototype to avoid an error. */
9556#ifdef __cplusplus
9557extern "C"
9558{
9559#endif
9560/* We use char because int might match the return type of a gcc2
9561 builtin and then its argument prototype would still apply. */
9562char mmap ();
9563/* The GNU C library defines this for functions which it implements
9564 to always fail with ENOSYS. Some functions are actually named
9565 something starting with __ and the normal name is an alias. */
9566#if defined (__stub_mmap) || defined (__stub___mmap)
9567choke me
9568#else
9569char (*f) () = mmap;
9570#endif
9571#ifdef __cplusplus
9572}
9573#endif
9574
9575int
9576main ()
9577{
9578return f != mmap;
9579 ;
9580 return 0;
9581}
9582_ACEOF
9583rm -f conftest.$ac_objext conftest$ac_exeext
9584if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9585 (eval $ac_link) 2>conftest.er1
9586 ac_status=$?
9587 grep -v '^ *+' conftest.er1 >conftest.err
9588 rm -f conftest.er1
9589 cat conftest.err >&5
9590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9591 (exit $ac_status); } &&
a1286ef5
ZW
9592 { ac_try='test -z "$ac_c_werror_flag"
9593 || test ! -s conftest.err'
3b0727a0
MR
9594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9595 (eval $ac_try) 2>&5
9596 ac_status=$?
9597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9598 (exit $ac_status); }; } &&
9599 { ac_try='test -s conftest$ac_exeext'
9600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9601 (eval $ac_try) 2>&5
9602 ac_status=$?
9603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9604 (exit $ac_status); }; }; then
9605 ac_cv_func_mmap=yes
9606else
9607 echo "$as_me: failed program was:" >&5
9608sed 's/^/| /' conftest.$ac_ext >&5
9609
9610ac_cv_func_mmap=no
9611fi
9612rm -f conftest.err conftest.$ac_objext \
9613 conftest$ac_exeext conftest.$ac_ext
9614fi
9615echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9616echo "${ECHO_T}$ac_cv_func_mmap" >&6
9617if test $ac_cv_func_mmap = yes; then
9618 gcc_func_mmap=yes
9619else
9620 gcc_func_mmap=no
9621fi
9622
9623if test "$gcc_header_sys_mman_h" != yes \
9624 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
9625 gcc_cv_func_mmap_file=no
9626 gcc_cv_func_mmap_dev_zero=no
9627 gcc_cv_func_mmap_anon=no
9628else
ba479fd2
NN
9629 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9630echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
9631if test "${gcc_cv_func_mmap_file+set}" = set; then
9632 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 9633else
ba479fd2 9634 # Add a system to this blacklist if
1072ec3f
ZW
9635 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9636 # memory area containing the same data that you'd get if you applied
9637 # read() to the same fd. The only system known to have a problem here
9638 # is VMS, where text files have record structure.
9639 case "$host_os" in
ba479fd2 9640 vms* | ultrix*)
1072ec3f
ZW
9641 gcc_cv_func_mmap_file=no ;;
9642 *)
9643 gcc_cv_func_mmap_file=yes;;
9644 esac
9645fi
ba479fd2
NN
9646echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9647echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9648 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9649echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
9650if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9651 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9652else
9653 # Add a system to this blacklist if it has mmap() but /dev/zero
9654 # does not exist, or if mmapping /dev/zero does not give anonymous
9655 # zeroed pages with both the following properties:
9656 # 1. If you map N consecutive pages in with one call, and then
9657 # unmap any subset of those pages, the pages that were not
9658 # explicitly unmapped remain accessible.
9659 # 2. If you map two adjacent blocks of memory and then unmap them
9660 # both at once, they must both go away.
9661 # Systems known to be in this category are Windows (all variants),
9662 # VMS, and Darwin.
9663 case "$host_os" in
2ce240d3 9664 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
9665 gcc_cv_func_mmap_dev_zero=no ;;
9666 *)
9667 gcc_cv_func_mmap_dev_zero=yes;;
9668 esac
9669fi
ba479fd2
NN
9670echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9671echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
9672
9673 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
9674 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9675echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
9676if test "${gcc_cv_decl_map_anon+set}" = set; then
9677 echo $ECHO_N "(cached) $ECHO_C" >&6
9678else
9679 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9680/* confdefs.h. */
9681_ACEOF
9682cat confdefs.h >>conftest.$ac_ext
9683cat >>conftest.$ac_ext <<_ACEOF
9684/* end confdefs.h. */
1072ec3f
ZW
9685#include <sys/types.h>
9686#include <sys/mman.h>
9687#include <unistd.h>
9688
9689#ifndef MAP_ANONYMOUS
9690#define MAP_ANONYMOUS MAP_ANON
9691#endif
9692
ba479fd2
NN
9693int
9694main ()
9695{
1072ec3f 9696int n = MAP_ANONYMOUS;
ba479fd2
NN
9697 ;
9698 return 0;
9699}
9700_ACEOF
9701rm -f conftest.$ac_objext
9702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9703 (eval $ac_compile) 2>conftest.er1
ba479fd2 9704 ac_status=$?
86da66b5
HPN
9705 grep -v '^ *+' conftest.er1 >conftest.err
9706 rm -f conftest.er1
9707 cat conftest.err >&5
ba479fd2
NN
9708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9709 (exit $ac_status); } &&
a1286ef5
ZW
9710 { ac_try='test -z "$ac_c_werror_flag"
9711 || test ! -s conftest.err'
86da66b5
HPN
9712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9713 (eval $ac_try) 2>&5
9714 ac_status=$?
9715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9716 (exit $ac_status); }; } &&
9717 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9719 (eval $ac_try) 2>&5
9720 ac_status=$?
9721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9722 (exit $ac_status); }; }; then
1072ec3f
ZW
9723 gcc_cv_decl_map_anon=yes
9724else
ba479fd2
NN
9725 echo "$as_me: failed program was:" >&5
9726sed 's/^/| /' conftest.$ac_ext >&5
9727
9728gcc_cv_decl_map_anon=no
1072ec3f 9729fi
86da66b5 9730rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 9731fi
ba479fd2
NN
9732echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9733echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
9734
9735 if test $gcc_cv_decl_map_anon = no; then
9736 gcc_cv_func_mmap_anon=no
9737 else
ba479fd2
NN
9738 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9739echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
9740if test "${gcc_cv_func_mmap_anon+set}" = set; then
9741 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
9742else
9743 # Add a system to this blacklist if it has mmap() and MAP_ANON or
9744 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9745 # doesn't give anonymous zeroed pages with the same properties listed
9746 # above for use of /dev/zero.
9747 # Systems known to be in this category are Windows, VMS, and SCO Unix.
9748 case "$host_os" in
9749 vms* | cygwin* | pe | mingw* | sco* | udk* )
9750 gcc_cv_func_mmap_anon=no ;;
9751 *)
9752 gcc_cv_func_mmap_anon=yes;;
9753 esac
9754fi
ba479fd2
NN
9755echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9756echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
9757 fi
9758fi
9759
9760if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
9761
9762cat >>confdefs.h <<\_ACEOF
1072ec3f 9763#define HAVE_MMAP_FILE 1
ba479fd2 9764_ACEOF
1072ec3f
ZW
9765
9766fi
9767if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
9768
9769cat >>confdefs.h <<\_ACEOF
1072ec3f 9770#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 9771_ACEOF
1072ec3f
ZW
9772
9773fi
9774if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
9775
9776cat >>confdefs.h <<\_ACEOF
1072ec3f 9777#define HAVE_MMAP_ANON 1
ba479fd2 9778_ACEOF
1072ec3f
ZW
9779
9780fi
9781
b27d2bd5
MK
9782
9783case "${host}" in
ee262b6f 9784*-*-*vms*)
ba479fd2 9785 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
9786 # won't work, and it isn't easily adaptable. It makes more sense to
9787 # just force it.
9788 ac_cv_func_vfork_works=yes
9789 ;;
b27d2bd5 9790esac
ba479fd2
NN
9791echo "$as_me:$LINENO: checking for pid_t" >&5
9792echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
9793if test "${ac_cv_type_pid_t+set}" = set; then
9794 echo $ECHO_N "(cached) $ECHO_C" >&6
9795else
9796 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9797/* confdefs.h. */
9798_ACEOF
9799cat confdefs.h >>conftest.$ac_ext
9800cat >>conftest.$ac_ext <<_ACEOF
9801/* end confdefs.h. */
9802$ac_includes_default
9803int
9804main ()
9805{
9806if ((pid_t *) 0)
9807 return 0;
9808if (sizeof (pid_t))
9809 return 0;
9810 ;
9811 return 0;
9812}
9813_ACEOF
9814rm -f conftest.$ac_objext
9815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 9816 (eval $ac_compile) 2>conftest.er1
ba479fd2 9817 ac_status=$?
86da66b5
HPN
9818 grep -v '^ *+' conftest.er1 >conftest.err
9819 rm -f conftest.er1
9820 cat conftest.err >&5
ba479fd2
NN
9821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9822 (exit $ac_status); } &&
a1286ef5
ZW
9823 { ac_try='test -z "$ac_c_werror_flag"
9824 || test ! -s conftest.err'
86da66b5
HPN
9825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9826 (eval $ac_try) 2>&5
9827 ac_status=$?
9828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9829 (exit $ac_status); }; } &&
9830 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
9831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9832 (eval $ac_try) 2>&5
9833 ac_status=$?
9834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9835 (exit $ac_status); }; }; then
cb65112a 9836 ac_cv_type_pid_t=yes
c375c43b 9837else
ba479fd2
NN
9838 echo "$as_me: failed program was:" >&5
9839sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 9840
ba479fd2
NN
9841ac_cv_type_pid_t=no
9842fi
86da66b5 9843rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 9844fi
ba479fd2
NN
9845echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
9846echo "${ECHO_T}$ac_cv_type_pid_t" >&6
9847if test $ac_cv_type_pid_t = yes; then
9848 :
9849else
9850
9851cat >>confdefs.h <<_ACEOF
c375c43b 9852#define pid_t int
ba479fd2 9853_ACEOF
c375c43b
KG
9854
9855fi
9856
ba479fd2
NN
9857
9858
9859for ac_header in unistd.h vfork.h
9860do
9861as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 9862echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
9863echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9864if eval "test \"\${$as_ac_Header+set}\" = set"; then
9865 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9866else
ca9bc441 9867 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9868/* confdefs.h. */
9869_ACEOF
9870cat confdefs.h >>conftest.$ac_ext
9871cat >>conftest.$ac_ext <<_ACEOF
9872/* end confdefs.h. */
9873#include <$ac_header>
9874_ACEOF
9875if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9876 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9877 ac_status=$?
9878 grep -v '^ *+' conftest.er1 >conftest.err
9879 rm -f conftest.er1
9880 cat conftest.err >&5
9881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9882 (exit $ac_status); } >/dev/null; then
9883 if test -s conftest.err; then
9884 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 9885 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
9886 else
9887 ac_cpp_err=
9888 fi
093e61a6 9889else
ba479fd2
NN
9890 ac_cpp_err=yes
9891fi
9892if test -z "$ac_cpp_err"; then
ca9bc441 9893 eval "$as_ac_Header=yes"
ba479fd2
NN
9894else
9895 echo "$as_me: failed program was:" >&5
9896sed 's/^/| /' conftest.$ac_ext >&5
9897
ca9bc441 9898 eval "$as_ac_Header=no"
ba479fd2
NN
9899fi
9900rm -f conftest.err conftest.$ac_ext
c375c43b 9901fi
ba479fd2
NN
9902echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9903echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
9904if test `eval echo '${'$as_ac_Header'}'` = yes; then
9905 cat >>confdefs.h <<_ACEOF
9906#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9907_ACEOF
6e3f3080
NN
9908
9909fi
ba479fd2
NN
9910done
9911
9912
9913
9914for ac_func in fork vfork
9915do
9916as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9917echo "$as_me:$LINENO: checking for $ac_func" >&5
9918echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9919if eval "test \"\${$as_ac_var+set}\" = set"; then
9920 echo $ECHO_N "(cached) $ECHO_C" >&6
9921else
9922 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9923/* confdefs.h. */
9924_ACEOF
9925cat confdefs.h >>conftest.$ac_ext
9926cat >>conftest.$ac_ext <<_ACEOF
9927/* end confdefs.h. */
86da66b5
HPN
9928/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9929 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9930#define $ac_func innocuous_$ac_func
9931
c375c43b 9932/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9933 which can conflict with char $ac_func (); below.
9934 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9935 <limits.h> exists even on freestanding compilers. */
86da66b5 9936
ba479fd2
NN
9937#ifdef __STDC__
9938# include <limits.h>
9939#else
9940# include <assert.h>
9941#endif
86da66b5
HPN
9942
9943#undef $ac_func
9944
6e3f3080 9945/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9946#ifdef __cplusplus
9947extern "C"
9948{
9949#endif
6e3f3080 9950/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9951 builtin and then its argument prototype would still apply. */
9952char $ac_func ();
c375c43b
KG
9953/* The GNU C library defines this for functions which it implements
9954 to always fail with ENOSYS. Some functions are actually named
9955 something starting with __ and the normal name is an alias. */
ba479fd2 9956#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
9957choke me
9958#else
ba479fd2
NN
9959char (*f) () = $ac_func;
9960#endif
9961#ifdef __cplusplus
9962}
c375c43b
KG
9963#endif
9964
ba479fd2
NN
9965int
9966main ()
9967{
9968return f != $ac_func;
9969 ;
9970 return 0;
9971}
9972_ACEOF
9973rm -f conftest.$ac_objext conftest$ac_exeext
9974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9975 (eval $ac_link) 2>conftest.er1
ba479fd2 9976 ac_status=$?
86da66b5
HPN
9977 grep -v '^ *+' conftest.er1 >conftest.err
9978 rm -f conftest.er1
9979 cat conftest.err >&5
ba479fd2
NN
9980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9981 (exit $ac_status); } &&
a1286ef5
ZW
9982 { ac_try='test -z "$ac_c_werror_flag"
9983 || test ! -s conftest.err'
86da66b5
HPN
9984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9985 (eval $ac_try) 2>&5
9986 ac_status=$?
9987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9988 (exit $ac_status); }; } &&
9989 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9991 (eval $ac_try) 2>&5
9992 ac_status=$?
9993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9994 (exit $ac_status); }; }; then
9995 eval "$as_ac_var=yes"
9996else
9997 echo "$as_me: failed program was:" >&5
9998sed 's/^/| /' conftest.$ac_ext >&5
9999
10000eval "$as_ac_var=no"
10001fi
86da66b5
HPN
10002rm -f conftest.err conftest.$ac_objext \
10003 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
10004fi
10005echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10006echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10007if test `eval echo '${'$as_ac_var'}'` = yes; then
10008 cat >>confdefs.h <<_ACEOF
10009#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10010_ACEOF
10011
c375c43b 10012fi
ba479fd2 10013done
c375c43b 10014
ba479fd2
NN
10015if test "x$ac_cv_func_fork" = xyes; then
10016 echo "$as_me:$LINENO: checking for working fork" >&5
10017echo $ECHO_N "checking for working fork... $ECHO_C" >&6
10018if test "${ac_cv_func_fork_works+set}" = set; then
10019 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10020else
ba479fd2
NN
10021 if test "$cross_compiling" = yes; then
10022 ac_cv_func_fork_works=cross
10023else
10024 cat >conftest.$ac_ext <<_ACEOF
10025/* By Ruediger Kuhlmann. */
10026 #include <sys/types.h>
10027 #if HAVE_UNISTD_H
10028 # include <unistd.h>
10029 #endif
10030 /* Some systems only have a dummy stub for fork() */
10031 int main ()
10032 {
86da66b5
HPN
10033 if (fork() < 0)
10034 exit (1);
10035 exit (0);
ba479fd2
NN
10036 }
10037_ACEOF
10038rm -f conftest$ac_exeext
10039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10040 (eval $ac_link) 2>&5
10041 ac_status=$?
10042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10045 (eval $ac_try) 2>&5
10046 ac_status=$?
10047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10048 (exit $ac_status); }; }; then
10049 ac_cv_func_fork_works=yes
10050else
10051 echo "$as_me: program exited with status $ac_status" >&5
10052echo "$as_me: failed program was:" >&5
10053sed 's/^/| /' conftest.$ac_ext >&5
10054
10055( exit $ac_status )
10056ac_cv_func_fork_works=no
10057fi
86da66b5 10058rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
10059fi
10060fi
10061echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10062echo "${ECHO_T}$ac_cv_func_fork_works" >&6
10063
10064else
10065 ac_cv_func_fork_works=$ac_cv_func_fork
10066fi
10067if test "x$ac_cv_func_fork_works" = xcross; then
10068 case $host in
10069 *-*-amigaos* | *-*-msdosdjgpp*)
10070 # Override, as these systems have only a dummy fork() stub
10071 ac_cv_func_fork_works=no
10072 ;;
10073 *)
10074 ac_cv_func_fork_works=yes
10075 ;;
10076 esac
10077 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10078echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 10079fi
c375c43b 10080ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10081if test "x$ac_cv_func_vfork" = xyes; then
10082 echo "$as_me:$LINENO: checking for working vfork" >&5
10083echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
10084if test "${ac_cv_func_vfork_works+set}" = set; then
10085 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10086else
ba479fd2
NN
10087 if test "$cross_compiling" = yes; then
10088 ac_cv_func_vfork_works=cross
10089else
10090 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10091/* confdefs.h. */
10092_ACEOF
10093cat confdefs.h >>conftest.$ac_ext
10094cat >>conftest.$ac_ext <<_ACEOF
10095/* end confdefs.h. */
c375c43b
KG
10096/* Thanks to Paul Eggert for this test. */
10097#include <stdio.h>
ba479fd2 10098#include <stdlib.h>
c375c43b
KG
10099#include <sys/types.h>
10100#include <sys/stat.h>
ba479fd2
NN
10101#include <sys/wait.h>
10102#if HAVE_UNISTD_H
10103# include <unistd.h>
c375c43b 10104#endif
ba479fd2
NN
10105#if HAVE_VFORK_H
10106# include <vfork.h>
c375c43b
KG
10107#endif
10108/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
10109 argument registers are propagated back to the parent. The compiler
10110 is told about this with #include <vfork.h>, but some compilers
10111 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10112 static variable whose address is put into a register that is
10113 clobbered by the vfork. */
10114static void
c375c43b
KG
10115#ifdef __cplusplus
10116sparc_address_test (int arg)
ba479fd2 10117# else
c375c43b
KG
10118sparc_address_test (arg) int arg;
10119#endif
10120{
10121 static pid_t child;
10122 if (!child) {
10123 child = vfork ();
10124 if (child < 0) {
10125 perror ("vfork");
10126 _exit(2);
10127 }
10128 if (!child) {
10129 arg = getpid();
10130 write(-1, "", 0);
10131 _exit (arg);
10132 }
10133 }
10134}
ba479fd2
NN
10135
10136int
10137main ()
10138{
c375c43b
KG
10139 pid_t parent = getpid ();
10140 pid_t child;
10141
ba479fd2 10142 sparc_address_test (0);
c375c43b
KG
10143
10144 child = vfork ();
10145
10146 if (child == 0) {
ba479fd2
NN
10147 /* Here is another test for sparc vfork register problems. This
10148 test uses lots of local variables, at least as many local
10149 variables as main has allocated so far including compiler
10150 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10151 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10152 reuse the register of parent for one of the local variables,
10153 since it will think that parent can't possibly be used any more
10154 in this routine. Assigning to the local variable will thus
10155 munge parent in the parent process. */
c375c43b
KG
10156 pid_t
10157 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10158 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10159 /* Convince the compiler that p..p7 are live; otherwise, it might
10160 use the same hardware register for all 8 local variables. */
10161 if (p != p1 || p != p2 || p != p3 || p != p4
10162 || p != p5 || p != p6 || p != p7)
10163 _exit(1);
10164
ba479fd2
NN
10165 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10166 from child file descriptors. If the child closes a descriptor
10167 before it execs or exits, this munges the parent's descriptor
10168 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10169 _exit(close(fileno(stdout)) != 0);
10170 } else {
10171 int status;
10172 struct stat st;
10173
10174 while (wait(&status) != child)
10175 ;
10176 exit(
10177 /* Was there some problem with vforking? */
10178 child < 0
10179
10180 /* Did the child fail? (This shouldn't happen.) */
10181 || status
10182
10183 /* Did the vfork/compiler bug occur? */
10184 || parent != getpid()
10185
10186 /* Did the file descriptor bug occur? */
10187 || fstat(fileno(stdout), &st) != 0
10188 );
10189 }
10190}
ba479fd2
NN
10191_ACEOF
10192rm -f conftest$ac_exeext
10193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10194 (eval $ac_link) 2>&5
10195 ac_status=$?
10196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10197 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10199 (eval $ac_try) 2>&5
10200 ac_status=$?
10201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10202 (exit $ac_status); }; }; then
c375c43b
KG
10203 ac_cv_func_vfork_works=yes
10204else
ba479fd2
NN
10205 echo "$as_me: program exited with status $ac_status" >&5
10206echo "$as_me: failed program was:" >&5
10207sed 's/^/| /' conftest.$ac_ext >&5
10208
10209( exit $ac_status )
10210ac_cv_func_vfork_works=no
cafe096b 10211fi
86da66b5 10212rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10213fi
ba479fd2
NN
10214fi
10215echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10216echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 10217
ba479fd2
NN
10218fi;
10219if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 10220 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10221 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10222echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
10223fi
10224
ba479fd2
NN
10225if test "x$ac_cv_func_vfork_works" = xyes; then
10226
10227cat >>confdefs.h <<\_ACEOF
10228#define HAVE_WORKING_VFORK 1
10229_ACEOF
10230
10231else
10232
10233cat >>confdefs.h <<\_ACEOF
c375c43b 10234#define vfork fork
ba479fd2 10235_ACEOF
c375c43b
KG
10236
10237fi
ba479fd2
NN
10238if test "x$ac_cv_func_fork_works" = xyes; then
10239
10240cat >>confdefs.h <<\_ACEOF
10241#define HAVE_WORKING_FORK 1
10242_ACEOF
10243
10244fi
10245
c375c43b 10246
81bf3d9e 10247
dfb77e37
KC
10248 if test "X$prefix" = "XNONE"; then
10249 acl_final_prefix="$ac_default_prefix"
10250 else
10251 acl_final_prefix="$prefix"
10252 fi
10253 if test "X$exec_prefix" = "XNONE"; then
10254 acl_final_exec_prefix='${prefix}'
10255 else
10256 acl_final_exec_prefix="$exec_prefix"
10257 fi
10258 acl_save_prefix="$prefix"
10259 prefix="$acl_final_prefix"
10260 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10261 prefix="$acl_save_prefix"
f91abfce
TT
10262
10263
dfb77e37
KC
10264# Check whether --with-gnu-ld or --without-gnu-ld was given.
10265if test "${with_gnu_ld+set}" = set; then
10266 withval="$with_gnu_ld"
10267 test "$withval" = no || with_gnu_ld=yes
ba479fd2 10268else
dfb77e37
KC
10269 with_gnu_ld=no
10270fi;
10271# Prepare PATH_SEPARATOR.
10272# The user is always right.
10273if test "${PATH_SEPARATOR+set}" != set; then
10274 echo "#! /bin/sh" >conf$$.sh
10275 echo "exit 0" >>conf$$.sh
10276 chmod +x conf$$.sh
10277 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10278 PATH_SEPARATOR=';'
ba479fd2 10279 else
dfb77e37 10280 PATH_SEPARATOR=:
ba479fd2 10281 fi
dfb77e37
KC
10282 rm -f conf$$.sh
10283fi
10284ac_prog=ld
10285if test "$GCC" = yes; then
10286 # Check if gcc -print-prog-name=ld gives a path.
10287 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10288echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10289 case $host in
10290 *-*-mingw*)
10291 # gcc leaves a trailing carriage return which upsets mingw
10292 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10293 *)
10294 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10295 esac
10296 case $ac_prog in
10297 # Accept absolute paths.
10298 [\\/]* | [A-Za-z]:[\\/]*)
10299 re_direlt='/[^/][^/]*/\.\./'
10300 # Canonicalize the path of ld
10301 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10302 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10303 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10304 done
10305 test -z "$LD" && LD="$ac_prog"
10306 ;;
10307 "")
10308 # If it fails, then pretend we aren't using GCC.
10309 ac_prog=ld
10310 ;;
10311 *)
10312 # If it is relative, then search for the first ld in PATH.
10313 with_gnu_ld=unknown
10314 ;;
10315 esac
10316elif test "$with_gnu_ld" = yes; then
10317 echo "$as_me:$LINENO: checking for GNU ld" >&5
10318echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
ba479fd2 10319else
dfb77e37
KC
10320 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10321echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
ba479fd2 10322fi
dfb77e37
KC
10323if test "${acl_cv_path_LD+set}" = set; then
10324 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 10325else
dfb77e37
KC
10326 if test -z "$LD"; then
10327 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10328 for ac_dir in $PATH; do
10329 test -z "$ac_dir" && ac_dir=.
10330 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10331 acl_cv_path_LD="$ac_dir/$ac_prog"
10332 # Check to see if the program is GNU ld. I'd rather use --version,
10333 # but apparently some GNU ld's only accept -v.
10334 # Break only if it was the GNU/non-GNU ld that we prefer.
10335 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10336 test "$with_gnu_ld" != no && break
10337 else
10338 test "$with_gnu_ld" != yes && break
10339 fi
10340 fi
10341 done
10342 IFS="$ac_save_ifs"
10343else
10344 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10345fi
10346fi
ba479fd2 10347
dfb77e37
KC
10348LD="$acl_cv_path_LD"
10349if test -n "$LD"; then
10350 echo "$as_me:$LINENO: result: $LD" >&5
10351echo "${ECHO_T}$LD" >&6
10352else
10353 echo "$as_me:$LINENO: result: no" >&5
10354echo "${ECHO_T}no" >&6
ba479fd2 10355fi
dfb77e37
KC
10356test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10357echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10358 { (exit 1); exit 1; }; }
10359echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10360echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10361if test "${acl_cv_prog_gnu_ld+set}" = set; then
10362 echo $ECHO_N "(cached) $ECHO_C" >&6
10363else
10364 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10365if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10366 acl_cv_prog_gnu_ld=yes
10367else
10368 acl_cv_prog_gnu_ld=no
6e3f3080 10369fi
dfb77e37
KC
10370fi
10371echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10372echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10373with_gnu_ld=$acl_cv_prog_gnu_ld
10374
10375
10376
10377 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10378echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10379if test "${acl_cv_rpath+set}" = set; then
10380 echo $ECHO_N "(cached) $ECHO_C" >&6
10381else
10382
10383 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10384 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10385 . ./conftest.sh
10386 rm -f ./conftest.sh
10387 acl_cv_rpath=done
ba479fd2 10388
eb158727 10389fi
dfb77e37
KC
10390echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10391echo "${ECHO_T}$acl_cv_rpath" >&6
10392 wl="$acl_cv_wl"
10393 libext="$acl_cv_libext"
10394 shlibext="$acl_cv_shlibext"
10395 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10396 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10397 hardcode_direct="$acl_cv_hardcode_direct"
10398 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10399 # Check whether --enable-rpath or --disable-rpath was given.
10400if test "${enable_rpath+set}" = set; then
10401 enableval="$enable_rpath"
10402 :
10403else
10404 enable_rpath=yes
10405fi;
10406
10407
10408
10409
10410
10411
10412
10413 use_additional=yes
10414
10415 acl_save_prefix="$prefix"
10416 prefix="$acl_final_prefix"
10417 acl_save_exec_prefix="$exec_prefix"
10418 exec_prefix="$acl_final_exec_prefix"
10419
10420 eval additional_includedir=\"$includedir\"
10421 eval additional_libdir=\"$libdir\"
10422
10423 exec_prefix="$acl_save_exec_prefix"
10424 prefix="$acl_save_prefix"
10425
10426
10427# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10428if test "${with_libiconv_prefix+set}" = set; then
10429 withval="$with_libiconv_prefix"
10430
10431 if test "X$withval" = "Xno"; then
10432 use_additional=no
10433 else
10434 if test "X$withval" = "X"; then
10435
10436 acl_save_prefix="$prefix"
10437 prefix="$acl_final_prefix"
10438 acl_save_exec_prefix="$exec_prefix"
10439 exec_prefix="$acl_final_exec_prefix"
10440
10441 eval additional_includedir=\"$includedir\"
10442 eval additional_libdir=\"$libdir\"
10443
10444 exec_prefix="$acl_save_exec_prefix"
10445 prefix="$acl_save_prefix"
10446
10447 else
10448 additional_includedir="$withval/include"
10449 additional_libdir="$withval/lib"
10450 fi
10451 fi
10452
10453fi;
10454 LIBICONV=
10455 LTLIBICONV=
10456 INCICONV=
10457 rpathdirs=
10458 ltrpathdirs=
10459 names_already_handled=
10460 names_next_round='iconv '
10461 while test -n "$names_next_round"; do
10462 names_this_round="$names_next_round"
10463 names_next_round=
10464 for name in $names_this_round; do
10465 already_handled=
10466 for n in $names_already_handled; do
10467 if test "$n" = "$name"; then
10468 already_handled=yes
10469 break
10470 fi
10471 done
10472 if test -z "$already_handled"; then
10473 names_already_handled="$names_already_handled $name"
10474 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10475 eval value=\"\$HAVE_LIB$uppername\"
10476 if test -n "$value"; then
10477 if test "$value" = yes; then
10478 eval value=\"\$LIB$uppername\"
10479 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10480 eval value=\"\$LTLIB$uppername\"
10481 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10482 else
10483 :
10484 fi
10485 else
10486 found_dir=
10487 found_la=
10488 found_so=
10489 found_a=
10490 if test $use_additional = yes; then
10491 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10492 found_dir="$additional_libdir"
10493 found_so="$additional_libdir/lib$name.$shlibext"
10494 if test -f "$additional_libdir/lib$name.la"; then
10495 found_la="$additional_libdir/lib$name.la"
10496 fi
10497 else
10498 if test -f "$additional_libdir/lib$name.$libext"; then
10499 found_dir="$additional_libdir"
10500 found_a="$additional_libdir/lib$name.$libext"
10501 if test -f "$additional_libdir/lib$name.la"; then
10502 found_la="$additional_libdir/lib$name.la"
10503 fi
10504 fi
10505 fi
10506 fi
10507 if test "X$found_dir" = "X"; then
10508 for x in $LDFLAGS $LTLIBICONV; do
10509
10510 acl_save_prefix="$prefix"
10511 prefix="$acl_final_prefix"
10512 acl_save_exec_prefix="$exec_prefix"
10513 exec_prefix="$acl_final_exec_prefix"
10514 eval x=\"$x\"
10515 exec_prefix="$acl_save_exec_prefix"
10516 prefix="$acl_save_prefix"
10517
10518 case "$x" in
10519 -L*)
10520 dir=`echo "X$x" | sed -e 's/^X-L//'`
10521 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10522 found_dir="$dir"
10523 found_so="$dir/lib$name.$shlibext"
10524 if test -f "$dir/lib$name.la"; then
10525 found_la="$dir/lib$name.la"
10526 fi
10527 else
10528 if test -f "$dir/lib$name.$libext"; then
10529 found_dir="$dir"
10530 found_a="$dir/lib$name.$libext"
10531 if test -f "$dir/lib$name.la"; then
10532 found_la="$dir/lib$name.la"
10533 fi
10534 fi
10535 fi
10536 ;;
10537 esac
10538 if test "X$found_dir" != "X"; then
10539 break
10540 fi
10541 done
10542 fi
10543 if test "X$found_dir" != "X"; then
10544 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10545 if test "X$found_so" != "X"; then
10546 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10547 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10548 else
10549 haveit=
10550 for x in $ltrpathdirs; do
10551 if test "X$x" = "X$found_dir"; then
10552 haveit=yes
10553 break
10554 fi
10555 done
10556 if test -z "$haveit"; then
10557 ltrpathdirs="$ltrpathdirs $found_dir"
10558 fi
10559 if test "$hardcode_direct" = yes; then
10560 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10561 else
10562 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10563 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10564 haveit=
10565 for x in $rpathdirs; do
10566 if test "X$x" = "X$found_dir"; then
10567 haveit=yes
10568 break
10569 fi
10570 done
10571 if test -z "$haveit"; then
10572 rpathdirs="$rpathdirs $found_dir"
10573 fi
10574 else
10575 haveit=
10576 for x in $LDFLAGS $LIBICONV; do
10577
10578 acl_save_prefix="$prefix"
10579 prefix="$acl_final_prefix"
10580 acl_save_exec_prefix="$exec_prefix"
10581 exec_prefix="$acl_final_exec_prefix"
10582 eval x=\"$x\"
10583 exec_prefix="$acl_save_exec_prefix"
10584 prefix="$acl_save_prefix"
10585
10586 if test "X$x" = "X-L$found_dir"; then
10587 haveit=yes
10588 break
10589 fi
10590 done
10591 if test -z "$haveit"; then
10592 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10593 fi
10594 if test "$hardcode_minus_L" != no; then
10595 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10596 else
10597 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10598 fi
10599 fi
10600 fi
10601 fi
10602 else
10603 if test "X$found_a" != "X"; then
10604 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10605 else
10606 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10607 fi
10608 fi
10609 additional_includedir=
10610 case "$found_dir" in
10611 */lib | */lib/)
10612 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10613 additional_includedir="$basedir/include"
10614 ;;
10615 esac
10616 if test "X$additional_includedir" != "X"; then
10617 if test "X$additional_includedir" != "X/usr/include"; then
10618 haveit=
10619 if test "X$additional_includedir" = "X/usr/local/include"; then
10620 if test -n "$GCC"; then
10621 case $host_os in
10622 linux*) haveit=yes;;
10623 esac
10624 fi
10625 fi
10626 if test -z "$haveit"; then
10627 for x in $CPPFLAGS $INCICONV; do
10628
10629 acl_save_prefix="$prefix"
10630 prefix="$acl_final_prefix"
10631 acl_save_exec_prefix="$exec_prefix"
10632 exec_prefix="$acl_final_exec_prefix"
10633 eval x=\"$x\"
10634 exec_prefix="$acl_save_exec_prefix"
10635 prefix="$acl_save_prefix"
10636
10637 if test "X$x" = "X-I$additional_includedir"; then
10638 haveit=yes
10639 break
10640 fi
10641 done
10642 if test -z "$haveit"; then
10643 if test -d "$additional_includedir"; then
10644 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10645 fi
10646 fi
10647 fi
10648 fi
10649 fi
10650 if test -n "$found_la"; then
10651 save_libdir="$libdir"
10652 case "$found_la" in
10653 */* | *\\*) . "$found_la" ;;
10654 *) . "./$found_la" ;;
10655 esac
10656 libdir="$save_libdir"
10657 for dep in $dependency_libs; do
10658 case "$dep" in
10659 -L*)
10660 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10661 if test "X$additional_libdir" != "X/usr/lib"; then
10662 haveit=
10663 if test "X$additional_libdir" = "X/usr/local/lib"; then
10664 if test -n "$GCC"; then
10665 case $host_os in
10666 linux*) haveit=yes;;
10667 esac
10668 fi
10669 fi
10670 if test -z "$haveit"; then
10671 haveit=
10672 for x in $LDFLAGS $LIBICONV; do
10673
10674 acl_save_prefix="$prefix"
10675 prefix="$acl_final_prefix"
10676 acl_save_exec_prefix="$exec_prefix"
10677 exec_prefix="$acl_final_exec_prefix"
10678 eval x=\"$x\"
10679 exec_prefix="$acl_save_exec_prefix"
10680 prefix="$acl_save_prefix"
10681
10682 if test "X$x" = "X-L$additional_libdir"; then
10683 haveit=yes
10684 break
10685 fi
10686 done
10687 if test -z "$haveit"; then
10688 if test -d "$additional_libdir"; then
10689 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10690 fi
10691 fi
10692 haveit=
10693 for x in $LDFLAGS $LTLIBICONV; do
10694
10695 acl_save_prefix="$prefix"
10696 prefix="$acl_final_prefix"
10697 acl_save_exec_prefix="$exec_prefix"
10698 exec_prefix="$acl_final_exec_prefix"
10699 eval x=\"$x\"
10700 exec_prefix="$acl_save_exec_prefix"
10701 prefix="$acl_save_prefix"
10702
10703 if test "X$x" = "X-L$additional_libdir"; then
10704 haveit=yes
10705 break
10706 fi
10707 done
10708 if test -z "$haveit"; then
10709 if test -d "$additional_libdir"; then
10710 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10711 fi
10712 fi
10713 fi
10714 fi
10715 ;;
10716 -R*)
10717 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10718 if test "$enable_rpath" != no; then
10719 haveit=
10720 for x in $rpathdirs; do
10721 if test "X$x" = "X$dir"; then
10722 haveit=yes
10723 break
10724 fi
10725 done
10726 if test -z "$haveit"; then
10727 rpathdirs="$rpathdirs $dir"
10728 fi
10729 haveit=
10730 for x in $ltrpathdirs; do
10731 if test "X$x" = "X$dir"; then
10732 haveit=yes
10733 break
10734 fi
10735 done
10736 if test -z "$haveit"; then
10737 ltrpathdirs="$ltrpathdirs $dir"
10738 fi
10739 fi
10740 ;;
10741 -l*)
10742 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10743 ;;
10744 *.la)
10745 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10746 ;;
10747 *)
10748 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10749 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10750 ;;
10751 esac
10752 done
10753 fi
10754 else
10755 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10756 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10757 fi
10758 fi
10759 fi
10760 done
10761 done
10762 if test "X$rpathdirs" != "X"; then
10763 if test -n "$hardcode_libdir_separator"; then
10764 alldirs=
10765 for found_dir in $rpathdirs; do
10766 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10767 done
10768 acl_save_libdir="$libdir"
10769 libdir="$alldirs"
10770 eval flag=\"$hardcode_libdir_flag_spec\"
10771 libdir="$acl_save_libdir"
10772 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10773 else
10774 for found_dir in $rpathdirs; do
10775 acl_save_libdir="$libdir"
10776 libdir="$found_dir"
10777 eval flag=\"$hardcode_libdir_flag_spec\"
10778 libdir="$acl_save_libdir"
10779 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10780 done
10781 fi
10782 fi
10783 if test "X$ltrpathdirs" != "X"; then
10784 for found_dir in $ltrpathdirs; do
10785 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10786 done
10787 fi
10788
10789
10790
10791
10792
10793
10794
10795 am_save_CPPFLAGS="$CPPFLAGS"
10796
10797 for element in $INCICONV; do
10798 haveit=
10799 for x in $CPPFLAGS; do
10800
10801 acl_save_prefix="$prefix"
10802 prefix="$acl_final_prefix"
10803 acl_save_exec_prefix="$exec_prefix"
10804 exec_prefix="$acl_final_exec_prefix"
10805 eval x=\"$x\"
10806 exec_prefix="$acl_save_exec_prefix"
10807 prefix="$acl_save_prefix"
10808
10809 if test "X$x" = "X$element"; then
10810 haveit=yes
10811 break
10812 fi
10813 done
10814 if test -z "$haveit"; then
10815 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10816 fi
10817 done
eb158727
ZW
10818
10819
ba479fd2
NN
10820 echo "$as_me:$LINENO: checking for iconv" >&5
10821echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10822if test "${am_cv_func_iconv+set}" = set; then
10823 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10824else
ba479fd2 10825
f91abfce
TT
10826 am_cv_func_iconv="no, consider installing GNU libiconv"
10827 am_cv_lib_iconv=no
ba479fd2 10828 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10829/* confdefs.h. */
10830_ACEOF
10831cat confdefs.h >>conftest.$ac_ext
10832cat >>conftest.$ac_ext <<_ACEOF
10833/* end confdefs.h. */
f91abfce
TT
10834#include <stdlib.h>
10835#include <iconv.h>
ba479fd2
NN
10836int
10837main ()
10838{
f91abfce
TT
10839iconv_t cd = iconv_open("","");
10840 iconv(cd,NULL,NULL,NULL,NULL);
10841 iconv_close(cd);
ba479fd2
NN
10842 ;
10843 return 0;
10844}
10845_ACEOF
10846rm -f conftest.$ac_objext conftest$ac_exeext
10847if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10848 (eval $ac_link) 2>conftest.er1
ba479fd2 10849 ac_status=$?
86da66b5
HPN
10850 grep -v '^ *+' conftest.er1 >conftest.err
10851 rm -f conftest.er1
10852 cat conftest.err >&5
ba479fd2
NN
10853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10854 (exit $ac_status); } &&
a1286ef5
ZW
10855 { ac_try='test -z "$ac_c_werror_flag"
10856 || test ! -s conftest.err'
86da66b5
HPN
10857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10858 (eval $ac_try) 2>&5
10859 ac_status=$?
10860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10861 (exit $ac_status); }; } &&
10862 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10864 (eval $ac_try) 2>&5
10865 ac_status=$?
10866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10867 (exit $ac_status); }; }; then
f91abfce
TT
10868 am_cv_func_iconv=yes
10869else
ba479fd2
NN
10870 echo "$as_me: failed program was:" >&5
10871sed 's/^/| /' conftest.$ac_ext >&5
10872
f91abfce 10873fi
86da66b5
HPN
10874rm -f conftest.err conftest.$ac_objext \
10875 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
10876 if test "$am_cv_func_iconv" != yes; then
10877 am_save_LIBS="$LIBS"
dfb77e37 10878 LIBS="$LIBS $LIBICONV"
ba479fd2 10879 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10880/* confdefs.h. */
10881_ACEOF
10882cat confdefs.h >>conftest.$ac_ext
10883cat >>conftest.$ac_ext <<_ACEOF
10884/* end confdefs.h. */
f91abfce
TT
10885#include <stdlib.h>
10886#include <iconv.h>
ba479fd2
NN
10887int
10888main ()
10889{
f91abfce
TT
10890iconv_t cd = iconv_open("","");
10891 iconv(cd,NULL,NULL,NULL,NULL);
10892 iconv_close(cd);
ba479fd2
NN
10893 ;
10894 return 0;
10895}
10896_ACEOF
10897rm -f conftest.$ac_objext conftest$ac_exeext
10898if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 10899 (eval $ac_link) 2>conftest.er1
ba479fd2 10900 ac_status=$?
86da66b5
HPN
10901 grep -v '^ *+' conftest.er1 >conftest.err
10902 rm -f conftest.er1
10903 cat conftest.err >&5
ba479fd2
NN
10904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10905 (exit $ac_status); } &&
a1286ef5
ZW
10906 { ac_try='test -z "$ac_c_werror_flag"
10907 || test ! -s conftest.err'
86da66b5
HPN
10908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10909 (eval $ac_try) 2>&5
10910 ac_status=$?
10911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10912 (exit $ac_status); }; } &&
10913 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
10914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10915 (eval $ac_try) 2>&5
10916 ac_status=$?
10917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10918 (exit $ac_status); }; }; then
f91abfce
TT
10919 am_cv_lib_iconv=yes
10920 am_cv_func_iconv=yes
10921else
ba479fd2
NN
10922 echo "$as_me: failed program was:" >&5
10923sed 's/^/| /' conftest.$ac_ext >&5
10924
f91abfce 10925fi
86da66b5
HPN
10926rm -f conftest.err conftest.$ac_objext \
10927 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
10928 LIBS="$am_save_LIBS"
10929 fi
6e3f3080 10930
ba479fd2
NN
10931fi
10932echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
10933echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 10934 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
10935
10936cat >>confdefs.h <<\_ACEOF
f91abfce 10937#define HAVE_ICONV 1
ba479fd2 10938_ACEOF
f91abfce 10939
dfb77e37
KC
10940 fi
10941 if test "$am_cv_lib_iconv" = yes; then
10942 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
10943echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
10944 echo "$as_me:$LINENO: result: $LIBICONV" >&5
10945echo "${ECHO_T}$LIBICONV" >&6
10946 else
10947 CPPFLAGS="$am_save_CPPFLAGS"
10948 LIBICONV=
10949 LTLIBICONV=
10950 fi
10951
10952
10953
10954 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
10955 echo "$as_me:$LINENO: checking for iconv declaration" >&5
10956echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
10957 if test "${am_cv_proto_iconv+set}" = set; then
10958 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 10959else
ba479fd2
NN
10960
10961 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10962/* confdefs.h. */
10963_ACEOF
10964cat confdefs.h >>conftest.$ac_ext
10965cat >>conftest.$ac_ext <<_ACEOF
10966/* end confdefs.h. */
f91abfce
TT
10967
10968#include <stdlib.h>
10969#include <iconv.h>
10970extern
10971#ifdef __cplusplus
10972"C"
10973#endif
10974#if defined(__STDC__) || defined(__cplusplus)
10975size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10976#else
10977size_t iconv();
10978#endif
10979
ba479fd2
NN
10980int
10981main ()
10982{
f91abfce 10983
ba479fd2
NN
10984 ;
10985 return 0;
10986}
10987_ACEOF
10988rm -f conftest.$ac_objext
10989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 10990 (eval $ac_compile) 2>conftest.er1
ba479fd2 10991 ac_status=$?
86da66b5
HPN
10992 grep -v '^ *+' conftest.er1 >conftest.err
10993 rm -f conftest.er1
10994 cat conftest.err >&5
ba479fd2
NN
10995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10996 (exit $ac_status); } &&
a1286ef5
ZW
10997 { ac_try='test -z "$ac_c_werror_flag"
10998 || test ! -s conftest.err'
86da66b5
HPN
10999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11000 (eval $ac_try) 2>&5
11001 ac_status=$?
11002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11003 (exit $ac_status); }; } &&
11004 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11006 (eval $ac_try) 2>&5
11007 ac_status=$?
11008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11009 (exit $ac_status); }; }; then
f91abfce
TT
11010 am_cv_proto_iconv_arg1=""
11011else
ba479fd2
NN
11012 echo "$as_me: failed program was:" >&5
11013sed 's/^/| /' conftest.$ac_ext >&5
11014
11015am_cv_proto_iconv_arg1="const"
f91abfce 11016fi
86da66b5 11017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
11018 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);"
11019fi
11020
11021 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
11022 echo "$as_me:$LINENO: result: ${ac_t:-
11023 }$am_cv_proto_iconv" >&5
11024echo "${ECHO_T}${ac_t:-
11025 }$am_cv_proto_iconv" >&6
11026
11027cat >>confdefs.h <<_ACEOF
f91abfce 11028#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 11029_ACEOF
f91abfce
TT
11030
11031 fi
f91abfce 11032
56694dd9
ZW
11033# Until we have in-tree GNU iconv:
11034LIBICONV_DEP=
11035
11036
11037
ba479fd2
NN
11038 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11039echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
11040if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11041 echo $ECHO_N "(cached) $ECHO_C" >&6
56694dd9 11042else
ba479fd2 11043 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11044/* confdefs.h. */
11045_ACEOF
11046cat confdefs.h >>conftest.$ac_ext
11047cat >>conftest.$ac_ext <<_ACEOF
11048/* end confdefs.h. */
56694dd9 11049#include <locale.h>
ba479fd2
NN
11050int
11051main ()
11052{
56694dd9 11053return LC_MESSAGES
ba479fd2
NN
11054 ;
11055 return 0;
11056}
11057_ACEOF
11058rm -f conftest.$ac_objext conftest$ac_exeext
11059if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 11060 (eval $ac_link) 2>conftest.er1
ba479fd2 11061 ac_status=$?
86da66b5
HPN
11062 grep -v '^ *+' conftest.er1 >conftest.err
11063 rm -f conftest.er1
11064 cat conftest.err >&5
ba479fd2
NN
11065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11066 (exit $ac_status); } &&
a1286ef5
ZW
11067 { ac_try='test -z "$ac_c_werror_flag"
11068 || test ! -s conftest.err'
86da66b5
HPN
11069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11070 (eval $ac_try) 2>&5
11071 ac_status=$?
11072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11073 (exit $ac_status); }; } &&
11074 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
11075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11076 (eval $ac_try) 2>&5
11077 ac_status=$?
11078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11079 (exit $ac_status); }; }; then
56694dd9
ZW
11080 am_cv_val_LC_MESSAGES=yes
11081else
ba479fd2
NN
11082 echo "$as_me: failed program was:" >&5
11083sed 's/^/| /' conftest.$ac_ext >&5
11084
11085am_cv_val_LC_MESSAGES=no
56694dd9 11086fi
86da66b5
HPN
11087rm -f conftest.err conftest.$ac_objext \
11088 conftest$ac_exeext conftest.$ac_ext
56694dd9 11089fi
ba479fd2
NN
11090echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11091echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
63cf211a 11092 if test $am_cv_val_LC_MESSAGES = yes; then
ba479fd2
NN
11093
11094cat >>confdefs.h <<\_ACEOF
56694dd9 11095#define HAVE_LC_MESSAGES 1
ba479fd2 11096_ACEOF
56694dd9
ZW
11097
11098 fi
11099
f91abfce 11100
a03ea89b
BM
11101
11102 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11103echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11104if test "${am_cv_langinfo_codeset+set}" = set; then
11105 echo $ECHO_N "(cached) $ECHO_C" >&6
11106else
11107 cat >conftest.$ac_ext <<_ACEOF
11108/* confdefs.h. */
11109_ACEOF
11110cat confdefs.h >>conftest.$ac_ext
11111cat >>conftest.$ac_ext <<_ACEOF
11112/* end confdefs.h. */
11113#include <langinfo.h>
11114int
11115main ()
11116{
11117char* cs = nl_langinfo(CODESET);
11118 ;
11119 return 0;
11120}
11121_ACEOF
11122rm -f conftest.$ac_objext conftest$ac_exeext
11123if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11124 (eval $ac_link) 2>conftest.er1
11125 ac_status=$?
11126 grep -v '^ *+' conftest.er1 >conftest.err
11127 rm -f conftest.er1
11128 cat conftest.err >&5
11129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11130 (exit $ac_status); } &&
a1286ef5
ZW
11131 { ac_try='test -z "$ac_c_werror_flag"
11132 || test ! -s conftest.err'
a03ea89b
BM
11133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11134 (eval $ac_try) 2>&5
11135 ac_status=$?
11136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11137 (exit $ac_status); }; } &&
11138 { ac_try='test -s conftest$ac_exeext'
11139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11140 (eval $ac_try) 2>&5
11141 ac_status=$?
11142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11143 (exit $ac_status); }; }; then
11144 am_cv_langinfo_codeset=yes
11145else
11146 echo "$as_me: failed program was:" >&5
11147sed 's/^/| /' conftest.$ac_ext >&5
11148
11149am_cv_langinfo_codeset=no
11150fi
11151rm -f conftest.err conftest.$ac_objext \
11152 conftest$ac_exeext conftest.$ac_ext
11153
11154fi
11155echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11156echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11157 if test $am_cv_langinfo_codeset = yes; then
11158
11159cat >>confdefs.h <<\_ACEOF
11160#define HAVE_LANGINFO_CODESET 1
11161_ACEOF
11162
11163 fi
11164
11165
86cf1cbd
KG
11166# We will need to find libiberty.h and ansidecl.h
11167saved_CFLAGS="$CFLAGS"
11168CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
6a257778 11190
ad6717df
PB
11191
11192
0d667716
KG
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
367e8319 11203
0d667716
KG
11204
11205
11206for ac_func in getenv atol sbrk abort atof getcwd getwd strsignal \
367e8319
EB
11207 strstr errno snprintf vsnprintf vasprintf malloc realloc calloc \
11208 free basename getopt clock getpagesize clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
81bf3d9e 11209do
ad6717df 11210 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11211echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11212echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11213if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11214 echo $ECHO_N "(cached) $ECHO_C" >&6
11215else
11216 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11217/* confdefs.h. */
11218_ACEOF
11219cat confdefs.h >>conftest.$ac_ext
11220cat >>conftest.$ac_ext <<_ACEOF
11221/* end confdefs.h. */
7afe8c41
KG
11222#undef $ac_tr_decl
11223#define $ac_tr_decl 1
ba479fd2 11224
d02af173 11225#include "ansidecl.h"
86cf1cbd 11226#include "system.h"
f31e826b 11227
ba479fd2
NN
11228int
11229main ()
11230{
86cf1cbd
KG
11231#ifndef $ac_func
11232char *(*pfn) = (char *(*)) $ac_func ;
11233#endif
ba479fd2
NN
11234 ;
11235 return 0;
11236}
11237_ACEOF
11238rm -f conftest.$ac_objext
11239if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11240 (eval $ac_compile) 2>conftest.er1
ba479fd2 11241 ac_status=$?
86da66b5
HPN
11242 grep -v '^ *+' conftest.er1 >conftest.err
11243 rm -f conftest.er1
11244 cat conftest.err >&5
ba479fd2
NN
11245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11246 (exit $ac_status); } &&
a1286ef5
ZW
11247 { ac_try='test -z "$ac_c_werror_flag"
11248 || test ! -s conftest.err'
86da66b5
HPN
11249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11250 (eval $ac_try) 2>&5
11251 ac_status=$?
11252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11253 (exit $ac_status); }; } &&
11254 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11256 (eval $ac_try) 2>&5
11257 ac_status=$?
11258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11259 (exit $ac_status); }; }; then
f31e826b 11260 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11261else
ba479fd2
NN
11262 echo "$as_me: failed program was:" >&5
11263sed 's/^/| /' conftest.$ac_ext >&5
11264
11265eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11266fi
86da66b5 11267rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11268fi
11269
f31e826b 11270if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11271 echo "$as_me:$LINENO: result: yes" >&5
11272echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11273#define $ac_tr_decl 1
ba479fd2
NN
11274_ACEOF
11275
81bf3d9e 11276else
ba479fd2
NN
11277 echo "$as_me:$LINENO: result: no" >&5
11278echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11279#define $ac_tr_decl 0
ba479fd2
NN
11280_ACEOF
11281
81bf3d9e
RH
11282fi
11283
11284done
ba479fd2 11285
ba479fd2 11286
ba479fd2 11287
81bf3d9e 11288
81bf3d9e
RH
11289
11290for ac_func in getrlimit setrlimit getrusage
11291do
ad6717df 11292 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11293echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11294echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11295if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11296 echo $ECHO_N "(cached) $ECHO_C" >&6
11297else
11298 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11299/* confdefs.h. */
11300_ACEOF
11301cat confdefs.h >>conftest.$ac_ext
11302cat >>conftest.$ac_ext <<_ACEOF
11303/* end confdefs.h. */
7afe8c41
KG
11304#undef $ac_tr_decl
11305#define $ac_tr_decl 1
ba479fd2 11306
d02af173 11307#include "ansidecl.h"
86cf1cbd 11308#include "system.h"
81bf3d9e
RH
11309#ifdef HAVE_SYS_RESOURCE_H
11310#include <sys/resource.h>
11311#endif
11312
f31e826b 11313
ba479fd2
NN
11314int
11315main ()
11316{
86cf1cbd
KG
11317#ifndef $ac_func
11318char *(*pfn) = (char *(*)) $ac_func ;
11319#endif
ba479fd2
NN
11320 ;
11321 return 0;
11322}
11323_ACEOF
11324rm -f conftest.$ac_objext
11325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11326 (eval $ac_compile) 2>conftest.er1
ba479fd2 11327 ac_status=$?
86da66b5
HPN
11328 grep -v '^ *+' conftest.er1 >conftest.err
11329 rm -f conftest.er1
11330 cat conftest.err >&5
ba479fd2
NN
11331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11332 (exit $ac_status); } &&
a1286ef5
ZW
11333 { ac_try='test -z "$ac_c_werror_flag"
11334 || test ! -s conftest.err'
86da66b5
HPN
11335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11336 (eval $ac_try) 2>&5
11337 ac_status=$?
11338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11339 (exit $ac_status); }; } &&
11340 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11342 (eval $ac_try) 2>&5
11343 ac_status=$?
11344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11345 (exit $ac_status); }; }; then
f31e826b 11346 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 11347else
ba479fd2
NN
11348 echo "$as_me: failed program was:" >&5
11349sed 's/^/| /' conftest.$ac_ext >&5
11350
11351eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 11352fi
86da66b5 11353rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
11354fi
11355
f31e826b 11356if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11357 echo "$as_me:$LINENO: result: yes" >&5
11358echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 11359#define $ac_tr_decl 1
ba479fd2
NN
11360_ACEOF
11361
81bf3d9e 11362else
ba479fd2
NN
11363 echo "$as_me:$LINENO: result: no" >&5
11364echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 11365#define $ac_tr_decl 0
ba479fd2
NN
11366_ACEOF
11367
81bf3d9e
RH
11368fi
11369
11370done
86cf1cbd 11371
81bf3d9e 11372
ba479fd2 11373cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11374/* confdefs.h. */
11375_ACEOF
11376cat confdefs.h >>conftest.$ac_ext
11377cat >>conftest.$ac_ext <<_ACEOF
11378/* end confdefs.h. */
b2522d2b
HPN
11379
11380#include "ansidecl.h"
11381#include "system.h"
11382#ifdef HAVE_SYS_RESOURCE_H
11383#include <sys/resource.h>
11384#endif
11385
ba479fd2
NN
11386int
11387main ()
11388{
b2522d2b 11389rlim_t l = 0;
ba479fd2
NN
11390 ;
11391 return 0;
11392}
11393_ACEOF
11394rm -f conftest.$ac_objext
11395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11396 (eval $ac_compile) 2>conftest.er1
ba479fd2 11397 ac_status=$?
86da66b5
HPN
11398 grep -v '^ *+' conftest.er1 >conftest.err
11399 rm -f conftest.er1
11400 cat conftest.err >&5
ba479fd2
NN
11401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11402 (exit $ac_status); } &&
a1286ef5
ZW
11403 { ac_try='test -z "$ac_c_werror_flag"
11404 || test ! -s conftest.err'
86da66b5
HPN
11405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11406 (eval $ac_try) 2>&5
11407 ac_status=$?
11408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11409 (exit $ac_status); }; } &&
11410 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11412 (eval $ac_try) 2>&5
11413 ac_status=$?
11414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11415 (exit $ac_status); }; }; then
b2522d2b
HPN
11416 :
11417else
ba479fd2
NN
11418 echo "$as_me: failed program was:" >&5
11419sed 's/^/| /' conftest.$ac_ext >&5
11420
11421
11422cat >>confdefs.h <<\_ACEOF
b2522d2b 11423#define rlim_t long
ba479fd2 11424_ACEOF
b2522d2b
HPN
11425
11426fi
86da66b5 11427rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 11428
2102b2fe
RS
11429# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11430# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
11431# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11432# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 11433
351df804 11434for ac_func in ldgetname
c1800ec8 11435do
ad6717df 11436 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11437echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11438echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11439if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11440 echo $ECHO_N "(cached) $ECHO_C" >&6
11441else
11442 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11443/* confdefs.h. */
11444_ACEOF
11445cat confdefs.h >>conftest.$ac_ext
11446cat >>conftest.$ac_ext <<_ACEOF
11447/* end confdefs.h. */
c1800ec8
ZW
11448#undef $ac_tr_decl
11449#define $ac_tr_decl 1
ba479fd2 11450
351df804
KG
11451#include "ansidecl.h"
11452#include "system.h"
11453#ifdef HAVE_LDFCN_H
2102b2fe
RS
11454#undef FREAD
11455#undef FWRITE
351df804
KG
11456#include <ldfcn.h>
11457#endif
11458
11459
ba479fd2
NN
11460int
11461main ()
11462{
351df804
KG
11463#ifndef $ac_func
11464char *(*pfn) = (char *(*)) $ac_func ;
11465#endif
ba479fd2
NN
11466 ;
11467 return 0;
11468}
11469_ACEOF
11470rm -f conftest.$ac_objext
11471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11472 (eval $ac_compile) 2>conftest.er1
ba479fd2 11473 ac_status=$?
86da66b5
HPN
11474 grep -v '^ *+' conftest.er1 >conftest.err
11475 rm -f conftest.er1
11476 cat conftest.err >&5
ba479fd2
NN
11477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11478 (exit $ac_status); } &&
a1286ef5
ZW
11479 { ac_try='test -z "$ac_c_werror_flag"
11480 || test ! -s conftest.err'
86da66b5
HPN
11481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11482 (eval $ac_try) 2>&5
11483 ac_status=$?
11484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11485 (exit $ac_status); }; } &&
11486 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11488 (eval $ac_try) 2>&5
11489 ac_status=$?
11490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11491 (exit $ac_status); }; }; then
351df804
KG
11492 eval "gcc_cv_have_decl_$ac_func=yes"
11493else
ba479fd2
NN
11494 echo "$as_me: failed program was:" >&5
11495sed 's/^/| /' conftest.$ac_ext >&5
11496
11497eval "gcc_cv_have_decl_$ac_func=no"
351df804 11498fi
86da66b5 11499rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
11500fi
11501
11502if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11503 echo "$as_me:$LINENO: result: yes" >&5
11504echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11505#define $ac_tr_decl 1
ba479fd2
NN
11506_ACEOF
11507
351df804 11508else
ba479fd2
NN
11509 echo "$as_me:$LINENO: result: no" >&5
11510echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 11511#define $ac_tr_decl 0
ba479fd2
NN
11512_ACEOF
11513
351df804
KG
11514fi
11515
11516done
ba479fd2 11517
351df804
KG
11518
11519
11520for ac_func in times
11521do
ad6717df 11522 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
11523echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11524echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11525if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11526 echo $ECHO_N "(cached) $ECHO_C" >&6
11527else
11528 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11529/* confdefs.h. */
11530_ACEOF
11531cat confdefs.h >>conftest.$ac_ext
11532cat >>conftest.$ac_ext <<_ACEOF
11533/* end confdefs.h. */
351df804
KG
11534#undef $ac_tr_decl
11535#define $ac_tr_decl 1
ba479fd2 11536
c1800ec8
ZW
11537#include "ansidecl.h"
11538#include "system.h"
11539#ifdef HAVE_SYS_TIMES_H
11540#include <sys/times.h>
11541#endif
11542
11543
ba479fd2
NN
11544int
11545main ()
11546{
c1800ec8
ZW
11547#ifndef $ac_func
11548char *(*pfn) = (char *(*)) $ac_func ;
11549#endif
ba479fd2
NN
11550 ;
11551 return 0;
11552}
11553_ACEOF
11554rm -f conftest.$ac_objext
11555if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11556 (eval $ac_compile) 2>conftest.er1
ba479fd2 11557 ac_status=$?
86da66b5
HPN
11558 grep -v '^ *+' conftest.er1 >conftest.err
11559 rm -f conftest.er1
11560 cat conftest.err >&5
ba479fd2
NN
11561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11562 (exit $ac_status); } &&
a1286ef5
ZW
11563 { ac_try='test -z "$ac_c_werror_flag"
11564 || test ! -s conftest.err'
86da66b5
HPN
11565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11566 (eval $ac_try) 2>&5
11567 ac_status=$?
11568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11569 (exit $ac_status); }; } &&
11570 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11572 (eval $ac_try) 2>&5
11573 ac_status=$?
11574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11575 (exit $ac_status); }; }; then
c1800ec8
ZW
11576 eval "gcc_cv_have_decl_$ac_func=yes"
11577else
ba479fd2
NN
11578 echo "$as_me: failed program was:" >&5
11579sed 's/^/| /' conftest.$ac_ext >&5
11580
11581eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 11582fi
86da66b5 11583rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
11584fi
11585
11586if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
11587 echo "$as_me:$LINENO: result: yes" >&5
11588echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11589#define $ac_tr_decl 1
ba479fd2
NN
11590_ACEOF
11591
c1800ec8 11592else
ba479fd2
NN
11593 echo "$as_me:$LINENO: result: no" >&5
11594echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 11595#define $ac_tr_decl 0
ba479fd2
NN
11596_ACEOF
11597
c1800ec8
ZW
11598fi
11599
11600done
c1800ec8
ZW
11601
11602
11603# More time-related stuff.
ba479fd2
NN
11604echo "$as_me:$LINENO: checking for struct tms" >&5
11605echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
11606if test "${ac_cv_struct_tms+set}" = set; then
11607 echo $ECHO_N "(cached) $ECHO_C" >&6
11608else
11609
11610cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11611/* confdefs.h. */
11612_ACEOF
11613cat confdefs.h >>conftest.$ac_ext
11614cat >>conftest.$ac_ext <<_ACEOF
11615/* end confdefs.h. */
c1800ec8
ZW
11616
11617#include "ansidecl.h"
11618#include "system.h"
11619#ifdef HAVE_SYS_TIMES_H
11620#include <sys/times.h>
11621#endif
11622
ba479fd2
NN
11623int
11624main ()
11625{
c1800ec8 11626struct tms tms;
ba479fd2
NN
11627 ;
11628 return 0;
11629}
11630_ACEOF
11631rm -f conftest.$ac_objext
11632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11633 (eval $ac_compile) 2>conftest.er1
ba479fd2 11634 ac_status=$?
86da66b5
HPN
11635 grep -v '^ *+' conftest.er1 >conftest.err
11636 rm -f conftest.er1
11637 cat conftest.err >&5
ba479fd2
NN
11638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11639 (exit $ac_status); } &&
a1286ef5
ZW
11640 { ac_try='test -z "$ac_c_werror_flag"
11641 || test ! -s conftest.err'
86da66b5
HPN
11642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11643 (eval $ac_try) 2>&5
11644 ac_status=$?
11645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11646 (exit $ac_status); }; } &&
11647 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11649 (eval $ac_try) 2>&5
11650 ac_status=$?
11651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11652 (exit $ac_status); }; }; then
c1800ec8
ZW
11653 ac_cv_struct_tms=yes
11654else
ba479fd2
NN
11655 echo "$as_me: failed program was:" >&5
11656sed 's/^/| /' conftest.$ac_ext >&5
11657
11658ac_cv_struct_tms=no
c1800ec8 11659fi
86da66b5 11660rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11661fi
ba479fd2
NN
11662echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11663echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 11664if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
11665
11666cat >>confdefs.h <<\_ACEOF
c1800ec8 11667#define HAVE_STRUCT_TMS 1
ba479fd2 11668_ACEOF
c1800ec8
ZW
11669
11670fi
11671
11672# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11673# revisit after autoconf 2.50.
ba479fd2
NN
11674echo "$as_me:$LINENO: checking for clock_t" >&5
11675echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
11676if test "${gcc_cv_type_clock_t+set}" = set; then
11677 echo $ECHO_N "(cached) $ECHO_C" >&6
11678else
11679
11680cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11681/* confdefs.h. */
11682_ACEOF
11683cat confdefs.h >>conftest.$ac_ext
11684cat >>conftest.$ac_ext <<_ACEOF
11685/* end confdefs.h. */
c1800ec8
ZW
11686
11687#include "ansidecl.h"
11688#include "system.h"
11689
ba479fd2
NN
11690int
11691main ()
11692{
c1800ec8 11693clock_t x;
ba479fd2
NN
11694 ;
11695 return 0;
11696}
11697_ACEOF
11698rm -f conftest.$ac_objext
11699if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11700 (eval $ac_compile) 2>conftest.er1
ba479fd2 11701 ac_status=$?
86da66b5
HPN
11702 grep -v '^ *+' conftest.er1 >conftest.err
11703 rm -f conftest.er1
11704 cat conftest.err >&5
ba479fd2
NN
11705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11706 (exit $ac_status); } &&
a1286ef5
ZW
11707 { ac_try='test -z "$ac_c_werror_flag"
11708 || test ! -s conftest.err'
86da66b5
HPN
11709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11710 (eval $ac_try) 2>&5
11711 ac_status=$?
11712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11713 (exit $ac_status); }; } &&
11714 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11716 (eval $ac_try) 2>&5
11717 ac_status=$?
11718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11719 (exit $ac_status); }; }; then
c1800ec8
ZW
11720 gcc_cv_type_clock_t=yes
11721else
ba479fd2
NN
11722 echo "$as_me: failed program was:" >&5
11723sed 's/^/| /' conftest.$ac_ext >&5
11724
11725gcc_cv_type_clock_t=no
c1800ec8 11726fi
86da66b5 11727rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 11728fi
ba479fd2
NN
11729echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
11730echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 11731if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
11732
11733cat >>confdefs.h <<\_ACEOF
c1800ec8 11734#define HAVE_CLOCK_T 1
ba479fd2 11735_ACEOF
c1800ec8
ZW
11736
11737fi
11738
eb70d86d
AS
11739# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
11740CFLAGS="$saved_CFLAGS"
11741
07cf4226
DM
11742# Check whether --enable-initfini-array or --disable-initfini-array was given.
11743if test "${enable_initfini_array+set}" = set; then
11744 enableval="$enable_initfini_array"
ba479fd2 11745
07cf4226 11746else
ba479fd2
NN
11747
11748echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
11749echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
11750if test "${gcc_cv_initfini_array+set}" = set; then
11751 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 11752else
eb70d86d 11753 if test "$cross_compiling" = yes; then
918c4fe4 11754 gcc_cv_initfini_array=no
eb70d86d 11755else
ba479fd2 11756 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11757/* confdefs.h. */
11758_ACEOF
11759cat confdefs.h >>conftest.$ac_ext
11760cat >>conftest.$ac_ext <<_ACEOF
11761/* end confdefs.h. */
eb70d86d 11762
07cf4226
DM
11763static int x = -1;
11764int main (void) { return x; }
11765int foo (void) { x = 0; }
11766int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
11767_ACEOF
11768rm -f conftest$ac_exeext
11769if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11770 (eval $ac_link) 2>&5
11771 ac_status=$?
11772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11773 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11775 (eval $ac_try) 2>&5
11776 ac_status=$?
11777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11778 (exit $ac_status); }; }; then
918c4fe4 11779 gcc_cv_initfini_array=yes
eb70d86d 11780else
ba479fd2
NN
11781 echo "$as_me: program exited with status $ac_status" >&5
11782echo "$as_me: failed program was:" >&5
11783sed 's/^/| /' conftest.$ac_ext >&5
11784
11785( exit $ac_status )
11786gcc_cv_initfini_array=no
eb70d86d 11787fi
86da66b5 11788rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 11789fi
07cf4226 11790fi
ba479fd2
NN
11791echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
11792echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 11793 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 11794
ba479fd2 11795fi;
63cf211a 11796if test $enable_initfini_array = yes; then
ba479fd2
NN
11797
11798cat >>confdefs.h <<\_ACEOF
eb70d86d 11799#define HAVE_INITFINI_ARRAY 1
ba479fd2 11800_ACEOF
07cf4226 11801
eb70d86d 11802fi
81bf3d9e 11803
ba479fd2
NN
11804# mkdir takes a single argument on some systems.
11805echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
11806echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
11807if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
11808 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 11809else
ba479fd2 11810 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11811/* confdefs.h. */
11812_ACEOF
11813cat confdefs.h >>conftest.$ac_ext
11814cat >>conftest.$ac_ext <<_ACEOF
11815/* end confdefs.h. */
75923b2f
MK
11816
11817#include <sys/types.h>
11818#ifdef HAVE_SYS_STAT_H
11819# include <sys/stat.h>
11820#endif
11821#ifdef HAVE_UNISTD_H
11822# include <unistd.h>
11823#endif
11824#ifdef HAVE_DIRECT_H
11825# include <direct.h>
11826#endif
ba479fd2
NN
11827int
11828main ()
11829{
75923b2f 11830mkdir ("foo", 0);
ba479fd2
NN
11831 ;
11832 return 0;
11833}
11834_ACEOF
11835rm -f conftest.$ac_objext
11836if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 11837 (eval $ac_compile) 2>conftest.er1
ba479fd2 11838 ac_status=$?
86da66b5
HPN
11839 grep -v '^ *+' conftest.er1 >conftest.err
11840 rm -f conftest.er1
11841 cat conftest.err >&5
ba479fd2
NN
11842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11843 (exit $ac_status); } &&
a1286ef5
ZW
11844 { ac_try='test -z "$ac_c_werror_flag"
11845 || test ! -s conftest.err'
86da66b5
HPN
11846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11847 (eval $ac_try) 2>&5
11848 ac_status=$?
11849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11850 (exit $ac_status); }; } &&
11851 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
11852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11853 (eval $ac_try) 2>&5
11854 ac_status=$?
11855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11856 (exit $ac_status); }; }; then
75923b2f
MK
11857 gcc_cv_mkdir_takes_one_arg=no
11858else
ba479fd2
NN
11859 echo "$as_me: failed program was:" >&5
11860sed 's/^/| /' conftest.$ac_ext >&5
11861
11862gcc_cv_mkdir_takes_one_arg=yes
75923b2f 11863fi
86da66b5 11864rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 11865fi
ba479fd2
NN
11866echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
11867echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 11868if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
11869
11870cat >>confdefs.h <<\_ACEOF
75923b2f 11871#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 11872_ACEOF
75923b2f
MK
11873
11874fi
11875
11876
861bb6c1
JL
11877# File extensions
11878manext='.1'
11879objext='.o'
11880
11881
11882
4977bab6
ZW
11883# With Setjmp/Longjmp based exception handling.
11884# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
11885if test "${enable_sjlj_exceptions+set}" = set; then
11886 enableval="$enable_sjlj_exceptions"
11887 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 11888
ba479fd2
NN
11889cat >>confdefs.h <<_ACEOF
11890#define CONFIG_SJLJ_EXCEPTIONS $sjlj
11891_ACEOF
4977bab6 11892
ba479fd2 11893fi;
4977bab6 11894
443728bb
L
11895# For platforms with the unwind ABI which includes an unwind library,
11896# libunwind, we can choose to use the system libunwind.
4977bab6 11897
443728bb
L
11898# Check whether --with-system-libunwind or --without-system-libunwind was given.
11899if test "${with_system_libunwind+set}" = set; then
11900 withval="$with_system_libunwind"
4977bab6 11901
ba479fd2 11902fi;
4977bab6 11903
34a86c2b
NN
11904# --------------------------------------------------------
11905# Build, host, and target specific configuration fragments
11906# --------------------------------------------------------
11907
5b28c537
NN
11908# Collect build-machine-specific information.
11909. ${srcdir}/config.build
11910
a89ea0df
NN
11911# Collect host-machine-specific information.
11912. ${srcdir}/config.host
11913
ef69da62 11914target_gtfiles=
a89ea0df
NN
11915
11916# Collect target-machine-specific information.
8ad9fb33 11917. ${srcdir}/config.gcc
861bb6c1
JL
11918
11919extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 11920extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
11921
11922# Default the target-machine variables that were not explicitly set.
75bffa71 11923if test x"$tm_file" = x
861bb6c1
JL
11924then tm_file=$cpu_type/$cpu_type.h; fi
11925
6b2adea9 11926if test x"$extra_headers" = x
861bb6c1
JL
11927then extra_headers=; fi
11928
75bffa71 11929if test x$md_file = x
e98e406f 11930then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 11931
75bffa71 11932if test x$out_file = x
861bb6c1
JL
11933then out_file=$cpu_type/$cpu_type.c; fi
11934
75bffa71 11935if test x"$tmake_file" = x
861bb6c1
JL
11936then tmake_file=$cpu_type/t-$cpu_type
11937fi
11938
90e6a802 11939if test x"$dwarf2" = xyes
756ee602 11940then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
11941fi
11942
861bb6c1 11943# Say what files are being used for the output code and MD file.
11642c3a 11944echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
11945echo "Using \`$srcdir/config/$md_file' as machine description file."
11946
11642c3a 11947# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
11948# about them and drop them.
11949
11642c3a
ZW
11950bx=
11951for x in $build_xm_file; do
11952 if test -f $srcdir/config/$x
11953 then bx="$bx $x"
ba479fd2
NN
11954 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11955echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11956 fi
11957done
11958build_xm_file="$bx"
11959
11960hx=
11961for x in $host_xm_file; do
11962 if test -f $srcdir/config/$x
11963 then hx="$hx $x"
ba479fd2
NN
11964 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11965echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11966 fi
11967done
11968host_xm_file="$hx"
11969
11970tx=
11971for x in $xm_file; do
11972 if test -f $srcdir/config/$x
11973 then tx="$tx $x"
ba479fd2
NN
11974 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
11975echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
11976 fi
11977done
11978xm_file="$tx"
11979
861bb6c1
JL
11980count=a
11981for f in $tm_file; do
11982 count=${count}x
11983done
75bffa71 11984if test $count = ax; then
861bb6c1
JL
11985 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
11986else
11987 echo "Using the following target machine macro files:"
11988 for f in $tm_file; do
11989 echo " $srcdir/config/$f"
11990 done
11991fi
11992
4977bab6 11993if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
11994
11995cat >>confdefs.h <<\_ACEOF
4977bab6 11996#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 11997_ACEOF
4977bab6
ZW
11998
11999fi
12000
99fa8911
AP
12001if test x$use_long_long_for_widest_fast_int = xyes; then
12002
12003cat >>confdefs.h <<\_ACEOF
12004#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12005_ACEOF
12006
12007fi
12008
861bb6c1
JL
12009count=a
12010for f in $host_xm_file; do
12011 count=${count}x
12012done
11642c3a
ZW
12013if test $count = a; then
12014 :
12015elif test $count = ax; then
861bb6c1
JL
12016 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12017else
12018 echo "Using the following host machine macro files:"
12019 for f in $host_xm_file; do
12020 echo " $srcdir/config/$f"
12021 done
12022fi
476d9098 12023echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 12024
75bffa71 12025if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
12026 count=a
12027 for f in $build_xm_file; do
12028 count=${count}x
12029 done
11642c3a
ZW
12030 if test $count = a; then
12031 :
12032 elif test $count = ax; then
861bb6c1
JL
12033 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12034 else
12035 echo "Using the following build machine macro files:"
12036 for f in $build_xm_file; do
12037 echo " $srcdir/config/$f"
12038 done
12039 fi
12040fi
12041
8bb915b6
NN
12042# ---------
12043# Threading
12044# ---------
12045
c2e494a8 12046# Check if a valid thread package
615be2cf 12047case ${enable_threads} in
c2e494a8
NN
12048 "" | no)
12049 # No threads
12050 target_thread_file='single'
12051 ;;
12052 yes)
12053 # default
12054 target_thread_file='single'
12055 ;;
18167442 12056 aix | dce | gnat | irix | posix | posix95 | rtems | \
769e49eb 12057 single | solaris | vxworks | win32 )
615be2cf 12058 target_thread_file=${enable_threads}
c2e494a8
NN
12059 ;;
12060 *)
615be2cf 12061 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
12062 exit 1
12063 ;;
12064esac
12065
12066if test x${thread_file} = x; then
12067 # No thread file set by target-specific clauses in config.gcc,
12068 # so use file chosen by default logic above
12069 thread_file=${target_thread_file}
861bb6c1
JL
12070fi
12071
8bb915b6
NN
12072# Make gthr-default.h if we have a thread file.
12073gthread_flags=
12074if test $thread_file != single; then
12075 rm -f gthr-default.h
12076 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12077 gthread_flags=-DHAVE_GTHR_DEFAULT
12078fi
12079
12080
12081# --------
12082# UNSORTED
12083# --------
12084
18fbf599 12085use_cxa_atexit=no
2121a768
JT
12086if test x$enable___cxa_atexit = xyes || \
12087 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599
PB
12088 if test x$host = x$target; then
12089 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
354b7da5
DH
12090echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
12091if test "${ac_cv_func___cxa_atexit+set}" = set; then
12092 echo $ECHO_N "(cached) $ECHO_C" >&6
12093else
12094 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
12095/* confdefs.h. */
12096_ACEOF
12097cat confdefs.h >>conftest.$ac_ext
12098cat >>conftest.$ac_ext <<_ACEOF
12099/* end confdefs.h. */
86da66b5
HPN
12100/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12101 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12102#define __cxa_atexit innocuous___cxa_atexit
12103
354b7da5
DH
12104/* System header to define __stub macros and hopefully few prototypes,
12105 which can conflict with char __cxa_atexit (); below.
12106 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12107 <limits.h> exists even on freestanding compilers. */
86da66b5 12108
354b7da5
DH
12109#ifdef __STDC__
12110# include <limits.h>
12111#else
12112# include <assert.h>
12113#endif
86da66b5
HPN
12114
12115#undef __cxa_atexit
12116
354b7da5
DH
12117/* Override any gcc2 internal prototype to avoid an error. */
12118#ifdef __cplusplus
12119extern "C"
12120{
12121#endif
12122/* We use char because int might match the return type of a gcc2
12123 builtin and then its argument prototype would still apply. */
12124char __cxa_atexit ();
12125/* The GNU C library defines this for functions which it implements
12126 to always fail with ENOSYS. Some functions are actually named
12127 something starting with __ and the normal name is an alias. */
12128#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
12129choke me
12130#else
12131char (*f) () = __cxa_atexit;
12132#endif
12133#ifdef __cplusplus
12134}
12135#endif
12136
12137int
12138main ()
12139{
12140return f != __cxa_atexit;
12141 ;
12142 return 0;
12143}
12144_ACEOF
12145rm -f conftest.$ac_objext conftest$ac_exeext
12146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12147 (eval $ac_link) 2>conftest.er1
354b7da5 12148 ac_status=$?
86da66b5
HPN
12149 grep -v '^ *+' conftest.er1 >conftest.err
12150 rm -f conftest.er1
12151 cat conftest.err >&5
354b7da5
DH
12152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12153 (exit $ac_status); } &&
a1286ef5
ZW
12154 { ac_try='test -z "$ac_c_werror_flag"
12155 || test ! -s conftest.err'
86da66b5
HPN
12156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12157 (eval $ac_try) 2>&5
12158 ac_status=$?
12159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12160 (exit $ac_status); }; } &&
12161 { ac_try='test -s conftest$ac_exeext'
354b7da5
DH
12162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12163 (eval $ac_try) 2>&5
12164 ac_status=$?
12165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12166 (exit $ac_status); }; }; then
12167 ac_cv_func___cxa_atexit=yes
12168else
12169 echo "$as_me: failed program was:" >&5
12170sed 's/^/| /' conftest.$ac_ext >&5
12171
12172ac_cv_func___cxa_atexit=no
12173fi
86da66b5
HPN
12174rm -f conftest.err conftest.$ac_objext \
12175 conftest$ac_exeext conftest.$ac_ext
354b7da5
DH
12176fi
12177echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12178echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
12179if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
12180 use_cxa_atexit=yes
12181else
12182 echo "__cxa_atexit can't be enabled on this target"
12183fi
12184
12185 else
12186 # We can't check for __cxa_atexit when building a cross, so assume
12187 # it is available
12188 use_cxa_atexit=yes
12189 fi
12190 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
12191
12192cat >>confdefs.h <<\_ACEOF
2121a768 12193#define DEFAULT_USE_CXA_ATEXIT 1
ba479fd2 12194_ACEOF
2121a768 12195
18fbf599 12196 fi
2121a768
JT
12197fi
12198
a5381466 12199# Look for a file containing extra machine modes.
1c0ca89d
ZW
12200if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12201 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
12202
12203
12204cat >>confdefs.h <<_ACEOF
e22340b0 12205#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 12206_ACEOF
a5381466
ZW
12207
12208fi
12209
75685792
RS
12210# Convert extra_options into a form suitable for Makefile use.
12211extra_opt_files=
12212for f in $extra_options; do
12213 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12214done
12215
12216
b7cb92ad 12217# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 12218# the first file included by config.h.
4977bab6 12219# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 12220# as well. If host!=build, we are in error and need to do more
db81d74a 12221# work to find out the build config parameters.
75bffa71 12222if test x$host = x$build
db81d74a 12223then
eaf4e618 12224 build_auto=auto-host.h
b7cb92ad
JL
12225else
12226 # We create a subdir, then run autoconf in the subdir.
12227 # To prevent recursion we set host and build for the new
12228 # invocation of configure to the build for this invocation
ba479fd2 12229 # of configure.
b7cb92ad
JL
12230 tempdir=build.$$
12231 rm -rf $tempdir
12232 mkdir $tempdir
12233 cd $tempdir
12234 case ${srcdir} in
255b8a49 12235 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
12236 *) realsrcdir=../${srcdir};;
12237 esac
d920e825
L
12238 saved_CFLAGS="${CFLAGS}"
12239 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12240 ${realsrcdir}/configure \
33e70558 12241 --enable-languages=${enable_languages-all} \
534d0cc0 12242 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 12243 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
12244
12245 # We just finished tests for the build machine, so rename
12246 # the file auto-build.h in the gcc directory.
12247 mv auto-host.h ../auto-build.h
12248 cd ..
12249 rm -rf $tempdir
eaf4e618 12250 build_auto=auto-build.h
db81d74a
RH
12251fi
12252
06f0b04c 12253
eaf4e618 12254tm_file="${tm_file} defaults.h"
4977bab6
ZW
12255tm_p_file="${tm_p_file} tm-preds.h"
12256host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12257build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 12258# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 12259# put this back in temporarily.
232b67d9 12260xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 12261
34a86c2b
NN
12262# --------
12263# UNSORTED
12264# --------
12265
cc1e60ea 12266# Compile in configure arguments.
8105825d 12267if test -f configargs.h ; then
cc1e60ea 12268 # Being re-configured.
022dae81 12269 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
12270 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12271else
12272 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12273fi
eeae7b41
DJ
12274
12275# Double all backslashes and backslash all quotes to turn
12276# gcc_config_arguments into a C string.
12277sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12278$gcc_config_arguments
12279EOF
12280gcc_config_arguments_str=`cat conftest.out`
12281rm -f conftest.out
12282
cc1e60ea
JM
12283cat > configargs.h <<EOF
12284/* Generated automatically. */
eeae7b41 12285static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 12286static const char thread_model[] = "$thread_file";
7816bea0
DJ
12287
12288static const struct {
12289 const char *name, *value;
12290} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
12291EOF
12292
ab87f8c8 12293# Internationalization
56694dd9
ZW
12294# If we haven't got the data from the intl directory,
12295# assume NLS is disabled.
ba479fd2
NN
12296USE_NLS=no
12297LIBINTL=
12298LIBINTL_DEP=
12299INCINTL=
12300XGETTEXT=
12301GMSGFMT=
12302POSUB=
56694dd9
ZW
12303if test -f ../intl/config.intl; then
12304 . ../intl/config.intl
093e61a6 12305fi
ba479fd2
NN
12306echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12307echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
56694dd9 12308if test x"$USE_NLS" != xyes; then
ba479fd2
NN
12309 echo "$as_me:$LINENO: result: no" >&5
12310echo "${ECHO_T}no" >&6
56694dd9 12311else
ba479fd2
NN
12312 echo "$as_me:$LINENO: result: yes" >&5
12313echo "${ECHO_T}yes" >&6
12314
12315cat >>confdefs.h <<\_ACEOF
56694dd9 12316#define ENABLE_NLS 1
ba479fd2 12317_ACEOF
56694dd9 12318
093e61a6 12319
ba479fd2
NN
12320 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12321echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
56694dd9 12322 # Look for .po and .gmo files in the source directory.
ba479fd2 12323 CATALOGS=
56694dd9
ZW
12324 XLINGUAS=
12325 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12326 # If there aren't any .gmo files the shell will give us the
12327 # literal string "../path/to/srcdir/po/*.gmo" which has to be
12328 # weeded out.
12329 case "$cat" in *\**)
12330 continue;;
12331 esac
12332 # The quadruple backslash is collapsed to a double backslash
12333 # by the backticks, then collapsed again by the double quotes,
12334 # leaving us with one backslash in the sed expression (right
12335 # before the dot that mustn't act as a wildcard).
12336 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
12337 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
12338 # The user is allowed to set LINGUAS to a list of languages to
12339 # install catalogs for. If it's empty that means "all of them."
12340 if test "x$LINGUAS" = x; then
12341 CATALOGS="$CATALOGS $cat"
12342 XLINGUAS="$XLINGUAS $lang"
12343 else
12344 case "$LINGUAS" in *$lang*)
12345 CATALOGS="$CATALOGS $cat"
12346 XLINGUAS="$XLINGUAS $lang"
12347 ;;
12348 esac
12349 fi
12350 done
12351 LINGUAS="$XLINGUAS"
ba479fd2
NN
12352 echo "$as_me:$LINENO: result: $LINGUAS" >&5
12353echo "${ECHO_T}$LINGUAS" >&6
56694dd9 12354fi
861bb6c1 12355
56694dd9
ZW
12356# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12357# -liconv on the link line twice.
12358case "$LIBINTL" in *$LIBICONV*)
12359 LIBICONV= ;;
12360esac
dc6746e7 12361
56694dd9
ZW
12362# Windows32 Registry support for specifying GCC installation paths.
12363# Check whether --enable-win32-registry or --disable-win32-registry was given.
12364if test "${enable_win32_registry+set}" = set; then
12365 enableval="$enable_win32_registry"
dc6746e7 12366
ba479fd2 12367fi;
ba479fd2 12368
a1286ef5
ZW
12369case $host_os in
12370 win32 | pe | cygwin* | mingw32* | uwin*)
12371 if test "x$enable_win32_registry" != xno; then
12372 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
ba479fd2
NN
12373echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
12374if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12375 echo $ECHO_N "(cached) $ECHO_C" >&6
12376else
12377 ac_func_search_save_LIBS=$LIBS
12378ac_cv_search_RegOpenKeyExA=no
12379cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12380/* confdefs.h. */
12381_ACEOF
12382cat confdefs.h >>conftest.$ac_ext
12383cat >>conftest.$ac_ext <<_ACEOF
12384/* end confdefs.h. */
861bb6c1 12385
ab87f8c8 12386/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12387#ifdef __cplusplus
12388extern "C"
12389#endif
ab87f8c8 12390/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12391 builtin and then its argument prototype would still apply. */
12392char RegOpenKeyExA ();
12393int
12394main ()
12395{
12396RegOpenKeyExA ();
12397 ;
12398 return 0;
12399}
12400_ACEOF
12401rm -f conftest.$ac_objext conftest$ac_exeext
12402if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12403 (eval $ac_link) 2>conftest.er1
ba479fd2 12404 ac_status=$?
86da66b5
HPN
12405 grep -v '^ *+' conftest.er1 >conftest.err
12406 rm -f conftest.er1
12407 cat conftest.err >&5
ba479fd2
NN
12408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12409 (exit $ac_status); } &&
a1286ef5
ZW
12410 { ac_try='test -z "$ac_c_werror_flag"
12411 || test ! -s conftest.err'
86da66b5
HPN
12412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12413 (eval $ac_try) 2>&5
12414 ac_status=$?
12415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12416 (exit $ac_status); }; } &&
12417 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12419 (eval $ac_try) 2>&5
12420 ac_status=$?
12421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12422 (exit $ac_status); }; }; then
56694dd9 12423 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 12424else
ba479fd2
NN
12425 echo "$as_me: failed program was:" >&5
12426sed 's/^/| /' conftest.$ac_ext >&5
12427
861bb6c1 12428fi
86da66b5
HPN
12429rm -f conftest.err conftest.$ac_objext \
12430 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
12431if test "$ac_cv_search_RegOpenKeyExA" = no; then
12432 for ac_lib in advapi32; do
12433 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12434 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12435/* confdefs.h. */
12436_ACEOF
12437cat confdefs.h >>conftest.$ac_ext
12438cat >>conftest.$ac_ext <<_ACEOF
12439/* end confdefs.h. */
12440
56694dd9 12441/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
12442#ifdef __cplusplus
12443extern "C"
12444#endif
56694dd9 12445/* We use char because int might match the return type of a gcc2
ba479fd2
NN
12446 builtin and then its argument prototype would still apply. */
12447char RegOpenKeyExA ();
12448int
12449main ()
12450{
12451RegOpenKeyExA ();
12452 ;
12453 return 0;
12454}
12455_ACEOF
12456rm -f conftest.$ac_objext conftest$ac_exeext
12457if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 12458 (eval $ac_link) 2>conftest.er1
ba479fd2 12459 ac_status=$?
86da66b5
HPN
12460 grep -v '^ *+' conftest.er1 >conftest.err
12461 rm -f conftest.er1
12462 cat conftest.err >&5
ba479fd2
NN
12463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12464 (exit $ac_status); } &&
a1286ef5
ZW
12465 { ac_try='test -z "$ac_c_werror_flag"
12466 || test ! -s conftest.err'
86da66b5
HPN
12467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12468 (eval $ac_try) 2>&5
12469 ac_status=$?
12470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12471 (exit $ac_status); }; } &&
12472 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
12473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12474 (eval $ac_try) 2>&5
12475 ac_status=$?
12476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12477 (exit $ac_status); }; }; then
12478 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 12479break
861bb6c1 12480else
ba479fd2
NN
12481 echo "$as_me: failed program was:" >&5
12482sed 's/^/| /' conftest.$ac_ext >&5
12483
861bb6c1 12484fi
86da66b5
HPN
12485rm -f conftest.err conftest.$ac_objext \
12486 conftest$ac_exeext conftest.$ac_ext
ba479fd2 12487 done
6e3f3080 12488fi
ba479fd2
NN
12489LIBS=$ac_func_search_save_LIBS
12490fi
12491echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
12492echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
12493if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 12494 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 12495
cafe096b 12496else
a1286ef5 12497 enable_win32_registry=no
093e61a6 12498fi
ab87f8c8 12499
a1286ef5
ZW
12500 fi
12501
12502 if test "x$enable_win32_registry" != xno; then
12503
12504cat >>confdefs.h <<\_ACEOF
12505#define ENABLE_WIN32_REGISTRY 1
12506_ACEOF
ab87f8c8 12507
a1286ef5
ZW
12508
12509 if test "x$enable_win32_registry" != xyes \
12510 && test "x$enable_win32_registry" != x; then
ba479fd2
NN
12511
12512cat >>confdefs.h <<_ACEOF
a1286ef5 12513#define WIN32_REGISTRY_KEY "$enable_win32_registry"
ba479fd2 12514_ACEOF
cafe096b 12515
a1286ef5
ZW
12516 fi
12517 fi
12518 ;;
56694dd9 12519esac
ab87f8c8 12520
56694dd9
ZW
12521# Get an absolute path to the GCC top-level source directory
12522holddir=`${PWDCMD-pwd}`
12523cd $srcdir
12524topdir=`${PWDCMD-pwd}`
12525cd $holddir
ab87f8c8 12526
56694dd9 12527# Conditionalize the makefile for this host machine.
2ed26f6b 12528xmake_file=
c406e779 12529for f in ${host_xmake_file}
56694dd9
ZW
12530do
12531 if test -f ${srcdir}/config/$f
12532 then
2ed26f6b 12533 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
12534 fi
12535done
093e61a6 12536
56694dd9 12537# Conditionalize the makefile for this target machine.
2ed26f6b 12538tmake_file_=
c406e779 12539for f in ${tmake_file}
56694dd9
ZW
12540do
12541 if test -f ${srcdir}/config/$f
12542 then
2ed26f6b 12543 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
12544 fi
12545done
2ed26f6b 12546tmake_file="${tmake_file_}"
71a94577 12547
ab87f8c8
JL
12548# If the host doesn't support symlinks, modify CC in
12549# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
12550# Otherwise, we can use "CC=$(CC)".
12551rm -f symtest.tem
35f06ae4
PB
12552case "$LN_S" in
12553 *-s*)
12554 cc_set_by_configure="\$(CC)"
12555 quoted_cc_set_by_configure="\$(CC)"
12556 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12557 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
12558 ;;
12559 *)
12560 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
12561 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
12562 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
12563 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
12564 ;;
12565esac
ab87f8c8 12566
5395b47b
NN
12567# This is a terrible hack which will go away some day.
12568host_cc_for_libada=${CC}
1e3fad21
NN
12569
12570
ab87f8c8
JL
12571out_object_file=`basename $out_file .c`.o
12572
75685792
RS
12573tm_file_list="options.h"
12574tm_include_list="options.h"
ab87f8c8 12575for f in $tm_file; do
64ccbc99 12576 case $f in
d02af173 12577 defaults.h )
e22340b0
ZW
12578 tm_file_list="${tm_file_list} \$(srcdir)/$f"
12579 tm_include_list="${tm_include_list} $f"
12580 ;;
12581 * )
12582 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
12583 tm_include_list="${tm_include_list} config/$f"
12584 ;;
64ccbc99 12585 esac
ab87f8c8
JL
12586done
12587
11642c3a 12588tm_p_file_list=
e22340b0 12589tm_p_include_list=
11642c3a 12590for f in $tm_p_file; do
4977bab6
ZW
12591 case $f in
12592 tm-preds.h )
e22340b0
ZW
12593 tm_p_file_list="${tm_p_file_list} $f"
12594 tm_p_include_list="${tm_p_include_list} $f"
12595 ;;
12596 * )
12597 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
12598 tm_p_include_list="${tm_p_include_list} config/$f"
12599 esac
12600done
12601
12602xm_file_list=
12603xm_include_list=
12604for f in $xm_file; do
12605 case $f in
12606 ansidecl.h )
12607 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
12608 xm_include_list="${xm_include_list} $f"
12609 ;;
12610 auto-host.h )
12611 xm_file_list="${xm_file_list} $f"
12612 xm_include_list="${xm_include_list} $f"
12613 ;;
12614 * )
12615 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
12616 xm_include_list="${xm_include_list} config/$f"
12617 ;;
4977bab6 12618 esac
11642c3a
ZW
12619done
12620
ab87f8c8 12621host_xm_file_list=
e22340b0 12622host_xm_include_list=
ab87f8c8 12623for f in $host_xm_file; do
64ccbc99 12624 case $f in
d02af173 12625 ansidecl.h )
e22340b0
ZW
12626 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
12627 host_xm_include_list="${host_xm_include_list} $f"
12628 ;;
e2500fed 12629 auto-host.h )
e22340b0
ZW
12630 host_xm_file_list="${host_xm_file_list} $f"
12631 host_xm_include_list="${host_xm_include_list} $f"
12632 ;;
12633 * )
12634 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
12635 host_xm_include_list="${host_xm_include_list} config/$f"
12636 ;;
64ccbc99 12637 esac
ab87f8c8
JL
12638done
12639
12640build_xm_file_list=
12641for f in $build_xm_file; do
64ccbc99 12642 case $f in
d02af173 12643 ansidecl.h )
e22340b0
ZW
12644 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
12645 build_xm_include_list="${build_xm_include_list} $f"
12646 ;;
e2500fed 12647 auto-build.h | auto-host.h )
e22340b0
ZW
12648 build_xm_file_list="${build_xm_file_list} $f"
12649 build_xm_include_list="${build_xm_include_list} $f"
12650 ;;
12651 * )
12652 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
12653 build_xm_include_list="${build_xm_include_list} config/$f"
12654 ;;
64ccbc99 12655 esac
ab87f8c8
JL
12656done
12657
a078a589
ZW
12658# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
12659# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
12660CROSS=
12661ALL=all.internal
12662SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
12663if test x$host != x$target
12664then
a078a589
ZW
12665 CROSS="-DCROSS_COMPILE"
12666 ALL=all.cross
12667 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
343f59d9 12668 case "$host","$target" in
3a7e8b87
GK
12669 # Darwin crosses can use the host system's libraries and headers,
12670 # because of the fat library support. Of course, it must be the
12671 # same version of Darwin on both sides. Allow the user to
12672 # just say --target=foo-darwin without a version number to mean
12673 # "the version on this system".
12674 *-*-darwin*,*-*-darwin*)
12675 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
12676 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
12677 if test $hostos = $targetos -o $targetos = darwin ; then
12678 CROSS=
12679 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
12680 with_headers=yes
12681 fi
12682 ;;
12683
343f59d9
AM
12684 i?86-*-*,x86_64-*-* \
12685 | powerpc*-*-*,powerpc64*-*-*)
12686 CROSS="$CROSS -DNATIVE_CROSS" ;;
12687 esac
7a615b25
AO
12688elif test "x$TARGET_SYSTEM_ROOT" != x; then
12689 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
12690 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
12691fi
12692
b39d221a
EC
12693# If this is a cross-compiler that does not
12694# have its own set of headers then define
12695# inhibit_libc
12696
dc06db20
R
12697# If this is using newlib, without having the headers available now,
12698# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
12699# This prevents libgcc2 from containing any code which requires libc
12700# support.
b39d221a 12701inhibit_libc=
dc06db20
R
12702if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
12703 test x$with_newlib = xyes ; } &&
e50084fa 12704 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
b39d221a 12705 inhibit_libc=-Dinhibit_libc
b39d221a
EC
12706fi
12707
12708
a078a589
ZW
12709# When building gcc with a cross-compiler, we need to adjust things so
12710# that the generator programs are still built with the native compiler.
12711# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
12712
12713# These are the normal (build=host) settings:
ba479fd2
NN
12714CC_FOR_BUILD='$(CC)'
12715BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 12716STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
12717
12718# Possibly disable fixproto, on a per-target basis.
12719case ${use_fixproto} in
12720 no)
12721 STMP_FIXPROTO=
12722 ;;
12723 yes)
12724 STMP_FIXPROTO=stmp-fixproto
12725 ;;
12726esac
12727
a078a589 12728
83599948
NS
12729# And these apply if build != host, or we are generating coverage data
12730if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 12731then
b11e4747 12732 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 12733
7a615b25 12734 if test "x$TARGET_SYSTEM_ROOT" = x; then
d8e5117d 12735 if test "x$STMP_FIXPROTO" != x; then
de253ca4
GK
12736 STMP_FIXPROTO=stmp-install-fixproto
12737 fi
7a615b25 12738 fi
ab87f8c8
JL
12739fi
12740
12741# Expand extra_headers to include complete path.
12742# This substitutes for lots of t-* files.
12743extra_headers_list=
b1ef58c8
NN
12744# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
12745for file in ${extra_headers} ; do
12746 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
12747done
ab87f8c8 12748
c38f02df
ILT
12749# Define collect2 in Makefile.
12750case $host_can_use_collect2 in
12751 no) collect2= ;;
12752 *) collect2='collect2$(exeext)' ;;
12753esac
12754
12755
ab87f8c8 12756# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
12757case $use_collect2 in
12758 no) use_collect2= ;;
12759 "") ;;
ba479fd2 12760 *)
34a86c2b
NN
12761 host_xm_defines="${host_xm_defines} USE_COLLECT2"
12762 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
12763 case $host_can_use_collect2 in
12764 no)
12765 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
12766echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
12767 { (exit 1); exit 1; }; }
12768 ;;
12769 esac
34a86c2b
NN
12770 ;;
12771esac
ab87f8c8 12772
8bb915b6
NN
12773# ---------------------------
12774# Assembler & linker features
12775# ---------------------------
12776
d869a8c4
NN
12777# Identify the assembler which will work hand-in-glove with the newly
12778# built GCC, so that we can examine its features. This is the assembler
12779# which will be driven by the driver program.
12780#
12781# If build != host, and we aren't building gas in-tree, we identify a
12782# build->target assembler and hope that it will have the same features
12783# as the host->target assembler we'll be using.
ba479fd2
NN
12784echo "$as_me:$LINENO: checking what assembler to use" >&5
12785echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
34a86c2b 12786in_tree_gas=no
ab87f8c8 12787gcc_cv_as=
981d4858
JM
12788gcc_cv_gas_major_version=
12789gcc_cv_gas_minor_version=
ab87f8c8
JL
12790gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
12791if test -x "$DEFAULT_ASSEMBLER"; then
12792 gcc_cv_as="$DEFAULT_ASSEMBLER"
57991eba 12793elif test -x as$build_exeext; then
ab87f8c8 12794 # Build using assembler in the current directory.
57991eba 12795 gcc_cv_as=./as$build_exeext
34a86c2b 12796elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
12797 && test -f ../gas/Makefile \
12798 && test x$build = x$host; then
12799 # Single tree build which includes gas. We want to prefer it
12800 # over whatever linker top-level may have detected, since
12801 # we'll use what we're building after installation anyway.
ad9c4d9f
NN
12802 in_tree_gas=yes
12803 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
12804for f in $gcc_cv_as_bfd_srcdir/configure \
12805 $gcc_cv_as_gas_srcdir/configure \
12806 $gcc_cv_as_gas_srcdir/configure.in \
12807 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 12808 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
12809 if test x$gcc_cv_gas_version != x; then
12810 break
12811 fi
12812done
12813gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
12814gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
12815gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
12816case $gcc_cv_gas_patch_version in
12817 "") gcc_cv_gas_patch_version="0" ;;
12818esac
8ada417f
ZW
12819gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
12820 + $gcc_cv_gas_minor_version \) \* 1000 \
12821 + $gcc_cv_gas_patch_version`
ad9c4d9f 12822
57991eba
PB
12823 rm -f as$build_exeext
12824 $LN_S ../gas/as-new$build_exeext as$build_exeext 2>/dev/null
5408ac6c
HPN
12825 in_tree_gas_is_elf=no
12826 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
12827 || (grep 'obj_format = multi' ../gas/Makefile \
12828 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
12829 then
12830 in_tree_gas_is_elf=yes
12831 fi
08d105fa
AO
12832elif test -x "$AS_FOR_TARGET"; then
12833 gcc_cv_as="$AS_FOR_TARGET"
12834elif test -x "$AS" && test x$host = x$target; then
12835 gcc_cv_as="$AS"
981d4858 12836fi
9e423e6d 12837
a1286ef5
ZW
12838gcc_version=`cat $srcdir/BASE-VER`
12839
534d0cc0 12840if test "x$gcc_cv_as" = x; then
779243f7
JL
12841 # Search the same directories that the installed compiler will
12842 # search. Else we may find the wrong assembler and lose. If we
12843 # do not find a suitable assembler binary, then try the user's
12844 # path.
12845 #
12846 # Also note we have to check MD_EXEC_PREFIX before checking the
12847 # user's path. Unfortunately, there is no good way to get at the
12848 # value of MD_EXEC_PREFIX here. So we do a brute force search
12849 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
12850 # to be fixed as part of the make/configure rewrite too.
12851
12852 if test "x$exec_prefix" = xNONE; then
12853 if test "x$prefix" = xNONE; then
12854 test_prefix=/usr/local
12855 else
12856 test_prefix=$prefix
12857 fi
12858 else
12859 test_prefix=$exec_prefix
12860 fi
12861
12862 # If the loop below does not find an assembler, then use whatever
b095fe2c
DJ
12863 # one we can find in the users's path. We are looking for a
12864 # ${build} -> ${target} assembler.
55a2ea2a 12865 if test "x$program_prefix" != xNONE; then
57991eba 12866 gcc_cv_as=${program_prefix}as$build_exeext
b095fe2c
DJ
12867 elif test x$build != x$host && test x$build != x$target; then
12868 gcc_cv_as=${target_noncanonical}-as$build_exeext
55a2ea2a 12869 else
57991eba 12870 gcc_cv_as=`echo as | sed "${program_transform_name}"`$build_exeext
55a2ea2a
AM
12871 fi
12872
21addcd9
PB
12873 if test x$host = x$build; then
12874 test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
12875 $test_prefix/libexec/gcc/$target_noncanonical \
12876 /usr/lib/gcc/$target_noncanonical/$gcc_version \
12877 /usr/lib/gcc/$target_noncanonical \
12878 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
12879 $test_prefix/$target_noncanonical/bin"
12880 else
12881 test_dirs=
12882 fi
55a2ea2a 12883
b095fe2c 12884 if test x$build = x$target; then
55a2ea2a 12885 test_dirs="$test_dirs \
779243f7
JL
12886 /usr/libexec \
12887 /usr/ccs/gcc \
12888 /usr/ccs/bin \
12889 /udk/usr/ccs/bin \
12890 /bsd43/usr/lib/cmplrs/cc \
12891 /usr/cross64/usr/bin \
12892 /usr/lib/cmplrs/cc \
12893 /sysv/usr/lib/cmplrs/cc \
12894 /svr4/usr/lib/cmplrs/cc \
12895 /usr/bin"
55a2ea2a 12896 fi
779243f7
JL
12897
12898 for dir in $test_dirs; do
57991eba
PB
12899 if test -x $dir/as$build_exeext; then
12900 gcc_cv_as=$dir/as$build_exeext
779243f7
JL
12901 break;
12902 fi
12903 done
9e423e6d 12904fi
34a86c2b
NN
12905case $in_tree_gas in
12906 yes)
ba479fd2
NN
12907 echo "$as_me:$LINENO: result: \"newly built gas\"" >&5
12908echo "${ECHO_T}\"newly built gas\"" >&6
34a86c2b
NN
12909 ;;
12910 no)
ba479fd2
NN
12911 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
12912echo "${ECHO_T}$gcc_cv_as" >&6
34a86c2b
NN
12913 ;;
12914esac
981d4858 12915
d869a8c4
NN
12916# Identify the linker which will work hand-in-glove with the newly
12917# built GCC, so that we can examine its features. This is the linker
12918# which will be driven by the driver program.
12919#
12920# If build != host, and we aren't building gas in-tree, we identify a
12921# build->target linker and hope that it will have the same features
12922# as the host->target linker we'll be using.
ba479fd2
NN
12923echo "$as_me:$LINENO: checking what linker to use" >&5
12924echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
34a86c2b 12925in_tree_ld=no
275b60d6
JJ
12926gcc_cv_ld=
12927gcc_cv_gld_major_version=
12928gcc_cv_gld_minor_version=
12929gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
12930gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
12931if test -x "$DEFAULT_LINKER"; then
12932 gcc_cv_ld="$DEFAULT_LINKER"
57991eba 12933elif test -x collect-ld$build_exeext; then
275b60d6 12934 # Build using linker in the current directory.
57991eba 12935 gcc_cv_ld=./collect-ld$build_exeext
34a86c2b 12936elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
08d105fa
AO
12937 && test -f ../ld/Makefile \
12938 && test x$build = x$host; then
12939 # Single tree build which includes ld. We want to prefer it
12940 # over whatever linker top-level may have detected, since
12941 # we'll use what we're building after installation anyway.
34a86c2b 12942 in_tree_ld=yes
5408ac6c
HPN
12943 in_tree_ld_is_elf=no
12944 if (grep 'EMUL = .*elf' ../ld/Makefile \
8a45d680
AN
12945 || grep 'EMUL = .*linux' ../ld/Makefile \
12946 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
5408ac6c
HPN
12947 in_tree_ld_is_elf=yes
12948 fi
275b60d6
JJ
12949 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
12950 do
58ea87a9 12951 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
275b60d6
JJ
12952 if test x$gcc_cv_gld_version != x; then
12953 break
12954 fi
12955 done
12956 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
12957 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
57991eba
PB
12958 rm -f collect-ld$build_exeext
12959 $LN_S ../ld/ld-new$build_exeext collect-ld$build_exeext 2>/dev/null
08d105fa
AO
12960elif test -x "$LD_FOR_TARGET"; then
12961 gcc_cv_ld="$LD_FOR_TARGET"
12962elif test -x "$LD" && test x$host = x$target; then
12963 gcc_cv_ld="$LD"
275b60d6
JJ
12964fi
12965
534d0cc0 12966if test "x$gcc_cv_ld" = x; then
275b60d6
JJ
12967 # Search the same directories that the installed compiler will
12968 # search. Else we may find the wrong linker and lose. If we
12969 # do not find a suitable linker binary, then try the user's
12970 # path.
12971 #
12972 # Also note we have to check MD_EXEC_PREFIX before checking the
12973 # user's path. Unfortunately, there is no good way to get at the
12974 # value of MD_EXEC_PREFIX here. So we do a brute force search
12975 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
12976 # to be fixed as part of the make/configure rewrite too.
12977
12978 if test "x$exec_prefix" = xNONE; then
12979 if test "x$prefix" = xNONE; then
12980 test_prefix=/usr/local
12981 else
12982 test_prefix=$prefix
12983 fi
12984 else
12985 test_prefix=$exec_prefix
12986 fi
12987
b095fe2c
DJ
12988 # If the loop below does not find a linker, then use whatever
12989 # one we can find in the users's path. We are looking for a
12990 # ${build} -> ${target} linker.
55a2ea2a 12991 if test "x$program_prefix" != xNONE; then
57991eba 12992 gcc_cv_ld=${program_prefix}ld$build_exeext
b095fe2c
DJ
12993 elif test x$build != x$host && test x$build != x$target; then
12994 gcc_cv_ld=${target_noncanonical}-ld$build_exeext
55a2ea2a 12995 else
57991eba 12996 gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$build_exeext
55a2ea2a
AM
12997 fi
12998
21addcd9
PB
12999 if test x$host = x$build; then
13000 test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
13001 $test_prefix/libexec/gcc/$target_noncanonical \
13002 /usr/lib/gcc/$target_noncanonical/$gcc_version \
13003 /usr/lib/gcc/$target_noncanonical \
13004 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
13005 $test_prefix/$target_noncanonical/bin"
13006 else
13007 test_dirs=
13008 fi
55a2ea2a 13009
b095fe2c 13010 if test x$build = x$target; then
55a2ea2a 13011 test_dirs="$test_dirs \
275b60d6
JJ
13012 /usr/libexec \
13013 /usr/ccs/gcc \
13014 /usr/ccs/bin \
13015 /udk/usr/ccs/bin \
13016 /bsd43/usr/lib/cmplrs/cc \
13017 /usr/cross64/usr/bin \
13018 /usr/lib/cmplrs/cc \
13019 /sysv/usr/lib/cmplrs/cc \
13020 /svr4/usr/lib/cmplrs/cc \
13021 /usr/bin"
55a2ea2a 13022 fi
275b60d6
JJ
13023
13024 for dir in $test_dirs; do
57991eba
PB
13025 if test -x $dir/ld$build_exeext; then
13026 gcc_cv_ld=$dir/ld$build_exeext
275b60d6
JJ
13027 break;
13028 fi
13029 done
13030fi
34a86c2b
NN
13031case $in_tree_ld in
13032 yes)
ba479fd2
NN
13033 echo "$as_me:$LINENO: result: \"newly built ld\"" >&5
13034echo "${ECHO_T}\"newly built ld\"" >&6
34a86c2b
NN
13035 ;;
13036 no)
ba479fd2
NN
13037 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13038echo "${ECHO_T}$gcc_cv_ld" >&6
34a86c2b
NN
13039 ;;
13040esac
275b60d6 13041
981d4858 13042# Figure out what nm we will be using.
f9c1196a 13043gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
ba479fd2
NN
13044echo "$as_me:$LINENO: checking what nm to use" >&5
13045echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
f9c1196a 13046in_tree_nm=no
57991eba
PB
13047if test -x nm$build_exeext; then
13048 gcc_cv_nm=./nm$build_exeext
f9c1196a
ZW
13049elif test -f $gcc_cv_binutils_srcdir/configure.in \
13050 && test -f ../binutils/Makefile; then
13051 # Single tree build which includes binutils.
13052 in_tree_nm=yes
57991eba
PB
13053 gcc_cv_nm=./nm$build_exeext
13054 rm -f nm$build_exeext
13055 $LN_S ../binutils/nm-new$build_exeext nm$build_exeext 2>/dev/null
534d0cc0 13056elif test "x$program_prefix" != xNONE; then
57991eba 13057 gcc_cv_nm=${program_prefix}nm$build_exeext
b095fe2c
DJ
13058elif test x$build != x$host && test x$build != x$target; then
13059 gcc_cv_nm=${target_noncanonical}-nm$build_exeext
534d0cc0 13060else
57991eba 13061 gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$build_exeext
981d4858 13062fi
f9c1196a 13063case $in_tree_nm in
ba479fd2
NN
13064 yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5
13065echo "${ECHO_T}\"newly built nm\"" >&6 ;;
13066 no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13067echo "${ECHO_T}$gcc_cv_nm" >&6 ;;
f9c1196a 13068esac
981d4858 13069
3cae5780 13070# Figure out what objdump we will be using.
ba479fd2
NN
13071echo "$as_me:$LINENO: checking what objdump to use" >&5
13072echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
f9c1196a 13073in_tree_objdump=no
57991eba
PB
13074if test -x objdump$build_exeext; then
13075 gcc_cv_objdump=./objdump$build_exeext
f9c1196a
ZW
13076elif test -f $gcc_cv_binutils_srcdir/configure.in \
13077 && test -f ../binutils/Makefile; then
13078 # Single tree build which includes binutils.
13079 in_tree_objdump=yes
57991eba
PB
13080 gcc_cv_objdump=./objdump$build_exeext
13081 rm -f objdump$build_exeext
13082 $LN_S ../binutils/objdump$build_exeext objdump$build_exeext 2>/dev/null
534d0cc0 13083elif test "x$program_prefix" != xNONE; then
57991eba 13084 gcc_cv_objdump=${program_prefix}objdump$build_exeext
b095fe2c
DJ
13085elif test x$build != x$host && test x$build != x$target; then
13086 gcc_cv_objdump=${target_noncanonical}-objdump$build_exeext
534d0cc0 13087else
f9c1196a 13088 gcc_cv_objdump=`echo objdump | \
57991eba 13089 sed "${program_transform_name}"`$build_exeext
3cae5780 13090fi
f9c1196a 13091case $in_tree_objdump in
ba479fd2
NN
13092 yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5
13093echo "${ECHO_T}\"newly built objdump\"" >&6 ;;
13094 no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13095echo "${ECHO_T}$gcc_cv_objdump" >&6 ;;
f9c1196a 13096esac
3cae5780 13097
981d4858 13098# Figure out what assembler alignment features are present.
ba479fd2
NN
13099echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13100echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
13101if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13102 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13103else
13104 gcc_cv_as_balign_and_p2align=no
13105 if test $in_tree_gas = yes; then
13106 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13107 then gcc_cv_as_balign_and_p2align=yes
13108fi
13109 elif test x$gcc_cv_as != x; then
6e3f3080 13110 echo '.balign 4
8ada417f 13111.p2align 2' > conftest.s
ba479fd2
NN
13112 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13114 (eval $ac_try) 2>&5
13115 ac_status=$?
13116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13117 (exit $ac_status); }; }
8ada417f
ZW
13118 then
13119 gcc_cv_as_balign_and_p2align=yes
13120 else
13121 echo "configure: failed program was" >&5
13122 cat conftest.s >&5
13123 fi
13124 rm -f conftest.o conftest.s
13125 fi
13126fi
ba479fd2
NN
13127echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13128echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 13129if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
13130
13131cat >>confdefs.h <<\_ACEOF
981d4858 13132#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 13133_ACEOF
981d4858 13134
ad9c4d9f
NN
13135fi
13136
ba479fd2
NN
13137echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13138echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
13139if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13140 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13141else
13142 gcc_cv_as_max_skip_p2align=no
13143 if test $in_tree_gas = yes; then
13144 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13145 then gcc_cv_as_max_skip_p2align=yes
13146fi
13147 elif test x$gcc_cv_as != x; then
6e3f3080 13148 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
13149 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13151 (eval $ac_try) 2>&5
13152 ac_status=$?
13153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13154 (exit $ac_status); }; }
8ada417f
ZW
13155 then
13156 gcc_cv_as_max_skip_p2align=yes
13157 else
13158 echo "configure: failed program was" >&5
13159 cat conftest.s >&5
13160 fi
13161 rm -f conftest.o conftest.s
13162 fi
ad9c4d9f 13163fi
ba479fd2
NN
13164echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13165echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 13166if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
13167
13168cat >>confdefs.h <<\_ACEOF
9e423e6d 13169#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 13170_ACEOF
9e423e6d 13171
9e423e6d 13172fi
ad9c4d9f 13173
ba479fd2
NN
13174echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13175echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
13176if test "${gcc_cv_as_subsection_m1+set}" = set; then
13177 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13178else
13179 gcc_cv_as_subsection_m1=no
13180 if test $in_tree_gas = yes; then
13181 if test $in_tree_gas_is_elf = yes \
13182 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13183 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 13184fi
8ada417f 13185 elif test x$gcc_cv_as != x; then
6e3f3080 13186 echo 'conftest_label1: .word 0
d1accaa3
JJ
13187.subsection -1
13188conftest_label2: .word 0
8ada417f 13189.previous' > conftest.s
ba479fd2
NN
13190 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13192 (eval $ac_try) 2>&5
13193 ac_status=$?
13194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13195 (exit $ac_status); }; }
8ada417f
ZW
13196 then
13197 if test x$gcc_cv_nm != x; then
13198 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13199 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13200 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13201 then :
13202 else gcc_cv_as_subsection_m1=yes
13203 fi
13204 rm -f conftest.nm1 conftest.nm2
13205 fi
13206 else
13207 echo "configure: failed program was" >&5
13208 cat conftest.s >&5
13209 fi
13210 rm -f conftest.o conftest.s
13211 fi
981d4858 13212fi
ba479fd2
NN
13213echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13214echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 13215if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
13216
13217cat >>confdefs.h <<\_ACEOF
981d4858 13218#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 13219_ACEOF
981d4858 13220
d1accaa3 13221fi
ad9c4d9f 13222
ba479fd2
NN
13223echo "$as_me:$LINENO: checking assembler for .weak" >&5
13224echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
13225if test "${gcc_cv_as_weak+set}" = set; then
13226 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13227else
13228 gcc_cv_as_weak=no
13229 if test $in_tree_gas = yes; then
13230 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13231 then gcc_cv_as_weak=yes
ad9c4d9f 13232fi
8ada417f 13233 elif test x$gcc_cv_as != x; then
6e3f3080 13234 echo ' .weak foobar' > conftest.s
ba479fd2
NN
13235 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13237 (eval $ac_try) 2>&5
13238 ac_status=$?
13239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13240 (exit $ac_status); }; }
8ada417f
ZW
13241 then
13242 gcc_cv_as_weak=yes
13243 else
13244 echo "configure: failed program was" >&5
13245 cat conftest.s >&5
13246 fi
13247 rm -f conftest.o conftest.s
13248 fi
981d4858 13249fi
ba479fd2
NN
13250echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13251echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 13252if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
13253
13254cat >>confdefs.h <<\_ACEOF
981d4858 13255#define HAVE_GAS_WEAK 1
ba479fd2 13256_ACEOF
981d4858 13257
12822146 13258fi
ad9c4d9f 13259
e41f3691
JDA
13260echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13261echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
13262if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13263 echo $ECHO_N "(cached) $ECHO_C" >&6
13264else
13265 gcc_cv_as_nsubspa_comdat=no
13266 if test $in_tree_gas = yes; then
13267 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13268 then gcc_cv_as_nsubspa_comdat=yes
13269fi
13270 elif test x$gcc_cv_as != x; then
13271 echo ' .SPACE $TEXT$
13272 .NSUBSPA $CODE$,COMDAT' > conftest.s
13273 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13275 (eval $ac_try) 2>&5
13276 ac_status=$?
13277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13278 (exit $ac_status); }; }
13279 then
13280 gcc_cv_as_nsubspa_comdat=yes
13281 else
13282 echo "configure: failed program was" >&5
13283 cat conftest.s >&5
13284 fi
13285 rm -f conftest.o conftest.s
13286 fi
13287fi
13288echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13289echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
13290if test $gcc_cv_as_nsubspa_comdat = yes; then
13291
13292cat >>confdefs.h <<\_ACEOF
13293#define HAVE_GAS_NSUBSPA_COMDAT 1
13294_ACEOF
13295
13296fi
13297
8ada417f
ZW
13298# .hidden needs to be supported in both the assembler and the linker,
13299# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13300# This is irritatingly difficult to feature test for; we have to check the
13301# date string after the version number. If we've got an in-tree
13302# ld, we don't know its patchlevel version, so we set the baseline at 2.13
13303# to be safe.
13304# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
13305echo "$as_me:$LINENO: checking assembler for .hidden" >&5
13306echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
13307if test "${gcc_cv_as_hidden+set}" = set; then
13308 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13309else
13310 gcc_cv_as_hidden=no
13311 if test $in_tree_gas = yes; then
13312 if test $in_tree_gas_is_elf = yes \
13313 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
13314 then gcc_cv_as_hidden=yes
13315fi
13316 elif test x$gcc_cv_as != x; then
6e3f3080 13317 echo ' .hidden foobar
8ada417f 13318foobar:' > conftest.s
ba479fd2
NN
13319 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13321 (eval $ac_try) 2>&5
13322 ac_status=$?
13323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13324 (exit $ac_status); }; }
8ada417f
ZW
13325 then
13326 gcc_cv_as_hidden=yes
13327 else
13328 echo "configure: failed program was" >&5
13329 cat conftest.s >&5
13330 fi
13331 rm -f conftest.o conftest.s
13332 fi
13333fi
ba479fd2
NN
13334echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
13335echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 13336
ad9c4d9f 13337
ba479fd2
NN
13338echo "$as_me:$LINENO: checking linker for .hidden support" >&5
13339echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
13340if test "${gcc_cv_ld_hidden+set}" = set; then
13341 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13342else
13343 if test $in_tree_ld = yes ; then
13344 gcc_cv_ld_hidden=no
13345 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 \
13346 && test $in_tree_ld_is_elf = yes; then
13347 gcc_cv_ld_hidden=yes
13348 fi
13349else
13350 gcc_cv_ld_hidden=yes
bace148a 13351 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
13352 if echo "$ld_ver" | grep GNU > /dev/null; then
13353 ld_vers=`echo $ld_ver | sed -n \
13354 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13355 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13356 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13357 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13358 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
13359 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
13360 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'`
13361 if test 0"$ld_date" -lt 20020404; then
13362 if test -n "$ld_date"; then
13363 # If there was date string, but was earlier than 2002-04-04, fail
13364 gcc_cv_ld_hidden=no
13365 elif test -z "$ld_vers"; then
13366 # If there was no date string nor ld version number, something is wrong
13367 gcc_cv_ld_hidden=no
13368 else
13369 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
13370 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
13371 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
13372 test -z "$ld_vers_patch" && ld_vers_patch=0
13373 if test "$ld_vers_major" -lt 2; then
13374 gcc_cv_ld_hidden=no
13375 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
13376 gcc_cv_ld_hidden="no"
13377 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
13378 gcc_cv_ld_hidden=no
c72931a6 13379 fi
8ada417f 13380 fi
789b7de5 13381 fi
8ada417f 13382 else
28690784 13383 case "${target}" in
b0fd7d27 13384 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
13385 gcc_cv_ld_hidden=yes
13386 ;;
13387 *)
13388 gcc_cv_ld_hidden=no
13389 ;;
13390 esac
8ada417f
ZW
13391 fi
13392fi
6d07784a 13393fi
ba479fd2
NN
13394echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
13395echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 13396libgcc_visibility=no
ad9c4d9f 13397
232b67d9 13398
8e3940b2 13399if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 13400 libgcc_visibility=yes
ba479fd2
NN
13401
13402cat >>confdefs.h <<\_ACEOF
8ada417f 13403#define HAVE_GAS_HIDDEN 1
ba479fd2 13404_ACEOF
ad9c4d9f
NN
13405
13406fi
13407
8ada417f 13408# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
13409echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
13410echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
13411if test "${gcc_cv_as_leb128+set}" = set; then
13412 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13413else
13414 gcc_cv_as_leb128=no
13415 if test $in_tree_gas = yes; then
13416 if test $in_tree_gas_is_elf = yes \
13417 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
13418 then gcc_cv_as_leb128=yes
13419fi
13420 elif test x$gcc_cv_as != x; then
6e3f3080 13421 echo ' .data
b7460f24
RH
13422 .uleb128 L2 - L1
13423L1:
13424 .uleb128 1280
13425 .sleb128 -1010
8ada417f 13426L2:' > conftest.s
ba479fd2
NN
13427 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13429 (eval $ac_try) 2>&5
13430 ac_status=$?
13431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13432 (exit $ac_status); }; }
8ada417f
ZW
13433 then
13434 # GAS versions before 2.11 do not support uleb128,
13435 # despite appearing to.
13436 # ??? There exists an elf-specific test that will crash
13437 # the assembler. Perhaps it's better to figure out whether
13438 # arbitrary sections are supported and try the test.
bace148a 13439 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
13440 if echo "$as_ver" | grep GNU > /dev/null; then
13441 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
13442 as_major=`echo $as_ver | sed 's/\..*//'`
13443 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
13444 if test $as_major -eq 2 && test $as_minor -lt 11
13445 then :
13446 else gcc_cv_as_leb128=yes
13447 fi
13448 fi
13449 else
13450 echo "configure: failed program was" >&5
13451 cat conftest.s >&5
13452 fi
13453 rm -f conftest.o conftest.s
13454 fi
b7460f24 13455fi
ba479fd2
NN
13456echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
13457echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 13458if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
13459
13460cat >>confdefs.h <<\_ACEOF
b7460f24 13461#define HAVE_AS_LEB128 1
ba479fd2 13462_ACEOF
b7460f24
RH
13463
13464fi
ad9c4d9f 13465
8ada417f
ZW
13466# GAS versions up to and including 2.11.0 may mis-optimize
13467# .eh_frame data.
ba479fd2
NN
13468echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
13469echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
13470if test "${gcc_cv_as_eh_frame+set}" = set; then
13471 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13472else
13473 gcc_cv_as_eh_frame=no
13474 if test $in_tree_gas = yes; then
13475 if test $in_tree_gas_is_elf = yes \
13476 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13477 then gcc_cv_as_eh_frame=yes
ad9c4d9f 13478fi
8ada417f 13479 elif test x$gcc_cv_as != x; then
6e3f3080 13480 echo ' .text
c64688ae
RH
13481.LFB1:
13482 .4byte 0
13483.L1:
13484 .4byte 0
13485.LFE1:
13486 .section .eh_frame,"aw",@progbits
13487__FRAME_BEGIN__:
13488 .4byte .LECIE1-.LSCIE1
13489.LSCIE1:
13490 .4byte 0x0
13491 .byte 0x1
13492 .ascii "z\0"
13493 .byte 0x1
13494 .byte 0x78
13495 .byte 0x1a
13496 .byte 0x0
13497 .byte 0x4
13498 .4byte 1
13499 .p2align 1
13500.LECIE1:
13501.LSFDE1:
13502 .4byte .LEFDE1-.LASFDE1
13503.LASFDE1:
13504 .4byte .LASFDE1-__FRAME_BEGIN__
13505 .4byte .LFB1
13506 .4byte .LFE1-.LFB1
13507 .byte 0x4
13508 .4byte .LFE1-.LFB1
13509 .byte 0x4
13510 .4byte .L1-.LFB1
8ada417f 13511.LEFDE1:' > conftest.s
ba479fd2
NN
13512 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
13513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13514 (eval $ac_try) 2>&5
13515 ac_status=$?
13516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13517 (exit $ac_status); }; }
8ada417f
ZW
13518 then
13519 cat > conftest.lit <<EOF
c64688ae
RH
13520 0000 10000000 00000000 017a0001 781a0004 .........z..x...
13521 0010 01000000 12000000 18000000 00000000 ................
093e61a6 13522 0020 08000000 04080000 0044 .........D
01efb963 13523EOF
ba479fd2 13524cat > conftest.big <<EOF
01efb963
AS
13525 0000 00000010 00000000 017a0001 781a0004 .........z..x...
13526 0010 00000001 00000012 00000018 00000000 ................
093e61a6 13527 0020 00000008 04000000 0844 .........D
c64688ae 13528EOF
8ada417f
ZW
13529 # If the assembler didn't choke, and we can objdump,
13530 # and we got the correct data, then succeed.
13531 if test x$gcc_cv_objdump != x \
13532 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
13533 | tail -3 > conftest.got \
13534 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
13535 || cmp conftest.big conftest.got > /dev/null 2>&1; }
13536 then
13537 gcc_cv_as_eh_frame=yes
ba479fd2
NN
13538 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
13539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13540 (eval $ac_try) 2>&5
13541 ac_status=$?
13542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13543 (exit $ac_status); }; }; then
8ada417f
ZW
13544 gcc_cv_as_eh_frame=buggy
13545 else
13546 # Uh oh, what do we do now?
13547 gcc_cv_as_eh_frame=no
13548 fi
13549 else
13550 echo "configure: failed program was" >&5
13551 cat conftest.s >&5
13552 fi
13553 rm -f conftest.o conftest.s
13554 fi
c64688ae 13555fi
ba479fd2
NN
13556echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
13557echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 13558
6e3f3080 13559
63cf211a 13560if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
13561
13562cat >>confdefs.h <<\_ACEOF
8ada417f 13563#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 13564_ACEOF
ad9c4d9f
NN
13565
13566fi
13567
ba479fd2
NN
13568echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13569echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13570if test "${gcc_cv_as_shf_merge+set}" = set; then
13571 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13572else
13573 gcc_cv_as_shf_merge=no
13574 if test $in_tree_gas = yes; then
13575 if test $in_tree_gas_is_elf = yes \
13576 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13577 then gcc_cv_as_shf_merge=yes
13578fi
13579 elif test x$gcc_cv_as != x; then
6e3f3080 13580 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
13581 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13583 (eval $ac_try) 2>&5
13584 ac_status=$?
13585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13586 (exit $ac_status); }; }
8ada417f
ZW
13587 then
13588 gcc_cv_as_shf_merge=yes
13589 else
13590 echo "configure: failed program was" >&5
13591 cat conftest.s >&5
13592 fi
13593 rm -f conftest.o conftest.s
13594 fi
201556f0 13595fi
ba479fd2
NN
13596echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13597echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 13598
c18a5b6c
MM
13599if test $gcc_cv_as_shf_merge = no; then
13600 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
13601echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
13602if test "${gcc_cv_as_shf_merge+set}" = set; then
13603 echo $ECHO_N "(cached) $ECHO_C" >&6
13604else
13605 gcc_cv_as_shf_merge=no
13606 if test $in_tree_gas = yes; then
13607 if test $in_tree_gas_is_elf = yes \
13608 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
13609 then gcc_cv_as_shf_merge=yes
13610fi
13611 elif test x$gcc_cv_as != x; then
13612 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
13613 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13615 (eval $ac_try) 2>&5
13616 ac_status=$?
13617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13618 (exit $ac_status); }; }
13619 then
13620 gcc_cv_as_shf_merge=yes
13621 else
13622 echo "configure: failed program was" >&5
13623 cat conftest.s >&5
13624 fi
13625 rm -f conftest.o conftest.s
13626 fi
13627fi
13628echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
13629echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
13630
13631fi
8ad9fb33 13632
ba479fd2 13633cat >>confdefs.h <<_ACEOF
8ad9fb33 13634#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 13635_ACEOF
201556f0 13636
201556f0 13637
c18a5b6c
MM
13638echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13639echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13640if test "${gcc_cv_as_comdat_group+set}" = set; then
13641 echo $ECHO_N "(cached) $ECHO_C" >&6
13642else
13643 gcc_cv_as_comdat_group=no
13644 if test $in_tree_gas = yes; then
13645 if test $in_tree_gas_is_elf = yes \
13646 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13647 then gcc_cv_as_comdat_group=yes
13648fi
13649 elif test x$gcc_cv_as != x; then
13650 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
13651 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13653 (eval $ac_try) 2>&5
13654 ac_status=$?
13655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13656 (exit $ac_status); }; }
13657 then
13658 gcc_cv_as_comdat_group=yes
13659 else
13660 echo "configure: failed program was" >&5
13661 cat conftest.s >&5
13662 fi
13663 rm -f conftest.o conftest.s
13664 fi
13665fi
13666echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
13667echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
13668
13669if test $gcc_cv_as_comdat_group = yes; then
13670 gcc_cv_as_comdat_group_percent=no
13671else
13672 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
13673echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
13674if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
13675 echo $ECHO_N "(cached) $ECHO_C" >&6
13676else
13677 gcc_cv_as_comdat_group_percent=no
13678 if test $in_tree_gas = yes; then
13679 if test $in_tree_gas_is_elf = yes \
13680 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13681 then gcc_cv_as_comdat_group_percent=yes
13682fi
13683 elif test x$gcc_cv_as != x; then
13684 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
13685 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
13686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13687 (eval $ac_try) 2>&5
13688 ac_status=$?
13689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13690 (exit $ac_status); }; }
13691 then
13692 gcc_cv_as_comdat_group_percent=yes
13693 else
13694 echo "configure: failed program was" >&5
13695 cat conftest.s >&5
13696 fi
13697 rm -f conftest.o conftest.s
13698 fi
13699fi
13700echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
13701echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
13702
13703fi
13704
13705cat >>confdefs.h <<_ACEOF
13706#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`
13707_ACEOF
13708
13709
8ada417f 13710# Thread-local storage - the check is heavily parametrized.
f996902d
RH
13711conftest_s=
13712tls_first_major=
13713tls_first_minor=
9739c90c 13714tls_as_opt=
f996902d 13715case "$target" in
6f9b006d
RH
13716 alpha*-*-*)
13717 conftest_s='
13718 .section ".tdata","awT",@progbits
13719foo: .long 25
13720 .text
13721 ldq $27,__tls_get_addr($29) !literal!1
13722 lda $16,foo($29) !tlsgd!1
13723 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
13724 ldq $27,__tls_get_addr($29) !literal!2
13725 lda $16,foo($29) !tlsldm!2
13726 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
13727 ldq $1,foo($29) !gotdtprel
13728 ldah $2,foo($29) !dtprelhi
13729 lda $3,foo($2) !dtprello
13730 lda $4,foo($29) !dtprel
13731 ldq $1,foo($29) !gottprel
13732 ldah $2,foo($29) !tprelhi
13733 lda $3,foo($2) !tprello
13734 lda $4,foo($29) !tprel'
13735 tls_first_major=2
13736 tls_first_minor=13
2f3321ca 13737 tls_as_opt=--fatal-warnings
6f9b006d 13738 ;;
e4dd71de
AH
13739 frv*-*-*)
13740 conftest_s='
13741 .section ".tdata","awT",@progbits
13742x: .long 25
13743 .text
13744 call #gettlsoff(x)'
13745 tls_first_major=2
13746 tls_first_minor=14
13747 ;;
f996902d
RH
13748 i[34567]86-*-*)
13749 conftest_s='
13750 .section ".tdata","awT",@progbits
13751foo: .long 25
13752 .text
13753 movl %gs:0, %eax
13754 leal foo@TLSGD(,%ebx,1), %eax
13755 leal foo@TLSLDM(%ebx), %eax
13756 leal foo@DTPOFF(%eax), %edx
13757 movl foo@GOTTPOFF(%ebx), %eax
13758 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
13759 addl foo@GOTNTPOFF(%ebx), %eax
13760 movl foo@INDNTPOFF, %eax
f996902d
RH
13761 movl $foo@TPOFF, %eax
13762 subl $foo@TPOFF, %eax
13763 leal foo@NTPOFF(%ecx), %eax'
13764 tls_first_major=2
75d38379 13765 tls_first_minor=14
2f3321ca 13766 tls_as_opt=--fatal-warnings
75d38379
JJ
13767 ;;
13768 x86_64-*-*)
13769 conftest_s='
13770 .section ".tdata","awT",@progbits
13771foo: .long 25
13772 .text
13773 movq %fs:0, %rax
13774 leaq foo@TLSGD(%rip), %rdi
13775 leaq foo@TLSLD(%rip), %rdi
13776 leaq foo@DTPOFF(%rax), %rdx
13777 movq foo@GOTTPOFF(%rip), %rax
13778 movq $foo@TPOFF, %rax'
13779 tls_first_major=2
13780 tls_first_minor=14
2f3321ca 13781 tls_as_opt=--fatal-warnings
f996902d 13782 ;;
7b6e506e
RH
13783 ia64-*-*)
13784 conftest_s='
13785 .section ".tdata","awT",@progbits
13786foo: data8 25
13787 .text
13788 addl r16 = @ltoff(@dtpmod(foo#)), gp
13789 addl r17 = @ltoff(@dtprel(foo#)), gp
13790 addl r18 = @ltoff(@tprel(foo#)), gp
13791 addl r19 = @dtprel(foo#), gp
13792 adds r21 = @dtprel(foo#), r13
13793 movl r23 = @dtprel(foo#)
13794 addl r20 = @tprel(foo#), gp
13795 adds r22 = @tprel(foo#), r13
13796 movl r24 = @tprel(foo#)'
13797 tls_first_major=2
13798 tls_first_minor=13
2f3321ca 13799 tls_as_opt=--fatal-warnings
7b6e506e 13800 ;;
69229b81
DJ
13801 mips*-*-*)
13802 conftest_s='
13803 .section .tdata,"awT",@progbits
13804x:
13805 .word 2
13806 .text
13807 addiu $4, $28, %tlsgd(x)
13808 addiu $4, $28, %tlsldm(x)
13809 lui $4, %dtprel_hi(x)
13810 addiu $4, $4, %dtprel_lo(x)
13811 lw $4, %gottprel(x)($28)
13812 lui $4, %tprel_hi(x)
13813 addiu $4, $4, %tprel_lo(x)'
13814 tls_first_major=2
13815 tls_first_minor=16
13816 tls_as_opt='-32 --fatal-warnings'
13817 ;;
c4501e62
JJ
13818 powerpc-*-*)
13819 conftest_s='
13820 .section ".tdata","awT",@progbits
13821 .align 2
13822ld0: .space 4
13823ld1: .space 4
13824x1: .space 4
13825x2: .space 4
13826x3: .space 4
13827 .text
13828 addi 3,31,ld0@got@tlsgd
13829 bl __tls_get_addr
13830 addi 3,31,x1@got@tlsld
13831 bl __tls_get_addr
13832 addi 9,3,x1@dtprel
13833 addis 9,3,x2@dtprel@ha
13834 addi 9,9,x2@dtprel@l
13835 lwz 9,x3@got@tprel(31)
13836 add 9,9,x@tls
13837 addi 9,2,x1@tprel
13838 addis 9,2,x2@tprel@ha
13839 addi 9,9,x2@tprel@l'
13840 tls_first_major=2
13841 tls_first_minor=14
2f3321ca 13842 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
13843 ;;
13844 powerpc64-*-*)
13845 conftest_s='
13846 .section ".tdata","awT",@progbits
13847 .align 3
13848ld0: .space 8
13849ld1: .space 8
13850x1: .space 8
13851x2: .space 8
13852x3: .space 8
13853 .text
13854 addi 3,2,ld0@got@tlsgd
13855 bl .__tls_get_addr
13856 nop
13857 addi 3,2,ld1@toc
13858 bl .__tls_get_addr
13859 nop
13860 addi 3,2,x1@got@tlsld
13861 bl .__tls_get_addr
13862 nop
13863 addi 9,3,x1@dtprel
13864 bl .__tls_get_addr
13865 nop
13866 addis 9,3,x2@dtprel@ha
13867 addi 9,9,x2@dtprel@l
13868 bl .__tls_get_addr
13869 nop
13870 ld 9,x3@got@dtprel(2)
13871 add 9,9,3
13872 bl .__tls_get_addr
13873 nop'
13874 tls_first_major=2
13875 tls_first_minor=14
2f3321ca 13876 tls_as_opt="-a64 --fatal-warnings"
c4501e62 13877 ;;
fd3cd001
UW
13878 s390-*-*)
13879 conftest_s='
13880 .section ".tdata","awT",@progbits
13881foo: .long 25
13882 .text
13883 .long foo@TLSGD
13884 .long foo@TLSLDM
13885 .long foo@DTPOFF
13886 .long foo@NTPOFF
13887 .long foo@GOTNTPOFF
13888 .long foo@INDNTPOFF
13889 l %r1,foo@GOTNTPOFF(%r12)
13890 l %r1,0(%r1):tls_load:foo
13891 bas %r14,0(%r1,%r13):tls_gdcall:foo
13892 bas %r14,0(%r1,%r13):tls_ldcall:foo'
13893 tls_first_major=2
13894 tls_first_minor=14
2f3321ca 13895 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
13896 ;;
13897 s390x-*-*)
13898 conftest_s='
13899 .section ".tdata","awT",@progbits
13900foo: .long 25
13901 .text
13902 .quad foo@TLSGD
13903 .quad foo@TLSLDM
13904 .quad foo@DTPOFF
13905 .quad foo@NTPOFF
13906 .quad foo@GOTNTPOFF
13907 lg %r1,foo@GOTNTPOFF(%r12)
13908 larl %r1,foo@INDNTPOFF
13909 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
13910 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
13911 tls_first_major=2
13912 tls_first_minor=14
2f3321ca 13913 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 13914 ;;
9ff13962
KK
13915 sh-*-* | sh[34]-*-*)
13916 conftest_s='
13917 .section ".tdata","awT",@progbits
13918foo: .long 25
13919 .text
13920 .long foo@TLSGD
13921 .long foo@TLSLDM
13922 .long foo@DTPOFF
13923 .long foo@GOTTPOFF
13924 .long foo@TPOFF'
13925 tls_first_major=2
13926 tls_first_minor=13
2f3321ca 13927 tls_as_opt=--fatal-warnings
9ff13962 13928 ;;
5751a10b 13929 sparc*-*-*)
2f3321ca
EB
13930 case "$target" in
13931 sparc*-sun-solaris2.*)
13932 on_solaris=yes
13933 ;;
13934 *)
13935 on_solaris=no
13936 ;;
13937 esac
13938 if test x$on_solaris = xyes && test x$gas_flag = xno; then
13939 conftest_s='
13940 .section ".tdata",#alloc,#write,#tls
13941foo: .long 25
13942 .text
13943 sethi %tgd_hi22(foo), %o0
13944 add %o0, %tgd_lo10(foo), %o1
13945 add %l7, %o1, %o0, %tgd_add(foo)
13946 call __tls_get_addr, %tgd_call(foo)
13947 sethi %tldm_hi22(foo), %l1
13948 add %l1, %tldm_lo10(foo), %l2
13949 add %l7, %l2, %o0, %tldm_add(foo)
13950 call __tls_get_addr, %tldm_call(foo)
13951 sethi %tldo_hix22(foo), %l3
13952 xor %l3, %tldo_lox10(foo), %l4
13953 add %o0, %l4, %l5, %tldo_add(foo)
13954 sethi %tie_hi22(foo), %o3
13955 add %o3, %tie_lo10(foo), %o3
13956 ld [%l7 + %o3], %o2, %tie_ld(foo)
13957 add %g7, %o2, %o4, %tie_add(foo)
13958 sethi %tle_hix22(foo), %l1
13959 xor %l1, %tle_lox10(foo), %o5
13960 ld [%g7 + %o5], %o1'
13961 tls_first_major=0
13962 tls_first_minor=0
13963 else
13964 conftest_s='
5751a10b
JJ
13965 .section ".tdata","awT",@progbits
13966foo: .long 25
13967 .text
13968 sethi %tgd_hi22(foo), %o0
13969 add %o0, %tgd_lo10(foo), %o1
13970 add %l7, %o1, %o0, %tgd_add(foo)
13971 call __tls_get_addr, %tgd_call(foo)
13972 sethi %tldm_hi22(foo), %l1
13973 add %l1, %tldm_lo10(foo), %l2
13974 add %l7, %l2, %o0, %tldm_add(foo)
13975 call __tls_get_addr, %tldm_call(foo)
13976 sethi %tldo_hix22(foo), %l3
13977 xor %l3, %tldo_lox10(foo), %l4
13978 add %o0, %l4, %l5, %tldo_add(foo)
13979 sethi %tie_hi22(foo), %o3
13980 add %o3, %tie_lo10(foo), %o3
13981 ld [%l7 + %o3], %o2, %tie_ld(foo)
13982 add %g7, %o2, %o4, %tie_add(foo)
13983 sethi %tle_hix22(foo), %l1
13984 xor %l1, %tle_lox10(foo), %o5
13985 ld [%g7 + %o5], %o1'
13986 tls_first_major=2
13987 tls_first_minor=14
2f3321ca
EB
13988 tls_as_opt="-32 --fatal-warnings"
13989 fi
5751a10b 13990 ;;
f996902d
RH
13991esac
13992if test -z "$tls_first_major"; then
8ada417f
ZW
13993 : # If we don't have a check, assume no support.
13994else
ba479fd2
NN
13995 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
13996echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
13997if test "${gcc_cv_as_tls+set}" = set; then
13998 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
13999else
14000 gcc_cv_as_tls=no
14001 if test $in_tree_gas = yes; then
14002 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
14003 then gcc_cv_as_tls=yes
ad9c4d9f 14004fi
8ada417f 14005 elif test x$gcc_cv_as != x; then
6e3f3080 14006 echo "$conftest_s" > conftest.s
2f3321ca 14007 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
14008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14009 (eval $ac_try) 2>&5
14010 ac_status=$?
14011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14012 (exit $ac_status); }; }
8ada417f
ZW
14013 then
14014 gcc_cv_as_tls=yes
14015 else
14016 echo "configure: failed program was" >&5
14017 cat conftest.s >&5
14018 fi
14019 rm -f conftest.o conftest.s
f996902d 14020 fi
f996902d 14021fi
ba479fd2
NN
14022echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
14023echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 14024if test $gcc_cv_as_tls = yes; then
ba479fd2
NN
14025
14026cat >>confdefs.h <<\_ACEOF
f996902d 14027#define HAVE_AS_TLS 1
ba479fd2 14028_ACEOF
f996902d
RH
14029
14030fi
8ada417f
ZW
14031fi
14032
14033# Target-specific assembler checks.
f996902d 14034
7e9d8517
L
14035echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
14036echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
14037gcc_cv_ld_static_dynamic=no
14038if test $in_tree_ld = yes ; then
14039 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
14040 gcc_cv_ld_static_dynamic=yes
14041 fi
14042elif test x$gcc_cv_ld != x; then
14043 # Check if linker supports -Bstatic/-Bdynamic option
14044 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
14045 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
14046 gcc_cv_ld_static_dynamic=yes
14047 fi
14048fi
14049if test x"$gcc_cv_ld_static_dynamic" = xyes; then
14050
14051cat >>confdefs.h <<\_ACEOF
14052#define HAVE_LD_STATIC_DYNAMIC 1
14053_ACEOF
14054
14055fi
14056echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14057echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
14058
d594623a
L
14059if test x"$demangler_in_ld" = xyes; then
14060 echo "$as_me:$LINENO: checking linker --demangle support" >&5
14061echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
14062 gcc_cv_ld_demangle=no
14063 if test $in_tree_ld = yes; then
14064 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 \
14065 gcc_cv_ld_demangle=yes
14066 fi
14067 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14068 # Check if the GNU linker supports --demangle option
14069 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14070 gcc_cv_ld_demangle=yes
14071 fi
14072 fi
14073 if test x"$gcc_cv_ld_demangle" = xyes; then
14074
14075cat >>confdefs.h <<\_ACEOF
14076#define HAVE_LD_DEMANGLE 1
14077_ACEOF
14078
14079 fi
14080 echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14081echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
14082fi
14083
3a37b08e
RH
14084case "$target" in
14085 # All TARGET_ABI_OSF targets.
14086 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
14087 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14088echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14089if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14090 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 14091else
8ada417f
ZW
14092 gcc_cv_as_alpha_explicit_relocs=no
14093 if test $in_tree_gas = yes; then
14094 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14095 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 14096fi
8ada417f 14097 elif test x$gcc_cv_as != x; then
6e3f3080 14098 echo ' .set nomacro
3a37b08e
RH
14099 .text
14100 extbl $3, $2, $3 !lituse_bytoff!1
14101 ldq $2, a($29) !literal!1
14102 ldq $4, b($29) !literal!2
14103 ldq_u $3, 0($2) !lituse_base!1
14104 ldq $27, f($29) !literal!5
14105 jsr $26, ($27), f !lituse_jsr!5
14106 ldah $29, 0($26) !gpdisp!3
14107 lda $0, c($29) !gprel
14108 ldah $1, d($29) !gprelhigh
14109 lda $1, d($1) !gprellow
8ada417f 14110 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
14111 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14113 (eval $ac_try) 2>&5
14114 ac_status=$?
14115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14116 (exit $ac_status); }; }
8ada417f
ZW
14117 then
14118 gcc_cv_as_alpha_explicit_relocs=yes
14119 else
14120 echo "configure: failed program was" >&5
14121 cat conftest.s >&5
14122 fi
14123 rm -f conftest.o conftest.s
14124 fi
cafe096b 14125fi
ba479fd2
NN
14126echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14127echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 14128if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
14129
14130cat >>confdefs.h <<\_ACEOF
3a37b08e 14131#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 14132_ACEOF
3a37b08e 14133
86da66b5
HPN
14134fi
14135 ;;
14136
14137 cris-*-*)
14138 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14139echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
14140if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14141 echo $ECHO_N "(cached) $ECHO_C" >&6
14142else
14143 gcc_cv_as_cris_no_mul_bug=no
14144 if test $in_tree_gas = yes; then
14145 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14146 then gcc_cv_as_cris_no_mul_bug=yes
14147fi
14148 elif test x$gcc_cv_as != x; then
14149 echo '.text' > conftest.s
14150 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14152 (eval $ac_try) 2>&5
14153 ac_status=$?
14154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14155 (exit $ac_status); }; }
14156 then
14157 gcc_cv_as_cris_no_mul_bug=yes
14158 else
14159 echo "configure: failed program was" >&5
14160 cat conftest.s >&5
14161 fi
14162 rm -f conftest.o conftest.s
14163 fi
14164fi
14165echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14166echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
14167if test $gcc_cv_as_cris_no_mul_bug = yes; then
14168
14169cat >>confdefs.h <<\_ACEOF
14170#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14171_ACEOF
14172
8ada417f 14173fi
3a37b08e 14174 ;;
8ada417f 14175
1cb36a98 14176 sparc*-*-*)
ba479fd2
NN
14177 echo "$as_me:$LINENO: checking assembler for .register" >&5
14178echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
14179if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14180 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14181else
8ada417f
ZW
14182 gcc_cv_as_sparc_register_op=no
14183 if test x$gcc_cv_as != x; then
6e3f3080 14184 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
14185 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14187 (eval $ac_try) 2>&5
14188 ac_status=$?
14189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14190 (exit $ac_status); }; }
8ada417f
ZW
14191 then
14192 gcc_cv_as_sparc_register_op=yes
14193 else
14194 echo "configure: failed program was" >&5
14195 cat conftest.s >&5
14196 fi
14197 rm -f conftest.o conftest.s
14198 fi
cafe096b 14199fi
ba479fd2
NN
14200echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
14201echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 14202if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
14203
14204cat >>confdefs.h <<\_ACEOF
1cb36a98 14205#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 14206_ACEOF
1cb36a98 14207
8ada417f 14208fi
1cb36a98 14209
ba479fd2
NN
14210 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
14211echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
14212if test "${gcc_cv_as_sparc_relax+set}" = set; then
14213 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 14214else
8ada417f
ZW
14215 gcc_cv_as_sparc_relax=no
14216 if test x$gcc_cv_as != x; then
6e3f3080 14217 echo '.text' > conftest.s
ba479fd2
NN
14218 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
14219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14220 (eval $ac_try) 2>&5
14221 ac_status=$?
14222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14223 (exit $ac_status); }; }
8ada417f
ZW
14224 then
14225 gcc_cv_as_sparc_relax=yes
14226 else
14227 echo "configure: failed program was" >&5
14228 cat conftest.s >&5
14229 fi
14230 rm -f conftest.o conftest.s
14231 fi
cafe096b 14232fi
ba479fd2
NN
14233echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
14234echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 14235if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
14236
14237cat >>confdefs.h <<\_ACEOF
e95b1e6a 14238#define HAVE_AS_RELAX_OPTION 1
ba479fd2 14239_ACEOF
e95b1e6a 14240
8ada417f 14241fi
e95b1e6a 14242
ba479fd2
NN
14243 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
14244echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
14245if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
14246 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 14247else
8ada417f
ZW
14248 gcc_cv_as_sparc_ua_pcrel=no
14249 if test x$gcc_cv_as != x; then
6e3f3080 14250 echo '.text
8ada417f
ZW
14251foo:
14252 nop
14253.data
14254.align 4
14255.byte 0
14256.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
14257 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14259 (eval $ac_try) 2>&5
14260 ac_status=$?
14261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14262 (exit $ac_status); }; }
8ada417f
ZW
14263 then
14264 if test x$gcc_cv_ld != x \
14265 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
14266 gcc_cv_as_sparc_ua_pcrel=yes
14267 fi
14268 rm -f conftest
14269 else
14270 echo "configure: failed program was" >&5
14271 cat conftest.s >&5
14272 fi
14273 rm -f conftest.o conftest.s
14274 fi
cafe096b 14275fi
ba479fd2
NN
14276echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
14277echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 14278if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
14279
14280cat >>confdefs.h <<\_ACEOF
17e9e88c 14281#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 14282_ACEOF
17e9e88c 14283
17e9e88c 14284
ba479fd2
NN
14285 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
14286echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
14287if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
14288 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 14289else
8ada417f
ZW
14290 gcc_cv_as_sparc_ua_pcrel_hidden=no
14291 if test x$gcc_cv_as != x; then
6e3f3080 14292 echo '.data
8ada417f
ZW
14293.align 4
14294.byte 0x31
14295.uaword %r_disp32(foo)
14296.byte 0x32, 0x33, 0x34
14297.global foo
14298.hidden foo
14299foo:
14300.skip 4' > conftest.s
ba479fd2
NN
14301 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
14302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14303 (eval $ac_try) 2>&5
14304 ac_status=$?
14305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14306 (exit $ac_status); }; }
8ada417f
ZW
14307 then
14308 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
14309 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
14310 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
14311 | grep ' 31000000 07323334' > /dev/null 2>&1; then
14312 if $gcc_cv_objdump -R conftest 2> /dev/null \
14313 | grep 'DISP32' > /dev/null 2>&1; then
14314 :
14315 else
14316 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 14317 fi
8ada417f
ZW
14318 fi
14319 rm -f conftest
14320 else
14321 echo "configure: failed program was" >&5
14322 cat conftest.s >&5
14323 fi
14324 rm -f conftest.o conftest.s
14325 fi
cafe096b 14326fi
ba479fd2
NN
14327echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
14328echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 14329if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
14330
14331cat >>confdefs.h <<\_ACEOF
cf7b8b0d 14332#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 14333_ACEOF
cf7b8b0d 14334
8ada417f 14335fi
ba479fd2 14336
8ada417f 14337fi # unaligned pcrel relocs
cf7b8b0d 14338
ba479fd2
NN
14339 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
14340echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
14341if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
14342 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 14343else
8ada417f
ZW
14344 gcc_cv_as_sparc_offsetable_lo10=no
14345 if test x$gcc_cv_as != x; then
6e3f3080 14346 echo '.text
8ada417f
ZW
14347 or %g1, %lo(ab) + 12, %g1
14348 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
14349 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
14350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14351 (eval $ac_try) 2>&5
14352 ac_status=$?
14353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14354 (exit $ac_status); }; }
8ada417f
ZW
14355 then
14356 if test x$gcc_cv_objdump != x \
ecb0ccbc 14357 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 14358 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 14359 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
14360 fi
14361 else
14362 echo "configure: failed program was" >&5
14363 cat conftest.s >&5
14364 fi
14365 rm -f conftest.o conftest.s
14366 fi
cafe096b 14367fi
ba479fd2
NN
14368echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
14369echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 14370if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
14371
14372cat >>confdefs.h <<\_ACEOF
1cb36a98 14373#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 14374_ACEOF
1cb36a98 14375
8ada417f 14376fi
1cb36a98
RH
14377 ;;
14378
c307e6dd 14379 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
14380 case $target_os in
14381 cygwin* | pe | mingw32*)
14382 # Used for DWARF 2 in PE
14383 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
14384echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
14385if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
14386 echo $ECHO_N "(cached) $ECHO_C" >&6
14387else
14388 gcc_cv_as_ix86_pe_secrel32=no
14389 if test $in_tree_gas = yes; then
14390 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14391 then gcc_cv_as_ix86_pe_secrel32=yes
14392fi
14393 elif test x$gcc_cv_as != x; then
14394 echo '.text
14395foo: nop
14396.data
14397 .secrel32 foo' > conftest.s
14398 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14400 (eval $ac_try) 2>&5
14401 ac_status=$?
14402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14403 (exit $ac_status); }; }
14404 then
14405 if test x$gcc_cv_ld != x \
14406 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
14407 gcc_cv_as_ix86_pe_secrel32=yes
14408 fi
14409 rm -f conftest
14410 else
14411 echo "configure: failed program was" >&5
14412 cat conftest.s >&5
14413 fi
14414 rm -f conftest.o conftest.s
14415 fi
14416fi
14417echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
14418echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
14419if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
14420
14421cat >>confdefs.h <<\_ACEOF
14422#define HAVE_GAS_PE_SECREL32_RELOC 1
14423_ACEOF
14424
14425fi
14426 ;;
14427 esac
14428
ba479fd2
NN
14429 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
14430echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
14431if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
14432 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14433else
14434 gcc_cv_as_ix86_filds_fists=no
14435 if test $in_tree_gas = yes; then
14436 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
14437 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 14438fi
8ada417f 14439 elif test x$gcc_cv_as != x; then
6e3f3080 14440 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
14441 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14443 (eval $ac_try) 2>&5
14444 ac_status=$?
14445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14446 (exit $ac_status); }; }
8ada417f
ZW
14447 then
14448 gcc_cv_as_ix86_filds_fists=yes
14449 else
14450 echo "configure: failed program was" >&5
14451 cat conftest.s >&5
981d4858 14452 fi
8ada417f
ZW
14453 rm -f conftest.o conftest.s
14454 fi
14455fi
ba479fd2
NN
14456echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
14457echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 14458if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
14459
14460cat >>confdefs.h <<\_ACEOF
8ada417f 14461#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 14462_ACEOF
ad9c4d9f 14463
f6f5dff2
RO
14464fi
14465
ba479fd2
NN
14466 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
14467echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
14468if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
14469 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
14470else
14471 gcc_cv_as_ix86_cmov_sun_syntax=no
14472 if test x$gcc_cv_as != x; then
6e3f3080 14473 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
14474 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14476 (eval $ac_try) 2>&5
14477 ac_status=$?
14478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14479 (exit $ac_status); }; }
f6f5dff2
RO
14480 then
14481 gcc_cv_as_ix86_cmov_sun_syntax=yes
14482 else
14483 echo "configure: failed program was" >&5
14484 cat conftest.s >&5
14485 fi
14486 rm -f conftest.o conftest.s
14487 fi
14488fi
ba479fd2
NN
14489echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
14490echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 14491if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
14492
14493cat >>confdefs.h <<\_ACEOF
f6f5dff2 14494#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 14495_ACEOF
f6f5dff2 14496
ad9c4d9f
NN
14497fi
14498
6f3ca281
ZW
14499 # This one is used unconditionally by i386.[ch]; it is to be defined
14500 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
14501 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
14502echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
14503if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
14504 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14505else
14506 gcc_cv_as_ix86_gotoff_in_data=no
14507 if test $in_tree_gas = yes; then
14508 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14509 then gcc_cv_as_ix86_gotoff_in_data=yes
14510fi
14511 elif test x$gcc_cv_as != x; then
6e3f3080 14512 echo ' .text
f88c65f7
RH
14513.L0:
14514 nop
14515 .data
8ada417f 14516 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
14517 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14519 (eval $ac_try) 2>&5
14520 ac_status=$?
14521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14522 (exit $ac_status); }; }
8ada417f
ZW
14523 then
14524 gcc_cv_as_ix86_gotoff_in_data=yes
14525 else
14526 echo "configure: failed program was" >&5
14527 cat conftest.s >&5
f88c65f7 14528 fi
8ada417f
ZW
14529 rm -f conftest.o conftest.s
14530 fi
14531fi
ba479fd2
NN
14532echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
14533echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 14534
6f3ca281 14535
ba479fd2 14536cat >>confdefs.h <<_ACEOF
6f3ca281 14537#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 14538_ACEOF
f88c65f7 14539
1cb36a98 14540 ;;
ef1ecf87
RH
14541
14542 ia64*-*-*)
ba479fd2
NN
14543 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
14544echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
14545if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
14546 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 14547else
8ada417f
ZW
14548 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
14549 if test $in_tree_gas = yes; then
14550 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14551 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 14552fi
8ada417f 14553 elif test x$gcc_cv_as != x; then
6e3f3080 14554 echo ' .text
ef1ecf87
RH
14555 addl r15 = @ltoffx(x#), gp
14556 ;;
cfa9ee99 14557 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
14558 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14560 (eval $ac_try) 2>&5
14561 ac_status=$?
14562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14563 (exit $ac_status); }; }
8ada417f 14564 then
cfa9ee99 14565 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
14566 else
14567 echo "configure: failed program was" >&5
14568 cat conftest.s >&5
2c4a9cff 14569 fi
8ada417f
ZW
14570 rm -f conftest.o conftest.s
14571 fi
14572fi
ba479fd2
NN
14573echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
14574echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 14575if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
14576
14577cat >>confdefs.h <<\_ACEOF
cfa9ee99 14578#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 14579_ACEOF
8ada417f 14580
cfa9ee99 14581fi
8ada417f 14582
2c4a9cff 14583 ;;
8ada417f 14584
2c4a9cff 14585 powerpc*-*-*)
8ada417f 14586 case $target in
432218ba
DE
14587 *-*-aix*) conftest_s=' .machine "pwr5"
14588 .csect .text[PR]
6b37db3c 14589 mfcr 3,128';;
8af4d362
PB
14590 *-*-darwin*)
14591 echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
14592echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
14593if test "${gcc_cv_as_machine_directive+set}" = set; then
14594 echo $ECHO_N "(cached) $ECHO_C" >&6
14595else
14596 gcc_cv_as_machine_directive=no
14597 if test x$gcc_cv_as != x; then
14598 echo ' .machine ppc7400' > conftest.s
14599 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14601 (eval $ac_try) 2>&5
14602 ac_status=$?
14603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14604 (exit $ac_status); }; }
14605 then
14606 gcc_cv_as_machine_directive=yes
14607 else
14608 echo "configure: failed program was" >&5
14609 cat conftest.s >&5
14610 fi
14611 rm -f conftest.o conftest.s
14612 fi
14613fi
14614echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
14615echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
14616
14617 if test x$gcc_cv_as_machine_directive != xyes; then
14618 echo "*** This target requires an assembler supporting \".machine\"" >&2
14619 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
14620 test x$build = x$target && exit 1
14621 fi
14622 conftest_s=' .text
6b37db3c 14623 mfcr r3,128';;
4c67db14 14624 *) conftest_s=' .machine power4
d2ab3e37 14625 .text
6b37db3c 14626 mfcr 3,128';;
8ada417f 14627 esac
8ada417f 14628
ba479fd2
NN
14629 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
14630echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
14631if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
14632 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 14633else
8ada417f
ZW
14634 gcc_cv_as_powerpc_mfcrf=no
14635 if test $in_tree_gas = yes; then
14636 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14637 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 14638fi
8ada417f 14639 elif test x$gcc_cv_as != x; then
6e3f3080 14640 echo "$conftest_s" > conftest.s
ba479fd2
NN
14641 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14643 (eval $ac_try) 2>&5
14644 ac_status=$?
14645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14646 (exit $ac_status); }; }
8ada417f
ZW
14647 then
14648 gcc_cv_as_powerpc_mfcrf=yes
14649 else
14650 echo "configure: failed program was" >&5
14651 cat conftest.s >&5
14652 fi
14653 rm -f conftest.o conftest.s
14654 fi
2c4a9cff 14655fi
ba479fd2
NN
14656echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
14657echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 14658if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
14659
14660cat >>confdefs.h <<\_ACEOF
2c4a9cff 14661#define HAVE_AS_MFCRF 1
ba479fd2 14662_ACEOF
ef1ecf87 14663
8ada417f 14664fi
432218ba
DE
14665
14666 case $target in
14667 *-*-aix*) conftest_s=' .machine "pwr5"
14668 .csect .text[PR]
14669 popcntb 3,3';;
14670 *) conftest_s=' .machine power5
14671 .text
14672 popcntb 3,3';;
14673 esac
14674
14675 echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
14676echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
14677if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
14678 echo $ECHO_N "(cached) $ECHO_C" >&6
14679else
14680 gcc_cv_as_powerpc_popcntb=no
14681 if test $in_tree_gas = yes; then
14682 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
14683 then gcc_cv_as_powerpc_popcntb=yes
14684fi
14685 elif test x$gcc_cv_as != x; then
14686 echo "$conftest_s" > conftest.s
14687 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14689 (eval $ac_try) 2>&5
14690 ac_status=$?
14691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14692 (exit $ac_status); }; }
14693 then
14694 gcc_cv_as_powerpc_popcntb=yes
14695 else
14696 echo "configure: failed program was" >&5
14697 cat conftest.s >&5
14698 fi
14699 rm -f conftest.o conftest.s
14700 fi
14701fi
14702echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
14703echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
14704if test $gcc_cv_as_powerpc_popcntb = yes; then
14705
14706cat >>confdefs.h <<\_ACEOF
14707#define HAVE_AS_POPCNTB 1
14708_ACEOF
14709
14710fi
14711
8ada417f
ZW
14712 ;;
14713
14714 mips*-*-*)
ba479fd2
NN
14715 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14716echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14717if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
14718 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14719else
14720 gcc_cv_as_mips_explicit_relocs=no
14721 if test $in_tree_gas = yes; then
14722 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
14723 then gcc_cv_as_mips_explicit_relocs=yes
14724fi
14725 elif test x$gcc_cv_as != x; then
6e3f3080 14726 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
14727 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14729 (eval $ac_try) 2>&5
14730 ac_status=$?
14731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14732 (exit $ac_status); }; }
8ada417f
ZW
14733 then
14734 gcc_cv_as_mips_explicit_relocs=yes
14735 else
14736 echo "configure: failed program was" >&5
14737 cat conftest.s >&5
ef1ecf87 14738 fi
8ada417f
ZW
14739 rm -f conftest.o conftest.s
14740 fi
14741fi
ba479fd2
NN
14742echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
14743echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
14744if test $gcc_cv_as_mips_explicit_relocs = yes; then
14745 if test x$target_cpu_default = x
14746 then target_cpu_default=MASK_EXPLICIT_RELOCS
14747 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
14748 fi
14749fi
14750
82563d35
RS
14751 if test x$gas_flag = xyes \
14752 || test x"$host" != x"$build" \
14753 || test ! -x "$gcc_cv_as" \
14754 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
14755 :
14756 else
14757 echo "*** This configuration requires the GNU assembler" >&2
14758 exit 1
14759 fi
ef1ecf87 14760 ;;
1cb36a98 14761esac
9d147085
RH
14762# ??? Not all targets support dwarf2 debug_line, even within a version
14763# of gas. Moreover, we need to emit a valid instruction to trigger any
14764# info to the output file. So, as supported targets are added to gas 2.11,
14765# add some instruction here to (also) show we expect this might work.
14766# ??? Once 2.11 is released, probably need to add first known working
14767# version to the per-target configury.
14768case "$target" in
80486e06 14769 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 14770 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
d116bdf8 14771 | xstormy16*-*-* | cris-*-* | xtensa-*-*)
9d147085
RH
14772 insn="nop"
14773 ;;
57116d8d 14774 ia64*-*-* | s390*-*-*)
9d147085
RH
14775 insn="nop 0"
14776 ;;
2853bc5a
HPN
14777 mmix-*-*)
14778 insn="swym 0"
14779 ;;
8ada417f
ZW
14780esac
14781if test x"$insn" != x; then
14782 conftest_s="\
14783 .file 1 \"conftest.s\"
14784 .loc 1 3 0
14785 $insn"
ba479fd2
NN
14786 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
14787echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
14788if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
14789 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14790else
14791 gcc_cv_as_dwarf2_debug_line=no
14792 if test $in_tree_gas = yes; then
14793 if test $in_tree_gas_is_elf = yes \
14794 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14795 then gcc_cv_as_dwarf2_debug_line=yes
14796fi
14797 elif test x$gcc_cv_as != x; then
6e3f3080 14798 echo "$conftest_s" > conftest.s
ba479fd2
NN
14799 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14801 (eval $ac_try) 2>&5
14802 ac_status=$?
14803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14804 (exit $ac_status); }; }
8ada417f 14805 then
080a5bb0
EB
14806 if test x$gcc_cv_objdump != x \
14807 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
14808 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
14809 gcc_cv_as_dwarf2_debug_line=yes
14810 fi
14811 else
14812 echo "configure: failed program was" >&5
14813 cat conftest.s >&5
14814 fi
14815 rm -f conftest.o conftest.s
14816 fi
14817fi
ba479fd2
NN
14818echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
14819echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 14820
ad9c4d9f 14821
8ada417f
ZW
14822# The .debug_line file table must be in the exact order that
14823# we specified the files, since these indices are also used
14824# by DW_AT_decl_file. Approximate this test by testing if
14825# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
14826 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
14827echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
14828if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
14829 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14830else
14831 gcc_cv_as_dwarf2_file_buggy=no
14832 if test x$gcc_cv_as != x; then
6e3f3080 14833 echo ' .file 1 "foo.s"
8ada417f 14834 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
14835 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14837 (eval $ac_try) 2>&5
14838 ac_status=$?
14839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14840 (exit $ac_status); }; }
8ada417f
ZW
14841 then
14842 gcc_cv_as_dwarf2_file_buggy=yes
14843 else
14844 echo "configure: failed program was" >&5
14845 cat conftest.s >&5
14846 fi
14847 rm -f conftest.o conftest.s
14848 fi
ad9c4d9f 14849fi
ba479fd2
NN
14850echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
14851echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
14852
14853
14854 if test $gcc_cv_as_dwarf2_debug_line = yes \
14855 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
14856
14857cat >>confdefs.h <<\_ACEOF
9d147085 14858#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 14859_ACEOF
9d147085 14860
8ada417f 14861 fi
ad9c4d9f 14862
ba479fd2
NN
14863 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
14864echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
14865if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
14866 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14867else
14868 gcc_cv_as_gdwarf2_flag=no
14869 if test $in_tree_gas = yes; then
14870 if test $in_tree_gas_is_elf = yes \
14871 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14872 then gcc_cv_as_gdwarf2_flag=yes
14873fi
14874 elif test x$gcc_cv_as != x; then
6e3f3080 14875 echo "$insn" > conftest.s
ba479fd2
NN
14876 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
14877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14878 (eval $ac_try) 2>&5
14879 ac_status=$?
14880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14881 (exit $ac_status); }; }
8ada417f
ZW
14882 then
14883 gcc_cv_as_gdwarf2_flag=yes
14884 else
14885 echo "configure: failed program was" >&5
14886 cat conftest.s >&5
14887 fi
14888 rm -f conftest.o conftest.s
14889 fi
ad9c4d9f 14890fi
ba479fd2
NN
14891echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
14892echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 14893if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
14894
14895cat >>confdefs.h <<\_ACEOF
5f0e9ea2 14896#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 14897_ACEOF
5f0e9ea2
GK
14898
14899fi
ad9c4d9f 14900
ba479fd2
NN
14901 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
14902echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
14903if test "${gcc_cv_as_gstabs_flag+set}" = set; then
14904 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14905else
14906 gcc_cv_as_gstabs_flag=no
14907 if test $in_tree_gas = yes; then
14908 if test $in_tree_gas_is_elf = yes \
14909 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14910 then gcc_cv_as_gstabs_flag=yes
14911fi
14912 elif test x$gcc_cv_as != x; then
6e3f3080 14913 echo "$insn" > conftest.s
ba479fd2
NN
14914 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
14915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14916 (eval $ac_try) 2>&5
14917 ac_status=$?
14918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14919 (exit $ac_status); }; }
8ada417f
ZW
14920 then
14921 # The native Solaris 9/Intel assembler doesn't understand --gstabs
14922 # and warns about it, but still exits successfully. So check for
14923 # this.
ba479fd2
NN
14924 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
14925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14926 (eval $ac_try) 2>&5
14927 ac_status=$?
14928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14929 (exit $ac_status); }; }
8ada417f
ZW
14930 then :
14931 else gcc_cv_as_gstabs_flag=yes
14932 fi
14933 else
14934 echo "configure: failed program was" >&5
14935 cat conftest.s >&5
14936 fi
14937 rm -f conftest.o conftest.s
14938 fi
ad9c4d9f 14939fi
ba479fd2
NN
14940echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
14941echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 14942if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
14943
14944cat >>confdefs.h <<\_ACEOF
5f0e9ea2 14945#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 14946_ACEOF
5f0e9ea2
GK
14947
14948fi
8ada417f 14949fi
5f0e9ea2 14950
ba479fd2
NN
14951echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
14952echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 14953gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 14954if test $in_tree_ld = yes ; then
5408ac6c
HPN
14955 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 \
14956 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
14957 gcc_cv_ld_ro_rw_mix=read-write
14958 fi
14959elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
14960 echo '.section myfoosect, "a"' > conftest1.s
14961 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 14962 echo '.byte 1' >> conftest2.s
90e145da 14963 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 14964 echo '.byte 0' >> conftest3.s
6cd656d0
KC
14965 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
14966 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
14967 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 14968 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 14969 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 14970 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 14971 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
14972 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
14973 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
14974 gcc_cv_ld_ro_rw_mix=read-only
14975 else
14976 gcc_cv_ld_ro_rw_mix=read-write
14977 fi
14978 fi
14979 fi
14980 rm -f conftest.* conftest[123].*
14981fi
14982if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
14983
14984cat >>confdefs.h <<\_ACEOF
96d0f4dc 14985#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 14986_ACEOF
96d0f4dc
JJ
14987
14988fi
ba479fd2
NN
14989echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
14990echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 14991
ba479fd2
NN
14992echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
14993echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 14994gcc_cv_ld_eh_frame_hdr=no
34a86c2b 14995if test $in_tree_ld = yes ; then
5408ac6c
HPN
14996 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 \
14997 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
14998 gcc_cv_ld_eh_frame_hdr=yes
14999 fi
15000elif test x$gcc_cv_ld != x; then
15001 # Check if linker supports --eh-frame-hdr option
15002 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
15003 gcc_cv_ld_eh_frame_hdr=yes
15004 fi
15005fi
232b67d9 15006
275b60d6 15007if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
15008
15009cat >>confdefs.h <<\_ACEOF
275b60d6 15010#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 15011_ACEOF
275b60d6
JJ
15012
15013fi
ba479fd2
NN
15014echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
15015echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 15016
ba479fd2
NN
15017echo "$as_me:$LINENO: checking linker position independent executable support" >&5
15018echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
15019gcc_cv_ld_pie=no
15020if test $in_tree_ld = yes ; then
5408ac6c
HPN
15021 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 \
15022 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
15023 gcc_cv_ld_pie=yes
15024 fi
15025elif test x$gcc_cv_ld != x; then
15026 # Check if linker supports -pie option
15027 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
15028 gcc_cv_ld_pie=yes
15029 fi
15030fi
15031if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
15032
15033cat >>confdefs.h <<\_ACEOF
24a4dd31 15034#define HAVE_LD_PIE 1
ba479fd2 15035_ACEOF
24a4dd31
JJ
15036
15037fi
ba479fd2
NN
15038echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
15039echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 15040
8bb915b6
NN
15041# --------
15042# UNSORTED
15043# --------
15044
765f1bf9
AM
15045echo "$as_me:$LINENO: checking linker --as-needed support" >&5
15046echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
15047if test "${gcc_cv_ld_as_needed+set}" = set; then
15048 echo $ECHO_N "(cached) $ECHO_C" >&6
15049else
15050 gcc_cv_ld_as_needed=no
765f1bf9
AM
15051if test $in_tree_ld = yes ; then
15052 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 \
15053 && test $in_tree_ld_is_elf = yes; then
15054 gcc_cv_ld_as_needed=yes
15055 fi
15056elif test x$gcc_cv_ld != x; then
15057 # Check if linker supports --as-needed and --no-as-needed options
15058 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
15059 gcc_cv_ld_as_needed=yes
15060 fi
15061fi
82e923f6
RS
15062
15063fi
15064echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
15065echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
15066if test x"$gcc_cv_ld_as_needed" = xyes; then
15067
15068cat >>confdefs.h <<\_ACEOF
15069#define HAVE_LD_AS_NEEDED 1
15070_ACEOF
15071
15072fi
765f1bf9 15073
85b776df
AM
15074case "$target" in
15075 powerpc64*-*-linux*)
15076 echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
15077echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
15078if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
15079 echo $ECHO_N "(cached) $ECHO_C" >&6
15080else
15081 gcc_cv_ld_no_dot_syms=no
15082 if test $in_tree_ld = yes ; then
15083 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
15084 gcc_cv_ld_no_dot_syms=yes
15085 fi
15086 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
15087 cat > conftest1.s <<EOF
15088 .text
15089 bl .foo
15090EOF
15091 cat > conftest2.s <<EOF
15092 .section ".opd","aw"
15093 .align 3
15094 .globl foo
15095 .type foo,@function
15096foo:
15097 .quad .LEfoo,.TOC.@tocbase,0
15098 .text
15099.LEfoo:
15100 blr
15101 .size foo,.-.LEfoo
15102EOF
15103 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
15104 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
15105 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
15106 gcc_cv_ld_no_dot_syms=yes
15107 fi
15108 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
15109 fi
15110
15111fi
15112echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
15113echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
15114 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
15115
15116cat >>confdefs.h <<\_ACEOF
15117#define HAVE_LD_NO_DOT_SYMS 1
15118_ACEOF
15119
15120 fi
15121 ;;
15122esac
15123
380e5ca4
MM
15124echo "$as_me:$LINENO: checking linker --sysroot support" >&5
15125echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
15126if test "${gcc_cv_ld_sysroot+set}" = set; then
15127 echo $ECHO_N "(cached) $ECHO_C" >&6
15128else
15129 gcc_cv_ld_sysroot=no
15130 if test $in_tree_ld = yes ; then
15131 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
15132 gcc_cv_ld_sysroot = yes
15133 fi
15134 elif test x$gcc_cv_ld != x; then
15135 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
15136 gcc_cv_ld_sysroot=yes
15137 fi
15138 fi
15139fi
15140echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
15141echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
15142if test x"$gcc_cv_ld_sysroot" = xyes; then
15143
15144cat >>confdefs.h <<\_ACEOF
15145#define HAVE_LD_SYSROOT 1
15146_ACEOF
15147
15148fi
15149
9fb28a67 15150if test x$with_sysroot = x && test x$host = x$target \
047d636f 15151 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
15152
15153cat >>confdefs.h <<_ACEOF
793e9558 15154#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 15155_ACEOF
793e9558
PB
15156
15157fi
15158
81bf3d9e 15159# Find out what GC implementation we want, or may, use.
ba479fd2 15160
81bf3d9e
RH
15161# Check whether --with-gc or --without-gc was given.
15162if test "${with_gc+set}" = set; then
15163 withval="$with_gc"
15164 case "$withval" in
08cee789 15165 page)
81bf3d9e 15166 GGC=ggc-$withval
08cee789
DJ
15167 ;;
15168 zone)
15169 GGC=ggc-$withval
15170
15171cat >>confdefs.h <<\_ACEOF
15172#define GGC_ZONE 1
15173_ACEOF
15174
81bf3d9e
RH
15175 ;;
15176 *)
ba479fd2
NN
15177 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
15178echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
15179 { (exit 1); exit 1; }; }
81bf3d9e
RH
15180 ;;
15181esac
15182else
005537df 15183 GGC=ggc-page
ba479fd2 15184fi;
81bf3d9e
RH
15185
15186echo "Using $GGC for garbage collection."
15187
3c809ba4 15188# Use the system's zlib library.
b8dad04b
ZW
15189zlibdir=-L../zlib
15190zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 15191
3c809ba4
AG
15192# Check whether --with-system-zlib or --without-system-zlib was given.
15193if test "${with_system_zlib+set}" = set; then
15194 withval="$with_system_zlib"
15195 zlibdir=
15196zlibinc=
15197
ba479fd2 15198fi;
3c809ba4
AG
15199
15200
15201
dc6746e7 15202
ba479fd2
NN
15203echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
15204echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
15205 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
15206if test "${enable_maintainer_mode+set}" = set; then
15207 enableval="$enable_maintainer_mode"
15208 maintainer_mode=$enableval
15209else
15210 maintainer_mode=no
ba479fd2 15211fi;
63cf211a 15212
ba479fd2
NN
15213echo "$as_me:$LINENO: result: $maintainer_mode" >&5
15214echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
15215
15216if test "$maintainer_mode" = "yes"; then
15217 MAINT=''
15218else
15219 MAINT='#'
15220fi
15221
8bb915b6
NN
15222# --------------
15223# Language hooks
15224# --------------
15225
861bb6c1
JL
15226# Make empty files to contain the specs and options for each language.
15227# Then add #include lines to for a compiler that has specs and/or options.
15228
d7b42618 15229lang_opt_files=
861bb6c1 15230lang_specs_files=
3103b7db 15231lang_tree_files=
861bb6c1
JL
15232for subdir in . $subdirs
15233do
d7b42618
NB
15234 if test -f $srcdir/$subdir/lang.opt; then
15235 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
15236 fi
75bffa71 15237 if test -f $srcdir/$subdir/lang-specs.h; then
0d24f4d1 15238 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
861bb6c1 15239 fi
3103b7db 15240 if test -f $srcdir/$subdir/$subdir-tree.def; then
0d24f4d1 15241 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
3103b7db 15242 fi
861bb6c1
JL
15243done
15244
15245# These (without "all_") are set in each config-lang.in.
15246# `language' must be a single word so is spelled singularly.
15247all_languages=
15248all_boot_languages=
15249all_compilers=
15250all_stagestuff=
53c7ffe7 15251all_outputs='Makefile gccbug mklibgcc libada-mk'
861bb6c1 15252# List of language makefile fragments.
2ed26f6b
ZW
15253all_lang_makefrags=
15254# List of language subdirectory makefiles. Deprecated.
861bb6c1 15255all_lang_makefiles=
e2500fed 15256# Files for gengtype
ef69da62 15257all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
15258# Files for gengtype with language
15259all_gtfiles_files_langs=
15260all_gtfiles_files_files=
861bb6c1
JL
15261
15262# Add the language fragments.
15263# Languages are added via two mechanisms. Some information must be
15264# recorded in makefile variables, these are defined in config-lang.in.
15265# We accumulate them and plug them into the main Makefile.
15266# The other mechanism is a set of hooks for each of the main targets
15267# like `clean', `install', etc.
15268
861bb6c1 15269language_hooks="Make-hooks"
861bb6c1 15270
c406e779 15271for s in $subdirs
861bb6c1 15272do
861bb6c1
JL
15273 language=
15274 boot_language=
15275 compilers=
15276 stagestuff=
861bb6c1 15277 outputs=
e2500fed 15278 gtfiles=
861bb6c1 15279 . ${srcdir}/$s/config-lang.in
75bffa71 15280 if test "x$language" = x
861bb6c1
JL
15281 then
15282 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
15283 exit 1
15284 fi
2ed26f6b 15285 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
72aaffbd 15286 if test -f ${srcdir}/$s/Makefile.in
2ed26f6b 15287 then all_lang_makefiles="$s/Makefile"
72aaffbd 15288 fi
861bb6c1 15289 all_languages="$all_languages $language"
75bffa71 15290 if test "x$boot_language" = xyes
861bb6c1
JL
15291 then
15292 all_boot_languages="$all_boot_languages $language"
15293 fi
15294 all_compilers="$all_compilers $compilers"
15295 all_stagestuff="$all_stagestuff $stagestuff"
861bb6c1 15296 all_outputs="$all_outputs $outputs"
e2500fed 15297 all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15298 for f in $gtfiles
8ac9d31f 15299 do
8ac9d31f
TJ
15300 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
15301 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f 15302 done
861bb6c1
JL
15303done
15304
8ac9d31f
TJ
15305# Pick up gtfiles for c
15306gtfiles=
15307s="c"
15308. ${srcdir}/c-config-lang.in
15309all_gtfiles="$all_gtfiles $gtfiles"
c406e779 15310for f in $gtfiles
8ac9d31f 15311do
8ac9d31f
TJ
15312 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
15313 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
15314done
15315
cbc59f01 15316check_languages=
c406e779 15317for language in $all_languages
cbc59f01 15318do
cbc59f01 15319 check_languages="$check_languages check-$language"
cbc59f01
DD
15320done
15321
62b81e45
MM
15322# We link each language in with a set of hooks, reached indirectly via
15323# lang.${target}.
861bb6c1
JL
15324
15325rm -f Make-hooks
15326touch Make-hooks
65ebbf81 15327target_list="all.build all.cross start.encap rest.encap tags \
a207b594 15328 install-normal install-common install-man \
a541f69d 15329 uninstall info man srcextra srcman srcinfo \
a03ad584 15330 mostlyclean clean distclean maintainer-clean \
8f231b5d 15331 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
861bb6c1
JL
15332for t in $target_list
15333do
15334 x=
c406e779 15335 for lang in $all_languages
861bb6c1 15336 do
ab87f8c8 15337 x="$x $lang.$t"
861bb6c1
JL
15338 done
15339 echo "lang.$t: $x" >> Make-hooks
15340done
15341
8bb915b6
NN
15342# --------
15343# UNSORTED
15344# --------
15345
cc06d68c 15346# Create .gdbinit.
861bb6c1 15347
cc06d68c
GP
15348echo "dir ." > .gdbinit
15349echo "dir ${srcdir}" >> .gdbinit
15350if test x$gdb_needs_out_file_path = xyes
15351then
15352 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
15353fi
15354if test "x$subdirs" != x; then
15355 for s in $subdirs
15356 do
15357 echo "dir ${srcdir}/$s" >> .gdbinit
15358 done
861bb6c1 15359fi
cc06d68c 15360echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 15361
8f8d3278
NC
15362# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
15363# absolute path for gcc_tooldir based on inserting the number of up-directory
15364# movements required to get from $(exec_prefix) to $(prefix) into the basic
15365# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
15366# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
15367# make and thus we'd get different behavior depending on where we built the
15368# sources.
5949a9fc 15369if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 15370 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 15371else
8f8d3278
NC
15372# An explanation of the sed strings:
15373# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
15374# -e 's|/$||' match a trailing forward slash and eliminates it
15375# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 15376# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
15377#
15378# (*) Note this pattern overwrites the first character of the string
15379# with a forward slash if one is not already present. This is not a
15380# problem because the exact names of the sub-directories concerned is
15381# unimportant, just the number of them matters.
15382#
15383# The practical upshot of these patterns is like this:
15384#
15385# prefix exec_prefix result
15386# ------ ----------- ------
15387# /foo /foo/bar ../
15388# /foo/ /foo/bar ../
15389# /foo /foo/bar/ ../
15390# /foo/ /foo/bar/ ../
15391# /foo /foo/bar/ugg ../../
15392#
4c112cda 15393 dollar='$$'
caa55b1e 15394 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
15395fi
15396
15397
2ce3c6c6 15398
2bbea3a6
RH
15399# Find a directory in which to install a shared libgcc.
15400
15401# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
15402if test "${enable_version_specific_runtime_libs+set}" = set; then
15403 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
15404
15405fi;
2bbea3a6
RH
15406
15407
5b15f277
RH
15408# Check whether --with-slibdir or --without-slibdir was given.
15409if test "${with_slibdir+set}" = set; then
15410 withval="$with_slibdir"
15411 slibdir="$with_slibdir"
15412else
15413 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 15414 slibdir='$(libsubdir)'
5b15f277 15415elif test "$host" != "$target"; then
2bbea3a6
RH
15416 slibdir='$(build_tooldir)/lib'
15417else
5b15f277 15418 slibdir='$(libdir)'
2bbea3a6 15419fi
ba479fd2 15420fi;
2bbea3a6
RH
15421
15422
1e6347d8 15423objdir=`${PWDCMD-pwd}`
7e717196
JL
15424
15425
861bb6c1
JL
15426# Substitute configuration variables
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
9b16d2c4 15473
e9a25f70 15474
6e26218f 15475
c8724862 15476
e061d1ce 15477
d8bb17c8 15478
11642c3a
ZW
15479
15480
15481
15482
15483
15484
15485
3d9d2476 15486
e2500fed 15487
51b9ff45 15488
861bb6c1 15489
6e3f3080
NN
15490# Echo link setup.
15491if test x${build} = x${host} ; then
15492 if test x${host} = x${target} ; then
15493 echo "Links are now set up to build a native compiler for ${target}." 1>&2
15494 else
15495 echo "Links are now set up to build a cross-compiler" 1>&2
15496 echo " from ${host} to ${target}." 1>&2
15497 fi
15498else
15499 if test x${host} = x${target} ; then
15500 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
15501 echo " for ${target}." 1>&2
15502 else
15503 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
15504 echo " from ${host} to ${target}." 1>&2
15505 fi
15506fi
15507
6de9cd9a
DN
15508
15509
15510
6e3f3080
NN
15511# Configure the subdirectories
15512# AC_CONFIG_SUBDIRS($subdirs)
15513
15514# Create the Makefile
15515# and configure language subdirectories
ba479fd2 15516 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
15517
15518
ba479fd2 15519 ac_config_commands="$ac_config_commands default"
914c5af7 15520
ba479fd2 15521cat >confcache <<\_ACEOF
6e3f3080
NN
15522# This file is a shell script that caches the results of configure
15523# tests run on this system so they can be shared between configure
ba479fd2
NN
15524# scripts and configure runs, see configure's option --config-cache.
15525# It is not useful on other systems. If it contains results you don't
15526# want to keep, you may remove or edit it.
6e3f3080 15527#
ba479fd2
NN
15528# config.status only pays attention to the cache file if you give it
15529# the --recheck option to rerun configure.
6e3f3080 15530#
ba479fd2
NN
15531# `ac_cv_env_foo' variables (set or unset) will be overridden when
15532# loading this file, other *unset* `ac_cv_foo' will be assigned the
15533# following values.
15534
15535_ACEOF
15536
6e3f3080
NN
15537# The following way of writing the cache mishandles newlines in values,
15538# but we know of no workaround that is simple, portable, and efficient.
15539# So, don't put newlines in cache variables' values.
15540# Ultrix sh set writes to stderr and can't be redirected directly,
15541# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
15542{
15543 (set) 2>&1 |
15544 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15545 *ac_space=\ *)
15546 # `set' does not quote correctly, so add quotes (double-quote
15547 # substitution turns \\\\ into \\, and sed turns \\ into \).
15548 sed -n \
86da66b5
HPN
15549 "s/'/'\\\\''/g;
15550 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ba479fd2
NN
15551 ;;
15552 *)
15553 # `set' quotes correctly as required by POSIX, so do not add quotes.
15554 sed -n \
86da66b5 15555 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
15556 ;;
15557 esac;
15558} |
15559 sed '
15560 t clear
15561 : clear
15562 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15563 t end
15564 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15565 : end' >>confcache
15566if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 15567 if test -w $cache_file; then
ba479fd2
NN
15568 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15569 cat confcache >$cache_file
6e3f3080
NN
15570 else
15571 echo "not updating unwritable cache $cache_file"
15572 fi
15573fi
15574rm -f confcache
15575
15576test "x$prefix" = xNONE && prefix=$ac_default_prefix
15577# Let make expand exec_prefix.
15578test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15579
ba479fd2
NN
15580# VPATH may cause trouble with some makes, so we remove $(srcdir),
15581# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15582# trailing colons and then remove the whole line if VPATH becomes empty
15583# (actually we leave an empty line to preserve line numbers).
6e3f3080 15584if test "x$srcdir" = x.; then
86da66b5 15585 ac_vpsub='/^[ ]*VPATH[ ]*=/{
ba479fd2
NN
15586s/:*\$(srcdir):*/:/;
15587s/:*\${srcdir}:*/:/;
15588s/:*@srcdir@:*/:/;
86da66b5 15589s/^\([^=]*=[ ]*\):*/\1/;
ba479fd2 15590s/:*$//;
86da66b5 15591s/^[^=]*=[ ]*$//;
ba479fd2 15592}'
6e3f3080
NN
15593fi
15594
63cf211a 15595DEFS=-DHAVE_CONFIG_H
6e3f3080 15596
ba479fd2
NN
15597ac_libobjs=
15598ac_ltlibobjs=
15599for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15600 # 1. Remove the extension, and $U if already installed.
15601 ac_i=`echo "$ac_i" |
86da66b5 15602 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
ba479fd2
NN
15603 # 2. Add them.
15604 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
15605 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
15606done
15607LIBOBJS=$ac_libobjs
63cf211a 15608
ba479fd2
NN
15609LTLIBOBJS=$ac_ltlibobjs
15610
15611
15612
15613: ${CONFIG_STATUS=./config.status}
15614ac_clean_files_save=$ac_clean_files
15615ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15616{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15617echo "$as_me: creating $CONFIG_STATUS" >&6;}
15618cat >$CONFIG_STATUS <<_ACEOF
15619#! $SHELL
15620# Generated by $as_me.
6e3f3080
NN
15621# Run this file to recreate the current configuration.
15622# Compiler output produced by configure, useful for debugging
ba479fd2 15623# configure, is in config.log if it exists.
6e3f3080 15624
ba479fd2
NN
15625debug=false
15626ac_cs_recheck=false
15627ac_cs_silent=false
15628SHELL=\${CONFIG_SHELL-$SHELL}
15629_ACEOF
15630
15631cat >>$CONFIG_STATUS <<\_ACEOF
15632## --------------------- ##
15633## M4sh Initialization. ##
15634## --------------------- ##
15635
15636# Be Bourne compatible
15637if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15638 emulate sh
15639 NULLCMD=:
15640 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
15641 # is contrary to our usage. Disable this feature.
15642 alias -g '${1+"$@"}'='"$@"'
15643elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15644 set -o posix
15645fi
86da66b5 15646DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
15647
15648# Support unset when possible.
86da66b5 15649if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
15650 as_unset=unset
15651else
15652 as_unset=false
15653fi
15654
15655
15656# Work around bugs in pre-3.0 UWIN ksh.
15657$as_unset ENV MAIL MAILPATH
15658PS1='$ '
15659PS2='> '
15660PS4='+ '
15661
15662# NLS nuisances.
15663for as_var in \
15664 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
15665 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
15666 LC_TELEPHONE LC_TIME
6e3f3080 15667do
86da66b5 15668 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
15669 eval $as_var=C; export $as_var
15670 else
15671 $as_unset $as_var
15672 fi
6e3f3080
NN
15673done
15674
ba479fd2
NN
15675# Required to use basename.
15676if expr a : '\(a\)' >/dev/null 2>&1; then
15677 as_expr=expr
15678else
15679 as_expr=false
15680fi
6e3f3080 15681
ba479fd2
NN
15682if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
15683 as_basename=basename
15684else
15685 as_basename=false
15686fi
6e3f3080
NN
15687
15688
ba479fd2
NN
15689# Name of the executable.
15690as_me=`$as_basename "$0" ||
15691$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15692 X"$0" : 'X\(//\)$' \| \
15693 X"$0" : 'X\(/\)$' \| \
15694 . : '\(.\)' 2>/dev/null ||
15695echo X/"$0" |
15696 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15697 /^X\/\(\/\/\)$/{ s//\1/; q; }
15698 /^X\/\(\/\).*/{ s//\1/; q; }
15699 s/.*/./; q'`
15700
6e3f3080 15701
ba479fd2
NN
15702# PATH needs CR, and LINENO needs CR and PATH.
15703# Avoid depending upon Character Ranges.
15704as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15705as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15706as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15707as_cr_digits='0123456789'
15708as_cr_alnum=$as_cr_Letters$as_cr_digits
15709
15710# The user is always right.
15711if test "${PATH_SEPARATOR+set}" != set; then
15712 echo "#! /bin/sh" >conf$$.sh
15713 echo "exit 0" >>conf$$.sh
15714 chmod +x conf$$.sh
15715 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
15716 PATH_SEPARATOR=';'
6e3f3080 15717 else
ba479fd2
NN
15718 PATH_SEPARATOR=:
15719 fi
15720 rm -f conf$$.sh
15721fi
15722
15723
15724 as_lineno_1=$LINENO
15725 as_lineno_2=$LINENO
15726 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15727 test "x$as_lineno_1" != "x$as_lineno_2" &&
15728 test "x$as_lineno_3" = "x$as_lineno_2" || {
15729 # Find who we are. Look in the path if we contain no path at all
15730 # relative or not.
15731 case $0 in
15732 *[\\/]* ) as_myself=$0 ;;
15733 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15734for as_dir in $PATH
15735do
15736 IFS=$as_save_IFS
15737 test -z "$as_dir" && as_dir=.
15738 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15739done
15740
15741 ;;
15742 esac
15743 # We did not find ourselves, most probably we were run as `sh COMMAND'
15744 # in which case we are not to be found in the path.
15745 if test "x$as_myself" = x; then
15746 as_myself=$0
15747 fi
15748 if test ! -f "$as_myself"; then
15749 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
15750echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
15751 { (exit 1); exit 1; }; }
6e3f3080 15752 fi
ba479fd2
NN
15753 case $CONFIG_SHELL in
15754 '')
15755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15756for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
15757do
15758 IFS=$as_save_IFS
15759 test -z "$as_dir" && as_dir=.
15760 for as_base in sh bash ksh sh5; do
15761 case $as_dir in
15762 /*)
15763 if ("$as_dir/$as_base" -c '
15764 as_lineno_1=$LINENO
15765 as_lineno_2=$LINENO
15766 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15767 test "x$as_lineno_1" != "x$as_lineno_2" &&
15768 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
15769 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
15770 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
15771 CONFIG_SHELL=$as_dir/$as_base
15772 export CONFIG_SHELL
15773 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
15774 fi;;
15775 esac
15776 done
15777done
15778;;
15779 esac
15780
15781 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
15782 # uniformly replaced by the line number. The first 'sed' inserts a
15783 # line-number line before each line; the second 'sed' does the real
15784 # work. The second script uses 'N' to pair each line-number line
15785 # with the numbered line, and appends trailing '-' during
15786 # substitution so that $LINENO is not a special case at line end.
15787 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
15788 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
15789 sed '=' <$as_myself |
15790 sed '
15791 N
15792 s,$,-,
15793 : loop
15794 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
15795 t loop
15796 s,-$,,
15797 s,^['$as_cr_digits']*\n,,
15798 ' >$as_me.lineno &&
15799 chmod +x $as_me.lineno ||
15800 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
15801echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
15802 { (exit 1); exit 1; }; }
15803
15804 # Don't try to exec as it changes $[0], causing all sort of problems
15805 # (the dirname of $[0] is not the place where we might find the
15806 # original and so on. Autoconf is especially sensible to this).
15807 . ./$as_me.lineno
15808 # Exit status is that of the last command.
15809 exit
15810}
15811
15812
15813case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
15814 *c*,-n*) ECHO_N= ECHO_C='
15815' ECHO_T=' ' ;;
15816 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
15817 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
15818esac
15819
15820if expr a : '\(a\)' >/dev/null 2>&1; then
15821 as_expr=expr
15822else
15823 as_expr=false
15824fi
15825
15826rm -f conf$$ conf$$.exe conf$$.file
15827echo >conf$$.file
15828if ln -s conf$$.file conf$$ 2>/dev/null; then
15829 # We could just check for DJGPP; but this test a) works b) is more generic
15830 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15831 if test -f conf$$.exe; then
15832 # Don't use ln at all; we don't have any links
15833 as_ln_s='cp -p'
6e3f3080 15834 else
ba479fd2 15835 as_ln_s='ln -s'
6e3f3080 15836 fi
ba479fd2
NN
15837elif ln conf$$.file conf$$ 2>/dev/null; then
15838 as_ln_s=ln
15839else
15840 as_ln_s='cp -p'
15841fi
15842rm -f conf$$ conf$$.exe conf$$.file
15843
15844if mkdir -p . 2>/dev/null; then
15845 as_mkdir_p=:
15846else
86da66b5 15847 test -d ./-p && rmdir ./-p
ba479fd2
NN
15848 as_mkdir_p=false
15849fi
15850
15851as_executable_p="test -f"
15852
15853# Sed expression to map a string onto a valid CPP name.
86da66b5 15854as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
15855
15856# Sed expression to map a string onto a valid variable name.
86da66b5 15857as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
15858
15859
15860# IFS
15861# We need space, tab and new line, in precisely that order.
15862as_nl='
15863'
15864IFS=" $as_nl"
15865
15866# CDPATH.
15867$as_unset CDPATH
15868
15869exec 6>&1
15870
15871# Open the log real soon, to keep \$[0] and so on meaningful, and to
15872# report actual input values of CONFIG_FILES etc. instead of their
15873# values after options handling. Logging --version etc. is OK.
15874exec 5>>config.log
15875{
15876 echo
15877 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15878## Running $as_me. ##
15879_ASBOX
15880} >&5
15881cat >&5 <<_CSEOF
15882
15883This file was extended by $as_me, which was
8ab705be 15884generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
15885
15886 CONFIG_FILES = $CONFIG_FILES
15887 CONFIG_HEADERS = $CONFIG_HEADERS
15888 CONFIG_LINKS = $CONFIG_LINKS
15889 CONFIG_COMMANDS = $CONFIG_COMMANDS
15890 $ $0 $@
15891
15892_CSEOF
15893echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
15894echo >&5
15895_ACEOF
15896
15897# Files that config.status was made for.
15898if test -n "$ac_config_files"; then
15899 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15900fi
15901
15902if test -n "$ac_config_headers"; then
15903 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15904fi
15905
15906if test -n "$ac_config_links"; then
15907 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15908fi
15909
15910if test -n "$ac_config_commands"; then
15911 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15912fi
15913
15914cat >>$CONFIG_STATUS <<\_ACEOF
15915
15916ac_cs_usage="\
15917\`$as_me' instantiates files from templates according to the
15918current configuration.
15919
15920Usage: $0 [OPTIONS] [FILE]...
15921
15922 -h, --help print this help, then exit
15923 -V, --version print version number, then exit
15924 -q, --quiet do not print progress messages
15925 -d, --debug don't remove temporary files
15926 --recheck update $as_me by reconfiguring in the same conditions
15927 --file=FILE[:TEMPLATE]
86da66b5 15928 instantiate the configuration file FILE
ba479fd2 15929 --header=FILE[:TEMPLATE]
86da66b5 15930 instantiate the configuration header FILE
ba479fd2
NN
15931
15932Configuration files:
15933$config_files
15934
15935Configuration headers:
15936$config_headers
15937
15938Configuration commands:
15939$config_commands
15940
15941Report bugs to <bug-autoconf@gnu.org>."
15942_ACEOF
15943
15944cat >>$CONFIG_STATUS <<_ACEOF
15945ac_cs_version="\\
15946config.status
8ab705be 15947configured by $0, generated by GNU Autoconf 2.59,
ba479fd2
NN
15948 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15949
86da66b5 15950Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
15951This config.status script is free software; the Free Software Foundation
15952gives unlimited permission to copy, distribute and modify it."
15953srcdir=$srcdir
15954_ACEOF
15955
15956cat >>$CONFIG_STATUS <<\_ACEOF
15957# If no file are specified by the user, then we need to provide default
15958# value. By we need to know if files were specified by the user.
15959ac_need_defaults=:
15960while test $# != 0
15961do
15962 case $1 in
15963 --*=*)
15964 ac_option=`expr "x$1" : 'x\([^=]*\)='`
15965 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15966 ac_shift=:
15967 ;;
15968 -*)
15969 ac_option=$1
15970 ac_optarg=$2
15971 ac_shift=shift
15972 ;;
15973 *) # This is not an option, so the user has probably given explicit
15974 # arguments.
15975 ac_option=$1
15976 ac_need_defaults=false;;
15977 esac
15978
15979 case $ac_option in
15980 # Handling of the options.
15981_ACEOF
15982cat >>$CONFIG_STATUS <<\_ACEOF
15983 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15984 ac_cs_recheck=: ;;
15985 --version | --vers* | -V )
15986 echo "$ac_cs_version"; exit 0 ;;
15987 --he | --h)
15988 # Conflict between --help and --header
15989 { { echo "$as_me:$LINENO: error: ambiguous option: $1
15990Try \`$0 --help' for more information." >&5
15991echo "$as_me: error: ambiguous option: $1
15992Try \`$0 --help' for more information." >&2;}
15993 { (exit 1); exit 1; }; };;
15994 --help | --hel | -h )
15995 echo "$ac_cs_usage"; exit 0 ;;
15996 --debug | --d* | -d )
15997 debug=: ;;
15998 --file | --fil | --fi | --f )
15999 $ac_shift
16000 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
16001 ac_need_defaults=false;;
16002 --header | --heade | --head | --hea )
16003 $ac_shift
16004 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
16005 ac_need_defaults=false;;
16006 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16007 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16008 ac_cs_silent=: ;;
16009
16010 # This is an error.
16011 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16012Try \`$0 --help' for more information." >&5
16013echo "$as_me: error: unrecognized option: $1
16014Try \`$0 --help' for more information." >&2;}
16015 { (exit 1); exit 1; }; } ;;
16016
16017 *) ac_config_targets="$ac_config_targets $1" ;;
16018
16019 esac
16020 shift
6e3f3080 16021done
ba479fd2
NN
16022
16023ac_configure_extra_args=
16024
16025if $ac_cs_silent; then
16026 exec 6>/dev/null
16027 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
16028fi
16029
ba479fd2
NN
16030_ACEOF
16031cat >>$CONFIG_STATUS <<_ACEOF
16032if \$ac_cs_recheck; then
16033 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
16034 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16035fi
861bb6c1 16036
ba479fd2
NN
16037_ACEOF
16038
16039cat >>$CONFIG_STATUS <<_ACEOF
16040#
16041# INIT-COMMANDS section.
16042#
16043
16044subdirs='$subdirs'
ba479fd2
NN
16045
16046_ACEOF
16047
16048
16049
16050cat >>$CONFIG_STATUS <<\_ACEOF
16051for ac_config_target in $ac_config_targets
16052do
16053 case "$ac_config_target" in
16054 # Handling of arguments.
16055 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
16056 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16057 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
16058 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16059echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16060 { (exit 1); exit 1; }; };;
861bb6c1 16061 esac
ba479fd2
NN
16062done
16063
16064# If the user did not use the arguments to specify the items to instantiate,
16065# then the envvar interface is used. Set only those that are not.
16066# We use the long form for the default assignment because of an extremely
16067# bizarre bug on SunOS 4.1.3.
16068if $ac_need_defaults; then
16069 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16070 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16071 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16072fi
16073
16074# Have a temporary directory for convenience. Make it in the build tree
16075# simply because there is no reason to put it here, and in addition,
16076# creating and moving files from /tmp can sometimes cause problems.
16077# Create a temporary directory, and hook for its removal unless debugging.
16078$debug ||
16079{
16080 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16081 trap '{ (exit 1); exit 1; }' 1 2 13 15
16082}
861bb6c1 16083
ba479fd2 16084# Create a (secure) tmp directory for tmp files.
6e3f3080 16085
ba479fd2
NN
16086{
16087 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
16088 test -n "$tmp" && test -d "$tmp"
16089} ||
16090{
16091 tmp=./confstat$$-$RANDOM
16092 (umask 077 && mkdir $tmp)
16093} ||
16094{
16095 echo "$me: cannot create a temporary directory in ." >&2
16096 { (exit 1); exit 1; }
16097}
16098
16099_ACEOF
16100
16101cat >>$CONFIG_STATUS <<_ACEOF
16102
16103#
16104# CONFIG_FILES section.
16105#
16106
16107# No need to generate the scripts if there are no CONFIG_FILES.
16108# This happens for instance when ./config.status config.h
16109if test -n "\$CONFIG_FILES"; then
16110 # Protect against being on the right side of a sed subst in config.status.
16111 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16112 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16113s,@SHELL@,$SHELL,;t t
16114s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16115s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16116s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16117s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16118s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16119s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16120s,@exec_prefix@,$exec_prefix,;t t
16121s,@prefix@,$prefix,;t t
16122s,@program_transform_name@,$program_transform_name,;t t
16123s,@bindir@,$bindir,;t t
16124s,@sbindir@,$sbindir,;t t
16125s,@libexecdir@,$libexecdir,;t t
16126s,@datadir@,$datadir,;t t
16127s,@sysconfdir@,$sysconfdir,;t t
16128s,@sharedstatedir@,$sharedstatedir,;t t
16129s,@localstatedir@,$localstatedir,;t t
16130s,@libdir@,$libdir,;t t
16131s,@includedir@,$includedir,;t t
16132s,@oldincludedir@,$oldincludedir,;t t
16133s,@infodir@,$infodir,;t t
16134s,@mandir@,$mandir,;t t
16135s,@build_alias@,$build_alias,;t t
16136s,@host_alias@,$host_alias,;t t
16137s,@target_alias@,$target_alias,;t t
16138s,@DEFS@,$DEFS,;t t
16139s,@ECHO_C@,$ECHO_C,;t t
16140s,@ECHO_N@,$ECHO_N,;t t
16141s,@ECHO_T@,$ECHO_T,;t t
16142s,@LIBS@,$LIBS,;t t
16143s,@build@,$build,;t t
16144s,@build_cpu@,$build_cpu,;t t
16145s,@build_vendor@,$build_vendor,;t t
16146s,@build_os@,$build_os,;t t
16147s,@host@,$host,;t t
16148s,@host_cpu@,$host_cpu,;t t
16149s,@host_vendor@,$host_vendor,;t t
16150s,@host_os@,$host_os,;t t
16151s,@target@,$target,;t t
16152s,@target_cpu@,$target_cpu,;t t
16153s,@target_vendor@,$target_vendor,;t t
16154s,@target_os@,$target_os,;t t
8f1529e6 16155s,@target_noncanonical@,$target_noncanonical,;t t
ba479fd2
NN
16156s,@build_subdir@,$build_subdir,;t t
16157s,@host_subdir@,$host_subdir,;t t
16158s,@target_subdir@,$target_subdir,;t t
03787dfd 16159s,@GENINSRC@,$GENINSRC,;t t
ba479fd2
NN
16160s,@CC@,$CC,;t t
16161s,@CFLAGS@,$CFLAGS,;t t
16162s,@LDFLAGS@,$LDFLAGS,;t t
16163s,@CPPFLAGS@,$CPPFLAGS,;t t
16164s,@ac_ct_CC@,$ac_ct_CC,;t t
16165s,@EXEEXT@,$EXEEXT,;t t
16166s,@OBJEXT@,$OBJEXT,;t t
16167s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
16168s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
16169s,@CPP@,$CPP,;t t
bf3b7cd3 16170s,@EGREP@,$EGREP,;t t
ba479fd2
NN
16171s,@strict1_warn@,$strict1_warn,;t t
16172s,@warn_cflags@,$warn_cflags,;t t
16173s,@WERROR@,$WERROR,;t t
16174s,@nocommon_flag@,$nocommon_flag,;t t
13f05fd0 16175s,@TREEBROWSER@,$TREEBROWSER,;t t
ba479fd2
NN
16176s,@valgrind_path@,$valgrind_path,;t t
16177s,@valgrind_path_defines@,$valgrind_path_defines,;t t
16178s,@valgrind_command@,$valgrind_command,;t t
16179s,@coverage_flags@,$coverage_flags,;t t
16180s,@enable_multilib@,$enable_multilib,;t t
16181s,@enable_shared@,$enable_shared,;t t
16182s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
16183s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
16184s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
16185s,@onestep@,$onestep,;t t
16186s,@SET_MAKE@,$SET_MAKE,;t t
16187s,@AWK@,$AWK,;t t
ba479fd2 16188s,@LN_S@,$LN_S,;t t
41e622a8 16189s,@LN@,$LN,;t t
ba479fd2
NN
16190s,@RANLIB@,$RANLIB,;t t
16191s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
343a6100 16192s,@ranlib_flags@,$ranlib_flags,;t t
ba479fd2
NN
16193s,@INSTALL@,$INSTALL,;t t
16194s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16195s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16196s,@make_compare_target@,$make_compare_target,;t t
16197s,@have_mktemp_command@,$have_mktemp_command,;t t
16198s,@MAKEINFO@,$MAKEINFO,;t t
16199s,@BUILD_INFO@,$BUILD_INFO,;t t
16200s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
16201s,@FLEX@,$FLEX,;t t
16202s,@BISON@,$BISON,;t t
f6a874ac
JW
16203s,@NM@,$NM,;t t
16204s,@AR@,$AR,;t t
ba479fd2
NN
16205s,@stage1_cflags@,$stage1_cflags,;t t
16206s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
16207s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
16208s,@LDEXP_LIB@,$LDEXP_LIB,;t t
16209s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
16210s,@LIBICONV@,$LIBICONV,;t t
dfb77e37 16211s,@LTLIBICONV@,$LTLIBICONV,;t t
ba479fd2
NN
16212s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
16213s,@manext@,$manext,;t t
16214s,@objext@,$objext,;t t
8bb915b6 16215s,@gthread_flags@,$gthread_flags,;t t
ba479fd2 16216s,@extra_modes_file@,$extra_modes_file,;t t
75685792 16217s,@extra_opt_files@,$extra_opt_files,;t t
ba479fd2
NN
16218s,@USE_NLS@,$USE_NLS,;t t
16219s,@LIBINTL@,$LIBINTL,;t t
16220s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
16221s,@INCINTL@,$INCINTL,;t t
16222s,@XGETTEXT@,$XGETTEXT,;t t
16223s,@GMSGFMT@,$GMSGFMT,;t t
16224s,@POSUB@,$POSUB,;t t
16225s,@CATALOGS@,$CATALOGS,;t t
5395b47b 16226s,@host_cc_for_libada@,$host_cc_for_libada,;t t
ba479fd2
NN
16227s,@CROSS@,$CROSS,;t t
16228s,@ALL@,$ALL,;t t
16229s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
16230s,@inhibit_libc@,$inhibit_libc,;t t
ba479fd2
NN
16231s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
16232s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16233s,@STMP_FIXINC@,$STMP_FIXINC,;t t
16234s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
c38f02df 16235s,@collect2@,$collect2,;t t
ba479fd2 16236s,@libgcc_visibility@,$libgcc_visibility,;t t
ba479fd2
NN
16237s,@GGC@,$GGC,;t t
16238s,@zlibdir@,$zlibdir,;t t
16239s,@zlibinc@,$zlibinc,;t t
16240s,@MAINT@,$MAINT,;t t
16241s,@gcc_tooldir@,$gcc_tooldir,;t t
16242s,@dollar@,$dollar,;t t
16243s,@slibdir@,$slibdir,;t t
16244s,@objdir@,$objdir,;t t
16245s,@subdirs@,$subdirs,;t t
16246s,@srcdir@,$srcdir,;t t
ba479fd2
NN
16247s,@all_boot_languages@,$all_boot_languages,;t t
16248s,@all_compilers@,$all_compilers,;t t
16249s,@all_gtfiles@,$all_gtfiles,;t t
16250s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
16251s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
16252s,@all_lang_makefrags@,$all_lang_makefrags,;t t
16253s,@all_lang_makefiles@,$all_lang_makefiles,;t t
16254s,@all_languages@,$all_languages,;t t
16255s,@all_stagestuff@,$all_stagestuff,;t t
16256s,@build_exeext@,$build_exeext,;t t
16257s,@build_install_headers_dir@,$build_install_headers_dir,;t t
16258s,@build_xm_file_list@,$build_xm_file_list,;t t
16259s,@build_xm_include_list@,$build_xm_include_list,;t t
16260s,@build_xm_defines@,$build_xm_defines,;t t
16261s,@check_languages@,$check_languages,;t t
16262s,@cc_set_by_configure@,$cc_set_by_configure,;t t
16263s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
16264s,@cpp_install_dir@,$cpp_install_dir,;t t
16265s,@xmake_file@,$xmake_file,;t t
16266s,@tmake_file@,$tmake_file,;t t
30500d84 16267s,@extra_gcc_objs@,$extra_gcc_objs,;t t
ba479fd2
NN
16268s,@extra_headers_list@,$extra_headers_list,;t t
16269s,@extra_objs@,$extra_objs,;t t
16270s,@extra_parts@,$extra_parts,;t t
16271s,@extra_passes@,$extra_passes,;t t
16272s,@extra_programs@,$extra_programs,;t t
16273s,@float_h_file@,$float_h_file,;t t
16274s,@gcc_config_arguments@,$gcc_config_arguments,;t t
16275s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
16276s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
ba479fd2 16277s,@host_exeext@,$host_exeext,;t t
ba479fd2
NN
16278s,@host_xm_file_list@,$host_xm_file_list,;t t
16279s,@host_xm_include_list@,$host_xm_include_list,;t t
16280s,@host_xm_defines@,$host_xm_defines,;t t
16281s,@out_host_hook_obj@,$out_host_hook_obj,;t t
16282s,@install@,$install,;t t
16283s,@lang_opt_files@,$lang_opt_files,;t t
16284s,@lang_specs_files@,$lang_specs_files,;t t
16285s,@lang_tree_files@,$lang_tree_files,;t t
16286s,@local_prefix@,$local_prefix,;t t
16287s,@md_file@,$md_file,;t t
16288s,@objc_boehm_gc@,$objc_boehm_gc,;t t
16289s,@out_file@,$out_file,;t t
16290s,@out_object_file@,$out_object_file,;t t
16291s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
16292s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
ba479fd2
NN
16293s,@thread_file@,$thread_file,;t t
16294s,@tm_file_list@,$tm_file_list,;t t
16295s,@tm_include_list@,$tm_include_list,;t t
16296s,@tm_defines@,$tm_defines,;t t
16297s,@tm_p_file_list@,$tm_p_file_list,;t t
16298s,@tm_p_include_list@,$tm_p_include_list,;t t
16299s,@xm_file_list@,$xm_file_list,;t t
16300s,@xm_include_list@,$xm_include_list,;t t
16301s,@xm_defines@,$xm_defines,;t t
ba479fd2
NN
16302s,@c_target_objs@,$c_target_objs,;t t
16303s,@cxx_target_objs@,$cxx_target_objs,;t t
16304s,@target_cpu_default@,$target_cpu_default,;t t
6de9cd9a
DN
16305s,@GMPLIBS@,$GMPLIBS,;t t
16306s,@GMPINC@,$GMPINC,;t t
ba479fd2
NN
16307s,@LIBOBJS@,$LIBOBJS,;t t
16308s,@LTLIBOBJS@,$LTLIBOBJS,;t t
16309/@language_hooks@/r $language_hooks
16310s,@language_hooks@,,;t t
16311CEOF
16312
16313_ACEOF
16314
16315 cat >>$CONFIG_STATUS <<\_ACEOF
16316 # Split the substitutions into bite-sized pieces for seds with
16317 # small command number limits, like on Digital OSF/1 and HP-UX.
16318 ac_max_sed_lines=48
16319 ac_sed_frag=1 # Number of current file.
16320 ac_beg=1 # First line for current file.
16321 ac_end=$ac_max_sed_lines # Line after last line for current file.
16322 ac_more_lines=:
16323 ac_sed_cmds=
16324 while $ac_more_lines; do
16325 if test $ac_beg -gt 1; then
16326 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16327 else
16328 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16329 fi
16330 if test ! -s $tmp/subs.frag; then
16331 ac_more_lines=false
16332 else
16333 # The purpose of the label and of the branching condition is to
16334 # speed up the sed processing (if there are no `@' at all, there
16335 # is no need to browse any of the substitutions).
16336 # These are the two extra sed commands mentioned above.
16337 (echo ':t
16338 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16339 if test -z "$ac_sed_cmds"; then
86da66b5 16340 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2 16341 else
86da66b5 16342 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2
NN
16343 fi
16344 ac_sed_frag=`expr $ac_sed_frag + 1`
16345 ac_beg=$ac_end
16346 ac_end=`expr $ac_end + $ac_max_sed_lines`
16347 fi
16348 done
16349 if test -z "$ac_sed_cmds"; then
16350 ac_sed_cmds=cat
63cf211a 16351 fi
ba479fd2 16352fi # test -n "$CONFIG_FILES"
cafe096b 16353
ba479fd2
NN
16354_ACEOF
16355cat >>$CONFIG_STATUS <<\_ACEOF
16356for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16357 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16358 case $ac_file in
16359 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
16360 cat >$tmp/stdin
16361 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16362 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16363 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 16364 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16365 * ) ac_file_in=$ac_file.in ;;
63cf211a 16366 esac
cafe096b 16367
ba479fd2
NN
16368 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16369 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16370$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16371 X"$ac_file" : 'X\(//\)[^/]' \| \
16372 X"$ac_file" : 'X\(//\)$' \| \
16373 X"$ac_file" : 'X\(/\)' \| \
16374 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16375echo X"$ac_file" |
16376 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16377 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16378 /^X\(\/\/\)$/{ s//\1/; q; }
16379 /^X\(\/\).*/{ s//\1/; q; }
16380 s/.*/./; q'`
16381 { if $as_mkdir_p; then
16382 mkdir -p "$ac_dir"
16383 else
16384 as_dir="$ac_dir"
16385 as_dirs=
16386 while test ! -d "$as_dir"; do
16387 as_dirs="$as_dir $as_dirs"
16388 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16389$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16390 X"$as_dir" : 'X\(//\)[^/]' \| \
16391 X"$as_dir" : 'X\(//\)$' \| \
16392 X"$as_dir" : 'X\(/\)' \| \
16393 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16394echo X"$as_dir" |
16395 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16396 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16397 /^X\(\/\/\)$/{ s//\1/; q; }
16398 /^X\(\/\).*/{ s//\1/; q; }
16399 s/.*/./; q'`
16400 done
16401 test ! -n "$as_dirs" || mkdir $as_dirs
16402 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16403echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16404 { (exit 1); exit 1; }; }; }
6e3f3080 16405
ba479fd2
NN
16406 ac_builddir=.
16407
16408if test "$ac_dir" != .; then
16409 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16410 # A "../" for each directory in $ac_dir_suffix.
16411 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16412else
16413 ac_dir_suffix= ac_top_builddir=
16414fi
16415
16416case $srcdir in
16417 .) # No --srcdir option. We are building in place.
16418 ac_srcdir=.
16419 if test -z "$ac_top_builddir"; then
16420 ac_top_srcdir=.
16421 else
16422 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16423 fi ;;
16424 [\\/]* | ?:[\\/]* ) # Absolute path.
16425 ac_srcdir=$srcdir$ac_dir_suffix;
16426 ac_top_srcdir=$srcdir ;;
16427 *) # Relative path.
16428 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16429 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16430esac
8ab705be
KC
16431
16432# Do not use `cd foo && pwd` to compute absolute paths, because
16433# the directories may not exist.
16434case `pwd` in
16435.) ac_abs_builddir="$ac_dir";;
86da66b5 16436*)
8ab705be
KC
16437 case "$ac_dir" in
16438 .) ac_abs_builddir=`pwd`;;
16439 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
16440 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
16441 esac;;
16442esac
8ab705be 16443case $ac_abs_builddir in
86da66b5
HPN
16444.) ac_abs_top_builddir=${ac_top_builddir}.;;
16445*)
16446 case ${ac_top_builddir}. in
8ab705be 16447 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 16448 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 16449 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
16450 esac;;
16451esac
8ab705be 16452case $ac_abs_builddir in
86da66b5
HPN
16453.) ac_abs_srcdir=$ac_srcdir;;
16454*)
16455 case $ac_srcdir in
8ab705be 16456 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 16457 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 16458 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
16459 esac;;
16460esac
8ab705be 16461case $ac_abs_builddir in
86da66b5
HPN
16462.) ac_abs_top_srcdir=$ac_top_srcdir;;
16463*)
16464 case $ac_top_srcdir in
8ab705be 16465 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 16466 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 16467 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
16468 esac;;
16469esac
ba479fd2
NN
16470
16471
16472
a1286ef5
ZW
16473 if test x"$ac_file" != x-; then
16474 { echo "$as_me:$LINENO: creating $ac_file" >&5
16475echo "$as_me: creating $ac_file" >&6;}
16476 rm -f "$ac_file"
16477 fi
ba479fd2
NN
16478 # Let's still pretend it is `configure' which instantiates (i.e., don't
16479 # use $as_me), people would be surprised to read:
16480 # /* config.h. Generated by config.status. */
16481 if test x"$ac_file" = x-; then
16482 configure_input=
16483 else
16484 configure_input="$ac_file. "
16485 fi
16486 configure_input=$configure_input"Generated from `echo $ac_file_in |
86da66b5 16487 sed 's,.*/,,'` by configure."
ba479fd2
NN
16488
16489 # First look for the input files in the build tree, otherwise in the
16490 # src tree.
16491 ac_file_inputs=`IFS=:
16492 for f in $ac_file_in; do
16493 case $f in
16494 -) echo $tmp/stdin ;;
16495 [\\/$]*)
86da66b5
HPN
16496 # Absolute (can't be DOS-style, as IFS=:)
16497 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16498echo "$as_me: error: cannot find input file: $f" >&2;}
16499 { (exit 1); exit 1; }; }
86da66b5 16500 echo "$f";;
ba479fd2 16501 *) # Relative
86da66b5
HPN
16502 if test -f "$f"; then
16503 # Build tree
16504 echo "$f"
16505 elif test -f "$srcdir/$f"; then
16506 # Source tree
16507 echo "$srcdir/$f"
16508 else
16509 # /dev/null tree
16510 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16511echo "$as_me: error: cannot find input file: $f" >&2;}
16512 { (exit 1); exit 1; }; }
86da66b5 16513 fi;;
ba479fd2
NN
16514 esac
16515 done` || { (exit 1); exit 1; }
16516_ACEOF
16517cat >>$CONFIG_STATUS <<_ACEOF
16518 sed "$ac_vpsub
16519$extrasub
16520_ACEOF
16521cat >>$CONFIG_STATUS <<\_ACEOF
16522:t
16523/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16524s,@configure_input@,$configure_input,;t t
16525s,@srcdir@,$ac_srcdir,;t t
16526s,@abs_srcdir@,$ac_abs_srcdir,;t t
16527s,@top_srcdir@,$ac_top_srcdir,;t t
16528s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16529s,@builddir@,$ac_builddir,;t t
16530s,@abs_builddir@,$ac_abs_builddir,;t t
16531s,@top_builddir@,$ac_top_builddir,;t t
16532s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16533" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16534 rm -f $tmp/stdin
16535 if test x"$ac_file" != x-; then
16536 mv $tmp/out $ac_file
16537 else
16538 cat $tmp/out
16539 rm -f $tmp/out
16540 fi
16541
16542done
16543_ACEOF
16544cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 16545
ba479fd2
NN
16546#
16547# CONFIG_HEADER section.
16548#
861bb6c1
JL
16549
16550# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16551# NAME is the cpp macro being defined and VALUE is the value it is being given.
16552#
16553# ac_d sets the value in "#define NAME VALUE" lines.
86da66b5
HPN
16554ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16555ac_dB='[ ].*$,\1#\2'
ba479fd2
NN
16556ac_dC=' '
16557ac_dD=',;t'
16558# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
86da66b5 16559ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ba479fd2 16560ac_uB='$,\1#\2define\3'
861bb6c1 16561ac_uC=' '
ba479fd2
NN
16562ac_uD=',;t'
16563
16564for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 16565 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
16566 case $ac_file in
16567 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
16568 cat >$tmp/stdin
16569 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16570 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16571 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 16572 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 16573 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
16574 esac
16575
ba479fd2
NN
16576 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16577echo "$as_me: creating $ac_file" >&6;}
16578
16579 # First look for the input files in the build tree, otherwise in the
16580 # src tree.
16581 ac_file_inputs=`IFS=:
16582 for f in $ac_file_in; do
16583 case $f in
16584 -) echo $tmp/stdin ;;
16585 [\\/$]*)
86da66b5
HPN
16586 # Absolute (can't be DOS-style, as IFS=:)
16587 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16588echo "$as_me: error: cannot find input file: $f" >&2;}
16589 { (exit 1); exit 1; }; }
86da66b5
HPN
16590 # Do quote $f, to prevent DOS paths from being IFS'd.
16591 echo "$f";;
ba479fd2 16592 *) # Relative
86da66b5
HPN
16593 if test -f "$f"; then
16594 # Build tree
16595 echo "$f"
16596 elif test -f "$srcdir/$f"; then
16597 # Source tree
16598 echo "$srcdir/$f"
16599 else
16600 # /dev/null tree
16601 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
16602echo "$as_me: error: cannot find input file: $f" >&2;}
16603 { (exit 1); exit 1; }; }
86da66b5 16604 fi;;
ba479fd2
NN
16605 esac
16606 done` || { (exit 1); exit 1; }
16607 # Remove the trailing spaces.
86da66b5 16608 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
ba479fd2
NN
16609
16610_ACEOF
16611
16612# Transform confdefs.h into two sed scripts, `conftest.defines' and
16613# `conftest.undefs', that substitutes the proper values into
16614# config.h.in to produce config.h. The first handles `#define'
16615# templates, and the second `#undef' templates.
16616# And first: Protect against being on the right side of a sed subst in
16617# config.status. Protect against being in an unquoted here document
16618# in config.status.
16619rm -f conftest.defines conftest.undefs
16620# Using a here document instead of a string reduces the quoting nightmare.
16621# Putting comments in sed scripts is not portable.
16622#
16623# `end' is used to avoid that the second main sed command (meant for
16624# 0-ary CPP macros) applies to n-ary macro definitions.
16625# See the Autoconf documentation for `clear'.
16626cat >confdef2sed.sed <<\_ACEOF
16627s/[\\&,]/\\&/g
16628s,[\\$`],\\&,g
16629t clear
16630: clear
86da66b5 16631s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
ba479fd2 16632t end
86da66b5 16633s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
ba479fd2
NN
16634: end
16635_ACEOF
16636# If some macros were called several times there might be several times
16637# the same #defines, which is useless. Nevertheless, we may not want to
16638# sort them, since we want the *last* AC-DEFINE to be honored.
16639uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16640sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16641rm -f confdef2sed.sed
861bb6c1
JL
16642
16643# This sed command replaces #undef with comments. This is necessary, for
16644# example, in the case of _POSIX_SOURCE, which is predefined and required
16645# on some systems where configure will not decide to define it.
ba479fd2 16646cat >>conftest.undefs <<\_ACEOF
86da66b5 16647s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
ba479fd2
NN
16648_ACEOF
16649
16650# Break up conftest.defines because some shells have a limit on the size
16651# of here documents, and old seds have small limits too (100 cmds).
16652echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
86da66b5 16653echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
ba479fd2
NN
16654echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16655echo ' :' >>$CONFIG_STATUS
16656rm -f conftest.tail
16657while grep . conftest.defines >/dev/null
16658do
16659 # Write a limited-size here document to $tmp/defines.sed.
16660 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16661 # Speed up: don't consider the non `#define' lines.
86da66b5 16662 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
ba479fd2
NN
16663 # Work around the forget-to-reset-the-flag bug.
16664 echo 't clr' >>$CONFIG_STATUS
16665 echo ': clr' >>$CONFIG_STATUS
16666 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
16667 echo 'CEOF
16668 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16669 rm -f $tmp/in
16670 mv $tmp/out $tmp/in
16671' >>$CONFIG_STATUS
16672 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16673 rm -f conftest.defines
16674 mv conftest.tail conftest.defines
16675done
16676rm -f conftest.defines
16677echo ' fi # grep' >>$CONFIG_STATUS
16678echo >>$CONFIG_STATUS
861bb6c1 16679
ba479fd2
NN
16680# Break up conftest.undefs because some shells have a limit on the size
16681# of here documents, and old seds have small limits too (100 cmds).
16682echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 16683rm -f conftest.tail
ba479fd2 16684while grep . conftest.undefs >/dev/null
861bb6c1 16685do
ba479fd2
NN
16686 # Write a limited-size here document to $tmp/undefs.sed.
16687 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16688 # Speed up: don't consider the non `#undef'
86da66b5 16689 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
ba479fd2
NN
16690 # Work around the forget-to-reset-the-flag bug.
16691 echo 't clr' >>$CONFIG_STATUS
16692 echo ': clr' >>$CONFIG_STATUS
16693 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 16694 echo 'CEOF
ba479fd2
NN
16695 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16696 rm -f $tmp/in
16697 mv $tmp/out $tmp/in
16698' >>$CONFIG_STATUS
16699 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16700 rm -f conftest.undefs
16701 mv conftest.tail conftest.undefs
861bb6c1 16702done
ba479fd2
NN
16703rm -f conftest.undefs
16704
16705cat >>$CONFIG_STATUS <<\_ACEOF
16706 # Let's still pretend it is `configure' which instantiates (i.e., don't
16707 # use $as_me), people would be surprised to read:
16708 # /* config.h. Generated by config.status. */
16709 if test x"$ac_file" = x-; then
16710 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 16711 else
ba479fd2 16712 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 16713 fi
ba479fd2
NN
16714 cat $tmp/in >>$tmp/config.h
16715 rm -f $tmp/in
16716 if test x"$ac_file" != x-; then
16717 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
16718 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16719echo "$as_me: $ac_file is unchanged" >&6;}
16720 else
16721 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16722$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16723 X"$ac_file" : 'X\(//\)[^/]' \| \
16724 X"$ac_file" : 'X\(//\)$' \| \
16725 X"$ac_file" : 'X\(/\)' \| \
16726 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16727echo X"$ac_file" |
16728 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16729 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16730 /^X\(\/\/\)$/{ s//\1/; q; }
16731 /^X\(\/\).*/{ s//\1/; q; }
16732 s/.*/./; q'`
16733 { if $as_mkdir_p; then
16734 mkdir -p "$ac_dir"
16735 else
16736 as_dir="$ac_dir"
16737 as_dirs=
16738 while test ! -d "$as_dir"; do
16739 as_dirs="$as_dir $as_dirs"
16740 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16741$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16742 X"$as_dir" : 'X\(//\)[^/]' \| \
16743 X"$as_dir" : 'X\(//\)$' \| \
16744 X"$as_dir" : 'X\(/\)' \| \
16745 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16746echo X"$as_dir" |
16747 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16748 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16749 /^X\(\/\/\)$/{ s//\1/; q; }
16750 /^X\(\/\).*/{ s//\1/; q; }
16751 s/.*/./; q'`
16752 done
16753 test ! -n "$as_dirs" || mkdir $as_dirs
16754 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16755echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16756 { (exit 1); exit 1; }; }; }
63cf211a 16757
ba479fd2
NN
16758 rm -f $ac_file
16759 mv $tmp/config.h $ac_file
16760 fi
16761 else
16762 cat $tmp/config.h
16763 rm -f $tmp/config.h
16764 fi
16765done
16766_ACEOF
16767cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 16768
ba479fd2
NN
16769#
16770# CONFIG_COMMANDS section.
16771#
16772for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16773 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16774 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16775 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
16776$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
16777 X"$ac_dest" : 'X\(//\)[^/]' \| \
16778 X"$ac_dest" : 'X\(//\)$' \| \
16779 X"$ac_dest" : 'X\(/\)' \| \
16780 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
16781echo X"$ac_dest" |
16782 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16783 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16784 /^X\(\/\/\)$/{ s//\1/; q; }
16785 /^X\(\/\).*/{ s//\1/; q; }
16786 s/.*/./; q'`
86da66b5
HPN
16787 { if $as_mkdir_p; then
16788 mkdir -p "$ac_dir"
16789 else
16790 as_dir="$ac_dir"
16791 as_dirs=
16792 while test ! -d "$as_dir"; do
16793 as_dirs="$as_dir $as_dirs"
16794 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16795$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16796 X"$as_dir" : 'X\(//\)[^/]' \| \
16797 X"$as_dir" : 'X\(//\)$' \| \
16798 X"$as_dir" : 'X\(/\)' \| \
16799 . : '\(.\)' 2>/dev/null ||
16800echo X"$as_dir" |
16801 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16802 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16803 /^X\(\/\/\)$/{ s//\1/; q; }
16804 /^X\(\/\).*/{ s//\1/; q; }
16805 s/.*/./; q'`
16806 done
16807 test ! -n "$as_dirs" || mkdir $as_dirs
16808 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16809echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16810 { (exit 1); exit 1; }; }; }
16811
ba479fd2
NN
16812 ac_builddir=.
16813
16814if test "$ac_dir" != .; then
16815 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16816 # A "../" for each directory in $ac_dir_suffix.
16817 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16818else
16819 ac_dir_suffix= ac_top_builddir=
16820fi
16821
16822case $srcdir in
16823 .) # No --srcdir option. We are building in place.
16824 ac_srcdir=.
16825 if test -z "$ac_top_builddir"; then
16826 ac_top_srcdir=.
16827 else
16828 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16829 fi ;;
16830 [\\/]* | ?:[\\/]* ) # Absolute path.
16831 ac_srcdir=$srcdir$ac_dir_suffix;
16832 ac_top_srcdir=$srcdir ;;
16833 *) # Relative path.
16834 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16835 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16836esac
8ab705be
KC
16837
16838# Do not use `cd foo && pwd` to compute absolute paths, because
16839# the directories may not exist.
16840case `pwd` in
16841.) ac_abs_builddir="$ac_dir";;
86da66b5 16842*)
8ab705be
KC
16843 case "$ac_dir" in
16844 .) ac_abs_builddir=`pwd`;;
16845 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
16846 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
16847 esac;;
16848esac
8ab705be 16849case $ac_abs_builddir in
86da66b5
HPN
16850.) ac_abs_top_builddir=${ac_top_builddir}.;;
16851*)
16852 case ${ac_top_builddir}. in
8ab705be 16853 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 16854 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 16855 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
16856 esac;;
16857esac
8ab705be 16858case $ac_abs_builddir in
86da66b5
HPN
16859.) ac_abs_srcdir=$ac_srcdir;;
16860*)
16861 case $ac_srcdir in
8ab705be 16862 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 16863 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 16864 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
16865 esac;;
16866esac
8ab705be 16867case $ac_abs_builddir in
86da66b5
HPN
16868.) ac_abs_top_srcdir=$ac_top_srcdir;;
16869*)
16870 case $ac_top_srcdir in
8ab705be 16871 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 16872 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 16873 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
16874 esac;;
16875esac
ba479fd2
NN
16876
16877
16878 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
16879echo "$as_me: executing $ac_dest commands" >&6;}
16880 case $ac_dest in
16881 default )
f1faaabd
NN
16882case ${CONFIG_HEADERS} in
16883 *auto-host.h:config.in*)
16884 echo > cstamp-h ;;
861bb6c1 16885esac
2ed26f6b 16886# Make sure all the subdirs exist.
3b620440 16887for d in $subdirs doc build
2ed26f6b 16888do
2ed26f6b 16889 test -d $d || mkdir $d
2ed26f6b 16890done
93cf819d
BK
16891# If the host supports symlinks, point stage[1234] at ../stage[1234] so
16892# bootstrapping and the installation procedure can still use
16893# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
16894# FLAGS_TO_PASS has been modified to solve the problem there.
16895# This is virtually a duplicate of what happens in configure.lang; we do
16896# an extra check to make sure this only happens if ln -s can be used.
35f06ae4
PB
16897case "$LN_S" in
16898 *-s*)
16899 for d in ${subdirs} ; do
1e6347d8 16900 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 16901 cd $d
6a1b7268 16902 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
16903 do
16904 rm -f $t
35f06ae4 16905 $LN_S ../$t $t 2>/dev/null
4e8a434e
BK
16906 done
16907 cd $STARTDIR
35f06ae4
PB
16908 done
16909 ;;
16910esac
ba479fd2
NN
16911 ;;
16912 esac
16913done
16914_ACEOF
cafe096b 16915
ba479fd2
NN
16916cat >>$CONFIG_STATUS <<\_ACEOF
16917
16918{ (exit 0); exit 0; }
16919_ACEOF
861bb6c1 16920chmod +x $CONFIG_STATUS
ba479fd2
NN
16921ac_clean_files=$ac_clean_files_save
16922
16923
16924# configure is writing to config.log, and then calls config.status.
16925# config.status does its own redirection, appending to config.log.
16926# Unfortunately, on DOS this fails, as config.log is still kept open
16927# by configure, so config.status won't be able to write to it; its
16928# output is simply discarded. So we exec the FD to /dev/null,
16929# effectively closing config.log, so it can be properly (re)opened and
16930# appended to by config.status. When coming back to configure, we
16931# need to make the FD available again.
16932if test "$no_create" != yes; then
16933 ac_cs_success=:
16934 ac_config_status_args=
16935 test "$silent" = yes &&
16936 ac_config_status_args="$ac_config_status_args --quiet"
16937 exec 5>/dev/null
16938 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16939 exec 5>>config.log
16940 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16941 # would make configure fail if this is the last instruction.
16942 $ac_cs_success || { (exit 1); exit 1; }
16943fi
861bb6c1 16944